@fileverse-dev/dsheet 0.0.52 → 0.0.55
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 +52 -17
- package/dist/package/utils/diff-sheet.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -6709,32 +6709,67 @@ function eJ(e, r) {
|
|
|
6709
6709
|
if (a.name !== n.name || JSON.stringify(a.config) !== JSON.stringify(n.config))
|
|
6710
6710
|
return !0;
|
|
6711
6711
|
const o = (a == null ? void 0 : a.celldata) || [], i = (n == null ? void 0 : n.celldata) || [], s = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
|
|
6712
|
-
for (const
|
|
6713
|
-
if (
|
|
6714
|
-
const
|
|
6715
|
-
s.set(
|
|
6712
|
+
for (const h of o)
|
|
6713
|
+
if (h.v !== null) {
|
|
6714
|
+
const p = `${h.r},${h.c}`;
|
|
6715
|
+
s.set(p, h.v);
|
|
6716
6716
|
}
|
|
6717
|
-
for (const
|
|
6718
|
-
if (
|
|
6719
|
-
const
|
|
6720
|
-
u.set(
|
|
6717
|
+
for (const h of i)
|
|
6718
|
+
if (h.v !== null) {
|
|
6719
|
+
const p = `${h.r},${h.c}`;
|
|
6720
|
+
u.set(p, h.v);
|
|
6721
6721
|
}
|
|
6722
6722
|
if (s.size !== u.size)
|
|
6723
6723
|
return !0;
|
|
6724
|
-
for (const [
|
|
6725
|
-
if (!u.has(
|
|
6724
|
+
for (const [h, p] of s.entries()) {
|
|
6725
|
+
if (!u.has(h))
|
|
6726
6726
|
return !0;
|
|
6727
|
-
const
|
|
6728
|
-
if (typeof
|
|
6729
|
-
for (const
|
|
6730
|
-
if (
|
|
6727
|
+
const m = u.get(h);
|
|
6728
|
+
if (typeof p == "object" && p !== null && typeof m == "object" && m !== null) {
|
|
6729
|
+
for (const v in p)
|
|
6730
|
+
if (p[v] !== m[v])
|
|
6731
6731
|
return !0;
|
|
6732
|
-
for (const
|
|
6733
|
-
if (
|
|
6732
|
+
for (const v in m)
|
|
6733
|
+
if (p[v] !== m[v])
|
|
6734
6734
|
return !0;
|
|
6735
|
-
} else if (
|
|
6735
|
+
} else if (p !== m)
|
|
6736
6736
|
return !0;
|
|
6737
6737
|
}
|
|
6738
|
+
const l = (a == null ? void 0 : a.images) || [], c = (n == null ? void 0 : n.images) || [];
|
|
6739
|
+
if (l.length !== c.length)
|
|
6740
|
+
return !0;
|
|
6741
|
+
const f = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
|
|
6742
|
+
for (const h of l) {
|
|
6743
|
+
const p = h.id || `${h.x || 0},${h.y || 0}` || JSON.stringify(h);
|
|
6744
|
+
f.set(p, h);
|
|
6745
|
+
}
|
|
6746
|
+
for (const h of c) {
|
|
6747
|
+
const p = h.id || `${h.x || 0},${h.y || 0}` || JSON.stringify(h);
|
|
6748
|
+
d.set(p, h);
|
|
6749
|
+
}
|
|
6750
|
+
for (const [h, p] of f.entries()) {
|
|
6751
|
+
if (!d.has(h))
|
|
6752
|
+
return !0;
|
|
6753
|
+
const m = d.get(h), v = Object.keys(p), g = Object.keys(m);
|
|
6754
|
+
if (v.length !== g.length)
|
|
6755
|
+
return !0;
|
|
6756
|
+
for (const y of v) {
|
|
6757
|
+
if (!m.hasOwnProperty(y))
|
|
6758
|
+
return !0;
|
|
6759
|
+
const b = p[y], F = m[y];
|
|
6760
|
+
if (typeof b == "object" && b !== null && typeof F == "object" && F !== null) {
|
|
6761
|
+
if (JSON.stringify(b) !== JSON.stringify(F))
|
|
6762
|
+
return !0;
|
|
6763
|
+
} else if (b !== F)
|
|
6764
|
+
return !0;
|
|
6765
|
+
}
|
|
6766
|
+
for (const y of g)
|
|
6767
|
+
if (!p.hasOwnProperty(y))
|
|
6768
|
+
return !0;
|
|
6769
|
+
}
|
|
6770
|
+
for (const h of d.keys())
|
|
6771
|
+
if (!f.has(h))
|
|
6772
|
+
return !0;
|
|
6738
6773
|
}
|
|
6739
6774
|
return !1;
|
|
6740
6775
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Sheet } from '@fileverse-dev/fortune-core';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Compare two spreadsheets' cell data and
|
|
4
|
+
* Compare two spreadsheets' cell data and images, checking if anything changed
|
|
5
5
|
* @param {Array} oldSheets - Original sheets data
|
|
6
6
|
* @param {Array} newSheets - New sheets data
|
|
7
|
-
* @returns {boolean} - true if any cell data changed, false if identical
|
|
7
|
+
* @returns {boolean} - true if any cell data or images changed, false if identical
|
|
8
8
|
*/
|
|
9
9
|
export declare function isSpreadsheetChanged(oldSheets: Sheet[], newSheets: Sheet[]): boolean;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fileverse-dev/dsheet",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "DSheet",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.55",
|
|
6
6
|
"main": "dist/index.es.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
8
8
|
"exports": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@fileverse-dev/dsheets-templates": "^0.0.7",
|
|
43
43
|
"@fileverse-dev/formulajs": "^4.4.11-mod-13",
|
|
44
|
-
"@fileverse-dev/fortune-core": "^1.0.2-mod-
|
|
45
|
-
"@fileverse-dev/fortune-react": "^1.0.2-mod-
|
|
44
|
+
"@fileverse-dev/fortune-core": "^1.0.2-mod-41",
|
|
45
|
+
"@fileverse-dev/fortune-react": "^1.0.2-mod-41",
|
|
46
46
|
"@fileverse/ui": "^4.1.7-patch-12",
|
|
47
47
|
"classnames": "^2.5.1",
|
|
48
48
|
"exceljs": "^4.4.0",
|