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

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,8 +4,8 @@ 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, onMounted, watch, Fragment, renderList, provide, inject, createBlock as createBlock$1, resolveDynamicComponent, reactive, defineAsyncComponent, withDirectives, unref, createVNode, normalizeStyle, resolveComponent, vModelText, onBeforeUnmount, resolveDirective, withModifiers, renderSlot, normalizeProps, guardReactiveProps, markRaw, Teleport, withCtx } from "vue";
8
- import { notNull, BSTextInput, vClickOutside, useContextMenu, BSSelect, BSTabSheet, BSTree, useModal, BSDateRange } from "@g1cloud/bluesea";
7
+ import { ref, defineComponent, openBlock, createElementBlock, createCommentVNode, computed, normalizeClass, createElementVNode, mergeProps, toDisplayString, onMounted, watch, Fragment, renderList, provide, inject, createBlock as createBlock$1, resolveDynamicComponent, reactive, defineAsyncComponent, withDirectives, unref, createVNode, normalizeStyle, resolveComponent, vModelText, onBeforeUnmount, resolveDirective, withModifiers, renderSlot, normalizeProps, guardReactiveProps, markRaw, Teleport, toHandlers, withCtx } from "vue";
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) => {
11
11
  const r = create$5();
@@ -7432,7 +7432,7 @@ const _sfc_main$1$1 = /* @__PURE__ */ defineComponent({
7432
7432
  };
7433
7433
  }
7434
7434
  });
7435
- const _hoisted_1$t = { class: "pb-viewer" };
7435
+ const _hoisted_1$u = { class: "pb-viewer" };
7436
7436
  const _sfc_main$q = /* @__PURE__ */ defineComponent({
7437
7437
  __name: "PageBuilderViewer",
7438
7438
  props: {
@@ -7463,7 +7463,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
7463
7463
  }
7464
7464
  );
7465
7465
  return (_ctx, _cache) => {
7466
- return openBlock(), createElementBlock("div", _hoisted_1$t, [
7466
+ return openBlock(), createElementBlock("div", _hoisted_1$u, [
7467
7467
  page.value ? (openBlock(), createBlock$1(_sfc_main$1$1, {
7468
7468
  key: 0,
7469
7469
  "is-mobile-page": _ctx.isMobilePage,
@@ -7520,8 +7520,9 @@ const partToJsonObject = (part) => {
7520
7520
  object.partName = part.partName;
7521
7521
  object.partId = part.partId;
7522
7522
  if (part.properties) {
7523
+ object.properties = {};
7523
7524
  for (const name in part.properties) {
7524
- object[name] = part.properties[name];
7525
+ object.properties[name] = part.properties[name];
7525
7526
  }
7526
7527
  }
7527
7528
  if (part.children) {
@@ -7706,21 +7707,12 @@ class Model2 {
7706
7707
  this.yjsDoc = new Doc();
7707
7708
  this.yjsRoot = this.yjsDoc.get("root", YXmlElement);
7708
7709
  const rootPartId = getNewPartId();
7709
- const pages = [];
7710
7710
  this.yjsDoc.transact(() => {
7711
7711
  this.yjsRoot.nodeName = ROOT_TYPE;
7712
7712
  this.yjsRoot.setAttribute(PART_ID_KEY, rootPartId);
7713
- for (let i = 0; i < 3; ++i) {
7714
- const pageElement = new YXmlElement(PAGE_TYPE);
7715
- pageElement.setAttribute(PART_NAME_KEY, PAGE_TYPE);
7716
- pageElement.setAttribute(PART_ID_KEY, getNewPartId());
7717
- this.yjsRoot.push([pageElement]);
7718
- pages.push(new Page());
7719
- }
7720
7713
  });
7721
7714
  this.rootPart = reactive(new RootPart());
7722
7715
  this.rootPart.partId = rootPartId;
7723
- this.rootPart.children = pages;
7724
7716
  this.yjsRoot.observeDeep((events, _) => {
7725
7717
  applyChangeEvents(this.rootPart, events);
7726
7718
  this.emitUpdateModelEvent(events);
@@ -8066,12 +8058,12 @@ const defaultPartPropertyEditors = () => {
8066
8058
  return {
8067
8059
  "readonly-text": () => defineAsyncComponent(() => import("./PbPropertyEditorReadonlyText-Dgp_AVOD.js")),
8068
8060
  "text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-BWOKvwD9.js")),
8069
- "multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-BMF9jHpy.js")),
8061
+ "multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-BFGht6hc.js")),
8070
8062
  "select": () => defineAsyncComponent(() => import("./PbPropertyEditorSelect-CWedbXJI.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"))
8063
+ "color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-CZHXz7K6.js")),
8064
+ "image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-N4VYkBhB.js")),
8065
+ "html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-Bid2WYyb.js")),
8066
+ "product": () => defineAsyncComponent(() => import("./PbPropertyEditorProduct-myd2_r0t.js"))
8075
8067
  };
8076
8068
  };
8077
8069
  const getPropertyValueOfParts = (parts, propertyName) => {
@@ -8302,7 +8294,7 @@ const _export_sfc = (sfc, props) => {
8302
8294
  return target;
8303
8295
  };
8304
8296
  const _sfc_main$p = {};
8305
- const _hoisted_1$s = { class: "pb-add-widget-button" };
8297
+ const _hoisted_1$t = { class: "pb-add-widget-button" };
8306
8298
  const _hoisted_2$j = /* @__PURE__ */ createElementVNode("span", { class: "icon material-icons-outlined" }, "add_box", -1);
8307
8299
  const _hoisted_3$g = /* @__PURE__ */ createElementVNode("span", { class: "text" }, "Add Widget", -1);
8308
8300
  const _hoisted_4$d = [
@@ -8310,7 +8302,7 @@ const _hoisted_4$d = [
8310
8302
  _hoisted_3$g
8311
8303
  ];
8312
8304
  function _sfc_render$1(_ctx, _cache) {
8313
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
8305
+ return openBlock(), createElementBlock("div", _hoisted_1$t, [
8314
8306
  createElementVNode("button", {
8315
8307
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("add-widget", $event))
8316
8308
  }, _hoisted_4$d)
@@ -8347,7 +8339,7 @@ const useMouseTracker = () => {
8347
8339
  throw Error(MOUSE_TRACKER_NOT_FOUND);
8348
8340
  return mouseTracker;
8349
8341
  };
8350
- const _hoisted_1$r = ["data-model-id", "draggable"];
8342
+ const _hoisted_1$s = ["data-model-id", "draggable"];
8351
8343
  const _hoisted_2$i = {
8352
8344
  key: 1,
8353
8345
  class: "children"
@@ -8816,13 +8808,13 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
8816
8808
  class: "resize-handle",
8817
8809
  onMousedown: _resize_mousedown
8818
8810
  }, null, 32)) : createCommentVNode("", true)
8819
- ], 16, _hoisted_1$r)), [
8811
+ ], 16, _hoisted_1$s)), [
8820
8812
  [unref(vPartHandler), { pageBuilder: unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
8821
8813
  ]);
8822
8814
  };
8823
8815
  }
8824
8816
  });
8825
- const _hoisted_1$q = ["data-model-id"];
8817
+ const _hoisted_1$r = ["data-model-id"];
8826
8818
  const _sfc_main$n = /* @__PURE__ */ defineComponent({
8827
8819
  __name: "PbBlock",
8828
8820
  props: {
@@ -9018,13 +9010,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
9018
9010
  part: child
9019
9011
  }, null, 8, ["part"]);
9020
9012
  }), 128))
9021
- ], 16, _hoisted_1$q)), [
9013
+ ], 16, _hoisted_1$r)), [
9022
9014
  [unref(vPartHandler), { pageBuilder: unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
9023
9015
  ]);
9024
9016
  };
9025
9017
  }
9026
9018
  });
9027
- const _hoisted_1$p = { class: "pb-block" };
9019
+ const _hoisted_1$q = { class: "pb-block" };
9028
9020
  const _hoisted_2$h = /* @__PURE__ */ createElementVNode("div", {
9029
9021
  class: "pb-widget",
9030
9022
  style: { "margin": "0 auto" }
@@ -9043,11 +9035,11 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
9043
9035
  },
9044
9036
  setup(__props) {
9045
9037
  return (_ctx, _cache) => {
9046
- return openBlock(), createElementBlock("div", _hoisted_1$p, _hoisted_3$f);
9038
+ return openBlock(), createElementBlock("div", _hoisted_1$q, _hoisted_3$f);
9047
9039
  };
9048
9040
  }
9049
9041
  });
9050
- const _hoisted_1$o = ["data-model-id"];
9042
+ const _hoisted_1$p = ["data-model-id"];
9051
9043
  const _sfc_main$l = /* @__PURE__ */ defineComponent({
9052
9044
  __name: "PbSection",
9053
9045
  props: {
@@ -9174,13 +9166,13 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
9174
9166
  onAddWidget: addWidget
9175
9167
  }))
9176
9168
  ], 64))
9177
- ], 16, _hoisted_1$o)), [
9169
+ ], 16, _hoisted_1$p)), [
9178
9170
  [unref(vPartHandler), { pageBuilder: unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
9179
9171
  ]);
9180
9172
  };
9181
9173
  }
9182
9174
  });
9183
- const _hoisted_1$n = { class: "group-editor group-editor-position" };
9175
+ const _hoisted_1$o = { class: "group-editor group-editor-position" };
9184
9176
  const _hoisted_2$g = { class: "flex-align-center" };
9185
9177
  const _hoisted_3$e = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
9186
9178
  /* @__PURE__ */ createElementVNode("label", { textContent: "Position" })
@@ -9220,7 +9212,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
9220
9212
  const updateTop = (value) => updatePropertyValue({ top: value });
9221
9213
  const updateBottom = (value) => updatePropertyValue({ bottom: value });
9222
9214
  return (_ctx, _cache) => {
9223
- return openBlock(), createElementBlock("div", _hoisted_1$n, [
9215
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
9224
9216
  createElementVNode("div", _hoisted_2$g, [
9225
9217
  _hoisted_3$e,
9226
9218
  createElementVNode("div", _hoisted_4$c, [
@@ -9267,7 +9259,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
9267
9259
  };
9268
9260
  }
9269
9261
  });
9270
- const _hoisted_1$m = { class: "group-editor group-editor-size" };
9262
+ const _hoisted_1$n = { class: "group-editor group-editor-size" };
9271
9263
  const _hoisted_2$f = { class: "flex-align-center" };
9272
9264
  const _hoisted_3$d = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
9273
9265
  /* @__PURE__ */ createElementVNode("label", { textContent: "Size" })
@@ -9293,7 +9285,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
9293
9285
  const updateWidth = (value) => updatePropertyValue({ width: value });
9294
9286
  const updateHeight = (value) => updatePropertyValue({ height: value });
9295
9287
  return (_ctx, _cache) => {
9296
- return openBlock(), createElementBlock("div", _hoisted_1$m, [
9288
+ return openBlock(), createElementBlock("div", _hoisted_1$n, [
9297
9289
  createElementVNode("div", _hoisted_2$f, [
9298
9290
  _hoisted_3$d,
9299
9291
  createElementVNode("div", _hoisted_4$b, [
@@ -9472,7 +9464,7 @@ var script$4 = {
9472
9464
  }
9473
9465
  }
9474
9466
  };
9475
- const _hoisted_1$l = { class: "vc-alpha" };
9467
+ const _hoisted_1$m = { class: "vc-alpha" };
9476
9468
  const _hoisted_2$e = { class: "vc-alpha-checkboard-wrap" };
9477
9469
  const _hoisted_3$c = /* @__PURE__ */ createElementVNode(
9478
9470
  "div",
@@ -9486,7 +9478,7 @@ const _hoisted_4$a = [
9486
9478
  ];
9487
9479
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
9488
9480
  const _component_Checkboard = resolveComponent("Checkboard");
9489
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
9481
+ return openBlock(), createElementBlock("div", _hoisted_1$m, [
9490
9482
  createElementVNode("div", _hoisted_2$e, [
9491
9483
  createVNode(_component_Checkboard)
9492
9484
  ]),
@@ -10590,12 +10582,12 @@ var script$3 = {
10590
10582
  // }
10591
10583
  }
10592
10584
  };
10593
- const _hoisted_1$k = { class: "vc-editable-input" };
10585
+ const _hoisted_1$l = { class: "vc-editable-input" };
10594
10586
  const _hoisted_2$d = ["aria-labelledby"];
10595
10587
  const _hoisted_3$b = ["id", "for"];
10596
10588
  const _hoisted_4$9 = { class: "vc-input__desc" };
10597
10589
  function render$3(_ctx, _cache, $props, $setup, $data, $options) {
10598
- return openBlock(), createElementBlock("div", _hoisted_1$k, [
10590
+ return openBlock(), createElementBlock("div", _hoisted_1$l, [
10599
10591
  withDirectives(createElementVNode("input", {
10600
10592
  ref: "input",
10601
10593
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.val = $event),
@@ -10690,7 +10682,7 @@ var script$2 = {
10690
10682
  }
10691
10683
  }
10692
10684
  };
10693
- const _hoisted_1$j = /* @__PURE__ */ createElementVNode(
10685
+ const _hoisted_1$k = /* @__PURE__ */ createElementVNode(
10694
10686
  "div",
10695
10687
  { class: "vc-saturation--white" },
10696
10688
  null,
@@ -10726,7 +10718,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
10726
10718
  onTouchstart: _cache[2] || (_cache[2] = (...args) => $options.handleChange && $options.handleChange(...args))
10727
10719
  },
10728
10720
  [
10729
- _hoisted_1$j,
10721
+ _hoisted_1$k,
10730
10722
  _hoisted_2$c,
10731
10723
  createElementVNode(
10732
10724
  "div",
@@ -10875,7 +10867,7 @@ var script$1 = {
10875
10867
  }
10876
10868
  }
10877
10869
  };
10878
- const _hoisted_1$i = ["aria-valuenow"];
10870
+ const _hoisted_1$j = ["aria-valuenow"];
10879
10871
  const _hoisted_2$b = /* @__PURE__ */ createElementVNode(
10880
10872
  "div",
10881
10873
  { class: "vc-hue-picker" },
@@ -10915,7 +10907,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
10915
10907
  4
10916
10908
  /* STYLE */
10917
10909
  )
10918
- ], 40, _hoisted_1$i)
10910
+ ], 40, _hoisted_1$j)
10919
10911
  ],
10920
10912
  2
10921
10913
  /* CLASS */
@@ -11011,7 +11003,7 @@ var script = {
11011
11003
  }
11012
11004
  }
11013
11005
  };
11014
- const _hoisted_1$h = { class: "vc-sketch-saturation-wrap" };
11006
+ const _hoisted_1$i = { class: "vc-sketch-saturation-wrap" };
11015
11007
  const _hoisted_2$a = { class: "vc-sketch-controls" };
11016
11008
  const _hoisted_3$8 = { class: "vc-sketch-sliders" };
11017
11009
  const _hoisted_4$7 = { class: "vc-sketch-hue-wrap" };
@@ -11054,7 +11046,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
11054
11046
  class: normalizeClass(["vc-sketch", [$props.disableAlpha ? "vc-sketch__disable-alpha" : ""]])
11055
11047
  },
11056
11048
  [
11057
- createElementVNode("div", _hoisted_1$h, [
11049
+ createElementVNode("div", _hoisted_1$i, [
11058
11050
  createVNode(_component_Saturation, {
11059
11051
  value: _ctx.colors,
11060
11052
  onChange: $options.childChange
@@ -11230,7 +11222,7 @@ const _sfc_main$i = defineComponent({
11230
11222
  };
11231
11223
  }
11232
11224
  });
11233
- const _hoisted_1$g = { class: "buttons" };
11225
+ const _hoisted_1$h = { class: "buttons" };
11234
11226
  const _hoisted_2$9 = /* @__PURE__ */ createElementVNode("i", { class: "material-icons-outlined" }, "delete", -1);
11235
11227
  const _hoisted_3$7 = [
11236
11228
  _hoisted_2$9
@@ -11244,7 +11236,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
11244
11236
  onKeydown: _cache[3] || (_cache[3] = withModifiers(() => {
11245
11237
  }, ["stop"]))
11246
11238
  }, [
11247
- createElementVNode("div", _hoisted_1$g, [
11239
+ createElementVNode("div", _hoisted_1$h, [
11248
11240
  renderSlot(_ctx.$slots, "button", normalizeProps(guardReactiveProps({ toggle: _ctx.toggle, color: _ctx.color })), () => [
11249
11241
  createElementVNode("button", {
11250
11242
  class: normalizeClass([{ none: !_ctx.color }, "pb-button picker-button"]),
@@ -11271,7 +11263,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
11271
11263
  ]);
11272
11264
  }
11273
11265
  const PbColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render]]);
11274
- const _hoisted_1$f = { class: "group-editor group-editor-background" };
11266
+ const _hoisted_1$g = { class: "group-editor group-editor-background" };
11275
11267
  const _hoisted_2$8 = { class: "flex-align-center" };
11276
11268
  const _hoisted_3$6 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
11277
11269
  /* @__PURE__ */ createElementVNode("label", { textContent: "Background" })
@@ -11308,7 +11300,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
11308
11300
  });
11309
11301
  };
11310
11302
  return (_ctx, _cache) => {
11311
- return openBlock(), createElementBlock("div", _hoisted_1$f, [
11303
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
11312
11304
  createElementVNode("div", _hoisted_2$8, [
11313
11305
  _hoisted_3$6,
11314
11306
  createElementVNode("div", _hoisted_4$5, [
@@ -11341,7 +11333,7 @@ const TopLeftCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W
11341
11333
  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";
11342
11334
  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";
11343
11335
  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";
11344
- const _hoisted_1$e = { class: "group-editor group-editor-border" };
11336
+ const _hoisted_1$f = { class: "group-editor group-editor-border" };
11345
11337
  const _hoisted_2$7 = { class: "flex-align-center" };
11346
11338
  const _hoisted_3$5 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
11347
11339
  /* @__PURE__ */ createElementVNode("label", { textContent: "Border" })
@@ -11412,7 +11404,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
11412
11404
  const updateBorderBottomLeftRadius = (value) => updatePropertyValue({ borderBottomLeftRadius: value });
11413
11405
  const updateBorderBottomRightRadius = (value) => updatePropertyValue({ borderBottomRightRadius: value });
11414
11406
  return (_ctx, _cache) => {
11415
- return openBlock(), createElementBlock("div", _hoisted_1$e, [
11407
+ return openBlock(), createElementBlock("div", _hoisted_1$f, [
11416
11408
  createElementVNode("div", _hoisted_2$7, [
11417
11409
  _hoisted_3$5,
11418
11410
  createElementVNode("div", _hoisted_4$4, [
@@ -11521,7 +11513,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
11521
11513
  };
11522
11514
  }
11523
11515
  });
11524
- const _hoisted_1$d = { class: "group-editor group-editor-margin" };
11516
+ const _hoisted_1$e = { class: "group-editor group-editor-margin" };
11525
11517
  const _hoisted_2$6 = { class: "flex-align-center" };
11526
11518
  const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
11527
11519
  /* @__PURE__ */ createElementVNode("label", { textContent: "Margin" })
@@ -11561,7 +11553,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
11561
11553
  const updateTop = (value) => updatePropertyValue({ marginTop: value });
11562
11554
  const updateBottom = (value) => updatePropertyValue({ marginBottom: value });
11563
11555
  return (_ctx, _cache) => {
11564
- return openBlock(), createElementBlock("div", _hoisted_1$d, [
11556
+ return openBlock(), createElementBlock("div", _hoisted_1$e, [
11565
11557
  createElementVNode("div", _hoisted_2$6, [
11566
11558
  _hoisted_3$4,
11567
11559
  createElementVNode("div", _hoisted_4$3, [
@@ -11608,7 +11600,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
11608
11600
  };
11609
11601
  }
11610
11602
  });
11611
- const _hoisted_1$c = { class: "group-editor group-editor-padding" };
11603
+ const _hoisted_1$d = { class: "group-editor group-editor-padding" };
11612
11604
  const _hoisted_2$5 = { class: "flex-align-center" };
11613
11605
  const _hoisted_3$3 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
11614
11606
  /* @__PURE__ */ createElementVNode("label", { textContent: "Padding" })
@@ -11648,7 +11640,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
11648
11640
  const updateTop = (value) => updatePropertyValue({ paddingTop: value });
11649
11641
  const updateBottom = (value) => updatePropertyValue({ paddingBottom: value });
11650
11642
  return (_ctx, _cache) => {
11651
- return openBlock(), createElementBlock("div", _hoisted_1$c, [
11643
+ return openBlock(), createElementBlock("div", _hoisted_1$d, [
11652
11644
  createElementVNode("div", _hoisted_2$5, [
11653
11645
  _hoisted_3$3,
11654
11646
  createElementVNode("div", _hoisted_4$2, [
@@ -13442,6 +13434,40 @@ class PageBuilderEditorImpl {
13442
13434
  zoom(scale) {
13443
13435
  this.scale.value = scale;
13444
13436
  }
13437
+ makeSingleScreen(screenToKeep) {
13438
+ var _a;
13439
+ if (!this.model.rootPart.children)
13440
+ return;
13441
+ const screenCount = ((_a = this.model.rootPart.children) == null ? void 0 : _a.length) || 0;
13442
+ if (screenCount !== 2)
13443
+ return;
13444
+ const part = this.model.rootPart.children[screenToKeep === 0 ? 1 : 0];
13445
+ this.model.updateModel({
13446
+ delete: [part.partId]
13447
+ });
13448
+ }
13449
+ makeMultipleScreen() {
13450
+ var _a;
13451
+ if (!this.model.rootPart.children)
13452
+ return;
13453
+ const screenCount = ((_a = this.model.rootPart.children) == null ? void 0 : _a.length) || 0;
13454
+ if (screenCount !== 1)
13455
+ return;
13456
+ const part = this.model.rootPart.children[0];
13457
+ const json = this.model.serializePageModel([part.partId]);
13458
+ const copied = this.model.parsePageModel(json);
13459
+ if (!copied)
13460
+ return;
13461
+ this.model.updateModel({
13462
+ insert: [
13463
+ {
13464
+ partId: this.model.rootPart.partId,
13465
+ index: 1,
13466
+ parts: copied
13467
+ }
13468
+ ]
13469
+ });
13470
+ }
13445
13471
  getEmptyPageContent() {
13446
13472
  const block = new Block();
13447
13473
  const section = new Section();
@@ -13462,9 +13488,9 @@ class PageBuilderEditorImpl {
13462
13488
  });
13463
13489
  }
13464
13490
  }
13465
- const _hoisted_1$b = /* @__PURE__ */ createElementVNode("i", { class: "material-icons-outlined" }, "add_circle_outline", -1);
13491
+ const _hoisted_1$c = /* @__PURE__ */ createElementVNode("i", { class: "material-icons-outlined" }, "add_circle_outline", -1);
13466
13492
  const _hoisted_2$4 = [
13467
- _hoisted_1$b
13493
+ _hoisted_1$c
13468
13494
  ];
13469
13495
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
13470
13496
  __name: "PbPage",
@@ -13516,7 +13542,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
13516
13542
  };
13517
13543
  }
13518
13544
  });
13519
- const _hoisted_1$a = /* @__PURE__ */ createElementVNode("div", { style: { "width": "20px" } }, null, -1);
13545
+ const _hoisted_1$b = /* @__PURE__ */ createElementVNode("div", { style: { "width": "20px" } }, null, -1);
13520
13546
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
13521
13547
  __name: "PbCanvas",
13522
13548
  setup(__props) {
@@ -13569,7 +13595,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
13569
13595
  page: pageS.value,
13570
13596
  width: 420
13571
13597
  }, null, 8, ["page"]),
13572
- _hoisted_1$a,
13598
+ _hoisted_1$b,
13573
13599
  createVNode(_sfc_main$d, {
13574
13600
  "is-mobile-page": false,
13575
13601
  page: pageL.value,
@@ -13580,8 +13606,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
13580
13606
  };
13581
13607
  }
13582
13608
  });
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}';
13584
- const _hoisted_1$9 = { class: "pb-canvas-frame" };
13609
+ 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}';
13610
+ const _hoisted_1$a = { class: "pb-canvas-frame" };
13585
13611
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
13586
13612
  __name: "PbCanvasFrame",
13587
13613
  setup(__props) {
@@ -13624,7 +13650,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
13624
13650
  );
13625
13651
  return (_ctx, _cache) => {
13626
13652
  var _a, _b, _c, _d;
13627
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
13653
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [
13628
13654
  createElementVNode("iframe", {
13629
13655
  ref_key: "iframeRef",
13630
13656
  ref: iframeRef,
@@ -13640,7 +13666,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
13640
13666
  };
13641
13667
  }
13642
13668
  });
13643
- const _hoisted_1$8 = { class: "pb-tool-button bs-layout-horizontal flex-align-center" };
13669
+ const _hoisted_1$9 = { class: "pb-tool-button bs-layout-horizontal flex-align-center" };
13644
13670
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
13645
13671
  __name: "PbToolbarButton",
13646
13672
  props: {
@@ -13654,7 +13680,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
13654
13680
  (_b = (_a = props.button).handler) == null ? void 0 : _b.call(_a, pageBuilder);
13655
13681
  };
13656
13682
  return (_ctx, _cache) => {
13657
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
13683
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [
13658
13684
  createElementVNode("div", {
13659
13685
  class: "tool-button bs-clickable",
13660
13686
  onClick: handleClick
@@ -13669,7 +13695,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
13669
13695
  };
13670
13696
  }
13671
13697
  });
13672
- const _hoisted_1$7 = { class: "pb-tool-button-group bs-layout-horizontal flex-align-center" };
13698
+ const _hoisted_1$8 = { class: "pb-tool-button-group bs-layout-horizontal flex-align-center" };
13673
13699
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13674
13700
  __name: "PbToolbarButtonGroup",
13675
13701
  props: {
@@ -13677,7 +13703,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13677
13703
  },
13678
13704
  setup(__props) {
13679
13705
  return (_ctx, _cache) => {
13680
- return openBlock(), createElementBlock("div", _hoisted_1$7, [
13706
+ return openBlock(), createElementBlock("div", _hoisted_1$8, [
13681
13707
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.group.buttons, (button) => {
13682
13708
  return openBlock(), createBlock$1(_sfc_main$a, {
13683
13709
  key: button.buttonId,
@@ -13688,60 +13714,112 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13688
13714
  };
13689
13715
  }
13690
13716
  });
13691
- const _hoisted_1$6 = { class: "pb-toolbar bs-layout-horizontal align-items-center" };
13692
- const _hoisted_2$3 = { class: "bs-layout-horizontal" };
13717
+ const _hoisted_1$7 = { class: "pb-toolbar bs-layout-horizontal align-items-center" };
13718
+ const _hoisted_2$3 = { class: "bs-layout-horizontal align-items-center" };
13693
13719
  const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("div", { class: "flex-grow-1" }, null, -1);
13694
- const _hoisted_4$1 = { class: "ml-8 w-64" };
13720
+ const _hoisted_4$1 = { class: "mr-8" };
13695
13721
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
13696
13722
  __name: "PbToolbar",
13723
+ props: {
13724
+ plugin: {}
13725
+ },
13697
13726
  setup(__props) {
13698
13727
  const pageBuilder = usePageBuilderEditor();
13699
13728
  const buttonGroups = pageBuilder.toolButtonRegistry.getToolButtonGroups();
13700
- const scale = computed(() => `${Math.round(100 * pageBuilder.scale.value)}%`);
13701
- const zoom = async (scaleString) => {
13702
- if (!scaleString)
13703
- return;
13704
- const scale2 = parseInt(scaleString.replaceAll(/[^0-9]+/g, "")) / 100;
13705
- pageBuilder.zoom(scale2);
13729
+ const modal = useModal();
13730
+ const screenCount = computed({
13731
+ get: () => {
13732
+ var _a;
13733
+ return ((_a = pageBuilder.model.rootPart.children) == null ? void 0 : _a.length) || 2;
13734
+ },
13735
+ set: (count) => {
13736
+ var _a;
13737
+ if (!count)
13738
+ return;
13739
+ console.log(count);
13740
+ if (count === (((_a = pageBuilder.model.rootPart.children) == null ? void 0 : _a.length) || 0))
13741
+ return;
13742
+ if (count >= 2) {
13743
+ makeMultipleScreen();
13744
+ } else {
13745
+ makeSingleScreen();
13746
+ }
13747
+ }
13748
+ });
13749
+ const makeMultipleScreen = () => {
13750
+ pageBuilder.makeMultipleScreen();
13751
+ };
13752
+ const makeSingleScreen = () => {
13753
+ modal.openModal({
13754
+ component: defineAsyncComponent(() => import("./PbScreenSelectModal-DDATc9n1.js")),
13755
+ bind: {},
13756
+ on: {
13757
+ select: (selection) => {
13758
+ pageBuilder.makeSingleScreen(selection);
13759
+ }
13760
+ }
13761
+ });
13706
13762
  };
13763
+ const scale = computed({
13764
+ get: () => `${Math.round(100 * pageBuilder.scale.value)}%`,
13765
+ set: (value) => {
13766
+ const scale2 = parseInt(value.replaceAll(/[^0-9]+/g, "")) / 100;
13767
+ pageBuilder.zoom(scale2);
13768
+ }
13769
+ });
13707
13770
  return (_ctx, _cache) => {
13708
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
13771
+ var _a, _b, _c;
13772
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [
13709
13773
  createElementVNode("div", _hoisted_2$3, [
13710
13774
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(buttonGroups), (group) => {
13711
13775
  return openBlock(), createBlock$1(_sfc_main$9, {
13712
13776
  key: group.groupId,
13713
13777
  group
13714
13778
  }, null, 8, ["group"]);
13715
- }), 128))
13716
- ]),
13717
- _hoisted_3$2,
13718
- createElementVNode("div", _hoisted_4$1, [
13779
+ }), 128)),
13780
+ createVNode(unref(BSSelect), {
13781
+ modelValue: screenCount.value,
13782
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => screenCount.value = $event),
13783
+ items: [{ value: 2, label: "Multiple Screen" }, { value: 1, label: "Single Screen" }],
13784
+ "label-provider": (v) => v.label,
13785
+ "value-provider": (v) => v.value,
13786
+ "view-mode": false
13787
+ }, null, 8, ["modelValue", "label-provider", "value-provider"]),
13719
13788
  createVNode(unref(BSSelect), {
13720
13789
  modelValue: scale.value,
13721
- "onUpdate:modelValue": [
13722
- _cache[0] || (_cache[0] = ($event) => scale.value = $event),
13723
- zoom
13724
- ],
13790
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => scale.value = $event),
13725
13791
  items: ["100%", "75%", "50%", "25%", "10%"],
13726
13792
  "view-mode": false,
13793
+ class: "ml-4",
13727
13794
  placeholder: "Scale"
13728
13795
  }, null, 8, ["modelValue"])
13796
+ ]),
13797
+ _hoisted_3$2,
13798
+ createElementVNode("div", _hoisted_4$1, [
13799
+ _ctx.plugin ? (openBlock(), createBlock$1(resolveDynamicComponent((_a = _ctx.plugin) == null ? void 0 : _a.component), mergeProps({ key: 0 }, (_b = _ctx.plugin) == null ? void 0 : _b.bind, toHandlers((_c = _ctx.plugin) == null ? void 0 : _c.on)), null, 16)) : createCommentVNode("", true)
13729
13800
  ])
13730
13801
  ]);
13731
13802
  };
13732
13803
  }
13733
13804
  });
13734
- const _hoisted_1$5 = { class: "pb-menu bs-layout-vertical" };
13805
+ const _hoisted_1$6 = { class: "pb-menu bs-layout-vertical" };
13735
13806
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
13736
13807
  __name: "PbMenu",
13808
+ props: {
13809
+ toolbarPlugin: {}
13810
+ },
13737
13811
  setup(__props) {
13738
13812
  return (_ctx, _cache) => {
13739
- return openBlock(), createElementBlock("div", _hoisted_1$5, [
13740
- createVNode(_sfc_main$8)
13813
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [
13814
+ createVNode(_sfc_main$8, { plugin: _ctx.toolbarPlugin }, null, 8, ["plugin"])
13741
13815
  ]);
13742
13816
  };
13743
13817
  }
13744
13818
  });
13819
+ const _hoisted_1$5 = {
13820
+ key: 1,
13821
+ class: "bs-layout-vertical border"
13822
+ };
13745
13823
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13746
13824
  __name: "PbNavigator",
13747
13825
  setup(__props) {
@@ -13760,8 +13838,18 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13760
13838
  { tabId: "pageS", caption: "Mobile", icon: "phone_iphone" },
13761
13839
  { tabId: "pageL", caption: "PC", icon: "desktop_windows" }
13762
13840
  ];
13763
- const pageS = computed(() => (pageBuilder.model.rootPart.children || [])[0].children || []);
13764
- const pageL = computed(() => (pageBuilder.model.rootPart.children || [])[1].children || []);
13841
+ const isMultipleScreen = computed(() => {
13842
+ var _a;
13843
+ return (((_a = pageBuilder.model.rootPart.children) == null ? void 0 : _a.length) || 0) >= 2;
13844
+ });
13845
+ const pageS = computed(() => {
13846
+ var _a;
13847
+ return ((_a = (pageBuilder.model.rootPart.children || [])[0]) == null ? void 0 : _a.children) || [];
13848
+ });
13849
+ const pageL = computed(() => {
13850
+ var _a;
13851
+ return ((_a = (pageBuilder.model.rootPart.children || [])[1]) == null ? void 0 : _a.children) || [];
13852
+ });
13765
13853
  const tabId = computed({
13766
13854
  get() {
13767
13855
  const page = pageBuilder.context.getSelectedPage();
@@ -13891,7 +13979,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13891
13979
  PageBuilderEditorEvent.off.modelUpdatedByUI(modelUpdateHandler);
13892
13980
  });
13893
13981
  return (_ctx, _cache) => {
13894
- return openBlock(), createBlock$1(unref(BSTabSheet), {
13982
+ return isMultipleScreen.value ? (openBlock(), createBlock$1(unref(BSTabSheet), {
13983
+ key: 0,
13895
13984
  "tab-id": tabId.value,
13896
13985
  "onUpdate:tabId": _cache[4] || (_cache[4] = ($event) => tabId.value = $event),
13897
13986
  tabs
@@ -13957,7 +14046,36 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13957
14046
  ], 512)
13958
14047
  ]),
13959
14048
  _: 1
13960
- }, 8, ["tab-id"]);
14049
+ }, 8, ["tab-id"])) : (openBlock(), createElementBlock("div", _hoisted_1$5, [
14050
+ createElementVNode("div", {
14051
+ ref_key: "treeS",
14052
+ ref: treeS,
14053
+ class: "pb-navigator",
14054
+ tabindex: "0"
14055
+ }, [
14056
+ createVNode(unref(BSTree), {
14057
+ expandedRows: expandedRows.value,
14058
+ "onUpdate:expandedRows": [
14059
+ _cache[5] || (_cache[5] = ($event) => expandedRows.value = $event),
14060
+ expandedRowsChanged
14061
+ ],
14062
+ selectedRows: selectedRows.value,
14063
+ "onUpdate:selectedRows": [
14064
+ _cache[6] || (_cache[6] = ($event) => selectedRows.value = $event),
14065
+ selectedRowsChanged
14066
+ ],
14067
+ data: pageS.value,
14068
+ "enable-drag-and-drop": treeDragAndDropPolicy,
14069
+ "icon-provider": iconProvider,
14070
+ "key-provider": (part) => part.partId,
14071
+ "label-provider": labelProvider,
14072
+ class: "max-w-320",
14073
+ "dont-change-data-when-rowmoved": "",
14074
+ "show-move-button": "",
14075
+ onRowMoved: rowMoved
14076
+ }, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
14077
+ ], 512)
14078
+ ]));
13961
14079
  };
13962
14080
  }
13963
14081
  });
@@ -14245,7 +14363,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14245
14363
  editMode: {},
14246
14364
  pageContent: {},
14247
14365
  locales: {},
14248
- locale: {}
14366
+ locale: {},
14367
+ toolbarPlugin: {}
14249
14368
  },
14250
14369
  setup(__props, { expose: __expose }) {
14251
14370
  const props = __props;
@@ -14328,7 +14447,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14328
14447
  });
14329
14448
  return (_ctx, _cache) => {
14330
14449
  return openBlock(), createElementBlock("div", _hoisted_1, [
14331
- createVNode(_sfc_main$7),
14450
+ createVNode(_sfc_main$7, { "toolbar-plugin": _ctx.toolbarPlugin }, null, 8, ["toolbar-plugin"]),
14332
14451
  createElementVNode("div", _hoisted_2, [
14333
14452
  createVNode(_sfc_main$6),
14334
14453
  createVNode(_sfc_main$b, { class: "flex-grow-1" }),