@myissue/vue-website-page-builder 3.3.72 → 3.3.74

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.
Files changed (51) hide show
  1. package/README.md +61 -0
  2. package/dist/ar-Sg258Eh1.js +110 -0
  3. package/dist/de-DU6Hv8W2.js +112 -0
  4. package/dist/en-B__-m2Os.js +112 -0
  5. package/dist/es-DmzWA1F8.js +112 -0
  6. package/dist/fr-BARDIQ1D.js +112 -0
  7. package/dist/hi-BgQJcRDP.js +112 -0
  8. package/dist/ja-Drg74-B1.js +112 -0
  9. package/dist/pt-D19DpjTw.js +112 -0
  10. package/dist/robots.txt +1 -1
  11. package/dist/ru-D0zybCPa.js +112 -0
  12. package/dist/style.css +1 -1
  13. package/dist/vue-website-page-builder.js +9435 -9300
  14. package/dist/vue-website-page-builder.umd.cjs +40 -40
  15. package/dist/zh-Hans-notf0z2N.js +112 -0
  16. package/package.json +1 -1
  17. package/src/App.vue +17 -1
  18. package/src/Components/PageBuilder/DefaultComponents/DefaultBuilderComponents.vue +10 -4
  19. package/src/Components/PageBuilder/EditorMenu/Editables/BackgroundColorEditor.vue +6 -2
  20. package/src/Components/PageBuilder/EditorMenu/Editables/BorderRadius.vue +23 -13
  21. package/src/Components/PageBuilder/EditorMenu/Editables/Borders.vue +22 -9
  22. package/src/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue +15 -7
  23. package/src/Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue +10 -6
  24. package/src/Components/PageBuilder/EditorMenu/Editables/ManageBackgroundOpacity.vue +1 -1
  25. package/src/Components/PageBuilder/EditorMenu/Editables/ManageOpacity.vue +1 -1
  26. package/src/Components/PageBuilder/EditorMenu/Editables/Margin.vue +12 -5
  27. package/src/Components/PageBuilder/EditorMenu/Editables/OpacityEditor.vue +4 -1
  28. package/src/Components/PageBuilder/EditorMenu/Editables/Padding.vue +13 -5
  29. package/src/Components/PageBuilder/EditorMenu/Editables/StyleEditor.vue +14 -7
  30. package/src/Components/PageBuilder/EditorMenu/Editables/TextColorEditor.vue +7 -1
  31. package/src/Components/PageBuilder/EditorMenu/Editables/Typography.vue +36 -16
  32. package/src/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue +26 -14
  33. package/src/Components/PageBuilder/ToolbarOption/ToolbarOption.vue +13 -10
  34. package/src/Components/TipTap/TipTapInput.vue +1 -1
  35. package/src/PageBuilder/PageBuilder.vue +115 -19
  36. package/src/composables/useTranslations.ts +28 -0
  37. package/src/css/style.css +2 -1
  38. package/src/locales/ar.json +85 -0
  39. package/src/locales/de.json +86 -0
  40. package/src/locales/en.json +93 -0
  41. package/src/locales/es.json +86 -0
  42. package/src/locales/fr.json +86 -0
  43. package/src/locales/hi.json +86 -0
  44. package/src/locales/ja.json +86 -0
  45. package/src/locales/pt.json +92 -0
  46. package/src/locales/ru.json +86 -0
  47. package/src/locales/zh-Hans.json +86 -0
  48. package/src/services/PageBuilderService.ts +63 -1
  49. package/src/stores/page-builder-state.ts +3 -3
  50. package/src/tests/PageBuilderTest.vue +39 -77
  51. package/src/types/index.ts +1 -1
@@ -0,0 +1,112 @@
1
+ const e = "保存", o = "选项", t = "头像", n = "发布", s = "关闭", a = "组件", i = "样式", r = "排版", l = "选择", d = "内边距", p = "边距", u = "全局", c = "具体", g = "边框", y = "透明", h = "添加", m = "属性", S = "值", C = "关闭", f = "编辑", w = "删除", T = "预览", b = "移动", v = {
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: e,
11
+ "Add new Components": "添加新组件",
12
+ Options: o,
13
+ "Config Overview": "配置概览",
14
+ "HTML Overview": "HTML概览",
15
+ "Delete Layout": "删除布局",
16
+ avatar: t,
17
+ Publish: n,
18
+ "Add Components to Page": "将组件添加到页面",
19
+ Close: s,
20
+ "Helper Components": "辅助组件",
21
+ "Click to add": "点击添加",
22
+ component: a,
23
+ "Layout Components": "布局组件",
24
+ "Click to add component": "点击添加组件",
25
+ "Remove all Components": "删除所有组件",
26
+ "Are you sure you want to remove all Components?": "您确定要删除所有组件吗?",
27
+ Styles: i,
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: r,
34
+ "Font Appearance": "字体外观",
35
+ "Font Size": "字体大小",
36
+ Select: l,
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: d,
45
+ "Vertical Padding": "垂直内边距",
46
+ "Horizontal Padding": "水平内边距",
47
+ Margin: p,
48
+ "Vertical Margin": "垂直边距",
49
+ "Horizontal Margin": "水平边距",
50
+ "Border Radius": "边框半径",
51
+ Global: u,
52
+ Specific: c,
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: g,
59
+ "Border Style": "边框样式",
60
+ "Border Width": "边框宽度",
61
+ "Border Color": "边框颜色",
62
+ Transparent: y,
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: h,
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: m,
73
+ value: S,
74
+ close: C,
75
+ Editing: f,
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: w,
83
+ "Add to the bottom": "添加到底部",
84
+ Preview: T,
85
+ Mobile: b
86
+ };
87
+ export {
88
+ h as Add,
89
+ g as Border,
90
+ s as Close,
91
+ w as Delete,
92
+ f as Editing,
93
+ u as Global,
94
+ p as Margin,
95
+ b as Mobile,
96
+ o as Options,
97
+ d as Padding,
98
+ T as Preview,
99
+ n as Publish,
100
+ e as Save,
101
+ l as Select,
102
+ c as Specific,
103
+ i as Styles,
104
+ y as Transparent,
105
+ r as Typographies,
106
+ t as avatar,
107
+ C as close,
108
+ a as component,
109
+ v as default,
110
+ m as property,
111
+ S as value
112
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myissue/vue-website-page-builder",
3
- "version": "3.3.72",
3
+ "version": "3.3.74",
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",
package/src/App.vue CHANGED
@@ -1,7 +1,23 @@
1
- <script setup>
1
+ <script setup lang="ts">
2
+ import { onMounted, computed } from 'vue'
2
3
  import Navbar from './Components/Homepage/Navbar.vue'
3
4
  import PageBuilderTest from './tests/PageBuilderTest.vue'
4
5
  import Footer from './Components/Homepage/Footer.vue'
6
+ import { useTranslations } from './composables/useTranslations'
7
+ import { sharedPageBuilderStore } from './stores/shared-store'
8
+
9
+ const { loadTranslations } = useTranslations()
10
+
11
+ const pageBuilderStateStore = sharedPageBuilderStore
12
+
13
+ const getCurrentLanguage = computed(() => {
14
+ return pageBuilderStateStore.getCurrentLanguage
15
+ })
16
+
17
+ onMounted(async () => {
18
+ const language = getCurrentLanguage.value || 'en'
19
+ await loadTranslations(language)
20
+ })
5
21
  </script>
6
22
 
7
23
  <template>
@@ -5,6 +5,11 @@ import { usePageBuilderModal } from '../../../composables/usePageBuilderModal'
5
5
  import { generateComponentPreview } from '../../../utils/componentPreviews'
6
6
  import type { ComponentObject } from '../../../types'
7
7
  import { getPageBuilder } from '../../../composables/builderInstance'
8
+
9
+ import { useTranslations } from '../../../composables/useTranslations'
10
+
11
+ const { translate } = useTranslations()
12
+
8
13
  const pageBuilderService = getPageBuilder()
9
14
 
10
15
  defineProps({
@@ -46,7 +51,7 @@ const getSvgPreview = (title: string) => {
46
51
  <div>
47
52
  <!-- Helper Components Section -->
48
53
  <div class="pbx-mb-8">
49
- <h3 class="pbx-myQuaternaryHeader pbx-mb-4">Helper Components</h3>
54
+ <h3 class="pbx-myQuaternaryHeader pbx-mb-4">{{ translate('Helper Components') }}</h3>
50
55
  <div
51
56
  class="pbx-grid pbx-grid-cols-1 sm:pbx-grid-cols-2 md:pbx-grid-cols-3 lg:pbx-grid-cols-4 pbx-gap-4"
52
57
  >
@@ -61,7 +66,8 @@ const getSvgPreview = (title: string) => {
61
66
  <h4 class="pbx-myPrimaryParagraph pbx-text-base pbx-font-medium">{{ helper.title }}</h4>
62
67
  </div>
63
68
  <div class="pbx-myPrimaryParagraph pbx-text-xs pbx-font-normal pbx-pt-2">
64
- Click to add {{ helper.title.toLowerCase() }} component
69
+ {{ translate('Click to add') }} {{ helper.title.toLowerCase() }}
70
+ {{ translate('component') }}
65
71
  </div>
66
72
  </div>
67
73
  </div>
@@ -69,7 +75,7 @@ const getSvgPreview = (title: string) => {
69
75
 
70
76
  <!-- Regular Components Section -->
71
77
  <div v-if="customMediaComponent">
72
- <h3 class="pbx-myQuaternaryHeader pbx-mb-4">Layout Components</h3>
78
+ <h3 class="pbx-myQuaternaryHeader pbx-mb-4">{{ translate('Layout Components') }}</h3>
73
79
  <div class="pbx-grid pbx-grid-cols-1 sm:pbx-grid-cols-2 md:pbx-grid-cols-3 pbx-gap-4">
74
80
  <div
75
81
  v-for="comp in components[0].components.data"
@@ -89,7 +95,7 @@ const getSvgPreview = (title: string) => {
89
95
  <div class="pbx-p-3">
90
96
  <h4 class="pbx-myPrimaryParagraph pbx-text-sm pbx-font-normal">{{ comp.title }}</h4>
91
97
  <div class="pbx-myPrimaryParagraph pbx-text-xs pbx-font-normal pbx-pt-2">
92
- Click to add component
98
+ {{ translate('Click to add component') }}
93
99
  </div>
94
100
  </div>
95
101
  </div>
@@ -4,6 +4,10 @@ import { Listbox, ListboxButton, ListboxOption, ListboxOptions } from '@headless
4
4
  import tailwindColors from '../../../../utils/builder/tailwaind-colors'
5
5
  import { sharedPageBuilderStore } from '../../../../stores/shared-store'
6
6
  import { getPageBuilder } from '../../../../composables/builderInstance'
7
+ import { useTranslations } from '../../../../composables/useTranslations'
8
+
9
+ const { translate } = useTranslations()
10
+
7
11
  const pageBuilderService = getPageBuilder()
8
12
 
9
13
  // Use shared store instance
@@ -49,7 +53,7 @@ watch(
49
53
  class="pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border pbx-border-gray-800 pbx-rounded-sm"
50
54
  :class="`pbx-bg-${backgroundColor?.replace('pbx-bg-', '')}`"
51
55
  ></div>
52
- <div>Background Color</div>
56
+ <div>{{ translate('Background Color') }}</div>
53
57
  </div>
54
58
 
55
59
  <span v-if="globalPageLayout" class="material-symbols-outlined"> chevron_right </span>
@@ -99,7 +103,7 @@ watch(
99
103
  >
100
104
  <div v-if="color === 'none'" class="pbx-flex pbx-items-center">
101
105
  <span class="material-symbols-outlined"> ev_shadow </span>
102
- <span class="pbx-ml-3">Transparent</span>
106
+ <span class="pbx-ml-3">{{ translate('Transparent') }}</span>
103
107
  </div>
104
108
  <div v-if="color !== 'none'" class="pbx-flex pbx-items-center">
105
109
  <div
@@ -4,6 +4,9 @@ import { sharedPageBuilderStore } from '../../../../stores/shared-store'
4
4
  import EditorAccordion from '../EditorAccordion.vue'
5
5
  import tailwindBorderRadius from '../../../../utils/builder/tailwind-border-radius'
6
6
  import { getPageBuilder } from '../../../../composables/builderInstance'
7
+ import { useTranslations } from '../../../../composables/useTranslations'
8
+
9
+ const { translate } = useTranslations()
7
10
  const pageBuilderService = getPageBuilder()
8
11
 
9
12
  const pageBuilderStateStore = sharedPageBuilderStore
@@ -73,18 +76,22 @@ watch(
73
76
 
74
77
  <template>
75
78
  <EditorAccordion>
76
- <template #title>Border Radius</template>
79
+ <template #title>{{ translate('Border Radius') }}</template>
77
80
  <template #content>
78
- <p class="pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4">Global</p>
81
+ <p class="pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4">
82
+ {{ translate('Global') }}
83
+ </p>
79
84
  <div class="pbx-my-2 pbx-py-2">
80
- <label for="global-border-radius" class="pbx-myPrimaryInputLabel"> Border Radius </label>
85
+ <label for="global-border-radius" class="pbx-myPrimaryInputLabel">{{
86
+ translate('Border Radius')
87
+ }}</label>
81
88
  <select
82
89
  id="global-border-radius"
83
90
  v-model="borderRadiusGlobal"
84
91
  class="pbx-myPrimarySelect"
85
92
  @change="pageBuilderService.handleBorderRadiusGlobal(borderRadiusGlobal)"
86
93
  >
87
- <option disabled value="">Select</option>
94
+ <option disabled value="">{{ translate('Select') }}</option>
88
95
  <option
89
96
  v-for="borderRadiusGlobal in tailwindBorderRadius.roundedGlobal"
90
97
  :key="borderRadiusGlobal"
@@ -93,10 +100,13 @@ watch(
93
100
  </option>
94
101
  </select>
95
102
  </div>
96
- <p class="pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4">Specific</p>
103
+ <hr />
104
+ <p class="pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4">
105
+ {{ translate('Specific') }}
106
+ </p>
97
107
  <div class="pbx-my-2 pbx-py-2">
98
108
  <label for="border-radius-top-left" class="pbx-myPrimaryInputLabel">
99
- Border Radius top left
109
+ {{ translate('Border Radius top left') }}
100
110
  </label>
101
111
  <select
102
112
  id="border-radius-top-left"
@@ -104,7 +114,7 @@ watch(
104
114
  class="pbx-myPrimarySelect"
105
115
  @change="pageBuilderService.handleBorderRadiusTopLeft(borderRadiusTopLeft)"
106
116
  >
107
- <option disabled value="">Select</option>
117
+ <option disabled value="">{{ translate('Select') }}</option>
108
118
  <option
109
119
  v-for="borderRadiusTopLeft in tailwindBorderRadius.roundedTopLeft"
110
120
  :key="borderRadiusTopLeft"
@@ -115,7 +125,7 @@ watch(
115
125
  </div>
116
126
  <div class="pbx-my-2 pbx-py-2">
117
127
  <label for="border-radius-top-right" class="pbx-myPrimaryInputLabel">
118
- Border Radius top right
128
+ {{ translate('Border Radius top right') }}
119
129
  </label>
120
130
  <select
121
131
  id="border-radius-top-right"
@@ -123,7 +133,7 @@ watch(
123
133
  class="pbx-myPrimarySelect"
124
134
  @change="pageBuilderService.handleBorderRadiusTopRight(borderRadiusTopRight)"
125
135
  >
126
- <option disabled value="">Select</option>
136
+ <option disabled value="">{{ translate('Select') }}</option>
127
137
  <option
128
138
  v-for="borderRadiusTopRight in tailwindBorderRadius.roundedTopRight"
129
139
  :key="borderRadiusTopRight"
@@ -134,7 +144,7 @@ watch(
134
144
  </div>
135
145
  <div class="pbx-my-2 pbx-py-2">
136
146
  <label for="border-radius-bottom-left" class="pbx-myPrimaryInputLabel">
137
- Border Radius bottom left
147
+ {{ translate('Border Radius bottom left') }}
138
148
  </label>
139
149
  <select
140
150
  id="border-radius-bottom-left"
@@ -142,7 +152,7 @@ watch(
142
152
  class="pbx-myPrimarySelect"
143
153
  @change="pageBuilderService.handleBorderRadiusBottomleft(borderRadiusBottomleft)"
144
154
  >
145
- <option disabled value="">Select</option>
155
+ <option disabled value="">{{ translate('Select') }}</option>
146
156
  <option
147
157
  v-for="borderRadiusBottomleft in tailwindBorderRadius.roundedBottomLeft"
148
158
  :key="borderRadiusBottomleft"
@@ -153,7 +163,7 @@ watch(
153
163
  </div>
154
164
  <div class="pbx-my-2 pbx-py-2">
155
165
  <label for="border-radius-bottom-right" class="pbx-myPrimaryInputLabel">
156
- Border Radius bottom right
166
+ {{ translate('Border Radius bottom right') }}
157
167
  </label>
158
168
  <select
159
169
  id="border-radius-bottom-right"
@@ -161,7 +171,7 @@ watch(
161
171
  class="pbx-myPrimarySelect"
162
172
  @change="pageBuilderService.handleBorderRadiusBottomRight(borderRadiusBottomRight)"
163
173
  >
164
- <option disabled value="">Select</option>
174
+ <option disabled value="">{{ translate('Select') }}</option>
165
175
  <option
166
176
  v-for="borderRadiusBottomRight in tailwindBorderRadius.roundedBottomRight"
167
177
  :key="borderRadiusBottomRight"
@@ -6,6 +6,9 @@ import tailwindColors from '../../../../utils/builder/tailwaind-colors'
6
6
  import { Listbox, ListboxButton, ListboxOption, ListboxOptions } from '@headlessui/vue'
7
7
  import { sharedPageBuilderStore } from '../../../../stores/shared-store'
8
8
  import { getPageBuilder } from '../../../../composables/builderInstance'
9
+ import { useTranslations } from '../../../../composables/useTranslations'
10
+
11
+ const { translate } = useTranslations()
9
12
  const pageBuilderService = getPageBuilder()
10
13
 
11
14
  // Use shared store instance
@@ -52,19 +55,23 @@ watch(
52
55
 
53
56
  <template>
54
57
  <EditorAccordion>
55
- <template #title>Border Style, Width & Color</template>
58
+ <template #title>{{ translate('Border Style, Width & Color') }}</template>
56
59
  <template #content>
57
- <p class="pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4">Border</p>
60
+ <p class="pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4">
61
+ {{ translate('Border') }}
62
+ </p>
58
63
 
59
64
  <div class="pbx-my-2 pbx-py-2">
60
- <label for="border-style" class="pbx-myPrimaryInputLabel"> Border Style </label>
65
+ <label for="border-style" class="pbx-myPrimaryInputLabel">{{
66
+ translate('Border Style')
67
+ }}</label>
61
68
  <select
62
69
  id="border-style"
63
70
  v-model="borderStyle"
64
71
  class="pbx-myPrimarySelect"
65
72
  @change="pageBuilderService.handleBorderStyle(borderStyle)"
66
73
  >
67
- <option disabled value="">Select</option>
74
+ <option disabled value="">{{ translate('Select') }}</option>
68
75
  <option
69
76
  v-for="borderStyle in tailwindBorderStyleWidthPlusColor.borderStyle"
70
77
  :key="borderStyle"
@@ -74,14 +81,16 @@ watch(
74
81
  </select>
75
82
  </div>
76
83
  <div class="pbx-my-2 pbx-py-2">
77
- <label for="border-width" class="pbx-myPrimaryInputLabel"> Border Width </label>
84
+ <label for="border-width" class="pbx-myPrimaryInputLabel">{{
85
+ translate('Border Width')
86
+ }}</label>
78
87
  <select
79
88
  id="border-width"
80
89
  v-model="borderWidth"
81
90
  class="pbx-myPrimarySelect"
82
91
  @change="pageBuilderService.handleBorderWidth(borderWidth)"
83
92
  >
84
- <option disabled value="">Select</option>
93
+ <option disabled value="">{{ translate('Select') }}</option>
85
94
  <option
86
95
  v-for="borderWidth in tailwindBorderStyleWidthPlusColor.borderWidth"
87
96
  :key="borderWidth"
@@ -91,7 +100,9 @@ watch(
91
100
  </select>
92
101
  </div>
93
102
 
94
- <label for="border-color" class="pbx-myPrimaryInputLabel"> Border Color </label>
103
+ <label for="border-color" class="pbx-myPrimaryInputLabel">{{
104
+ translate('Border Color')
105
+ }}</label>
95
106
  <Listbox as="div" v-model="borderColor">
96
107
  <div class="pbx-relative pbx-mt-2">
97
108
  <ListboxButton class="pbx-myPrimarySelect" id="border-color">
@@ -121,7 +132,7 @@ watch(
121
132
  leave-to-class="pbx-opacity-0"
122
133
  >
123
134
  <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 list-none p-0 m-0"
135
+ 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-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm pbx-list-none pbx-p-0 pbx-m-0"
125
136
  >
126
137
  <ListboxOption
127
138
  as="template"
@@ -151,7 +162,9 @@ watch(
151
162
  class="pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950"
152
163
  :class="`pbx-bg-${color.replace('pbx-border-', '')}`"
153
164
  ></div>
154
- <span v-if="color === 'none'" class="pbx-ml-3">Transparent</span>
165
+ <span v-if="color === 'none'" class="pbx-ml-3">{{
166
+ translate('Transparent')
167
+ }}</span>
155
168
  <span v-if="color !== 'none'" class="pbx-ml-3">{{ color }}</span>
156
169
  </div>
157
170
  </li>
@@ -3,6 +3,9 @@ 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'
6
+ import { useTranslations } from '../../../../composables/useTranslations'
7
+
8
+ const { translate } = useTranslations()
6
9
 
7
10
  const pageBuilderService = getPageBuilder()
8
11
 
@@ -50,11 +53,14 @@ const handleAddClasses = async () => {
50
53
 
51
54
  <template>
52
55
  <EditorAccordion>
53
- <template #title>Generated CSS</template>
56
+ <template #title>{{ translate('Generated CSS') }}</template>
54
57
  <template #content>
55
58
  <label class="pbx-myPrimaryInputLabel pbx-my-4">
56
- This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the
57
- selected element.
59
+ {{
60
+ translate(
61
+ 'This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.',
62
+ )
63
+ }}
58
64
  </label>
59
65
 
60
66
  <div class="pbx-flex pbx-flex-row pbx-flex-wrap pbx-gap-2 pbx-mt-2 pbx-mb-4">
@@ -79,22 +85,24 @@ const handleAddClasses = async () => {
79
85
 
80
86
  <div>
81
87
  <label for="custom-css" class="pbx-myPrimaryInputLabel">
82
- Add your CSS.
88
+ {{ translate('Add your CSS.') }}
83
89
  <br />
84
- The pbx- prefix is added automatically.
90
+ {{ translate('The pbx- prefix is added automatically.') }}
85
91
  </label>
86
92
  <div class="pbx-flex pbx-gap-2 pbx-item-center">
87
93
  <input
88
94
  id="custom-css"
89
95
  v-model="inputClass"
90
96
  type="text"
91
- placeholder="Type class"
97
+ :placeholder="translate('Type class')"
92
98
  @keydown.enter="handleAddClasses()"
93
99
  autocomplete="off"
94
100
  class="pbx-myPrimaryInput"
95
101
  />
96
102
 
97
- <button @click="handleAddClasses" type="button" class="pbx-myPrimaryButton">Add</button>
103
+ <button @click="handleAddClasses" type="button" class="pbx-myPrimaryButton">
104
+ {{ translate('Add') }}
105
+ </button>
98
106
  </div>
99
107
  </div>
100
108
  <p v-if="errorMessage" class="pbx-myPrimaryInputError">{{ errorMessage }}</p>
@@ -2,6 +2,10 @@
2
2
  import DynamicModalBuilder from '../../../Modals/DynamicModalBuilder.vue'
3
3
  import { computed, ref } from 'vue'
4
4
  import { getPageBuilder } from '../../../../composables/builderInstance'
5
+ import { useTranslations } from '../../../../composables/useTranslations'
6
+
7
+ const { translate } = useTranslations()
8
+
5
9
  const pageBuilderService = getPageBuilder()
6
10
 
7
11
  const showModalDeleteComponent = ref(false)
@@ -23,11 +27,11 @@ const handleDelete = function () {
23
27
  showModalDeleteComponent.value = true
24
28
  typeModal.value = 'delete'
25
29
  gridColumnModal.value = 2
26
- titleModal.value = 'Remove Component?'
27
- descriptionModal.value = 'Are you sure you want to remove this Component?'
28
- firstButtonModal.value = 'Close'
30
+ titleModal.value = translate('Remove Component?')
31
+ descriptionModal.value = translate('Are you sure you want to remove this Component?')
32
+ firstButtonModal.value = translate('Close')
29
33
  secondButtonModal.value = null
30
- thirdButtonModal.value = 'Delete'
34
+ thirdButtonModal.value = translate('Delete')
31
35
 
32
36
  // handle click
33
37
  firstModalButtonFunctionDynamicModalBuilder.value = function () {
@@ -74,14 +78,14 @@ const handleDelete = function () {
74
78
  <button
75
79
  type="button"
76
80
  @click="pageBuilderService.reorderComponent(-1)"
77
- 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"
81
+ 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"
78
82
  >
79
83
  <span class="material-symbols-outlined"> move_up </span>
80
84
  </button>
81
85
  <button
82
86
  type="button"
83
87
  @click="pageBuilderService.reorderComponent(1)"
84
- 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"
88
+ 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"
85
89
  >
86
90
  <span class="material-symbols-outlined"> move_down </span>
87
91
  </button>
@@ -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 list-none p-0 m-0"
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-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm pbx-list-none pbx-p-0 pbx-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 list-none p-0 m-0"
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-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm pbx-list-none pbx-p-0 pbx-m-0"
70
70
  >
71
71
  <ListboxOption
72
72
  as="template"
@@ -4,6 +4,9 @@ import { sharedPageBuilderStore } from '../../../../stores/shared-store'
4
4
  import EditorAccordion from '../EditorAccordion.vue'
5
5
  import tailwindPaddingPlusMargin from '../../../../utils/builder/tailwind-padding-margin'
6
6
  import { getPageBuilder } from '../../../../composables/builderInstance'
7
+ import { useTranslations } from '../../../../composables/useTranslations'
8
+
9
+ const { translate } = useTranslations()
7
10
  const pageBuilderService = getPageBuilder()
8
11
 
9
12
  // Use shared store instance
@@ -61,17 +64,19 @@ watch(
61
64
  </script>
62
65
  <template>
63
66
  <EditorAccordion>
64
- <template #title>Margin</template>
67
+ <template #title>{{ translate('Margin') }}</template>
65
68
  <template #content>
66
69
  <div class="pbx-my-2 pbx-py-2">
67
- <label for="vertical-margin" class="pbx-myPrimaryInputLabel"> Vertical Margin </label>
70
+ <label for="vertical-margin" class="pbx-myPrimaryInputLabel">{{
71
+ translate('Vertical Margin')
72
+ }}</label>
68
73
  <select
69
74
  id="vertical-margin"
70
75
  v-model="fontVerticalMargin"
71
76
  class="pbx-myPrimarySelect"
72
77
  @change="pageBuilderService.handleVerticalMargin(fontVerticalMargin)"
73
78
  >
74
- <option disabled value="">Select</option>
79
+ <option disabled value="">{{ translate('Select') }}</option>
75
80
  <option
76
81
  v-for="verticalMargin in tailwindPaddingPlusMargin.verticalMargin"
77
82
  :key="verticalMargin"
@@ -82,14 +87,16 @@ watch(
82
87
  </div>
83
88
  <hr />
84
89
  <div class="pbx-my-2 pbx-py-2">
85
- <label for="horizontal-margin" class="pbx-myPrimaryInputLabel"> Horizontal Margin </label>
90
+ <label for="horizontal-margin" class="pbx-myPrimaryInputLabel">{{
91
+ translate('Horizontal Margin')
92
+ }}</label>
86
93
  <select
87
94
  id="horizontal-margin"
88
95
  v-model="fontHorizontalMargin"
89
96
  class="pbx-myPrimarySelect"
90
97
  @change="pageBuilderService.handleHorizontalMargin(fontHorizontalMargin)"
91
98
  >
92
- <option disabled value="">Select</option>
99
+ <option disabled value="">{{ translate('Select') }}</option>
93
100
  <option
94
101
  v-for="horizontalMargin in tailwindPaddingPlusMargin.horizontalMargin"
95
102
  :key="horizontalMargin"
@@ -2,11 +2,14 @@
2
2
  import EditorAccordion from '../EditorAccordion.vue'
3
3
  import ManageBackgroundOpacity from './ManageBackgroundOpacity.vue'
4
4
  import ManageOpacity from './ManageOpacity.vue'
5
+ import { useTranslations } from '../../../../composables/useTranslations'
6
+
7
+ const { translate } = useTranslations()
5
8
  </script>
6
9
 
7
10
  <template>
8
11
  <EditorAccordion>
9
- <template #title>Opacity & Transparency </template>
12
+ <template #title>{{ translate('Opacity & Transparency') }}</template>
10
13
  <template #content>
11
14
  <ManageOpacity></ManageOpacity>
12
15
  <hr />