@myissue/vue-website-page-builder 3.2.91 → 3.2.92
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 +122 -84
- package/dist/vue-website-page-builder.css +1 -1
- package/dist/vue-website-page-builder.js +5191 -5273
- package/dist/vue-website-page-builder.umd.cjs +52 -52
- package/package.json +1 -1
- package/src/Components/Loaders/GlobalLoader.vue +11 -0
- package/src/Components/Modals/DynamicModalBuilder.vue +41 -245
- package/src/Components/Modals/ModalBuilder.vue +29 -4
- package/src/Components/PageBuilder/DefaultComponents/DefaultBuilderComponents.vue +3 -8
- package/src/Components/PageBuilder/EditorMenu/Editables/BackgroundColorEditor.vue +5 -4
- package/src/Components/PageBuilder/EditorMenu/Editables/BorderRadius.vue +12 -13
- package/src/Components/PageBuilder/EditorMenu/Editables/Borders.vue +8 -8
- package/src/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue +7 -6
- package/src/Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue +6 -10
- package/src/Components/PageBuilder/EditorMenu/Editables/DeleteElement.vue +4 -4
- package/src/Components/PageBuilder/EditorMenu/Editables/EditGetElement.vue +10 -11
- package/src/Components/PageBuilder/EditorMenu/Editables/ElementEditor.vue +4 -5
- package/src/Components/PageBuilder/EditorMenu/Editables/ImageEditor.vue +0 -9
- package/src/Components/PageBuilder/EditorMenu/Editables/LinkEditor.vue +5 -5
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageBackgroundOpacity.vue +4 -4
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageOpacity.vue +4 -4
- package/src/Components/PageBuilder/EditorMenu/Editables/Margin.vue +8 -8
- package/src/Components/PageBuilder/EditorMenu/Editables/Padding.vue +8 -8
- package/src/Components/PageBuilder/EditorMenu/Editables/TextColorEditor.vue +4 -4
- package/src/Components/PageBuilder/EditorMenu/Editables/Typography.vue +16 -16
- package/src/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue +3 -7
- package/src/Components/PageBuilder/Settings/PageBuilderSettings.vue +55 -58
- package/src/Components/PageBuilder/ToolbarOption/ToolbarOption.vue +33 -40
- package/src/Components/TipTap/TipTap.vue +4 -9
- package/src/Components/TipTap/TipTapInput.vue +8 -8
- package/src/DemoComponents/DemoUnsplash.vue +4 -5
- package/src/DemoComponents/HomeSection.vue +9 -30
- package/src/PageBuilder/PageBuilder.vue +194 -96
- package/src/composables/{PageBuilderClass.ts → PageBuilderService.ts} +258 -97
- package/src/composables/builderInstance.ts +25 -0
- package/src/css/app.css +15 -0
- package/src/css/dev-global.css +7 -0
- package/src/index.ts +4 -2
- package/src/main.ts +3 -0
- package/src/stores/page-builder-state.ts +32 -2
- package/src/types/index.ts +99 -9
- package/src/helpers/passedPageBuilderConfig.ts +0 -71
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { onMounted, computed, ref, watch, provide
|
|
3
|
-
import PageBuilderClass from '../composables/PageBuilderClass.ts'
|
|
2
|
+
import { onMounted, computed, ref, watch, provide } from 'vue'
|
|
4
3
|
import ModalBuilder from '../Components/Modals/ModalBuilder.vue'
|
|
5
4
|
import Preview from './Preview.vue'
|
|
6
5
|
import ComponentTopMenu from '../Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue'
|
|
@@ -8,12 +7,13 @@ import EditGetElement from '../Components/PageBuilder/EditorMenu/Editables/EditG
|
|
|
8
7
|
import BuilderComponents from '../Components/Modals/BuilderComponents.vue'
|
|
9
8
|
import RightSidebarEditor from '../Components/PageBuilder/EditorMenu/RightSidebarEditor.vue'
|
|
10
9
|
import { sharedPageBuilderPinia, sharedPageBuilderStore } from '../stores/shared-store'
|
|
11
|
-
import { updateOrCreateIsFalsy } from '../helpers/passedPageBuilderConfig'
|
|
12
10
|
import ToolbarOption from '../Components/PageBuilder/ToolbarOption/ToolbarOption.vue'
|
|
13
11
|
import { delay } from '../composables/delay'
|
|
14
12
|
import { useDebounce } from '../composables/useDebounce.ts'
|
|
15
13
|
import DynamicModalBuilder from '../Components/Modals/DynamicModalBuilder.vue'
|
|
16
|
-
|
|
14
|
+
import GlobalLoader from '../Components/Loaders/GlobalLoader.vue'
|
|
15
|
+
import { getPageBuilder } from '../composables/builderInstance'
|
|
16
|
+
const pageBuilderService = getPageBuilder()
|
|
17
17
|
/**
|
|
18
18
|
* Props for PageBuilder component
|
|
19
19
|
* @typedef {Object} Props
|
|
@@ -37,9 +37,6 @@ const internalPinia = sharedPageBuilderPinia
|
|
|
37
37
|
|
|
38
38
|
const pageBuilderStateStore = sharedPageBuilderStore
|
|
39
39
|
|
|
40
|
-
// Initialize PageBuilder with store
|
|
41
|
-
const pageBuilderClass = new PageBuilderClass(pageBuilderStateStore)
|
|
42
|
-
|
|
43
40
|
// Provide store for child components (all pointing to the same consolidated store)
|
|
44
41
|
provide('pageBuilderStateStore', pageBuilderStateStore)
|
|
45
42
|
|
|
@@ -56,28 +53,28 @@ const closeAddComponentModal = () => {
|
|
|
56
53
|
}
|
|
57
54
|
provide('closeAddComponentModal', closeAddComponentModal)
|
|
58
55
|
|
|
59
|
-
const
|
|
60
|
-
return pageBuilderStateStore.
|
|
56
|
+
const getBuilderStarted = computed(() => {
|
|
57
|
+
return pageBuilderStateStore.getBuilderStarted
|
|
61
58
|
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return pageBuilderStateStore.getIsSaving
|
|
59
|
+
const getPageBuilderConfig = computed(() => {
|
|
60
|
+
return pageBuilderStateStore.getPageBuilderConfig
|
|
65
61
|
})
|
|
66
62
|
|
|
67
63
|
const getMenuRight = computed(() => {
|
|
68
64
|
return pageBuilderStateStore.getMenuRight
|
|
69
65
|
})
|
|
70
66
|
const previewCurrentDesign = function () {
|
|
71
|
-
|
|
67
|
+
pageBuilderService.previewCurrentDesign()
|
|
72
68
|
}
|
|
69
|
+
const openAppNotStartedModal = ref(false)
|
|
73
70
|
const openPageBuilderPreviewModal = ref(false)
|
|
74
71
|
|
|
72
|
+
const handlAppNotStartedModal = function () {
|
|
73
|
+
openAppNotStartedModal.value = false
|
|
74
|
+
}
|
|
75
75
|
const handlePageBuilderPreview = function () {
|
|
76
76
|
previewCurrentDesign()
|
|
77
|
-
|
|
78
77
|
openPageBuilderPreviewModal.value = true
|
|
79
|
-
// handle click
|
|
80
|
-
// end modal
|
|
81
78
|
}
|
|
82
79
|
|
|
83
80
|
const firstPageBuilderPreviewModalButton = function () {
|
|
@@ -90,7 +87,7 @@ const firstButtonTextSearchComponents = ref('')
|
|
|
90
87
|
const firstModalButtonSearchComponentsFunction = ref(null)
|
|
91
88
|
|
|
92
89
|
const handleAddComponent = async function () {
|
|
93
|
-
await
|
|
90
|
+
await pageBuilderService.clearHtmlSelection()
|
|
94
91
|
|
|
95
92
|
//
|
|
96
93
|
titleModalAddComponent.value = 'Add Components to Page'
|
|
@@ -105,15 +102,24 @@ const handleAddComponent = async function () {
|
|
|
105
102
|
// end modal
|
|
106
103
|
}
|
|
107
104
|
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
return components
|
|
105
|
+
const getHasLocalDraftForUpdate = computed(() => {
|
|
106
|
+
return pageBuilderStateStore.getHasLocalDraftForUpdate
|
|
111
107
|
})
|
|
112
108
|
|
|
113
109
|
const getElement = computed(() => {
|
|
114
110
|
return pageBuilderStateStore.getElement
|
|
115
111
|
})
|
|
116
112
|
|
|
113
|
+
const getComponents = computed(() => {
|
|
114
|
+
return pageBuilderStateStore.getComponents
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
watch(getHasLocalDraftForUpdate, (newVal) => {
|
|
118
|
+
if (newVal) {
|
|
119
|
+
handlerRumeEditingForUpdate()
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
|
|
117
123
|
const getElementAttributes = computed(() => {
|
|
118
124
|
if (!getElement.value || !(getElement.value instanceof HTMLElement)) {
|
|
119
125
|
return ''
|
|
@@ -143,8 +149,8 @@ watch(getElementAttributes, async (newAttributes, oldAttributes) => {
|
|
|
143
149
|
newAttributes?.dataImage !== oldAttributes?.dataImage
|
|
144
150
|
) {
|
|
145
151
|
debounce(async () => {
|
|
146
|
-
await
|
|
147
|
-
await
|
|
152
|
+
await pageBuilderService.handleAutoSave()
|
|
153
|
+
await pageBuilderService.initializeElementStyles()
|
|
148
154
|
}, 200)
|
|
149
155
|
}
|
|
150
156
|
})
|
|
@@ -155,42 +161,23 @@ const handleSelectComponent = function (componentObject) {
|
|
|
155
161
|
|
|
156
162
|
const draggableZone = ref(null)
|
|
157
163
|
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
const handleConfig = function (config) {
|
|
166
|
-
// Set config for page builder if not set by user
|
|
167
|
-
if (
|
|
168
|
-
config === null ||
|
|
169
|
-
config === undefined ||
|
|
170
|
-
(config && Object.keys(config).length === 0 && config.constructor === Object)
|
|
171
|
-
) {
|
|
172
|
-
pageBuilderClass.applyPageBuilderConfig(defaultConfigValues)
|
|
173
|
-
return
|
|
174
|
-
}
|
|
164
|
+
const getIsLoadingGlobal = computed(() => {
|
|
165
|
+
return pageBuilderStateStore.getIsLoadingGlobal
|
|
166
|
+
})
|
|
167
|
+
const getIsSaving = computed(() => {
|
|
168
|
+
return pageBuilderStateStore.getIsSaving
|
|
169
|
+
})
|
|
175
170
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
171
|
+
const getIsResumeEditing = computed(() => {
|
|
172
|
+
if (pageBuilderStateStore.getIsResumeEditing) {
|
|
173
|
+
handlerRumeEditingForUpdate()
|
|
180
174
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
pageBuilderClass.updateLocalStorageItemName()
|
|
175
|
+
return pageBuilderStateStore.getIsResumeEditing
|
|
176
|
+
})
|
|
177
|
+
const getIsRestoring = computed(() => {
|
|
178
|
+
return pageBuilderStateStore.getIsRestoring
|
|
179
|
+
})
|
|
187
180
|
|
|
188
|
-
if (config && config.updateOrCreate && config.updateOrCreate.formType === 'create') {
|
|
189
|
-
pageBuilderClass.mountComponentsToDOM()
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
{ immediate: true },
|
|
193
|
-
)
|
|
194
181
|
const gridColumnModalResumeEditing = ref(Number(1))
|
|
195
182
|
const typeModal = ref('')
|
|
196
183
|
const showModalResumeEditing = ref(false)
|
|
@@ -203,51 +190,86 @@ const firstModalButtonResumeEditingFunction = ref(null)
|
|
|
203
190
|
const secondModalButtonResumeEditingFunction = ref(null)
|
|
204
191
|
const thirdModalButtonResumeEditingFunction = ref(null)
|
|
205
192
|
|
|
206
|
-
const isLoadingResumeEditing = ref(null)
|
|
207
|
-
|
|
208
193
|
const handlerRumeEditingForUpdate = async function () {
|
|
209
|
-
await
|
|
194
|
+
await pageBuilderService.clearHtmlSelection()
|
|
195
|
+
|
|
196
|
+
typeModal.value = 'warning'
|
|
197
|
+
showModalResumeEditing.value = true
|
|
210
198
|
|
|
211
|
-
typeModal.value = 'default'
|
|
212
199
|
titleModalResumeEditing.value = 'Continue Your Work?'
|
|
213
200
|
descriptionModalResumeEditing.value =
|
|
214
|
-
'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
|
|
201
|
+
'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?'
|
|
215
202
|
firstButtonResumeEditing.value = 'Use Saved Version'
|
|
216
203
|
secondButtonResumeEditing.value = null
|
|
217
204
|
thirdButtonResumeEditing.value = 'Continue Where I Left Off'
|
|
218
|
-
showModalResumeEditing.value = true
|
|
219
205
|
|
|
220
206
|
firstModalButtonResumeEditingFunction.value = function () {
|
|
221
207
|
showModalResumeEditing.value = false
|
|
222
208
|
}
|
|
223
209
|
|
|
224
210
|
secondModalButtonResumeEditingFunction.value = function () {}
|
|
211
|
+
|
|
225
212
|
thirdModalButtonResumeEditingFunction.value = async function () {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
await pageBuilderClass.resumeEditingForUpdate()
|
|
229
|
-
isLoadingResumeEditing.value = false
|
|
213
|
+
await pageBuilderService.resumeEditingForUpdate()
|
|
214
|
+
|
|
230
215
|
showModalResumeEditing.value = false
|
|
231
216
|
}
|
|
232
217
|
|
|
233
218
|
// end modal
|
|
234
219
|
}
|
|
235
220
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
221
|
+
const gridColumnModalRestore = ref(Number(1))
|
|
222
|
+
const typeModalRestore = ref('')
|
|
223
|
+
const showModalRestore = ref(false)
|
|
224
|
+
const titleModalRestore = ref('')
|
|
225
|
+
const descriptionModalRestore = ref('')
|
|
226
|
+
const firstButtonRestore = ref('')
|
|
227
|
+
const secondButtonRestore = ref(null)
|
|
228
|
+
const thirdButtonRestore = ref(null)
|
|
229
|
+
const firstModalButtonRestoreFunction = ref(null)
|
|
230
|
+
const secondModalButtonRestoreFunction = ref(null)
|
|
231
|
+
const thirdModalButtonRestoreFunction = ref(null)
|
|
232
|
+
|
|
233
|
+
const handleRestoreOriginalContent = async function () {
|
|
234
|
+
await pageBuilderService.clearHtmlSelection()
|
|
235
|
+
|
|
236
|
+
typeModalRestore.value = 'success'
|
|
237
|
+
showModalRestore.value = true
|
|
238
|
+
|
|
239
|
+
titleModalRestore.value = 'Do you want to restore the original content from the database?'
|
|
240
|
+
descriptionModalRestore.value =
|
|
241
|
+
'Are you sure you want to restore the original content from the database? This will overwrite your current page layout.'
|
|
242
|
+
firstButtonRestore.value = 'Close'
|
|
243
|
+
secondButtonRestore.value = null
|
|
244
|
+
thirdButtonRestore.value = 'Restore original Content'
|
|
245
|
+
|
|
246
|
+
firstModalButtonRestoreFunction.value = function () {
|
|
247
|
+
showModalRestore.value = false
|
|
248
|
+
}
|
|
239
249
|
|
|
240
|
-
|
|
250
|
+
secondModalButtonRestoreFunction.value = async function () {}
|
|
251
|
+
thirdModalButtonRestoreFunction.value = async function () {
|
|
252
|
+
await pageBuilderService.restoreOriginalContent()
|
|
253
|
+
showModalRestore.value = false
|
|
254
|
+
}
|
|
241
255
|
|
|
242
|
-
|
|
256
|
+
// end modal
|
|
257
|
+
}
|
|
243
258
|
|
|
244
|
-
|
|
259
|
+
const ensureBuilderInitialized = function () {
|
|
260
|
+
if (!getBuilderStarted.value) {
|
|
261
|
+
openAppNotStartedModal.value = true
|
|
262
|
+
}
|
|
263
|
+
}
|
|
245
264
|
|
|
246
|
-
|
|
265
|
+
onMounted(async () => {
|
|
266
|
+
// Check if Builder started
|
|
267
|
+
await delay(5000)
|
|
268
|
+
ensureBuilderInitialized()
|
|
247
269
|
|
|
248
|
-
if
|
|
249
|
-
|
|
250
|
-
|
|
270
|
+
// Re-check if Builder started
|
|
271
|
+
await delay(5000)
|
|
272
|
+
ensureBuilderInitialized()
|
|
251
273
|
})
|
|
252
274
|
</script>
|
|
253
275
|
|
|
@@ -257,22 +279,23 @@ onMounted(async () => {
|
|
|
257
279
|
class="pbx-font-sans pbx-max-w-full pbx-m-1 pbx-border pbx-border-gray-400 pbx-inset-x-0 pbx-z-10 pbx-bg-white pbx-overflow-x-scroll"
|
|
258
280
|
>
|
|
259
281
|
<div id="pagebuilder-top-area" class="lg:pbx-px-4 pbx-pt-2 pbx-pb-4 pbx-mx-4 pbx-mb-4 pbx-mt-2">
|
|
282
|
+
<GlobalLoader v-if="getIsLoadingGlobal"></GlobalLoader>
|
|
260
283
|
<div
|
|
261
|
-
@click.self="
|
|
262
|
-
class="pbx-flex pbx-justify-between pbx-items-center pbx-pb-2 pbx-border-b pbx-border-gray-200"
|
|
284
|
+
@click.self="pageBuilderService.clearHtmlSelection()"
|
|
285
|
+
class="pbx-min-h-24 pbx-flex pbx-justify-between pbx-items-center pbx-pb-2 pbx-border-b pbx-border-gray-200"
|
|
263
286
|
>
|
|
264
287
|
<!-- Logo # start -->
|
|
265
|
-
<div @click="
|
|
288
|
+
<div @click="pageBuilderService.clearHtmlSelection()">
|
|
266
289
|
<div
|
|
267
290
|
v-if="
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
291
|
+
getPageBuilderConfig &&
|
|
292
|
+
getPageBuilderConfig.pageBuilderLogo &&
|
|
293
|
+
getPageBuilderConfig.pageBuilderLogo.src
|
|
271
294
|
"
|
|
272
295
|
class="pbx-flex pbx-items-center pbx-divide-x pbx-divide-gray-200"
|
|
273
296
|
>
|
|
274
297
|
<div id="pagebuilder-logo-main" class="pbx-pr-4">
|
|
275
|
-
<img class="pbx-h-6" :src="
|
|
298
|
+
<img class="pbx-h-6" :src="getPageBuilderConfig.pageBuilderLogo.src" alt="Logo" />
|
|
276
299
|
</div>
|
|
277
300
|
<span class="pbx-myPrimaryParagraph pbx-font-medium pbx-pl-4">Editing Page </span>
|
|
278
301
|
</div>
|
|
@@ -312,7 +335,7 @@ onMounted(async () => {
|
|
|
312
335
|
|
|
313
336
|
<DynamicModalBuilder
|
|
314
337
|
:showDynamicModalBuilder="showModalResumeEditing"
|
|
315
|
-
:isLoading="
|
|
338
|
+
:isLoading="getIsResumeEditing"
|
|
316
339
|
:type="typeModal"
|
|
317
340
|
:gridColumnAmount="gridColumnModalResumeEditing"
|
|
318
341
|
:title="titleModalResumeEditing"
|
|
@@ -327,11 +350,41 @@ onMounted(async () => {
|
|
|
327
350
|
<header></header>
|
|
328
351
|
<main></main>
|
|
329
352
|
</DynamicModalBuilder>
|
|
353
|
+
<DynamicModalBuilder
|
|
354
|
+
:showDynamicModalBuilder="showModalRestore"
|
|
355
|
+
:isLoading="getIsRestoring"
|
|
356
|
+
:type="typeModalRestore"
|
|
357
|
+
:gridColumnAmount="gridColumnModalRestore"
|
|
358
|
+
:title="titleModalRestore"
|
|
359
|
+
:description="descriptionModalRestore"
|
|
360
|
+
:firstButtonText="firstButtonRestore"
|
|
361
|
+
:secondButtonText="secondButtonRestore"
|
|
362
|
+
:thirdButtonText="thirdButtonRestore"
|
|
363
|
+
@firstModalButtonFunctionDynamicModalBuilder="firstModalButtonRestoreFunction"
|
|
364
|
+
@secondModalButtonFunctionDynamicModalBuilder="secondModalButtonRestoreFunction"
|
|
365
|
+
@thirdModalButtonFunctionDynamicModalBuilder="thirdModalButtonRestoreFunction"
|
|
366
|
+
>
|
|
367
|
+
<header></header>
|
|
368
|
+
<main></main>
|
|
369
|
+
</DynamicModalBuilder>
|
|
370
|
+
|
|
371
|
+
<ModalBuilder
|
|
372
|
+
title="The builder hasn’t started yet"
|
|
373
|
+
:showModalBuilder="openAppNotStartedModal"
|
|
374
|
+
@closeMainModalBuilder="handlAppNotStartedModal"
|
|
375
|
+
type="delete"
|
|
376
|
+
maxWidth="2xl"
|
|
377
|
+
:backgroundOpacity="true"
|
|
378
|
+
>
|
|
379
|
+
The builder hasn’t started yet. If this screen doesn’t go away soon, it may just need a little
|
|
380
|
+
setup in the background. You can safely contact support and ask them to initialize the builder
|
|
381
|
+
by running the start method.
|
|
382
|
+
</ModalBuilder>
|
|
330
383
|
|
|
331
384
|
<div>
|
|
332
385
|
<div class="pbx-relative pbx-h-full pbx-flex pbx-pb-2 pbx-gap-2">
|
|
333
386
|
<div
|
|
334
|
-
@click.self="
|
|
387
|
+
@click.self="pageBuilderService.clearHtmlSelection()"
|
|
335
388
|
id="pagebuilder-left-area"
|
|
336
389
|
class="pbx-min-w-[3.5rem] pbx-pt-6 pbx-pb-2 pbx-ml-2 pbx-bg-myPrimaryLightGrayColor pbx-rounded-full pbx-shadow-sm"
|
|
337
390
|
>
|
|
@@ -350,7 +403,7 @@ onMounted(async () => {
|
|
|
350
403
|
<span class="pbx-myMediumIcon material-symbols-outlined"> interests </span>
|
|
351
404
|
</button>
|
|
352
405
|
</div>
|
|
353
|
-
<div @click.self="
|
|
406
|
+
<div @click.self="pageBuilderService.clearHtmlSelection()">
|
|
354
407
|
<ComponentTopMenu v-if="getElement"></ComponentTopMenu>
|
|
355
408
|
</div>
|
|
356
409
|
</div>
|
|
@@ -364,15 +417,16 @@ onMounted(async () => {
|
|
|
364
417
|
class="pbx-flex pbx-items-center pbx-justify-between pbx-rounded-t-2xl pbx-bg-myPrimaryLightGrayColor pbx-min-w-[30rem]"
|
|
365
418
|
>
|
|
366
419
|
<div
|
|
367
|
-
@click.self="
|
|
420
|
+
@click.self="pageBuilderService.clearHtmlSelection()"
|
|
368
421
|
class="pbx-flex pbx-myPrimaryGap pbx-items-center pbx-pt-4 pbx-pb-2 pbx-pl-2 pbx-h-24 pbx-w-full pbx-min-w-36"
|
|
369
422
|
>
|
|
423
|
+
<!-- Save Start -->
|
|
370
424
|
<button
|
|
371
425
|
class="pbx-mySecondaryButton pbx-h-6 pbx-flex pbx-gap-2"
|
|
372
426
|
@click.stop="
|
|
373
427
|
async () => {
|
|
374
|
-
await
|
|
375
|
-
await
|
|
428
|
+
await pageBuilderService.clearHtmlSelection()
|
|
429
|
+
await pageBuilderService.handleManualSave()
|
|
376
430
|
}
|
|
377
431
|
"
|
|
378
432
|
type="button"
|
|
@@ -399,16 +453,60 @@ onMounted(async () => {
|
|
|
399
453
|
</div>
|
|
400
454
|
<div>Save</div>
|
|
401
455
|
</button>
|
|
402
|
-
|
|
403
|
-
|
|
456
|
+
<!-- Save End -->
|
|
457
|
+
|
|
458
|
+
<!-- Restore Start -->
|
|
459
|
+
<template
|
|
460
|
+
v-if="
|
|
461
|
+
getPageBuilderConfig &&
|
|
462
|
+
getPageBuilderConfig.updateOrCreate &&
|
|
463
|
+
getPageBuilderConfig.updateOrCreate.formType === 'update'
|
|
464
|
+
"
|
|
465
|
+
>
|
|
466
|
+
<button
|
|
467
|
+
class="pbx-mySecondaryButton pbx-h-6 pbx-flex pbx-gap-2"
|
|
468
|
+
@click.stop="
|
|
469
|
+
async () => {
|
|
470
|
+
await pageBuilderService.clearHtmlSelection()
|
|
471
|
+
await handleRestoreOriginalContent()
|
|
472
|
+
}
|
|
473
|
+
"
|
|
474
|
+
type="button"
|
|
475
|
+
:disabled="getIsRestoring"
|
|
476
|
+
>
|
|
477
|
+
<div
|
|
478
|
+
v-if="!getIsRestoring"
|
|
479
|
+
class="pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"
|
|
480
|
+
>
|
|
481
|
+
<span class="material-symbols-outlined"> settings_backup_restore </span>
|
|
482
|
+
</div>
|
|
483
|
+
<div
|
|
484
|
+
v-if="getIsRestoring"
|
|
485
|
+
class="pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"
|
|
486
|
+
>
|
|
487
|
+
<span class="pbx-relative pbx-flex pbx-size-3">
|
|
488
|
+
<span
|
|
489
|
+
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"
|
|
490
|
+
></span>
|
|
491
|
+
<span
|
|
492
|
+
class="pbx-relative pbx-inline-flex pbx-size-3 pbx-rounded-full pbx-bg-green-200"
|
|
493
|
+
></span>
|
|
494
|
+
</span>
|
|
495
|
+
</div>
|
|
496
|
+
<div>
|
|
497
|
+
<span class="lg:pbx-block pbx-hidden"> Restore </span>
|
|
498
|
+
</div>
|
|
499
|
+
</button>
|
|
500
|
+
</template>
|
|
501
|
+
<!-- Restore End -->
|
|
404
502
|
</div>
|
|
405
503
|
|
|
406
504
|
<div
|
|
407
|
-
@click.self="
|
|
505
|
+
@click.self="pageBuilderService.clearHtmlSelection()"
|
|
408
506
|
class="pbx-flex pbx-justify-end pbx-py-2 pbx-pr-2 pbx-h-24 pbx-w-full"
|
|
409
507
|
>
|
|
410
508
|
<div
|
|
411
|
-
@click.self="
|
|
509
|
+
@click.self="pageBuilderService.clearHtmlSelection()"
|
|
412
510
|
class="pbx-flex pbx-items-center pbx-justify-center pbx-gap-4"
|
|
413
511
|
>
|
|
414
512
|
<button
|
|
@@ -438,7 +536,7 @@ onMounted(async () => {
|
|
|
438
536
|
() => {
|
|
439
537
|
pageBuilderStateStore.setMenuRight(false)
|
|
440
538
|
pageBuilderStateStore.setElement(null)
|
|
441
|
-
|
|
539
|
+
pageBuilderService.clearHtmlSelection()
|
|
442
540
|
handlePageBuilderPreview()
|
|
443
541
|
}
|
|
444
542
|
"
|
|
@@ -458,11 +556,11 @@ onMounted(async () => {
|
|
|
458
556
|
</div>
|
|
459
557
|
|
|
460
558
|
<div
|
|
461
|
-
@click.self="
|
|
559
|
+
@click.self="pageBuilderService.clearHtmlSelection()"
|
|
462
560
|
class="pbx-flex pbx-justify-end pbx-py-2 pbx-pr-2 pbx-w-full pbx-h-24"
|
|
463
561
|
>
|
|
464
562
|
<div
|
|
465
|
-
@click.self="
|
|
563
|
+
@click.self="pageBuilderService.clearHtmlSelection()"
|
|
466
564
|
class="pbx-flex pbx-items-center pbx-justify-center pbx-gap-4"
|
|
467
565
|
>
|
|
468
566
|
<button
|
|
@@ -508,7 +606,7 @@ onMounted(async () => {
|
|
|
508
606
|
<!-- Add Component # start -->
|
|
509
607
|
|
|
510
608
|
<div
|
|
511
|
-
@click="
|
|
609
|
+
@click="pageBuilderService.clearHtmlSelection()"
|
|
512
610
|
id="pagebuilder-bottom-components-area"
|
|
513
611
|
class="pbx-pt-8 pbx-pb-12 pbx-text-center focus:pbx-outline-none focus:pbx-ring-2 focus:pbx-ring-indigo-500 focus:pbx-ring-offset-2 pbx-my-2 pbx-mx-4"
|
|
514
612
|
:class="{ 'pbx-border-t pbx-border-gray-200': getComponents.length > 0 }"
|