@dcodegroup-au/page-builder 0.5.2 → 0.5.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.
@@ -9,6 +9,7 @@ import {ChildSafeStandard} from "./pages/ChildSafeStandard.js";
9
9
  import {AdvisoryServices} from "./pages/AdvisoryService.js";
10
10
  import {PartnerWithUs} from "./pages/PartnerWithUs.js";
11
11
  import {OurGroups} from "./pages/OurGroups.js";
12
+ import {Vectea2024} from "./pages/Vectea2024.js";
12
13
 
13
14
  const slide = {
14
15
  title: "About ELAA",
@@ -92,10 +93,10 @@ const breadcrumbs = [
92
93
 
93
94
  <template>
94
95
  <div>
95
- {{ JSON.stringify(OurGroups) }}
96
+ {{ JSON.stringify(Vectea2024) }}
96
97
  <div style="margin: 40px 0">
97
98
  <h1 style="margin-bottom: 20px; font-size: 50px;">Page Render</h1>
98
- <PageRender :page="OurGroups"/>
99
+ <PageRender :page="Vectea2024"/>
99
100
  </div>
100
101
  <div style="margin: 40px 0">
101
102
  <h1 style="margin-bottom: 20px; font-size: 50px;">Slider Edit</h1>
@@ -111,7 +112,7 @@ const breadcrumbs = [
111
112
  </div>
112
113
  <div style="margin: 40px 0">
113
114
  <h1 style="margin-bottom: 20px; font-size: 50px;">Page Builder</h1>
114
- <PageBuilder v-model="OurGroups" :breadcrumbs="breadcrumbs"/>
115
+ <PageBuilder v-model="Vectea2024" :breadcrumbs="breadcrumbs"/>
115
116
  </div>
116
117
  </div>
117
118
  </template>
@@ -0,0 +1,205 @@
1
+ export const Vectea2024 =
2
+ {
3
+ title: "VECTEA 2024",
4
+ sections: [
5
+ {
6
+ title: "Standard header",
7
+ type: "standard_header",
8
+ components: [
9
+ {
10
+ name: "Standard header",
11
+ type: "header",
12
+ title: "VECTEA 2024",
13
+ supporting_text_max_length: 500,
14
+ supporting_text: "The Victorian Early Childhood Teachers and Educators Agreement (VECTEA) is an enterprise agreement that applies to early childhood teachers and educators employed in kindergarten education programs in Victoria.",
15
+ },
16
+ ]
17
+ },
18
+ {
19
+ title: "Paragraph section",
20
+ type: "paragraph",
21
+ components: [
22
+ {
23
+ name: "Paragraph section",
24
+ type: "paragraph",
25
+ title: "ELAA is proudly supporting",
26
+ paragraph: '<p>The Victorian Government’s Best Start, Best Life reforms represent the most substantial transformation in Victoria’s early childhood sector in a generation. As part of these reforms:</p><ol><li data-list=\\"bullet\\"><span class=\\"ql-ui\\" contenteditable=\\"false\\"></span>The Three-Year-Old Kindergarten program will expand, reaching 15 hours per week across the state by 2029.</li><li data-list=\\"bullet\\"><span class=\\"ql-ui\\" contenteditable=\\"false\\"></span>The Four-Year-Old Kindergarten program will evolve into Pre-Prep, with weekly hours increasing from 15 to 30 by 2036 throughout Victoria.</li></ol><p>Extending the hours of teacher-led, play-based learning through Pre-Prep in the year before school provides children with enhanced access to the numerous benefits of early childhood education. Pre-Prep will launch in 2025, starting with children in six regional Victorian local government areas, and will gradually expand across the state.</p>',
27
+ featured_image: "https://beta.elaa.org.au/img/what-we-do/vectea-2024/01.jpg",
28
+ },
29
+ ]
30
+ },
31
+ {
32
+ title: "Link card section",
33
+ type: "link_card",
34
+ display: "vertical",
35
+ no_background: true,
36
+ components: [
37
+ {
38
+ name: "Section header",
39
+ type: "header",
40
+ title: "ELAA Supports",
41
+ },
42
+ {
43
+ name: "Link cards",
44
+ type: "link_cards",
45
+ supportive_text: "Manage the link cards.",
46
+ max_items: 4,
47
+ data: [
48
+ {
49
+ title: "Read more about our history",
50
+ description: "Happy Birthday ELAA – celebrating 30 years of service to members",
51
+ icon: "AlertCircle",
52
+ public: true,
53
+ primary_button: {
54
+ show: true,
55
+ name: 'Button',
56
+ label: 'Learn more',
57
+ url: 'https://beta-frontend.elaa.org.au/img/homepage/asset_free_resources.png', // external could be an url
58
+ type: 'external-page',
59
+ open_in_new_tab: false,
60
+ }
61
+ },
62
+ {
63
+ title: "Read more about our history",
64
+ description: "Happy Birthday ELAA – celebrating 30 years of service to members",
65
+ public: true,
66
+ icon: 'AlignLeft01',
67
+ primary_button: {
68
+ show: true,
69
+ name: 'Button',
70
+ label: 'Learn more',
71
+ url: 'https://beta-frontend.elaa.org.au/img/homepage/asset_free_resources.png', // external could be an url
72
+ type: 'external-page',
73
+ open_in_new_tab: true,
74
+ }
75
+ },
76
+ ]
77
+ }
78
+ ]
79
+ },
80
+ {
81
+ title: "Bullet Points Section",
82
+ type: "bullet_points",
83
+ components: [
84
+ {
85
+ name: "Section header",
86
+ type: "header",
87
+ title: "Why Partner with ELAA?",
88
+ featured_image: "https://beta.elaa.org.au/img/what-we-do/vectea-2024/02.jpg",
89
+ },
90
+ {
91
+ name: "Bullet Points",
92
+ type: "bullet_points",
93
+ supportive_text: "This section can contain up to 10 items.",
94
+ has_type_switcher: false,
95
+ max_items: 10,
96
+ max_title: 500,
97
+ data: [
98
+ {
99
+ title: "We are uniquely placed to raise your business profile in the ECEC sector",
100
+ },
101
+ {
102
+ title: "Work with a values based peak body who are trusted by their members.",
103
+ },
104
+ {
105
+ title: "We actively work with our partners, developing flexible tailored approaches to maximise your return on investment.",
106
+ },
107
+ {
108
+ title: "We have a dedicated, largely female audience – and we know what works for them.",
109
+ },
110
+ ]
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ title: "Bullet Points Section",
116
+ type: "bullet_points",
117
+ has_background: true,
118
+ components: [
119
+ {
120
+ revert: true,
121
+ name: "Section header",
122
+ type: "header",
123
+ title: "Benefits for teaching staff",
124
+ supporting_text: "The VECTEA has delivered significantly improved pay and conditions for teachers compared to teachers on the industry (modern) award, enabling kindergartens to retain their superior quality ratings.\n" +
125
+ "\n" +
126
+ "Some of the beneficial employment conditions of the VECTEA 2020 for teachers and educators include:​",
127
+ featured_image: "https://beta.elaa.org.au/img/what-we-do/vectea-2024/03.jpg",
128
+ },
129
+ {
130
+ name: "Bullet Points",
131
+ type: "bullet_points",
132
+ supportive_text: "This section can contain up to 10 items.",
133
+ has_type_switcher: false,
134
+ max_items: 10,
135
+ max_title: 500,
136
+ data: [
137
+ {
138
+ title: "extended planning time to support quality programming ​ (30 minutes per teaching hour for early childhood teachers (ECT) and 15 minutes per teaching hour for educators)",
139
+ },
140
+ {
141
+ title: "10 weeks of paid annual leave (term break leave)",
142
+ },
143
+ {
144
+ title: "16 weeks of employer-paid parental leave for primary caregivers",
145
+ },
146
+ {
147
+ title: "We actively work with our partners, developing flexible tailored approaches to maximise your return on investment.",
148
+ },
149
+ {
150
+ title: "We have a dedicated, largely female audience – and we know what works for them.",
151
+ },
152
+ ]
153
+ }
154
+ ]
155
+ },
156
+ {
157
+ title: "FAQs Section",
158
+ type: "faqs",
159
+ components: [
160
+ {
161
+ name: "Section header",
162
+ type: "header",
163
+ title: 'Frequently asked questions',
164
+ supporting_text: 'Frequently Asked Questions for Committees and Managers',
165
+ },
166
+ {
167
+ name: "FAQs",
168
+ type: "feature_items",
169
+ supportive_text: "This section can contain up to 10 items.",
170
+ has_type_switcher: false,
171
+ max_items: 50,
172
+ max_title: 500,
173
+ data: [
174
+ {
175
+ has_extra: true,
176
+ as_item: true,
177
+ title: "What is an enterprise agreement? Is this the same as an award?",
178
+ supporting_text: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos quaerat sed minus maiores dolorem consectetur quibusdam harum itaque deserunt at eligendi qui illum praesentium odit sit, voluptates nobis expedita?",
179
+ },
180
+ {
181
+ has_extra: true,
182
+ as_item: true,
183
+ title: "What is an enterprise agreement? Is this the same as an award?",
184
+ supporting_text: "The last scheduled salary increase under VECTEA 2020, along with its corresponding agreements, was in April 2024. During the re-negotiation period, current salaries established under VECTEA 2020 will continue to be in effect. \n" +
185
+ "Future salary increases under a new VECTEA 2024 will take effect once the Fair Work Commission approves the new agreement.\n" +
186
+ "ELAA will continue to release Wage Bulletins every July for the VECTEA 2020. During this period, salaries of certain VECTEA classifications may be updated in accordance with increases to the underpinning modern awards.",
187
+ },
188
+ {
189
+ has_extra: true,
190
+ as_item: true,
191
+ title: "We actively work with our partners, developing flexible tailored approaches to maximise your return on investment.",
192
+ supporting_text: "This section can contain up to 10 items.",
193
+ },
194
+ {
195
+ has_extra: true,
196
+ as_item: true,
197
+ title: "We have a dedicated, largely female audience – and we know what works for them.",
198
+ supporting_text: "This section can contain up to 10 items.",
199
+ },
200
+ ]
201
+ }
202
+ ]
203
+ },
204
+ ]
205
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcodegroup-au/page-builder",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./dist/page-builder.es.js"
@@ -26,6 +26,7 @@ import LinkList from "@/components/presenters/modules/LinkList.vue";
26
26
  import BulletPoints from "@/components/presenters/modules/BulletPoints.vue";
27
27
  import Callout from "@/components/presenters/modules/Callout.vue";
28
28
  import ContactUs from "@/components/presenters/modules/ContactUs.vue";
29
+ import FAQ from "@/components/presenters/modules/FAQ.vue";
29
30
 
30
31
  const props = defineProps({
31
32
  page: {
@@ -50,6 +51,7 @@ const componentMaps = ref({
50
51
  bullet_points: markRaw(BulletPoints),
51
52
  callout: markRaw(Callout),
52
53
  contact_us: markRaw(ContactUs),
54
+ faqs: markRaw(FAQ),
53
55
  });
54
56
 
55
57
  const currentComponent = (section) => {
@@ -21,14 +21,14 @@
21
21
  :label-text="dataRef?.title_label ?? 'Title *'"
22
22
  class="w-full mb-4"
23
23
  :value="dataRef.title"
24
- :limit="51"
24
+ :limit="100"
25
25
  >
26
26
  <input
27
27
  v-model="dataRef.title"
28
28
  name="title"
29
29
  type="text"
30
30
  placeholder="Title"
31
- :maxlength="51"
31
+ :maxlength="100"
32
32
  class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
33
33
  />
34
34
  </input-wrapper>
@@ -12,14 +12,14 @@
12
12
  label-text="Title *"
13
13
  class="w-full mb-4"
14
14
  :value="componentData.button.title"
15
- :limit="20"
15
+ :limit="100"
16
16
  >
17
17
  <input
18
18
  v-model="componentData.button.title"
19
19
  name="title"
20
20
  type="text"
21
21
  placeholder="Title"
22
- :maxlength="20"
22
+ :maxlength="100"
23
23
  class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
24
24
  />
25
25
  </input-wrapper>
@@ -8,14 +8,14 @@
8
8
  label-text="Button Label *"
9
9
  class="w-full mb-4"
10
10
  :value="button.label"
11
- :limit="20"
11
+ :limit="100"
12
12
  >
13
13
  <input
14
14
  v-model="button.label"
15
15
  name="button.label"
16
16
  type="text"
17
17
  placeholder="Label"
18
- :maxlength="20"
18
+ :maxlength="100"
19
19
  class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
20
20
  />
21
21
  </input-wrapper>
@@ -1,22 +1,31 @@
1
1
  <template>
2
2
  <div class="overflow-hidden">
3
- <div class="max-w-[1640px] md:px-[120px] mx-auto w-full my-[40px]" :class="{'flex gap-8': headerComponent?.featured_image, 'flex-row-reverse justify-between': headerComponent?.revert}">
4
- <img v-if="headerComponent?.featured_image"
5
- :src="headerComponent?.featured_image"
6
- class="w-[480px] object-cover rounded-[24px]"
7
- alt="Feature"/>
8
- <div v-if="headerComponent" :class="{'py-[48px]': headerComponent?.featured_image}">
9
- <div v-if="headerComponent?.icon" class="w-[48px] h-[48px] bg-brand-100 border-[8px] border-brand-50 rounded-full flex items-center justify-center">
10
- <IconComponent :icon="headerComponent.icon" icon-classes="w-5 h-5 text-brand-600"></IconComponent>
11
- </div>
12
- <h3 class="text-[36px] text-gray-900 font-semibold">{{ headerComponent.title }}</h3>
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}" v-if="bulletPointsComponent">
15
- <div v-for="item in bulletPointsComponent.data" class="flex">
16
- <div class="bg-gray-100 rounded-full w-[28px] h-[28px] flex items-center justify-center text-gray-500 mr-2">
17
- <CheckIcon class="w-4 h-4"></CheckIcon>
3
+ <div :class="{'bg-gray-50 py-2' : section?.has_background}">
4
+ <div class="max-w-[1640px] md:px-[120px] mx-auto w-full my-[40px]"
5
+ :class="{'flex gap-8': headerComponent?.featured_image, 'flex-row-reverse justify-between': headerComponent?.revert}">
6
+ <img v-if="headerComponent?.featured_image"
7
+ :src="headerComponent?.featured_image"
8
+ class="max-w-[480px] w-full object-cover rounded-[24px]"
9
+ ref="leftColumn"
10
+ alt="Feature"/>
11
+ <div v-if="headerComponent" class="h-fit" :class="{'py-[48px]': headerComponent?.featured_image}"
12
+ ref="rightColumn">
13
+ <div v-if="headerComponent?.icon"
14
+ class="w-[48px] h-[48px] bg-brand-100 border-[8px] border-brand-50 rounded-full flex items-center justify-center">
15
+ <IconComponent :icon="headerComponent.icon" icon-classes="w-5 h-5 text-brand-600"></IconComponent>
16
+ </div>
17
+ <h3 class="text-[36px] text-gray-900 font-semibold">{{ headerComponent.title }}</h3>
18
+ <p v-if="headerComponent?.supporting_text" class="text-[20px] font-normal mt-2 text-gray-600 leading-[30px]"
19
+ v-html="headerComponent.supporting_text"></p>
20
+ <div class="flex flex-col mt-8 gap-4" :class="{'!grid grid-cols-3' :!headerComponent?.featured_image}"
21
+ v-if="bulletPointsComponent">
22
+ <div v-for="item in bulletPointsComponent.data" class="flex">
23
+ <div
24
+ class="bg-gray-100 rounded-full w-[28px] h-[28px] flex items-center justify-center text-gray-500 mr-2">
25
+ <CheckIcon class="w-4 h-4"></CheckIcon>
26
+ </div>
27
+ <p class="text-lg text-gray-600 w-[97%]">{{ item.title }}</p>
18
28
  </div>
19
- <p class="text-lg text-gray-600 w-[97%]">{{ item.title }}</p>
20
29
  </div>
21
30
  </div>
22
31
  </div>
@@ -24,7 +33,7 @@
24
33
  </div>
25
34
  </template>
26
35
  <script setup>
27
- import {ref, computed} from "vue";
36
+ import {ref, computed, onMounted} from "vue";
28
37
  import CheckIcon from "@/assets/img/icons/check.svg";
29
38
  import IconComponent from "@/components/common/Icon.vue";
30
39
 
@@ -35,6 +44,9 @@ const props = defineProps({
35
44
  },
36
45
  });
37
46
 
47
+ const leftColumn = ref(null);
48
+ const rightColumn = ref(null);
49
+
38
50
  const section = ref(props.section);
39
51
  const headerComponent = computed(() => {
40
52
  return section.value.components.find((component) => component.type === "header");
@@ -42,4 +54,10 @@ const headerComponent = computed(() => {
42
54
  const bulletPointsComponent = computed(() => {
43
55
  return section.value.components.find((component) => component.type === "bullet_points");
44
56
  });
57
+
58
+ onMounted(() => {
59
+ if (leftColumn.value && rightColumn.value) {
60
+ leftColumn.value.style.height = `${rightColumn.value.offsetHeight}px`;
61
+ }
62
+ });
45
63
  </script>
@@ -0,0 +1,58 @@
1
+ <template>
2
+ <div class="overflow-hidden">
3
+ <div class="max-w-[1640px] md:px-[120px] mx-auto w-full bg-white py-[40px] flex justify-center gap-[10%]">
4
+ <div v-for="(header, index) in headerComponents" class="gap-4 max-w-[800px] w-full">
5
+ <div class="px-[40px] text-center mb-6 mx-auto" v-if="header">
6
+ <h3 class="text-[36px] text-gray-900 font-semibold">{{ header.title }}</h3>
7
+ <p v-if="header?.supporting_text"
8
+ class="text-[20px] font-normal mt-2 text-gray-600 leading-[30px] max-w-[768px] mx-auto"
9
+ v-html="header.supporting_text"></p>
10
+ </div>
11
+ <div v-if="featureComponents[index]" class="flex flex-col divide-y gap-8">
12
+ <div v-for="(link, index) in featureComponents[index].data"
13
+ class="relative bg-white p-2 w-full pt-6">
14
+ <a class="text-gray-900 cursor-pointer w-full inline-flex justify-between gap-1.5 items-center leading-[28px] font-semibold text-lg">
15
+ <span class="hover:underline" @click="toggle(index)">
16
+ {{ link.title }}
17
+ </span>
18
+ <Plus v-if="!show[index]" class="w-6 h-6 cursor-pointer text-gray-400 hover:text-gray-700" @click="toggle(index)"></Plus>
19
+ <Minus v-else class="w-6 h-6 cursor-pointer text-gray-400 hover:text-gray-700" @click="toggle(index)"></Minus>
20
+ </a>
21
+ <p v-if="show[index]" class="mt-2 text-gray-600 leading-[24px]" v-html="link.supporting_text"></p>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ </template>
28
+ <script setup>
29
+ import {ref, computed} from "vue";
30
+ import Plus from "@/assets/img/icons/plus-circle.svg";
31
+ import Minus from "@/assets/img/icons/minus-circle.svg";
32
+
33
+ const props = defineProps({
34
+ section: {
35
+ required: true,
36
+ type: Object,
37
+ },
38
+ });
39
+
40
+ const section = ref(props.section);
41
+ const show = ref([]);
42
+ const headerComponents = computed(() => {
43
+ return section.value.components.filter((component) => component.type === "header");
44
+ });
45
+
46
+ const featureComponents = computed(() => {
47
+ return section.value.components.filter((component) => component.type === "feature_items");
48
+ });
49
+
50
+ featureComponents.value.forEach((value, index) => {
51
+ show.value[index] = false;
52
+ })
53
+
54
+ const toggle = (index) => {
55
+ show.value[index] = !show.value[index];
56
+ };
57
+
58
+ </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="overflow-hidden bg-aqua-100">
2
+ <div class="overflow-hidden" :class="{'bg-aqua-100': !section?.no_background}">
3
3
  <div class="max-w-[1640px] md:px-[120px] mx-auto w-full my-[40px]">
4
4
  <div class="rounded-xl px-[40px] text-center mb-6 max-w-[1280px] mx-auto" v-if="headerComponent">
5
5
  <h3 class="text-[36px] text-gray-900 font-semibold">{{ headerComponent.title }}</h3>
@@ -13,7 +13,9 @@
13
13
  alt="Feature"/>
14
14
  </div>
15
15
  <div class="flex gap-8 w-full" ref="rightColumn" :class="{'flex-col h-fit': headerComponent?.featured_image}">
16
- <div v-for="(data, index) in cardComponent.data" class="relative bg-white p-8 rounded-[24px] w-full">
16
+ <div v-for="(data, index) in cardComponent.data"
17
+ class="relative bg-white p-8 rounded-[24px] w-full"
18
+ :class="{'!bg-gray-50': section?.no_background}">
17
19
  <div v-if="data.icon" class="w-[48px] h-[48px] flex justify-center items-center rounded-[10px] text-white bg-aqua-900 mb-4">
18
20
  <IconComponent :icon="data.icon" icon-classes="w-5 h-5" :key="index"></IconComponent>
19
21
  </div>
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <div class="overflow-hidden">
3
- <div class="max-w-[1640px] md:px-[120px] mx-auto w-full pt-4 mb-4">
2
+ <div class="overflow-hidden mt-4">
3
+ <div class="max-w-[1640px] md:px-[120px] mx-auto w-full pt-4 mb-4 flex gap-16">
4
4
  <div class="max-w-[800px]" v-if="section.components[0]?.title">
5
5
  <h3 class="text-[36px] text-gray-900 font-semibold">
6
6
  {{ section.components[0].title }}
@@ -9,6 +9,9 @@
9
9
  <div v-html="section.components[0].paragraph"></div>
10
10
  </div>
11
11
  </div>
12
+ <div class="w-full rounded-[24px]" v-if="section.components[0]?.featured_image">
13
+ <img :src="section.components[0]?.featured_image" alt="Feature Image" class="w-full h-full object-cover rounded-[24px]"/>
14
+ </div>
12
15
  </div>
13
16
  </div>
14
17
  </template>