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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { ref, defineComponent, openBlock, createElementBlock, createCommentVNode, computed, normalizeClass, createElementVNode, mergeProps, toDisplayString, provide, inject, onMounted, watch, createBlock as createBlock$1, resolveDynamicComponent, normalizeProps, Fragment, renderList, reactive, defineAsyncComponent, withDirectives, unref, createVNode, normalizeStyle, resolveComponent, vModelText, onBeforeUnmount, resolveDirective, withModifiers, renderSlot, guardReactiveProps, markRaw, Teleport, toHandlers, withCtx } from "vue";
7
+ import { ref, defineComponent, openBlock, createElementBlock, createCommentVNode, computed, mergeProps, toDisplayString, onMounted, onBeforeUnmount, provide, inject, watch, createBlock as createBlock$1, resolveDynamicComponent, normalizeProps, createElementVNode, normalizeClass, Fragment, renderList, reactive, defineAsyncComponent, withDirectives, unref, createVNode, normalizeStyle, resolveComponent, vModelText, resolveDirective, withModifiers, renderSlot, guardReactiveProps, markRaw, Teleport, toHandlers, withCtx } from "vue";
8
8
  import { notNull, BSTextInput, vClickOutside, useContextMenu, useModal, BSSelect, BSTabSheet, BSTree, BSDateRange } from "@g1cloud/bluesea";
9
9
  const create$5 = () => /* @__PURE__ */ new Map();
10
10
  const copy = (m) => {
@@ -6892,12 +6892,12 @@ let Model$1 = class Model {
6892
6892
  this.rootPart = ref(new RootPart());
6893
6893
  }
6894
6894
  };
6895
- const _hoisted_1$7$1 = ["data-model-id"];
6896
- const _hoisted_2$3$1 = {
6895
+ const _hoisted_1$8$1 = ["data-model-id"];
6896
+ const _hoisted_2$5$1 = {
6897
6897
  key: 1,
6898
6898
  class: "pb-nested-widget"
6899
6899
  };
6900
- const _sfc_main$9$1 = /* @__PURE__ */ defineComponent({
6900
+ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
6901
6901
  __name: "PbWidget",
6902
6902
  props: {
6903
6903
  part: {}
@@ -6919,7 +6919,7 @@ const _sfc_main$9$1 = /* @__PURE__ */ defineComponent({
6919
6919
  key: 0,
6920
6920
  part: _ctx.part
6921
6921
  }, null, 8, ["part"])) : createCommentVNode("", true),
6922
- childComponents.value && childComponents.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$3$1, [
6922
+ childComponents.value && childComponents.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$5$1, [
6923
6923
  (openBlock(true), createElementBlock(Fragment, null, renderList(childComponents.value, (child) => {
6924
6924
  return openBlock(), createBlock$1(resolveDynamicComponent(child.component), {
6925
6925
  key: child.part.partId,
@@ -6927,12 +6927,12 @@ const _sfc_main$9$1 = /* @__PURE__ */ defineComponent({
6927
6927
  }, null, 8, ["part"]);
6928
6928
  }), 128))
6929
6929
  ])) : createCommentVNode("", true)
6930
- ], 16, _hoisted_1$7$1);
6930
+ ], 16, _hoisted_1$8$1);
6931
6931
  };
6932
6932
  }
6933
6933
  });
6934
- const _hoisted_1$6$1 = ["data-model-id"];
6935
- const _sfc_main$8$1 = /* @__PURE__ */ defineComponent({
6934
+ const _hoisted_1$7$1 = ["data-model-id"];
6935
+ const _sfc_main$9$1 = /* @__PURE__ */ defineComponent({
6936
6936
  __name: "PbBlock",
6937
6937
  props: {
6938
6938
  part: {}
@@ -6950,17 +6950,17 @@ const _sfc_main$8$1 = /* @__PURE__ */ defineComponent({
6950
6950
  style: (_a = _ctx.part.properties) == null ? void 0 : _a.css
6951
6951
  }, properties.value), [
6952
6952
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.part.children, (child) => {
6953
- return openBlock(), createBlock$1(_sfc_main$9$1, {
6953
+ return openBlock(), createBlock$1(_sfc_main$a$1, {
6954
6954
  key: child.partId,
6955
6955
  part: child
6956
6956
  }, null, 8, ["part"]);
6957
6957
  }), 128))
6958
- ], 16, _hoisted_1$6$1);
6958
+ ], 16, _hoisted_1$7$1);
6959
6959
  };
6960
6960
  }
6961
6961
  });
6962
- const _hoisted_1$5$1 = { class: "pb-block" };
6963
- const _hoisted_2$2$1 = /* @__PURE__ */ createElementVNode("div", {
6962
+ const _hoisted_1$6$1 = { class: "pb-block" };
6963
+ const _hoisted_2$4$1 = /* @__PURE__ */ createElementVNode("div", {
6964
6964
  class: "pb-widget",
6965
6965
  style: { "margin": "0 auto" }
6966
6966
  }, [
@@ -6968,22 +6968,22 @@ const _hoisted_2$2$1 = /* @__PURE__ */ createElementVNode("div", {
6968
6968
  /* @__PURE__ */ createElementVNode("h3", null, "Login Design Part")
6969
6969
  ])
6970
6970
  ], -1);
6971
- const _hoisted_3$1$1 = [
6972
- _hoisted_2$2$1
6971
+ const _hoisted_3$4$1 = [
6972
+ _hoisted_2$4$1
6973
6973
  ];
6974
- const _sfc_main$7$1 = /* @__PURE__ */ defineComponent({
6974
+ const _sfc_main$8$1 = /* @__PURE__ */ defineComponent({
6975
6975
  __name: "PbLoginDepart",
6976
6976
  props: {
6977
6977
  part: {}
6978
6978
  },
6979
6979
  setup(__props) {
6980
6980
  return (_ctx, _cache) => {
6981
- return openBlock(), createElementBlock("div", _hoisted_1$5$1, _hoisted_3$1$1);
6981
+ return openBlock(), createElementBlock("div", _hoisted_1$6$1, _hoisted_3$4$1);
6982
6982
  };
6983
6983
  }
6984
6984
  });
6985
- const _hoisted_1$4$1 = ["data-model-id"];
6986
- const _sfc_main$6$1 = /* @__PURE__ */ defineComponent({
6985
+ const _hoisted_1$5$1 = ["data-model-id"];
6986
+ const _sfc_main$7$1 = /* @__PURE__ */ defineComponent({
6987
6987
  __name: "PbSection",
6988
6988
  props: {
6989
6989
  part: {}
@@ -6999,94 +6999,74 @@ const _sfc_main$6$1 = /* @__PURE__ */ defineComponent({
6999
6999
  "data-model-id": _ctx.part.partId,
7000
7000
  style: (_a = _ctx.part.properties) == null ? void 0 : _a.css
7001
7001
  }, properties.value), [
7002
- ((_b = _ctx.part.properties) == null ? void 0 : _b.name) === "Login Design Part" ? (openBlock(), createBlock$1(_sfc_main$7$1, {
7002
+ ((_b = _ctx.part.properties) == null ? void 0 : _b.name) === "Login Design Part" ? (openBlock(), createBlock$1(_sfc_main$8$1, {
7003
7003
  key: 0,
7004
7004
  part: _ctx.part
7005
7005
  }, null, 8, ["part"])) : _ctx.part.children && _ctx.part.children.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.part.children, (block) => {
7006
- return openBlock(), createBlock$1(_sfc_main$8$1, {
7006
+ return openBlock(), createBlock$1(_sfc_main$9$1, {
7007
7007
  key: block.partId,
7008
7008
  part: block
7009
7009
  }, null, 8, ["part"]);
7010
7010
  }), 128)) : createCommentVNode("", true)
7011
- ], 16, _hoisted_1$4$1);
7011
+ ], 16, _hoisted_1$5$1);
7012
7012
  };
7013
7013
  }
7014
7014
  });
7015
- const _hoisted_1$3$1 = { class: "pb-image-widget" };
7016
- const _hoisted_2$1$1 = ["src"];
7017
- const _hoisted_3$h = {
7015
+ const _hoisted_1$4$1 = { class: "pb-image-widget" };
7016
+ const _hoisted_2$3$1 = ["src"];
7017
+ const _hoisted_3$3$1 = {
7018
7018
  key: 1,
7019
- class: "empty"
7019
+ class: "placeholder"
7020
7020
  };
7021
7021
  const _hoisted_4$e = /* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "image", -1);
7022
7022
  const _hoisted_5$7 = [
7023
7023
  _hoisted_4$e
7024
7024
  ];
7025
- const _sfc_main$5$1 = /* @__PURE__ */ defineComponent({
7025
+ const _sfc_main$6$1 = /* @__PURE__ */ defineComponent({
7026
7026
  __name: "PbImageWidget",
7027
7027
  props: {
7028
7028
  part: {},
7029
- viewMode: { type: Boolean, default: false }
7029
+ placeholder: { type: Boolean }
7030
7030
  },
7031
7031
  setup(__props) {
7032
7032
  return (_ctx, _cache) => {
7033
7033
  var _a, _b;
7034
- return openBlock(), createElementBlock("div", _hoisted_1$3$1, [
7034
+ return openBlock(), createElementBlock("div", _hoisted_1$4$1, [
7035
7035
  ((_a = _ctx.part.properties) == null ? void 0 : _a.image) ? (openBlock(), createElementBlock("img", {
7036
7036
  key: 0,
7037
7037
  src: (_b = _ctx.part.properties) == null ? void 0 : _b.image,
7038
7038
  alt: "",
7039
7039
  class: "image"
7040
- }, null, 8, _hoisted_2$1$1)) : !_ctx.viewMode ? (openBlock(), createElementBlock("div", _hoisted_3$h, _hoisted_5$7)) : createCommentVNode("", true)
7040
+ }, null, 8, _hoisted_2$3$1)) : _ctx.placeholder ? (openBlock(), createElementBlock("div", _hoisted_3$3$1, _hoisted_5$7)) : createCommentVNode("", true)
7041
7041
  ]);
7042
7042
  };
7043
7043
  }
7044
7044
  });
7045
- const _hoisted_1$2$1 = ["textContent"];
7046
- const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
7045
+ const _hoisted_1$3$1 = { class: "pb-text-widget" };
7046
+ const _hoisted_2$2$1 = ["textContent"];
7047
+ const _hoisted_3$2$1 = {
7048
+ key: 1,
7049
+ class: "placeholder",
7050
+ textContent: "Empty Text"
7051
+ };
7052
+ const _sfc_main$5$1 = /* @__PURE__ */ defineComponent({
7047
7053
  __name: "PbTextWidget",
7048
7054
  props: {
7049
7055
  part: {},
7050
- viewMode: { type: Boolean, default: false }
7056
+ placeholder: { type: Boolean }
7051
7057
  },
7052
7058
  setup(__props) {
7053
7059
  const props = __props;
7054
7060
  const pageBuilder = usePageBuilder();
7055
- const emptyClass = computed(() => {
7056
- var _a;
7057
- if (props.viewMode) {
7058
- return false;
7059
- } else if ((_a = props.part.properties) == null ? void 0 : _a.text) {
7060
- if (typeof props.part.properties.text === "string") {
7061
- return true;
7062
- } else {
7063
- return !props.part.properties.text[pageBuilder.locale.value];
7064
- }
7065
- } else {
7066
- return true;
7067
- }
7068
- });
7069
7061
  const text = computed(() => {
7070
7062
  var _a;
7071
7063
  if ((_a = props.part.properties) == null ? void 0 : _a.text) {
7072
7064
  if (typeof props.part.properties.text === "string") {
7073
- if (props.viewMode) {
7074
- return "";
7075
- } else {
7076
- return "Empty text";
7077
- }
7065
+ return props.part.properties.text;
7078
7066
  } else {
7079
- const t = props.part.properties.text[pageBuilder.locale.value];
7080
- if (props.viewMode) {
7081
- return t || "";
7082
- } else {
7083
- return t || "Empty text";
7084
- }
7067
+ const locale = pageBuilder.getLocale();
7068
+ return props.part.properties.text[locale] || "";
7085
7069
  }
7086
- } else if (props.viewMode) {
7087
- return "";
7088
- } else {
7089
- return "Empty text";
7090
7070
  }
7091
7071
  });
7092
7072
  const style = computed(() => {
@@ -7099,23 +7079,29 @@ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
7099
7079
  };
7100
7080
  });
7101
7081
  return (_ctx, _cache) => {
7102
- return openBlock(), createElementBlock("div", {
7103
- class: normalizeClass([[emptyClass.value ? "empty" : ""], "pb-text-widget"])
7104
- }, [
7105
- createElementVNode("div", mergeProps({ class: "text" }, style.value, {
7082
+ return openBlock(), createElementBlock("div", _hoisted_1$3$1, [
7083
+ text.value ? (openBlock(), createElementBlock("div", mergeProps({
7084
+ key: 0,
7085
+ class: "text"
7086
+ }, style.value, {
7106
7087
  textContent: toDisplayString(text.value)
7107
- }), null, 16, _hoisted_1$2$1)
7108
- ], 2);
7088
+ }), null, 16, _hoisted_2$2$1)) : _ctx.placeholder ? (openBlock(), createElementBlock("div", _hoisted_3$2$1)) : createCommentVNode("", true)
7089
+ ]);
7109
7090
  };
7110
7091
  }
7111
7092
  });
7112
- const _hoisted_1$1$1 = ["innerHTML"];
7113
- const _hoisted_2$k = { key: 1 };
7114
- const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
7093
+ const _hoisted_1$2$1 = { class: "pb-html-widget" };
7094
+ const _hoisted_2$1$1 = ["innerHTML"];
7095
+ const _hoisted_3$1$1 = {
7096
+ key: 1,
7097
+ class: "placeholder",
7098
+ textContent: "Empty HTML"
7099
+ };
7100
+ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
7115
7101
  __name: "PbHtmlWidget",
7116
7102
  props: {
7117
7103
  part: {},
7118
- viewMode: { type: Boolean, default: false }
7104
+ placeholder: { type: Boolean }
7119
7105
  },
7120
7106
  setup(__props) {
7121
7107
  const props = __props;
@@ -7142,23 +7128,69 @@ ${_html.style}
7142
7128
  var _a;
7143
7129
  return getHtml((_a = props.part.properties) == null ? void 0 : _a.html);
7144
7130
  });
7145
- const emptyClass = computed(() => {
7146
- if (props.viewMode) {
7147
- return false;
7148
- } else {
7149
- return !html.value;
7150
- }
7151
- });
7131
+ computed(() => props.placeholder ? !html.value : false);
7152
7132
  return (_ctx, _cache) => {
7153
- return openBlock(), createElementBlock("div", {
7154
- class: normalizeClass([[emptyClass.value ? "empty" : ""], "pb-html-widget"])
7155
- }, [
7133
+ return openBlock(), createElementBlock("div", _hoisted_1$2$1, [
7156
7134
  html.value ? (openBlock(), createElementBlock("div", {
7157
7135
  key: 0,
7158
7136
  class: "html",
7159
7137
  innerHTML: html.value
7160
- }, null, 8, _hoisted_1$1$1)) : (openBlock(), createElementBlock("span", _hoisted_2$k, "Empty HTML"))
7161
- ], 2);
7138
+ }, null, 8, _hoisted_2$1$1)) : _ctx.placeholder ? (openBlock(), createElementBlock("div", _hoisted_3$1$1)) : createCommentVNode("", true)
7139
+ ]);
7140
+ };
7141
+ }
7142
+ });
7143
+ const _hoisted_1$1$1 = { class: "pb-iframe-widget" };
7144
+ const _hoisted_2$k = ["src"];
7145
+ const _hoisted_3$h = {
7146
+ key: 1,
7147
+ class: "placeholder",
7148
+ textContent: "Empty URL"
7149
+ };
7150
+ const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
7151
+ __name: "PbIframeWidget",
7152
+ props: {
7153
+ part: {},
7154
+ placeholder: { type: Boolean }
7155
+ },
7156
+ setup(__props) {
7157
+ const props = __props;
7158
+ const pageBuilder = usePageBuilder();
7159
+ const url = computed(() => {
7160
+ var _a;
7161
+ const url2 = (_a = props.part.properties) == null ? void 0 : _a.url;
7162
+ if (!url2)
7163
+ return;
7164
+ if (typeof url2 !== "object")
7165
+ return;
7166
+ const locale = pageBuilder.getLocale();
7167
+ return url2[locale];
7168
+ });
7169
+ const style = computed(() => ({
7170
+ style: {
7171
+ width: "100%",
7172
+ height: `${height.value}px`
7173
+ }
7174
+ }));
7175
+ const height = ref(200);
7176
+ const updateHeight = (event) => {
7177
+ if (event.data && event.data.height) {
7178
+ height.value = event.data.height;
7179
+ }
7180
+ };
7181
+ onMounted(() => {
7182
+ window.addEventListener("message", updateHeight);
7183
+ });
7184
+ onBeforeUnmount(() => {
7185
+ window.removeEventListener("message", updateHeight);
7186
+ });
7187
+ return (_ctx, _cache) => {
7188
+ return openBlock(), createElementBlock("div", _hoisted_1$1$1, [
7189
+ url.value ? (openBlock(), createElementBlock("iframe", mergeProps({
7190
+ key: 0,
7191
+ src: url.value
7192
+ }, style.value), null, 16, _hoisted_2$k)) : _ctx.placeholder ? (openBlock(), createElementBlock("div", _hoisted_3$h)) : createCommentVNode("", true)
7193
+ ]);
7162
7194
  };
7163
7195
  }
7164
7196
  });
@@ -7166,41 +7198,46 @@ const defaultPartDefinitions = {
7166
7198
  "Section": {
7167
7199
  partType: "Section",
7168
7200
  partName: "Section",
7169
- creator: () => _sfc_main$6$1
7201
+ creator: () => _sfc_main$7$1
7170
7202
  },
7171
7203
  "GlobalDesignPart": {
7172
7204
  partType: "Section",
7173
7205
  partName: "GlobalDesignPart",
7174
- creator: () => _sfc_main$6$1
7206
+ creator: () => _sfc_main$7$1
7175
7207
  },
7176
7208
  "LocalDesignPart": {
7177
7209
  partType: "Section",
7178
7210
  partName: "LocalDesignPart",
7179
- creator: () => _sfc_main$6$1
7211
+ creator: () => _sfc_main$7$1
7180
7212
  },
7181
7213
  "LocalMarketingPart": {
7182
7214
  partType: "Section",
7183
7215
  partName: "LocalMarketingPart",
7184
- creator: () => _sfc_main$6$1
7216
+ creator: () => _sfc_main$7$1
7185
7217
  },
7186
7218
  "Block": {
7187
7219
  partType: "Block",
7188
7220
  partName: "Block",
7189
- creator: () => _sfc_main$8$1
7221
+ creator: () => _sfc_main$9$1
7190
7222
  },
7191
7223
  "TextWidget": {
7192
7224
  partType: "Widget",
7193
7225
  partName: "TextWidget",
7194
- creator: () => _sfc_main$4$1
7226
+ creator: () => _sfc_main$5$1
7195
7227
  },
7196
7228
  "ImageWidget": {
7197
7229
  partType: "Widget",
7198
7230
  partName: "ImageWidget",
7199
- creator: () => _sfc_main$5$1
7231
+ creator: () => _sfc_main$6$1
7200
7232
  },
7201
7233
  "HtmlWidget": {
7202
7234
  partType: "Widget",
7203
7235
  partName: "HtmlWidget",
7236
+ creator: () => _sfc_main$4$1
7237
+ },
7238
+ "IframeWidget": {
7239
+ partType: "Widget",
7240
+ partName: "IframeWidget",
7204
7241
  creator: () => _sfc_main$3$1
7205
7242
  }
7206
7243
  };
@@ -7346,7 +7383,7 @@ const _sfc_main$2$1 = /* @__PURE__ */ defineComponent({
7346
7383
  class: normalizeClass([[_ctx.isMobilePage ? "mobile" : "pc"], "pb-page-content"])
7347
7384
  }, [
7348
7385
  (openBlock(true), createElementBlock(Fragment, null, renderList((_a = _ctx.page) == null ? void 0 : _a.children, (section) => {
7349
- return openBlock(), createBlock$1(_sfc_main$6$1, {
7386
+ return openBlock(), createBlock$1(_sfc_main$7$1, {
7350
7387
  key: section.partId,
7351
7388
  part: section
7352
7389
  }, null, 8, ["part"]);
@@ -8035,12 +8072,12 @@ class PartManager {
8035
8072
  const defaultPartPropertyEditors = () => {
8036
8073
  return {
8037
8074
  "readonly-text": () => defineAsyncComponent(() => import("./PbPropertyEditorReadonlyText-Dgp_AVOD.js")),
8038
- "text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-BWOKvwD9.js")),
8039
- "multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-B5HryveI.js")),
8075
+ "text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-CleInrev.js")),
8076
+ "multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-zmUCXJQZ.js")),
8040
8077
  "select": () => defineAsyncComponent(() => import("./PbPropertyEditorSelect-CWedbXJI.js")),
8041
- "color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-Bw7qz0-r.js")),
8042
- "image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-GN536Jw2.js")),
8043
- "html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-DH2Qep1X.js"))
8078
+ "color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-DEVkcUND.js")),
8079
+ "image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-DAEVOkpl.js")),
8080
+ "html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-CxPlqBYx.js"))
8044
8081
  };
8045
8082
  };
8046
8083
  const getPropertyValueOfParts = (parts, propertyName) => {
@@ -8765,13 +8802,15 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
8765
8802
  }, properties.value), [
8766
8803
  thisComponent.value ? (openBlock(), createBlock$1(resolveDynamicComponent(thisComponent.value), {
8767
8804
  key: 0,
8768
- part: _ctx.part
8805
+ part: _ctx.part,
8806
+ placeholder: true
8769
8807
  }, null, 8, ["part"])) : createCommentVNode("", true),
8770
8808
  childComponents.value && childComponents.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$i, [
8771
8809
  (openBlock(true), createElementBlock(Fragment, null, renderList(childComponents.value, (child) => {
8772
8810
  return openBlock(), createBlock$1(resolveDynamicComponent(child.component), {
8773
8811
  key: child.part.partId,
8774
- part: child.part
8812
+ part: child.part,
8813
+ placeholder: true
8775
8814
  }, null, 8, ["part"]);
8776
8815
  }), 128))
8777
8816
  ])) : createCommentVNode("", true),
@@ -12041,7 +12080,7 @@ const widgets = [
12041
12080
  },
12042
12081
  localized: true,
12043
12082
  allowsChild: () => false,
12044
- creator: () => _sfc_main$4$1
12083
+ creator: () => _sfc_main$5$1
12045
12084
  },
12046
12085
  {
12047
12086
  partType: "Widget",
@@ -12067,7 +12106,7 @@ const widgets = [
12067
12106
  initialProperties: {},
12068
12107
  localized: true,
12069
12108
  allowsChild: () => false,
12070
- creator: () => _sfc_main$5$1
12109
+ creator: () => _sfc_main$6$1
12071
12110
  },
12072
12111
  {
12073
12112
  partType: "Widget",
@@ -12094,6 +12133,33 @@ const widgets = [
12094
12133
  initialProperties: {},
12095
12134
  localized: true,
12096
12135
  allowsChild: () => false,
12136
+ creator: () => _sfc_main$4$1
12137
+ },
12138
+ {
12139
+ partType: "Widget",
12140
+ partName: "IframeWidget",
12141
+ caption: "IFrame",
12142
+ icon: "code",
12143
+ propertyGroups: [
12144
+ {
12145
+ groupName: "iframe",
12146
+ caption: "Iframe",
12147
+ properties: [
12148
+ {
12149
+ propertyName: "url",
12150
+ caption: "URL",
12151
+ propertyType: "text",
12152
+ params: "",
12153
+ localized: true,
12154
+ multiLang: true
12155
+ }
12156
+ ]
12157
+ },
12158
+ ...defaultWidgetPropertyGroups()
12159
+ ],
12160
+ initialProperties: {},
12161
+ localized: true,
12162
+ allowsChild: () => false,
12097
12163
  creator: () => _sfc_main$3$1
12098
12164
  }
12099
12165
  ];
@@ -12223,7 +12289,7 @@ const openPartAddModal = (modal, args, callback) => {
12223
12289
  };
12224
12290
  const openWidgetAddModal = (modal, args, callback) => {
12225
12291
  modal.openModal({
12226
- component: defineAsyncComponent(() => import("./PbWidgetAddModal-Zpo-ZeNH.js")),
12292
+ component: defineAsyncComponent(() => import("./PbWidgetAddModal-DoR8HJUd.js")),
12227
12293
  style: {
12228
12294
  width: "80%",
12229
12295
  height: "80%",
@@ -13622,7 +13688,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
13622
13688
  };
13623
13689
  }
13624
13690
  });
13625
- 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}';
13691
+ const canvasStyle = '.pb-page {\n margin: 0 auto;\n margin-top: 20px;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-page .pb-page-content.selected {\n outline: 2px solid #4998f8;\n outline-offset: 5px;\n}\n.pb-page * {\n box-sizing: border-box;\n}\n.pb-add-widget-button {\n width: 100%;\n height: 100%;\n min-height: 200px;\n position: relative;\n}\n.pb-add-widget-button button {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: 8px;\n background: none;\n border: none;\n cursor: pointer;\n}\n.pb-add-widget-button button:hover {\n background-color: #eeeeee;\n}\n.pb-add-widget-button .icon {\n font-size: 1rem;\n vertical-align: middle;\n}\n.pb-add-widget-button .text {\n font-size: 1rem;\n vertical-align: middle;\n margin-left: 0.4rem;\n}\n.pb-section {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n outline: 1px dashed #ccc;\n background-color: #fff;\n}\n.pb-section:hover:not(:has(.pb-block:hover)) {\n background-color: #f0f0f0;\n}\n.pb-section.selected {\n outline: 1px solid #e67e22;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-section.pb-section-static {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n.pb-section.pb-section-static:after {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.2);\n}\n.pb-section-static .pb-widget {\n outline: none;\n}\n.pb-block {\n display: flex;\n min-width: 1px;\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n outline: 1px dashed #ccc;\n}\n.pb-block:hover:not(:has(.pb-widget:hover)) {\n background-color: #f0f0f0;\n}\n.pb-block.selected {\n outline: 1px solid #8e44ad;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget {\n position: relative;\n outline: 1px dashed #ccc;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-widget.selected {\n outline: 2px solid #27ae60;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-widget .pan-handle {\n position: absolute;\n left: -6px;\n top: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: move;\n}\n.pb-widget .resize-handle {\n position: absolute;\n right: -6px;\n bottom: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: nwse-resize;\n}\n.pb-widget {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-text-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-text-widget .text {\n color: #333;\n}\n.pb-text-widget .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\n color: #999;\n}\n.pb-image-widget {\n width: 100%;\n}\n.pb-image-widget .image {\n width: 100%;\n}\n.pb-image-widget .empty {\n height: 100px;\n background-color: #eee;\n text-align: center;\n}\n.pb-image-widget .empty span {\n font-size: 40px;\n color: #999;\n line-height: 100px;\n vertical-align: middle;\n}\n.pb-html-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-html-widget .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\n color: #999;\n}\n.pb-iframe-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-iframe-widget .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\n color: #999;\n}\n.pb-product-list-widget {\n width: 100%;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n}\n.pb-product-list-widget .product-wrapper {\n width: 25%;\n}\n.pb-product-list-widget .product-wrapper .product {\n width: 95%;\n margin: 0 auto;\n padding-top: 8px;\n padding-bottom: 8px;\n}\n.pb-product-list-widget .product-wrapper img {\n width: 100%;\n}\n.pb-product-list-widget .product-wrapper .name {\n margin-top: 8px;\n font-size: 14px;\n}\n.pb-product-list-widget .product-wrapper .price {\n margin-top: 8px;\n font-size: 14px;\n font-weight: bold;\n}\n.pb-product-list-widget .product-wrapper .empty {\n height: 200px;\n background-color: #eee;\n text-align: center;\n}\n.pb-product-list-widget .product-wrapper .empty span {\n font-size: 40px;\n color: #999;\n line-height: 200px;\n vertical-align: middle;\n}\n@media (max-width: 768px) {\n .pb-product-list-widget .product-wrapper {\n width: 50%;\n }\n}\n.mobile .pb-product-list-widget .product-wrapper {\n width: 50%;\n}\n.pb-login-widget {\n height: 200px;\n text-align: center;\n}\n.pb-login-widget h3 {\n padding: 0;\n margin: 0;\n font-size: 32px;\n font-weight: bold;\n color: #ccc;\n line-height: 200px;\n vertical-align: middle;\n}\n.font-icon {\n font-family: Material Symbols Outlined, monospace;\n font-size: 1rem;\n max-width: 1em;\n}\nhtml, body {\n font-family: Noto Sans, Noto Sans KR, Noto Sans JP, Arial, sans-serif;\n font-size: 12px;\n}\nbody {\n background-color: white;\n height: 100%;\n margin: 0;\n}\n.pb-canvas-wrapper {\n padding: 32px 40px 56px 40px;\n height: 100%;\n background-color: #aaa;\n overflow: auto;\n}\n.pb-canvas-wrapper .pb-canvas {\n display: flex;\n flex-direction: row;\n transform-origin: top left;\n width: fit-content;\n min-width: 40px;\n min-height: 40px;\n margin: 0 auto;\n}\n.pb-position-mark {\n background-color: #ff3333;\n opacity: 0.5;\n border-radius: 2px;\n}\n.pb-add-section-handle {\n position: relative;\n text-align: center;\n cursor: pointer;\n z-index: 5;\n height: 0;\n}\n.pb-add-section-handle.top::before, .pb-add-section-handle.bottom::before, .pb-add-section-handle.middle::before {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n opacity: 0;\n pointer-events: none;\n}\n.pb-add-section-handle.bottom {\n left: 50%;\n bottom: -32px;\n}\n.pb-add-section-handle:hover.top::before, .pb-add-section-handle:hover.bottom::before, .pb-add-section-handle:hover.middle::before,\n.pb-add-section-handle:hover > i {\n opacity: 1;\n}\n.pb-add-section-handle > i {\n vertical-align: middle;\n position: absolute;\n top: 50%;\n left: -20px;\n font-size: 2rem;\n transform: translate(-50%, -50%);\n opacity: 0.2;\n}\n.pb-button {\n background: none;\n border: none;\n cursor: pointer;\n vertical-align: middle;\n}\n.pb-guideline {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.pb-guideline.selected {\n z-index: 3;\n}\n.pb-guideline.preselect {\n z-index: 4;\n}';
13626
13692
  const _hoisted_1$a = { class: "pb-canvas-frame" };
13627
13693
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
13628
13694
  __name: "PbCanvasFrame",
@@ -13636,7 +13702,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
13636
13702
  return (_b = (_a = iframeRef.value) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.document;
13637
13703
  },
13638
13704
  () => {
13639
- var _a, _b, _c, _d, _e;
13705
+ var _a, _b, _c, _d, _e, _f, _g, _h;
13640
13706
  if ((_c = (_b = (_a = iframeRef.value) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.document) == null ? void 0 : _c.head) {
13641
13707
  const head = (_e = (_d = iframeRef.value) == null ? void 0 : _d.contentWindow) == null ? void 0 : _e.document.head;
13642
13708
  head.innerHTML = `
@@ -13659,6 +13725,16 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
13659
13725
  <link href="https://fonts.googleapis.com/css2?family=Material+Icons+Outlined" rel="stylesheet" />
13660
13726
  <style>${canvasStyle}</style>
13661
13727
  `;
13728
+ const script2 = (_g = (_f = iframeRef.value) == null ? void 0 : _f.contentWindow) == null ? void 0 : _g.document.createElement("script");
13729
+ script2.innerHTML = `
13730
+ function forwardPostMessage(event) {
13731
+ if (event.data) {
13732
+ window.parent.postMessage(event.data, '*');
13733
+ }
13734
+ }
13735
+ window.addEventListener('message', forwardPostMessage);
13736
+ `;
13737
+ (_h = iframeRef.value) == null ? void 0 : _h.contentWindow.document.head.appendChild(script2);
13662
13738
  pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(iframeRef.value.contentWindow.document.body);
13663
13739
  stopIframeWatch();
13664
13740
  }
@@ -14448,19 +14524,20 @@ export {
14448
14524
  PageBuilderViewerEvent as g,
14449
14525
  Part as h,
14450
14526
  _sfc_main$q as i,
14451
- _sfc_main$3$1 as j,
14452
- _sfc_main$5$1 as k,
14453
- _sfc_main$4$1 as l,
14454
- RootPart as m,
14455
- Section as n,
14456
- Widget as o,
14457
- createPageBuilderViewer as p,
14458
- createPartComponent as q,
14459
- createPartComponents as r,
14460
- providePageBuilder as s,
14461
- providePageBuilderViewer as t,
14527
+ _sfc_main$4$1 as j,
14528
+ _sfc_main$3$1 as k,
14529
+ _sfc_main$6$1 as l,
14530
+ _sfc_main$5$1 as m,
14531
+ RootPart as n,
14532
+ Section as o,
14533
+ Widget as p,
14534
+ createPageBuilderViewer as q,
14535
+ createPartComponent as r,
14536
+ createPartComponents as s,
14537
+ providePageBuilder as t,
14462
14538
  usePageBuilderEditor as u,
14463
- usePageBuilder as v,
14539
+ providePageBuilderViewer as v,
14464
14540
  widgetPartDefinitions as w,
14465
- usePageBuilderViewer as x
14541
+ usePageBuilder as x,
14542
+ usePageBuilderViewer as y
14466
14543
  };
@@ -1,4 +1,4 @@
1
- import { B, b, M, c, d, e, _, a, f, g, h, i, j, k, l, R, m, S, n, W, o, p, q, r, s, t, v, x } from "./index-BcD7YsdY.js";
1
+ import { B, b, M, c, d, e, _, a, f, g, h, i, j, k, l, m, R, n, S, o, W, p, q, r, s, t, v, x, y } from "./index-rPBXWjSz.js";
2
2
  export {
3
3
  B as BLOCK_TYPE,
4
4
  b as Block,
@@ -13,19 +13,20 @@ export {
13
13
  h as Part,
14
14
  i as PbCustomWidget,
15
15
  j as PbHtmlWidget,
16
- k as PbImageWidget,
17
- l as PbTextWidget,
16
+ k as PbIframeWidget,
17
+ l as PbImageWidget,
18
+ m as PbTextWidget,
18
19
  R as ROOT_TYPE,
19
- m as RootPart,
20
+ n as RootPart,
20
21
  S as SECTION_TYPE,
21
- n as Section,
22
+ o as Section,
22
23
  W as WIDGET_TYPE,
23
- o as Widget,
24
- p as createPageBuilderViewer,
25
- q as createPartComponent,
26
- r as createPartComponents,
27
- s as providePageBuilder,
28
- t as providePageBuilderViewer,
29
- v as usePageBuilder,
30
- x as usePageBuilderViewer
24
+ p as Widget,
25
+ q as createPageBuilderViewer,
26
+ r as createPartComponent,
27
+ s as createPartComponents,
28
+ t as providePageBuilder,
29
+ v as providePageBuilderViewer,
30
+ x as usePageBuilder,
31
+ y as usePageBuilderViewer
31
32
  };