@myissue/vue-website-page-builder 3.2.26 → 3.2.28
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/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.28",
|
|
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",
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { ref, onMounted } from 'vue'
|
|
3
3
|
const unsplashKey = import.meta.env.VITE_UNSPLASH_KEY
|
|
4
4
|
import { usePageBuilderModal } from '../composables/usePageBuilderModal'
|
|
5
|
+
import { delay } from '../composables/delay'
|
|
6
|
+
import { preloadImage } from '../composables/preloadImage'
|
|
5
7
|
import PageBuilderClass from '../composables/PageBuilderClass.ts'
|
|
6
8
|
import { sharedPageBuilderStore } from '../stores/shared-store'
|
|
7
9
|
|
|
@@ -12,6 +14,7 @@ const pageBuilderStateStore = sharedPageBuilderStore
|
|
|
12
14
|
const pageBuilderClass = new PageBuilderClass(pageBuilderStateStore)
|
|
13
15
|
|
|
14
16
|
const getIsLoading = ref(false)
|
|
17
|
+
const getIsLoadingImage = ref(false)
|
|
15
18
|
const getSearchTerm = ref('')
|
|
16
19
|
const getCurrentPageNumber = ref(1)
|
|
17
20
|
const getOrientationValue = ref('')
|
|
@@ -62,9 +65,18 @@ const fetchUnsplash = async function () {
|
|
|
62
65
|
getIsLoading.value = false
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
|
|
69
|
+
const handleImageClick = async function (data) {
|
|
70
|
+
getIsLoadingImage.value = true
|
|
71
|
+
|
|
72
|
+
if (data.url) {
|
|
73
|
+
await preloadImage(data.url)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
await delay(100)
|
|
77
|
+
getCurrentImage.value = data.url || ''
|
|
78
|
+
|
|
79
|
+
getIsLoadingImage.value = false
|
|
68
80
|
}
|
|
69
81
|
|
|
70
82
|
const searchByOrientation = function (orientationParameter) {
|
|
@@ -287,7 +299,19 @@ onMounted(async () => {
|
|
|
287
299
|
</div>
|
|
288
300
|
<!-- Sidebar # start -->
|
|
289
301
|
<div class="w-3/12 overflow-y-auto">
|
|
290
|
-
<template v-if="
|
|
302
|
+
<template v-if="getIsLoadingImage">
|
|
303
|
+
<div class="flex items-center justify-center mt-4">
|
|
304
|
+
<div
|
|
305
|
+
class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"
|
|
306
|
+
>
|
|
307
|
+
<span
|
|
308
|
+
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
|
|
309
|
+
>Loading...</span
|
|
310
|
+
>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
</template>
|
|
314
|
+
<template v-if="getCurrentImage && !getIsLoadingImage">
|
|
291
315
|
<img
|
|
292
316
|
class="mx-auto block w-full object-cover object-center cursor-pointer"
|
|
293
317
|
:src="`${getCurrentImage}`"
|