@myissue/vue-website-page-builder 3.3.84 → 3.3.86

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myissue/vue-website-page-builder",
3
- "version": "3.3.84",
3
+ "version": "3.3.86",
4
4
  "description": "Vue 3 page builder component with drag & drop functionality.",
5
5
  "type": "module",
6
6
  "main": "./dist/vue-website-page-builder.umd.cjs",
@@ -49,20 +49,5 @@ const firstButtonBuilder = function () {
49
49
  </div>
50
50
  </div>
51
51
  </div>
52
- <div
53
- class="pbx-border-0 pbx-py-4 pbx-flex sm:pbx-justify-end pbx-justify-center pbx-border-solid pbx-border-t pbx-border-gray-200 pbx-mt-4"
54
- >
55
- <div class="sm:pbx-w-3/6 pbx-w-full pbx-px-2 pbx-my-2 pbx-flex pbx-gap-2 pbx-justify-end">
56
- <button
57
- v-if="firstButtonText"
58
- ref="firstButtonRef"
59
- class="pbx-mySecondaryButton"
60
- type="button"
61
- @click="firstButtonBuilder"
62
- >
63
- {{ firstButtonText }}
64
- </button>
65
- </div>
66
- </div>
67
52
  </ModalBuilder>
68
53
  </template>
@@ -72,7 +72,7 @@ const maxWidthClass = computed(() => {
72
72
  ></div>
73
73
 
74
74
  <div
75
- class="pbx-relative pbx-inline-block pbx-bg-white pbx-rounded-xl pbx-text-left pbx-overflow-hidden pbx-shadow-xl pbx-transform pbx-transition-all pbx-max-w-[96vh] lg:pbx-max-h-[98vh] pbx-max-h-[85vh] pbx-overflow-y-auto pbx-w-full"
75
+ class="pbx-relative pbx-inline-block pbx-bg-white pbx-rounded-xl pbx-text-left pbx-overflow-hidden pbx-shadow-xl pbx-transform pbx-transition-all pbx-max-w-[96vh] lg:pbx-max-h-[98vh] pbx-max-h-[85vh] pbx-min-h-[85vh] pbx-h-[85vh] pbx-overflow-y-scroll pbx-w-full"
76
76
  :class="[
77
77
  maxWidthClass ? maxWidthClass : '',
78
78
  minHeight ? minHeight : '',
@@ -301,7 +301,7 @@ const getRestoredElement = computed(() => {
301
301
  v-if="
302
302
  getElement &&
303
303
  getComponent &&
304
- getBasePrimaryImage !== null &&
304
+ getBasePrimaryImage &&
305
305
  !pageBuilderService.ElOrFirstChildIsIframe()
306
306
  "
307
307
  >
@@ -8,27 +8,18 @@ const pageBuilderService = getPageBuilder()
8
8
 
9
9
  <template>
10
10
  <div>
11
- <div class="pbx-blockease-linear pbx-duration-200 pbx-block pbx-ease-linear">
12
- <template v-if="pageBuilderService.isSelectedElementValidText()">
13
- <hr />
14
- <div class="pbx-flex pbx-items-center pbx-justify-start pbx-mb-6 pbx-pt-4">
15
- <div
16
- class="pbx-pr-2 pbx-pl-1 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"
17
- >
18
- <div
19
- @click="pageBuilderService.toggleTipTapModal(true)"
20
- class="pbx-myPrimaryParagraph pbx-cursor-pointer pbx-textsm pbx-flex pbx-items-center pbx-gap-2"
21
- >
22
- <div
23
- 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 hover:pbx-text-white focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"
24
- >
25
- <span class="material-symbols-outlined"> edit </span>
26
- </div>
27
- <span class="pbx-text-xs">{{ translate('Edit text and links') }}</span>
28
- </div>
29
- </div>
11
+ <template v-if="pageBuilderService.isSelectedElementValidText()">
12
+ <div class="pbx-flex pbx-flex-col pbx-border-solid pbx-border pbx-border-gray-400">
13
+ <div
14
+ @click="pageBuilderService.toggleTipTapModal(true)"
15
+ class="pbx-flex pbx-flex-row pbx-justify-between pbx-items-center pbx-pl-3 pbx-pr-3 pbx-py-5 pbx-cursor-pointer pbx-duration-200 hover:pbx-bg-myPrimaryLightGrayColor"
16
+ >
17
+ <p class="pbx-myPrimaryParagraph pbx-font-medium pbx-my-0 pbx-py-0">
18
+ {{ translate('Text') }}
19
+ </p>
20
+ <span class="material-symbols-outlined"> chevron_right </span>
30
21
  </div>
31
- </template>
32
- </div>
22
+ </div>
23
+ </template>
33
24
  </div>
34
25
  </template>
@@ -61,8 +61,8 @@ const emit = defineEmits(['handleClosePageBuilder', 'handlePublishPageBuilder'])
61
61
  const closePageBuilder = function () {
62
62
  emit('handleClosePageBuilder')
63
63
  }
64
- const closePublish = function () {
65
- pageBuilderService.handleManualSave()
64
+ const closePublish = async function () {
65
+ await pageBuilderService.handleManualSave()
66
66
  emit('handlePublishPageBuilder')
67
67
  }
68
68
 
@@ -93,10 +93,6 @@ watch(languageSelction, async (newVal) => {
93
93
  }
94
94
  })
95
95
 
96
- const getCurrentLanguage = computed(() => {
97
- return pageBuilderStateStore.getCurrentLanguage
98
- })
99
-
100
96
  const getBuilderStarted = computed(() => {
101
97
  return pageBuilderStateStore.getBuilderStarted
102
98
  })
@@ -434,7 +430,7 @@ onMounted(async () => {
434
430
 
435
431
  <template>
436
432
  <div
437
- class="pbx-flex pbx-flex-col pbx-font-sans pbx-text-black pbx-max-w-full 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"
433
+ 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"
438
434
  >
439
435
  <GlobalLoader
440
436
  v-if="(getIsLoadingGlobal && !openAppNotStartedModal) || isLoadingLang"
@@ -516,7 +512,7 @@ onMounted(async () => {
516
512
 
517
513
  <div
518
514
  id="pagebuilder-navbar"
519
- class="pbx-w-full 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 lg:pbx-px-6 pbx-px-4 pbx-font-sans pbx-min-h-20"
515
+ class="lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-min-w-[96rem] pbx-max-w-[96rem] pbx-w-[96rem] 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 lg:pbx-px-6 pbx-px-4 pbx-font-sans pbx-min-h-20"
520
516
  >
521
517
  <template
522
518
  v-if="
@@ -532,7 +528,7 @@ onMounted(async () => {
532
528
  await pageBuilderService.clearHtmlSelection()
533
529
  }
534
530
  "
535
- class="xl:pbx-flex pbx-hidden pbx-justify-start pbx-py-2"
531
+ class="pbx-flex pbx-justify-start pbx-py-2"
536
532
  >
537
533
  <img class="pbx-h-6" :src="getPageBuilderConfig.pageBuilderLogo.src" alt="Logo" />
538
534
  </div>
@@ -704,7 +700,7 @@ onMounted(async () => {
704
700
  >
705
701
  <div class="pbx-flex pbx-items-center pbx-justify-center pbx-gap-2">
706
702
  <span
707
- 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 hover:pbx-text-white focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"
703
+ 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"
708
704
  >
709
705
  <span class="material-symbols-outlined"> phone_iphone </span>
710
706
  </span>
@@ -783,14 +779,15 @@ onMounted(async () => {
783
779
  getPageBuilderConfig.userSettings.language.enable.length >= 1
784
780
  "
785
781
  >
786
- <div
782
+ <option
787
783
  v-for="lang in pageBuilderService
788
784
  .availableLanguage()
789
785
  .filter((l) => getPageBuilderConfig.userSettings.language.enable.includes(l))"
790
786
  :key="lang"
787
+ :value="lang"
791
788
  >
792
- <option :value="lang">{{ lang }}</option>
793
- </div>
789
+ {{ lang }}
790
+ </option>
794
791
  </template>
795
792
  <template
796
793
  v-if="
@@ -799,9 +796,13 @@ onMounted(async () => {
799
796
  getPageBuilderConfig.userSettings.language.enable.length === 0)
800
797
  "
801
798
  >
802
- <div v-for="lang in pageBuilderService.availableLanguage()" :key="lang">
803
- <option :value="lang">{{ lang }}</option>
804
- </div>
799
+ <option
800
+ v-for="lang in pageBuilderService.availableLanguage()"
801
+ :key="lang"
802
+ :value="lang"
803
+ >
804
+ {{ lang }}
805
+ </option>
805
806
  </template>
806
807
  </select>
807
808
  </div>
@@ -824,10 +825,14 @@ onMounted(async () => {
824
825
  </template>
825
826
  </div>
826
827
  </div>
827
-
828
828
  <!-- Top Layout Save And Reset Area - End -->
829
- <div id="pagebuilder-main" class="pbx-relative pbx-h-full pbx-flex pbx-pb-2 pbx-gap-2">
830
- <!-- Left menu -->
829
+
830
+ <!-- Page Builder Main Start -->
831
+ <div
832
+ id="pagebuilder-main"
833
+ class="lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-min-w-[96rem] pbx-max-w-[96rem] pbx-w-[96rem] pbx-flex-1 pbx-relative pbx-h-full pbx-flex pbx-pb-2 pbx-gap-2"
834
+ >
835
+ <!-- Left Menu Start -->
831
836
  <div
832
837
  @click.self="
833
838
  async () => {
@@ -835,7 +840,7 @@ onMounted(async () => {
835
840
  }
836
841
  "
837
842
  id="pagebuilder-left-menu"
838
- class="pbx-w-14 pbx-pt-7 pbx-pb-2 pbx-bg-myPrimaryLightGrayColor pbx-rounded-r-2xl pbx-shadow-sm"
843
+ class="pbx-w-16 pbx-pt-7 pbx-pb-2 pbx-bg-myPrimaryLightGrayColor pbx-rounded-r-2xl pbx-shadow-sm"
839
844
  >
840
845
  <div class="pbx-mx-2 pbx-flex pbx-flex-col pbx-myPrimaryGap pbx-items-stretch">
841
846
  <div class="pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center">
@@ -847,7 +852,7 @@ onMounted(async () => {
847
852
  handleAddComponent()
848
853
  }
849
854
  "
850
- 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 hover:pbx-text-white focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"
855
+ 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"
851
856
  >
852
857
  <span class="pbx-myMediumIcon material-symbols-outlined"> interests </span>
853
858
  </button>
@@ -863,11 +868,12 @@ onMounted(async () => {
863
868
  </div>
864
869
  </div>
865
870
  </div>
871
+ <!-- Left Menu End -->
866
872
 
867
873
  <main
868
874
  ref="pbxToolBar"
869
- class="pbx-w-full 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]"
870
- :class="{ '': !getMenuRight, '': getMenuRight }"
875
+ 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]"
876
+ :class="[getMenuRight ? 'pbx-w-full' : 'pbx-w-full']"
871
877
  >
872
878
  <div
873
879
  id="pbxEditToolbar"
@@ -908,11 +914,12 @@ onMounted(async () => {
908
914
  v-if="getMenuRight"
909
915
  aria-label="menu"
910
916
  id="pagebuilder-right-menu"
911
- :class="{
912
- 'pbx-w-0 pbx-mr-0': !getMenuRight,
913
- 'pbx-w-80 pbx-bg-myPrimaryLightGrayColor pbx-items-stretch': getMenuRight,
914
- }"
915
917
  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"
918
+ :class="[
919
+ getMenuRight
920
+ ? 'pbx-w-80 pbx-bg-myPrimaryLightGrayColor pbx-items-stretch'
921
+ : 'bpx-w-0 pbx-mr-0',
922
+ ]"
916
923
  >
917
924
  <RightSidebarEditor @closeEditor="pageBuilderStateStore.setMenuRight(false)">
918
925
  </RightSidebarEditor>
@@ -924,7 +931,7 @@ onMounted(async () => {
924
931
  await pageBuilderService.clearHtmlSelection()
925
932
  }
926
933
  "
927
- class="pbx-w-[10vh] 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"
934
+ class="pbx-w-16 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"
928
935
  >
929
936
  <div
930
937
  @click.self="
@@ -946,9 +953,12 @@ onMounted(async () => {
946
953
  </div>
947
954
  </transition>
948
955
  </div>
956
+ <!-- Page Builder Main End -->
957
+
958
+ <!-- Footer Start -->
949
959
  <div
950
960
  id="pagebuilder-footer"
951
- class="pbx-w-full pbx-flex pbx-items-center pbx-justify-center pbx-p-4 pbx-border-0 pbx-border-t pbx-border-t-gray-200 pbx-border-solid pbx-bg-myPrimaryLightGrayColor"
961
+ class="lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-min-w-[96rem] pbx-max-w-[96rem] pbx-w-[96rem] pbx-flex-1 pbx-flex pbx-items-center pbx-justify-center pbx-p-4 pbx-border-0 pbx-border-t pbx-border-t-gray-200 pbx-border-solid pbx-bg-myPrimaryLightGrayColor"
952
962
  >
953
963
  <div
954
964
  @click="
@@ -965,13 +975,14 @@ onMounted(async () => {
965
975
  <div class="pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center">
966
976
  <button
967
977
  type="button"
968
- 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 hover:pbx-text-white focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"
978
+ 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"
969
979
  >
970
980
  <span class="pbx-myMediumIcon material-symbols-outlined"> interests </span>
971
981
  </button>
972
982
  </div>
973
983
  </div>
974
984
  </div>
985
+ <!-- Footer End -->
975
986
  </div>
976
987
  </template>
977
988
 
@@ -895,9 +895,11 @@ export class PageBuilderService {
895
895
  public handleManualSave = async () => {
896
896
  this.startEditing()
897
897
  this.pageBuilderStateStore.setIsSaving(true)
898
+ this.pageBuilderStateStore.setIsLoadingGlobal(true)
898
899
  this.saveDomComponentsToLocalStorage()
899
- await delay(400)
900
+ await delay(300)
900
901
  this.pageBuilderStateStore.setIsSaving(false)
902
+ this.pageBuilderStateStore.setIsLoadingGlobal(false)
901
903
  }
902
904
 
903
905
  public cloneCompObjForDOMInsertion(componentObject: ComponentObject): ComponentObject {
@@ -2475,7 +2477,7 @@ export class PageBuilderService {
2475
2477
  // Wait for Vue to finish DOM updates before attaching event listeners.
2476
2478
  // This ensures elements exist in the DOM.
2477
2479
  await nextTick()
2478
-
2480
+ this.setBasePrimaryImageFromSelectedElement()
2479
2481
  this.handleHyperlink(undefined, null, false)
2480
2482
  this.handleOpacity(undefined)
2481
2483
  this.handleBackgroundOpacity(undefined)
@@ -20,6 +20,8 @@ defineProps({
20
20
  },
21
21
  })
22
22
 
23
+ const isLoading = ref(false)
24
+
23
25
  const selectedCategory = ref('All')
24
26
 
25
27
  const categories = computed(() => {
@@ -39,6 +41,7 @@ const { closeAddComponentModal } = usePageBuilderModal()
39
41
 
40
42
  // Super simple component addition with professional modal closing!
41
43
  const handleDropComponent = async function (componentObject: ComponentObject) {
44
+ isLoading.value = true
42
45
  // Translate all occurrences of the hardcoded strings in the html_code
43
46
  const translatedHtmlCode = componentObject.html_code
44
47
  .replace(/Layouts and visual\./g, translate('Layouts and visual.'))
@@ -56,6 +59,7 @@ const handleDropComponent = async function (componentObject: ComponentObject) {
56
59
 
57
60
  await pageBuilderService.addComponent(translatedComponentObject)
58
61
  closeAddComponentModal()
62
+ isLoading.value = false
59
63
  }
60
64
 
61
65
  // Helper function to convert ComponentData to ComponentObject
@@ -91,7 +95,7 @@ const getSvgPreview = (title: string) => {
91
95
  </style>
92
96
 
93
97
  <template>
94
- <div>
98
+ <div v-if="!isLoading">
95
99
  <!-- Helper Components Section -->
96
100
  <div class="pbx-mb-8">
97
101
  <h3 class="pbx-myQuaternaryHeader pbx-mb-4">{{ translate('Helper Components') }}</h3>
@@ -159,5 +163,20 @@ const getSvgPreview = (title: string) => {
159
163
  </div>
160
164
  </div>
161
165
  </div>
166
+ <div>
167
+ <button class="pbx-sr-only">Focusable fallback</button>
168
+ </div>
162
169
  </div>
170
+ <template v-if="isLoading">
171
+ <div class="pbx-flex pbx-items-center pbx-justify-center">
172
+ <div
173
+ class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
174
+ >
175
+ <span
176
+ class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
177
+ >{{ translate('Loading...') }}</span
178
+ >
179
+ </div>
180
+ </div>
181
+ </template>
163
182
  </template>