@myissue/vue-website-page-builder 3.2.25 → 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/dist/vue-website-page-builder.css +1 -1
- package/dist/vue-website-page-builder.js +2731 -2792
- package/dist/vue-website-page-builder.umd.cjs +44 -44
- package/package.json +1 -1
- package/src/Components/PageBuilder/Settings/AdvancedPageBuilderSettings.vue +3 -3
- package/src/Components/PageBuilder/Settings/PageBuilderSettings.vue +0 -97
- package/src/DemoComponents/DemoUnsplash.vue +39 -13
- package/src/composables/preloadImage.ts +8 -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.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",
|
|
@@ -166,7 +166,7 @@ function prettifyHtml(html) {
|
|
|
166
166
|
<thead class="bg-gray-50">
|
|
167
167
|
<tr>
|
|
168
168
|
<th
|
|
169
|
-
class="px-6 py-3 text-left text-xs font-medium text-gray-
|
|
169
|
+
class="px-6 py-3 text-left text-xs font-medium text-gray-900 tracking-wider"
|
|
170
170
|
>
|
|
171
171
|
Element classes
|
|
172
172
|
</th>
|
|
@@ -245,7 +245,7 @@ function prettifyHtml(html) {
|
|
|
245
245
|
<thead class="bg-gray-50">
|
|
246
246
|
<tr>
|
|
247
247
|
<th
|
|
248
|
-
class="px-6 py-3 text-left text-xs font-medium text-gray-
|
|
248
|
+
class="px-6 py-3 text-left text-xs font-medium text-gray-900 tracking-wider"
|
|
249
249
|
>
|
|
250
250
|
HTML Code
|
|
251
251
|
</th>
|
|
@@ -327,7 +327,7 @@ function prettifyHtml(html) {
|
|
|
327
327
|
<thead class="bg-gray-50">
|
|
328
328
|
<tr>
|
|
329
329
|
<th
|
|
330
|
-
class="px-6 py-3 text-left text-xs font-medium text-gray-
|
|
330
|
+
class="px-6 py-3 text-left text-xs font-medium text-gray-900 tracking-wider"
|
|
331
331
|
>
|
|
332
332
|
HTML Code
|
|
333
333
|
</th>
|
|
@@ -481,103 +481,6 @@ const handleDownloadHTML = function () {
|
|
|
481
481
|
</div>
|
|
482
482
|
</div>
|
|
483
483
|
<!-- Form Type Table - end -->
|
|
484
|
-
|
|
485
|
-
<div
|
|
486
|
-
class="mt-8"
|
|
487
|
-
v-if="
|
|
488
|
-
getConfigPageBuilder?.updateOrCreate &&
|
|
489
|
-
!isEmptyObject(getConfigPageBuilder.updateOrCreate)
|
|
490
|
-
"
|
|
491
|
-
>
|
|
492
|
-
<h4 class="myQuaternaryHeader text-sm mb-2">Delete Saved Layout</h4>
|
|
493
|
-
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg">
|
|
494
|
-
<div class="overflow-x-auto">
|
|
495
|
-
<table class="min-w-full divide-y divide-gray-300">
|
|
496
|
-
<thead class="bg-gray-50">
|
|
497
|
-
<tr>
|
|
498
|
-
<th
|
|
499
|
-
scope="col"
|
|
500
|
-
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
|
|
501
|
-
>
|
|
502
|
-
Option
|
|
503
|
-
</th>
|
|
504
|
-
<th
|
|
505
|
-
scope="col"
|
|
506
|
-
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
|
|
507
|
-
>
|
|
508
|
-
Description
|
|
509
|
-
</th>
|
|
510
|
-
</tr>
|
|
511
|
-
</thead>
|
|
512
|
-
|
|
513
|
-
<tbody class="bg-white divide-y divide-gray-200">
|
|
514
|
-
<tr>
|
|
515
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
|
|
516
|
-
Form Type
|
|
517
|
-
</td>
|
|
518
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
|
519
|
-
<span
|
|
520
|
-
class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium"
|
|
521
|
-
:class="
|
|
522
|
-
getConfigPageBuilder.updateOrCreate === 'create'
|
|
523
|
-
? 'bg-green-100 text-green-800'
|
|
524
|
-
: 'bg-blue-100 text-blue-800'
|
|
525
|
-
"
|
|
526
|
-
>
|
|
527
|
-
<span
|
|
528
|
-
v-if="
|
|
529
|
-
getConfigPageBuilder &&
|
|
530
|
-
getConfigPageBuilder.updateOrCreate.formType === 'create'
|
|
531
|
-
"
|
|
532
|
-
>
|
|
533
|
-
{{ getConfigPageBuilder.updateOrCreate.formType }}
|
|
534
|
-
</span>
|
|
535
|
-
<span
|
|
536
|
-
v-if="
|
|
537
|
-
getConfigPageBuilder &&
|
|
538
|
-
getConfigPageBuilder.updateOrCreate.formType === 'update'
|
|
539
|
-
"
|
|
540
|
-
>
|
|
541
|
-
{{ getConfigPageBuilder.updateOrCreate.formType }}
|
|
542
|
-
</span>
|
|
543
|
-
</span>
|
|
544
|
-
</td>
|
|
545
|
-
</tr>
|
|
546
|
-
<tr>
|
|
547
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
|
|
548
|
-
Delete
|
|
549
|
-
</td>
|
|
550
|
-
<td
|
|
551
|
-
v-if="getConfigPageBuilder?.updateOrCreate.formType === 'create'"
|
|
552
|
-
class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"
|
|
553
|
-
>
|
|
554
|
-
<button
|
|
555
|
-
class="myPrimaryDeleteButton w-full"
|
|
556
|
-
@click="pageBuilderClass.removeItemComponentsLocalStorageCreate"
|
|
557
|
-
type="button"
|
|
558
|
-
>
|
|
559
|
-
Delete
|
|
560
|
-
</button>
|
|
561
|
-
</td>
|
|
562
|
-
<td
|
|
563
|
-
v-if="getConfigPageBuilder?.updateOrCreate.formType === 'update'"
|
|
564
|
-
class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"
|
|
565
|
-
>
|
|
566
|
-
<button
|
|
567
|
-
class="myPrimaryDeleteButton w-full"
|
|
568
|
-
@click="pageBuilderClass.removeItemComponentsLocalStorageUpdate"
|
|
569
|
-
type="button"
|
|
570
|
-
>
|
|
571
|
-
Delete
|
|
572
|
-
</button>
|
|
573
|
-
</td>
|
|
574
|
-
</tr>
|
|
575
|
-
</tbody>
|
|
576
|
-
</table>
|
|
577
|
-
</div>
|
|
578
|
-
</div>
|
|
579
|
-
</div>
|
|
580
|
-
<!-- Delete Draft - end -->
|
|
581
484
|
</div>
|
|
582
485
|
</div>
|
|
583
486
|
<!-- Advanced Settings - end -->
|
|
@@ -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) {
|
|
@@ -155,19 +167,21 @@ onMounted(async () => {
|
|
|
155
167
|
}
|
|
156
168
|
"
|
|
157
169
|
type="submit"
|
|
158
|
-
class="
|
|
170
|
+
class="myPrimaryTag break-keep mr-4"
|
|
159
171
|
>
|
|
160
172
|
Search
|
|
161
173
|
</button>
|
|
162
174
|
</div>
|
|
163
175
|
</form>
|
|
164
176
|
<div v-if="getUnsplashImages && getUnsplashImages.results" class="mt-2">
|
|
165
|
-
<div
|
|
177
|
+
<div
|
|
178
|
+
class="flex lg:justify-between justify-end items-center gap-2 py-2 px-2 mb-1 rounded-full border border-gray-200 shadow-sm"
|
|
179
|
+
>
|
|
166
180
|
<div class="lg:flex hidden justify-left items-center gap-2">
|
|
167
181
|
<button
|
|
168
182
|
@click="searchByOrientation('landscape')"
|
|
169
183
|
type="button"
|
|
170
|
-
class="
|
|
184
|
+
class="myPrimaryTag"
|
|
171
185
|
:class="{
|
|
172
186
|
'bg-myPrimaryBrandColor text-white': getOrientationValue === 'landscape',
|
|
173
187
|
'': getOrientationValue !== 'landscape',
|
|
@@ -178,7 +192,7 @@ onMounted(async () => {
|
|
|
178
192
|
<button
|
|
179
193
|
@click="searchByOrientation('portrait')"
|
|
180
194
|
type="button"
|
|
181
|
-
class="
|
|
195
|
+
class="myPrimaryTag"
|
|
182
196
|
:class="{
|
|
183
197
|
'bg-myPrimaryBrandColor text-white': getOrientationValue === 'portrait',
|
|
184
198
|
'': getOrientationValue !== 'portrait',
|
|
@@ -189,7 +203,7 @@ onMounted(async () => {
|
|
|
189
203
|
<button
|
|
190
204
|
@click="searchByOrientation('squarish')"
|
|
191
205
|
type="button"
|
|
192
|
-
class="
|
|
206
|
+
class="myPrimaryTag"
|
|
193
207
|
:class="{
|
|
194
208
|
'bg-myPrimaryBrandColor text-white': getOrientationValue === 'squarish',
|
|
195
209
|
'': getOrientationValue !== 'squarish',
|
|
@@ -228,7 +242,7 @@ onMounted(async () => {
|
|
|
228
242
|
<button
|
|
229
243
|
v-if="Number(getCurrentPageNumber) > 1"
|
|
230
244
|
:disabled="Number(getCurrentPageNumber) < 1"
|
|
231
|
-
class="
|
|
245
|
+
class="myPrimaryTag"
|
|
232
246
|
@click="previousPage(Number(getCurrentPageNumber--))"
|
|
233
247
|
>
|
|
234
248
|
{{
|
|
@@ -236,12 +250,12 @@ onMounted(async () => {
|
|
|
236
250
|
}}
|
|
237
251
|
</button>
|
|
238
252
|
|
|
239
|
-
<span class="myPrimaryTag
|
|
253
|
+
<span class="myPrimaryTag py-2.5 px-4">
|
|
240
254
|
{{ Number(getCurrentPageNumber) }}
|
|
241
255
|
</span>
|
|
242
256
|
<button
|
|
243
257
|
:disabled="Number(getCurrentPageNumber) >= getUnsplashImages.total_pages"
|
|
244
|
-
class="
|
|
258
|
+
class="myPrimaryTag"
|
|
245
259
|
:class="{
|
|
246
260
|
'opacity-50': Number(getCurrentPageNumber) >= getUnsplashImages.total_pages,
|
|
247
261
|
}"
|
|
@@ -254,7 +268,7 @@ onMounted(async () => {
|
|
|
254
268
|
</nav>
|
|
255
269
|
</div>
|
|
256
270
|
|
|
257
|
-
<div class="min-h-[
|
|
271
|
+
<div class="min-h-[33rem] max-h-[33rem] flex gap-6">
|
|
258
272
|
<div class="w-9/12 pr-1 rounded-lg overflow-y-auto">
|
|
259
273
|
<div class="grid md:grid-cols-4 sm:grid-cols-4 grid-cols-2 gap-2">
|
|
260
274
|
<div
|
|
@@ -285,7 +299,19 @@ onMounted(async () => {
|
|
|
285
299
|
</div>
|
|
286
300
|
<!-- Sidebar # start -->
|
|
287
301
|
<div class="w-3/12 overflow-y-auto">
|
|
288
|
-
<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">
|
|
289
315
|
<img
|
|
290
316
|
class="mx-auto block w-full object-cover object-center cursor-pointer"
|
|
291
317
|
:src="`${getCurrentImage}`"
|