@myissue/vue-website-page-builder 3.3.91 → 3.3.93
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 +53 -16
- package/dist/{ar-ITBqBm-d.js → ar-C3_B_jte.js} +46 -40
- package/dist/{de-BJpPaS11.js → de-DdjFvQa0.js} +34 -28
- package/dist/{en-B_2bnBr-.js → en-BUBdYOpm.js} +49 -43
- package/dist/{es-whPPQx5J.js → es-B22SqDyv.js} +53 -47
- package/dist/{fr-BT4veodQ.js → fr-DvzSNDOH.js} +45 -39
- package/dist/{hi-ebTmcUsS.js → hi-BZT8U4mG.js} +55 -49
- package/dist/{ja-BRtI2tes.js → ja-Dz8pZ4kc.js} +41 -35
- package/dist/{pt-DcvtSuUT.js → pt-BKVGGQ7s.js} +36 -30
- package/dist/{ru-Q6PD0n2W.js → ru-CykvN5Tx.js} +37 -31
- package/dist/style.css +1 -1
- package/dist/vue-website-page-builder.js +3543 -3361
- package/dist/vue-website-page-builder.umd.cjs +39 -38
- package/dist/{zh-Hans-CZQ2JK7v.js → zh-Hans-B-uPsE7N.js} +46 -40
- package/package.json +1 -1
- package/src/Components/Modals/ModalBuilder.vue +1 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue +2 -2
- package/src/Components/PageBuilder/EditorMenu/Editables/HTMLEditor.vue +212 -0
- package/src/Components/PageBuilder/EditorMenu/Editables/StyleEditor.vue +2 -2
- package/src/Components/PageBuilder/EditorMenu/EditorAccordion.vue +2 -2
- package/src/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue +30 -26
- package/src/PageBuilder/PageBuilder.vue +6 -5
- package/src/css/style.css +3 -3
- package/src/locales/ar.json +7 -3
- package/src/locales/de.json +7 -4
- package/src/locales/en.json +7 -1
- package/src/locales/es.json +7 -4
- package/src/locales/fr.json +7 -4
- package/src/locales/hi.json +8 -4
- package/src/locales/ja.json +9 -5
- package/src/locales/pt.json +7 -4
- package/src/locales/ru.json +7 -4
- package/src/locales/zh-Hans.json +7 -3
- package/src/services/PageBuilderService.ts +56 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s = "样式", i = "排版", r = "选择", l = "内边距", d = "边距", c = "全局",
|
|
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:
|
|
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:
|
|
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:
|
|
72
|
-
value:
|
|
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:
|
|
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:
|
|
97
|
-
Link: v,
|
|
96
|
+
Bold: v,
|
|
98
97
|
"Header 2": "标题2",
|
|
99
98
|
"Header 3": "标题3",
|
|
100
|
-
List:
|
|
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:
|
|
107
|
+
Search: L,
|
|
109
108
|
"Search...": "搜索...",
|
|
110
|
-
Landscape:
|
|
111
|
-
Portrait:
|
|
112
|
-
Squarish:
|
|
109
|
+
Landscape: H,
|
|
110
|
+
Portrait: M,
|
|
111
|
+
Squarish: D,
|
|
113
112
|
"Total pages": "总页数",
|
|
114
|
-
Images:
|
|
113
|
+
Images: B,
|
|
115
114
|
"First page": "第一页",
|
|
116
115
|
Prev: k,
|
|
117
|
-
Next:
|
|
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:
|
|
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:
|
|
148
|
+
Component: W,
|
|
150
149
|
"Components added": "添加的组件",
|
|
151
150
|
"No Element selected": "未选择元素",
|
|
152
151
|
"Selected HTML:": "选定的HTML:",
|
|
@@ -157,43 +156,50 @@ const e = "保存", t = "选项", o = "头像", n = "发布", a = "组件", s =
|
|
|
157
156
|
"Title:": "标题:",
|
|
158
157
|
"HTML Code:": "HTML代码:",
|
|
159
158
|
"No Components added yet": "尚未添加组件",
|
|
160
|
-
All:
|
|
161
|
-
Image:
|
|
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": "从我离开的地方继续",
|
|
168
|
+
"HTML Editor": "HTML 编辑器",
|
|
169
|
+
"Gain full control over components by editing the raw HTML.": "通过编辑原始 HTML 获得对组件的完全控制。"
|
|
164
170
|
};
|
|
165
171
|
export {
|
|
166
172
|
m as Add,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
173
|
+
z as All,
|
|
174
|
+
v as Bold,
|
|
175
|
+
p as Border,
|
|
170
176
|
T as Close,
|
|
171
|
-
|
|
177
|
+
W as Component,
|
|
172
178
|
R as Content,
|
|
173
179
|
C as Delete,
|
|
174
180
|
S as Editing,
|
|
175
181
|
V as Element,
|
|
176
182
|
c as Global,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
+
q as Image,
|
|
184
|
+
B as Images,
|
|
185
|
+
A as Information,
|
|
186
|
+
H as Landscape,
|
|
187
|
+
x as Link,
|
|
188
|
+
b as List,
|
|
183
189
|
d as Margin,
|
|
184
|
-
|
|
185
|
-
|
|
190
|
+
f as Mobile,
|
|
191
|
+
P as Next,
|
|
186
192
|
t as Options,
|
|
187
193
|
l as Padding,
|
|
188
|
-
|
|
194
|
+
M as Portrait,
|
|
189
195
|
k as Prev,
|
|
190
196
|
w as Preview,
|
|
191
197
|
n as Publish,
|
|
192
198
|
e as Save,
|
|
193
|
-
|
|
199
|
+
L as Search,
|
|
194
200
|
r as Select,
|
|
195
|
-
|
|
196
|
-
|
|
201
|
+
u as Specific,
|
|
202
|
+
D as Squarish,
|
|
197
203
|
s as Styles,
|
|
198
204
|
I as Text,
|
|
199
205
|
g as Transparent,
|
|
@@ -202,7 +208,7 @@ export {
|
|
|
202
208
|
F as array,
|
|
203
209
|
o as avatar,
|
|
204
210
|
a as component,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
211
|
+
U as default,
|
|
212
|
+
h as property,
|
|
213
|
+
y as value
|
|
208
214
|
};
|
package/package.json
CHANGED
|
@@ -72,7 +72,7 @@ const maxWidthClass = computed(() => {
|
|
|
72
72
|
></div>
|
|
73
73
|
|
|
74
74
|
<div
|
|
75
|
-
class="pbx-relative pbx-inline-block pbx-bg-white pbx-rounded-xl pbx-text-left pbx-
|
|
75
|
+
class="pbx-relative pbx-inline-block pbx-bg-white pbx-rounded-xl pbx-text-left pbx-shadow-xl pbx-transform pbx-transition-all pbx-max-w-[96vh] lg:pbx-max-h-[98vh] pbx-max-h-[85vh] pbx-overflow-y-auto pbx-w-full"
|
|
76
76
|
:class="[
|
|
77
77
|
maxWidthClass ? maxWidthClass : '',
|
|
78
78
|
minHeight ? minHeight : '',
|
|
@@ -55,13 +55,13 @@ const handleAddClasses = async () => {
|
|
|
55
55
|
<EditorAccordion>
|
|
56
56
|
<template #title>{{ translate('Generated CSS') }}</template>
|
|
57
57
|
<template #content>
|
|
58
|
-
<
|
|
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
|
-
</
|
|
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,212 @@
|
|
|
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
|
+
import { delay } from '../../../../composables/delay'
|
|
9
|
+
|
|
10
|
+
const pageBuilderService = getPageBuilder()
|
|
11
|
+
const pageBuilderStateStore = sharedPageBuilderStore
|
|
12
|
+
const { translate } = useTranslations()
|
|
13
|
+
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
globalPage: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
},
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const getElement = computed(() => pageBuilderStateStore.getElement)
|
|
21
|
+
const getComponents = computed(() => pageBuilderStateStore.getComponents)
|
|
22
|
+
|
|
23
|
+
const elementHTML = computed(() => {
|
|
24
|
+
if (!getElement.value || !(getElement.value instanceof HTMLElement)) {
|
|
25
|
+
return ''
|
|
26
|
+
}
|
|
27
|
+
return getElement.value.outerHTML
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const showModalHTMLEditor = ref(false)
|
|
31
|
+
|
|
32
|
+
const editableHtml = ref('')
|
|
33
|
+
const editableComponents = ref('')
|
|
34
|
+
|
|
35
|
+
const handleShowHTMLEditor = () => {
|
|
36
|
+
showModalHTMLEditor.value = true
|
|
37
|
+
|
|
38
|
+
if (!props.globalPage) {
|
|
39
|
+
editableHtml.value = elementHTML.value
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (props.globalPage) {
|
|
43
|
+
const compsHTMLString =
|
|
44
|
+
Array.isArray(getComponents.value) &&
|
|
45
|
+
getComponents.value
|
|
46
|
+
.map((comp) => {
|
|
47
|
+
return comp.html_code
|
|
48
|
+
.replace(/data-componentid="[^"]*"/g, '') // remove data-componentid
|
|
49
|
+
.replace(/\s{2,}/g, ' ') // optional: clean up excess spaces
|
|
50
|
+
})
|
|
51
|
+
.join('\n')
|
|
52
|
+
|
|
53
|
+
editableComponents.value = compsHTMLString
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const handleCloseHTMLEditor = () => {
|
|
58
|
+
showModalHTMLEditor.value = false
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const isLoading = ref(false)
|
|
62
|
+
const errSaveComponents = ref(null)
|
|
63
|
+
|
|
64
|
+
const handleSaveChangesElement = async () => {
|
|
65
|
+
errSaveComponents.value = null
|
|
66
|
+
isLoading.value = true
|
|
67
|
+
await delay(300)
|
|
68
|
+
|
|
69
|
+
const error = await pageBuilderService.applyModifiedHTML(editableHtml.value)
|
|
70
|
+
|
|
71
|
+
if (error) {
|
|
72
|
+
errSaveComponents.value = error
|
|
73
|
+
isLoading.value = false
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
showModalHTMLEditor.value = false
|
|
78
|
+
isLoading.value = false
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const handleSaveChangesComponents = async () => {
|
|
82
|
+
errSaveComponents.value = null
|
|
83
|
+
isLoading.value = true
|
|
84
|
+
errSaveComponents.value = null
|
|
85
|
+
await delay(300)
|
|
86
|
+
|
|
87
|
+
const error = await pageBuilderService.applyModifiedComponents(editableComponents.value)
|
|
88
|
+
|
|
89
|
+
if (error) {
|
|
90
|
+
errSaveComponents.value = error
|
|
91
|
+
isLoading.value = false
|
|
92
|
+
return
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
showModalHTMLEditor.value = false
|
|
96
|
+
isLoading.value = false
|
|
97
|
+
}
|
|
98
|
+
</script>
|
|
99
|
+
<template>
|
|
100
|
+
<EditorAccordion>
|
|
101
|
+
<template #title>{{ translate('HTML Editor') }}</template>
|
|
102
|
+
<template #content>
|
|
103
|
+
<div class="pbx-my-2 pbx-py-2">
|
|
104
|
+
<label for="vertical-margin" class="pbx-myPrimaryInputLabel">{{
|
|
105
|
+
translate('Gain full control over components by editing the raw HTML.')
|
|
106
|
+
}}</label>
|
|
107
|
+
<hr />
|
|
108
|
+
</div>
|
|
109
|
+
<button @click="handleShowHTMLEditor" type="button" class="pbx-myPrimaryButton">
|
|
110
|
+
{{ translate('HTML Editor') }}
|
|
111
|
+
</button>
|
|
112
|
+
</template>
|
|
113
|
+
</EditorAccordion>
|
|
114
|
+
<ModalBuilder
|
|
115
|
+
maxWidth="7xl"
|
|
116
|
+
:showModalBuilder="showModalHTMLEditor"
|
|
117
|
+
:title="translate('HTML Editor')"
|
|
118
|
+
@closeMainModalBuilder="handleCloseHTMLEditor"
|
|
119
|
+
>
|
|
120
|
+
<template v-if="!globalPage">
|
|
121
|
+
<textarea
|
|
122
|
+
id="html-editor"
|
|
123
|
+
v-model="editableHtml"
|
|
124
|
+
class="pbx-h-full pbx-font-sans pbx-bg-gray-900 pbx-text-white pbx-w-full"
|
|
125
|
+
style="overflow: auto; min-height: 400px"
|
|
126
|
+
></textarea>
|
|
127
|
+
<div class="pbx-flex pbx-justify-end pbx-min-h-6">
|
|
128
|
+
<p v-if="errSaveComponents" class="pbx-myPrimaryParagraphError">
|
|
129
|
+
Error: {{ errSaveComponents }}
|
|
130
|
+
</p>
|
|
131
|
+
</div>
|
|
132
|
+
<div
|
|
133
|
+
class="pbx-border-0 pbx-border-solid pbx-border-t pbx-border-gray-200 pbx-flex pbx-items-center pbx-justify-end"
|
|
134
|
+
>
|
|
135
|
+
<div class="pbx-py-4 pbx-flex sm:pbx-justify-end pbx-justify-center">
|
|
136
|
+
<div
|
|
137
|
+
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"
|
|
138
|
+
>
|
|
139
|
+
<template v-if="!isLoading">
|
|
140
|
+
<button @click="handleCloseHTMLEditor" type="button" class="pbx-mySecondaryButton">
|
|
141
|
+
{{ translate('Close') }}
|
|
142
|
+
</button>
|
|
143
|
+
<button @click="handleSaveChangesElement" type="button" class="pbx-myPrimaryButton">
|
|
144
|
+
{{ translate('Save') }}
|
|
145
|
+
</button>
|
|
146
|
+
</template>
|
|
147
|
+
<template v-if="isLoading">
|
|
148
|
+
<div class="pbx-flex pbx-items-center pbx-my-2 pbx-justify-end">
|
|
149
|
+
<div
|
|
150
|
+
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
|
|
151
|
+
>
|
|
152
|
+
<span
|
|
153
|
+
class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
|
|
154
|
+
>Loading...</span
|
|
155
|
+
>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</template>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</template>
|
|
163
|
+
|
|
164
|
+
<template v-if="globalPage">
|
|
165
|
+
<textarea
|
|
166
|
+
id="html-editor"
|
|
167
|
+
v-model="editableComponents"
|
|
168
|
+
class="pbx-h-full pbx-font-sans pbx-bg-gray-900 pbx-text-white pbx-w-full"
|
|
169
|
+
style="overflow: auto; min-height: 400px"
|
|
170
|
+
></textarea>
|
|
171
|
+
<div class="pbx-flex pbx-justify-end pbx-min-h-6">
|
|
172
|
+
<p v-if="errSaveComponents" class="pbx-myPrimaryParagraphError">
|
|
173
|
+
Error: {{ errSaveComponents }}
|
|
174
|
+
</p>
|
|
175
|
+
</div>
|
|
176
|
+
<div
|
|
177
|
+
class="pbx-border-0 pbx-border-solid pbx-border-t pbx-border-gray-200 pbx-flex pbx-items-center pbx-justify-end"
|
|
178
|
+
>
|
|
179
|
+
<div class="pbx-py-4 pbx-flex sm:pbx-justify-end pbx-justify-center">
|
|
180
|
+
<div
|
|
181
|
+
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"
|
|
182
|
+
>
|
|
183
|
+
<template v-if="!isLoading">
|
|
184
|
+
<button @click="handleCloseHTMLEditor" type="button" class="pbx-mySecondaryButton">
|
|
185
|
+
{{ translate('Close') }}
|
|
186
|
+
</button>
|
|
187
|
+
<button
|
|
188
|
+
@click="handleSaveChangesComponents"
|
|
189
|
+
type="button"
|
|
190
|
+
class="pbx-myPrimaryButton"
|
|
191
|
+
>
|
|
192
|
+
{{ translate('Save') }}
|
|
193
|
+
</button>
|
|
194
|
+
</template>
|
|
195
|
+
<template v-if="isLoading">
|
|
196
|
+
<div class="pbx-flex pbx-items-center pbx-my-2 pbx-justify-end">
|
|
197
|
+
<div
|
|
198
|
+
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
|
|
199
|
+
>
|
|
200
|
+
<span
|
|
201
|
+
class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
|
|
202
|
+
>Loading...</span
|
|
203
|
+
>
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
</template>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
</template>
|
|
211
|
+
</ModalBuilder>
|
|
212
|
+
</template>
|
|
@@ -60,13 +60,13 @@ const handleAddStyle = async () => {
|
|
|
60
60
|
<EditorAccordion>
|
|
61
61
|
<template #title>{{ translate('Inline Styles') }}</template>
|
|
62
62
|
<template #content>
|
|
63
|
-
<
|
|
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
|
-
</
|
|
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
|
|
158
|
+
<article class="pbx-my-1">
|
|
158
159
|
<Typography></Typography>
|
|
159
160
|
</article>
|
|
160
161
|
|
|
161
|
-
<article class="pbx-my-1
|
|
162
|
+
<article class="pbx-my-1">
|
|
162
163
|
<OpacityEditor> </OpacityEditor>
|
|
163
164
|
</article>
|
|
164
|
-
<article class="pbx-my-1
|
|
165
|
+
<article class="pbx-my-1">
|
|
165
166
|
<Padding> </Padding>
|
|
166
167
|
</article>
|
|
167
|
-
<article class="pbx-my-1
|
|
168
|
+
<article class="pbx-my-1">
|
|
168
169
|
<Margin> </Margin>
|
|
169
170
|
</article>
|
|
170
|
-
<article class="pbx-my-1
|
|
171
|
+
<article class="pbx-my-1">
|
|
171
172
|
<BorderRadius></BorderRadius>
|
|
172
173
|
</article>
|
|
173
|
-
<article class="pbx-my-1
|
|
174
|
+
<article class="pbx-my-1">
|
|
174
175
|
<Borders></Borders>
|
|
175
176
|
</article>
|
|
176
|
-
<article class="pbx-my-1
|
|
177
|
+
<article class="pbx-my-1">
|
|
177
178
|
<ClassEditor></ClassEditor>
|
|
178
179
|
</article>
|
|
179
|
-
<article class="pbx-my-1
|
|
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
|
|
189
|
+
<article class="pbx-my-1">
|
|
186
190
|
<EditorAccordion>
|
|
187
191
|
<template #title>{{ translate('Global Page Styles') }}</template>
|
|
188
192
|
<template #content>
|
|
189
|
-
<
|
|
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
|
-
</
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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
|
|
265
|
+
<article class="pbx-my-1">
|
|
265
266
|
<Typography></Typography>
|
|
266
267
|
</article>
|
|
267
|
-
<article class="pbx-my-1
|
|
268
|
+
<article class="pbx-my-1">
|
|
268
269
|
<TextColorEditor :globalPageLayout="true"></TextColorEditor>
|
|
269
270
|
</article>
|
|
270
|
-
<article class="pbx-my-1
|
|
271
|
+
<article class="pbx-my-1">
|
|
271
272
|
<BackgroundColorEditor :globalPageLayout="true"></BackgroundColorEditor>
|
|
272
273
|
</article>
|
|
273
|
-
<article class="pbx-my-1
|
|
274
|
+
<article class="pbx-my-1">
|
|
274
275
|
<Padding> </Padding>
|
|
275
276
|
</article>
|
|
276
|
-
<article class="pbx-my-1
|
|
277
|
+
<article class="pbx-my-1">
|
|
277
278
|
<Margin> </Margin>
|
|
278
279
|
</article>
|
|
279
|
-
<article class="pbx-my-1
|
|
280
|
+
<article class="pbx-my-1">
|
|
280
281
|
<BorderRadius></BorderRadius>
|
|
281
282
|
</article>
|
|
282
|
-
<article class="pbx-my-1
|
|
283
|
+
<article class="pbx-my-1">
|
|
283
284
|
<Borders></Borders>
|
|
284
285
|
</article>
|
|
285
|
-
<article class="pbx-my-1
|
|
286
|
+
<article class="pbx-my-1">
|
|
286
287
|
<ClassEditor></ClassEditor>
|
|
287
288
|
</article>
|
|
288
|
-
<article class="pbx-my-1
|
|
289
|
+
<article class="pbx-my-1">
|
|
289
290
|
<StyleEditor></StyleEditor>
|
|
290
291
|
</article>
|
|
292
|
+
<article class="pbx-my-1">
|
|
293
|
+
<HTMLEditor :globalPage="true"></HTMLEditor>
|
|
294
|
+
</article>
|
|
291
295
|
</div>
|
|
292
296
|
</div>
|
|
293
297
|
</div>
|
|
@@ -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
|
-
|
|
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)
|
package/src/css/style.css
CHANGED
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
.pbx-myPrimaryParagraphError {
|
|
93
|
-
@apply pbx-myPrimaryParagraph pbx-mt-1 pbx-italic pbx-text-myPrimaryErrorColor;
|
|
93
|
+
@apply pbx-myPrimaryParagraph pbx-mt-1 pbx-italic pbx-text-myPrimaryErrorColor pbx-text-sm;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/*
|
|
@@ -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-
|
|
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-
|
|
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 {
|