@myissue/vue-website-page-builder 3.3.49 → 3.3.51
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 +23 -0
- package/dist/home/page_builder_architecture.png +0 -0
- package/dist/vue-website-page-builder.js +667 -664
- package/dist/vue-website-page-builder.umd.cjs +23 -23
- package/package.json +1 -1
- package/src/Components/Loaders/GlobalLoader.vue +10 -3
- package/src/Components/Modals/DynamicModalBuilder.vue +1 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/ImageEditor.vue +1 -1
- package/src/DemoComponents/DemoUnsplash.vue +2 -2
- package/src/DemoComponents/HomeSection.vue +1 -1
- package/src/PageBuilder/PageBuilder.vue +1 -1
- package/src/composables/PageBuilderService.ts +8 -11
package/package.json
CHANGED
|
@@ -3,9 +3,16 @@
|
|
|
3
3
|
class="pbx-bg-white pbx-flex pbx-justify-center pbx-items-center min-pbx-h-screen pbx-h-screen pbx-w-screen pbx-fixed pbx-inset-0 pbx-z-[10000]"
|
|
4
4
|
>
|
|
5
5
|
<div class="pbx-absolute pbx-top-1/3">
|
|
6
|
-
<div
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
<div class="pbx-flex pbx-items-center pbx-justify-center pbx-mt-4">
|
|
7
|
+
<div
|
|
8
|
+
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
|
|
9
|
+
>
|
|
10
|
+
<span
|
|
11
|
+
class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
|
|
12
|
+
>Loading...</span
|
|
13
|
+
>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
9
16
|
</div>
|
|
10
17
|
</div>
|
|
11
18
|
</template>
|
|
@@ -157,7 +157,7 @@ const thirdButtonBuilder = function () {
|
|
|
157
157
|
<template v-if="isLoading">
|
|
158
158
|
<div class="pbx-flex pbx-items-center pbx-my-2 pbx-py-4 pbx-px-2 pbx-justify-end">
|
|
159
159
|
<div
|
|
160
|
-
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border
|
|
160
|
+
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
|
|
161
161
|
>
|
|
162
162
|
<span
|
|
163
163
|
class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
|
|
@@ -64,7 +64,7 @@ const loadingImage = async function (imageURL) {
|
|
|
64
64
|
<div v-show="getIsLoadingImage">
|
|
65
65
|
<div class="pbx-flex pbx-items-center pbx-justify-center pbx-mt-4 pbx-min-h-80">
|
|
66
66
|
<div
|
|
67
|
-
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border
|
|
67
|
+
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
|
|
68
68
|
>
|
|
69
69
|
<span
|
|
70
70
|
class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
|
|
@@ -274,7 +274,7 @@ onMounted(async () => {
|
|
|
274
274
|
<div v-if="getIsLoading">
|
|
275
275
|
<div class="pbx-flex pbx-items-center pbx-justify-center pbx-mt-4">
|
|
276
276
|
<div
|
|
277
|
-
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border
|
|
277
|
+
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
|
|
278
278
|
>
|
|
279
279
|
<span
|
|
280
280
|
class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
|
|
@@ -332,7 +332,7 @@ onMounted(async () => {
|
|
|
332
332
|
<template v-if="getIsLoadingImage">
|
|
333
333
|
<div class="pbx-flex pbx-items-center pbx-justify-center pbx-mt-4">
|
|
334
334
|
<div
|
|
335
|
-
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border
|
|
335
|
+
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
|
|
336
336
|
>
|
|
337
337
|
<span
|
|
338
338
|
class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
|
|
@@ -371,7 +371,7 @@ onMounted(async () => {
|
|
|
371
371
|
<div
|
|
372
372
|
class="pbx-font-sans pbx-max-w-full pbx-border-solid pbx-border pbx-border-gray-400 pbx-inset-x-0 pbx-z-10 pbx-bg-white pbx-overflow-x-auto pbx-h-full"
|
|
373
373
|
>
|
|
374
|
-
<GlobalLoader v-if="getIsLoadingGlobal
|
|
374
|
+
<GlobalLoader v-if="getIsLoadingGlobal && !openAppNotStartedModal"></GlobalLoader>
|
|
375
375
|
<ModalBuilder
|
|
376
376
|
title="The builder hasn’t started yet"
|
|
377
377
|
:showModalBuilder="openAppNotStartedModal"
|
|
@@ -39,7 +39,6 @@ export class PageBuilderService {
|
|
|
39
39
|
private getRestoredElement: ComputedRef<string | null>
|
|
40
40
|
private getComponentArrayAddMethod: ComputedRef<string | null>
|
|
41
41
|
private NoneListernesTags: string[]
|
|
42
|
-
private delay: (ms?: number) => Promise<void>
|
|
43
42
|
private hasStartedEditing: boolean = false
|
|
44
43
|
// Hold data from Database or Backend for updated post
|
|
45
44
|
private originalComponents: BuilderResourceData | undefined = undefined
|
|
@@ -91,8 +90,6 @@ export class PageBuilderService {
|
|
|
91
90
|
'BLOCKQUOTE',
|
|
92
91
|
'BR',
|
|
93
92
|
]
|
|
94
|
-
|
|
95
|
-
this.delay = delay
|
|
96
93
|
}
|
|
97
94
|
|
|
98
95
|
// Deselect any selected or hovered elements in the builder UI
|
|
@@ -276,7 +273,7 @@ export class PageBuilderService {
|
|
|
276
273
|
const localStorageData = this.loadStoredComponentsFromStorage()
|
|
277
274
|
|
|
278
275
|
this.pageBuilderStateStore.setIsLoadingGlobal(true)
|
|
279
|
-
await delay(
|
|
276
|
+
await delay(300)
|
|
280
277
|
const config = this.pageBuilderStateStore.getPageBuilderConfig
|
|
281
278
|
const formType = config && config.updateOrCreate && config.updateOrCreate.formType
|
|
282
279
|
|
|
@@ -404,7 +401,7 @@ export class PageBuilderService {
|
|
|
404
401
|
this.pageBuilderStateStore.setIsLoadingGlobal(true)
|
|
405
402
|
const localStorageData = this.loadStoredComponentsFromStorage()
|
|
406
403
|
|
|
407
|
-
await
|
|
404
|
+
await delay(300)
|
|
408
405
|
|
|
409
406
|
// Deselect any selected or hovered elements in the builder UI
|
|
410
407
|
await this.clearHtmlSelection()
|
|
@@ -730,7 +727,7 @@ export class PageBuilderService {
|
|
|
730
727
|
// Deselect any selected or hovered elements in the builder UI
|
|
731
728
|
//
|
|
732
729
|
this.#saveDomComponentsToLocalStorage()
|
|
733
|
-
await
|
|
730
|
+
await delay(400)
|
|
734
731
|
} catch (err) {
|
|
735
732
|
console.error('Error trying auto save.', err)
|
|
736
733
|
} finally {
|
|
@@ -742,7 +739,7 @@ export class PageBuilderService {
|
|
|
742
739
|
try {
|
|
743
740
|
this.pageBuilderStateStore.setIsSaving(true)
|
|
744
741
|
this.#saveDomComponentsToLocalStorage()
|
|
745
|
-
await
|
|
742
|
+
await delay(400)
|
|
746
743
|
} catch (err) {
|
|
747
744
|
console.error('Error trying saving.', err)
|
|
748
745
|
} finally {
|
|
@@ -768,7 +765,7 @@ export class PageBuilderService {
|
|
|
768
765
|
) {
|
|
769
766
|
this.pageBuilderStateStore.setIsSaving(true)
|
|
770
767
|
this.#saveDomComponentsToLocalStorage()
|
|
771
|
-
await
|
|
768
|
+
await delay(400)
|
|
772
769
|
|
|
773
770
|
this.pageBuilderStateStore.setIsSaving(false)
|
|
774
771
|
}
|
|
@@ -776,7 +773,7 @@ export class PageBuilderService {
|
|
|
776
773
|
if (passedConfig && !passedConfig.userSettings) {
|
|
777
774
|
this.pageBuilderStateStore.setIsSaving(true)
|
|
778
775
|
this.#saveDomComponentsToLocalStorage()
|
|
779
|
-
await
|
|
776
|
+
await delay(400)
|
|
780
777
|
|
|
781
778
|
this.pageBuilderStateStore.setIsSaving(false)
|
|
782
779
|
}
|
|
@@ -1650,7 +1647,7 @@ export class PageBuilderService {
|
|
|
1650
1647
|
|
|
1651
1648
|
if (typeof updateDraftFromLocalStorage === 'string') {
|
|
1652
1649
|
this.pageBuilderStateStore.setIsLoadingResumeEditing(true)
|
|
1653
|
-
await delay(
|
|
1650
|
+
await delay(400)
|
|
1654
1651
|
await this.#updateComponentsFromString(updateDraftFromLocalStorage)
|
|
1655
1652
|
this.pageBuilderStateStore.setIsLoadingResumeEditing(false)
|
|
1656
1653
|
}
|
|
@@ -1671,7 +1668,7 @@ export class PageBuilderService {
|
|
|
1671
1668
|
|
|
1672
1669
|
if (formType === 'update') {
|
|
1673
1670
|
this.pageBuilderStateStore.setIsRestoring(true)
|
|
1674
|
-
await
|
|
1671
|
+
await delay(400)
|
|
1675
1672
|
|
|
1676
1673
|
// Restore the original content if available
|
|
1677
1674
|
if (Array.isArray(this.originalComponents)) {
|