@fileverse-dev/dsheet 1.2.86-price → 1.2.86-price-a
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/dist/index.es.js +38 -34
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -186729,68 +186729,72 @@ const EEt = (e) => {
|
|
|
186729
186729
|
var h, p;
|
|
186730
186730
|
(h = n.current[v]) == null || h.delete(m), (p = e.current) == null || p.removeFromLiveQueryList(v, m);
|
|
186731
186731
|
}, s = async (v) => {
|
|
186732
|
-
var h, p, d, b;
|
|
186732
|
+
var h, p, d, b, g, w, x;
|
|
186733
186733
|
const m = v.data.function.split("=")[1];
|
|
186734
186734
|
try {
|
|
186735
186735
|
switch (v.data.name.toLowerCase()) {
|
|
186736
186736
|
case "coingecko": {
|
|
186737
|
-
const { cellData:
|
|
186738
|
-
if (!
|
|
186739
|
-
|
|
186737
|
+
const { cellData: k, data: T } = v, { row: L, column: S } = T, B = (h = e.current) == null ? void 0 : h.getWorkbookContext(), R = (d = (p = lr(B)) == null ? void 0 : p[L]) == null ? void 0 : d[S], q = Xt(B, T.subSheetId), j = (I) => {
|
|
186738
|
+
if (!I) return I;
|
|
186739
|
+
I.replace(/\\"/g, '"');
|
|
186740
186740
|
};
|
|
186741
|
-
if (!(
|
|
186742
|
-
|
|
186741
|
+
if (!(R != null && R.f) || j(R == null ? void 0 : R.f) !== j(k.f)) {
|
|
186742
|
+
q != null && q.toString && f(q, T.id);
|
|
186743
186743
|
return;
|
|
186744
186744
|
}
|
|
186745
|
-
const
|
|
186745
|
+
const N = await VC({
|
|
186746
186746
|
functionCallString: m,
|
|
186747
186747
|
sheetEditorRef: e
|
|
186748
186748
|
});
|
|
186749
|
-
if (yre(
|
|
186750
|
-
|
|
186749
|
+
if (yre(N)) {
|
|
186750
|
+
N.type = hM, t == null || t({ data: N });
|
|
186751
186751
|
return;
|
|
186752
186752
|
}
|
|
186753
|
-
const
|
|
186754
|
-
if (!
|
|
186755
|
-
const [
|
|
186756
|
-
if (
|
|
186757
|
-
const [
|
|
186758
|
-
if (!(
|
|
186753
|
+
const P = N, A = P[0];
|
|
186754
|
+
if (!A) return;
|
|
186755
|
+
const [_, D] = Object.entries(A)[0], E = v.data.value[0];
|
|
186756
|
+
if (E) {
|
|
186757
|
+
const [I, W] = Object.entries(E)[0];
|
|
186758
|
+
if (!(_ !== I || D !== W))
|
|
186759
186759
|
return;
|
|
186760
186760
|
}
|
|
186761
186761
|
if (H5({
|
|
186762
|
-
row:
|
|
186763
|
-
column:
|
|
186764
|
-
newValue:
|
|
186765
|
-
apiData:
|
|
186762
|
+
row: L,
|
|
186763
|
+
column: S,
|
|
186764
|
+
newValue: k,
|
|
186765
|
+
apiData: P,
|
|
186766
186766
|
sheetEditorRef: e,
|
|
186767
186767
|
shouldIgnoreUsdValue: !0
|
|
186768
|
-
}),
|
|
186769
|
-
const
|
|
186768
|
+
}), q != null && q.toString()) {
|
|
186769
|
+
const I = {
|
|
186770
186770
|
...v,
|
|
186771
|
-
data: { ...
|
|
186771
|
+
data: { ...T, value: P }
|
|
186772
186772
|
};
|
|
186773
|
-
n.current[
|
|
186774
|
-
|
|
186775
|
-
|
|
186773
|
+
n.current[q].set(
|
|
186774
|
+
I.data.id,
|
|
186775
|
+
I
|
|
186776
186776
|
), (b = e.current) == null || b.updateSheetLiveQueryList(
|
|
186777
|
-
|
|
186778
|
-
|
|
186777
|
+
q,
|
|
186778
|
+
I
|
|
186779
186779
|
);
|
|
186780
186780
|
}
|
|
186781
|
-
gW(
|
|
186781
|
+
gW(B.currentSheetId, L, S), (x = e.current) == null || x.calculateSubSheetFormula(
|
|
186782
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
186783
|
+
// @ts-expect-error
|
|
186784
|
+
(w = (g = e.current) == null ? void 0 : g.getSheet()) == null ? void 0 : w.id
|
|
186785
|
+
);
|
|
186782
186786
|
return;
|
|
186783
186787
|
}
|
|
186784
186788
|
}
|
|
186785
|
-
} catch (
|
|
186786
|
-
const
|
|
186789
|
+
} catch (k) {
|
|
186790
|
+
const T = {
|
|
186787
186791
|
data: {
|
|
186788
|
-
message: (
|
|
186792
|
+
message: (k == null ? void 0 : k.message) || "Live query failed",
|
|
186789
186793
|
functionName: "COINGECKO",
|
|
186790
186794
|
type: hM
|
|
186791
186795
|
}
|
|
186792
186796
|
};
|
|
186793
|
-
t == null || t(
|
|
186797
|
+
t == null || t(T);
|
|
186794
186798
|
}
|
|
186795
186799
|
}, o = mr(!1), u = async () => {
|
|
186796
186800
|
var v;
|
|
@@ -234754,7 +234758,7 @@ const RMt = ({
|
|
|
234754
234758
|
if (c[q], !j.v.baseValue) continue;
|
|
234755
234759
|
j.v = typeof j.v == "string" ? j.v : { ...c[q].v };
|
|
234756
234760
|
const N = (m = (v = j.v) == null ? void 0 : v.m) == null ? void 0 : m.toString(), P = (p = (h = j.v) == null ? void 0 : h.m) != null && p.includes(".") ? (w = (g = (b = (d = j.v) == null ? void 0 : d.m) == null ? void 0 : b.split(" ")[0]) == null ? void 0 : g.split(".")[1]) == null ? void 0 : w.length : 0, A = (k = (x = j.v) == null ? void 0 : x.m) == null ? void 0 : k.split(" ")[1], _ = LMt[A], D = (L = t.current[_]) == null ? void 0 : L[(T = j.v) == null ? void 0 : T.baseCurrency];
|
|
234757
|
-
if (
|
|
234761
|
+
if (!D) return;
|
|
234758
234762
|
j.v.m = N.replace(
|
|
234759
234763
|
/\d+(\.\d+)?/,
|
|
234760
234764
|
(Number((S = j.v) == null ? void 0 : S.v) / D).toFixed(P).toString()
|
|
@@ -234762,7 +234766,7 @@ const RMt = ({
|
|
|
234762
234766
|
const F = FMt(j.c + 1);
|
|
234763
234767
|
f.push(`${F}${j.r + 1}`);
|
|
234764
234768
|
}
|
|
234765
|
-
|
|
234769
|
+
f.length > 0 && ((R = e.current) == null || R.calculateCellReferencedSubSheetFormula(a, f));
|
|
234766
234770
|
};
|
|
234767
234771
|
return br(() => (i(), r.current = setInterval(
|
|
234768
234772
|
() => {
|