@myissue/vue-website-page-builder 3.3.71 → 3.3.72
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 +4 -6
- package/dist/{vue-website-page-builder.css → style.css} +1 -1
- package/dist/vue-website-page-builder.js +6703 -6674
- package/dist/vue-website-page-builder.umd.cjs +48 -47
- package/package.json +2 -3
- package/src/Components/PageBuilder/EditorMenu/Editables/Borders.vue +1 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageBackgroundOpacity.vue +1 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageOpacity.vue +1 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/StyleEditor.vue +1 -1
- package/src/PageBuilder/PageBuilder.vue +1 -1
- package/src/composables/builderInstance.ts +4 -7
- package/src/css/{app.css → style.css} +15 -0
- package/src/index.ts +5 -2
- package/src/main.ts +3 -4
- package/src/plugin.ts +16 -0
- package/src/services/PageBuilderService.ts +4 -27
- package/src/tests/PageBuilderTest.vue +1 -0
- package/src/utils/builder/html-doc-declaration-with-components.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myissue/vue-website-page-builder",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.72",
|
|
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",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"import": "./dist/vue-website-page-builder.js",
|
|
19
19
|
"require": "./dist/vue-website-page-builder.umd.cjs"
|
|
20
20
|
},
|
|
21
|
-
"./style.css": "./dist/
|
|
21
|
+
"./style.css": "./dist/style.css"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|
|
24
24
|
"vue",
|
|
@@ -79,7 +79,6 @@
|
|
|
79
79
|
"pinia": "^2.1.7",
|
|
80
80
|
"uuid": "^9.0.0",
|
|
81
81
|
"vue": "^3.5.13",
|
|
82
|
-
"vue-i18n": "^11.1.9",
|
|
83
82
|
"vue-website-page-builder": "file:"
|
|
84
83
|
},
|
|
85
84
|
"devDependencies": {
|
|
@@ -121,7 +121,7 @@ watch(
|
|
|
121
121
|
leave-to-class="pbx-opacity-0"
|
|
122
122
|
>
|
|
123
123
|
<ListboxOptions
|
|
124
|
-
class="pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-py-1 pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm"
|
|
124
|
+
class="pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-py-1 pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm list-none p-0 m-0"
|
|
125
125
|
>
|
|
126
126
|
<ListboxOption
|
|
127
127
|
as="template"
|
|
@@ -67,7 +67,7 @@ watch(
|
|
|
67
67
|
leave-to-class="pbx-opacity-0"
|
|
68
68
|
>
|
|
69
69
|
<ListboxOptions
|
|
70
|
-
class="pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-py-1 pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm"
|
|
70
|
+
class="pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-py-1 pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm list-none p-0 m-0"
|
|
71
71
|
>
|
|
72
72
|
<ListboxOption
|
|
73
73
|
as="template"
|
|
@@ -66,7 +66,7 @@ watch(
|
|
|
66
66
|
leave-to-class="pbx-opacity-0"
|
|
67
67
|
>
|
|
68
68
|
<ListboxOptions
|
|
69
|
-
class="pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-py-1 pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm"
|
|
69
|
+
class="pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-py-1 pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm list-none p-0 m-0"
|
|
70
70
|
>
|
|
71
71
|
<ListboxOption
|
|
72
72
|
as="template"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref, computed, watch
|
|
2
|
+
import { ref, computed, watch } from 'vue'
|
|
3
3
|
import { sharedPageBuilderStore } from '../../../../stores/shared-store'
|
|
4
4
|
import EditorAccordion from '../EditorAccordion.vue'
|
|
5
5
|
import { getPageBuilder } from '../../../../composables/builderInstance'
|
|
@@ -773,7 +773,7 @@ onMounted(async () => {
|
|
|
773
773
|
|
|
774
774
|
<main
|
|
775
775
|
ref="pbxToolBar"
|
|
776
|
-
class="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-h-[100vh]"
|
|
776
|
+
class="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-h-[100vh] pbx-text-black"
|
|
777
777
|
:class="{ 'pbx-mr-2': !getMenuRight, '': getMenuRight }"
|
|
778
778
|
>
|
|
779
779
|
<div
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
// builderInstance.ts
|
|
2
2
|
import { PageBuilderService } from '../services/PageBuilderService'
|
|
3
|
-
import { sharedPageBuilderStore } from '../stores/shared-store'
|
|
4
3
|
|
|
5
4
|
// Singleton instance
|
|
6
5
|
let instance: PageBuilderService | null = null
|
|
7
6
|
|
|
8
|
-
// Used
|
|
9
|
-
export function
|
|
7
|
+
// Used by the plugin to set the instance
|
|
8
|
+
export function setBuilderInstance(newInstance: PageBuilderService): void {
|
|
10
9
|
if (!instance) {
|
|
11
|
-
|
|
12
|
-
instance = new PageBuilderService(pageBuilderStateStore)
|
|
10
|
+
instance = newInstance
|
|
13
11
|
}
|
|
14
|
-
return instance
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
// Used to access the existing instance anywhere else
|
|
18
15
|
export function getPageBuilder(): PageBuilderService {
|
|
19
16
|
if (!instance) {
|
|
20
17
|
throw new Error(
|
|
21
|
-
'
|
|
18
|
+
'PageBuilder has not been initialized. Please call app.use(pageBuilder) in your main application file.',
|
|
22
19
|
)
|
|
23
20
|
}
|
|
24
21
|
return instance
|
|
@@ -495,3 +495,18 @@
|
|
|
495
495
|
outline: 4px dashed #b91010 !important;
|
|
496
496
|
outline-offset: -2px !important;
|
|
497
497
|
}
|
|
498
|
+
|
|
499
|
+
.pbx-myPrimarySelect {
|
|
500
|
+
appearance: none;
|
|
501
|
+
-webkit-appearance: none;
|
|
502
|
+
-moz-appearance: none;
|
|
503
|
+
background-color: #fff;
|
|
504
|
+
border: 1px solid #c4c4c4;
|
|
505
|
+
border-radius: 6px;
|
|
506
|
+
padding: 10px 40px 10px 15px;
|
|
507
|
+
cursor: pointer;
|
|
508
|
+
outline: none;
|
|
509
|
+
transition: border-color 0.3s ease;
|
|
510
|
+
background-repeat: no-repeat;
|
|
511
|
+
background-position: right 12px center;
|
|
512
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -15,11 +15,14 @@ export type { PageBuilderUser, ComponentObject, ImageObject, PageBuilderConfig }
|
|
|
15
15
|
export { createPinia } from 'pinia'
|
|
16
16
|
|
|
17
17
|
// Export CSS (users will need to import this separately)
|
|
18
|
-
import './css/
|
|
18
|
+
import './css/style.css'
|
|
19
19
|
|
|
20
20
|
// Export shared store instances for external access
|
|
21
21
|
export { sharedPageBuilderPinia, sharedPageBuilderStore } from './stores/shared-store'
|
|
22
22
|
|
|
23
23
|
// export { PageBuilderService } from './src/services/PageBuilderService.ts'
|
|
24
24
|
|
|
25
|
-
export {
|
|
25
|
+
export { getPageBuilder } from './composables/builderInstance'
|
|
26
|
+
|
|
27
|
+
// Export the plugin for app.use()
|
|
28
|
+
export { pageBuilder } from './plugin'
|
package/src/main.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import './css/dev-global.css'
|
|
2
|
-
import './css/
|
|
3
|
-
import { initPageBuilder } from './composables/builderInstance'
|
|
2
|
+
import './css/style.css'
|
|
4
3
|
|
|
5
4
|
import { createApp } from 'vue'
|
|
6
5
|
import { createPinia } from 'pinia'
|
|
7
6
|
import App from './App.vue'
|
|
8
|
-
|
|
9
|
-
initPageBuilder()
|
|
7
|
+
import { pageBuilder } from './plugin'
|
|
10
8
|
|
|
11
9
|
const app = createApp(App)
|
|
12
10
|
|
|
13
11
|
app.use(createPinia())
|
|
12
|
+
app.use(pageBuilder)
|
|
14
13
|
|
|
15
14
|
app.mount('#app')
|
package/src/plugin.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/plugin.ts
|
|
2
|
+
import type { App } from 'vue';
|
|
3
|
+
import { PageBuilderService } from './services/PageBuilderService';
|
|
4
|
+
import { sharedPageBuilderStore } from './stores/shared-store';
|
|
5
|
+
import { setBuilderInstance } from './composables/builderInstance';
|
|
6
|
+
|
|
7
|
+
export const pageBuilder = {
|
|
8
|
+
install: (app: App): void => {
|
|
9
|
+
if (!app.config.globalProperties.$pageBuilder) {
|
|
10
|
+
const pageBuilderStateStore = sharedPageBuilderStore;
|
|
11
|
+
const instance = new PageBuilderService(pageBuilderStateStore);
|
|
12
|
+
setBuilderInstance(instance);
|
|
13
|
+
app.config.globalProperties.$pageBuilder = instance;
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -799,33 +799,10 @@ export class PageBuilderService {
|
|
|
799
799
|
|
|
800
800
|
public handleManualSave = async () => {
|
|
801
801
|
this.startEditing()
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
//
|
|
807
|
-
//
|
|
808
|
-
// Enabled auto save
|
|
809
|
-
if (
|
|
810
|
-
(typeof passedConfig.userSettings.autoSave === 'boolean' &&
|
|
811
|
-
!passedConfig.userSettings.autoSave) ||
|
|
812
|
-
(typeof passedConfig.userSettings.autoSave === 'boolean' &&
|
|
813
|
-
passedConfig.userSettings.autoSave)
|
|
814
|
-
) {
|
|
815
|
-
this.pageBuilderStateStore.setIsSaving(true)
|
|
816
|
-
this.saveDomComponentsToLocalStorage()
|
|
817
|
-
await delay(400)
|
|
818
|
-
|
|
819
|
-
this.pageBuilderStateStore.setIsSaving(false)
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
if (passedConfig && !passedConfig.userSettings) {
|
|
823
|
-
this.pageBuilderStateStore.setIsSaving(true)
|
|
824
|
-
this.saveDomComponentsToLocalStorage()
|
|
825
|
-
await delay(400)
|
|
826
|
-
|
|
827
|
-
this.pageBuilderStateStore.setIsSaving(false)
|
|
828
|
-
}
|
|
802
|
+
this.pageBuilderStateStore.setIsSaving(true)
|
|
803
|
+
this.saveDomComponentsToLocalStorage()
|
|
804
|
+
await delay(400)
|
|
805
|
+
this.pageBuilderStateStore.setIsSaving(false)
|
|
829
806
|
}
|
|
830
807
|
|
|
831
808
|
public cloneCompObjForDOMInsertion(componentObject: ComponentObject): ComponentObject {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import tailwindCSS from '../../css/
|
|
1
|
+
import tailwindCSS from '../../css/style.css?inline'
|
|
2
2
|
|
|
3
3
|
const fullHTMLContent = function (HTML: string): string {
|
|
4
4
|
return `<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><style>${tailwindCSS}</style></head><body>${HTML}</body></html>`
|