@dcodegroup-au/page-builder 0.1.9 → 0.2.1
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 +2241 -2238
- package/dist/page-builder.umd.js +44 -44
- package/example/src/assets/ExampleComponent.vue +17 -0
- package/example/src/main.js +5 -1
- package/package.json +1 -1
- package/src/components/ItemEdit.vue +7 -3
- package/src/components/PageBuilder.vue +1 -1
- package/src/components/builders/VLogos.vue +6 -3
- package/src/components/presenters/components/VVerticalTabPresenter.vue +2 -2
- package/src/components/presenters/modules/QuickLinks.vue +10 -7
- package/src/components/presenters/modules/VTabs.vue +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="text-lg pb-6 font-semibold text-gray-900 border-b border-gray-200">Instruction</div>
|
|
3
|
+
<div class="flex flex-col gap-3 py-6 text-gray-600">
|
|
4
|
+
<div class="font-semibold text-gray-900">Modules</div>
|
|
5
|
+
<p>Modules are fixed and for internal reference only, and admin users cannot make the following changes:</p>
|
|
6
|
+
<ul class="list-inside list-disc pl-3">
|
|
7
|
+
<li>Edit the title of any module (e.g., "Hero header").</li>
|
|
8
|
+
<li>Change the order of the modules.</li>
|
|
9
|
+
<li>Add new module.</li>
|
|
10
|
+
</ul>
|
|
11
|
+
<p>For any changes at the module level, please contact the development team.</p>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="flex flex-col gap-3 py-6 text-gray-600">
|
|
14
|
+
<div class="font-semibold text-gray-900">Edit sub-modules or edit nested items</div>
|
|
15
|
+
<p>Click any sub-module to edit its settings and any nested items within it.</p>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
package/example/src/main.js
CHANGED
|
@@ -2,9 +2,13 @@ import { createApp } from 'vue'
|
|
|
2
2
|
|
|
3
3
|
import App from './App.vue'
|
|
4
4
|
import { PageBuilder, ItemEdit, PageRender } from '../../dist/page-builder.es.js'
|
|
5
|
-
import '../../dist/page-builder.css'
|
|
5
|
+
import '../../dist/page-builder.css';
|
|
6
|
+
|
|
7
|
+
// This is how to override upload component
|
|
8
|
+
// import VFileUpload from "./assets/ExampleComponent.vue";
|
|
6
9
|
|
|
7
10
|
const app = createApp(App)
|
|
11
|
+
// app.provide("VFileUpload", VFileUpload)
|
|
8
12
|
app.component('ItemEdit', ItemEdit)
|
|
9
13
|
app.component('PageBuilder', PageBuilder)
|
|
10
14
|
app.component('PageRender', PageRender)
|
package/package.json
CHANGED
|
@@ -99,8 +99,9 @@
|
|
|
99
99
|
<VToggle v-model="form.public" name="public" label="Public" />
|
|
100
100
|
</card>
|
|
101
101
|
<card title="Featured Image" supporting_text="Recommended dimension: 1200*1060px">
|
|
102
|
-
<
|
|
102
|
+
<VFileUpload
|
|
103
103
|
name="image"
|
|
104
|
+
height="h-[200px]"
|
|
104
105
|
v-model="form.featured_image"
|
|
105
106
|
/>
|
|
106
107
|
</card>
|
|
@@ -120,13 +121,16 @@
|
|
|
120
121
|
</div>
|
|
121
122
|
</template>
|
|
122
123
|
<script setup>
|
|
123
|
-
import { ref, computed } from "vue";
|
|
124
|
+
import { ref, computed, inject } from "vue";
|
|
124
125
|
import QuillEditor from "@/components/common/QuillEditor.vue";
|
|
125
126
|
import Card from "@/components/common/Card.vue";
|
|
126
127
|
import LinkedTo from "@/components/common/LinkedTo.vue";
|
|
127
128
|
import InputWrapper from "@/components/common/InputWrapper.vue";
|
|
128
129
|
import VToggle from "@/components/common/VToggle.vue";
|
|
129
|
-
import
|
|
130
|
+
import DefaultFileUpload from "@/components/common/FileUpload.vue";
|
|
131
|
+
|
|
132
|
+
// Inject the FileUpload component or fallback to the default one
|
|
133
|
+
const VFileUpload = inject("VFileUpload", DefaultFileUpload);
|
|
130
134
|
import axios from "axios";
|
|
131
135
|
|
|
132
136
|
const emit = defineEmits(["update"]);
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
52
|
<slot>
|
|
53
|
-
<div class="flex justify-between space-x-xsSpace pt-xsSpace gap-4
|
|
53
|
+
<div class="flex justify-between space-x-xsSpace pt-xsSpace gap-4 sticky bottom-0 w-full bg-gray-200 py-2 px-6">
|
|
54
54
|
<a @click="close"
|
|
55
55
|
class="w-[200px] py-[9px] bg-white rounded-full border border-gray-300 shadow-xs text-md font-semibold hover:bg-gray-100 text-gray-700 text-center cursor-pointer">
|
|
56
56
|
Cancel
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
</div>
|
|
39
39
|
<div class="flex flex-col gap-6">
|
|
40
40
|
<div class="flex flex-col gap-1.5">
|
|
41
|
-
<
|
|
41
|
+
<VFileUpload
|
|
42
42
|
name="image"
|
|
43
43
|
background="bg-white"
|
|
44
44
|
v-model="item.logo"
|
|
@@ -65,13 +65,16 @@
|
|
|
65
65
|
<VModal ref="modalRef" entity="logo" :callback="deleteCallback"></VModal>
|
|
66
66
|
</template>
|
|
67
67
|
<script setup>
|
|
68
|
-
import {ref, nextTick} from "vue";
|
|
68
|
+
import {ref, nextTick, inject} from "vue";
|
|
69
69
|
import PlusIcon from "@/assets/img/icons/plus.svg";
|
|
70
70
|
import {defaultProps} from "@/components/helpers/defaultProps";
|
|
71
71
|
import ActionMenu from "@/components/common/ActionMenu.vue";
|
|
72
72
|
import InputWrapper from "@/components/common/InputWrapper.vue";
|
|
73
73
|
import VModal from "@/components/common/VModal.vue";
|
|
74
|
-
import
|
|
74
|
+
import DefaultFileUpload from "@/components/common/FileUpload.vue";
|
|
75
|
+
|
|
76
|
+
// Inject the FileUpload component or fallback to the default one
|
|
77
|
+
const VFileUpload = inject("VFileUpload", DefaultFileUpload);
|
|
75
78
|
|
|
76
79
|
const emit = defineEmits(["update"]);
|
|
77
80
|
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<div class="flex-1 w-full md:w-1/2 flex flex-col">
|
|
5
5
|
<div v-for="item in publicTabs" :key="item.title">
|
|
6
6
|
<div
|
|
7
|
-
class="flex-col flex gap-1.5 cursor-pointer
|
|
8
|
-
:class="{'border-l-4 border-brand-600': selectedItem === item}"
|
|
7
|
+
class="flex-col flex gap-1.5 cursor-pointer mb-4 group"
|
|
8
|
+
:class="{'border-l-4 border-brand-600': selectedItem === item, 'border-l-4 border-gray-100': selectedItem !== item}"
|
|
9
9
|
@click.prevent="selectItem(item)"
|
|
10
10
|
>
|
|
11
11
|
<div class="py-4 pl-4 md:pl-6">
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="w-full bg-navy-800 py-10 relative lg:h-[336px]">
|
|
3
|
-
<div class="
|
|
4
|
-
<div
|
|
5
|
-
<component
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
<div class="max-w-[1400px] mx-auto w-full">
|
|
4
|
+
<div class="max-md:mx-[30px] max-1xl:mx-[120px] 1xl:mx-0 relative z-10">
|
|
5
|
+
<div v-for="(component, index) in section.components" class="w-full md:w-3/4">
|
|
6
|
+
<component
|
|
7
|
+
:is="currentComponent(component)"
|
|
8
|
+
:key="index"
|
|
9
|
+
:component="component"
|
|
10
|
+
></component>
|
|
11
|
+
</div>
|
|
10
12
|
</div>
|
|
11
13
|
</div>
|
|
14
|
+
|
|
12
15
|
<HeaderVector class="absolute right-0 top-0"></HeaderVector>
|
|
13
16
|
</div>
|
|
14
17
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="max-w-[
|
|
3
|
-
<div class="md:mx-[
|
|
2
|
+
<div class="max-w-[1400px] mx-auto w-full">
|
|
3
|
+
<div class="max-md:mx-[30px] max-1xl:mx-[120px] 1xl:mx-0 bg-navy-25 rounded-[48px] p-16">
|
|
4
4
|
<div v-for="(component, index) in section.components">
|
|
5
5
|
<component
|
|
6
6
|
:is="currentComponent(component)"
|