@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,1025 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { onMounted, computed, ref, watch, provide } from 'vue'
|
|
3
|
-
import ModalBuilder from '../Components/Modals/ModalBuilder.vue'
|
|
4
|
-
import Preview from './Preview.vue'
|
|
5
|
-
import ComponentTopMenu from '../Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue'
|
|
6
|
-
import EditGetElement from '../Components/PageBuilder/EditorMenu/Editables/EditGetElement.vue'
|
|
7
|
-
import BuilderComponents from '../Components/Modals/BuilderComponents.vue'
|
|
8
|
-
import RightSidebarEditor from '../Components/PageBuilder/EditorMenu/RightSidebarEditor.vue'
|
|
9
|
-
import { sharedPageBuilderPinia, sharedPageBuilderStore } from '../stores/shared-store'
|
|
10
|
-
import ToolbarOption from '../Components/PageBuilder/ToolbarOption/ToolbarOption.vue'
|
|
11
|
-
import { delay } from '../composables/delay'
|
|
12
|
-
import { useDebounce } from '../composables/useDebounce.ts'
|
|
13
|
-
import DynamicModalBuilder from '../Components/Modals/DynamicModalBuilder.vue'
|
|
14
|
-
import GlobalLoader from '../Components/Loaders/GlobalLoader.vue'
|
|
15
|
-
import { useTranslations } from '../composables/useTranslations'
|
|
16
|
-
import { getPageBuilder } from '../composables/builderInstance'
|
|
17
|
-
import UndoRedo from '../Components/PageBuilder/UndoRedo/UndoRedo.vue'
|
|
18
|
-
const pageBuilderService = getPageBuilder()
|
|
19
|
-
/**
|
|
20
|
-
* Props for PageBuilder component
|
|
21
|
-
* @typedef {Object} Props
|
|
22
|
-
* @property {Object|null} CustomMediaLibraryComponent - Custom media component
|
|
23
|
-
* @property {Object|null} CustomBuilderComponents - Custom component
|
|
24
|
-
* @property {Object} configPageBuilder - Configuration object containing:
|
|
25
|
-
*/
|
|
26
|
-
const props = defineProps({
|
|
27
|
-
CustomMediaLibraryComponent: {
|
|
28
|
-
type: Object,
|
|
29
|
-
default: null,
|
|
30
|
-
},
|
|
31
|
-
CustomBuilderComponents: {
|
|
32
|
-
type: Object,
|
|
33
|
-
default: null,
|
|
34
|
-
},
|
|
35
|
-
showCloseButton: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: false,
|
|
38
|
-
},
|
|
39
|
-
showPublishButton: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: false,
|
|
42
|
-
},
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
const { translate, loadTranslations } = useTranslations()
|
|
46
|
-
|
|
47
|
-
// Use shared Pinia instance for PageBuilder package
|
|
48
|
-
const internalPinia = sharedPageBuilderPinia
|
|
49
|
-
|
|
50
|
-
const pageBuilderStateStore = sharedPageBuilderStore
|
|
51
|
-
|
|
52
|
-
// Provide store for child components (all pointing to the same consolidated store)
|
|
53
|
-
provide('pageBuilderStateStore', pageBuilderStateStore)
|
|
54
|
-
// Provide the internal Pinia instance for components that need to create stores
|
|
55
|
-
provide('internalPinia', internalPinia)
|
|
56
|
-
// Provide custom components for child components
|
|
57
|
-
provide('CustomMediaComponent', props.CustomMediaLibraryComponent)
|
|
58
|
-
provide('CustomBuilderComponents', props.CustomBuilderComponents)
|
|
59
|
-
|
|
60
|
-
const emit = defineEmits(['handleClosePageBuilder', 'handlePublishPageBuilder'])
|
|
61
|
-
|
|
62
|
-
const closePageBuilder = function () {
|
|
63
|
-
emit('handleClosePageBuilder')
|
|
64
|
-
}
|
|
65
|
-
const closePublish = async function () {
|
|
66
|
-
pageBuilderStateStore.setIsLoadingGlobal(true)
|
|
67
|
-
await pageBuilderService.handleManualSave()
|
|
68
|
-
pageBuilderStateStore.setIsLoadingGlobal(false)
|
|
69
|
-
emit('handlePublishPageBuilder')
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// Provide modal close function for custom components
|
|
73
|
-
const closeAddComponentModal = () => {
|
|
74
|
-
showModalAddComponent.value = false
|
|
75
|
-
}
|
|
76
|
-
provide('closeAddComponentModal', closeAddComponentModal)
|
|
77
|
-
|
|
78
|
-
const languageSelction = ref('en')
|
|
79
|
-
|
|
80
|
-
let isInitializingLang = true
|
|
81
|
-
const isLoadingLang = ref(false)
|
|
82
|
-
|
|
83
|
-
// Watch for changes in languageSelction
|
|
84
|
-
watch(languageSelction, async (newVal) => {
|
|
85
|
-
if (newVal && !isInitializingLang) {
|
|
86
|
-
isLoadingLang.value = true
|
|
87
|
-
await delay(200)
|
|
88
|
-
await loadTranslations(newVal)
|
|
89
|
-
pageBuilderService.changeLanguage(newVal)
|
|
90
|
-
|
|
91
|
-
// Ensure lang is updated within userSettings
|
|
92
|
-
const userSettings = JSON.parse(localStorage.getItem('userSettingsPageBuilder')) || {}
|
|
93
|
-
userSettings.lang = newVal
|
|
94
|
-
localStorage.setItem('userSettingsPageBuilder', JSON.stringify(userSettings))
|
|
95
|
-
isLoadingLang.value = false
|
|
96
|
-
}
|
|
97
|
-
})
|
|
98
|
-
|
|
99
|
-
const getBuilderStarted = computed(() => {
|
|
100
|
-
return pageBuilderStateStore.getBuilderStarted
|
|
101
|
-
})
|
|
102
|
-
const getPageBuilderConfig = computed(() => {
|
|
103
|
-
return pageBuilderStateStore.getPageBuilderConfig
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
const getMenuRight = computed(() => {
|
|
107
|
-
return pageBuilderStateStore.getMenuRight
|
|
108
|
-
})
|
|
109
|
-
const openPageBuilderPreviewModal = ref(false)
|
|
110
|
-
const titleBuilderDesktop = ref('')
|
|
111
|
-
const titleBuilderMobile = ref('')
|
|
112
|
-
|
|
113
|
-
const previewCurrentDesign = function () {
|
|
114
|
-
pageBuilderService.previewCurrentDesign()
|
|
115
|
-
}
|
|
116
|
-
const handlePageBuilderPreview = function () {
|
|
117
|
-
titleBuilderDesktop.value = translate('Preview')
|
|
118
|
-
previewCurrentDesign()
|
|
119
|
-
openPageBuilderPreviewModal.value = true
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
const openPageBuilderPreviewMobile = ref(false)
|
|
123
|
-
|
|
124
|
-
const previewCurrentDesignMobile = function () {
|
|
125
|
-
pageBuilderService.previewCurrentDesign()
|
|
126
|
-
}
|
|
127
|
-
const handlePageBuilderPreviewMobile = function () {
|
|
128
|
-
titleBuilderMobile.value = translate('Mobile')
|
|
129
|
-
previewCurrentDesignMobile()
|
|
130
|
-
openPageBuilderPreviewMobile.value = true
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const openAppNotStartedModal = ref(false)
|
|
134
|
-
|
|
135
|
-
const handlAppNotStartedModal = function () {
|
|
136
|
-
openAppNotStartedModal.value = false
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
const firstPageBuilderPreviewModalButton = function () {
|
|
140
|
-
openPageBuilderPreviewModal.value = false
|
|
141
|
-
}
|
|
142
|
-
const firstPageBuilderPreviewModalButtonMobile = function () {
|
|
143
|
-
openPageBuilderPreviewMobile.value = false
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
const showModalAddComponent = ref(false)
|
|
147
|
-
const titleModalAddComponent = ref('')
|
|
148
|
-
const firstButtonTextSearchComponents = ref('')
|
|
149
|
-
const firstModalButtonSearchComponentsFunction = ref(null)
|
|
150
|
-
|
|
151
|
-
const handleAddComponent = async function () {
|
|
152
|
-
await pageBuilderService.clearHtmlSelection()
|
|
153
|
-
|
|
154
|
-
//
|
|
155
|
-
titleModalAddComponent.value = translate('Add Components to Page')
|
|
156
|
-
firstButtonTextSearchComponents.value = translate('Close')
|
|
157
|
-
showModalAddComponent.value = true
|
|
158
|
-
|
|
159
|
-
firstModalButtonSearchComponentsFunction.value = function () {
|
|
160
|
-
// handle show modal for unique content
|
|
161
|
-
showModalAddComponent.value = false
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// end modal
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
const getElement = computed(() => {
|
|
168
|
-
return pageBuilderStateStore.getElement
|
|
169
|
-
})
|
|
170
|
-
|
|
171
|
-
const getComponents = computed(() => {
|
|
172
|
-
return pageBuilderStateStore.getComponents
|
|
173
|
-
})
|
|
174
|
-
|
|
175
|
-
const getHasLocalDraftForUpdate = computed(() => {
|
|
176
|
-
return pageBuilderStateStore.getHasLocalDraftForUpdate
|
|
177
|
-
})
|
|
178
|
-
|
|
179
|
-
watch(getHasLocalDraftForUpdate, (newVal) => {
|
|
180
|
-
if (newVal) {
|
|
181
|
-
handlerRumeEditingForUpdate()
|
|
182
|
-
}
|
|
183
|
-
})
|
|
184
|
-
|
|
185
|
-
const getElementAttributes = computed(() => {
|
|
186
|
-
if (!getElement.value || !(getElement.value instanceof HTMLElement)) {
|
|
187
|
-
return ''
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// Extract the attributes to watch
|
|
191
|
-
const attributesToWatch = {
|
|
192
|
-
src: getElement.value.getAttribute('src'),
|
|
193
|
-
href: getElement.value.getAttribute('href'),
|
|
194
|
-
style: getElement.value.getAttribute('style'),
|
|
195
|
-
class: getElement.value.getAttribute('class'),
|
|
196
|
-
dataImage: getElement.value.getAttribute('data-image'),
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
return attributesToWatch
|
|
200
|
-
})
|
|
201
|
-
|
|
202
|
-
const debounce = useDebounce()
|
|
203
|
-
|
|
204
|
-
watch(getElementAttributes, async (newAttributes, oldAttributes) => {
|
|
205
|
-
// Only run if attributes actually changed
|
|
206
|
-
if (
|
|
207
|
-
newAttributes?.src !== oldAttributes?.src ||
|
|
208
|
-
newAttributes?.href !== oldAttributes?.href ||
|
|
209
|
-
newAttributes?.style !== oldAttributes?.style ||
|
|
210
|
-
newAttributes?.class !== oldAttributes?.class ||
|
|
211
|
-
newAttributes?.dataImage !== oldAttributes?.dataImage
|
|
212
|
-
) {
|
|
213
|
-
debounce(async () => {
|
|
214
|
-
await pageBuilderService.initializeElementStyles()
|
|
215
|
-
}, 200)
|
|
216
|
-
}
|
|
217
|
-
})
|
|
218
|
-
|
|
219
|
-
const handleSelectComponent = function (componentObject) {
|
|
220
|
-
pageBuilderStateStore.setComponent(componentObject)
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
const getIsLoadingGlobal = computed(() => {
|
|
224
|
-
return pageBuilderStateStore.getIsLoadingGlobal
|
|
225
|
-
})
|
|
226
|
-
const getIsSaving = computed(() => {
|
|
227
|
-
return pageBuilderStateStore.getIsSaving
|
|
228
|
-
})
|
|
229
|
-
|
|
230
|
-
const getIsLoadingResumeEditing = computed(() => {
|
|
231
|
-
return pageBuilderStateStore.getIsLoadingResumeEditing
|
|
232
|
-
})
|
|
233
|
-
const getIsRestoring = computed(() => {
|
|
234
|
-
return pageBuilderStateStore.getIsRestoring
|
|
235
|
-
})
|
|
236
|
-
|
|
237
|
-
const gridColumnModalResumeEditing = ref(Number(1))
|
|
238
|
-
const typeModal = ref('')
|
|
239
|
-
const showModalResumeEditing = ref(false)
|
|
240
|
-
const titleModalResumeEditing = ref('')
|
|
241
|
-
const descriptionModalResumeEditing = ref('')
|
|
242
|
-
const firstButtonResumeEditing = ref('')
|
|
243
|
-
const secondButtonResumeEditing = ref(null)
|
|
244
|
-
const thirdButtonResumeEditing = ref(null)
|
|
245
|
-
const firstModalButtonResumeEditingFunction = ref(null)
|
|
246
|
-
const secondModalButtonResumeEditingFunction = ref(null)
|
|
247
|
-
const thirdModalButtonResumeEditingFunction = ref(null)
|
|
248
|
-
|
|
249
|
-
const handlerRumeEditingForUpdate = async function () {
|
|
250
|
-
typeModal.value = 'warning'
|
|
251
|
-
showModalResumeEditing.value = true
|
|
252
|
-
|
|
253
|
-
titleModalResumeEditing.value = translate('Continue Your Work?')
|
|
254
|
-
descriptionModalResumeEditing.value = translate(
|
|
255
|
-
'We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?',
|
|
256
|
-
)
|
|
257
|
-
firstButtonResumeEditing.value = translate('Use Saved Version')
|
|
258
|
-
secondButtonResumeEditing.value = null
|
|
259
|
-
thirdButtonResumeEditing.value = translate('Continue Where I Left Off')
|
|
260
|
-
|
|
261
|
-
firstModalButtonResumeEditingFunction.value = async function () {
|
|
262
|
-
pageBuilderStateStore.setHasLocalDraftForUpdate(false)
|
|
263
|
-
showModalResumeEditing.value = false
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
secondModalButtonResumeEditingFunction.value = function () {}
|
|
267
|
-
|
|
268
|
-
thirdModalButtonResumeEditingFunction.value = async function () {
|
|
269
|
-
await pageBuilderService.resumeEditingFromDraft()
|
|
270
|
-
pageBuilderStateStore.setHasLocalDraftForUpdate(false)
|
|
271
|
-
|
|
272
|
-
showModalResumeEditing.value = false
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
// end modal
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
const gridColumnModalRestore = ref(Number(1))
|
|
279
|
-
const typeModalRestore = ref('')
|
|
280
|
-
const showModalRestore = ref(false)
|
|
281
|
-
const titleModalRestore = ref('')
|
|
282
|
-
const descriptionModalRestore = ref('')
|
|
283
|
-
const firstButtonRestore = ref('')
|
|
284
|
-
const secondButtonRestore = ref(null)
|
|
285
|
-
const thirdButtonRestore = ref(null)
|
|
286
|
-
const firstModalButtonRestoreFunction = ref(null)
|
|
287
|
-
const secondModalButtonRestoreFunction = ref(null)
|
|
288
|
-
const thirdModalButtonRestoreFunction = ref(null)
|
|
289
|
-
|
|
290
|
-
const handleRestoreOriginalContent = async function () {
|
|
291
|
-
await pageBuilderService.clearHtmlSelection()
|
|
292
|
-
|
|
293
|
-
typeModalRestore.value = 'success'
|
|
294
|
-
showModalRestore.value = true
|
|
295
|
-
|
|
296
|
-
titleModalRestore.value = translate('Do you want to reset this page?')
|
|
297
|
-
descriptionModalRestore.value = translate(
|
|
298
|
-
'Are you sure you want to reset this page? This will overwrite your current changes.',
|
|
299
|
-
)
|
|
300
|
-
firstButtonRestore.value = translate('Close')
|
|
301
|
-
secondButtonRestore.value = null
|
|
302
|
-
thirdButtonRestore.value = translate('Reset changes')
|
|
303
|
-
|
|
304
|
-
firstModalButtonRestoreFunction.value = function () {
|
|
305
|
-
showModalRestore.value = false
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
secondModalButtonRestoreFunction.value = async function () {}
|
|
309
|
-
thirdModalButtonRestoreFunction.value = async function () {
|
|
310
|
-
await pageBuilderService.restoreOriginalContent()
|
|
311
|
-
showModalRestore.value = false
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
// end modal
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
const ensureBuilderInitialized = function () {
|
|
318
|
-
if (!getBuilderStarted.value) {
|
|
319
|
-
openAppNotStartedModal.value = true
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
const pbxBuilderWrapper = ref(null)
|
|
324
|
-
|
|
325
|
-
const hideToolbar = function () {
|
|
326
|
-
const toolbar = document.querySelector('#pbxEditToolbar')
|
|
327
|
-
if (toolbar) {
|
|
328
|
-
toolbar.classList.remove('is-visible')
|
|
329
|
-
toolbar.removeAttribute('style')
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
function updatePanelPosition() {
|
|
334
|
-
const container = pbxBuilderWrapper.value
|
|
335
|
-
const editToolbarElement = container && container.querySelector('#pbxEditToolbar')
|
|
336
|
-
|
|
337
|
-
if (!container || !editToolbarElement) return
|
|
338
|
-
|
|
339
|
-
const selected = container.querySelector('[selected]')
|
|
340
|
-
|
|
341
|
-
if (selected && typeof selected.getBoundingClientRect === 'function') {
|
|
342
|
-
const selectedRect = selected.getBoundingClientRect()
|
|
343
|
-
const containerRect = container.getBoundingClientRect()
|
|
344
|
-
|
|
345
|
-
const left =
|
|
346
|
-
selectedRect.left -
|
|
347
|
-
containerRect.left +
|
|
348
|
-
selectedRect.width / 2 -
|
|
349
|
-
editToolbarElement.offsetWidth / 2
|
|
350
|
-
|
|
351
|
-
const GAP = 20 // px
|
|
352
|
-
const proposedTop =
|
|
353
|
-
selectedRect.top -
|
|
354
|
-
containerRect.top +
|
|
355
|
-
container.scrollTop -
|
|
356
|
-
editToolbarElement.offsetHeight -
|
|
357
|
-
GAP
|
|
358
|
-
|
|
359
|
-
const top = Math.max(0, proposedTop)
|
|
360
|
-
|
|
361
|
-
editToolbarElement.style.position = 'absolute'
|
|
362
|
-
editToolbarElement.style.left = `${left}px`
|
|
363
|
-
editToolbarElement.style.top = `${top}px`
|
|
364
|
-
editToolbarElement.classList.add('is-visible')
|
|
365
|
-
} else {
|
|
366
|
-
editToolbarElement.classList.remove('is-visible')
|
|
367
|
-
editToolbarElement.removeAttribute('style') // Ensure all styles are removed
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
const userSettings = JSON.parse(localStorage.getItem('userSettingsPageBuilder'))
|
|
372
|
-
|
|
373
|
-
onMounted(async () => {
|
|
374
|
-
// await delay(2000)
|
|
375
|
-
await pageBuilderService.completeBuilderInitialization(undefined, true)
|
|
376
|
-
|
|
377
|
-
if (userSettings && userSettings.lang) {
|
|
378
|
-
languageSelction.value = userSettings.lang
|
|
379
|
-
}
|
|
380
|
-
if (
|
|
381
|
-
getPageBuilderConfig.value &&
|
|
382
|
-
getPageBuilderConfig.value.userSettings &&
|
|
383
|
-
getPageBuilderConfig.value.userSettings.language &&
|
|
384
|
-
getPageBuilderConfig.value.userSettings.language.default &&
|
|
385
|
-
(!userSettings || !userSettings.lang)
|
|
386
|
-
) {
|
|
387
|
-
languageSelction.value = getPageBuilderConfig.value.userSettings.language.default
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
await loadTranslations(languageSelction.value)
|
|
391
|
-
isInitializingLang = false
|
|
392
|
-
|
|
393
|
-
updatePanelPosition()
|
|
394
|
-
|
|
395
|
-
// Set up MutationObserver and event listeners
|
|
396
|
-
const container = pbxBuilderWrapper.value
|
|
397
|
-
if (!container) return
|
|
398
|
-
|
|
399
|
-
const observer = new MutationObserver(updatePanelPosition)
|
|
400
|
-
observer.observe(container, {
|
|
401
|
-
childList: true,
|
|
402
|
-
subtree: true,
|
|
403
|
-
attributes: true,
|
|
404
|
-
attributeFilter: ['selected'],
|
|
405
|
-
})
|
|
406
|
-
|
|
407
|
-
window.addEventListener('scroll', updatePanelPosition)
|
|
408
|
-
window.addEventListener('resize', updatePanelPosition)
|
|
409
|
-
|
|
410
|
-
//
|
|
411
|
-
//
|
|
412
|
-
//
|
|
413
|
-
//
|
|
414
|
-
// Check if Builder started
|
|
415
|
-
await delay(10000)
|
|
416
|
-
ensureBuilderInitialized()
|
|
417
|
-
|
|
418
|
-
// Re-check if Builder started
|
|
419
|
-
await delay(10000)
|
|
420
|
-
ensureBuilderInitialized()
|
|
421
|
-
|
|
422
|
-
// Re-check again if Builder started
|
|
423
|
-
await delay(10000)
|
|
424
|
-
ensureBuilderInitialized()
|
|
425
|
-
})
|
|
426
|
-
</script>
|
|
427
|
-
|
|
428
|
-
<template>
|
|
429
|
-
<div
|
|
430
|
-
class="lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-auto pbx-flex pbx-flex-col pbx-font-sans pbx-text-black 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"
|
|
431
|
-
>
|
|
432
|
-
<GlobalLoader
|
|
433
|
-
v-if="(getIsLoadingGlobal && !openAppNotStartedModal) || isLoadingLang"
|
|
434
|
-
></GlobalLoader>
|
|
435
|
-
<ModalBuilder
|
|
436
|
-
title="The builder hasn’t started yet"
|
|
437
|
-
:showModalBuilder="openAppNotStartedModal"
|
|
438
|
-
@closeMainModalBuilder="handlAppNotStartedModal"
|
|
439
|
-
type="delete"
|
|
440
|
-
maxWidth="2xl"
|
|
441
|
-
:noBackgroundOpacity="true"
|
|
442
|
-
>
|
|
443
|
-
The builder hasn’t started yet. If this screen doesn’t go away soon, it may just need a little
|
|
444
|
-
setup in the background. You can safely contact support and ask them to initialize the builder
|
|
445
|
-
by running the startBuilder method for this resource.
|
|
446
|
-
</ModalBuilder>
|
|
447
|
-
|
|
448
|
-
<BuilderComponents
|
|
449
|
-
v-if="showModalAddComponent"
|
|
450
|
-
:show="showModalAddComponent"
|
|
451
|
-
:firstButtonText="firstButtonTextSearchComponents"
|
|
452
|
-
:title="titleModalAddComponent"
|
|
453
|
-
:CustomBuilderComponents="props.CustomBuilderComponents"
|
|
454
|
-
@firstModalButtonSearchComponentsFunction="firstModalButtonSearchComponentsFunction"
|
|
455
|
-
></BuilderComponents>
|
|
456
|
-
|
|
457
|
-
<ModalBuilder
|
|
458
|
-
:title="titleBuilderDesktop"
|
|
459
|
-
:showModalBuilder="openPageBuilderPreviewModal"
|
|
460
|
-
@closeMainModalBuilder="firstPageBuilderPreviewModalButton"
|
|
461
|
-
maxWidth="screen"
|
|
462
|
-
>
|
|
463
|
-
<Preview></Preview>
|
|
464
|
-
</ModalBuilder>
|
|
465
|
-
|
|
466
|
-
<ModalBuilder
|
|
467
|
-
:title="titleBuilderMobile"
|
|
468
|
-
:showModalBuilder="openPageBuilderPreviewMobile"
|
|
469
|
-
@closeMainModalBuilder="firstPageBuilderPreviewModalButtonMobile"
|
|
470
|
-
maxWidth="lg"
|
|
471
|
-
>
|
|
472
|
-
<Preview :mobile="true" />
|
|
473
|
-
</ModalBuilder>
|
|
474
|
-
|
|
475
|
-
<DynamicModalBuilder
|
|
476
|
-
:showDynamicModalBuilder="showModalResumeEditing"
|
|
477
|
-
:isLoading="getIsLoadingResumeEditing"
|
|
478
|
-
:type="typeModal"
|
|
479
|
-
:gridColumnAmount="gridColumnModalResumeEditing"
|
|
480
|
-
:title="titleModalResumeEditing"
|
|
481
|
-
:description="descriptionModalResumeEditing"
|
|
482
|
-
:firstButtonText="firstButtonResumeEditing"
|
|
483
|
-
:secondButtonText="secondButtonResumeEditing"
|
|
484
|
-
:thirdButtonText="thirdButtonResumeEditing"
|
|
485
|
-
@firstModalButtonFunctionDynamicModalBuilder="firstModalButtonResumeEditingFunction"
|
|
486
|
-
@secondModalButtonFunctionDynamicModalBuilder="secondModalButtonResumeEditingFunction"
|
|
487
|
-
@thirdModalButtonFunctionDynamicModalBuilder="thirdModalButtonResumeEditingFunction"
|
|
488
|
-
>
|
|
489
|
-
<header></header>
|
|
490
|
-
<main></main>
|
|
491
|
-
</DynamicModalBuilder>
|
|
492
|
-
<DynamicModalBuilder
|
|
493
|
-
:showDynamicModalBuilder="showModalRestore"
|
|
494
|
-
:isLoading="getIsRestoring"
|
|
495
|
-
:type="typeModalRestore"
|
|
496
|
-
:gridColumnAmount="gridColumnModalRestore"
|
|
497
|
-
:title="titleModalRestore"
|
|
498
|
-
:description="descriptionModalRestore"
|
|
499
|
-
:firstButtonText="firstButtonRestore"
|
|
500
|
-
:secondButtonText="secondButtonRestore"
|
|
501
|
-
:thirdButtonText="thirdButtonRestore"
|
|
502
|
-
@firstModalButtonFunctionDynamicModalBuilder="firstModalButtonRestoreFunction"
|
|
503
|
-
@secondModalButtonFunctionDynamicModalBuilder="secondModalButtonRestoreFunction"
|
|
504
|
-
@thirdModalButtonFunctionDynamicModalBuilder="thirdModalButtonRestoreFunction"
|
|
505
|
-
>
|
|
506
|
-
<header></header>
|
|
507
|
-
<main></main>
|
|
508
|
-
</DynamicModalBuilder>
|
|
509
|
-
|
|
510
|
-
<div
|
|
511
|
-
id="pagebuilder-navbar"
|
|
512
|
-
class="lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-min-w-[64rem] pbx-max-w-[64rem] pbx-w-[64rem] pbx-flex-1 pbx-bg-myPrimaryLightGrayColor pbx-flex pbx-items-center pbx-justify-between pbx-border-0 pbx-border-solid pbx-border-b pbx-border-gray-200 pbx-mb-2 pbx-font-sans pbx-min-h-20"
|
|
513
|
-
>
|
|
514
|
-
<template
|
|
515
|
-
v-if="
|
|
516
|
-
getPageBuilderConfig &&
|
|
517
|
-
getPageBuilderConfig.pageBuilderLogo &&
|
|
518
|
-
getPageBuilderConfig.pageBuilderLogo.src
|
|
519
|
-
"
|
|
520
|
-
>
|
|
521
|
-
<!-- Logo # start -->
|
|
522
|
-
<div
|
|
523
|
-
@click.self="
|
|
524
|
-
async () => {
|
|
525
|
-
await pageBuilderService.clearHtmlSelection()
|
|
526
|
-
}
|
|
527
|
-
"
|
|
528
|
-
class="pbx-flex pbx-justify-start pbx-py-2 lg:pbx-ml-4 pbx-ml-2"
|
|
529
|
-
>
|
|
530
|
-
<img class="pbx-h-6" :src="getPageBuilderConfig.pageBuilderLogo.src" alt="Logo" />
|
|
531
|
-
</div>
|
|
532
|
-
</template>
|
|
533
|
-
<!-- Logo # end -->
|
|
534
|
-
|
|
535
|
-
<UndoRedo @toolbar-hide-request="hideToolbar"></UndoRedo>
|
|
536
|
-
|
|
537
|
-
<div
|
|
538
|
-
@click.self="
|
|
539
|
-
async () => {
|
|
540
|
-
await pageBuilderService.clearHtmlSelection()
|
|
541
|
-
}
|
|
542
|
-
"
|
|
543
|
-
class="pbx-flex-1 pbx-flex pbx-justify-center pbx-items-center pbx-py-2 pbx-w-full"
|
|
544
|
-
>
|
|
545
|
-
<div class="pbx-flex pbx-items-center pbx-justify-center">
|
|
546
|
-
<!-- Save Start -->
|
|
547
|
-
<button
|
|
548
|
-
class="pbx-mySecondaryButton pbx-h-6 pbx-flex pbx-gap-2 pbx-mr-2"
|
|
549
|
-
@click.stop="
|
|
550
|
-
async () => {
|
|
551
|
-
await pageBuilderService.clearHtmlSelection()
|
|
552
|
-
await pageBuilderService.handleManualSave()
|
|
553
|
-
}
|
|
554
|
-
"
|
|
555
|
-
type="button"
|
|
556
|
-
:disabled="getIsSaving"
|
|
557
|
-
>
|
|
558
|
-
<div
|
|
559
|
-
v-if="!getIsSaving"
|
|
560
|
-
class="pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"
|
|
561
|
-
>
|
|
562
|
-
<span class="material-symbols-outlined">save</span>
|
|
563
|
-
</div>
|
|
564
|
-
<div
|
|
565
|
-
v-if="getIsSaving"
|
|
566
|
-
class="pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"
|
|
567
|
-
>
|
|
568
|
-
<span class="pbx-relative pbx-flex pbx-size-3">
|
|
569
|
-
<span
|
|
570
|
-
class="pbx-absolute pbx-inline-flex pbx-h-full pbx-w-full pbx-animate-ping pbx-rounded-full pbx-bg-gray-400 pbx-opacity-75"
|
|
571
|
-
></span>
|
|
572
|
-
<span
|
|
573
|
-
class="pbx-relative pbx-inline-flex pbx-size-3 pbx-rounded-full pbx-bg-green-200"
|
|
574
|
-
></span>
|
|
575
|
-
</span>
|
|
576
|
-
</div>
|
|
577
|
-
<div>{{ translate('Save') }}</div>
|
|
578
|
-
</button>
|
|
579
|
-
<!-- Save End -->
|
|
580
|
-
|
|
581
|
-
<!-- Restore Start -->
|
|
582
|
-
<template
|
|
583
|
-
v-if="
|
|
584
|
-
getPageBuilderConfig &&
|
|
585
|
-
getPageBuilderConfig.updateOrCreate &&
|
|
586
|
-
getPageBuilderConfig.updateOrCreate.formType === 'update'
|
|
587
|
-
"
|
|
588
|
-
>
|
|
589
|
-
<button
|
|
590
|
-
class="pbx-mySecondaryButton pbx-h-6 pbx-flex pbx-gap-2 lg:pbx-mr-2 pbx-mr-2"
|
|
591
|
-
@click.stop="
|
|
592
|
-
async () => {
|
|
593
|
-
await pageBuilderService.clearHtmlSelection()
|
|
594
|
-
await handleRestoreOriginalContent()
|
|
595
|
-
}
|
|
596
|
-
"
|
|
597
|
-
type="button"
|
|
598
|
-
:disabled="getIsRestoring"
|
|
599
|
-
>
|
|
600
|
-
<div
|
|
601
|
-
v-if="!getIsRestoring"
|
|
602
|
-
class="pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"
|
|
603
|
-
>
|
|
604
|
-
<span class="material-symbols-outlined"> settings_backup_restore </span>
|
|
605
|
-
</div>
|
|
606
|
-
<div
|
|
607
|
-
v-if="getIsRestoring"
|
|
608
|
-
class="pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"
|
|
609
|
-
>
|
|
610
|
-
<span class="pbx-relative pbx-flex pbx-size-3">
|
|
611
|
-
<span
|
|
612
|
-
class="pbx-absolute pbx-inline-flex pbx-h-full pbx-w-full pbx-animate-ping pbx-rounded-full pbx-bg-gray-400 pbx-opacity-75"
|
|
613
|
-
></span>
|
|
614
|
-
<span
|
|
615
|
-
class="pbx-relative pbx-inline-flex pbx-size-3 pbx-rounded-full pbx-bg-green-200"
|
|
616
|
-
></span>
|
|
617
|
-
</span>
|
|
618
|
-
</div>
|
|
619
|
-
<div class="lg:pbx-block pbx-hidden">
|
|
620
|
-
<span> {{ translate('Reset Page') }} </span>
|
|
621
|
-
</div>
|
|
622
|
-
<div class="lg:pbx-hidden pbx-block">
|
|
623
|
-
<span> {{ translate('Reset') }} </span>
|
|
624
|
-
</div>
|
|
625
|
-
</button>
|
|
626
|
-
</template>
|
|
627
|
-
<!-- Restore End -->
|
|
628
|
-
</div>
|
|
629
|
-
</div>
|
|
630
|
-
|
|
631
|
-
<div
|
|
632
|
-
@click.self="
|
|
633
|
-
async () => {
|
|
634
|
-
await pageBuilderService.clearHtmlSelection()
|
|
635
|
-
}
|
|
636
|
-
"
|
|
637
|
-
class="pbx-flex-1 pbx-flex pbx-justify-center pbx-items-center pbx-py-2 pbx-w-full"
|
|
638
|
-
>
|
|
639
|
-
<div
|
|
640
|
-
@click.self="
|
|
641
|
-
async () => {
|
|
642
|
-
await pageBuilderService.clearHtmlSelection()
|
|
643
|
-
}
|
|
644
|
-
"
|
|
645
|
-
class="pbx-flex pbx-items-center pbx-justify-center"
|
|
646
|
-
>
|
|
647
|
-
<div
|
|
648
|
-
class="pbx-mr-2"
|
|
649
|
-
@click="
|
|
650
|
-
() => {
|
|
651
|
-
pageBuilderStateStore.setComponentArrayAddMethod('unshift')
|
|
652
|
-
handleAddComponent()
|
|
653
|
-
}
|
|
654
|
-
"
|
|
655
|
-
>
|
|
656
|
-
<div class="pbx-flex pbx-items-center pbx-justify-center pbx-gap-2 pbx-border-gray-200">
|
|
657
|
-
<span class="lg:pbx-block pbx-hidden">
|
|
658
|
-
<div class="pbx-whitespace-nowrap pbx-cursor-pointer">
|
|
659
|
-
{{ translate('Add new Components') }}
|
|
660
|
-
</div>
|
|
661
|
-
</span>
|
|
662
|
-
<span
|
|
663
|
-
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-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"
|
|
664
|
-
>
|
|
665
|
-
<span class="pbx-myMediumIcon material-symbols-outlined"> interests </span>
|
|
666
|
-
</span>
|
|
667
|
-
</div>
|
|
668
|
-
</div>
|
|
669
|
-
<div class="pbx-flex pbx-items-center pbx-justify-center pbx-mr-2">
|
|
670
|
-
<div
|
|
671
|
-
@click="
|
|
672
|
-
async () => {
|
|
673
|
-
pageBuilderStateStore.setMenuRight(false)
|
|
674
|
-
pageBuilderStateStore.setElement(null)
|
|
675
|
-
await pageBuilderService.clearHtmlSelection()
|
|
676
|
-
handlePageBuilderPreview()
|
|
677
|
-
}
|
|
678
|
-
"
|
|
679
|
-
>
|
|
680
|
-
<div class="pbx-flex pbx-items-center pbx-justify-center pbx-gap-2">
|
|
681
|
-
<span
|
|
682
|
-
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-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"
|
|
683
|
-
>
|
|
684
|
-
<span class="pbx-myMediumIcon material-symbols-outlined"> visibility </span>
|
|
685
|
-
</span>
|
|
686
|
-
</div>
|
|
687
|
-
</div>
|
|
688
|
-
</div>
|
|
689
|
-
<div class="lg:pbx-flex pbx-hidden pbx-items-center pbx-justify-center">
|
|
690
|
-
<div
|
|
691
|
-
@click="
|
|
692
|
-
async () => {
|
|
693
|
-
pageBuilderStateStore.setMenuRight(false)
|
|
694
|
-
pageBuilderStateStore.setElement(null)
|
|
695
|
-
await pageBuilderService.clearHtmlSelection()
|
|
696
|
-
handlePageBuilderPreviewMobile()
|
|
697
|
-
}
|
|
698
|
-
"
|
|
699
|
-
>
|
|
700
|
-
<div class="pbx-flex pbx-items-center pbx-justify-center pbx-gap-2">
|
|
701
|
-
<span
|
|
702
|
-
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-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"
|
|
703
|
-
>
|
|
704
|
-
<span class="material-symbols-outlined"> phone_iphone </span>
|
|
705
|
-
</span>
|
|
706
|
-
</div>
|
|
707
|
-
</div>
|
|
708
|
-
</div>
|
|
709
|
-
</div>
|
|
710
|
-
</div>
|
|
711
|
-
|
|
712
|
-
<div class="pbx-flex-1 pbx-flex gap-2 pbx-items-center pbx-justify-end">
|
|
713
|
-
<!-- Options # Start -->
|
|
714
|
-
<div
|
|
715
|
-
@click.self="
|
|
716
|
-
async () => {
|
|
717
|
-
await pageBuilderService.clearHtmlSelection()
|
|
718
|
-
}
|
|
719
|
-
"
|
|
720
|
-
class="pbx-flex pbx-items-center pbx-py-2 pbx-w-full"
|
|
721
|
-
:class="[showCloseButton ? 'pbx-justify-between' : 'pbx-justify-end']"
|
|
722
|
-
>
|
|
723
|
-
<ToolbarOption></ToolbarOption>
|
|
724
|
-
</div>
|
|
725
|
-
<!-- Options # Start -->
|
|
726
|
-
|
|
727
|
-
<!-- Publish buttons start -->
|
|
728
|
-
<template v-if="showPublishButton">
|
|
729
|
-
<div class="pbx-flex-1 pbx-ml-2">
|
|
730
|
-
<button
|
|
731
|
-
class="pbx-myPrimaryButton"
|
|
732
|
-
@click="
|
|
733
|
-
async () => {
|
|
734
|
-
closePublish()
|
|
735
|
-
}
|
|
736
|
-
"
|
|
737
|
-
>
|
|
738
|
-
{{ translate('Publish') }}
|
|
739
|
-
</button>
|
|
740
|
-
</div>
|
|
741
|
-
</template>
|
|
742
|
-
<!-- Publish buttons end -->
|
|
743
|
-
|
|
744
|
-
<template
|
|
745
|
-
v-if="
|
|
746
|
-
getPageBuilderConfig &&
|
|
747
|
-
getPageBuilderConfig.userSettings &&
|
|
748
|
-
getPageBuilderConfig.userSettings.language &&
|
|
749
|
-
!getPageBuilderConfig.userSettings.language.disableLanguageDropDown
|
|
750
|
-
"
|
|
751
|
-
>
|
|
752
|
-
<template
|
|
753
|
-
v-if="
|
|
754
|
-
getPageBuilderConfig &&
|
|
755
|
-
getPageBuilderConfig.userSettings &&
|
|
756
|
-
getPageBuilderConfig.userSettings.language
|
|
757
|
-
"
|
|
758
|
-
>
|
|
759
|
-
<div
|
|
760
|
-
class="pbx-flex-1 pbx-flex pbx-justify-end pbx-items-center pbx-ml-2 lg:pbx-mr-4 pbx-mr-2"
|
|
761
|
-
>
|
|
762
|
-
<select
|
|
763
|
-
id="pbx-lang"
|
|
764
|
-
class="pbx-myPrimarySelect pbx-min-w-20"
|
|
765
|
-
v-model="languageSelction"
|
|
766
|
-
>
|
|
767
|
-
<template
|
|
768
|
-
v-if="
|
|
769
|
-
Array.isArray(getPageBuilderConfig.userSettings.language.enable) &&
|
|
770
|
-
getPageBuilderConfig.userSettings.language.enable.length >= 1
|
|
771
|
-
"
|
|
772
|
-
>
|
|
773
|
-
<option
|
|
774
|
-
v-for="lang in pageBuilderService
|
|
775
|
-
.availableLanguage()
|
|
776
|
-
.filter((l) => getPageBuilderConfig.userSettings.language.enable.includes(l))"
|
|
777
|
-
:key="lang"
|
|
778
|
-
:value="lang"
|
|
779
|
-
>
|
|
780
|
-
{{ lang }}
|
|
781
|
-
</option>
|
|
782
|
-
</template>
|
|
783
|
-
<template
|
|
784
|
-
v-if="
|
|
785
|
-
!getPageBuilderConfig.userSettings.language.enable ||
|
|
786
|
-
(Array.isArray(getPageBuilderConfig.userSettings.language.enable) &&
|
|
787
|
-
getPageBuilderConfig.userSettings.language.enable.length === 0)
|
|
788
|
-
"
|
|
789
|
-
>
|
|
790
|
-
<option
|
|
791
|
-
v-for="lang in pageBuilderService.availableLanguage()"
|
|
792
|
-
:key="lang"
|
|
793
|
-
:value="lang"
|
|
794
|
-
>
|
|
795
|
-
{{ lang }}
|
|
796
|
-
</option>
|
|
797
|
-
</template>
|
|
798
|
-
</select>
|
|
799
|
-
</div>
|
|
800
|
-
</template>
|
|
801
|
-
</template>
|
|
802
|
-
<template v-if="showCloseButton">
|
|
803
|
-
<div class="pbx-flex-1 pbx-ml-2 pbx-mr-2">
|
|
804
|
-
<button
|
|
805
|
-
class="pbx-h-10 pbx-w-10 pbx-flex-end 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-myPrimaryLinkColor hover:pbx-text-white hover:pbx-fill-white focus-visible:pbx-ring-0"
|
|
806
|
-
@click="
|
|
807
|
-
async () => {
|
|
808
|
-
closePageBuilder()
|
|
809
|
-
await pageBuilderService.clearHtmlSelection()
|
|
810
|
-
}
|
|
811
|
-
"
|
|
812
|
-
>
|
|
813
|
-
<span class="material-symbols-outlined"> close </span>
|
|
814
|
-
</button>
|
|
815
|
-
</div>
|
|
816
|
-
</template>
|
|
817
|
-
</div>
|
|
818
|
-
</div>
|
|
819
|
-
<!-- Top Layout Save And Reset Area - End -->
|
|
820
|
-
|
|
821
|
-
<!-- Page Builder Main Start -->
|
|
822
|
-
<div
|
|
823
|
-
id="pagebuilder-main"
|
|
824
|
-
class="lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-min-w-[64rem] pbx-max-w-[64rem] pbx-w-[64rem] pbx-flex-1 pbx-relative pbx-h-full pbx-flex pbx-pb-2 pbx-gap-2"
|
|
825
|
-
>
|
|
826
|
-
<!-- Left Menu Start -->
|
|
827
|
-
<div
|
|
828
|
-
@click.self="
|
|
829
|
-
async () => {
|
|
830
|
-
await pageBuilderService.clearHtmlSelection()
|
|
831
|
-
}
|
|
832
|
-
"
|
|
833
|
-
id="pagebuilder-left-menu"
|
|
834
|
-
class="pbx-w-16 pbx-pt-7 pbx-pb-2 pbx-bg-myPrimaryLightGrayColor pbx-rounded-r-2xl pbx-shadow-sm"
|
|
835
|
-
>
|
|
836
|
-
<div class="pbx-mx-2 pbx-flex pbx-flex-col pbx-myPrimaryGap pbx-items-stretch">
|
|
837
|
-
<div class="pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center">
|
|
838
|
-
<button
|
|
839
|
-
type="button"
|
|
840
|
-
@click="
|
|
841
|
-
() => {
|
|
842
|
-
pageBuilderStateStore.setComponentArrayAddMethod('unshift')
|
|
843
|
-
handleAddComponent()
|
|
844
|
-
}
|
|
845
|
-
"
|
|
846
|
-
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-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"
|
|
847
|
-
>
|
|
848
|
-
<span class="pbx-myMediumIcon material-symbols-outlined"> interests </span>
|
|
849
|
-
</button>
|
|
850
|
-
</div>
|
|
851
|
-
<div
|
|
852
|
-
@click.self="
|
|
853
|
-
async () => {
|
|
854
|
-
await pageBuilderService.clearHtmlSelection()
|
|
855
|
-
}
|
|
856
|
-
"
|
|
857
|
-
>
|
|
858
|
-
<ComponentTopMenu v-if="getElement"></ComponentTopMenu>
|
|
859
|
-
</div>
|
|
860
|
-
</div>
|
|
861
|
-
</div>
|
|
862
|
-
<!-- Left Menu End -->
|
|
863
|
-
|
|
864
|
-
<main
|
|
865
|
-
ref="pbxBuilderWrapper"
|
|
866
|
-
id="page-builder-wrapper"
|
|
867
|
-
class="pbx-transition-all pbx-duration-300 pbx-font-sans pbx-p-1 pbx-flex pbx-flex-col pbx-grow pbx-rounded-tr-2xl pbx-rounded-tl-2xl pbx-border-solid pbx-border pbx-border-gray-200 pbx-items-stretch pbx-text-black pbx-h-[100vh] pbx-overflow-y-scroll pbx-relative pbx-pt-16"
|
|
868
|
-
:class="[getMenuRight ? 'pbx-w-full' : 'pbx-w-full']"
|
|
869
|
-
>
|
|
870
|
-
<div
|
|
871
|
-
id="pbxEditToolbar"
|
|
872
|
-
class="pbx-z-30 lg:pbx-mx-20 pbx-flex pbx-gap-2 pbx-justify-center pbx-items-center pbx-rounded-full pbx-px-4 pbx-h-0"
|
|
873
|
-
>
|
|
874
|
-
<template v-if="getElement">
|
|
875
|
-
<EditGetElement></EditGetElement>
|
|
876
|
-
</template>
|
|
877
|
-
</div>
|
|
878
|
-
<!-- Element Popover toolbar end -->
|
|
879
|
-
|
|
880
|
-
<div id="pagebuilder" class="pbx-text-black pbx-font-sans">
|
|
881
|
-
<template v-for="component in getComponents" :key="component.id">
|
|
882
|
-
<div
|
|
883
|
-
v-if="component.html_code"
|
|
884
|
-
v-html="component.html_code"
|
|
885
|
-
@mouseup="handleSelectComponent(component)"
|
|
886
|
-
></div>
|
|
887
|
-
</template>
|
|
888
|
-
</div>
|
|
889
|
-
</main>
|
|
890
|
-
|
|
891
|
-
<transition name="slide-right" appear mode="out-in">
|
|
892
|
-
<aside
|
|
893
|
-
v-if="getMenuRight"
|
|
894
|
-
aria-label="menu"
|
|
895
|
-
id="pagebuilder-right-menu"
|
|
896
|
-
class="pbx-z-20 pbx-flex-shrink-0 pbx-overflow-hidden pbx-border-0 pbx-border-solid pbx-border-l-0 pbx-border-l-gray-600 pbx-rounded-l-2xl pbx-h-[100vh] pbx-pl-2"
|
|
897
|
-
:class="[
|
|
898
|
-
getMenuRight
|
|
899
|
-
? 'pbx-w-80 pbx-bg-myPrimaryLightGrayColor pbx-items-stretch'
|
|
900
|
-
: 'bpx-w-0 pbx-mr-0',
|
|
901
|
-
]"
|
|
902
|
-
>
|
|
903
|
-
<RightSidebarEditor @closeEditor="pageBuilderStateStore.setMenuRight(false)">
|
|
904
|
-
</RightSidebarEditor>
|
|
905
|
-
</aside>
|
|
906
|
-
<div
|
|
907
|
-
v-else
|
|
908
|
-
@click.self="
|
|
909
|
-
async () => {
|
|
910
|
-
await pageBuilderService.clearHtmlSelection()
|
|
911
|
-
}
|
|
912
|
-
"
|
|
913
|
-
class="pbx-w-18 pbx-bg-myPrimaryLightGrayColor pbx-pt-5 pbx-z-20 pbx-flex-shrink-0 pbx-overflow-hidden pbx-border-0 pbx-border-solid pbx-border-l-0 pbx-border-l-gray-600 pbx-rounded-l-2xl pbx-h-[100vh] pbx-pl-2 pbx-pr-2"
|
|
914
|
-
>
|
|
915
|
-
<div
|
|
916
|
-
@click.self="
|
|
917
|
-
async () => {
|
|
918
|
-
await pageBuilderService.clearHtmlSelection()
|
|
919
|
-
}
|
|
920
|
-
"
|
|
921
|
-
class="pbx-flex pbx-flex-col pbx-items-center pbx-justify-center pbx-gap-2"
|
|
922
|
-
>
|
|
923
|
-
<button
|
|
924
|
-
v-if="!getMenuRight"
|
|
925
|
-
@click="pageBuilderStateStore.setMenuRight(true)"
|
|
926
|
-
type="button"
|
|
927
|
-
class="pbx-mySecondaryButton pbx-px-2 pbx-text-xs"
|
|
928
|
-
>
|
|
929
|
-
<span> {{ translate('Styles') }} </span>
|
|
930
|
-
</button>
|
|
931
|
-
</div>
|
|
932
|
-
</div>
|
|
933
|
-
</transition>
|
|
934
|
-
</div>
|
|
935
|
-
<!-- Page Builder Main End -->
|
|
936
|
-
|
|
937
|
-
<!-- Footer Start -->
|
|
938
|
-
<div
|
|
939
|
-
id="pagebuilder-footer"
|
|
940
|
-
class="lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-min-w-[64rem] pbx-max-w-[64rem] pbx-w-[64rem] pbx-flex-1 pbx-flex pbx-items-center pbx-justify-center pbx-border-0 pbx-border-t pbx-border-t-gray-200 pbx-border-solid pbx-bg-myPrimaryLightGrayColor pbx-py-4"
|
|
941
|
-
>
|
|
942
|
-
<div
|
|
943
|
-
@click="
|
|
944
|
-
() => {
|
|
945
|
-
pageBuilderStateStore.setComponentArrayAddMethod('push')
|
|
946
|
-
handleAddComponent()
|
|
947
|
-
}
|
|
948
|
-
"
|
|
949
|
-
class="pbx-flex pbx-items-center pbx-justify-center pbx-gap-2 pbx-cursor-pointer"
|
|
950
|
-
>
|
|
951
|
-
<span class="lg:pbx-block pbx-hidden">
|
|
952
|
-
<div class="pbx-whitespace-nowrap">{{ translate('Add to the bottom') }}</div>
|
|
953
|
-
</span>
|
|
954
|
-
<div class="pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center">
|
|
955
|
-
<button
|
|
956
|
-
type="button"
|
|
957
|
-
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-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"
|
|
958
|
-
>
|
|
959
|
-
<span class="pbx-myMediumIcon material-symbols-outlined"> interests </span>
|
|
960
|
-
</button>
|
|
961
|
-
</div>
|
|
962
|
-
</div>
|
|
963
|
-
</div>
|
|
964
|
-
<!-- Footer End -->
|
|
965
|
-
</div>
|
|
966
|
-
</template>
|
|
967
|
-
|
|
968
|
-
<style>
|
|
969
|
-
#pagebuilder [element] {
|
|
970
|
-
outline: rgba(255, 255, 255, 0) dashed 4px !important;
|
|
971
|
-
outline-offset: -4px !important;
|
|
972
|
-
}
|
|
973
|
-
#pagebuilder [hovered] {
|
|
974
|
-
outline: rgb(0, 140, 14, 1) dashed 4px !important;
|
|
975
|
-
outline-offset: -4px !important;
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
#pagebuilder [selected] {
|
|
979
|
-
position: relative;
|
|
980
|
-
|
|
981
|
-
outline: rgb(185, 16, 16) dashed 4px !important;
|
|
982
|
-
outline-offset: -4px !important;
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
#pagebuilder a {
|
|
986
|
-
cursor: default;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
/* sortable */
|
|
990
|
-
|
|
991
|
-
.sortable-ghost {
|
|
992
|
-
display: flex;
|
|
993
|
-
justify-content: center;
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
.sortable-ghost > * {
|
|
997
|
-
width: 100%;
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
/* CSS for content inside page builder # start */
|
|
1001
|
-
#page-builder-editor .tiptap {
|
|
1002
|
-
outline: none !important;
|
|
1003
|
-
box-shadow: none !important;
|
|
1004
|
-
background: #fff;
|
|
1005
|
-
min-height: 25rem;
|
|
1006
|
-
border-bottom: 1px solid #f1f1f1;
|
|
1007
|
-
padding: 0px 0px 10px 16px;
|
|
1008
|
-
margin-bottom: 20px;
|
|
1009
|
-
padding-bottom: 100px;
|
|
1010
|
-
}
|
|
1011
|
-
.slide-right-enter-from,
|
|
1012
|
-
.slide-right-leave-to {
|
|
1013
|
-
transform: translateX(100%);
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
.slide-right-enter-to,
|
|
1017
|
-
.slide-right-leave-from {
|
|
1018
|
-
transform: translateX(0%);
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
.slide-right-enter-active,
|
|
1022
|
-
.slide-right-leave-active {
|
|
1023
|
-
transition: transform 0.1s ease;
|
|
1024
|
-
}
|
|
1025
|
-
</style>
|