@jsg-developer/vue-pack 0.0.8 → 0.0.9-beta-2
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/THIRD_PARTY_LICENSES.json +1 -1
- package/dist/chunks/{ArrayObject-Csiz0aJR.cjs.js → ArrayObject-BA88O7bP.cjs.js} +1 -1
- package/dist/chunks/ArrayObject-DYnfWxW-.es.js +4 -0
- package/dist/chunks/ColorPicker-CqrPcGbi.es.js +4 -0
- package/dist/chunks/{ColorPicker-CrIAXDwh.cjs.js → ColorPicker-W_cn5ezl.cjs.js} +1 -1
- package/dist/chunks/ComboboxComponent-BU-VQz2u.es.js +4 -0
- package/dist/chunks/{ComboboxComponent-CPTq69Ar.cjs.js → ComboboxComponent-Dwlhjcru.cjs.js} +1 -1
- package/dist/chunks/{CurrencyInput-CwoIqJ6_.cjs.js → CurrencyInput-CNQzGqgu.cjs.js} +1 -1
- package/dist/chunks/CurrencyInput-DVlgxmiu.es.js +4 -0
- package/dist/chunks/DateInput-B1EpMWa0.es.js +4 -0
- package/dist/chunks/{DateInput-wbBbKLmh.cjs.js → DateInput-DMFCzQCr.cjs.js} +1 -1
- package/dist/chunks/{DateTimeInput-BEpP2CFJ.cjs.js → DateTimeInput-8w4T-EZX.cjs.js} +1 -1
- package/dist/chunks/{DateTimeInput-CCrf600J.es.js → DateTimeInput-CC70bKnU.es.js} +1 -1
- package/dist/chunks/{DateTimeInput.vue_vue_type_script_setup_true_lang-DF9gRqkl.es.js → DateTimeInput.vue_vue_type_script_setup_true_lang-BLJgRk91.es.js} +1 -1
- package/dist/chunks/{DateTimeInput.vue_vue_type_script_setup_true_lang-BGz0eU7k.cjs.js → DateTimeInput.vue_vue_type_script_setup_true_lang-DmmVjDPV.cjs.js} +1 -1
- package/dist/chunks/EmailInput-B0F3AHeq.es.js +4 -0
- package/dist/chunks/{EmailInput-CNVGAFnD.cjs.js → EmailInput-EU4MR4Jw.cjs.js} +1 -1
- package/dist/chunks/{FileArrayInput-CAwxVS0H.cjs.js → FileArrayInput-CR-seczb.cjs.js} +1 -1
- package/dist/chunks/{FileArrayInput-DEHJtU_H.es.js → FileArrayInput-DljGrRxA.es.js} +2 -2
- package/dist/chunks/{FileArrayInput.vue_vue_type_script_setup_true_lang-BrR9G0CJ.es.js → FileArrayInput.vue_vue_type_script_setup_true_lang-C7UCpQqG.es.js} +1 -1
- package/dist/chunks/{FileArrayInput.vue_vue_type_script_setup_true_lang-BMhnxsx_.cjs.js → FileArrayInput.vue_vue_type_script_setup_true_lang-DtC-rygi.cjs.js} +1 -1
- package/dist/chunks/{FileInput-D3qv7Xva.cjs.js → FileInput-A1qH_OLh.cjs.js} +1 -1
- package/dist/chunks/FileInput-CC5a2_o2.es.js +4 -0
- package/dist/chunks/{GroupRenderer-B-LDNqgX.cjs.js → GroupRenderer-BL1UiQs5.cjs.js} +1 -1
- package/dist/chunks/GroupRenderer-Cj7o8pSh.es.js +4 -0
- package/dist/chunks/{ImageArrayInput-BGOtUALS.cjs.js → ImageArrayInput-B3f9I0U1.cjs.js} +1 -1
- package/dist/chunks/{ImageArrayInput-CjLQeJk1.es.js → ImageArrayInput-Bl0af1_X.es.js} +2 -2
- package/dist/chunks/ImageArrayInput.vue_vue_type_script_setup_true_lang-NqHOY8OF.es.js +421 -0
- package/dist/chunks/ImageArrayInput.vue_vue_type_script_setup_true_lang-d88H9xj4.cjs.js +2 -0
- package/dist/chunks/ImageInput-DL8tNIdV.es.js +4 -0
- package/dist/chunks/{ImageInput-DiBVxIYB.cjs.js → ImageInput-KmSPSWhK.cjs.js} +1 -1
- package/dist/chunks/NumberInput-BOjP2XCy.es.js +4 -0
- package/dist/chunks/{NumberInput-uOgJyDTw.cjs.js → NumberInput-C47NQmuA.cjs.js} +1 -1
- package/dist/chunks/ObjectInput-DLkhG2Ha.es.js +4 -0
- package/dist/chunks/{ObjectInput-DaD5_SCP.cjs.js → ObjectInput-e0FX9gIv.cjs.js} +1 -1
- package/dist/chunks/{PasswordInput-De3IIREc.cjs.js → PasswordInput-CgeIq4tr.cjs.js} +1 -1
- package/dist/chunks/PasswordInput-CkF4phav.es.js +4 -0
- package/dist/chunks/{RateInput-DabVE516.cjs.js → RateInput-C7irYBQy.cjs.js} +1 -1
- package/dist/chunks/RateInput-DYD5aMQX.es.js +4 -0
- package/dist/chunks/TabelData-DV56gH8Y.cjs.js +1 -0
- package/dist/chunks/{TabelData-DmCnbhpq.es.js → TabelData-jJvzQD8f.es.js} +8 -7
- package/dist/chunks/TagInput-B6F5GleV.es.js +4 -0
- package/dist/chunks/{TagInput-DeJtdDLy.cjs.js → TagInput-DC9jPCR9.cjs.js} +1 -1
- package/dist/chunks/{TelInput-BP9pUjqj.cjs.js → TelInput-BTioT0Aa.cjs.js} +1 -1
- package/dist/chunks/TelInput-BwtzcLzw.es.js +4 -0
- package/dist/chunks/TextAreaInput-B-dcc-ch.es.js +4 -0
- package/dist/chunks/{TextAreaInput-HHOxggqB.cjs.js → TextAreaInput-BXlGB91c.cjs.js} +1 -1
- package/dist/chunks/{TextAreaQuill-eYXH5fmB.es.js → TextAreaQuill-CJyF1I1R.es.js} +240 -203
- package/dist/chunks/TextAreaQuill-DKgdqbEG.cjs.js +1 -0
- package/dist/chunks/TextInput-BwgTx7Xt.es.js +4 -0
- package/dist/chunks/{TextInput-CdvHKzTG.cjs.js → TextInput-CC8TbO0N.cjs.js} +1 -1
- package/dist/chunks/{TimeInput-X--wGzRV.cjs.js → TimeInput-BvUbIEtA.cjs.js} +1 -1
- package/dist/chunks/TimeInput-DsiHBSIo.es.js +4 -0
- package/dist/chunks/{ToggleInput-D3mXx4T9.cjs.js → ToggleInput-DfAKsRdZ.cjs.js} +1 -1
- package/dist/chunks/ToggleInput-mQ_mnG4E.es.js +4 -0
- package/dist/chunks/{UrlInput-B7aRJE-9.cjs.js → UrlInput-C8bIoQBb.cjs.js} +1 -1
- package/dist/chunks/UrlInput-o1uJulwN.es.js +4 -0
- package/dist/chunks/{resize-BCFyG_8Z.es.js → resize-2N3sqejU.es.js} +2384 -2297
- package/dist/chunks/resize-DsxsWx52.cjs.js +12 -0
- package/dist/init.cjs.js +1 -1
- package/dist/init.es.js +1 -1
- package/dist/jsgd-vue-pack.cjs.js +1 -1
- package/dist/jsgd-vue-pack.es.js +104 -109
- package/dist/style.css +1 -1
- package/dist/types/components/Form/composables/useFormModal.d.ts +1 -9
- package/dist/types/components/UI/Inputs/ImageInput.vue.d.ts +3 -1
- package/dist/types/configs/types/field.types.d.ts +15 -28
- package/dist/types/configs/types/index.d.ts +1 -0
- package/dist/types/configs/types/props.types.d.ts +28 -6
- package/dist/types/configs/types/seo.types.d.ts +37 -0
- package/dist/types/untils/index.d.ts +1 -0
- package/dist/types/untils/seo.d.ts +4 -0
- package/dist/vue.cjs.js +1 -1
- package/dist/vue.es.js +6 -6
- package/package.json +1 -1
- package/dist/chunks/ArrayObject-BOxAB7JZ.es.js +0 -4
- package/dist/chunks/ColorPicker-DLKQ9Ey-.es.js +0 -4
- package/dist/chunks/ComboboxComponent-NlXQEb6_.es.js +0 -4
- package/dist/chunks/CurrencyInput-ClxBxxvt.es.js +0 -4
- package/dist/chunks/DateInput-Cin-DZ5f.es.js +0 -4
- package/dist/chunks/EmailInput-Dy0XZ2Qa.es.js +0 -4
- package/dist/chunks/FileInput-CgYkE6-h.es.js +0 -4
- package/dist/chunks/GroupRenderer-B9wTfSqo.es.js +0 -4
- package/dist/chunks/ImageArrayInput.vue_vue_type_script_setup_true_lang-B1pEayO7.cjs.js +0 -2
- package/dist/chunks/ImageArrayInput.vue_vue_type_script_setup_true_lang-DrIW4vyr.es.js +0 -322
- package/dist/chunks/ImageInput-C35ZFMDt.es.js +0 -4
- package/dist/chunks/NumberInput-Cb45QifM.es.js +0 -4
- package/dist/chunks/ObjectInput-DAyAshay.es.js +0 -4
- package/dist/chunks/PasswordInput-BPId2jr-.es.js +0 -4
- package/dist/chunks/RateInput-D6pg36at.es.js +0 -4
- package/dist/chunks/TabelData-C0mYBwlw.cjs.js +0 -1
- package/dist/chunks/TagInput-Dd6wqtMS.es.js +0 -4
- package/dist/chunks/TelInput-D-CBtvax.es.js +0 -4
- package/dist/chunks/TextAreaInput-6XZuCGgS.es.js +0 -4
- package/dist/chunks/TextAreaQuill-B9Y9deA0.cjs.js +0 -1
- package/dist/chunks/TextInput-BhSOEwQF.es.js +0 -4
- package/dist/chunks/TimeInput-C1P44F3V.es.js +0 -4
- package/dist/chunks/ToggleInput-CSw8joFu.es.js +0 -4
- package/dist/chunks/UrlInput-_14ZDA_x.es.js +0 -4
- package/dist/chunks/resize-xk-5mOU-.cjs.js +0 -12
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as Q, ref as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as Q, ref as n, computed as M, watch as I, createBlock as B, openBlock as r, Transition as D, withCtx as E, createElementBlock as j, createCommentVNode as x, withModifiers as G, createVNode as P, createElementVNode as e, toDisplayString as C, normalizeClass as A, withDirectives as V, vModelText as z, withKeys as K, inject as le, onMounted as de, onUnmounted as ae, Teleport as oe, createTextVNode as F, unref as ne, vShow as re, Fragment as ie, renderList as ue } from "vue";
|
|
2
|
+
import H from "dompurify";
|
|
3
|
+
import { ac as N, U as ge, z as je, aa as _, a as ce } from "./resize-2N3sqejU.es.js";
|
|
4
4
|
import "lodash.isequal";
|
|
5
5
|
import "zod";
|
|
6
|
-
const
|
|
6
|
+
const me = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsgd-shadow-2xl jsgd-overflow-hidden dark:jsgd-bg-slate-800" }, be = { class: "jsgd-p-5 jsgd-border-b jsgd-border-slate-200 dark:jsgd-border-slate-700" }, ve = { class: "jsgd-text-lg jsgd-font-bold jsgd-text-slate-900 dark:jsgd-text-slate-100" }, pe = { class: "jsgd-p-5 jsgd-flex jsgd-flex-col jsgd-gap-5" }, fe = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "jsgd-flex jsgd-w-full jsgd-p-1 jsgd-bg-slate-100 jsgd-rounded-lg dark:jsgd-bg-slate-700"
|
|
9
|
-
},
|
|
9
|
+
}, xe = { key: 1 }, he = {
|
|
10
10
|
key: 2,
|
|
11
11
|
class: "jsgd-box-border"
|
|
12
|
-
},
|
|
12
|
+
}, ke = ["placeholder"], we = { key: 3 }, ye = ["accept"], qe = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "jsgd-mt-4"
|
|
15
|
-
},
|
|
15
|
+
}, Ue = ["src"], Te = { key: 4 }, Le = { class: "jsgd-p-4 jsgd-bg-slate-50 jsgd-flex jsgd-justify-end jsgd-gap-3 dark:jsgd-bg-slate-900/50" }, Me = ["disabled"], Ve = { key: 0 }, Se = { key: 1 }, $e = /* @__PURE__ */ Q({
|
|
16
16
|
__name: "QuillEmbedModal",
|
|
17
17
|
props: {
|
|
18
18
|
show: { type: Boolean },
|
|
@@ -22,8 +22,8 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
22
22
|
initialText: {}
|
|
23
23
|
},
|
|
24
24
|
emits: ["close", "submit"],
|
|
25
|
-
setup(
|
|
26
|
-
const s =
|
|
25
|
+
setup(u, { emit: S }) {
|
|
26
|
+
const s = u, h = S, l = n(""), b = n(""), v = n(null), k = n(""), p = n(null), f = n(!1), g = n("url"), w = M(() => !!s.uploadUrl), R = M(() => {
|
|
27
27
|
switch (s.mode) {
|
|
28
28
|
case "image":
|
|
29
29
|
return "Insert Image";
|
|
@@ -34,30 +34,30 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
34
34
|
default:
|
|
35
35
|
return "Insert Media";
|
|
36
36
|
}
|
|
37
|
-
}),
|
|
38
|
-
|
|
37
|
+
}), c = M(() => s.mode === "video" ? "e.g., YouTube, Vimeo URL" : "https://...");
|
|
38
|
+
I(
|
|
39
39
|
() => s.show,
|
|
40
|
-
(
|
|
41
|
-
|
|
40
|
+
(m) => {
|
|
41
|
+
m && (g.value = w.value ? "upload" : "url", l.value = s.initialValue || "", k.value = s.initialText || "", b.value = "", v.value = null, p.value = null, f.value = !1);
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
44
|
function U() {
|
|
45
45
|
h("close");
|
|
46
46
|
}
|
|
47
|
-
function T(
|
|
48
|
-
const d =
|
|
49
|
-
if (d.files && d.files[0] && (
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
47
|
+
function T(m) {
|
|
48
|
+
const d = m.target;
|
|
49
|
+
if (d.files && d.files[0] && (v.value = d.files[0], s.mode === "image")) {
|
|
50
|
+
const i = new FileReader();
|
|
51
|
+
i.onload = (L) => {
|
|
52
|
+
p.value = L.target?.result;
|
|
53
|
+
}, i.readAsDataURL(v.value);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
async function $() {
|
|
57
|
-
|
|
57
|
+
f.value = !0;
|
|
58
58
|
try {
|
|
59
|
-
if (
|
|
60
|
-
if (!
|
|
59
|
+
if (g.value === "upload" && w.value) {
|
|
60
|
+
if (!v.value) {
|
|
61
61
|
alert("Please select a file to upload.");
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
@@ -65,114 +65,114 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
65
65
|
alert("Upload API URL is not configured.");
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
const d = await fetch(s.uploadUrl, { method: "POST", body:
|
|
68
|
+
const m = new FormData();
|
|
69
|
+
m.append("file", v.value);
|
|
70
|
+
const d = await fetch(s.uploadUrl, { method: "POST", body: m });
|
|
71
71
|
if (!d.ok) throw new Error("Upload failed");
|
|
72
|
-
const
|
|
72
|
+
const i = await d.json(), L = i.url || i.secure_url || i.path || i.data?.url || i.data?.path || i.data?.secure_url;
|
|
73
73
|
if (!L) throw new Error("URL not found in upload response");
|
|
74
|
-
h("submit", { url: L, alt:
|
|
74
|
+
h("submit", { url: L, alt: b.value, text: k.value });
|
|
75
75
|
} else {
|
|
76
76
|
if (!l.value) {
|
|
77
77
|
alert("Please enter a URL.");
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
h("submit", { url: l.value, alt:
|
|
80
|
+
h("submit", { url: l.value, alt: b.value, text: k.value });
|
|
81
81
|
}
|
|
82
|
-
} catch (
|
|
83
|
-
console.error(
|
|
82
|
+
} catch (m) {
|
|
83
|
+
console.error(m), alert(m.message || "An error occurred.");
|
|
84
84
|
} finally {
|
|
85
|
-
|
|
85
|
+
f.value = !1;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
return (
|
|
88
|
+
return (m, d) => (r(), B(D, {
|
|
89
89
|
name: "jsgd-modal-overlay",
|
|
90
90
|
appear: ""
|
|
91
91
|
}, {
|
|
92
|
-
default:
|
|
93
|
-
|
|
92
|
+
default: E(() => [
|
|
93
|
+
u.show ? (r(), j("div", {
|
|
94
94
|
key: 0,
|
|
95
95
|
class: "jsgd-fixed jsgd-inset-0 jsgd-z-[10000000] jsgd-flex jsgd-items-center jsgd-justify-center jsgd-p-4 jsgd-bg-black/60 jsgd-backdrop-blur-sm",
|
|
96
|
-
onClick:
|
|
96
|
+
onClick: G(U, ["self"])
|
|
97
97
|
}, [
|
|
98
|
-
P(
|
|
98
|
+
P(D, {
|
|
99
99
|
name: "jsgd-modal-container",
|
|
100
100
|
appear: ""
|
|
101
101
|
}, {
|
|
102
|
-
default:
|
|
103
|
-
e("div",
|
|
104
|
-
e("div",
|
|
105
|
-
e("h3",
|
|
102
|
+
default: E(() => [
|
|
103
|
+
e("div", me, [
|
|
104
|
+
e("div", be, [
|
|
105
|
+
e("h3", ve, C(R.value), 1)
|
|
106
106
|
]),
|
|
107
|
-
e("div",
|
|
108
|
-
w.value &&
|
|
107
|
+
e("div", pe, [
|
|
108
|
+
w.value && u.mode !== "link" ? (r(), j("div", fe, [
|
|
109
109
|
e("button", {
|
|
110
|
-
onClick: d[0] || (d[0] = (
|
|
110
|
+
onClick: d[0] || (d[0] = (i) => g.value = "upload"),
|
|
111
111
|
class: A([
|
|
112
112
|
"jsgd-flex-1 jsgd-py-1.5 jsgd-px-3 jsgd-text-sm jsgd-font-semibold jsgd-rounded-md jsgd-transition-colors jsgd-duration-200",
|
|
113
|
-
|
|
113
|
+
g.value === "upload" ? "jsgd-bg-white jsgd-text-blue-600 jsgd-shadow-sm dark:jsgd-bg-slate-600 dark:jsgd-text-white" : "jsgd-bg-transparent jsgd-text-slate-500 hover:jsgd-text-slate-700 dark:jsgd-text-slate-400 dark:hover:jsgd-text-slate-200"
|
|
114
114
|
])
|
|
115
115
|
}, " Upload ", 2),
|
|
116
116
|
e("button", {
|
|
117
|
-
onClick: d[1] || (d[1] = (
|
|
117
|
+
onClick: d[1] || (d[1] = (i) => g.value = "url"),
|
|
118
118
|
class: A([
|
|
119
119
|
"jsgd-flex-1 jsgd-py-1.5 jsgd-px-3 jsgd-text-sm jsgd-font-semibold jsgd-rounded-md jsgd-transition-colors jsgd-duration-200",
|
|
120
|
-
|
|
120
|
+
g.value === "url" ? "jsgd-bg-white jsgd-text-blue-600 jsgd-shadow-sm dark:jsgd-bg-slate-600 dark:jsgd-text-white" : "jsgd-bg-transparent jsgd-text-slate-500 hover:jsgd-text-slate-700 dark:jsgd-text-slate-400 dark:hover:jsgd-text-slate-200"
|
|
121
121
|
])
|
|
122
122
|
}, " From URL ", 2)
|
|
123
|
-
])) :
|
|
124
|
-
|
|
123
|
+
])) : x("", !0),
|
|
124
|
+
u.mode === "link" ? (r(), j("div", xe, [
|
|
125
125
|
d[5] || (d[5] = e("label", { class: "jsgd-block jsgd-text-sm jsgd-font-medium jsgd-mb-1 dark:jsgd-text-slate-300" }, "Text to display", -1)),
|
|
126
|
-
|
|
127
|
-
"onUpdate:modelValue": d[2] || (d[2] = (
|
|
126
|
+
V(e("input", {
|
|
127
|
+
"onUpdate:modelValue": d[2] || (d[2] = (i) => k.value = i),
|
|
128
128
|
type: "text",
|
|
129
129
|
placeholder: "If empty, URL will be shown",
|
|
130
130
|
class: "jsgd-w-full jsgd-py-2 jsgd-px-3 jsgd-rounded-md jsgd-border jsgd-border-slate-300 dark:jsgd-bg-slate-700 dark:jsgd-border-slate-600 dark:jsgd-text-white"
|
|
131
131
|
}, null, 512), [
|
|
132
|
-
[
|
|
132
|
+
[z, k.value]
|
|
133
133
|
])
|
|
134
|
-
])) :
|
|
135
|
-
|
|
134
|
+
])) : x("", !0),
|
|
135
|
+
g.value === "url" || u.mode === "link" ? (r(), j("div", he, [
|
|
136
136
|
d[6] || (d[6] = e("label", { class: "jsgd-block jsgd-text-sm jsgd-font-medium jsgd-mb-1 dark:jsgd-text-slate-300" }, "URL", -1)),
|
|
137
|
-
|
|
138
|
-
"onUpdate:modelValue": d[3] || (d[3] = (
|
|
137
|
+
V(e("input", {
|
|
138
|
+
"onUpdate:modelValue": d[3] || (d[3] = (i) => l.value = i),
|
|
139
139
|
type: "text",
|
|
140
|
-
placeholder:
|
|
140
|
+
placeholder: c.value,
|
|
141
141
|
class: "jsgd-w-full jsgd-py-2 jsgd-px-3 jsgd-rounded-md jsgd-border jsgd-border-slate-300 dark:jsgd-bg-slate-700 dark:jsgd-border-slate-600 dark:jsgd-text-white",
|
|
142
|
-
onKeydown:
|
|
143
|
-
}, null, 40,
|
|
144
|
-
[
|
|
142
|
+
onKeydown: K($, ["enter"])
|
|
143
|
+
}, null, 40, ke), [
|
|
144
|
+
[z, l.value]
|
|
145
145
|
])
|
|
146
|
-
])) :
|
|
147
|
-
|
|
146
|
+
])) : x("", !0),
|
|
147
|
+
g.value === "upload" && w.value ? (r(), j("div", we, [
|
|
148
148
|
d[7] || (d[7] = e("label", { class: "jsgd-block jsgd-text-sm jsgd-font-medium jsgd-mb-1 dark:jsgd-text-slate-300" }, "Upload File", -1)),
|
|
149
149
|
e("input", {
|
|
150
150
|
type: "file",
|
|
151
|
-
accept:
|
|
151
|
+
accept: u.mode === "image" ? "image/*" : "video/*",
|
|
152
152
|
onChange: T,
|
|
153
153
|
class: "jsgd-w-full jsgd-text-sm jsgd-text-slate-500 file:jsgd-mr-4 file:jsgd-py-2 file:jsgd-px-4 file:jsgd-rounded-full file:jsgd-border-0 file:jsgd-text-sm file:jsgd-font-semibold file:jsgd-bg-blue-50 file:jsgd-text-blue-700 hover:file:jsgd-bg-blue-100 dark:file:jsgd-bg-blue-900/50 dark:file:jsgd-text-blue-300 dark:hover:file:jsgd-bg-blue-900"
|
|
154
|
-
}, null, 40,
|
|
155
|
-
|
|
154
|
+
}, null, 40, ye),
|
|
155
|
+
p.value ? (r(), j("div", qe, [
|
|
156
156
|
e("img", {
|
|
157
|
-
src:
|
|
157
|
+
src: p.value,
|
|
158
158
|
class: "jsgd-max-w-full jsgd-max-h-40 jsgd-rounded-md",
|
|
159
159
|
alt: "Upload Preview"
|
|
160
|
-
}, null, 8,
|
|
161
|
-
])) :
|
|
162
|
-
])) :
|
|
163
|
-
|
|
160
|
+
}, null, 8, Ue)
|
|
161
|
+
])) : x("", !0)
|
|
162
|
+
])) : x("", !0),
|
|
163
|
+
u.mode === "image" ? (r(), j("div", Te, [
|
|
164
164
|
d[8] || (d[8] = e("label", { class: "jsgd-block jsgd-text-sm jsgd-font-medium jsgd-mb-1 dark:jsgd-text-slate-300" }, "Alt Text (Optional)", -1)),
|
|
165
|
-
|
|
166
|
-
"onUpdate:modelValue": d[4] || (d[4] = (
|
|
165
|
+
V(e("input", {
|
|
166
|
+
"onUpdate:modelValue": d[4] || (d[4] = (i) => b.value = i),
|
|
167
167
|
type: "text",
|
|
168
168
|
placeholder: "Describe the image for accessibility",
|
|
169
169
|
class: "jsgd-w-full jsgd-py-2 jsgd-px-3 jsgd-rounded-md jsgd-border jsgd-border-slate-300 dark:jsgd-bg-slate-700 dark:jsgd-border-slate-600 dark:jsgd-text-white"
|
|
170
170
|
}, null, 512), [
|
|
171
|
-
[
|
|
171
|
+
[z, b.value]
|
|
172
172
|
])
|
|
173
|
-
])) :
|
|
173
|
+
])) : x("", !0)
|
|
174
174
|
]),
|
|
175
|
-
e("div",
|
|
175
|
+
e("div", Le, [
|
|
176
176
|
e("button", {
|
|
177
177
|
onClick: U,
|
|
178
178
|
class: "jsgd-px-4 jsgd-py-2 jsgd-rounded-md jsgd-text-sm jsgd-font-medium jsgd-bg-white jsgd-border jsgd-border-slate-300 hover:jsgd-bg-slate-50 dark:jsgd-bg-slate-700 dark:jsgd-text-slate-200 dark:jsgd-border-slate-600 dark:hover:jsgd-bg-slate-600"
|
|
@@ -180,82 +180,82 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
180
180
|
e("button", {
|
|
181
181
|
onClick: $,
|
|
182
182
|
class: "jsgd-px-4 jsgd-py-2 jsgd-rounded-md jsgd-text-sm jsgd-font-medium jsgd-text-white jsgd-bg-blue-600 hover:jsgd-bg-blue-700 dark:jsgd-bg-blue-500 dark:hover:jsgd-bg-blue-600",
|
|
183
|
-
disabled:
|
|
183
|
+
disabled: f.value
|
|
184
184
|
}, [
|
|
185
|
-
|
|
186
|
-
], 8,
|
|
185
|
+
f.value ? (r(), j("span", Ve, "Inserting...")) : (r(), j("span", Se, "Insert"))
|
|
186
|
+
], 8, Me)
|
|
187
187
|
])
|
|
188
188
|
])
|
|
189
189
|
]),
|
|
190
190
|
_: 1
|
|
191
191
|
})
|
|
192
|
-
])) :
|
|
192
|
+
])) : x("", !0)
|
|
193
193
|
]),
|
|
194
194
|
_: 1
|
|
195
195
|
}));
|
|
196
196
|
}
|
|
197
|
-
}),
|
|
197
|
+
}), Ce = /* @__PURE__ */ N($e, [["__scopeId", "data-v-e9ba68c4"]]), Ie = { class: "jsgd-w-full jsgd-max-w-sm jsgd-bg-white jsgd-rounded-xl jsgd-shadow-2xl jsgd-overflow-hidden dark:jsgd-bg-slate-800" }, Ae = { class: "jsgd-p-5 jsgd-flex jsgd-flex-col jsgd-gap-4" }, ze = /* @__PURE__ */ Q({
|
|
198
198
|
__name: "QuillAltModal",
|
|
199
199
|
props: {
|
|
200
200
|
show: { type: Boolean },
|
|
201
201
|
initialValue: {}
|
|
202
202
|
},
|
|
203
203
|
emits: ["close", "submit"],
|
|
204
|
-
setup(
|
|
205
|
-
const s =
|
|
206
|
-
|
|
204
|
+
setup(u, { emit: S }) {
|
|
205
|
+
const s = u, h = S, l = n("");
|
|
206
|
+
I(
|
|
207
207
|
() => s.show,
|
|
208
208
|
(k) => {
|
|
209
209
|
k && (l.value = s.initialValue || "");
|
|
210
210
|
}
|
|
211
211
|
);
|
|
212
|
-
function
|
|
212
|
+
function b() {
|
|
213
213
|
h("close");
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function v() {
|
|
216
216
|
h("submit", l.value);
|
|
217
217
|
}
|
|
218
|
-
return (k,
|
|
218
|
+
return (k, p) => (r(), B(D, {
|
|
219
219
|
name: "jsgd-modal-overlay",
|
|
220
220
|
appear: ""
|
|
221
221
|
}, {
|
|
222
|
-
default:
|
|
223
|
-
|
|
222
|
+
default: E(() => [
|
|
223
|
+
u.show ? (r(), j("div", {
|
|
224
224
|
key: 0,
|
|
225
225
|
class: "jsgd-fixed jsgd-inset-0 jsgd-z-[10001] jsgd-flex jsgd-items-center jsgd-justify-center jsgd-p-4 jsgd-bg-black/60 jsgd-backdrop-blur-sm",
|
|
226
|
-
onClick:
|
|
226
|
+
onClick: G(b, ["self"])
|
|
227
227
|
}, [
|
|
228
|
-
P(
|
|
228
|
+
P(D, {
|
|
229
229
|
name: "jsgd-modal-container",
|
|
230
230
|
appear: ""
|
|
231
231
|
}, {
|
|
232
|
-
default:
|
|
233
|
-
e("div",
|
|
234
|
-
|
|
232
|
+
default: E(() => [
|
|
233
|
+
e("div", Ie, [
|
|
234
|
+
p[3] || (p[3] = e("div", { class: "jsgd-p-5 jsgd-border-b jsgd-border-slate-200 dark:jsgd-border-slate-700" }, [
|
|
235
235
|
e("h3", { class: "jsgd-text-lg jsgd-font-bold jsgd-text-slate-900 dark:jsgd-text-slate-100" }, " Edit Image Alt Text ")
|
|
236
236
|
], -1)),
|
|
237
|
-
e("div",
|
|
237
|
+
e("div", Ae, [
|
|
238
238
|
e("div", null, [
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
"onUpdate:modelValue":
|
|
239
|
+
p[1] || (p[1] = e("label", { class: "jsgd-block jsgd-text-sm jsgd-font-medium jsgd-mb-1 dark:jsgd-text-slate-300" }, "Alt Text", -1)),
|
|
240
|
+
V(e("input", {
|
|
241
|
+
"onUpdate:modelValue": p[0] || (p[0] = (f) => l.value = f),
|
|
242
242
|
type: "text",
|
|
243
243
|
placeholder: "Describe the image for accessibility",
|
|
244
244
|
class: "jsgd-w-full jsgd-py-2 jsgd-px-3 jsgd-rounded-md jsgd-border jsgd-border-slate-300 dark:jsgd-bg-slate-700 dark:jsgd-border-slate-600 dark:jsgd-text-white",
|
|
245
|
-
onKeydown:
|
|
245
|
+
onKeydown: K(v, ["enter"])
|
|
246
246
|
}, null, 544), [
|
|
247
|
-
[
|
|
247
|
+
[z, l.value]
|
|
248
248
|
]),
|
|
249
|
-
|
|
249
|
+
p[2] || (p[2] = e("p", { class: "jsgd-text-xs jsgd-text-slate-500 jsgd-mt-2 dark:jsgd-text-slate-400" }, " Good alt text is descriptive and helps screen readers understand the image content. ", -1))
|
|
250
250
|
])
|
|
251
251
|
]),
|
|
252
252
|
e("div", { class: "jsgd-p-4 jsgd-bg-slate-50 jsgd-flex jsgd-justify-end jsgd-gap-3 dark:jsgd-bg-slate-900/50" }, [
|
|
253
253
|
e("button", {
|
|
254
|
-
onClick:
|
|
254
|
+
onClick: b,
|
|
255
255
|
class: "jsgd-px-4 jsgd-py-2 jsgd-rounded-md jsgd-text-sm jsgd-font-medium jsgd-bg-white jsgd-border jsgd-border-slate-300 hover:jsgd-bg-slate-50 dark:jsgd-bg-slate-700 dark:jsgd-text-slate-200 dark:jsgd-border-slate-600 dark:hover:jsgd-bg-slate-600"
|
|
256
256
|
}, " Cancel "),
|
|
257
257
|
e("button", {
|
|
258
|
-
onClick:
|
|
258
|
+
onClick: v,
|
|
259
259
|
class: "jsgd-px-4 jsgd-py-2 jsgd-rounded-md jsgd-text-sm jsgd-font-medium jsgd-text-white jsgd-bg-blue-600 hover:jsgd-bg-blue-700 dark:jsgd-bg-blue-500 dark:hover:jsgd-bg-blue-600"
|
|
260
260
|
}, " Save ")
|
|
261
261
|
])
|
|
@@ -263,31 +263,31 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
263
263
|
]),
|
|
264
264
|
_: 1
|
|
265
265
|
})
|
|
266
|
-
])) :
|
|
266
|
+
])) : x("", !0)
|
|
267
267
|
]),
|
|
268
268
|
_: 1
|
|
269
269
|
}));
|
|
270
270
|
}
|
|
271
|
-
}),
|
|
271
|
+
}), Ee = /* @__PURE__ */ N(ze, [["__scopeId", "data-v-4b0d2e4a"]]), Re = { class: "editor-header" }, _e = ["for"], Be = ["id"], De = { class: "ql-formats" }, Pe = {
|
|
272
272
|
key: 0,
|
|
273
273
|
viewBox: "0 0 18 18",
|
|
274
274
|
width: "18",
|
|
275
275
|
height: "18"
|
|
276
|
-
},
|
|
276
|
+
}, Fe = {
|
|
277
277
|
key: 1,
|
|
278
278
|
viewBox: "0 0 18 18",
|
|
279
279
|
width: "18",
|
|
280
280
|
height: "18"
|
|
281
|
-
},
|
|
281
|
+
}, He = { class: "editor-relative-container" }, Qe = {
|
|
282
282
|
key: 0,
|
|
283
283
|
class: "upload-overlay"
|
|
284
|
-
},
|
|
284
|
+
}, Ne = ["id"], Oe = {
|
|
285
285
|
key: 1,
|
|
286
286
|
class: "error-message"
|
|
287
|
-
},
|
|
287
|
+
}, Ge = /* @__PURE__ */ Q({
|
|
288
288
|
__name: "TextAreaQuill",
|
|
289
289
|
props: {
|
|
290
|
-
id: { default: () =>
|
|
290
|
+
id: { default: () => ge() },
|
|
291
291
|
label: {},
|
|
292
292
|
placeholder: {},
|
|
293
293
|
modelValue: {},
|
|
@@ -299,24 +299,28 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
299
299
|
apiUploadVideo: {}
|
|
300
300
|
},
|
|
301
301
|
emits: ["update:modelValue", "push:error", "remove:error"],
|
|
302
|
-
setup(
|
|
303
|
-
const s =
|
|
302
|
+
setup(u, { emit: S }) {
|
|
303
|
+
const s = u, h = S;
|
|
304
304
|
let l = null;
|
|
305
|
-
const
|
|
306
|
-
let
|
|
307
|
-
const U =
|
|
308
|
-
labels:
|
|
309
|
-
}),
|
|
310
|
-
() => s.placeholder ??
|
|
311
|
-
),
|
|
305
|
+
const b = n(!1), v = n([]), k = n(!1), p = n(""), f = n(!1), g = n("link"), w = n(""), R = n("");
|
|
306
|
+
let c = null;
|
|
307
|
+
const U = n(!1), T = n(null), $ = n(""), m = n(!1), d = n(""), i = le("TableComponents", {
|
|
308
|
+
labels: n(je[s.lang ?? "en"])
|
|
309
|
+
}), L = M(
|
|
310
|
+
() => s.placeholder ?? i.labels.value.placeholder?.quillEditor ?? "Write content here..."
|
|
311
|
+
), O = M(() => {
|
|
312
312
|
const a = [];
|
|
313
|
-
return s.validate?.minLength && a.push(
|
|
314
|
-
}),
|
|
315
|
-
|
|
313
|
+
return s.validate?.minLength && a.push(_("textMinLength", { min: String(s.validate.minLength) }, s.lang)), s.validate?.maxLength && a.push(_("textMaxLength", { max: String(s.validate.maxLength) }, s.lang)), a.join(", ");
|
|
314
|
+
}), W = () => {
|
|
315
|
+
b.value = !b.value;
|
|
316
316
|
};
|
|
317
|
-
|
|
317
|
+
I(b, (a) => {
|
|
318
318
|
document.body.style.overflow = a ? "hidden" : "";
|
|
319
|
-
})
|
|
319
|
+
});
|
|
320
|
+
const Y = () => {
|
|
321
|
+
m.value = !m.value, m.value ? d.value = l?.root.innerHTML ?? s.modelValue ?? "" : l && (l.root.innerHTML = H.sanitize(d.value));
|
|
322
|
+
};
|
|
323
|
+
I(
|
|
320
324
|
() => ({
|
|
321
325
|
val: s.modelValue,
|
|
322
326
|
disabled: s.disabled,
|
|
@@ -324,48 +328,48 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
324
328
|
}),
|
|
325
329
|
({ val: a, disabled: t, validate: o }) => {
|
|
326
330
|
if (t) {
|
|
327
|
-
|
|
331
|
+
v.value = [], h("remove:error", s.id);
|
|
328
332
|
return;
|
|
329
333
|
}
|
|
330
334
|
const y = String(a ?? "").replace(/<[^>]*>?/gm, "").trim(), q = [];
|
|
331
335
|
o && (o.minLength && y.length < o.minLength && y.length !== 0 && q.push(
|
|
332
|
-
|
|
336
|
+
_("textMinLength", { min: String(o.minLength) }, s.lang ?? "en")
|
|
333
337
|
), o.maxLength && y.length > o.maxLength && q.push(
|
|
334
|
-
|
|
335
|
-
)),
|
|
338
|
+
_("textMaxLength", { max: String(o.maxLength) }, s.lang ?? "en")
|
|
339
|
+
)), v.value = q, q.length ? h("push:error", q, s.id) : h("remove:error", s.id);
|
|
336
340
|
},
|
|
337
341
|
{ deep: !0, immediate: !0 }
|
|
338
342
|
);
|
|
339
|
-
const
|
|
340
|
-
if (
|
|
341
|
-
if (
|
|
342
|
-
}),
|
|
343
|
-
|
|
344
|
-
},
|
|
345
|
-
|
|
346
|
-
},
|
|
347
|
-
|
|
348
|
-
const t = l?.getText(
|
|
349
|
-
|
|
350
|
-
},
|
|
343
|
+
const J = M(() => {
|
|
344
|
+
if (g.value === "image") return s.apiUploadImage;
|
|
345
|
+
if (g.value === "video") return s.apiUploadVideo;
|
|
346
|
+
}), X = () => {
|
|
347
|
+
g.value = "image", w.value = "", f.value = !0;
|
|
348
|
+
}, Z = () => {
|
|
349
|
+
g.value = "video", w.value = "", f.value = !0;
|
|
350
|
+
}, ee = (a) => {
|
|
351
|
+
c = l?.getSelection(), c || (c = { index: l?.getSelection(!0)?.index || 0, length: 0 });
|
|
352
|
+
const t = l?.getText(c.index, c.length) || "";
|
|
353
|
+
R.value = t, w.value = typeof a == "string" ? a : "", g.value = "link", f.value = !0;
|
|
354
|
+
}, te = (a) => {
|
|
351
355
|
if (l) {
|
|
352
|
-
if (
|
|
353
|
-
if (!
|
|
356
|
+
if (f.value = !1, g.value === "link") {
|
|
357
|
+
if (!c) return;
|
|
354
358
|
const t = a.text || a.url;
|
|
355
|
-
l.setSelection(
|
|
356
|
-
} else if (
|
|
359
|
+
l.setSelection(c.index, c.length, "silent"), c.length > 0 && l.deleteText(c.index, c.length, "user"), l.insertText(c.index, t, "link", a.url, "user"), l.setSelection(c.index + t.length, 0, "user");
|
|
360
|
+
} else if (g.value === "image") {
|
|
357
361
|
const t = l.getSelection(!0), o = a.alt?.replace(/"/g, """) || "", y = `<img src="${a.url}" alt="${o}" />`;
|
|
358
362
|
l.clipboard.dangerouslyPasteHTML(t.index, y, "user"), l.setSelection(t.index + 1, 0);
|
|
359
|
-
} else if (
|
|
363
|
+
} else if (g.value === "video") {
|
|
360
364
|
const t = l.getSelection(!0);
|
|
361
365
|
l.insertEmbed(t.index, "video", a.url, "user"), l.setSelection(t.index + 1, 0);
|
|
362
366
|
}
|
|
363
|
-
|
|
367
|
+
c = null;
|
|
364
368
|
}
|
|
365
|
-
},
|
|
369
|
+
}, se = (a) => {
|
|
366
370
|
T.value && T.value.setAttribute("alt", a), U.value = !1, T.value = null;
|
|
367
371
|
};
|
|
368
|
-
return
|
|
372
|
+
return de(async () => {
|
|
369
373
|
if (typeof window > "u") return;
|
|
370
374
|
const a = document.getElementById(`editor-container-${s.id}`);
|
|
371
375
|
if (!a) return;
|
|
@@ -379,11 +383,11 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
379
383
|
l = new t(a, {
|
|
380
384
|
theme: "snow",
|
|
381
385
|
readOnly: s.disabled ?? !1,
|
|
382
|
-
placeholder:
|
|
386
|
+
placeholder: L.value,
|
|
383
387
|
modules: {
|
|
384
388
|
toolbar: {
|
|
385
389
|
container: `#toolbar-container-${s.id}`,
|
|
386
|
-
handlers: { image:
|
|
390
|
+
handlers: { image: X, video: Z, link: ee }
|
|
387
391
|
},
|
|
388
392
|
resize: {
|
|
389
393
|
locale: {},
|
|
@@ -404,59 +408,59 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
404
408
|
]
|
|
405
409
|
}
|
|
406
410
|
}
|
|
407
|
-
}), l.root.setAttribute("spellcheck", "true"), l.root.setAttribute("lang", s.lang === "id" ? "id" : "en"), s.modelValue && (l.root.innerHTML =
|
|
411
|
+
}), l.root.setAttribute("spellcheck", "true"), l.root.setAttribute("lang", s.lang === "id" ? "id" : "en"), s.modelValue && (l.root.innerHTML = H.sanitize(s.modelValue)), l.on("text-change", () => {
|
|
408
412
|
const o = l.root.innerHTML;
|
|
409
|
-
h("update:modelValue",
|
|
413
|
+
h("update:modelValue", H.sanitize(o), s.id);
|
|
410
414
|
});
|
|
411
|
-
}),
|
|
415
|
+
}), I(
|
|
412
416
|
() => s.disabled,
|
|
413
417
|
(a) => l?.enable(!a)
|
|
414
|
-
),
|
|
418
|
+
), ae(() => {
|
|
415
419
|
document.body.style.overflow = "";
|
|
416
|
-
}), (a, t) => (
|
|
420
|
+
}), (a, t) => (r(), B(oe, {
|
|
417
421
|
to: "body",
|
|
418
|
-
disabled: !
|
|
422
|
+
disabled: !b.value
|
|
419
423
|
}, [
|
|
420
424
|
e("div", {
|
|
421
|
-
class: A(["rich-text-editor-wrapper", { "editor-maximized":
|
|
425
|
+
class: A(["rich-text-editor-wrapper", { "editor-maximized": b.value }])
|
|
422
426
|
}, [
|
|
423
|
-
e("div",
|
|
427
|
+
e("div", Re, [
|
|
424
428
|
e("label", {
|
|
425
|
-
for:
|
|
426
|
-
class: A(["jsgd-inline-flex jsgd-items-center jsgd-gap-2 jsgd-text-sm jsgd-font-medium jsgd-mb-2 jsgd-text-slate-900 jsgd-transition-colors jsgd-duration-200 dark:jsgd-text-slate-100", { "jsgd-text-red-500 dark:jsgd-text-red-400":
|
|
429
|
+
for: u.id,
|
|
430
|
+
class: A(["jsgd-inline-flex jsgd-items-center jsgd-gap-2 jsgd-text-sm jsgd-font-medium jsgd-mb-2 jsgd-text-slate-900 jsgd-transition-colors jsgd-duration-200 dark:jsgd-text-slate-100", { "jsgd-text-red-500 dark:jsgd-text-red-400": v.value }])
|
|
427
431
|
}, [
|
|
428
|
-
F(
|
|
429
|
-
|
|
432
|
+
F(C(u.label) + " ", 1),
|
|
433
|
+
O.value ? (r(), B(ne(ce), {
|
|
430
434
|
key: 0,
|
|
431
|
-
text:
|
|
435
|
+
text: O.value,
|
|
432
436
|
as: "strong"
|
|
433
437
|
}, {
|
|
434
|
-
default:
|
|
438
|
+
default: E(() => [...t[3] || (t[3] = [
|
|
435
439
|
F(" ❓", -1)
|
|
436
440
|
])]),
|
|
437
441
|
_: 1
|
|
438
|
-
}, 8, ["text"])) :
|
|
439
|
-
], 10,
|
|
442
|
+
}, 8, ["text"])) : x("", !0)
|
|
443
|
+
], 10, _e)
|
|
440
444
|
]),
|
|
441
445
|
e("div", {
|
|
442
|
-
id: `toolbar-container-${
|
|
446
|
+
id: `toolbar-container-${u.id}`,
|
|
443
447
|
class: "quill-toolbar"
|
|
444
448
|
}, [
|
|
445
|
-
t[
|
|
449
|
+
t[7] || (t[7] = e("span", { class: "ql-formats" }, [
|
|
446
450
|
e("select", { class: "ql-font" }),
|
|
447
451
|
e("select", { class: "ql-size" })
|
|
448
452
|
], -1)),
|
|
449
|
-
t[
|
|
453
|
+
t[8] || (t[8] = e("span", { class: "ql-formats" }, [
|
|
450
454
|
e("button", { class: "ql-bold" }),
|
|
451
455
|
e("button", { class: "ql-italic" }),
|
|
452
456
|
e("button", { class: "ql-underline" }),
|
|
453
457
|
e("button", { class: "ql-strike" })
|
|
454
458
|
], -1)),
|
|
455
|
-
t[
|
|
459
|
+
t[9] || (t[9] = e("span", { class: "ql-formats" }, [
|
|
456
460
|
e("select", { class: "ql-color" }),
|
|
457
461
|
e("select", { class: "ql-background" })
|
|
458
462
|
], -1)),
|
|
459
|
-
t[
|
|
463
|
+
t[10] || (t[10] = e("span", { class: "ql-formats" }, [
|
|
460
464
|
e("button", {
|
|
461
465
|
class: "ql-header",
|
|
462
466
|
value: "1"
|
|
@@ -468,7 +472,7 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
468
472
|
e("button", { class: "ql-blockquote" }),
|
|
469
473
|
e("button", { class: "ql-code-block" })
|
|
470
474
|
], -1)),
|
|
471
|
-
t[
|
|
475
|
+
t[11] || (t[11] = e("span", { class: "ql-formats" }, [
|
|
472
476
|
e("button", {
|
|
473
477
|
class: "ql-list",
|
|
474
478
|
value: "ordered"
|
|
@@ -486,26 +490,26 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
486
490
|
value: "+1"
|
|
487
491
|
})
|
|
488
492
|
], -1)),
|
|
489
|
-
t[
|
|
493
|
+
t[12] || (t[12] = e("span", { class: "ql-formats" }, [
|
|
490
494
|
e("button", {
|
|
491
495
|
class: "ql-direction",
|
|
492
496
|
value: "rtl"
|
|
493
497
|
}),
|
|
494
498
|
e("select", { class: "ql-align" })
|
|
495
499
|
], -1)),
|
|
496
|
-
t[
|
|
500
|
+
t[13] || (t[13] = e("span", { class: "ql-formats" }, [
|
|
497
501
|
e("button", { class: "ql-link" }),
|
|
498
502
|
e("button", { class: "ql-image" }),
|
|
499
503
|
F(),
|
|
500
504
|
e("button", { class: "ql-video" })
|
|
501
505
|
], -1)),
|
|
502
|
-
e("span",
|
|
506
|
+
e("span", De, [
|
|
503
507
|
e("button", {
|
|
504
|
-
onClick:
|
|
508
|
+
onClick: W,
|
|
505
509
|
class: "maximize-button",
|
|
506
510
|
type: "button"
|
|
507
511
|
}, [
|
|
508
|
-
|
|
512
|
+
b.value ? (r(), j("svg", Fe, [...t[5] || (t[5] = [
|
|
509
513
|
e("rect", {
|
|
510
514
|
class: "ql-stroke",
|
|
511
515
|
x: "5",
|
|
@@ -521,7 +525,7 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
521
525
|
class: "ql-stroke",
|
|
522
526
|
points: "3 15 8 10"
|
|
523
527
|
}, null, -1)
|
|
524
|
-
])])) : (
|
|
528
|
+
])])) : (r(), j("svg", Pe, [...t[4] || (t[4] = [
|
|
525
529
|
e("rect", {
|
|
526
530
|
class: "ql-stroke",
|
|
527
531
|
x: "3",
|
|
@@ -558,43 +562,76 @@ const ge = { class: "jsgd-w-full jsgd-max-w-md jsgd-bg-white jsgd-rounded-xl jsg
|
|
|
558
562
|
height: "1"
|
|
559
563
|
}, null, -1)
|
|
560
564
|
])]))
|
|
561
|
-
])
|
|
565
|
+
]),
|
|
566
|
+
e("button", {
|
|
567
|
+
onClick: Y,
|
|
568
|
+
class: "code-view-button",
|
|
569
|
+
type: "button",
|
|
570
|
+
title: "Source"
|
|
571
|
+
}, [...t[6] || (t[6] = [
|
|
572
|
+
e("svg", {
|
|
573
|
+
viewBox: "0 0 18 18",
|
|
574
|
+
width: "18",
|
|
575
|
+
height: "18"
|
|
576
|
+
}, [
|
|
577
|
+
e("polyline", {
|
|
578
|
+
class: "ql-stroke",
|
|
579
|
+
points: "5 3 2 9 5 15"
|
|
580
|
+
}),
|
|
581
|
+
e("polyline", {
|
|
582
|
+
class: "ql-stroke",
|
|
583
|
+
points: "13 3 16 9 13 15"
|
|
584
|
+
})
|
|
585
|
+
], -1)
|
|
586
|
+
])])
|
|
562
587
|
])
|
|
563
|
-
], 8,
|
|
564
|
-
e("div",
|
|
565
|
-
k.value ? (
|
|
566
|
-
t[
|
|
567
|
-
e("p", null, "Uploading " +
|
|
568
|
-
])) :
|
|
569
|
-
e("div",
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
588
|
+
], 8, Be),
|
|
589
|
+
e("div", He, [
|
|
590
|
+
k.value ? (r(), j("div", Qe, [
|
|
591
|
+
t[14] || (t[14] = e("div", { class: "spinner" }, null, -1)),
|
|
592
|
+
e("p", null, "Uploading " + C(p.value) + "...", 1)
|
|
593
|
+
])) : x("", !0),
|
|
594
|
+
V(e("div", null, [
|
|
595
|
+
e("div", {
|
|
596
|
+
id: `editor-container-${u.id}`,
|
|
597
|
+
class: A(["quill-editor-container", { "has-error": u.error }])
|
|
598
|
+
}, null, 10, Ne)
|
|
599
|
+
], 512), [
|
|
600
|
+
[re, !m.value]
|
|
601
|
+
]),
|
|
602
|
+
m.value ? V((r(), j("textarea", {
|
|
603
|
+
key: 1,
|
|
604
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => d.value = o),
|
|
605
|
+
class: "code-view-editor",
|
|
606
|
+
spellcheck: "false"
|
|
607
|
+
}, null, 512)), [
|
|
608
|
+
[z, d.value]
|
|
609
|
+
]) : x("", !0)
|
|
573
610
|
]),
|
|
574
|
-
|
|
611
|
+
v.value.length !== 0 ? (r(!0), j(ie, { key: 0 }, ue(v.value, (o, y) => (r(), j("p", {
|
|
575
612
|
key: y,
|
|
576
613
|
class: "error-message"
|
|
577
|
-
},
|
|
578
|
-
typeof s.error == "string" &&
|
|
579
|
-
P(
|
|
580
|
-
show:
|
|
581
|
-
mode:
|
|
582
|
-
"upload-url":
|
|
614
|
+
}, C(o), 1))), 128)) : x("", !0),
|
|
615
|
+
typeof s.error == "string" && v.value.length === 0 ? (r(), j("p", Oe, C(u.error), 1)) : x("", !0),
|
|
616
|
+
P(Ce, {
|
|
617
|
+
show: f.value,
|
|
618
|
+
mode: g.value,
|
|
619
|
+
"upload-url": J.value,
|
|
583
620
|
"initial-value": w.value,
|
|
584
|
-
"initial-text":
|
|
585
|
-
onClose: t[
|
|
586
|
-
onSubmit:
|
|
621
|
+
"initial-text": R.value,
|
|
622
|
+
onClose: t[1] || (t[1] = (o) => f.value = !1),
|
|
623
|
+
onSubmit: te
|
|
587
624
|
}, null, 8, ["show", "mode", "upload-url", "initial-value", "initial-text"]),
|
|
588
|
-
P(
|
|
625
|
+
P(Ee, {
|
|
589
626
|
show: U.value,
|
|
590
627
|
"initial-value": $.value,
|
|
591
|
-
onClose: t[
|
|
592
|
-
onSubmit:
|
|
628
|
+
onClose: t[2] || (t[2] = (o) => U.value = !1),
|
|
629
|
+
onSubmit: se
|
|
593
630
|
}, null, 8, ["show", "initial-value"])
|
|
594
631
|
], 2)
|
|
595
632
|
], 8, ["disabled"]));
|
|
596
633
|
}
|
|
597
|
-
}),
|
|
634
|
+
}), Ze = /* @__PURE__ */ N(Ge, [["__scopeId", "data-v-c98af8b6"]]);
|
|
598
635
|
export {
|
|
599
|
-
|
|
636
|
+
Ze as default
|
|
600
637
|
};
|