@myissue/vue-website-page-builder 3.1.13 → 3.1.15
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 +5161 -5194
- package/dist/vue-website-page-builder.umd.cjs +38 -38
- package/package.json +1 -1
- package/src/App.vue +2 -2
- package/src/Components/Homepage/HomeSection.vue +18 -7
- package/src/Components/Modals/{DynamicModal.vue → DynamicModalBuilder.vue} +38 -31
- package/src/Components/Modals/MediaLibraryModal.vue +1 -1
- package/src/Components/Modals/{Modal.vue → ModalBuilder.vue} +9 -15
- package/src/Components/Modals/PageBuilderPreviewModal.vue +13 -6
- package/src/Components/PageBuilder/DemoContent/NoneCustomSearchComponent.vue +0 -17
- package/src/Components/PageBuilder/DropdownsPlusToggles/OptionsDropdown.vue +113 -87
- package/src/Components/PageBuilder/EditorMenu/Editables/BackgroundColorEditor.vue +2 -2
- package/src/Components/PageBuilder/EditorMenu/Editables/BorderRadius.vue +2 -2
- package/src/Components/PageBuilder/EditorMenu/Editables/Borders.vue +3 -3
- package/src/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue +1 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue +13 -13
- package/src/Components/PageBuilder/EditorMenu/Editables/DeleteElement.vue +1 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/EditGetElement.vue +25 -25
- package/src/Components/PageBuilder/EditorMenu/Editables/ElementEditor.vue +2 -2
- package/src/Components/PageBuilder/EditorMenu/Editables/ImageEditor.vue +3 -3
- package/src/Components/PageBuilder/EditorMenu/Editables/LinkEditor.vue +1 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageBackgroundOpacity.vue +2 -2
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageOpacity.vue +2 -2
- package/src/Components/PageBuilder/EditorMenu/Editables/OpacityEditor.vue +3 -3
- package/src/Components/PageBuilder/EditorMenu/Editables/PaddingPlusMargin.vue +2 -2
- package/src/Components/PageBuilder/EditorMenu/Editables/TextColorEditor.vue +2 -2
- package/src/Components/PageBuilder/EditorMenu/Editables/Typography.vue +3 -3
- package/src/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue +13 -13
- package/src/Components/PageBuilder/Settings/AdvancedPageBuilderSettings.vue +9 -1
- package/src/Components/PageBuilder/Settings/PageBuilderSettings.vue +306 -15
- package/src/Components/Search/SearchComponents.vue +14 -8
- package/src/Components/TipTap/TipTap.vue +1 -1
- package/src/Components/TipTap/TipTapInput.vue +15 -17
- package/src/PageBuilder/PageBuilder.vue +37 -131
- package/src/composables/PageBuilderClass.ts +90 -80
- package/src/stores/page-builder-state.ts +9 -192
- package/src/types/index.ts +13 -10
- package/src/utils/builder/html-doc-declaration-with-components.ts +1 -1
- package/src/utils/html-elements/componentHelpers.ts +3 -3
- package/src/composables/isObject.ts +0 -6
- package/src/composables/usePromise.ts +0 -10
- package/src/composables/vueFetch.ts +0 -278
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myissue/vue-website-page-builder",
|
|
3
|
-
"version": "v3.1.
|
|
3
|
+
"version": "v3.1.15",
|
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import HomeSection from '
|
|
3
|
-
import Footer from '
|
|
2
|
+
import HomeSection from './Components/Homepage/HomeSection.vue'
|
|
3
|
+
import Footer from './Components/Homepage/Footer.vue'
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
6
|
<template>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import PageBuilder from '@/PageBuilder/PageBuilder.vue'
|
|
2
|
+
import FullWidthElement from '../../Components/Layouts/FullWidthElement.vue'
|
|
3
|
+
import PageBuilder from '../../PageBuilder/PageBuilder.vue'
|
|
5
4
|
|
|
6
5
|
// first button function
|
|
7
6
|
const handleButton = function () {
|
|
@@ -80,10 +79,22 @@ const features = [
|
|
|
80
79
|
</div>
|
|
81
80
|
<div>
|
|
82
81
|
<PageBuilder
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
:configPageBuilder="{
|
|
83
|
+
updateOrCreate: 'create',
|
|
84
|
+
pageBuilderLogo: {
|
|
85
|
+
src: '/logo/logo.svg',
|
|
86
|
+
},
|
|
87
|
+
userForPageBuilder: { name: 'John Doe' },
|
|
88
|
+
resourceData: {
|
|
89
|
+
title: 'Demo Article',
|
|
90
|
+
id: 1,
|
|
91
|
+
},
|
|
92
|
+
userSettings: {
|
|
93
|
+
theme: 'light',
|
|
94
|
+
language: 'en',
|
|
95
|
+
autoSave: true,
|
|
96
|
+
},
|
|
97
|
+
}"
|
|
87
98
|
></PageBuilder>
|
|
88
99
|
</div>
|
|
89
100
|
<div @click="handleButton" class="myPrimaryContentSection cursor-pointer">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import
|
|
2
|
+
import ModalBuilder from './ModalBuilder.vue'
|
|
3
3
|
import {} from '@headlessui/vue'
|
|
4
4
|
|
|
5
5
|
defineProps({
|
|
6
|
-
|
|
6
|
+
showDynamicModalBuilder: {
|
|
7
7
|
type: Boolean,
|
|
8
8
|
default: false,
|
|
9
9
|
required: true,
|
|
@@ -55,28 +55,35 @@ defineProps({
|
|
|
55
55
|
})
|
|
56
56
|
|
|
57
57
|
const emit = defineEmits([
|
|
58
|
-
'
|
|
59
|
-
'
|
|
60
|
-
'
|
|
58
|
+
'firstModalButtonFunctionDynamicModalBuilder',
|
|
59
|
+
'secondModalButtonFunctionDynamicModalBuilder',
|
|
60
|
+
'thirdModalButtonFunctionDynamicModalBuilder',
|
|
61
61
|
])
|
|
62
62
|
|
|
63
63
|
// first button function
|
|
64
|
-
const
|
|
65
|
-
|
|
64
|
+
const firstButtonBuilder = function () {
|
|
65
|
+
console.log('firstButtonBuilder VUE.js raaan')
|
|
66
|
+
emit('firstModalButtonFunctionDynamicModalBuilder')
|
|
66
67
|
}
|
|
67
68
|
// second button function
|
|
68
|
-
const
|
|
69
|
-
|
|
69
|
+
const secondButtonBuilder = function () {
|
|
70
|
+
console.log('secondButtonBuilder VUE.js raaan')
|
|
71
|
+
emit('secondModalButtonFunctionDynamicModalBuilder')
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
// third button function
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
+
const thirdButtonBuilder = function () {
|
|
76
|
+
console.log('thirdButtonBuilder VUE.js raaan')
|
|
77
|
+
emit('thirdModalButtonFunctionDynamicModalBuilder')
|
|
75
78
|
}
|
|
76
79
|
</script>
|
|
77
80
|
|
|
78
81
|
<template>
|
|
79
|
-
<
|
|
82
|
+
<ModalBuilder
|
|
83
|
+
:showModalBuilder="showDynamicModalBuilder"
|
|
84
|
+
@closeMainModalBuilder="firstButtonBuilder"
|
|
85
|
+
:maxWidth="maxWidth"
|
|
86
|
+
>
|
|
80
87
|
<slot name="content" />
|
|
81
88
|
|
|
82
89
|
<div
|
|
@@ -124,7 +131,7 @@ const thirdButton = function () {
|
|
|
124
131
|
|
|
125
132
|
<div
|
|
126
133
|
class="h-10 w-10 flex-end cursor-pointer rounded-full flex items-center border-none justify-center bg-gray-50 aspect-square hover:bg-myPrimaryLinkColor hover:text-white hover:fill-white focus-visible:ring-0"
|
|
127
|
-
@click="
|
|
134
|
+
@click="firstButtonBuilder"
|
|
128
135
|
>
|
|
129
136
|
<span class="material-symbols-outlined"> close </span>
|
|
130
137
|
</div>
|
|
@@ -158,13 +165,13 @@ const thirdButton = function () {
|
|
|
158
165
|
ref="firstButtonRef"
|
|
159
166
|
class="mySecondaryButton"
|
|
160
167
|
type="button"
|
|
161
|
-
@click="
|
|
168
|
+
@click="firstButtonBuilder"
|
|
162
169
|
>
|
|
163
170
|
{{ firstButtonText }}
|
|
164
171
|
</button>
|
|
165
172
|
|
|
166
173
|
<div v-if="secondButtonText">
|
|
167
|
-
<div v-if="disabled && disabledWhichButton === '
|
|
174
|
+
<div v-if="disabled && disabledWhichButton === 'secondButtonBuilder'">
|
|
168
175
|
<button
|
|
169
176
|
class="flex items-center gap-2 myPrimaryButton bg-yellow-300 hover:bg-yellow-400 text-myPrimaryDarkGrayColor hover:text-myPrimaryDarkGrayColor focus:ring-yellow-400 w-full"
|
|
170
177
|
:class="{
|
|
@@ -172,7 +179,7 @@ const thirdButton = function () {
|
|
|
172
179
|
}"
|
|
173
180
|
:disabled="disabled"
|
|
174
181
|
type="button"
|
|
175
|
-
@click="
|
|
182
|
+
@click="secondButtonBuilder"
|
|
176
183
|
>
|
|
177
184
|
<div>
|
|
178
185
|
<Transition name="bounce">
|
|
@@ -201,11 +208,11 @@ const thirdButton = function () {
|
|
|
201
208
|
</button>
|
|
202
209
|
</div>
|
|
203
210
|
|
|
204
|
-
<div v-if="!disabled || disabledWhichButton !== '
|
|
211
|
+
<div v-if="!disabled || disabledWhichButton !== 'secondButtonBuilder'">
|
|
205
212
|
<button
|
|
206
213
|
class="myPrimaryButton bg-yellow-300 hover:bg-yellow-400 text-myPrimaryDarkGrayColor hover:text-myPrimaryDarkGrayColor focus:ring-yellow-400 w-full"
|
|
207
214
|
type="button"
|
|
208
|
-
@click="
|
|
215
|
+
@click="secondButtonBuilder"
|
|
209
216
|
>
|
|
210
217
|
{{ secondButtonText }}
|
|
211
218
|
</button>
|
|
@@ -214,7 +221,7 @@ const thirdButton = function () {
|
|
|
214
221
|
|
|
215
222
|
<div v-if="thirdButtonText">
|
|
216
223
|
<div v-if="type === 'default'">
|
|
217
|
-
<div v-if="disabled && disabledWhichButton === '
|
|
224
|
+
<div v-if="disabled && disabledWhichButton === 'thirdButtonBuilder'">
|
|
218
225
|
<button
|
|
219
226
|
class="flex items-center gap-2 myPrimaryButton bg-myPrimaryLinkColor focus-visible:ring-myPrimaryLinkColor focus:ring-myPrimaryLinkColor hover:bg-myPrimaryLinkColor w-full"
|
|
220
227
|
:class="{
|
|
@@ -250,18 +257,18 @@ const thirdButton = function () {
|
|
|
250
257
|
</button>
|
|
251
258
|
</div>
|
|
252
259
|
|
|
253
|
-
<div v-if="!disabled || disabledWhichButton !== '
|
|
260
|
+
<div v-if="!disabled || disabledWhichButton !== 'thirdButtonBuilder'">
|
|
254
261
|
<button
|
|
255
262
|
class="myPrimaryButton bg-myPrimaryLinkColor focus-visible:ring-myPrimaryLinkColor focus:ring-myPrimaryLinkColor hover:bg-myPrimaryLinkColor w-full"
|
|
256
263
|
type="button"
|
|
257
|
-
@click="
|
|
264
|
+
@click="thirdButtonBuilder"
|
|
258
265
|
>
|
|
259
266
|
{{ thirdButtonText }}
|
|
260
267
|
</button>
|
|
261
268
|
</div>
|
|
262
269
|
</div>
|
|
263
270
|
<div v-if="type === 'success'">
|
|
264
|
-
<div v-if="disabled && disabledWhichButton === '
|
|
271
|
+
<div v-if="disabled && disabledWhichButton === 'thirdButtonBuilder'">
|
|
265
272
|
<button
|
|
266
273
|
class="flex items-center gap-2 myPrimaryButton bg-myPrimaryLinkColor focus-visible:ring-myPrimaryLinkColor focus:ring-myPrimaryLinkColor hover:bg-myPrimaryLinkColor w-full"
|
|
267
274
|
:class="{
|
|
@@ -297,11 +304,11 @@ const thirdButton = function () {
|
|
|
297
304
|
</button>
|
|
298
305
|
</div>
|
|
299
306
|
|
|
300
|
-
<div v-if="!disabled || disabledWhichButton !== '
|
|
307
|
+
<div v-if="!disabled || disabledWhichButton !== 'thirdButtonBuilder'">
|
|
301
308
|
<button
|
|
302
309
|
class="myPrimaryButton bg-myPrimaryLinkColor focus-visible:ring-myPrimaryLinkColor focus:ring-myPrimaryLinkColor hover:bg-myPrimaryLinkColor w-full"
|
|
303
310
|
type="button"
|
|
304
|
-
@click="
|
|
311
|
+
@click="thirdButtonBuilder"
|
|
305
312
|
>
|
|
306
313
|
{{ thirdButtonText }}
|
|
307
314
|
</button>
|
|
@@ -309,7 +316,7 @@ const thirdButton = function () {
|
|
|
309
316
|
</div>
|
|
310
317
|
|
|
311
318
|
<div v-if="type === 'warning'">
|
|
312
|
-
<div v-if="disabled && disabledWhichButton === '
|
|
319
|
+
<div v-if="disabled && disabledWhichButton === 'thirdButtonBuilder'">
|
|
313
320
|
<button
|
|
314
321
|
class="flex items-center gap-2 myPrimaryButton bg-myPrimaryLinkColor focus-visible:ring-myPrimaryLinkColor focus:ring-myPrimaryLinkColor hover:bg-myPrimaryLinkColor w-full"
|
|
315
322
|
:class="{
|
|
@@ -345,11 +352,11 @@ const thirdButton = function () {
|
|
|
345
352
|
</button>
|
|
346
353
|
</div>
|
|
347
354
|
|
|
348
|
-
<div v-if="!disabled || disabledWhichButton !== '
|
|
355
|
+
<div v-if="!disabled || disabledWhichButton !== 'thirdButtonBuilder'">
|
|
349
356
|
<button
|
|
350
357
|
class="flex items-center gap-2 myPrimaryButton bg-myPrimaryErrorColor hover:bg-red-600 text-white focus:ring-myPrimaryErrorColor w-full"
|
|
351
358
|
type="button"
|
|
352
|
-
@click="
|
|
359
|
+
@click="thirdButtonBuilder"
|
|
353
360
|
>
|
|
354
361
|
{{ thirdButtonText }}
|
|
355
362
|
</button>
|
|
@@ -357,7 +364,7 @@ const thirdButton = function () {
|
|
|
357
364
|
</div>
|
|
358
365
|
|
|
359
366
|
<div v-if="type === 'danger' || type === 'delete'">
|
|
360
|
-
<div v-if="disabled && disabledWhichButton === '
|
|
367
|
+
<div v-if="disabled && disabledWhichButton === 'thirdButtonBuilder'">
|
|
361
368
|
<button
|
|
362
369
|
class="flex items-center gap-2 myPrimaryButton bg-myPrimaryErrorColor hover:bg-red-600 text-white focus:ring-myPrimaryErrorColor w-full"
|
|
363
370
|
:class="{
|
|
@@ -393,11 +400,11 @@ const thirdButton = function () {
|
|
|
393
400
|
</button>
|
|
394
401
|
</div>
|
|
395
402
|
|
|
396
|
-
<div v-if="!disabled || disabledWhichButton !== '
|
|
403
|
+
<div v-if="!disabled || disabledWhichButton !== 'thirdButtonBuilder'">
|
|
397
404
|
<button
|
|
398
405
|
class="flex items-center gap-2 myPrimaryButton bg-myPrimaryErrorColor hover:bg-red-600 text-white focus:ring-myPrimaryErrorColor w-full"
|
|
399
406
|
type="button"
|
|
400
|
-
@click="
|
|
407
|
+
@click="thirdButtonBuilder"
|
|
401
408
|
>
|
|
402
409
|
{{ thirdButtonText }}
|
|
403
410
|
</button>
|
|
@@ -407,7 +414,7 @@ const thirdButton = function () {
|
|
|
407
414
|
</div>
|
|
408
415
|
</div>
|
|
409
416
|
</template>
|
|
410
|
-
</
|
|
417
|
+
</ModalBuilder>
|
|
411
418
|
</template>
|
|
412
419
|
|
|
413
420
|
<style scope>
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
TransitionRoot,
|
|
8
8
|
} from '@headlessui/vue'
|
|
9
9
|
import { provide } from 'vue'
|
|
10
|
-
import NoneCustomMediaLibraryComponent from '
|
|
10
|
+
import NoneCustomMediaLibraryComponent from '../PageBuilder/DemoContent/NoneCustomMediaLibraryComponent.vue'
|
|
11
11
|
|
|
12
12
|
const props = defineProps({
|
|
13
13
|
title: {
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { computed
|
|
3
|
-
import {
|
|
4
|
-
Dialog,
|
|
5
|
-
DialogOverlay,
|
|
6
|
-
DialogTitle,
|
|
7
|
-
TransitionChild,
|
|
8
|
-
TransitionRoot,
|
|
9
|
-
} from '@headlessui/vue'
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { Dialog, DialogOverlay, TransitionChild, TransitionRoot } from '@headlessui/vue'
|
|
10
4
|
|
|
11
5
|
const props = defineProps({
|
|
12
|
-
|
|
6
|
+
showModalBuilder: {
|
|
13
7
|
type: Boolean,
|
|
14
8
|
default: false,
|
|
15
9
|
},
|
|
@@ -25,10 +19,10 @@ const props = defineProps({
|
|
|
25
19
|
},
|
|
26
20
|
})
|
|
27
21
|
|
|
28
|
-
const emit = defineEmits(['
|
|
22
|
+
const emit = defineEmits(['closeMainModalBuilder'])
|
|
29
23
|
|
|
30
|
-
const
|
|
31
|
-
emit('
|
|
24
|
+
const handleClose = () => {
|
|
25
|
+
emit('closeMainModalBuilder')
|
|
32
26
|
}
|
|
33
27
|
|
|
34
28
|
const maxWidthClass = computed(() => {
|
|
@@ -47,8 +41,8 @@ const maxWidthClass = computed(() => {
|
|
|
47
41
|
|
|
48
42
|
<template>
|
|
49
43
|
<teleport to="body">
|
|
50
|
-
<TransitionRoot :show="
|
|
51
|
-
<Dialog as="div" class="font-sans fixed z-30 inset-0 overflow-y-auto" @close="
|
|
44
|
+
<TransitionRoot :show="showModalBuilder" as="template">
|
|
45
|
+
<Dialog as="div" class="font-sans fixed z-30 inset-0 overflow-y-auto" @close="handleClose">
|
|
52
46
|
<div class="flex items-end justify-center text-center sm:block sm:p-0">
|
|
53
47
|
<TransitionChild
|
|
54
48
|
as="template"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, inject } from 'vue'
|
|
3
|
-
import { delay } from '
|
|
4
|
-
import { usePageBuilderStateStore } from '
|
|
3
|
+
import { delay } from '../../composables/delay'
|
|
4
|
+
import { usePageBuilderStateStore } from '../../stores/page-builder-state'
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
Dialog,
|
|
@@ -39,8 +39,8 @@ const handleEscapeKey = function () {
|
|
|
39
39
|
firstButton()
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
const
|
|
43
|
-
return pageBuilderStateStore.
|
|
42
|
+
const getConfigPageBuilder = computed(() => {
|
|
43
|
+
return pageBuilderStateStore.getConfigPageBuilder
|
|
44
44
|
})
|
|
45
45
|
</script>
|
|
46
46
|
|
|
@@ -88,9 +88,16 @@ const getPageBuilderLogo = computed(() => {
|
|
|
88
88
|
<div
|
|
89
89
|
class="px-4 lg:h-[10vh] h-[16vh] flex items-center justify-between border-b border-gray-200 bg-white"
|
|
90
90
|
>
|
|
91
|
-
<div
|
|
91
|
+
<div
|
|
92
|
+
v-if="
|
|
93
|
+
getConfigPageBuilder &&
|
|
94
|
+
getConfigPageBuilder.pageBuilderLogo &&
|
|
95
|
+
getConfigPageBuilder.pageBuilderLogo.src
|
|
96
|
+
"
|
|
97
|
+
class="flex items-center divide-x divide-gray-200"
|
|
98
|
+
>
|
|
92
99
|
<div class="pr-4">
|
|
93
|
-
<img class="h-6" :src="
|
|
100
|
+
<img class="h-6" :src="getConfigPageBuilder.pageBuilderLogo.src" alt="Logo" />
|
|
94
101
|
</div>
|
|
95
102
|
<span class="myPrimaryParagraph font-medium pl-4">Preview mode </span>
|
|
96
103
|
</div>
|
|
@@ -35,23 +35,6 @@ const convertToComponentObject = function (comp: any): ComponentObject {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
// Handle image load errors
|
|
39
|
-
const handleImageError = (event: Event, title: string) => {
|
|
40
|
-
const img = event.target as HTMLImageElement
|
|
41
|
-
const container = img.parentElement
|
|
42
|
-
if (container) {
|
|
43
|
-
// Generate and set SVG preview
|
|
44
|
-
const svgPreview = generateComponentPreview(title)
|
|
45
|
-
container.innerHTML = `<div class="w-full h-full flex items-center justify-center">${svgPreview}</div>`
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Check if we should show SVG preview instead of image
|
|
50
|
-
const shouldShowSvgPreview = (comp: any) => {
|
|
51
|
-
// Always show SVG preview for better reliability
|
|
52
|
-
return true
|
|
53
|
-
}
|
|
54
|
-
|
|
55
38
|
// Get SVG preview for component
|
|
56
39
|
const getSvgPreview = (title: string) => {
|
|
57
40
|
return generateComponentPreview(title)
|