golden-logic-ui 1.2.374 → 1.2.375
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as g, onMounted as h, onBeforeUnmount as k, watch as
|
|
1
|
+
import { ref as g, onMounted as h, onBeforeUnmount as k, watch as v, computed as x, createElementBlock as s, openBlock as d, Fragment as w, createCommentVNode as y, normalizeClass as r, createElementVNode as a, toDisplayString as o, withDirectives as V, vModelText as C, nextTick as S } from "vue";
|
|
2
2
|
import B from "tinymce";
|
|
3
3
|
import "tinymce/icons/default/icons";
|
|
4
4
|
import "tinymce/themes/silver/theme";
|
|
@@ -21,7 +21,7 @@ import "tinymce/plugins/charmap/plugin";
|
|
|
21
21
|
import "tinymce/plugins/insertdatetime/plugin";
|
|
22
22
|
import "tinymce/plugins/visualblocks/plugin";
|
|
23
23
|
import "tinymce/plugins/help/plugin";
|
|
24
|
-
const T = { class: "font-bold ptext-lg dark:text-white" }, E = ["id"], M = ["for"], N = ["name", "id", "type"], q = { class: "gl-span-form-error" },
|
|
24
|
+
const T = { class: "font-bold ptext-lg dark:text-white" }, E = ["id"], M = ["for"], N = ["name", "id", "type"], q = { class: "gl-span-form-error" }, _ = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, ae = {
|
|
25
25
|
__name: "GlTinymce",
|
|
26
26
|
props: {
|
|
27
27
|
is_required: { type: Boolean, default: !1 },
|
|
@@ -36,11 +36,11 @@ const T = { class: "font-bold ptext-lg dark:text-white" }, E = ["id"], M = ["for
|
|
|
36
36
|
},
|
|
37
37
|
emits: ["update:modelValue", "keydown"],
|
|
38
38
|
setup(e, { expose: p, emit: b }) {
|
|
39
|
-
const
|
|
39
|
+
const n = e, u = b, f = g(null);
|
|
40
40
|
let l = null;
|
|
41
41
|
g(!1), h(async () => {
|
|
42
42
|
await S(), l && (l.destroy(), l = null), B.init({
|
|
43
|
-
selector: "#" +
|
|
43
|
+
selector: "#" + n.field_name,
|
|
44
44
|
height: 300,
|
|
45
45
|
plugins: [
|
|
46
46
|
"advlist",
|
|
@@ -67,22 +67,27 @@ const T = { class: "font-bold ptext-lg dark:text-white" }, E = ["id"], M = ["for
|
|
|
67
67
|
content_css: !1,
|
|
68
68
|
// disable import of css
|
|
69
69
|
images_upload_url: "/uploadImages",
|
|
70
|
+
// Keep uploaded/inserted URLs root-relative. TinyMCE otherwise rewrites
|
|
71
|
+
// them relative to the page hosting the editor, so an image uploaded from
|
|
72
|
+
// an admin route is stored as ../storage/... and breaks elsewhere.
|
|
73
|
+
relative_urls: !1,
|
|
74
|
+
remove_script_host: !0,
|
|
70
75
|
setup(t) {
|
|
71
76
|
l = t, t.on("Change", () => {
|
|
72
77
|
u("update:modelValue", t.getContent());
|
|
73
78
|
}), t.on("init", () => {
|
|
74
|
-
t.setContent(
|
|
79
|
+
t.setContent(n.modelValue);
|
|
75
80
|
});
|
|
76
81
|
}
|
|
77
82
|
});
|
|
78
83
|
}), k(() => {
|
|
79
84
|
l && (l.destroy(), l = null);
|
|
80
|
-
}),
|
|
85
|
+
}), v(() => n.modelValue, (t) => {
|
|
81
86
|
l && l.getContent() !== t && l.setContent(t);
|
|
82
87
|
});
|
|
83
|
-
const c =
|
|
88
|
+
const c = x({
|
|
84
89
|
get() {
|
|
85
|
-
return
|
|
90
|
+
return n.modelValue;
|
|
86
91
|
},
|
|
87
92
|
set(t) {
|
|
88
93
|
u("update:modelValue", t);
|
|
@@ -93,11 +98,11 @@ const T = { class: "font-bold ptext-lg dark:text-white" }, E = ["id"], M = ["for
|
|
|
93
98
|
key: 0,
|
|
94
99
|
class: r(e.field_name)
|
|
95
100
|
}, [
|
|
96
|
-
a("h3", T,
|
|
101
|
+
a("h3", T, o(e.label_name), 1),
|
|
97
102
|
a("p", {
|
|
98
103
|
id: e.field_name,
|
|
99
104
|
class: "mb-4 text-base text-gray-900 input_tr_show dark:text-white"
|
|
100
|
-
},
|
|
105
|
+
}, o(e.model_value), 9, E),
|
|
101
106
|
i[2] || (i[2] = a("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
|
|
102
107
|
], 2)) : y("", !0),
|
|
103
108
|
e.show ? y("", !0) : (d(), s("div", {
|
|
@@ -111,7 +116,7 @@ const T = { class: "font-bold ptext-lg dark:text-white" }, E = ["id"], M = ["for
|
|
|
111
116
|
required: e.is_required
|
|
112
117
|
}),
|
|
113
118
|
for: e.field_name
|
|
114
|
-
},
|
|
119
|
+
}, o(e.label_name), 11, M),
|
|
115
120
|
V(a("textarea", {
|
|
116
121
|
name: e.field_name,
|
|
117
122
|
id: e.field_name,
|
|
@@ -128,8 +133,8 @@ const T = { class: "font-bold ptext-lg dark:text-white" }, E = ["id"], M = ["for
|
|
|
128
133
|
}, null, 42, N), [
|
|
129
134
|
[C, c.value]
|
|
130
135
|
]),
|
|
131
|
-
a("span", q,
|
|
132
|
-
a("small",
|
|
136
|
+
a("span", q, o(e.error_message), 1),
|
|
137
|
+
a("small", _, o(e.description), 1)
|
|
133
138
|
], 2))
|
|
134
139
|
], 64));
|
|
135
140
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as f, onMounted as b, onBeforeUnmount as w, watch as S, computed as C, createElementBlock as g, openBlock as c, Fragment as _, createCommentVNode as v, normalizeClass as m, createElementVNode as i, withDirectives as V, toDisplayString as
|
|
1
|
+
import { ref as f, onMounted as b, onBeforeUnmount as w, watch as S, computed as C, createElementBlock as g, openBlock as c, Fragment as _, createCommentVNode as v, normalizeClass as m, createElementVNode as i, withDirectives as V, toDisplayString as u, vModelText as h, nextTick as j } from "vue";
|
|
2
2
|
import B from "tinymce";
|
|
3
3
|
import "tinymce/icons/default/icons";
|
|
4
4
|
import "tinymce/themes/silver/theme";
|
|
@@ -78,8 +78,8 @@ const N = { class: "font-bold ptext-lg dark:text-white" }, q = ["name", "id"], E
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
emits: ["update:modelValue", "update:modelValueTranslate", "keydown"],
|
|
81
|
-
setup(e, { expose:
|
|
82
|
-
const l = e, o = x,
|
|
81
|
+
setup(e, { expose: k, emit: x }) {
|
|
82
|
+
const l = e, o = x, d = f(null), r = f(null);
|
|
83
83
|
let a = null;
|
|
84
84
|
f(!1);
|
|
85
85
|
const p = async () => {
|
|
@@ -110,6 +110,11 @@ const N = { class: "font-bold ptext-lg dark:text-white" }, q = ["name", "id"], E
|
|
|
110
110
|
content_css: !1,
|
|
111
111
|
// disable import of css
|
|
112
112
|
images_upload_url: "/uploadImages",
|
|
113
|
+
// Keep uploaded/inserted URLs root-relative. TinyMCE otherwise rewrites
|
|
114
|
+
// them relative to the page hosting the editor, so an image uploaded from
|
|
115
|
+
// an admin route is stored as ../storage/... and breaks elsewhere.
|
|
116
|
+
relative_urls: !1,
|
|
117
|
+
remove_script_host: !0,
|
|
113
118
|
setup(t) {
|
|
114
119
|
a = t, t.on("Change", () => {
|
|
115
120
|
o("update:modelValue", t.getContent());
|
|
@@ -117,14 +122,14 @@ const N = { class: "font-bold ptext-lg dark:text-white" }, q = ["name", "id"], E
|
|
|
117
122
|
t.setContent(l.modelValue);
|
|
118
123
|
});
|
|
119
124
|
}
|
|
120
|
-
}),
|
|
125
|
+
}), d.value.classList.add("gl-multilanguage");
|
|
121
126
|
}, T = () => {
|
|
122
127
|
r.value && o("update:modelValueTranslate", r.value.value);
|
|
123
128
|
};
|
|
124
129
|
b(p), w(() => {
|
|
125
130
|
a && (a.destroy(), a = null);
|
|
126
131
|
}), b(() => {
|
|
127
|
-
p(), l.modelValue && (o("update:modelValue", l.modelValue),
|
|
132
|
+
p(), l.modelValue && (o("update:modelValue", l.modelValue), d.value.value = l.modelValue), l.modelValueTranslate && (o("update:modelValueTranslate", l.modelValueTranslate), r.value.value = l.modelValueTranslate);
|
|
128
133
|
}), S(() => l.modelValue, (t) => {
|
|
129
134
|
a && a.getContent() !== t && a.setContent(t);
|
|
130
135
|
});
|
|
@@ -136,12 +141,12 @@ const N = { class: "font-bold ptext-lg dark:text-white" }, q = ["name", "id"], E
|
|
|
136
141
|
o("update:modelValue", t);
|
|
137
142
|
}
|
|
138
143
|
});
|
|
139
|
-
return
|
|
144
|
+
return k({ focus: () => d.value.focus() }), (t, n) => (c(), g(_, null, [
|
|
140
145
|
e.show ? (c(), g("div", {
|
|
141
146
|
key: 0,
|
|
142
147
|
class: m(e.field_name)
|
|
143
148
|
}, [
|
|
144
|
-
i("h3", N,
|
|
149
|
+
i("h3", N, u(e.label_name), 1),
|
|
145
150
|
V(i("input", {
|
|
146
151
|
type: "hidden",
|
|
147
152
|
"data-i18n": "true",
|
|
@@ -149,14 +154,14 @@ const N = { class: "font-bold ptext-lg dark:text-white" }, q = ["name", "id"], E
|
|
|
149
154
|
id: e.field_name + "_i18n",
|
|
150
155
|
ref_key: "input_translate",
|
|
151
156
|
ref: r,
|
|
152
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
157
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => t.inputTranslateValue = s)
|
|
153
158
|
}, null, 8, q), [
|
|
154
|
-
[
|
|
159
|
+
[h, t.inputTranslateValue]
|
|
155
160
|
]),
|
|
156
161
|
i("p", {
|
|
157
162
|
id: e.field_name,
|
|
158
163
|
class: "mb-4 text-base text-gray-900 input_tr_show dark:text-white"
|
|
159
|
-
},
|
|
164
|
+
}, u(e.model_value), 9, E),
|
|
160
165
|
n[3] || (n[3] = i("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
|
|
161
166
|
], 2)) : v("", !0),
|
|
162
167
|
e.show ? v("", !0) : (c(), g("div", {
|
|
@@ -170,7 +175,7 @@ const N = { class: "font-bold ptext-lg dark:text-white" }, q = ["name", "id"], E
|
|
|
170
175
|
required: e.is_required
|
|
171
176
|
}),
|
|
172
177
|
for: e.field_name
|
|
173
|
-
},
|
|
178
|
+
}, u(e.label_name), 11, I),
|
|
174
179
|
n[4] || (n[4] = i("span", { class: "language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300" }, null, -1)),
|
|
175
180
|
i("input", {
|
|
176
181
|
class: "mb-4",
|
|
@@ -190,16 +195,16 @@ const N = { class: "font-bold ptext-lg dark:text-white" }, q = ["name", "id"], E
|
|
|
190
195
|
" gl-textarea-form-invalid": e.error_message !== ""
|
|
191
196
|
}]),
|
|
192
197
|
type: e.type,
|
|
193
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
194
|
-
onKeydown: n[2] || (n[2] = (
|
|
198
|
+
"onUpdate:modelValue": n[1] || (n[1] = (s) => y.value = s),
|
|
199
|
+
onKeydown: n[2] || (n[2] = (s) => t.$emit("keydown", s)),
|
|
195
200
|
ref_key: "input",
|
|
196
|
-
ref:
|
|
201
|
+
ref: d,
|
|
197
202
|
rows: "4"
|
|
198
203
|
}, " ", 42, O), [
|
|
199
|
-
[
|
|
204
|
+
[h, y.value]
|
|
200
205
|
]),
|
|
201
|
-
i("span", U,
|
|
202
|
-
i("small", D,
|
|
206
|
+
i("span", U, u(e.error_message), 1),
|
|
207
|
+
i("small", D, u(e.description), 1)
|
|
203
208
|
], 2))
|
|
204
209
|
], 64));
|
|
205
210
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "The most popular library of interactive components built with Vuejs && Tailwind CSS",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "1.2.
|
|
6
|
+
"version": "1.2.375",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/mrgiant/GoldenLogicUi.git"
|