ablok-components 0.3.22 → 0.3.24
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.
|
@@ -803,16 +803,18 @@ function Fx(t, e, n, A = "image/png", r) {
|
|
|
803
803
|
return s ? (s.drawImage(t, 0, 0, e, n), i.toDataURL(A, r)) : t.src;
|
|
804
804
|
}
|
|
805
805
|
async function N2(t, e, n) {
|
|
806
|
-
const A =
|
|
807
|
-
if (!
|
|
808
|
-
const
|
|
809
|
-
|
|
810
|
-
|
|
806
|
+
const A = (t.type || "").toLowerCase();
|
|
807
|
+
if (!(A.startsWith("image/") && A !== "image/svg+xml")) return t;
|
|
808
|
+
const i = await Tf(t), s = await H2(i), o = s.naturalWidth, a = s.naturalHeight;
|
|
809
|
+
if (!o || o <= e) return t;
|
|
810
|
+
const u = Math.round(e), c = a / o, f = Math.round(u * c), h = Fx(
|
|
811
|
+
s,
|
|
811
812
|
u,
|
|
813
|
+
f,
|
|
812
814
|
t.type || "image/png",
|
|
813
815
|
n
|
|
814
816
|
);
|
|
815
|
-
return await Sx(
|
|
817
|
+
return await Sx(h, t.name, t.type || "image/png");
|
|
816
818
|
}
|
|
817
819
|
function Qx(t) {
|
|
818
820
|
return !t || typeof t != "string" ? "" : t.replace(/\0/g, "").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, "").replace(/on\w+\s*=\s*["'][^"']*["']/gi, "").replace(/on\w+\s*=\s*[^\s>]*/gi, "").replace(/javascript:/gi, "").replace(/data:text\/html/gi, "");
|
|
@@ -32770,7 +32772,7 @@ const b7 = { class: "rte-editor" }, C7 = {
|
|
|
32770
32772
|
}, 8, ["modelValue", "options", "name", "id", "label", "disabled", "required"])
|
|
32771
32773
|
]));
|
|
32772
32774
|
}
|
|
32773
|
-
}), K7 = ["id"], W7 = ["for", "innerHTML"], z7 = { class: "dropdown" }, G7 = { class: "caption" }, Y7 = ["innerHTML"], q7 = { class: "caption__text" }, X7 = { class: "d-block text-truncate" }, J7 = { class: "dropdown-menu" }, j7 = { class: "form-check" }, Z7 = ["value", "id", "name", "label", "required", "disabled"], eq = ["value", "id", "name", "label", "required", "disabled"], tq = ["for"], yre = /* @__PURE__ */ ze({
|
|
32775
|
+
}), K7 = ["id"], W7 = ["for", "innerHTML"], z7 = { class: "dropdown" }, G7 = { class: "caption" }, Y7 = ["innerHTML"], q7 = { class: "caption__text" }, X7 = { class: "d-block text-truncate" }, J7 = { class: "dropdown-menu" }, j7 = { class: "form-check d-flex" }, Z7 = ["value", "id", "name", "label", "required", "disabled"], eq = ["value", "id", "name", "label", "required", "disabled"], tq = ["for"], yre = /* @__PURE__ */ ze({
|
|
32774
32776
|
__name: "input-dropdown",
|
|
32775
32777
|
props: {
|
|
32776
32778
|
id: {
|
|
@@ -32871,7 +32873,9 @@ const b7 = { class: "rte-editor" }, C7 = {
|
|
|
32871
32873
|
""
|
|
32872
32874
|
);
|
|
32873
32875
|
if (!A.multiple) {
|
|
32874
|
-
const a = s.value.find(
|
|
32876
|
+
const a = s.value.find(
|
|
32877
|
+
(u) => typeof u.value == "object" && u.value !== null ? JSON.stringify(u.value) === JSON.stringify(A.modelValue) : u.value === A.modelValue
|
|
32878
|
+
);
|
|
32875
32879
|
return a ? a.text : A.placeholder || `${n("common.select")}`;
|
|
32876
32880
|
}
|
|
32877
32881
|
return A.placeholder || `${n("common.select")}`;
|