@dcodegroup-au/page-builder 0.4.2 → 0.4.3

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.
@@ -232,11 +232,6 @@ const addLine = () => {
232
232
  advancedForm.value.lines.push({title: "", description: ""});
233
233
  };
234
234
 
235
- const removeLine = (index) => {
236
- advancedForm.value.lines.splice(index, 1);
237
- this.save();
238
- };
239
-
240
235
  const save = () => {
241
236
  let form = hasLines.value ? advancedForm : basicForm;
242
237
 
@@ -254,6 +249,11 @@ const save = () => {
254
249
  emit("update", form.value);
255
250
  };
256
251
 
252
+ const removeLine = (index) => {
253
+ advancedForm.value.lines.splice(index, 1);
254
+ save();
255
+ };
256
+
257
257
  const close = () => {
258
258
  let form = hasLines.value ? advancedForm : basicForm;
259
259
  emit("close", form.value);
@@ -2,21 +2,21 @@
2
2
  <div class="overflow-hidden">
3
3
  <div class="max-w-[1640px] md:px-[120px] mx-auto w-full mt-[40px]"
4
4
  :class="{'flex gap-8': headerComponent?.featured_image}">
5
- <div class="w-1/3">
5
+ <div class="max-w-[33.3%] w-full min-h-[320px]">
6
6
  <img v-if="imageComponent && section?.acknowledgement_style"
7
7
  :src="imageComponent.featured_image" :alt="imageComponent?.caption ?? 'Image'"
8
- class="w-[560px] object-cover rounded-[24px]"/>
8
+ class="w-[560px] object-cover rounded-[24px] h-full"/>
9
9
  <img v-if="headerComponent?.featured_image && !section?.acknowledgement_style"
10
10
  :src="headerComponent?.featured_image"
11
- class="w-[560px] object-cover rounded-[24px]"
11
+ class="w-[560px] object-cover rounded-[24px] h-full"
12
12
  alt="Feature"/>
13
13
  </div>
14
14
 
15
15
  <div v-if="headerComponent"
16
16
  class="rounded-[24px] flex items-center justify-center flex-col"
17
17
  :class="{
18
- 'bg-pale-100 min-h-[320px] w-2/3': !headerComponent?.featured_image,
19
- 'border border-brand-400 w-2/3': headerComponent?.featured_image,
18
+ 'bg-pale-100 min-h-[320px] w-full': !headerComponent?.featured_image,
19
+ 'border border-brand-400 w-full py-8': headerComponent?.featured_image,
20
20
  'w-full ': !section?.acknowledgement_style,
21
21
  'bg-gray-100 border-none': section?.acknowledgement_style,
22
22
  }"
@@ -6,20 +6,22 @@
6
6
  <div v-if="headerComponent?.supporting_text" class="text-[20px] font-normal mt-2 text-gray-600 leading-[30px] max-w-[768px] mx-auto" v-html="headerComponent.supporting_text"></div>
7
7
  </div>
8
8
  <div v-if="cardComponent" class="flex w-full" :class="{'gap-8': headerComponent?.featured_image}">
9
- <img v-if="headerComponent?.featured_image"
10
- :src="headerComponent?.featured_image"
11
- class="w-1/2 rounded-br-[24px] rounded-tl-[24px] object-cover"
12
- alt="Feature"/>
13
- <div class="flex gap-8 w-full" :class="{'!w-1/2 flex-col': headerComponent?.featured_image}">
9
+ <div class="w-full" ref="leftColumn" v-if="headerComponent?.featured_image">
10
+ <img
11
+ :src="headerComponent?.featured_image"
12
+ class="rounded-br-[24px] rounded-tl-[24px] h-full w-full object-cover"
13
+ alt="Feature"/>
14
+ </div>
15
+ <div class="flex gap-8 w-full" ref="rightColumn" :class="{'flex-col h-fit': headerComponent?.featured_image}">
14
16
  <div v-for="(data, index) in cardComponent.data" class="relative bg-white p-8 rounded-[24px] w-full">
15
17
  <div v-if="data.icon" class="w-[48px] h-[48px] flex justify-center items-center rounded-[10px] text-white bg-aqua-900 mb-4">
16
18
  <IconComponent :icon="data.icon" icon-classes="w-5 h-5" :key="index"></IconComponent>
17
19
  </div>
18
20
  <h1 class="text-[20px] font-semibold text-gray-900">{{ data.title }}</h1>
19
- <div class="text-lg text-gray-600 mt-2 mb-4 leading-[24px]" v-html="data.description"></div>
21
+ <div class="text-lg text-gray-600 mt-2 leading-[24px]" v-html="data.description"></div>
20
22
  <a
21
- v-if="data?.primary_button.url"
22
- class="text-brand-700 inline-flex gap-1.5 items-center font-semibold text-base"
23
+ v-if="data?.primary_button.show"
24
+ class="text-brand-700 inline-flex gap-1.5 items-center font-semibold text-base mt-4"
23
25
  :href="formatUrl(data.primary_button.url)"
24
26
  :target="data.primary_button.open_in_new_tab ? '_blank' : ''">
25
27
  {{ data.primary_button.label }}
@@ -31,8 +33,9 @@
31
33
  </div>
32
34
  </div>
33
35
  </template>
36
+
34
37
  <script setup>
35
- import {ref, computed} from "vue";
38
+ import { ref, computed, onMounted } from "vue";
36
39
  import ArrowUpRight from "@/assets/img/icons/arrow-up-right.svg";
37
40
  import IconComponent from "@/components/common/Icon.vue";
38
41
  import { formatUrl } from "@/components/helpers/common";
@@ -52,4 +55,12 @@ const cardComponent = computed(() => {
52
55
  return section.value.components.find((component) => component.type === "link_cards");
53
56
  });
54
57
 
58
+ const leftColumn = ref(null);
59
+ const rightColumn = ref(null);
60
+
61
+ onMounted(() => {
62
+ if (leftColumn.value && rightColumn.value) {
63
+ leftColumn.value.style.height = `${rightColumn.value.offsetHeight}px`;
64
+ }
65
+ });
55
66
  </script>
@@ -24,7 +24,7 @@
24
24
  <div class="flex flex-row gap-8">
25
25
  <div class="grid grid-cols-2 gap-8 w-2/3">
26
26
  <div v-for="item in featureItemsComponent.data" class="flex gap-3">
27
- <div v-if="item?.icon" class="w-[48px] h-[48px] bg-brand-100 border-[8px] border-brand-50 rounded-full flex items-center justify-center">
27
+ <div v-if="item?.icon" class="max-w-[48px] min-w-[48px] w-full h-[48px] bg-brand-100 border-[8px] border-brand-50 rounded-full flex items-center justify-center">
28
28
  <IconComponent :icon="item.icon" icon-classes="w-5 h-5 text-brand-600"></IconComponent>
29
29
  </div>
30
30
  <div class="max-w-[324px]">