@fileverse-dev/ddoc 2.4.7 → 2.4.8
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 { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-
|
1
|
+
import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-1uy_EVmy.mjs";
|
2
2
|
class S extends p {
|
3
3
|
constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
|
4
4
|
var o;
|
@@ -89879,7 +89879,7 @@ async function Ak(e, t) {
|
|
89879
89879
|
});
|
89880
89880
|
return P === "0x" ? { data: void 0 } : { data: P };
|
89881
89881
|
} catch (B) {
|
89882
|
-
const j = IWt(B), { offchainLookup: N, offchainLookupSignature: L } = await import("./ccip-
|
89882
|
+
const j = IWt(B), { offchainLookup: N, offchainLookupSignature: L } = await import("./ccip-7m51wCPL.mjs");
|
89883
89883
|
if (e.ccipRead !== !1 && (j == null ? void 0 : j.slice(0, 10)) === L && b)
|
89884
89884
|
return { data: await N(e, { data: j, to: b }) };
|
89885
89885
|
throw S && (j == null ? void 0 : j.slice(0, 10)) === "0x101bb98d" ? new UVt({ factory: c }) : cpe(B, {
|
@@ -153499,39 +153499,38 @@ const d9n = an.create({
|
|
153499
153499
|
const a = i.target.files;
|
153500
153500
|
if (!a || a.length === 0) return;
|
153501
153501
|
const s = a[0];
|
153502
|
-
if (s.type === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || s.name.endsWith(".docx")) {
|
153503
|
-
const
|
153504
|
-
|
153505
|
-
|
153506
|
-
|
153507
|
-
|
153508
|
-
|
153509
|
-
|
153510
|
-
|
153511
|
-
|
153512
|
-
|
153513
|
-
|
153514
|
-
|
153515
|
-
|
153516
|
-
|
153517
|
-
|
153518
|
-
|
153519
|
-
|
153520
|
-
|
153521
|
-
|
153522
|
-
|
153523
|
-
f,
|
153524
|
-
e
|
153525
|
-
), n == null || n();
|
153526
|
-
} catch (d) {
|
153527
|
-
console.error("Error importing DOCX file:", d);
|
153528
|
-
} finally {
|
153529
|
-
u(c);
|
153530
|
-
}
|
153531
|
-
} else
|
153532
|
-
t == null || t(
|
153533
|
-
"Oops! That file type isn’t supported. Give it another go with a .docx file."
|
153502
|
+
if (!(s.type === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || s.name.endsWith(".docx"))) {
|
153503
|
+
const f = "Oops! That file type isn’t supported. Please upload a .docx file.";
|
153504
|
+
throw t == null || t(f), new Error(f);
|
153505
|
+
}
|
153506
|
+
const { showLoader: u, removeLoader: c } = J2(
|
153507
|
+
this.editor,
|
153508
|
+
"Importing DOCX file ..."
|
153509
|
+
), d = u();
|
153510
|
+
try {
|
153511
|
+
const f = await s.arrayBuffer(), { value: h } = await fa.convertToHtml(
|
153512
|
+
{ arrayBuffer: f },
|
153513
|
+
{
|
153514
|
+
convertImage: fa.images.inline(
|
153515
|
+
async (p) => {
|
153516
|
+
const g = await p.read("base64");
|
153517
|
+
return {
|
153518
|
+
src: `data:${p.contentType};base64,${g}`
|
153519
|
+
};
|
153520
|
+
}
|
153521
|
+
)
|
153522
|
+
}
|
153534
153523
|
);
|
153524
|
+
await d2(
|
153525
|
+
r,
|
153526
|
+
h,
|
153527
|
+
e
|
153528
|
+
), n == null || n();
|
153529
|
+
} catch (f) {
|
153530
|
+
console.error(f), t == null || t("Error importing DOCX file");
|
153531
|
+
} finally {
|
153532
|
+
c(d);
|
153533
|
+
}
|
153535
153534
|
}, o.click(), !0;
|
153536
153535
|
}
|
153537
153536
|
};
|
package/dist/index.es.js
CHANGED