@fileverse-dev/dsheet 0.0.123 → 1.0.0
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
CHANGED
|
@@ -22003,7 +22003,7 @@ const Nie = async (e, r) => {
|
|
|
22003
22003
|
if (!e) return null;
|
|
22004
22004
|
const t = `https://api.neynar.com/v2/farcaster/user/search/?q=${e}&limit=5`, n = await (await fetch(t, {
|
|
22005
22005
|
headers: {
|
|
22006
|
-
"x-api-key":
|
|
22006
|
+
"x-api-key": r,
|
|
22007
22007
|
"x-neynar-experimental": "false"
|
|
22008
22008
|
}
|
|
22009
22009
|
})).json(), i = (n.result && n.result.users).find((s) => s.username === e);
|
|
@@ -22149,7 +22149,7 @@ async function Pie() {
|
|
|
22149
22149
|
if (!r) return `${Ma.Neynar}${qr.MISSING_KEY}`;
|
|
22150
22150
|
if (!e)
|
|
22151
22151
|
return `${Ma.Neynar}${qr.INVALID_PARAM}`;
|
|
22152
|
-
const t = await Nie(e);
|
|
22152
|
+
const t = await Nie(e, r);
|
|
22153
22153
|
if (!t)
|
|
22154
22154
|
return `${Ma.Neynar}${qr.INVALID_PARAM}`;
|
|
22155
22155
|
const a = `https://api.neynar.com/v2/farcaster/followers?fid=${t}`;
|
|
@@ -81040,7 +81040,7 @@ function Jle(e, r) {
|
|
|
81040
81040
|
}, []), i = o.slice(0, 5), s = [].concat(a, Fn(i));
|
|
81041
81041
|
return s;
|
|
81042
81042
|
}
|
|
81043
|
-
var Qle = ["
|
|
81043
|
+
var Qle = ["EOA", "UNISWAP", "COINGECKO", "DEFILLAMA", "GNOSIS", "BASE"];
|
|
81044
81044
|
function Kd(e, r) {
|
|
81045
81045
|
var t = cD();
|
|
81046
81046
|
if (t) {
|
|
@@ -170121,17 +170121,17 @@ function N$(e) {
|
|
|
170121
170121
|
}
|
|
170122
170122
|
const W6t = ({ dataBlockCalcFunction: e, sheetEditorRef: r, currentRow: t, currentColumn: a, currentFormulaName: n }) => {
|
|
170123
170123
|
e && (e == null ? void 0 : e.length) > 0 && e.forEach((o) => {
|
|
170124
|
-
var l, c;
|
|
170125
|
-
if (!(o.rowRefrenced.includes(t) && o.columnRefrenced.includes(a) && o.formulaName.includes(n))) return;
|
|
170126
|
-
const s = (
|
|
170124
|
+
var l, c, f, d, h;
|
|
170125
|
+
if (!(((l = o == null ? void 0 : o.rowRefrenced) == null ? void 0 : l.includes(t)) && ((c = o.columnRefrenced) == null ? void 0 : c.includes(a)) && ((f = o.formulaName) == null ? void 0 : f.includes(n)))) return;
|
|
170126
|
+
const s = (d = r == null ? void 0 : r.current) == null ? void 0 : d.getSheet().data[o.row][o.column];
|
|
170127
170127
|
if (!s || (s == null ? void 0 : s.v) === "") return;
|
|
170128
|
-
const u = (
|
|
170129
|
-
cq(u, r).then((
|
|
170128
|
+
const u = (h = s == null ? void 0 : s.f) == null ? void 0 : h.split("=")[1];
|
|
170129
|
+
cq(u, r).then((p) => {
|
|
170130
170130
|
pw({
|
|
170131
170131
|
row: o.row,
|
|
170132
170132
|
column: o.column,
|
|
170133
170133
|
newValue: s,
|
|
170134
|
-
apiData:
|
|
170134
|
+
apiData: p,
|
|
170135
170135
|
sheetEditorRef: r
|
|
170136
170136
|
});
|
|
170137
170137
|
});
|
|
@@ -292717,23 +292717,27 @@ const dAt = ({
|
|
|
292717
292717
|
dsheetId: t,
|
|
292718
292718
|
currentDataRef: a,
|
|
292719
292719
|
setForceSheetRender: n,
|
|
292720
|
-
sheetEditorRef: o
|
|
292720
|
+
sheetEditorRef: o,
|
|
292721
|
+
setDataBlockCalcFunction: i
|
|
292721
292722
|
}) => {
|
|
292722
292723
|
Yt(() => {
|
|
292723
292724
|
if (!e || !r.current) return;
|
|
292724
|
-
const
|
|
292725
|
-
if (
|
|
292726
|
-
const
|
|
292727
|
-
|
|
292728
|
-
const
|
|
292725
|
+
const s = r.current.getArray(t), u = mAt[e];
|
|
292726
|
+
if (u) {
|
|
292727
|
+
const l = Array.from(s);
|
|
292728
|
+
u[0].order = l.length;
|
|
292729
|
+
const c = [...l, ...u];
|
|
292729
292730
|
r.current.transact(() => {
|
|
292730
|
-
|
|
292731
|
-
}), n == null || n((
|
|
292732
|
-
var
|
|
292733
|
-
(
|
|
292734
|
-
index:
|
|
292731
|
+
s.delete(0, s.length), s.insert(0, c), a.current = c;
|
|
292732
|
+
}), n == null || n((f) => f + 1), setTimeout(() => {
|
|
292733
|
+
var f;
|
|
292734
|
+
(f = o.current) == null || f.activateSheet({
|
|
292735
|
+
index: c.length - 1
|
|
292735
292736
|
});
|
|
292736
|
-
}, 100)
|
|
292737
|
+
}, 100), i((f) => {
|
|
292738
|
+
let d;
|
|
292739
|
+
return (f == null ? void 0 : f.length) > 0 ? d = [...f, ...u[0].dataBlockCalcFunction] : d = [...u[0].dataBlockCalcFunction], d;
|
|
292740
|
+
});
|
|
292737
292741
|
}
|
|
292738
292742
|
}, [e]);
|
|
292739
292743
|
}, IS = ({
|
|
@@ -292815,7 +292819,8 @@ const dAt = ({
|
|
|
292815
292819
|
sheetEditorRef: A,
|
|
292816
292820
|
currentDataRef: S,
|
|
292817
292821
|
ydocRef: x,
|
|
292818
|
-
setForceSheetRender: N
|
|
292822
|
+
setForceSheetRender: N,
|
|
292823
|
+
setDataBlockCalcFunction: D
|
|
292819
292824
|
} = cI();
|
|
292820
292825
|
vAt({
|
|
292821
292826
|
selectedTemplate: p,
|
|
@@ -292823,14 +292828,15 @@ const dAt = ({
|
|
|
292823
292828
|
dsheetId: f,
|
|
292824
292829
|
currentDataRef: S,
|
|
292825
292830
|
setForceSheetRender: N,
|
|
292826
|
-
sheetEditorRef: A
|
|
292831
|
+
sheetEditorRef: A,
|
|
292832
|
+
setDataBlockCalcFunction: D
|
|
292827
292833
|
}), rZ({
|
|
292828
292834
|
exportDropdownOpen: l,
|
|
292829
292835
|
isTemplateOpen: u,
|
|
292830
292836
|
isReadOnly: t,
|
|
292831
292837
|
loading: w
|
|
292832
292838
|
});
|
|
292833
|
-
const
|
|
292839
|
+
const j = {
|
|
292834
292840
|
sheetEditorRef: A,
|
|
292835
292841
|
currentDataRef: S,
|
|
292836
292842
|
ydocRef: x
|
|
@@ -292854,7 +292860,7 @@ const dAt = ({
|
|
|
292854
292860
|
"translate-y-[-100%]": !1
|
|
292855
292861
|
}
|
|
292856
292862
|
),
|
|
292857
|
-
children: r(
|
|
292863
|
+
children: r(j)
|
|
292858
292864
|
}
|
|
292859
292865
|
),
|
|
292860
292866
|
/* @__PURE__ */ cr.jsxs(
|
|
@@ -2,11 +2,15 @@ import { Dispatch, SetStateAction } from 'react';
|
|
|
2
2
|
import { WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
3
3
|
|
|
4
4
|
import * as Y from 'yjs';
|
|
5
|
-
export declare const useApplyTemplatesBtn: ({ selectedTemplate, ydocRef, dsheetId, currentDataRef, setForceSheetRender, sheetEditorRef, }: {
|
|
5
|
+
export declare const useApplyTemplatesBtn: ({ selectedTemplate, ydocRef, dsheetId, currentDataRef, setForceSheetRender, sheetEditorRef, setDataBlockCalcFunction, }: {
|
|
6
6
|
selectedTemplate: string | undefined;
|
|
7
7
|
ydocRef: React.RefObject<Y.Doc | null>;
|
|
8
8
|
dsheetId: string;
|
|
9
9
|
currentDataRef: React.MutableRefObject<object | null>;
|
|
10
10
|
setForceSheetRender: Dispatch<SetStateAction<number>>;
|
|
11
11
|
sheetEditorRef: React.RefObject<WorkbookInstance | null>;
|
|
12
|
+
setDataBlockCalcFunction: React.Dispatch<React.SetStateAction<Array<{
|
|
13
|
+
row: number;
|
|
14
|
+
column: number;
|
|
15
|
+
}>>>;
|
|
12
16
|
}) => void;
|