@dcodegroup-au/page-builder 0.2.8 → 0.2.9
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 +2 -2
- package/dist/page-builder.es.js +33372 -11858
- package/dist/page-builder.umd.js +59 -59
- package/example/src/App.vue +40 -679
- package/example/src/main.js +2 -1
- package/example/src/pages/BestLife.js +351 -0
- package/example/src/pages/Home.js +677 -0
- package/package.json +1 -1
- package/src/assets/icons.json +3569 -0
- package/src/components/ItemEdit.vue +147 -71
- package/src/components/LinkCardEdit.vue +139 -0
- package/src/components/PageBuilder.vue +43 -10
- package/src/components/PageRender.vue +12 -0
- package/src/components/builders/CollectionCarousel.vue +62 -0
- package/src/components/builders/Header.vue +82 -0
- package/src/components/builders/ImageBlock.vue +56 -0
- package/src/components/builders/Items.vue +112 -0
- package/src/components/builders/Links.vue +123 -0
- package/src/components/builders/Logos.vue +122 -0
- package/src/components/builders/NewsGrid.vue +59 -0
- package/src/components/builders/Paragraph.vue +93 -0
- package/src/components/builders/VideoGrid.vue +101 -0
- package/src/components/common/Button.vue +53 -0
- package/src/components/common/Card.vue +5 -1
- package/src/components/common/FileUpload.vue +1 -1
- package/src/components/common/Icon.vue +41 -0
- package/src/components/common/IconSelector.vue +106 -0
- package/src/components/common/LinkedTo.vue +9 -3
- package/src/components/helpers/bundleIcons.js +1189 -0
- package/src/components/index.js +2 -1
- package/src/components/presenters/components/{VCollectionGridPresenter.vue → CollectionGridPresenter.vue} +0 -5
- package/src/components/presenters/modules/CollectionCarousel.vue +2 -2
- package/src/components/presenters/modules/CollectionGrid.vue +2 -2
- package/src/components/presenters/modules/HeroHeader.vue +2 -2
- package/src/components/presenters/modules/LinkCard.vue +55 -0
- package/src/components/presenters/modules/LinkList.vue +51 -0
- package/src/components/presenters/modules/Paragraph.vue +26 -0
- package/src/components/presenters/modules/QuickLinks.vue +2 -2
- package/src/components/presenters/modules/StandardHeader.vue +32 -0
- package/src/components/presenters/modules/Timeline.vue +55 -0
- package/src/components/presenters/modules/TwoColumnsImageContent.vue +36 -0
- package/src/components/presenters/modules/VTabs.vue +2 -2
- package/src/utils/generateIconBundle.js +33 -0
- package/src/utils/generateIconJson.js +30 -0
- package/tailwind.config.js +5 -0
- package/src/components/builders/BaseModuleForm.vue +0 -86
- package/src/components/builders/LogoBuilder.vue +0 -167
- package/src/components/builders/PageBuilderCarousel.vue +0 -18
- package/src/components/builders/PageBuilderGrid.vue +0 -18
- package/src/components/builders/PageBuilderSectionHeader.vue +0 -30
- package/src/components/builders/PageModal.vue +0 -92
- package/src/components/builders/VCollectionCarousel.vue +0 -58
- package/src/components/builders/VHeader.vue +0 -55
- package/src/components/builders/VItems.vue +0 -110
- package/src/components/builders/VLinks.vue +0 -121
- package/src/components/builders/VLogos.vue +0 -120
- package/src/components/builders/VNewsGrid.vue +0 -55
- package/src/components/builders/VVideoGrid.vue +0 -99
- package/src/components/common/forms/LogosForm.vue +0 -39
- package/src/components/common/forms/PageBuilderLinksForm.vue +0 -39
- package/src/components/common/forms/SectionHeaderForm.vue +0 -45
- package/src/components/common/forms/TabForm.vue +0 -90
- /package/src/components/common/{VModal.vue → Modal.vue} +0 -0
- /package/src/components/common/{VToggle.vue → Toggle.vue} +0 -0
- /package/src/components/presenters/components/{VCarouselPresenter.vue → CarouselPresenter.vue} +0 -0
- /package/src/components/presenters/components/{VHeaderPresenter.vue → HeaderPresenter.vue} +0 -0
- /package/src/components/presenters/components/{VLinkPresenter.vue → LinkPresenter.vue} +0 -0
- /package/src/components/presenters/components/{VSliderPresenter.vue → SliderPresenter.vue} +0 -0
- /package/src/components/presenters/components/{VVerticalTabPresenter.vue → VerticalTabPresenter.vue} +0 -0
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex justify-between pb-2">
|
|
3
|
-
<div class="flex justify-between w-full py-1">
|
|
4
|
-
<div>
|
|
5
|
-
<p class="text-lg font-semibold text-gray-900">
|
|
6
|
-
{{ componentData.name }}
|
|
7
|
-
</p>
|
|
8
|
-
<p class="text-sm text-gray-600 mt-1">
|
|
9
|
-
This section can contain up to {{ componentData.max_items }} logos
|
|
10
|
-
</p>
|
|
11
|
-
</div>
|
|
12
|
-
<div>
|
|
13
|
-
<a
|
|
14
|
-
@click="addItem"
|
|
15
|
-
class="text-sm cursor-pointer flex items-center justify-center gap-1 rounded-[99px] border border-brand-600 bg-brand-500 px-3.5 py-2 font-semibold text-white hover:bg-brand-600"
|
|
16
|
-
:class="{ 'border-gray-100 bg-gray-100 !text-gray-400 hover:bg-gray-100': componentData.data?.length >= componentData.max_items }"
|
|
17
|
-
>
|
|
18
|
-
<PlusIcon class="h-5 w-5"></PlusIcon>
|
|
19
|
-
<span>Add</span>
|
|
20
|
-
</a>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="flex flex-col gap-3">
|
|
25
|
-
<div
|
|
26
|
-
v-for="(item, index) in componentData.data"
|
|
27
|
-
class="flex flex-col gap-4 rounded-xl px-6 py-4 bg-gray-200"
|
|
28
|
-
:key="index"
|
|
29
|
-
:ref="index === componentData.data.length - 1 ? (el) => (lastItemRef = el) : null"
|
|
30
|
-
>
|
|
31
|
-
<div class="flex items-center justify-between">
|
|
32
|
-
<div class="text-lg font-semibold text-gray-900">
|
|
33
|
-
Logo #{{index + 1}}
|
|
34
|
-
</div>
|
|
35
|
-
<div class="relative flex items-end">
|
|
36
|
-
<ActionMenu @removeItem="handleDeleteItem(index)"/>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
<div class="flex flex-col gap-6">
|
|
40
|
-
<div class="flex flex-col gap-1.5">
|
|
41
|
-
<VFileUpload
|
|
42
|
-
name="image"
|
|
43
|
-
v-model="item.logo"
|
|
44
|
-
/>
|
|
45
|
-
<input-wrapper
|
|
46
|
-
is-vertical
|
|
47
|
-
field="url"
|
|
48
|
-
label-text="Url *"
|
|
49
|
-
class="w-full my-4"
|
|
50
|
-
:value="item.url"
|
|
51
|
-
>
|
|
52
|
-
<input
|
|
53
|
-
v-model="item.url"
|
|
54
|
-
name="url"
|
|
55
|
-
type="text"
|
|
56
|
-
placeholder="Enter your url"
|
|
57
|
-
class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
|
|
58
|
-
/>
|
|
59
|
-
</input-wrapper>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
<VModal ref="modalRef" entity="logo" :callback="deleteCallback"></VModal>
|
|
65
|
-
</template>
|
|
66
|
-
<script setup>
|
|
67
|
-
import {ref, nextTick, inject} from "vue";
|
|
68
|
-
import PlusIcon from "@/assets/img/icons/plus.svg";
|
|
69
|
-
import {defaultProps} from "@/components/helpers/defaultProps";
|
|
70
|
-
import ActionMenu from "@/components/common/ActionMenu.vue";
|
|
71
|
-
import InputWrapper from "@/components/common/InputWrapper.vue";
|
|
72
|
-
import VModal from "@/components/common/VModal.vue";
|
|
73
|
-
import DefaultFileUpload from "@/components/common/FileUpload.vue";
|
|
74
|
-
|
|
75
|
-
// Inject the FileUpload component or fallback to the default one
|
|
76
|
-
const VFileUpload = inject("VFileUpload", DefaultFileUpload);
|
|
77
|
-
|
|
78
|
-
const emit = defineEmits(["update"]);
|
|
79
|
-
|
|
80
|
-
const props = defineProps({
|
|
81
|
-
...defaultProps,
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
const componentData = ref(props.data.component);
|
|
85
|
-
const modalRef = ref(null);
|
|
86
|
-
const lastItemRef = ref(null);
|
|
87
|
-
const deleteItemIndex = ref(null);
|
|
88
|
-
|
|
89
|
-
function addItem() {
|
|
90
|
-
if (!componentData.value.hasOwnProperty('data')) {
|
|
91
|
-
componentData.value.data = [];
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (componentData.value.data?.length >= componentData.value.max_items) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
componentData.value.data?.push({
|
|
98
|
-
url: null,
|
|
99
|
-
logo: null,
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
nextTick(() => {
|
|
103
|
-
if (lastItemRef.value) {
|
|
104
|
-
lastItemRef.value.scrollIntoView({behavior: "smooth"});
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
emit("update", false);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
const handleDeleteItem = (index) => {
|
|
112
|
-
deleteItemIndex.value = index;
|
|
113
|
-
modalRef?.value?.open(index);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const deleteCallback = (index) => {
|
|
117
|
-
componentData.value.data?.splice(index, 1);
|
|
118
|
-
emit("update", false);
|
|
119
|
-
};
|
|
120
|
-
</script>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex flex-col">
|
|
3
|
-
<div class="flex flex-col gap-4 mb-4 border-b border-gray-200 pb-4">
|
|
4
|
-
<p class="text-lg font-semibold text-gray-900 border-b border-gray-200 pb-4">
|
|
5
|
-
Grid
|
|
6
|
-
</p>
|
|
7
|
-
<VToggle name="show" v-model="componentData.button.show" title="Show Button" />
|
|
8
|
-
<input-wrapper
|
|
9
|
-
is-vertical
|
|
10
|
-
field="title"
|
|
11
|
-
label-text="Title *"
|
|
12
|
-
class="w-full mb-4"
|
|
13
|
-
:value="componentData.button.title"
|
|
14
|
-
:limit="20"
|
|
15
|
-
>
|
|
16
|
-
<input
|
|
17
|
-
v-model="componentData.button.title"
|
|
18
|
-
name="title"
|
|
19
|
-
type="text"
|
|
20
|
-
placeholder="Title"
|
|
21
|
-
:maxlength="20"
|
|
22
|
-
class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
|
|
23
|
-
/>
|
|
24
|
-
</input-wrapper>
|
|
25
|
-
<linked-to
|
|
26
|
-
v-if="componentData?.button"
|
|
27
|
-
label="Link to"
|
|
28
|
-
name="button"
|
|
29
|
-
v-model:type="componentData.button.type"
|
|
30
|
-
v-model:url="componentData.button.url"
|
|
31
|
-
v-model:openInNewTab="componentData.button.open_in_new_tab"
|
|
32
|
-
:sites="sites"
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
<div>
|
|
36
|
-
<h3 v-if="componentData.content?.label" class="text-base text-gray-900 font-semibold">{{ componentData.content.label }}</h3>
|
|
37
|
-
<p v-if="componentData.content?.supportive_text" class="text-gray-600 text-base font-normal mt-2">{{ componentData.content.supportive_text }}</p>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</template>
|
|
41
|
-
<script setup>
|
|
42
|
-
import {ref} from "vue";
|
|
43
|
-
import {defaultProps} from "@/components/helpers/defaultProps";
|
|
44
|
-
import LinkedTo from "@/components/common/LinkedTo.vue";
|
|
45
|
-
import InputWrapper from "@/components/common/InputWrapper.vue";
|
|
46
|
-
import VToggle from "@/components/common/VToggle.vue";
|
|
47
|
-
|
|
48
|
-
const emit = defineEmits(["update"]);
|
|
49
|
-
|
|
50
|
-
const props = defineProps({
|
|
51
|
-
...defaultProps,
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
const componentData = ref(props.data.component);
|
|
55
|
-
</script>
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex justify-between pb-2">
|
|
3
|
-
<div class="flex justify-between w-full py-1">
|
|
4
|
-
<div>
|
|
5
|
-
<p class="text-lg font-semibold text-gray-900">
|
|
6
|
-
{{ componentData.name }}
|
|
7
|
-
</p>
|
|
8
|
-
<p class="text-sm text-gray-600 mt-1">
|
|
9
|
-
This section can contain up to {{ componentData.max_items }} videos
|
|
10
|
-
</p>
|
|
11
|
-
</div>
|
|
12
|
-
<div>
|
|
13
|
-
<a
|
|
14
|
-
@click="addItem"
|
|
15
|
-
class="text-sm cursor-pointer flex items-center justify-center gap-1 rounded-[99px] border border-brand-600 bg-brand-500 px-3.5 py-2 font-semibold text-white hover:bg-brand-600"
|
|
16
|
-
:class="{ 'border-gray-100 bg-gray-100 !text-gray-400 hover:bg-gray-100': componentData.data?.length >= componentData.max_items }"
|
|
17
|
-
>
|
|
18
|
-
<PlusIcon class="h-5 w-5"></PlusIcon>
|
|
19
|
-
<span>Add</span>
|
|
20
|
-
</a>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="flex flex-col gap-3">
|
|
25
|
-
<div
|
|
26
|
-
v-for="(item, index) in componentData.data"
|
|
27
|
-
class="flex flex-col gap-4 rounded-xl px-6 py-4 bg-gray-200"
|
|
28
|
-
:key="index"
|
|
29
|
-
:ref="index === componentData.data.length - 1 ? (el) => (lastItemRef = el) : null"
|
|
30
|
-
>
|
|
31
|
-
<div class="flex items-center justify-between">
|
|
32
|
-
<div class="text-lg font-semibold text-gray-900">
|
|
33
|
-
Video #{{index + 1}}
|
|
34
|
-
</div>
|
|
35
|
-
<div class="relative flex items-end">
|
|
36
|
-
<ActionMenu @removeItem="handleDeleteItem(index)"/>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
<div class="flex flex-col gap-6">
|
|
40
|
-
<div class="flex flex-col gap-1.5">
|
|
41
|
-
<VFileUpload
|
|
42
|
-
name="image"
|
|
43
|
-
type="video"
|
|
44
|
-
height="h-[250px]"
|
|
45
|
-
v-model="item.video"
|
|
46
|
-
/>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
<VModal ref="modalRef" entity="logo" :callback="deleteCallback"></VModal>
|
|
52
|
-
</template>
|
|
53
|
-
<script setup>
|
|
54
|
-
import {ref, inject} from "vue";
|
|
55
|
-
import PlusIcon from "@/assets/img/icons/plus.svg";
|
|
56
|
-
import {defaultProps} from "@/components/helpers/defaultProps";
|
|
57
|
-
import ActionMenu from "@/components/common/ActionMenu.vue";
|
|
58
|
-
import VModal from "@/components/common/VModal.vue";
|
|
59
|
-
import DefaultFileUpload from "@/components/common/FileUpload.vue";
|
|
60
|
-
|
|
61
|
-
// Inject the FileUpload component or fallback to the default one
|
|
62
|
-
const VFileUpload = inject("VFileUpload", DefaultFileUpload);
|
|
63
|
-
|
|
64
|
-
const emit = defineEmits(["update"]);
|
|
65
|
-
|
|
66
|
-
const props = defineProps({
|
|
67
|
-
...defaultProps,
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
const componentData = ref(props.data.component);
|
|
71
|
-
const modalRef = ref(null);
|
|
72
|
-
const lastItemRef = ref(null);
|
|
73
|
-
const deleteItemIndex = ref(null);
|
|
74
|
-
|
|
75
|
-
function addItem() {
|
|
76
|
-
if (!componentData.value.hasOwnProperty('data')) {
|
|
77
|
-
componentData.value.data = [];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (componentData.value.data?.length >= componentData.value.max_items) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
componentData.value.data?.push({
|
|
84
|
-
video: null,
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
emit("update", false);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const handleDeleteItem = (index) => {
|
|
91
|
-
deleteItemIndex.value = index;
|
|
92
|
-
modalRef?.value?.open(index);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const deleteCallback = (index) => {
|
|
96
|
-
componentData.value.data?.splice(index, 1);
|
|
97
|
-
emit("update", false);
|
|
98
|
-
};
|
|
99
|
-
</script>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<logo-builder
|
|
3
|
-
title="Logo items"
|
|
4
|
-
:description="'Up to ' + props.data.max_items + ' items'"
|
|
5
|
-
add-button-label="Add"
|
|
6
|
-
:maximum-items="props.data.max_items"
|
|
7
|
-
:content="props.data"
|
|
8
|
-
:sites="sites"
|
|
9
|
-
:errors="errors"
|
|
10
|
-
item-classes="!bg-gray-200"
|
|
11
|
-
error-key="changes.items."
|
|
12
|
-
/>
|
|
13
|
-
<button-group>
|
|
14
|
-
<dsg-button label="Cancel" :uri="backUrl" theme="gray-secondary"></dsg-button>
|
|
15
|
-
<dsg-button @click="save" label="Save changes" type="button" theme="brand" classes="flex-1"></dsg-button>
|
|
16
|
-
</button-group>
|
|
17
|
-
</template>
|
|
18
|
-
<script setup>
|
|
19
|
-
const props = defineProps({
|
|
20
|
-
data: {
|
|
21
|
-
type: Object,
|
|
22
|
-
required: true,
|
|
23
|
-
},
|
|
24
|
-
errors: {
|
|
25
|
-
type: Object,
|
|
26
|
-
required: true,
|
|
27
|
-
},
|
|
28
|
-
sites: {
|
|
29
|
-
type: Object,
|
|
30
|
-
required: true,
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
const emit = defineEmits(["update"]);
|
|
35
|
-
|
|
36
|
-
const save = () => {
|
|
37
|
-
emit("update", props.data);
|
|
38
|
-
};
|
|
39
|
-
</script>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<link-builder
|
|
3
|
-
title="Link items"
|
|
4
|
-
description="Up to 7 items"
|
|
5
|
-
add-button-label="Add"
|
|
6
|
-
:maximum-items="props.data.max_items"
|
|
7
|
-
:content="props.data"
|
|
8
|
-
:sites="sites"
|
|
9
|
-
:errors="errors"
|
|
10
|
-
item-classes="!bg-gray-200"
|
|
11
|
-
error-key="changes.items."
|
|
12
|
-
/>
|
|
13
|
-
<button-group>
|
|
14
|
-
<dsg-button label="Cancel" :uri="backUrl" theme="gray-secondary"></dsg-button>
|
|
15
|
-
<dsg-button @click="save" label="Save changes" type="button" theme="brand" classes="flex-1"></dsg-button>
|
|
16
|
-
</button-group>
|
|
17
|
-
</template>
|
|
18
|
-
<script setup>
|
|
19
|
-
const props = defineProps({
|
|
20
|
-
data: {
|
|
21
|
-
type: Object,
|
|
22
|
-
required: true,
|
|
23
|
-
},
|
|
24
|
-
errors: {
|
|
25
|
-
type: Object,
|
|
26
|
-
required: true,
|
|
27
|
-
},
|
|
28
|
-
sites: {
|
|
29
|
-
type: Object,
|
|
30
|
-
required: true,
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
const emit = defineEmits(["update"]);
|
|
35
|
-
|
|
36
|
-
const save = () => {
|
|
37
|
-
emit("update", props.data);
|
|
38
|
-
};
|
|
39
|
-
</script>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex flex-col gap-4">
|
|
3
|
-
<DsgInput
|
|
4
|
-
label="Heading"
|
|
5
|
-
required
|
|
6
|
-
name="heading"
|
|
7
|
-
v-model="props.data.heading"
|
|
8
|
-
maxlength="51"
|
|
9
|
-
:errors="errors['changes.heading'] ?? []"
|
|
10
|
-
v-if="props.data.hasHeading"
|
|
11
|
-
/>
|
|
12
|
-
<DsgInput
|
|
13
|
-
label="Supporting text"
|
|
14
|
-
required
|
|
15
|
-
name="supporting_text"
|
|
16
|
-
v-model="props.data.supportingText"
|
|
17
|
-
maxlength="100"
|
|
18
|
-
:errors="errors['changes.supportingText'] ? errors['changes.supportingText'] : []"
|
|
19
|
-
v-if="props.data.hasSupportingText"
|
|
20
|
-
/>
|
|
21
|
-
</div>
|
|
22
|
-
<button-group>
|
|
23
|
-
<dsg-button label="Cancel" :uri="backUrl" theme="gray-secondary"></dsg-button>
|
|
24
|
-
<dsg-button @click="save" label="Save changes" type="button" theme="brand" classes="flex-1"></dsg-button>
|
|
25
|
-
</button-group>
|
|
26
|
-
</template>
|
|
27
|
-
<script setup>
|
|
28
|
-
import { DsgInput } from "@dcodegroup-au/dsg-vue";
|
|
29
|
-
const props = defineProps({
|
|
30
|
-
data: {
|
|
31
|
-
type: Object,
|
|
32
|
-
required: true,
|
|
33
|
-
},
|
|
34
|
-
errors: {
|
|
35
|
-
type: Object,
|
|
36
|
-
required: true,
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
const emit = defineEmits(["update"]);
|
|
41
|
-
|
|
42
|
-
const save = () => {
|
|
43
|
-
emit("update", props.data);
|
|
44
|
-
};
|
|
45
|
-
</script>
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex items-start gap-4">
|
|
3
|
-
<div class="flex flex-1 flex-col gap-4">
|
|
4
|
-
<card title="Description">
|
|
5
|
-
<div class="flex flex-col gap-3">
|
|
6
|
-
<DsgInput
|
|
7
|
-
label="Title *"
|
|
8
|
-
required
|
|
9
|
-
name="title"
|
|
10
|
-
v-model="form.title"
|
|
11
|
-
maxlength="51"
|
|
12
|
-
:errors="props.errors ? props.errors['changes.title'] : []"
|
|
13
|
-
/>
|
|
14
|
-
<DsgEditor v-model="form.description" label="Description *" />
|
|
15
|
-
</div>
|
|
16
|
-
</card>
|
|
17
|
-
<card title="Linked to">
|
|
18
|
-
<div class="flex flex-col gap-4">
|
|
19
|
-
<DsgToggle v-model="form.show_button" name="show_button" label="Show Button" />
|
|
20
|
-
<template v-if="form.show_button">
|
|
21
|
-
<DsgInput label="Button Label *" required name="label" v-model="form.button_label" maxlength="51" />
|
|
22
|
-
<linked-to
|
|
23
|
-
key="primary"
|
|
24
|
-
v-model:type="form.button_url_type"
|
|
25
|
-
v-model:url="form.button_url"
|
|
26
|
-
v-model:openInNewTab="form.button_open_in_new_tab"
|
|
27
|
-
:sites="sites"
|
|
28
|
-
/>
|
|
29
|
-
</template>
|
|
30
|
-
</div>
|
|
31
|
-
</card>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="flex w-full max-w-[356px] flex-col gap-4">
|
|
34
|
-
<card title="Visibility" supporting_text="Toggle off if you'd like to hide this item">
|
|
35
|
-
<DsgToggle v-model="form.public" name="public" label="Public" />
|
|
36
|
-
</card>
|
|
37
|
-
<card title="Featured Image" supporting_text="Recommended dimension: 1200*1060px">
|
|
38
|
-
<file-upload
|
|
39
|
-
key="image"
|
|
40
|
-
description=".JPG, .PNG (Max file size: 5 MB)"
|
|
41
|
-
@upload="(e) => (form.featured_image = e)"
|
|
42
|
-
:existing-file="form.featured_image"
|
|
43
|
-
@remove="() => (form.featured_image = null)"
|
|
44
|
-
/>
|
|
45
|
-
</card>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
<button-group>
|
|
49
|
-
<dsg-button label="Cancel" :uri="backUrl" theme="gray-secondary"></dsg-button>
|
|
50
|
-
<dsg-button label="Save changes" type="button" theme="brand" classes="flex-1" @click="update"></dsg-button>
|
|
51
|
-
</button-group>
|
|
52
|
-
</template>
|
|
53
|
-
<script setup>
|
|
54
|
-
import { DsgInput, DsgToggle } from "@dcodegroup-au/dsg-vue";
|
|
55
|
-
import DsgEditor from "@/js/vue/components/dsg-vue/DsgEditor.vue";
|
|
56
|
-
import LinkedTo from "@/js/vue/components/admin/LinkedTo.vue";
|
|
57
|
-
|
|
58
|
-
const emit = defineEmits(["update"]);
|
|
59
|
-
|
|
60
|
-
const props = defineProps({
|
|
61
|
-
data: {
|
|
62
|
-
type: Object,
|
|
63
|
-
required: true,
|
|
64
|
-
},
|
|
65
|
-
errors: {
|
|
66
|
-
type: Object,
|
|
67
|
-
required: true,
|
|
68
|
-
},
|
|
69
|
-
sites: {
|
|
70
|
-
type: Object,
|
|
71
|
-
required: true,
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
const form = ref({
|
|
76
|
-
title: props.data.title,
|
|
77
|
-
description: props.data.description,
|
|
78
|
-
show_button: props.data.show_button,
|
|
79
|
-
button_url: props.data.button_url,
|
|
80
|
-
button_label: props.data.button_label,
|
|
81
|
-
button_url_type: props.data.button_url_type,
|
|
82
|
-
button_open_in_new_tab: props.data.button_open_in_new_tab,
|
|
83
|
-
public: props.data.public,
|
|
84
|
-
featured_image: props.data.featured_image,
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
const update = () => {
|
|
88
|
-
emit("update", form.value);
|
|
89
|
-
};
|
|
90
|
-
</script>
|
|
File without changes
|
|
File without changes
|
/package/src/components/presenters/components/{VCarouselPresenter.vue → CarouselPresenter.vue}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/presenters/components/{VVerticalTabPresenter.vue → VerticalTabPresenter.vue}
RENAMED
|
File without changes
|