@myissue/vue-website-page-builder 3.3.89 → 3.3.91

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.89",
3
+ "version": "3.3.91",
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",
@@ -12,7 +12,7 @@ const pageBuilderService = getPageBuilder()
12
12
  <div class="pbx-flex pbx-flex-col pbx-border-solid pbx-border pbx-border-gray-400">
13
13
  <div
14
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"
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 pbx-bg-white"
16
16
  >
17
17
  <p class="pbx-myPrimaryParagraph pbx-font-medium pbx-my-0 pbx-py-0">
18
18
  {{ translate('Text') }}
@@ -62,7 +62,9 @@ const closePageBuilder = function () {
62
62
  emit('handleClosePageBuilder')
63
63
  }
64
64
  const closePublish = async function () {
65
+ pageBuilderStateStore.setIsLoadingGlobal(true)
65
66
  await pageBuilderService.handleManualSave()
67
+ pageBuilderStateStore.setIsLoadingGlobal(false)
66
68
  emit('handlePublishPageBuilder')
67
69
  }
68
70
 
@@ -512,7 +514,7 @@ onMounted(async () => {
512
514
 
513
515
  <div
514
516
  id="pagebuilder-navbar"
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"
517
+ 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"
516
518
  >
517
519
  <template
518
520
  v-if="
@@ -528,7 +530,7 @@ onMounted(async () => {
528
530
  await pageBuilderService.clearHtmlSelection()
529
531
  }
530
532
  "
531
- class="pbx-flex pbx-justify-start pbx-py-2"
533
+ class="pbx-flex pbx-justify-start pbx-py-2 lg:pbx-ml-4 pbx-ml-2"
532
534
  >
533
535
  <img class="pbx-h-6" :src="getPageBuilderConfig.pageBuilderLogo.src" alt="Logo" />
534
536
  </div>
@@ -733,7 +735,6 @@ onMounted(async () => {
733
735
  @click="
734
736
  async () => {
735
737
  closePublish()
736
- await pageBuilderService.clearHtmlSelection()
737
738
  }
738
739
  "
739
740
  >
@@ -741,15 +742,6 @@ onMounted(async () => {
741
742
  </button>
742
743
  </div>
743
744
  </template>
744
- <template
745
- v-if="
746
- getPageBuilderConfig &&
747
- getPageBuilderConfig.userSettings &&
748
- getPageBuilderConfig.userSettings.language
749
- "
750
- >
751
- </template>
752
-
753
745
  <!-- Publish buttons end -->
754
746
 
755
747
  <template
@@ -767,7 +759,9 @@ onMounted(async () => {
767
759
  getPageBuilderConfig.userSettings.language
768
760
  "
769
761
  >
770
- <div class="pbx-flex-1 pbx-flex pbx-justify-end pbx-items-center pbx-ml-2">
762
+ <div
763
+ class="pbx-flex-1 pbx-flex pbx-justify-end pbx-items-center pbx-ml-2 lg:pbx-mr-4 pbx-mr-2"
764
+ >
771
765
  <select
772
766
  id="pbx-lang"
773
767
  class="pbx-myPrimarySelect pbx-min-w-20 pbx-max-w-2pbx-min-w-20 pbx-w-max"
@@ -830,7 +824,7 @@ onMounted(async () => {
830
824
  <!-- Page Builder Main Start -->
831
825
  <div
832
826
  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"
827
+ 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"
834
828
  >
835
829
  <!-- Left Menu Start -->
836
830
  <div
@@ -958,7 +952,7 @@ onMounted(async () => {
958
952
  <!-- Footer Start -->
959
953
  <div
960
954
  id="pagebuilder-footer"
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"
955
+ 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"
962
956
  >
963
957
  <div
964
958
  @click="
@@ -1,17 +1,42 @@
1
- // builderInstance.ts
1
+ /**
2
+ * @file This file manages the singleton instance of the PageBuilderService.
3
+ * This pattern ensures that there is only one instance of the service throughout the application,
4
+ * providing a single source of truth for the page builder's state and logic.
5
+ * @author Qais Wardag
6
+ */
7
+
2
8
  import { PageBuilderService } from '../services/PageBuilderService'
3
9
 
4
- // Singleton instance
10
+ /**
11
+ * The singleton instance of the PageBuilderService.
12
+ * It is initialized to null and will be set by the `setBuilderInstance` function.
13
+ * @type {PageBuilderService | null}
14
+ */
5
15
  let instance: PageBuilderService | null = null
6
16
 
7
- // Used by the plugin to set the instance
17
+ /**
18
+ * Sets the singleton instance of the PageBuilderService.
19
+ * This function is called by the Vue plugin to initialize the service.
20
+ * It ensures that the instance is only set once.
21
+ *
22
+ * @param {PageBuilderService} newInstance - The new instance of the PageBuilderService to set.
23
+ * @returns {void}
24
+ */
8
25
  export function setBuilderInstance(newInstance: PageBuilderService): void {
9
26
  if (!instance) {
10
27
  instance = newInstance
11
28
  }
12
29
  }
13
30
 
14
- // Used to access the existing instance anywhere else
31
+ /**
32
+ * Retrieves the singleton instance of the PageBuilderService.
33
+ * This function is used throughout the application to access the service.
34
+ * It throws an error if the service has not been initialized, ensuring that
35
+ * the plugin has been correctly installed.
36
+ *
37
+ * @throws {Error} If the PageBuilderService has not been initialized.
38
+ * @returns {PageBuilderService} The singleton instance of the PageBuilderService.
39
+ */
15
40
  export function getPageBuilder(): PageBuilderService {
16
41
  if (!instance) {
17
42
  throw new Error(
@@ -19,4 +44,4 @@ export function getPageBuilder(): PageBuilderService {
19
44
  )
20
45
  }
21
46
  return instance
22
- }
47
+ }