@myissue/vue-website-page-builder 3.3.15 → 3.3.18

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": "v3.3.15",
3
+ "version": "3.3.18",
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",
@@ -594,9 +594,9 @@ const handleDownloadHTML = function () {
594
594
  <div class="pbx-flex pbx-items-left pbx-flex-col pbx-gap-1">
595
595
  <h3 class="pbx-myQuaternaryHeader">Complete Configuration Overview</h3>
596
596
  <p class="pbx-myPrimaryParagraph pbx-text-xs">
597
- omplete configuration object currently used by the Page Builder. It includes information
598
- about the user, form behavior, branding settings, and other context-specific data needed
599
- for rendering and managing the builder environment.
597
+ Complete configuration object currently used by the Page Builder. Includes user
598
+ information, branding settings, and other context-specific data needed for rendering and
599
+ managing the builder environment.
600
600
  </p>
601
601
  </div>
602
602
 
@@ -663,7 +663,7 @@ onMounted(async () => {
663
663
  </aside>
664
664
  </div>
665
665
  <div
666
- class="pbx-flex pbx-items-center pbx-justify-center pbx-border-t pbx-border-gray-200 pbx-cursor-pointer pbx-py-4"
666
+ class="pbx-flex pbx-items-center pbx-justify-center pbx-border-t pbx-border-gray-200 pbx-py-4"
667
667
  >
668
668
  <div
669
669
  @click="
@@ -672,7 +672,7 @@ onMounted(async () => {
672
672
  handleAddComponent()
673
673
  }
674
674
  "
675
- class="pbx-flex pbx-items-center pbx-justify-center pbx-gap-2"
675
+ class="pbx-flex pbx-items-center pbx-justify-center pbx-gap-2 pbx-cursor-pointer"
676
676
  >
677
677
  <span class="lg:pbx-block pbx-hidden">
678
678
  <div class="pbx-whitespace-nowrap">Add to the bottom</div>
@@ -703,14 +703,6 @@ export class PageBuilderService {
703
703
  behavior: 'smooth',
704
704
  })
705
705
  }
706
-
707
- // push to bottom
708
- if (this.getComponentArrayAddMethod.value === 'push') {
709
- pageBuilder.scrollTo({
710
- top: pageBuilder.scrollHeight + 400,
711
- behavior: 'smooth',
712
- })
713
- }
714
706
  }
715
707
 
716
708
  // Create a DOMParser instance
@@ -1870,9 +1862,23 @@ export class PageBuilderService {
1870
1862
 
1871
1863
  this.pageBuilderStateStore.setPushComponents({
1872
1864
  component: clonedComponent,
1873
- componentArrayAddMethod: this.getComponentArrayAddMethod.value || 'push',
1865
+ componentArrayAddMethod: this.getComponentArrayAddMethod.value
1866
+ ? this.getComponentArrayAddMethod.value
1867
+ : 'push',
1874
1868
  })
1875
1869
 
1870
+ const pageBuilder = document.querySelector('#contains-pagebuilder')
1871
+ // scoll to top or bottom # end
1872
+ if (pageBuilder) {
1873
+ // push to bottom
1874
+ if (this.getComponentArrayAddMethod.value === 'push') {
1875
+ pageBuilder.scrollTo({
1876
+ top: pageBuilder.scrollHeight + 50,
1877
+ behavior: 'smooth',
1878
+ })
1879
+ }
1880
+ }
1881
+
1876
1882
  // Wait for Vue to finish DOM updates before attaching event listeners. This ensure elements exist in the DOM.
1877
1883
  await nextTick()
1878
1884
  // Attach event listeners to all editable elements in the Builder