@fileverse-dev/dsheet 1.2.86-new-bold-3 → 1.2.86-price
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 +42 -45
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -100600,7 +100600,7 @@ function wZ(e, t, r, i, n, a, l, c) {
|
|
|
100600
100600
|
else if (v === "Escape")
|
|
100601
100601
|
e.contextMenu = {};
|
|
100602
100602
|
else if (v === "Delete" || v === "Backspace") {
|
|
100603
|
-
if (!m) return [2];
|
|
100603
|
+
if (console.log("Delete"), !m) return [2];
|
|
100604
100604
|
e.activeImg != null ? Hw(e) : Ow(e), ko(e, null, void 0), i.preventDefault();
|
|
100605
100605
|
} else if (v === "ArrowUp" || v === "ArrowDown" || v === "ArrowLeft" || v === "ArrowRight")
|
|
100606
100606
|
yZ(e, i);
|
|
@@ -171913,12 +171913,16 @@ var k6 = function() {
|
|
|
171913
171913
|
He.stopPropagation(), He.preventDefault();
|
|
171914
171914
|
}, Pe = xr(function(Be) {
|
|
171915
171915
|
var He, Se;
|
|
171916
|
-
if (
|
|
171916
|
+
if (de.current || !v.current) {
|
|
171917
|
+
me();
|
|
171918
|
+
return;
|
|
171919
|
+
}
|
|
171920
|
+
if (m.current = new KeyboardEvent(Be.type, Be.nativeEvent), ve.current = v.current.innerText, Be.metaKey && (Be.code === "KeyB" ? (Rk(s, v.current), Te(Be)) : Be.code === "KeyI" ? (Nk(s, v.current), Te(Be)) : Be.code === "KeyU" ? (Ik(s, v.current), Te(Be)) : Be.code === "KeyS" && ($L(s, v.current), Te(Be))), !de.current) {
|
|
171917
171921
|
var rt = Mp(v == null ? void 0 : v.current);
|
|
171918
171922
|
W(rt);
|
|
171919
171923
|
}
|
|
171920
171924
|
var bt = !0;
|
|
171921
|
-
(Be.key === "Delete" || Be.key === "Backspace") && (
|
|
171925
|
+
(Be.key === "Delete" || Be.key === "Backspace") && (requestAnimationFrame(me), sq(v == null ? void 0 : v.current) === (v == null ? void 0 : v.current.innerText.length) && setTimeout(function() {
|
|
171922
171926
|
yh(v == null ? void 0 : v.current);
|
|
171923
171927
|
}, 5));
|
|
171924
171928
|
var _e = ke.current;
|
|
@@ -172096,11 +172100,7 @@ var k6 = function() {
|
|
|
172096
172100
|
onCompositionUpdate: function() {
|
|
172097
172101
|
de.current = !0;
|
|
172098
172102
|
},
|
|
172099
|
-
onCompositionEnd: function(
|
|
172100
|
-
if (He.data === "" && He.currentTarget.value === "") {
|
|
172101
|
-
de.current = !0;
|
|
172102
|
-
return;
|
|
172103
|
-
}
|
|
172103
|
+
onCompositionEnd: function() {
|
|
172104
172104
|
me(), de.current = !1;
|
|
172105
172105
|
},
|
|
172106
172106
|
onMouseUp: function() {
|
|
@@ -186729,72 +186729,68 @@ 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;
|
|
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: g, data: w } = v, { row: x, column: k } = w, T = (h = e.current) == null ? void 0 : h.getWorkbookContext(), L = (d = (p = lr(T)) == null ? void 0 : p[x]) == null ? void 0 : d[k], S = Xt(T, w.subSheetId), B = (D) => {
|
|
186738
|
+
if (!D) return D;
|
|
186739
|
+
D.replace(/\\"/g, '"');
|
|
186740
186740
|
};
|
|
186741
|
-
if (!(
|
|
186742
|
-
|
|
186741
|
+
if (!(L != null && L.f) || B(L == null ? void 0 : L.f) !== B(g.f)) {
|
|
186742
|
+
S != null && S.toString && f(S, w.id);
|
|
186743
186743
|
return;
|
|
186744
186744
|
}
|
|
186745
|
-
const
|
|
186745
|
+
const R = await VC({
|
|
186746
186746
|
functionCallString: m,
|
|
186747
186747
|
sheetEditorRef: e
|
|
186748
186748
|
});
|
|
186749
|
-
if (yre(
|
|
186750
|
-
|
|
186749
|
+
if (yre(R)) {
|
|
186750
|
+
R.type = hM, t == null || t({ data: R });
|
|
186751
186751
|
return;
|
|
186752
186752
|
}
|
|
186753
|
-
const
|
|
186754
|
-
if (!
|
|
186755
|
-
const [
|
|
186756
|
-
if (
|
|
186757
|
-
const [
|
|
186758
|
-
if (!(
|
|
186753
|
+
const q = R, j = q[0];
|
|
186754
|
+
if (!j) return;
|
|
186755
|
+
const [N, P] = Object.entries(j)[0], _ = v.data.value[0];
|
|
186756
|
+
if (_) {
|
|
186757
|
+
const [D, F] = Object.entries(_)[0];
|
|
186758
|
+
if (!(N !== D || P !== F))
|
|
186759
186759
|
return;
|
|
186760
186760
|
}
|
|
186761
186761
|
if (H5({
|
|
186762
|
-
row:
|
|
186763
|
-
column:
|
|
186764
|
-
newValue:
|
|
186765
|
-
apiData:
|
|
186762
|
+
row: x,
|
|
186763
|
+
column: k,
|
|
186764
|
+
newValue: g,
|
|
186765
|
+
apiData: q,
|
|
186766
186766
|
sheetEditorRef: e,
|
|
186767
186767
|
shouldIgnoreUsdValue: !0
|
|
186768
|
-
}),
|
|
186769
|
-
const
|
|
186768
|
+
}), S != null && S.toString()) {
|
|
186769
|
+
const D = {
|
|
186770
186770
|
...v,
|
|
186771
|
-
data: { ...
|
|
186771
|
+
data: { ...w, value: q }
|
|
186772
186772
|
};
|
|
186773
|
-
n.current[
|
|
186774
|
-
|
|
186775
|
-
|
|
186773
|
+
n.current[S].set(
|
|
186774
|
+
D.data.id,
|
|
186775
|
+
D
|
|
186776
186776
|
), (b = e.current) == null || b.updateSheetLiveQueryList(
|
|
186777
|
-
|
|
186778
|
-
|
|
186777
|
+
S,
|
|
186778
|
+
D
|
|
186779
186779
|
);
|
|
186780
186780
|
}
|
|
186781
|
-
gW(
|
|
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
|
-
);
|
|
186781
|
+
gW(T.currentSheetId, x, k), console.log("subSheetIndex ========", S);
|
|
186786
186782
|
return;
|
|
186787
186783
|
}
|
|
186788
186784
|
}
|
|
186789
|
-
} catch (
|
|
186790
|
-
const
|
|
186785
|
+
} catch (g) {
|
|
186786
|
+
const w = {
|
|
186791
186787
|
data: {
|
|
186792
|
-
message: (
|
|
186788
|
+
message: (g == null ? void 0 : g.message) || "Live query failed",
|
|
186793
186789
|
functionName: "COINGECKO",
|
|
186794
186790
|
type: hM
|
|
186795
186791
|
}
|
|
186796
186792
|
};
|
|
186797
|
-
t == null || t(
|
|
186793
|
+
t == null || t(w);
|
|
186798
186794
|
}
|
|
186799
186795
|
}, o = mr(!1), u = async () => {
|
|
186800
186796
|
var v;
|
|
@@ -234758,6 +234754,7 @@ const RMt = ({
|
|
|
234758
234754
|
if (c[q], !j.v.baseValue) continue;
|
|
234759
234755
|
j.v = typeof j.v == "string" ? j.v : { ...c[q].v };
|
|
234760
234756
|
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 (console.log(D, "price ============"), !D) return;
|
|
234761
234758
|
j.v.m = N.replace(
|
|
234762
234759
|
/\d+(\.\d+)?/,
|
|
234763
234760
|
(Number((S = j.v) == null ? void 0 : S.v) / D).toFixed(P).toString()
|
|
@@ -234765,7 +234762,7 @@ const RMt = ({
|
|
|
234765
234762
|
const F = FMt(j.c + 1);
|
|
234766
234763
|
f.push(`${F}${j.r + 1}`);
|
|
234767
234764
|
}
|
|
234768
|
-
f.length > 0 && ((R = e.current) == null || R.calculateCellReferencedSubSheetFormula(a, f));
|
|
234765
|
+
console.log(f, "hahahahaahgggg"), f.length > 0 && ((R = e.current) == null || R.calculateCellReferencedSubSheetFormula(a, f));
|
|
234769
234766
|
};
|
|
234770
234767
|
return br(() => (i(), r.current = setInterval(
|
|
234771
234768
|
() => {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fileverse-dev/dsheet",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "DSheet",
|
|
5
|
-
"version": "1.2.86-
|
|
5
|
+
"version": "1.2.86-price",
|
|
6
6
|
"main": "dist/index.es.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
8
8
|
"exports": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@fileverse-dev/dsheets-templates": "^0.0.29",
|
|
37
37
|
"@fileverse-dev/formulajs": "4.4.46",
|
|
38
|
-
"@fileverse-dev/fortune-react": "
|
|
38
|
+
"@fileverse-dev/fortune-react": "1.2.90",
|
|
39
39
|
"@fileverse/ui": "^4.1.7-patch-40",
|
|
40
40
|
"classnames": "^2.5.1",
|
|
41
41
|
"exceljs": "^4.4.0",
|
|
@@ -79,4 +79,4 @@
|
|
|
79
79
|
"typescript": "^5.2.2",
|
|
80
80
|
"vite": "^5.0.0"
|
|
81
81
|
}
|
|
82
|
-
}
|
|
82
|
+
}
|