@dcodegroup-au/page-builder 0.8.0 → 0.8.2

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.
@@ -451,11 +451,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
451
451
  const _hoisted_9$n = { class: "font-semibold text-gray-900" };
452
452
  const _hoisted_10$j = { class: "text-sm text-gray-600" };
453
453
  const _hoisted_11$g = ["disabled"];
454
- const _hoisted_12$d = { class: "flex flex-col gap-3" };
454
+ const _hoisted_12$e = { class: "flex flex-col gap-3" };
455
455
  const _hoisted_13$b = ["onClick"];
456
456
  const _hoisted_14$9 = ["onClick"];
457
- const _hoisted_15$7 = { class: "text-xs text-gray-600" };
458
- const _hoisted_16$4 = { class: "text-sm font-medium text-gray-900" };
457
+ const _hoisted_15$8 = { class: "text-xs text-gray-600" };
458
+ const _hoisted_16$5 = { class: "text-sm font-medium text-gray-900" };
459
459
  const _sfc_main$Q = {
460
460
  __name: "Items",
461
461
  props: {
@@ -529,7 +529,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
529
529
  ], 10, _hoisted_11$g)
530
530
  ])
531
531
  ]),
532
- vue.createElementVNode("div", _hoisted_12$d, [
532
+ vue.createElementVNode("div", _hoisted_12$e, [
533
533
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(dataRef.value.data, (item, index) => {
534
534
  return vue.openBlock(), vue.createElementBlock("div", {
535
535
  class: vue.normalizeClass(["flex items-center gap-4 px-2 py-1 hover:bg-gray-100 rounded-lg", { "bg-gray-200 hover:bg-gray-200": openItemStates.value[index] }])
@@ -544,8 +544,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
544
544
  class: "flex flex-1 flex-col cursor-pointer",
545
545
  onClick: ($event) => edit(item, index)
546
546
  }, [
547
- vue.createElementVNode("div", _hoisted_15$7, vue.toDisplayString(vue.unref(singularize)(vue.unref(parseName)(vue.unref(type)))) + " #" + vue.toDisplayString(index + 1), 1),
548
- vue.createElementVNode("div", _hoisted_16$4, vue.toDisplayString(item.title), 1)
547
+ vue.createElementVNode("div", _hoisted_15$8, vue.toDisplayString(vue.unref(singularize)(vue.unref(parseName)(vue.unref(type)))) + " #" + vue.toDisplayString(index + 1), 1),
548
+ vue.createElementVNode("div", _hoisted_16$5, vue.toDisplayString(item.title), 1)
549
549
  ], 8, _hoisted_14$9),
550
550
  vue.createVNode(_sfc_main$S, {
551
551
  onRemoveItem: ($event) => handleDeleteItem(index),
@@ -11704,7 +11704,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
11704
11704
  const _hoisted_9$m = ["href"];
11705
11705
  const _hoisted_10$i = { class: "file-upload-title" };
11706
11706
  const _hoisted_11$f = { class: "file-upload-file-remove" };
11707
- const _hoisted_12$c = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 p-4 rounded-lg flex flex-col justify-center items-center w-full" };
11707
+ const _hoisted_12$d = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 p-4 rounded-lg flex flex-col justify-center items-center w-full" };
11708
11708
  const _sfc_main$O = {
11709
11709
  __name: "FileUpload",
11710
11710
  props: {
@@ -11825,7 +11825,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
11825
11825
  ref_key: "dropzone",
11826
11826
  ref: dropzone2
11827
11827
  }, null, 512),
11828
- vue.createElementVNode("div", _hoisted_12$c, [
11828
+ vue.createElementVNode("div", _hoisted_12$d, [
11829
11829
  vue.createElementVNode("div", null, [
11830
11830
  vue.createVNode(vue.unref(UploadCloud), { class: "w-6 h-6" })
11831
11831
  ]),
@@ -45227,17 +45227,17 @@ ${escapeText(this.code(index, length))}
45227
45227
  const _hoisted_9$k = { class: "text-lg font-semibold text-gray-900" };
45228
45228
  const _hoisted_10$g = { class: "relative flex items-end" };
45229
45229
  const _hoisted_11$e = { class: "flex flex-col gap-6" };
45230
- const _hoisted_12$b = {
45230
+ const _hoisted_12$c = {
45231
45231
  key: 0,
45232
45232
  class: "flex gap-4"
45233
45233
  };
45234
45234
  const _hoisted_13$a = { class: "flex items-center gap-2 cursor-pointer" };
45235
45235
  const _hoisted_14$8 = ["name", "value", "onUpdate:modelValue", "onChange"];
45236
- const _hoisted_15$6 = {
45236
+ const _hoisted_15$7 = {
45237
45237
  key: 1,
45238
45238
  class: "flex flex-col gap-1.5"
45239
45239
  };
45240
- const _hoisted_16$3 = ["onUpdate:modelValue", "maxlength"];
45240
+ const _hoisted_16$4 = ["onUpdate:modelValue", "maxlength"];
45241
45241
  const _hoisted_17$2 = ["onUpdate:modelValue", "maxlength"];
45242
45242
  const _hoisted_18$2 = { key: 2 };
45243
45243
  const _sfc_main$C = {
@@ -45367,7 +45367,7 @@ ${escapeText(this.code(index, length))}
45367
45367
  ])
45368
45368
  ]),
45369
45369
  vue.createElementVNode("div", _hoisted_11$e, [
45370
- !((_a2 = componentData.value) == null ? void 0 : _a2.hasOwnProperty("has_type_switcher")) || ((_b = componentData.value) == null ? void 0 : _b.has_type_switcher) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$b, [
45370
+ !((_a2 = componentData.value) == null ? void 0 : _a2.hasOwnProperty("has_type_switcher")) || ((_b = componentData.value) == null ? void 0 : _b.has_type_switcher) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$c, [
45371
45371
  (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(options, (option) => {
45372
45372
  return vue.createElementVNode("label", _hoisted_13$a, [
45373
45373
  vue.withDirectives(vue.createElementVNode("input", {
@@ -45384,7 +45384,7 @@ ${escapeText(this.code(index, length))}
45384
45384
  ]);
45385
45385
  }), 64))
45386
45386
  ])) : vue.createCommentVNode("", true),
45387
- !item.hasOwnProperty("content_type") || item.content_type === "content" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15$6, [
45387
+ !item.hasOwnProperty("content_type") || item.content_type === "content" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15$7, [
45388
45388
  ["feature_items", "faqs", "pricing"].includes(componentData.value.type) ? (vue.openBlock(), vue.createBlock(_sfc_main$D, {
45389
45389
  key: 0,
45390
45390
  data: item
@@ -45408,7 +45408,7 @@ ${escapeText(this.code(index, length))}
45408
45408
  placeholder: "Title",
45409
45409
  maxlength: ((_a3 = componentData.value) == null ? void 0 : _a3.max_title) ?? 200,
45410
45410
  class: "border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
45411
- }, null, 8, _hoisted_16$3)), [
45411
+ }, null, 8, _hoisted_16$4)), [
45412
45412
  [vue.vModelText, item.title]
45413
45413
  ]) : vue.createCommentVNode("", true),
45414
45414
  isBulletPoint.value ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", {
@@ -45482,7 +45482,7 @@ ${escapeText(this.code(index, length))}
45482
45482
  const _hoisted_9$j = { class: "relative flex items-end" };
45483
45483
  const _hoisted_10$f = { class: "flex flex-col gap-6" };
45484
45484
  const _hoisted_11$d = { class: "flex flex-col gap-1.5" };
45485
- const _hoisted_12$a = ["onUpdate:modelValue"];
45485
+ const _hoisted_12$b = ["onUpdate:modelValue"];
45486
45486
  const _sfc_main$B = {
45487
45487
  __name: "Logos",
45488
45488
  props: {
@@ -45584,7 +45584,7 @@ ${escapeText(this.code(index, length))}
45584
45584
  type: "text",
45585
45585
  placeholder: "Enter your url",
45586
45586
  class: "border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
45587
- }, null, 8, _hoisted_12$a), [
45587
+ }, null, 8, _hoisted_12$b), [
45588
45588
  [vue.vModelText, item.url]
45589
45589
  ])
45590
45590
  ]),
@@ -45768,8 +45768,9 @@ ${escapeText(this.code(index, length))}
45768
45768
  const _hoisted_7$j = { class: "flex items-center justify-between" };
45769
45769
  const _hoisted_8$i = { class: "text-lg font-semibold text-gray-900" };
45770
45770
  const _hoisted_9$i = { class: "relative flex items-end" };
45771
- const _hoisted_10$e = { class: "flex flex-col gap-6" };
45772
- const _hoisted_11$c = { class: "flex flex-col gap-1.5" };
45771
+ const _hoisted_10$e = ["onUpdate:modelValue"];
45772
+ const _hoisted_11$c = { class: "flex flex-col gap-6" };
45773
+ const _hoisted_12$a = { class: "flex flex-col gap-1.5" };
45773
45774
  const _sfc_main$y = {
45774
45775
  __name: "VideoGrid",
45775
45776
  props: {
@@ -45844,8 +45845,29 @@ ${escapeText(this.code(index, length))}
45844
45845
  }, null, 8, ["onRemoveItem"])
45845
45846
  ])
45846
45847
  ]),
45847
- vue.createElementVNode("div", _hoisted_10$e, [
45848
- vue.createElementVNode("div", _hoisted_11$c, [
45848
+ vue.createVNode(_sfc_main$P, {
45849
+ "is-vertical": "",
45850
+ field: "line.title",
45851
+ "label-text": "Youtube URL",
45852
+ class: "w-full",
45853
+ value: item.youtube_url
45854
+ }, {
45855
+ default: vue.withCtx(() => [
45856
+ vue.withDirectives(vue.createElementVNode("input", {
45857
+ "onUpdate:modelValue": ($event) => item.youtube_url = $event,
45858
+ name: "youtube_url.youtube_url",
45859
+ type: "text",
45860
+ placeholder: "Url",
45861
+ class: "border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
45862
+ }, null, 8, _hoisted_10$e), [
45863
+ [vue.vModelText, item.youtube_url]
45864
+ ])
45865
+ ]),
45866
+ _: 2
45867
+ }, 1032, ["value"]),
45868
+ _cache[1] || (_cache[1] = vue.createElementVNode("p", null, "OR", -1)),
45869
+ vue.createElementVNode("div", _hoisted_11$c, [
45870
+ vue.createElementVNode("div", _hoisted_12$a, [
45849
45871
  vue.createVNode(vue.unref(VFileUpload), {
45850
45872
  name: "image",
45851
45873
  type: "video",
@@ -46170,11 +46192,11 @@ ${escapeText(this.code(index, length))}
46170
46192
  const _hoisted_12$9 = { class: "text-sm font-medium text-gray-900" };
46171
46193
  const _hoisted_13$9 = { class: "flex items-center justify-between gap-3 px-[10px]" };
46172
46194
  const _hoisted_14$7 = { class: "flex h-full flex-1 flex-col mb-20" };
46173
- const _hoisted_15$5 = {
46195
+ const _hoisted_15$6 = {
46174
46196
  key: 0,
46175
46197
  class: "mb-4 px-6 py-5 rounded-xl bg-gray-50"
46176
46198
  };
46177
- const _hoisted_16$2 = { class: "flex flex-col gap-1 pt-6 text-gray-600" };
46199
+ const _hoisted_16$3 = { class: "flex flex-col gap-1 pt-6 text-gray-600" };
46178
46200
  const _hoisted_17$1 = ["value"];
46179
46201
  const _hoisted_18$1 = {
46180
46202
  key: 1,
@@ -46315,9 +46337,9 @@ ${escapeText(this.code(index, length))}
46315
46337
  }), 256))
46316
46338
  ]),
46317
46339
  vue.createElementVNode("div", _hoisted_14$7, [
46318
- !vue.unref(selected) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15$5, [
46340
+ !vue.unref(selected) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15$6, [
46319
46341
  _cache[3] || (_cache[3] = vue.createElementVNode("div", { class: "text-lg pb-6 font-semibold text-gray-900 border-b border-gray-200" }, "Settings", -1)),
46320
- vue.createElementVNode("div", _hoisted_16$2, [
46342
+ vue.createElementVNode("div", _hoisted_16$3, [
46321
46343
  vue.createVNode(_sfc_main$P, {
46322
46344
  field: "breadcrumb",
46323
46345
  "label-text": "Breadcrumb section",
@@ -47829,15 +47851,15 @@ ${escapeText(this.code(index, length))}
47829
47851
  };
47830
47852
  }
47831
47853
  });
47832
- const _hoisted_1$M = { class: "flex h-[614px] sm:h-[550px] md:h-[806px] lg:h-[872px] w-full bg-navy-800 relative rounded-3xl lg:rounded-[48px] z-10" };
47854
+ const _hoisted_1$M = { class: "flex h-[494px] sm:h-[550px] md:h-[806px] lg:h-[872px] w-full bg-navy-800 relative rounded-[24px] lg:rounded-[48px] z-10" };
47833
47855
  const _hoisted_2$m = { class: "flex-1 lg:p-8 px-4 lg:py-4 flex max-lg:flex-col-reverse relative w-full" };
47834
- const _hoisted_3$j = { class: "flex-1 lg:w-1/2 lg:pl-8 lg:pr-16 flex flex-col mt-8 sm:mt-14 lg:mt-[218px]" };
47856
+ const _hoisted_3$j = { class: "flex-1 lg:w-1/2 lg:pl-8 lg:pr-16 flex flex-col mt-7 sm:mt-14 lg:mt-[218px]" };
47835
47857
  const _hoisted_4$j = { class: "gap-2 flex z-10 mb-4" };
47836
47858
  const _hoisted_5$i = ["onClick"];
47837
47859
  const _hoisted_6$i = { class: "text-[30px] lg:text-[48px] font-semibold text-white mb-3 lg:leading-normal leading-[48px]" };
47838
47860
  const _hoisted_7$h = { class: "max-md:flex-1" };
47839
47861
  const _hoisted_8$g = ["innerHTML"];
47840
- const _hoisted_9$g = { class: "flex gap-3 md:mt-8 max-sm:flex-col" };
47862
+ const _hoisted_9$g = { class: "flex gap-3 mt-4 md:mt-8" };
47841
47863
  const _hoisted_10$c = ["href", "target"];
47842
47864
  const _hoisted_11$a = ["href", "target"];
47843
47865
  const _hoisted_12$8 = ["src"];
@@ -47886,14 +47908,14 @@ ${escapeText(this.code(index, length))}
47886
47908
  vue.createElementVNode("h3", _hoisted_6$i, vue.toDisplayString(slide == null ? void 0 : slide.title), 1),
47887
47909
  vue.createElementVNode("div", _hoisted_7$h, [
47888
47910
  vue.createElementVNode("p", {
47889
- class: "lg:text-lg font-normal text-navy-50 overflow-hidden line-clamp-6 sm:line-clamp-3",
47911
+ class: "lg:text-lg font-normal text-navy-50 overflow-hidden line-clamp-4 sm:line-clamp-3",
47890
47912
  innerHTML: slide == null ? void 0 : slide.description
47891
47913
  }, null, 8, _hoisted_8$g)
47892
47914
  ]),
47893
47915
  vue.createElementVNode("div", _hoisted_9$g, [
47894
47916
  slide.secondary_button.show ? (vue.openBlock(), vue.createElementBlock("a", {
47895
47917
  key: 0,
47896
- class: "text-white text-base font-semibold border border-white px-6 py-2 rounded-full hover:bg-navy-800 hover:opacity-60",
47918
+ class: "text-white text-base font-semibold border border-white px-4 sm:px-6 py-2 rounded-full hover:bg-navy-800 hover:opacity-60",
47897
47919
  href: vue.unref(formatUrl)(slide.secondary_button.url),
47898
47920
  target: slide.secondary_button.open_in_new_tab ? "_blank" : ""
47899
47921
  }, [
@@ -47901,7 +47923,7 @@ ${escapeText(this.code(index, length))}
47901
47923
  ], 8, _hoisted_10$c)) : vue.createCommentVNode("", true),
47902
47924
  slide.primary_button.show ? (vue.openBlock(), vue.createElementBlock("a", {
47903
47925
  key: 1,
47904
- class: "flex items-center gap-2 text-navy-800 bg-white text-base font-semibold border border-white px-6 py-2 rounded-full hover:bg-navy-50",
47926
+ class: "flex items-center gap-2 text-navy-800 bg-white text-base font-semibold border border-white px-4 sm:px-6 py-2 rounded-full hover:bg-navy-50",
47905
47927
  href: vue.unref(formatUrl)(slide.primary_button.url),
47906
47928
  target: slide.primary_button.open_in_new_tab ? "_blank" : ""
47907
47929
  }, [
@@ -47931,7 +47953,7 @@ ${escapeText(this.code(index, length))}
47931
47953
  };
47932
47954
  }
47933
47955
  };
47934
- const VSliderPresenter = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-29ca6047"]]);
47956
+ const VSliderPresenter = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-37e27419"]]);
47935
47957
  const _hoisted_1$L = ["target", "href"];
47936
47958
  const _sfc_main$r = {
47937
47959
  __name: "LinkPresenter",
@@ -48458,11 +48480,11 @@ ${escapeText(this.code(index, length))}
48458
48480
  const _hoisted_12$7 = { class: "border-t border-gray-200 mt-4 pt-[17px] flex justify-between items-center" };
48459
48481
  const _hoisted_13$7 = ["href"];
48460
48482
  const _hoisted_14$6 = { class: "absolute max-sm:bottom-0 sm:top-[-65px] right-0 lg:right-4 flex gap-4" };
48461
- const _hoisted_15$4 = {
48483
+ const _hoisted_15$5 = {
48462
48484
  key: 0,
48463
48485
  class: "flex sm:justify-center mb-6 lg:mb-10"
48464
48486
  };
48465
- const _hoisted_16$1 = ["href", "target"];
48487
+ const _hoisted_16$2 = ["href", "target"];
48466
48488
  const _sfc_main$j = {
48467
48489
  __name: "CarouselPresenter",
48468
48490
  props: {
@@ -48608,7 +48630,7 @@ ${escapeText(this.code(index, length))}
48608
48630
  vue.createVNode(vue.unref(ChevronRight), { class: "w-6 h-6" })
48609
48631
  ], 2)
48610
48632
  ]),
48611
- ((_a2 = __props.component) == null ? void 0 : _a2.button) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15$4, [
48633
+ ((_a2 = __props.component) == null ? void 0 : _a2.button) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15$5, [
48612
48634
  vue.createElementVNode("a", {
48613
48635
  class: "border-brand-300 hover:border-brand-700 border text-brand-700 h-[44px] rounded-full px-[14px] py-[10px] inline-flex gap-1.5 items-center font-semibold text-base",
48614
48636
  href: vue.unref(formatUrl)(__props.component.button.url),
@@ -48616,7 +48638,7 @@ ${escapeText(this.code(index, length))}
48616
48638
  }, [
48617
48639
  vue.createTextVNode(vue.toDisplayString(__props.component.button.title) + " ", 1),
48618
48640
  vue.createVNode(vue.unref(ArrowUpRight), { class: "w-5 h-5" })
48619
- ], 8, _hoisted_16$1)
48641
+ ], 8, _hoisted_16$2)
48620
48642
  ])) : vue.createCommentVNode("", true)
48621
48643
  ]);
48622
48644
  };
@@ -48683,31 +48705,36 @@ ${escapeText(this.code(index, length))}
48683
48705
  const _hoisted_1$v = { class: "grid grid-cols-1 md:grid-cols-3 gap-6 w-full" };
48684
48706
  const _hoisted_2$f = {
48685
48707
  key: 0,
48686
- class: "relative group"
48708
+ class: "relative group w-full object-cover rounded-lg md:rounded-2xl overflow-hidden"
48709
+ };
48710
+ const _hoisted_3$f = {
48711
+ key: 0,
48712
+ class: "w-full h-[281px] md:rounded-2xl"
48687
48713
  };
48688
- const _hoisted_3$f = ["onClick"];
48689
48714
  const _hoisted_4$f = ["src"];
48690
- const _hoisted_5$f = ["src"];
48691
- const _hoisted_6$f = {
48715
+ const _hoisted_5$f = ["onClick"];
48716
+ const _hoisted_6$f = ["src"];
48717
+ const _hoisted_7$e = ["src"];
48718
+ const _hoisted_8$d = {
48692
48719
  key: 2,
48693
48720
  class: "w-full h-[281px] object-cover rounded-lg md:rounded-2xl mb-4",
48694
48721
  alt: "No Available",
48695
48722
  src: _imports_0
48696
48723
  };
48697
- const _hoisted_7$e = { class: "flex flex-col gap-2 items-start text-left w-full" };
48698
- const _hoisted_8$d = {
48724
+ const _hoisted_9$d = { class: "flex flex-col gap-2 items-start text-left w-full" };
48725
+ const _hoisted_10$9 = {
48699
48726
  key: 0,
48700
48727
  class: "flex gap-2"
48701
48728
  };
48702
- const _hoisted_9$d = ["href"];
48703
- const _hoisted_10$9 = { class: "flex justify-between" };
48704
- const _hoisted_11$8 = ["innerHTML"];
48705
- const _hoisted_12$6 = { class: "text-gray-500 text-sm mb-4" };
48706
- const _hoisted_13$6 = {
48729
+ const _hoisted_11$8 = ["href"];
48730
+ const _hoisted_12$6 = { class: "flex justify-between" };
48731
+ const _hoisted_13$6 = ["innerHTML"];
48732
+ const _hoisted_14$5 = { class: "text-gray-500 text-sm mb-4" };
48733
+ const _hoisted_15$4 = {
48707
48734
  key: 0,
48708
48735
  class: "flex justify-center"
48709
48736
  };
48710
- const _hoisted_14$5 = ["href", "target"];
48737
+ const _hoisted_16$1 = ["href", "target"];
48711
48738
  const _sfc_main$h = {
48712
48739
  __name: "CollectionGridPresenter",
48713
48740
  props: {
@@ -48744,6 +48771,13 @@ ${escapeText(this.code(index, length))}
48744
48771
  videoRefs.value[index] = el;
48745
48772
  }
48746
48773
  };
48774
+ const getEmbedUrl = (item) => {
48775
+ if (!item.youtube_url) return null;
48776
+ const m = item.youtube_url.match(/(?:youtube\.com\/(?:.*v=|v\/|embed\/)|youtu\.be\/)([A-Za-z0-9_-]{11})/);
48777
+ const id = m ? m[1] : null;
48778
+ if (!id) return null;
48779
+ return `https://www.youtube.com/embed/${id}`;
48780
+ };
48747
48781
  return (_ctx, _cache) => {
48748
48782
  var _a2, _b2;
48749
48783
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -48753,35 +48787,45 @@ ${escapeText(this.code(index, length))}
48753
48787
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(items), (card, index) => {
48754
48788
  return vue.openBlock(), vue.createElementBlock("div", {
48755
48789
  key: index,
48756
- class: "card bg-white sm:p-0 px-4"
48790
+ class: "card bg-white sm:p-0 px-4 w-full"
48757
48791
  }, [
48758
48792
  __props.component.type === "video_grid" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$f, [
48759
- vue.createElementVNode("video", {
48760
- onClick: ($event) => togglePlayPause(index),
48761
- ref_for: true,
48762
- ref: (el) => setVideoRef(el, index),
48763
- class: "w-full h-[281px] object-cover rounded-lg md:rounded-2xl",
48764
- width: "640",
48765
- height: "360",
48766
- preload: "metadata"
48767
- }, [
48768
- vue.createElementVNode("source", {
48769
- src: `${card.video}#t=2`
48793
+ (card == null ? void 0 : card.youtube_url) && getEmbedUrl(card) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$f, [
48794
+ vue.createElementVNode("iframe", {
48795
+ src: getEmbedUrl(card),
48796
+ frameborder: "0",
48797
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
48798
+ allowfullscreen: "",
48799
+ class: "w-full h-full"
48770
48800
  }, null, 8, _hoisted_4$f)
48771
- ], 8, _hoisted_3$f),
48772
- !isPlaying.value[index] ? (vue.openBlock(), vue.createBlock(vue.unref(PlayButton), {
48773
- key: 0,
48774
- class: "cursor-pointer absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 group-hover:opacity-100 transition-opacity",
48775
- onClick: ($event) => togglePlayPause(index)
48776
- }, null, 8, ["onClick"])) : vue.createCommentVNode("", true)
48801
+ ])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
48802
+ vue.createElementVNode("video", {
48803
+ onClick: ($event) => togglePlayPause(index),
48804
+ ref_for: true,
48805
+ ref: (el) => setVideoRef(el, index),
48806
+ class: "w-full h-[281px] object-cover rounded-lg md:rounded-2xl",
48807
+ width: "640",
48808
+ height: "360",
48809
+ preload: "metadata"
48810
+ }, [
48811
+ vue.createElementVNode("source", {
48812
+ src: `${card.video}#t=2`
48813
+ }, null, 8, _hoisted_6$f)
48814
+ ], 8, _hoisted_5$f),
48815
+ !isPlaying.value[index] ? (vue.openBlock(), vue.createBlock(vue.unref(PlayButton), {
48816
+ key: 0,
48817
+ class: "cursor-pointer absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 group-hover:opacity-100 transition-opacity",
48818
+ onClick: ($event) => togglePlayPause(index)
48819
+ }, null, 8, ["onClick"])) : vue.createCommentVNode("", true)
48820
+ ], 64))
48777
48821
  ])) : card.image ? (vue.openBlock(), vue.createElementBlock("img", {
48778
48822
  key: 1,
48779
48823
  src: card.image,
48780
48824
  alt: "Card Image",
48781
48825
  class: "w-full h-[281px] object-cover rounded-lg md:rounded-2xl mb-4"
48782
- }, null, 8, _hoisted_5$f)) : (vue.openBlock(), vue.createElementBlock("img", _hoisted_6$f)),
48783
- vue.createElementVNode("div", _hoisted_7$e, [
48784
- card.categories && card.categories.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$d, [
48826
+ }, null, 8, _hoisted_7$e)) : (vue.openBlock(), vue.createElementBlock("img", _hoisted_8$d)),
48827
+ vue.createElementVNode("div", _hoisted_9$d, [
48828
+ card.categories && card.categories.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$9, [
48785
48829
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(card.categories, (tag) => {
48786
48830
  return vue.openBlock(), vue.createElementBlock("span", {
48787
48831
  key: tag,
@@ -48800,20 +48844,20 @@ ${escapeText(this.code(index, length))}
48800
48844
  target: "_blank",
48801
48845
  rel: "noopener noreferrer"
48802
48846
  }, [
48803
- vue.createElementVNode("div", _hoisted_10$9, [
48847
+ vue.createElementVNode("div", _hoisted_12$6, [
48804
48848
  vue.createElementVNode("span", {
48805
48849
  class: "w-5/6 leading-[28px]",
48806
48850
  innerHTML: card.title
48807
- }, null, 8, _hoisted_11$8),
48851
+ }, null, 8, _hoisted_13$6),
48808
48852
  vue.createVNode(vue.unref(ArrowUpRight), { class: "w-5 h-5 mt-1" })
48809
48853
  ])
48810
- ], 8, _hoisted_9$d)) : vue.createCommentVNode("", true),
48811
- vue.createElementVNode("p", _hoisted_12$6, vue.toDisplayString(card.dateTime), 1)
48854
+ ], 8, _hoisted_11$8)) : vue.createCommentVNode("", true),
48855
+ vue.createElementVNode("p", _hoisted_14$5, vue.toDisplayString(card.dateTime), 1)
48812
48856
  ])
48813
48857
  ]);
48814
48858
  }), 128))
48815
48859
  ]),
48816
- Object.keys(vue.unref(button)).length && ((_b2 = vue.unref(button)) == null ? void 0 : _b2.show) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13$6, [
48860
+ Object.keys(vue.unref(button)).length && ((_b2 = vue.unref(button)) == null ? void 0 : _b2.show) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15$4, [
48817
48861
  vue.createElementVNode("a", {
48818
48862
  class: "border-brand-300 hover:border-brand-700 border text-brand-700 h-[44px] rounded-full px-[14px] py-[10px] inline-flex gap-1.5 items-center font-semibold text-base",
48819
48863
  href: vue.unref(formatUrl)(vue.unref(button).url),
@@ -48821,13 +48865,13 @@ ${escapeText(this.code(index, length))}
48821
48865
  }, [
48822
48866
  vue.createTextVNode(vue.toDisplayString(vue.unref(button).title) + " ", 1),
48823
48867
  vue.createVNode(vue.unref(ArrowUpRight), { class: "w-5 h-5" })
48824
- ], 8, _hoisted_14$5)
48868
+ ], 8, _hoisted_16$1)
48825
48869
  ])) : vue.createCommentVNode("", true)
48826
48870
  ], 2);
48827
48871
  };
48828
48872
  }
48829
48873
  };
48830
- const CollectionGridPresenter = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-b6625ed3"]]);
48874
+ const CollectionGridPresenter = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-77dcb437"]]);
48831
48875
  const _hoisted_1$u = { class: "overflow-hidden" };
48832
48876
  const _sfc_main$g = {
48833
48877
  __name: "CollectionGrid",
@@ -49101,7 +49145,7 @@ ${escapeText(this.code(index, length))}
49101
49145
  const _hoisted_13$5 = ["src"];
49102
49146
  const _hoisted_14$4 = {
49103
49147
  key: 0,
49104
- class: "w-full md:w-[560px] flex"
49148
+ class: "w-full md:w-[560px] rounded-br-[24px] rounded-tl-[24px] overflow-hidden relative max-lg:pt-[55%]"
49105
49149
  };
49106
49150
  const _hoisted_15$3 = ["src", "alt"];
49107
49151
  const _sfc_main$d = {
@@ -49229,7 +49273,7 @@ ${escapeText(this.code(index, length))}
49229
49273
  vue.createElementVNode("img", {
49230
49274
  src: imageComponent.value.featured_image,
49231
49275
  alt: ((_d = imageComponent.value) == null ? void 0 : _d.caption) ?? "Image",
49232
- class: "rounded-br-[24px] rounded-tl-[24px] w-full object-cover"
49276
+ class: "w-full h-full object-cover max-lg:absolute inset-0"
49233
49277
  }, null, 8, _hoisted_15$3)
49234
49278
  ])) : vue.createCommentVNode("", true)
49235
49279
  ], 2)
@@ -49602,14 +49646,18 @@ ${escapeText(this.code(index, length))}
49602
49646
  vue.createElementVNode("div", {
49603
49647
  class: vue.normalizeClass(["pb-container my-[40px]", { "flex gap-8 flex-col lg:flex-row": (_c = headerComponent.value) == null ? void 0 : _c.featured_image, "flex-col-reverse lg:flex-row-reverse justify-between": (_d = headerComponent.value) == null ? void 0 : _d.revert }])
49604
49648
  }, [
49605
- ((_e = headerComponent.value) == null ? void 0 : _e.featured_image) ? (vue.openBlock(), vue.createElementBlock("img", {
49649
+ ((_e = headerComponent.value) == null ? void 0 : _e.featured_image) ? (vue.openBlock(), vue.createElementBlock("div", {
49606
49650
  key: 0,
49607
- src: (_f = headerComponent.value) == null ? void 0 : _f.featured_image,
49608
- class: "lg:max-w-[480px] w-full object-cover rounded-xl md:rounded-3xl",
49609
49651
  ref_key: "leftColumn",
49610
49652
  ref: leftColumn,
49611
- alt: "Feature"
49612
- }, null, 8, _hoisted_2$8)) : vue.createCommentVNode("", true),
49653
+ class: "w-full lg:max-w-[480px] rounded-xl md:rounded-3xl overflow-hidden shrink-0 relative max-lg:pt-[55%]"
49654
+ }, [
49655
+ vue.createElementVNode("img", {
49656
+ src: (_f = headerComponent.value) == null ? void 0 : _f.featured_image,
49657
+ class: "w-full h-full object-cover max-lg:absolute inset-0",
49658
+ alt: "Feature"
49659
+ }, null, 8, _hoisted_2$8)
49660
+ ], 512)) : vue.createCommentVNode("", true),
49613
49661
  headerComponent.value ? (vue.openBlock(), vue.createElementBlock("div", {
49614
49662
  key: 1,
49615
49663
  class: vue.normalizeClass(["h-fit flex flex-col gap-4 lg:gap-8", { "xl:py-[48px]": (_g = headerComponent.value) == null ? void 0 : _g.featured_image, "[&]:grid lg:grid-cols-2": (_h = section.value) == null ? void 0 : _h.two_column }]),
@@ -79,7 +79,7 @@ export const AboutUs = {
79
79
  type: "header",
80
80
  title: "Support Services",
81
81
  icon: "AlertCircle",
82
- featured_image: "https://beta-public.elaa.org.au/fileman/Page Builder/untitled-design-30.png"
82
+ featured_image: "https://beta-public.elaa.org.au/fileman/Page Builder/kinglakeselects-final-02684.jpg"
83
83
  },
84
84
  {
85
85
  name: "Bullet Points",
@@ -127,4 +127,4 @@ export const AboutUs = {
127
127
  ]
128
128
  },
129
129
  ]
130
- };
130
+ };
@@ -192,6 +192,7 @@ export const BestLife = {
192
192
  data: [
193
193
  {
194
194
  video: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4",
195
+ youtube_url: "https://www.youtube.com/watch?v=cEpTYBuR7vY",
195
196
  },
196
197
  {
197
198
  video: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcodegroup-au/page-builder",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./dist/page-builder.es.js"
@@ -37,6 +37,22 @@
37
37
  <ActionMenu @removeItem="handleDeleteItem(index)"/>
38
38
  </div>
39
39
  </div>
40
+ <InputWrapper
41
+ is-vertical
42
+ field="line.title"
43
+ label-text="Youtube URL"
44
+ class="w-full"
45
+ :value="item.youtube_url"
46
+ >
47
+ <input
48
+ v-model="item.youtube_url"
49
+ name="youtube_url.youtube_url"
50
+ type="text"
51
+ placeholder="Url"
52
+ class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
53
+ />
54
+ </InputWrapper>
55
+ <p>OR</p>
40
56
  <div class="flex flex-col gap-6">
41
57
  <div class="flex flex-col gap-1.5">
42
58
  <VFileUpload
@@ -59,6 +75,7 @@ import {defaultProps} from "@/components/helpers/defaultProps";
59
75
  import ActionMenu from "@/components/common/ActionMenu.vue";
60
76
  import VModal from "@/components/common/Modal.vue";
61
77
  import DefaultFileUpload from "@/components/common/FileUpload.vue";
78
+ import InputWrapper from "@/components/common/InputWrapper.vue";
62
79
 
63
80
  // Inject the FileUpload component or fallback to the default one
64
81
  const VFileUpload = inject("VFileUpload", DefaultFileUpload);
@@ -1,24 +1,35 @@
1
1
  <template>
2
2
  <div class="flex flex-col items-center gap-6 pb-[40px] pt-[24px]" :class="{'!pt-0': component.hasOwnProperty('padding_top') && !component?.padding_top}">
3
3
  <div class="grid grid-cols-1 md:grid-cols-3 gap-6 w-full">
4
- <div v-for="(card, index) in items" :key="index" class="card bg-white sm:p-0 px-4">
5
- <div v-if="component.type === 'video_grid'" class="relative group">
6
- <video
7
- @click="togglePlayPause(index)"
8
- :ref="(el) => setVideoRef(el, index)"
9
- class="w-full h-[281px] object-cover rounded-lg md:rounded-2xl"
10
- width="640"
11
- height="360"
12
- preload="metadata"
13
- >
14
- <source :src="`${card.video}#t=2`" />
15
- </video>
16
- <PlayButton
17
- v-if="!isPlaying[index]"
18
- class="cursor-pointer absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 group-hover:opacity-100 transition-opacity"
19
- @click="togglePlayPause(index)">
4
+ <div v-for="(card, index) in items" :key="index" class="card bg-white sm:p-0 px-4 w-full">
5
+ <div v-if="component.type === 'video_grid'" class="relative group w-full object-cover rounded-lg md:rounded-2xl overflow-hidden">
6
+ <div v-if="card?.youtube_url && getEmbedUrl(card)" class="w-full h-[281px] md:rounded-2xl">
7
+ <iframe
8
+ :src="getEmbedUrl(card)"
9
+ frameborder="0"
10
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
11
+ allowfullscreen
12
+ class="w-full h-full"
13
+ ></iframe>
14
+ </div>
15
+ <template v-else>
16
+ <video
17
+ @click="togglePlayPause(index)"
18
+ :ref="(el) => setVideoRef(el, index)"
19
+ class="w-full h-[281px] object-cover rounded-lg md:rounded-2xl"
20
+ width="640"
21
+ height="360"
22
+ preload="metadata"
23
+ >
24
+ <source :src="`${card.video}#t=2`" />
25
+ </video>
26
+ <PlayButton
27
+ v-if="!isPlaying[index]"
28
+ class="cursor-pointer absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 group-hover:opacity-100 transition-opacity"
29
+ @click="togglePlayPause(index)">
20
30
 
21
- </PlayButton>
31
+ </PlayButton>
32
+ </template>
22
33
  </div>
23
34
  <img
24
35
  v-else-if="card.image"
@@ -114,6 +125,16 @@ const setVideoRef = (el, index) => {
114
125
  videoRefs.value[index] = el;
115
126
  }
116
127
  };
128
+
129
+ const getEmbedUrl = (item) => {
130
+ if (!item.youtube_url) return null;
131
+ // match common YouTube URL formats and extract the 11-char id
132
+ const m = item.youtube_url.match(/(?:youtube\.com\/(?:.*v=|v\/|embed\/)|youtu\.be\/)([A-Za-z0-9_-]{11})/);
133
+ const id = m ? m[1] : null;
134
+ if (!id) return null;
135
+ return `https://www.youtube.com/embed/${id}`;
136
+ };
137
+
117
138
  </script>
118
139
 
119
140
  <style scoped>