@sheetxl/sdk 0.8.0-beta.4 → 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/{B5eE9jdzHkM8tFuQ.cjs → CMrcyRRWS0gjwpr2.cjs} +1 -1
- package/browser/cjs/{BNeaA3zuOokpev3O.cjs → DFKGFVvoELb8_p_B.cjs} +1 -1
- package/browser/cjs/{CJK0UKBYYLMe5y7n.cjs → KMBs7XyoINajcR-L.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{CcB0KWKqtNYkSb4T.mjs → 7_M82_Otn5kHQ0qd.mjs} +2 -2
- package/browser/esm/{CrLATXO_z7wtfQdU.mjs → CEk-nufZXNFx5jDl.mjs} +9498 -8365
- package/browser/esm/{Cbmh2jP9H2-gYBQM.mjs → CfoNUsKHL7SzfO8c.mjs} +2 -2
- package/browser/esm/{CLNdkRPXU9Vs9_D0.mjs → DBjWjEUK9qrHG5VD.mjs} +1 -1
- package/browser/esm/{Bo_UXn6gOo4WtFaK.mjs → DRsp6JAObqXYGvhz.mjs} +2 -2
- package/browser/esm/{CCiusSzUCYBTSrjh.mjs → J1egfq2ajlXPw3Ki.mjs} +2 -2
- package/browser/esm/{RKmI4uT6cEURNbC6.mjs → iLZfKwfSx5bQgCOp.mjs} +2 -2
- package/browser/esm/index.mjs +8 -8
- package/node/esm/{BUD7-kF0NUZGvJ71.mjs → BMtLBfP7JzIsG9_G.mjs} +1 -1
- package/node/esm/{B5aWdYZUUJ3I1yku.mjs → CynxiHhVY9UGe_h6.mjs} +1 -1
- package/node/esm/{DnPPf2PdWs2Hcaau.mjs → DYRjFZ75QYgmgEWF.mjs} +1 -1
- package/node/esm/{CXZXQq46kIHcA26q.mjs → DpyQm1VnGyCmRRKJ.mjs} +1 -1
- package/node/esm/index.mjs +12695 -11554
- 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/license/license-key.d.ts +2 -2
- 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/Bjifbb6rRolOGtDI.cjs +0 -1
- package/browser/cjs/BuqhBOLW4GUYwVXx.cjs +0 -93
package/types/scripting.d.ts
CHANGED
|
@@ -4818,10 +4818,13 @@ declare global {
|
|
|
4818
4818
|
/**
|
|
4819
4819
|
* Creates a temporary copy of the cell with the specified updates applied.
|
|
4820
4820
|
*
|
|
4821
|
+
* @param modifiers The update.
|
|
4822
|
+
* @param options How the update is read. See {@link ICell.CreateCellOptions}.
|
|
4823
|
+
*
|
|
4821
4824
|
* @remarks
|
|
4822
4825
|
* The original cell remains unchanged, making this useful for temporary modifications.
|
|
4823
4826
|
*/
|
|
4824
|
-
createCell(modifiers: ICell.Update): ICell;
|
|
4827
|
+
createCell(modifiers: ICell.Update, options?: ICell.CreateCellOptions): ICell;
|
|
4825
4828
|
/**
|
|
4826
4829
|
* Returns the `CellCoords`.
|
|
4827
4830
|
*/
|
|
@@ -4968,6 +4971,23 @@ declare global {
|
|
|
4968
4971
|
*/
|
|
4969
4972
|
comments?: IComment.Update;
|
|
4970
4973
|
}
|
|
4974
|
+
/**
|
|
4975
|
+
* Options for {@link ICell.createCell} and {@link ISheet.createCell}.
|
|
4976
|
+
*/
|
|
4977
|
+
interface CreateCellOptions {
|
|
4978
|
+
/**
|
|
4979
|
+
* Whether a text value is read as a typed entry is — `9/23/95` a date, `12.3%` a number —
|
|
4980
|
+
* rather than taken as the text it is. `true` reads it with the defaults; an
|
|
4981
|
+
* {@link ICell.ModifiersFromStringOptions} customizes the reading.
|
|
4982
|
+
*
|
|
4983
|
+
* @defaultValue false
|
|
4984
|
+
*
|
|
4985
|
+
* @remarks
|
|
4986
|
+
* The same reading {@link ICellRange.setValues} gives text, where it is the default. Here it
|
|
4987
|
+
* is opt-in: a cell created from a value keeps that value.
|
|
4988
|
+
*/
|
|
4989
|
+
textParser?: boolean | ICell.ModifiersFromStringOptions;
|
|
4990
|
+
}
|
|
4971
4991
|
/**
|
|
4972
4992
|
* Configuration options for customizing the parsing of a string into an `ICell.Update` object.
|
|
4973
4993
|
* Commonly used for processing CSV imports and other string-based data sources.
|
|
@@ -9294,11 +9314,11 @@ declare global {
|
|
|
9294
9314
|
* Interface for working with a chart.
|
|
9295
9315
|
*
|
|
9296
9316
|
* @remarks
|
|
9297
|
-
* A chart is the content of a movable, which places
|
|
9317
|
+
* A chart is the content of a movable, which places it — see {@link IChart.getMovable}.
|
|
9298
9318
|
* Until the chart is modeled it is carried as the markup it was read from and written back
|
|
9299
9319
|
* unchanged; {@link IChart.getXML} is the read-only view of that markup.
|
|
9300
9320
|
*/
|
|
9301
|
-
export interface IChart extends IModel {
|
|
9321
|
+
export interface IChart extends IModel, IMovable.IContent {
|
|
9302
9322
|
/**
|
|
9303
9323
|
* Returns the chart's title, or `null` if it has none.
|
|
9304
9324
|
*
|
|
@@ -9340,17 +9360,17 @@ declare global {
|
|
|
9340
9360
|
*/
|
|
9341
9361
|
getPivotSource(): string | null;
|
|
9342
9362
|
/**
|
|
9343
|
-
* Returns
|
|
9344
|
-
*/
|
|
9345
|
-
getDescription(): string;
|
|
9346
|
-
/**
|
|
9347
|
-
* Returns the movable that places the chart on the sheet.
|
|
9363
|
+
* Returns the movable that places the chart on the sheet, or `null` if it is not placed by one.
|
|
9348
9364
|
*
|
|
9349
9365
|
* @remarks
|
|
9350
|
-
* The movable holds the chart's position
|
|
9351
|
-
*
|
|
9366
|
+
* The movable holds the chart's position and size; the chart keeps no copy of either.
|
|
9367
|
+
* Deleting the chart removes its movable.
|
|
9352
9368
|
*/
|
|
9353
|
-
getMovable(): IMovable;
|
|
9369
|
+
getMovable(): IMovable | null;
|
|
9370
|
+
/**
|
|
9371
|
+
* Deletes the chart, and with it the movable that places it.
|
|
9372
|
+
*/
|
|
9373
|
+
delete(options?: ITransaction.OperationOptions): void;
|
|
9354
9374
|
/**
|
|
9355
9375
|
* Returns the chart's own markup, or `null` if none was captured.
|
|
9356
9376
|
*
|
|
@@ -9485,8 +9505,8 @@ declare global {
|
|
|
9485
9505
|
*
|
|
9486
9506
|
* @remarks
|
|
9487
9507
|
* A view over the sheet's movables: a chart is the content of a movable, and the movable is what
|
|
9488
|
-
* places
|
|
9489
|
-
*
|
|
9508
|
+
* places it — see {@link IChart.getMovable}. Read-only for now; a chart is added by adding a
|
|
9509
|
+
* movable with chart content.
|
|
9490
9510
|
*/
|
|
9491
9511
|
export interface IChartCollection extends ICollection<IChart> {
|
|
9492
9512
|
/**
|
|
@@ -9494,7 +9514,7 @@ declare global {
|
|
|
9494
9514
|
*/
|
|
9495
9515
|
getItems(options?: ICollection.GetItemsOptions): IChart[];
|
|
9496
9516
|
/**
|
|
9497
|
-
* Returns the chart
|
|
9517
|
+
* Returns the chart with the given name, or `null` if there is none.
|
|
9498
9518
|
*
|
|
9499
9519
|
* @param name The name of the chart. This is case insensitive.
|
|
9500
9520
|
*/
|
|
@@ -10850,12 +10870,47 @@ declare global {
|
|
|
10850
10870
|
*
|
|
10851
10871
|
* Anchored to its cell, so it follows a row or column insert or delete and is deleted when its
|
|
10852
10872
|
* cell is.
|
|
10873
|
+
*
|
|
10874
|
+
* A note is also the content of a {@link getMovable | movable}: the box it is shown in.
|
|
10853
10875
|
*/
|
|
10854
|
-
export interface IComment extends IAnchored {
|
|
10876
|
+
export interface IComment extends IAnchored, IMovable.IContent {
|
|
10855
10877
|
/**
|
|
10856
10878
|
* The comment's identifier, unique within the workbook.
|
|
10857
10879
|
*/
|
|
10858
10880
|
getId(): string;
|
|
10881
|
+
/**
|
|
10882
|
+
* `'note'` for a note, `'comment'` for a threaded comment.
|
|
10883
|
+
*/
|
|
10884
|
+
getType(): string;
|
|
10885
|
+
/**
|
|
10886
|
+
* The box a note is shown in, or `null` for a threaded comment, which has none.
|
|
10887
|
+
*
|
|
10888
|
+
* @remarks
|
|
10889
|
+
* The box is an ordinary movable: it is selected, moved and resized like a picture's, and is
|
|
10890
|
+
* among the sheet's `getMovables()`. Its content is this comment.
|
|
10891
|
+
*
|
|
10892
|
+
* * **Placement.** A box that has not been moved sits where Excel puts a new note, beside its
|
|
10893
|
+
* cell, and stores nothing. Moving or resizing it stores where it is, relative to its cell,
|
|
10894
|
+
* so a note copied to another cell keeps its box beside it.
|
|
10895
|
+
* * **Shown or on hover.** `isHidden()` is `true` for a box that appears only while its cell is
|
|
10896
|
+
* pointed at, which is how a note starts and which a view decides. `setHidden(false)` keeps
|
|
10897
|
+
* it on the sheet.
|
|
10898
|
+
*
|
|
10899
|
+
* A reply converts a note to a threaded comment, and its box goes with it.
|
|
10900
|
+
*
|
|
10901
|
+
* @example
|
|
10902
|
+
* ```ts
|
|
10903
|
+
* const note = sheet.getComments().add('B2', 'Check this', { asNote: true });
|
|
10904
|
+
* const box = note.getMovable();
|
|
10905
|
+
* box.setHidden(false); // always shown
|
|
10906
|
+
* box.setBounds({ width: 240 });
|
|
10907
|
+
* ```
|
|
10908
|
+
*/
|
|
10909
|
+
getMovable(): IMovable | null;
|
|
10910
|
+
/**
|
|
10911
|
+
* Deletes the comment: its replies with it, or a note's box.
|
|
10912
|
+
*/
|
|
10913
|
+
delete(options?: ITransaction.OperationOptions): void;
|
|
10859
10914
|
/**
|
|
10860
10915
|
* The sheet the comment is on.
|
|
10861
10916
|
*/
|
|
@@ -10878,12 +10933,15 @@ declare global {
|
|
|
10878
10933
|
* Replaces the content.
|
|
10879
10934
|
*
|
|
10880
10935
|
* @param content Plain text, or formatting runs for a note.
|
|
10936
|
+
*
|
|
10937
|
+
* @remarks
|
|
10938
|
+
* Drops the comment's mentions: each names a span of the text it was made in.
|
|
10881
10939
|
*/
|
|
10882
10940
|
setContent(content: IComment.Content, options?: ITransaction.OperationOptions): this;
|
|
10883
10941
|
/**
|
|
10884
10942
|
* The content with its formatting runs, or `null` when it is plain text.
|
|
10885
10943
|
*/
|
|
10886
|
-
getRichContent():
|
|
10944
|
+
getRichContent(): IRichText.JSON | null;
|
|
10887
10945
|
/**
|
|
10888
10946
|
* The person who wrote the comment, or `null` if the workbook does not know them.
|
|
10889
10947
|
*/
|
|
@@ -10986,7 +11044,7 @@ declare global {
|
|
|
10986
11044
|
*/
|
|
10987
11045
|
getContent(): string;
|
|
10988
11046
|
/**
|
|
10989
|
-
* Replaces the content.
|
|
11047
|
+
* Replaces the content, dropping the reply's mentions.
|
|
10990
11048
|
*/
|
|
10991
11049
|
setContent(content: IComment.Content, options?: ITransaction.OperationOptions): this;
|
|
10992
11050
|
/**
|
|
@@ -11019,42 +11077,12 @@ declare global {
|
|
|
11019
11077
|
readonly isICommentReply: true;
|
|
11020
11078
|
}
|
|
11021
11079
|
/**
|
|
11022
|
-
*
|
|
11080
|
+
* What a comment says: plain text, or formatting runs for a note.
|
|
11023
11081
|
*
|
|
11024
11082
|
* @remarks
|
|
11025
|
-
* A note keeps Excel's rich text; a threaded comment is plain text and never carries
|
|
11026
|
-
* Every property but `text` is optional and inherits the note's default when absent.
|
|
11083
|
+
* A note keeps Excel's rich text; a threaded comment is plain text and never carries runs.
|
|
11027
11084
|
*/
|
|
11028
|
-
|
|
11029
|
-
/**
|
|
11030
|
-
* The text of the span.
|
|
11031
|
-
*/
|
|
11032
|
-
text: string;
|
|
11033
|
-
/**
|
|
11034
|
-
* The font name.
|
|
11035
|
-
*/
|
|
11036
|
-
font?: string;
|
|
11037
|
-
/**
|
|
11038
|
-
* The font size in points.
|
|
11039
|
-
*/
|
|
11040
|
-
size?: number;
|
|
11041
|
-
bold?: boolean;
|
|
11042
|
-
italic?: boolean;
|
|
11043
|
-
/**
|
|
11044
|
-
* The color as a hex string.
|
|
11045
|
-
*/
|
|
11046
|
-
color?: string;
|
|
11047
|
-
}
|
|
11048
|
-
/**
|
|
11049
|
-
* Content with formatting: a list of {@link Run | runs}.
|
|
11050
|
-
*/
|
|
11051
|
-
interface RichContent {
|
|
11052
|
-
runs: Run[];
|
|
11053
|
-
}
|
|
11054
|
-
/**
|
|
11055
|
-
* What a comment says: plain text, or formatting runs for a note.
|
|
11056
|
-
*/
|
|
11057
|
-
type Content = string | RichContent;
|
|
11085
|
+
type Content = string | IRichText.JSON;
|
|
11058
11086
|
/**
|
|
11059
11087
|
* The values that can be set on a comment.
|
|
11060
11088
|
*/
|
|
@@ -11153,23 +11181,22 @@ declare global {
|
|
|
11153
11181
|
interface ReplyJSON extends EntryJSON {
|
|
11154
11182
|
}
|
|
11155
11183
|
/**
|
|
11156
|
-
*
|
|
11157
|
-
*
|
|
11158
|
-
* @remarks
|
|
11159
|
-
* Only ever present on a comment read from a file. A comment authored here has none, and is
|
|
11160
|
-
* written with Excel's default box (hidden until hovered, hung to the right of its cell); a
|
|
11161
|
-
* comment that has one is written with that box, its cell rewritten from the comment's so it
|
|
11162
|
-
* stays with the note, its size, fill and offsets replayed as they were.
|
|
11163
|
-
*
|
|
11164
|
-
* Opaque markup, as a half-house — the VML `<v:shape>`, not a {@link IShape.JSON}, whose own
|
|
11165
|
-
* `xml` is DrawingML. What it holds is a movable's worth: the cells and offsets of its corners
|
|
11166
|
-
* (an {@link IMovable.AnchorOffset}), whether it is hidden, and a shape's fill and size. That
|
|
11167
|
-
* is where it graduates to — an anchor, a `hidden` flag and an {@link IShape.JSON} — once the
|
|
11168
|
-
* VML can be read into them; the offsets are the authoring machine's pixels, which is what
|
|
11169
|
-
* keeps them opaque today.
|
|
11184
|
+
* A note's box, where it differs from the default.
|
|
11170
11185
|
*/
|
|
11171
11186
|
interface BoxJSON {
|
|
11172
|
-
|
|
11187
|
+
/**
|
|
11188
|
+
* Where the box is: the cells and pixel offsets of its top-left and bottom-right corners,
|
|
11189
|
+
* the cells counted from the note's own (`r: -1` is the row above it).
|
|
11190
|
+
*
|
|
11191
|
+
* @remarks
|
|
11192
|
+
* Absent for a box that has not been moved or resized, which is placed beside its cell.
|
|
11193
|
+
*/
|
|
11194
|
+
anchor?: IMovable.AnchorOffset;
|
|
11195
|
+
/**
|
|
11196
|
+
* How the box is drawn when that is not Excel's default, held as it was read: the VML
|
|
11197
|
+
* `<v:shape>` without its id, its position or its cell.
|
|
11198
|
+
*/
|
|
11199
|
+
xml?: string;
|
|
11173
11200
|
}
|
|
11174
11201
|
/**
|
|
11175
11202
|
* A comment, for persisting.
|
|
@@ -11187,6 +11214,16 @@ declare global {
|
|
|
11187
11214
|
* The replies, oldest first.
|
|
11188
11215
|
*/
|
|
11189
11216
|
replies?: ReplyJSON[];
|
|
11217
|
+
/**
|
|
11218
|
+
* Whether a note's box stays on the sheet rather than appearing on hover.
|
|
11219
|
+
*
|
|
11220
|
+
* @defaultValue false
|
|
11221
|
+
*/
|
|
11222
|
+
shown?: boolean;
|
|
11223
|
+
/**
|
|
11224
|
+
* The alternative text of a note's box.
|
|
11225
|
+
*/
|
|
11226
|
+
description?: string;
|
|
11190
11227
|
/**
|
|
11191
11228
|
* {@inheritDoc IComment.BoxJSON}
|
|
11192
11229
|
*/
|
|
@@ -11356,6 +11393,18 @@ declare global {
|
|
|
11356
11393
|
* - Hide for ConditionalFormat/TableFilter (default behavior is usually correct)
|
|
11357
11394
|
*/
|
|
11358
11395
|
isIncludeBlanks(): boolean;
|
|
11396
|
+
/**
|
|
11397
|
+
* Whether the condition can be authored as it is.
|
|
11398
|
+
*
|
|
11399
|
+
* @returns A message key naming the first problem — an operand not yet given, bounds the wrong
|
|
11400
|
+
* way around, a whole-number rule holding a fraction — or `null` when there is none.
|
|
11401
|
+
*
|
|
11402
|
+
* @remarks
|
|
11403
|
+
* Advisory, and what an editor asks before it saves: the rules are the ones Excel's dialogs
|
|
11404
|
+
* refuse on. A condition read from a file is kept and evaluated whatever this answers; a
|
|
11405
|
+
* comparison missing an operand evaluates as inert rather than as wrong.
|
|
11406
|
+
*/
|
|
11407
|
+
validate(): string | null;
|
|
11359
11408
|
/**
|
|
11360
11409
|
* Returns a string representation of the selector, operator, and param.
|
|
11361
11410
|
*/
|
|
@@ -11607,16 +11656,22 @@ declare global {
|
|
|
11607
11656
|
* @remarks
|
|
11608
11657
|
* A formula is authored as a `=`-prefixed string or an {@link ICalculation.IFormula}; a resolved
|
|
11609
11658
|
* condition holds it as an `IFormula`.
|
|
11659
|
+
*
|
|
11660
|
+
* `null` while not yet given. The comparison matches nothing, and excludes nothing, until both
|
|
11661
|
+
* bounds are.
|
|
11610
11662
|
*/
|
|
11611
|
-
from: number | string | ICalculation.IFormula;
|
|
11663
|
+
from: number | string | ICalculation.IFormula | null;
|
|
11612
11664
|
/**
|
|
11613
11665
|
* The upper bound value — a number, or a formula whose result is compared per cell.
|
|
11614
11666
|
*
|
|
11615
11667
|
* @remarks
|
|
11616
11668
|
* A formula is authored as a `=`-prefixed string or an {@link ICalculation.IFormula}; a resolved
|
|
11617
11669
|
* condition holds it as an `IFormula`.
|
|
11670
|
+
*
|
|
11671
|
+
* `null` while not yet given. The comparison matches nothing, and excludes nothing, until both
|
|
11672
|
+
* bounds are.
|
|
11618
11673
|
*/
|
|
11619
|
-
to: number | string | ICalculation.IFormula;
|
|
11674
|
+
to: number | string | ICalculation.IFormula | null;
|
|
11620
11675
|
}
|
|
11621
11676
|
interface ColorOption {
|
|
11622
11677
|
/**
|
|
@@ -11835,6 +11890,18 @@ declare global {
|
|
|
11835
11890
|
* Convert the value to the specified scalar type.
|
|
11836
11891
|
*/
|
|
11837
11892
|
toType<T extends InteropScalar>(value: Scalar, type: InteropScalarType): T;
|
|
11893
|
+
/**
|
|
11894
|
+
* The text the current cell shows, when the evaluation matches by text; `null` otherwise.
|
|
11895
|
+
*
|
|
11896
|
+
* @remarks
|
|
11897
|
+
* A filter matches by shown text unless asked not to ({@link ICondition.RangeOptions.match}):
|
|
11898
|
+
* a cell holding `1.5` and showing `1.50` is the item `1.50`. Conditional formats and data
|
|
11899
|
+
* validations match by value, so this answers `null` for them. An operator that compares
|
|
11900
|
+
* text reads `ctx.getText() ?? value`.
|
|
11901
|
+
*
|
|
11902
|
+
* Formatted on demand, so an operator that never asks pays nothing.
|
|
11903
|
+
*/
|
|
11904
|
+
getText(): string | null;
|
|
11838
11905
|
/**
|
|
11839
11906
|
* Resolves a condition input to a fully-built ICondition instance.
|
|
11840
11907
|
*
|
|
@@ -12013,6 +12080,13 @@ declare global {
|
|
|
12013
12080
|
* Creates the default param for this operator type.
|
|
12014
12081
|
*/
|
|
12015
12082
|
createDefaultParam?(lhsSelector?: ICondition.ISelector): P | null | undefined;
|
|
12083
|
+
/**
|
|
12084
|
+
* Whether `param` is one this operator can be authored with under `lhsSelector`.
|
|
12085
|
+
*
|
|
12086
|
+
* @returns A message key naming the first problem, or `null` when there is none. Omitted, any
|
|
12087
|
+
* param is taken. See {@link ICondition.validate}.
|
|
12088
|
+
*/
|
|
12089
|
+
validateParam?(param: P, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
12016
12090
|
/**
|
|
12017
12091
|
* Returns a human-readable title of the operator.
|
|
12018
12092
|
*/
|
|
@@ -12254,6 +12328,26 @@ declare global {
|
|
|
12254
12328
|
* with no explicit `hasHeader` evaluates the entire range, header row included.
|
|
12255
12329
|
*/
|
|
12256
12330
|
hasHeader?: boolean;
|
|
12331
|
+
/**
|
|
12332
|
+
* What a filter's list items and `equalTo` text are compared with: the text a cell shows, or
|
|
12333
|
+
* the value it holds.
|
|
12334
|
+
*
|
|
12335
|
+
* @defaultValue `'text'`
|
|
12336
|
+
*
|
|
12337
|
+
* @remarks
|
|
12338
|
+
* `'text'` is a spreadsheet's AutoFilter: the item `1.50` keeps a cell holding `1.5` under the
|
|
12339
|
+
* format `0.00`, and the item `1.5` does not. A number passed as an item or operand still
|
|
12340
|
+
* matches the cells holding that number, however they are formatted.
|
|
12341
|
+
*
|
|
12342
|
+
* `'value'` compares typed values only, so the text `"1"` never matches the number `1`.
|
|
12343
|
+
*
|
|
12344
|
+
* Comparisons (`>`, `between`), Top N, averages, date periods and date groups read the value
|
|
12345
|
+
* either way, and the text operators (contains, starts with, ends with) only ever match a
|
|
12346
|
+
* cell that holds text.
|
|
12347
|
+
*
|
|
12348
|
+
* Read by filters. Conditional formats and data validations match by value.
|
|
12349
|
+
*/
|
|
12350
|
+
match?: 'text' | 'value';
|
|
12257
12351
|
}
|
|
12258
12352
|
/**
|
|
12259
12353
|
* JSON for serialization and round-tripping.
|
|
@@ -12852,11 +12946,7 @@ declare global {
|
|
|
12852
12946
|
*
|
|
12853
12947
|
* **PLACEHOLDER** - This is under development and not made public yet.
|
|
12854
12948
|
*/
|
|
12855
|
-
export interface IControl extends IModel {
|
|
12856
|
-
/**
|
|
12857
|
-
* Returns a description for assistive technologies.
|
|
12858
|
-
*/
|
|
12859
|
-
getDescription(): string;
|
|
12949
|
+
export interface IControl extends IModel, IMovable.IContent {
|
|
12860
12950
|
/**
|
|
12861
12951
|
* Returns the id of the shape that draws this control, or `null` if it has none.
|
|
12862
12952
|
*
|
|
@@ -12876,6 +12966,10 @@ declare global {
|
|
|
12876
12966
|
*/
|
|
12877
12967
|
getXML(): string | null;
|
|
12878
12968
|
toJSON(toResourceId?: (resource: IResource) => number | null): IControl.JSON | null;
|
|
12969
|
+
/**
|
|
12970
|
+
* Deletes the control, and with it the movable that places it.
|
|
12971
|
+
*/
|
|
12972
|
+
delete(options?: ITransaction.OperationOptions): void;
|
|
12879
12973
|
/** For runtime type checking. */
|
|
12880
12974
|
readonly isIControl: true;
|
|
12881
12975
|
}
|
|
@@ -14840,6 +14934,36 @@ declare global {
|
|
|
14840
14934
|
* This is relative to the table.
|
|
14841
14935
|
*/
|
|
14842
14936
|
getIndex(): number;
|
|
14937
|
+
/**
|
|
14938
|
+
* The column's distinct values, as a filter menu lists them.
|
|
14939
|
+
*
|
|
14940
|
+
* @param options See {@link IFilter.GetItemsOptions}.
|
|
14941
|
+
*
|
|
14942
|
+
* @remarks
|
|
14943
|
+
* Which rows are read depends on the column:
|
|
14944
|
+
* - With no condition on it, the rows that are showing. A row hidden by another column's filter,
|
|
14945
|
+
* or by hand, is not listed.
|
|
14946
|
+
* - With a condition on it, the rows every *other* column's filter passes, so a value this
|
|
14947
|
+
* column's own condition hides is listed too, unchecked.
|
|
14948
|
+
*
|
|
14949
|
+
* An item is `checked` when at least one row holding it passes the filters, so a column filtered
|
|
14950
|
+
* by any condition (`> 5`, say) lists the passing values checked. A row hidden by hand does not
|
|
14951
|
+
* uncheck its value.
|
|
14952
|
+
*
|
|
14953
|
+
* Reads the stored values in one pass; the cost follows the column's content, not its extent.
|
|
14954
|
+
*
|
|
14955
|
+
* @example
|
|
14956
|
+
* ```ts
|
|
14957
|
+
* const filter = table.getColumnAt(1).getFilter();
|
|
14958
|
+
* const { items } = await filter.getItems();
|
|
14959
|
+
* // keep the first two values
|
|
14960
|
+
* await filter.setCondition({
|
|
14961
|
+
* operator: ICondition.BuiltInOperatorNames.InSet,
|
|
14962
|
+
* param: { items: items.slice(0, 2).map((item) => item.text) }
|
|
14963
|
+
* });
|
|
14964
|
+
* ```
|
|
14965
|
+
*/
|
|
14966
|
+
getItems(options?: IFilter.GetItemsOptions): Promise<IFilter.Items>;
|
|
14843
14967
|
/** For runtime type checking. */
|
|
14844
14968
|
readonly isIFilter: true;
|
|
14845
14969
|
}
|
|
@@ -14856,6 +14980,51 @@ declare global {
|
|
|
14856
14980
|
conditions?: ICondition.JSON[];
|
|
14857
14981
|
axis?: IRange.Axis;
|
|
14858
14982
|
}
|
|
14983
|
+
/**
|
|
14984
|
+
* Options for {@link IFilter.getItems}.
|
|
14985
|
+
*/
|
|
14986
|
+
interface GetItemsOptions {
|
|
14987
|
+
/**
|
|
14988
|
+
* The distinct values to stop at.
|
|
14989
|
+
*
|
|
14990
|
+
* @defaultValue `10000`
|
|
14991
|
+
*/
|
|
14992
|
+
limit?: number;
|
|
14993
|
+
}
|
|
14994
|
+
/**
|
|
14995
|
+
* One distinct value of a filtered column.
|
|
14996
|
+
*/
|
|
14997
|
+
interface Item {
|
|
14998
|
+
/**
|
|
14999
|
+
* The text the cells show. This is the item an `InSet` condition holds: a filter matches by
|
|
15000
|
+
* shown text ({@link ICondition.RangeOptions.match}).
|
|
15001
|
+
*/
|
|
15002
|
+
text: string;
|
|
15003
|
+
/** The value of the first cell showing `text`; the item's place in the order. */
|
|
15004
|
+
value: Scalar;
|
|
15005
|
+
/** The rows holding the value. */
|
|
15006
|
+
count: number;
|
|
15007
|
+
/** Whether at least one row holding the value passes the filters. */
|
|
15008
|
+
checked: boolean;
|
|
15009
|
+
}
|
|
15010
|
+
/**
|
|
15011
|
+
* What {@link IFilter.getItems} answers.
|
|
15012
|
+
*/
|
|
15013
|
+
interface Items {
|
|
15014
|
+
/**
|
|
15015
|
+
* The distinct texts, ascending by the workbook's comparison of their values. Values that
|
|
15016
|
+
* show alike are one item. Blanks are not an item.
|
|
15017
|
+
*/
|
|
15018
|
+
items: readonly Item[];
|
|
15019
|
+
/** Whether a listed row is blank. */
|
|
15020
|
+
hasBlanks: boolean;
|
|
15021
|
+
/** Whether at least one blank row passes the filters. */
|
|
15022
|
+
blanksChecked: boolean;
|
|
15023
|
+
/** Whether the column has more distinct values than `limit`; the rest are not listed. */
|
|
15024
|
+
truncated: boolean;
|
|
15025
|
+
/** The rows read. */
|
|
15026
|
+
total: number;
|
|
15027
|
+
}
|
|
14859
15028
|
/**
|
|
14860
15029
|
* Interface indicating the ability to filter data.
|
|
14861
15030
|
*/
|
|
@@ -15438,16 +15607,30 @@ declare global {
|
|
|
15438
15607
|
*/
|
|
15439
15608
|
getSheetIndex(sheet?: string | IReferenceRange): number;
|
|
15440
15609
|
/**
|
|
15441
|
-
* Returns a
|
|
15610
|
+
* Returns a range as it reads without its hidden rows or columns.
|
|
15442
15611
|
*
|
|
15443
15612
|
* @param range The range to filter.
|
|
15444
|
-
* @param
|
|
15445
|
-
* @returns
|
|
15613
|
+
* @param options See {@link IFormulaContext.FilterHiddenOptions}.
|
|
15614
|
+
* @returns `range` itself when nothing in it is hidden; otherwise the same range reading with
|
|
15615
|
+
* the hidden rows or columns skipped ({@link IRange.IteratorOptions.processRowSkip}).
|
|
15446
15616
|
*
|
|
15447
15617
|
* @remarks
|
|
15448
15618
|
* Use this for functions that ignore hidden data, such as `SUBTOTAL`.
|
|
15619
|
+
*
|
|
15620
|
+
* Nothing is copied. The shape of `range` is kept, and a reference stays a reference: a hidden
|
|
15621
|
+
* cell is not visited and reads as empty, so every position still means the cell it meant, and
|
|
15622
|
+
* an aggregate that ignores blanks ignores it. A computed array has no rows or columns to hide
|
|
15623
|
+
* and is returned as it is.
|
|
15624
|
+
*
|
|
15625
|
+
* A hidden row is a hidden row, whoever hid it: a filter and the user leave the same mark, and
|
|
15626
|
+
* nothing here tells them apart. What a filter adds is a state of the range's SHEET, which
|
|
15627
|
+
* {@link IFormulaContext.FilterHiddenOptions.onlyWhileFiltered} reads.
|
|
15628
|
+
*
|
|
15629
|
+
* A formula that calls `SUBTOTAL` or `AGGREGATE` is recalculated when a row or column is hidden
|
|
15630
|
+
* or shown, and when a filter is set or cleared. One that reaches this only through a custom
|
|
15631
|
+
* function is not: it reads the state when it is next calculated.
|
|
15449
15632
|
*/
|
|
15450
|
-
filterHidden(range: IRange,
|
|
15633
|
+
filterHidden(range: IRange, options?: IFormulaContext.FilterHiddenOptions): IRange;
|
|
15451
15634
|
/**
|
|
15452
15635
|
* Returns a copy of a range with any cell whose formula is a nested total removed.
|
|
15453
15636
|
*
|
|
@@ -15786,6 +15969,28 @@ declare global {
|
|
|
15786
15969
|
* {@link IFormulaContext}
|
|
15787
15970
|
*/
|
|
15788
15971
|
export namespace IFormulaContext {
|
|
15972
|
+
/**
|
|
15973
|
+
* Options for {@link IFormulaContext.filterHidden}.
|
|
15974
|
+
*/
|
|
15975
|
+
interface FilterHiddenOptions {
|
|
15976
|
+
/**
|
|
15977
|
+
* Which axis to filter on.
|
|
15978
|
+
* @defaultValue `IRange.AxisSelection.Row`
|
|
15979
|
+
*/
|
|
15980
|
+
axes?: IRange.AxisSelection;
|
|
15981
|
+
/**
|
|
15982
|
+
* Skip the hidden rows or columns only while the range's sheet is filtered: while some
|
|
15983
|
+
* AutoFilter or table on that sheet holds a condition, whether or not it hides a row. Until
|
|
15984
|
+
* then `range` is returned as it is, hidden rows included.
|
|
15985
|
+
*
|
|
15986
|
+
* @remarks
|
|
15987
|
+
* This is `SUBTOTAL` 1-11 (Excel: they "include manually hidden rows", which is what an
|
|
15988
|
+
* unfiltered sheet reads as). `SUBTOTAL` 101-111 and `AGGREGATE` leave it off and skip
|
|
15989
|
+
* always.
|
|
15990
|
+
* @defaultValue false
|
|
15991
|
+
*/
|
|
15992
|
+
onlyWhileFiltered?: boolean;
|
|
15993
|
+
}
|
|
15789
15994
|
/**
|
|
15790
15995
|
* Options for {@link IFormulaContext.parseAsNumber}.
|
|
15791
15996
|
*/
|
|
@@ -18162,7 +18367,10 @@ declare global {
|
|
|
18162
18367
|
* | `'control'` | {@link IControl} — a form control |
|
|
18163
18368
|
*
|
|
18164
18369
|
* Anything else is content that is positioned and saved but not modeled; it answers
|
|
18165
|
-
*
|
|
18370
|
+
* {@link IMovable.IContent} and nothing more.
|
|
18371
|
+
*
|
|
18372
|
+
* The content owns what identifies it: its name, its description and its id. The movable owns
|
|
18373
|
+
* where it is drawn. To remove both, delete the content.
|
|
18166
18374
|
*
|
|
18167
18375
|
* @example
|
|
18168
18376
|
* ```ts
|
|
@@ -18170,9 +18378,14 @@ declare global {
|
|
|
18170
18378
|
* if (content.getType() === 'shape') {
|
|
18171
18379
|
* const text = (content as IShape).getTextFrame()?.getText();
|
|
18172
18380
|
* }
|
|
18381
|
+
* content.delete();
|
|
18173
18382
|
* ```
|
|
18174
18383
|
*/
|
|
18175
|
-
getContent<T extends
|
|
18384
|
+
getContent<T extends IMovable.IContent = IMovable.IContent>(): T;
|
|
18385
|
+
/**
|
|
18386
|
+
* Deletes the content, which removes this movable. The same as `getContent().delete()`.
|
|
18387
|
+
*/
|
|
18388
|
+
delete(): void;
|
|
18176
18389
|
/**
|
|
18177
18390
|
* Selects the current movable.
|
|
18178
18391
|
*
|
|
@@ -18209,30 +18422,6 @@ declare global {
|
|
|
18209
18422
|
* Returns the absolute bounds of the movable object in pixels or `null` if not yet laid out.
|
|
18210
18423
|
*/
|
|
18211
18424
|
getBounds(): Bounds | null;
|
|
18212
|
-
/**
|
|
18213
|
-
* Set the name for a movable object.
|
|
18214
|
-
*
|
|
18215
|
-
* @param name The name of the IMovable.
|
|
18216
|
-
*/
|
|
18217
|
-
setName(name: string): IMovable;
|
|
18218
|
-
/**
|
|
18219
|
-
* @see
|
|
18220
|
-
* {@link setName}
|
|
18221
|
-
*
|
|
18222
|
-
* @returns The name or `null` if the movable has been deleted.
|
|
18223
|
-
*/
|
|
18224
|
-
getName(): string | null;
|
|
18225
|
-
/**
|
|
18226
|
-
* This is the alternative text use for assistive technologies.
|
|
18227
|
-
*/
|
|
18228
|
-
setDescription(description: string | null): IMovable;
|
|
18229
|
-
/**
|
|
18230
|
-
* @see
|
|
18231
|
-
* {@link setDescription}
|
|
18232
|
-
*
|
|
18233
|
-
* @returns The description or `null` if none has been set (or the movable has been deleted).
|
|
18234
|
-
*/
|
|
18235
|
-
getDescription(): string | null;
|
|
18236
18425
|
/**
|
|
18237
18426
|
* If true then the movable object is hidden.
|
|
18238
18427
|
*/
|
|
@@ -18314,6 +18503,61 @@ declare global {
|
|
|
18314
18503
|
* {@link IMovable}
|
|
18315
18504
|
*/
|
|
18316
18505
|
export namespace IMovable {
|
|
18506
|
+
/**
|
|
18507
|
+
* What a movable draws: a chart, a picture, a shape, a slicer, a control.
|
|
18508
|
+
*
|
|
18509
|
+
* @remarks
|
|
18510
|
+
* Content owns what identifies it, and the movable owns where it is drawn. Content can exist
|
|
18511
|
+
* with no movable: a picture used as a sheet background is not placed by one.
|
|
18512
|
+
*/
|
|
18513
|
+
interface IContent {
|
|
18514
|
+
/**
|
|
18515
|
+
* Returns an immutable type string.
|
|
18516
|
+
*/
|
|
18517
|
+
getType(): string;
|
|
18518
|
+
/**
|
|
18519
|
+
* Returns the id of the content.
|
|
18520
|
+
*/
|
|
18521
|
+
getId(): string;
|
|
18522
|
+
/**
|
|
18523
|
+
* Returns the name, or `null` if the content has none.
|
|
18524
|
+
*
|
|
18525
|
+
* @remarks
|
|
18526
|
+
* Not defined for content that is never named.
|
|
18527
|
+
*/
|
|
18528
|
+
getName?(): string | null;
|
|
18529
|
+
/**
|
|
18530
|
+
* Set the name.
|
|
18531
|
+
*
|
|
18532
|
+
* @param name The name of the content.
|
|
18533
|
+
*/
|
|
18534
|
+
setName?(name: string): this;
|
|
18535
|
+
/**
|
|
18536
|
+
* Returns the alternative text used by assistive technologies, or `null` if none has been set.
|
|
18537
|
+
*/
|
|
18538
|
+
getDescription(): string | null;
|
|
18539
|
+
/**
|
|
18540
|
+
* Set the alternative text used by assistive technologies.
|
|
18541
|
+
*/
|
|
18542
|
+
setDescription(description: string | null): this;
|
|
18543
|
+
/**
|
|
18544
|
+
* Returns a label for the kind of content, such as `Chart` or `Picture`.
|
|
18545
|
+
*/
|
|
18546
|
+
getTypeDescription(): string;
|
|
18547
|
+
/**
|
|
18548
|
+
* Returns the movable that places the content on the sheet, or `null` if it is not placed by
|
|
18549
|
+
* one.
|
|
18550
|
+
*/
|
|
18551
|
+
getMovable(): IMovable | null;
|
|
18552
|
+
/**
|
|
18553
|
+
* Deletes the content, and with it the movable that places it.
|
|
18554
|
+
*/
|
|
18555
|
+
delete(options?: ITransaction.OperationOptions): void;
|
|
18556
|
+
/**
|
|
18557
|
+
* Returns `true` if the content has been deleted.
|
|
18558
|
+
*/
|
|
18559
|
+
isDeleted(): boolean;
|
|
18560
|
+
}
|
|
18317
18561
|
/**
|
|
18318
18562
|
* Extends {@link ITypes.SelectOptions} to include options for `IMovable`.
|
|
18319
18563
|
*/
|
|
@@ -18336,11 +18580,7 @@ declare global {
|
|
|
18336
18580
|
*/
|
|
18337
18581
|
onSelectionChange?(source: IMovable): void;
|
|
18338
18582
|
/**
|
|
18339
|
-
* Called when the
|
|
18340
|
-
*/
|
|
18341
|
-
onNameChange?(source: IMovable): void;
|
|
18342
|
-
/**
|
|
18343
|
-
* Called when selection changes.
|
|
18583
|
+
* Called when the bounds have changed.
|
|
18344
18584
|
*/
|
|
18345
18585
|
onBoundsChange?(source: IMovable): void;
|
|
18346
18586
|
/**
|
|
@@ -18416,6 +18656,14 @@ declare global {
|
|
|
18416
18656
|
* This must align to a known movable object type. Defined in the IEmbeddedDrawing interface.
|
|
18417
18657
|
*/
|
|
18418
18658
|
type: string;
|
|
18659
|
+
/**
|
|
18660
|
+
* The name of the content.
|
|
18661
|
+
*/
|
|
18662
|
+
name?: string;
|
|
18663
|
+
/**
|
|
18664
|
+
* The alternative text used by assistive technologies.
|
|
18665
|
+
*/
|
|
18666
|
+
description?: string;
|
|
18419
18667
|
/**
|
|
18420
18668
|
* Underlying json.
|
|
18421
18669
|
*/
|
|
@@ -18434,16 +18682,6 @@ declare global {
|
|
|
18434
18682
|
* The behavior of how the movable resizes as the anchor/cells change.
|
|
18435
18683
|
*/
|
|
18436
18684
|
anchorType?: IAnchored.Type;
|
|
18437
|
-
/**
|
|
18438
|
-
* The name of the movable object.
|
|
18439
|
-
*/
|
|
18440
|
-
name?: string;
|
|
18441
|
-
/**
|
|
18442
|
-
* This is the alternative text use for assistive technologies.
|
|
18443
|
-
*
|
|
18444
|
-
* @defaultValue null
|
|
18445
|
-
*/
|
|
18446
|
-
description?: string;
|
|
18447
18685
|
/**
|
|
18448
18686
|
* If true then the movable object is hidden.
|
|
18449
18687
|
*
|
|
@@ -18561,6 +18799,12 @@ declare global {
|
|
|
18561
18799
|
* Initial json value.
|
|
18562
18800
|
*/
|
|
18563
18801
|
json?: J;
|
|
18802
|
+
/**
|
|
18803
|
+
* The name of the content.
|
|
18804
|
+
*
|
|
18805
|
+
* @defaultValue A name made from the type, such as `Chart 3`.
|
|
18806
|
+
*/
|
|
18807
|
+
name?: string;
|
|
18564
18808
|
/**
|
|
18565
18809
|
* If a referenceId is provided then the movable will be linked to the resource.
|
|
18566
18810
|
* @param resourceId
|
|
@@ -19638,8 +19882,12 @@ declare global {
|
|
|
19638
19882
|
/**
|
|
19639
19883
|
* Interface for working with Pictures (both Images and SVG).
|
|
19640
19884
|
*/
|
|
19641
|
-
export interface IPicture extends IModel {
|
|
19885
|
+
export interface IPicture extends IModel, IMovable.IContent {
|
|
19642
19886
|
toJSON(toResourceId?: (resource: IResource) => number | null): IPicture.JSON;
|
|
19887
|
+
/**
|
|
19888
|
+
* Deletes the picture, and with it the movable that places it.
|
|
19889
|
+
*/
|
|
19890
|
+
delete(options?: ITransaction.OperationOptions): void;
|
|
19643
19891
|
/**
|
|
19644
19892
|
* Returns the resource associated with this picture.
|
|
19645
19893
|
*/
|
|
@@ -21398,6 +21646,24 @@ declare global {
|
|
|
21398
21646
|
* If passing a large bound care must be taken.
|
|
21399
21647
|
*/
|
|
21400
21648
|
includeEmpty?: boolean;
|
|
21649
|
+
/**
|
|
21650
|
+
* Skips rows of the range: given the next row that would be read, answers the row to read
|
|
21651
|
+
* instead - the same row when it is read, or the next one that is (the previous, when
|
|
21652
|
+
* `reverse`).
|
|
21653
|
+
*
|
|
21654
|
+
* @param index The 0-based row about to be read.
|
|
21655
|
+
* @param reverse Whether the read runs from the last row back.
|
|
21656
|
+
* @returns The row to read, at or past `index`.
|
|
21657
|
+
*
|
|
21658
|
+
* @remarks
|
|
21659
|
+
* A skipped cell is not visited, reads as empty and is left out of the statistics; the shape
|
|
21660
|
+
* of the range is unchanged. `SUBTOTAL` reads a range this way when it skips hidden rows.
|
|
21661
|
+
*/
|
|
21662
|
+
processRowSkip?: (index: number, reverse?: boolean) => number;
|
|
21663
|
+
/**
|
|
21664
|
+
* Skips columns of the range, as {@link processRowSkip} skips rows.
|
|
21665
|
+
*/
|
|
21666
|
+
processColumnSkip?: (index: number, reverse?: boolean) => number;
|
|
21401
21667
|
/**
|
|
21402
21668
|
* Useful for callback functions that want a this.
|
|
21403
21669
|
*/
|
|
@@ -22306,7 +22572,8 @@ declare global {
|
|
|
22306
22572
|
*
|
|
22307
22573
|
* - Every requested type (all types when omitted) is present with an explicit count —
|
|
22308
22574
|
* a `0` is a fact about the range, a missing key would be ambiguous.
|
|
22309
|
-
* - Blanks report under {@link ScalarType.Null}: total cells minus non-empty values.
|
|
22575
|
+
* - Blanks report under {@link ScalarType.Null}: total cells minus non-empty values. A cell the
|
|
22576
|
+
* range skips ({@link IRange.IteratorOptions.processRowSkip}) is not a blank; it is not counted.
|
|
22310
22577
|
* - Never throws on error values — errors are population here, not faults — regardless of
|
|
22311
22578
|
* the `onError` iterator policy the stats were created with.
|
|
22312
22579
|
*/
|
|
@@ -22948,6 +23215,41 @@ declare global {
|
|
|
22948
23215
|
}
|
|
22949
23216
|
}
|
|
22950
23217
|
|
|
23218
|
+
/**
|
|
23219
|
+
* Text with formatting: a list of {@link IRichText.Run | runs}, each a span of text with the font
|
|
23220
|
+
* properties it sets.
|
|
23221
|
+
*
|
|
23222
|
+
* @remarks
|
|
23223
|
+
* A run records only what it sets. Everything it leaves out is inherited from the font of whatever
|
|
23224
|
+
* holds the text (a note's default, a cell's style).
|
|
23225
|
+
*/
|
|
23226
|
+
export namespace IRichText {
|
|
23227
|
+
/**
|
|
23228
|
+
* One formatted span.
|
|
23229
|
+
*/
|
|
23230
|
+
interface Run {
|
|
23231
|
+
/**
|
|
23232
|
+
* The text of the span.
|
|
23233
|
+
*/
|
|
23234
|
+
text: string;
|
|
23235
|
+
/**
|
|
23236
|
+
* The font properties this span sets, or nothing when it has none of its own.
|
|
23237
|
+
*
|
|
23238
|
+
* @remarks
|
|
23239
|
+
* The same properties a cell's font has, so a bold span is `{ weight: 700 }`, italic is
|
|
23240
|
+
* `{ style: 'italic' }`. The color is any string a font's color takes; one read from a file keeps
|
|
23241
|
+
* its theme or indexed color that way.
|
|
23242
|
+
*/
|
|
23243
|
+
font?: IStyledFont.JSON;
|
|
23244
|
+
}
|
|
23245
|
+
/**
|
|
23246
|
+
* The serialized form: the runs, in order.
|
|
23247
|
+
*/
|
|
23248
|
+
interface JSON {
|
|
23249
|
+
runs: Run[];
|
|
23250
|
+
}
|
|
23251
|
+
}
|
|
23252
|
+
|
|
22951
23253
|
/**
|
|
22952
23254
|
* Describes the host environment the calculation engine is running in.
|
|
22953
23255
|
*
|
|
@@ -23346,16 +23648,16 @@ declare global {
|
|
|
23346
23648
|
* Reading only: a shape's preset and its text. An imported shape is otherwise kept as the source
|
|
23347
23649
|
* wrote it and saved back unchanged.
|
|
23348
23650
|
*/
|
|
23349
|
-
export interface IShape extends IModel {
|
|
23651
|
+
export interface IShape extends IModel, IMovable.IContent {
|
|
23350
23652
|
toJSON(toResourceId?: (resource: IResource) => number | null): IShape.JSON | null;
|
|
23351
23653
|
/**
|
|
23352
23654
|
* Returns the name of the shape.
|
|
23353
23655
|
*/
|
|
23354
|
-
getName(): string;
|
|
23656
|
+
getName(): string | null;
|
|
23355
23657
|
/**
|
|
23356
|
-
*
|
|
23658
|
+
* Deletes the shape, and with it the movable that places it.
|
|
23357
23659
|
*/
|
|
23358
|
-
|
|
23660
|
+
delete(options?: ITransaction.OperationOptions): void;
|
|
23359
23661
|
/**
|
|
23360
23662
|
* Returns the kind of shape this is: its preset geometry.
|
|
23361
23663
|
*
|
|
@@ -23983,14 +24285,15 @@ declare global {
|
|
|
23983
24285
|
*
|
|
23984
24286
|
* @param update Cell Update
|
|
23985
24287
|
* @param coords Optional CellCoord
|
|
24288
|
+
* @param options How the update is read. See {@link ICell.CreateCellOptions}.
|
|
23986
24289
|
* @returns A detached ICell
|
|
23987
24290
|
*
|
|
23988
24291
|
* @remarks
|
|
23989
|
-
* * Useful for previewing values such as tooltip.
|
|
24292
|
+
* * Useful for previewing values such as tooltip, or what typed text would be entered as.
|
|
23990
24293
|
* * Does not add to the sheet but provides a standalone ICell.
|
|
23991
24294
|
* * If the coords are passed it will return disconnect cell update for that value.
|
|
23992
24295
|
*/
|
|
23993
|
-
createCell(update: ICell.Update, coords?: IRange.FixableCellCoords): ICell;
|
|
24296
|
+
createCell(update: ICell.Update, coords?: IRange.FixableCellCoords, options?: ICell.CreateCellOptions): ICell;
|
|
23994
24297
|
/**
|
|
23995
24298
|
* Parses a formula expression and returns a *transient* formula object anchored to this sheet.
|
|
23996
24299
|
*
|
|
@@ -25068,6 +25371,23 @@ declare global {
|
|
|
25068
25371
|
* Returns true if any of the headers have the isHidden flag set to true or if any sizes are 0.
|
|
25069
25372
|
*/
|
|
25070
25373
|
hasHidden(): boolean;
|
|
25374
|
+
/**
|
|
25375
|
+
* Returns the ranges of headers a filter holds a condition over: on the row axis, the data rows
|
|
25376
|
+
* of the AutoTable and of every table whose {@link ITable.getActiveFilters} is not empty; on
|
|
25377
|
+
* the column axis none, as nothing filters columns.
|
|
25378
|
+
*
|
|
25379
|
+
* @param coords Only the ranges that meet this run, when given (a viewport).
|
|
25380
|
+
*
|
|
25381
|
+
* @remarks
|
|
25382
|
+
* A sheet with any is "filtered", as Excel has it: `SUBTOTAL` 1-11 leave out every hidden row
|
|
25383
|
+
* of a filtered sheet, hand-hidden ones included, and count them all on an unfiltered one; the
|
|
25384
|
+
* visible headers of these ranges are the ones drawn as filtered. A condition counts whether
|
|
25385
|
+
* or not it hides a row.
|
|
25386
|
+
*
|
|
25387
|
+
* A row hidden by hand and a row hidden by a filter are the same hidden row; nothing records
|
|
25388
|
+
* which, and clearing a filter shows both ({@link ITable.deleteFilters}).
|
|
25389
|
+
*/
|
|
25390
|
+
getFilteredRanges(coords?: Readonly<RunCoords>): readonly ICellHeaderRange[];
|
|
25071
25391
|
/**
|
|
25072
25392
|
* Returns true if header has a max selection at the given index.
|
|
25073
25393
|
*/
|
|
@@ -25832,9 +26152,12 @@ declare global {
|
|
|
25832
26152
|
* @hidden
|
|
25833
26153
|
* @internal
|
|
25834
26154
|
*/
|
|
25835
|
-
export interface ISlicer extends IModel {
|
|
26155
|
+
export interface ISlicer extends IModel, IMovable.IContent {
|
|
25836
26156
|
toJSON(toResourceId?: (resource: IResource) => number | null): ISlicer.JSON | null;
|
|
25837
|
-
|
|
26157
|
+
/**
|
|
26158
|
+
* Deletes the slicer, and with it the movable that places it.
|
|
26159
|
+
*/
|
|
26160
|
+
delete(options?: ITransaction.OperationOptions): void;
|
|
25838
26161
|
/** For runtime type checking. */
|
|
25839
26162
|
readonly isISlicer: true;
|
|
25840
26163
|
}
|
|
@@ -27970,11 +28293,20 @@ declare global {
|
|
|
27970
28293
|
*/
|
|
27971
28294
|
interface SnapshotDestination {
|
|
27972
28295
|
tables: ITableCollection;
|
|
28296
|
+
/** Where the table lands: its top-left is used, its size is the table's own. */
|
|
27973
28297
|
range: IRange.Coords;
|
|
27974
28298
|
}
|
|
27975
28299
|
interface ISnapshot extends IHistory.ISnapshot<ITable.SnapshotDestination, ITable, IRange.Coords> {
|
|
27976
28300
|
/**
|
|
27977
|
-
*
|
|
28301
|
+
* Copies, or moves, the table to the destination.
|
|
28302
|
+
*
|
|
28303
|
+
* @remarks
|
|
28304
|
+
* The table's cells are expected at the destination already: the table takes its header,
|
|
28305
|
+
* body and totals rows from what is there.
|
|
28306
|
+
*
|
|
28307
|
+
* With `isCut` the source table is moved. Within its own sheet it is the same table at a new
|
|
28308
|
+
* place, so its name and the references to it stay as they are; anywhere else it is removed
|
|
28309
|
+
* and added again under its name.
|
|
27978
28310
|
*/
|
|
27979
28311
|
copyTo(destination: ITable.SnapshotDestination, options?: ReferenceableClipboard.CopyOptions): Promise<IRange.Coords>;
|
|
27980
28312
|
}
|
|
@@ -28579,8 +28911,18 @@ declare global {
|
|
|
28579
28911
|
* A default value of false will create a new row.
|
|
28580
28912
|
*/
|
|
28581
28913
|
hasHeader?: boolean;
|
|
28914
|
+
/**
|
|
28915
|
+
* Whether the range already ends with the totals row the `properties` ask for. The table then
|
|
28916
|
+
* takes those cells as its totals row rather than adding one below the range.
|
|
28917
|
+
*
|
|
28918
|
+
* @defaultValue false
|
|
28919
|
+
*/
|
|
28920
|
+
hasTotals?: boolean;
|
|
28582
28921
|
/**
|
|
28583
28922
|
* Properties to set on the table when created.
|
|
28923
|
+
*
|
|
28924
|
+
* @remarks
|
|
28925
|
+
* With `headerRowCount: 0` the range has no header row: all of it is data.
|
|
28584
28926
|
*/
|
|
28585
28927
|
properties?: ITable.Properties;
|
|
28586
28928
|
/**
|
|
@@ -30403,6 +30745,17 @@ declare global {
|
|
|
30403
30745
|
* needs to know that the change it is hearing about is a restore, not an operation.
|
|
30404
30746
|
*/
|
|
30405
30747
|
isRestoring(): boolean;
|
|
30748
|
+
/**
|
|
30749
|
+
* Returns `true` while the open operation is an {@link amend} of a commit other than the one
|
|
30750
|
+
* the store is at.
|
|
30751
|
+
*
|
|
30752
|
+
* @remarks
|
|
30753
|
+
* Its writes land in that commit's snapshot alone, and the current state does not change. So
|
|
30754
|
+
* anything made inside it that is not versioned by this store - a resource held outside it,
|
|
30755
|
+
* once for every snapshot - would exist where the current snapshot has no record of it. Code
|
|
30756
|
+
* that makes such a thing asks this first.
|
|
30757
|
+
*/
|
|
30758
|
+
isAmendingOtherCommit(): boolean;
|
|
30406
30759
|
/**
|
|
30407
30760
|
* The root transaction of the operation that is open.
|
|
30408
30761
|
*
|