@fileverse-dev/dsheet 1.2.86-new-bold-2 → 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.
Files changed (2) hide show
  1. package/dist/index.es.js +49 -54
  2. package/package.json +3 -3
package/dist/index.es.js CHANGED
@@ -100460,9 +100460,7 @@ function dO(e, t, r) {
100460
100460
  }
100461
100461
  }
100462
100462
  function gZ(e, t, r, i, n, a, l) {
100463
- var c, f, s, o;
100464
- console.log(r.code, "handleWithCtrlOrMetaKey");
100465
- var u = lr(e);
100463
+ var c, f, s, o, u = lr(e);
100466
100464
  if (u) {
100467
100465
  if (r.shiftKey) {
100468
100466
  if (e.luckysheet_shiftpositon = ce.cloneDeep((c = e.luckysheet_select_save) === null || c === void 0 ? void 0 : c[e.luckysheet_select_save.length - 1]), e.luckysheet_shiftkeydown = !0, ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(r.key))
@@ -100481,11 +100479,11 @@ function gZ(e, t, r, i, n, a, l) {
100481
100479
  } else if (["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(r.key))
100482
100480
  dO(e, r, !1);
100483
100481
  else if (r.code === "KeyB")
100484
- console.log(r.code, "handleBold"), Rk(e, i);
100482
+ Rk(e, i);
100485
100483
  else if (r.code === "KeyI")
100486
- console.log(r.code, "handleItalic"), Nk(e, i);
100484
+ Nk(e, i);
100487
100485
  else if (r.code === "KeyU")
100488
- console.log(r.code, "handleUnderline"), Ik(e, i);
100486
+ Ik(e, i);
100489
100487
  else if (r.code === "Backslash")
100490
100488
  aG(e);
100491
100489
  else if (r.code === "KeyC") {
@@ -100573,7 +100571,7 @@ function wZ(e, t, r, i, n, a, l, c) {
100573
100571
  return u5e(this, void 0, void 0, function() {
100574
100572
  var u, v, m, h, p, d, b, g, w, b, g, w;
100575
100573
  return v5e(this, function(x) {
100576
- if (console.log(i.code, "handleGlobalKeyDown"), i.shiftKey && i.code === "Space")
100574
+ if (i.shiftKey && i.code === "Space")
100577
100575
  return i.stopImmediatePropagation(), i.stopPropagation(), i.preventDefault(), [2];
100578
100576
  if ((i.ctrlKey || i.metaKey && i.shiftKey) && i.code === "KeyE" ? Ly(e, "center") : (i.ctrlKey || i.metaKey && i.shiftKey) && i.code === "KeyL" ? Ly(e, "left") : (i.ctrlKey || i.metaKey && i.shiftKey) && i.code === "KeyR" && Ly(e, "right"), (i.metaKey || i.ctrlKey) && i.code === "KeyK" && Bk(e), (i.metaKey || i.ctrlKey) && !i.shiftKey && i.code === "Semicolon" && lG(e), (i.metaKey || i.ctrlKey) && i.shiftKey && i.code === "Semicolon" && sG(e), (i.metaKey || i.ctrlKey) && i.code === "KeyR" && nG(e), (i.metaKey || i.ctrlKey) && i.code === "KeyD" && iG(e), e.luckysheet_select_status = !1, u = i.keyCode, v = i.key, !ce.isEmpty(e.contextMenu) || e.filterContextMenu)
100579
100577
  return [2];
@@ -100596,9 +100594,9 @@ function wZ(e, t, r, i, n, a, l, c) {
100596
100594
  Ls(e), Wl(e, "down", 0, "rangeOfSelect"), i.preventDefault();
100597
100595
  else {
100598
100596
  if (i.ctrlKey || i.metaKey)
100599
- return console.log(i.code, "handleWithCtrlOrMetaKey in handleGlobalKeyDown"), gZ(e, n, i, t, r, a, l), [2];
100597
+ return gZ(e, n, i, t, r, a, l), [2];
100600
100598
  if (i.shiftKey && (v === "ArrowUp" || v === "ArrowDown" || v === "ArrowLeft" || v === "ArrowRight"))
100601
- console.log(i.code, "handleShiftWithArrowKey in handleGlobalKeyDown"), m5e(e, i);
100599
+ m5e(e, i);
100602
100600
  else if (v === "Escape")
100603
100601
  e.contextMenu = {};
100604
100602
  else if (v === "Delete" || v === "Backspace") {
@@ -171812,7 +171810,7 @@ var k6 = function() {
171812
171810
  var He = v.current;
171813
171811
  if (He) {
171814
171812
  var Se = He.textContent;
171815
- console.log(Se, "yoooo"), (!Se || Se === fe) && (He.innerHTML = fe, yh(He));
171813
+ (!Se || Se === fe) && (He.innerHTML = fe, yh(He));
171816
171814
  }
171817
171815
  }, pe = function() {
171818
171816
  localStorage.setItem("formulaMore", String(ne)), se(!ne);
@@ -171915,12 +171913,16 @@ var k6 = function() {
171915
171913
  He.stopPropagation(), He.preventDefault();
171916
171914
  }, Pe = xr(function(Be) {
171917
171915
  var He, Se;
171918
- if (console.log(Be.code, "onKeyDown in InputBox"), m.current = new KeyboardEvent(Be.type, Be.nativeEvent), ve.current = v.current.innerText, Be.metaKey && s.luckysheetCellUpdate.length > 0 && (console.log(Be.code, "e.code"), Be.code === "KeyB" ? (Rk(s, v.current), Te(Be)) : Be.code === "KeyI" ? (Nk(s, v.current), Te(Be)) : Be.code === "KeyU" ? (console.log("underline"), Ik(s, v.current), Te(Be)) : Be.code === "KeyS" && (console.log("strikethrough"), $L(s, v.current), Te(Be))), !de.current) {
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) {
171919
171921
  var rt = Mp(v == null ? void 0 : v.current);
171920
171922
  W(rt);
171921
171923
  }
171922
171924
  var bt = !0;
171923
- (Be.key === "Delete" || Be.key === "Backspace") && (de.current && requestAnimationFrame(me), sq(v == null ? void 0 : v.current) === (v == null ? void 0 : v.current.innerText.length) && setTimeout(function() {
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() {
171924
171926
  yh(v == null ? void 0 : v.current);
171925
171927
  }, 5));
171926
171928
  var _e = ke.current;
@@ -172098,11 +172100,7 @@ var k6 = function() {
172098
172100
  onCompositionUpdate: function() {
172099
172101
  de.current = !0;
172100
172102
  },
172101
- onCompositionEnd: function(He) {
172102
- if (He.data === "" && He.currentTarget.value === "") {
172103
- de.current = !0;
172104
- return;
172105
- }
172103
+ onCompositionEnd: function() {
172106
172104
  me(), de.current = !1;
172107
172105
  },
172108
172106
  onMouseUp: function() {
@@ -186731,72 +186729,68 @@ const EEt = (e) => {
186731
186729
  var h, p;
186732
186730
  (h = n.current[v]) == null || h.delete(m), (p = e.current) == null || p.removeFromLiveQueryList(v, m);
186733
186731
  }, s = async (v) => {
186734
- var h, p, d, b, g, w, x;
186732
+ var h, p, d, b;
186735
186733
  const m = v.data.function.split("=")[1];
186736
186734
  try {
186737
186735
  switch (v.data.name.toLowerCase()) {
186738
186736
  case "coingecko": {
186739
- 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) => {
186740
- if (!I) return I;
186741
- I.replace(/\\"/g, '"');
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, '"');
186742
186740
  };
186743
- if (!(R != null && R.f) || j(R == null ? void 0 : R.f) !== j(k.f)) {
186744
- q != null && q.toString && f(q, T.id);
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);
186745
186743
  return;
186746
186744
  }
186747
- const N = await VC({
186745
+ const R = await VC({
186748
186746
  functionCallString: m,
186749
186747
  sheetEditorRef: e
186750
186748
  });
186751
- if (yre(N)) {
186752
- N.type = hM, t == null || t({ data: N });
186749
+ if (yre(R)) {
186750
+ R.type = hM, t == null || t({ data: R });
186753
186751
  return;
186754
186752
  }
186755
- const P = N, A = P[0];
186756
- if (!A) return;
186757
- const [_, D] = Object.entries(A)[0], E = v.data.value[0];
186758
- if (E) {
186759
- const [I, W] = Object.entries(E)[0];
186760
- if (!(_ !== I || D !== W))
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))
186761
186759
  return;
186762
186760
  }
186763
186761
  if (H5({
186764
- row: L,
186765
- column: S,
186766
- newValue: k,
186767
- apiData: P,
186762
+ row: x,
186763
+ column: k,
186764
+ newValue: g,
186765
+ apiData: q,
186768
186766
  sheetEditorRef: e,
186769
186767
  shouldIgnoreUsdValue: !0
186770
- }), q != null && q.toString()) {
186771
- const I = {
186768
+ }), S != null && S.toString()) {
186769
+ const D = {
186772
186770
  ...v,
186773
- data: { ...T, value: P }
186771
+ data: { ...w, value: q }
186774
186772
  };
186775
- n.current[q].set(
186776
- I.data.id,
186777
- I
186773
+ n.current[S].set(
186774
+ D.data.id,
186775
+ D
186778
186776
  ), (b = e.current) == null || b.updateSheetLiveQueryList(
186779
- q,
186780
- I
186777
+ S,
186778
+ D
186781
186779
  );
186782
186780
  }
186783
- gW(B.currentSheetId, L, S), (x = e.current) == null || x.calculateSubSheetFormula(
186784
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
186785
- // @ts-expect-error
186786
- (w = (g = e.current) == null ? void 0 : g.getSheet()) == null ? void 0 : w.id
186787
- );
186781
+ gW(T.currentSheetId, x, k), console.log("subSheetIndex ========", S);
186788
186782
  return;
186789
186783
  }
186790
186784
  }
186791
- } catch (k) {
186792
- const T = {
186785
+ } catch (g) {
186786
+ const w = {
186793
186787
  data: {
186794
- message: (k == null ? void 0 : k.message) || "Live query failed",
186788
+ message: (g == null ? void 0 : g.message) || "Live query failed",
186795
186789
  functionName: "COINGECKO",
186796
186790
  type: hM
186797
186791
  }
186798
186792
  };
186799
- t == null || t(T);
186793
+ t == null || t(w);
186800
186794
  }
186801
186795
  }, o = mr(!1), u = async () => {
186802
186796
  var v;
@@ -234760,6 +234754,7 @@ const RMt = ({
234760
234754
  if (c[q], !j.v.baseValue) continue;
234761
234755
  j.v = typeof j.v == "string" ? j.v : { ...c[q].v };
234762
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;
234763
234758
  j.v.m = N.replace(
234764
234759
  /\d+(\.\d+)?/,
234765
234760
  (Number((S = j.v) == null ? void 0 : S.v) / D).toFixed(P).toString()
@@ -234767,7 +234762,7 @@ const RMt = ({
234767
234762
  const F = FMt(j.c + 1);
234768
234763
  f.push(`${F}${j.r + 1}`);
234769
234764
  }
234770
- 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));
234771
234766
  };
234772
234767
  return br(() => (i(), r.current = setInterval(
234773
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-new-bold-2",
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": "^1.2.90-bold-2",
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
+ }