@dcodegroup-au/page-builder 0.5.3 → 0.5.4

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.
@@ -10,6 +10,7 @@ import {AdvisoryServices} from "./pages/AdvisoryService.js";
10
10
  import {PartnerWithUs} from "./pages/PartnerWithUs.js";
11
11
  import {OurGroups} from "./pages/OurGroups.js";
12
12
  import {Vectea2024} from "./pages/Vectea2024.js";
13
+ import {AdvocaryAndResearch} from "./pages/AdvocaryAndResearch.js";
13
14
 
14
15
  const slide = {
15
16
  title: "About ELAA",
@@ -96,7 +97,7 @@ const breadcrumbs = [
96
97
  {{ JSON.stringify(Vectea2024) }}
97
98
  <div style="margin: 40px 0">
98
99
  <h1 style="margin-bottom: 20px; font-size: 50px;">Page Render</h1>
99
- <PageRender :page="Vectea2024"/>
100
+ <PageRender :page="AdvocaryAndResearch"/>
100
101
  </div>
101
102
  <div style="margin: 40px 0">
102
103
  <h1 style="margin-bottom: 20px; font-size: 50px;">Slider Edit</h1>
@@ -112,7 +113,7 @@ const breadcrumbs = [
112
113
  </div>
113
114
  <div style="margin: 40px 0">
114
115
  <h1 style="margin-bottom: 20px; font-size: 50px;">Page Builder</h1>
115
- <PageBuilder v-model="Vectea2024" :breadcrumbs="breadcrumbs"/>
116
+ <PageBuilder v-model="AdvocaryAndResearch" :breadcrumbs="breadcrumbs"/>
116
117
  </div>
117
118
  </div>
118
119
  </template>
@@ -0,0 +1,337 @@
1
+ export const AdvocaryAndResearch =
2
+ {
3
+ title: "Advocacy and Research",
4
+ sections: [
5
+ {
6
+ title: "Standard header",
7
+ type: "standard_header",
8
+ components: [
9
+ {
10
+ name: "Standard header",
11
+ type: "header",
12
+ title: "Advocacy & Research",
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: "Callout Section",
20
+ type: "callout",
21
+ components: [
22
+ {
23
+ name: "Callout Section",
24
+ type: "callout",
25
+ title: "Our Vision",
26
+ has_extra: true,
27
+ title_label: "Eyebrow heading",
28
+ supporting_text: "Excellence and equity in early childhood education and care",
29
+ supporting_text_label: "Message *",
30
+ supporting_text_max_length: 500,
31
+ featured_image: "https://beta-frontend.elaa.org.au/img/what-we-do/strategy.png"
32
+ },
33
+ ]
34
+ },
35
+ {
36
+ title: "Bullet Points Section",
37
+ type: "bullet_points",
38
+ has_background: true,
39
+ margin: true,
40
+ two_column: true,
41
+ components: [
42
+ {
43
+ name: "Section header",
44
+ type: "header",
45
+ title: "Addressing Section Challenges",
46
+ icon: "AlertCircle",
47
+ supporting_text: "ELAA has developed a grass roots understanding of the value and challenges presented by early childhood education. We share our members’ passion for delivering excellence in early learning to children before they commence school, and we help them to do this by providing professional support and resources on a wide range of matters including:",
48
+ },
49
+ {
50
+ name: "Bullet Points",
51
+ type: "bullet_points",
52
+ supportive_text: "This section can contain up to 10 items.",
53
+ title: "Our key areas of focus are:",
54
+ max_items: 10,
55
+ has_type_switcher: false,
56
+ max_title: 500,
57
+ data: [
58
+ {
59
+ title: "Read more about our history 1",
60
+ },
61
+ {
62
+ title: "Read more about our history 2",
63
+ },
64
+ {
65
+ title: "Read more about our history 3",
66
+ },
67
+ {
68
+ title: "Read more about our history 4",
69
+ },
70
+ ]
71
+ }
72
+ ]
73
+ },
74
+ {
75
+ title: "Bullet Points Section",
76
+ type: "bullet_points",
77
+ components: [
78
+ {
79
+ name: "Section header",
80
+ type: "header",
81
+ title: "Why Partner with ELAA?",
82
+ featured_image: "https://beta-frontend.elaa.org.au/img/what-we-do/advocacy-research.png",
83
+ },
84
+ {
85
+ name: "Bullet Points",
86
+ type: "bullet_points",
87
+ supportive_text: "This section can contain up to 10 items.",
88
+ has_type_switcher: false,
89
+ max_items: 10,
90
+ max_title: 500,
91
+ data: [
92
+ {
93
+ title: "We are uniquely placed to raise your business profile in the ECEC sector",
94
+ },
95
+ {
96
+ title: "Work with a values based peak body who are trusted by their members.",
97
+ },
98
+ {
99
+ title: "We actively work with our partners, developing flexible tailored approaches to maximise your return on investment.",
100
+ },
101
+ {
102
+ title: "We have a dedicated, largely female audience – and we know what works for them.",
103
+ },
104
+ ]
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ title: "Collection carousel",
110
+ type: "collection_carousel",
111
+ has_background: false,
112
+ components: [
113
+ {
114
+ name: "Section header",
115
+ type: "header",
116
+ title: 'Our Submission',
117
+ dark: true,
118
+ supporting_text: null,
119
+ },
120
+ {
121
+ name: "Carousel",
122
+ type: "carousel",
123
+ button: {
124
+ title: 'View all submissions',
125
+ url: 'google.com', // external could be an url
126
+ type: 'external-page',
127
+ open_in_new_tab: true,
128
+ },
129
+ content: {
130
+ label: 'Content',
131
+ supportive_text: 'This carousel will be automatically populated with all upcoming events. This section will be hidden if there’s no upcoming events.',
132
+ items: [
133
+ {
134
+ type: 'submission',
135
+ title: 'Change Management – Drop in session',
136
+ description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector. This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
137
+ primary_button: {
138
+ icon: 'plus',
139
+ title: 'Read submmission',
140
+ url: 'google.com'
141
+ },
142
+ secondary_button: {
143
+ title: 'Learn more',
144
+ url: 'google.com'
145
+ },
146
+ },
147
+ {
148
+ type: 'submission',
149
+ title: 'Let’s start making sense of OHS: Safety – not child’s play',
150
+ description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
151
+ primary_button: {
152
+ icon: 'plus',
153
+ title: 'Read submmission',
154
+ url: 'google.com'
155
+ },
156
+ secondary_button: {
157
+ title: 'Learn more',
158
+ url: 'google.com'
159
+ },
160
+ },
161
+ {
162
+ type: 'submission',
163
+ title: 'DE Regional Governance Training Session',
164
+ description: 'Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
165
+ button_title: 'Free',
166
+ primary_button: {
167
+ icon: 'plus',
168
+ title: 'Read submmission',
169
+ url: 'google.com'
170
+ },
171
+ secondary_button: {
172
+ title: 'Learn more',
173
+ url: 'google.com'
174
+ },
175
+ },
176
+ {
177
+ type: 'submission',
178
+ title: 'Change Management – Drop in session 2',
179
+ description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services.',
180
+ primary_button: {
181
+ icon: 'plus',
182
+ title: 'Read submmission',
183
+ url: 'google.com'
184
+ },
185
+ secondary_button: {
186
+ title: 'Learn more',
187
+ url: 'google.com'
188
+ },
189
+ },
190
+ {
191
+ type: 'submission',
192
+ title: 'Let’s start making sense of OHS: Safety – not child’s play 2',
193
+ description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
194
+ primary_button: {
195
+ icon: 'plus',
196
+ title: 'Read submmission',
197
+ url: 'google.com'
198
+ },
199
+ secondary_button: {
200
+ title: 'Learn more',
201
+ url: 'google.com'
202
+ },
203
+ },
204
+ {
205
+ type: 'submission',
206
+ title: 'Let’s start making sense of OHS: Safety – not child’s play 3',
207
+ description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
208
+ primary_button: {
209
+ icon: 'plus',
210
+ title: 'Read submmission',
211
+ url: 'google.com'
212
+ },
213
+ secondary_button: {
214
+ title: 'Learn more',
215
+ url: 'google.com'
216
+ },
217
+ },
218
+ {
219
+ type: 'submission',
220
+ title: 'Let’s start making sense of OHS: Safety – not child’s play 4',
221
+ description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
222
+ primary_button: {
223
+ icon: 'plus',
224
+ title: 'Read submmission',
225
+ url: 'google.com'
226
+ },
227
+ secondary_button: {
228
+ title: 'Learn more',
229
+ url: 'google.com'
230
+ },
231
+ },
232
+ ]
233
+ }
234
+ }
235
+ ]
236
+ },
237
+ {
238
+ title: "Link card section",
239
+ type: "link_card",
240
+ display: "vertical",
241
+ components: [
242
+ {
243
+ name: "Section header",
244
+ type: "header",
245
+ title: "ELAA Supports",
246
+ supporting_text: "Excellence and equity in early childhood education and care",
247
+ },
248
+ {
249
+ name: "Link cards",
250
+ type: "link_cards",
251
+ supportive_text: "Manage the link cards.",
252
+ max_items: 4,
253
+ data: [
254
+ {
255
+ title: "Read more about our history",
256
+ icon: "AlertCircle",
257
+ public: true,
258
+ primary_button: {
259
+ show: true,
260
+ name: 'Button',
261
+ label: 'Join ELAA',
262
+ url: 'https://beta-frontend.elaa.org.au/img/homepage/asset_free_resources.png', // external could be an url
263
+ type: 'external-page',
264
+ open_in_new_tab: false,
265
+ }
266
+ },
267
+ {
268
+ title: "Read more about our history",
269
+ public: true,
270
+ icon: 'AlignLeft01',
271
+ primary_button: {
272
+ show: true,
273
+ name: 'Button',
274
+ label: 'Learn more',
275
+ url: '', // external could be an url
276
+ type: 'external-page',
277
+ open_in_new_tab: true,
278
+ }
279
+ },
280
+ {
281
+ title: "Read more about our history",
282
+ public: true,
283
+ icon: 'AlignLeft01',
284
+ primary_button: {
285
+ show: true,
286
+ name: 'Button',
287
+ label: 'Learn more',
288
+ url: '', // external could be an url
289
+ type: 'external-page',
290
+ open_in_new_tab: true,
291
+ }
292
+ },
293
+ {
294
+ title: "Read more about our history",
295
+ public: true,
296
+ icon: 'AlignLeft01',
297
+ primary_button: {
298
+ show: true,
299
+ name: 'Button',
300
+ label: 'Email us',
301
+ url: 'https://beta-frontend.elaa.org.au/img/homepage/asset_free_resources.png', // external could be an url
302
+ type: 'external-page',
303
+ open_in_new_tab: true,
304
+ }
305
+ },
306
+ ]
307
+ }
308
+ ]
309
+ },
310
+ {
311
+ title: "Quick links",
312
+ type: "quick_links",
313
+ as_cta: true,
314
+ components: [
315
+ {
316
+ type: "header",
317
+ title: 'Services',
318
+ supporting_text: 'Our knowledge and expertise of the early childhood sector enables ELAA to provide expert professional advice and support.',
319
+ },
320
+ {
321
+ name: "Link grid",
322
+ type: "link_grid",
323
+ supportive_text: "This section can contain up to 5 links.",
324
+ max_items: 5,
325
+ data: [
326
+ {
327
+ title: "Advisory Services",
328
+ url: '/admin', // external could be an url
329
+ type: 'site-content',
330
+ open_in_new_tab: true,
331
+ },
332
+ ]
333
+ }
334
+ ]
335
+ },
336
+ ]
337
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcodegroup-au/page-builder",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./dist/page-builder.es.js"
@@ -0,0 +1,3 @@
1
+ <svg width="435" height="266" viewBox="0 0 435 266" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M201.971 -102.931C292.729 -67.7545 395.68 -30.0658 424.539 62.8945C454.76 160.245 410.669 267.688 339.758 340.914C276.809 405.918 180.85 413.635 90.5516 407.784C10.8181 402.617 -65.3177 373.252 -115.884 311.388C-166.322 249.681 -181.838 169.034 -168.875 90.3974C-154.991 6.17807 -120.61 -79.6055 -44.9217 -119.063C32.0201 -159.174 121.066 -134.289 201.971 -102.931Z" fill="#78BDB5"/>
3
+ </svg>
@@ -2,13 +2,31 @@
2
2
  <div class="rounded-xl bg-gray-50 px-6 py-5">
3
3
  <div class="flex justify-between pb-2">
4
4
  <div class="flex justify-between w-full py-1">
5
- <div>
5
+ <div class="min-w-[50%] w-full">
6
6
  <p class="text-lg font-semibold text-gray-900">
7
7
  {{ componentData.name }}
8
8
  </p>
9
9
  <p class="text-sm text-gray-600 mt-1">
10
10
  {{ componentData.supportive_text }}
11
11
  </p>
12
+ <input-wrapper
13
+ v-if="componentData.hasOwnProperty('title')"
14
+ is-vertical
15
+ field="title"
16
+ label-text="Title *"
17
+ class="w-[50%] my-8"
18
+ :value="componentData.title"
19
+ :limit="100"
20
+ >
21
+ <input
22
+ v-model="componentData.title"
23
+ name="title"
24
+ type="text"
25
+ placeholder="Title"
26
+ :maxlength="100"
27
+ class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
28
+ />
29
+ </input-wrapper>
12
30
  </div>
13
31
  <div>
14
32
  <a
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="overflow-hidden">
3
- <div :class="{'bg-gray-50 py-2' : section?.has_background}">
3
+ <div :class="{'bg-gray-50 py-2 my-6' : section?.has_background, 'my-8': section?.margin}">
4
4
  <div class="max-w-[1640px] md:px-[120px] mx-auto w-full my-[40px]"
5
5
  :class="{'flex gap-8': headerComponent?.featured_image, 'flex-row-reverse justify-between': headerComponent?.revert}">
6
6
  <img v-if="headerComponent?.featured_image"
@@ -8,17 +8,20 @@
8
8
  class="max-w-[480px] w-full object-cover rounded-[24px]"
9
9
  ref="leftColumn"
10
10
  alt="Feature"/>
11
- <div v-if="headerComponent" class="h-fit" :class="{'py-[48px]': headerComponent?.featured_image}"
11
+ <div v-if="headerComponent" class="h-fit" :class="{'py-[48px]': headerComponent?.featured_image, 'grid grid-cols-2 gap-8': section?.two_column}"
12
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>
13
+ <div>
14
+ <div v-if="headerComponent?.icon"
15
+ class="w-[48px] h-[48px] bg-brand-100 border-[8px] border-brand-50 rounded-full flex items-center justify-center">
16
+ <IconComponent :icon="headerComponent.icon" icon-classes="w-5 h-5 text-brand-600"></IconComponent>
17
+ </div>
18
+ <h3 class="text-[36px] text-gray-900 font-semibold">{{ headerComponent.title }}</h3>
19
+ <p v-if="headerComponent?.supporting_text" class="text-[20px] font-normal mt-2 text-gray-600 leading-[30px]"
20
+ v-html="headerComponent.supporting_text"></p>
16
21
  </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}"
22
+ <div class="flex flex-col mt-8 gap-4" :class="{'!grid grid-cols-3' :!headerComponent?.featured_image && !section?.two_column}"
21
23
  v-if="bulletPointsComponent">
24
+ <p v-if="bulletPointsComponent?.title" v-text="bulletPointsComponent.title" class="font-semibold text-[20px]"></p>
22
25
  <div v-for="item in bulletPointsComponent.data" class="flex">
23
26
  <div
24
27
  class="bg-gray-100 rounded-full w-[28px] h-[28px] flex items-center justify-center text-gray-500 mr-2">
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="overflow-hidden" :class="{'bg-aqua-100': !section?.no_background}">
2
+ <div class="overflow-hidden" :class="{'bg-aqua-100 mb-6': !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>
@@ -22,7 +22,7 @@
22
22
  <h1 class="text-[20px] font-semibold text-gray-900">{{ data.title }}</h1>
23
23
  <div class="text-lg text-gray-600 mt-2 leading-[24px]" v-html="data.description"></div>
24
24
  <a
25
- v-if="data?.primary_button.show"
25
+ v-if="data?.primary_button.show && data.primary_button.url"
26
26
  class="text-brand-700 inline-flex gap-1.5 items-center font-semibold text-base mt-4"
27
27
  :href="formatUrl(data.primary_button.url)"
28
28
  :target="data.primary_button.open_in_new_tab ? '_blank' : ''">
@@ -1,19 +1,20 @@
1
1
  <template>
2
- <div class="w-full bg-navy-800 py-10 relative lg:h-[336px]">
2
+ <div class="w-full bg-navy-800 py-10 relative lg:h-[336px]" :class="{'lg:!h-[266px]' : section?.as_cta}">
3
+ <LeftVector class="absolute left-0 top-0" v-if="section?.as_cta"></LeftVector>
3
4
  <div class="max-w-[1640px] md:px-[120px] mx-auto w-full">
4
- <div class="max-md:mx-[30px] 1xl:mx-0 relative z-10">
5
+ <div class="max-md:mx-[30px] 1xl:mx-0 relative z-10" :class="{'text-center flex flex-col items-center': section?.as_cta}">
5
6
  <div v-for="(component, index) in section.components" class="w-full md:w-3/4">
6
7
  <component
7
8
  :is="currentComponent(component)"
8
9
  :key="index"
9
10
  :component="component"
11
+ :class="{'flex !justify-center': section?.as_cta}"
10
12
  ></component>
11
13
  </div>
12
14
  </div>
13
15
  </div>
14
-
15
- <HeaderVector class="absolute right-0 top-0"></HeaderVector>
16
- </div>
16
+ <HeaderVector class="absolute right-0 top-0" v-if="!section?.as_cta"></HeaderVector>
17
+ </div>
17
18
  </template>
18
19
 
19
20
  <script setup>
@@ -21,6 +22,7 @@ import { ref, markRaw } from "vue";
21
22
  import VLinkPresenter from "@/components/presenters/components/LinkPresenter.vue";
22
23
  import VHeaderPresenter from "@/components/presenters/components/HeaderPresenter.vue";
23
24
  import HeaderVector from "@/assets/svg/header_right_vector.svg";
25
+ import LeftVector from "@/assets/svg/left_vector.svg";
24
26
 
25
27
  const props = defineProps({
26
28
  section: {