@myissue/vue-website-page-builder 3.4.17 → 3.4.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/vue-website-page-builder.js +3698 -3565
- package/dist/vue-website-page-builder.umd.cjs +60 -60
- package/package.json +1 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/BackgroundColorEditor.vue +1 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/EditGetElement.vue +304 -114
- package/src/Components/PageBuilder/EditorMenu/Editables/HTMLEditor.vue +16 -13
- package/src/Components/PageBuilder/EditorMenu/Editables/TextColorEditor.vue +1 -1
- package/src/PageBuilder/PageBuilder.vue +1 -1
- package/src/css/dev-global.css +17 -0
- package/src/css/style.css +6 -3
- package/src/services/PageBuilderService.ts +57 -22
- package/src/stores/page-builder-state.ts +9 -0
package/package.json
CHANGED
|
@@ -61,7 +61,7 @@ watch(
|
|
|
61
61
|
|
|
62
62
|
<ListboxButton
|
|
63
63
|
v-if="!globalPageLayout"
|
|
64
|
-
class="pbx-h-
|
|
64
|
+
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"
|
|
65
65
|
>
|
|
66
66
|
<div class="pbx-flex pbx-flex-col">
|
|
67
67
|
<div class="pbx-flex pbx-gap-2 pbx-items-center">
|
|
@@ -25,6 +25,9 @@ const elementTag = computed(() => {
|
|
|
25
25
|
return getElement.value?.tagName
|
|
26
26
|
})
|
|
27
27
|
|
|
28
|
+
const canMoveUp = computed(() => pageBuilderService.canMoveUp())
|
|
29
|
+
const canMoveDown = computed(() => pageBuilderService.canMoveDown())
|
|
30
|
+
|
|
28
31
|
const getShowModalTipTap = computed(() => {
|
|
29
32
|
const result = pageBuilderStateStore.getShowModalTipTap
|
|
30
33
|
|
|
@@ -39,36 +42,36 @@ const getComponent = computed(() => {
|
|
|
39
42
|
})
|
|
40
43
|
|
|
41
44
|
// hanlde Tip Tap modal
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
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)
|
|
49
52
|
// set dynamic modal handle functions
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
+
const firstModalButtonFunctionDynamicModalBuilderTipTap = ref(null)
|
|
54
|
+
const secondModalButtonFunctionDynamicModalBuilderTipTap = ref(null)
|
|
55
|
+
const thirdModalButtonFunctionDynamicModalBuilderTipTap = ref(null)
|
|
53
56
|
|
|
54
57
|
const handleModalPreviewTiptap = function () {
|
|
55
58
|
pageBuilderService.toggleTipTapModal(true)
|
|
56
59
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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'
|
|
64
67
|
|
|
65
68
|
// handle click
|
|
66
69
|
|
|
67
|
-
|
|
70
|
+
firstModalButtonFunctionDynamicModalBuilderTipTap.value = function () {
|
|
68
71
|
pageBuilderService.toggleTipTapModal(false)
|
|
69
72
|
}
|
|
70
73
|
|
|
71
|
-
|
|
74
|
+
thirdModalButtonFunctionDynamicModalBuilderTipTap.value = function () {
|
|
72
75
|
pageBuilderService.toggleTipTapModal(true)
|
|
73
76
|
}
|
|
74
77
|
}
|
|
@@ -146,20 +149,20 @@ const handleModalIframeSrc = function () {
|
|
|
146
149
|
// open modal to true
|
|
147
150
|
showModalIframeSrc.value = true
|
|
148
151
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
|
156
159
|
|
|
157
160
|
// handle click
|
|
158
|
-
|
|
161
|
+
firstModalButtonFunctionDynamicModalBuilderTipTap.value = function () {
|
|
159
162
|
showModalIframeSrc.value = false
|
|
160
163
|
}
|
|
161
164
|
// handle click
|
|
162
|
-
|
|
165
|
+
secondModalButtonFunctionDynamicModalBuilderTipTap.value = function () {
|
|
163
166
|
const isNotValidated = validateURL()
|
|
164
167
|
if (isNotValidated) {
|
|
165
168
|
return
|
|
@@ -188,22 +191,74 @@ const handleModalIframeSrc = function () {
|
|
|
188
191
|
showModalIframeSrc.value = false
|
|
189
192
|
}
|
|
190
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
|
+
}
|
|
191
240
|
</script>
|
|
192
241
|
<template v-if="getElement">
|
|
193
242
|
<div>
|
|
194
243
|
<DynamicModalBuilder
|
|
195
244
|
:showDynamicModalBuilder="showModalIframeSrc"
|
|
196
245
|
maxWidth="2xl"
|
|
197
|
-
:type="
|
|
198
|
-
:gridColumnAmount="
|
|
199
|
-
:title="
|
|
200
|
-
:description="
|
|
201
|
-
:firstButtonText="
|
|
202
|
-
:secondButtonText="
|
|
203
|
-
:thirdButtonText="
|
|
204
|
-
@
|
|
205
|
-
|
|
206
|
-
|
|
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
|
+
"
|
|
207
262
|
>
|
|
208
263
|
<header></header>
|
|
209
264
|
<main>
|
|
@@ -235,6 +290,30 @@ const handleModalIframeSrc = function () {
|
|
|
235
290
|
:simpleModal="true"
|
|
236
291
|
:showDynamicModalBuilder="getShowModalTipTap"
|
|
237
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"
|
|
238
317
|
:type="typeModal"
|
|
239
318
|
:gridColumnAmount="gridColumnModal"
|
|
240
319
|
:title="titleModal"
|
|
@@ -247,11 +326,8 @@ const handleModalIframeSrc = function () {
|
|
|
247
326
|
@thirdModalButtonFunctionDynamicModalBuilder="thirdModalButtonFunctionDynamicModalBuilder"
|
|
248
327
|
>
|
|
249
328
|
<header></header>
|
|
250
|
-
<main
|
|
251
|
-
<TipTapInput></TipTapInput>
|
|
252
|
-
</main>
|
|
329
|
+
<main></main>
|
|
253
330
|
</DynamicModalBuilder>
|
|
254
|
-
|
|
255
331
|
<MediaLibraryModal
|
|
256
332
|
:open="showMediaLibraryModal"
|
|
257
333
|
:title="titleMedia"
|
|
@@ -264,88 +340,202 @@ const handleModalIframeSrc = function () {
|
|
|
264
340
|
>
|
|
265
341
|
</MediaLibraryModal>
|
|
266
342
|
|
|
267
|
-
<
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
<
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
@click="handleModalIframeSrc"
|
|
276
|
-
type="button"
|
|
277
|
-
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-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
278
|
-
>
|
|
279
|
-
<span class="material-symbols-outlined"> play_circle </span>
|
|
280
|
-
</button>
|
|
281
|
-
</div>
|
|
282
|
-
</template>
|
|
283
|
-
|
|
284
|
-
<template
|
|
285
|
-
v-if="
|
|
286
|
-
pageBuilderService.isSelectedElementValidText() &&
|
|
287
|
-
!pageBuilderService.ElOrFirstChildIsIframe()
|
|
288
|
-
"
|
|
289
|
-
>
|
|
290
|
-
<div class="pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max">
|
|
291
|
-
<button
|
|
292
|
-
@click="handleModalPreviewTiptap"
|
|
293
|
-
type="button"
|
|
294
|
-
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-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
295
|
-
>
|
|
296
|
-
<span class="material-symbols-outlined"> edit </span>
|
|
297
|
-
</button>
|
|
298
|
-
</div>
|
|
299
|
-
<TextColorEditor></TextColorEditor>
|
|
300
|
-
</template>
|
|
301
|
-
|
|
302
|
-
<template
|
|
303
|
-
v-if="
|
|
304
|
-
getElement &&
|
|
305
|
-
getComponent &&
|
|
306
|
-
getBasePrimaryImage &&
|
|
307
|
-
!pageBuilderService.ElOrFirstChildIsIframe()
|
|
308
|
-
"
|
|
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 }"
|
|
309
351
|
>
|
|
310
|
-
<
|
|
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">
|
|
311
413
|
<button
|
|
312
|
-
@click="
|
|
414
|
+
@click="pageBuilderService.deleteElementFromDOM"
|
|
313
415
|
type="button"
|
|
314
|
-
class="pbx-h-
|
|
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"
|
|
315
417
|
>
|
|
316
|
-
<span class="material-symbols-outlined">
|
|
418
|
+
<span class="material-symbols-outlined"> delete </span>
|
|
317
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>
|
|
318
428
|
</div>
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
getElement &&
|
|
324
|
-
getElement.nodeType === 1 &&
|
|
325
|
-
!getBasePrimaryImage &&
|
|
326
|
-
!pageBuilderService.ElOrFirstChildIsIframe()
|
|
327
|
-
"
|
|
328
|
-
>
|
|
329
|
-
<BackgroundColorEditor></BackgroundColorEditor>
|
|
330
|
-
</template>
|
|
331
|
-
|
|
332
|
-
<template v-if="getElement">
|
|
333
|
-
<button
|
|
334
|
-
@click="pageBuilderService.deleteElementFromDOM"
|
|
335
|
-
type="button"
|
|
336
|
-
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-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"
|
|
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()"
|
|
337
433
|
>
|
|
338
|
-
<span class="material-symbols-outlined">
|
|
339
|
-
</
|
|
340
|
-
</
|
|
434
|
+
<span class="material-symbols-outlined"> close_small</span>
|
|
435
|
+
</div>
|
|
436
|
+
</div>
|
|
437
|
+
</div>
|
|
341
438
|
|
|
439
|
+
<transition name="popup-fade">
|
|
342
440
|
<div
|
|
343
|
-
v-if="
|
|
344
|
-
class="pbx-
|
|
345
|
-
@click="pageBuilderService.clearHtmlSelection()"
|
|
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"
|
|
346
443
|
>
|
|
347
|
-
<
|
|
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>
|
|
348
538
|
</div>
|
|
349
|
-
</
|
|
539
|
+
</transition>
|
|
350
540
|
</div>
|
|
351
541
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref, computed, nextTick } from 'vue'
|
|
2
|
+
import { ref, computed, watch, nextTick } from 'vue'
|
|
3
3
|
import { sharedPageBuilderStore } from '../../../../stores/shared-store'
|
|
4
4
|
import ModalBuilder from '../../../../Components/Modals/ModalBuilder.vue'
|
|
5
5
|
import EditorAccordion from '../EditorAccordion.vue'
|
|
@@ -18,6 +18,7 @@ const props = defineProps({
|
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
const getElement = computed(() => pageBuilderStateStore.getElement)
|
|
21
|
+
const getShowModalHTMLEditor = computed(() => pageBuilderStateStore.getShowModalHTMLEditor)
|
|
21
22
|
|
|
22
23
|
const elementHTML = computed(() => {
|
|
23
24
|
if (!getElement.value || !(getElement.value instanceof HTMLElement)) {
|
|
@@ -26,24 +27,26 @@ const elementHTML = computed(() => {
|
|
|
26
27
|
return getElement.value.outerHTML
|
|
27
28
|
})
|
|
28
29
|
|
|
29
|
-
const showModalHTMLEditor = ref(false)
|
|
30
|
-
|
|
31
30
|
const editableHtml = ref('')
|
|
32
31
|
const editableComponents = ref('')
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
watch(getShowModalHTMLEditor, async (newVal) => {
|
|
34
|
+
if (newVal) {
|
|
35
|
+
if (!props.globalPage) {
|
|
36
|
+
editableHtml.value = elementHTML.value
|
|
37
|
+
return
|
|
38
|
+
}
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
editableHtml.value = elementHTML.value
|
|
39
|
-
return
|
|
40
|
+
editableComponents.value = await pageBuilderService.generateHtmlFromComponents()
|
|
40
41
|
}
|
|
42
|
+
})
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
const handleShowHTMLEditor = async () => {
|
|
45
|
+
pageBuilderStateStore.setShowModalHTMLEditor(true)
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
const handleCloseHTMLEditor = () => {
|
|
46
|
-
|
|
49
|
+
pageBuilderStateStore.setShowModalHTMLEditor(false)
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
const isLoading = ref(false)
|
|
@@ -62,7 +65,7 @@ const handleSaveChangesElement = async () => {
|
|
|
62
65
|
return
|
|
63
66
|
}
|
|
64
67
|
|
|
65
|
-
|
|
68
|
+
pageBuilderStateStore.setShowModalHTMLEditor(false)
|
|
66
69
|
isLoading.value = false
|
|
67
70
|
}
|
|
68
71
|
|
|
@@ -80,7 +83,7 @@ const handleSaveChangesComponents = async () => {
|
|
|
80
83
|
return
|
|
81
84
|
}
|
|
82
85
|
|
|
83
|
-
|
|
86
|
+
pageBuilderStateStore.setShowModalHTMLEditor(false)
|
|
84
87
|
isLoading.value = false
|
|
85
88
|
}
|
|
86
89
|
</script>
|
|
@@ -101,7 +104,7 @@ const handleSaveChangesComponents = async () => {
|
|
|
101
104
|
</EditorAccordion>
|
|
102
105
|
<ModalBuilder
|
|
103
106
|
maxWidth="7xl"
|
|
104
|
-
:showModalBuilder="
|
|
107
|
+
:showModalBuilder="getShowModalHTMLEditor"
|
|
105
108
|
:title="translate('HTML Editor')"
|
|
106
109
|
@closeMainModalBuilder="handleCloseHTMLEditor"
|
|
107
110
|
>
|
|
@@ -63,7 +63,7 @@ watch(
|
|
|
63
63
|
|
|
64
64
|
<ListboxButton
|
|
65
65
|
v-if="!globalPageLayout"
|
|
66
|
-
class="pbx-h-
|
|
66
|
+
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"
|
|
67
67
|
>
|
|
68
68
|
<div class="pbx-flex pbx-flex-col">
|
|
69
69
|
<div class="pbx-flex pbx-gap-2 pbx-items-center">
|
|
@@ -869,7 +869,7 @@ onMounted(async () => {
|
|
|
869
869
|
>
|
|
870
870
|
<div
|
|
871
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 pbx-px-4 pbx-
|
|
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
873
|
>
|
|
874
874
|
<template v-if="getElement">
|
|
875
875
|
<EditGetElement></EditGetElement>
|
package/src/css/dev-global.css
CHANGED
|
@@ -5,3 +5,20 @@ These styles affect all HTML elements (like input, button, h1, etc.) in the cons
|
|
|
5
5
|
.mobile-preview-frame {
|
|
6
6
|
container-type: inline-size;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
/* popover start */
|
|
10
|
+
.popup-fade-enter-active,
|
|
11
|
+
.popup-fade-leave-active {
|
|
12
|
+
transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
|
|
13
|
+
}
|
|
14
|
+
.popup-fade-enter-from,
|
|
15
|
+
.popup-fade-leave-to {
|
|
16
|
+
transform: scale(0.95);
|
|
17
|
+
opacity: 0;
|
|
18
|
+
}
|
|
19
|
+
.popup-fade-enter-to,
|
|
20
|
+
.popup-fade-leave-from {
|
|
21
|
+
transform: scale(1);
|
|
22
|
+
opacity: 1;
|
|
23
|
+
}
|
|
24
|
+
/* popover end */
|
package/src/css/style.css
CHANGED
|
@@ -367,9 +367,12 @@
|
|
|
367
367
|
min-width: 4rem;
|
|
368
368
|
padding-right: 1rem;
|
|
369
369
|
padding-left: 1rem;
|
|
370
|
-
height:
|
|
371
|
-
|
|
372
|
-
|
|
370
|
+
height: 1.5rem;
|
|
371
|
+
background: #fff; /* white background */
|
|
372
|
+
/* white outline first, then black border simulated as shadow */
|
|
373
|
+
box-shadow:
|
|
374
|
+
0 0 0 10px #fff,
|
|
375
|
+
/* white outline */ 0 0 0 12px #000; /* black border outside */
|
|
373
376
|
}
|
|
374
377
|
|
|
375
378
|
/* CSS for content inside page builder # start */
|