@myissue/vue-website-page-builder 3.3.71 → 3.3.73
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 +65 -6
- package/dist/ar-Sg258Eh1.js +110 -0
- package/dist/de-DU6Hv8W2.js +112 -0
- package/dist/en-B__-m2Os.js +112 -0
- package/dist/es-DmzWA1F8.js +112 -0
- package/dist/fr-BARDIQ1D.js +112 -0
- package/dist/hi-BgQJcRDP.js +112 -0
- package/dist/ja-Drg74-B1.js +112 -0
- package/dist/pt-D19DpjTw.js +112 -0
- package/dist/robots.txt +1 -1
- package/dist/ru-D0zybCPa.js +112 -0
- package/dist/style.css +1 -0
- package/dist/vue-website-page-builder.js +12019 -11855
- package/dist/vue-website-page-builder.umd.cjs +47 -46
- package/dist/zh-Hans-notf0z2N.js +112 -0
- package/package.json +2 -3
- package/src/App.vue +17 -1
- package/src/Components/PageBuilder/DefaultComponents/DefaultBuilderComponents.vue +10 -4
- package/src/Components/PageBuilder/EditorMenu/Editables/BackgroundColorEditor.vue +6 -2
- package/src/Components/PageBuilder/EditorMenu/Editables/BorderRadius.vue +23 -13
- package/src/Components/PageBuilder/EditorMenu/Editables/Borders.vue +22 -9
- package/src/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue +15 -7
- package/src/Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue +10 -6
- 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/Margin.vue +12 -5
- package/src/Components/PageBuilder/EditorMenu/Editables/OpacityEditor.vue +4 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/Padding.vue +13 -5
- package/src/Components/PageBuilder/EditorMenu/Editables/StyleEditor.vue +15 -8
- package/src/Components/PageBuilder/EditorMenu/Editables/TextColorEditor.vue +7 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/Typography.vue +36 -16
- package/src/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue +26 -14
- package/src/Components/PageBuilder/ToolbarOption/ToolbarOption.vue +13 -10
- package/src/Components/TipTap/TipTapInput.vue +1 -1
- package/src/PageBuilder/PageBuilder.vue +115 -19
- package/src/composables/builderInstance.ts +4 -7
- package/src/composables/useTranslations.ts +28 -0
- package/src/css/{app.css → style.css} +16 -0
- package/src/index.ts +5 -2
- package/src/locales/ar.json +85 -0
- package/src/locales/de.json +86 -0
- package/src/locales/en.json +93 -0
- package/src/locales/es.json +86 -0
- package/src/locales/fr.json +86 -0
- package/src/locales/hi.json +86 -0
- package/src/locales/ja.json +86 -0
- package/src/locales/pt.json +92 -0
- package/src/locales/ru.json +86 -0
- package/src/locales/zh-Hans.json +86 -0
- package/src/main.ts +3 -4
- package/src/plugin.ts +16 -0
- package/src/services/PageBuilderService.ts +67 -28
- package/src/stores/page-builder-state.ts +3 -3
- package/src/tests/PageBuilderTest.vue +41 -77
- package/src/types/index.ts +1 -1
- package/src/utils/builder/html-doc-declaration-with-components.ts +1 -1
- package/dist/vue-website-page-builder.css +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Reset Page": "Сбросить страницу",
|
|
3
|
+
"Global Page Styles": "Глобальные стили страницы",
|
|
4
|
+
"Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.": "Попробуйте мощный Click & Drop Page Builder — разработанный для разработчиков и создателей, которые хотят полного контроля без лишних хлопот. Настраивайте макеты, шрифты и цвета. Редактируйте контент визуально в реальном времени. Добавляйте медиа, встраивайте видео с YouTube или экспортируйте все в виде чистого HTML. С адаптивным редактированием, локальным автосохранением, поддержкой Tailwind и даже интеграцией Unsplash, это все, что вам нужно — в одном бесшовном конструкторе. Создавайте потрясающие страницы за считанные минуты.",
|
|
5
|
+
"A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.": "Конструктор страниц, созданный для роста. Создавайте страницы вашего сайта с готовыми компонентами, которые полностью настраиваются и всегда адаптивны, разработаны для удовлетворения любых потребностей. Мощный конструктор страниц для растущих торговцев, брендов и агентств.",
|
|
6
|
+
"Everything you need. Break free from design limitations": "Все, что вам нужно. Освободитесь от ограничений дизайна",
|
|
7
|
+
"Bring your vision to life and create impressive pages using a click & drop Page Builder": "Воплотите свою мечту в жизнь и создавайте впечатляющие страницы с помощью конструктора страниц с функцией перетаскивания",
|
|
8
|
+
"The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.": "Веб-конструктор для потрясающих страниц. Позвольте пользователям разрабатывать и публиковать современные страницы любого масштаба. Создавайте адаптивные страницы, такие как списки, вакансии или блоги, и легко управляйте контентом с помощью бесплатного конструктора страниц Click & Drop. Разработано с использованием TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS и HTML.",
|
|
9
|
+
"Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via": "Скачайте или установите наш мощный, гибкий и удобный бесплатный Vue 3 Page Builder через",
|
|
10
|
+
"Save": "Сохранить",
|
|
11
|
+
"Add new Components": "Добавить новые компоненты",
|
|
12
|
+
"Options": "Опции",
|
|
13
|
+
"Config Overview": "Обзор конфигурации",
|
|
14
|
+
"HTML Overview": "Обзор HTML",
|
|
15
|
+
"Delete Layout": "Удалить макет",
|
|
16
|
+
"avatar": "аватар",
|
|
17
|
+
"Publish": "Опубликовать",
|
|
18
|
+
"Add Components to Page": "Добавить компоненты на страницу",
|
|
19
|
+
"Close": "Закрыть",
|
|
20
|
+
"Helper Components": "Вспомогательные компоненты",
|
|
21
|
+
"Click to add": "Нажмите, чтобы добавить",
|
|
22
|
+
"component": "компонент",
|
|
23
|
+
"Layout Components": "Компоненты макета",
|
|
24
|
+
"Click to add component": "Нажмите, чтобы добавить компонент",
|
|
25
|
+
"Remove all Components": "Удалить все компоненты",
|
|
26
|
+
"Are you sure you want to remove all Components?": "Вы уверены, что хотите удалить все компоненты?",
|
|
27
|
+
"Styles": "Стили",
|
|
28
|
+
"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.": "Примените стили, которые влияют на всю страницу. Эти настройки включают глобальный шрифт, цвет текста, цвет фона и другие универсальные стили, которые применяются ко всем разделам.",
|
|
29
|
+
"Update Page Styles": "Обновить стили страницы",
|
|
30
|
+
"Download HTML": "Скачать HTML",
|
|
31
|
+
"Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.": "Экспортируйте всю страницу как автономный HTML-файл. Это включает все разделы, содержимое и примененные стили, делая его готовым к использованию или интеграции в другом месте.",
|
|
32
|
+
"Download HTML file": "Скачать HTML файл",
|
|
33
|
+
"Typographies": "Типографии",
|
|
34
|
+
"Font Appearance": "Внешний вид шрифта",
|
|
35
|
+
"Font Size": "Размер шрифта",
|
|
36
|
+
"Select": "Выбрать",
|
|
37
|
+
"Font size": "Размер шрифта",
|
|
38
|
+
"Font tablet size": "Размер шрифта для планшетов",
|
|
39
|
+
"Font small screens": "Размер шрифта для маленьких экранов",
|
|
40
|
+
"Font weight": "Толщина шрифта",
|
|
41
|
+
"Font family": "Семейство шрифтов",
|
|
42
|
+
"Font Style": "Стиль шрифта",
|
|
43
|
+
"Opacity & Transparency": "Непрозрачность и Прозрачность",
|
|
44
|
+
"Padding": "Отступ",
|
|
45
|
+
"Vertical Padding": "Вертикальный отступ",
|
|
46
|
+
"Horizontal Padding": "Горизонтальный отступ",
|
|
47
|
+
"Margin": "Поле",
|
|
48
|
+
"Vertical Margin": "Вертикальное поле",
|
|
49
|
+
"Horizontal Margin": "Горизонтальное поле",
|
|
50
|
+
"Border Radius": "Радиус границы",
|
|
51
|
+
"Global": "Глобальный",
|
|
52
|
+
"Specific": "Специфический",
|
|
53
|
+
"Border Radius top left": "Радиус границы сверху слева",
|
|
54
|
+
"Border Radius top right": "Радиус границы сверху справа",
|
|
55
|
+
"Border Radius bottom left": "Радиус границы снизу слева",
|
|
56
|
+
"Border Radius bottom right": "Радиус границы снизу справа",
|
|
57
|
+
"Border Style, Width & Color": "Стиль, ширина и цвет границы",
|
|
58
|
+
"Border": "Граница",
|
|
59
|
+
"Border Style": "Стиль границы",
|
|
60
|
+
"Border Width": "Ширина границы",
|
|
61
|
+
"Border Color": "Цвет границы",
|
|
62
|
+
"Transparent": "Прозрачный",
|
|
63
|
+
"Generated CSS": "Сгенерированный CSS",
|
|
64
|
+
"This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.": "Это CSS, применяемый конструктором. Добавьте свой CSS и нажмите Enter, чтобы применить его к выбранному элементу.",
|
|
65
|
+
"Add your CSS.": "Добавьте свой CSS.",
|
|
66
|
+
"The pbx- prefix is added automatically.": "Префикс pbx- добавляется автоматически.",
|
|
67
|
+
"Type class": "Введите класс",
|
|
68
|
+
"Add": "Добавить",
|
|
69
|
+
"Inline Styles": "Встроенные стили",
|
|
70
|
+
"These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.": "Это встроенные стили, применяемые конструктором. Добавьте свои стили и нажмите Enter, чтобы применить их к выбранному элементу.",
|
|
71
|
+
"Add your own style.": "Добавьте свой стиль.",
|
|
72
|
+
"property": "свойство",
|
|
73
|
+
"value": "значение",
|
|
74
|
+
"close": "закрыть",
|
|
75
|
+
"Editing": "Редактирование",
|
|
76
|
+
"Loading...": "Загрузка...",
|
|
77
|
+
"Background Color": "Цвет фона",
|
|
78
|
+
"Text Color": "Цвет текста",
|
|
79
|
+
"Default black": "Черный по умолчанию",
|
|
80
|
+
"Remove Component?": "Удалить компонент?",
|
|
81
|
+
"Are you sure you want to remove this Component?": "Вы уверены, что хотите удалить этот компонент?",
|
|
82
|
+
"Delete": "Удалить",
|
|
83
|
+
"Add to the bottom": "Добавить в конец",
|
|
84
|
+
"Preview": "Предварительный просмотр",
|
|
85
|
+
"Mobile": "Мобильный"
|
|
86
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Reset Page": "重置页面",
|
|
3
|
+
"Global Page Styles": "全局页面样式",
|
|
4
|
+
"Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.": "试试强大的Click & Drop Page Builder——专为希望完全控制而无需麻烦的开发者和创作者设计。自定义布局、字体和颜色。实时可视化编辑内容。添加媒体、嵌入YouTube视频或将所有内容导出为干净的HTML。凭借响应式编辑、本地自动保存、Tailwind支持,甚至Unsplash集成,它是您所需的一切——集成在一个无缝的构建器中。几分钟内构建令人惊叹的页面。",
|
|
5
|
+
"A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.": "为增长而设计的页面构建器。使用完全可定制且始终响应的现成组件构建您的网站页面,旨在满足所有需求。为不断发展的商家、品牌和代理商提供强大的页面构建器。",
|
|
6
|
+
"Everything you need. Break free from design limitations": "您需要的一切。突破设计限制",
|
|
7
|
+
"Bring your vision to life and create impressive pages using a click & drop Page Builder": "实现您的愿景,并使用点击和拖放页面构建器创建令人印象深刻的页面",
|
|
8
|
+
"The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.": "令人惊叹页面的网页构建器。使用户能够设计和发布任何规模的现代页面。创建响应式页面,例如列表、工作或博客文章,并使用免费的点击和拖放页面构建器轻松管理内容。使用 TypeScript、Vue 3、Composition API、Pinia、CSS、Tailwind CSS 和 HTML 开发。",
|
|
9
|
+
"Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via": "通过下载或安装我们强大、灵活且易于使用的免费 Vue 3 页面构建器",
|
|
10
|
+
"Save": "保存",
|
|
11
|
+
"Add new Components": "添加新组件",
|
|
12
|
+
"Options": "选项",
|
|
13
|
+
"Config Overview": "配置概览",
|
|
14
|
+
"HTML Overview": "HTML概览",
|
|
15
|
+
"Delete Layout": "删除布局",
|
|
16
|
+
"avatar": "头像",
|
|
17
|
+
"Publish": "发布",
|
|
18
|
+
"Add Components to Page": "将组件添加到页面",
|
|
19
|
+
"Close": "关闭",
|
|
20
|
+
"Helper Components": "辅助组件",
|
|
21
|
+
"Click to add": "点击添加",
|
|
22
|
+
"component": "组件",
|
|
23
|
+
"Layout Components": "布局组件",
|
|
24
|
+
"Click to add component": "点击添加组件",
|
|
25
|
+
"Remove all Components": "删除所有组件",
|
|
26
|
+
"Are you sure you want to remove all Components?": "您确定要删除所有组件吗?",
|
|
27
|
+
"Styles": "样式",
|
|
28
|
+
"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.": "应用影响整个页面的样式。这些设置包括全局字体系列、文本颜色、背景颜色和适用于所有部分的其他通用样式。",
|
|
29
|
+
"Update Page Styles": "更新页面样式",
|
|
30
|
+
"Download HTML": "下载HTML",
|
|
31
|
+
"Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.": "将整个页面导出为独立的HTML文件。这包括所有部分、内容和应用的样式,使其可以随时使用或集成到其他地方。",
|
|
32
|
+
"Download HTML file": "下载HTML文件",
|
|
33
|
+
"Typographies": "排版",
|
|
34
|
+
"Font Appearance": "字体外观",
|
|
35
|
+
"Font Size": "字体大小",
|
|
36
|
+
"Select": "选择",
|
|
37
|
+
"Font size": "字体大小",
|
|
38
|
+
"Font tablet size": "平板字体大小",
|
|
39
|
+
"Font small screens": "小屏幕字体大小",
|
|
40
|
+
"Font weight": "字体粗细",
|
|
41
|
+
"Font family": "字体家族",
|
|
42
|
+
"Font Style": "字体样式",
|
|
43
|
+
"Opacity & Transparency": "不透明度和透明度",
|
|
44
|
+
"Padding": "内边距",
|
|
45
|
+
"Vertical Padding": "垂直内边距",
|
|
46
|
+
"Horizontal Padding": "水平内边距",
|
|
47
|
+
"Margin": "边距",
|
|
48
|
+
"Vertical Margin": "垂直边距",
|
|
49
|
+
"Horizontal Margin": "水平边距",
|
|
50
|
+
"Border Radius": "边框半径",
|
|
51
|
+
"Global": "全局",
|
|
52
|
+
"Specific": "具体",
|
|
53
|
+
"Border Radius top left": "边框半径 左上",
|
|
54
|
+
"Border Radius top right": "边框半径 右上",
|
|
55
|
+
"Border Radius bottom left": "边框半径 左下",
|
|
56
|
+
"Border Radius bottom right": "边框半径 右下",
|
|
57
|
+
"Border Style, Width & Color": "边框样式、宽度和颜色",
|
|
58
|
+
"Border": "边框",
|
|
59
|
+
"Border Style": "边框样式",
|
|
60
|
+
"Border Width": "边框宽度",
|
|
61
|
+
"Border Color": "边框颜色",
|
|
62
|
+
"Transparent": "透明",
|
|
63
|
+
"Generated CSS": "生成的CSS",
|
|
64
|
+
"This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.": "这是构建器应用的CSS。添加您自己的CSS并按Enter将其应用于选定的元素。",
|
|
65
|
+
"Add your CSS.": "添加您的CSS。",
|
|
66
|
+
"The pbx- prefix is added automatically.": "pbx-前缀会自动添加。",
|
|
67
|
+
"Type class": "输入类",
|
|
68
|
+
"Add": "添加",
|
|
69
|
+
"Inline Styles": "内联样式",
|
|
70
|
+
"These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.": "这些是构建器应用的内联样式。添加您自己的样式,然后按 Enter 将其应用于选定的元素。",
|
|
71
|
+
"Add your own style.": "添加您自己的样式。",
|
|
72
|
+
"property": "属性",
|
|
73
|
+
"value": "值",
|
|
74
|
+
"close": "关闭",
|
|
75
|
+
"Editing": "编辑",
|
|
76
|
+
"Loading...": "加载中...",
|
|
77
|
+
"Background Color": "背景颜色",
|
|
78
|
+
"Text Color": "文字颜色",
|
|
79
|
+
"Default black": "默认黑色",
|
|
80
|
+
"Remove Component?": "删除组件?",
|
|
81
|
+
"Are you sure you want to remove this Component?": "您确定要删除此组件吗?",
|
|
82
|
+
"Delete": "删除",
|
|
83
|
+
"Add to the bottom": "添加到底部",
|
|
84
|
+
"Preview": "预览",
|
|
85
|
+
"Mobile": "移动"
|
|
86
|
+
}
|
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
|
+
};
|
|
@@ -129,6 +129,10 @@ export class PageBuilderService {
|
|
|
129
129
|
public availableLanguage(): AvailableLanguage[] {
|
|
130
130
|
return AVAILABLE_LANGUAGES
|
|
131
131
|
}
|
|
132
|
+
|
|
133
|
+
public changeLanguage(lang: string) {
|
|
134
|
+
this.pageBuilderStateStore.setCurrentLanguage(lang)
|
|
135
|
+
}
|
|
132
136
|
// Deselect any selected or hovered elements in the builder UI
|
|
133
137
|
async clearHtmlSelection(): Promise<void> {
|
|
134
138
|
this.pageBuilderStateStore.setComponent(null)
|
|
@@ -264,6 +268,55 @@ export class PageBuilderService {
|
|
|
264
268
|
return
|
|
265
269
|
}
|
|
266
270
|
|
|
271
|
+
private ensureLanguage(config: PageBuilderConfig): void {
|
|
272
|
+
// Set default language config if missing, empty, or language missing/empty
|
|
273
|
+
const defaultLang = 'en'
|
|
274
|
+
const defaultEnable = ['en', 'zh-Hans', 'fr', 'ja', 'ru', 'es', 'pt', 'de', 'ar', 'hi'] as const
|
|
275
|
+
|
|
276
|
+
let needsDefault = false
|
|
277
|
+
const userSettings = config.userSettings
|
|
278
|
+
const language = userSettings && userSettings.language
|
|
279
|
+
|
|
280
|
+
if (!userSettings || isEmptyObject(userSettings)) {
|
|
281
|
+
needsDefault = true
|
|
282
|
+
} else if (!language || isEmptyObject(language)) {
|
|
283
|
+
needsDefault = true
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
if (needsDefault) {
|
|
287
|
+
const updatedLanguage = {
|
|
288
|
+
...config,
|
|
289
|
+
userSettings: {
|
|
290
|
+
...userSettings,
|
|
291
|
+
language: {
|
|
292
|
+
default: defaultLang,
|
|
293
|
+
enable: defaultEnable as typeof defaultEnable,
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
} as const
|
|
297
|
+
this.pageBuilderStateStore.setPageBuilderConfig(updatedLanguage)
|
|
298
|
+
return
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Ensure default is in enable array
|
|
302
|
+
if (language && Array.isArray(language.enable) && language.default) {
|
|
303
|
+
if (!language.enable.includes(language.default)) {
|
|
304
|
+
const updatedEnable = [...language.enable, language.default]
|
|
305
|
+
const updatedLanguage = {
|
|
306
|
+
...config,
|
|
307
|
+
userSettings: {
|
|
308
|
+
...userSettings,
|
|
309
|
+
language: {
|
|
310
|
+
...language,
|
|
311
|
+
enable: updatedEnable,
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
} as const
|
|
315
|
+
this.pageBuilderStateStore.setPageBuilderConfig(updatedLanguage)
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
267
320
|
private validateConfig(config: PageBuilderConfig): void {
|
|
268
321
|
const defaultConfigValues = {
|
|
269
322
|
updateOrCreate: {
|
|
@@ -280,6 +333,15 @@ export class PageBuilderService {
|
|
|
280
333
|
if (config && Object.keys(config).length !== 0 && config.constructor === Object) {
|
|
281
334
|
this.ensureUpdateOrCreateConfig(config)
|
|
282
335
|
}
|
|
336
|
+
|
|
337
|
+
this.ensureLanguage(config)
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
public saveUserSettingsStorage(newLang: string) {
|
|
341
|
+
localStorage.setItem(
|
|
342
|
+
'userSettingsPageBuilder',
|
|
343
|
+
JSON.stringify({ userSettings: { lang: newLang } }),
|
|
344
|
+
)
|
|
283
345
|
}
|
|
284
346
|
|
|
285
347
|
/**
|
|
@@ -422,7 +484,7 @@ export class PageBuilderService {
|
|
|
422
484
|
if (localStorageData && this.isPageBuilderMissingOnStart) {
|
|
423
485
|
console.log('8888:', internalPageBuilderCall)
|
|
424
486
|
await this.completeMountProcess(JSON.stringify(this.pendingMountComponents), true)
|
|
425
|
-
await delay(
|
|
487
|
+
await delay(400)
|
|
426
488
|
this.pageBuilderStateStore.setHasLocalDraftForUpdate(true)
|
|
427
489
|
this.pendingMountComponents = null
|
|
428
490
|
return
|
|
@@ -799,33 +861,10 @@ export class PageBuilderService {
|
|
|
799
861
|
|
|
800
862
|
public handleManualSave = async () => {
|
|
801
863
|
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
|
-
}
|
|
864
|
+
this.pageBuilderStateStore.setIsSaving(true)
|
|
865
|
+
this.saveDomComponentsToLocalStorage()
|
|
866
|
+
await delay(400)
|
|
867
|
+
this.pageBuilderStateStore.setIsSaving(false)
|
|
829
868
|
}
|
|
830
869
|
|
|
831
870
|
public cloneCompObjForDOMInsertion(componentObject: ComponentObject): ComponentObject {
|
|
@@ -67,7 +67,7 @@ interface PageBuilderState {
|
|
|
67
67
|
hasLocalDraftForUpdate: boolean
|
|
68
68
|
isResumeEditing: boolean
|
|
69
69
|
isRestoring: boolean
|
|
70
|
-
currentLanguage: string
|
|
70
|
+
currentLanguage: string | null
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
export const usePageBuilderStateStore = defineStore('pageBuilderState', {
|
|
@@ -130,7 +130,7 @@ export const usePageBuilderStateStore = defineStore('pageBuilderState', {
|
|
|
130
130
|
hasLocalDraftForUpdate: false,
|
|
131
131
|
isResumeEditing: false,
|
|
132
132
|
isRestoring: false,
|
|
133
|
-
currentLanguage:
|
|
133
|
+
currentLanguage: null,
|
|
134
134
|
}),
|
|
135
135
|
getters: {
|
|
136
136
|
// Core Page Builder Getters
|
|
@@ -286,7 +286,7 @@ export const usePageBuilderStateStore = defineStore('pageBuilderState', {
|
|
|
286
286
|
getHasLocalDraftForUpdate: (state: PageBuilderState): boolean => state.hasLocalDraftForUpdate,
|
|
287
287
|
getIsLoadingResumeEditing: (state: PageBuilderState): boolean => state.isResumeEditing,
|
|
288
288
|
getIsRestoring: (state: PageBuilderState): boolean => state.isRestoring,
|
|
289
|
-
getCurrentLanguage: (state: PageBuilderState): string => state.currentLanguage,
|
|
289
|
+
getCurrentLanguage: (state: PageBuilderState): string | null => state.currentLanguage,
|
|
290
290
|
},
|
|
291
291
|
actions: {
|
|
292
292
|
setComponentArrayAddMethod(payload: string | null): void {
|
|
@@ -6,50 +6,10 @@ import DemoBuilderComponentsTest from '../tests/TestComponents/DemoBuilderCompon
|
|
|
6
6
|
import { onMounted } from 'vue'
|
|
7
7
|
import componentsArray from '../tests/componentsArray.test.json'
|
|
8
8
|
import { getPageBuilder } from '../composables/builderInstance'
|
|
9
|
-
|
|
9
|
+
import { useTranslations } from '../composables/useTranslations'
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
name: 'Live Drag & Drop Builder',
|
|
14
|
-
description:
|
|
15
|
-
'Click & Drop content on a page and watch your pages come to life. Bring your vision to life and create impressive pages using a click & drop Page Builder',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: 'True Visual Editing',
|
|
19
|
-
description:
|
|
20
|
-
'See your changes in real-time as you make them. Elevate your creative vision and create pages using an intuitive click & drop page builder. Break free from design limitations and turn your visions into reality.',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'Features',
|
|
24
|
-
description:
|
|
25
|
-
'Click & Drop, Reordering, True Visual Editing, Responsive Editing, Font Customization, Undo & Redo, Text Editing, Media Library, Unsplash Integration, YouTube Videos.',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'Technologies',
|
|
29
|
-
description:
|
|
30
|
-
'Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: 'Set Brand and Link Colors one place',
|
|
34
|
-
description:
|
|
35
|
-
'Global Styles for fonts, designs, & colors. Set Brand and Link Colors once and apply them across the entire Platform with ease.',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: 'Mobile-First Approach',
|
|
39
|
-
description:
|
|
40
|
-
'Developed with Mobile-First approach. The Page Builder even works on mobile phones.',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: 'Media Library',
|
|
44
|
-
description:
|
|
45
|
-
'A beautiful and user-friendly media library that allows you to change and update images. Unsplash Integration is included.',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: 'Minimal and Intuitive Design',
|
|
49
|
-
description:
|
|
50
|
-
'Beautiful, elegant and intuitive design. Enhance user engagement with amazing visual experience.',
|
|
51
|
-
},
|
|
52
|
-
]
|
|
11
|
+
const pageBuilderService = getPageBuilder()
|
|
12
|
+
const { translate } = useTranslations()
|
|
53
13
|
|
|
54
14
|
const publishPageBuilder = function () {}
|
|
55
15
|
|
|
@@ -81,18 +41,22 @@ const configPageBuilder = {
|
|
|
81
41
|
userSettings: {
|
|
82
42
|
theme: 'light',
|
|
83
43
|
language: {
|
|
84
|
-
default: '
|
|
85
|
-
|
|
44
|
+
default: 'zh-Hans',
|
|
45
|
+
enable: ['en', 'zh-Hans', 'fr', 'ja', 'ru', 'es', 'pt', 'de', 'ar', 'hi'],
|
|
46
|
+
disableLanguageDropDown: false,
|
|
86
47
|
},
|
|
48
|
+
autoSave: true,
|
|
87
49
|
},
|
|
50
|
+
|
|
88
51
|
settings: {
|
|
89
52
|
brandColor: '#DB93B0',
|
|
90
53
|
},
|
|
91
|
-
pageSettings,
|
|
54
|
+
pageSettings: pageSettings,
|
|
92
55
|
} as const
|
|
93
56
|
|
|
94
57
|
onMounted(async () => {
|
|
95
|
-
const result = await pageBuilderService.startBuilder(configPageBuilder, components)
|
|
58
|
+
// const result = await pageBuilderService.startBuilder(configPageBuilder, components)
|
|
59
|
+
const result = await pageBuilderService.startBuilder(configPageBuilder)
|
|
96
60
|
console.log('Page Builder inspect the result for message, status, or error::', result)
|
|
97
61
|
})
|
|
98
62
|
</script>
|
|
@@ -102,19 +66,27 @@ onMounted(async () => {
|
|
|
102
66
|
<div class="pbx-myPrimaryWidthScreenModule pbx-bg-red-50 lg:pbx-block">
|
|
103
67
|
<div class="pbx-myPrimaryContentSection">
|
|
104
68
|
<h2 class="pbx-mySecondaryHeader">
|
|
105
|
-
|
|
69
|
+
{{
|
|
70
|
+
translate(
|
|
71
|
+
'Bring your vision to life and create impressive pages using a click & drop Page Builder',
|
|
72
|
+
)
|
|
73
|
+
}}
|
|
106
74
|
</h2>
|
|
107
75
|
<p class="pbx-myPrimaryParagraph pbx-font-normal">
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
76
|
+
{{
|
|
77
|
+
translate(
|
|
78
|
+
'The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.',
|
|
79
|
+
)
|
|
80
|
+
}}
|
|
113
81
|
<br />
|
|
114
82
|
</p>
|
|
115
83
|
<div class="pbx-mt-4">
|
|
116
84
|
<p class="pbx-myPrimaryParagraph pbx-font-normal">
|
|
117
|
-
|
|
85
|
+
{{
|
|
86
|
+
translate(
|
|
87
|
+
'Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via',
|
|
88
|
+
)
|
|
89
|
+
}}
|
|
118
90
|
<br />
|
|
119
91
|
<strong> npm:</strong>
|
|
120
92
|
<a
|
|
@@ -138,34 +110,26 @@ onMounted(async () => {
|
|
|
138
110
|
</div>
|
|
139
111
|
|
|
140
112
|
<FullWidthElement :descriptionArea="true" class="pbx-bg-gray-50">
|
|
141
|
-
<template #title>
|
|
113
|
+
<template #title>
|
|
114
|
+
{{ translate('Everything you need. Break free from design limitations') }}
|
|
115
|
+
</template>
|
|
142
116
|
<template #description>
|
|
143
117
|
<p class="pbx-myPrimaryParagraph pbx-font-normal">
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
118
|
+
{{
|
|
119
|
+
translate(
|
|
120
|
+
'A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.',
|
|
121
|
+
)
|
|
122
|
+
}}
|
|
147
123
|
</p>
|
|
148
124
|
</template>
|
|
149
125
|
<template #content>
|
|
150
|
-
<
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
>
|
|
158
|
-
<div
|
|
159
|
-
class="pbx-bg-black/0 pbx-absolute pbx-top-0 pbx-left-0 pbx-w-full pbx-h-full pbx-rounded-lg"
|
|
160
|
-
></div>
|
|
161
|
-
<div class="pbx-px-2 pbx-pt-8 pbx-absolute pbx-top-0 pbx-w-full">
|
|
162
|
-
<p class="pbx-myTertiaryHeader">{{ feature.name }}</p>
|
|
163
|
-
<p class="pbx-myPrimaryParagraph pbx-font-medium pbx-drop-shadow-sm">
|
|
164
|
-
{{ feature.description }}
|
|
165
|
-
</p>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
</div>
|
|
126
|
+
<p class="pbx-myPrimaryParagraph pbx-font-normal">
|
|
127
|
+
{{
|
|
128
|
+
translate(
|
|
129
|
+
"Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.",
|
|
130
|
+
)
|
|
131
|
+
}}
|
|
132
|
+
</p>
|
|
169
133
|
</template>
|
|
170
134
|
</FullWidthElement>
|
|
171
135
|
</div>
|
package/src/types/index.ts
CHANGED
|
@@ -229,7 +229,7 @@ export interface PageBuilderConfig {
|
|
|
229
229
|
theme?: 'light' | 'dark' | 'auto'
|
|
230
230
|
language?: {
|
|
231
231
|
default: 'en' | 'zh-Hans' | 'fr' | 'ja' | 'ru' | 'es' | 'pt' | 'de' | 'ar' | 'hi'
|
|
232
|
-
|
|
232
|
+
enable?: ReadonlyArray<
|
|
233
233
|
'en' | 'zh-Hans' | 'fr' | 'ja' | 'ru' | 'es' | 'pt' | 'de' | 'ar' | 'hi'
|
|
234
234
|
>
|
|
235
235
|
}
|
|
@@ -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>`
|