@fileverse-dev/dsheet 1.2.99-column-1 → 1.2.99-column-formula-2
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 +36 -22
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -186359,7 +186359,11 @@ const Rx = `$#,##0.${"0".repeat(2)}`, H5 = ({
|
|
|
186359
186359
|
} else
|
|
186360
186360
|
throw new Error(`Function ${f} not found in module`);
|
|
186361
186361
|
} catch (l) {
|
|
186362
|
-
|
|
186362
|
+
console.error("Error:", l), t != null && t.current && r !== void 0 && i !== void 0 && t.current.setCellError(r, i, {
|
|
186363
|
+
title: "Formula Error",
|
|
186364
|
+
message: l instanceof Error ? l.message : "Invalid function call format"
|
|
186365
|
+
});
|
|
186366
|
+
return;
|
|
186363
186367
|
}
|
|
186364
186368
|
};
|
|
186365
186369
|
function wre(e) {
|
|
@@ -186475,13 +186479,23 @@ const dEt = (e, t) => {
|
|
|
186475
186479
|
newValue: u,
|
|
186476
186480
|
handleSmartContractQuery: n
|
|
186477
186481
|
}).then((S) => {
|
|
186478
|
-
H5({
|
|
186482
|
+
S && H5({
|
|
186479
186483
|
row: o.row,
|
|
186480
186484
|
column: o.column,
|
|
186481
186485
|
newValue: u,
|
|
186482
186486
|
apiData: S,
|
|
186483
186487
|
sheetEditorRef: t
|
|
186484
186488
|
});
|
|
186489
|
+
}).catch((S) => {
|
|
186490
|
+
var O;
|
|
186491
|
+
(O = t.current) == null || O.setCellError(
|
|
186492
|
+
o.row,
|
|
186493
|
+
o.column,
|
|
186494
|
+
{
|
|
186495
|
+
title: "Formula Error",
|
|
186496
|
+
message: S instanceof Error ? S.message : "Invalid function call format"
|
|
186497
|
+
}
|
|
186498
|
+
);
|
|
186485
186499
|
});
|
|
186486
186500
|
}
|
|
186487
186501
|
);
|
|
@@ -186693,38 +186707,38 @@ const _Et = (e) => {
|
|
|
186693
186707
|
params: e,
|
|
186694
186708
|
currentSheetId: t
|
|
186695
186709
|
}) => {
|
|
186696
|
-
var r, i, n, a, l;
|
|
186710
|
+
var r, i, n, a, l, c, f;
|
|
186697
186711
|
try {
|
|
186698
|
-
(r = e == null ? void 0 :
|
|
186699
|
-
|
|
186700
|
-
|
|
186701
|
-
|
|
186702
|
-
|
|
186703
|
-
const
|
|
186704
|
-
let
|
|
186705
|
-
|
|
186706
|
-
const
|
|
186712
|
+
const s = (i = (r = e.newValue) == null ? void 0 : r.f) == null ? void 0 : i.split("=")[1], o = s == null ? void 0 : s.match(/^=?(\w+)(?:\(([^)]*)\)?)?$/);
|
|
186713
|
+
if (!o)
|
|
186714
|
+
return;
|
|
186715
|
+
(n = e == null ? void 0 : e.setDataBlockCalcFunction) == null || n.call(e, (u) => {
|
|
186716
|
+
var w, x, k;
|
|
186717
|
+
const v = o[2];
|
|
186718
|
+
let h = wre(v).filter((T) => Nx(T) ? nD(T) : f5(T) ? dg(T) : !1).map((T) => Nx(T) ? nD(T) : f5(T) ? dg(T) : !1);
|
|
186719
|
+
h = h.flat();
|
|
186720
|
+
const p = h.map((T) => T.row), d = h.map((T) => T.column), g = {
|
|
186707
186721
|
formulaName: (k = (x = (w = e.newValue.f) == null ? void 0 : w.match(/^=([A-Za-z0-9_]+)\s*\(/)) == null ? void 0 : x[1]) == null ? void 0 : k.toUpperCase(),
|
|
186708
186722
|
row: e.row,
|
|
186709
186723
|
column: e.column,
|
|
186710
|
-
rowRefrenced:
|
|
186711
|
-
columnRefrenced:
|
|
186724
|
+
rowRefrenced: p,
|
|
186725
|
+
columnRefrenced: d
|
|
186712
186726
|
};
|
|
186713
186727
|
return {
|
|
186714
|
-
...
|
|
186728
|
+
...u,
|
|
186715
186729
|
[t]: {
|
|
186716
|
-
...(
|
|
186717
|
-
[e.row + "_" + e.column]:
|
|
186730
|
+
...(u == null ? void 0 : u[t]) || {},
|
|
186731
|
+
[e.row + "_" + e.column]: g
|
|
186718
186732
|
}
|
|
186719
186733
|
};
|
|
186720
186734
|
});
|
|
186721
|
-
} catch (
|
|
186722
|
-
const
|
|
186723
|
-
(
|
|
186735
|
+
} catch (s) {
|
|
186736
|
+
const o = (c = (l = (a = e.newValue.f) == null ? void 0 : a.match(/^=([A-Za-z0-9_]+)\s*\(/)) == null ? void 0 : l[1]) == null ? void 0 : c.toUpperCase();
|
|
186737
|
+
(f = e == null ? void 0 : e.dataBlockApiKeyHandler) == null || f.call(e, {
|
|
186724
186738
|
data: {
|
|
186725
|
-
message: `ERROR from updateDataCalcFunc ${
|
|
186739
|
+
message: `ERROR from updateDataCalcFunc ${s == null ? void 0 : s.message}`,
|
|
186726
186740
|
type: "Unexpected error",
|
|
186727
|
-
functionName:
|
|
186741
|
+
functionName: o
|
|
186728
186742
|
},
|
|
186729
186743
|
sheetEditorRef: e.sheetEditorRef,
|
|
186730
186744
|
executeStringFunction: GC,
|