@fileverse-dev/dsheet 1.1.94 → 1.1.95

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 +112 -45
  2. package/package.json +2 -2
package/dist/index.es.js CHANGED
@@ -159737,32 +159737,32 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
159737
159737
  return e;
159738
159738
  }, Dw.apply(this, arguments);
159739
159739
  }, m9t = function(r) {
159740
- var t, a = lr(jr).context, n = ["COINGECKO", "ETHERSCAN", "DEFILLAMA", "GNOSIS", "BASE", "EOA", "PNL", "SAFE", "BLOCKSCOUT", "LENS", "FARCASTER", "Ethereum", "SMARTCONTRACT", "DUNESIM"];
159741
- a.defaultCandidates.filter(function(m) {
159742
- return !n.includes(m.n);
159743
- }), v9t.filter(function(m) {
159744
- return m.n !== "PNL";
159745
- });
159746
- var i = a.defaultCandidates.slice(0, 10), l = a.functionCandidates, c = (t = a.luckysheet_select_save) === null || t === void 0 ? void 0 : t[0], f = It(null), s = St(0), o = s[0], u = s[1], v = function() {
159747
- var p, d, h, b;
159748
- if (!(!(!((p = c == null ? void 0 : c.top) === null || p === void 0) && p.toString()) || !(!((d = c.height_move) === null || d === void 0) && d.toString()) || !f.current)) {
159749
- var g = 360, y = parseInt(((h = document.getElementById("luckysheet-input-box")) === null || h === void 0 ? void 0 : h.style.top) || "0", 10) - 85, w = y + c.height_move, x = window.innerHeight - w, _ = g > x, T = (c == null ? void 0 : c.height_move) || 0, M = ((b = f.current) === null || b === void 0 ? void 0 : b.offsetHeight) || 0, N = _ ? T - (M + 80) : T + 4;
159750
- u(N);
159740
+ var t, a = lr(jr), n = a.context, i = a.settings.isAuthorized, l = ["COINGECKO", "ETHERSCAN", "DEFILLAMA", "GNOSIS", "BASE", "EOA", "PNL", "SAFE", "BLOCKSCOUT", "LENS", "FARCASTER", "Ethereum", "SMARTCONTRACT", "DUNESIM"], c = n.defaultCandidates.filter(function(b) {
159741
+ return !l.includes(b.n);
159742
+ }), f = v9t.filter(function(b) {
159743
+ return b.n !== "PNL";
159744
+ }), s = i ? n.defaultCandidates.slice(0, 10) : c, o = i ? n.functionCandidates : n.functionCandidates.filter(function(b) {
159745
+ return b.t !== 20;
159746
+ }), u = (t = n.luckysheet_select_save) === null || t === void 0 ? void 0 : t[0], v = It(null), m = St(0), p = m[0], d = m[1], h = function() {
159747
+ var g, y, w, x;
159748
+ if (!(!(!((g = u == null ? void 0 : u.top) === null || g === void 0) && g.toString()) || !(!((y = u.height_move) === null || y === void 0) && y.toString()) || !v.current)) {
159749
+ var _ = 360, T = parseInt(((w = document.getElementById("luckysheet-input-box")) === null || w === void 0 ? void 0 : w.style.top) || "0", 10) - 85, M = T + u.height_move, N = window.innerHeight - M, L = _ > N, B = (u == null ? void 0 : u.height_move) || 0, R = ((x = v.current) === null || x === void 0 ? void 0 : x.offsetHeight) || 0, D = L ? B - (R + 80) : B + 4;
159750
+ d(D);
159751
159751
  }
159752
159752
  };
159753
159753
  return Bt(function() {
159754
- v();
159755
- }), te.isEmpty(a.functionCandidates) && te.isEmpty(a.defaultCandidates) ? null : /* @__PURE__ */ P.createElement("div", {
159754
+ h();
159755
+ }), te.isEmpty(n.functionCandidates) && te.isEmpty(n.defaultCandidates) ? null : /* @__PURE__ */ P.createElement("div", {
159756
159756
  className: "flex color-border-default border flex-col luckysheet-formula-search-c-p custom-scroll",
159757
159757
  id: "luckysheet-formula-search-c-p",
159758
159758
  style: {
159759
- top: o
159759
+ top: p
159760
159760
  }
159761
159761
  }, /* @__PURE__ */ P.createElement("div", Dw({}, r, {
159762
- ref: f,
159762
+ ref: v,
159763
159763
  id: "luckysheet-formula-search-c",
159764
159764
  className: "luckysheet-formula-search-c"
159765
- }), a.defaultCandidates.length > 0 && /* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("div", {
159765
+ }), n.defaultCandidates.length > 0 && /* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("div", {
159766
159766
  style: {
159767
159767
  marginBottom: "4px"
159768
159768
  },
@@ -159771,14 +159771,46 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
159771
159771
  className: "text-helper-sm-bold color-text-secondary"
159772
159772
  }, "Onchain functions"), /* @__PURE__ */ P.createElement("p", {
159773
159773
  className: "text-helper-text-sm color-text-secondary"
159774
- }, "Every onchain function is a native data structure allowing dSheets to read and structure data from smart contracts and APIs.")), !1), a.defaultCandidates.length > 0 ? /* @__PURE__ */ P.createElement(P.Fragment, null, i.map(function(m, p) {
159774
+ }, "Every onchain function is a native data structure allowing dSheets to read and structure data from smart contracts and APIs.")), !i && /* @__PURE__ */ P.createElement("div", {
159775
+ style: {
159776
+ marginBottom: "8px",
159777
+ backgroundColor: "#F8F9FA"
159778
+ },
159779
+ className: "w-full flex flex-col p-2 gap-1"
159780
+ }, /* @__PURE__ */ P.createElement("h4", {
159781
+ className: "font-semibold"
159782
+ }, "dSheets account required"), /* @__PURE__ */ P.createElement("p", {
159783
+ className: "text-helper-text-sm color-text-secondary"
159784
+ }, "Use more onchain functions by creating a dSheets account.", " ", /* @__PURE__ */ P.createElement("span", {
159785
+ className: "sign-fortune",
159786
+ style: {
159787
+ color: "#5C0AFF",
159788
+ cursor: "pointer"
159789
+ },
159790
+ onClick: function(g) {
159791
+ var y;
159792
+ g.stopPropagation(), g.preventDefault(), (y = document.getElementById("triggerAuth")) === null || y === void 0 || y.click();
159793
+ }
159794
+ }, "Signup/Login")), /* @__PURE__ */ P.createElement("div", {
159795
+ className: "flex gap-2 mt-2 mb-2"
159796
+ }, f.map(function(b, g) {
159797
+ return /* @__PURE__ */ P.createElement("img", {
159798
+ key: g,
159799
+ src: b.LOGO,
159800
+ alt: "Service Logo",
159801
+ style: {
159802
+ width: "16px",
159803
+ height: "16px"
159804
+ }
159805
+ });
159806
+ })))), n.defaultCandidates.length > 0 ? /* @__PURE__ */ P.createElement(P.Fragment, null, s.map(function(b, g) {
159775
159807
  return /* @__PURE__ */ P.createElement("div", {
159776
- key: m.n,
159777
- "data-func": m.n,
159808
+ key: b.n,
159809
+ "data-func": b.n,
159778
159810
  style: {
159779
159811
  cursor: "pointer"
159780
159812
  },
159781
- className: "luckysheet-formula-search-item ".concat(p === 0 ? "luckysheet-formula-search-item-active" : "")
159813
+ className: "luckysheet-formula-search-item ".concat(g === 0 ? "luckysheet-formula-search-item-active" : "")
159782
159814
  }, /* @__PURE__ */ P.createElement("div", {
159783
159815
  style: {
159784
159816
  display: "flex",
@@ -159786,7 +159818,7 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
159786
159818
  }
159787
159819
  }, /* @__PURE__ */ P.createElement("div", {
159788
159820
  className: "luckysheet-formula-search-func color-text-default text-body-sm"
159789
- }, m.n), /* @__PURE__ */ P.createElement("div", {
159821
+ }, b.n), /* @__PURE__ */ P.createElement("div", {
159790
159822
  style: {
159791
159823
  display: "flex",
159792
159824
  justifyContent: "end",
@@ -159794,24 +159826,24 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
159794
159826
  alignItems: "center",
159795
159827
  gap: "6px"
159796
159828
  }
159797
- }, m.LOGO && /* @__PURE__ */ P.createElement("img", {
159798
- src: m.LOGO,
159829
+ }, b.LOGO && /* @__PURE__ */ P.createElement("img", {
159830
+ src: b.LOGO,
159799
159831
  alt: "Service Logo",
159800
159832
  style: {
159801
159833
  width: "16px"
159802
159834
  }
159803
- }), m.SECONDARY_LOGO && /* @__PURE__ */ P.createElement("img", {
159804
- src: m.SECONDARY_LOGO,
159835
+ }), b.SECONDARY_LOGO && /* @__PURE__ */ P.createElement("img", {
159836
+ src: b.SECONDARY_LOGO,
159805
159837
  alt: "Service Logo",
159806
159838
  style: {
159807
159839
  width: "16px"
159808
159840
  }
159809
- }), m.API_KEY && /* @__PURE__ */ P.createElement(l0, {
159810
- text: localStorage.getItem(m.API_KEY) ? "API Key added" : "API key required"
159841
+ }), b.API_KEY && /* @__PURE__ */ P.createElement(l0, {
159842
+ text: localStorage.getItem(b.API_KEY) ? "API Key added" : "API key required"
159811
159843
  }, /* @__PURE__ */ P.createElement("div", {
159812
159844
  style: {
159813
159845
  borderRadius: "4px",
159814
- backgroundColor: "".concat(localStorage.getItem(m.API_KEY) ? "#177E23" : "#e8ebec"),
159846
+ backgroundColor: "".concat(localStorage.getItem(b.API_KEY) ? "#177E23" : "#e8ebec"),
159815
159847
  width: "16px",
159816
159848
  height: "16px"
159817
159849
  },
@@ -159819,18 +159851,18 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
159819
159851
  }, /* @__PURE__ */ P.createElement(Jt, {
159820
159852
  name: "Key",
159821
159853
  style: {
159822
- color: localStorage.getItem(m.API_KEY) ? "white" : "#77818A",
159854
+ color: localStorage.getItem(b.API_KEY) ? "white" : "#77818A",
159823
159855
  width: "12px",
159824
159856
  height: "12px"
159825
159857
  }
159826
159858
  }))))), /* @__PURE__ */ P.createElement("div", {
159827
159859
  className: "luckysheet-formula-search-detail mt-1 text-helper-text-sm color-text-default"
159828
- }, m.d));
159829
- })) : /* @__PURE__ */ P.createElement(P.Fragment, null, l.length > 0 && l.map(function(m, p) {
159860
+ }, b.d));
159861
+ })) : /* @__PURE__ */ P.createElement(P.Fragment, null, o.length > 0 && o.map(function(b, g) {
159830
159862
  return /* @__PURE__ */ P.createElement("div", {
159831
- key: m.n,
159832
- "data-func": m.n,
159833
- className: "luckysheet-formula-search-item ".concat(p === 0 ? "luckysheet-formula-search-item-active" : "")
159863
+ key: b.n,
159864
+ "data-func": b.n,
159865
+ className: "luckysheet-formula-search-item ".concat(g === 0 ? "luckysheet-formula-search-item-active" : "")
159834
159866
  }, /* @__PURE__ */ P.createElement("div", {
159835
159867
  style: {
159836
159868
  display: "flex",
@@ -159838,7 +159870,7 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
159838
159870
  }
159839
159871
  }, /* @__PURE__ */ P.createElement("div", {
159840
159872
  className: "luckysheet-formula-search-func color-text-default text-body-sm"
159841
- }, m.n), /* @__PURE__ */ P.createElement("div", {
159873
+ }, b.n), /* @__PURE__ */ P.createElement("div", {
159842
159874
  style: {
159843
159875
  display: "flex",
159844
159876
  justifyContent: "end",
@@ -159846,24 +159878,24 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
159846
159878
  alignItems: "center",
159847
159879
  gap: "6px"
159848
159880
  }
159849
- }, m.LOGO && /* @__PURE__ */ P.createElement("img", {
159850
- src: m.LOGO,
159881
+ }, b.LOGO && /* @__PURE__ */ P.createElement("img", {
159882
+ src: b.LOGO,
159851
159883
  alt: "Service Logo",
159852
159884
  style: {
159853
159885
  width: "16px"
159854
159886
  }
159855
- }), m.SECONDARY_LOGO && /* @__PURE__ */ P.createElement("img", {
159856
- src: m.SECONDARY_LOGO,
159887
+ }), b.SECONDARY_LOGO && /* @__PURE__ */ P.createElement("img", {
159888
+ src: b.SECONDARY_LOGO,
159857
159889
  alt: "Service Logo",
159858
159890
  style: {
159859
159891
  width: "16px"
159860
159892
  }
159861
- }), m.API_KEY && /* @__PURE__ */ P.createElement(l0, {
159862
- text: localStorage.getItem(m.API_KEY) ? "API Key added" : "API Key required"
159893
+ }), b.API_KEY && /* @__PURE__ */ P.createElement(l0, {
159894
+ text: localStorage.getItem(b.API_KEY) ? "API Key added" : "API Key required"
159863
159895
  }, /* @__PURE__ */ P.createElement("div", {
159864
159896
  style: {
159865
159897
  borderRadius: "4px",
159866
- backgroundColor: "".concat(localStorage.getItem(m.API_KEY) ? "#177E23" : "#e8ebec"),
159898
+ backgroundColor: "".concat(localStorage.getItem(b.API_KEY) ? "#177E23" : "#e8ebec"),
159867
159899
  width: "16px",
159868
159900
  height: "16px"
159869
159901
  },
@@ -159871,14 +159903,49 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
159871
159903
  }, /* @__PURE__ */ P.createElement(Jt, {
159872
159904
  name: "Key",
159873
159905
  style: {
159874
- color: localStorage.getItem(m.API_KEY) ? "white" : "#77818A",
159906
+ color: localStorage.getItem(b.API_KEY) ? "white" : "#77818A",
159875
159907
  width: "12px",
159876
159908
  height: "12px"
159877
159909
  }
159878
159910
  }))))), /* @__PURE__ */ P.createElement("div", {
159879
159911
  className: "luckysheet-formula-search-detail mt-1 text-helper-text-sm color-text-secondary"
159880
- }, m.d));
159881
- }), l.length === 0 && /* @__PURE__ */ P.createElement("span", null, !1))), /* @__PURE__ */ P.createElement("div", {
159912
+ }, b.d));
159913
+ }), o.length === 0 && /* @__PURE__ */ P.createElement("span", null, !i && /* @__PURE__ */ P.createElement("div", {
159914
+ style: {
159915
+ marginBottom: "8px",
159916
+ backgroundColor: "#F8F9FA"
159917
+ },
159918
+ className: "w-full flex flex-col p-2 gap-1"
159919
+ }, /* @__PURE__ */ P.createElement("h4", {
159920
+ className: "text-helper-sm-bold",
159921
+ style: {
159922
+ fontWeight: "bold"
159923
+ }
159924
+ }, "dSheets account required"), /* @__PURE__ */ P.createElement("p", {
159925
+ className: "text-helper-text-sm color-text-secondary"
159926
+ }, "Use more onchain functions by creating a dSheets account.", " ", /* @__PURE__ */ P.createElement("span", {
159927
+ className: "sign-fortune",
159928
+ style: {
159929
+ color: "#5C0AFF",
159930
+ cursor: "pointer"
159931
+ },
159932
+ onClick: function(g) {
159933
+ var y;
159934
+ g.stopPropagation(), g.preventDefault(), (y = document.getElementById("triggerAuth")) === null || y === void 0 || y.click();
159935
+ }
159936
+ }, "Signup/Login")), /* @__PURE__ */ P.createElement("div", {
159937
+ className: "flex gap-2 mt-2 mb-2"
159938
+ }, f.map(function(b, g) {
159939
+ return /* @__PURE__ */ P.createElement("img", {
159940
+ key: g,
159941
+ src: b.LOGO,
159942
+ alt: "Service Logo",
159943
+ style: {
159944
+ width: "16px",
159945
+ height: "16px"
159946
+ }
159947
+ });
159948
+ })))))), /* @__PURE__ */ P.createElement("div", {
159882
159949
  className: "p-2 pt-0"
159883
159950
  }, /* @__PURE__ */ P.createElement("hr", {
159884
159951
  className: "color-border-default mb-2"
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.1.94",
5
+ "version": "1.1.95",
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.21",
37
37
  "@fileverse-dev/formulajs": "^4.4.25",
38
- "@fileverse-dev/fortune-react": "^1.2.12",
38
+ "@fileverse-dev/fortune-react": "^1.2.13",
39
39
  "@fileverse/ui": "^4.1.7-patch-21",
40
40
  "classnames": "^2.5.1",
41
41
  "exceljs": "^4.4.0",