@myissue/vue-website-page-builder 3.3.90 → 3.3.92

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 (35) hide show
  1. package/README.md +58 -21
  2. package/dist/{ar-ITBqBm-d.js → ar-7SHqp8Wu.js} +44 -40
  3. package/dist/{de-BJpPaS11.js → de-BqPxfNSH.js} +34 -30
  4. package/dist/{en-B_2bnBr-.js → en-DJriivpm.js} +41 -37
  5. package/dist/{es-whPPQx5J.js → es-DFK5Ddk2.js} +51 -47
  6. package/dist/{fr-BT4veodQ.js → fr-8Y1jH_zD.js} +47 -43
  7. package/dist/{hi-ebTmcUsS.js → hi-CAUlTFgq.js} +53 -49
  8. package/dist/{ja-BRtI2tes.js → ja-pz4uHxB3.js} +38 -34
  9. package/dist/{pt-DcvtSuUT.js → pt-DieK86-G.js} +38 -34
  10. package/dist/{ru-Q6PD0n2W.js → ru-MPhaLer-.js} +30 -26
  11. package/dist/style.css +1 -1
  12. package/dist/vue-website-page-builder.js +3495 -3082
  13. package/dist/vue-website-page-builder.umd.cjs +39 -39
  14. package/dist/{zh-Hans-CZQ2JK7v.js → zh-Hans-BEWY32Aq.js} +44 -40
  15. package/package.json +1 -1
  16. package/src/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue +2 -2
  17. package/src/Components/PageBuilder/EditorMenu/Editables/HTMLEditor.vue +88 -0
  18. package/src/Components/PageBuilder/EditorMenu/Editables/StyleEditor.vue +2 -2
  19. package/src/Components/PageBuilder/EditorMenu/EditorAccordion.vue +2 -2
  20. package/src/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue +30 -26
  21. package/src/Components/TipTap/TipTap.vue +1 -1
  22. package/src/PageBuilder/PageBuilder.vue +13 -19
  23. package/src/composables/builderInstance.ts +30 -5
  24. package/src/css/style.css +2 -2
  25. package/src/locales/ar.json +5 -3
  26. package/src/locales/de.json +5 -4
  27. package/src/locales/en.json +5 -1
  28. package/src/locales/es.json +5 -4
  29. package/src/locales/fr.json +5 -4
  30. package/src/locales/hi.json +6 -4
  31. package/src/locales/ja.json +6 -4
  32. package/src/locales/pt.json +5 -4
  33. package/src/locales/ru.json +6 -5
  34. package/src/locales/zh-Hans.json +5 -3
  35. package/src/services/PageBuilderService.ts +425 -76
@@ -1,4 +1,4 @@
1
- const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s = "样式", i = "排版", r = "选择", l = "内边距", d = "边距", c = "全局", p = "具体", u = "边框", g = "透明", m = "添加", y = "属性", h = "值", T = "关闭", S = "编辑", C = "删除", w = "预览", b = "移动", f = "加粗", v = "链接", L = "列表", H = "搜索", M = "横向", D = "纵向", B = "方形", P = "图片", k = "上一页", A = "下一页", x = "信息", I = "文本", E = "类型", F = "数组", R = "内容", V = "元素", z = "组件", q = "全部", U = "图片", W = {
1
+ const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s = "样式", i = "排版", r = "选择", l = "内边距", d = "边距", c = "全局", u = "具体", p = "边框", g = "透明", m = "添加", h = "属性", y = "值", T = "关闭", S = "编辑", C = "删除", w = "预览", f = "移动", v = "加粗", b = "列表", L = "搜索", H = "横向", M = "纵向", D = "方形", B = "图片", k = "上一页", P = "下一页", A = "信息", I = "文本", x = "链接", E = "类型", F = "数组", R = "内容", V = "元素", W = "组件", z = "全部", q = "图片", U = {
2
2
  "Reset Page": "重置页面",
3
3
  "Global Page Styles": "全局页面样式",
4
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集成,它是您所需的一切——集成在一个无缝的构建器中。几分钟内构建令人惊叹的页面。",
@@ -48,13 +48,13 @@ const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s =
48
48
  "Horizontal Margin": "水平边距",
49
49
  "Border Radius": "边框半径",
50
50
  Global: c,
51
- Specific: p,
51
+ Specific: u,
52
52
  "Border Radius top left": "边框半径 左上",
53
53
  "Border Radius top right": "边框半径 右上",
54
54
  "Border Radius bottom left": "边框半径 左下",
55
55
  "Border Radius bottom right": "边框半径 右下",
56
56
  "Border Style, Width & Color": "边框样式、宽度和颜色",
57
- Border: u,
57
+ Border: p,
58
58
  "Border Style": "边框样式",
59
59
  "Border Width": "边框宽度",
60
60
  "Border Color": "边框颜色",
@@ -68,8 +68,8 @@ const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s =
68
68
  "Inline Styles": "内联样式",
69
69
  "These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.": "这些是构建器应用的内联样式。添加您自己的样式,然后按 Enter 将其应用于选定的元素。",
70
70
  "Add your own style.": "添加您自己的样式。",
71
- property: y,
72
- value: h,
71
+ property: h,
72
+ value: y,
73
73
  Close: T,
74
74
  Editing: S,
75
75
  "Loading...": "加载中...",
@@ -81,7 +81,7 @@ const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s =
81
81
  Delete: C,
82
82
  "Add to the bottom": "添加到底部",
83
83
  Preview: w,
84
- Mobile: b,
84
+ Mobile: f,
85
85
  "Demo Content": "演示内容",
86
86
  "Demo Description": "介绍轻量级和免费的Vue Click & Drop页面构建器。使用Vue轻松创建和增强数字体验。并非所有强大的东西都需要复杂。这款简约轻便的页面构建器提供了一个优雅直观的界面,专注于简单性和速度。创建完全响应式的页面,例如列表、职位板或博客文章,并使用免费的Click & Drop页面构建器轻松管理您的内容。",
87
87
  "Demo Title": "令人惊叹的页面的网页构建器",
@@ -93,11 +93,10 @@ const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s =
93
93
  "Edit text and links": "编辑文本和链接",
94
94
  "Enter URL": "输入URL",
95
95
  "Line break": "换行",
96
- Bold: f,
97
- Link: v,
96
+ Bold: v,
98
97
  "Header 2": "标题2",
99
98
  "Header 3": "标题3",
100
- List: L,
99
+ List: b,
101
100
  "Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.": "添加一个有效的URL,将选定的文本转换为可点击的超链接,指向指定的网页地址。",
102
101
  "Select image": "选择图片",
103
102
  "Manage Content": "管理内容",
@@ -105,20 +104,20 @@ const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s =
105
104
  "Reset changes": "重置更改",
106
105
  "Do you want to reset this page?": "您想重置此页面吗?",
107
106
  "Are you sure you want to reset this page? This will overwrite your current changes.": "您确定要重置此页面吗?这将覆盖您当前的更改。",
108
- Search: H,
107
+ Search: L,
109
108
  "Search...": "搜索...",
110
- Landscape: M,
111
- Portrait: D,
112
- Squarish: B,
109
+ Landscape: H,
110
+ Portrait: M,
111
+ Squarish: D,
113
112
  "Total pages": "总页数",
114
- Images: P,
113
+ Images: B,
115
114
  "First page": "第一页",
116
115
  Prev: k,
117
- Next: A,
116
+ Next: P,
118
117
  "By:": "作者:",
119
118
  "We did not find any images. Make a new search.": "我们没有找到任何图片。请重新搜索。",
120
119
  "No results on current page. Navigate to First Page.": "当前页面没有结果。导航到第一页。",
121
- Information: x,
120
+ Information: A,
122
121
  "From:": "来自:",
123
122
  " Select image": " 选择图片",
124
123
  "Layouts and visual.": "布局和视觉。",
@@ -129,7 +128,6 @@ const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s =
129
128
  "Three Square Images": "三张方形图片",
130
129
  "Six Square Images Grid": "六张方形图片网格",
131
130
  "Three Vertical Images": "三张竖直图片",
132
- "Four Square Images With Text": "四张带文字的方形图片",
133
131
  "Three Square Images With Text": "三张方形图片和文字",
134
132
  "Two Square Images With Text": "两张方形图片和文字",
135
133
  Text: I,
@@ -137,6 +135,7 @@ const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s =
137
135
  "Header H3": "标题 H3",
138
136
  "YouTube Video": "YouTube 视频",
139
137
  "Break Divider": "分隔线",
138
+ Link: x,
140
139
  "Selected HTML": "选定的HTML",
141
140
  "Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.": "所选元素、组件和组件的概述。本节根据您的HTML选择提供实时更新。",
142
141
  Types: E,
@@ -146,7 +145,7 @@ const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s =
146
145
  array: F,
147
146
  Content: R,
148
147
  Element: V,
149
- Component: z,
148
+ Component: W,
150
149
  "Components added": "添加的组件",
151
150
  "No Element selected": "未选择元素",
152
151
  "Selected HTML:": "选定的HTML:",
@@ -157,43 +156,48 @@ const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s =
157
156
  "Title:": "标题:",
158
157
  "HTML Code:": "HTML代码:",
159
158
  "No Components added yet": "尚未添加组件",
160
- All: q,
161
- Image: U,
159
+ All: z,
160
+ Image: q,
162
161
  "Image & Text": "图片和文字",
163
- "Four Square Images": "四张方形图片"
162
+ "Four Square Images With Text": "四张带文字的方形图片",
163
+ "Four Square Images": "四张方形图片",
164
+ "Continue Your Work?": "继续您的工作?",
165
+ "We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?": "我们注意到您上次有一些更改没有保存。您是想从上次离开的地方继续,还是使用当前从数据库加载的版本?",
166
+ "Use Saved Version": "使用保存的版本",
167
+ "Continue Where I Left Off": "从我离开的地方继续"
164
168
  };
165
169
  export {
166
170
  m as Add,
167
- q as All,
168
- f as Bold,
169
- u as Border,
171
+ z as All,
172
+ v as Bold,
173
+ p as Border,
170
174
  T as Close,
171
- z as Component,
175
+ W as Component,
172
176
  R as Content,
173
177
  C as Delete,
174
178
  S as Editing,
175
179
  V as Element,
176
180
  c as Global,
177
- U as Image,
178
- P as Images,
179
- x as Information,
180
- M as Landscape,
181
- v as Link,
182
- L as List,
181
+ q as Image,
182
+ B as Images,
183
+ A as Information,
184
+ H as Landscape,
185
+ x as Link,
186
+ b as List,
183
187
  d as Margin,
184
- b as Mobile,
185
- A as Next,
188
+ f as Mobile,
189
+ P as Next,
186
190
  t as Options,
187
191
  l as Padding,
188
- D as Portrait,
192
+ M as Portrait,
189
193
  k as Prev,
190
194
  w as Preview,
191
195
  n as Publish,
192
196
  e as Save,
193
- H as Search,
197
+ L as Search,
194
198
  r as Select,
195
- p as Specific,
196
- B as Squarish,
199
+ u as Specific,
200
+ D as Squarish,
197
201
  s as Styles,
198
202
  I as Text,
199
203
  g as Transparent,
@@ -202,7 +206,7 @@ export {
202
206
  F as array,
203
207
  o as avatar,
204
208
  a as component,
205
- W as default,
206
- y as property,
207
- h as value
209
+ U as default,
210
+ h as property,
211
+ y as value
208
212
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myissue/vue-website-page-builder",
3
- "version": "3.3.90",
3
+ "version": "3.3.92",
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",
@@ -55,13 +55,13 @@ const handleAddClasses = async () => {
55
55
  <EditorAccordion>
56
56
  <template #title>{{ translate('Generated CSS') }}</template>
57
57
  <template #content>
58
- <label class="pbx-myPrimaryInputLabel pbx-my-4">
58
+ <p class="pbx-myPrimaryInputLabel pbx-my-4">
59
59
  {{
60
60
  translate(
61
61
  'This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.',
62
62
  )
63
63
  }}
64
- </label>
64
+ </p>
65
65
 
66
66
  <div class="pbx-flex pbx-flex-row pbx-flex-wrap pbx-gap-2 pbx-mt-2 pbx-mb-4">
67
67
  <div
@@ -0,0 +1,88 @@
1
+ <script setup>
2
+ import { ref, computed } from 'vue'
3
+ import { sharedPageBuilderStore } from '../../../../stores/shared-store'
4
+ import ModalBuilder from '../../../../Components/Modals/ModalBuilder.vue'
5
+ import EditorAccordion from '../EditorAccordion.vue'
6
+ import { getPageBuilder } from '../../../../composables/builderInstance'
7
+ import { useTranslations } from '../../../../composables/useTranslations'
8
+
9
+ const pageBuilderService = getPageBuilder()
10
+ const pageBuilderStateStore = sharedPageBuilderStore
11
+ const { translate } = useTranslations()
12
+
13
+ const getElement = computed(() => pageBuilderStateStore.getElement)
14
+
15
+ const elementHTML = computed(() => {
16
+ if (!getElement.value || !(getElement.value instanceof HTMLElement)) {
17
+ return ''
18
+ }
19
+ return getElement.value.outerHTML
20
+ })
21
+
22
+ const showModalHTMLEditor = ref(false)
23
+
24
+ const editableHtml = ref('')
25
+
26
+ const handleShowHTMLEditor = () => {
27
+ editableHtml.value = elementHTML.value
28
+ showModalHTMLEditor.value = true
29
+ }
30
+
31
+ const handleCloseHTMLEditor = () => {
32
+ showModalHTMLEditor.value = false
33
+ }
34
+
35
+ const handleSaveChanges = () => {
36
+ pageBuilderService.applyModifiedHTML(editableHtml.value)
37
+
38
+ showModalHTMLEditor.value = true
39
+ }
40
+ </script>
41
+ <template>
42
+ <EditorAccordion>
43
+ <template #title>{{ translate('HTML Editor') }}</template>
44
+ <template #content>
45
+ <div class="pbx-my-2 pbx-py-2">
46
+ <label for="vertical-margin" class="pbx-myPrimaryInputLabel">{{
47
+ translate(
48
+ 'Gain full control over individual components by editing the raw HTML of any selected element. This feature empowers advanced users to fine-tune the HTML structure,',
49
+ )
50
+ }}</label>
51
+ <hr />
52
+ </div>
53
+ <button @click="handleShowHTMLEditor" type="button" class="pbx-myPrimaryButton">
54
+ {{ translate('HTML Editor') }}
55
+ </button>
56
+ </template>
57
+ </EditorAccordion>
58
+ <ModalBuilder
59
+ maxWidth="7xl"
60
+ minHeight="pbx-min-h-[65vh] pbx-max-h-[65vh]"
61
+ :showModalBuilder="showModalHTMLEditor"
62
+ :title="translate('HTML Editor')"
63
+ @closeMainModalBuilder="handleCloseHTMLEditor"
64
+ >
65
+ <textarea
66
+ id="html-editor"
67
+ v-model="editableHtml"
68
+ class="pbx-h-full pbx-font-sans pbx-bg-gray-900 pbx-text-white pbx-w-full"
69
+ style="overflow: auto; min-height: 400px"
70
+ ></textarea>
71
+ <div
72
+ class="pbx-border-0 pbx-border-solid pbx-border-t pbx-border-gray-200 pbx-mt-4 pbx-flex pbx-items-center pbx-justify-end"
73
+ >
74
+ <div class="pbx-py-4 pbx-flex sm:pbx-justify-end pbx-justify-center">
75
+ <div
76
+ class="sm:pbx-grid-cols-2 sm:pbx-items-end sm:pbx-justify-end pbx-flex sm:pbx-flex-row pbx-flex-col pbx-myPrimaryGap sm:pbx-w-5/6 pbx-w-full"
77
+ >
78
+ <button @click="handleCloseHTMLEditor" type="button" class="pbx-mySecondaryButton">
79
+ {{ translate('Close') }}
80
+ </button>
81
+ <button @click="handleSaveChanges" type="button" class="pbx-myPrimaryButton">
82
+ {{ translate('Save') }}
83
+ </button>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ </ModalBuilder>
88
+ </template>
@@ -60,13 +60,13 @@ const handleAddStyle = async () => {
60
60
  <EditorAccordion>
61
61
  <template #title>{{ translate('Inline Styles') }}</template>
62
62
  <template #content>
63
- <label class="pbx-myPrimaryInputLabel pbx-my-4">
63
+ <p class="pbx-myPrimaryInputLabel pbx-my-4">
64
64
  {{
65
65
  translate(
66
66
  'These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.',
67
67
  )
68
68
  }}
69
- </label>
69
+ </p>
70
70
 
71
71
  <div class="pbx-flex pbx-flex-row pbx-flex-wrap pbx-gap-2 pbx-mt-2 pbx-mb-4">
72
72
  <div
@@ -4,7 +4,7 @@
4
4
  :class="{ '': expanded }"
5
5
  >
6
6
  <div
7
- 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"
7
+ 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 pbx-bg-white hover:pbx-bg-myPrimaryLightGrayColor"
8
8
  @click="expanded = !expanded"
9
9
  >
10
10
  <p class="pbx-myPrimaryParagraph pbx-font-medium pbx-my-0 pbx-py-0">
@@ -19,7 +19,7 @@
19
19
  </template>
20
20
  </div>
21
21
  <div
22
- :class="[expanded ? 'pbx-block' : 'pbx-hidden']"
22
+ :class="[expanded ? 'pbx-block pbx-bg-sky-50' : 'pbx-hidden']"
23
23
  class="pbx-px-4 pbx-ease-linear pbx-duration-75 pbx-pb-8"
24
24
  >
25
25
  <slot name="content" />
@@ -16,6 +16,7 @@ import LinkEditor from './Editables/LinkEditor.vue'
16
16
  import TipTap from '../../TipTap/TipTap.vue'
17
17
  import EditGetElement from './Editables/EditGetElement.vue'
18
18
  import ElementEditor from './Editables/ElementEditor.vue'
19
+ import HTMLEditor from './Editables/HTMLEditor.vue'
19
20
  import { getPageBuilder } from '../../../composables/builderInstance'
20
21
  import EditorAccordion from '../EditorMenu/EditorAccordion.vue'
21
22
  import fullHTMLContent from '../../../utils/builder/html-doc-declaration-with-components'
@@ -154,45 +155,48 @@ const handleCloseGlobalPageStyles = async function () {
154
155
  <article class="pbx-mb-1">
155
156
  <TipTap></TipTap>
156
157
  </article>
157
- <article class="pbx-my-1 pbx-bg-white">
158
+ <article class="pbx-my-1">
158
159
  <Typography></Typography>
159
160
  </article>
160
161
 
161
- <article class="pbx-my-1 pbx-bg-white">
162
+ <article class="pbx-my-1">
162
163
  <OpacityEditor> </OpacityEditor>
163
164
  </article>
164
- <article class="pbx-my-1 pbx-bg-white">
165
+ <article class="pbx-my-1">
165
166
  <Padding> </Padding>
166
167
  </article>
167
- <article class="pbx-my-1 pbx-bg-white">
168
+ <article class="pbx-my-1">
168
169
  <Margin> </Margin>
169
170
  </article>
170
- <article class="pbx-my-1 pbx-bg-white">
171
+ <article class="pbx-my-1">
171
172
  <BorderRadius></BorderRadius>
172
173
  </article>
173
- <article class="pbx-my-1 pbx-bg-white">
174
+ <article class="pbx-my-1">
174
175
  <Borders></Borders>
175
176
  </article>
176
- <article class="pbx-my-1 pbx-bg-white">
177
+ <article class="pbx-my-1">
177
178
  <ClassEditor></ClassEditor>
178
179
  </article>
179
- <article class="pbx-my-1 pbx-bg-white">
180
+ <article class="pbx-my-1">
180
181
  <StyleEditor></StyleEditor>
181
182
  </article>
183
+ <article class="pbx-my-1">
184
+ <HTMLEditor></HTMLEditor>
185
+ </article>
182
186
  </div>
183
187
 
184
188
  <!-- Global Page Styles -->
185
- <article class="pbx-my-1 pbx-bg-white">
189
+ <article class="pbx-my-1">
186
190
  <EditorAccordion>
187
191
  <template #title>{{ translate('Global Page Styles') }}</template>
188
192
  <template #content>
189
- <label class="pbx-myPrimaryInputLabel pbx-my-4">
193
+ <p class="pbx-myPrimaryInputLabel pbx-my-4">
190
194
  {{
191
195
  translate(
192
196
  '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.',
193
197
  )
194
198
  }}
195
- </label>
199
+ </p>
196
200
 
197
201
  <hr />
198
202
  <div class="pbx-my-2 pbx-py-2">
@@ -206,20 +210,17 @@ const handleCloseGlobalPageStyles = async function () {
206
210
  <!-- Global Page Styles -->
207
211
 
208
212
  <!-- Download Layout HTML -->
209
- <article
210
- v-if="Array.isArray(getComponents) && getComponents.length >= 1"
211
- class="pbx-my-1 pbx-bg-white"
212
- >
213
+ <article v-if="Array.isArray(getComponents) && getComponents.length >= 1" class="pbx-my-1">
213
214
  <EditorAccordion>
214
215
  <template #title>{{ translate('Download HTML') }}</template>
215
216
  <template #content>
216
- <label class="pbx-myPrimaryInputLabel pbx-my-4">
217
+ <p class="pbx-myPrimaryInputLabel pbx-my-4">
217
218
  {{
218
219
  translate(
219
220
  '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.',
220
221
  )
221
222
  }}
222
- </label>
223
+ </p>
223
224
  <hr />
224
225
  <div class="pbx-my-2 pbx-py-2">
225
226
  <button @click="handleDownloadHTML" type="button" class="pbx-myPrimaryButton">
@@ -261,33 +262,36 @@ const handleCloseGlobalPageStyles = async function () {
261
262
  )
262
263
  }}
263
264
  </p>
264
- <article class="pbx-my-1 pbx-bg-gray-100">
265
+ <article class="pbx-my-1">
265
266
  <Typography></Typography>
266
267
  </article>
267
- <article class="pbx-my-1 pbx-bg-gray-100">
268
+ <article class="pbx-my-1">
268
269
  <TextColorEditor :globalPageLayout="true"></TextColorEditor>
269
270
  </article>
270
- <article class="pbx-my-1 pbx-bg-gray-100">
271
+ <article class="pbx-my-1">
271
272
  <BackgroundColorEditor :globalPageLayout="true"></BackgroundColorEditor>
272
273
  </article>
273
- <article class="pbx-my-1 pbx-bg-gray-100">
274
+ <article class="pbx-my-1">
274
275
  <Padding> </Padding>
275
276
  </article>
276
- <article class="pbx-my-1 pbx-bg-gray-100">
277
+ <article class="pbx-my-1">
277
278
  <Margin> </Margin>
278
279
  </article>
279
- <article class="pbx-my-1 pbx-bg-gray-100">
280
+ <article class="pbx-my-1">
280
281
  <BorderRadius></BorderRadius>
281
282
  </article>
282
- <article class="pbx-my-1 pbx-bg-gray-100">
283
+ <article class="pbx-my-1">
283
284
  <Borders></Borders>
284
285
  </article>
285
- <article class="pbx-my-1 pbx-bg-gray-100">
286
+ <article class="pbx-my-1">
286
287
  <ClassEditor></ClassEditor>
287
288
  </article>
288
- <article class="pbx-my-1 pbx-bg-gray-100">
289
+ <article class="pbx-my-1">
289
290
  <StyleEditor></StyleEditor>
290
291
  </article>
292
+ <article class="pbx-my-1">
293
+ <HTMLEditor></HTMLEditor>
294
+ </article>
291
295
  </div>
292
296
  </div>
293
297
  </div>
@@ -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') }}
@@ -253,12 +253,13 @@ const handlerRumeEditingForUpdate = async function () {
253
253
  typeModal.value = 'warning'
254
254
  showModalResumeEditing.value = true
255
255
 
256
- titleModalResumeEditing.value = 'Continue Your Work?'
257
- descriptionModalResumeEditing.value =
258
- 'We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?'
259
- firstButtonResumeEditing.value = 'Use Saved Version'
256
+ titleModalResumeEditing.value = translate('Continue Your Work?')
257
+ descriptionModalResumeEditing.value = translate(
258
+ 'We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?',
259
+ )
260
+ firstButtonResumeEditing.value = translate('Use Saved Version')
260
261
  secondButtonResumeEditing.value = null
261
- thirdButtonResumeEditing.value = 'Continue Where I Left Off'
262
+ thirdButtonResumeEditing.value = translate('Continue Where I Left Off')
262
263
 
263
264
  firstModalButtonResumeEditingFunction.value = async function () {
264
265
  pageBuilderStateStore.setHasLocalDraftForUpdate(false)
@@ -514,7 +515,7 @@ onMounted(async () => {
514
515
 
515
516
  <div
516
517
  id="pagebuilder-navbar"
517
- 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"
518
+ 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"
518
519
  >
519
520
  <template
520
521
  v-if="
@@ -530,7 +531,7 @@ onMounted(async () => {
530
531
  await pageBuilderService.clearHtmlSelection()
531
532
  }
532
533
  "
533
- class="pbx-flex pbx-justify-start pbx-py-2"
534
+ class="pbx-flex pbx-justify-start pbx-py-2 lg:pbx-ml-4 pbx-ml-2"
534
535
  >
535
536
  <img class="pbx-h-6" :src="getPageBuilderConfig.pageBuilderLogo.src" alt="Logo" />
536
537
  </div>
@@ -742,15 +743,6 @@ onMounted(async () => {
742
743
  </button>
743
744
  </div>
744
745
  </template>
745
- <template
746
- v-if="
747
- getPageBuilderConfig &&
748
- getPageBuilderConfig.userSettings &&
749
- getPageBuilderConfig.userSettings.language
750
- "
751
- >
752
- </template>
753
-
754
746
  <!-- Publish buttons end -->
755
747
 
756
748
  <template
@@ -768,7 +760,9 @@ onMounted(async () => {
768
760
  getPageBuilderConfig.userSettings.language
769
761
  "
770
762
  >
771
- <div class="pbx-flex-1 pbx-flex pbx-justify-end pbx-items-center pbx-ml-2">
763
+ <div
764
+ class="pbx-flex-1 pbx-flex pbx-justify-end pbx-items-center pbx-ml-2 lg:pbx-mr-4 pbx-mr-2"
765
+ >
772
766
  <select
773
767
  id="pbx-lang"
774
768
  class="pbx-myPrimarySelect pbx-min-w-20 pbx-max-w-2pbx-min-w-20 pbx-w-max"
@@ -831,7 +825,7 @@ onMounted(async () => {
831
825
  <!-- Page Builder Main Start -->
832
826
  <div
833
827
  id="pagebuilder-main"
834
- 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"
828
+ 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"
835
829
  >
836
830
  <!-- Left Menu Start -->
837
831
  <div
@@ -959,7 +953,7 @@ onMounted(async () => {
959
953
  <!-- Footer Start -->
960
954
  <div
961
955
  id="pagebuilder-footer"
962
- 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"
956
+ 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"
963
957
  >
964
958
  <div
965
959
  @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
+ }
package/src/css/style.css CHANGED
@@ -321,7 +321,7 @@
321
321
  @apply pbx-block pbx-pr-8 pbx-text-left pbx-bg-white pbx-w-auto sm:pbx-text-sm pbx-font-normal pbx-text-myPrimaryDarkGrayColor placeholder:pbx-font-normal placeholder:pbx-accent-gray-300 focus:pbx-bg-white pbx-rounded-md pbx-py-3 pbx-px-3 pbx-border pbx-border-gray-300 pbx-shadow-sm focus:pbx-outline-none pbx-myPrimaryFormFocus pbx-h-full pbx-border-solid;
322
322
  }
323
323
  .pbx-myPrimaryInputNoBorder {
324
- @apply pbx-myPrimaryInput pbx-placeholder:accent-gray-300 focus:pbx-bg-none pbx-rounded-md pbx-py-3 pbx-px-3 pbx-border-none focus:pbx-outline-none focus:pbx-ring-0 focus:pbx-ring-offset-0 focus:pbx-border-none pbx-shadow-none;
324
+ @apply pbx-myPrimaryInput placeholder:pbx-accent-gray-300 focus:pbx-bg-none pbx-rounded-md pbx-py-3 pbx-px-3 pbx-border-none focus:pbx-outline-none focus:pbx-ring-0 focus:pbx-ring-offset-0 focus:pbx-border-none pbx-shadow-none;
325
325
  }
326
326
  .pbx-myPrimaryInputReadonly {
327
327
  @apply pbx-myPrimaryInput pbx-bg-gray-50 focus:pbx-ring-0 focus:pbx-bg-myPrimaryLightGrayColor focus:pbx-border-myPrimaryMediumGrayColor;
@@ -336,7 +336,7 @@
336
336
  }
337
337
 
338
338
  .pbx-myPrimaryTextArea {
339
- @apply pbx-block pbx-w-full sm:pbx-text-sm pbx-font-normal pbx-text-myPrimaryDarkGrayColor pbx-placeholder:font-normal pbx-placeholder:accent-gray-400 pbx-bg-gray-50 focus:pbx-bg-white pbx-rounded-md pbx-py-3 pbx-px-3 pbx-border pbx-border-gray-300 pbx-shadow-sm focus:pbx-outline-none focus:pbx-ring-2 focus:pbx-ring-myPrimaryLinkColor focus:pbx-border-transparent;
339
+ @apply pbx-block pbx-w-full sm:pbx-text-sm pbx-font-normal pbx-text-myPrimaryDarkGrayColor placeholder:pbx-font-normal placeholder:pbx-accent-gray-400 pbx-bg-gray-50 focus:pbx-bg-white pbx-rounded-md pbx-py-3 pbx-px-3 pbx-border pbx-border-gray-300 pbx-shadow-sm focus:pbx-outline-none focus:pbx-ring-2 focus:pbx-ring-myPrimaryLinkColor focus:pbx-border-transparent;
340
340
  }
341
341
 
342
342
  .pbx-myPrimaryCheckbox {