@myissue/vue-website-page-builder 3.2.20 → 3.2.22
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/README.md +1 -1
- package/dist/vue-website-page-builder.js +404 -410
- package/dist/vue-website-page-builder.umd.cjs +14 -14
- package/package.json +1 -1
- package/src/App.vue +1 -1
- package/src/Components/PageBuilder/Settings/AdvancedPageBuilderSettings.vue +1 -1
- package/src/{Components/PageBuilder/DemoComponent → DemoComponents}/DemoUnsplash.vue +5 -7
- package/src/{Components/Homepage → DemoComponents}/HomeSection.vue +29 -26
- package/src/DemoComponents/html.json +47 -0
- package/src/composables/PageBuilderClass.ts +8 -4
- /package/src/{Components/PageBuilder/DemoComponent → DemoComponents}/DemoBuilderComponents.vue +0 -0
- /package/src/{Components/PageBuilder/DemoComponent → DemoComponents}/DemoMediaLibraryComponent.vue +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myissue/vue-website-page-builder",
|
|
3
|
-
"version": "v3.2.
|
|
3
|
+
"version": "v3.2.22",
|
|
4
4
|
"description": "🚧 DEVELOPMENT VERSION - Vue.js page builder component with drag & drop functionality. Not ready for production use.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/vue-website-page-builder.umd.cjs",
|
package/src/App.vue
CHANGED
|
@@ -174,7 +174,7 @@ const updateCurrentTab = function (tab) {
|
|
|
174
174
|
|
|
175
175
|
<p class="whitespace-pre-line leading-5 mt-4">
|
|
176
176
|
Component Title:
|
|
177
|
-
{{
|
|
177
|
+
{{ component?.title }}
|
|
178
178
|
</p>
|
|
179
179
|
<p class="whitespace-pre-line leading-5 mt-4">
|
|
180
180
|
Component HTML:<br />
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, onMounted } from 'vue'
|
|
3
3
|
const unsplashKey = import.meta.env.VITE_UNSPLASH_KEY
|
|
4
|
-
import { usePageBuilderModal } from '
|
|
5
|
-
import PageBuilderClass from '
|
|
6
|
-
import { sharedPageBuilderStore } from '
|
|
4
|
+
import { usePageBuilderModal } from '../composables/usePageBuilderModal'
|
|
5
|
+
import PageBuilderClass from '../composables/PageBuilderClass.ts'
|
|
6
|
+
import { sharedPageBuilderStore } from '../stores/shared-store'
|
|
7
7
|
|
|
8
8
|
const { closeMediaLibraryModal } = usePageBuilderModal()
|
|
9
9
|
|
|
@@ -87,8 +87,6 @@ const nextPage = async function () {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
const applySelectedImage = async function (imageURL) {
|
|
90
|
-
console.log('file:', imageURL)
|
|
91
|
-
|
|
92
90
|
// Ensure the current image is set in the store with proper structure
|
|
93
91
|
pageBuilderClass.pageBuilderStateStore.setCurrentImage({
|
|
94
92
|
src: `${imageURL}`,
|
|
@@ -263,11 +261,11 @@ onMounted(async () => {
|
|
|
263
261
|
v-for="image in getUnsplashImages.results"
|
|
264
262
|
:key="image.id"
|
|
265
263
|
@click="handleImageClick({ url: image.urls.regular, user: image.user.name })"
|
|
266
|
-
class="border border-
|
|
264
|
+
class="border border-gray-200 my-2 px-2 p-2 cursor-pointer"
|
|
267
265
|
>
|
|
268
266
|
<img
|
|
269
267
|
:alt="image.user.name"
|
|
270
|
-
class="group block w-full overflow-hidden
|
|
268
|
+
class="group block w-full overflow-hidden cursor-pointer"
|
|
271
269
|
:src="image.urls.thumb"
|
|
272
270
|
/>
|
|
273
271
|
<p class="myPrimaryParagraph text-xs font-normal mt-2">By: {{ image.user.name }}</p>
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import FullWidthElement from '
|
|
3
|
-
import PageBuilder from '
|
|
4
|
-
import PageBuilderClass from '
|
|
5
|
-
import { sharedPageBuilderStore } from '../../stores/shared-store'
|
|
2
|
+
import FullWidthElement from '../Components/Layouts/FullWidthElement.vue'
|
|
3
|
+
import PageBuilder from '../PageBuilder/PageBuilder.vue'
|
|
4
|
+
import PageBuilderClass from '../composables/PageBuilderClass.ts'
|
|
6
5
|
|
|
7
|
-
import DemoMediaLibraryComponent from '
|
|
8
|
-
import DemoBuilderComponents from '
|
|
6
|
+
import DemoMediaLibraryComponent from './DemoMediaLibraryComponent.vue'
|
|
7
|
+
import DemoBuilderComponents from './DemoBuilderComponents.vue'
|
|
8
|
+
import { computed, onMounted } from 'vue'
|
|
9
|
+
import { sharedPageBuilderStore } from '../stores/shared-store'
|
|
10
|
+
import html from './html.json'
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const pageBuilderStateStore = sharedPageBuilderStore
|
|
13
|
+
const pageBuilderClass = new PageBuilderClass(pageBuilderStateStore)
|
|
14
|
+
|
|
15
|
+
const getLocalStorageItemName = computed(() => {
|
|
16
|
+
return pageBuilderStateStore.getLocalStorageItemName
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const getComponents = computed(() => {
|
|
20
|
+
return pageBuilderStateStore.getComponents
|
|
21
|
+
})
|
|
14
22
|
|
|
15
23
|
const features = [
|
|
16
24
|
{
|
|
@@ -80,9 +88,14 @@ const configPageBuilder = {
|
|
|
80
88
|
},
|
|
81
89
|
}
|
|
82
90
|
|
|
83
|
-
const pageBuilderStateStore = sharedPageBuilderStore
|
|
84
|
-
const pageBuilderClass = new PageBuilderClass(pageBuilderStateStore)
|
|
85
91
|
pageBuilderClass.setConfigPageBuilder(configPageBuilder)
|
|
92
|
+
|
|
93
|
+
onMounted(async () => {
|
|
94
|
+
if (localStorage.getItem(getLocalStorageItemName.value)) {
|
|
95
|
+
} else {
|
|
96
|
+
pageBuilderClass.loadExistingContent(JSON.stringify(html), true)
|
|
97
|
+
}
|
|
98
|
+
})
|
|
86
99
|
</script>
|
|
87
100
|
|
|
88
101
|
<template>
|
|
@@ -103,19 +116,13 @@ pageBuilderClass.setConfigPageBuilder(configPageBuilder)
|
|
|
103
116
|
href="https://github.com/qaiswardag/vue-website-page-builder"
|
|
104
117
|
target="_blank"
|
|
105
118
|
>
|
|
106
|
-
Go to the GitHub repository
|
|
119
|
+
Go to the GitHub repository.
|
|
107
120
|
</a>
|
|
108
|
-
or
|
|
109
|
-
<span @click="handleButton" class="text-myPrimaryLinkColor font-medium cursor-pointer">
|
|
110
|
-
play around with the page builder.
|
|
111
|
-
</span>
|
|
112
121
|
</p>
|
|
113
122
|
</div>
|
|
114
123
|
<div>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
:CustomBuilderComponents="DemoBuilderComponents"
|
|
118
|
-
></PageBuilder>
|
|
124
|
+
<!-- :CustomBuilderComponents="DemoBuilderComponents" -->
|
|
125
|
+
<PageBuilder :CustomMediaLibraryComponent="DemoMediaLibraryComponent"></PageBuilder>
|
|
119
126
|
</div>
|
|
120
127
|
</div>
|
|
121
128
|
|
|
@@ -132,12 +139,8 @@ pageBuilderClass.setConfigPageBuilder(configPageBuilder)
|
|
|
132
139
|
href="https://github.com/qaiswardag/vue-website-page-builder"
|
|
133
140
|
target="_blank"
|
|
134
141
|
>
|
|
135
|
-
Go to the GitHub repository
|
|
142
|
+
Go to the GitHub repository.
|
|
136
143
|
</a>
|
|
137
|
-
or
|
|
138
|
-
<span @click="handleButton" class="text-myPrimaryLinkColor font-medium cursor-pointer">
|
|
139
|
-
play around with the page builder.
|
|
140
|
-
</span>
|
|
141
144
|
</p>
|
|
142
145
|
</template>
|
|
143
146
|
<template #content>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"html_code": "<section data-componentid=\"0bc7406f-472e-4889-85fc-8ef3c263ac5e\"><div class=\"relative py-4\"><div class=\"mx-auto max-w-7xl lg:px-4 px-2\"><div class=\"break-words\"><h2><strong>Demo Content</strong></h2></div></div></div></section>",
|
|
4
|
+
"id": "0bc7406f-472e-4889-85fc-8ef3c263ac5e",
|
|
5
|
+
"title": "Header H2"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"html_code": "<section data-componentid=\"44244178-e183-4439-8150-6a2fdb2dfb72\">\n <div class=\"relative py-4\">\n <div class=\"mx-auto max-w-7xl lg:px-4 px-2\">\n <div><p>Introducing the The Lightweight Free Vue Click & Drop Page Builder create and enhance digital experiences with Vue. Lightweight & Minimalist Page Builder with an elegant and intuitive design, focused on simplicity and speed. Build responsive pages like listings, jobs or blog posts and manage content easily using the free Click & Drop Page Builder.</p></div>\n </div>\n </div>\n </section>",
|
|
9
|
+
"id": "44244178-e183-4439-8150-6a2fdb2dfb72",
|
|
10
|
+
"title": "Text"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"html_code": "<section data-componentid=\"5515d33a-b0ce-4150-b775-2f00cf7118c9\">\n<div class=\"w-full md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2 bg-black\"><div class=\"mx-auto max-w-7xl\"><div class=\"myPrimaryGap grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3\"> <div class=\"flex-1 py-2\"> <img class=\"object-cover w-full object-top aspect-[9/16] smooth-transition rounded-tl-full\" src=\"https://images.unsplash.com/photo-1632765866070-3fadf25d3d5b?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wzMTI0Mzl8MHwxfHNlYXJjaHwxMjh8fG1vZGVsfGVufDB8fHx8MTc0OTgzMDgzMXww&ixlib=rb-4.1.0&q=80&w=1080\" alt=\"provider\" data-image=\"b2fb2e61-c916-4195-9cd2-c1d25747b4f7\"> </div> <div class=\"flex-1 py-2\"> <img class=\"object-cover w-full object-top aspect-[9/16] smooth-transition rounded-full\" src=\"https://images.unsplash.com/photo-1542513217-0b0eedf7005d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wzMTI0Mzl8MHwxfHNlYXJjaHwxMDR8fG1vZGVsfGVufDB8fHx8MTc0OTgzMDc5MXww&ixlib=rb-4.1.0&q=80&w=1080\" alt=\"provider\" data-image=\"fdf36a14-f7ef-4025-942f-c87b20b18005\"> </div> <div class=\"flex-1 py-2\"> <img class=\"object-cover w-full object-top aspect-[9/16] smooth-transition rounded-br-full\" src=\"https://images.unsplash.com/photo-1574015974293-817f0ebebb74?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wzMTI0Mzl8MHwxfHNlYXJjaHwyNnx8bW9kZWx8ZW58MHx8fHwxNzQ5ODMwNzM1fDA&ixlib=rb-4.1.0&q=80&w=1080\" alt=\"provider\" data-image=\"618a74a7-5d41-4dce-937c-130dd7490569\"></div></div> </div></div>\n</section>",
|
|
14
|
+
"id": "5515d33a-b0ce-4150-b775-2f00cf7118c9",
|
|
15
|
+
"title": "3 Vertical Images"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"html_code": "<section data-componentid=\"4a96e0ed-b74c-4d9d-bcdb-aa7dcb794712\"><div class=\"relative py-4\"><div class=\"mx-auto max-w-7xl lg:px-4 px-2\"><div class=\"break-words\"><h3>The web builder for stunning pages</h3></div></div></div></section>",
|
|
19
|
+
"id": "4a96e0ed-b74c-4d9d-bcdb-aa7dcb794712",
|
|
20
|
+
"title": "Header H3"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"html_code": "<section data-componentid=\"79f6665b-9179-448d-ae87-1eddc9d8e5ed\">\n <div class=\"relative py-4\">\n <div class=\"mx-auto max-w-7xl lg:px-4 px-2\">\n <div><p>A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.</p></div>\n </div>\n </div>\n </section>",
|
|
24
|
+
"id": "79f6665b-9179-448d-ae87-1eddc9d8e5ed",
|
|
25
|
+
"title": "Text"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"html_code": "<section data-componentid=\"2310d49a-dda0-48ac-811a-795e48c18d06\">\n<div class=\"w-full md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2\"><div class=\"mx-auto max-w-7xl\"><div class=\"myPrimaryGap grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-2\"> <div class=\"flex-1 py-2\"> <img class=\"object-cover w-full object-top aspect-[9/16] smooth-transition\" src=\"https://images.unsplash.com/photo-1592966719124-2ca2978ba325?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wzMTI0Mzl8MHwxfHNlYXJjaHwzfHxraW5mb2xrfGVufDB8fHx8MTc0OTgzMTAzM3ww&ixlib=rb-4.1.0&q=80&w=1080\" alt=\"provider\" data-image=\"536340a5-c7e1-479d-a2ae-a85e6dacc2df\"> </div> <div class=\"flex-1 py-2\"> <img class=\"object-cover w-full object-top aspect-[9/16] smooth-transition\" src=\"https://images.unsplash.com/photo-1549298222-1c31e8915347?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wzMTI0Mzl8MHwxfHNlYXJjaHwzfHxtYWdhemluZSUyMGZhc2hpb258ZW58MHx8fHwxNzQ5ODMxNTEwfDA&ixlib=rb-4.1.0&q=80&w=1080\" alt=\"provider\" data-image=\"41655496-4742-4cc6-bc3c-abe7c2b241fb\"> </div> </div> </div> </div>\n</section>",
|
|
29
|
+
"id": "2310d49a-dda0-48ac-811a-795e48c18d06",
|
|
30
|
+
"title": "2 Vertical Images"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"html_code": "<section data-componentid=\"7cb6af83-f761-4044-a0cf-d6224fa01cab\"><div class=\"relative py-4\" selected=\"\"><div class=\"mx-auto max-w-7xl lg:px-4 px-2\"><div class=\"break-words\"><h3>Just publish it with Vue</h3></div></div></div></section>",
|
|
34
|
+
"id": "7cb6af83-f761-4044-a0cf-d6224fa01cab",
|
|
35
|
+
"title": "Header H3"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"html_code": "<section data-componentid=\"04c007ed-f4c9-4a63-a38c-4cb2e4c949d6\">\n <div class=\"relative py-4\">\n <div class=\"mx-auto max-w-7xl lg:px-4 px-2\">\n <div class=\"\"><p>The website builder loved by designers. Easily design, preview, and adjust layouts for every screen size.<br>Clean. Fast. Intuitive. Not everything powerful has to look complicated.</p></div>\n </div>\n </div>\n </section>",
|
|
39
|
+
"id": "04c007ed-f4c9-4a63-a38c-4cb2e4c949d6",
|
|
40
|
+
"title": "Text"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"html_code": "<section data-componentid=\"204ce730-ce82-4a9a-88e6-da431bb76c38\">\n <div class=\"py-4\">\n <div class=\"mx-auto max-w-7xl w-full pt-6 pb-6\">\n <div id=\"youtube-video\" class=\"w-full aspect-video p-4\">\n\n <iframe frameborder=\"0\" allowfullscreen=\"\" class=\"w-full aspect-video\" src=\"https://www.youtube.com/embed/pJvwV1Fm0vU\" allow=\"accelerometer; autoplay; clipboard-write;\">\n </iframe>\n </div>\n </div>\n </div>\n </section>",
|
|
44
|
+
"id": "204ce730-ce82-4a9a-88e6-da431bb76c38",
|
|
45
|
+
"title": "YouTube Video"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
@@ -1653,8 +1653,7 @@ class PageBuilderClass {
|
|
|
1653
1653
|
extractedSections.push({
|
|
1654
1654
|
html_code: htmlElement.outerHTML,
|
|
1655
1655
|
id: htmlElement.dataset.componentid || null,
|
|
1656
|
-
title:
|
|
1657
|
-
htmlElement.dataset.title || htmlElement.dataset.componentid || 'Untitled Component',
|
|
1656
|
+
title: htmlElement.title || htmlElement.dataset.componentid || 'Untitled Component',
|
|
1658
1657
|
})
|
|
1659
1658
|
})
|
|
1660
1659
|
|
|
@@ -1667,15 +1666,20 @@ class PageBuilderClass {
|
|
|
1667
1666
|
}
|
|
1668
1667
|
|
|
1669
1668
|
// Load existing content from HTML when in update mode
|
|
1670
|
-
loadExistingContent(data?: string): void {
|
|
1669
|
+
loadExistingContent(data?: string, injectCustomHTMLSections?: boolean): void {
|
|
1671
1670
|
if (this.showRunningMethodLogs) {
|
|
1672
1671
|
console.log('loadExistingContent')
|
|
1673
1672
|
}
|
|
1674
1673
|
|
|
1675
1674
|
if (!this.pageBuilderStateStore.getConfigPageBuilder) return
|
|
1676
1675
|
|
|
1676
|
+
if (injectCustomHTMLSections && data !== undefined) {
|
|
1677
|
+
this.setComponentsFromData(data)
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
const storedData = this.areComponentsStoredInLocalStorage()
|
|
1681
|
+
|
|
1677
1682
|
if (this.pageBuilderStateStore.getConfigPageBuilder?.updateOrCreate?.formType === 'create') {
|
|
1678
|
-
const storedData = this.areComponentsStoredInLocalStorage()
|
|
1679
1683
|
if (storedData) {
|
|
1680
1684
|
this.setComponentsFromData(storedData)
|
|
1681
1685
|
}
|
/package/src/{Components/PageBuilder/DemoComponent → DemoComponents}/DemoBuilderComponents.vue
RENAMED
|
File without changes
|
/package/src/{Components/PageBuilder/DemoComponent → DemoComponents}/DemoMediaLibraryComponent.vue
RENAMED
|
File without changes
|