@g1cloud/page-builder-editor 1.0.0-alpha.16 → 1.0.0-alpha.18

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.
@@ -6599,7 +6599,7 @@ var __publicField = (obj, key, value) => {
6599
6599
  })(shortUniqueId$1);
6600
6600
  var shortUniqueIdExports = shortUniqueId$1.exports;
6601
6601
  const ShortUniqueId = /* @__PURE__ */ getDefaultExportFromCjs(shortUniqueIdExports);
6602
- function mitt$1(n) {
6602
+ function mitt(n) {
6603
6603
  return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) {
6604
6604
  var i = n.get(t);
6605
6605
  i ? i.push(e) : n.set(t, [e]);
@@ -6615,57 +6615,30 @@ var __publicField = (obj, key, value) => {
6615
6615
  });
6616
6616
  } };
6617
6617
  }
6618
- const emitter$1 = mitt$1();
6618
+ const emitter = mitt();
6619
6619
  const PageBuilderEditorEvent = {
6620
6620
  on: {
6621
6621
  modelUpdated: (listener) => {
6622
- emitter$1.on("modelUpdated", listener);
6622
+ emitter.on("modelUpdated", listener);
6623
6623
  },
6624
6624
  modelUpdatedByUI: (listener) => {
6625
- emitter$1.on("modelUpdatedByUI", listener);
6626
- },
6627
- requestImage: (listener) => {
6628
- emitter$1.on("requestImage", listener);
6629
- },
6630
- requestProducts: (listener) => {
6631
- emitter$1.on("requestProducts", listener);
6632
- },
6633
- requestLocalMarketingPartSchedule: (listener) => {
6634
- emitter$1.on("requestLocalMarketingPartSchedule", listener);
6625
+ emitter.on("modelUpdatedByUI", listener);
6635
6626
  }
6636
6627
  },
6637
6628
  off: {
6638
6629
  modelUpdated: (listener) => {
6639
- emitter$1.off("modelUpdated", listener);
6630
+ emitter.off("modelUpdated", listener);
6640
6631
  },
6641
6632
  modelUpdatedByUI: (listener) => {
6642
- emitter$1.off("modelUpdatedByUI", listener);
6643
- },
6644
- requestImage: (listener) => {
6645
- emitter$1.off("requestImage", listener);
6646
- },
6647
- requestProducts: (listener) => {
6648
- emitter$1.off("requestProducts", listener);
6649
- },
6650
- requestLocalMarketingPartSchedule: (listener) => {
6651
- emitter$1.off("requestLocalMarketingPartSchedule", listener);
6633
+ emitter.off("modelUpdatedByUI", listener);
6652
6634
  }
6653
6635
  },
6654
6636
  emit: {
6655
6637
  modelUpdated: (changes) => {
6656
- emitter$1.emit("modelUpdated", changes);
6638
+ emitter.emit("modelUpdated", changes);
6657
6639
  },
6658
6640
  modelUpdatedByUI: (changes) => {
6659
- emitter$1.emit("modelUpdatedByUI", changes);
6660
- },
6661
- requestImage: (param) => {
6662
- emitter$1.emit("requestImage", param);
6663
- },
6664
- requestProducts: (param) => {
6665
- emitter$1.emit("requestProducts", param);
6666
- },
6667
- requestLocalMarketingPartSchedule: (param) => {
6668
- emitter$1.emit("requestLocalMarketingPartSchedule", param);
6641
+ emitter.emit("modelUpdatedByUI", changes);
6669
6642
  }
6670
6643
  }
6671
6644
  };
@@ -6803,28 +6776,11 @@ var __publicField = (obj, key, value) => {
6803
6776
  }
6804
6777
  return style;
6805
6778
  }
6806
- getPageBuilderId() {
6807
- if (this.isRoot())
6808
- return this.pageBuilderId;
6809
- if (this.parent)
6810
- return this.parent.getPageBuilderId();
6811
- }
6812
- isGlobalDesignPart() {
6813
- return false;
6814
- }
6815
- isLocalDesignPart() {
6816
- return false;
6817
- }
6818
- isLocalMarketingPart() {
6819
- return false;
6820
- }
6821
6779
  }
6822
6780
  class RootPart extends Part {
6823
6781
  constructor() {
6824
6782
  super();
6825
- __publicField2(this, "pageBuilderId");
6826
6783
  __publicField2(this, "language");
6827
- this.pageBuilderId = "";
6828
6784
  this.language = "en";
6829
6785
  this.partType = ROOT_TYPE$1;
6830
6786
  this.partName = ROOT_TYPE$1;
@@ -6852,18 +6808,6 @@ var __publicField = (obj, key, value) => {
6852
6808
  isSection() {
6853
6809
  return true;
6854
6810
  }
6855
- isGlobalDesignPart() {
6856
- var _a;
6857
- return ((_a = this.properties) == null ? void 0 : _a.sectionType) === "GlobalDesignPart";
6858
- }
6859
- isLocalDesignPart() {
6860
- var _a;
6861
- return ((_a = this.properties) == null ? void 0 : _a.sectionType) === "LocalDesignPart";
6862
- }
6863
- isLocalMarketingPart() {
6864
- var _a;
6865
- return ((_a = this.properties) == null ? void 0 : _a.sectionType) === "LocalMarketingPart";
6866
- }
6867
6811
  }
6868
6812
  class Block extends Part {
6869
6813
  constructor() {
@@ -6894,12 +6838,12 @@ var __publicField = (obj, key, value) => {
6894
6838
  this.rootPart = vue.ref(new RootPart());
6895
6839
  }
6896
6840
  };
6897
- const _hoisted_1$7$1 = ["data-model-id"];
6898
- const _hoisted_2$3$1 = {
6841
+ const _hoisted_1$8$1 = ["data-model-id"];
6842
+ const _hoisted_2$5$1 = {
6899
6843
  key: 1,
6900
6844
  class: "pb-nested-widget"
6901
6845
  };
6902
- const _sfc_main$9$1 = /* @__PURE__ */ vue.defineComponent({
6846
+ const _sfc_main$a$1 = /* @__PURE__ */ vue.defineComponent({
6903
6847
  __name: "PbWidget",
6904
6848
  props: {
6905
6849
  part: {}
@@ -6921,7 +6865,7 @@ var __publicField = (obj, key, value) => {
6921
6865
  key: 0,
6922
6866
  part: _ctx.part
6923
6867
  }, null, 8, ["part"])) : vue.createCommentVNode("", true),
6924
- childComponents.value && childComponents.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$3$1, [
6868
+ childComponents.value && childComponents.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$5$1, [
6925
6869
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(childComponents.value, (child) => {
6926
6870
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(child.component), {
6927
6871
  key: child.part.partId,
@@ -6929,12 +6873,12 @@ var __publicField = (obj, key, value) => {
6929
6873
  }, null, 8, ["part"]);
6930
6874
  }), 128))
6931
6875
  ])) : vue.createCommentVNode("", true)
6932
- ], 16, _hoisted_1$7$1);
6876
+ ], 16, _hoisted_1$8$1);
6933
6877
  };
6934
6878
  }
6935
6879
  });
6936
- const _hoisted_1$6$1 = ["data-model-id"];
6937
- const _sfc_main$8$1 = /* @__PURE__ */ vue.defineComponent({
6880
+ const _hoisted_1$7$1 = ["data-model-id"];
6881
+ const _sfc_main$9$1 = /* @__PURE__ */ vue.defineComponent({
6938
6882
  __name: "PbBlock",
6939
6883
  props: {
6940
6884
  part: {}
@@ -6952,17 +6896,17 @@ var __publicField = (obj, key, value) => {
6952
6896
  style: (_a = _ctx.part.properties) == null ? void 0 : _a.css
6953
6897
  }, properties.value), [
6954
6898
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.part.children, (child) => {
6955
- return vue.openBlock(), vue.createBlock(_sfc_main$9$1, {
6899
+ return vue.openBlock(), vue.createBlock(_sfc_main$a$1, {
6956
6900
  key: child.partId,
6957
6901
  part: child
6958
6902
  }, null, 8, ["part"]);
6959
6903
  }), 128))
6960
- ], 16, _hoisted_1$6$1);
6904
+ ], 16, _hoisted_1$7$1);
6961
6905
  };
6962
6906
  }
6963
6907
  });
6964
- const _hoisted_1$5$1 = { class: "pb-block" };
6965
- const _hoisted_2$2$1 = /* @__PURE__ */ vue.createElementVNode("div", {
6908
+ const _hoisted_1$6$1 = { class: "pb-block" };
6909
+ const _hoisted_2$4$1 = /* @__PURE__ */ vue.createElementVNode("div", {
6966
6910
  class: "pb-widget",
6967
6911
  style: { "margin": "0 auto" }
6968
6912
  }, [
@@ -6970,22 +6914,22 @@ var __publicField = (obj, key, value) => {
6970
6914
  /* @__PURE__ */ vue.createElementVNode("h3", null, "Login Design Part")
6971
6915
  ])
6972
6916
  ], -1);
6973
- const _hoisted_3$1$1 = [
6974
- _hoisted_2$2$1
6917
+ const _hoisted_3$4$1 = [
6918
+ _hoisted_2$4$1
6975
6919
  ];
6976
- const _sfc_main$7$1 = /* @__PURE__ */ vue.defineComponent({
6920
+ const _sfc_main$8$1 = /* @__PURE__ */ vue.defineComponent({
6977
6921
  __name: "PbLoginDepart",
6978
6922
  props: {
6979
6923
  part: {}
6980
6924
  },
6981
6925
  setup(__props) {
6982
6926
  return (_ctx, _cache) => {
6983
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5$1, _hoisted_3$1$1);
6927
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6$1, _hoisted_3$4$1);
6984
6928
  };
6985
6929
  }
6986
6930
  });
6987
- const _hoisted_1$4$1 = ["data-model-id"];
6988
- const _sfc_main$6$1 = /* @__PURE__ */ vue.defineComponent({
6931
+ const _hoisted_1$5$1 = ["data-model-id"];
6932
+ const _sfc_main$7$1 = /* @__PURE__ */ vue.defineComponent({
6989
6933
  __name: "PbSection",
6990
6934
  props: {
6991
6935
  part: {}
@@ -7001,94 +6945,74 @@ var __publicField = (obj, key, value) => {
7001
6945
  "data-model-id": _ctx.part.partId,
7002
6946
  style: (_a = _ctx.part.properties) == null ? void 0 : _a.css
7003
6947
  }, properties.value), [
7004
- ((_b = _ctx.part.properties) == null ? void 0 : _b.name) === "Login Design Part" ? (vue.openBlock(), vue.createBlock(_sfc_main$7$1, {
6948
+ ((_b = _ctx.part.properties) == null ? void 0 : _b.name) === "Login Design Part" ? (vue.openBlock(), vue.createBlock(_sfc_main$8$1, {
7005
6949
  key: 0,
7006
6950
  part: _ctx.part
7007
6951
  }, null, 8, ["part"])) : _ctx.part.children && _ctx.part.children.length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.part.children, (block) => {
7008
- return vue.openBlock(), vue.createBlock(_sfc_main$8$1, {
6952
+ return vue.openBlock(), vue.createBlock(_sfc_main$9$1, {
7009
6953
  key: block.partId,
7010
6954
  part: block
7011
6955
  }, null, 8, ["part"]);
7012
6956
  }), 128)) : vue.createCommentVNode("", true)
7013
- ], 16, _hoisted_1$4$1);
6957
+ ], 16, _hoisted_1$5$1);
7014
6958
  };
7015
6959
  }
7016
6960
  });
7017
- const _hoisted_1$3$1 = { class: "pb-image-widget" };
7018
- const _hoisted_2$1$1 = ["src"];
7019
- const _hoisted_3$s = {
6961
+ const _hoisted_1$4$1 = { class: "pb-image-widget" };
6962
+ const _hoisted_2$3$1 = ["src"];
6963
+ const _hoisted_3$3$1 = {
7020
6964
  key: 1,
7021
- class: "empty"
6965
+ class: "placeholder"
7022
6966
  };
7023
- const _hoisted_4$i = /* @__PURE__ */ vue.createElementVNode("span", { class: "font-icon" }, "image", -1);
7024
- const _hoisted_5$9 = [
7025
- _hoisted_4$i
6967
+ const _hoisted_4$h = /* @__PURE__ */ vue.createElementVNode("span", { class: "font-icon" }, "image", -1);
6968
+ const _hoisted_5$8 = [
6969
+ _hoisted_4$h
7026
6970
  ];
7027
- const _sfc_main$5$1 = /* @__PURE__ */ vue.defineComponent({
6971
+ const _sfc_main$6$1 = /* @__PURE__ */ vue.defineComponent({
7028
6972
  __name: "PbImageWidget",
7029
6973
  props: {
7030
6974
  part: {},
7031
- viewMode: { type: Boolean, default: false }
6975
+ placeholder: { type: Boolean }
7032
6976
  },
7033
6977
  setup(__props) {
7034
6978
  return (_ctx, _cache) => {
7035
6979
  var _a, _b;
7036
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3$1, [
6980
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4$1, [
7037
6981
  ((_a = _ctx.part.properties) == null ? void 0 : _a.image) ? (vue.openBlock(), vue.createElementBlock("img", {
7038
6982
  key: 0,
7039
6983
  src: (_b = _ctx.part.properties) == null ? void 0 : _b.image,
7040
6984
  alt: "",
7041
6985
  class: "image"
7042
- }, null, 8, _hoisted_2$1$1)) : !_ctx.viewMode ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$s, _hoisted_5$9)) : vue.createCommentVNode("", true)
6986
+ }, null, 8, _hoisted_2$3$1)) : _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3$1, _hoisted_5$8)) : vue.createCommentVNode("", true)
7043
6987
  ]);
7044
6988
  };
7045
6989
  }
7046
6990
  });
7047
- const _hoisted_1$2$1 = ["textContent"];
7048
- const _sfc_main$4$1 = /* @__PURE__ */ vue.defineComponent({
6991
+ const _hoisted_1$3$1 = { class: "pb-text-widget" };
6992
+ const _hoisted_2$2$1 = ["textContent"];
6993
+ const _hoisted_3$2$1 = {
6994
+ key: 1,
6995
+ class: "placeholder",
6996
+ textContent: "Empty Text"
6997
+ };
6998
+ const _sfc_main$5$1 = /* @__PURE__ */ vue.defineComponent({
7049
6999
  __name: "PbTextWidget",
7050
7000
  props: {
7051
7001
  part: {},
7052
- viewMode: { type: Boolean, default: false }
7002
+ placeholder: { type: Boolean }
7053
7003
  },
7054
7004
  setup(__props) {
7055
7005
  const props = __props;
7056
7006
  const pageBuilder = usePageBuilder();
7057
- const emptyClass = vue.computed(() => {
7058
- var _a;
7059
- if (props.viewMode) {
7060
- return false;
7061
- } else if ((_a = props.part.properties) == null ? void 0 : _a.text) {
7062
- if (typeof props.part.properties.text === "string") {
7063
- return true;
7064
- } else {
7065
- return !props.part.properties.text[pageBuilder.locale.value];
7066
- }
7067
- } else {
7068
- return true;
7069
- }
7070
- });
7071
7007
  const text = vue.computed(() => {
7072
7008
  var _a;
7073
7009
  if ((_a = props.part.properties) == null ? void 0 : _a.text) {
7074
7010
  if (typeof props.part.properties.text === "string") {
7075
- if (props.viewMode) {
7076
- return "";
7077
- } else {
7078
- return "Empty text";
7079
- }
7011
+ return props.part.properties.text;
7080
7012
  } else {
7081
- const t = props.part.properties.text[pageBuilder.locale.value];
7082
- if (props.viewMode) {
7083
- return t || "";
7084
- } else {
7085
- return t || "Empty text";
7086
- }
7013
+ const locale = pageBuilder.getLocale();
7014
+ return props.part.properties.text[locale] || "";
7087
7015
  }
7088
- } else if (props.viewMode) {
7089
- return "";
7090
- } else {
7091
- return "Empty text";
7092
7016
  }
7093
7017
  });
7094
7018
  const style = vue.computed(() => {
@@ -7101,23 +7025,29 @@ var __publicField = (obj, key, value) => {
7101
7025
  };
7102
7026
  });
7103
7027
  return (_ctx, _cache) => {
7104
- return vue.openBlock(), vue.createElementBlock("div", {
7105
- class: vue.normalizeClass([[emptyClass.value ? "empty" : ""], "pb-text-widget"])
7106
- }, [
7107
- vue.createElementVNode("div", vue.mergeProps({ class: "text" }, style.value, {
7028
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3$1, [
7029
+ text.value ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
7030
+ key: 0,
7031
+ class: "text"
7032
+ }, style.value, {
7108
7033
  textContent: vue.toDisplayString(text.value)
7109
- }), null, 16, _hoisted_1$2$1)
7110
- ], 2);
7034
+ }), null, 16, _hoisted_2$2$1)) : _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2$1)) : vue.createCommentVNode("", true)
7035
+ ]);
7111
7036
  };
7112
7037
  }
7113
7038
  });
7114
- const _hoisted_1$1$1 = ["innerHTML"];
7115
- const _hoisted_2$v = { key: 1 };
7116
- const _sfc_main$3$1 = /* @__PURE__ */ vue.defineComponent({
7039
+ const _hoisted_1$2$1 = { class: "pb-html-widget" };
7040
+ const _hoisted_2$1$1 = ["innerHTML"];
7041
+ const _hoisted_3$1$1 = {
7042
+ key: 1,
7043
+ class: "placeholder",
7044
+ textContent: "Empty HTML"
7045
+ };
7046
+ const _sfc_main$4$1 = /* @__PURE__ */ vue.defineComponent({
7117
7047
  __name: "PbHtmlWidget",
7118
7048
  props: {
7119
7049
  part: {},
7120
- viewMode: { type: Boolean, default: false }
7050
+ placeholder: { type: Boolean }
7121
7051
  },
7122
7052
  setup(__props) {
7123
7053
  const props = __props;
@@ -7144,23 +7074,69 @@ ${_html.style}
7144
7074
  var _a;
7145
7075
  return getHtml((_a = props.part.properties) == null ? void 0 : _a.html);
7146
7076
  });
7147
- const emptyClass = vue.computed(() => {
7148
- if (props.viewMode) {
7149
- return false;
7150
- } else {
7151
- return !html.value;
7152
- }
7153
- });
7077
+ vue.computed(() => props.placeholder ? !html.value : false);
7154
7078
  return (_ctx, _cache) => {
7155
- return vue.openBlock(), vue.createElementBlock("div", {
7156
- class: vue.normalizeClass([[emptyClass.value ? "empty" : ""], "pb-html-widget"])
7157
- }, [
7079
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2$1, [
7158
7080
  html.value ? (vue.openBlock(), vue.createElementBlock("div", {
7159
7081
  key: 0,
7160
7082
  class: "html",
7161
7083
  innerHTML: html.value
7162
- }, null, 8, _hoisted_1$1$1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$v, "Empty HTML"))
7163
- ], 2);
7084
+ }, null, 8, _hoisted_2$1$1)) : _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$1$1)) : vue.createCommentVNode("", true)
7085
+ ]);
7086
+ };
7087
+ }
7088
+ });
7089
+ const _hoisted_1$1$1 = { class: "pb-iframe-widget" };
7090
+ const _hoisted_2$t = ["src"];
7091
+ const _hoisted_3$q = {
7092
+ key: 1,
7093
+ class: "placeholder",
7094
+ textContent: "Empty URL"
7095
+ };
7096
+ const _sfc_main$3$1 = /* @__PURE__ */ vue.defineComponent({
7097
+ __name: "PbIframeWidget",
7098
+ props: {
7099
+ part: {},
7100
+ placeholder: { type: Boolean }
7101
+ },
7102
+ setup(__props) {
7103
+ const props = __props;
7104
+ const pageBuilder = usePageBuilder();
7105
+ const url = vue.computed(() => {
7106
+ var _a;
7107
+ const url2 = (_a = props.part.properties) == null ? void 0 : _a.url;
7108
+ if (!url2)
7109
+ return;
7110
+ if (typeof url2 !== "object")
7111
+ return;
7112
+ const locale = pageBuilder.getLocale();
7113
+ return url2[locale];
7114
+ });
7115
+ const style = vue.computed(() => ({
7116
+ style: {
7117
+ width: "100%",
7118
+ height: `${height.value}px`
7119
+ }
7120
+ }));
7121
+ const height = vue.ref(200);
7122
+ const updateHeight = (event) => {
7123
+ if (event.data && event.data.height) {
7124
+ height.value = event.data.height;
7125
+ }
7126
+ };
7127
+ vue.onMounted(() => {
7128
+ window.addEventListener("message", updateHeight);
7129
+ });
7130
+ vue.onBeforeUnmount(() => {
7131
+ window.removeEventListener("message", updateHeight);
7132
+ });
7133
+ return (_ctx, _cache) => {
7134
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1$1, [
7135
+ url.value ? (vue.openBlock(), vue.createElementBlock("iframe", vue.mergeProps({
7136
+ key: 0,
7137
+ src: url.value
7138
+ }, style.value), null, 16, _hoisted_2$t)) : _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$q)) : vue.createCommentVNode("", true)
7139
+ ]);
7164
7140
  };
7165
7141
  }
7166
7142
  });
@@ -7168,41 +7144,31 @@ ${_html.style}
7168
7144
  "Section": {
7169
7145
  partType: "Section",
7170
7146
  partName: "Section",
7171
- creator: () => _sfc_main$6$1
7172
- },
7173
- "GlobalDesignPart": {
7174
- partType: "Section",
7175
- partName: "GlobalDesignPart",
7176
- creator: () => _sfc_main$6$1
7177
- },
7178
- "LocalDesignPart": {
7179
- partType: "Section",
7180
- partName: "LocalDesignPart",
7181
- creator: () => _sfc_main$6$1
7182
- },
7183
- "LocalMarketingPart": {
7184
- partType: "Section",
7185
- partName: "LocalMarketingPart",
7186
- creator: () => _sfc_main$6$1
7147
+ creator: () => _sfc_main$7$1
7187
7148
  },
7188
7149
  "Block": {
7189
7150
  partType: "Block",
7190
7151
  partName: "Block",
7191
- creator: () => _sfc_main$8$1
7152
+ creator: () => _sfc_main$9$1
7192
7153
  },
7193
7154
  "TextWidget": {
7194
7155
  partType: "Widget",
7195
7156
  partName: "TextWidget",
7196
- creator: () => _sfc_main$4$1
7157
+ creator: () => _sfc_main$5$1
7197
7158
  },
7198
7159
  "ImageWidget": {
7199
7160
  partType: "Widget",
7200
7161
  partName: "ImageWidget",
7201
- creator: () => _sfc_main$5$1
7162
+ creator: () => _sfc_main$6$1
7202
7163
  },
7203
7164
  "HtmlWidget": {
7204
7165
  partType: "Widget",
7205
7166
  partName: "HtmlWidget",
7167
+ creator: () => _sfc_main$4$1
7168
+ },
7169
+ "IframeWidget": {
7170
+ partType: "Widget",
7171
+ partName: "IframeWidget",
7206
7172
  creator: () => _sfc_main$3$1
7207
7173
  }
7208
7174
  };
@@ -7211,9 +7177,10 @@ ${_html.style}
7211
7177
  let partDefinitions$1 = { ...defaultPartDefinitions };
7212
7178
  class PageBuilderViewerImpl {
7213
7179
  constructor() {
7214
- __publicField2(this, "instanceId");
7215
7180
  __publicField2(this, "model");
7216
7181
  __publicField2(this, "locale", vue.ref("en"));
7182
+ __publicField2(this, "watchers", {});
7183
+ __publicField2(this, "providers", {});
7217
7184
  this.model = new Model$1();
7218
7185
  }
7219
7186
  getLocale() {
@@ -7227,33 +7194,45 @@ ${_html.style}
7227
7194
  plugin.widgets.forEach((v) => {
7228
7195
  const w = { ...v };
7229
7196
  w.partType = "Widget";
7230
- w.creator = () => _sfc_main$B;
7197
+ w.creator = () => _sfc_main$z;
7231
7198
  partDefinitions$1[v.partName] = w;
7232
7199
  });
7233
7200
  }
7201
+ if (plugin.watchers) {
7202
+ this.watchers = { ...this.watchers, ...plugin.watchers };
7203
+ }
7204
+ if (plugin.providers) {
7205
+ this.providers = { ...this.providers, ...plugin.providers };
7206
+ }
7234
7207
  }
7235
7208
  watchCustomWidgetData(part) {
7236
7209
  const def = partDefinitions$1[part.partName];
7237
7210
  if (!def || !def.dataWatcher)
7238
7211
  return false;
7239
- return def.dataWatcher(part.properties);
7212
+ const watcher = this.watchers[def.dataWatcher];
7213
+ if (!watcher)
7214
+ return false;
7215
+ return watcher(part.properties);
7240
7216
  }
7241
7217
  provideCustomWidgetData(part) {
7242
7218
  const def = partDefinitions$1[part.partName];
7243
7219
  if (!def || !def.dataProvider)
7244
7220
  return Promise.resolve();
7245
- return def.dataProvider(part.properties);
7221
+ const provider = this.providers[def.dataProvider];
7222
+ if (!provider)
7223
+ return Promise.resolve();
7224
+ return provider(part.properties);
7246
7225
  }
7247
7226
  render(pageContent) {
7248
- const rootPart = new RootPart();
7249
- rootPart.pageBuilderId = this.instanceId;
7250
- rootPart.children = this.parsePageContent(pageContent);
7251
- if (rootPart.children) {
7252
- for (let page of rootPart.children) {
7253
- page.parent = rootPart;
7227
+ const rootPart = this.parsePartContent(pageContent);
7228
+ if (rootPart) {
7229
+ if (rootPart.children) {
7230
+ for (let page of rootPart.children) {
7231
+ page.parent = rootPart;
7232
+ }
7254
7233
  }
7234
+ this.model.rootPart.value = rootPart;
7255
7235
  }
7256
- this.model.rootPart.value = rootPart;
7257
7236
  }
7258
7237
  parsePageContent(pageContent) {
7259
7238
  return pageContent.map((partContent) => this.parsePartContent(partContent)).filter((part) => !!part);
@@ -7275,6 +7254,8 @@ ${_html.style}
7275
7254
  }
7276
7255
  createPart(partType) {
7277
7256
  switch (partType) {
7257
+ case "Root":
7258
+ return new RootPart();
7278
7259
  case "Page":
7279
7260
  return new Page();
7280
7261
  case "Section":
@@ -7348,7 +7329,7 @@ ${_html.style}
7348
7329
  class: vue.normalizeClass([[_ctx.isMobilePage ? "mobile" : "pc"], "pb-page-content"])
7349
7330
  }, [
7350
7331
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList((_a = _ctx.page) == null ? void 0 : _a.children, (section) => {
7351
- return vue.openBlock(), vue.createBlock(_sfc_main$6$1, {
7332
+ return vue.openBlock(), vue.createBlock(_sfc_main$7$1, {
7352
7333
  key: section.partId,
7353
7334
  part: section
7354
7335
  }, null, 8, ["part"]);
@@ -7358,11 +7339,10 @@ ${_html.style}
7358
7339
  };
7359
7340
  }
7360
7341
  });
7361
- const _hoisted_1$F = { class: "pb-viewer" };
7342
+ const _hoisted_1$D = { class: "pb-viewer" };
7362
7343
  const _sfc_main$1$1 = /* @__PURE__ */ vue.defineComponent({
7363
7344
  __name: "PageBuilderViewer",
7364
7345
  props: {
7365
- instanceId: {},
7366
7346
  pageContent: {},
7367
7347
  isMobilePage: { type: Boolean },
7368
7348
  language: {},
@@ -7371,7 +7351,6 @@ ${_html.style}
7371
7351
  setup(__props) {
7372
7352
  const props = __props;
7373
7353
  const pageBuilderViewer = createPageBuilderViewer();
7374
- pageBuilderViewer.instanceId = props.instanceId;
7375
7354
  pageBuilderViewer.setLocale(props.language);
7376
7355
  if (props.plugin)
7377
7356
  pageBuilderViewer.registerCustomPlugin(props.plugin);
@@ -7392,7 +7371,7 @@ ${_html.style}
7392
7371
  }
7393
7372
  );
7394
7373
  return (_ctx, _cache) => {
7395
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$F, [
7374
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$D, [
7396
7375
  page.value ? (vue.openBlock(), vue.createBlock(_sfc_main$2$1, {
7397
7376
  key: 0,
7398
7377
  "is-mobile-page": _ctx.isMobilePage,
@@ -7402,7 +7381,7 @@ ${_html.style}
7402
7381
  };
7403
7382
  }
7404
7383
  });
7405
- const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
7384
+ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
7406
7385
  __name: "PbCustomWidget",
7407
7386
  props: {
7408
7387
  part: {},
@@ -7415,7 +7394,6 @@ ${_html.style}
7415
7394
  const comp = vue.computed(() => pageBuilder.getCustomWidgetComponent(props.part));
7416
7395
  const data = vue.ref({});
7417
7396
  const bind = vue.computed(() => ({
7418
- pageBuilderId: pageBuilder.instanceId,
7419
7397
  ...props.part.properties || {},
7420
7398
  placeholder: true,
7421
7399
  ...data.value || {}
@@ -7433,40 +7411,6 @@ ${_html.style}
7433
7411
  };
7434
7412
  }
7435
7413
  });
7436
- function mitt(n) {
7437
- return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) {
7438
- var i = n.get(t);
7439
- i ? i.push(e) : n.set(t, [e]);
7440
- }, off: function(t, e) {
7441
- var i = n.get(t);
7442
- i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
7443
- }, emit: function(t, e) {
7444
- var i = n.get(t);
7445
- i && i.slice().map(function(n2) {
7446
- n2(e);
7447
- }), (i = n.get("*")) && i.slice().map(function(n2) {
7448
- n2(t, e);
7449
- });
7450
- } };
7451
- }
7452
- const emitter = mitt();
7453
- const PageBuilderViewerEvent = {
7454
- on: {
7455
- requestProductMapping: (listener) => {
7456
- emitter.on("requestProductMapping", listener);
7457
- }
7458
- },
7459
- off: {
7460
- requestProductMapping: (listener) => {
7461
- emitter.off("requestProductMapping", listener);
7462
- }
7463
- },
7464
- emit: {
7465
- requestProductMapping: (param) => {
7466
- emitter.emit("requestProductMapping", param);
7467
- }
7468
- }
7469
- };
7470
7414
  const PART_ID_KEY = "partId";
7471
7415
  const PART_NAME_KEY = "partName";
7472
7416
  const RESERVED_ATTRIBUTES = [PART_ID_KEY, PART_NAME_KEY];
@@ -7637,6 +7581,9 @@ ${_html.style}
7637
7581
  const createPart = (partType, partName, properties) => {
7638
7582
  let part;
7639
7583
  switch (partType) {
7584
+ case ROOT_TYPE:
7585
+ part = new RootPart();
7586
+ break;
7640
7587
  case PAGE_TYPE:
7641
7588
  part = new Page();
7642
7589
  break;
@@ -7694,10 +7641,6 @@ ${_html.style}
7694
7641
  __publicField(this, "yjsRoot");
7695
7642
  __publicField(this, "undoManager");
7696
7643
  __publicField(this, "rootPart");
7697
- __publicField(this, "serializePageModel", (partIds) => {
7698
- const parts = this.findPartsByIds(partIds);
7699
- return partsToJsonString(parts);
7700
- });
7701
7644
  this.yjsDoc = new Doc();
7702
7645
  this.yjsRoot = this.yjsDoc.get("root", YXmlElement);
7703
7646
  const rootPartId = getNewPartId();
@@ -7746,7 +7689,30 @@ ${_html.style}
7746
7689
  });
7747
7690
  return parts;
7748
7691
  }
7749
- parsePageModel(json, keepPartId = false) {
7692
+ serializeModel(mediaExtractor, providerExtractor) {
7693
+ const root = partToJsonObject(this.rootPart);
7694
+ if (mediaExtractor) {
7695
+ root.media = mediaExtractor(this.rootPart);
7696
+ }
7697
+ if (providerExtractor) {
7698
+ providerExtractor(root);
7699
+ }
7700
+ return JSON.stringify(root);
7701
+ }
7702
+ parseModel(json, keepPartId = false) {
7703
+ const root = JSON.parse(json);
7704
+ if (root.partType !== ROOT_TYPE)
7705
+ throw Error("Invalid data format");
7706
+ const rootPart = partFromJsonObject(root, keepPartId);
7707
+ if (!rootPart)
7708
+ throw new Error("Invalid data format");
7709
+ return rootPart;
7710
+ }
7711
+ serializeParts(partIds) {
7712
+ const parts = this.findPartsByIds(partIds);
7713
+ return partsToJsonString(parts);
7714
+ }
7715
+ parseParts(json, keepPartId = false) {
7750
7716
  return partsFromJsonString(json, keepPartId);
7751
7717
  }
7752
7718
  moveElements(partId, destPartId, destIndex, update, doNotChangeIndex) {
@@ -8272,22 +8238,22 @@ ${_html.style}
8272
8238
  }
8273
8239
  return target;
8274
8240
  };
8275
- const _sfc_main$A = {};
8276
- const _hoisted_1$E = { class: "pb-add-widget-button" };
8277
- const _hoisted_2$u = /* @__PURE__ */ vue.createElementVNode("span", { class: "icon material-icons-outlined" }, "add_box", -1);
8278
- const _hoisted_3$r = /* @__PURE__ */ vue.createElementVNode("span", { class: "text" }, "Add Widget", -1);
8279
- const _hoisted_4$h = [
8280
- _hoisted_2$u,
8281
- _hoisted_3$r
8241
+ const _sfc_main$y = {};
8242
+ const _hoisted_1$C = { class: "pb-add-widget-button" };
8243
+ const _hoisted_2$s = /* @__PURE__ */ vue.createElementVNode("span", { class: "icon material-icons-outlined" }, "add_box", -1);
8244
+ const _hoisted_3$p = /* @__PURE__ */ vue.createElementVNode("span", { class: "text" }, "Add Widget", -1);
8245
+ const _hoisted_4$g = [
8246
+ _hoisted_2$s,
8247
+ _hoisted_3$p
8282
8248
  ];
8283
8249
  function _sfc_render$1(_ctx, _cache) {
8284
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$E, [
8250
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$C, [
8285
8251
  vue.createElementVNode("button", {
8286
8252
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("add-widget", $event))
8287
- }, _hoisted_4$h)
8253
+ }, _hoisted_4$g)
8288
8254
  ]);
8289
8255
  }
8290
- const PbAddWidgetButton = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$1]]);
8256
+ const PbAddWidgetButton = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$1]]);
8291
8257
  const MOUSE_TRACKER_KEY = "mouseTracker";
8292
8258
  const MOUSE_TRACKER_NOT_FOUND = "MouseTracker not found";
8293
8259
  class MouseTracker {
@@ -8318,12 +8284,12 @@ ${_html.style}
8318
8284
  throw Error(MOUSE_TRACKER_NOT_FOUND);
8319
8285
  return mouseTracker;
8320
8286
  };
8321
- const _hoisted_1$D = ["data-model-id", "draggable"];
8322
- const _hoisted_2$t = {
8287
+ const _hoisted_1$B = ["data-model-id", "draggable"];
8288
+ const _hoisted_2$r = {
8323
8289
  key: 1,
8324
8290
  class: "children"
8325
8291
  };
8326
- const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
8292
+ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
8327
8293
  __name: "PbWidget",
8328
8294
  props: {
8329
8295
  part: {}
@@ -8767,13 +8733,15 @@ ${_html.style}
8767
8733
  }, properties.value), [
8768
8734
  thisComponent.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(thisComponent.value), {
8769
8735
  key: 0,
8770
- part: _ctx.part
8736
+ part: _ctx.part,
8737
+ placeholder: true
8771
8738
  }, null, 8, ["part"])) : vue.createCommentVNode("", true),
8772
- childComponents.value && childComponents.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$t, [
8739
+ childComponents.value && childComponents.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$r, [
8773
8740
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(childComponents.value, (child) => {
8774
8741
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(child.component), {
8775
8742
  key: child.part.partId,
8776
- part: child.part
8743
+ part: child.part,
8744
+ placeholder: true
8777
8745
  }, null, 8, ["part"]);
8778
8746
  }), 128))
8779
8747
  ])) : vue.createCommentVNode("", true),
@@ -8787,14 +8755,14 @@ ${_html.style}
8787
8755
  class: "resize-handle",
8788
8756
  onMousedown: _resize_mousedown
8789
8757
  }, null, 32)) : vue.createCommentVNode("", true)
8790
- ], 16, _hoisted_1$D)), [
8758
+ ], 16, _hoisted_1$B)), [
8791
8759
  [vue.unref(vPartHandler), { pageBuilder: vue.unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
8792
8760
  ]);
8793
8761
  };
8794
8762
  }
8795
8763
  });
8796
- const _hoisted_1$C = ["data-model-id"];
8797
- const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
8764
+ const _hoisted_1$A = ["data-model-id"];
8765
+ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
8798
8766
  __name: "PbBlock",
8799
8767
  props: {
8800
8768
  part: {}
@@ -8984,19 +8952,19 @@ ${_html.style}
8984
8952
  onAddWidget: addWidget
8985
8953
  })) : vue.createCommentVNode("", true),
8986
8954
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.part.children, (child) => {
8987
- return vue.openBlock(), vue.createBlock(_sfc_main$z, {
8955
+ return vue.openBlock(), vue.createBlock(_sfc_main$x, {
8988
8956
  key: child.partId,
8989
8957
  part: child
8990
8958
  }, null, 8, ["part"]);
8991
8959
  }), 128))
8992
- ], 16, _hoisted_1$C)), [
8960
+ ], 16, _hoisted_1$A)), [
8993
8961
  [vue.unref(vPartHandler), { pageBuilder: vue.unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
8994
8962
  ]);
8995
8963
  };
8996
8964
  }
8997
8965
  });
8998
- const _hoisted_1$B = { class: "pb-block" };
8999
- const _hoisted_2$s = /* @__PURE__ */ vue.createElementVNode("div", {
8966
+ const _hoisted_1$z = { class: "pb-block" };
8967
+ const _hoisted_2$q = /* @__PURE__ */ vue.createElementVNode("div", {
9000
8968
  class: "pb-widget",
9001
8969
  style: { "margin": "0 auto" }
9002
8970
  }, [
@@ -9004,22 +8972,22 @@ ${_html.style}
9004
8972
  /* @__PURE__ */ vue.createElementVNode("h3", null, "Login Design Part")
9005
8973
  ])
9006
8974
  ], -1);
9007
- const _hoisted_3$q = [
9008
- _hoisted_2$s
8975
+ const _hoisted_3$o = [
8976
+ _hoisted_2$q
9009
8977
  ];
9010
- const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
8978
+ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
9011
8979
  __name: "PbLoginDepart",
9012
8980
  props: {
9013
8981
  part: {}
9014
8982
  },
9015
8983
  setup(__props) {
9016
8984
  return (_ctx, _cache) => {
9017
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$B, _hoisted_3$q);
8985
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$z, _hoisted_3$o);
9018
8986
  };
9019
8987
  }
9020
8988
  });
9021
- const _hoisted_1$A = ["data-model-id"];
9022
- const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
8989
+ const _hoisted_1$y = ["data-model-id"];
8990
+ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
9023
8991
  __name: "PbSection",
9024
8992
  props: {
9025
8993
  part: {}
@@ -9038,13 +9006,7 @@ ${_html.style}
9038
9006
  const properties = vue.computed(() => ({ style: props.part.getStyles() }));
9039
9007
  const disabled = vue.computed(() => {
9040
9008
  var _a;
9041
- if (["static"].includes(((_a = props.part.properties) == null ? void 0 : _a.sectionType) || ""))
9042
- return true;
9043
- if (pageBuilder.editMode === "local" && props.part.isGlobalDesignPart())
9044
- return true;
9045
- if (pageBuilder.editMode === "global" && (props.part.isLocalDesignPart() || props.part.isLocalMarketingPart()))
9046
- return true;
9047
- return false;
9009
+ return ["static"].includes(((_a = props.part.properties) == null ? void 0 : _a.sectionType) || "");
9048
9010
  });
9049
9011
  const addWidget = () => {
9050
9012
  pageBuilder.commandRegistry.executeCommand(OpenAddWidgetModalCommand.COMMAND_ID);
@@ -9130,13 +9092,13 @@ ${_html.style}
9130
9092
  style: (_a = _ctx.part.properties) == null ? void 0 : _a.css
9131
9093
  }, properties.value), [
9132
9094
  ((_b = _ctx.part.properties) == null ? void 0 : _b.sectionType) === "static" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
9133
- ((_c = _ctx.part.properties) == null ? void 0 : _c.name) === "Login Design Part" ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
9095
+ ((_c = _ctx.part.properties) == null ? void 0 : _c.name) === "Login Design Part" ? (vue.openBlock(), vue.createBlock(_sfc_main$v, {
9134
9096
  key: 0,
9135
9097
  part: _ctx.part
9136
9098
  }, null, 8, ["part"])) : vue.createCommentVNode("", true)
9137
9099
  ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
9138
9100
  _ctx.part.children && _ctx.part.children.length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.part.children, (block) => {
9139
- return vue.openBlock(), vue.createBlock(_sfc_main$y, {
9101
+ return vue.openBlock(), vue.createBlock(_sfc_main$w, {
9140
9102
  key: block.partId,
9141
9103
  part: block
9142
9104
  }, null, 8, ["part"]);
@@ -9145,20 +9107,20 @@ ${_html.style}
9145
9107
  onAddWidget: addWidget
9146
9108
  }))
9147
9109
  ], 64))
9148
- ], 16, _hoisted_1$A)), [
9110
+ ], 16, _hoisted_1$y)), [
9149
9111
  [vue.unref(vPartHandler), { pageBuilder: vue.unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
9150
9112
  ]);
9151
9113
  };
9152
9114
  }
9153
9115
  });
9154
- const _hoisted_1$z = { class: "group-editor group-editor-position" };
9155
- const _hoisted_2$r = { class: "flex-align-center" };
9156
- const _hoisted_3$p = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
9116
+ const _hoisted_1$x = { class: "group-editor group-editor-position" };
9117
+ const _hoisted_2$p = { class: "flex-align-center" };
9118
+ const _hoisted_3$n = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
9157
9119
  /* @__PURE__ */ vue.createElementVNode("label", { textContent: "Position" })
9158
9120
  ], -1);
9159
- const _hoisted_4$g = { class: "flex-grow-1" };
9160
- const _hoisted_5$8 = { class: "bg-gray-100 py-5 rounded-8" };
9161
- const _hoisted_6$7 = { class: "text-center" };
9121
+ const _hoisted_4$f = { class: "flex-grow-1" };
9122
+ const _hoisted_5$7 = { class: "bg-gray-100 py-5 rounded-8" };
9123
+ const _hoisted_6$6 = { class: "text-center" };
9162
9124
  const _hoisted_7$6 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
9163
9125
  const _hoisted_8$6 = /* @__PURE__ */ vue.createElementVNode("div", {
9164
9126
  class: "d-inline-block text-center text-gray-300",
@@ -9167,7 +9129,7 @@ ${_html.style}
9167
9129
  /* @__PURE__ */ vue.createElementVNode("span", { class: "font-icon" }, "add")
9168
9130
  ], -1);
9169
9131
  const _hoisted_9$5 = { class: "text-center" };
9170
- const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
9132
+ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
9171
9133
  __name: "PbPropertyGroupEditorPosition",
9172
9134
  props: {
9173
9135
  group: {},
@@ -9191,12 +9153,12 @@ ${_html.style}
9191
9153
  const updateTop = (value) => updatePropertyValue({ top: value });
9192
9154
  const updateBottom = (value) => updatePropertyValue({ bottom: value });
9193
9155
  return (_ctx, _cache) => {
9194
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$z, [
9195
- vue.createElementVNode("div", _hoisted_2$r, [
9196
- _hoisted_3$p,
9197
- vue.createElementVNode("div", _hoisted_4$g, [
9198
- vue.createElementVNode("div", _hoisted_5$8, [
9199
- vue.createElementVNode("div", _hoisted_6$7, [
9156
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$x, [
9157
+ vue.createElementVNode("div", _hoisted_2$p, [
9158
+ _hoisted_3$n,
9159
+ vue.createElementVNode("div", _hoisted_4$f, [
9160
+ vue.createElementVNode("div", _hoisted_5$7, [
9161
+ vue.createElementVNode("div", _hoisted_6$6, [
9200
9162
  vue.createVNode(vue.unref(bluesea.BSTextInput), {
9201
9163
  "model-value": top.value,
9202
9164
  class: "ml-4",
@@ -9238,13 +9200,13 @@ ${_html.style}
9238
9200
  };
9239
9201
  }
9240
9202
  });
9241
- const _hoisted_1$y = { class: "group-editor group-editor-size" };
9242
- const _hoisted_2$q = { class: "flex-align-center" };
9243
- const _hoisted_3$o = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
9203
+ const _hoisted_1$w = { class: "group-editor group-editor-size" };
9204
+ const _hoisted_2$o = { class: "flex-align-center" };
9205
+ const _hoisted_3$m = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
9244
9206
  /* @__PURE__ */ vue.createElementVNode("label", { textContent: "Size" })
9245
9207
  ], -1);
9246
- const _hoisted_4$f = { class: "flex-grow-1 bs-layout-horizontal" };
9247
- const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
9208
+ const _hoisted_4$e = { class: "flex-grow-1 bs-layout-horizontal" };
9209
+ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
9248
9210
  __name: "PbPropertyGroupEditorSize",
9249
9211
  props: {
9250
9212
  group: {},
@@ -9264,10 +9226,10 @@ ${_html.style}
9264
9226
  const updateWidth = (value) => updatePropertyValue({ width: value });
9265
9227
  const updateHeight = (value) => updatePropertyValue({ height: value });
9266
9228
  return (_ctx, _cache) => {
9267
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$y, [
9268
- vue.createElementVNode("div", _hoisted_2$q, [
9269
- _hoisted_3$o,
9270
- vue.createElementVNode("div", _hoisted_4$f, [
9229
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [
9230
+ vue.createElementVNode("div", _hoisted_2$o, [
9231
+ _hoisted_3$m,
9232
+ vue.createElementVNode("div", _hoisted_4$e, [
9271
9233
  vue.createVNode(vue.unref(bluesea.BSTextInput), {
9272
9234
  "model-value": width.value,
9273
9235
  class: "flex-grow-1 mr-2",
@@ -9443,22 +9405,22 @@ ${_html.style}
9443
9405
  }
9444
9406
  }
9445
9407
  };
9446
- const _hoisted_1$x = { class: "vc-alpha" };
9447
- const _hoisted_2$p = { class: "vc-alpha-checkboard-wrap" };
9448
- const _hoisted_3$n = /* @__PURE__ */ vue.createElementVNode(
9408
+ const _hoisted_1$v = { class: "vc-alpha" };
9409
+ const _hoisted_2$n = { class: "vc-alpha-checkboard-wrap" };
9410
+ const _hoisted_3$l = /* @__PURE__ */ vue.createElementVNode(
9449
9411
  "div",
9450
9412
  { class: "vc-alpha-picker" },
9451
9413
  null,
9452
9414
  -1
9453
9415
  /* HOISTED */
9454
9416
  );
9455
- const _hoisted_4$e = [
9456
- _hoisted_3$n
9417
+ const _hoisted_4$d = [
9418
+ _hoisted_3$l
9457
9419
  ];
9458
9420
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
9459
9421
  const _component_Checkboard = vue.resolveComponent("Checkboard");
9460
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$x, [
9461
- vue.createElementVNode("div", _hoisted_2$p, [
9422
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
9423
+ vue.createElementVNode("div", _hoisted_2$n, [
9462
9424
  vue.createVNode(_component_Checkboard)
9463
9425
  ]),
9464
9426
  vue.createElementVNode(
@@ -9487,7 +9449,7 @@ ${_html.style}
9487
9449
  class: "vc-alpha-pointer",
9488
9450
  style: vue.normalizeStyle({ left: `${$options.colors.a * 100}%` })
9489
9451
  },
9490
- _hoisted_4$e,
9452
+ _hoisted_4$d,
9491
9453
  4
9492
9454
  /* STYLE */
9493
9455
  )
@@ -10561,12 +10523,12 @@ ${_html.style}
10561
10523
  // }
10562
10524
  }
10563
10525
  };
10564
- const _hoisted_1$w = { class: "vc-editable-input" };
10565
- const _hoisted_2$o = ["aria-labelledby"];
10566
- const _hoisted_3$m = ["id", "for"];
10567
- const _hoisted_4$d = { class: "vc-input__desc" };
10526
+ const _hoisted_1$u = { class: "vc-editable-input" };
10527
+ const _hoisted_2$m = ["aria-labelledby"];
10528
+ const _hoisted_3$k = ["id", "for"];
10529
+ const _hoisted_4$c = { class: "vc-input__desc" };
10568
10530
  function render$3(_ctx, _cache, $props, $setup, $data, $options) {
10569
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [
10531
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$u, [
10570
10532
  vue.withDirectives(vue.createElementVNode("input", {
10571
10533
  ref: "input",
10572
10534
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.val = $event),
@@ -10574,17 +10536,17 @@ ${_html.style}
10574
10536
  class: "vc-input__input",
10575
10537
  onKeydown: _cache[1] || (_cache[1] = (...args) => $options.handleKeyDown && $options.handleKeyDown(...args)),
10576
10538
  onInput: _cache[2] || (_cache[2] = (...args) => $options.update && $options.update(...args))
10577
- }, null, 40, _hoisted_2$o), [
10539
+ }, null, 40, _hoisted_2$m), [
10578
10540
  [vue.vModelText, $options.val]
10579
10541
  ]),
10580
10542
  vue.createElementVNode("span", {
10581
10543
  id: $options.labelId,
10582
10544
  for: $props.label,
10583
10545
  class: "vc-input__label"
10584
- }, vue.toDisplayString($options.labelSpanText), 9, _hoisted_3$m),
10546
+ }, vue.toDisplayString($options.labelSpanText), 9, _hoisted_3$k),
10585
10547
  vue.createElementVNode(
10586
10548
  "span",
10587
- _hoisted_4$d,
10549
+ _hoisted_4$c,
10588
10550
  vue.toDisplayString($props.desc),
10589
10551
  1
10590
10552
  /* TEXT */
@@ -10661,29 +10623,29 @@ ${_html.style}
10661
10623
  }
10662
10624
  }
10663
10625
  };
10664
- const _hoisted_1$v = /* @__PURE__ */ vue.createElementVNode(
10626
+ const _hoisted_1$t = /* @__PURE__ */ vue.createElementVNode(
10665
10627
  "div",
10666
10628
  { class: "vc-saturation--white" },
10667
10629
  null,
10668
10630
  -1
10669
10631
  /* HOISTED */
10670
10632
  );
10671
- const _hoisted_2$n = /* @__PURE__ */ vue.createElementVNode(
10633
+ const _hoisted_2$l = /* @__PURE__ */ vue.createElementVNode(
10672
10634
  "div",
10673
10635
  { class: "vc-saturation--black" },
10674
10636
  null,
10675
10637
  -1
10676
10638
  /* HOISTED */
10677
10639
  );
10678
- const _hoisted_3$l = /* @__PURE__ */ vue.createElementVNode(
10640
+ const _hoisted_3$j = /* @__PURE__ */ vue.createElementVNode(
10679
10641
  "div",
10680
10642
  { class: "vc-saturation-circle" },
10681
10643
  null,
10682
10644
  -1
10683
10645
  /* HOISTED */
10684
10646
  );
10685
- const _hoisted_4$c = [
10686
- _hoisted_3$l
10647
+ const _hoisted_4$b = [
10648
+ _hoisted_3$j
10687
10649
  ];
10688
10650
  function render$2(_ctx, _cache, $props, $setup, $data, $options) {
10689
10651
  return vue.openBlock(), vue.createElementBlock(
@@ -10697,15 +10659,15 @@ ${_html.style}
10697
10659
  onTouchstart: _cache[2] || (_cache[2] = (...args) => $options.handleChange && $options.handleChange(...args))
10698
10660
  },
10699
10661
  [
10700
- _hoisted_1$v,
10701
- _hoisted_2$n,
10662
+ _hoisted_1$t,
10663
+ _hoisted_2$l,
10702
10664
  vue.createElementVNode(
10703
10665
  "div",
10704
10666
  {
10705
10667
  class: "vc-saturation-pointer",
10706
10668
  style: vue.normalizeStyle({ top: $options.pointerTop, left: $options.pointerLeft })
10707
10669
  },
10708
- _hoisted_4$c,
10670
+ _hoisted_4$b,
10709
10671
  4
10710
10672
  /* STYLE */
10711
10673
  )
@@ -10846,16 +10808,16 @@ ${_html.style}
10846
10808
  }
10847
10809
  }
10848
10810
  };
10849
- const _hoisted_1$u = ["aria-valuenow"];
10850
- const _hoisted_2$m = /* @__PURE__ */ vue.createElementVNode(
10811
+ const _hoisted_1$s = ["aria-valuenow"];
10812
+ const _hoisted_2$k = /* @__PURE__ */ vue.createElementVNode(
10851
10813
  "div",
10852
10814
  { class: "vc-hue-picker" },
10853
10815
  null,
10854
10816
  -1
10855
10817
  /* HOISTED */
10856
10818
  );
10857
- const _hoisted_3$k = [
10858
- _hoisted_2$m
10819
+ const _hoisted_3$i = [
10820
+ _hoisted_2$k
10859
10821
  ];
10860
10822
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
10861
10823
  return vue.openBlock(), vue.createElementBlock(
@@ -10882,11 +10844,11 @@ ${_html.style}
10882
10844
  style: vue.normalizeStyle({ top: $options.pointerTop, left: $options.pointerLeft }),
10883
10845
  role: "presentation"
10884
10846
  },
10885
- _hoisted_3$k,
10847
+ _hoisted_3$i,
10886
10848
  4
10887
10849
  /* STYLE */
10888
10850
  )
10889
- ], 40, _hoisted_1$u)
10851
+ ], 40, _hoisted_1$s)
10890
10852
  ],
10891
10853
  2
10892
10854
  /* CLASS */
@@ -10982,15 +10944,15 @@ ${_html.style}
10982
10944
  }
10983
10945
  }
10984
10946
  };
10985
- const _hoisted_1$t = { class: "vc-sketch-saturation-wrap" };
10986
- const _hoisted_2$l = { class: "vc-sketch-controls" };
10987
- const _hoisted_3$j = { class: "vc-sketch-sliders" };
10988
- const _hoisted_4$b = { class: "vc-sketch-hue-wrap" };
10989
- const _hoisted_5$7 = {
10947
+ const _hoisted_1$r = { class: "vc-sketch-saturation-wrap" };
10948
+ const _hoisted_2$j = { class: "vc-sketch-controls" };
10949
+ const _hoisted_3$h = { class: "vc-sketch-sliders" };
10950
+ const _hoisted_4$a = { class: "vc-sketch-hue-wrap" };
10951
+ const _hoisted_5$6 = {
10990
10952
  key: 0,
10991
10953
  class: "vc-sketch-alpha-wrap"
10992
10954
  };
10993
- const _hoisted_6$6 = { class: "vc-sketch-color-wrap" };
10955
+ const _hoisted_6$5 = { class: "vc-sketch-color-wrap" };
10994
10956
  const _hoisted_7$5 = ["aria-label"];
10995
10957
  const _hoisted_8$5 = {
10996
10958
  key: 0,
@@ -11025,28 +10987,28 @@ ${_html.style}
11025
10987
  class: vue.normalizeClass(["vc-sketch", [$props.disableAlpha ? "vc-sketch__disable-alpha" : ""]])
11026
10988
  },
11027
10989
  [
11028
- vue.createElementVNode("div", _hoisted_1$t, [
10990
+ vue.createElementVNode("div", _hoisted_1$r, [
11029
10991
  vue.createVNode(_component_Saturation, {
11030
10992
  value: _ctx.colors,
11031
10993
  onChange: $options.childChange
11032
10994
  }, null, 8, ["value", "onChange"])
11033
10995
  ]),
11034
- vue.createElementVNode("div", _hoisted_2$l, [
11035
- vue.createElementVNode("div", _hoisted_3$j, [
11036
- vue.createElementVNode("div", _hoisted_4$b, [
10996
+ vue.createElementVNode("div", _hoisted_2$j, [
10997
+ vue.createElementVNode("div", _hoisted_3$h, [
10998
+ vue.createElementVNode("div", _hoisted_4$a, [
11037
10999
  vue.createVNode(_component_Hue, {
11038
11000
  value: _ctx.colors,
11039
11001
  onChange: $options.childChange
11040
11002
  }, null, 8, ["value", "onChange"])
11041
11003
  ]),
11042
- !$props.disableAlpha ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$7, [
11004
+ !$props.disableAlpha ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$6, [
11043
11005
  vue.createVNode(_component_Alpha, {
11044
11006
  value: _ctx.colors,
11045
11007
  onChange: $options.childChange
11046
11008
  }, null, 8, ["value", "onChange"])
11047
11009
  ])) : vue.createCommentVNode("v-if", true)
11048
11010
  ]),
11049
- vue.createElementVNode("div", _hoisted_6$6, [
11011
+ vue.createElementVNode("div", _hoisted_6$5, [
11050
11012
  vue.createElementVNode("div", {
11051
11013
  "aria-label": `Current color is ${$options.activeColor}`,
11052
11014
  class: "vc-sketch-active-color",
@@ -11137,7 +11099,7 @@ ${_html.style}
11137
11099
  script.render = render;
11138
11100
  script.__file = "src/components/sketch/sketch.vue";
11139
11101
  script.install = install;
11140
- const _sfc_main$t = vue.defineComponent({
11102
+ const _sfc_main$r = vue.defineComponent({
11141
11103
  name: "PbColorPicker",
11142
11104
  components: {
11143
11105
  Sketch: script
@@ -11201,12 +11163,12 @@ ${_html.style}
11201
11163
  };
11202
11164
  }
11203
11165
  });
11204
- const _hoisted_1$s = { class: "buttons" };
11205
- const _hoisted_2$k = /* @__PURE__ */ vue.createElementVNode("i", { class: "material-icons-outlined" }, "delete", -1);
11206
- const _hoisted_3$i = [
11207
- _hoisted_2$k
11166
+ const _hoisted_1$q = { class: "buttons" };
11167
+ const _hoisted_2$i = /* @__PURE__ */ vue.createElementVNode("i", { class: "material-icons-outlined" }, "delete", -1);
11168
+ const _hoisted_3$g = [
11169
+ _hoisted_2$i
11208
11170
  ];
11209
- const _hoisted_4$a = { class: "sketch-wrap" };
11171
+ const _hoisted_4$9 = { class: "sketch-wrap" };
11210
11172
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
11211
11173
  const _component_Sketch = vue.resolveComponent("Sketch");
11212
11174
  const _directive_click_outside = vue.resolveDirective("click-outside");
@@ -11215,7 +11177,7 @@ ${_html.style}
11215
11177
  onKeydown: _cache[3] || (_cache[3] = vue.withModifiers(() => {
11216
11178
  }, ["stop"]))
11217
11179
  }, [
11218
- vue.createElementVNode("div", _hoisted_1$s, [
11180
+ vue.createElementVNode("div", _hoisted_1$q, [
11219
11181
  vue.renderSlot(_ctx.$slots, "button", vue.normalizeProps(vue.guardReactiveProps({ toggle: _ctx.toggle, color: _ctx.color })), () => [
11220
11182
  vue.createElementVNode("button", {
11221
11183
  class: vue.normalizeClass([{ none: !_ctx.color }, "pb-button picker-button"]),
@@ -11227,9 +11189,9 @@ ${_html.style}
11227
11189
  key: 0,
11228
11190
  class: "pb-button",
11229
11191
  onClick: _cache[1] || (_cache[1] = (...args) => _ctx.emptyColor && _ctx.emptyColor(...args))
11230
- }, _hoisted_3$i)) : vue.createCommentVNode("", true)
11192
+ }, _hoisted_3$g)) : vue.createCommentVNode("", true)
11231
11193
  ]),
11232
- vue.createElementVNode("div", _hoisted_4$a, [
11194
+ vue.createElementVNode("div", _hoisted_4$9, [
11233
11195
  _ctx.isShowColorPicker ? (vue.openBlock(), vue.createBlock(_component_Sketch, {
11234
11196
  key: 0,
11235
11197
  modelValue: _ctx.color,
@@ -11241,15 +11203,15 @@ ${_html.style}
11241
11203
  [_directive_click_outside, () => _ctx.toggle(false)]
11242
11204
  ]);
11243
11205
  }
11244
- const PbColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render]]);
11245
- const _hoisted_1$r = { class: "group-editor group-editor-background" };
11246
- const _hoisted_2$j = { class: "flex-align-center" };
11247
- const _hoisted_3$h = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
11206
+ const PbColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render]]);
11207
+ const _hoisted_1$p = { class: "group-editor group-editor-background" };
11208
+ const _hoisted_2$h = { class: "flex-align-center" };
11209
+ const _hoisted_3$f = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
11248
11210
  /* @__PURE__ */ vue.createElementVNode("label", { textContent: "Background" })
11249
11211
  ], -1);
11250
- const _hoisted_4$9 = { class: "bs-layout-horizontal" };
11251
- const _hoisted_5$6 = { class: "color" };
11252
- const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
11212
+ const _hoisted_4$8 = { class: "bs-layout-horizontal" };
11213
+ const _hoisted_5$5 = { class: "color" };
11214
+ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
11253
11215
  __name: "PbPropertyGroupEditorBackground",
11254
11216
  props: {
11255
11217
  group: {},
@@ -11258,6 +11220,7 @@ ${_html.style}
11258
11220
  setup(__props) {
11259
11221
  const props = __props;
11260
11222
  const pageBuilder = usePageBuilderEditor();
11223
+ const modal = bluesea.useModal();
11261
11224
  const color = vue.computed(() => getPropertyValueOfParts(props.selectedParts, "backgroundColor"));
11262
11225
  const emptyColor = () => {
11263
11226
  };
@@ -11271,19 +11234,19 @@ ${_html.style}
11271
11234
  };
11272
11235
  const updateColor = (value) => updatePropertyValue({ backgroundColor: value });
11273
11236
  const selectImage = () => {
11274
- PageBuilderEditorEvent.emit.requestImage({
11275
- pageBuilderId: pageBuilder.instanceId,
11276
- callback: (url) => {
11237
+ const imageProvider = pageBuilder.getProvider("imageProvider");
11238
+ if (imageProvider) {
11239
+ imageProvider({ modal }, (url) => {
11277
11240
  updatePropertyValue({ backgroundImage: url });
11278
- }
11279
- });
11241
+ });
11242
+ }
11280
11243
  };
11281
11244
  return (_ctx, _cache) => {
11282
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$r, [
11283
- vue.createElementVNode("div", _hoisted_2$j, [
11284
- _hoisted_3$h,
11285
- vue.createElementVNode("div", _hoisted_4$9, [
11286
- vue.createElementVNode("div", _hoisted_5$6, [
11245
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$p, [
11246
+ vue.createElementVNode("div", _hoisted_2$h, [
11247
+ _hoisted_3$f,
11248
+ vue.createElementVNode("div", _hoisted_4$8, [
11249
+ vue.createElementVNode("div", _hoisted_5$5, [
11287
11250
  vue.createVNode(PbColorPicker, {
11288
11251
  value: color.value,
11289
11252
  "hide-delete": "",
@@ -11312,16 +11275,16 @@ ${_html.style}
11312
11275
  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";
11313
11276
  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";
11314
11277
  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";
11315
- const _hoisted_1$q = { class: "group-editor group-editor-border" };
11316
- const _hoisted_2$i = { class: "flex-align-center" };
11317
- const _hoisted_3$g = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
11278
+ const _hoisted_1$o = { class: "group-editor group-editor-border" };
11279
+ const _hoisted_2$g = { class: "flex-align-center" };
11280
+ const _hoisted_3$e = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
11318
11281
  /* @__PURE__ */ vue.createElementVNode("label", { textContent: "Border" })
11319
11282
  ], -1);
11320
- const _hoisted_4$8 = { class: "" };
11321
- const _hoisted_5$5 = /* @__PURE__ */ vue.createElementVNode("div", { class: "sub-title" }, [
11283
+ const _hoisted_4$7 = { class: "" };
11284
+ const _hoisted_5$4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "sub-title" }, [
11322
11285
  /* @__PURE__ */ vue.createElementVNode("label", { textContent: "Color" })
11323
11286
  ], -1);
11324
- const _hoisted_6$5 = { class: "color" };
11287
+ const _hoisted_6$4 = { class: "color" };
11325
11288
  const _hoisted_7$4 = { class: "mt-8" };
11326
11289
  const _hoisted_8$4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "sub-title" }, [
11327
11290
  /* @__PURE__ */ vue.createElementVNode("label", { textContent: "Border Width" })
@@ -11345,7 +11308,7 @@ ${_html.style}
11345
11308
  const _hoisted_18 = { class: "bg-gray-100 py-5 rounded-8" };
11346
11309
  const _hoisted_19 = { class: "" };
11347
11310
  const _hoisted_20 = { class: "mt-2" };
11348
- const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
11311
+ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
11349
11312
  __name: "PbPropertyGroupEditorBorder",
11350
11313
  props: {
11351
11314
  group: {},
@@ -11383,12 +11346,12 @@ ${_html.style}
11383
11346
  const updateBorderBottomLeftRadius = (value) => updatePropertyValue({ borderBottomLeftRadius: value });
11384
11347
  const updateBorderBottomRightRadius = (value) => updatePropertyValue({ borderBottomRightRadius: value });
11385
11348
  return (_ctx, _cache) => {
11386
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q, [
11387
- vue.createElementVNode("div", _hoisted_2$i, [
11388
- _hoisted_3$g,
11389
- vue.createElementVNode("div", _hoisted_4$8, [
11390
- _hoisted_5$5,
11391
- vue.createElementVNode("div", _hoisted_6$5, [
11349
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
11350
+ vue.createElementVNode("div", _hoisted_2$g, [
11351
+ _hoisted_3$e,
11352
+ vue.createElementVNode("div", _hoisted_4$7, [
11353
+ _hoisted_5$4,
11354
+ vue.createElementVNode("div", _hoisted_6$4, [
11392
11355
  vue.createVNode(PbColorPicker, {
11393
11356
  value: color.value,
11394
11357
  "hide-delete": "",
@@ -11492,14 +11455,14 @@ ${_html.style}
11492
11455
  };
11493
11456
  }
11494
11457
  });
11495
- const _hoisted_1$p = { class: "group-editor group-editor-margin" };
11496
- const _hoisted_2$h = { class: "flex-align-center" };
11497
- const _hoisted_3$f = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
11458
+ const _hoisted_1$n = { class: "group-editor group-editor-margin" };
11459
+ const _hoisted_2$f = { class: "flex-align-center" };
11460
+ const _hoisted_3$d = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
11498
11461
  /* @__PURE__ */ vue.createElementVNode("label", { textContent: "Margin" })
11499
11462
  ], -1);
11500
- const _hoisted_4$7 = { class: "flex-grow-1" };
11501
- const _hoisted_5$4 = { class: "bg-gray-100 py-5 rounded-8" };
11502
- const _hoisted_6$4 = { class: "text-center" };
11463
+ const _hoisted_4$6 = { class: "flex-grow-1" };
11464
+ const _hoisted_5$3 = { class: "bg-gray-100 py-5 rounded-8" };
11465
+ const _hoisted_6$3 = { class: "text-center" };
11503
11466
  const _hoisted_7$3 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
11504
11467
  const _hoisted_8$3 = /* @__PURE__ */ vue.createElementVNode("div", {
11505
11468
  class: "d-inline-block text-center text-gray-300",
@@ -11508,7 +11471,7 @@ ${_html.style}
11508
11471
  /* @__PURE__ */ vue.createElementVNode("span", { class: "font-icon" }, "add")
11509
11472
  ], -1);
11510
11473
  const _hoisted_9$2 = { class: "text-center" };
11511
- const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
11474
+ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
11512
11475
  __name: "PbPropertyGroupEditorMargin",
11513
11476
  props: {
11514
11477
  group: {},
@@ -11532,12 +11495,12 @@ ${_html.style}
11532
11495
  const updateTop = (value) => updatePropertyValue({ marginTop: value });
11533
11496
  const updateBottom = (value) => updatePropertyValue({ marginBottom: value });
11534
11497
  return (_ctx, _cache) => {
11535
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$p, [
11536
- vue.createElementVNode("div", _hoisted_2$h, [
11537
- _hoisted_3$f,
11538
- vue.createElementVNode("div", _hoisted_4$7, [
11539
- vue.createElementVNode("div", _hoisted_5$4, [
11540
- vue.createElementVNode("div", _hoisted_6$4, [
11498
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
11499
+ vue.createElementVNode("div", _hoisted_2$f, [
11500
+ _hoisted_3$d,
11501
+ vue.createElementVNode("div", _hoisted_4$6, [
11502
+ vue.createElementVNode("div", _hoisted_5$3, [
11503
+ vue.createElementVNode("div", _hoisted_6$3, [
11541
11504
  vue.createVNode(vue.unref(bluesea.BSTextInput), {
11542
11505
  "model-value": top.value,
11543
11506
  class: "ml-4",
@@ -11579,14 +11542,14 @@ ${_html.style}
11579
11542
  };
11580
11543
  }
11581
11544
  });
11582
- const _hoisted_1$o = { class: "group-editor group-editor-padding" };
11583
- const _hoisted_2$g = { class: "flex-align-center" };
11584
- const _hoisted_3$e = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
11545
+ const _hoisted_1$m = { class: "group-editor group-editor-padding" };
11546
+ const _hoisted_2$e = { class: "flex-align-center" };
11547
+ const _hoisted_3$c = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
11585
11548
  /* @__PURE__ */ vue.createElementVNode("label", { textContent: "Padding" })
11586
11549
  ], -1);
11587
- const _hoisted_4$6 = { class: "flex-grow-1" };
11588
- const _hoisted_5$3 = { class: "bg-gray-100 py-5 rounded-8" };
11589
- const _hoisted_6$3 = { class: "text-center" };
11550
+ const _hoisted_4$5 = { class: "flex-grow-1" };
11551
+ const _hoisted_5$2 = { class: "bg-gray-100 py-5 rounded-8" };
11552
+ const _hoisted_6$2 = { class: "text-center" };
11590
11553
  const _hoisted_7$2 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
11591
11554
  const _hoisted_8$2 = /* @__PURE__ */ vue.createElementVNode("div", {
11592
11555
  class: "d-inline-block text-center text-gray-300",
@@ -11595,7 +11558,7 @@ ${_html.style}
11595
11558
  /* @__PURE__ */ vue.createElementVNode("span", { class: "font-icon" }, "add")
11596
11559
  ], -1);
11597
11560
  const _hoisted_9$1 = { class: "text-center" };
11598
- const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
11561
+ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
11599
11562
  __name: "PbPropertyGroupEditorPadding",
11600
11563
  props: {
11601
11564
  group: {},
@@ -11619,12 +11582,12 @@ ${_html.style}
11619
11582
  const updateTop = (value) => updatePropertyValue({ paddingTop: value });
11620
11583
  const updateBottom = (value) => updatePropertyValue({ paddingBottom: value });
11621
11584
  return (_ctx, _cache) => {
11622
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
11623
- vue.createElementVNode("div", _hoisted_2$g, [
11624
- _hoisted_3$e,
11625
- vue.createElementVNode("div", _hoisted_4$6, [
11626
- vue.createElementVNode("div", _hoisted_5$3, [
11627
- vue.createElementVNode("div", _hoisted_6$3, [
11585
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
11586
+ vue.createElementVNode("div", _hoisted_2$e, [
11587
+ _hoisted_3$c,
11588
+ vue.createElementVNode("div", _hoisted_4$5, [
11589
+ vue.createElementVNode("div", _hoisted_5$2, [
11590
+ vue.createElementVNode("div", _hoisted_6$2, [
11628
11591
  vue.createVNode(vue.unref(bluesea.BSTextInput), {
11629
11592
  "model-value": top.value,
11630
11593
  class: "ml-4",
@@ -11692,7 +11655,7 @@ ${_html.style}
11692
11655
  propertyType: "text"
11693
11656
  }
11694
11657
  ],
11695
- propertyGroupEditor: () => _sfc_main$v
11658
+ propertyGroupEditor: () => _sfc_main$t
11696
11659
  };
11697
11660
  };
11698
11661
  const sizeGroup = () => {
@@ -11731,7 +11694,7 @@ ${_html.style}
11731
11694
  propertyType: "text"
11732
11695
  }
11733
11696
  ],
11734
- propertyGroupEditor: () => _sfc_main$u
11697
+ propertyGroupEditor: () => _sfc_main$s
11735
11698
  };
11736
11699
  };
11737
11700
  const marginGroup = () => {
@@ -11760,7 +11723,7 @@ ${_html.style}
11760
11723
  propertyType: "text"
11761
11724
  }
11762
11725
  ],
11763
- propertyGroupEditor: () => _sfc_main$q
11726
+ propertyGroupEditor: () => _sfc_main$o
11764
11727
  };
11765
11728
  };
11766
11729
  const paddingGroup = () => {
@@ -11789,7 +11752,7 @@ ${_html.style}
11789
11752
  propertyType: "text"
11790
11753
  }
11791
11754
  ],
11792
- propertyGroupEditor: () => _sfc_main$p
11755
+ propertyGroupEditor: () => _sfc_main$n
11793
11756
  };
11794
11757
  };
11795
11758
  const commonGroup = () => {
@@ -11856,7 +11819,7 @@ ${_html.style}
11856
11819
  propertyType: "image"
11857
11820
  }
11858
11821
  ],
11859
- propertyGroupEditor: () => _sfc_main$s
11822
+ propertyGroupEditor: () => _sfc_main$q
11860
11823
  };
11861
11824
  };
11862
11825
  const borderGroup = () => {
@@ -11910,7 +11873,7 @@ ${_html.style}
11910
11873
  propertyType: "text"
11911
11874
  }
11912
11875
  ],
11913
- propertyGroupEditor: () => _sfc_main$r
11876
+ propertyGroupEditor: () => _sfc_main$p
11914
11877
  };
11915
11878
  };
11916
11879
  const defaultPropertyGroups = () => {
@@ -11919,71 +11882,21 @@ ${_html.style}
11919
11882
  const defaultWidgetPropertyGroups = () => {
11920
11883
  return [positionGroup(), sizeGroup(), marginGroup(), paddingGroup(), borderGroup(), backgroundGroup(), commonGroup()];
11921
11884
  };
11922
- const designParts = [
11885
+ const sectionParts = [
11923
11886
  {
11924
11887
  partType: "Section",
11925
- partName: "GlobalDesignPart",
11926
- caption: "Global Design Part",
11888
+ partName: "Section",
11889
+ caption: "Section",
11927
11890
  icon: "rectangle",
11928
11891
  propertyGroups: [
11929
11892
  ...defaultPropertyGroups()
11930
11893
  ],
11931
11894
  initialProperties: {
11932
- sectionType: "globalDesignPart",
11933
11895
  direction: "horizontal"
11934
11896
  },
11935
11897
  localized: false,
11936
11898
  allowsChild: () => true,
11937
- creator: () => _sfc_main$w
11938
- },
11939
- {
11940
- partType: "Section",
11941
- partName: "LocalDesignPart",
11942
- caption: "Local Design Part",
11943
- icon: "rectangle",
11944
- propertyGroups: [
11945
- ...defaultPropertyGroups()
11946
- ],
11947
- initialProperties: {
11948
- sectionType: "localDesignPart",
11949
- direction: "horizontal"
11950
- },
11951
- localized: true,
11952
- allowsChild: () => true,
11953
- creator: () => _sfc_main$w
11954
- },
11955
- {
11956
- partType: "Section",
11957
- partName: "LocalMarketingPart",
11958
- caption: "Local Marketing Part",
11959
- icon: "rectangle",
11960
- propertyGroups: [
11961
- ...defaultPropertyGroups()
11962
- ],
11963
- initialProperties: {
11964
- sectionType: "localMarketingPart",
11965
- direction: "horizontal"
11966
- },
11967
- localized: true,
11968
- allowsChild: () => true,
11969
- creator: () => _sfc_main$w
11970
- }
11971
- ];
11972
- const sectionParts = [
11973
- {
11974
- partType: "Section",
11975
- partName: "Section",
11976
- caption: "Section",
11977
- icon: "rectangle",
11978
- propertyGroups: [
11979
- ...defaultPropertyGroups()
11980
- ],
11981
- initialProperties: {
11982
- direction: "horizontal"
11983
- },
11984
- localized: false,
11985
- allowsChild: () => true,
11986
- creator: () => _sfc_main$w
11899
+ creator: () => _sfc_main$u
11987
11900
  }
11988
11901
  ];
11989
11902
  const blockParts = [
@@ -11998,7 +11911,7 @@ ${_html.style}
11998
11911
  initialProperties: {},
11999
11912
  localized: false,
12000
11913
  allowsChild: () => true,
12001
- creator: () => _sfc_main$y
11914
+ creator: () => _sfc_main$w
12002
11915
  }
12003
11916
  ];
12004
11917
  const widgets = [
@@ -12043,7 +11956,7 @@ ${_html.style}
12043
11956
  },
12044
11957
  localized: true,
12045
11958
  allowsChild: () => false,
12046
- creator: () => _sfc_main$4$1
11959
+ creator: () => _sfc_main$5$1
12047
11960
  },
12048
11961
  {
12049
11962
  partType: "Widget",
@@ -12069,7 +11982,7 @@ ${_html.style}
12069
11982
  initialProperties: {},
12070
11983
  localized: true,
12071
11984
  allowsChild: () => false,
12072
- creator: () => _sfc_main$5$1
11985
+ creator: () => _sfc_main$6$1
12073
11986
  },
12074
11987
  {
12075
11988
  partType: "Widget",
@@ -12096,13 +12009,37 @@ ${_html.style}
12096
12009
  initialProperties: {},
12097
12010
  localized: true,
12098
12011
  allowsChild: () => false,
12012
+ creator: () => _sfc_main$4$1
12013
+ },
12014
+ {
12015
+ partType: "Widget",
12016
+ partName: "IframeWidget",
12017
+ caption: "IFrame",
12018
+ icon: "code",
12019
+ propertyGroups: [
12020
+ {
12021
+ groupName: "iframe",
12022
+ caption: "Iframe",
12023
+ properties: [
12024
+ {
12025
+ propertyName: "url",
12026
+ caption: "URL",
12027
+ propertyType: "text",
12028
+ params: "",
12029
+ localized: true,
12030
+ multiLang: true
12031
+ }
12032
+ ]
12033
+ },
12034
+ ...defaultWidgetPropertyGroups()
12035
+ ],
12036
+ initialProperties: {},
12037
+ localized: true,
12038
+ allowsChild: () => false,
12099
12039
  creator: () => _sfc_main$3$1
12100
12040
  }
12101
12041
  ];
12102
12042
  const partDefinitions = {};
12103
- for (let part of designParts) {
12104
- partDefinitions[part.partName] = part;
12105
- }
12106
12043
  for (let part of sectionParts) {
12107
12044
  partDefinitions[part.partName] = part;
12108
12045
  }
@@ -12112,13 +12049,6 @@ ${_html.style}
12112
12049
  for (let part of widgets) {
12113
12050
  partDefinitions[part.partName] = part;
12114
12051
  }
12115
- const designPartDefinitions = [
12116
- {
12117
- groupName: "DesignParts",
12118
- caption: "Design Parts",
12119
- partDefinitions: designParts
12120
- }
12121
- ];
12122
12052
  [
12123
12053
  {
12124
12054
  groupName: "Layout",
@@ -12175,19 +12105,6 @@ ${_html.style}
12175
12105
  }
12176
12106
  }
12177
12107
  }
12178
- const _OpenAddPartModalCommand = class _OpenAddPartModalCommand {
12179
- constructor(modal) {
12180
- __publicField(this, "commandId", _OpenAddPartModalCommand.COMMAND_ID);
12181
- __publicField(this, "caption", "Add Part");
12182
- this.modal = modal;
12183
- }
12184
- execute(pageBuilder, args) {
12185
- let partDefinitionGroups = designPartDefinitions;
12186
- openPartAddModal(this.modal, { pageBuilder, partDefinitionGroups, ...args || {} });
12187
- }
12188
- };
12189
- __publicField(_OpenAddPartModalCommand, "COMMAND_ID", "OpenAddPartModal");
12190
- let OpenAddPartModalCommand = _OpenAddPartModalCommand;
12191
12108
  const _OpenAddWidgetModalCommand = class _OpenAddWidgetModalCommand {
12192
12109
  constructor(modal) {
12193
12110
  __publicField(this, "commandId", _OpenAddWidgetModalCommand.COMMAND_ID);
@@ -12201,28 +12118,6 @@ ${_html.style}
12201
12118
  };
12202
12119
  __publicField(_OpenAddWidgetModalCommand, "COMMAND_ID", "OpenAddWidgetModal");
12203
12120
  let OpenAddWidgetModalCommand = _OpenAddWidgetModalCommand;
12204
- const openPartAddModal = (modal, args, callback) => {
12205
- modal.openModal({
12206
- component: vue.defineAsyncComponent(() => Promise.resolve().then(() => PbPartAddModal)),
12207
- style: {
12208
- width: "80%",
12209
- height: "80%",
12210
- maxWidth: "800px",
12211
- minWidth: "500px",
12212
- maxHeight: "800px"
12213
- },
12214
- bind: args,
12215
- on: {
12216
- selectHandler: (part) => {
12217
- if (callback) {
12218
- callback(part);
12219
- } else {
12220
- addPart(args.pageBuilder, part);
12221
- }
12222
- }
12223
- }
12224
- });
12225
- };
12226
12121
  const openWidgetAddModal = (modal, args, callback) => {
12227
12122
  modal.openModal({
12228
12123
  component: vue.defineAsyncComponent(() => Promise.resolve().then(() => PbWidgetAddModal)),
@@ -12237,12 +12132,12 @@ ${_html.style}
12237
12132
  on: {
12238
12133
  selectHandler: (part) => {
12239
12134
  if (["ImageWidget"].includes(part.partName)) {
12240
- PageBuilderEditorEvent.emit.requestImage({
12241
- pageBuilderId: args.pageBuilder.instanceId,
12242
- callback: (url) => {
12135
+ const imageProvider = args.pageBuilder.getProvider("imageProvider");
12136
+ if (imageProvider) {
12137
+ imageProvider({ modal }, (url) => {
12243
12138
  addPart(args.pageBuilder, part, { image: url });
12244
- }
12245
- });
12139
+ });
12140
+ }
12246
12141
  } else {
12247
12142
  if (callback) {
12248
12143
  callback(part);
@@ -12595,7 +12490,7 @@ ${_html.style}
12595
12490
  }
12596
12491
  };
12597
12492
  __publicField(_AddSectionAboveCommand, "COMMAND_ID", "AddSectionAbove");
12598
- __publicField(_AddSectionAboveCommand, "CAPTION", "Add Part Above");
12493
+ __publicField(_AddSectionAboveCommand, "CAPTION", "Add Section Above");
12599
12494
  let AddSectionAboveCommand = _AddSectionAboveCommand;
12600
12495
  const _AddSectionBelowCommand = class _AddSectionBelowCommand {
12601
12496
  constructor(modal) {
@@ -12608,7 +12503,7 @@ ${_html.style}
12608
12503
  }
12609
12504
  };
12610
12505
  __publicField(_AddSectionBelowCommand, "COMMAND_ID", "AddSectionBelow");
12611
- __publicField(_AddSectionBelowCommand, "CAPTION", "Add Part Below");
12506
+ __publicField(_AddSectionBelowCommand, "CAPTION", "Add Section Below");
12612
12507
  let AddSectionBelowCommand = _AddSectionBelowCommand;
12613
12508
  const _AddBlockLeftCommand = class _AddBlockLeftCommand {
12614
12509
  constructor() {
@@ -12757,6 +12652,20 @@ ${_html.style}
12757
12652
  __publicField(_DeletePartCommand, "COMMAND_ID", "DeletePart");
12758
12653
  __publicField(_DeletePartCommand, "CAPTION", "Delete");
12759
12654
  let DeletePartCommand = _DeletePartCommand;
12655
+ const _CopyAllCommand = class _CopyAllCommand {
12656
+ constructor() {
12657
+ __publicField(this, "commandId", _CopyAllCommand.COMMAND_ID);
12658
+ }
12659
+ async execute(pageBuilder) {
12660
+ const json = pageBuilder.model.serializeModel(
12661
+ (part) => pageBuilder.extractMedia(part),
12662
+ (partObject) => pageBuilder.extractProvider(partObject)
12663
+ );
12664
+ await navigator.clipboard.writeText(json);
12665
+ }
12666
+ };
12667
+ __publicField(_CopyAllCommand, "COMMAND_ID", "CopyAll");
12668
+ let CopyAllCommand = _CopyAllCommand;
12760
12669
  const _CopyPartCommand = class _CopyPartCommand {
12761
12670
  constructor() {
12762
12671
  __publicField(this, "commandId", _CopyPartCommand.COMMAND_ID);
@@ -12764,7 +12673,7 @@ ${_html.style}
12764
12673
  async execute(pageBuilder) {
12765
12674
  const partIds = pageBuilder.context.getSelectedParts().map((part) => part.partId);
12766
12675
  if (partIds.length > 0) {
12767
- const json = pageBuilder.model.serializePageModel(partIds);
12676
+ const json = pageBuilder.model.serializeParts(partIds);
12768
12677
  await navigator.clipboard.writeText(json);
12769
12678
  }
12770
12679
  }
@@ -12787,12 +12696,34 @@ ${_html.style}
12787
12696
  __publicField(this, "commandId", _PastePartCommand.COMMAND_ID);
12788
12697
  }
12789
12698
  async execute(pageBuilder) {
12790
- const { target, index = 0 } = findInsertTargetAndIndex(pageBuilder);
12791
- if (target) {
12792
- const json = await navigator.clipboard.readText();
12793
- const parts = pageBuilder.model.parsePageModel(json);
12794
- if (parts) {
12795
- insertParts(pageBuilder, target.partId, index, parts, false);
12699
+ const json = await navigator.clipboard.readText();
12700
+ const object = JSON.parse(json);
12701
+ if (object.partType === ROOT_TYPE) {
12702
+ const rootPart = partFromJsonObject(object, true);
12703
+ if (!rootPart)
12704
+ throw new Error("Invalid data format");
12705
+ let partIdsToDelete = void 0;
12706
+ if (pageBuilder.model.rootPart.children && pageBuilder.model.rootPart.children.length) {
12707
+ partIdsToDelete = pageBuilder.model.rootPart.children.map((v) => v.partId);
12708
+ }
12709
+ const param = {
12710
+ delete: partIdsToDelete,
12711
+ insert: [
12712
+ {
12713
+ partId: pageBuilder.model.getRootPartId(),
12714
+ index: 0,
12715
+ parts: rootPart.children || []
12716
+ }
12717
+ ]
12718
+ };
12719
+ pageBuilder.model.updateModel(param);
12720
+ } else {
12721
+ const { target, index = 0 } = findInsertTargetAndIndex(pageBuilder);
12722
+ if (target) {
12723
+ const parts = pageBuilder.model.parseParts(json);
12724
+ if (parts) {
12725
+ insertParts(pageBuilder, target.partId, index, parts, false);
12726
+ }
12796
12727
  }
12797
12728
  }
12798
12729
  }
@@ -12813,7 +12744,6 @@ ${_html.style}
12813
12744
  let SelectAllPartsCommand = _SelectAllPartsCommand;
12814
12745
  const createDefaultCommands = (modal) => {
12815
12746
  return [
12816
- new OpenAddPartModalCommand(modal),
12817
12747
  new OpenAddWidgetModalCommand(modal),
12818
12748
  new AddPartCommand(modal),
12819
12749
  new AddSectionCommand(modal),
@@ -12831,6 +12761,7 @@ ${_html.style}
12831
12761
  new AddWidgetInsideCommand(modal),
12832
12762
  new ChangePropertyCommand(),
12833
12763
  new DeletePartCommand(),
12764
+ new CopyAllCommand(),
12834
12765
  new CopyPartCommand(),
12835
12766
  new CutPartCommand(),
12836
12767
  new PastePartCommand(),
@@ -12997,15 +12928,6 @@ ${_html.style}
12997
12928
  return enableAddWidgetMenu(pageBuilder, "", AddWidgetInsideCommand.COMMAND_ID, AddWidgetInsideCommand.CAPTION);
12998
12929
  }
12999
12930
  },
13000
- {
13001
- groupId: "core:add",
13002
- commandId: OpenAddPartModalCommand.COMMAND_ID,
13003
- precedence: 10,
13004
- getMenuItem(pageBuilder) {
13005
- if (pageBuilder.context.getSelectionCount() <= 1)
13006
- return menuItemForCommand(pageBuilder, OpenAddPartModalCommand.COMMAND_ID);
13007
- }
13008
- },
13009
12931
  {
13010
12932
  groupId: "core:edit",
13011
12933
  commandId: DeletePartCommand.COMMAND_ID,
@@ -13080,6 +13002,12 @@ ${_html.style}
13080
13002
  icon: "redo",
13081
13003
  handler: (modeler) => modeler.redo()
13082
13004
  },
13005
+ {
13006
+ buttonId: "core:copyAll",
13007
+ caption: "Copy All",
13008
+ icon: "copy_all",
13009
+ handler: (modeler) => modeler.commandRegistry.executeCommand(CopyAllCommand.COMMAND_ID)
13010
+ },
13083
13011
  {
13084
13012
  buttonId: "core:copy",
13085
13013
  caption: "Copy",
@@ -13325,15 +13253,14 @@ ${_html.style}
13325
13253
  __publicField(this, "keyHandlers", new KeyHandlersImpl(this));
13326
13254
  __publicField(this, "toolButtonRegistry", new ToolButtonRegistryImpl());
13327
13255
  __publicField(this, "title");
13328
- __publicField(this, "editMode");
13329
13256
  __publicField(this, "scale", vue.ref(1));
13330
13257
  __publicField(this, "locale", vue.ref("en"));
13331
13258
  __publicField(this, "locales", vue.ref(["en"]));
13332
13259
  __publicField(this, "customWidgets", []);
13260
+ __publicField(this, "watchers", {});
13333
13261
  __publicField(this, "providers", {});
13334
13262
  this.model = new Model();
13335
13263
  this.context = new PageBuilderContextImpl(this);
13336
- this.editMode = "free";
13337
13264
  this.scale.value = 1;
13338
13265
  this.initPlugins();
13339
13266
  }
@@ -13362,13 +13289,19 @@ ${_html.style}
13362
13289
  const def = this.partManager.getPartDefinition(part.partName);
13363
13290
  if (!def || !def.dataWatcher)
13364
13291
  return false;
13365
- return def.dataWatcher(part.properties);
13292
+ const watcher = this.watchers[def.dataWatcher];
13293
+ if (!watcher)
13294
+ return false;
13295
+ return watcher(part.properties);
13366
13296
  }
13367
13297
  provideCustomWidgetData(part) {
13368
13298
  const def = this.partManager.getPartDefinition(part.partName);
13369
13299
  if (!def || !def.dataProvider)
13370
13300
  return Promise.resolve();
13371
- return def.dataProvider(part.properties);
13301
+ const provider = this.providers[def.dataProvider];
13302
+ if (!provider)
13303
+ return Promise.resolve();
13304
+ return provider(part.properties);
13372
13305
  }
13373
13306
  registerPlugin(plugin) {
13374
13307
  if (plugin.partDefinitions)
@@ -13392,7 +13325,7 @@ ${_html.style}
13392
13325
  plugin.widgets.forEach((v) => {
13393
13326
  const w = { ...v };
13394
13327
  w.partType = "Widget";
13395
- w.creator = () => _sfc_main$B;
13328
+ w.creator = () => _sfc_main$z;
13396
13329
  w.propertyGroups = [...w.propertyGroups, ...defaultWidgetPropertyGroups()];
13397
13330
  partDefinitions2[v.partName] = w;
13398
13331
  const found = this.customWidgets.find((x) => x.partName === v.partName);
@@ -13402,34 +13335,34 @@ ${_html.style}
13402
13335
  });
13403
13336
  this.partManager.registerPartDefinitions(partDefinitions2);
13404
13337
  }
13338
+ if (plugin.watchers) {
13339
+ this.watchers = { ...this.providers, ...plugin.watchers };
13340
+ }
13405
13341
  if (plugin.providers) {
13406
- this.providers = {
13407
- ...this.providers,
13408
- ...plugin.providers
13409
- };
13342
+ this.providers = { ...this.providers, ...plugin.providers };
13410
13343
  }
13411
13344
  if (plugin.propertyEditors) {
13412
13345
  this.partManager.registerPartPropertyEditors(plugin.propertyEditors);
13413
13346
  }
13414
13347
  }
13415
- initData(content) {
13416
- this.model.rootPart.pageBuilderId = this.instanceId;
13348
+ initData(data) {
13417
13349
  this.model.rootPart.language = this.locale.value;
13418
13350
  let parts;
13419
- if (content) {
13420
- for (const p of content) {
13421
- const page = partFromJsonObject(p, true);
13422
- if (page) {
13423
- if (!parts)
13424
- parts = [];
13425
- parts.push(page);
13426
- }
13427
- }
13351
+ if (data) {
13352
+ const rootPart = partFromJsonObject(data, true);
13353
+ if (!rootPart)
13354
+ throw new Error("Invalid data format");
13355
+ parts = rootPart.children;
13428
13356
  }
13429
13357
  if (!parts) {
13430
13358
  parts = [this.getEmptyPageContent(), this.getEmptyPageContent()];
13431
13359
  }
13360
+ let partIdsToDelete = void 0;
13361
+ if (this.model.rootPart.children && this.model.rootPart.children.length) {
13362
+ partIdsToDelete = this.model.rootPart.children.map((v) => v.partId);
13363
+ }
13432
13364
  const param = {
13365
+ delete: partIdsToDelete,
13433
13366
  insert: [
13434
13367
  {
13435
13368
  partId: this.model.getRootPartId(),
@@ -13469,8 +13402,8 @@ ${_html.style}
13469
13402
  if (screenCount !== 1)
13470
13403
  return;
13471
13404
  const part = this.model.rootPart.children[0];
13472
- const json = this.model.serializePageModel([part.partId]);
13473
- const copied = this.model.parsePageModel(json);
13405
+ const json = this.model.serializeParts([part.partId]);
13406
+ const copied = this.model.parseParts(json);
13474
13407
  if (!copied)
13475
13408
  return;
13476
13409
  this.model.updateModel({
@@ -13486,6 +13419,100 @@ ${_html.style}
13486
13419
  getCustomWidgets() {
13487
13420
  return this.customWidgets;
13488
13421
  }
13422
+ extractMedia(part) {
13423
+ const urls = /* @__PURE__ */ new Set();
13424
+ this.extractMediaFromPart(part, urls);
13425
+ return Array.from(urls);
13426
+ }
13427
+ extractProvider(part) {
13428
+ const def = this.partManager.getPartDefinition(part.partName);
13429
+ if (def && (def == null ? void 0 : def.dataProvider)) {
13430
+ part.dataProvider = def.dataProvider;
13431
+ }
13432
+ if (part.children && part.children.length) {
13433
+ for (const child of part.children) {
13434
+ this.extractProvider(child);
13435
+ }
13436
+ }
13437
+ }
13438
+ extractMediaFromPart(part, urls) {
13439
+ if (part.properties) {
13440
+ for (const name in part.properties) {
13441
+ const def = this.partManager.getPropertyDefinition(part.partName, name);
13442
+ if (def && def.propertyType === "image") {
13443
+ const value = part.properties[name];
13444
+ if (value) {
13445
+ urls.add(value);
13446
+ }
13447
+ }
13448
+ }
13449
+ if (part.properties.css) {
13450
+ this.extractMediaFromHtml(part.properties.css, urls);
13451
+ }
13452
+ if (part.partName === "HtmlWidget" && part.properties.html) {
13453
+ for (const locale in part.properties.html) {
13454
+ const html = part.properties.html[locale];
13455
+ if (html.tags)
13456
+ this.extractMediaFromHtml(html.tags, urls);
13457
+ if (html.style)
13458
+ this.extractMediaFromHtml(html.style, urls);
13459
+ }
13460
+ }
13461
+ }
13462
+ if (part.children && part.children.length) {
13463
+ for (const child of part.children) {
13464
+ this.extractMediaFromPart(child, urls);
13465
+ }
13466
+ }
13467
+ }
13468
+ extractMediaFromHtml(html, urls) {
13469
+ const imgSrcMatches = html.match(/<img[^>]+src=["']?([^"'\s>]+)["']?[^>]*>/gi);
13470
+ if (imgSrcMatches) {
13471
+ imgSrcMatches.forEach((match) => {
13472
+ const url = match.match(/src=["']?([^"'\s>]+)["']?/i);
13473
+ if (url && url[1]) {
13474
+ urls.add(url[1]);
13475
+ }
13476
+ });
13477
+ }
13478
+ const sourceSrcsetMatches = html.match(/<source[^>]+srcset=["']?([^"'>]+)["']?[^>]*>/gi);
13479
+ if (sourceSrcsetMatches) {
13480
+ sourceSrcsetMatches.forEach((match) => {
13481
+ const srcset = match.match(/srcset=["']?([^"'>]+)["']?/i);
13482
+ if (srcset && srcset[1]) {
13483
+ const _urls = srcset[1].split(",").map((item) => item.trim().split(/\s+/)[0]);
13484
+ _urls.forEach((url) => urls.add(url));
13485
+ }
13486
+ });
13487
+ }
13488
+ const inputImageMatches = html.match(/<input[^>]+type=["']image["'][^>]+src=["']?([^"'\s>]+)["']?[^>]*>/gi);
13489
+ if (inputImageMatches) {
13490
+ inputImageMatches.forEach((match) => {
13491
+ const url = match.match(/src=["']?([^"'\s>]+)["']?/i);
13492
+ if (url && url[1]) {
13493
+ urls.add(url[1]);
13494
+ }
13495
+ });
13496
+ }
13497
+ const styleUrlMatches = html.match(/style=["']?[^"'>]*(background|background-image|border-image|list-style-image|content):\s*url\(["']?([^"'\)]+)["']?\)/gi);
13498
+ if (styleUrlMatches) {
13499
+ styleUrlMatches.forEach((match) => {
13500
+ const url = match.match(/url\(["']?([^"'\)]+)["']?\)/i);
13501
+ if (url && url[1]) {
13502
+ urls.add(url[1]);
13503
+ }
13504
+ });
13505
+ }
13506
+ const styleTagUrlMatches = html.match(/(background|background-image|border-image|list-style-image|content):\s*url\(["']?([^"'\)]+)["']?\)/gi);
13507
+ if (styleTagUrlMatches) {
13508
+ styleTagUrlMatches.forEach((match) => {
13509
+ const url = match.match(/url\(["']?([^"'\)]+)["']?\)/i);
13510
+ if (url && url[1]) {
13511
+ urls.add(url[1]);
13512
+ }
13513
+ });
13514
+ }
13515
+ }
13489
13516
  getEmptyPageContent() {
13490
13517
  const block = new Block();
13491
13518
  const section = new Section();
@@ -13506,11 +13533,11 @@ ${_html.style}
13506
13533
  });
13507
13534
  }
13508
13535
  }
13509
- const _hoisted_1$n = /* @__PURE__ */ vue.createElementVNode("i", { class: "material-icons-outlined" }, "add_circle_outline", -1);
13510
- const _hoisted_2$f = [
13511
- _hoisted_1$n
13536
+ const _hoisted_1$l = /* @__PURE__ */ vue.createElementVNode("i", { class: "material-icons-outlined" }, "add_circle_outline", -1);
13537
+ const _hoisted_2$d = [
13538
+ _hoisted_1$l
13512
13539
  ];
13513
- const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
13540
+ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
13514
13541
  __name: "PbPage",
13515
13542
  props: {
13516
13543
  page: {},
@@ -13543,7 +13570,7 @@ ${_html.style}
13543
13570
  class: vue.normalizeClass([selected.value && "selected", _ctx.isMobilePage ? "mobile" : "pc", "pb-page-content"])
13544
13571
  }, [
13545
13572
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList((_a = _ctx.page) == null ? void 0 : _a.children, (section, index) => {
13546
- return vue.openBlock(), vue.createBlock(_sfc_main$w, {
13573
+ return vue.openBlock(), vue.createBlock(_sfc_main$u, {
13547
13574
  key: section.partId,
13548
13575
  part: section
13549
13576
  }, null, 8, ["part"]);
@@ -13555,13 +13582,13 @@ ${_html.style}
13555
13582
  var _a2, _b;
13556
13583
  return insertSection(((_b = (_a2 = _ctx.page) == null ? void 0 : _a2.children) == null ? void 0 : _b.length) || 0);
13557
13584
  })
13558
- }, _hoisted_2$f)
13585
+ }, _hoisted_2$d)
13559
13586
  ], 4);
13560
13587
  };
13561
13588
  }
13562
13589
  });
13563
- const _hoisted_1$m = /* @__PURE__ */ vue.createElementVNode("div", { style: { "width": "20px" } }, null, -1);
13564
- const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
13590
+ const _hoisted_1$k = /* @__PURE__ */ vue.createElementVNode("div", { style: { "width": "20px" } }, null, -1);
13591
+ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
13565
13592
  __name: "PbCanvas",
13566
13593
  setup(__props) {
13567
13594
  const pageBuilder = usePageBuilderEditor();
@@ -13608,13 +13635,13 @@ ${_html.style}
13608
13635
  style: vue.normalizeStyle(style.value),
13609
13636
  class: "pb-canvas"
13610
13637
  }, [
13611
- vue.createVNode(_sfc_main$o, {
13638
+ vue.createVNode(_sfc_main$m, {
13612
13639
  "is-mobile-page": true,
13613
13640
  page: pageS.value,
13614
13641
  width: 420
13615
13642
  }, null, 8, ["page"]),
13616
- _hoisted_1$m,
13617
- vue.createVNode(_sfc_main$o, {
13643
+ _hoisted_1$k,
13644
+ vue.createVNode(_sfc_main$m, {
13618
13645
  "is-mobile-page": false,
13619
13646
  page: pageL.value,
13620
13647
  width: 1024
@@ -13624,9 +13651,9 @@ ${_html.style}
13624
13651
  };
13625
13652
  }
13626
13653
  });
13627
- const canvasStyle = '.pb-page {\n margin: 0 auto;\n margin-top: 20px;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-page .pb-page-content.selected {\n outline: 2px solid #4998f8;\n outline-offset: 5px;\n}\n.pb-page * {\n box-sizing: border-box;\n}\n.pb-add-widget-button {\n width: 100%;\n height: 100%;\n min-height: 200px;\n position: relative;\n}\n.pb-add-widget-button button {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: 8px;\n background: none;\n border: none;\n cursor: pointer;\n}\n.pb-add-widget-button button:hover {\n background-color: #eeeeee;\n}\n.pb-add-widget-button .icon {\n font-size: 1rem;\n vertical-align: middle;\n}\n.pb-add-widget-button .text {\n font-size: 1rem;\n vertical-align: middle;\n margin-left: 0.4rem;\n}\n.pb-section {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n outline: 1px dashed #ccc;\n background-color: #fff;\n}\n.pb-section:hover:not(:has(.pb-block:hover)) {\n background-color: #f0f0f0;\n}\n.pb-section.selected {\n outline: 1px solid #e67e22;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-section.pb-section-static {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n.pb-section.pb-section-static:after {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.2);\n}\n.pb-section-static .pb-widget {\n outline: none;\n}\n.pb-block {\n display: flex;\n min-width: 1px;\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n outline: 1px dashed #ccc;\n}\n.pb-block:hover:not(:has(.pb-widget:hover)) {\n background-color: #f0f0f0;\n}\n.pb-block.selected {\n outline: 1px solid #8e44ad;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget {\n position: relative;\n outline: 1px dashed #ccc;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-widget.selected {\n outline: 2px solid #27ae60;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-widget .pan-handle {\n position: absolute;\n left: -6px;\n top: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: move;\n}\n.pb-widget .resize-handle {\n position: absolute;\n right: -6px;\n bottom: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: nwse-resize;\n}\n.pb-widget {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-text-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-text-widget .text {\n color: #333;\n}\n.pb-text-widget.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 padding: 0;\n margin: 0;\n font-size: 32px;\n font-weight: bold;\n color: #ccc;\n line-height: 200px;\n vertical-align: middle;\n}\n.font-icon {\n font-family: Material Symbols Outlined, monospace;\n font-size: 1rem;\n max-width: 1em;\n}\nhtml, body {\n font-family: Noto Sans, Noto Sans KR, Noto Sans JP, Arial, sans-serif;\n font-size: 12px;\n}\nbody {\n background-color: white;\n height: 100%;\n margin: 0;\n}\n.pb-canvas-wrapper {\n padding: 32px 40px 56px 40px;\n height: 100%;\n background-color: #aaa;\n overflow: auto;\n}\n.pb-canvas-wrapper .pb-canvas {\n display: flex;\n flex-direction: row;\n transform-origin: top left;\n width: fit-content;\n min-width: 40px;\n min-height: 40px;\n margin: 0 auto;\n}\n.pb-position-mark {\n background-color: #ff3333;\n opacity: 0.5;\n border-radius: 2px;\n}\n.pb-add-section-handle {\n position: relative;\n text-align: center;\n cursor: pointer;\n z-index: 5;\n height: 0;\n}\n.pb-add-section-handle.top::before, .pb-add-section-handle.bottom::before, .pb-add-section-handle.middle::before {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n opacity: 0;\n pointer-events: none;\n}\n.pb-add-section-handle.bottom {\n left: 50%;\n bottom: -32px;\n}\n.pb-add-section-handle:hover.top::before, .pb-add-section-handle:hover.bottom::before, .pb-add-section-handle:hover.middle::before,\n.pb-add-section-handle:hover > i {\n opacity: 1;\n}\n.pb-add-section-handle > i {\n vertical-align: middle;\n position: absolute;\n top: 50%;\n left: -20px;\n font-size: 2rem;\n transform: translate(-50%, -50%);\n opacity: 0.2;\n}\n.pb-button {\n background: none;\n border: none;\n cursor: pointer;\n vertical-align: middle;\n}\n.pb-guideline {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.pb-guideline.selected {\n z-index: 3;\n}\n.pb-guideline.preselect {\n z-index: 4;\n}';
13628
- const _hoisted_1$l = { class: "pb-canvas-frame" };
13629
- const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
13654
+ const canvasStyle = '.pb-page {\n margin: 0 auto;\n margin-top: 20px;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-page .pb-page-content.selected {\n outline: 2px solid #4998f8;\n outline-offset: 5px;\n}\n.pb-page * {\n box-sizing: border-box;\n}\n.pb-add-widget-button {\n width: 100%;\n height: 100%;\n min-height: 200px;\n position: relative;\n}\n.pb-add-widget-button button {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: 8px;\n background: none;\n border: none;\n cursor: pointer;\n}\n.pb-add-widget-button button:hover {\n background-color: #eeeeee;\n}\n.pb-add-widget-button .icon {\n font-size: 1rem;\n vertical-align: middle;\n}\n.pb-add-widget-button .text {\n font-size: 1rem;\n vertical-align: middle;\n margin-left: 0.4rem;\n}\n.pb-section {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n outline: 1px dashed #ccc;\n background-color: #fff;\n}\n.pb-section:hover:not(:has(.pb-block:hover)) {\n background-color: #f0f0f0;\n}\n.pb-section.selected {\n outline: 1px solid #e67e22;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-section.pb-section-static {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n.pb-section.pb-section-static:after {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.2);\n}\n.pb-section-static .pb-widget {\n outline: none;\n}\n.pb-block {\n display: flex;\n min-width: 1px;\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n outline: 1px dashed #ccc;\n}\n.pb-block:hover:not(:has(.pb-widget:hover)) {\n background-color: #f0f0f0;\n}\n.pb-block.selected {\n outline: 1px solid #8e44ad;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget {\n position: relative;\n outline: 1px dashed #ccc;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-widget.selected {\n outline: 2px solid #27ae60;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-widget .pan-handle {\n position: absolute;\n left: -6px;\n top: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: move;\n}\n.pb-widget .resize-handle {\n position: absolute;\n right: -6px;\n bottom: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: nwse-resize;\n}\n.pb-widget {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-text-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-text-widget .text {\n color: #333;\n}\n.pb-text-widget .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\n color: #999;\n}\n.pb-image-widget {\n width: 100%;\n}\n.pb-image-widget .image {\n width: 100%;\n}\n.pb-image-widget .empty {\n height: 100px;\n background-color: #eee;\n text-align: center;\n}\n.pb-image-widget .empty span {\n font-size: 40px;\n color: #999;\n line-height: 100px;\n vertical-align: middle;\n}\n.pb-html-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-html-widget .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\n color: #999;\n}\n.pb-iframe-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-iframe-widget .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\n color: #999;\n}\n.pb-product-list-widget {\n width: 100%;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n}\n.pb-product-list-widget .product-wrapper {\n width: 25%;\n}\n.pb-product-list-widget .product-wrapper .product {\n width: 95%;\n margin: 0 auto;\n padding-top: 8px;\n padding-bottom: 8px;\n}\n.pb-product-list-widget .product-wrapper img {\n width: 100%;\n}\n.pb-product-list-widget .product-wrapper .name {\n margin-top: 8px;\n font-size: 14px;\n}\n.pb-product-list-widget .product-wrapper .price {\n margin-top: 8px;\n font-size: 14px;\n font-weight: bold;\n}\n.pb-product-list-widget .product-wrapper .empty {\n height: 200px;\n background-color: #eee;\n text-align: center;\n}\n.pb-product-list-widget .product-wrapper .empty span {\n font-size: 40px;\n color: #999;\n line-height: 200px;\n vertical-align: middle;\n}\n@media (max-width: 768px) {\n .pb-product-list-widget .product-wrapper {\n width: 50%;\n }\n}\n.mobile .pb-product-list-widget .product-wrapper {\n width: 50%;\n}\n.pb-login-widget {\n height: 200px;\n text-align: center;\n}\n.pb-login-widget h3 {\n padding: 0;\n margin: 0;\n font-size: 32px;\n font-weight: bold;\n color: #ccc;\n line-height: 200px;\n vertical-align: middle;\n}\n.font-icon {\n font-family: Material Symbols Outlined, monospace;\n font-size: 1rem;\n max-width: 1em;\n}\nhtml, body {\n font-family: Noto Sans, Noto Sans KR, Noto Sans JP, Arial, sans-serif;\n font-size: 12px;\n}\nbody {\n background-color: white;\n height: 100%;\n margin: 0;\n}\n.pb-canvas-wrapper {\n padding: 32px 40px 56px 40px;\n height: 100%;\n background-color: #aaa;\n overflow: auto;\n}\n.pb-canvas-wrapper .pb-canvas {\n display: flex;\n flex-direction: row;\n transform-origin: top left;\n width: fit-content;\n min-width: 40px;\n min-height: 40px;\n margin: 0 auto;\n}\n.pb-position-mark {\n background-color: #ff3333;\n opacity: 0.5;\n border-radius: 2px;\n}\n.pb-add-section-handle {\n position: relative;\n text-align: center;\n cursor: pointer;\n z-index: 5;\n height: 0;\n}\n.pb-add-section-handle.top::before, .pb-add-section-handle.bottom::before, .pb-add-section-handle.middle::before {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n opacity: 0;\n pointer-events: none;\n}\n.pb-add-section-handle.bottom {\n left: 50%;\n bottom: -32px;\n}\n.pb-add-section-handle:hover.top::before, .pb-add-section-handle:hover.bottom::before, .pb-add-section-handle:hover.middle::before,\n.pb-add-section-handle:hover > i {\n opacity: 1;\n}\n.pb-add-section-handle > i {\n vertical-align: middle;\n position: absolute;\n top: 50%;\n left: 0;\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}';
13655
+ const _hoisted_1$j = { class: "pb-canvas-frame" };
13656
+ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
13630
13657
  __name: "PbCanvasFrame",
13631
13658
  setup(__props) {
13632
13659
  const pageBuilderEditor = usePageBuilderEditor();
@@ -13638,7 +13665,7 @@ ${_html.style}
13638
13665
  return (_b = (_a = iframeRef.value) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.document;
13639
13666
  },
13640
13667
  () => {
13641
- var _a, _b, _c, _d, _e;
13668
+ var _a, _b, _c, _d, _e, _f, _g, _h;
13642
13669
  if ((_c = (_b = (_a = iframeRef.value) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.document) == null ? void 0 : _c.head) {
13643
13670
  const head = (_e = (_d = iframeRef.value) == null ? void 0 : _d.contentWindow) == null ? void 0 : _e.document.head;
13644
13671
  head.innerHTML = `
@@ -13661,6 +13688,16 @@ ${_html.style}
13661
13688
  <link href="https://fonts.googleapis.com/css2?family=Material+Icons+Outlined" rel="stylesheet" />
13662
13689
  <style>${canvasStyle}</style>
13663
13690
  `;
13691
+ const script2 = (_g = (_f = iframeRef.value) == null ? void 0 : _f.contentWindow) == null ? void 0 : _g.document.createElement("script");
13692
+ script2.innerHTML = `
13693
+ function forwardPostMessage(event) {
13694
+ if (event.data) {
13695
+ window.parent.postMessage(event.data, '*');
13696
+ }
13697
+ }
13698
+ window.addEventListener('message', forwardPostMessage);
13699
+ `;
13700
+ (_h = iframeRef.value) == null ? void 0 : _h.contentWindow.document.head.appendChild(script2);
13664
13701
  pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(iframeRef.value.contentWindow.document.body);
13665
13702
  stopIframeWatch();
13666
13703
  }
@@ -13668,7 +13705,7 @@ ${_html.style}
13668
13705
  );
13669
13706
  return (_ctx, _cache) => {
13670
13707
  var _a, _b, _c, _d;
13671
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$l, [
13708
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [
13672
13709
  vue.createElementVNode("iframe", {
13673
13710
  ref_key: "iframeRef",
13674
13711
  ref: iframeRef,
@@ -13678,14 +13715,14 @@ ${_html.style}
13678
13715
  key: 0,
13679
13716
  to: (_d = (_c = iframeRef.value) == null ? void 0 : _c.contentWindow) == null ? void 0 : _d.document.body
13680
13717
  }, [
13681
- vue.createVNode(_sfc_main$n)
13718
+ vue.createVNode(_sfc_main$l)
13682
13719
  ], 8, ["to"])) : vue.createCommentVNode("", true)
13683
13720
  ]);
13684
13721
  };
13685
13722
  }
13686
13723
  });
13687
- const _hoisted_1$k = { class: "pb-tool-button bs-layout-horizontal flex-align-center" };
13688
- const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
13724
+ const _hoisted_1$i = { class: "pb-tool-button bs-layout-horizontal flex-align-center" };
13725
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
13689
13726
  __name: "PbToolbarButton",
13690
13727
  props: {
13691
13728
  button: {}
@@ -13698,7 +13735,7 @@ ${_html.style}
13698
13735
  (_b = (_a = props.button).handler) == null ? void 0 : _b.call(_a, pageBuilder);
13699
13736
  };
13700
13737
  return (_ctx, _cache) => {
13701
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$k, [
13738
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [
13702
13739
  vue.createElementVNode("div", {
13703
13740
  class: "tool-button bs-clickable",
13704
13741
  onClick: handleClick
@@ -13713,17 +13750,17 @@ ${_html.style}
13713
13750
  };
13714
13751
  }
13715
13752
  });
13716
- const _hoisted_1$j = { class: "pb-tool-button-group bs-layout-horizontal flex-align-center" };
13717
- const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
13753
+ const _hoisted_1$h = { class: "pb-tool-button-group bs-layout-horizontal flex-align-center" };
13754
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
13718
13755
  __name: "PbToolbarButtonGroup",
13719
13756
  props: {
13720
13757
  group: {}
13721
13758
  },
13722
13759
  setup(__props) {
13723
13760
  return (_ctx, _cache) => {
13724
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [
13761
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
13725
13762
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.group.buttons, (button) => {
13726
- return vue.openBlock(), vue.createBlock(_sfc_main$l, {
13763
+ return vue.openBlock(), vue.createBlock(_sfc_main$j, {
13727
13764
  key: button.buttonId,
13728
13765
  button
13729
13766
  }, null, 8, ["button"]);
@@ -13732,11 +13769,11 @@ ${_html.style}
13732
13769
  };
13733
13770
  }
13734
13771
  });
13735
- const _hoisted_1$i = { class: "pb-toolbar bs-layout-horizontal align-items-center" };
13736
- const _hoisted_2$e = { class: "bs-layout-horizontal align-items-center" };
13737
- const _hoisted_3$d = /* @__PURE__ */ vue.createElementVNode("div", { class: "flex-grow-1" }, null, -1);
13738
- const _hoisted_4$5 = { class: "mr-8" };
13739
- const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
13772
+ const _hoisted_1$g = { class: "pb-toolbar bs-layout-horizontal align-items-center" };
13773
+ const _hoisted_2$c = { class: "bs-layout-horizontal align-items-center" };
13774
+ const _hoisted_3$b = /* @__PURE__ */ vue.createElementVNode("div", { class: "flex-grow-1" }, null, -1);
13775
+ const _hoisted_4$4 = { class: "mr-8" };
13776
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
13740
13777
  __name: "PbToolbar",
13741
13778
  props: {
13742
13779
  plugin: {}
@@ -13787,10 +13824,10 @@ ${_html.style}
13787
13824
  });
13788
13825
  return (_ctx, _cache) => {
13789
13826
  var _a, _b, _c;
13790
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [
13791
- vue.createElementVNode("div", _hoisted_2$e, [
13827
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
13828
+ vue.createElementVNode("div", _hoisted_2$c, [
13792
13829
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(buttonGroups), (group) => {
13793
- return vue.openBlock(), vue.createBlock(_sfc_main$k, {
13830
+ return vue.openBlock(), vue.createBlock(_sfc_main$i, {
13794
13831
  key: group.groupId,
13795
13832
  group
13796
13833
  }, null, 8, ["group"]);
@@ -13812,33 +13849,33 @@ ${_html.style}
13812
13849
  placeholder: "Scale"
13813
13850
  }, null, 8, ["modelValue"])
13814
13851
  ]),
13815
- _hoisted_3$d,
13816
- vue.createElementVNode("div", _hoisted_4$5, [
13852
+ _hoisted_3$b,
13853
+ vue.createElementVNode("div", _hoisted_4$4, [
13817
13854
  _ctx.plugin ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent((_a = _ctx.plugin) == null ? void 0 : _a.component), vue.mergeProps({ key: 0 }, (_b = _ctx.plugin) == null ? void 0 : _b.bind, vue.toHandlers((_c = _ctx.plugin) == null ? void 0 : _c.on)), null, 16)) : vue.createCommentVNode("", true)
13818
13855
  ])
13819
13856
  ]);
13820
13857
  };
13821
13858
  }
13822
13859
  });
13823
- const _hoisted_1$h = { class: "pb-menu bs-layout-vertical" };
13824
- const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
13860
+ const _hoisted_1$f = { class: "pb-menu bs-layout-vertical" };
13861
+ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
13825
13862
  __name: "PbMenu",
13826
13863
  props: {
13827
13864
  toolbarPlugin: {}
13828
13865
  },
13829
13866
  setup(__props) {
13830
13867
  return (_ctx, _cache) => {
13831
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
13832
- vue.createVNode(_sfc_main$j, { plugin: _ctx.toolbarPlugin }, null, 8, ["plugin"])
13868
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
13869
+ vue.createVNode(_sfc_main$h, { plugin: _ctx.toolbarPlugin }, null, 8, ["plugin"])
13833
13870
  ]);
13834
13871
  };
13835
13872
  }
13836
13873
  });
13837
- const _hoisted_1$g = {
13874
+ const _hoisted_1$e = {
13838
13875
  key: 1,
13839
13876
  class: "bs-layout-vertical border"
13840
13877
  };
13841
- const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
13878
+ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
13842
13879
  __name: "PbNavigator",
13843
13880
  setup(__props) {
13844
13881
  const pageBuilder = usePageBuilderEditor();
@@ -14064,7 +14101,7 @@ ${_html.style}
14064
14101
  ], 512)
14065
14102
  ]),
14066
14103
  _: 1
14067
- }, 8, ["tab-id"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
14104
+ }, 8, ["tab-id"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
14068
14105
  vue.createElementVNode("div", {
14069
14106
  ref_key: "treeS",
14070
14107
  ref: treeS,
@@ -14097,7 +14134,7 @@ ${_html.style}
14097
14134
  };
14098
14135
  }
14099
14136
  });
14100
- const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
14137
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
14101
14138
  __name: "PbSidebarPropertyEditor",
14102
14139
  props: {
14103
14140
  property: {},
@@ -14108,25 +14145,6 @@ ${_html.style}
14108
14145
  const pageBuilder = usePageBuilderEditor();
14109
14146
  const propertyEditor = vue.computed(() => {
14110
14147
  var _a;
14111
- if (pageBuilder.editMode === "local" && props.selectedParts.length > 0) {
14112
- const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
14113
- if (section && section.isGlobalDesignPart()) {
14114
- return;
14115
- }
14116
- if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
14117
- if (!props.property.localized) {
14118
- return;
14119
- }
14120
- }
14121
- }
14122
- if (pageBuilder.editMode === "template" && props.selectedParts.length > 0) {
14123
- const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
14124
- if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
14125
- if (props.property.localized) {
14126
- return;
14127
- }
14128
- }
14129
- }
14130
14148
  if (props.property.propertyEditor) {
14131
14149
  const editor = props.property.propertyEditor(props.property, props.selectedParts);
14132
14150
  if (editor)
@@ -14152,13 +14170,13 @@ ${_html.style}
14152
14170
  };
14153
14171
  }
14154
14172
  });
14155
- const _hoisted_1$f = { class: "pb-sidebar-property-group" };
14156
- const _hoisted_2$d = {
14173
+ const _hoisted_1$d = { class: "pb-sidebar-property-group" };
14174
+ const _hoisted_2$b = {
14157
14175
  key: 0,
14158
14176
  class: "group-title"
14159
14177
  };
14160
- const _hoisted_3$c = ["textContent"];
14161
- const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
14178
+ const _hoisted_3$a = ["textContent"];
14179
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
14162
14180
  __name: "PbSidebarPropertyGroupEditor",
14163
14181
  props: {
14164
14182
  group: {},
@@ -14167,36 +14185,16 @@ ${_html.style}
14167
14185
  },
14168
14186
  setup(__props) {
14169
14187
  const props = __props;
14170
- const pageBuilder = usePageBuilderEditor();
14171
14188
  const groupEditor = vue.computed(() => {
14172
14189
  var _a, _b;
14173
- if (pageBuilder.editMode === "local" && props.selectedParts.length > 0) {
14174
- const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
14175
- if (section && section.isGlobalDesignPart()) {
14176
- return;
14177
- }
14178
- if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
14179
- if (!props.group.localized) {
14180
- return;
14181
- }
14182
- }
14183
- }
14184
- if (pageBuilder.editMode === "template" && props.selectedParts.length > 0) {
14185
- const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
14186
- if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
14187
- if (props.group.localized) {
14188
- return;
14189
- }
14190
- }
14191
- }
14192
14190
  return (_b = (_a = props.group).propertyGroupEditor) == null ? void 0 : _b.call(_a, props.group, props.selectedParts);
14193
14191
  });
14194
14192
  return (_ctx, _cache) => {
14195
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
14196
- _ctx.group.showGroupName ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$d, [
14193
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
14194
+ _ctx.group.showGroupName ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$b, [
14197
14195
  vue.createElementVNode("label", {
14198
14196
  textContent: vue.toDisplayString(_ctx.group.caption)
14199
- }, null, 8, _hoisted_3$c)
14197
+ }, null, 8, _hoisted_3$a)
14200
14198
  ])) : vue.createCommentVNode("", true),
14201
14199
  _ctx.partsKey ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
14202
14200
  groupEditor.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(groupEditor.value), {
@@ -14204,7 +14202,7 @@ ${_html.style}
14204
14202
  group: _ctx.group,
14205
14203
  "selected-parts": _ctx.selectedParts
14206
14204
  }, null, 8, ["group", "selected-parts"])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.group.properties, (property) => {
14207
- return vue.openBlock(), vue.createBlock(_sfc_main$g, {
14205
+ return vue.openBlock(), vue.createBlock(_sfc_main$e, {
14208
14206
  key: `${_ctx.partsKey}_${property.propertyName}`,
14209
14207
  property,
14210
14208
  "selected-parts": _ctx.selectedParts
@@ -14215,106 +14213,8 @@ ${_html.style}
14215
14213
  };
14216
14214
  }
14217
14215
  });
14218
- const _hoisted_1$e = { class: "property-editor property-editor-local-part flex-align-center pt-16" };
14219
- const _hoisted_2$c = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
14220
- /* @__PURE__ */ vue.createElementVNode("label", { textContent: "Display Schedule" })
14221
- ], -1);
14222
- const _hoisted_3$b = { class: "bs-layout-horizontal" };
14223
- const _hoisted_4$4 = { class: "mr-2" };
14224
- const _hoisted_5$2 = /* @__PURE__ */ vue.createElementVNode("span", { class: "font-icon" }, "more_horiz", -1);
14225
- const _hoisted_6$2 = [
14226
- _hoisted_5$2
14227
- ];
14228
- const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
14229
- __name: "PbPropertyLocalMarketingPart",
14230
- props: {
14231
- selectedPart: {}
14232
- },
14233
- emits: ["select-schedule", "update-property-value"],
14234
- setup(__props, { emit: __emit }) {
14235
- const props = __props;
14236
- bluesea.useModal();
14237
- const startDt = vue.ref("");
14238
- const endDt = vue.ref("");
14239
- const pageBuilder = usePageBuilderEditor();
14240
- const selectSchedule = () => {
14241
- PageBuilderEditorEvent.emit.requestLocalMarketingPartSchedule({
14242
- pageBuilderId: pageBuilder.instanceId,
14243
- partId: props.selectedPart.partId,
14244
- callback: (schedule) => {
14245
- startDt.value = schedule.startDt;
14246
- endDt.value = schedule.endDt;
14247
- if (props.selectedPart && props.selectedPart.isSection()) {
14248
- clearContents(props.selectedPart);
14249
- if (schedule.data) {
14250
- for (const partId in schedule.data) {
14251
- const part = findWidget(props.selectedPart, partId);
14252
- if (part) {
14253
- Object.entries(schedule.data[partId]).forEach(([key, value]) => {
14254
- if (!value)
14255
- return;
14256
- part.properties = part.properties || {};
14257
- part.properties[key] = value;
14258
- });
14259
- }
14260
- }
14261
- }
14262
- }
14263
- }
14264
- });
14265
- };
14266
- const findWidget = (part, partId) => {
14267
- if (!part)
14268
- return;
14269
- if (part.partId === partId)
14270
- return part;
14271
- if (part.children) {
14272
- for (const child of part.children) {
14273
- const found = findWidget(child, partId);
14274
- if (found)
14275
- return found;
14276
- }
14277
- }
14278
- };
14279
- const clearContents = (part) => {
14280
- if (!part)
14281
- return;
14282
- if (part.properties) {
14283
- for (const name in part.properties) {
14284
- const propertyDef = pageBuilder.partManager.getPropertyDefinition(part.partName, name);
14285
- if (propertyDef && propertyDef.localized) {
14286
- delete part.properties[name];
14287
- }
14288
- }
14289
- }
14290
- if (part.children) {
14291
- for (const child of part.children) {
14292
- clearContents(child);
14293
- }
14294
- }
14295
- };
14296
- return (_ctx, _cache) => {
14297
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
14298
- _hoisted_2$c,
14299
- vue.createElementVNode("div", _hoisted_3$b, [
14300
- vue.createElementVNode("div", _hoisted_4$4, [
14301
- vue.createVNode(vue.unref(bluesea.BSDateRange), {
14302
- "from-value": startDt.value,
14303
- "to-value": endDt.value,
14304
- resolution: "DAY",
14305
- width: "260px"
14306
- }, null, 8, ["from-value", "to-value"])
14307
- ]),
14308
- vue.createElementVNode("div", null, [
14309
- vue.createElementVNode("button", { onClick: selectSchedule }, _hoisted_6$2)
14310
- ])
14311
- ])
14312
- ]);
14313
- };
14314
- }
14315
- });
14316
- const _hoisted_1$d = { class: "pb-sidebar-properties" };
14317
- const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
14216
+ const _hoisted_1$c = { class: "pb-sidebar-properties" };
14217
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
14318
14218
  __name: "PbSidebarProperties",
14319
14219
  setup(__props) {
14320
14220
  const pageBuilder = usePageBuilderEditor();
@@ -14331,25 +14231,13 @@ ${_html.style}
14331
14231
  return [];
14332
14232
  }
14333
14233
  });
14334
- const showLocalMarketingPart = vue.computed(() => {
14335
- if (pageBuilder.editMode === "template")
14336
- return false;
14337
- if (!selectedParts.length || selectedParts.length !== 1)
14338
- return false;
14339
- const part = selectedParts[0];
14340
- return part.isLocalMarketingPart();
14341
- });
14342
14234
  return (_ctx, _cache) => {
14343
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
14344
- showLocalMarketingPart.value ? (vue.openBlock(), vue.createBlock(_sfc_main$e, {
14345
- key: 0,
14346
- "selected-part": vue.unref(selectedParts)[0]
14347
- }, null, 8, ["selected-part"])) : vue.createCommentVNode("", true),
14235
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
14348
14236
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(properties.value, (group) => {
14349
14237
  return vue.openBlock(), vue.createElementBlock("div", {
14350
14238
  key: `${partsKey.value}_${group.groupName}`
14351
14239
  }, [
14352
- vue.createVNode(_sfc_main$f, {
14240
+ vue.createVNode(_sfc_main$d, {
14353
14241
  group,
14354
14242
  partsKey: partsKey.value,
14355
14243
  "selected-parts": vue.unref(selectedParts)
@@ -14360,25 +14248,24 @@ ${_html.style}
14360
14248
  };
14361
14249
  }
14362
14250
  });
14363
- const _hoisted_1$c = { class: "pb-sidebar" };
14364
- const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
14251
+ const _hoisted_1$b = { class: "pb-sidebar" };
14252
+ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
14365
14253
  __name: "PbSidebar",
14366
14254
  setup(__props) {
14367
14255
  return (_ctx, _cache) => {
14368
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
14369
- vue.createVNode(_sfc_main$d)
14256
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
14257
+ vue.createVNode(_sfc_main$c)
14370
14258
  ]);
14371
14259
  };
14372
14260
  }
14373
14261
  });
14374
- const _hoisted_1$b = { class: "pb-editor bs-layout-vertical flex-grow-1" };
14375
- const _hoisted_2$b = { class: "pb-editor-body bs-layout-horizontal flex-grow-1" };
14376
- const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
14262
+ const _hoisted_1$a = { class: "pb-editor bs-layout-vertical flex-grow-1" };
14263
+ const _hoisted_2$a = { class: "pb-editor-body bs-layout-horizontal flex-grow-1" };
14264
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
14377
14265
  __name: "PageBuilderEditor",
14378
14266
  props: {
14379
14267
  instanceId: {},
14380
14268
  title: {},
14381
- editMode: {},
14382
14269
  pageContent: {},
14383
14270
  locales: {},
14384
14271
  locale: {},
@@ -14391,7 +14278,6 @@ ${_html.style}
14391
14278
  const pageBuilderEditor = createPageBuilderEditor();
14392
14279
  pageBuilderEditor.instanceId = props.instanceId;
14393
14280
  pageBuilderEditor.title = props.title;
14394
- pageBuilderEditor.editMode = props.editMode || "free";
14395
14281
  if (props.locales)
14396
14282
  pageBuilderEditor.setLocales(props.locales);
14397
14283
  if (props.locale)
@@ -14415,29 +14301,31 @@ ${_html.style}
14415
14301
  const colorHistory = vue.ref([]);
14416
14302
  vue.provide("colorHistory", colorHistory);
14417
14303
  const getPageContent = () => {
14418
- const partIds = (pageBuilderEditor.model.rootPart.children || []).map((v) => v.partId);
14419
- return pageBuilderEditor.model.serializePageModel(partIds);
14304
+ return pageBuilderEditor.model.serializeModel(
14305
+ (part) => pageBuilderEditor.extractMedia(part),
14306
+ (partObject) => pageBuilderEditor.extractProvider(partObject)
14307
+ );
14420
14308
  };
14421
14309
  __expose({
14422
14310
  getPageContent
14423
14311
  });
14424
14312
  return (_ctx, _cache) => {
14425
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
14426
- vue.createVNode(_sfc_main$i, { "toolbar-plugin": _ctx.toolbarPlugin }, null, 8, ["toolbar-plugin"]),
14427
- vue.createElementVNode("div", _hoisted_2$b, [
14428
- vue.createVNode(_sfc_main$h),
14429
- vue.createVNode(_sfc_main$m, { class: "flex-grow-1" }),
14430
- vue.createVNode(_sfc_main$c)
14313
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
14314
+ vue.createVNode(_sfc_main$g, { "toolbar-plugin": _ctx.toolbarPlugin }, null, 8, ["toolbar-plugin"]),
14315
+ vue.createElementVNode("div", _hoisted_2$a, [
14316
+ vue.createVNode(_sfc_main$f),
14317
+ vue.createVNode(_sfc_main$k, { class: "flex-grow-1" }),
14318
+ vue.createVNode(_sfc_main$b)
14431
14319
  ])
14432
14320
  ]);
14433
14321
  };
14434
14322
  }
14435
14323
  });
14436
- const _hoisted_1$a = { class: "property-editor property-editor-readonly-text" };
14437
- const _hoisted_2$a = { class: "title" };
14438
- const _hoisted_3$a = ["textContent"];
14324
+ const _hoisted_1$9 = { class: "property-editor property-editor-readonly-text" };
14325
+ const _hoisted_2$9 = { class: "title" };
14326
+ const _hoisted_3$9 = ["textContent"];
14439
14327
  const _hoisted_4$3 = ["textContent"];
14440
- const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
14328
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
14441
14329
  __name: "PbPropertyEditorReadonlyText",
14442
14330
  props: {
14443
14331
  property: {},
@@ -14445,11 +14333,11 @@ ${_html.style}
14445
14333
  },
14446
14334
  setup(__props) {
14447
14335
  return (_ctx, _cache) => {
14448
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
14449
- vue.createElementVNode("div", _hoisted_2$a, [
14336
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
14337
+ vue.createElementVNode("div", _hoisted_2$9, [
14450
14338
  vue.createElementVNode("label", {
14451
14339
  textContent: vue.toDisplayString(_ctx.property.caption)
14452
- }, null, 8, _hoisted_3$a)
14340
+ }, null, 8, _hoisted_3$9)
14453
14341
  ]),
14454
14342
  vue.createElementVNode("div", null, [
14455
14343
  vue.createElementVNode("div", {
@@ -14462,12 +14350,12 @@ ${_html.style}
14462
14350
  });
14463
14351
  const PbPropertyEditorReadonlyText = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14464
14352
  __proto__: null,
14465
- default: _sfc_main$a
14353
+ default: _sfc_main$9
14466
14354
  }, Symbol.toStringTag, { value: "Module" }));
14467
- const _hoisted_1$9 = { class: "property-editor property-editor-text flex-align-center" };
14468
- const _hoisted_2$9 = { class: "title" };
14469
- const _hoisted_3$9 = ["textContent"];
14470
- const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
14355
+ const _hoisted_1$8 = { class: "property-editor property-editor-text flex-align-center" };
14356
+ const _hoisted_2$8 = { class: "title" };
14357
+ const _hoisted_3$8 = ["textContent"];
14358
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
14471
14359
  __name: "PbPropertyEditorText",
14472
14360
  props: {
14473
14361
  property: {},
@@ -14477,24 +14365,33 @@ ${_html.style}
14477
14365
  setup(__props, { emit: __emit }) {
14478
14366
  const props = __props;
14479
14367
  const emit = __emit;
14368
+ const pageBuilder = usePageBuilderEditor();
14369
+ const locales = vue.computed(() => pageBuilder.getLocales());
14480
14370
  const emitUpdatePropertyValue = (value) => {
14481
14371
  const properties = {};
14482
14372
  properties[props.property.propertyName] = value;
14483
14373
  emit("update-property-value", properties);
14484
14374
  };
14485
14375
  return (_ctx, _cache) => {
14486
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
14487
- vue.createElementVNode("div", _hoisted_2$9, [
14376
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
14377
+ vue.createElementVNode("div", _hoisted_2$8, [
14488
14378
  vue.createElementVNode("label", {
14489
14379
  textContent: vue.toDisplayString(_ctx.property.caption)
14490
- }, null, 8, _hoisted_3$9)
14380
+ }, null, 8, _hoisted_3$8)
14491
14381
  ]),
14492
14382
  vue.createElementVNode("div", null, [
14493
- vue.createVNode(vue.unref(bluesea.BSTextInput), {
14383
+ _ctx.property.multiLang ? (vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSMultiLangTextInput), {
14384
+ key: 0,
14385
+ locales: locales.value,
14494
14386
  "model-value": _ctx.value,
14495
14387
  width: "100%",
14496
14388
  "onUpdate:modelValue": emitUpdatePropertyValue
14497
- }, null, 8, ["model-value"])
14389
+ }, null, 8, ["locales", "model-value"])) : (vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSTextInput), {
14390
+ key: 1,
14391
+ "model-value": _ctx.value,
14392
+ width: "100%",
14393
+ "onUpdate:modelValue": emitUpdatePropertyValue
14394
+ }, null, 8, ["model-value"]))
14498
14395
  ])
14499
14396
  ]);
14500
14397
  };
@@ -14502,12 +14399,12 @@ ${_html.style}
14502
14399
  });
14503
14400
  const PbPropertyEditorText = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14504
14401
  __proto__: null,
14505
- default: _sfc_main$9
14402
+ default: _sfc_main$8
14506
14403
  }, Symbol.toStringTag, { value: "Module" }));
14507
- const _hoisted_1$8 = { class: "property-editor property-editor-multiline-text" };
14508
- const _hoisted_2$8 = { class: "title" };
14509
- const _hoisted_3$8 = ["textContent"];
14510
- const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
14404
+ const _hoisted_1$7 = { class: "property-editor property-editor-multiline-text" };
14405
+ const _hoisted_2$7 = { class: "title" };
14406
+ const _hoisted_3$7 = ["textContent"];
14407
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
14511
14408
  __name: "PbPropertyEditorMultilineText",
14512
14409
  props: {
14513
14410
  property: {},
@@ -14533,11 +14430,11 @@ ${_html.style}
14533
14430
  emit("update-property-value", properties);
14534
14431
  };
14535
14432
  return (_ctx, _cache) => {
14536
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
14537
- vue.createElementVNode("div", _hoisted_2$8, [
14433
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
14434
+ vue.createElementVNode("div", _hoisted_2$7, [
14538
14435
  vue.createElementVNode("label", {
14539
14436
  textContent: vue.toDisplayString(_ctx.property.caption)
14540
- }, null, 8, _hoisted_3$8)
14437
+ }, null, 8, _hoisted_3$7)
14541
14438
  ]),
14542
14439
  vue.createElementVNode("div", null, [
14543
14440
  _ctx.property.multiLang ? (vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSMultiLangTextArea), {
@@ -14567,12 +14464,12 @@ ${_html.style}
14567
14464
  });
14568
14465
  const PbPropertyEditorMultilineText = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14569
14466
  __proto__: null,
14570
- default: _sfc_main$8
14467
+ default: _sfc_main$7
14571
14468
  }, Symbol.toStringTag, { value: "Module" }));
14572
- const _hoisted_1$7 = { class: "property-editor property-editor-select flex-align-center" };
14573
- const _hoisted_2$7 = { class: "title" };
14574
- const _hoisted_3$7 = ["textContent"];
14575
- const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
14469
+ const _hoisted_1$6 = { class: "property-editor property-editor-select flex-align-center" };
14470
+ const _hoisted_2$6 = { class: "title" };
14471
+ const _hoisted_3$6 = ["textContent"];
14472
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
14576
14473
  __name: "PbPropertyEditorSelect",
14577
14474
  props: {
14578
14475
  property: {},
@@ -14591,11 +14488,11 @@ ${_html.style}
14591
14488
  emit("update-property-value", properties);
14592
14489
  };
14593
14490
  return (_ctx, _cache) => {
14594
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
14595
- vue.createElementVNode("div", _hoisted_2$7, [
14491
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
14492
+ vue.createElementVNode("div", _hoisted_2$6, [
14596
14493
  vue.createElementVNode("label", {
14597
14494
  textContent: vue.toDisplayString(_ctx.property.caption)
14598
- }, null, 8, _hoisted_3$7)
14495
+ }, null, 8, _hoisted_3$6)
14599
14496
  ]),
14600
14497
  vue.createElementVNode("div", null, [
14601
14498
  vue.createVNode(vue.unref(bluesea.BSSelect), {
@@ -14610,13 +14507,13 @@ ${_html.style}
14610
14507
  });
14611
14508
  const PbPropertyEditorSelect = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14612
14509
  __proto__: null,
14613
- default: _sfc_main$7
14510
+ default: _sfc_main$6
14614
14511
  }, Symbol.toStringTag, { value: "Module" }));
14615
- const _hoisted_1$6 = { class: "property-editor property-editor-color" };
14616
- const _hoisted_2$6 = { class: "title" };
14617
- const _hoisted_3$6 = ["textContent"];
14512
+ const _hoisted_1$5 = { class: "property-editor property-editor-color" };
14513
+ const _hoisted_2$5 = { class: "title" };
14514
+ const _hoisted_3$5 = ["textContent"];
14618
14515
  const _hoisted_4$2 = { class: "bs-layout-horizontal flex-align-center color" };
14619
- const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
14516
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
14620
14517
  __name: "PbPropertyEditorColor",
14621
14518
  props: {
14622
14519
  property: {},
@@ -14636,11 +14533,11 @@ ${_html.style}
14636
14533
  emit("update-property-value", properties);
14637
14534
  };
14638
14535
  return (_ctx, _cache) => {
14639
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
14640
- vue.createElementVNode("div", _hoisted_2$6, [
14536
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
14537
+ vue.createElementVNode("div", _hoisted_2$5, [
14641
14538
  vue.createElementVNode("label", {
14642
14539
  textContent: vue.toDisplayString(_ctx.property.caption)
14643
- }, null, 8, _hoisted_3$6)
14540
+ }, null, 8, _hoisted_3$5)
14644
14541
  ]),
14645
14542
  vue.createElementVNode("div", _hoisted_4$2, [
14646
14543
  vue.createVNode(PbColorPicker, {
@@ -14665,12 +14562,12 @@ ${_html.style}
14665
14562
  });
14666
14563
  const PbPropertyEditorColor = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14667
14564
  __proto__: null,
14668
- default: _sfc_main$6
14565
+ default: _sfc_main$5
14669
14566
  }, Symbol.toStringTag, { value: "Module" }));
14670
- const _hoisted_1$5 = { class: "property-editor property-editor-image flex-align-center" };
14671
- const _hoisted_2$5 = { class: "title" };
14672
- const _hoisted_3$5 = ["textContent"];
14673
- const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
14567
+ const _hoisted_1$4 = { class: "property-editor property-editor-image flex-align-center" };
14568
+ const _hoisted_2$4 = { class: "title" };
14569
+ const _hoisted_3$4 = ["textContent"];
14570
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
14674
14571
  __name: "PbPropertyEditorImage",
14675
14572
  props: {
14676
14573
  property: {},
@@ -14682,7 +14579,7 @@ ${_html.style}
14682
14579
  const modal = bluesea.useModal();
14683
14580
  const emit = __emit;
14684
14581
  const selectImage = () => {
14685
- const imageProvider = pageBuilder.getProvider("image");
14582
+ const imageProvider = pageBuilder.getProvider("imageProvider");
14686
14583
  if (imageProvider) {
14687
14584
  imageProvider({ modal }, (url) => {
14688
14585
  emit("update-property-value", { image: url });
@@ -14690,11 +14587,11 @@ ${_html.style}
14690
14587
  }
14691
14588
  };
14692
14589
  return (_ctx, _cache) => {
14693
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
14694
- vue.createElementVNode("div", _hoisted_2$5, [
14590
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
14591
+ vue.createElementVNode("div", _hoisted_2$4, [
14695
14592
  vue.createElementVNode("label", {
14696
14593
  textContent: vue.toDisplayString(_ctx.property.caption)
14697
- }, null, 8, _hoisted_3$5)
14594
+ }, null, 8, _hoisted_3$4)
14698
14595
  ]),
14699
14596
  vue.createElementVNode("div", null, [
14700
14597
  vue.createElementVNode("button", { onClick: selectImage }, "Select Image")
@@ -14705,12 +14602,12 @@ ${_html.style}
14705
14602
  });
14706
14603
  const PbPropertyEditorImage = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14707
14604
  __proto__: null,
14708
- default: _sfc_main$5
14605
+ default: _sfc_main$4
14709
14606
  }, Symbol.toStringTag, { value: "Module" }));
14710
- const _hoisted_1$4 = { class: "property-editor property-editor-image flex-align-center" };
14711
- const _hoisted_2$4 = { class: "title" };
14712
- const _hoisted_3$4 = ["textContent"];
14713
- const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
14607
+ const _hoisted_1$3 = { class: "property-editor property-editor-image flex-align-center" };
14608
+ const _hoisted_2$3 = { class: "title" };
14609
+ const _hoisted_3$3 = ["textContent"];
14610
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
14714
14611
  __name: "PbPropertyEditorHtml",
14715
14612
  props: {
14716
14613
  property: {},
@@ -14746,11 +14643,11 @@ ${_html.style}
14746
14643
  });
14747
14644
  };
14748
14645
  return (_ctx, _cache) => {
14749
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
14750
- vue.createElementVNode("div", _hoisted_2$4, [
14646
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
14647
+ vue.createElementVNode("div", _hoisted_2$3, [
14751
14648
  vue.createElementVNode("label", {
14752
14649
  textContent: vue.toDisplayString(_ctx.property.caption)
14753
- }, null, 8, _hoisted_3$4)
14650
+ }, null, 8, _hoisted_3$3)
14754
14651
  ]),
14755
14652
  vue.createElementVNode("div", null, [
14756
14653
  vue.createElementVNode("button", { onClick: editHtml }, "Edit HTML")
@@ -14760,55 +14657,6 @@ ${_html.style}
14760
14657
  }
14761
14658
  });
14762
14659
  const PbPropertyEditorHtml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14763
- __proto__: null,
14764
- default: _sfc_main$4
14765
- }, Symbol.toStringTag, { value: "Module" }));
14766
- const _hoisted_1$3 = { class: "bs-layout-vertical pb-part-add-modal" };
14767
- const _hoisted_2$3 = { class: "bs-layout-horizontal-wrap ml-16 mb-8 gap-8" };
14768
- const _hoisted_3$3 = ["onClick", "textContent"];
14769
- const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
14770
- __name: "PbPartAddModal",
14771
- props: {
14772
- pageBuilder: {},
14773
- partDefinitionGroups: {}
14774
- },
14775
- emits: ["selectHandler"],
14776
- setup(__props, { emit: __emit }) {
14777
- const emit = __emit;
14778
- const modalHandle = bluesea.useModalHandle();
14779
- const select = (partDefinition) => {
14780
- emit("selectHandler", partDefinition);
14781
- modalHandle.close();
14782
- };
14783
- return (_ctx, _cache) => {
14784
- return vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSModalFrame), { title: "Add Design Part" }, {
14785
- default: vue.withCtx(() => [
14786
- vue.createElementVNode("div", _hoisted_1$3, [
14787
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.partDefinitionGroups, (group) => {
14788
- return vue.openBlock(), vue.createElementBlock("div", {
14789
- key: group.groupName,
14790
- class: "group mb-16"
14791
- }, [
14792
- vue.createElementVNode("div", _hoisted_2$3, [
14793
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group.partDefinitions, (part) => {
14794
- return vue.openBlock(), vue.createElementBlock("div", {
14795
- key: part.partName,
14796
- class: "part",
14797
- onClick: ($event) => select(part),
14798
- textContent: vue.toDisplayString(part.caption)
14799
- }, null, 8, _hoisted_3$3);
14800
- }), 128))
14801
- ])
14802
- ]);
14803
- }), 128))
14804
- ])
14805
- ]),
14806
- _: 1
14807
- });
14808
- };
14809
- }
14810
- });
14811
- const PbPartAddModal = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14812
14660
  __proto__: null,
14813
14661
  default: _sfc_main$3
14814
14662
  }, Symbol.toStringTag, { value: "Module" }));
@@ -15091,15 +14939,15 @@ ${_html.style}
15091
14939
  exports2.PAGE_BUILDER_KEY = PAGE_BUILDER_KEY;
15092
14940
  exports2.PAGE_TYPE = PAGE_TYPE$1;
15093
14941
  exports2.Page = Page;
15094
- exports2.PageBuilderEditor = _sfc_main$b;
14942
+ exports2.PageBuilderEditor = _sfc_main$a;
15095
14943
  exports2.PageBuilderEditorEvent = PageBuilderEditorEvent;
15096
14944
  exports2.PageBuilderViewer = _sfc_main$1$1;
15097
- exports2.PageBuilderViewerEvent = PageBuilderViewerEvent;
15098
14945
  exports2.Part = Part;
15099
- exports2.PbCustomWidget = _sfc_main$B;
15100
- exports2.PbHtmlWidget = _sfc_main$3$1;
15101
- exports2.PbImageWidget = _sfc_main$5$1;
15102
- exports2.PbTextWidget = _sfc_main$4$1;
14946
+ exports2.PbCustomWidget = _sfc_main$z;
14947
+ exports2.PbHtmlWidget = _sfc_main$4$1;
14948
+ exports2.PbIframeWidget = _sfc_main$3$1;
14949
+ exports2.PbImageWidget = _sfc_main$6$1;
14950
+ exports2.PbTextWidget = _sfc_main$5$1;
15103
14951
  exports2.ROOT_TYPE = ROOT_TYPE$1;
15104
14952
  exports2.RootPart = RootPart;
15105
14953
  exports2.SECTION_TYPE = SECTION_TYPE$1;