@g1cloud/page-builder-editor 1.0.0-alpha.10 → 1.0.0-alpha.12

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.
@@ -7060,7 +7060,7 @@ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
7060
7060
  if (typeof props.part.properties.text === "string") {
7061
7061
  return true;
7062
7062
  } else {
7063
- return !props.part.properties.text[pageBuilder.language.value];
7063
+ return !props.part.properties.text[pageBuilder.locale.value];
7064
7064
  }
7065
7065
  } else {
7066
7066
  return true;
@@ -7076,7 +7076,7 @@ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
7076
7076
  return "Empty text";
7077
7077
  }
7078
7078
  } else {
7079
- const t = props.part.properties.text[pageBuilder.language.value];
7079
+ const t = props.part.properties.text[pageBuilder.locale.value];
7080
7080
  if (props.viewMode) {
7081
7081
  return t || "";
7082
7082
  } else {
@@ -7125,11 +7125,14 @@ const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
7125
7125
  return;
7126
7126
  if (typeof html2 !== "object")
7127
7127
  return;
7128
- const language = pageBuilder.language.value;
7128
+ const language = pageBuilder.locale.value;
7129
7129
  let _html = html2[language];
7130
7130
  if (!_html && html2.tags) {
7131
7131
  _html = html2;
7132
7132
  }
7133
+ if (!_html) {
7134
+ return "";
7135
+ }
7133
7136
  return `${_html.tags}
7134
7137
  <style>
7135
7138
  ${_html.style}
@@ -7194,7 +7197,7 @@ const PageBuilderViewerEvent = {
7194
7197
  }
7195
7198
  };
7196
7199
  const _hoisted_1$1$1 = { class: "pb-product-list-widget" };
7197
- const _hoisted_2$l = { class: "product" };
7200
+ const _hoisted_2$k = { class: "product" };
7198
7201
  const _hoisted_3$h = { class: "image" };
7199
7202
  const _hoisted_4$e = ["src"];
7200
7203
  const _hoisted_5$7 = { class: "name" };
@@ -7241,7 +7244,7 @@ const _sfc_main$2$1 = /* @__PURE__ */ defineComponent({
7241
7244
  key: index,
7242
7245
  class: "product-wrapper"
7243
7246
  }, [
7244
- createElementVNode("div", _hoisted_2$l, [
7247
+ createElementVNode("div", _hoisted_2$k, [
7245
7248
  products.value[index - 1] ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
7246
7249
  createElementVNode("div", _hoisted_3$h, [
7247
7250
  createElementVNode("img", {
@@ -7312,14 +7315,14 @@ class PageBuilderViewerImpl {
7312
7315
  constructor() {
7313
7316
  __publicField2(this, "instanceId");
7314
7317
  __publicField2(this, "model");
7315
- __publicField2(this, "language", ref("en"));
7318
+ __publicField2(this, "locale", ref("en"));
7316
7319
  this.model = new Model$1();
7317
7320
  }
7318
- getLanguage() {
7319
- return this.language.value;
7321
+ getLocale() {
7322
+ return this.locale.value;
7320
7323
  }
7321
- setLanguage(language) {
7322
- this.language.value = language || "en";
7324
+ setLocale(locale) {
7325
+ this.locale.value = locale || "en";
7323
7326
  }
7324
7327
  render(pageContent) {
7325
7328
  const rootPart = new RootPart();
@@ -7429,7 +7432,7 @@ const _sfc_main$1$1 = /* @__PURE__ */ defineComponent({
7429
7432
  };
7430
7433
  }
7431
7434
  });
7432
- const _hoisted_1$u = { class: "pb-viewer" };
7435
+ const _hoisted_1$t = { class: "pb-viewer" };
7433
7436
  const _sfc_main$q = /* @__PURE__ */ defineComponent({
7434
7437
  __name: "PageBuilderViewer",
7435
7438
  props: {
@@ -7442,7 +7445,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
7442
7445
  const props = __props;
7443
7446
  const pageBuilderViewer = createPageBuilderViewer();
7444
7447
  pageBuilderViewer.instanceId = props.instanceId;
7445
- pageBuilderViewer.setLanguage(props.language);
7448
+ pageBuilderViewer.setLocale(props.language);
7446
7449
  providePageBuilderViewer(pageBuilderViewer);
7447
7450
  providePageBuilder(pageBuilderViewer);
7448
7451
  const page = computed(() => pageBuilderViewer.model.rootPart.value.children && pageBuilderViewer.model.rootPart.value.children[props.isMobilePage ? 0 : 1]);
@@ -7460,7 +7463,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
7460
7463
  }
7461
7464
  );
7462
7465
  return (_ctx, _cache) => {
7463
- return openBlock(), createElementBlock("div", _hoisted_1$u, [
7466
+ return openBlock(), createElementBlock("div", _hoisted_1$t, [
7464
7467
  page.value ? (openBlock(), createBlock$1(_sfc_main$1$1, {
7465
7468
  key: 0,
7466
7469
  "is-mobile-page": _ctx.isMobilePage,
@@ -8063,12 +8066,12 @@ const defaultPartPropertyEditors = () => {
8063
8066
  return {
8064
8067
  "readonly-text": () => defineAsyncComponent(() => import("./PbPropertyEditorReadonlyText-Dgp_AVOD.js")),
8065
8068
  "text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-BWOKvwD9.js")),
8066
- "multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-Bv4luXWg.js")),
8069
+ "multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-BMF9jHpy.js")),
8067
8070
  "select": () => defineAsyncComponent(() => import("./PbPropertyEditorSelect-CWedbXJI.js")),
8068
- "color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-B9I99uQK.js")),
8069
- "image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-DLwg5dJz.js")),
8070
- "html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-BVT2SwoK.js")),
8071
- "product": () => defineAsyncComponent(() => import("./PbPropertyEditorProduct-6STGd-Zs.js"))
8071
+ "color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-DXkzD-V2.js")),
8072
+ "image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-5RZoQbLF.js")),
8073
+ "html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-CbEOlq-s.js")),
8074
+ "product": () => defineAsyncComponent(() => import("./PbPropertyEditorProduct-Dt5vraZc.js"))
8072
8075
  };
8073
8076
  };
8074
8077
  const getPropertyValueOfParts = (parts, propertyName) => {
@@ -8299,15 +8302,15 @@ const _export_sfc = (sfc, props) => {
8299
8302
  return target;
8300
8303
  };
8301
8304
  const _sfc_main$p = {};
8302
- const _hoisted_1$t = { class: "pb-add-widget-button" };
8303
- const _hoisted_2$k = /* @__PURE__ */ createElementVNode("span", { class: "icon material-icons-outlined" }, "add_box", -1);
8305
+ const _hoisted_1$s = { class: "pb-add-widget-button" };
8306
+ const _hoisted_2$j = /* @__PURE__ */ createElementVNode("span", { class: "icon material-icons-outlined" }, "add_box", -1);
8304
8307
  const _hoisted_3$g = /* @__PURE__ */ createElementVNode("span", { class: "text" }, "Add Widget", -1);
8305
8308
  const _hoisted_4$d = [
8306
- _hoisted_2$k,
8309
+ _hoisted_2$j,
8307
8310
  _hoisted_3$g
8308
8311
  ];
8309
8312
  function _sfc_render$1(_ctx, _cache) {
8310
- return openBlock(), createElementBlock("div", _hoisted_1$t, [
8313
+ return openBlock(), createElementBlock("div", _hoisted_1$s, [
8311
8314
  createElementVNode("button", {
8312
8315
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("add-widget", $event))
8313
8316
  }, _hoisted_4$d)
@@ -8344,8 +8347,8 @@ const useMouseTracker = () => {
8344
8347
  throw Error(MOUSE_TRACKER_NOT_FOUND);
8345
8348
  return mouseTracker;
8346
8349
  };
8347
- const _hoisted_1$s = ["data-model-id", "draggable"];
8348
- const _hoisted_2$j = {
8350
+ const _hoisted_1$r = ["data-model-id", "draggable"];
8351
+ const _hoisted_2$i = {
8349
8352
  key: 1,
8350
8353
  class: "children"
8351
8354
  };
@@ -8795,7 +8798,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
8795
8798
  key: 0,
8796
8799
  part: _ctx.part
8797
8800
  }, null, 8, ["part"])) : createCommentVNode("", true),
8798
- childComponents.value && childComponents.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$j, [
8801
+ childComponents.value && childComponents.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$i, [
8799
8802
  (openBlock(true), createElementBlock(Fragment, null, renderList(childComponents.value, (child) => {
8800
8803
  return openBlock(), createBlock$1(resolveDynamicComponent(child.component), {
8801
8804
  key: child.part.partId,
@@ -8813,13 +8816,13 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
8813
8816
  class: "resize-handle",
8814
8817
  onMousedown: _resize_mousedown
8815
8818
  }, null, 32)) : createCommentVNode("", true)
8816
- ], 16, _hoisted_1$s)), [
8819
+ ], 16, _hoisted_1$r)), [
8817
8820
  [unref(vPartHandler), { pageBuilder: unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
8818
8821
  ]);
8819
8822
  };
8820
8823
  }
8821
8824
  });
8822
- const _hoisted_1$r = ["data-model-id"];
8825
+ const _hoisted_1$q = ["data-model-id"];
8823
8826
  const _sfc_main$n = /* @__PURE__ */ defineComponent({
8824
8827
  __name: "PbBlock",
8825
8828
  props: {
@@ -9015,14 +9018,14 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
9015
9018
  part: child
9016
9019
  }, null, 8, ["part"]);
9017
9020
  }), 128))
9018
- ], 16, _hoisted_1$r)), [
9021
+ ], 16, _hoisted_1$q)), [
9019
9022
  [unref(vPartHandler), { pageBuilder: unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
9020
9023
  ]);
9021
9024
  };
9022
9025
  }
9023
9026
  });
9024
- const _hoisted_1$q = { class: "pb-block" };
9025
- const _hoisted_2$i = /* @__PURE__ */ createElementVNode("div", {
9027
+ const _hoisted_1$p = { class: "pb-block" };
9028
+ const _hoisted_2$h = /* @__PURE__ */ createElementVNode("div", {
9026
9029
  class: "pb-widget",
9027
9030
  style: { "margin": "0 auto" }
9028
9031
  }, [
@@ -9031,7 +9034,7 @@ const _hoisted_2$i = /* @__PURE__ */ createElementVNode("div", {
9031
9034
  ])
9032
9035
  ], -1);
9033
9036
  const _hoisted_3$f = [
9034
- _hoisted_2$i
9037
+ _hoisted_2$h
9035
9038
  ];
9036
9039
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
9037
9040
  __name: "PbLoginDepart",
@@ -9040,11 +9043,11 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
9040
9043
  },
9041
9044
  setup(__props) {
9042
9045
  return (_ctx, _cache) => {
9043
- return openBlock(), createElementBlock("div", _hoisted_1$q, _hoisted_3$f);
9046
+ return openBlock(), createElementBlock("div", _hoisted_1$p, _hoisted_3$f);
9044
9047
  };
9045
9048
  }
9046
9049
  });
9047
- const _hoisted_1$p = ["data-model-id"];
9050
+ const _hoisted_1$o = ["data-model-id"];
9048
9051
  const _sfc_main$l = /* @__PURE__ */ defineComponent({
9049
9052
  __name: "PbSection",
9050
9053
  props: {
@@ -9171,14 +9174,14 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
9171
9174
  onAddWidget: addWidget
9172
9175
  }))
9173
9176
  ], 64))
9174
- ], 16, _hoisted_1$p)), [
9177
+ ], 16, _hoisted_1$o)), [
9175
9178
  [unref(vPartHandler), { pageBuilder: unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
9176
9179
  ]);
9177
9180
  };
9178
9181
  }
9179
9182
  });
9180
- const _hoisted_1$o = { class: "group-editor group-editor-position" };
9181
- const _hoisted_2$h = { class: "flex-align-center" };
9183
+ const _hoisted_1$n = { class: "group-editor group-editor-position" };
9184
+ const _hoisted_2$g = { class: "flex-align-center" };
9182
9185
  const _hoisted_3$e = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
9183
9186
  /* @__PURE__ */ createElementVNode("label", { textContent: "Position" })
9184
9187
  ], -1);
@@ -9217,8 +9220,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
9217
9220
  const updateTop = (value) => updatePropertyValue({ top: value });
9218
9221
  const updateBottom = (value) => updatePropertyValue({ bottom: value });
9219
9222
  return (_ctx, _cache) => {
9220
- return openBlock(), createElementBlock("div", _hoisted_1$o, [
9221
- createElementVNode("div", _hoisted_2$h, [
9223
+ return openBlock(), createElementBlock("div", _hoisted_1$n, [
9224
+ createElementVNode("div", _hoisted_2$g, [
9222
9225
  _hoisted_3$e,
9223
9226
  createElementVNode("div", _hoisted_4$c, [
9224
9227
  createElementVNode("div", _hoisted_5$6, [
@@ -9264,8 +9267,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
9264
9267
  };
9265
9268
  }
9266
9269
  });
9267
- const _hoisted_1$n = { class: "group-editor group-editor-size" };
9268
- const _hoisted_2$g = { class: "flex-align-center" };
9270
+ const _hoisted_1$m = { class: "group-editor group-editor-size" };
9271
+ const _hoisted_2$f = { class: "flex-align-center" };
9269
9272
  const _hoisted_3$d = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
9270
9273
  /* @__PURE__ */ createElementVNode("label", { textContent: "Size" })
9271
9274
  ], -1);
@@ -9290,8 +9293,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
9290
9293
  const updateWidth = (value) => updatePropertyValue({ width: value });
9291
9294
  const updateHeight = (value) => updatePropertyValue({ height: value });
9292
9295
  return (_ctx, _cache) => {
9293
- return openBlock(), createElementBlock("div", _hoisted_1$n, [
9294
- createElementVNode("div", _hoisted_2$g, [
9296
+ return openBlock(), createElementBlock("div", _hoisted_1$m, [
9297
+ createElementVNode("div", _hoisted_2$f, [
9295
9298
  _hoisted_3$d,
9296
9299
  createElementVNode("div", _hoisted_4$b, [
9297
9300
  createVNode(unref(BSTextInput), {
@@ -9469,8 +9472,8 @@ var script$4 = {
9469
9472
  }
9470
9473
  }
9471
9474
  };
9472
- const _hoisted_1$m = { class: "vc-alpha" };
9473
- const _hoisted_2$f = { class: "vc-alpha-checkboard-wrap" };
9475
+ const _hoisted_1$l = { class: "vc-alpha" };
9476
+ const _hoisted_2$e = { class: "vc-alpha-checkboard-wrap" };
9474
9477
  const _hoisted_3$c = /* @__PURE__ */ createElementVNode(
9475
9478
  "div",
9476
9479
  { class: "vc-alpha-picker" },
@@ -9483,8 +9486,8 @@ const _hoisted_4$a = [
9483
9486
  ];
9484
9487
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
9485
9488
  const _component_Checkboard = resolveComponent("Checkboard");
9486
- return openBlock(), createElementBlock("div", _hoisted_1$m, [
9487
- createElementVNode("div", _hoisted_2$f, [
9489
+ return openBlock(), createElementBlock("div", _hoisted_1$l, [
9490
+ createElementVNode("div", _hoisted_2$e, [
9488
9491
  createVNode(_component_Checkboard)
9489
9492
  ]),
9490
9493
  createElementVNode(
@@ -10587,12 +10590,12 @@ var script$3 = {
10587
10590
  // }
10588
10591
  }
10589
10592
  };
10590
- const _hoisted_1$l = { class: "vc-editable-input" };
10591
- const _hoisted_2$e = ["aria-labelledby"];
10593
+ const _hoisted_1$k = { class: "vc-editable-input" };
10594
+ const _hoisted_2$d = ["aria-labelledby"];
10592
10595
  const _hoisted_3$b = ["id", "for"];
10593
10596
  const _hoisted_4$9 = { class: "vc-input__desc" };
10594
10597
  function render$3(_ctx, _cache, $props, $setup, $data, $options) {
10595
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
10598
+ return openBlock(), createElementBlock("div", _hoisted_1$k, [
10596
10599
  withDirectives(createElementVNode("input", {
10597
10600
  ref: "input",
10598
10601
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.val = $event),
@@ -10600,7 +10603,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
10600
10603
  class: "vc-input__input",
10601
10604
  onKeydown: _cache[1] || (_cache[1] = (...args) => $options.handleKeyDown && $options.handleKeyDown(...args)),
10602
10605
  onInput: _cache[2] || (_cache[2] = (...args) => $options.update && $options.update(...args))
10603
- }, null, 40, _hoisted_2$e), [
10606
+ }, null, 40, _hoisted_2$d), [
10604
10607
  [vModelText, $options.val]
10605
10608
  ]),
10606
10609
  createElementVNode("span", {
@@ -10687,14 +10690,14 @@ var script$2 = {
10687
10690
  }
10688
10691
  }
10689
10692
  };
10690
- const _hoisted_1$k = /* @__PURE__ */ createElementVNode(
10693
+ const _hoisted_1$j = /* @__PURE__ */ createElementVNode(
10691
10694
  "div",
10692
10695
  { class: "vc-saturation--white" },
10693
10696
  null,
10694
10697
  -1
10695
10698
  /* HOISTED */
10696
10699
  );
10697
- const _hoisted_2$d = /* @__PURE__ */ createElementVNode(
10700
+ const _hoisted_2$c = /* @__PURE__ */ createElementVNode(
10698
10701
  "div",
10699
10702
  { class: "vc-saturation--black" },
10700
10703
  null,
@@ -10723,8 +10726,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
10723
10726
  onTouchstart: _cache[2] || (_cache[2] = (...args) => $options.handleChange && $options.handleChange(...args))
10724
10727
  },
10725
10728
  [
10726
- _hoisted_1$k,
10727
- _hoisted_2$d,
10729
+ _hoisted_1$j,
10730
+ _hoisted_2$c,
10728
10731
  createElementVNode(
10729
10732
  "div",
10730
10733
  {
@@ -10872,8 +10875,8 @@ var script$1 = {
10872
10875
  }
10873
10876
  }
10874
10877
  };
10875
- const _hoisted_1$j = ["aria-valuenow"];
10876
- const _hoisted_2$c = /* @__PURE__ */ createElementVNode(
10878
+ const _hoisted_1$i = ["aria-valuenow"];
10879
+ const _hoisted_2$b = /* @__PURE__ */ createElementVNode(
10877
10880
  "div",
10878
10881
  { class: "vc-hue-picker" },
10879
10882
  null,
@@ -10881,7 +10884,7 @@ const _hoisted_2$c = /* @__PURE__ */ createElementVNode(
10881
10884
  /* HOISTED */
10882
10885
  );
10883
10886
  const _hoisted_3$9 = [
10884
- _hoisted_2$c
10887
+ _hoisted_2$b
10885
10888
  ];
10886
10889
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
10887
10890
  return openBlock(), createElementBlock(
@@ -10912,7 +10915,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
10912
10915
  4
10913
10916
  /* STYLE */
10914
10917
  )
10915
- ], 40, _hoisted_1$j)
10918
+ ], 40, _hoisted_1$i)
10916
10919
  ],
10917
10920
  2
10918
10921
  /* CLASS */
@@ -11008,8 +11011,8 @@ var script = {
11008
11011
  }
11009
11012
  }
11010
11013
  };
11011
- const _hoisted_1$i = { class: "vc-sketch-saturation-wrap" };
11012
- const _hoisted_2$b = { class: "vc-sketch-controls" };
11014
+ const _hoisted_1$h = { class: "vc-sketch-saturation-wrap" };
11015
+ const _hoisted_2$a = { class: "vc-sketch-controls" };
11013
11016
  const _hoisted_3$8 = { class: "vc-sketch-sliders" };
11014
11017
  const _hoisted_4$7 = { class: "vc-sketch-hue-wrap" };
11015
11018
  const _hoisted_5$5 = {
@@ -11051,13 +11054,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
11051
11054
  class: normalizeClass(["vc-sketch", [$props.disableAlpha ? "vc-sketch__disable-alpha" : ""]])
11052
11055
  },
11053
11056
  [
11054
- createElementVNode("div", _hoisted_1$i, [
11057
+ createElementVNode("div", _hoisted_1$h, [
11055
11058
  createVNode(_component_Saturation, {
11056
11059
  value: _ctx.colors,
11057
11060
  onChange: $options.childChange
11058
11061
  }, null, 8, ["value", "onChange"])
11059
11062
  ]),
11060
- createElementVNode("div", _hoisted_2$b, [
11063
+ createElementVNode("div", _hoisted_2$a, [
11061
11064
  createElementVNode("div", _hoisted_3$8, [
11062
11065
  createElementVNode("div", _hoisted_4$7, [
11063
11066
  createVNode(_component_Hue, {
@@ -11204,7 +11207,7 @@ const _sfc_main$i = defineComponent({
11204
11207
  () => setTimeout(() => {
11205
11208
  if (appliedColor.value)
11206
11209
  emit("change-color", appliedColor.value);
11207
- }),
11210
+ }, 100),
11208
11211
  { deep: true }
11209
11212
  );
11210
11213
  watch(
@@ -11227,10 +11230,10 @@ const _sfc_main$i = defineComponent({
11227
11230
  };
11228
11231
  }
11229
11232
  });
11230
- const _hoisted_1$h = { class: "buttons" };
11231
- const _hoisted_2$a = /* @__PURE__ */ createElementVNode("i", { class: "material-icons-outlined" }, "delete", -1);
11233
+ const _hoisted_1$g = { class: "buttons" };
11234
+ const _hoisted_2$9 = /* @__PURE__ */ createElementVNode("i", { class: "material-icons-outlined" }, "delete", -1);
11232
11235
  const _hoisted_3$7 = [
11233
- _hoisted_2$a
11236
+ _hoisted_2$9
11234
11237
  ];
11235
11238
  const _hoisted_4$6 = { class: "sketch-wrap" };
11236
11239
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -11241,7 +11244,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
11241
11244
  onKeydown: _cache[3] || (_cache[3] = withModifiers(() => {
11242
11245
  }, ["stop"]))
11243
11246
  }, [
11244
- createElementVNode("div", _hoisted_1$h, [
11247
+ createElementVNode("div", _hoisted_1$g, [
11245
11248
  renderSlot(_ctx.$slots, "button", normalizeProps(guardReactiveProps({ toggle: _ctx.toggle, color: _ctx.color })), () => [
11246
11249
  createElementVNode("button", {
11247
11250
  class: normalizeClass([{ none: !_ctx.color }, "pb-button picker-button"]),
@@ -11268,8 +11271,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
11268
11271
  ]);
11269
11272
  }
11270
11273
  const PbColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render]]);
11271
- const _hoisted_1$g = { class: "group-editor group-editor-background" };
11272
- const _hoisted_2$9 = { class: "flex-align-center" };
11274
+ const _hoisted_1$f = { class: "group-editor group-editor-background" };
11275
+ const _hoisted_2$8 = { class: "flex-align-center" };
11273
11276
  const _hoisted_3$6 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
11274
11277
  /* @__PURE__ */ createElementVNode("label", { textContent: "Background" })
11275
11278
  ], -1);
@@ -11305,8 +11308,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
11305
11308
  });
11306
11309
  };
11307
11310
  return (_ctx, _cache) => {
11308
- return openBlock(), createElementBlock("div", _hoisted_1$g, [
11309
- createElementVNode("div", _hoisted_2$9, [
11311
+ return openBlock(), createElementBlock("div", _hoisted_1$f, [
11312
+ createElementVNode("div", _hoisted_2$8, [
11310
11313
  _hoisted_3$6,
11311
11314
  createElementVNode("div", _hoisted_4$5, [
11312
11315
  createElementVNode("div", _hoisted_5$4, [
@@ -11338,8 +11341,8 @@ const TopLeftCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W
11338
11341
  const TopRightCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23000000'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%3e%3cpath%20fill='none'%20d='M0%200H24V24H0z'/%3e%3cpath%20d='M21%2019v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2H7v-2h2zm-4%200v2H3v-2h2zm16-4v2h-2v-2h2zM5%2015v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687%200%204.882%202.124%204.995%204.783L21%208v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16%205h-5V3h5zM5%207v2H3V7h2zm0-4v2H3V3h2zm4%200v2H7V3h2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
11339
11342
  const BottomLeftCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23000000'%20transform='rotate(180)'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%3e%3cpath%20fill='none'%20d='M0%200H24V24H0z'/%3e%3cpath%20d='M21%2019v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2H7v-2h2zm-4%200v2H3v-2h2zm16-4v2h-2v-2h2zM5%2015v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687%200%204.882%202.124%204.995%204.783L21%208v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16%205h-5V3h5zM5%207v2H3V7h2zm0-4v2H3V3h2zm4%200v2H7V3h2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
11340
11343
  const BottomRightCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23000000'%20transform='rotate(90)'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%3e%3cpath%20fill='none'%20d='M0%200H24V24H0z'/%3e%3cpath%20d='M21%2019v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2H7v-2h2zm-4%200v2H3v-2h2zm16-4v2h-2v-2h2zM5%2015v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687%200%204.882%202.124%204.995%204.783L21%208v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16%205h-5V3h5zM5%207v2H3V7h2zm0-4v2H3V3h2zm4%200v2H7V3h2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
11341
- const _hoisted_1$f = { class: "group-editor group-editor-border" };
11342
- const _hoisted_2$8 = { class: "flex-align-center" };
11344
+ const _hoisted_1$e = { class: "group-editor group-editor-border" };
11345
+ const _hoisted_2$7 = { class: "flex-align-center" };
11343
11346
  const _hoisted_3$5 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
11344
11347
  /* @__PURE__ */ createElementVNode("label", { textContent: "Border" })
11345
11348
  ], -1);
@@ -11409,8 +11412,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
11409
11412
  const updateBorderBottomLeftRadius = (value) => updatePropertyValue({ borderBottomLeftRadius: value });
11410
11413
  const updateBorderBottomRightRadius = (value) => updatePropertyValue({ borderBottomRightRadius: value });
11411
11414
  return (_ctx, _cache) => {
11412
- return openBlock(), createElementBlock("div", _hoisted_1$f, [
11413
- createElementVNode("div", _hoisted_2$8, [
11415
+ return openBlock(), createElementBlock("div", _hoisted_1$e, [
11416
+ createElementVNode("div", _hoisted_2$7, [
11414
11417
  _hoisted_3$5,
11415
11418
  createElementVNode("div", _hoisted_4$4, [
11416
11419
  _hoisted_5$3,
@@ -11518,8 +11521,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
11518
11521
  };
11519
11522
  }
11520
11523
  });
11521
- const _hoisted_1$e = { class: "group-editor group-editor-margin" };
11522
- const _hoisted_2$7 = { class: "flex-align-center" };
11524
+ const _hoisted_1$d = { class: "group-editor group-editor-margin" };
11525
+ const _hoisted_2$6 = { class: "flex-align-center" };
11523
11526
  const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
11524
11527
  /* @__PURE__ */ createElementVNode("label", { textContent: "Margin" })
11525
11528
  ], -1);
@@ -11558,8 +11561,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
11558
11561
  const updateTop = (value) => updatePropertyValue({ marginTop: value });
11559
11562
  const updateBottom = (value) => updatePropertyValue({ marginBottom: value });
11560
11563
  return (_ctx, _cache) => {
11561
- return openBlock(), createElementBlock("div", _hoisted_1$e, [
11562
- createElementVNode("div", _hoisted_2$7, [
11564
+ return openBlock(), createElementBlock("div", _hoisted_1$d, [
11565
+ createElementVNode("div", _hoisted_2$6, [
11563
11566
  _hoisted_3$4,
11564
11567
  createElementVNode("div", _hoisted_4$3, [
11565
11568
  createElementVNode("div", _hoisted_5$2, [
@@ -11605,8 +11608,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
11605
11608
  };
11606
11609
  }
11607
11610
  });
11608
- const _hoisted_1$d = { class: "group-editor group-editor-padding" };
11609
- const _hoisted_2$6 = { class: "flex-align-center" };
11611
+ const _hoisted_1$c = { class: "group-editor group-editor-padding" };
11612
+ const _hoisted_2$5 = { class: "flex-align-center" };
11610
11613
  const _hoisted_3$3 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
11611
11614
  /* @__PURE__ */ createElementVNode("label", { textContent: "Padding" })
11612
11615
  ], -1);
@@ -11645,8 +11648,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
11645
11648
  const updateTop = (value) => updatePropertyValue({ paddingTop: value });
11646
11649
  const updateBottom = (value) => updatePropertyValue({ paddingBottom: value });
11647
11650
  return (_ctx, _cache) => {
11648
- return openBlock(), createElementBlock("div", _hoisted_1$d, [
11649
- createElementVNode("div", _hoisted_2$6, [
11651
+ return openBlock(), createElementBlock("div", _hoisted_1$c, [
11652
+ createElementVNode("div", _hoisted_2$5, [
11650
11653
  _hoisted_3$3,
11651
11654
  createElementVNode("div", _hoisted_4$2, [
11652
11655
  createElementVNode("div", _hoisted_5$1, [
@@ -12043,7 +12046,8 @@ const widgets = [
12043
12046
  caption: "Text",
12044
12047
  propertyType: "multiline-text",
12045
12048
  params: "",
12046
- localized: true
12049
+ localized: true,
12050
+ multiLang: true
12047
12051
  },
12048
12052
  {
12049
12053
  propertyName: "fontSize",
@@ -12111,7 +12115,8 @@ const widgets = [
12111
12115
  caption: "HTML",
12112
12116
  propertyType: "html",
12113
12117
  params: "",
12114
- localized: true
12118
+ localized: true,
12119
+ multiLang: true
12115
12120
  }
12116
12121
  ]
12117
12122
  },
@@ -13331,11 +13336,11 @@ class KeyHandlersImpl {
13331
13336
  }
13332
13337
  }
13333
13338
  }
13334
- addDocumentKeyEventListener(document2) {
13335
- document2.addEventListener("keydown", this.handleKeyDownEvent.bind(this));
13339
+ addDocumentKeyEventListener(element) {
13340
+ element.addEventListener("keydown", this.handleKeyDownEvent.bind(this));
13336
13341
  }
13337
- removeDocumentKeyEventListener(document2) {
13338
- document2.removeEventListener("keydown", this.handleKeyDownEvent.bind(this));
13342
+ removeDocumentKeyEventListener(element) {
13343
+ element.removeEventListener("keydown", this.handleKeyDownEvent.bind(this));
13339
13344
  }
13340
13345
  }
13341
13346
  const PAGE_BUILDER_EDITOR_KEY = "PageBuilderEditor";
@@ -13364,18 +13369,25 @@ class PageBuilderEditorImpl {
13364
13369
  __publicField(this, "title");
13365
13370
  __publicField(this, "editMode");
13366
13371
  __publicField(this, "scale", ref(1));
13367
- __publicField(this, "language", ref("en"));
13372
+ __publicField(this, "locale", ref("en"));
13373
+ __publicField(this, "locales", ref(["en"]));
13368
13374
  this.model = new Model2();
13369
13375
  this.context = new PageBuilderContextImpl(this);
13370
13376
  this.editMode = "free";
13371
13377
  this.scale.value = 1;
13372
13378
  this.initPlugins();
13373
13379
  }
13374
- getLanguage() {
13375
- return this.language.value;
13380
+ getLocale() {
13381
+ return this.locale.value;
13382
+ }
13383
+ setLocale(locale) {
13384
+ this.locale.value = locale || "en";
13376
13385
  }
13377
- setLanguage(language) {
13378
- this.language.value = language || "en";
13386
+ getLocales() {
13387
+ return this.locales.value;
13388
+ }
13389
+ setLocales(locales) {
13390
+ this.locales.value = locales || ["en"];
13379
13391
  }
13380
13392
  registerPlugin(plugin) {
13381
13393
  if (plugin.partDefinitions)
@@ -13395,7 +13407,7 @@ class PageBuilderEditorImpl {
13395
13407
  }
13396
13408
  initData(content) {
13397
13409
  this.model.rootPart.pageBuilderId = this.instanceId;
13398
- this.model.rootPart.language = this.language.value;
13410
+ this.model.rootPart.language = this.locale.value;
13399
13411
  let parts;
13400
13412
  if (content) {
13401
13413
  for (const p of content) {
@@ -13450,9 +13462,9 @@ class PageBuilderEditorImpl {
13450
13462
  });
13451
13463
  }
13452
13464
  }
13453
- const _hoisted_1$c = /* @__PURE__ */ createElementVNode("i", { class: "material-icons-outlined" }, "add_circle_outline", -1);
13454
- const _hoisted_2$5 = [
13455
- _hoisted_1$c
13465
+ const _hoisted_1$b = /* @__PURE__ */ createElementVNode("i", { class: "material-icons-outlined" }, "add_circle_outline", -1);
13466
+ const _hoisted_2$4 = [
13467
+ _hoisted_1$b
13456
13468
  ];
13457
13469
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
13458
13470
  __name: "PbPage",
@@ -13499,12 +13511,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
13499
13511
  var _a2, _b;
13500
13512
  return insertSection(((_b = (_a2 = _ctx.page) == null ? void 0 : _a2.children) == null ? void 0 : _b.length) || 0);
13501
13513
  })
13502
- }, _hoisted_2$5)
13514
+ }, _hoisted_2$4)
13503
13515
  ], 4);
13504
13516
  };
13505
13517
  }
13506
13518
  });
13507
- const _hoisted_1$b = /* @__PURE__ */ createElementVNode("div", { style: { "width": "20px" } }, null, -1);
13519
+ const _hoisted_1$a = /* @__PURE__ */ createElementVNode("div", { style: { "width": "20px" } }, null, -1);
13508
13520
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
13509
13521
  __name: "PbCanvas",
13510
13522
  setup(__props) {
@@ -13557,7 +13569,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
13557
13569
  page: pageS.value,
13558
13570
  width: 420
13559
13571
  }, null, 8, ["page"]),
13560
- _hoisted_1$b,
13572
+ _hoisted_1$a,
13561
13573
  createVNode(_sfc_main$d, {
13562
13574
  "is-mobile-page": false,
13563
13575
  page: pageL.value,
@@ -13569,7 +13581,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
13569
13581
  }
13570
13582
  });
13571
13583
  const canvasStyle = '.pb-page {\n margin: 0 auto;\n margin-top: 20px;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-page .pb-page-content.selected {\n outline: 2px solid #4998f8;\n outline-offset: 5px;\n}\n.pb-page * {\n box-sizing: border-box;\n}\n.pb-add-widget-button {\n width: 100%;\n height: 100%;\n min-height: 200px;\n position: relative;\n}\n.pb-add-widget-button button {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: 8px;\n background: none;\n border: none;\n cursor: pointer;\n}\n.pb-add-widget-button button:hover {\n background-color: #eeeeee;\n}\n.pb-add-widget-button .icon {\n font-size: 1rem;\n vertical-align: middle;\n}\n.pb-add-widget-button .text {\n font-size: 1rem;\n vertical-align: middle;\n margin-left: 0.4rem;\n}\n.pb-section {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n outline: 1px dashed #ccc;\n background-color: #fff;\n}\n.pb-section:hover:not(:has(.pb-block:hover)) {\n background-color: #f0f0f0;\n}\n.pb-section.selected {\n outline: 1px solid #e67e22;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-section.pb-section-static {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n.pb-section.pb-section-static:after {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.2);\n}\n.pb-section-static .pb-widget {\n outline: none;\n}\n.pb-block {\n display: flex;\n min-width: 1px;\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n outline: 1px dashed #ccc;\n}\n.pb-block:hover:not(:has(.pb-widget:hover)) {\n background-color: #f0f0f0;\n}\n.pb-block.selected {\n outline: 1px solid #8e44ad;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget {\n position: relative;\n outline: 1px dashed #ccc;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-widget.selected {\n outline: 2px solid #27ae60;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-widget .pan-handle {\n position: absolute;\n left: -6px;\n top: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: move;\n}\n.pb-widget .resize-handle {\n position: absolute;\n right: -6px;\n bottom: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: nwse-resize;\n}\n.pb-widget {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-text-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-text-widget .text {\n color: #333;\n}\n.pb-text-widget.empty .text {\n color: #999;\n}\n.pb-image-widget {\n width: 100%;\n}\n.pb-image-widget .image {\n width: 100%;\n}\n.pb-image-widget .empty {\n height: 100px;\n background-color: #eee;\n text-align: center;\n}\n.pb-image-widget .empty span {\n font-size: 40px;\n color: #999;\n line-height: 100px;\n vertical-align: middle;\n}\n.pb-html-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-html-widget.empty {\n padding: 4px 0;\n font-size: 18px;\n color: #999;\n}\n.pb-product-list-widget {\n width: 100%;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n}\n.pb-product-list-widget .product-wrapper {\n width: 25%;\n}\n.pb-product-list-widget .product-wrapper .product {\n width: 95%;\n margin: 0 auto;\n padding-top: 8px;\n padding-bottom: 8px;\n}\n.pb-product-list-widget .product-wrapper img {\n width: 100%;\n}\n.pb-product-list-widget .product-wrapper .name {\n margin-top: 8px;\n font-size: 14px;\n}\n.pb-product-list-widget .product-wrapper .price {\n margin-top: 8px;\n font-size: 14px;\n font-weight: bold;\n}\n.pb-product-list-widget .product-wrapper .empty {\n height: 200px;\n background-color: #eee;\n text-align: center;\n}\n.pb-product-list-widget .product-wrapper .empty span {\n font-size: 40px;\n color: #999;\n line-height: 200px;\n vertical-align: middle;\n}\n@media (max-width: 768px) {\n .pb-product-list-widget .product-wrapper {\n width: 50%;\n }\n}\n.mobile .pb-product-list-widget .product-wrapper {\n width: 50%;\n}\n.pb-login-widget {\n height: 200px;\n text-align: center;\n}\n.pb-login-widget h3 {\n font-size: 32px;\n font-weight: bold;\n color: #ccc;\n line-height: 200px;\n vertical-align: middle;\n}\n.font-icon {\n font-family: Material Symbols Outlined, monospace;\n font-size: 1rem;\n max-width: 1em;\n}\nhtml, body {\n font-family: Noto Sans, Noto Sans KR, Noto Sans JP, Arial, sans-serif;\n font-size: 12px;\n}\nbody {\n background-color: white;\n height: 100%;\n margin: 0;\n}\n.pb-canvas-wrapper {\n padding: 32px 40px 56px 40px;\n height: 100%;\n background-color: #aaa;\n overflow: auto;\n}\n.pb-canvas-wrapper .pb-canvas {\n display: flex;\n flex-direction: row;\n transform-origin: top left;\n width: fit-content;\n min-width: 40px;\n min-height: 40px;\n margin: 0 auto;\n}\n.pb-position-mark {\n background-color: #ff3333;\n opacity: 0.5;\n border-radius: 2px;\n}\n.pb-add-section-handle {\n position: relative;\n text-align: center;\n cursor: pointer;\n z-index: 5;\n height: 0;\n}\n.pb-add-section-handle.top::before, .pb-add-section-handle.bottom::before, .pb-add-section-handle.middle::before {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n opacity: 0;\n pointer-events: none;\n}\n.pb-add-section-handle.bottom {\n left: 50%;\n bottom: -32px;\n}\n.pb-add-section-handle:hover.top::before, .pb-add-section-handle:hover.bottom::before, .pb-add-section-handle:hover.middle::before,\n.pb-add-section-handle:hover > i {\n opacity: 1;\n}\n.pb-add-section-handle > i {\n vertical-align: middle;\n position: absolute;\n top: 50%;\n left: -20px;\n font-size: 2rem;\n transform: translate(-50%, -50%);\n opacity: 0.2;\n}\n.pb-button {\n background: none;\n border: none;\n cursor: pointer;\n vertical-align: middle;\n}\n.pb-guideline {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.pb-guideline.selected {\n z-index: 3;\n}\n.pb-guideline.preselect {\n z-index: 4;\n}';
13572
- const _hoisted_1$a = { class: "pb-canvas-frame" };
13584
+ const _hoisted_1$9 = { class: "pb-canvas-frame" };
13573
13585
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
13574
13586
  __name: "PbCanvasFrame",
13575
13587
  setup(__props) {
@@ -13605,14 +13617,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
13605
13617
  <link href="https://fonts.googleapis.com/css2?family=Material+Icons+Outlined" rel="stylesheet" />
13606
13618
  <style>${canvasStyle}</style>
13607
13619
  `;
13608
- pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(iframeRef.value.contentWindow.document);
13620
+ pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(iframeRef.value.contentWindow.document.body);
13609
13621
  stopIframeWatch();
13610
13622
  }
13611
13623
  }
13612
13624
  );
13613
13625
  return (_ctx, _cache) => {
13614
13626
  var _a, _b, _c, _d;
13615
- return openBlock(), createElementBlock("div", _hoisted_1$a, [
13627
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [
13616
13628
  createElementVNode("iframe", {
13617
13629
  ref_key: "iframeRef",
13618
13630
  ref: iframeRef,
@@ -13628,7 +13640,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
13628
13640
  };
13629
13641
  }
13630
13642
  });
13631
- const _hoisted_1$9 = { class: "pb-tool-button bs-layout-horizontal flex-align-center" };
13643
+ const _hoisted_1$8 = { class: "pb-tool-button bs-layout-horizontal flex-align-center" };
13632
13644
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
13633
13645
  __name: "PbToolbarButton",
13634
13646
  props: {
@@ -13642,7 +13654,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
13642
13654
  (_b = (_a = props.button).handler) == null ? void 0 : _b.call(_a, pageBuilder);
13643
13655
  };
13644
13656
  return (_ctx, _cache) => {
13645
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
13657
+ return openBlock(), createElementBlock("div", _hoisted_1$8, [
13646
13658
  createElementVNode("div", {
13647
13659
  class: "tool-button bs-clickable",
13648
13660
  onClick: handleClick
@@ -13657,7 +13669,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
13657
13669
  };
13658
13670
  }
13659
13671
  });
13660
- const _hoisted_1$8 = { class: "pb-tool-button-group bs-layout-horizontal flex-align-center" };
13672
+ const _hoisted_1$7 = { class: "pb-tool-button-group bs-layout-horizontal flex-align-center" };
13661
13673
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13662
13674
  __name: "PbToolbarButtonGroup",
13663
13675
  props: {
@@ -13665,7 +13677,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13665
13677
  },
13666
13678
  setup(__props) {
13667
13679
  return (_ctx, _cache) => {
13668
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
13680
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [
13669
13681
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.group.buttons, (button) => {
13670
13682
  return openBlock(), createBlock$1(_sfc_main$a, {
13671
13683
  key: button.buttonId,
@@ -13676,8 +13688,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13676
13688
  };
13677
13689
  }
13678
13690
  });
13679
- const _hoisted_1$7 = { class: "pb-toolbar bs-layout-horizontal align-items-center" };
13680
- const _hoisted_2$4 = { class: "bs-layout-horizontal" };
13691
+ const _hoisted_1$6 = { class: "pb-toolbar bs-layout-horizontal align-items-center" };
13692
+ const _hoisted_2$3 = { class: "bs-layout-horizontal" };
13681
13693
  const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("div", { class: "flex-grow-1" }, null, -1);
13682
13694
  const _hoisted_4$1 = { class: "ml-8 w-64" };
13683
13695
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
@@ -13693,8 +13705,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
13693
13705
  pageBuilder.zoom(scale2);
13694
13706
  };
13695
13707
  return (_ctx, _cache) => {
13696
- return openBlock(), createElementBlock("div", _hoisted_1$7, [
13697
- createElementVNode("div", _hoisted_2$4, [
13708
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [
13709
+ createElementVNode("div", _hoisted_2$3, [
13698
13710
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(buttonGroups), (group) => {
13699
13711
  return openBlock(), createBlock$1(_sfc_main$9, {
13700
13712
  key: group.groupId,
@@ -13719,23 +13731,31 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
13719
13731
  };
13720
13732
  }
13721
13733
  });
13722
- const _hoisted_1$6 = { class: "pb-menu bs-layout-vertical" };
13734
+ const _hoisted_1$5 = { class: "pb-menu bs-layout-vertical" };
13723
13735
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
13724
13736
  __name: "PbMenu",
13725
13737
  setup(__props) {
13726
13738
  return (_ctx, _cache) => {
13727
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
13739
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [
13728
13740
  createVNode(_sfc_main$8)
13729
13741
  ]);
13730
13742
  };
13731
13743
  }
13732
13744
  });
13733
- const _hoisted_1$5 = { class: "pb-navigator" };
13734
- const _hoisted_2$3 = { class: "pb-navigator" };
13735
13745
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13736
13746
  __name: "PbNavigator",
13737
13747
  setup(__props) {
13738
13748
  const pageBuilder = usePageBuilderEditor();
13749
+ const treeS = ref();
13750
+ const treeL = ref();
13751
+ watch(
13752
+ () => treeS.value,
13753
+ () => treeS.value && pageBuilder.keyHandlers.addDocumentKeyEventListener(treeS.value)
13754
+ );
13755
+ watch(
13756
+ () => treeL.value,
13757
+ () => treeL.value && pageBuilder.keyHandlers.addDocumentKeyEventListener(treeL.value)
13758
+ );
13739
13759
  const tabs = [
13740
13760
  { tabId: "pageS", caption: "Mobile", icon: "phone_iphone" },
13741
13761
  { tabId: "pageL", caption: "PC", icon: "desktop_windows" }
@@ -13877,7 +13897,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13877
13897
  tabs
13878
13898
  }, {
13879
13899
  pageS: withCtx(() => [
13880
- createElementVNode("div", _hoisted_1$5, [
13900
+ createElementVNode("div", {
13901
+ ref_key: "treeS",
13902
+ ref: treeS,
13903
+ class: "pb-navigator",
13904
+ tabindex: "0"
13905
+ }, [
13881
13906
  createVNode(unref(BSTree), {
13882
13907
  expandedRows: expandedRows.value,
13883
13908
  "onUpdate:expandedRows": [
@@ -13899,10 +13924,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13899
13924
  "show-move-button": "",
13900
13925
  onRowMoved: rowMoved
13901
13926
  }, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
13902
- ])
13927
+ ], 512)
13903
13928
  ]),
13904
13929
  pageL: withCtx(() => [
13905
- createElementVNode("div", _hoisted_2$3, [
13930
+ createElementVNode("div", {
13931
+ ref_key: "treeL",
13932
+ ref: treeL,
13933
+ class: "pb-navigator",
13934
+ tabindex: "0"
13935
+ }, [
13906
13936
  createVNode(unref(BSTree), {
13907
13937
  expandedRows: expandedRows.value,
13908
13938
  "onUpdate:expandedRows": [
@@ -13924,7 +13954,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13924
13954
  "show-move-button": "",
13925
13955
  onRowMoved: rowMoved
13926
13956
  }, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
13927
- ])
13957
+ ], 512)
13928
13958
  ]),
13929
13959
  _: 1
13930
13960
  }, 8, ["tab-id"]);
@@ -14214,7 +14244,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14214
14244
  title: {},
14215
14245
  editMode: {},
14216
14246
  pageContent: {},
14217
- language: {}
14247
+ locales: {},
14248
+ locale: {}
14218
14249
  },
14219
14250
  setup(__props, { expose: __expose }) {
14220
14251
  const props = __props;
@@ -14223,19 +14254,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14223
14254
  pageBuilderEditor.instanceId = props.instanceId;
14224
14255
  pageBuilderEditor.title = props.title;
14225
14256
  pageBuilderEditor.editMode = props.editMode || "free";
14226
- if (props.language)
14227
- pageBuilderEditor.setLanguage(props.language);
14257
+ if (props.locales)
14258
+ pageBuilderEditor.setLocales(props.locales);
14259
+ if (props.locale)
14260
+ pageBuilderEditor.setLocale(props.locale);
14228
14261
  pageBuilderEditor.registerPlugin({
14229
14262
  // TODO
14230
14263
  commands: createDefaultCommands(modal)
14231
14264
  });
14232
- pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(window.document);
14233
14265
  providePageBuilderEditor(pageBuilderEditor);
14234
14266
  providePageBuilder(pageBuilderEditor);
14235
14267
  onMounted(() => pageBuilderEditor.initData(props.pageContent));
14236
14268
  watch(() => props.pageContent, (pageContent) => pageContent && pageBuilderEditor.initData(pageContent));
14237
- watch(() => props.language, (language) => {
14238
- pageBuilderEditor.setLanguage(language);
14269
+ watch(() => props.locale, (locale) => {
14270
+ pageBuilderEditor.setLocale(locale);
14271
+ });
14272
+ watch(() => props.locales, (locales) => {
14273
+ pageBuilderEditor.setLocales(locales);
14239
14274
  });
14240
14275
  const colorHistory = ref([]);
14241
14276
  provide("colorHistory", colorHistory);