@g1cloud/page-builder-editor 1.0.0-alpha.89 → 1.0.0-alpha.90

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.
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createElementVNode, withDirectives, unref, createVNode } from "vue";
2
2
  import { vT, BSTextInput } from "@g1cloud/bluesea";
3
- import { P as PbColorPicker } from "./index-BMmTgFTs.js";
3
+ import { P as PbColorPicker } from "./index-BIJmWULZ.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-color" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _hoisted_3 = { class: "bs-layout-horizontal flex-align-center color" };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createElementVNode, withDirectives, unref, createVNode } from "vue";
2
2
  import { vT, BSTextInput } from "@g1cloud/bluesea";
3
- import { t as toCssLength } from "./index-BMmTgFTs.js";
3
+ import { t as toCssLength } from "./index-BIJmWULZ.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-number flex-align-center" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createElementVNode, withDirectives, unref, createTextVNode, defineAsyncComponent } from "vue";
2
2
  import { useModal, vT } from "@g1cloud/bluesea";
3
- import { u as usePageBuilderEditor } from "./index-BMmTgFTs.js";
3
+ import { u as usePageBuilderEditor } from "./index-BIJmWULZ.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-html flex-align-center" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, withDirectives, unref, createTextVNode, toDisplayString, createVNode, createCommentVNode, Fragment } from "vue";
2
- import { u as usePageBuilderEditor, C as ChangePropertyCommand } from "./index-BMmTgFTs.js";
2
+ import { u as usePageBuilderEditor, C as ChangePropertyCommand } from "./index-BIJmWULZ.js";
3
3
  import { useModal, vT, BSButton, BSMultiLangTextInput, showNotification } from "@g1cloud/bluesea";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-image" };
5
5
  const _hoisted_2 = { class: "title" };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, withDirectives, unref, createBlock } from "vue";
2
2
  import { vT, BSMultiLangTextArea, BSTextArea } from "@g1cloud/bluesea";
3
- import { u as usePageBuilderEditor } from "./index-BMmTgFTs.js";
3
+ import { u as usePageBuilderEditor } from "./index-BIJmWULZ.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-multiline-text" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, withDirectives, unref, createBlock } from "vue";
2
2
  import { vT, BSMultiLangTextInput, BSTextInput } from "@g1cloud/bluesea";
3
- import { u as usePageBuilderEditor } from "./index-BMmTgFTs.js";
3
+ import { u as usePageBuilderEditor } from "./index-BIJmWULZ.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-text flex-align-center" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createElementVNode, withDirectives, unref } from "vue";
2
2
  import { useModal, vT } from "@g1cloud/bluesea";
3
- import { s as selectYoutubeVideo } from "./index-BMmTgFTs.js";
3
+ import { s as selectYoutubeVideo } from "./index-BIJmWULZ.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-image flex-align-center" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString } from "vue";
2
2
  import { useModalHandle, BSModalFrame } from "@g1cloud/bluesea";
3
- import { w as widgetPartDefinitions } from "./index-BMmTgFTs.js";
3
+ import { w as widgetPartDefinitions } from "./index-BIJmWULZ.js";
4
4
  const _hoisted_1 = { class: "bs-layout-vertical pb-part-add-modal" };
5
5
  const _hoisted_2 = { class: "bs-layout-horizontal-wrap ml-16 mb-8 gap-8" };
6
6
  const _hoisted_3 = ["onClick", "textContent"];
@@ -7602,6 +7602,7 @@ class PageBuilderViewerImpl {
7602
7602
  __publicField2(this, "providers", {});
7603
7603
  __publicField2(this, "externalCssLinks", []);
7604
7604
  __publicField2(this, "externalCssContent", "");
7605
+ __publicField2(this, "partModifier");
7605
7606
  this.model = new Model$1();
7606
7607
  }
7607
7608
  getLocale() {
@@ -7632,6 +7633,9 @@ class PageBuilderViewerImpl {
7632
7633
  if (plugin.css.content) {
7633
7634
  this.externalCssContent = plugin.css.content;
7634
7635
  }
7636
+ if (plugin.partModifier) {
7637
+ this.partModifier = plugin.partModifier;
7638
+ }
7635
7639
  }
7636
7640
  }
7637
7641
  render(data) {
@@ -7643,6 +7647,7 @@ class PageBuilderViewerImpl {
7643
7647
  page.parent = rootPart;
7644
7648
  }
7645
7649
  }
7650
+ this.executePartModifier(rootPart);
7646
7651
  this.model.rootPart.value = rootPart;
7647
7652
  }
7648
7653
  }
@@ -7687,6 +7692,15 @@ class PageBuilderViewerImpl {
7687
7692
  return `${this.externalCssLinks}
7688
7693
  <style>${this.externalCssContent}</style>`;
7689
7694
  }
7695
+ executePartModifier(part) {
7696
+ if (!this.partModifier) return;
7697
+ this.partModifier(part);
7698
+ if (part.children && part.children.length) {
7699
+ for (let child of part.children) {
7700
+ this.executePartModifier(child);
7701
+ }
7702
+ }
7703
+ }
7690
7704
  }
7691
7705
  const createPageBuilderViewer = () => {
7692
7706
  const viewer = new PageBuilderViewerImpl();
@@ -8502,16 +8516,16 @@ class PartManager {
8502
8516
  const defaultPartPropertyEditors = () => {
8503
8517
  return {
8504
8518
  "readonly-text": () => defineAsyncComponent(() => import("./PbPropertyEditorReadonlyText-BJ5qx69O.js")),
8505
- "text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-m-3a8SCn.js")),
8519
+ "text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-CRoHgErz.js")),
8506
8520
  "number": () => defineAsyncComponent(() => import("./PbPropertyEditorNumber-B76ArSb5.js")),
8507
8521
  "boolean": () => defineAsyncComponent(() => import("./PbPropertyEditorBoolean-c5CNiTpt.js")),
8508
- "multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-DN65aoYn.js")),
8522
+ "multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-TsmjwWC-.js")),
8509
8523
  "select": () => defineAsyncComponent(() => import("./PbPropertyEditorSelect-B5sfulvx.js")),
8510
- "css-length": () => defineAsyncComponent(() => import("./PbPropertyEditorCssLength-DK8skXh9.js")),
8511
- "color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-B-jrHxiq.js")),
8512
- "image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-CzTbfsnI.js")),
8513
- "html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-CRfpz6rQ.js")),
8514
- "youtube": () => defineAsyncComponent(() => import("./PbPropertyEditorYoutube-BlCOiRCh.js"))
8524
+ "css-length": () => defineAsyncComponent(() => import("./PbPropertyEditorCssLength-CjIRghZ9.js")),
8525
+ "color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-CV7Eyx43.js")),
8526
+ "image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-DP66HfAu.js")),
8527
+ "html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-DEvzZBKw.js")),
8528
+ "youtube": () => defineAsyncComponent(() => import("./PbPropertyEditorYoutube-ChoPIEtL.js"))
8515
8529
  };
8516
8530
  };
8517
8531
  const getPropertyValueOfParts = (parts, propertyName) => {
@@ -13220,7 +13234,7 @@ __publicField(_OpenAddWidgetModalCommand, "COMMAND_ID", "OpenAddWidgetModal");
13220
13234
  let OpenAddWidgetModalCommand = _OpenAddWidgetModalCommand;
13221
13235
  const openWidgetAddModal = (modal, args, callback) => {
13222
13236
  modal.openModal({
13223
- component: defineAsyncComponent(() => import("./PbWidgetAddModal-5UHKpA-8.js")),
13237
+ component: defineAsyncComponent(() => import("./PbWidgetAddModal-C8KdBf8L.js")),
13224
13238
  style: {
13225
13239
  width: "80%",
13226
13240
  height: "80%",
@@ -1,4 +1,4 @@
1
- import { B, b, M, c, d, e, _, a, f, g, h, i, j, k, l, m, n, R, o, S, p, W, q, r, v, x, y, z, A, D, E } from "./index-BMmTgFTs.js";
1
+ import { B, b, M, c, d, e, _, a, f, g, h, i, j, k, l, m, n, R, o, S, p, W, q, r, v, x, y, z, A, D, E } from "./index-BIJmWULZ.js";
2
2
  export {
3
3
  B as BLOCK_TYPE,
4
4
  b as Block,
@@ -7603,6 +7603,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
7603
7603
  __publicField2(this, "providers", {});
7604
7604
  __publicField2(this, "externalCssLinks", []);
7605
7605
  __publicField2(this, "externalCssContent", "");
7606
+ __publicField2(this, "partModifier");
7606
7607
  this.model = new Model$1();
7607
7608
  }
7608
7609
  getLocale() {
@@ -7633,6 +7634,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
7633
7634
  if (plugin.css.content) {
7634
7635
  this.externalCssContent = plugin.css.content;
7635
7636
  }
7637
+ if (plugin.partModifier) {
7638
+ this.partModifier = plugin.partModifier;
7639
+ }
7636
7640
  }
7637
7641
  }
7638
7642
  render(data) {
@@ -7644,6 +7648,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
7644
7648
  page.parent = rootPart;
7645
7649
  }
7646
7650
  }
7651
+ this.executePartModifier(rootPart);
7647
7652
  this.model.rootPart.value = rootPart;
7648
7653
  }
7649
7654
  }
@@ -7688,6 +7693,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
7688
7693
  return `${this.externalCssLinks}
7689
7694
  <style>${this.externalCssContent}</style>`;
7690
7695
  }
7696
+ executePartModifier(part) {
7697
+ if (!this.partModifier) return;
7698
+ this.partModifier(part);
7699
+ if (part.children && part.children.length) {
7700
+ for (let child of part.children) {
7701
+ this.executePartModifier(child);
7702
+ }
7703
+ }
7704
+ }
7691
7705
  }
7692
7706
  const createPageBuilderViewer = () => {
7693
7707
  const viewer = new PageBuilderViewerImpl();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@g1cloud/page-builder-editor",
3
3
  "private": false,
4
- "version": "1.0.0-alpha.89",
4
+ "version": "1.0.0-alpha.90",
5
5
  "engins": {
6
6
  "node": ">= 20.0.0"
7
7
  },
@@ -31,7 +31,7 @@
31
31
  "vue-router": "^4.4.3",
32
32
  "vue3-click-away": "^1.2.4",
33
33
  "yjs": "^13.6.14",
34
- "@g1cloud/page-builder-viewer": "1.0.0-alpha.89"
34
+ "@g1cloud/page-builder-viewer": "1.0.0-alpha.90"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^20.12.7",