@rowsncolumns/functions 15.0.0 → 15.0.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sparkline.d.ts","sourceRoot":"","sources":["../../../formulas/sparkline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AAGnE,eAAO,MAAM,SAAS,GACpB,QAAQ,aAAa,EACrB,SAAS,gBAAgB,EACzB,YAAY,gBAAgB,KAC3B,eAAe,GAAG,
|
|
1
|
+
{"version":3,"file":"sparkline.d.ts","sourceRoot":"","sources":["../../../formulas/sparkline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AAGnE,eAAO,MAAM,SAAS,GACpB,QAAQ,aAAa,EACrB,SAAS,gBAAgB,EACzB,YAAY,gBAAgB,KAC3B,eAAe,GAAG,SA2FpB,CAAC"}
|
|
@@ -32,9 +32,30 @@ var SPARKLINE = function (parser, dataArg, optionsArg) {
|
|
|
32
32
|
var isNumber = function (item) {
|
|
33
33
|
return typeof item === "number" && !isNaN(item);
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
// Excel plots only the visible cells of the data range unless the group's
|
|
36
|
+
// "Show data in hidden rows and columns" (`displayhidden`) is on. Row
|
|
37
|
+
// visibility comes from the host through the parser's `onRowHidden` hook
|
|
38
|
+
// (the SUBTOTAL hook); hidden columns are not reported and stay plotted.
|
|
39
|
+
var onRowHidden = parser.onRowHidden;
|
|
40
|
+
var range = dataArg.isRangeRef && dataArg.position && "from" in dataArg.position
|
|
41
|
+
? dataArg.position
|
|
42
|
+
: undefined;
|
|
43
|
+
var rows = Array.isArray(dataArg.value) && dataArg.value.every(Array.isArray)
|
|
44
|
+
? dataArg.value
|
|
45
|
+
: undefined;
|
|
46
|
+
var rawData = options.displayhidden !== true && onRowHidden && range && rows
|
|
47
|
+
? rows
|
|
48
|
+
.filter(function (_, index) {
|
|
49
|
+
var hidden = onRowHidden({
|
|
50
|
+
sheet: range.sheet,
|
|
51
|
+
row: range.from.row + index,
|
|
52
|
+
});
|
|
53
|
+
return !((hidden === null || hidden === void 0 ? void 0 : hidden.hiddenByFilter) || (hidden === null || hidden === void 0 ? void 0 : hidden.hiddenByUser));
|
|
54
|
+
})
|
|
55
|
+
.flat()
|
|
56
|
+
: Array.isArray(dataArg.value)
|
|
57
|
+
? dataArg.value.flat()
|
|
58
|
+
: [dataArg.value];
|
|
38
59
|
// Empty-cell handling: when the `emptycells` option is present
|
|
39
60
|
// (gap/zero/span — Excel's displayEmptyCellsAs) the renderer needs
|
|
40
61
|
// to know WHERE the empty cells were, so keep them as nulls.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sparkline.d.ts","sourceRoot":"","sources":["../../../formulas/sparkline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AAGnE,eAAO,MAAM,SAAS,GACpB,QAAQ,aAAa,EACrB,SAAS,gBAAgB,EACzB,YAAY,gBAAgB,KAC3B,eAAe,GAAG,
|
|
1
|
+
{"version":3,"file":"sparkline.d.ts","sourceRoot":"","sources":["../../../formulas/sparkline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AAGnE,eAAO,MAAM,SAAS,GACpB,QAAQ,aAAa,EACrB,SAAS,gBAAgB,EACzB,YAAY,gBAAgB,KAC3B,eAAe,GAAG,SA2FpB,CAAC"}
|
|
@@ -27,9 +27,30 @@ export const SPARKLINE = (parser, dataArg, optionsArg) => {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
const isNumber = (item) => typeof item === "number" && !isNaN(item);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
// Excel plots only the visible cells of the data range unless the group's
|
|
31
|
+
// "Show data in hidden rows and columns" (`displayhidden`) is on. Row
|
|
32
|
+
// visibility comes from the host through the parser's `onRowHidden` hook
|
|
33
|
+
// (the SUBTOTAL hook); hidden columns are not reported and stay plotted.
|
|
34
|
+
const onRowHidden = parser.onRowHidden;
|
|
35
|
+
const range = dataArg.isRangeRef && dataArg.position && "from" in dataArg.position
|
|
36
|
+
? dataArg.position
|
|
37
|
+
: undefined;
|
|
38
|
+
const rows = Array.isArray(dataArg.value) && dataArg.value.every(Array.isArray)
|
|
39
|
+
? dataArg.value
|
|
40
|
+
: undefined;
|
|
41
|
+
const rawData = options.displayhidden !== true && onRowHidden && range && rows
|
|
42
|
+
? rows
|
|
43
|
+
.filter((_, index) => {
|
|
44
|
+
const hidden = onRowHidden({
|
|
45
|
+
sheet: range.sheet,
|
|
46
|
+
row: range.from.row + index,
|
|
47
|
+
});
|
|
48
|
+
return !(hidden?.hiddenByFilter || hidden?.hiddenByUser);
|
|
49
|
+
})
|
|
50
|
+
.flat()
|
|
51
|
+
: Array.isArray(dataArg.value)
|
|
52
|
+
? dataArg.value.flat()
|
|
53
|
+
: [dataArg.value];
|
|
33
54
|
// Empty-cell handling: when the `emptycells` option is present
|
|
34
55
|
// (gap/zero/span — Excel's displayEmptyCellsAs) the renderer needs
|
|
35
56
|
// to know WHERE the empty cells were, so keep them as nulls.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rowsncolumns/functions",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.1",
|
|
4
4
|
"author": "Vinay M",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
"build": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json",
|
|
20
20
|
"clean": "rimraf dist",
|
|
21
21
|
"test": "vitest --run",
|
|
22
|
+
"types:specs": "node ../../scripts/typecheck-specs.mjs",
|
|
23
|
+
"types:specs:update": "node ../../scripts/typecheck-specs.mjs --update",
|
|
22
24
|
"build:watch": "tsc -p ./tsconfig.esm.json --watch"
|
|
23
25
|
},
|
|
24
26
|
"files": [
|
|
@@ -32,11 +34,11 @@
|
|
|
32
34
|
"url": "https://github.com/rowsncolumns/spreadsheet/issues"
|
|
33
35
|
},
|
|
34
36
|
"devDependencies": {
|
|
35
|
-
"@rowsncolumns/common-types": ">=5.2.
|
|
37
|
+
"@rowsncolumns/common-types": ">=5.2.34",
|
|
36
38
|
"@rowsncolumns/calculator": ">=7.3.0",
|
|
37
|
-
"@rowsncolumns/fast-formula-parser": ">=6.2.
|
|
38
|
-
"@rowsncolumns/utils": ">=9.
|
|
39
|
-
"@rowsncolumns/toolkit": ">=24.
|
|
39
|
+
"@rowsncolumns/fast-formula-parser": ">=6.2.40",
|
|
40
|
+
"@rowsncolumns/utils": ">=9.4.0",
|
|
41
|
+
"@rowsncolumns/toolkit": ">=24.5.0"
|
|
40
42
|
},
|
|
41
43
|
"peerDependencies": {
|
|
42
44
|
"@rowsncolumns/common-types": ">=5.2.32",
|