@myissue/vue-website-page-builder 3.1.21 → 3.1.22

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.
@@ -2456,7 +2456,18 @@ class Xe {
2456
2456
  console.error("Error adding component:", t);
2457
2457
  }
2458
2458
  }
2459
- // Public method to parse and set components from JSON or HTML
2459
+ /**
2460
+ * Parse and set components from JSON or HTML data
2461
+ *
2462
+ * Supports:
2463
+ * - JSON: Array of ComponentObject with html_code, id, title
2464
+ * - HTML: String containing <section data-componentid="..."> elements
2465
+ *
2466
+ * Auto-detects format and parses accordingly
2467
+ *
2468
+ * @param data - JSON string (e.g., '[{"html_code":"...","id":"123","title":"..."}]')
2469
+ * OR HTML string (e.g., '<section data-componentid="123">...</section>')
2470
+ */
2460
2471
  setComponentsFromData(e) {
2461
2472
  this.showRunningMethodLogs && console.log("setComponentsFromData");
2462
2473
  const t = e.trim();
@@ -2527,7 +2538,7 @@ ie = new WeakSet(), Ne = function(e, t, o) {
2527
2538
  this.pageBuilderStateStore.setElementContainsHyperlink(!1), this.pageBuilderStateStore.setHyperlinkInput(""), this.pageBuilderStateStore.setHyperlinkError(null), this.pageBuilderStateStore.setHyperlinkMessage(null), this.pageBuilderStateStore.setHyberlinkEnable(!1);
2528
2539
  }, // Private method to parse JSON components
2529
2540
  il = function(e) {
2530
- console.log("using HTML method...");
2541
+ console.log("using JSON method...");
2531
2542
  try {
2532
2543
  const t = JSON.parse(e);
2533
2544
  let o = [];
@@ -2537,7 +2548,7 @@ il = function(e) {
2537
2548
  }
2538
2549
  }, // Private method to parse HTML components
2539
2550
  Au = function(e) {
2540
- console.log("using JSON method...");
2551
+ console.log("using HTML method...");
2541
2552
  try {
2542
2553
  const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll("section[data-componentid]"), i = [];
2543
2554
  n.forEach((s) => {
@@ -23518,7 +23529,7 @@ const $4 = { class: "p-4" }, _4 = { class: "mb-8" }, z4 = { class: "grid grid-co
23518
23529
  }, iS = { class: "overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg" }, sS = { class: "overflow-x-auto" }, aS = { class: "min-w-full divide-y divide-gray-300" }, lS = { class: "bg-white divide-y divide-gray-200" }, dS = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, cS = { class: "flex items-center space-x-3" }, pS = { class: "border-r border-gray-200 pr-6" }, uS = ["src"], mS = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, hS = { class: "flex items-center space-x-3" }, gS = { class: "border-r border-gray-200 pr-6" }, fS = { class: "flex items-center space-x-3" }, bS = { class: "whitespace-nowrap" }, yS = {
23519
23530
  __name: "PageBuilderSettings",
23520
23531
  setup(r) {
23521
- const e = "v3.1.21", t = re("pageBuilderStateStore"), o = S(!1), n = S(""), i = S(null), s = L(() => t.getConfigPageBuilder), a = function() {
23532
+ const e = "v3.1.22", t = re("pageBuilderStateStore"), o = S(!1), n = S(""), i = S(null), s = L(() => t.getConfigPageBuilder), a = function() {
23522
23533
  n.value = "Advanced Settings", o.value = !0;
23523
23534
  }, l = function() {
23524
23535
  o.value = !1;