@dcodegroup-au/page-builder 0.5.0 → 0.5.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.
@@ -8,6 +8,7 @@ import {OurHistory} from "./pages/OurHistory.js";
8
8
  import {ChildSafeStandard} from "./pages/ChildSafeStandard.js";
9
9
  import {AdvisoryServices} from "./pages/AdvisoryService.js";
10
10
  import {PartnerWithUs} from "./pages/PartnerWithUs.js";
11
+ import {OurGroups} from "./pages/OurGroups.js";
11
12
 
12
13
  const slide = {
13
14
  title: "About ELAA",
@@ -91,10 +92,10 @@ const breadcrumbs = [
91
92
 
92
93
  <template>
93
94
  <div>
94
- {{ JSON.stringify(PartnerWithUs) }}
95
+ {{ JSON.stringify(OurGroups) }}
95
96
  <div style="margin: 40px 0">
96
97
  <h1 style="margin-bottom: 20px; font-size: 50px;">Page Render</h1>
97
- <PageRender :page="PartnerWithUs"/>
98
+ <PageRender :page="OurGroups"/>
98
99
  </div>
99
100
  <div style="margin: 40px 0">
100
101
  <h1 style="margin-bottom: 20px; font-size: 50px;">Slider Edit</h1>
@@ -110,7 +111,7 @@ const breadcrumbs = [
110
111
  </div>
111
112
  <div style="margin: 40px 0">
112
113
  <h1 style="margin-bottom: 20px; font-size: 50px;">Page Builder</h1>
113
- <PageBuilder v-model="PartnerWithUs" :breadcrumbs="breadcrumbs"/>
114
+ <PageBuilder v-model="OurGroups" :breadcrumbs="breadcrumbs"/>
114
115
  </div>
115
116
  </div>
116
117
  </template>
@@ -0,0 +1,103 @@
1
+ export const OurGroups =
2
+ {
3
+ title: "Partner with Us",
4
+ sections: [
5
+ {
6
+ title: "Standard header",
7
+ type: "standard_header",
8
+ components: [
9
+ {
10
+ name: "Standard header",
11
+ type: "header",
12
+ title: "Our Groups",
13
+ supporting_text_max_length: 500,
14
+ supporting_text: "ELAA is the national peak body championing excellence.",
15
+ },
16
+ ]
17
+ },
18
+ {
19
+ title: "Callout Section",
20
+ type: "callout",
21
+ components: [
22
+ {
23
+ name: "Callout Section",
24
+ type: "callout",
25
+ title: "Working together",
26
+ has_extra: true,
27
+ title_label: "Eyebrow heading",
28
+ supporting_text_max_length: 500,
29
+ supporting_text: "To build meaningful, reliable, and human-centered software that solves real problems, empowers users, and advances innovation responsibly.",
30
+ supporting_text_label: "Message *",
31
+ },
32
+ ]
33
+ },
34
+ {
35
+ title: "Two columns with image and content",
36
+ type: "two_column_image_content",
37
+ display: "horizontal",
38
+ minimum_height: true,
39
+ components: [
40
+ {
41
+ name: "Content Block",
42
+ type: "paragraph",
43
+ title: "Opportunity",
44
+ paragraph: "ELAA provides the opportunity for members of Early Years Management services to come together to inform advocacy, strategic directions, policy development and implementation. Members of the group also represent sector interests in consultative forums, such as on the implementation of two years of preschool and the EYM Framework, and inform ELAA’s projects.",
45
+ },
46
+ {
47
+ name: "Image Block",
48
+ type: "image_block",
49
+ featured_image: "https://beta-frontend.elaa.org.au/img/advocacy/our-groups.png",
50
+ },
51
+ ]
52
+ },
53
+ {
54
+ title: "Two columns with image and content",
55
+ type: "two_column_image_content",
56
+ display: "horizontal",
57
+ components: [
58
+ {
59
+ name: "Standard header",
60
+ type: "header",
61
+ title: "Our Group",
62
+ text_center: true,
63
+ supporting_text_max_length: 500,
64
+ supporting_text: null,
65
+ },
66
+ {
67
+ name: "Feature items",
68
+ type: "feature_items",
69
+ supportive_text: "Section can contain up to 10 items.",
70
+ grid_columns: 2,
71
+ has_background: true,
72
+ max_items: 20,
73
+ data: [
74
+ {
75
+ has_extra: true,
76
+ as_item: true,
77
+ title: "Excellence",
78
+ icon: "AlertCircle",
79
+ content_type: "content",
80
+ supporting_text: "We create software to address real-world needs — making life easier, work more efficient, and systems more intelligent 1.",
81
+ },
82
+ {
83
+ has_extra: true,
84
+ as_item: true,
85
+ title: "Equity",
86
+ icon: 'AlignLeft01',
87
+ content_type: "content",
88
+ supporting_text: "We create software to address real-world needs — making life easier, work more efficient, and systems more intelligent 2.",
89
+ },
90
+ {
91
+ has_extra: true,
92
+ as_item: true,
93
+ title: "Collaboration",
94
+ icon: 'AlignLeft01',
95
+ content_type: "content",
96
+ supporting_text: "We create software to address real-world needs — making life easier, work more efficient, and systems more intelligent 3.",
97
+ },
98
+ ]
99
+ }
100
+ ]
101
+ },
102
+ ]
103
+ };
@@ -1,6 +1,6 @@
1
1
  export const PartnerWithUs =
2
2
  {
3
- title: "Advisory Services",
3
+ title: "Partner with Us",
4
4
  sections: [
5
5
  {
6
6
  title: "Standard header",
@@ -64,7 +64,7 @@ export const PartnerWithUs =
64
64
  title: "Our Partnership and Commitment",
65
65
  text_center: true,
66
66
  supporting_text_max_length: 500,
67
- supporting_text: "We create software to address real-world needs — making life easier.",
67
+ supporting_text: null,
68
68
  },
69
69
  {
70
70
  name: "Feature items",
@@ -132,6 +132,7 @@ export const PartnerWithUs =
132
132
  name: "Bullet Points",
133
133
  type: "bullet_points",
134
134
  supportive_text: "This section can contain up to 10 items.",
135
+ has_type_switcher: false,
135
136
  max_items: 10,
136
137
  max_title: 500,
137
138
  data: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcodegroup-au/page-builder",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./dist/page-builder.es.js"
@@ -38,7 +38,7 @@
38
38
  </div>
39
39
  </div>
40
40
  <div class="flex flex-col gap-6">
41
- <div class="flex gap-4" v-if="componentData?.has_type_switcher">
41
+ <div class="flex gap-4" v-if="!componentData?.hasOwnProperty('has_type_switcher') || componentData?.has_type_switcher">
42
42
  <label v-for="option in options" class="flex items-center gap-2 cursor-pointer">
43
43
  <input
44
44
  :name="`content_type${index}`"
@@ -26,14 +26,14 @@
26
26
  :label-text="`${capitalize(button?.type)} *`"
27
27
  class="w-full mb-4"
28
28
  :value="button.address"
29
- :limit="20"
29
+ :limit="100"
30
30
  >
31
31
  <input
32
32
  v-model="button.address"
33
33
  name="button.label"
34
34
  :type="button?.type === 'email' ? 'email' : 'tel'"
35
35
  placeholder="Label"
36
- :maxlength="20"
36
+ :maxlength="100"
37
37
  class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
38
38
  />
39
39
  </input-wrapper>
@@ -11,7 +11,7 @@
11
11
  </div>
12
12
  <h3 class="text-[36px] text-gray-900 font-semibold">{{ headerComponent.title }}</h3>
13
13
  <p v-if="headerComponent?.supporting_text" class="text-[20px] font-normal mt-2 text-gray-600 leading-[30px]" v-html="headerComponent.supporting_text"></p>
14
- <div class="flex flex-col mt-8 gap-4" :class="{'!grid grid-cols-3' :!headerComponent?.featured_image}">
14
+ <div class="flex flex-col mt-8 gap-4" :class="{'!grid grid-cols-3' :!headerComponent?.featured_image}" v-if="bulletPointsComponent">
15
15
  <div v-for="item in bulletPointsComponent.data" class="flex">
16
16
  <div class="bg-gray-100 rounded-full w-[28px] h-[28px] flex items-center justify-center text-gray-500 mr-2">
17
17
  <CheckIcon class="w-4 h-4"></CheckIcon>
@@ -1,13 +1,13 @@
1
1
  <template>
2
2
  <div class="overflow-hidden">
3
3
  <div class="max-w-[1640px] md:px-[120px] mx-auto w-full mt-4 px-4">
4
- <div class="grid grid-cols-12 gap-4" v-if="paragraphComponent">
5
- <div class="col-span-4 bg-gray-100 rounded-xl p-8" v-if="paragraphComponent">
4
+ <div class="flex gap-4" v-if="paragraphComponent">
5
+ <div class="w-1/3 bg-gray-100 rounded-xl p-8" :class="{'h-fit': section?.minimum_height}" v-if="paragraphComponent" ref="leftColumn">
6
6
  <h3 class="text-[20px] text-gray-900 font-semibold">{{ paragraphComponent.title }}</h3>
7
7
  <p class="text-md font-normal mt-2 text-gray-600 leading-6" v-html="paragraphComponent.paragraph"></p>
8
8
  </div>
9
- <div class="col-span-8" v-if="imageComponent">
10
- <img :src="imageComponent.featured_image" :alt="imageComponent.caption" class="w-full h-auto"/>
9
+ <div class="w-2/3 rounded-[24px] overflow-hidden" v-if="imageComponent" ref="rightColumn">
10
+ <img :src="imageComponent.featured_image" :alt="imageComponent.caption" class="w-full h-full object-cover"/>
11
11
  <p v-html="imageComponent.caption" class="mt-2 text-[13px]"></p>
12
12
  </div>
13
13
  </div>
@@ -28,8 +28,8 @@
28
28
  <div v-for="item in featureItemsComponent.data"
29
29
  class="flex gap-3 w-full"
30
30
  :class="{
31
- 'bg-gray-50 p-8 rounded-tl-[24px] rounded-br-[24px] overflow-hidden flex-col' : featureItemsComponent.hasOwnProperty('grid_columns') && (featureItemsComponent.grid_columns > 2 || featureItemsComponent?.has_background),
32
- '!p-0': item?.image
31
+ 'bg-gray-50 p-8 rounded-[24px] overflow-hidden flex-col' : featureItemsComponent.hasOwnProperty('grid_columns') && (featureItemsComponent.grid_columns > 2 || featureItemsComponent?.has_background),
32
+ '!p-0 rounded-tr-[0px] rounded-bl-[0px]': item?.image
33
33
  }">
34
34
  <template v-if="item.title">
35
35
  <div v-if="item?.icon"
@@ -41,7 +41,7 @@
41
41
  <p class="mt-2 text-md font-normal text-gray-600 leading-[24px]">{{ item.supporting_text }}</p>
42
42
  </div>
43
43
  </template>
44
- <img v-else :src="item.image" alt="Feature Image"/>
44
+ <img v-else :src="item.image" alt="Feature Image" class="w-full h-full object-cover"/>
45
45
  </div>
46
46
  </div>
47
47
  <div v-if="imageComponent" class="w-[560px]">
@@ -56,7 +56,7 @@
56
56
 
57
57
  <script setup>
58
58
  import IconComponent from "@/components/common/Icon.vue";
59
- import {ref, computed} from "vue";
59
+ import {ref, computed, onMounted} from "vue";
60
60
 
61
61
  const props = defineProps({
62
62
  section: {
@@ -65,6 +65,9 @@ const props = defineProps({
65
65
  },
66
66
  });
67
67
 
68
+ const leftColumn = ref(null);
69
+ const rightColumn = ref(null);
70
+
68
71
  const section = ref(props.section);
69
72
  const paragraphComponent = computed(() => {
70
73
  return section.value.components.find((component) => component.type === "paragraph");
@@ -79,4 +82,10 @@ const featureItemsComponent = computed(() => {
79
82
  return section.value.components.find((component) => component.type === "feature_items");
80
83
  });
81
84
 
85
+ onMounted(() => {
86
+ if (leftColumn.value && rightColumn.value && section.value?.minimum_height) {
87
+ rightColumn.value.style.height = `${leftColumn.value.offsetHeight}px`;
88
+ }
89
+ });
90
+
82
91
  </script>