@sheetxl/sdk 0.8.0-beta.5 → 0.8.0-beta.6
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/browser/cjs/-wfVn4ubg563jjqj.cjs +93 -0
- package/browser/cjs/B2GVAGA-CBeu_7U4.cjs +1 -0
- package/browser/cjs/{D_hl_D3IBlVqjbUu.cjs → CMrcyRRWS0gjwpr2.cjs} +1 -1
- package/browser/cjs/{BV3LBQXG3kA013a2.cjs → DFKGFVvoELb8_p_B.cjs} +1 -1
- package/browser/cjs/{CvjJnxfMX3aal6Zj.cjs → KMBs7XyoINajcR-L.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{B6t-k7D3HcTIJ-Xl.mjs → 7_M82_Otn5kHQ0qd.mjs} +2 -2
- package/browser/esm/{CLfbadk6S57dy8sc.mjs → CEk-nufZXNFx5jDl.mjs} +9451 -8355
- package/browser/esm/{DWJJtu3q6iMfUbbN.mjs → CfoNUsKHL7SzfO8c.mjs} +2 -2
- package/browser/esm/{BiUnakUlo61EtntE.mjs → DBjWjEUK9qrHG5VD.mjs} +1 -1
- package/browser/esm/{B45qhpdlbHHa6-gu.mjs → DRsp6JAObqXYGvhz.mjs} +2 -2
- package/browser/esm/{ahTq_KBqu4jWkQ8A.mjs → J1egfq2ajlXPw3Ki.mjs} +2 -2
- package/browser/esm/{CoiupvxiR8tLrCa4.mjs → iLZfKwfSx5bQgCOp.mjs} +2 -2
- package/browser/esm/index.mjs +8 -8
- package/node/esm/{CDh1Fw2maXvyOhIs.mjs → BMtLBfP7JzIsG9_G.mjs} +1 -1
- package/node/esm/{K4Xw9Ur7uFf9M5Gh.mjs → CynxiHhVY9UGe_h6.mjs} +1 -1
- package/node/esm/{BP9JmWMpUInDk4OG.mjs → DYRjFZ75QYgmgEWF.mjs} +1 -1
- package/node/esm/{B2dQyLw_fQU5VuXt.mjs → DpyQm1VnGyCmRRKJ.mjs} +1 -1
- package/node/esm/index.mjs +12767 -11626
- package/package.json +6 -6
- package/resources/locales/de/model.msg.json +16 -0
- package/resources/locales/en/model.msg.json +16 -0
- package/types/scripting-api.json +6166 -6120
- package/types/scripting.d.ts +481 -128
- package/types/src/calculation/_TableRename.d.ts +13 -0
- package/types/src/calculation/grid/CalcGrid.d.ts +18 -3
- package/types/src/calculation/grid/CalcGridBackend.d.ts +49 -0
- package/types/src/calculation/grid/CalcGridProxy.d.ts +5 -0
- package/types/src/calculation/grid/ICalcGrid.d.ts +37 -0
- package/types/src/calculation/grid/_CalcRequest.d.ts +22 -0
- package/types/src/calculation/state/CalculationContext.d.ts +7 -1
- package/types/src/cell/ICell.d.ts +21 -1
- package/types/src/chart/Chart.d.ts +5 -18
- package/types/src/chart/ChartCollection.d.ts +1 -1
- package/types/src/chart/IChart.d.ts +11 -10
- package/types/src/chart/IChartCollection.d.ts +3 -3
- package/types/src/color/_BuiltInIndexDefs.d.ts +6 -0
- package/types/src/comment/Comment.d.ts +69 -7
- package/types/src/comment/IComment.d.ts +70 -51
- package/types/src/comment/NoteMovable.d.ts +26 -0
- package/types/src/comment/_CommentUtils.d.ts +23 -1
- package/types/src/comment/_NoteBox.d.ts +50 -0
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +27 -2
- package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/AndOperator.d.ts +3 -1
- package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/NotOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/OrOperator.d.ts +3 -1
- package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +6 -0
- package/types/src/condition/Condition.d.ts +2 -0
- package/types/src/condition/ICondition.d.ts +59 -2
- package/types/src/condition/_ConditionUtils.d.ts +10 -0
- package/types/src/filter/IFilter.d.ts +76 -1
- package/types/src/movable/AbstractMovableContent.d.ts +54 -0
- package/types/src/movable/Control.d.ts +5 -7
- package/types/src/movable/CustomElement.d.ts +4 -5
- package/types/src/movable/IControl.d.ts +7 -5
- package/types/src/movable/ICustomElement.d.ts +7 -2
- package/types/src/movable/IMovable.d.ts +74 -42
- package/types/src/movable/IMovableCollection.d.ts +6 -0
- package/types/src/movable/Movable.d.ts +53 -32
- package/types/src/numFmt/_FormatCell.d.ts +9 -0
- package/types/src/person/index.d.ts +1 -0
- package/types/src/picture/IPicture.d.ts +7 -1
- package/types/src/picture/Picture.d.ts +5 -4
- package/types/src/primitives/Range.d.ts +31 -1
- package/types/src/primitives/RangeStats.d.ts +7 -2
- package/types/src/primitives/ReferenceRange.d.ts +2 -0
- package/types/src/primitives/stats/AggregateStats.d.ts +49 -15
- package/types/src/primitives/stats/FrequencyStats.d.ts +1 -1
- package/types/src/primitives/stats/Ranked.d.ts +1 -1
- package/types/src/primitives/stats/SortedNumbers.d.ts +2 -2
- package/types/src/shape/IShape.d.ts +6 -4
- package/types/src/shape/Shape.d.ts +5 -10
- package/types/src/sheet/ISheet.d.ts +3 -2
- package/types/src/sheet/Sheet.d.ts +73 -21
- package/types/src/sheet/SheetCell.d.ts +1 -1
- package/types/src/sheet/_SheetFilterUtils.d.ts +17 -0
- package/types/src/sheet/_SheetStateTypes.d.ts +18 -0
- package/types/src/sheet/_SheetUtils.d.ts +15 -0
- package/types/src/sheetHeader/ISheetHeader.d.ts +17 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +11 -0
- package/types/src/slicer/ISlicer.d.ts +7 -2
- package/types/src/slicer/Slicer.d.ts +5 -9
- package/types/src/table/AnchoredTable.d.ts +46 -6
- package/types/src/table/ITable.d.ts +10 -1
- package/types/src/table/ITableCollection.d.ts +10 -0
- package/types/src/table/_FilterField.d.ts +9 -1
- package/types/src/text/richtext/IRichText.d.ts +36 -0
- package/types/src/text/richtext/index.d.ts +1 -0
- package/types/src/transaction/ITransaction.d.ts +11 -0
- package/types/src/transaction/Transaction.d.ts +2 -0
- package/browser/cjs/By2s44r4eRFvMq6H.cjs +0 -93
- package/browser/cjs/Nt1C8528otcBXJ2J.cjs +0 -1
|
@@ -4,6 +4,8 @@ import { IListener } from '../listener';
|
|
|
4
4
|
import { ITransaction } from '../transaction';
|
|
5
5
|
import { IPerson } from '../person';
|
|
6
6
|
import { ISheet } from '../sheet';
|
|
7
|
+
import { IMovable } from '../movable';
|
|
8
|
+
import { IRichText } from '../text';
|
|
7
9
|
/**
|
|
8
10
|
* A comment on a cell: the root of a thread, with its replies, or a note.
|
|
9
11
|
*
|
|
@@ -15,12 +17,47 @@ import { ISheet } from '../sheet';
|
|
|
15
17
|
*
|
|
16
18
|
* Anchored to its cell, so it follows a row or column insert or delete and is deleted when its
|
|
17
19
|
* cell is.
|
|
20
|
+
*
|
|
21
|
+
* A note is also the content of a {@link getMovable | movable}: the box it is shown in.
|
|
18
22
|
*/
|
|
19
|
-
export interface IComment extends IAnchored {
|
|
23
|
+
export interface IComment extends IAnchored, IMovable.IContent {
|
|
20
24
|
/**
|
|
21
25
|
* The comment's identifier, unique within the workbook.
|
|
22
26
|
*/
|
|
23
27
|
getId(): string;
|
|
28
|
+
/**
|
|
29
|
+
* `'note'` for a note, `'comment'` for a threaded comment.
|
|
30
|
+
*/
|
|
31
|
+
getType(): string;
|
|
32
|
+
/**
|
|
33
|
+
* The box a note is shown in, or `null` for a threaded comment, which has none.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* The box is an ordinary movable: it is selected, moved and resized like a picture's, and is
|
|
37
|
+
* among the sheet's `getMovables()`. Its content is this comment.
|
|
38
|
+
*
|
|
39
|
+
* * **Placement.** A box that has not been moved sits where Excel puts a new note, beside its
|
|
40
|
+
* cell, and stores nothing. Moving or resizing it stores where it is, relative to its cell,
|
|
41
|
+
* so a note copied to another cell keeps its box beside it.
|
|
42
|
+
* * **Shown or on hover.** `isHidden()` is `true` for a box that appears only while its cell is
|
|
43
|
+
* pointed at, which is how a note starts and which a view decides. `setHidden(false)` keeps
|
|
44
|
+
* it on the sheet.
|
|
45
|
+
*
|
|
46
|
+
* A reply converts a note to a threaded comment, and its box goes with it.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const note = sheet.getComments().add('B2', 'Check this', { asNote: true });
|
|
51
|
+
* const box = note.getMovable();
|
|
52
|
+
* box.setHidden(false); // always shown
|
|
53
|
+
* box.setBounds({ width: 240 });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
getMovable(): IMovable | null;
|
|
57
|
+
/**
|
|
58
|
+
* Deletes the comment: its replies with it, or a note's box.
|
|
59
|
+
*/
|
|
60
|
+
delete(options?: ITransaction.OperationOptions): void;
|
|
24
61
|
/**
|
|
25
62
|
* The sheet the comment is on.
|
|
26
63
|
*/
|
|
@@ -43,12 +80,15 @@ export interface IComment extends IAnchored {
|
|
|
43
80
|
* Replaces the content.
|
|
44
81
|
*
|
|
45
82
|
* @param content Plain text, or formatting runs for a note.
|
|
83
|
+
*
|
|
84
|
+
* @remarks
|
|
85
|
+
* Drops the comment's mentions: each names a span of the text it was made in.
|
|
46
86
|
*/
|
|
47
87
|
setContent(content: IComment.Content, options?: ITransaction.OperationOptions): this;
|
|
48
88
|
/**
|
|
49
89
|
* The content with its formatting runs, or `null` when it is plain text.
|
|
50
90
|
*/
|
|
51
|
-
getRichContent():
|
|
91
|
+
getRichContent(): IRichText.JSON | null;
|
|
52
92
|
/**
|
|
53
93
|
* The person who wrote the comment, or `null` if the workbook does not know them.
|
|
54
94
|
*/
|
|
@@ -150,7 +190,7 @@ export declare namespace IComment {
|
|
|
150
190
|
*/
|
|
151
191
|
getContent(): string;
|
|
152
192
|
/**
|
|
153
|
-
* Replaces the content.
|
|
193
|
+
* Replaces the content, dropping the reply's mentions.
|
|
154
194
|
*/
|
|
155
195
|
setContent(content: IComment.Content, options?: ITransaction.OperationOptions): this;
|
|
156
196
|
/**
|
|
@@ -183,42 +223,12 @@ export declare namespace IComment {
|
|
|
183
223
|
readonly isICommentReply: true;
|
|
184
224
|
}
|
|
185
225
|
/**
|
|
186
|
-
*
|
|
226
|
+
* What a comment says: plain text, or formatting runs for a note.
|
|
187
227
|
*
|
|
188
228
|
* @remarks
|
|
189
|
-
* A note keeps Excel's rich text; a threaded comment is plain text and never carries
|
|
190
|
-
* Every property but `text` is optional and inherits the note's default when absent.
|
|
191
|
-
*/
|
|
192
|
-
interface Run {
|
|
193
|
-
/**
|
|
194
|
-
* The text of the span.
|
|
195
|
-
*/
|
|
196
|
-
text: string;
|
|
197
|
-
/**
|
|
198
|
-
* The font name.
|
|
199
|
-
*/
|
|
200
|
-
font?: string;
|
|
201
|
-
/**
|
|
202
|
-
* The font size in points.
|
|
203
|
-
*/
|
|
204
|
-
size?: number;
|
|
205
|
-
bold?: boolean;
|
|
206
|
-
italic?: boolean;
|
|
207
|
-
/**
|
|
208
|
-
* The color as a hex string.
|
|
209
|
-
*/
|
|
210
|
-
color?: string;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Content with formatting: a list of {@link Run | runs}.
|
|
229
|
+
* A note keeps Excel's rich text; a threaded comment is plain text and never carries runs.
|
|
214
230
|
*/
|
|
215
|
-
|
|
216
|
-
runs: Run[];
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* What a comment says: plain text, or formatting runs for a note.
|
|
220
|
-
*/
|
|
221
|
-
type Content = string | RichContent;
|
|
231
|
+
type Content = string | IRichText.JSON;
|
|
222
232
|
/**
|
|
223
233
|
* The values that can be set on a comment.
|
|
224
234
|
*/
|
|
@@ -317,23 +327,22 @@ export declare namespace IComment {
|
|
|
317
327
|
interface ReplyJSON extends EntryJSON {
|
|
318
328
|
}
|
|
319
329
|
/**
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
* @remarks
|
|
323
|
-
* Only ever present on a comment read from a file. A comment authored here has none, and is
|
|
324
|
-
* written with Excel's default box (hidden until hovered, hung to the right of its cell); a
|
|
325
|
-
* comment that has one is written with that box, its cell rewritten from the comment's so it
|
|
326
|
-
* stays with the note, its size, fill and offsets replayed as they were.
|
|
327
|
-
*
|
|
328
|
-
* Opaque markup, as a half-house — the VML `<v:shape>`, not a {@link IShape.JSON}, whose own
|
|
329
|
-
* `xml` is DrawingML. What it holds is a movable's worth: the cells and offsets of its corners
|
|
330
|
-
* (an {@link IMovable.AnchorOffset}), whether it is hidden, and a shape's fill and size. That
|
|
331
|
-
* is where it graduates to — an anchor, a `hidden` flag and an {@link IShape.JSON} — once the
|
|
332
|
-
* VML can be read into them; the offsets are the authoring machine's pixels, which is what
|
|
333
|
-
* keeps them opaque today.
|
|
330
|
+
* A note's box, where it differs from the default.
|
|
334
331
|
*/
|
|
335
332
|
interface BoxJSON {
|
|
336
|
-
|
|
333
|
+
/**
|
|
334
|
+
* Where the box is: the cells and pixel offsets of its top-left and bottom-right corners,
|
|
335
|
+
* the cells counted from the note's own (`r: -1` is the row above it).
|
|
336
|
+
*
|
|
337
|
+
* @remarks
|
|
338
|
+
* Absent for a box that has not been moved or resized, which is placed beside its cell.
|
|
339
|
+
*/
|
|
340
|
+
anchor?: IMovable.AnchorOffset;
|
|
341
|
+
/**
|
|
342
|
+
* How the box is drawn when that is not Excel's default, held as it was read: the VML
|
|
343
|
+
* `<v:shape>` without its id, its position or its cell.
|
|
344
|
+
*/
|
|
345
|
+
xml?: string;
|
|
337
346
|
}
|
|
338
347
|
/**
|
|
339
348
|
* A comment, for persisting.
|
|
@@ -351,6 +360,16 @@ export declare namespace IComment {
|
|
|
351
360
|
* The replies, oldest first.
|
|
352
361
|
*/
|
|
353
362
|
replies?: ReplyJSON[];
|
|
363
|
+
/**
|
|
364
|
+
* Whether a note's box stays on the sheet rather than appearing on hover.
|
|
365
|
+
*
|
|
366
|
+
* @defaultValue false
|
|
367
|
+
*/
|
|
368
|
+
shown?: boolean;
|
|
369
|
+
/**
|
|
370
|
+
* The alternative text of a note's box.
|
|
371
|
+
*/
|
|
372
|
+
description?: string;
|
|
354
373
|
/**
|
|
355
374
|
* {@inheritDoc IComment.BoxJSON}
|
|
356
375
|
*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Bounds, ReferenceableClipboard } from '@sheetxl/utils';
|
|
2
|
+
import { IHistory } from '../history';
|
|
3
|
+
import { IMovable } from '../movable';
|
|
4
|
+
import { Movable } from '../movable/Movable';
|
|
5
|
+
/**
|
|
6
|
+
* The box a note is shown in: a movable whose content is the note.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Two things set it apart from a picture's movable. It is not copied by itself, because a note
|
|
10
|
+
* travels with its cell. And when a shift removes every cell under it, it goes back beside its
|
|
11
|
+
* note instead of taking the note with it.
|
|
12
|
+
*/
|
|
13
|
+
export declare class NoteMovable extends Movable {
|
|
14
|
+
/**
|
|
15
|
+
* Beside its note, where a new note's box goes.
|
|
16
|
+
*/
|
|
17
|
+
protected _processContainerRemoved(): IMovable.AnchorOffset | null;
|
|
18
|
+
/**
|
|
19
|
+
* A box is not copied by itself: a note travels with its cell.
|
|
20
|
+
*
|
|
21
|
+
* {@inheritDoc IHistory.ISnapshotSource.getSnapshot}
|
|
22
|
+
*/
|
|
23
|
+
getSnapshot(_bounds?: Bounds | ReferenceableClipboard.CopyOptions, _options?: ReferenceableClipboard.CopyOptions): IHistory.ISnapshot<IMovable.SnapshotDestination, IMovable, Bounds>;
|
|
24
|
+
get [Symbol.toStringTag](): string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=NoteMovable.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IPerson } from '../person';
|
|
2
|
+
import { IMovable } from '../movable';
|
|
2
3
|
import { IComment } from './IComment';
|
|
3
4
|
/**
|
|
4
5
|
* Resolve an {@link IComment.Update} to modifiers: a string is the content, `null` is a remove
|
|
@@ -12,11 +13,32 @@ export declare function resolveCommentUpdate(update: IComment.Update | undefined
|
|
|
12
13
|
*/
|
|
13
14
|
export declare function contentToText(content: IComment.Content | null | undefined): string;
|
|
14
15
|
/**
|
|
15
|
-
* Content as it is stored: a string when there are no runs or none
|
|
16
|
+
* Content as it is stored: a string when there are no runs or none sets a font property, otherwise
|
|
16
17
|
* the runs, copied.
|
|
18
|
+
*
|
|
19
|
+
* A run's font also takes the `bold`, `italic` and boolean `underline` spellings a font update
|
|
20
|
+
* takes. A run in the shape notes were first saved in — `bold`, `italic`, `size`, `color` and a
|
|
21
|
+
* `font` name beside the text — is read into this one.
|
|
17
22
|
* @internal
|
|
18
23
|
*/
|
|
19
24
|
export declare function normalizeContent(content: IComment.Content | null | undefined): IComment.Content;
|
|
25
|
+
/**
|
|
26
|
+
* A copy of stored content, runs and fonts included.
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare function copyContent(content: IComment.Content): IComment.Content;
|
|
30
|
+
/**
|
|
31
|
+
* Reads the anchor out of a box saved as its whole shape, which is how a note's box was kept
|
|
32
|
+
* before it was read into an anchor.
|
|
33
|
+
*
|
|
34
|
+
* @returns The anchor, its cells counted from the note's, and whether the box was shown; `null`
|
|
35
|
+
* for markup that names no cell or anchor.
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export declare function readLegacyBox(xml: string): {
|
|
39
|
+
anchor: IMovable.AnchorOffset;
|
|
40
|
+
shown: boolean;
|
|
41
|
+
} | null;
|
|
20
42
|
/**
|
|
21
43
|
* Resolves the author option to a person id.
|
|
22
44
|
* @internal
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { IRange } from '@sheetxl/primitives';
|
|
2
|
+
import { Bounds } from '@sheetxl/utils';
|
|
3
|
+
import { IMovable } from '../movable';
|
|
4
|
+
import { Movable } from '../movable/Movable';
|
|
5
|
+
/**
|
|
6
|
+
* Where a note's box goes when nothing has moved it, and how a note stores where its box is.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* The default is Excel's, probed with hidden COM on a 96-DPI machine (2026-09-30): a 144×79 px
|
|
10
|
+
* box hung 15 px right of its cell and 10 px above its top, flipped to the other side when it
|
|
11
|
+
* would pass the sheet's last column or row. It is pixel geometry first and the cells those
|
|
12
|
+
* pixels fall on second, so tall, narrow and hidden rows and columns need no rule of their own.
|
|
13
|
+
*
|
|
14
|
+
* A note stores its box's anchor with the cells counted from the note's own, so a note copied
|
|
15
|
+
* to another cell keeps its box beside it. The box itself is an ordinary movable anchored to the
|
|
16
|
+
* sheet's cells; these functions convert between the two.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
/** The width of a default box, in pixels. */
|
|
20
|
+
export declare const NOTE_DEFAULT_WIDTH = 144;
|
|
21
|
+
/** The height of a default box, in pixels. */
|
|
22
|
+
export declare const NOTE_DEFAULT_HEIGHT = 79;
|
|
23
|
+
/**
|
|
24
|
+
* The cell geometry placing a box needs: the same three a movable is built with.
|
|
25
|
+
*/
|
|
26
|
+
export type NoteLayout = Required<Pick<Movable.ConstructorOptions, 'getBoundsAtCoords' | 'getCoordsAtBounds' | 'getMaxBounds'>>;
|
|
27
|
+
/**
|
|
28
|
+
* The bounds of a note's box when nothing has moved or resized it.
|
|
29
|
+
*/
|
|
30
|
+
export declare function defaultNoteBounds(cell: IRange.CellCoords, layout: NoteLayout): Bounds;
|
|
31
|
+
/**
|
|
32
|
+
* The cells and offsets a box's corners fall on, as a movable is loaded from.
|
|
33
|
+
*/
|
|
34
|
+
export declare function boundsToAnchor(bounds: Bounds, layout: NoteLayout): IMovable.AnchorOffset;
|
|
35
|
+
/**
|
|
36
|
+
* An anchor with its cells restated relative to the note's cell, which is how a note stores it.
|
|
37
|
+
*/
|
|
38
|
+
export declare function toRelativeAnchor(anchor: IMovable.AnchorOffset, cell: IRange.CellCoords): IMovable.AnchorOffset;
|
|
39
|
+
/**
|
|
40
|
+
* A stored anchor with its cells restated as the sheet's, held to the sheet.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* A corner whose cell would be off the sheet is held to the sheet's edge; its offset is kept.
|
|
44
|
+
*/
|
|
45
|
+
export declare function toAbsoluteAnchor(anchor: IMovable.AnchorOffset, cell: IRange.CellCoords, entire: IRange.Coords): IMovable.AnchorOffset;
|
|
46
|
+
/**
|
|
47
|
+
* Whether two boxes are drawn in the same place, to the pixel Excel rounds to.
|
|
48
|
+
*/
|
|
49
|
+
export declare function isEqualBounds(a: Bounds, b: Bounds): boolean;
|
|
50
|
+
//# sourceMappingURL=_NoteBox.d.ts.map
|
|
@@ -63,11 +63,36 @@ export declare abstract class AbstractOperator<P> implements ICondition.IOperato
|
|
|
63
63
|
* measured 2026-08-21), which is the watch's `arrayFirstCell` evaluation.
|
|
64
64
|
*/
|
|
65
65
|
protected _resolveOperand(param: Scalar | ICalculation.IFormula | undefined, ctx: ICondition.IContext): Promise<OperandReader | null>;
|
|
66
|
+
/**
|
|
67
|
+
* Whether a comparison operand has not been given: absent, or blank text.
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* A comparison missing an operand is inert, never a comparison against 0. Excel reads a rule
|
|
71
|
+
* whose `<formula>` is absent or empty that way — a validation flags nothing, a format paints
|
|
72
|
+
* nothing (measured, `probe-dv-operands` and `probe-cf-operands`) — and its dialogs refuse to
|
|
73
|
+
* author one.
|
|
74
|
+
*/
|
|
75
|
+
protected _isMissingOperand(param: Scalar | ICalculation.IFormula | undefined): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* The first problem with a comparison operand under `lhsSelector`, as a message key, or `null`.
|
|
78
|
+
*
|
|
79
|
+
* @param allowEmptyText Whether `''` is an operand (equal to empty text) rather than one not given.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* The rules Excel's dialogs refuse on (measured, `probe-dv-operands`): an operand is required; a
|
|
83
|
+
* whole-number rule takes an integer, a text-length rule a non-negative integer, a date a serial
|
|
84
|
+
* from 0, a time a serial in [0, 1); text where a number belongs is refused; a formula must parse.
|
|
85
|
+
* With no selector (a format's Cell Value rule) any scalar is an operand — Excel accepts text there.
|
|
86
|
+
*/
|
|
87
|
+
protected _validateOperand(param: Scalar | ICalculation.IFormula | undefined, lhsSelector: ICondition.ISelector | null | undefined, allowEmptyText?: boolean): string | null;
|
|
66
88
|
/**
|
|
67
89
|
* The shared predicate shape of the ordered comparisons (`greaterThan` … `before`): resolve the
|
|
68
90
|
* operand (formula or literal — see {@link _resolveOperand}), then compare per cell. An ERROR
|
|
69
|
-
* operand never matches; a `null` return means the operand
|
|
70
|
-
* is inert.
|
|
91
|
+
* operand never matches; a `null` return means the operand is missing
|
|
92
|
+
* ({@link _isMissingOperand}) or could not resolve, and the condition is inert.
|
|
93
|
+
*
|
|
94
|
+
* An empty cell arrives as `null` and compares as 0, which is how Excel judges one (measured,
|
|
95
|
+
* `probe-dv-blank`).
|
|
71
96
|
*/
|
|
72
97
|
protected _createComparePredicate(param: Scalar | ICalculation.IFormula | undefined, ctx: ICondition.IContext, compare: (value: number, operand: number) => boolean): Promise<ICondition.Predicate | null>;
|
|
73
98
|
/** {@inheritDoc ICondition.IOperator.toString} */
|
|
@@ -4,5 +4,7 @@ export declare class AfterEqualToOperator extends AbstractOperator<number | stri
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: number | string, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: number | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=AfterEqualToOperator.d.ts.map
|
|
@@ -4,5 +4,7 @@ export declare class AfterOperator extends AbstractOperator<number | string> imp
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: number | string, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: number | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=AfterOperator.d.ts.map
|
|
@@ -5,7 +5,9 @@ export declare class AndOperator extends AbstractOperator<readonly ICondition.In
|
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.isCombinator} */
|
|
6
6
|
isCombinator(): boolean;
|
|
7
7
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
8
|
-
createPredicate(param: readonly ICondition.Input[], ctx: ICondition.IContext): Promise<ICondition.Predicate>;
|
|
8
|
+
createPredicate(param: readonly ICondition.Input[], ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
9
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
10
|
+
validateParam(param: readonly ICondition.Input[], lhsSelector?: ICondition.ISelector | null): string | null;
|
|
9
11
|
/** {@inheritDoc ICondition.IOperator.toString} */
|
|
10
12
|
toString(param?: readonly ICondition.Input[], lhsSelector?: ICondition.ISelector): string | undefined;
|
|
11
13
|
}
|
|
@@ -4,6 +4,8 @@ export declare class AverageOperator extends AbstractOperator<ICondition.Average
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: ICondition.AverageOption, ctx: ICondition.IContext): Promise<ICondition.Predicate>;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: ICondition.AverageOption, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
9
|
/** {@inheritDoc ICondition.IOperator.createDefaultParam} */
|
|
8
10
|
createDefaultParam(lhsSelector?: ICondition.ISelector): ICondition.AverageOption;
|
|
9
11
|
/** {@inheritDoc ICondition.IOperator.toString} */
|
|
@@ -4,5 +4,7 @@ export declare class BeforeEqualToOperator extends AbstractOperator<number | str
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: number | string, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: number | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=BeforeEqualToOperator.d.ts.map
|
|
@@ -4,5 +4,7 @@ export declare class BeforeOperator extends AbstractOperator<number | string> im
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: number | string, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: number | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=BeforeOperator.d.ts.map
|
|
@@ -6,6 +6,8 @@ export declare class BetweenOperator extends AbstractOperator<ICondition.Between
|
|
|
6
6
|
createPredicate(param: ICondition.BetweenOption, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
7
7
|
/** {@inheritDoc ICondition.IOperator.createDefaultParam} */
|
|
8
8
|
createDefaultParam(lhsSelector?: ICondition.ISelector): ICondition.BetweenOption;
|
|
9
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
10
|
+
validateParam(param: ICondition.BetweenOption, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
9
11
|
/** {@inheritDoc ICondition.IOperator.toString} */
|
|
10
12
|
toString(param?: ICondition.BetweenOption, lhsSelector?: ICondition.ISelector): string | undefined;
|
|
11
13
|
}
|
|
@@ -4,5 +4,7 @@ export declare class ContainsOperator extends AbstractOperator<string> implement
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: string, ctx: ICondition.IContext): ICondition.Predicate;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=ContainsOperator.d.ts.map
|
|
@@ -4,5 +4,7 @@ export declare class EndsWithOperator extends AbstractOperator<string> implement
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: string, ctx: ICondition.IContext): ICondition.Predicate;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=EndsWithOperator.d.ts.map
|
|
@@ -6,6 +6,8 @@ export declare class EqualToOperator extends AbstractOperator<Scalar> implements
|
|
|
6
6
|
constructor();
|
|
7
7
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
8
8
|
createPredicate(param: Scalar | ICalculation.IFormula, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
9
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
10
|
+
validateParam(param: Scalar | ICalculation.IFormula, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
9
11
|
/** {@inheritDoc ICondition.IOperator.createDefaultParam} */
|
|
10
12
|
createDefaultParam(lhsSelector?: ICondition.ISelector): Scalar | undefined;
|
|
11
13
|
}
|
|
@@ -6,6 +6,8 @@ import { AbstractOperator } from './AbstractOperator';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class ExpressionOperator extends AbstractOperator<ICalculation.IFormula | string> implements ICondition.IOperator<ICalculation.IFormula | string> {
|
|
8
8
|
constructor();
|
|
9
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
10
|
+
validateParam(param: ICalculation.IFormula | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
9
11
|
/** {@inheritDoc ICondition.IOperator.createDefaultParam} */
|
|
10
12
|
createDefaultParam(lhsSelector?: ICondition.ISelector): string;
|
|
11
13
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
@@ -4,5 +4,7 @@ export declare class GreaterThanEqualToOperator extends AbstractOperator<number
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: number | string, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: number | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=GreaterThanEqualToOperator.d.ts.map
|
|
@@ -4,5 +4,7 @@ export declare class GreaterThanOperator extends AbstractOperator<number | strin
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: number | string, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: number | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=GreaterThanOperator.d.ts.map
|
|
@@ -6,6 +6,8 @@ export declare class InSetOperator extends AbstractOperator<ICondition.InSetOpti
|
|
|
6
6
|
acceptsList(): boolean;
|
|
7
7
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
8
8
|
createPredicate(param: ICondition.InSetOption, ctx: ICondition.IContext): ICondition.Predicate | Promise<ICondition.Predicate | null>;
|
|
9
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
10
|
+
validateParam(param: ICondition.InSetOption, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
9
11
|
/** {@inheritDoc ICondition.IOperator.createDefaultParam} */
|
|
10
12
|
createDefaultParam(lhsSelector?: ICondition.ISelector): ICondition.InSetOption;
|
|
11
13
|
/** {@inheritDoc ICondition.IOperator.toString} */
|
|
@@ -4,5 +4,7 @@ export declare class LessThanEqualToOperator extends AbstractOperator<number | s
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: number | string, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: number | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=LessThanEqualToOperator.d.ts.map
|
|
@@ -4,5 +4,7 @@ export declare class LessThanOperator extends AbstractOperator<number | string>
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: number | string, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: number | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=LessThanOperator.d.ts.map
|
|
@@ -6,6 +6,8 @@ export declare class NotOperator extends AbstractOperator<ICondition.Input> impl
|
|
|
6
6
|
isCombinator(): boolean;
|
|
7
7
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
8
8
|
createPredicate(param: ICondition.Input, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
9
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
10
|
+
validateParam(param: ICondition.Input, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
9
11
|
/** {@inheritDoc ICondition.IOperator.toString} */
|
|
10
12
|
toString(param?: ICondition.Input, lhsSelector?: ICondition.ISelector): string | undefined;
|
|
11
13
|
}
|
|
@@ -5,7 +5,9 @@ export declare class OrOperator extends AbstractOperator<readonly ICondition.Inp
|
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.isCombinator} */
|
|
6
6
|
isCombinator(): boolean;
|
|
7
7
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
8
|
-
createPredicate(param: readonly ICondition.Input[], ctx: ICondition.IContext): Promise<ICondition.Predicate>;
|
|
8
|
+
createPredicate(param: readonly ICondition.Input[], ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
9
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
10
|
+
validateParam(param: readonly ICondition.Input[], lhsSelector?: ICondition.ISelector | null): string | null;
|
|
9
11
|
/** {@inheritDoc ICondition.IOperator.toString} */
|
|
10
12
|
toString(param?: readonly ICondition.Input[], lhsSelector?: ICondition.ISelector): string | undefined;
|
|
11
13
|
}
|
|
@@ -4,5 +4,7 @@ export declare class StartsWithOperator extends AbstractOperator<string> impleme
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: string, ctx: ICondition.IContext): ICondition.Predicate;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=StartsWithOperator.d.ts.map
|
|
@@ -3,6 +3,8 @@ import { AbstractOperator } from './AbstractOperator';
|
|
|
3
3
|
export declare class TimePeriodOperator extends AbstractOperator<ICondition.TimePeriodOption> {
|
|
4
4
|
constructor();
|
|
5
5
|
createPredicate(param: ICondition.TimePeriodOption, ctx: ICondition.IContext): Promise<ICondition.Predicate>;
|
|
6
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
7
|
+
validateParam(param: ICondition.TimePeriodOption, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
6
8
|
/** {@inheritDoc ICondition.IOperator.createDefaultParam} */
|
|
7
9
|
createDefaultParam(lhsSelector?: ICondition.ISelector): ICondition.TimePeriodOption;
|
|
8
10
|
/** {@inheritDoc ICondition.IOperator.toString} */
|
|
@@ -4,6 +4,12 @@ export declare class TopNOperator extends AbstractOperator<ICondition.TopNOption
|
|
|
4
4
|
constructor();
|
|
5
5
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
6
|
createPredicate(param: ICondition.TopNOption, ctx: ICondition.IContext): ICondition.Predicate;
|
|
7
|
+
/**
|
|
8
|
+
* {@inheritDoc ICondition.IOperator.validateParam}
|
|
9
|
+
*
|
|
10
|
+
* Excel's Top 10 dialog takes 1 to 1000 items, or 1 to 100 percent.
|
|
11
|
+
*/
|
|
12
|
+
validateParam(param: ICondition.TopNOption, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
7
13
|
/** {@inheritDoc ICondition.IOperator.createDefaultParam} */
|
|
8
14
|
createDefaultParam(lhsSelector?: ICondition.ISelector): ICondition.TopNOption;
|
|
9
15
|
/** {@inheritDoc ICondition.IOperator.toString} */
|
|
@@ -15,6 +15,8 @@ export declare class Condition<P = any> implements ICondition<P> {
|
|
|
15
15
|
getParam(): P;
|
|
16
16
|
/** {@inheritDoc ICondition.isIncludeBlanks} */
|
|
17
17
|
isIncludeBlanks(): boolean;
|
|
18
|
+
/** {@inheritDoc ICondition.validate} */
|
|
19
|
+
validate(): string | null;
|
|
18
20
|
/** {@inheritDoc ICondition.toString} */
|
|
19
21
|
toString(): string;
|
|
20
22
|
/** {@inheritDoc ICondition.toJSON} */
|