@sheetxl/formulas-extended 0.8.0-beta.14 → 0.8.0-beta.16
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/LICENSE.md +8 -7
- package/{node/esm/BYB98ngJrP8aUEUh.mjs → browser/esm/BJ47kZhvZcY3WJ_x.mjs} +2 -2
- package/{node/esm/La5T3OKHn32uWF7E.mjs → browser/esm/BPqpbST0XAzcTd47.mjs} +2 -2
- package/browser/esm/{Bg9SWNEspWJ7vEAh.mjs → BYyJ0pYzV4HBWwtf.mjs} +2 -2
- package/browser/esm/{C0LxMpWsn2I0bY9l.mjs → BnHZ6bpbcca91mUc.mjs} +2 -2
- package/browser/esm/{BtNcXw7rVlHo7gOf.mjs → Bo0a8wLeBNS77kKI.mjs} +2 -2
- package/browser/esm/{CwLe_zJj5hXFWIYA.mjs → BvYYJ7tez-T3126d.mjs} +2 -2
- package/browser/esm/{CwfGkuVMc5cxV4zD.mjs → BwQc507kfQ9ISaRS.mjs} +2 -2
- package/browser/esm/{DDAPeOZHl2lPDy8F.mjs → BzQQHgBArLhC8pMH.mjs} +2 -2
- package/browser/esm/{DnC76PQFsjGNd0ED.mjs → CNT-L1MTjxpZVXu3.mjs} +2 -2
- package/browser/esm/{CQpm3BBIhHls0ymg.mjs → CQuyzp4ribCibfU5.mjs} +2 -2
- package/browser/esm/{CA-J-CuKvqHcKua5.mjs → CdXvNLQU3uP4xf8H.mjs} +2 -2
- package/{node/esm/BBakdOGC1cqfF6Iu.mjs → browser/esm/D8lI4sL6G_iAKmXn.mjs} +2 -2
- package/browser/esm/{BnqqSrfJVCEx19PQ.mjs → DJ9NMU6rZ1D5ebi_.mjs} +2 -2
- package/browser/esm/{B8SoM9jQdDXwtgKl.mjs → DM96LY50uWuclm1m.mjs} +2 -2
- package/{node/esm/BKOSUaPOspNA3UiR.mjs → browser/esm/DWbFa7pPvHt76LBY.mjs} +2 -2
- package/{node/esm/BymHQ6d0GuLbbJvM.mjs → browser/esm/DeG2p0wft0dxcdAm.mjs} +2 -2
- package/{node/esm/XHM3EQlFTOHq3jQP.mjs → browser/esm/Dpzo6YZEws6PLDBU.mjs} +2 -2
- package/browser/esm/{lPwbrKEbLIYzRLFP.mjs → Dr61Yvcv07Hahj2a.mjs} +2 -2
- package/{node/esm/DGL-3YiIvZL1aezr.mjs → browser/esm/QXT04Whlz23Oe61A.mjs} +2 -2
- package/browser/esm/{BjazhB-rkLGqWTP9.mjs → Xp4ZnPZstNpn35OG.mjs} +2 -2
- package/{node/esm/CayxCfr6Req5OBnt.mjs → browser/esm/_2bUDcLtpT--sYHK.mjs} +2 -2
- package/browser/esm/declarations.mjs +3 -3
- package/browser/esm/index.mjs +290 -329
- package/browser/esm/{CZssZc0NRsK86rhA.mjs → yhUQT3uppl3LibCl.mjs} +2 -2
- package/{browser/esm/BYB98ngJrP8aUEUh.mjs → node/esm/BJ47kZhvZcY3WJ_x.mjs} +2 -2
- package/{browser/esm/La5T3OKHn32uWF7E.mjs → node/esm/BPqpbST0XAzcTd47.mjs} +2 -2
- package/node/esm/{Bg9SWNEspWJ7vEAh.mjs → BYyJ0pYzV4HBWwtf.mjs} +2 -2
- package/node/esm/{C0LxMpWsn2I0bY9l.mjs → BnHZ6bpbcca91mUc.mjs} +2 -2
- package/node/esm/{BtNcXw7rVlHo7gOf.mjs → Bo0a8wLeBNS77kKI.mjs} +2 -2
- package/node/esm/{CwLe_zJj5hXFWIYA.mjs → BvYYJ7tez-T3126d.mjs} +2 -2
- package/node/esm/{DDAPeOZHl2lPDy8F.mjs → BzQQHgBArLhC8pMH.mjs} +2 -2
- package/node/esm/{DnC76PQFsjGNd0ED.mjs → CNT-L1MTjxpZVXu3.mjs} +2 -2
- package/node/esm/{CQpm3BBIhHls0ymg.mjs → CQuyzp4ribCibfU5.mjs} +2 -2
- package/node/esm/{CA-J-CuKvqHcKua5.mjs → CdXvNLQU3uP4xf8H.mjs} +2 -2
- package/{browser/esm/BBakdOGC1cqfF6Iu.mjs → node/esm/D8lI4sL6G_iAKmXn.mjs} +2 -2
- package/node/esm/{shH8FSZ-wXbrxVx7.mjs → DDSz0FRZeWiUv0Qn.mjs} +2 -2
- package/node/esm/{BnqqSrfJVCEx19PQ.mjs → DJ9NMU6rZ1D5ebi_.mjs} +2 -2
- package/node/esm/{CiAc0OZCRv1uRsiF.mjs → DLRWBCUyz6hWY7gA.mjs} +2 -2
- package/node/esm/{B8SoM9jQdDXwtgKl.mjs → DM96LY50uWuclm1m.mjs} +2 -2
- package/{browser/esm/BKOSUaPOspNA3UiR.mjs → node/esm/DWbFa7pPvHt76LBY.mjs} +2 -2
- package/{browser/esm/BymHQ6d0GuLbbJvM.mjs → node/esm/DeG2p0wft0dxcdAm.mjs} +2 -2
- package/{browser/esm/XHM3EQlFTOHq3jQP.mjs → node/esm/Dpzo6YZEws6PLDBU.mjs} +2 -2
- package/node/esm/{lPwbrKEbLIYzRLFP.mjs → Dr61Yvcv07Hahj2a.mjs} +2 -2
- package/{browser/esm/DGL-3YiIvZL1aezr.mjs → node/esm/QXT04Whlz23Oe61A.mjs} +2 -2
- package/node/esm/{D_YJXQ3IoCVzkEWy.mjs → XRNK8e2JoP4X70Jk.mjs} +2 -2
- package/{browser/esm/CayxCfr6Req5OBnt.mjs → node/esm/_2bUDcLtpT--sYHK.mjs} +2 -2
- package/node/esm/declarations.mjs +3 -3
- package/node/esm/index.mjs +594 -635
- package/package.json +4 -4
- package/types/src/_utils/Pivot.d.ts +35 -37
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/formulas-extended",
|
|
3
3
|
"description": "Formulas Enterprise - TypeScript formulas compatible with Excel built-ins.",
|
|
4
|
-
"version": "0.8.0-beta.
|
|
5
|
-
"license": "SEE LICENSE IN
|
|
4
|
+
"version": "0.8.0-beta.16",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"formulas"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@sheetxl/primitives": "^0.8.0-beta.
|
|
46
|
-
"@sheetxl/scripting": "^0.8.0-beta.
|
|
45
|
+
"@sheetxl/primitives": "^0.8.0-beta.16",
|
|
46
|
+
"@sheetxl/scripting": "^0.8.0-beta.16"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -109,61 +109,59 @@ export declare const isLoneBlankCell: (values: IRange) => boolean;
|
|
|
109
109
|
* `#VALUE!` for the whole call (f06, f08), as is a shape mismatch (f03, f09, f11).
|
|
110
110
|
*/
|
|
111
111
|
export declare const isValidFilter: (filter: IRange, recordCount: number) => boolean;
|
|
112
|
+
/** A group of one axis of the pivot. */
|
|
113
|
+
export type Group = IFormulaContext.PivotGroup;
|
|
112
114
|
/**
|
|
113
|
-
*
|
|
114
|
-
|
|
115
|
-
export interface AxisNode {
|
|
116
|
-
/** The key level, 0 for the outermost field. */
|
|
117
|
-
readonly level: number;
|
|
118
|
-
/** The group within that level's grouping. */
|
|
119
|
-
readonly group: number;
|
|
120
|
-
/** The keys down to this level, as spelled by the group's first record. */
|
|
121
|
-
readonly keys: readonly Scalar[];
|
|
122
|
-
/** The group one level up, `null` at the outermost level. */
|
|
123
|
-
readonly parent: AxisNode | null;
|
|
124
|
-
readonly children: AxisNode[];
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* One output line of an axis: a group at the innermost level, a subtotal, or the grand total.
|
|
115
|
+
* One output line of an axis: a group at the innermost level, a subtotal, or the grand total
|
|
116
|
+
* (the axis's root).
|
|
128
117
|
*/
|
|
129
118
|
export interface AxisLine {
|
|
130
119
|
readonly kind: 'group' | 'subtotal' | 'total';
|
|
131
|
-
|
|
132
|
-
readonly node: AxisNode | null;
|
|
120
|
+
readonly node: Group;
|
|
133
121
|
}
|
|
122
|
+
/** Each group's children in their sorted order. */
|
|
123
|
+
export type AxisOrder = ReadonlyMap<Group, readonly Group[]>;
|
|
124
|
+
/**
|
|
125
|
+
* `measure` over the records in both a row group and a column group: the pivot's own aggregate
|
|
126
|
+
* when it computes the function ({@link IFormulaContext.Pivot.getAggregate}), the function over
|
|
127
|
+
* the members otherwise, and `""` when no record is in both.
|
|
128
|
+
*/
|
|
129
|
+
export declare const aggregateAt: (pivot: IFormulaContext.Pivot, measure: Measure, values: IRange, row: Group | undefined, column: Group | undefined, y: () => IRange) => Scalar;
|
|
134
130
|
/**
|
|
135
|
-
*
|
|
131
|
+
* The layout of one axis of a pivot — `GROUPBY`'s rows, or either side of `PIVOTBY` — over the
|
|
132
|
+
* pivot's tree of groups ({@link IFormulaContext.createPivot}): sorting, subtotal and total
|
|
133
|
+
* placement, and key cells.
|
|
136
134
|
*
|
|
137
135
|
* @remarks
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
136
|
+
* The pivot groups every key level, so a subtotal's members are one group rather than a union of
|
|
137
|
+
* its children's, and each level keeps its own group's spelling: `East`, then `east` under a later
|
|
138
|
+
* product, is still `East` in that row (c13).
|
|
141
139
|
*/
|
|
142
|
-
export declare class
|
|
140
|
+
export declare class AxisLayout {
|
|
141
|
+
readonly root: Group;
|
|
143
142
|
readonly fieldCount: number;
|
|
144
|
-
/**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
constructor(keys: IRange, filter: IRange | undefined);
|
|
150
|
-
/** The number of records kept. */
|
|
151
|
-
getRecordCount(): number;
|
|
152
|
-
/** A node's members of one value column. */
|
|
153
|
-
getMembers(values: IRange, node: AxisNode | null): IRange;
|
|
143
|
+
/**
|
|
144
|
+
* @param axis One axis of the pivot.
|
|
145
|
+
* @param fieldCount The key columns the axis is grouped by.
|
|
146
|
+
*/
|
|
147
|
+
constructor(axis: IFormulaContext.PivotAxis, fieldCount: number);
|
|
154
148
|
/**
|
|
155
149
|
* Orders the groups at every level.
|
|
156
150
|
*
|
|
157
|
-
* @param valueOf A
|
|
158
|
-
* @param table Field relationship 1: one flat order over the innermost groups (d18).
|
|
151
|
+
* @param valueOf A group's aggregate, for a sort by value.
|
|
159
152
|
*
|
|
160
153
|
* @remarks
|
|
161
|
-
* Keys sort by the comparison operators' order
|
|
154
|
+
* Keys sort by the comparison operators' order — numbers, text, `FALSE`, `TRUE`, errors — with
|
|
162
155
|
* a blank key last in either direction (e01, e02). A sort by value orders each level by its own
|
|
163
156
|
* aggregate, parents by their subtotal (d05); ties keep key order (e06), and an error aggregate
|
|
164
157
|
* sorts last.
|
|
165
158
|
*/
|
|
166
|
-
|
|
159
|
+
sortTree(spec: SortSpec, valueOf: (node: Group) => Scalar): AxisOrder;
|
|
160
|
+
/**
|
|
161
|
+
* The innermost groups in one flat order, for field relationship 1 (d18): by every key level in
|
|
162
|
+
* turn, then by value when the sort asks for it.
|
|
163
|
+
*/
|
|
164
|
+
sortLeaves(spec: SortSpec, valueOf: (node: Group) => Scalar): Group[];
|
|
167
165
|
/**
|
|
168
166
|
* The output lines in order, with subtotals and the grand total placed per `depth`.
|
|
169
167
|
*
|
|
@@ -171,7 +169,7 @@ export declare class PivotAxis {
|
|
|
171
169
|
* `|depth|` 1 is the grand total alone; each step deeper adds subtotals for one more level from
|
|
172
170
|
* the top (c03, c13, c14). A negative depth puts every total before what it totals (c06, c15).
|
|
173
171
|
*/
|
|
174
|
-
lines(
|
|
172
|
+
lines(order: AxisOrder, depth: number): AxisLine[];
|
|
175
173
|
/**
|
|
176
174
|
* The key cells of a line: its keys, `""` past its level, and the total's label.
|
|
177
175
|
*
|