@dcodegroup-au/page-builder 0.4.6 → 0.4.8
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.
- package/dist/page-builder.css +1 -1
- package/dist/page-builder.es.js +7846 -7695
- package/dist/page-builder.umd.js +44 -44
- package/example/src/App.vue +4 -3
- package/example/src/pages/AdvisoryService.js +89 -0
- package/package.json +1 -1
- package/src/components/PageBuilder.vue +2 -0
- package/src/components/PageRender.vue +2 -0
- package/src/components/builders/ContactUs.vue +25 -0
- package/src/components/builders/Links.vue +5 -1
- package/src/components/common/Button.vue +20 -0
- package/src/components/presenters/modules/BulletPoints.vue +1 -1
- package/src/components/presenters/modules/ContactUs.vue +55 -0
- package/src/components/presenters/modules/TwoColumnsImageContent.vue +1 -1
package/example/src/App.vue
CHANGED
|
@@ -6,6 +6,7 @@ import {OurVision} from "./pages/OurVision.js";
|
|
|
6
6
|
import {OurCommitment} from "./pages/OurCommitment.js";
|
|
7
7
|
import {OurHistory} from "./pages/OurHistory.js";
|
|
8
8
|
import {ChildSafeStandard} from "./pages/ChildSafeStandard.js";
|
|
9
|
+
import {AdvisoryServices} from "./pages/AdvisoryService.js";
|
|
9
10
|
|
|
10
11
|
const slide = {
|
|
11
12
|
title: "About ELAA",
|
|
@@ -89,10 +90,10 @@ const breadcrumbs = [
|
|
|
89
90
|
|
|
90
91
|
<template>
|
|
91
92
|
<div>
|
|
92
|
-
{{ JSON.stringify(
|
|
93
|
+
{{ JSON.stringify(AdvisoryServices) }}
|
|
93
94
|
<div style="margin: 40px 0">
|
|
94
95
|
<h1 style="margin-bottom: 20px; font-size: 50px;">Page Render</h1>
|
|
95
|
-
<PageRender :page="
|
|
96
|
+
<PageRender :page="AdvisoryServices"/>
|
|
96
97
|
</div>
|
|
97
98
|
<div style="margin: 40px 0">
|
|
98
99
|
<h1 style="margin-bottom: 20px; font-size: 50px;">Slider Edit</h1>
|
|
@@ -108,7 +109,7 @@ const breadcrumbs = [
|
|
|
108
109
|
</div>
|
|
109
110
|
<div style="margin: 40px 0">
|
|
110
111
|
<h1 style="margin-bottom: 20px; font-size: 50px;">Page Builder</h1>
|
|
111
|
-
<PageBuilder v-model="
|
|
112
|
+
<PageBuilder v-model="AdvisoryServices" :breadcrumbs="breadcrumbs"/>
|
|
112
113
|
</div>
|
|
113
114
|
</div>
|
|
114
115
|
</template>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export const AdvisoryServices =
|
|
2
|
+
{
|
|
3
|
+
title: "Advisory Services",
|
|
4
|
+
sections: [
|
|
5
|
+
{
|
|
6
|
+
title: "Standard header",
|
|
7
|
+
type: "standard_header",
|
|
8
|
+
components: [
|
|
9
|
+
{
|
|
10
|
+
name: "Standard header",
|
|
11
|
+
type: "header",
|
|
12
|
+
title: "Advisory Services",
|
|
13
|
+
supporting_text_max_length: 500,
|
|
14
|
+
supporting_text: "ELAA is the national peak body championing excellence in early learning for children and supporting parents and service. For over 30 years Early Learning Association Australia (ELAA) has been working with parents and early learning providers toward a shared vision of excellence in early learning for every child.",
|
|
15
|
+
},
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
title: "Bullet Points Section",
|
|
20
|
+
type: "bullet_points",
|
|
21
|
+
components: [
|
|
22
|
+
{
|
|
23
|
+
name: "Section header",
|
|
24
|
+
type: "header",
|
|
25
|
+
title: "Advise and support",
|
|
26
|
+
supporting_text: "ELAA is the national peak body championing excellence in early learning for children and supporting parents and service",
|
|
27
|
+
featured_image: "https://beta.elaa.org.au/img/what-we-do/best-start-best-life/divided-01.jpg",
|
|
28
|
+
revert: true,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "Bullet Points",
|
|
32
|
+
type: "bullet_points",
|
|
33
|
+
supportive_text: "This section can contain up to 10 items.",
|
|
34
|
+
max_items: 10,
|
|
35
|
+
max_title: 500,
|
|
36
|
+
data: [
|
|
37
|
+
{
|
|
38
|
+
title: "Through our Commonwealth",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: "We work with members, peak bodies.",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: "We work with members, peak bodies.",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: "We work with members, peak bodies.",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: "We work with members, peak bodies.",
|
|
51
|
+
},
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
title: "Contact Us",
|
|
58
|
+
type: "contact_us",
|
|
59
|
+
components: [
|
|
60
|
+
{
|
|
61
|
+
name: "Standard header",
|
|
62
|
+
type: "header",
|
|
63
|
+
title: "Contact Us",
|
|
64
|
+
supporting_text: "If you have further questions regarding ELAA’s advisory services, please contact our Member Solutions Team via the options below.",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "Contact Us",
|
|
68
|
+
type: "contact_us",
|
|
69
|
+
data: [
|
|
70
|
+
{
|
|
71
|
+
show: true,
|
|
72
|
+
name: 'Call Button',
|
|
73
|
+
label: 'Call us',
|
|
74
|
+
address: '+61 3 9412 6199',
|
|
75
|
+
type: 'phone',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
show: true,
|
|
79
|
+
name: 'Email button',
|
|
80
|
+
label: 'Email us',
|
|
81
|
+
address: 'elaa@gmail.com',
|
|
82
|
+
type: 'email',
|
|
83
|
+
},
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
]
|
|
89
|
+
};
|
package/package.json
CHANGED
|
@@ -98,6 +98,7 @@ import VVideoGrid from "@/components/builders/VideoGrid.vue";
|
|
|
98
98
|
import VParagraph from "@/components/builders/Paragraph.vue";
|
|
99
99
|
import VImageBlock from "@/components/builders/ImageBlock.vue";
|
|
100
100
|
import InputWrapper from "@/components/common/InputWrapper.vue";
|
|
101
|
+
import ContactUs from "@/components/builders/ContactUs.vue";
|
|
101
102
|
|
|
102
103
|
const emit = defineEmits(["save", "close"]);
|
|
103
104
|
const props = defineProps({
|
|
@@ -139,6 +140,7 @@ const componentMaps = ref({
|
|
|
139
140
|
bullet_points: markRaw(VLinks),
|
|
140
141
|
feature_items: markRaw(VLinks),
|
|
141
142
|
link_cards: markRaw(VItems),
|
|
143
|
+
contact_us: markRaw(ContactUs),
|
|
142
144
|
});
|
|
143
145
|
|
|
144
146
|
if (!openStates.value) {
|
|
@@ -25,6 +25,7 @@ import LinkCard from "@/components/presenters/modules/LinkCard.vue";
|
|
|
25
25
|
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
|
+
import ContactUs from "@/components/presenters/modules/ContactUs.vue";
|
|
28
29
|
|
|
29
30
|
const props = defineProps({
|
|
30
31
|
page: {
|
|
@@ -48,6 +49,7 @@ const componentMaps = ref({
|
|
|
48
49
|
link_list: markRaw(LinkList),
|
|
49
50
|
bullet_points: markRaw(BulletPoints),
|
|
50
51
|
callout: markRaw(Callout),
|
|
52
|
+
contact_us: markRaw(ContactUs),
|
|
51
53
|
});
|
|
52
54
|
|
|
53
55
|
const currentComponent = (section) => {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-for="(item, index) in componentData.data"
|
|
4
|
+
class="flex flex-col rounded-xl"
|
|
5
|
+
:key="index"
|
|
6
|
+
:ref="index === componentData.data.length - 1 ? (el) => (lastItemRef = el) : null"
|
|
7
|
+
>
|
|
8
|
+
<VButton :button="item"/>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
<script setup>
|
|
12
|
+
import {ref} from "vue";
|
|
13
|
+
import {defaultProps} from "@/components/helpers/defaultProps";
|
|
14
|
+
import VButton from "@/components/common/Button.vue";
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits(["update"]);
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
...defaultProps,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const componentData = ref(props.data.component);
|
|
22
|
+
const lastItemRef = ref(null);
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
</script>
|
|
@@ -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">
|
|
41
|
+
<div class="flex gap-4" v-if="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}`"
|
|
@@ -174,11 +174,15 @@ const deleteCallback = (index) => {
|
|
|
174
174
|
|
|
175
175
|
const updateType = (item) => {
|
|
176
176
|
if (item.content_type === 'content') {
|
|
177
|
+
delete item['image'];
|
|
177
178
|
item.icon = null;
|
|
178
179
|
item.title = null;
|
|
179
180
|
item.supporting_text = null;
|
|
180
181
|
} else {
|
|
181
182
|
item.image = null;
|
|
183
|
+
delete item['icon'];
|
|
184
|
+
delete item['supporting_text'];
|
|
185
|
+
delete item['title'];
|
|
182
186
|
}
|
|
183
187
|
};
|
|
184
188
|
</script>
|
|
@@ -19,7 +19,26 @@
|
|
|
19
19
|
class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
|
|
20
20
|
/>
|
|
21
21
|
</input-wrapper>
|
|
22
|
+
<input-wrapper
|
|
23
|
+
v-if="['email', 'phone'].includes(button?.type)"
|
|
24
|
+
is-vertical
|
|
25
|
+
:field="button?.type"
|
|
26
|
+
:label-text="`${capitalize(button?.type)} *`"
|
|
27
|
+
class="w-full mb-4"
|
|
28
|
+
:value="button.address"
|
|
29
|
+
:limit="20"
|
|
30
|
+
>
|
|
31
|
+
<input
|
|
32
|
+
v-model="button.address"
|
|
33
|
+
name="button.label"
|
|
34
|
+
:type="button?.type === 'email' ? 'email' : 'tel'"
|
|
35
|
+
placeholder="Label"
|
|
36
|
+
:maxlength="20"
|
|
37
|
+
class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
|
|
38
|
+
/>
|
|
39
|
+
</input-wrapper>
|
|
22
40
|
<linked-to
|
|
41
|
+
v-else
|
|
23
42
|
name="primary"
|
|
24
43
|
v-model:type="button.type"
|
|
25
44
|
v-model:url="button.url"
|
|
@@ -35,6 +54,7 @@ import Card from "@/components/common/Card.vue";
|
|
|
35
54
|
import InputWrapper from "@/components/common/InputWrapper.vue";
|
|
36
55
|
import VToggle from "@/components/common/Toggle.vue";
|
|
37
56
|
import LinkedTo from "@/components/common/LinkedTo.vue";
|
|
57
|
+
import {capitalize} from "../helpers/common";
|
|
38
58
|
|
|
39
59
|
const props = defineProps({
|
|
40
60
|
button: {
|
|
@@ -1,6 +1,6 @@
|
|
|
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}">
|
|
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
4
|
<img v-if="headerComponent?.featured_image"
|
|
5
5
|
:src="headerComponent?.featured_image"
|
|
6
6
|
class="w-[480px] object-cover rounded-[24px]"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="overflow-hidden">
|
|
3
|
+
<div class="max-w-[1640px] md:px-[120px] mx-auto w-full my-[40px] bg-gray-100 rounded-[16px] flex justify-center">
|
|
4
|
+
<div v-if="headerComponent" class="flex items-center justify-center flex-col py-[40px] max-w-[820px]">
|
|
5
|
+
<div class="flex justify-between relative w-[150px]">
|
|
6
|
+
<div class="w-[56px] h-[56px] border-[2px] border-white bg-gray-200 rounded-full flex justify-center items-center">
|
|
7
|
+
<Phone class="w-6 h-6 text-gray-600"></Phone>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="w-[56px] h-[56px] border-[2px] border-white bg-gray-200 rounded-full flex justify-center items-center absolute top-[40%] left-1/2 -translate-x-1/2 -translate-y-1/2">
|
|
10
|
+
<Help class="w-6 h-6 text-gray-600"></Help>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="w-[56px] h-[56px] border-[2px] border-white bg-gray-200 rounded-full flex justify-center items-center">
|
|
13
|
+
<Email class="w-6 h-6 text-gray-600"></Email>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<h3 class="text-[24px] text-gray-900 font-semibold mt-4">{{ headerComponent.title }}</h3>
|
|
17
|
+
<p v-if="headerComponent?.supporting_text" class="text-[18px] font-normal mt-2 text-gray-600 leading-[30px] text-center" v-html="headerComponent.supporting_text"></p>
|
|
18
|
+
<div class="flex gap-2">
|
|
19
|
+
<template v-for="item in contactUs.data">
|
|
20
|
+
<a
|
|
21
|
+
v-if="item?.show"
|
|
22
|
+
class="inline-flex gap-1.5 items-center font-semibold text-base mt-4 px-5 py-2.5 rounded-full"
|
|
23
|
+
:class="{'text-brand-700 hover:bg-white border border-brand-300': item.type === 'phone', 'text-white bg-brand-600 hover:bg-brand-800': item.type === 'email'}"
|
|
24
|
+
:href="`${item.type === 'email' ? 'mailto:' : 'tel:'} ${item.address}`">
|
|
25
|
+
{{ item.label }}
|
|
26
|
+
<ArrowUpRight class="w-5 h-5"></ArrowUpRight>
|
|
27
|
+
</a>
|
|
28
|
+
</template>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
<script setup>
|
|
35
|
+
import {ref, computed} from "vue";
|
|
36
|
+
import Phone from "@/assets/img/icons/phone.svg";
|
|
37
|
+
import Help from "@/assets/img/icons/help-circle.svg";
|
|
38
|
+
import Email from "@/assets/img/icons/mail-01.svg";
|
|
39
|
+
import ArrowUpRight from "@/assets/img/icons/arrow-up-right.svg";
|
|
40
|
+
|
|
41
|
+
const props = defineProps({
|
|
42
|
+
section: {
|
|
43
|
+
required: true,
|
|
44
|
+
type: Object,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const section = ref(props.section);
|
|
49
|
+
const headerComponent = computed(() => {
|
|
50
|
+
return section.value.components.find((component) => component.type === "header");
|
|
51
|
+
});
|
|
52
|
+
const contactUs = computed(() => {
|
|
53
|
+
return section.value.components.find((component) => component.type === "contact_us");
|
|
54
|
+
});
|
|
55
|
+
</script>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
class="flex gap-3"
|
|
29
29
|
:class="{
|
|
30
30
|
'bg-gray-50 p-8 rounded-tl-[24px] rounded-br-[24px] overflow-hidden flex-col' : featureItemsComponent.hasOwnProperty('grid_columns') && featureItemsComponent.grid_columns > 2,
|
|
31
|
-
'!p-0': item
|
|
31
|
+
'!p-0': item?.image
|
|
32
32
|
}">
|
|
33
33
|
<template v-if="item.title">
|
|
34
34
|
<div v-if="item?.icon"
|