@myissue/vue-website-page-builder 3.4.19 → 3.4.21
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 +32 -26
- package/dist/vue-website-page-builder.js +1263 -1259
- package/dist/vue-website-page-builder.umd.cjs +46 -46
- package/package.json +3 -5
- package/src/App.vue +0 -28
- package/src/Components/Homepage/Footer.vue +0 -32
- package/src/Components/Homepage/Navbar.vue +0 -25
- package/src/Components/Layouts/FullWidthElement.vue +0 -34
- package/src/Components/Loaders/GlobalLoader.vue +0 -18
- package/src/Components/Modals/BuilderComponents.vue +0 -53
- package/src/Components/Modals/DynamicModalBuilder.vue +0 -209
- package/src/Components/Modals/MediaLibraryModal.vue +0 -61
- package/src/Components/Modals/ModalBuilder.vue +0 -117
- package/src/Components/PageBuilder/EditorMenu/Editables/BackgroundColorEditor.vue +0 -121
- package/src/Components/PageBuilder/EditorMenu/Editables/BorderRadius.vue +0 -188
- package/src/Components/PageBuilder/EditorMenu/Editables/Borders.vue +0 -176
- package/src/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue +0 -112
- package/src/Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue +0 -108
- package/src/Components/PageBuilder/EditorMenu/Editables/EditGetElement.vue +0 -541
- package/src/Components/PageBuilder/EditorMenu/Editables/HTMLEditor.vue +0 -203
- package/src/Components/PageBuilder/EditorMenu/Editables/ImageEditor.vue +0 -96
- package/src/Components/PageBuilder/EditorMenu/Editables/LinkEditor.vue +0 -315
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageBackgroundOpacity.vue +0 -107
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageOpacity.vue +0 -106
- package/src/Components/PageBuilder/EditorMenu/Editables/Margin.vue +0 -116
- package/src/Components/PageBuilder/EditorMenu/Editables/OpacityEditor.vue +0 -19
- package/src/Components/PageBuilder/EditorMenu/Editables/Padding.vue +0 -117
- package/src/Components/PageBuilder/EditorMenu/Editables/StyleEditor.vue +0 -123
- package/src/Components/PageBuilder/EditorMenu/Editables/TextColorEditor.vue +0 -123
- package/src/Components/PageBuilder/EditorMenu/Editables/Typography.vue +0 -237
- package/src/Components/PageBuilder/EditorMenu/EditorAccordion.vue +0 -46
- package/src/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue +0 -368
- package/src/Components/PageBuilder/Settings/AdvancedPageBuilderSettings.vue +0 -476
- package/src/Components/PageBuilder/Settings/PageBuilderSettings.vue +0 -581
- package/src/Components/PageBuilder/ToolbarOption/ToolbarOption.vue +0 -248
- package/src/Components/PageBuilder/UndoRedo/UndoRedo.vue +0 -90
- package/src/Components/TipTap/TipTap.vue +0 -25
- package/src/Components/TipTap/TipTapInput.vue +0 -340
- package/src/PageBuilder/PageBuilder.vue +0 -1025
- package/src/PageBuilder/Preview.vue +0 -64
- package/src/composables/builderInstance.ts +0 -47
- package/src/composables/delay.ts +0 -5
- package/src/composables/extractCleanHTMLFromPageBuilder.ts +0 -59
- package/src/composables/preloadImage.ts +0 -8
- package/src/composables/useDebounce.ts +0 -8
- package/src/composables/usePageBuilderModal.ts +0 -25
- package/src/composables/useTranslations.ts +0 -28
- package/src/css/dev-global.css +0 -24
- package/src/css/style.css +0 -600
- package/src/helpers/isEmptyObject.ts +0 -5
- package/src/index.ts +0 -28
- package/src/locales/ar.json +0 -170
- package/src/locales/de.json +0 -171
- package/src/locales/en.json +0 -171
- package/src/locales/es.json +0 -171
- package/src/locales/fr.json +0 -171
- package/src/locales/hi.json +0 -172
- package/src/locales/ja.json +0 -171
- package/src/locales/pt.json +0 -171
- package/src/locales/ru.json +0 -171
- package/src/locales/zh-Hans.json +0 -171
- package/src/main.ts +0 -14
- package/src/plugin.ts +0 -16
- package/src/services/LocalStorageManager.ts +0 -25
- package/src/services/PageBuilderService.ts +0 -3191
- package/src/stores/page-builder-state.ts +0 -498
- package/src/stores/shared-store.ts +0 -13
- package/src/tailwind-safelist.html +0 -3
- package/src/tests/DefaultComponents/DefaultBuilderComponents.vue +0 -284
- package/src/tests/DefaultComponents/DefaultMediaLibraryComponent.vue +0 -10
- package/src/tests/PageBuilderTest.vue +0 -82
- package/src/tests/TestComponents/DemoBuilderComponentsTest.vue +0 -5
- package/src/tests/TestComponents/DemoMediaLibraryComponentTest.vue +0 -8
- package/src/tests/TestComponents/DemoUnsplash.vue +0 -389
- package/src/tests/componentsArray.test.json +0 -62
- package/src/tests/pageBuilderService.test.ts +0 -165
- package/src/types/global.d.ts +0 -11
- package/src/types/index.ts +0 -306
- package/src/utils/builder/html-doc-declaration-with-components.ts +0 -7
- package/src/utils/builder/tailwaind-colors.ts +0 -503
- package/src/utils/builder/tailwind-border-radius.ts +0 -67
- package/src/utils/builder/tailwind-border-style-width-color.ts +0 -272
- package/src/utils/builder/tailwind-font-sizes.ts +0 -75
- package/src/utils/builder/tailwind-font-styles.ts +0 -56
- package/src/utils/builder/tailwind-opacities.ts +0 -45
- package/src/utils/builder/tailwind-padding-margin.ts +0 -159
- package/src/utils/html-elements/component.ts +0 -485
- package/src/utils/html-elements/componentHelpers.ts +0 -98
- package/src/utils/html-elements/themes.ts +0 -85
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import DynamicModalBuilder from '../../../Modals/DynamicModalBuilder.vue'
|
|
3
|
-
import { ref, computed } from 'vue'
|
|
4
|
-
import { getPageBuilder } from '../../../../composables/builderInstance'
|
|
5
|
-
import { useTranslations } from '../../../../composables/useTranslations'
|
|
6
|
-
|
|
7
|
-
const { translate } = useTranslations()
|
|
8
|
-
|
|
9
|
-
const pageBuilderService = getPageBuilder()
|
|
10
|
-
|
|
11
|
-
const showModalDeleteComponent = ref(false)
|
|
12
|
-
// use dynamic model
|
|
13
|
-
const typeModal = ref('')
|
|
14
|
-
const gridColumnModal = ref(Number(1))
|
|
15
|
-
const titleModal = ref('')
|
|
16
|
-
const descriptionModal = ref('')
|
|
17
|
-
const firstButtonModal = ref('')
|
|
18
|
-
const secondButtonModal = ref(null)
|
|
19
|
-
const thirdButtonModal = ref(null)
|
|
20
|
-
// set dynamic modal handle functions
|
|
21
|
-
const firstModalButtonFunctionDynamicModalBuilder = ref(null)
|
|
22
|
-
const secondModalButtonFunctionDynamicModalBuilder = ref(null)
|
|
23
|
-
const thirdModalButtonFunctionDynamicModalBuilder = ref(null)
|
|
24
|
-
|
|
25
|
-
const canMoveUp = computed(() => pageBuilderService.canMoveUp())
|
|
26
|
-
const canMoveDown = computed(() => pageBuilderService.canMoveDown())
|
|
27
|
-
|
|
28
|
-
// remove component
|
|
29
|
-
const handleDelete = function () {
|
|
30
|
-
showModalDeleteComponent.value = true
|
|
31
|
-
typeModal.value = 'delete'
|
|
32
|
-
gridColumnModal.value = 2
|
|
33
|
-
titleModal.value = translate('Remove Component?')
|
|
34
|
-
descriptionModal.value = translate('Are you sure you want to remove this Component?')
|
|
35
|
-
firstButtonModal.value = translate('Close')
|
|
36
|
-
secondButtonModal.value = null
|
|
37
|
-
thirdButtonModal.value = translate('Delete')
|
|
38
|
-
|
|
39
|
-
// handle click
|
|
40
|
-
firstModalButtonFunctionDynamicModalBuilder.value = function () {
|
|
41
|
-
showModalDeleteComponent.value = false
|
|
42
|
-
}
|
|
43
|
-
//
|
|
44
|
-
// handle click
|
|
45
|
-
thirdModalButtonFunctionDynamicModalBuilder.value = async function () {
|
|
46
|
-
await pageBuilderService.deleteComponentFromDOM()
|
|
47
|
-
|
|
48
|
-
showModalDeleteComponent.value = false
|
|
49
|
-
}
|
|
50
|
-
// end modal
|
|
51
|
-
}
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<template>
|
|
55
|
-
<DynamicModalBuilder
|
|
56
|
-
:showDynamicModalBuilder="showModalDeleteComponent"
|
|
57
|
-
:type="typeModal"
|
|
58
|
-
:gridColumnAmount="gridColumnModal"
|
|
59
|
-
:title="titleModal"
|
|
60
|
-
:description="descriptionModal"
|
|
61
|
-
:firstButtonText="firstButtonModal"
|
|
62
|
-
:secondButtonText="secondButtonModal"
|
|
63
|
-
:thirdButtonText="thirdButtonModal"
|
|
64
|
-
@firstModalButtonFunctionDynamicModalBuilder="firstModalButtonFunctionDynamicModalBuilder"
|
|
65
|
-
@secondModalButtonFunctionDynamicModalBuilder="secondModalButtonFunctionDynamicModalBuilder"
|
|
66
|
-
@thirdModalButtonFunctionDynamicModalBuilder="thirdModalButtonFunctionDynamicModalBuilder"
|
|
67
|
-
>
|
|
68
|
-
<header></header>
|
|
69
|
-
<main></main>
|
|
70
|
-
</DynamicModalBuilder>
|
|
71
|
-
<div class="pbx-flex pbx-flex-col pbx-items-center pbx-justify-center pbx-myPrimaryGap">
|
|
72
|
-
<div class="pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center">
|
|
73
|
-
<div
|
|
74
|
-
@click="handleDelete()"
|
|
75
|
-
class="pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-myPrimaryErrorColor"
|
|
76
|
-
>
|
|
77
|
-
<span class="material-symbols-outlined"> delete_forever </span>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
<button
|
|
82
|
-
type="button"
|
|
83
|
-
@click="pageBuilderService.reorderComponent(-1)"
|
|
84
|
-
:disabled="!canMoveUp"
|
|
85
|
-
class="pbx-h-10 pbx-w-10 pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square pbx-text-black"
|
|
86
|
-
:class="[
|
|
87
|
-
canMoveUp
|
|
88
|
-
? 'hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-cursor-pointer'
|
|
89
|
-
: 'pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200',
|
|
90
|
-
]"
|
|
91
|
-
>
|
|
92
|
-
<span class="material-symbols-outlined"> move_up </span>
|
|
93
|
-
</button>
|
|
94
|
-
<button
|
|
95
|
-
type="button"
|
|
96
|
-
@click="pageBuilderService.reorderComponent(1)"
|
|
97
|
-
:disabled="!canMoveDown"
|
|
98
|
-
class="pbx-h-10 pbx-w-10 pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square pbx-text-black"
|
|
99
|
-
:class="[
|
|
100
|
-
canMoveDown
|
|
101
|
-
? 'hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-cursor-pointer'
|
|
102
|
-
: 'pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200',
|
|
103
|
-
]"
|
|
104
|
-
>
|
|
105
|
-
<span class="material-symbols-outlined"> move_down </span>
|
|
106
|
-
</button>
|
|
107
|
-
</div>
|
|
108
|
-
</template>
|
|
@@ -1,541 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref, computed, onMounted, inject } from 'vue'
|
|
3
|
-
import DynamicModalBuilder from '../../../Modals/DynamicModalBuilder.vue'
|
|
4
|
-
import TipTapInput from '../../../TipTap/TipTapInput.vue'
|
|
5
|
-
import MediaLibraryModal from '../../../Modals/MediaLibraryModal.vue'
|
|
6
|
-
import TextColorEditor from './TextColorEditor.vue'
|
|
7
|
-
import BackgroundColorEditor from './BackgroundColorEditor.vue'
|
|
8
|
-
import { sharedPageBuilderStore } from '../../../../stores/shared-store'
|
|
9
|
-
import { getPageBuilder } from '../../../../composables/builderInstance'
|
|
10
|
-
import { useTranslations } from '../../../../composables/useTranslations'
|
|
11
|
-
|
|
12
|
-
const { translate } = useTranslations()
|
|
13
|
-
const pageBuilderService = getPageBuilder()
|
|
14
|
-
|
|
15
|
-
// Use shared store instance
|
|
16
|
-
const pageBuilderStateStore = sharedPageBuilderStore
|
|
17
|
-
const customMediaComponent = inject('CustomMediaComponent')
|
|
18
|
-
|
|
19
|
-
const getElement = computed(() => {
|
|
20
|
-
return pageBuilderStateStore.getElement
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
// Get tagName of element
|
|
24
|
-
const elementTag = computed(() => {
|
|
25
|
-
return getElement.value?.tagName
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
const canMoveUp = computed(() => pageBuilderService.canMoveUp())
|
|
29
|
-
const canMoveDown = computed(() => pageBuilderService.canMoveDown())
|
|
30
|
-
|
|
31
|
-
const getShowModalTipTap = computed(() => {
|
|
32
|
-
const result = pageBuilderStateStore.getShowModalTipTap
|
|
33
|
-
|
|
34
|
-
if (result) {
|
|
35
|
-
handleModalPreviewTiptap()
|
|
36
|
-
}
|
|
37
|
-
return result
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
const getComponent = computed(() => {
|
|
41
|
-
return pageBuilderStateStore.getComponent
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
// hanlde Tip Tap modal
|
|
45
|
-
const typeModalTipTap = ref('')
|
|
46
|
-
const gridColumnModalTipTap = ref(Number(1))
|
|
47
|
-
const titleModalTipTap = ref('')
|
|
48
|
-
const descriptionModalTipTap = ref('')
|
|
49
|
-
const firstButtonModalTipTap = ref('')
|
|
50
|
-
const secondButtonModalTipTap = ref(null)
|
|
51
|
-
const thirdButtonModalTipTap = ref(null)
|
|
52
|
-
// set dynamic modal handle functions
|
|
53
|
-
const firstModalButtonFunctionDynamicModalBuilderTipTap = ref(null)
|
|
54
|
-
const secondModalButtonFunctionDynamicModalBuilderTipTap = ref(null)
|
|
55
|
-
const thirdModalButtonFunctionDynamicModalBuilderTipTap = ref(null)
|
|
56
|
-
|
|
57
|
-
const handleModalPreviewTiptap = function () {
|
|
58
|
-
pageBuilderService.toggleTipTapModal(true)
|
|
59
|
-
|
|
60
|
-
typeModalTipTap.value = 'success'
|
|
61
|
-
gridColumnModalTipTap.value = 2
|
|
62
|
-
titleModalTipTap.value = translate('Manage Content')
|
|
63
|
-
descriptionModalTipTap.value = null
|
|
64
|
-
firstButtonModalTipTap.value = null
|
|
65
|
-
secondButtonModalTipTap.value = null
|
|
66
|
-
thirdButtonModalTipTap.value = 'Save'
|
|
67
|
-
|
|
68
|
-
// handle click
|
|
69
|
-
|
|
70
|
-
firstModalButtonFunctionDynamicModalBuilderTipTap.value = function () {
|
|
71
|
-
pageBuilderService.toggleTipTapModal(false)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
thirdModalButtonFunctionDynamicModalBuilderTipTap.value = function () {
|
|
75
|
-
pageBuilderService.toggleTipTapModal(true)
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// handle image
|
|
80
|
-
// get current image from store
|
|
81
|
-
const getBasePrimaryImage = computed(() => {
|
|
82
|
-
return pageBuilderStateStore.getBasePrimaryImage
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
const showMediaLibraryModal = ref(false)
|
|
86
|
-
// modal content
|
|
87
|
-
const titleMedia = ref('')
|
|
88
|
-
const descriptionMedia = ref('')
|
|
89
|
-
const firstButtonMedia = ref('')
|
|
90
|
-
const secondButtonMedia = ref(null)
|
|
91
|
-
const thirdButtonMedia = ref(null)
|
|
92
|
-
// set dynamic modal handle functions
|
|
93
|
-
const firstMediaButtonFunction = ref(null)
|
|
94
|
-
|
|
95
|
-
const handleAddImage = function () {
|
|
96
|
-
// open modal to true
|
|
97
|
-
showMediaLibraryModal.value = true
|
|
98
|
-
|
|
99
|
-
titleMedia.value = translate('Media Library')
|
|
100
|
-
descriptionMedia.value = null
|
|
101
|
-
firstButtonMedia.value = translate('Close')
|
|
102
|
-
secondButtonMedia.value = translate(' Select image')
|
|
103
|
-
|
|
104
|
-
// handle click
|
|
105
|
-
firstMediaButtonFunction.value = function () {
|
|
106
|
-
showMediaLibraryModal.value = false
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// Logic for Video Iframe
|
|
111
|
-
|
|
112
|
-
const urlError = ref(null)
|
|
113
|
-
const iframeSrc = ref('')
|
|
114
|
-
const showModalIframeSrc = ref(false)
|
|
115
|
-
|
|
116
|
-
const validateURL = function () {
|
|
117
|
-
// initial value
|
|
118
|
-
urlError.value = null
|
|
119
|
-
|
|
120
|
-
// url validation
|
|
121
|
-
const urlRegex = /^https?:\/\//
|
|
122
|
-
const isValidURL = ref(true)
|
|
123
|
-
isValidURL.value = urlRegex.test(iframeSrc.value)
|
|
124
|
-
|
|
125
|
-
// cancelled
|
|
126
|
-
if (isValidURL.value === false) {
|
|
127
|
-
urlError.value =
|
|
128
|
-
"The provided URL is invalid. Please ensure that it begins with 'https://' for proper formatting and security."
|
|
129
|
-
return true
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return false
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const handleModalIframeSrc = function () {
|
|
136
|
-
urlError.value = null
|
|
137
|
-
|
|
138
|
-
const iframeSrcValue =
|
|
139
|
-
getElement.value &&
|
|
140
|
-
getElement.value.firstElementChild?.tagName === 'IFRAME' &&
|
|
141
|
-
getElement.value.firstElementChild.hasAttribute('src') &&
|
|
142
|
-
getElement.value.firstElementChild.getAttribute('src').trim() !== ''
|
|
143
|
-
? getElement.value.firstElementChild.src
|
|
144
|
-
: ''
|
|
145
|
-
|
|
146
|
-
iframeSrc.value = iframeSrcValue
|
|
147
|
-
//
|
|
148
|
-
//
|
|
149
|
-
// open modal to true
|
|
150
|
-
showModalIframeSrc.value = true
|
|
151
|
-
|
|
152
|
-
typeModalTipTap.value = 'success'
|
|
153
|
-
gridColumnModalTipTap.value = 2
|
|
154
|
-
titleModalTipTap.value = 'Add video url'
|
|
155
|
-
descriptionModalTipTap.value = null
|
|
156
|
-
firstButtonModalTipTap.value = translate('Close')
|
|
157
|
-
secondButtonModalTipTap.value = 'Save'
|
|
158
|
-
thirdButtonModalTipTap.value = null
|
|
159
|
-
|
|
160
|
-
// handle click
|
|
161
|
-
firstModalButtonFunctionDynamicModalBuilderTipTap.value = function () {
|
|
162
|
-
showModalIframeSrc.value = false
|
|
163
|
-
}
|
|
164
|
-
// handle click
|
|
165
|
-
secondModalButtonFunctionDynamicModalBuilderTipTap.value = function () {
|
|
166
|
-
const isNotValidated = validateURL()
|
|
167
|
-
if (isNotValidated) {
|
|
168
|
-
return
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
if (
|
|
172
|
-
getElement.value &&
|
|
173
|
-
getElement.value.firstElementChild &&
|
|
174
|
-
getElement.value.firstElementChild.tagName === 'IFRAME'
|
|
175
|
-
) {
|
|
176
|
-
// Set the src attribute
|
|
177
|
-
|
|
178
|
-
// replace watch with embed
|
|
179
|
-
iframeSrc.value = iframeSrc.value.replace('watch?v=', 'embed/')
|
|
180
|
-
|
|
181
|
-
// Remove dynamic parameters (&ab_channel, &list, &start_radio)
|
|
182
|
-
iframeSrc.value = iframeSrc.value
|
|
183
|
-
.replace(/&ab_channel=[^&]*/, '')
|
|
184
|
-
.replace(/&list=[^&]*/, '')
|
|
185
|
-
.replace(/&start_radio=[^&]*/, '')
|
|
186
|
-
.replace(/&t=[^&]*/, '') // Remove the 't' parameter (time)
|
|
187
|
-
|
|
188
|
-
getElement.value.firstElementChild.src = iframeSrc.value
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
showModalIframeSrc.value = false
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
const openOptionsMoreOpen = ref(false)
|
|
196
|
-
|
|
197
|
-
const handleShowHTMLEditor = async () => {
|
|
198
|
-
openOptionsMoreOpen.value = false
|
|
199
|
-
pageBuilderStateStore.setShowModalHTMLEditor(true)
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
const showModalDeleteComponent = ref(false)
|
|
203
|
-
// use dynamic model
|
|
204
|
-
const typeModal = ref('')
|
|
205
|
-
const gridColumnModal = ref(Number(1))
|
|
206
|
-
const titleModal = ref('')
|
|
207
|
-
const descriptionModal = ref('')
|
|
208
|
-
const firstButtonModal = ref('')
|
|
209
|
-
const secondButtonModal = ref(null)
|
|
210
|
-
const thirdButtonModal = ref(null)
|
|
211
|
-
// set dynamic modal handle functions
|
|
212
|
-
const firstModalButtonFunctionDynamicModalBuilder = ref(null)
|
|
213
|
-
const secondModalButtonFunctionDynamicModalBuilder = ref(null)
|
|
214
|
-
const thirdModalButtonFunctionDynamicModalBuilder = ref(null)
|
|
215
|
-
|
|
216
|
-
// remove component
|
|
217
|
-
const handleDelete = function () {
|
|
218
|
-
showModalDeleteComponent.value = true
|
|
219
|
-
typeModal.value = 'delete'
|
|
220
|
-
gridColumnModal.value = 2
|
|
221
|
-
titleModal.value = translate('Remove Component?')
|
|
222
|
-
descriptionModal.value = translate('Are you sure you want to remove this Component?')
|
|
223
|
-
firstButtonModal.value = translate('Close')
|
|
224
|
-
secondButtonModal.value = null
|
|
225
|
-
thirdButtonModal.value = translate('Delete')
|
|
226
|
-
|
|
227
|
-
// handle click
|
|
228
|
-
firstModalButtonFunctionDynamicModalBuilder.value = function () {
|
|
229
|
-
showModalDeleteComponent.value = false
|
|
230
|
-
}
|
|
231
|
-
//
|
|
232
|
-
// handle click
|
|
233
|
-
thirdModalButtonFunctionDynamicModalBuilder.value = async function () {
|
|
234
|
-
await pageBuilderService.deleteComponentFromDOM()
|
|
235
|
-
|
|
236
|
-
showModalDeleteComponent.value = false
|
|
237
|
-
}
|
|
238
|
-
// end modal
|
|
239
|
-
}
|
|
240
|
-
</script>
|
|
241
|
-
<template v-if="getElement">
|
|
242
|
-
<div>
|
|
243
|
-
<DynamicModalBuilder
|
|
244
|
-
:showDynamicModalBuilder="showModalIframeSrc"
|
|
245
|
-
maxWidth="2xl"
|
|
246
|
-
:type="typeModalTipTap"
|
|
247
|
-
:gridColumnAmount="gridColumnModalTipTap"
|
|
248
|
-
:title="titleModalTipTap"
|
|
249
|
-
:description="descriptionModalTipTap"
|
|
250
|
-
:firstButtonText="firstButtonModalTipTap"
|
|
251
|
-
:secondButtonText="secondButtonModalTipTap"
|
|
252
|
-
:thirdButtonText="thirdButtonModalTipTap"
|
|
253
|
-
@firstModalButtonFunctionDynamicModalBuilderTipTap="
|
|
254
|
-
firstModalButtonFunctionDynamicModalBuilderTipTap
|
|
255
|
-
"
|
|
256
|
-
@secondModalButtonFunctionDynamicModalBuilderTipTap="
|
|
257
|
-
secondModalButtonFunctionDynamicModalBuilderTipTap
|
|
258
|
-
"
|
|
259
|
-
@thirdModalButtonFunctionDynamicModalBuilderTipTap="
|
|
260
|
-
thirdModalButtonFunctionDynamicModalBuilderTipTap
|
|
261
|
-
"
|
|
262
|
-
>
|
|
263
|
-
<header></header>
|
|
264
|
-
<main>
|
|
265
|
-
<div class="pbx-myInputGroup">
|
|
266
|
-
<div class="pbx-myPrimaryFormOrganizationHeaderDescriptionSection">
|
|
267
|
-
<div class="pbx-myPrimaryFormOrganizationHeader">
|
|
268
|
-
<label for="youtube-video" class="pbx-myPrimaryInputLabel">Video url:</label>
|
|
269
|
-
<input
|
|
270
|
-
id="youtube-video"
|
|
271
|
-
v-model="iframeSrc"
|
|
272
|
-
type="text"
|
|
273
|
-
class="pbx-myPrimaryInput"
|
|
274
|
-
name="video"
|
|
275
|
-
/>
|
|
276
|
-
<div
|
|
277
|
-
v-if="urlError"
|
|
278
|
-
class="pbx-min-h-[2.5rem] pbx-flex pbx-items-center pbx-justify-start"
|
|
279
|
-
>
|
|
280
|
-
<p class="pbx-myPrimaryInputError pbx-mt-2 pbx-mb-0 pbx-py-0 pbx-self-start">
|
|
281
|
-
{{ urlError }}
|
|
282
|
-
</p>
|
|
283
|
-
</div>
|
|
284
|
-
</div>
|
|
285
|
-
</div>
|
|
286
|
-
</div>
|
|
287
|
-
</main>
|
|
288
|
-
</DynamicModalBuilder>
|
|
289
|
-
<DynamicModalBuilder
|
|
290
|
-
:simpleModal="true"
|
|
291
|
-
:showDynamicModalBuilder="getShowModalTipTap"
|
|
292
|
-
maxWidth="6xl"
|
|
293
|
-
:type="typeModalTipTap"
|
|
294
|
-
:gridColumnAmount="gridColumnModalTipTap"
|
|
295
|
-
:title="titleModalTipTap"
|
|
296
|
-
:description="descriptionModalTipTap"
|
|
297
|
-
:firstButtonText="firstButtonModalTipTap"
|
|
298
|
-
:secondButtonText="secondButtonModalTipTap"
|
|
299
|
-
:thirdButtonText="thirdButtonModalTipTap"
|
|
300
|
-
@firstModalButtonFunctionDynamicModalBuilder="
|
|
301
|
-
firstModalButtonFunctionDynamicModalBuilderTipTap
|
|
302
|
-
"
|
|
303
|
-
@secondModalButtonFunctionDynamicModalBuilder="
|
|
304
|
-
secondModalButtonFunctionDynamicModalBuilderTipTap
|
|
305
|
-
"
|
|
306
|
-
@thirdModalButtonFunctionDynamicModalBuilder="
|
|
307
|
-
thirdModalButtonFunctionDynamicModalBuilderTipTap
|
|
308
|
-
"
|
|
309
|
-
>
|
|
310
|
-
<header></header>
|
|
311
|
-
<main class="pbx-overflow-y-auto">
|
|
312
|
-
<TipTapInput></TipTapInput>
|
|
313
|
-
</main>
|
|
314
|
-
</DynamicModalBuilder>
|
|
315
|
-
<DynamicModalBuilder
|
|
316
|
-
:showDynamicModalBuilder="showModalDeleteComponent"
|
|
317
|
-
:type="typeModal"
|
|
318
|
-
:gridColumnAmount="gridColumnModal"
|
|
319
|
-
:title="titleModal"
|
|
320
|
-
:description="descriptionModal"
|
|
321
|
-
:firstButtonText="firstButtonModal"
|
|
322
|
-
:secondButtonText="secondButtonModal"
|
|
323
|
-
:thirdButtonText="thirdButtonModal"
|
|
324
|
-
@firstModalButtonFunctionDynamicModalBuilder="firstModalButtonFunctionDynamicModalBuilder"
|
|
325
|
-
@secondModalButtonFunctionDynamicModalBuilder="secondModalButtonFunctionDynamicModalBuilder"
|
|
326
|
-
@thirdModalButtonFunctionDynamicModalBuilder="thirdModalButtonFunctionDynamicModalBuilder"
|
|
327
|
-
>
|
|
328
|
-
<header></header>
|
|
329
|
-
<main></main>
|
|
330
|
-
</DynamicModalBuilder>
|
|
331
|
-
<MediaLibraryModal
|
|
332
|
-
:open="showMediaLibraryModal"
|
|
333
|
-
:title="titleMedia"
|
|
334
|
-
:description="descriptionMedia"
|
|
335
|
-
:firstButtonText="firstButtonMedia"
|
|
336
|
-
:secondButtonText="secondButtonMedia"
|
|
337
|
-
:thirdButtonText="thirdButtonMedia"
|
|
338
|
-
:customMediaComponent="customMediaComponent"
|
|
339
|
-
@firstMediaButtonFunction="firstMediaButtonFunction"
|
|
340
|
-
>
|
|
341
|
-
</MediaLibraryModal>
|
|
342
|
-
|
|
343
|
-
<div class="pbx-select-none">
|
|
344
|
-
<p v-if="false" class="pbx-font-medium pbx-text-[10px] pbx-w-max lg:pbx-block pbx-hidden">
|
|
345
|
-
Editing
|
|
346
|
-
<span class="pbx-lowercase"><{{ elementTag }}></span>
|
|
347
|
-
</p>
|
|
348
|
-
<div
|
|
349
|
-
class="pbx-flex pbx-items-center pbx-justify-center pbx-gap-2"
|
|
350
|
-
:class="{ '': getElement }"
|
|
351
|
-
>
|
|
352
|
-
<template v-if="pageBuilderService.ElOrFirstChildIsIframe()">
|
|
353
|
-
<div class="pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max">
|
|
354
|
-
<button
|
|
355
|
-
@click="handleModalIframeSrc"
|
|
356
|
-
type="button"
|
|
357
|
-
class="pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
358
|
-
>
|
|
359
|
-
<span class="material-symbols-outlined"> play_circle </span>
|
|
360
|
-
</button>
|
|
361
|
-
</div>
|
|
362
|
-
</template>
|
|
363
|
-
|
|
364
|
-
<template
|
|
365
|
-
v-if="
|
|
366
|
-
pageBuilderService.isSelectedElementValidText() &&
|
|
367
|
-
!pageBuilderService.ElOrFirstChildIsIframe()
|
|
368
|
-
"
|
|
369
|
-
>
|
|
370
|
-
<div class="pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max">
|
|
371
|
-
<button
|
|
372
|
-
@click="handleModalPreviewTiptap"
|
|
373
|
-
type="button"
|
|
374
|
-
class="pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
375
|
-
>
|
|
376
|
-
<span class="material-symbols-outlined"> edit </span>
|
|
377
|
-
</button>
|
|
378
|
-
</div>
|
|
379
|
-
<TextColorEditor></TextColorEditor>
|
|
380
|
-
</template>
|
|
381
|
-
|
|
382
|
-
<template
|
|
383
|
-
v-if="
|
|
384
|
-
getElement &&
|
|
385
|
-
getComponent &&
|
|
386
|
-
getBasePrimaryImage &&
|
|
387
|
-
!pageBuilderService.ElOrFirstChildIsIframe()
|
|
388
|
-
"
|
|
389
|
-
>
|
|
390
|
-
<div class="pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max">
|
|
391
|
-
<button
|
|
392
|
-
@click="handleAddImage"
|
|
393
|
-
type="button"
|
|
394
|
-
class="pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
395
|
-
>
|
|
396
|
-
<span class="material-symbols-outlined"> add_photo_alternate </span>
|
|
397
|
-
</button>
|
|
398
|
-
</div>
|
|
399
|
-
</template>
|
|
400
|
-
|
|
401
|
-
<template
|
|
402
|
-
v-if="
|
|
403
|
-
getElement &&
|
|
404
|
-
getElement.nodeType === 1 &&
|
|
405
|
-
!getBasePrimaryImage &&
|
|
406
|
-
!pageBuilderService.ElOrFirstChildIsIframe()
|
|
407
|
-
"
|
|
408
|
-
>
|
|
409
|
-
<BackgroundColorEditor></BackgroundColorEditor>
|
|
410
|
-
</template>
|
|
411
|
-
|
|
412
|
-
<template v-if="getElement">
|
|
413
|
-
<button
|
|
414
|
-
@click="pageBuilderService.deleteElementFromDOM"
|
|
415
|
-
type="button"
|
|
416
|
-
class="pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
417
|
-
>
|
|
418
|
-
<span class="material-symbols-outlined"> delete </span>
|
|
419
|
-
</button>
|
|
420
|
-
</template>
|
|
421
|
-
|
|
422
|
-
<div
|
|
423
|
-
v-if="getElement && getComponent"
|
|
424
|
-
class="pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
425
|
-
@click="openOptionsMoreOpen = !openOptionsMoreOpen"
|
|
426
|
-
>
|
|
427
|
-
<span class="material-symbols-outlined"> more_horiz </span>
|
|
428
|
-
</div>
|
|
429
|
-
<div
|
|
430
|
-
v-if="getElement && getComponent"
|
|
431
|
-
class="pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
432
|
-
@click="pageBuilderService.clearHtmlSelection()"
|
|
433
|
-
>
|
|
434
|
-
<span class="material-symbols-outlined"> close_small</span>
|
|
435
|
-
</div>
|
|
436
|
-
</div>
|
|
437
|
-
</div>
|
|
438
|
-
|
|
439
|
-
<transition name="popup-fade">
|
|
440
|
-
<div
|
|
441
|
-
v-if="openOptionsMoreOpen"
|
|
442
|
-
class="pbx-fixed pbx-z-40 pbx-top-10 pbx-right-0 lg:pbx-w-72 md:pbx-w-72 pbx-w-full pbx-select-none"
|
|
443
|
-
>
|
|
444
|
-
<div
|
|
445
|
-
class="pbx-rounded-3xl pbx-border pbx-border-gray-100 pbx-bg-white pbx-shadow-lg pbx-pt-4 pbx-pb-4 pbx-flex pbx-flex-col pbx-overflow-y-auto pbx-max-h-[80vh] pbx-mx-4 pbx-px-2"
|
|
446
|
-
>
|
|
447
|
-
<div class="pbx-flex pbx-flex-col">
|
|
448
|
-
<!-- content start -->
|
|
449
|
-
<!-- move up and down start -->
|
|
450
|
-
<div
|
|
451
|
-
v-if="getElement && getComponent"
|
|
452
|
-
@click="pageBuilderService.reorderComponent(-1)"
|
|
453
|
-
:disabled="!canMoveUp"
|
|
454
|
-
class="pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"
|
|
455
|
-
>
|
|
456
|
-
<div
|
|
457
|
-
class="pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
458
|
-
:class="[
|
|
459
|
-
canMoveUp
|
|
460
|
-
? 'hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-cursor-pointer'
|
|
461
|
-
: 'pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200',
|
|
462
|
-
]"
|
|
463
|
-
>
|
|
464
|
-
<span class="material-symbols-outlined"> move_up </span>
|
|
465
|
-
</div>
|
|
466
|
-
<div class="pbx-text-sm">Move up</div>
|
|
467
|
-
</div>
|
|
468
|
-
<div
|
|
469
|
-
v-if="getElement && getComponent"
|
|
470
|
-
@click="pageBuilderService.reorderComponent(1)"
|
|
471
|
-
:disabled="!canMoveDown"
|
|
472
|
-
class="pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"
|
|
473
|
-
>
|
|
474
|
-
<div
|
|
475
|
-
class="pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
476
|
-
:class="[
|
|
477
|
-
canMoveDown
|
|
478
|
-
? 'hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-cursor-pointer'
|
|
479
|
-
: 'pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200',
|
|
480
|
-
]"
|
|
481
|
-
>
|
|
482
|
-
<span class="material-symbols-outlined"> move_down </span>
|
|
483
|
-
</div>
|
|
484
|
-
<div class="pbx-text-sm">Move down</div>
|
|
485
|
-
</div>
|
|
486
|
-
<!-- move up and down end -->
|
|
487
|
-
|
|
488
|
-
<!-- delete component start -->
|
|
489
|
-
|
|
490
|
-
<div
|
|
491
|
-
v-if="getElement && getComponent"
|
|
492
|
-
@click="handleDelete()"
|
|
493
|
-
class="pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"
|
|
494
|
-
>
|
|
495
|
-
<div
|
|
496
|
-
class="pbx-h- pbx-w-8 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-myPrimaryErrorColor"
|
|
497
|
-
>
|
|
498
|
-
<span class="material-symbols-outlined"> delete_forever </span>
|
|
499
|
-
</div>
|
|
500
|
-
<div class="pbx-text-sm">Delete component</div>
|
|
501
|
-
</div>
|
|
502
|
-
|
|
503
|
-
<!-- delete component end -->
|
|
504
|
-
|
|
505
|
-
<div
|
|
506
|
-
v-if="getElement && getComponent"
|
|
507
|
-
@click="
|
|
508
|
-
() => {
|
|
509
|
-
openOptionsMoreOpen = !openOptionsMoreOpen
|
|
510
|
-
pageBuilderService.duplicateComponent()
|
|
511
|
-
}
|
|
512
|
-
"
|
|
513
|
-
class="pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"
|
|
514
|
-
>
|
|
515
|
-
<div
|
|
516
|
-
class="pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
517
|
-
>
|
|
518
|
-
<span class="material-symbols-outlined"> control_point_duplicate </span>
|
|
519
|
-
</div>
|
|
520
|
-
<div class="pbx-text-sm">Duplicate component</div>
|
|
521
|
-
</div>
|
|
522
|
-
<div
|
|
523
|
-
v-if="getElement && getComponent"
|
|
524
|
-
@click="handleShowHTMLEditor"
|
|
525
|
-
class="pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"
|
|
526
|
-
>
|
|
527
|
-
<div
|
|
528
|
-
class="pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
529
|
-
>
|
|
530
|
-
<span class="material-symbols-outlined"> deployed_code </span>
|
|
531
|
-
</div>
|
|
532
|
-
<div class="pbx-text-sm">{{ translate('HTML Editor') }}</div>
|
|
533
|
-
</div>
|
|
534
|
-
|
|
535
|
-
<!-- content end -->
|
|
536
|
-
</div>
|
|
537
|
-
</div>
|
|
538
|
-
</div>
|
|
539
|
-
</transition>
|
|
540
|
-
</div>
|
|
541
|
-
</template>
|