@sheetxl/sdk 0.8.0-beta.7 → 0.8.0-beta.9
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/BAtZ8a7H7zsRvWqe.cjs +90 -0
- package/browser/cjs/CQPMWBxBUmkORmxV.cjs +1 -0
- package/browser/cjs/{E08wpSuqr-UadjSZ.cjs → CvQ1tIq7wZ7HIGPq.cjs} +1 -1
- package/browser/cjs/CwvGOe42j8KpAF0v.cjs +1 -0
- package/browser/cjs/{O6F5xVsoF2hTiprv.cjs → DCOqoH-T4Ux_1dQj.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{tBEZ_r7Bkp7CrFLF.mjs → BdHD3v-u8irI1XhZ.mjs} +2 -2
- package/browser/esm/{bSQdR4WlmM40WWFR.mjs → C8btlUQcQwNyzHY3.mjs} +2 -2
- package/browser/esm/{B7v0PdbyuBlceMLG.mjs → CF3VfWX7bJu8kO_Z.mjs} +2 -2
- package/browser/esm/{BADV_AABAw-3U9iO.mjs → D3ll0ybMQOP4uPyW.mjs} +1 -1
- package/browser/esm/{DRpWwH6CWI0QaNlp.mjs → DXmFrSnh3xSBfoD7.mjs} +8146 -7694
- package/browser/esm/{CFDfAmU2o5HFRTu4.mjs → DzgIc4oyekwA-fkl.mjs} +96 -96
- package/browser/esm/{DkHfJEJlvjDJnXEU.mjs → Iw280tlGmTHKDqzd.mjs} +2 -2
- package/browser/esm/index.mjs +919 -593
- package/node/esm/{CWJELJxqO-1z0tJU.mjs → B_FOXd5PSfVcg0ED.mjs} +1 -1
- package/node/esm/{HMR0po5avaUU1XUZ.mjs → BzgnLKSVfN-mrMSW.mjs} +1 -1
- package/node/esm/{BShIHUY7pxerJVT8.mjs → D4PsEIRHxAahp5kn.mjs} +1 -1
- package/node/esm/{DbAKZ-Ythj1VwgyS.mjs → dinqlP3jU8gDOjso.mjs} +1 -1
- package/node/esm/index.mjs +11373 -10575
- package/package.json +7 -6
- package/resources/locales/de/model.msg.json +19 -0
- package/resources/locales/en/model.msg.json +25 -0
- package/types/scripting-api.json +6847 -6401
- package/types/scripting-enums.json +101 -21
- package/types/scripting.d.ts +1949 -457
- package/types/src/calculation/Calculation.d.ts +37 -45
- package/types/src/calculation/grid/CalcGrid.d.ts +12 -4
- package/types/src/calculation/grid/CalcGridBackend.d.ts +0 -6
- package/types/src/calculation/grid/CalcGridProxy.d.ts +1 -6
- package/types/src/calculation/grid/ICalcGrid.d.ts +12 -4
- package/types/src/calculation/grid/_CalcRequest.d.ts +4 -9
- package/types/src/cell/ICell.d.ts +3 -3
- package/types/src/cell/ICellHeader.d.ts +24 -2
- package/types/src/cellRange/ICellRange.d.ts +67 -3
- package/types/src/cellRange/ICellRanges.d.ts +12 -12
- package/types/src/chart/Chart.d.ts +2 -13
- package/types/src/condition/AnchoredConditional.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +4 -0
- package/types/src/condition/BuiltInOperators/IconOperator.d.ts +4 -0
- package/types/src/condition/ICondition.d.ts +36 -28
- package/types/src/condition/_ConditionUtils.d.ts +32 -8
- package/types/src/fill/IFill.d.ts +46 -11
- package/types/src/fill/IStroke.d.ts +34 -42
- package/types/src/filter/IFilter.d.ts +51 -6
- package/types/src/hyperlink/IHyperlink.d.ts +8 -0
- package/types/src/index.d.ts +1 -0
- package/types/src/movable/AbstractMovableContent.d.ts +6 -0
- package/types/src/movable/FormControl.d.ts +206 -0
- package/types/src/movable/IFormControl.d.ts +424 -0
- package/types/src/movable/IMovable.d.ts +37 -8
- package/types/src/movable/IMovableCollection.d.ts +19 -1
- package/types/src/movable/Movable.d.ts +20 -0
- package/types/src/movable/MovableContentRegistry.d.ts +64 -0
- package/types/src/movable/_BuiltInContents.d.ts +2 -0
- package/types/src/movable/_DrawnBounds.d.ts +33 -0
- package/types/src/movable/_RotatedFrame.d.ts +20 -0
- package/types/src/movable/index.d.ts +6 -4
- package/types/src/numFmt/BuiltInFormats.d.ts +5 -0
- package/types/src/numFmt/_NumFmtUtils.d.ts +0 -1
- package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +6 -0
- package/types/src/outline/IOutline.d.ts +186 -0
- package/types/src/outline/Outline.d.ts +157 -0
- package/types/src/outline/index.d.ts +2 -0
- package/types/src/shape/GeometryPreset.d.ts +197 -0
- package/types/src/shape/IGeometry.d.ts +398 -0
- package/types/src/shape/IShape.d.ts +177 -204
- package/types/src/shape/Shape.d.ts +39 -13
- package/types/src/shape/ShapeStyleUtils.d.ts +48 -0
- package/types/src/shape/_Geometry.d.ts +14 -0
- package/types/src/shape/_GeometryLoader.d.ts +21 -0
- package/types/src/shape/_builtIn/_BuiltInChunks.d.ts +10 -0
- package/types/src/shape/_builtIn/_BuiltInDef.d.ts +9 -0
- package/types/src/shape/_builtIn/arrows.d.ts +6 -0
- package/types/src/shape/_builtIn/basic.d.ts +6 -0
- package/types/src/shape/_builtIn/callouts.d.ts +6 -0
- package/types/src/shape/_builtIn/flowchart.d.ts +6 -0
- package/types/src/shape/_builtIn/lines.d.ts +6 -0
- package/types/src/shape/_builtIn/math.d.ts +6 -0
- package/types/src/shape/_builtIn/other.d.ts +6 -0
- package/types/src/shape/_builtIn/rectangles.d.ts +6 -0
- package/types/src/shape/_builtIn/starsBanners.d.ts +6 -0
- package/types/src/shape/geometry/_strokeEnds.d.ts +7 -0
- package/types/src/shape/geometry/format.d.ts +3 -0
- package/types/src/shape/geometry/geometry.d.ts +84 -0
- package/types/src/shape/geometry/guides.d.ts +54 -0
- package/types/src/shape/geometry/handles.d.ts +14 -0
- package/types/src/shape/geometry/index.d.ts +7 -0
- package/types/src/shape/geometry/lineEnds.d.ts +53 -0
- package/types/src/shape/geometry/paths.d.ts +35 -0
- package/types/src/shape/geometry/segments.d.ts +114 -0
- package/types/src/shape/index.d.ts +2 -0
- package/types/src/sheet/ISheet.d.ts +10 -45
- package/types/src/sheet/Sheet.d.ts +19 -5
- package/types/src/sheet/SheetRange.d.ts +16 -1
- package/types/src/sheet/_SheetUtils.d.ts +10 -2
- package/types/src/sheetHeader/ISheetHeader.d.ts +4 -0
- package/types/src/sheetHeader/SheetCellHeader.d.ts +4 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +10 -0
- package/types/src/sheetHeader/_HeaderUtils.d.ts +3 -1
- package/types/src/sheetView/ISheetView.d.ts +17 -0
- package/types/src/sheetView/SheetView.d.ts +4 -0
- package/types/src/table/AnchoredTable.d.ts +7 -2
- package/types/src/text/IText.d.ts +182 -0
- package/types/src/text/ITextFrame.d.ts +85 -0
- package/types/src/text/TextRotation.d.ts +3 -3
- package/types/src/text/TextStacked.d.ts +2 -2
- package/types/src/theme/ITheme.d.ts +24 -0
- package/types/src/workbook/Workbook.d.ts +16 -5
- package/browser/cjs/CrcmEew-dr51xpf9.cjs +0 -1
- package/browser/cjs/CwzIjMpnMKeypivl.cjs +0 -1
- package/browser/cjs/D3Vlh9UOBKtvlXBL.cjs +0 -93
- package/types/src/movable/Control.d.ts +0 -55
- package/types/src/movable/IControl.d.ts +0 -86
- package/types/src/movable/IGroup.d.ts +0 -30
- package/types/src/shape/_ShapeXml.d.ts +0 -28
package/types/scripting.d.ts
CHANGED
|
@@ -3037,6 +3037,17 @@ declare global {
|
|
|
3037
3037
|
readonly isIBullet: true;
|
|
3038
3038
|
}
|
|
3039
3039
|
|
|
3040
|
+
/**
|
|
3041
|
+
* A button: runs its macro when clicked. Content type `'button'`.
|
|
3042
|
+
*/
|
|
3043
|
+
export interface IButton extends IFormControl, ICaptioned {
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
export namespace IButton {
|
|
3047
|
+
interface JSON extends IFormControl.JSON, ICaptioned.JSON {
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3040
3051
|
/**
|
|
3041
3052
|
* Calculation is the process of computing formulas and then displaying the results
|
|
3042
3053
|
* as values in the cells that contain the formulas.
|
|
@@ -4465,6 +4476,51 @@ declare global {
|
|
|
4465
4476
|
}
|
|
4466
4477
|
}
|
|
4467
4478
|
|
|
4479
|
+
/**
|
|
4480
|
+
* A control that shows text: a button's label, the text beside a check box, a group box's title.
|
|
4481
|
+
*/
|
|
4482
|
+
export interface ICaptioned {
|
|
4483
|
+
/**
|
|
4484
|
+
* Returns the text written on the control, or `null` if it has none.
|
|
4485
|
+
*/
|
|
4486
|
+
getCaption(): string | null;
|
|
4487
|
+
/**
|
|
4488
|
+
* Sets the text written on the control.
|
|
4489
|
+
*
|
|
4490
|
+
* @param caption The text, or `null` for none.
|
|
4491
|
+
*/
|
|
4492
|
+
setCaption(caption: string | null, options?: ITransaction.OperationOptions): this;
|
|
4493
|
+
/**
|
|
4494
|
+
* Returns the font the caption is drawn in, or `null` when the control has not said.
|
|
4495
|
+
*/
|
|
4496
|
+
getFont(): ICaptioned.Font | null;
|
|
4497
|
+
}
|
|
4498
|
+
|
|
4499
|
+
export namespace ICaptioned {
|
|
4500
|
+
/**
|
|
4501
|
+
* The font a caption is drawn in. Every field is optional; one the control has not said is the
|
|
4502
|
+
* host's default.
|
|
4503
|
+
*/
|
|
4504
|
+
interface Font {
|
|
4505
|
+
/** The family name. */
|
|
4506
|
+
name?: string;
|
|
4507
|
+
/** The size in points. */
|
|
4508
|
+
size?: number;
|
|
4509
|
+
/** @defaultValue false */
|
|
4510
|
+
bold?: boolean;
|
|
4511
|
+
/** @defaultValue false */
|
|
4512
|
+
italic?: boolean;
|
|
4513
|
+
/** A hex color (`#RRGGBB`). */
|
|
4514
|
+
color?: string;
|
|
4515
|
+
}
|
|
4516
|
+
interface JSON {
|
|
4517
|
+
/** The text written on the control. */
|
|
4518
|
+
caption?: string;
|
|
4519
|
+
/** The font the caption is drawn in. */
|
|
4520
|
+
font?: Font;
|
|
4521
|
+
}
|
|
4522
|
+
}
|
|
4523
|
+
|
|
4468
4524
|
/**
|
|
4469
4525
|
* A single unit of data and meta data within an `ICellRange`, located at a specific row and column.
|
|
4470
4526
|
*/
|
|
@@ -4935,17 +4991,17 @@ declare global {
|
|
|
4935
4991
|
/**
|
|
4936
4992
|
* Present when the cell's text is rotated (angle not a multiple of 180°): per-line rotated
|
|
4937
4993
|
* strip geometry — each laid-out line is an independent strip drawn at
|
|
4938
|
-
* {@link TextRotation.
|
|
4994
|
+
* {@link TextRotation.RotatedLayout.angle}, wrapped against the content height and marching
|
|
4939
4995
|
* horizontally. See {@link TextRotation.layoutLines} for the model.
|
|
4940
4996
|
*/
|
|
4941
|
-
rotation?: TextRotation.
|
|
4997
|
+
rotation?: TextRotation.RotatedLayout;
|
|
4942
4998
|
/**
|
|
4943
4999
|
* Present when the cell's text is stacked ("vertical text"): per-column slot geometry — every
|
|
4944
5000
|
* glyph upright in its own slot of the line pitch, columns from line breaks (and from wrapping
|
|
4945
5001
|
* against the content height), each column aligned on its own. See
|
|
4946
5002
|
* {@link TextStacked.layoutColumns} for the model. {@link bounds} is then the column group.
|
|
4947
5003
|
*/
|
|
4948
|
-
stacked?: TextStacked.
|
|
5004
|
+
stacked?: TextStacked.StackedLayout;
|
|
4949
5005
|
}
|
|
4950
5006
|
/**
|
|
4951
5007
|
* Expansive way to set cell updates options.
|
|
@@ -5406,6 +5462,12 @@ declare global {
|
|
|
5406
5462
|
* {@link https://support.microsoft.com/en-us/office/change-the-column-width-and-row-height-72f5e3cc-994d-43e8-ae58-9774a0905f46}
|
|
5407
5463
|
*/
|
|
5408
5464
|
getSizeRelative(): number;
|
|
5465
|
+
/**
|
|
5466
|
+
* The outline level, `0` to `7`. `0` is not grouped; `1` is the outermost group.
|
|
5467
|
+
*
|
|
5468
|
+
* @see `IOutline`
|
|
5469
|
+
*/
|
|
5470
|
+
getOutlineLevel(): number;
|
|
5409
5471
|
/**
|
|
5410
5472
|
* For runtime introspection.
|
|
5411
5473
|
*/
|
|
@@ -5455,6 +5517,22 @@ declare global {
|
|
|
5455
5517
|
* {@link ICellHeader.getSizeRelative()}
|
|
5456
5518
|
*/
|
|
5457
5519
|
relativeSize?: boolean;
|
|
5520
|
+
/**
|
|
5521
|
+
* The outline level, `0` to `7`, or a function of the current one.
|
|
5522
|
+
*
|
|
5523
|
+
* @remarks
|
|
5524
|
+
* To group or ungroup, prefer `ICellRange.group` and `ICellRange.ungroup`.
|
|
5525
|
+
*
|
|
5526
|
+
* @see
|
|
5527
|
+
* {@link ICellHeader.getOutlineLevel()}
|
|
5528
|
+
*/
|
|
5529
|
+
outlineLevel?: number | ((level: number) => number);
|
|
5530
|
+
/**
|
|
5531
|
+
* Whether the group this header is the summary of is collapsed.
|
|
5532
|
+
*
|
|
5533
|
+
* @internal
|
|
5534
|
+
*/
|
|
5535
|
+
collapsed?: boolean;
|
|
5458
5536
|
}
|
|
5459
5537
|
/**
|
|
5460
5538
|
* Stores information about header runs.
|
|
@@ -5473,11 +5551,11 @@ declare global {
|
|
|
5473
5551
|
*/
|
|
5474
5552
|
h?: boolean;
|
|
5475
5553
|
/**
|
|
5476
|
-
*
|
|
5554
|
+
* Outline level, `1` to `7`. Absent when not grouped.
|
|
5477
5555
|
*/
|
|
5478
5556
|
l?: number;
|
|
5479
5557
|
/**
|
|
5480
|
-
* Collapsed
|
|
5558
|
+
* Collapsed. Set on the summary header of a collapsed group.
|
|
5481
5559
|
*/
|
|
5482
5560
|
cl?: boolean;
|
|
5483
5561
|
/**
|
|
@@ -6788,6 +6866,64 @@ declare global {
|
|
|
6788
6866
|
* @returns The current `ICellRange`.
|
|
6789
6867
|
*/
|
|
6790
6868
|
autoFit(options?: ICellRange.AutoFitOptions): this;
|
|
6869
|
+
/**
|
|
6870
|
+
* Groups the rows or columns of the range: each one moves one outline level deeper.
|
|
6871
|
+
*
|
|
6872
|
+
* @param axis Whether to group the rows or the columns. When omitted, entire rows group the rows,
|
|
6873
|
+
* entire columns group the columns, and any other range groups both.
|
|
6874
|
+
* @returns The current `ICellRange`.
|
|
6875
|
+
* @throws `Error` If a row or column in the range is already at the deepest level, `7`. Nothing is
|
|
6876
|
+
* grouped.
|
|
6877
|
+
*
|
|
6878
|
+
* @see {@link ISheet.getOutline}
|
|
6879
|
+
*/
|
|
6880
|
+
group(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
|
|
6881
|
+
/**
|
|
6882
|
+
* Ungroups the rows or columns of the range: each grouped one moves one outline level out.
|
|
6883
|
+
* Rows or columns that are not grouped are left alone.
|
|
6884
|
+
*
|
|
6885
|
+
* @param axis Whether to ungroup the rows or the columns. When omitted, chosen as for
|
|
6886
|
+
* {@link group}.
|
|
6887
|
+
* @returns The current `ICellRange`.
|
|
6888
|
+
*/
|
|
6889
|
+
ungroup(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
|
|
6890
|
+
/**
|
|
6891
|
+
* Expands the groups the range selects: those whose summary row or column is in the range or,
|
|
6892
|
+
* when there are none, the innermost groups the range meets.
|
|
6893
|
+
*
|
|
6894
|
+
* @param axis Whether to expand row groups or column groups. Inferred when the range is entire
|
|
6895
|
+
* rows or entire columns; required otherwise.
|
|
6896
|
+
* @returns The current `ICellRange`.
|
|
6897
|
+
* @throws `Error` If the axis is not given and cannot be inferred.
|
|
6898
|
+
*
|
|
6899
|
+
* @remarks
|
|
6900
|
+
* Groups nested inside that are collapsed stay collapsed.
|
|
6901
|
+
*/
|
|
6902
|
+
showGroupDetails(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
|
|
6903
|
+
/**
|
|
6904
|
+
* Collapses the groups the range selects, chosen as for {@link showGroupDetails}: their details are
|
|
6905
|
+
* hidden.
|
|
6906
|
+
*
|
|
6907
|
+
* @param axis Whether to collapse row groups or column groups. Inferred as for
|
|
6908
|
+
* {@link showGroupDetails}.
|
|
6909
|
+
* @returns The current `ICellRange`.
|
|
6910
|
+
* @throws `Error` If the axis is not given and cannot be inferred.
|
|
6911
|
+
*/
|
|
6912
|
+
hideGroupDetails(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
|
|
6913
|
+
/**
|
|
6914
|
+
* Removes the outline levels from the rows and columns of the range. Hidden rows and columns
|
|
6915
|
+
* stay hidden.
|
|
6916
|
+
*
|
|
6917
|
+
* @param axes Which levels to remove. Default `IRange.AxisSelection.Both`.
|
|
6918
|
+
* @returns The current `ICellRange`.
|
|
6919
|
+
*
|
|
6920
|
+
* @remarks
|
|
6921
|
+
* The counterpart of Excel's `Range.ClearOutline`: both axes over the range's rows and columns,
|
|
6922
|
+
* so entire rows also clear every column's levels unless `axes` names the rows, and a single
|
|
6923
|
+
* cell clears the whole sheet. To outline a sheet from its formulas see
|
|
6924
|
+
* {@link IOutline.autoOutline}.
|
|
6925
|
+
*/
|
|
6926
|
+
clearGroups(axes?: IRange.AxisSelection, options?: ITransaction.OperationOptions): this;
|
|
6791
6927
|
/**
|
|
6792
6928
|
* Clear the range.
|
|
6793
6929
|
*
|
|
@@ -7169,11 +7305,17 @@ declare global {
|
|
|
7169
7305
|
*/
|
|
7170
7306
|
isContentful(features?: ICellRange.Feature | readonly ICellRange.Feature[]): boolean;
|
|
7171
7307
|
/**
|
|
7172
|
-
* Returns `true` if the range
|
|
7308
|
+
* Returns `true` if the range is entire rows, such as `2:4`: it spans every column of the sheet.
|
|
7309
|
+
*
|
|
7310
|
+
* @remarks
|
|
7311
|
+
* The counterpart of Office Scripts' `isEntireRow`.
|
|
7173
7312
|
*/
|
|
7174
7313
|
isEntireRows(): boolean;
|
|
7175
7314
|
/**
|
|
7176
|
-
* Returns `true` if the range
|
|
7315
|
+
* Returns `true` if the range is entire columns, such as `B:D`: it spans every row of the sheet.
|
|
7316
|
+
*
|
|
7317
|
+
* @remarks
|
|
7318
|
+
* The counterpart of Office Scripts' `isEntireColumn`.
|
|
7177
7319
|
*/
|
|
7178
7320
|
isEntireColumns(): boolean;
|
|
7179
7321
|
/**
|
|
@@ -8247,7 +8389,7 @@ declare global {
|
|
|
8247
8389
|
* Represents an immutable reference to an `ICellRange`, capturing its content and metadata.
|
|
8248
8390
|
* It may include complex objects such as tables, movables, images, listeners, or other items.
|
|
8249
8391
|
*
|
|
8250
|
-
* `ISnapshot` can be provided to `ICellRange.copyFrom
|
|
8392
|
+
* `ISnapshot` can be provided to `ICellRange.copyFrom`.
|
|
8251
8393
|
*/
|
|
8252
8394
|
interface ISnapshot<T = any, J = any> {
|
|
8253
8395
|
/**
|
|
@@ -8992,35 +9134,35 @@ declare global {
|
|
|
8992
9134
|
*/
|
|
8993
9135
|
isOverlapping(): boolean;
|
|
8994
9136
|
/**
|
|
8995
|
-
* Returns `true` if
|
|
9137
|
+
* Returns `true` if every range is entire rows, such as `2:4`.
|
|
8996
9138
|
*
|
|
8997
9139
|
* @remarks
|
|
8998
|
-
*
|
|
8999
|
-
*
|
|
9140
|
+
* {@link isEntireRowsAny} asks the same of any one range.
|
|
9141
|
+
*
|
|
9142
|
+
* @see {@link ICellRange.isEntireRows}
|
|
9000
9143
|
*/
|
|
9001
9144
|
isEntireRows(): boolean;
|
|
9002
9145
|
/**
|
|
9003
|
-
* Returns `true` if any
|
|
9146
|
+
* Returns `true` if any range is entire rows, such as `2:4`.
|
|
9004
9147
|
*
|
|
9005
9148
|
* @remarks
|
|
9006
|
-
*
|
|
9007
|
-
* ranges have isEntireRows `true`.
|
|
9149
|
+
* {@link isEntireRows} asks the same of every range.
|
|
9008
9150
|
*/
|
|
9009
9151
|
isEntireRowsAny(): boolean;
|
|
9010
9152
|
/**
|
|
9011
|
-
* Returns `true` if
|
|
9153
|
+
* Returns `true` if every range is entire columns, such as `B:D`.
|
|
9012
9154
|
*
|
|
9013
9155
|
* @remarks
|
|
9014
|
-
*
|
|
9015
|
-
*
|
|
9156
|
+
* {@link isEntireColumnsAny} asks the same of any one range.
|
|
9157
|
+
*
|
|
9158
|
+
* @see {@link ICellRange.isEntireColumns}
|
|
9016
9159
|
*/
|
|
9017
9160
|
isEntireColumns(): boolean;
|
|
9018
9161
|
/**
|
|
9019
|
-
* Returns `true` if any
|
|
9162
|
+
* Returns `true` if any range is entire columns, such as `B:D`.
|
|
9020
9163
|
*
|
|
9021
9164
|
* @remarks
|
|
9022
|
-
*
|
|
9023
|
-
* ranges have isEntireColumns `true`.
|
|
9165
|
+
* {@link isEntireColumns} asks the same of every range.
|
|
9024
9166
|
*/
|
|
9025
9167
|
isEntireColumnsAny(): boolean;
|
|
9026
9168
|
/**
|
|
@@ -9526,6 +9668,43 @@ declare global {
|
|
|
9526
9668
|
readonly isIChartCollection: true;
|
|
9527
9669
|
}
|
|
9528
9670
|
|
|
9671
|
+
/**
|
|
9672
|
+
* A check box: on, off or mixed. Content type `'checkBox'`.
|
|
9673
|
+
*/
|
|
9674
|
+
export interface ICheckBox extends IFormControl, ICaptioned, ILinked {
|
|
9675
|
+
/**
|
|
9676
|
+
* Returns `true` if the box is checked.
|
|
9677
|
+
*/
|
|
9678
|
+
isChecked(): boolean;
|
|
9679
|
+
/**
|
|
9680
|
+
* Sets whether the box is checked. Clears {@link isMixed}.
|
|
9681
|
+
*/
|
|
9682
|
+
setChecked(checked: boolean, options?: ITransaction.OperationOptions): this;
|
|
9683
|
+
/**
|
|
9684
|
+
* Returns `true` if the box shows the mixed (neither) state.
|
|
9685
|
+
*/
|
|
9686
|
+
isMixed(): boolean;
|
|
9687
|
+
/**
|
|
9688
|
+
* Sets whether the box shows the mixed state.
|
|
9689
|
+
*/
|
|
9690
|
+
setMixed(mixed: boolean, options?: ITransaction.OperationOptions): this;
|
|
9691
|
+
}
|
|
9692
|
+
|
|
9693
|
+
export namespace ICheckBox {
|
|
9694
|
+
interface JSON extends IFormControl.JSON, ICaptioned.JSON, ILinked.JSON {
|
|
9695
|
+
/**
|
|
9696
|
+
* `true` if the box is checked.
|
|
9697
|
+
* @defaultValue false
|
|
9698
|
+
*/
|
|
9699
|
+
checked?: boolean;
|
|
9700
|
+
/**
|
|
9701
|
+
* `true` if the box shows the mixed state. Wins over `checked`.
|
|
9702
|
+
* @defaultValue false
|
|
9703
|
+
*/
|
|
9704
|
+
mixed?: boolean;
|
|
9705
|
+
}
|
|
9706
|
+
}
|
|
9707
|
+
|
|
9529
9708
|
/**
|
|
9530
9709
|
* Interface used for all ICollections.
|
|
9531
9710
|
*
|
|
@@ -11394,6 +11573,11 @@ declare global {
|
|
|
11394
11573
|
* **UI Guidance:**
|
|
11395
11574
|
* - Show "Ignore Blanks" checkbox for DataValidation (common use case)
|
|
11396
11575
|
* - Hide for ConditionalFormat/TableFilter (default behavior is usually correct)
|
|
11576
|
+
*
|
|
11577
|
+
* **What is blank:**
|
|
11578
|
+
* - Filters and ConditionalFormat: an empty cell, a `""` result, or a string of only spaces
|
|
11579
|
+
* (Excel's `LEN(TRIM(x))=0`). A tab, a non-breaking space, `0` and an error are values.
|
|
11580
|
+
* - DataValidation: an empty cell only. A `""` result is a value and is judged.
|
|
11397
11581
|
*/
|
|
11398
11582
|
isIncludeBlanks(): boolean;
|
|
11399
11583
|
/**
|
|
@@ -11719,6 +11903,7 @@ declare global {
|
|
|
11719
11903
|
readonly NextMonth: "nextMonth";
|
|
11720
11904
|
readonly NextQuarter: "nextQuarter";
|
|
11721
11905
|
readonly NextWeek: "nextWeek";
|
|
11906
|
+
readonly NextYear: "nextYear";
|
|
11722
11907
|
readonly Null: "null";
|
|
11723
11908
|
readonly Q1: "Q1";
|
|
11724
11909
|
readonly Q2: "Q2";
|
|
@@ -11727,6 +11912,7 @@ declare global {
|
|
|
11727
11912
|
readonly ThisMonth: "thisMonth";
|
|
11728
11913
|
readonly ThisQuarter: "thisQuarter";
|
|
11729
11914
|
readonly ThisWeek: "thisWeek";
|
|
11915
|
+
readonly ThisYear: "thisYear";
|
|
11730
11916
|
readonly Today: "today";
|
|
11731
11917
|
readonly Tomorrow: "tomorrow";
|
|
11732
11918
|
readonly YearToDate: "yearToDate";
|
|
@@ -11799,9 +11985,30 @@ declare global {
|
|
|
11799
11985
|
}
|
|
11800
11986
|
interface InSetOption {
|
|
11801
11987
|
/**
|
|
11802
|
-
*
|
|
11988
|
+
* OOXML's `filters/@blank`, carried for the file. The condition's `includeBlanks` is what
|
|
11989
|
+
* keeps a blank row: a reader sets both, the engine reads `includeBlanks`.
|
|
11803
11990
|
*/
|
|
11804
11991
|
blank?: boolean;
|
|
11992
|
+
/**
|
|
11993
|
+
* Match string items against the text a cell SHOWS rather than the value it holds.
|
|
11994
|
+
*
|
|
11995
|
+
* @defaultValue `false`
|
|
11996
|
+
*
|
|
11997
|
+
* @remarks
|
|
11998
|
+
* The identity is the value: `items: [1]` keeps every cell holding 1 however it is
|
|
11999
|
+
* formatted, and `items: ['1']` keeps the cells holding the text `1`. Under `byDisplay` a
|
|
12000
|
+
* string item is instead the displayed text, which is what a spreadsheet's filter list
|
|
12001
|
+
* holds: `'1.50'` keeps a cell holding 1.5 under `0.00`, and `'$1'` one under `$0`. A typed
|
|
12002
|
+
* item is matched by value in both modes.
|
|
12003
|
+
*
|
|
12004
|
+
* `byDisplay` is a filter's option, the one the column dropdown sets. A conditional format
|
|
12005
|
+
* or a data validation has no displayed text to read, so the flag is inert there. Under a
|
|
12006
|
+
* filter it also widens what is blank: a string of only spaces shows as nothing and is
|
|
12007
|
+
* settled as a blank cell, and a whitespace-only item means `includeBlanks`. A port of
|
|
12008
|
+
* Office Scripts' `applyValuesFilter` or Apps Script's `setVisibleValues` passes strings
|
|
12009
|
+
* and sets it.
|
|
12010
|
+
*/
|
|
12011
|
+
byDisplay?: boolean;
|
|
11805
12012
|
/**
|
|
11806
12013
|
* The values that match: an array, or a list validation's source as formula text.
|
|
11807
12014
|
*
|
|
@@ -11817,7 +12024,7 @@ declare global {
|
|
|
11817
12024
|
* evaluated for each cell, so a relative reference gives each cell its own list, and the
|
|
11818
12025
|
* source follows inserts and deletes as any formula does.
|
|
11819
12026
|
*
|
|
11820
|
-
* An array
|
|
12027
|
+
* An array's items match by value, or by displayed text under {@link byDisplay}.
|
|
11821
12028
|
*/
|
|
11822
12029
|
items?: Scalar[] | string;
|
|
11823
12030
|
/**
|
|
@@ -11894,17 +12101,17 @@ declare global {
|
|
|
11894
12101
|
*/
|
|
11895
12102
|
toType<T extends InteropScalar>(value: Scalar, type: InteropScalarType): T;
|
|
11896
12103
|
/**
|
|
11897
|
-
* The text the current cell shows,
|
|
12104
|
+
* The text the current cell shows, under a filter; `null` elsewhere.
|
|
11898
12105
|
*
|
|
11899
12106
|
* @remarks
|
|
11900
|
-
*
|
|
11901
|
-
*
|
|
11902
|
-
*
|
|
11903
|
-
*
|
|
12107
|
+
* Read by an operator asked to match displayed text ({@link InSetOption.byDisplay}): a cell
|
|
12108
|
+
* holding `1.5` and showing `1.50` is the item `1.50`. A conditional format or a data
|
|
12109
|
+
* validation has no displayed text, so this answers `null` there and the operator compares
|
|
12110
|
+
* the value.
|
|
11904
12111
|
*
|
|
11905
12112
|
* Formatted on demand, so an operator that never asks pays nothing.
|
|
11906
12113
|
*/
|
|
11907
|
-
|
|
12114
|
+
getDisplayText(): string | null;
|
|
11908
12115
|
/**
|
|
11909
12116
|
* Resolves a condition input to a fully-built ICondition instance.
|
|
11910
12117
|
*
|
|
@@ -12331,26 +12538,6 @@ declare global {
|
|
|
12331
12538
|
* with no explicit `hasHeader` evaluates the entire range, header row included.
|
|
12332
12539
|
*/
|
|
12333
12540
|
hasHeader?: boolean;
|
|
12334
|
-
/**
|
|
12335
|
-
* What a filter's list items and `equalTo` text are compared with: the text a cell shows, or
|
|
12336
|
-
* the value it holds.
|
|
12337
|
-
*
|
|
12338
|
-
* @defaultValue `'text'`
|
|
12339
|
-
*
|
|
12340
|
-
* @remarks
|
|
12341
|
-
* `'text'` is a spreadsheet's AutoFilter: the item `1.50` keeps a cell holding `1.5` under the
|
|
12342
|
-
* format `0.00`, and the item `1.5` does not. A number passed as an item or operand still
|
|
12343
|
-
* matches the cells holding that number, however they are formatted.
|
|
12344
|
-
*
|
|
12345
|
-
* `'value'` compares typed values only, so the text `"1"` never matches the number `1`.
|
|
12346
|
-
*
|
|
12347
|
-
* Comparisons (`>`, `between`), Top N, averages, date periods and date groups read the value
|
|
12348
|
-
* either way, and the text operators (contains, starts with, ends with) only ever match a
|
|
12349
|
-
* cell that holds text.
|
|
12350
|
-
*
|
|
12351
|
-
* Read by filters. Conditional formats and data validations match by value.
|
|
12352
|
-
*/
|
|
12353
|
-
match?: 'text' | 'value';
|
|
12354
12541
|
}
|
|
12355
12542
|
/**
|
|
12356
12543
|
* JSON for serialization and round-tripping.
|
|
@@ -12944,87 +13131,6 @@ declare global {
|
|
|
12944
13131
|
}
|
|
12945
13132
|
}
|
|
12946
13133
|
|
|
12947
|
-
/**
|
|
12948
|
-
* Interface for working with form controls — a button, a checkbox, a scrollbar placed on a sheet.
|
|
12949
|
-
*
|
|
12950
|
-
* **PLACEHOLDER** - This is under development and not made public yet.
|
|
12951
|
-
*/
|
|
12952
|
-
export interface IControl extends IModel, IMovable.IContent {
|
|
12953
|
-
/**
|
|
12954
|
-
* Returns the id of the shape that draws this control, or `null` if it has none.
|
|
12955
|
-
*
|
|
12956
|
-
* @remarks
|
|
12957
|
-
* The shape lives in the sheet's legacy drawing, which is still opaque markup — this is the only
|
|
12958
|
-
* link between the two, and it is what lets the shape be kept over the same cells as the control
|
|
12959
|
-
* when rows and columns move.
|
|
12960
|
-
*/
|
|
12961
|
-
getShapeId(): number | null;
|
|
12962
|
-
/**
|
|
12963
|
-
* Returns the markup of the part describing the control, or `null` if none was captured.
|
|
12964
|
-
*
|
|
12965
|
-
* @remarks
|
|
12966
|
-
* Read-only, and the one escape hatch for what the control does not model yet: it is the
|
|
12967
|
-
* `<formControlPr>` the control was read from — its kind, its linked cell, its macro. It will be
|
|
12968
|
-
* removed when the control is modeled.
|
|
12969
|
-
*/
|
|
12970
|
-
getXML(): string | null;
|
|
12971
|
-
toJSON(toResourceId?: (resource: IResource) => number | null): IControl.JSON | null;
|
|
12972
|
-
/**
|
|
12973
|
-
* Deletes the control, and with it the movable that places it.
|
|
12974
|
-
*/
|
|
12975
|
-
delete(options?: ITransaction.OperationOptions): void;
|
|
12976
|
-
/** For runtime type checking. */
|
|
12977
|
-
readonly isIControl: true;
|
|
12978
|
-
}
|
|
12979
|
-
|
|
12980
|
-
/**
|
|
12981
|
-
* {@inheritDoc IControl}
|
|
12982
|
-
* @see
|
|
12983
|
-
* ### **Interface**
|
|
12984
|
-
*
|
|
12985
|
-
* {@link IControl}
|
|
12986
|
-
*/
|
|
12987
|
-
export namespace IControl {
|
|
12988
|
-
interface JSON {
|
|
12989
|
-
/**
|
|
12990
|
-
* The id of the shape that draws this control.
|
|
12991
|
-
*
|
|
12992
|
-
* @see {@link IControl.getShapeId}
|
|
12993
|
-
*/
|
|
12994
|
-
shapeId?: number;
|
|
12995
|
-
/**
|
|
12996
|
-
* The control's own properties, as they were read.
|
|
12997
|
-
*
|
|
12998
|
-
* @remarks
|
|
12999
|
-
* Opaque. What they describe — a button's macro, a checkbox's linked cell — has no model yet,
|
|
13000
|
-
* so they are held as they were read and written back unchanged. The position is *not* among
|
|
13001
|
-
* them: it is the movable's own anchor, and is written from that.
|
|
13002
|
-
*/
|
|
13003
|
-
props?: Record<string, string>;
|
|
13004
|
-
/**
|
|
13005
|
-
* Anything else the properties contained, as markup.
|
|
13006
|
-
*
|
|
13007
|
-
* @remarks
|
|
13008
|
-
* Empty for every control this version has seen — a control's properties are attributes and an
|
|
13009
|
-
* anchor, and the anchor is the movable's. Kept so a producer that writes more than that does
|
|
13010
|
-
* not lose it.
|
|
13011
|
-
*/
|
|
13012
|
-
xml?: string;
|
|
13013
|
-
/**
|
|
13014
|
-
* The part describing what kind of control this is and how it behaves.
|
|
13015
|
-
*
|
|
13016
|
-
* @remarks
|
|
13017
|
-
* A control is drawn by a shape in the sheet's legacy drawing ({@link ISheet.LegacyDrawingJSON})
|
|
13018
|
-
* and described by a part of its own; this is that part.
|
|
13019
|
-
*/
|
|
13020
|
-
part?: IEmbeddedPart.JSON;
|
|
13021
|
-
}
|
|
13022
|
-
interface Events extends IModel.Events {
|
|
13023
|
-
}
|
|
13024
|
-
interface IListeners extends IListener.Callbacks<IControl, IControl.Events> {
|
|
13025
|
-
}
|
|
13026
|
-
}
|
|
13027
|
-
|
|
13028
13134
|
/**
|
|
13029
13135
|
* A data validation: a rule that a cell's value must satisfy, over one or more ranges of a sheet,
|
|
13030
13136
|
* with the prompt shown when the cell is selected and the alert for a value that fails.
|
|
@@ -13504,6 +13610,42 @@ declare global {
|
|
|
13504
13610
|
}
|
|
13505
13611
|
}
|
|
13506
13612
|
|
|
13613
|
+
/**
|
|
13614
|
+
* A drop-down. Content type `'dropDown'`.
|
|
13615
|
+
*/
|
|
13616
|
+
export interface IDropDown extends IListControl {
|
|
13617
|
+
/**
|
|
13618
|
+
* Returns how the drop-down behaves: a list to pick from, a list that can also be typed into, or
|
|
13619
|
+
* a plain list box. `null` if the control has not said.
|
|
13620
|
+
*/
|
|
13621
|
+
getDropStyle(): IDropDown.DropStyle | null;
|
|
13622
|
+
/**
|
|
13623
|
+
* Returns how many items the drop-down shows at once, or `null` if the control has not said.
|
|
13624
|
+
*/
|
|
13625
|
+
getDropLines(): number | null;
|
|
13626
|
+
}
|
|
13627
|
+
|
|
13628
|
+
export namespace IDropDown {
|
|
13629
|
+
/**
|
|
13630
|
+
* How a drop-down behaves.
|
|
13631
|
+
*/
|
|
13632
|
+
const DropStyle: {
|
|
13633
|
+
/** A list to pick from. */
|
|
13634
|
+
readonly Combo: "combo";
|
|
13635
|
+
/** A list that can also be typed into. */
|
|
13636
|
+
readonly ComboEdit: "comboEdit";
|
|
13637
|
+
/** A list box that does not drop. */
|
|
13638
|
+
readonly Simple: "simple";
|
|
13639
|
+
};
|
|
13640
|
+
type DropStyle = typeof DropStyle[keyof typeof DropStyle];
|
|
13641
|
+
interface JSON extends IListControl.JSON {
|
|
13642
|
+
/** How the drop-down behaves. */
|
|
13643
|
+
dropStyle?: DropStyle;
|
|
13644
|
+
/** How many items the drop-down shows at once. */
|
|
13645
|
+
dropLines?: number;
|
|
13646
|
+
}
|
|
13647
|
+
}
|
|
13648
|
+
|
|
13507
13649
|
/**
|
|
13508
13650
|
* *** **PLACEHOLDER** - Not yet implemented.
|
|
13509
13651
|
*
|
|
@@ -14385,7 +14527,7 @@ declare global {
|
|
|
14385
14527
|
* @remarks
|
|
14386
14528
|
* * Not support in cells. This is currently only support in drawML (charts, shapes, powerpoint).
|
|
14387
14529
|
*/
|
|
14388
|
-
readonly Image: "
|
|
14530
|
+
readonly Image: "image";
|
|
14389
14531
|
/**
|
|
14390
14532
|
* An Image.
|
|
14391
14533
|
* @remarks
|
|
@@ -14872,22 +15014,57 @@ declare global {
|
|
|
14872
15014
|
}
|
|
14873
15015
|
interface PatternJSON extends PatternProperties<string> {
|
|
14874
15016
|
}
|
|
15017
|
+
/**
|
|
15018
|
+
* Insets of a rectangle from the edges of another, as percentages of its width and height
|
|
15019
|
+
* (an inset of `-10` on the right extends past the edge by a tenth of the width).
|
|
15020
|
+
*/
|
|
15021
|
+
interface RectInsets {
|
|
15022
|
+
left?: number;
|
|
15023
|
+
top?: number;
|
|
15024
|
+
right?: number;
|
|
15025
|
+
bottom?: number;
|
|
15026
|
+
}
|
|
15027
|
+
/** How a tiled image fill repeats (DrawingML `tile`). */
|
|
15028
|
+
interface ImageTileProperties {
|
|
15029
|
+
/** Offset of the first tile from the fill rectangle's origin, in pixels. */
|
|
15030
|
+
offsetX?: number;
|
|
15031
|
+
offsetY?: number;
|
|
15032
|
+
/** Scale of each tile as a percentage (100 = natural size). */
|
|
15033
|
+
scaleX?: number;
|
|
15034
|
+
scaleY?: number;
|
|
15035
|
+
/** Which tiles are mirrored: `none`, `x`, `y` or `xy`. */
|
|
15036
|
+
flip?: string;
|
|
15037
|
+
/** Where the tiles align in the shape: `tl`, `t`, `tr`, `l`, `ctr`, `r`, `bl`, `b`, `br`. */
|
|
15038
|
+
alignment?: string;
|
|
15039
|
+
}
|
|
15040
|
+
/**
|
|
15041
|
+
* An image fill: a workbook resource stretched over the shape or tiled across it.
|
|
15042
|
+
*
|
|
15043
|
+
* @remarks
|
|
15044
|
+
* `resId` names the resource the way `IPicture.JSON.resId` names a placed picture's image and,
|
|
15045
|
+
* like it, is meaningful only inside the persist scope the JSON was made in. A shape resolves it
|
|
15046
|
+
* to the resource when it is created and names the resource again when it is serialized.
|
|
15047
|
+
*/
|
|
14875
15048
|
interface ImageProperties extends IFill.Properties {
|
|
15049
|
+
/** The resource id of the image. */
|
|
15050
|
+
resId?: number;
|
|
15051
|
+
/** The part of the image used (`srcRect`), as insets from its edges. Absent for the whole image. */
|
|
15052
|
+
sourceRect?: RectInsets;
|
|
14876
15053
|
/**
|
|
14877
|
-
*
|
|
14878
|
-
*
|
|
14879
|
-
* @remarks
|
|
14880
|
-
* This is a placeholder
|
|
14881
|
-
*/
|
|
14882
|
-
ref?: any;
|
|
14883
|
-
/**
|
|
14884
|
-
* Indicates whether the image fill should be tiled.
|
|
15054
|
+
* The image is stretched to a rectangle inset from the shape's bounds (`stretch/fillRect`);
|
|
15055
|
+
* `{}` for the whole shape. Absent when the image is tiled.
|
|
14885
15056
|
*/
|
|
14886
|
-
|
|
15057
|
+
stretch?: RectInsets;
|
|
15058
|
+
/** The image is tiled (`tile`). Absent when it is stretched. */
|
|
15059
|
+
tile?: ImageTileProperties;
|
|
14887
15060
|
/**
|
|
14888
|
-
* The resolution
|
|
15061
|
+
* The resolution the image is rendered at, in dots per inch (`dpi`); `0` for the image's own.
|
|
14889
15062
|
*/
|
|
14890
15063
|
dpi?: number;
|
|
15064
|
+
/** The compression the image was stored for (`blip/@cstate`): `email`, `screen`, `print`, `hqprint`, `none`. */
|
|
15065
|
+
compressionState?: string;
|
|
15066
|
+
/** `blip/extLst` as the file states it: an opaque DrawingML fragment, written back as it was. */
|
|
15067
|
+
extLst?: string;
|
|
14891
15068
|
}
|
|
14892
15069
|
interface ImageJSON extends ImageProperties {
|
|
14893
15070
|
}
|
|
@@ -14993,33 +15170,71 @@ declare global {
|
|
|
14993
15170
|
* @defaultValue `10000`
|
|
14994
15171
|
*/
|
|
14995
15172
|
limit?: number;
|
|
15173
|
+
/**
|
|
15174
|
+
* Group the column by the text its cells SHOW rather than by value, as a spreadsheet's filter
|
|
15175
|
+
* list does: `1` under `$0` and under `0%` are two items, and a string of only spaces is a
|
|
15176
|
+
* blank. The items are then the texts an `InSet { byDisplay: true }` condition holds.
|
|
15177
|
+
*
|
|
15178
|
+
* @defaultValue `false` — by value, the identity {@link ICondition.InSetOption.items} has.
|
|
15179
|
+
*/
|
|
15180
|
+
byDisplay?: boolean;
|
|
14996
15181
|
}
|
|
14997
15182
|
/**
|
|
14998
15183
|
* One distinct value of a filtered column.
|
|
14999
15184
|
*/
|
|
15000
15185
|
interface Item {
|
|
15001
15186
|
/**
|
|
15002
|
-
* The
|
|
15003
|
-
*
|
|
15187
|
+
* The item's label: by value, the value as `General` shows it (a date as its date format
|
|
15188
|
+
* does); by display, the text the cells show, which is then the item an
|
|
15189
|
+
* `InSet { byDisplay: true }` condition holds.
|
|
15004
15190
|
*/
|
|
15005
15191
|
text: string;
|
|
15006
|
-
/** The value of the first cell showing `text`; the item's place in the order. */
|
|
15192
|
+
/** The value, or by display the value of the first cell showing `text`; the item's place in the order. */
|
|
15007
15193
|
value: Scalar;
|
|
15008
15194
|
/** The rows holding the value. */
|
|
15009
15195
|
count: number;
|
|
15010
15196
|
/** Whether at least one row holding the value passes the filters. */
|
|
15011
15197
|
checked: boolean;
|
|
15012
15198
|
}
|
|
15199
|
+
/**
|
|
15200
|
+
* One level of the date tree {@link Items.dates}: the nodes, each the run of items it spans,
|
|
15201
|
+
* in the order the items are listed.
|
|
15202
|
+
*/
|
|
15203
|
+
interface DateLevel {
|
|
15204
|
+
/** The part this level groups by. */
|
|
15205
|
+
group: ICondition.DateItemGroupingType;
|
|
15206
|
+
/**
|
|
15207
|
+
* The nodes. A run's `value` is the group item selecting exactly its items: the parts down
|
|
15208
|
+
* to this level (`{ group: 'month', year: 1995, month: 10 }`).
|
|
15209
|
+
*/
|
|
15210
|
+
runs: readonly RunCoordValue<ICondition.DateGroupItem>[];
|
|
15211
|
+
}
|
|
15013
15212
|
/**
|
|
15014
15213
|
* What {@link IFilter.getItems} answers.
|
|
15015
15214
|
*/
|
|
15016
15215
|
interface Items {
|
|
15017
15216
|
/**
|
|
15018
|
-
* The distinct
|
|
15019
|
-
*
|
|
15217
|
+
* The distinct values, or the distinct texts under `byDisplay`. The dates come first (the tree in {@link dates}), newest year first
|
|
15218
|
+
* and ascending within a year, as Excel's date tree lists them; the rest follow, ascending
|
|
15219
|
+
* by the workbook's comparison of their values. Values that show alike are one item. Blanks
|
|
15220
|
+
* are not an item.
|
|
15020
15221
|
*/
|
|
15021
15222
|
items: readonly Item[];
|
|
15022
|
-
/**
|
|
15223
|
+
/**
|
|
15224
|
+
* The date tree over the leading items, one level per entry: year, month and day, then hour,
|
|
15225
|
+
* minute and second when a date carries a time. Absent when the column shows no date.
|
|
15226
|
+
*
|
|
15227
|
+
* @remarks
|
|
15228
|
+
* A date is a number shown under a date format; a time-only format is a number. Every level
|
|
15229
|
+
* covers the same items, `0` to the last date, and a finer level's runs nest inside the
|
|
15230
|
+
* coarser's. A node's checkbox is the state of its items; a checked node is written as its
|
|
15231
|
+
* run's value, in {@link ICondition.InSetOption.dateGroups}.
|
|
15232
|
+
*/
|
|
15233
|
+
dates?: readonly DateLevel[];
|
|
15234
|
+
/**
|
|
15235
|
+
* Whether a listed row is blank: empty, or showing nothing (a `""` result, a string of only
|
|
15236
|
+
* spaces). The same rows `includeBlanks` keeps.
|
|
15237
|
+
*/
|
|
15023
15238
|
hasBlanks: boolean;
|
|
15024
15239
|
/** Whether at least one blank row passes the filters. */
|
|
15025
15240
|
blanksChecked: boolean;
|
|
@@ -15027,6 +15242,12 @@ declare global {
|
|
|
15027
15242
|
truncated: boolean;
|
|
15028
15243
|
/** The rows read. */
|
|
15029
15244
|
total: number;
|
|
15245
|
+
/**
|
|
15246
|
+
* The mode the list was read in, so a caller writes the items back under the same one:
|
|
15247
|
+
* `{ operator: 'inSet', param: { items, byDisplay } }`. A list read by value fed back as
|
|
15248
|
+
* texts under `byDisplay` would match nothing for a number.
|
|
15249
|
+
*/
|
|
15250
|
+
byDisplay: boolean;
|
|
15030
15251
|
}
|
|
15031
15252
|
/**
|
|
15032
15253
|
* Interface indicating the ability to filter data.
|
|
@@ -15396,6 +15617,135 @@ declare global {
|
|
|
15396
15617
|
readonly isIFormatEngine: true;
|
|
15397
15618
|
}
|
|
15398
15619
|
|
|
15620
|
+
/**
|
|
15621
|
+
* What every form control shares — a button, a check box, a scroll bar placed on a sheet.
|
|
15622
|
+
*
|
|
15623
|
+
* @remarks
|
|
15624
|
+
* A form control is a movable whose content is one of Excel's legacy controls: the movable places
|
|
15625
|
+
* it and the content models what it is. Each kind is its own content type
|
|
15626
|
+
* ({@link IFormControl.Type}) and its own interface, composed from this and two facets: the kinds
|
|
15627
|
+
* that show text ({@link ICaptioned}) and the kinds that hold a value a cell can mirror
|
|
15628
|
+
* ({@link ILinked}). A control owns its state — a check box with no linked cell is still checked
|
|
15629
|
+
* or not.
|
|
15630
|
+
*
|
|
15631
|
+
* **PLACEHOLDER** - This is under development and not made public yet.
|
|
15632
|
+
*/
|
|
15633
|
+
export interface IFormControl extends IModel, IMovable.IContent {
|
|
15634
|
+
/**
|
|
15635
|
+
* Returns the id of the shape that draws this control, or `null` if it has none.
|
|
15636
|
+
*
|
|
15637
|
+
* @remarks
|
|
15638
|
+
* The link to the shape in the sheet's legacy drawing, which is what keeps the two over the same
|
|
15639
|
+
* cells when rows and columns move.
|
|
15640
|
+
*/
|
|
15641
|
+
getShapeId(): number | null;
|
|
15642
|
+
/**
|
|
15643
|
+
* Returns the name of the macro the control runs when used, or `null` if it has none.
|
|
15644
|
+
*
|
|
15645
|
+
* @remarks
|
|
15646
|
+
* Any kind may run one: a button when clicked, a check box when toggled, a scroll bar when moved.
|
|
15647
|
+
*/
|
|
15648
|
+
getMacro(): string | null;
|
|
15649
|
+
/**
|
|
15650
|
+
* Sets the name of the macro the control runs when used.
|
|
15651
|
+
*
|
|
15652
|
+
* @param macro The name, or `null` for none.
|
|
15653
|
+
*/
|
|
15654
|
+
setMacro(macro: string | null, options?: ITransaction.OperationOptions): this;
|
|
15655
|
+
toJSON(toResourceId?: (resource: IResource) => number | null): IFormControl.JSON | null;
|
|
15656
|
+
/**
|
|
15657
|
+
* Deletes the control, and with it the movable that places it.
|
|
15658
|
+
*/
|
|
15659
|
+
delete(options?: ITransaction.OperationOptions): void;
|
|
15660
|
+
/** For runtime type checking. */
|
|
15661
|
+
readonly isIFormControl: true;
|
|
15662
|
+
}
|
|
15663
|
+
|
|
15664
|
+
/**
|
|
15665
|
+
* {@inheritDoc IFormControl}
|
|
15666
|
+
* @see
|
|
15667
|
+
* ### **Interface**
|
|
15668
|
+
*
|
|
15669
|
+
* {@link IFormControl}
|
|
15670
|
+
*/
|
|
15671
|
+
export namespace IFormControl {
|
|
15672
|
+
/**
|
|
15673
|
+
* The kinds of form control, which are the content types a movable reports for them.
|
|
15674
|
+
*/
|
|
15675
|
+
const Type: {
|
|
15676
|
+
/** {@link IButton}: runs its macro when clicked. */
|
|
15677
|
+
readonly Button: "button";
|
|
15678
|
+
/** {@link ICheckBox}: on, off or mixed; writes a boolean to its linked cell. */
|
|
15679
|
+
readonly CheckBox: "checkBox";
|
|
15680
|
+
/** {@link IOptionButton}: one of a group; the group's linked cell holds the chosen index. */
|
|
15681
|
+
readonly OptionButton: "optionButton";
|
|
15682
|
+
/** {@link IListBox}: a list of items; writes the index of the chosen one. */
|
|
15683
|
+
readonly ListBox: "listBox";
|
|
15684
|
+
/** {@link IDropDown}: a list that drops down; writes the index of the chosen one. */
|
|
15685
|
+
readonly DropDown: "dropDown";
|
|
15686
|
+
/** {@link IScrollBar}: a thumb in a trough; writes a number. */
|
|
15687
|
+
readonly ScrollBar: "scrollBar";
|
|
15688
|
+
/** {@link ISpinner}: two arrows; writes a number. */
|
|
15689
|
+
readonly Spinner: "spinner";
|
|
15690
|
+
/** {@link IGroupBox}: a frame around other controls. */
|
|
15691
|
+
readonly GroupBox: "groupBox";
|
|
15692
|
+
/** {@link ILabel}: text, nothing more. */
|
|
15693
|
+
readonly Label: "label";
|
|
15694
|
+
/** A text field. Dialog sheets only. {@link IFormControl} only. */
|
|
15695
|
+
readonly EditBox: "editBox";
|
|
15696
|
+
/** A dialog frame. Dialog sheets only. {@link IFormControl} only. */
|
|
15697
|
+
readonly Dialog: "dialog";
|
|
15698
|
+
/** A kind this version does not know. {@link IFormControl} only. */
|
|
15699
|
+
readonly Unknown: "formControl";
|
|
15700
|
+
};
|
|
15701
|
+
type Type = typeof Type[keyof typeof Type];
|
|
15702
|
+
/**
|
|
15703
|
+
* What every kind saves. Each facet and each kind adds its own fields.
|
|
15704
|
+
*/
|
|
15705
|
+
interface JSON {
|
|
15706
|
+
/**
|
|
15707
|
+
* The id of the shape that draws this control.
|
|
15708
|
+
*
|
|
15709
|
+
* @see {@link IFormControl.getShapeId}
|
|
15710
|
+
*/
|
|
15711
|
+
shapeId?: number;
|
|
15712
|
+
/**
|
|
15713
|
+
* The name of the macro the control runs when used.
|
|
15714
|
+
*/
|
|
15715
|
+
macro?: string;
|
|
15716
|
+
/**
|
|
15717
|
+
* The control's placement properties as the file spelled them, less the ones modeled and the
|
|
15718
|
+
* anchor, which is the movable's own.
|
|
15719
|
+
*
|
|
15720
|
+
* @remarks
|
|
15721
|
+
* Whether it prints, whether it is locked, how it sizes with its cell. Carried so a file keeps
|
|
15722
|
+
* what it said until each has a model.
|
|
15723
|
+
*/
|
|
15724
|
+
props?: Record<string, string>;
|
|
15725
|
+
/**
|
|
15726
|
+
* The control's own properties as the file spelled them, less the ones modeled.
|
|
15727
|
+
*
|
|
15728
|
+
* @remarks
|
|
15729
|
+
* The 3-D look, text locking, the width of a drop-down's arrow. Carried so a file keeps what
|
|
15730
|
+
* it said until each has a model.
|
|
15731
|
+
*/
|
|
15732
|
+
formProps?: Record<string, string>;
|
|
15733
|
+
/**
|
|
15734
|
+
* Anything a producer wrote inside the placement properties besides the anchor, as markup.
|
|
15735
|
+
* Empty for every file seen so far.
|
|
15736
|
+
*/
|
|
15737
|
+
xml?: string;
|
|
15738
|
+
/**
|
|
15739
|
+
* Extensions a producer wrote on the control's own properties, as markup.
|
|
15740
|
+
*/
|
|
15741
|
+
extLst?: string;
|
|
15742
|
+
}
|
|
15743
|
+
interface Events extends IModel.Events {
|
|
15744
|
+
}
|
|
15745
|
+
interface IListeners extends IListener.Callbacks<IFormControl, IFormControl.Events> {
|
|
15746
|
+
}
|
|
15747
|
+
}
|
|
15748
|
+
|
|
15399
15749
|
/**
|
|
15400
15750
|
* Everything a formula function is allowed to know about the world outside its arguments.
|
|
15401
15751
|
*
|
|
@@ -17412,6 +17762,404 @@ declare global {
|
|
|
17412
17762
|
}
|
|
17413
17763
|
}
|
|
17414
17764
|
|
|
17765
|
+
/**
|
|
17766
|
+
* A shape's geometry evaluated at one size: its paths, text rectangle, adjust handles and
|
|
17767
|
+
* connection sites, in pixels in the shape's own frame (its top-left is 0,0).
|
|
17768
|
+
*
|
|
17769
|
+
* @remarks
|
|
17770
|
+
* Returned by {@link IShape.getGeometry}, which loads whatever the shape needs to evaluate.
|
|
17771
|
+
* Once it has resolved, everything here is synchronous: a renderer re-evaluates at a new size
|
|
17772
|
+
* ({@link resize}) or with new adjust values ({@link withAdjustments}) on every frame of a drag.
|
|
17773
|
+
*
|
|
17774
|
+
* A group's geometry is its members' paths, each placed in the group's frame; a group has no
|
|
17775
|
+
* handles or connection sites of its own.
|
|
17776
|
+
*
|
|
17777
|
+
* @example
|
|
17778
|
+
* ```ts
|
|
17779
|
+
* const geometry = await shape.getGeometry(200, 100);
|
|
17780
|
+
* const parts: string[] = [];
|
|
17781
|
+
* geometry?.forEachPath((path) => {
|
|
17782
|
+
* if (path.layer === IGeometry.PathLayer.Stroke) parts.push(`<path d="${path.d}" fill="none" stroke="black"/>`);
|
|
17783
|
+
* });
|
|
17784
|
+
* ```
|
|
17785
|
+
*/
|
|
17786
|
+
export interface IGeometry {
|
|
17787
|
+
/** The width the geometry was evaluated at, in pixels. */
|
|
17788
|
+
getWidth(): number;
|
|
17789
|
+
/** The height the geometry was evaluated at, in pixels. */
|
|
17790
|
+
getHeight(): number;
|
|
17791
|
+
/** Where text is laid out: the definition's text rectangle, or the whole frame when it declares none. */
|
|
17792
|
+
getTextRect(): IGeometry.Rect;
|
|
17793
|
+
/**
|
|
17794
|
+
* The box that holds every path, line ends included, in the shape's frame.
|
|
17795
|
+
*
|
|
17796
|
+
* @remarks
|
|
17797
|
+
* It can reach outside the frame, as a callout's tail does, so its edges may be negative or past
|
|
17798
|
+
* {@link getWidth} and {@link getHeight}. The line's own width is not included. A geometry
|
|
17799
|
+
* that draws nothing answers its whole frame.
|
|
17800
|
+
*/
|
|
17801
|
+
getPathBounds(): IGeometry.Rect;
|
|
17802
|
+
/**
|
|
17803
|
+
* Visits every path in paint order: a shape's fills, then its strokes, then its markers; a
|
|
17804
|
+
* group's members in z-order, each in that order. A picture member is a rectangle whose fill
|
|
17805
|
+
* is its image.
|
|
17806
|
+
*/
|
|
17807
|
+
forEachPath(visit: (path: IGeometry.IPath) => void): void;
|
|
17808
|
+
/** Visits the adjust handles, in the order {@link adjustmentsFromHandle} indexes them. */
|
|
17809
|
+
forEachHandle(visit: (handle: IGeometry.IHandle) => void): void;
|
|
17810
|
+
/** Visits the connection sites, in the order a connector's ends index them. */
|
|
17811
|
+
forEachConnection(visit: (connection: IGeometry.IConnection) => void): void;
|
|
17812
|
+
/** The same shape evaluated at another size. */
|
|
17813
|
+
resize(width: number, height: number): IGeometry;
|
|
17814
|
+
/**
|
|
17815
|
+
* The same shape evaluated with other adjust values.
|
|
17816
|
+
*
|
|
17817
|
+
* @param adjustments Values by name, as {@link IShape.setAdjustments} takes them (what a
|
|
17818
|
+
* handle drag produced); `null` for the preset's defaults.
|
|
17819
|
+
*/
|
|
17820
|
+
withAdjustments(adjustments: Readonly<Record<string, number>> | null): IGeometry;
|
|
17821
|
+
/**
|
|
17822
|
+
* The adjust values that put a handle as near as it can go to a point: what dragging it there
|
|
17823
|
+
* sets. Values the handle does not move are kept as they are.
|
|
17824
|
+
*
|
|
17825
|
+
* @param index The handle's {@link IGeometry.IHandle.index}.
|
|
17826
|
+
* @param x In pixels, in the shape's frame.
|
|
17827
|
+
* @param y In pixels, in the shape's frame.
|
|
17828
|
+
* @returns Values to pass to {@link IShape.setAdjustments} or {@link withAdjustments}.
|
|
17829
|
+
*/
|
|
17830
|
+
adjustmentsFromHandle(index: number, x: number, y: number): Record<string, number>;
|
|
17831
|
+
}
|
|
17832
|
+
|
|
17833
|
+
/**
|
|
17834
|
+
* {@inheritDoc IGeometry}
|
|
17835
|
+
* @see
|
|
17836
|
+
* ### **Interface**
|
|
17837
|
+
*
|
|
17838
|
+
* {@link IGeometry}
|
|
17839
|
+
*/
|
|
17840
|
+
export namespace IGeometry {
|
|
17841
|
+
/**
|
|
17842
|
+
* Every preset geometry, by the DrawingML name (`prstGeom/@prst`) a shape's
|
|
17843
|
+
* {@link IShape.Properties.geometry} takes and {@link IShape.getShapeType} returns.
|
|
17844
|
+
*
|
|
17845
|
+
* @example
|
|
17846
|
+
* ```ts
|
|
17847
|
+
* await sheet.getMovables().add({ type: 'shape', json: { geometry: IGeometry.Preset.RoundRect }, bounds });
|
|
17848
|
+
* ```
|
|
17849
|
+
*/
|
|
17850
|
+
const Preset: Readonly<{
|
|
17851
|
+
readonly AccentBorderCallout1: "accentBorderCallout1";
|
|
17852
|
+
readonly AccentBorderCallout2: "accentBorderCallout2";
|
|
17853
|
+
readonly AccentBorderCallout3: "accentBorderCallout3";
|
|
17854
|
+
readonly AccentCallout1: "accentCallout1";
|
|
17855
|
+
readonly AccentCallout2: "accentCallout2";
|
|
17856
|
+
readonly AccentCallout3: "accentCallout3";
|
|
17857
|
+
readonly ActionButtonBackPrevious: "actionButtonBackPrevious";
|
|
17858
|
+
readonly ActionButtonBeginning: "actionButtonBeginning";
|
|
17859
|
+
readonly ActionButtonBlank: "actionButtonBlank";
|
|
17860
|
+
readonly ActionButtonDocument: "actionButtonDocument";
|
|
17861
|
+
readonly ActionButtonEnd: "actionButtonEnd";
|
|
17862
|
+
readonly ActionButtonForwardNext: "actionButtonForwardNext";
|
|
17863
|
+
readonly ActionButtonHelp: "actionButtonHelp";
|
|
17864
|
+
readonly ActionButtonHome: "actionButtonHome";
|
|
17865
|
+
readonly ActionButtonInformation: "actionButtonInformation";
|
|
17866
|
+
readonly ActionButtonMovie: "actionButtonMovie";
|
|
17867
|
+
readonly ActionButtonReturn: "actionButtonReturn";
|
|
17868
|
+
readonly ActionButtonSound: "actionButtonSound";
|
|
17869
|
+
readonly Arc: "arc";
|
|
17870
|
+
readonly BentArrow: "bentArrow";
|
|
17871
|
+
readonly BentConnector2: "bentConnector2";
|
|
17872
|
+
readonly BentConnector3: "bentConnector3";
|
|
17873
|
+
readonly BentConnector4: "bentConnector4";
|
|
17874
|
+
readonly BentConnector5: "bentConnector5";
|
|
17875
|
+
readonly BentUpArrow: "bentUpArrow";
|
|
17876
|
+
readonly Bevel: "bevel";
|
|
17877
|
+
readonly BlockArc: "blockArc";
|
|
17878
|
+
readonly BorderCallout1: "borderCallout1";
|
|
17879
|
+
readonly BorderCallout2: "borderCallout2";
|
|
17880
|
+
readonly BorderCallout3: "borderCallout3";
|
|
17881
|
+
readonly BracePair: "bracePair";
|
|
17882
|
+
readonly BracketPair: "bracketPair";
|
|
17883
|
+
readonly Callout1: "callout1";
|
|
17884
|
+
readonly Callout2: "callout2";
|
|
17885
|
+
readonly Callout3: "callout3";
|
|
17886
|
+
readonly Can: "can";
|
|
17887
|
+
readonly ChartPlus: "chartPlus";
|
|
17888
|
+
readonly ChartStar: "chartStar";
|
|
17889
|
+
readonly ChartX: "chartX";
|
|
17890
|
+
readonly Chevron: "chevron";
|
|
17891
|
+
readonly Chord: "chord";
|
|
17892
|
+
readonly CircularArrow: "circularArrow";
|
|
17893
|
+
readonly Cloud: "cloud";
|
|
17894
|
+
readonly CloudCallout: "cloudCallout";
|
|
17895
|
+
readonly Corner: "corner";
|
|
17896
|
+
readonly CornerTabs: "cornerTabs";
|
|
17897
|
+
readonly Cube: "cube";
|
|
17898
|
+
readonly CurvedConnector2: "curvedConnector2";
|
|
17899
|
+
readonly CurvedConnector3: "curvedConnector3";
|
|
17900
|
+
readonly CurvedConnector4: "curvedConnector4";
|
|
17901
|
+
readonly CurvedConnector5: "curvedConnector5";
|
|
17902
|
+
readonly CurvedDownArrow: "curvedDownArrow";
|
|
17903
|
+
readonly CurvedLeftArrow: "curvedLeftArrow";
|
|
17904
|
+
readonly CurvedRightArrow: "curvedRightArrow";
|
|
17905
|
+
readonly CurvedUpArrow: "curvedUpArrow";
|
|
17906
|
+
readonly Decagon: "decagon";
|
|
17907
|
+
readonly DiagStripe: "diagStripe";
|
|
17908
|
+
readonly Diamond: "diamond";
|
|
17909
|
+
readonly Dodecagon: "dodecagon";
|
|
17910
|
+
readonly Donut: "donut";
|
|
17911
|
+
readonly DoubleWave: "doubleWave";
|
|
17912
|
+
readonly DownArrow: "downArrow";
|
|
17913
|
+
readonly DownArrowCallout: "downArrowCallout";
|
|
17914
|
+
readonly Ellipse: "ellipse";
|
|
17915
|
+
readonly EllipseRibbon: "ellipseRibbon";
|
|
17916
|
+
readonly EllipseRibbon2: "ellipseRibbon2";
|
|
17917
|
+
readonly FlowChartAlternateProcess: "flowChartAlternateProcess";
|
|
17918
|
+
readonly FlowChartCollate: "flowChartCollate";
|
|
17919
|
+
readonly FlowChartConnector: "flowChartConnector";
|
|
17920
|
+
readonly FlowChartDecision: "flowChartDecision";
|
|
17921
|
+
readonly FlowChartDelay: "flowChartDelay";
|
|
17922
|
+
readonly FlowChartDisplay: "flowChartDisplay";
|
|
17923
|
+
readonly FlowChartDocument: "flowChartDocument";
|
|
17924
|
+
readonly FlowChartExtract: "flowChartExtract";
|
|
17925
|
+
readonly FlowChartInputOutput: "flowChartInputOutput";
|
|
17926
|
+
readonly FlowChartInternalStorage: "flowChartInternalStorage";
|
|
17927
|
+
readonly FlowChartMagneticDisk: "flowChartMagneticDisk";
|
|
17928
|
+
readonly FlowChartMagneticDrum: "flowChartMagneticDrum";
|
|
17929
|
+
readonly FlowChartMagneticTape: "flowChartMagneticTape";
|
|
17930
|
+
readonly FlowChartManualInput: "flowChartManualInput";
|
|
17931
|
+
readonly FlowChartManualOperation: "flowChartManualOperation";
|
|
17932
|
+
readonly FlowChartMerge: "flowChartMerge";
|
|
17933
|
+
readonly FlowChartMultidocument: "flowChartMultidocument";
|
|
17934
|
+
readonly FlowChartOfflineStorage: "flowChartOfflineStorage";
|
|
17935
|
+
readonly FlowChartOffpageConnector: "flowChartOffpageConnector";
|
|
17936
|
+
readonly FlowChartOnlineStorage: "flowChartOnlineStorage";
|
|
17937
|
+
readonly FlowChartOr: "flowChartOr";
|
|
17938
|
+
readonly FlowChartPredefinedProcess: "flowChartPredefinedProcess";
|
|
17939
|
+
readonly FlowChartPreparation: "flowChartPreparation";
|
|
17940
|
+
readonly FlowChartProcess: "flowChartProcess";
|
|
17941
|
+
readonly FlowChartPunchedCard: "flowChartPunchedCard";
|
|
17942
|
+
readonly FlowChartPunchedTape: "flowChartPunchedTape";
|
|
17943
|
+
readonly FlowChartSort: "flowChartSort";
|
|
17944
|
+
readonly FlowChartSummingJunction: "flowChartSummingJunction";
|
|
17945
|
+
readonly FlowChartTerminator: "flowChartTerminator";
|
|
17946
|
+
readonly FoldedCorner: "foldedCorner";
|
|
17947
|
+
readonly Frame: "frame";
|
|
17948
|
+
readonly Funnel: "funnel";
|
|
17949
|
+
readonly Gear6: "gear6";
|
|
17950
|
+
readonly Gear9: "gear9";
|
|
17951
|
+
readonly HalfFrame: "halfFrame";
|
|
17952
|
+
readonly Heart: "heart";
|
|
17953
|
+
readonly Heptagon: "heptagon";
|
|
17954
|
+
readonly Hexagon: "hexagon";
|
|
17955
|
+
readonly HomePlate: "homePlate";
|
|
17956
|
+
readonly HorizontalScroll: "horizontalScroll";
|
|
17957
|
+
readonly IrregularSeal1: "irregularSeal1";
|
|
17958
|
+
readonly IrregularSeal2: "irregularSeal2";
|
|
17959
|
+
readonly LeftArrow: "leftArrow";
|
|
17960
|
+
readonly LeftArrowCallout: "leftArrowCallout";
|
|
17961
|
+
readonly LeftBrace: "leftBrace";
|
|
17962
|
+
readonly LeftBracket: "leftBracket";
|
|
17963
|
+
readonly LeftCircularArrow: "leftCircularArrow";
|
|
17964
|
+
readonly LeftRightArrow: "leftRightArrow";
|
|
17965
|
+
readonly LeftRightArrowCallout: "leftRightArrowCallout";
|
|
17966
|
+
readonly LeftRightCircularArrow: "leftRightCircularArrow";
|
|
17967
|
+
readonly LeftRightRibbon: "leftRightRibbon";
|
|
17968
|
+
readonly LeftRightUpArrow: "leftRightUpArrow";
|
|
17969
|
+
readonly LeftUpArrow: "leftUpArrow";
|
|
17970
|
+
readonly LightningBolt: "lightningBolt";
|
|
17971
|
+
readonly Line: "line";
|
|
17972
|
+
readonly LineInv: "lineInv";
|
|
17973
|
+
readonly MathDivide: "mathDivide";
|
|
17974
|
+
readonly MathEqual: "mathEqual";
|
|
17975
|
+
readonly MathMinus: "mathMinus";
|
|
17976
|
+
readonly MathMultiply: "mathMultiply";
|
|
17977
|
+
readonly MathNotEqual: "mathNotEqual";
|
|
17978
|
+
readonly MathPlus: "mathPlus";
|
|
17979
|
+
readonly Moon: "moon";
|
|
17980
|
+
readonly NoSmoking: "noSmoking";
|
|
17981
|
+
readonly NonIsoscelesTrapezoid: "nonIsoscelesTrapezoid";
|
|
17982
|
+
readonly NotchedRightArrow: "notchedRightArrow";
|
|
17983
|
+
readonly Octagon: "octagon";
|
|
17984
|
+
readonly Parallelogram: "parallelogram";
|
|
17985
|
+
readonly Pentagon: "pentagon";
|
|
17986
|
+
readonly Pie: "pie";
|
|
17987
|
+
readonly PieWedge: "pieWedge";
|
|
17988
|
+
readonly Plaque: "plaque";
|
|
17989
|
+
readonly PlaqueTabs: "plaqueTabs";
|
|
17990
|
+
readonly Plus: "plus";
|
|
17991
|
+
readonly QuadArrow: "quadArrow";
|
|
17992
|
+
readonly QuadArrowCallout: "quadArrowCallout";
|
|
17993
|
+
readonly Rect: "rect";
|
|
17994
|
+
readonly Ribbon: "ribbon";
|
|
17995
|
+
readonly Ribbon2: "ribbon2";
|
|
17996
|
+
readonly RightArrow: "rightArrow";
|
|
17997
|
+
readonly RightArrowCallout: "rightArrowCallout";
|
|
17998
|
+
readonly RightBrace: "rightBrace";
|
|
17999
|
+
readonly RightBracket: "rightBracket";
|
|
18000
|
+
readonly Round1Rect: "round1Rect";
|
|
18001
|
+
readonly Round2DiagRect: "round2DiagRect";
|
|
18002
|
+
readonly Round2SameRect: "round2SameRect";
|
|
18003
|
+
readonly RoundRect: "roundRect";
|
|
18004
|
+
readonly RtTriangle: "rtTriangle";
|
|
18005
|
+
readonly SmileyFace: "smileyFace";
|
|
18006
|
+
readonly Snip1Rect: "snip1Rect";
|
|
18007
|
+
readonly Snip2DiagRect: "snip2DiagRect";
|
|
18008
|
+
readonly Snip2SameRect: "snip2SameRect";
|
|
18009
|
+
readonly SnipRoundRect: "snipRoundRect";
|
|
18010
|
+
readonly SquareTabs: "squareTabs";
|
|
18011
|
+
readonly Star10: "star10";
|
|
18012
|
+
readonly Star12: "star12";
|
|
18013
|
+
readonly Star16: "star16";
|
|
18014
|
+
readonly Star24: "star24";
|
|
18015
|
+
readonly Star32: "star32";
|
|
18016
|
+
readonly Star4: "star4";
|
|
18017
|
+
readonly Star5: "star5";
|
|
18018
|
+
readonly Star6: "star6";
|
|
18019
|
+
readonly Star7: "star7";
|
|
18020
|
+
readonly Star8: "star8";
|
|
18021
|
+
readonly StraightConnector1: "straightConnector1";
|
|
18022
|
+
readonly StripedRightArrow: "stripedRightArrow";
|
|
18023
|
+
readonly Sun: "sun";
|
|
18024
|
+
readonly SwooshArrow: "swooshArrow";
|
|
18025
|
+
readonly Teardrop: "teardrop";
|
|
18026
|
+
readonly Trapezoid: "trapezoid";
|
|
18027
|
+
readonly Triangle: "triangle";
|
|
18028
|
+
readonly UpArrow: "upArrow";
|
|
18029
|
+
readonly UpArrowCallout: "upArrowCallout";
|
|
18030
|
+
readonly UpDownArrow: "upDownArrow";
|
|
18031
|
+
readonly UpDownArrowCallout: "upDownArrowCallout";
|
|
18032
|
+
readonly UturnArrow: "uturnArrow";
|
|
18033
|
+
readonly VerticalScroll: "verticalScroll";
|
|
18034
|
+
readonly Wave: "wave";
|
|
18035
|
+
readonly WedgeEllipseCallout: "wedgeEllipseCallout";
|
|
18036
|
+
readonly WedgeRectCallout: "wedgeRectCallout";
|
|
18037
|
+
readonly WedgeRoundRectCallout: "wedgeRoundRectCallout";
|
|
18038
|
+
}>;
|
|
18039
|
+
type Preset = typeof Preset[keyof typeof Preset];
|
|
18040
|
+
/**
|
|
18041
|
+
* A geometry definition, as DrawingML states one: adjust values, guides, handles, connection
|
|
18042
|
+
* sites, text rectangle and paths. A shape drawn from its own geometry (a file's `custGeom`)
|
|
18043
|
+
* gives one as its {@link IShape.Properties.geometry}; every {@link Preset} is one too.
|
|
18044
|
+
*
|
|
18045
|
+
* @remarks
|
|
18046
|
+
* The definition is DrawingML's own formula language, kept verbatim (`'x1 +- hc dx1 0'`) so it
|
|
18047
|
+
* reads like the markup it came from, and the way a file states a custom shape round-trips
|
|
18048
|
+
* unchanged. SheetXL evaluates it rather than models it: lengths come out in the unit the shape
|
|
18049
|
+
* is evaluated in (pixels), and angles in degrees. Inside the language, angles are 60,000ths of
|
|
18050
|
+
* a degree and ratios are 100,000ths, which is what an adjust value is.
|
|
18051
|
+
*/
|
|
18052
|
+
interface Def {
|
|
18053
|
+
/** Adjust values, document order: `'name val N'`. */
|
|
18054
|
+
av?: readonly string[];
|
|
18055
|
+
/** Calculated guides, document order: `'name op a b c'`. A name may be rebound. */
|
|
18056
|
+
gd?: readonly string[];
|
|
18057
|
+
/**
|
|
18058
|
+
* Adjust handles, document order.
|
|
18059
|
+
*
|
|
18060
|
+
* `'xy gdRefX gdRefY posX posY [minX maxX minY maxY]'` or
|
|
18061
|
+
* `'polar gdRefR gdRefAng posX posY [minR maxR minAng maxAng]'`. An absent reference or bound
|
|
18062
|
+
* is `_`; the bounds group is omitted when all four are absent.
|
|
18063
|
+
*/
|
|
18064
|
+
ah?: readonly string[];
|
|
18065
|
+
/** Connection sites, `'ang x y'` each. */
|
|
18066
|
+
cxn?: readonly string[];
|
|
18067
|
+
/** Text rectangle `'l t r b'`; absent is the whole frame. */
|
|
18068
|
+
rect?: string;
|
|
18069
|
+
paths: readonly DefPath[];
|
|
18070
|
+
}
|
|
18071
|
+
/** One path of a {@link Def}. */
|
|
18072
|
+
interface DefPath {
|
|
18073
|
+
/** `none` when the path is not filled, else its {@link PathFill | shading}; absent is `norm`. */
|
|
18074
|
+
f?: 'none' | Exclude<PathFill, 'norm'>;
|
|
18075
|
+
/** `0` when the path is not stroked. */
|
|
18076
|
+
s?: 0;
|
|
18077
|
+
/** Path coordinate space width; absent means the shape width. */
|
|
18078
|
+
w?: number;
|
|
18079
|
+
/** Path coordinate space height; absent means the shape height. */
|
|
18080
|
+
h?: number;
|
|
18081
|
+
/**
|
|
18082
|
+
* Mini-path: `M x y | L x y | Q x1 y1 x2 y2 | C x1 y1 x2 y2 x3 y3 | A wR hR stAng swAng | Z`,
|
|
18083
|
+
* space separated; coordinate tokens are guide names or integer literals.
|
|
18084
|
+
*/
|
|
18085
|
+
d: string;
|
|
18086
|
+
}
|
|
18087
|
+
/** Edges of a rectangle in the shape's frame, in pixels. */
|
|
18088
|
+
interface Rect {
|
|
18089
|
+
l: number;
|
|
18090
|
+
t: number;
|
|
18091
|
+
r: number;
|
|
18092
|
+
b: number;
|
|
18093
|
+
}
|
|
18094
|
+
/** Which paint a visited path takes. */
|
|
18095
|
+
const PathLayer: {
|
|
18096
|
+
/** The shape's fill, shaded as {@link IPath.fill} says. */
|
|
18097
|
+
readonly Fill: "fill";
|
|
18098
|
+
/** The shape's line. */
|
|
18099
|
+
readonly Stroke: "stroke";
|
|
18100
|
+
/** A marker at either end of the line (an arrowhead): a filled path painted with the line's paint. */
|
|
18101
|
+
readonly Marker: "marker";
|
|
18102
|
+
};
|
|
18103
|
+
type PathLayer = typeof PathLayer[keyof typeof PathLayer];
|
|
18104
|
+
/**
|
|
18105
|
+
* How a fill is shaded: `norm` is the fill as it is; the others are the shaded faces of a cube,
|
|
18106
|
+
* a can or a fold, each the fill through {@link FillTransfer}.
|
|
18107
|
+
*/
|
|
18108
|
+
type PathFill = 'norm' | 'darken' | 'darkenLess' | 'lighten' | 'lightenLess';
|
|
18109
|
+
/**
|
|
18110
|
+
* Each shading's transfer, per color channel in sRGB: `c' = slope · c + intercept`, with `c` in
|
|
18111
|
+
* `0..1`. As an SVG filter, `feFuncR`/`G`/`B` of `type="linear"`.
|
|
18112
|
+
*/
|
|
18113
|
+
const FillTransfer: Readonly<Record<PathFill, readonly [slope: number, intercept: number]>>;
|
|
18114
|
+
/** One path, as {@link IGeometry.forEachPath} visits it. */
|
|
18115
|
+
interface IPath {
|
|
18116
|
+
/** The visit's position in paint order: unique within one {@link IGeometry.forEachPath}. */
|
|
18117
|
+
readonly index: number;
|
|
18118
|
+
/** SVG path data, in pixels, in the frame of the shape, or of {@link member} when there is one. */
|
|
18119
|
+
readonly d: string;
|
|
18120
|
+
readonly layer: PathLayer;
|
|
18121
|
+
/** The shading of a {@link PathLayer.Fill} path; `norm` on every other layer. */
|
|
18122
|
+
readonly fill: PathFill;
|
|
18123
|
+
/** The group member the path belongs to; absent for a shape that is not a group. */
|
|
18124
|
+
readonly member?: IMember;
|
|
18125
|
+
}
|
|
18126
|
+
/** A group member a path belongs to: what it is, and where the group places it. */
|
|
18127
|
+
interface IMember {
|
|
18128
|
+
/** The member's JSON, for its fill and line (a picture member's fill is its image). */
|
|
18129
|
+
readonly json: IShape.JSON;
|
|
18130
|
+
/** The SVG `transform` that places the member's frame in the group's, rotation and flips included. */
|
|
18131
|
+
readonly transform: string;
|
|
18132
|
+
/** The member's frame, in pixels: what its paths were evaluated at, and what a picture fills. */
|
|
18133
|
+
readonly width: number;
|
|
18134
|
+
readonly height: number;
|
|
18135
|
+
}
|
|
18136
|
+
/** How an adjust handle moves: along x and/or y, or by radius and/or angle about the shape's center. */
|
|
18137
|
+
const HandleType: {
|
|
18138
|
+
readonly XY: "xy";
|
|
18139
|
+
readonly Polar: "polar";
|
|
18140
|
+
};
|
|
18141
|
+
type HandleType = typeof HandleType[keyof typeof HandleType];
|
|
18142
|
+
/**
|
|
18143
|
+
* An adjust handle, as {@link IGeometry.forEachHandle} visits it: where it is, in pixels in the
|
|
18144
|
+
* shape's frame. What it moves and how far is the definition's business;
|
|
18145
|
+
* {@link IGeometry.adjustmentsFromHandle} answers a drag.
|
|
18146
|
+
*/
|
|
18147
|
+
interface IHandle {
|
|
18148
|
+
readonly type: HandleType;
|
|
18149
|
+
readonly index: number;
|
|
18150
|
+
readonly x: number;
|
|
18151
|
+
readonly y: number;
|
|
18152
|
+
}
|
|
18153
|
+
/** A point a connector may attach to, as {@link IGeometry.forEachConnection} visits it. */
|
|
18154
|
+
interface IConnection {
|
|
18155
|
+
readonly index: number;
|
|
18156
|
+
readonly x: number;
|
|
18157
|
+
readonly y: number;
|
|
18158
|
+
/** The direction a connector leaves the site, in degrees clockwise from +x. */
|
|
18159
|
+
readonly ang: number;
|
|
18160
|
+
}
|
|
18161
|
+
}
|
|
18162
|
+
|
|
17415
18163
|
/**
|
|
17416
18164
|
* Primary interface for retrieving and setting values in a 2D space.
|
|
17417
18165
|
*
|
|
@@ -17689,6 +18437,17 @@ declare global {
|
|
|
17689
18437
|
type KeyIterator = IterableIterator<CellCoords, CellCoords, CellCoords>;
|
|
17690
18438
|
}
|
|
17691
18439
|
|
|
18440
|
+
/**
|
|
18441
|
+
* A group box: a frame around other controls. Content type `'groupBox'`.
|
|
18442
|
+
*/
|
|
18443
|
+
export interface IGroupBox extends IFormControl, ICaptioned {
|
|
18444
|
+
}
|
|
18445
|
+
|
|
18446
|
+
export namespace IGroupBox {
|
|
18447
|
+
interface JSON extends IFormControl.JSON, ICaptioned.JSON {
|
|
18448
|
+
}
|
|
18449
|
+
}
|
|
18450
|
+
|
|
17692
18451
|
/**
|
|
17693
18452
|
* Encapsulates functionalities crucial for maintaining a comprehensive version history
|
|
17694
18453
|
* and audit trail within the spreadsheet application. It provides mechanisms to capture, store,
|
|
@@ -17891,6 +18650,14 @@ declare global {
|
|
|
17891
18650
|
screenTip?: string;
|
|
17892
18651
|
/** {@inheritDoc IHyperlink.getTarget} */
|
|
17893
18652
|
target?: string;
|
|
18653
|
+
/**
|
|
18654
|
+
* An action the link performs instead of, or beside, following its address, as a file states
|
|
18655
|
+
* it (`hlinkClick/@action`). Office's own (`ppaction://…`) mean nothing in a workbook; kept so
|
|
18656
|
+
* the file reads back as written.
|
|
18657
|
+
*/
|
|
18658
|
+
action?: string;
|
|
18659
|
+
/** Whether following the link adds it to the browsing history (`hlinkClick/@history`). */
|
|
18660
|
+
history?: boolean;
|
|
17894
18661
|
}
|
|
17895
18662
|
/**
|
|
17896
18663
|
* A JSON representation useful for persistence.
|
|
@@ -17898,6 +18665,17 @@ declare global {
|
|
|
17898
18665
|
type JSON = Partial<Omit<IHyperlink.Properties, 'textToDisplay'>> | string;
|
|
17899
18666
|
}
|
|
17900
18667
|
|
|
18668
|
+
/**
|
|
18669
|
+
* A label: text, nothing more. Content type `'label'`.
|
|
18670
|
+
*/
|
|
18671
|
+
export interface ILabel extends IFormControl, ICaptioned {
|
|
18672
|
+
}
|
|
18673
|
+
|
|
18674
|
+
export namespace ILabel {
|
|
18675
|
+
interface JSON extends IFormControl.JSON, ICaptioned.JSON {
|
|
18676
|
+
}
|
|
18677
|
+
}
|
|
18678
|
+
|
|
17901
18679
|
/**
|
|
17902
18680
|
* The handle a {@link Lazy} parameter receives: an argument's subtree, anchored at the calling
|
|
17903
18681
|
* cell, that has either not been evaluated yet or has been evaluated already.
|
|
@@ -17920,6 +18698,78 @@ declare global {
|
|
|
17920
18698
|
getValue(): T;
|
|
17921
18699
|
}
|
|
17922
18700
|
|
|
18701
|
+
/**
|
|
18702
|
+
* A control whose state a cell mirrors: the control writes to the cell when used, and reads it
|
|
18703
|
+
* back when the cell changes.
|
|
18704
|
+
*/
|
|
18705
|
+
export interface ILinked {
|
|
18706
|
+
/**
|
|
18707
|
+
* Returns the address of the cell the control writes its state to, or `null` if it has none.
|
|
18708
|
+
*
|
|
18709
|
+
* @remarks
|
|
18710
|
+
* As the file spelled it, which may name a sheet (`Sheet1!$A$1`).
|
|
18711
|
+
*/
|
|
18712
|
+
getLinkedCell(): string | null;
|
|
18713
|
+
/**
|
|
18714
|
+
* Sets the cell the control writes its state to.
|
|
18715
|
+
*
|
|
18716
|
+
* @param address The address, or `null` for none.
|
|
18717
|
+
*/
|
|
18718
|
+
setLinkedCell(address: string | null, options?: ITransaction.OperationOptions): this;
|
|
18719
|
+
}
|
|
18720
|
+
|
|
18721
|
+
export namespace ILinked {
|
|
18722
|
+
interface JSON {
|
|
18723
|
+
/** The address of the cell the control writes its state to. */
|
|
18724
|
+
linkedCell?: string;
|
|
18725
|
+
}
|
|
18726
|
+
}
|
|
18727
|
+
|
|
18728
|
+
/**
|
|
18729
|
+
* A list box. Content type `'listBox'`.
|
|
18730
|
+
*/
|
|
18731
|
+
export interface IListBox extends IListControl {
|
|
18732
|
+
}
|
|
18733
|
+
|
|
18734
|
+
export namespace IListBox {
|
|
18735
|
+
interface JSON extends IListControl.JSON {
|
|
18736
|
+
}
|
|
18737
|
+
}
|
|
18738
|
+
|
|
18739
|
+
/**
|
|
18740
|
+
* What a list box and a drop-down share: items, one of which may be chosen.
|
|
18741
|
+
*/
|
|
18742
|
+
export interface IListControl extends IFormControl, ILinked {
|
|
18743
|
+
/**
|
|
18744
|
+
* Returns the items.
|
|
18745
|
+
*
|
|
18746
|
+
* @remarks
|
|
18747
|
+
* Empty when the items come from {@link getListFillRange} rather than being held by the control.
|
|
18748
|
+
*/
|
|
18749
|
+
getItems(): readonly string[];
|
|
18750
|
+
/** Sets the items. */
|
|
18751
|
+
setItems(items: readonly string[], options?: ITransaction.OperationOptions): this;
|
|
18752
|
+
/** Returns the address of the range the items come from, or `null` if the control holds them. */
|
|
18753
|
+
getListFillRange(): string | null;
|
|
18754
|
+
/** Sets the range the items come from. */
|
|
18755
|
+
setListFillRange(address: string | null, options?: ITransaction.OperationOptions): this;
|
|
18756
|
+
/** Returns the index of the chosen item, or `null` if none is. */
|
|
18757
|
+
getSelectedIndex(): number | null;
|
|
18758
|
+
/** Sets the chosen item. */
|
|
18759
|
+
setSelectedIndex(index: number | null, options?: ITransaction.OperationOptions): this;
|
|
18760
|
+
}
|
|
18761
|
+
|
|
18762
|
+
export namespace IListControl {
|
|
18763
|
+
interface JSON extends IFormControl.JSON, ILinked.JSON {
|
|
18764
|
+
/** The items held by the control itself. */
|
|
18765
|
+
items?: string[];
|
|
18766
|
+
/** The address of the range the items come from. */
|
|
18767
|
+
listFillRange?: string;
|
|
18768
|
+
/** The index of the chosen item. Absent when none is. */
|
|
18769
|
+
selectedIndex?: number;
|
|
18770
|
+
}
|
|
18771
|
+
}
|
|
18772
|
+
|
|
17923
18773
|
/**
|
|
17924
18774
|
* Namespace used for listeners to events.
|
|
17925
18775
|
*/
|
|
@@ -18367,10 +19217,11 @@ declare global {
|
|
|
18367
19217
|
* | `'chart'` | {@link IChart} |
|
|
18368
19218
|
* | `'shape'` | {@link IShape} — text boxes, callouts, connectors and groups |
|
|
18369
19219
|
* | `'slicer'` | {@link ISlicer} |
|
|
18370
|
-
* | `'
|
|
19220
|
+
* | `'checkBox'`, `'button'`, `'scrollBar'`, … | {@link IFormControl} — a form control, one type per kind ({@link IFormControl.Type}) |
|
|
18371
19221
|
*
|
|
18372
|
-
*
|
|
18373
|
-
* {@link IMovable.IContent} and nothing
|
|
19222
|
+
* A host adds kinds of its own through {@link MovableContentRegistry}. Anything else is content
|
|
19223
|
+
* that is positioned and saved but not modeled; it answers {@link IMovable.IContent} and nothing
|
|
19224
|
+
* more.
|
|
18374
19225
|
*
|
|
18375
19226
|
* The content owns what identifies it: its name, its description and its id. The movable owns
|
|
18376
19227
|
* where it is drawn. To remove both, delete the content.
|
|
@@ -18405,11 +19256,12 @@ declare global {
|
|
|
18405
19256
|
*/
|
|
18406
19257
|
isSelected: () => boolean;
|
|
18407
19258
|
/**
|
|
18408
|
-
* Set the
|
|
19259
|
+
* Set the position and size of the movable's unrotated frame, in pixels.
|
|
18409
19260
|
* @param bounds The new bounds.
|
|
18410
19261
|
*
|
|
18411
19262
|
* @remarks
|
|
18412
|
-
* If only some of the points are provided then only those will be moved.
|
|
19263
|
+
* If only some of the points are provided then only those will be moved. The frame is what
|
|
19264
|
+
* {@link getBounds} returns; the cells the movable is anchored to follow from it and the rotation.
|
|
18413
19265
|
*/
|
|
18414
19266
|
setBounds(bounds: Partial<Bounds>, options?: ITransaction.OperationOptions): IMovable;
|
|
18415
19267
|
/**
|
|
@@ -18422,7 +19274,13 @@ declare global {
|
|
|
18422
19274
|
*/
|
|
18423
19275
|
scrollIntoView: (options?: globalThis.ScrollIntoViewOptions | boolean) => Promise<boolean>;
|
|
18424
19276
|
/**
|
|
18425
|
-
* Returns the
|
|
19277
|
+
* Returns the movable's unrotated frame in pixels, or `null` if not yet laid out.
|
|
19278
|
+
*
|
|
19279
|
+
* @remarks
|
|
19280
|
+
* The frame is the box the movable is drawn in before it is turned by {@link getRotation}, about
|
|
19281
|
+
* its center. A rotated movable is anchored to the cells of the box it occupies as rotated,
|
|
19282
|
+
* which Excel takes to be the frame with its width and height swapped when the rotation is within
|
|
19283
|
+
* 45° of 90° or 270°, and the frame itself otherwise.
|
|
18426
19284
|
*/
|
|
18427
19285
|
getBounds(): Bounds | null;
|
|
18428
19286
|
/**
|
|
@@ -18435,12 +19293,16 @@ declare global {
|
|
|
18435
19293
|
*/
|
|
18436
19294
|
isHidden(): boolean;
|
|
18437
19295
|
/**
|
|
18438
|
-
* Set the rotation in degrees.
|
|
19296
|
+
* Set the rotation in degrees, clockwise about the frame's center.
|
|
19297
|
+
*
|
|
19298
|
+
* @remarks
|
|
19299
|
+
* The frame keeps its position and size; the cells the movable is anchored to are those of the
|
|
19300
|
+
* box it then occupies (see {@link getBounds}).
|
|
18439
19301
|
*/
|
|
18440
19302
|
setRotation(rotation: number): IMovable;
|
|
18441
19303
|
/**
|
|
18442
19304
|
* @see
|
|
18443
|
-
* {@link
|
|
19305
|
+
* {@link setRotation}
|
|
18444
19306
|
*/
|
|
18445
19307
|
getRotation(): number;
|
|
18446
19308
|
/**
|
|
@@ -18506,6 +19368,23 @@ declare global {
|
|
|
18506
19368
|
* {@link IMovable}
|
|
18507
19369
|
*/
|
|
18508
19370
|
export namespace IMovable {
|
|
19371
|
+
/**
|
|
19372
|
+
* A content's formulas as the calculation engine holds them: references that follow the cells
|
|
19373
|
+
* they name through inserts, deletes, moves and sheet renames.
|
|
19374
|
+
*
|
|
19375
|
+
* @remarks
|
|
19376
|
+
* Handed out by the sheet when content is created
|
|
19377
|
+
* ({@link MovableContentRegistry.CreateOptions.holdFormulas}); a chart holds its series this way.
|
|
19378
|
+
*/
|
|
19379
|
+
interface HeldFormulas {
|
|
19380
|
+
/**
|
|
19381
|
+
* The formula at `index` as it reads now, or `null` while it reads as it was handed over:
|
|
19382
|
+
* the engine does not hold it, or nothing has moved what it names.
|
|
19383
|
+
*/
|
|
19384
|
+
getText(index: number): string | null;
|
|
19385
|
+
/** Takes the formulas out of the engine, as part of the current operation. */
|
|
19386
|
+
release(): void;
|
|
19387
|
+
}
|
|
18509
19388
|
/**
|
|
18510
19389
|
* What a movable draws: a chart, a picture, a shape, a slicer, a control.
|
|
18511
19390
|
*
|
|
@@ -18789,6 +19668,18 @@ declare global {
|
|
|
18789
19668
|
* @defaultValue false
|
|
18790
19669
|
*/
|
|
18791
19670
|
fullyContained?: boolean;
|
|
19671
|
+
/**
|
|
19672
|
+
* Match {@link address} against what each movable paints rather than the cells it is anchored
|
|
19673
|
+
* to: its rotation, a drawing that reaches outside its frame (a callout's tail) and its line.
|
|
19674
|
+
* Use it to find the movables visible in a range.
|
|
19675
|
+
*
|
|
19676
|
+
* @remarks
|
|
19677
|
+
* A shape's drawing is known once its geometry has been evaluated, which the search starts;
|
|
19678
|
+
* until then it is matched by its frame, and the collection notifies a change when the answer
|
|
19679
|
+
* is ready. Ignored with {@link fullyContained}.
|
|
19680
|
+
* @defaultValue false
|
|
19681
|
+
*/
|
|
19682
|
+
drawn?: boolean;
|
|
18792
19683
|
}
|
|
18793
19684
|
/**
|
|
18794
19685
|
* Options for adding a movable to the collection.
|
|
@@ -18815,9 +19706,15 @@ declare global {
|
|
|
18815
19706
|
*/
|
|
18816
19707
|
fromResourceId?: (resourceId: number) => IResource;
|
|
18817
19708
|
/**
|
|
18818
|
-
* The
|
|
19709
|
+
* The movable's unrotated frame in pixels (see {@link IMovable.getBounds}).
|
|
18819
19710
|
*/
|
|
18820
19711
|
bounds?: Partial<Bounds>;
|
|
19712
|
+
/**
|
|
19713
|
+
* The rotation in degrees, clockwise about the frame's center.
|
|
19714
|
+
*
|
|
19715
|
+
* @defaultValue 0
|
|
19716
|
+
*/
|
|
19717
|
+
rotation?: number;
|
|
18821
19718
|
/**
|
|
18822
19719
|
* Placement hint used only when {@link bounds} is omitted. `'viewport'` centers the (default-sized)
|
|
18823
19720
|
* movable in the visible viewport via {@link ISheet.IListeners.onRequestViewport}, falling back to the
|
|
@@ -19733,6 +20630,214 @@ declare global {
|
|
|
19733
20630
|
constructor(message?: string, options?: ErrorOptions);
|
|
19734
20631
|
}
|
|
19735
20632
|
|
|
20633
|
+
/**
|
|
20634
|
+
* An option button: one of a group, of which one is chosen. Content type `'optionButton'`.
|
|
20635
|
+
*/
|
|
20636
|
+
export interface IOptionButton extends IFormControl, ICaptioned, ILinked {
|
|
20637
|
+
/**
|
|
20638
|
+
* Returns `true` if this is the chosen button of its group.
|
|
20639
|
+
*/
|
|
20640
|
+
isChecked(): boolean;
|
|
20641
|
+
/**
|
|
20642
|
+
* Sets whether this is the chosen button of its group.
|
|
20643
|
+
*/
|
|
20644
|
+
setChecked(checked: boolean, options?: ITransaction.OperationOptions): this;
|
|
20645
|
+
}
|
|
20646
|
+
|
|
20647
|
+
export namespace IOptionButton {
|
|
20648
|
+
interface JSON extends IFormControl.JSON, ICaptioned.JSON, ILinked.JSON {
|
|
20649
|
+
/**
|
|
20650
|
+
* `true` if this is the chosen button of its group.
|
|
20651
|
+
* @defaultValue false
|
|
20652
|
+
*/
|
|
20653
|
+
checked?: boolean;
|
|
20654
|
+
}
|
|
20655
|
+
}
|
|
20656
|
+
|
|
20657
|
+
/**
|
|
20658
|
+
* The row and column groups on a sheet, and how they are laid out.
|
|
20659
|
+
*
|
|
20660
|
+
* @remarks
|
|
20661
|
+
* There is no group object to create or delete. Every row and column carries an outline level,
|
|
20662
|
+
* `0` to `7` ({@link ICellHeader.getOutlineLevel}), and a group at level *n* is a run of
|
|
20663
|
+
* consecutive rows (or columns) whose level is *n* or more. Its summary row is the one just past
|
|
20664
|
+
* the run, on the side {@link getSummaryDirection} names. Collapsing a group hides its detail rows.
|
|
20665
|
+
*
|
|
20666
|
+
* Groups are made and removed with {@link ICellRange.group} and {@link ICellRange.ungroup}, or
|
|
20667
|
+
* from the sheet's formulas with {@link autoOutline}, and collapsed and expanded with
|
|
20668
|
+
* {@link ICellRange.hideGroupDetails} and {@link ICellRange.showGroupDetails}. Whether the symbols are drawn
|
|
20669
|
+
* is the view's: {@link ISheetView.setShowOutlineSymbols}.
|
|
20670
|
+
*
|
|
20671
|
+
* The counterpart of Excel's `Worksheet.Outline`.
|
|
20672
|
+
*/
|
|
20673
|
+
export interface IOutline extends IListener.ISource<IOutline, IOutline.Events> {
|
|
20674
|
+
/**
|
|
20675
|
+
* Where a group's summary sits: `down` or `up` for rows, `right` or `left` for columns.
|
|
20676
|
+
*
|
|
20677
|
+
* @defaultValue `down` for rows, `right` for columns.
|
|
20678
|
+
*/
|
|
20679
|
+
getSummaryDirection(axis: IRange.Axis): IRange.Direction;
|
|
20680
|
+
/**
|
|
20681
|
+
* Sets where a group's summary sits.
|
|
20682
|
+
*
|
|
20683
|
+
* @throws `Error` If the direction does not belong to the axis (`left` for rows).
|
|
20684
|
+
*/
|
|
20685
|
+
setSummaryDirection(axis: IRange.Axis, direction: IRange.Direction, options?: ITransaction.OperationOptions): this;
|
|
20686
|
+
/**
|
|
20687
|
+
* Whether the automatic outline styles are applied to summary rows and columns.
|
|
20688
|
+
*
|
|
20689
|
+
* @defaultValue false
|
|
20690
|
+
*/
|
|
20691
|
+
isAutomaticStyles(): boolean;
|
|
20692
|
+
/**
|
|
20693
|
+
* Sets whether the automatic outline styles are applied.
|
|
20694
|
+
*/
|
|
20695
|
+
setAutomaticStyles(automatic: boolean, options?: ITransaction.OperationOptions): this;
|
|
20696
|
+
/**
|
|
20697
|
+
* The deepest outline level in use on the axis; `0` when nothing is grouped.
|
|
20698
|
+
*/
|
|
20699
|
+
getLevelCount(axis: IRange.Axis): number;
|
|
20700
|
+
/**
|
|
20701
|
+
* The groups on an axis, outermost level first and in order within a level.
|
|
20702
|
+
*
|
|
20703
|
+
* @param axis The axis.
|
|
20704
|
+
* @param options Limits the groups returned.
|
|
20705
|
+
*/
|
|
20706
|
+
getGroups(axis: IRange.Axis, options?: IOutline.GetGroupsOptions): readonly IOutline.Group[];
|
|
20707
|
+
/**
|
|
20708
|
+
* Expands the groups up to a level and collapses everything deeper, as the level buttons do.
|
|
20709
|
+
*
|
|
20710
|
+
* @param axis The axis.
|
|
20711
|
+
* @param levels How many levels stay visible, from `1` (only the outermost summaries); more levels
|
|
20712
|
+
* than exist shows every row or column.
|
|
20713
|
+
*
|
|
20714
|
+
* @remarks
|
|
20715
|
+
* The counterpart of Excel's `Outline.ShowLevels` and Office Scripts' `showOutlineLevels`, one
|
|
20716
|
+
* axis at a time.
|
|
20717
|
+
*/
|
|
20718
|
+
setVisibleLevels(axis: IRange.Axis, levels: number, options?: ITransaction.OperationOptions): this;
|
|
20719
|
+
/**
|
|
20720
|
+
* Removes every outline level from the sheet. Hidden rows and columns stay hidden.
|
|
20721
|
+
*
|
|
20722
|
+
* @param axes Which levels to remove. Default `IRange.AxisSelection.Both`.
|
|
20723
|
+
* @returns The current `IOutline`.
|
|
20724
|
+
* @throws `Error` If the sheet is protected.
|
|
20725
|
+
*
|
|
20726
|
+
* @remarks
|
|
20727
|
+
* The whole-sheet form of {@link ICellRange.clearGroups}, which is what Excel's Clear Outline
|
|
20728
|
+
* does with one cell selected.
|
|
20729
|
+
*/
|
|
20730
|
+
clear(axes?: IRange.AxisSelection, options?: ITransaction.OperationOptions): this;
|
|
20731
|
+
/**
|
|
20732
|
+
* Outlines the sheet from its formulas: a cell whose formula totals the cells on one side of it
|
|
20733
|
+
* in its own column makes its row a summary row and those rows a group, and the same for
|
|
20734
|
+
* columns.
|
|
20735
|
+
*
|
|
20736
|
+
* @returns The current `IOutline`.
|
|
20737
|
+
* @throws `Error` If no summary rows or columns are found, or the sheet is protected.
|
|
20738
|
+
*
|
|
20739
|
+
* @remarks
|
|
20740
|
+
* The counterpart of Excel's `Range.AutoOutline`, which outlines the whole sheet whatever the
|
|
20741
|
+
* range. Any outline the sheet already has is removed first, and the summary direction of each
|
|
20742
|
+
* axis is set to where its first summary sits: below and right, or above and left.
|
|
20743
|
+
*/
|
|
20744
|
+
autoOutline(options?: ITransaction.OperationOptions): this;
|
|
20745
|
+
/**
|
|
20746
|
+
* The settings that differ from their defaults, or `null` when none do.
|
|
20747
|
+
*
|
|
20748
|
+
* @remarks
|
|
20749
|
+
* The levels themselves are saved with the rows and columns, not here.
|
|
20750
|
+
*/
|
|
20751
|
+
toJSON(): IOutline.JSON | null;
|
|
20752
|
+
/**
|
|
20753
|
+
* For runtime type checking.
|
|
20754
|
+
*/
|
|
20755
|
+
readonly isIOutline: true;
|
|
20756
|
+
}
|
|
20757
|
+
|
|
20758
|
+
/**
|
|
20759
|
+
* {@inheritDoc IOutline}
|
|
20760
|
+
* @see
|
|
20761
|
+
* ### **Interface**
|
|
20762
|
+
*
|
|
20763
|
+
* {@link IOutline}
|
|
20764
|
+
*/
|
|
20765
|
+
export namespace IOutline {
|
|
20766
|
+
/**
|
|
20767
|
+
* A group of rows or columns.
|
|
20768
|
+
*/
|
|
20769
|
+
interface Group {
|
|
20770
|
+
/**
|
|
20771
|
+
* The level, from `1`; level 1 is the outermost.
|
|
20772
|
+
*/
|
|
20773
|
+
level: number;
|
|
20774
|
+
/**
|
|
20775
|
+
* The first detail row or column.
|
|
20776
|
+
*/
|
|
20777
|
+
start: number;
|
|
20778
|
+
/**
|
|
20779
|
+
* The last detail row or column, inclusive.
|
|
20780
|
+
*/
|
|
20781
|
+
end: number;
|
|
20782
|
+
/**
|
|
20783
|
+
* The summary row or column, or `null` when the group runs to the edge of the sheet on the
|
|
20784
|
+
* summary side.
|
|
20785
|
+
*/
|
|
20786
|
+
summary: number | null;
|
|
20787
|
+
/**
|
|
20788
|
+
* Whether the details are collapsed: every one of them is hidden, whoever hid them.
|
|
20789
|
+
*
|
|
20790
|
+
* @remarks
|
|
20791
|
+
* Read from the hidden details, as Excel reads it. A group whose summary is itself hidden,
|
|
20792
|
+
* inside a collapsed outer group, reads collapsed only when it was collapsed before the outer
|
|
20793
|
+
* one; expanding the outer group leaves such a group collapsed and opens the rest.
|
|
20794
|
+
*/
|
|
20795
|
+
collapsed: boolean;
|
|
20796
|
+
}
|
|
20797
|
+
/**
|
|
20798
|
+
* Options for {@link IOutline.getGroups}.
|
|
20799
|
+
*/
|
|
20800
|
+
interface GetGroupsOptions {
|
|
20801
|
+
/**
|
|
20802
|
+
* Only this level. Omitted returns every level.
|
|
20803
|
+
*/
|
|
20804
|
+
level?: number;
|
|
20805
|
+
/**
|
|
20806
|
+
* Only groups that meet the span from here (a viewport). Includes the summary.
|
|
20807
|
+
*/
|
|
20808
|
+
from?: number;
|
|
20809
|
+
/**
|
|
20810
|
+
* Only groups that meet the span to here, inclusive.
|
|
20811
|
+
*/
|
|
20812
|
+
to?: number;
|
|
20813
|
+
}
|
|
20814
|
+
/**
|
|
20815
|
+
* The outline settings that differ from their defaults.
|
|
20816
|
+
*/
|
|
20817
|
+
interface JSON {
|
|
20818
|
+
/**
|
|
20819
|
+
* Present, as `up`, when a group's summary row sits above its details.
|
|
20820
|
+
*/
|
|
20821
|
+
summaryRow?: 'up';
|
|
20822
|
+
/**
|
|
20823
|
+
* Present, as `left`, when a group's summary column sits left of its details.
|
|
20824
|
+
*/
|
|
20825
|
+
summaryColumn?: 'left';
|
|
20826
|
+
/**
|
|
20827
|
+
* Present, as `true`, when the automatic outline styles are applied.
|
|
20828
|
+
*/
|
|
20829
|
+
automaticStyles?: true;
|
|
20830
|
+
}
|
|
20831
|
+
interface Events {
|
|
20832
|
+
/**
|
|
20833
|
+
* Called when the outline changes: its settings, a level, or which details are shown.
|
|
20834
|
+
*/
|
|
20835
|
+
onOutlineChange?(source: IOutline): void;
|
|
20836
|
+
}
|
|
20837
|
+
interface IListeners extends IListener.Callbacks<IOutline, IOutline.Events> {
|
|
20838
|
+
}
|
|
20839
|
+
}
|
|
20840
|
+
|
|
19736
20841
|
/**
|
|
19737
20842
|
* A person known to the workbook: the author of a comment, or someone mentioned in one.
|
|
19738
20843
|
*
|
|
@@ -22110,6 +23215,41 @@ declare global {
|
|
|
22110
23215
|
type JSONReference<J = any> = JSONReferenceEntry<J> | JSONReferenceTuple<J>;
|
|
22111
23216
|
}
|
|
22112
23217
|
|
|
23218
|
+
/**
|
|
23219
|
+
* What a scroll bar and a spinner share: a number between two bounds.
|
|
23220
|
+
*/
|
|
23221
|
+
export interface IRangedControl extends IFormControl, ILinked {
|
|
23222
|
+
/** Returns the current value, or `null` if the control has not said. */
|
|
23223
|
+
getValue(): number | null;
|
|
23224
|
+
/** Sets the current value. */
|
|
23225
|
+
setValue(value: number | null, options?: ITransaction.OperationOptions): this;
|
|
23226
|
+
/** Returns the smallest value, or `null` if the control has not said. */
|
|
23227
|
+
getMin(): number | null;
|
|
23228
|
+
/** Sets the smallest value. */
|
|
23229
|
+
setMin(min: number | null, options?: ITransaction.OperationOptions): this;
|
|
23230
|
+
/** Returns the largest value, or `null` if the control has not said. */
|
|
23231
|
+
getMax(): number | null;
|
|
23232
|
+
/** Sets the largest value. */
|
|
23233
|
+
setMax(max: number | null, options?: ITransaction.OperationOptions): this;
|
|
23234
|
+
/** Returns how far one arrow click moves the value, or `null` if the control has not said. */
|
|
23235
|
+
getIncrement(): number | null;
|
|
23236
|
+
/** Sets how far one arrow click moves the value. */
|
|
23237
|
+
setIncrement(increment: number | null, options?: ITransaction.OperationOptions): this;
|
|
23238
|
+
}
|
|
23239
|
+
|
|
23240
|
+
export namespace IRangedControl {
|
|
23241
|
+
interface JSON extends IFormControl.JSON, ILinked.JSON {
|
|
23242
|
+
/** The current value. */
|
|
23243
|
+
value?: number;
|
|
23244
|
+
/** The smallest value. */
|
|
23245
|
+
min?: number;
|
|
23246
|
+
/** The largest value. */
|
|
23247
|
+
max?: number;
|
|
23248
|
+
/** How far one arrow click moves the value. */
|
|
23249
|
+
increment?: number;
|
|
23250
|
+
}
|
|
23251
|
+
}
|
|
23252
|
+
|
|
22113
23253
|
/**
|
|
22114
23254
|
* Interface representing a range selection within a sheet.
|
|
22115
23255
|
*/
|
|
@@ -23640,6 +24780,30 @@ declare global {
|
|
|
23640
24780
|
}
|
|
23641
24781
|
}
|
|
23642
24782
|
|
|
24783
|
+
/**
|
|
24784
|
+
* A scroll bar: a thumb in a trough. Content type `'scrollBar'`.
|
|
24785
|
+
*/
|
|
24786
|
+
export interface IScrollBar extends IRangedControl {
|
|
24787
|
+
/** Returns how far a click in the trough moves the value, or `null` if the control has not said. */
|
|
24788
|
+
getPageIncrement(): number | null;
|
|
24789
|
+
/** Sets how far a click in the trough moves the value. */
|
|
24790
|
+
setPageIncrement(increment: number | null, options?: ITransaction.OperationOptions): this;
|
|
24791
|
+
/** Returns `true` if the bar lies on its side. */
|
|
24792
|
+
isHorizontal(): boolean;
|
|
24793
|
+
}
|
|
24794
|
+
|
|
24795
|
+
export namespace IScrollBar {
|
|
24796
|
+
interface JSON extends IRangedControl.JSON {
|
|
24797
|
+
/** How far a click in the trough moves the value. */
|
|
24798
|
+
pageIncrement?: number;
|
|
24799
|
+
/**
|
|
24800
|
+
* `true` if the bar lies on its side.
|
|
24801
|
+
* @defaultValue false
|
|
24802
|
+
*/
|
|
24803
|
+
horizontal?: boolean;
|
|
24804
|
+
}
|
|
24805
|
+
}
|
|
24806
|
+
|
|
23643
24807
|
/**
|
|
23644
24808
|
* A drawn shape: a text box, a callout, a rectangle, a connector, or a group of them.
|
|
23645
24809
|
*
|
|
@@ -23648,8 +24812,8 @@ declare global {
|
|
|
23648
24812
|
* whose content type is `'shape'`. The movable carries the position; the shape carries what is
|
|
23649
24813
|
* drawn there and what is written on it.
|
|
23650
24814
|
*
|
|
23651
|
-
* Reading
|
|
23652
|
-
*
|
|
24815
|
+
* Reading, and adjust values: a shape is JSON ({@link IShape.JSON}) that a file reads into and
|
|
24816
|
+
* writes from; the editing API beyond `setAdjustments` is still to come.
|
|
23653
24817
|
*/
|
|
23654
24818
|
export interface IShape extends IModel, IMovable.IContent {
|
|
23655
24819
|
toJSON(toResourceId?: (resource: IResource) => number | null): IShape.JSON | null;
|
|
@@ -23657,6 +24821,12 @@ declare global {
|
|
|
23657
24821
|
* Returns the name of the shape.
|
|
23658
24822
|
*/
|
|
23659
24823
|
getName(): string | null;
|
|
24824
|
+
/**
|
|
24825
|
+
* The image a resource id in this shape's JSON names: an image fill's `resId`, a picture
|
|
24826
|
+
* member's among them, as {@link toJSON} with no scope names them. `null` when the shape holds
|
|
24827
|
+
* no such resource.
|
|
24828
|
+
*/
|
|
24829
|
+
getResource(resourceId: number): IResource | null;
|
|
23660
24830
|
/**
|
|
23661
24831
|
* Deletes the shape, and with it the movable that places it.
|
|
23662
24832
|
*/
|
|
@@ -23665,8 +24835,9 @@ declare global {
|
|
|
23665
24835
|
* Returns the kind of shape this is: its preset geometry.
|
|
23666
24836
|
*
|
|
23667
24837
|
* @remarks
|
|
23668
|
-
* A DrawingML preset id — `rect`, `borderCallout2`, `curvedConnector3` —
|
|
23669
|
-
* shape drawn from its own path, or `'group'` for a group of shapes.
|
|
24838
|
+
* A DrawingML preset id ({@link IGeometry.Preset}) — `rect`, `borderCallout2`, `curvedConnector3` —
|
|
24839
|
+
* or `'custom'` for a shape drawn from its own path, or `'group'` for a group of shapes. A file
|
|
24840
|
+
* may name a preset this SDK does not know; it is returned as the file states it.
|
|
23670
24841
|
*
|
|
23671
24842
|
* The preset says what a shape is for where its name does not: a callout annotates something,
|
|
23672
24843
|
* a connector links two shapes, and a rectangle with no text is usually a box drawn around the
|
|
@@ -23692,6 +24863,48 @@ declare global {
|
|
|
23692
24863
|
* ```
|
|
23693
24864
|
*/
|
|
23694
24865
|
getTextFrame(): ITextFrame.IText | null;
|
|
24866
|
+
/**
|
|
24867
|
+
* Returns the adjust values set on this shape, by name.
|
|
24868
|
+
*
|
|
24869
|
+
* @remarks
|
|
24870
|
+
* A preset's handles move its adjust values — how rounded a `roundRect` is, where a callout
|
|
24871
|
+
* points. Only values that differ from the preset's defaults are stored.
|
|
24872
|
+
*
|
|
24873
|
+
* The values are the geometry definition's own numbers (a ratio in 100,000ths, an angle in
|
|
24874
|
+
* 60,000ths of a degree), opaque to a caller: a handle drag produces them through
|
|
24875
|
+
* {@link IGeometry.adjustmentsFromHandle}, and a file reads and writes them as they are.
|
|
24876
|
+
*/
|
|
24877
|
+
getAdjustments(): Readonly<Record<string, number>>;
|
|
24878
|
+
/**
|
|
24879
|
+
* Sets the adjust values, replacing any already set.
|
|
24880
|
+
*
|
|
24881
|
+
* @param adjustments Values by name, as {@link IGeometry.adjustmentsFromHandle} returns them;
|
|
24882
|
+
* `null` restores the preset's defaults. Names the preset does not declare are kept but have no
|
|
24883
|
+
* effect.
|
|
24884
|
+
*/
|
|
24885
|
+
setAdjustments(adjustments: Record<string, number> | null, options?: ITransaction.OperationOptions): this;
|
|
24886
|
+
/**
|
|
24887
|
+
* Evaluates the shape's geometry at a size.
|
|
24888
|
+
*
|
|
24889
|
+
* @remarks
|
|
24890
|
+
* What evaluates a shape loads on first use, and only what that shape needs, so this is
|
|
24891
|
+
* asynchronous; a workbook with no shapes loads none of it. Everything on the geometry it
|
|
24892
|
+
* returns is synchronous, including evaluating it again at another size or with other adjust
|
|
24893
|
+
* values. Paths, handles and sites are in sheet pixels, in the shape's own frame (its top-left
|
|
24894
|
+
* is 0,0), which is how the movable layer draws them.
|
|
24895
|
+
*
|
|
24896
|
+
* An open path takes the line ends the shape's line declares (its own over its theme style's):
|
|
24897
|
+
* its stroke is trimmed under them, and they are visited as {@link IGeometry.PathLayer.Marker}
|
|
24898
|
+
* paths. A group's geometry is its members', each placed in the group's frame.
|
|
24899
|
+
*
|
|
24900
|
+
* @param width Width in pixels. @defaultValue the movable's bounds.
|
|
24901
|
+
* @param height Height in pixels. @defaultValue the movable's bounds.
|
|
24902
|
+
* @returns `null` for a shape whose preset is unknown, or a shape with no size. A custom
|
|
24903
|
+
* geometry evaluates like a preset, from its own definition.
|
|
24904
|
+
*/
|
|
24905
|
+
getGeometry(width?: number, height?: number): Promise<IGeometry | null>;
|
|
24906
|
+
/** For runtime type checking. */
|
|
24907
|
+
readonly isIShape: true;
|
|
23695
24908
|
}
|
|
23696
24909
|
|
|
23697
24910
|
/**
|
|
@@ -23702,6 +24915,25 @@ declare global {
|
|
|
23702
24915
|
* {@link IShape}
|
|
23703
24916
|
*/
|
|
23704
24917
|
export namespace IShape {
|
|
24918
|
+
/**
|
|
24919
|
+
* What kind of drawing a shape's JSON describes.
|
|
24920
|
+
*
|
|
24921
|
+
* @remarks
|
|
24922
|
+
* Every kind is an `IShape` whose {@link IMovable.IContent.getType | content type} is `'shape'`;
|
|
24923
|
+
* this is the one place the distinction survives a round trip. A JSON that states none is a
|
|
24924
|
+
* {@link IShape.Type.Shape | shape}.
|
|
24925
|
+
*/
|
|
24926
|
+
const Type: {
|
|
24927
|
+
/** A shape drawn from a preset or custom geometry, with or without text. */
|
|
24928
|
+
readonly Shape: "shape";
|
|
24929
|
+
/** A connector: a line that may be glued to other shapes' connection sites. */
|
|
24930
|
+
readonly Connector: "connector";
|
|
24931
|
+
/** A group of shapes, placed together; its members are its {@link JSON.children}. */
|
|
24932
|
+
readonly Group: "group";
|
|
24933
|
+
/** A picture inside a group; see {@link PictureMemberJSON}. */
|
|
24934
|
+
readonly Picture: "picture";
|
|
24935
|
+
};
|
|
24936
|
+
type Type = typeof Type[keyof typeof Type];
|
|
23705
24937
|
/**
|
|
23706
24938
|
* A set of values that can be set on a IShape.
|
|
23707
24939
|
*
|
|
@@ -23710,15 +24942,20 @@ declare global {
|
|
|
23710
24942
|
*/
|
|
23711
24943
|
interface Properties {
|
|
23712
24944
|
/**
|
|
23713
|
-
* The
|
|
24945
|
+
* The name of the shape.
|
|
23714
24946
|
*/
|
|
23715
24947
|
name?: string;
|
|
23716
24948
|
/**
|
|
23717
|
-
* The
|
|
24949
|
+
* The geometry: a DrawingML preset name (`'rect'`, `'roundRect'`, `'wedgeEllipseCallout'`…)
|
|
24950
|
+
* or a custom definition in the same form as a preset.
|
|
23718
24951
|
*
|
|
23719
24952
|
* @defaultValue 'rect'
|
|
23720
24953
|
*/
|
|
23721
|
-
geometry?:
|
|
24954
|
+
geometry?: string | IGeometry.Def;
|
|
24955
|
+
/**
|
|
24956
|
+
* Adjust values that differ from the preset's defaults, by name (`adj`, `adj1`…).
|
|
24957
|
+
*/
|
|
24958
|
+
adjustments?: Record<string, number>;
|
|
23722
24959
|
/**
|
|
23723
24960
|
* The fill.
|
|
23724
24961
|
*/
|
|
@@ -23730,224 +24967,124 @@ declare global {
|
|
|
23730
24967
|
/**
|
|
23731
24968
|
* A hyperlink for the entire shape.
|
|
23732
24969
|
*/
|
|
23733
|
-
hyperlink?:
|
|
24970
|
+
hyperlink?: IHyperlink.JSON;
|
|
23734
24971
|
}
|
|
23735
24972
|
/**
|
|
23736
24973
|
* A JSON representation useful for persistence.
|
|
23737
24974
|
*/
|
|
23738
|
-
interface JSON extends Omit<Properties, 'fill' | 'stroke' | 'geometry'> {
|
|
23739
|
-
fill?: IFill.SolidJSON | IFill.GradientJSON | IFill.PatternJSON | IFill.NoneJSON;
|
|
23740
|
-
stroke?: IStroke.JSON;
|
|
23741
|
-
geometry?: string | GeometryJSON;
|
|
23742
|
-
/** Which drawing element this was read from ("sp" | "cxnSp" | "grpSp") — `getType()` always
|
|
23743
|
-
* reports "shape" regardless, so this is the only place the distinction survives a round trip. */
|
|
23744
|
-
type?: string;
|
|
23745
|
-
/** Opaque source XML fragment, captured verbatim from the source file and replayed as-is on
|
|
23746
|
-
* save, for whatever this shape doesn't (yet) model structurally. */
|
|
23747
|
-
xml?: string;
|
|
23748
|
-
/** The `mc:Fallback` rendition of `xml`, captured verbatim, when the source offered the shape as an
|
|
23749
|
-
* `mc:AlternateContent`. An equation's fallback is where its linear text form is. */
|
|
23750
|
-
fallbackXml?: string;
|
|
23751
|
-
/** Original `cNvPr` id from the captured source fragment, if any; used to avoid id collisions
|
|
23752
|
-
* with freshly-generated ids on write. */
|
|
23753
|
-
sourceId?: number;
|
|
23754
|
-
}
|
|
23755
|
-
interface GeometryProperties {
|
|
23756
|
-
geometry?: PresetGeometry;
|
|
23757
|
-
ah: (PolarAdjustmentHandle | XYAdjustmentHandle)[];
|
|
23758
|
-
av?: IShape.AdjustmentGuide[];
|
|
23759
|
-
connections?: IShape.ConnectionSite[];
|
|
23760
|
-
guides?: IShape.AdjustmentGuide[];
|
|
23761
|
-
paths?: IShape.Path[] | string[] | string;
|
|
24975
|
+
interface JSON extends Omit<Properties, 'fill' | 'stroke' | 'geometry' | 'hyperlink'> {
|
|
23762
24976
|
/**
|
|
23763
|
-
*
|
|
23764
|
-
*
|
|
23765
|
-
*/
|
|
23766
|
-
textBounds?: Rectangle;
|
|
23767
|
-
}
|
|
23768
|
-
interface Path {
|
|
23769
|
-
paths: string[];
|
|
23770
|
-
/**
|
|
23771
|
-
* Specifies that the use of 3D extrusions are possible on this path. This allows the generating application to know whether
|
|
23772
|
-
* 3D extrusion can be applied in any form.
|
|
23773
|
-
*
|
|
23774
|
-
* @defaultValue `false`
|
|
24977
|
+
* What kind of drawing this is. Absent for a {@link Type.Shape | shape}; a connector, a group
|
|
24978
|
+
* and a group's picture member state theirs.
|
|
23775
24979
|
*/
|
|
23776
|
-
|
|
24980
|
+
type?: Type;
|
|
24981
|
+
fill?: IFill.SolidJSON | IFill.GradientJSON | IFill.PatternJSON | IFill.ImageJSON | IFill.NoneJSON;
|
|
24982
|
+
stroke?: IStroke.JSON;
|
|
23777
24983
|
/**
|
|
23778
|
-
*
|
|
23779
|
-
*
|
|
23780
|
-
|
|
23781
|
-
|
|
23782
|
-
|
|
24984
|
+
* The shape's effects (`spPr/effectLst`). An empty list is an explicit none: the element
|
|
24985
|
+
* present and empty, which turns off the effects the shape's theme style would give it.
|
|
24986
|
+
*/
|
|
24987
|
+
effects?: IEffect.JSON[];
|
|
24988
|
+
/** The 3-D scene (`spPr/scene3d`) as the file states it: an opaque DrawingML fragment. */
|
|
24989
|
+
scene3d?: string;
|
|
24990
|
+
/** The 3-D shape properties (`spPr/sp3d`) as the file states it: an opaque DrawingML fragment. */
|
|
24991
|
+
shape3d?: string;
|
|
24992
|
+
/** Extension lists kept as the file states them, by the element each extends. */
|
|
24993
|
+
extLst?: ExtLstJSON;
|
|
24994
|
+
geometry?: string | IGeometry.Def;
|
|
24995
|
+
/** The hyperlink on the whole shape (`cNvPr/hlinkClick`). */
|
|
24996
|
+
hyperlink?: IHyperlink.JSON;
|
|
24997
|
+
/** The hyperlink followed on hover (`cNvPr/hlinkHover`). */
|
|
24998
|
+
hoverHyperlink?: IHyperlink.JSON;
|
|
24999
|
+
/** The title (`cNvPr/@title`), beside the description. */
|
|
25000
|
+
title?: string;
|
|
25001
|
+
/** The macro bound to the shape (`sp/@macro`), as the file states it. */
|
|
25002
|
+
macro?: string;
|
|
25003
|
+
/** The cell a text box's text is linked to (`sp/@textlink`), as the file states it. */
|
|
25004
|
+
textLink?: string;
|
|
25005
|
+
/** The text cannot be edited while the sheet is protected (`sp/@fLocksText`). */
|
|
25006
|
+
locksText?: boolean;
|
|
25007
|
+
/** `sp/@fPublished`. */
|
|
25008
|
+
published?: boolean;
|
|
25009
|
+
/** The shape was inserted as a text box (`cNvSpPr/@txBox`). */
|
|
25010
|
+
textBox?: boolean;
|
|
25011
|
+
/**
|
|
25012
|
+
* Edit locks (`spLocks`/`cxnSpLocks`) by the file's own names: `noGrp`, `noSelect`, `noRot`,
|
|
25013
|
+
* `noChangeAspect`, `noMove`, `noResize`, `noEditPoints`, `noAdjustHandles`,
|
|
25014
|
+
* `noChangeArrowheads`, `noChangeShapeType`, `noTextEdit`.
|
|
25015
|
+
*/
|
|
25016
|
+
locks?: Record<string, boolean>;
|
|
25017
|
+
/** A connector's glued ends. */
|
|
25018
|
+
connectorEnds?: {
|
|
25019
|
+
start?: ConnectorEndJSON;
|
|
25020
|
+
end?: ConnectorEndJSON;
|
|
25021
|
+
};
|
|
25022
|
+
/** The text written on the shape, by paragraph. Absent for a shape with no text body. */
|
|
25023
|
+
text?: ITextFrame.JSON;
|
|
23783
25024
|
/**
|
|
23784
|
-
*
|
|
23785
|
-
* the
|
|
23786
|
-
*
|
|
23787
|
-
*
|
|
23788
|
-
* @defaultValue `null`
|
|
25025
|
+
* A group's members in z-order. A member is read like any shape but is not captured on its
|
|
25026
|
+
* own: the group's markup holds it. A member's `bounds` are in the group's child space. A
|
|
25027
|
+
* picture among them is a {@link PictureMemberJSON}.
|
|
23789
25028
|
*/
|
|
23790
|
-
|
|
25029
|
+
children?: (JSON | PictureMemberJSON)[];
|
|
25030
|
+
/** Where the shape sits as the file states it (`xfrm`), in pixels. For a group member, in the group's child space. */
|
|
25031
|
+
bounds?: Bounds;
|
|
25032
|
+
/** A group's child space (`chOff`/`chExt`), in pixels: what its members' `bounds` are stated in. */
|
|
25033
|
+
childBounds?: Bounds;
|
|
25034
|
+
/** Rotation in degrees as the file states it on the shape's own `xfrm`. */
|
|
25035
|
+
rotation?: number;
|
|
25036
|
+
/** Mirrored left to right (`xfrm/@flipH`), as the file states it. */
|
|
25037
|
+
flipH?: boolean;
|
|
25038
|
+
/** Mirrored top to bottom (`xfrm/@flipV`), as the file states it. */
|
|
25039
|
+
flipV?: boolean;
|
|
23791
25040
|
/**
|
|
23792
|
-
*
|
|
23793
|
-
*
|
|
23794
|
-
*
|
|
25041
|
+
* The theme style the shape draws with wherever it states no fill, stroke or text color of its
|
|
25042
|
+
* own: the file's `style` element, which refers into the theme's format scheme by position.
|
|
25043
|
+
* A reference not stated is Excel's for a new shape (a connector's differ: the first line, no
|
|
25044
|
+
* fill); `null`, the shape has no style and draws only what it states itself.
|
|
23795
25045
|
*/
|
|
23796
|
-
|
|
25046
|
+
style?: ITheme.StyleRefsJSON | null;
|
|
23797
25047
|
/**
|
|
23798
|
-
*
|
|
23799
|
-
*
|
|
23800
|
-
* as
|
|
23801
|
-
*
|
|
23802
|
-
* @defaultValue `null`
|
|
25048
|
+
* The id the file gave the shape (`cNvPr/@id`), which is what a connector's
|
|
25049
|
+
* {@link connectorEnds} name their targets by. A file writes the shape with this id again
|
|
25050
|
+
* (made unique when two shapes share one, as a copy does); a shape without one takes the next.
|
|
23803
25051
|
*/
|
|
23804
|
-
|
|
25052
|
+
sourceId?: number;
|
|
23805
25053
|
}
|
|
23806
25054
|
/**
|
|
23807
|
-
*
|
|
23808
|
-
*
|
|
23809
|
-
|
|
23810
|
-
const PathFill: {
|
|
23811
|
-
readonly Darken: "darken";
|
|
23812
|
-
readonly DarkenLess: "darkenLess";
|
|
23813
|
-
readonly Lighten: "lighten";
|
|
23814
|
-
readonly LightenLess: "lightenLess";
|
|
23815
|
-
readonly None: "none";
|
|
23816
|
-
readonly Normal: "normal";
|
|
23817
|
-
};
|
|
23818
|
-
type PathFill = typeof PathFill[keyof typeof PathFill];
|
|
23819
|
-
/**
|
|
23820
|
-
* Specifies the presence of a shape guide that will be used to govern the geometry of the specified shape.
|
|
25055
|
+
* The `extLst` fragments of a shape's elements: opaque DrawingML kept as the file states it and
|
|
25056
|
+
* written back as it was, the one markup that stays once the shape is otherwise JSON. A line's
|
|
25057
|
+
* is on its stroke, a text body's on its body.
|
|
23821
25058
|
*/
|
|
23822
|
-
interface
|
|
23823
|
-
/**
|
|
23824
|
-
|
|
23825
|
-
|
|
23826
|
-
|
|
23827
|
-
*/
|
|
23828
|
-
name: string;
|
|
23829
|
-
/**
|
|
23830
|
-
* Specifies the formula that will be used to calculate the value for a guide. Each formula has a certain
|
|
23831
|
-
* number of arguments and a specific set of operations to perform on these arguments in order to generate a
|
|
23832
|
-
* value for a guide. There are a total of 17 different formulas available. These are shown below with the usage
|
|
23833
|
-
* for each defined
|
|
23834
|
-
*/
|
|
23835
|
-
fmla: string;
|
|
25059
|
+
interface ExtLstJSON {
|
|
25060
|
+
/** `cNvPr/extLst`: the creation id and whatever else extends the non-visual properties. */
|
|
25061
|
+
nonVisual?: string;
|
|
25062
|
+
/** `spPr/extLst`. */
|
|
25063
|
+
properties?: string;
|
|
23836
25064
|
}
|
|
23837
25065
|
/**
|
|
23838
|
-
*
|
|
23839
|
-
*
|
|
25066
|
+
* A picture inside a group (`pic`): a member like any other, placed by its `bounds` in the
|
|
25067
|
+
* group's child space. Its geometry is a rectangle and its image is its fill.
|
|
25068
|
+
*
|
|
25069
|
+
* @remarks
|
|
25070
|
+
* The fill's `resId` names the image the way {@link IPicture.JSON.resId} names a placed
|
|
25071
|
+
* picture's, and like it is meaningful only inside the persist scope the JSON was made in: a
|
|
25072
|
+
* shape resolves it to the resource when it is created and names the resource again when it
|
|
25073
|
+
* is serialized.
|
|
23840
25074
|
*/
|
|
23841
|
-
interface
|
|
23842
|
-
|
|
23843
|
-
|
|
23844
|
-
|
|
23845
|
-
pos: Point;
|
|
23846
|
-
}
|
|
23847
|
-
interface PolarAdjustmentHandle extends AdjustmentHandle {
|
|
23848
|
-
type: 'polar';
|
|
23849
|
-
/**
|
|
23850
|
-
* Specifies the name of the guide that will be updated with the adjustment angle from this adjust handle.
|
|
23851
|
-
*/
|
|
23852
|
-
gdRefAng: string;
|
|
23853
|
-
/**
|
|
23854
|
-
* Specifies the name of the guide that will be updated with the adjustment radius from this adjust handle.
|
|
23855
|
-
*/
|
|
23856
|
-
gdRefR: string;
|
|
23857
|
-
/**
|
|
23858
|
-
* Specifies the maximum angle position that is allowed for this adjustment handle. If this attribute is omitted,
|
|
23859
|
-
* then it will be assumed that this adjust handle cannot move angularly.
|
|
23860
|
-
*/
|
|
23861
|
-
maxAng: number;
|
|
23862
|
-
/**
|
|
23863
|
-
* Specifies the maximum radial position that is allowed for this adjustment handle. If this attribute is omitted,
|
|
23864
|
-
* then it will be assumed that this adjust handle cannot move radially.
|
|
23865
|
-
*/
|
|
23866
|
-
maxR: number;
|
|
23867
|
-
/**
|
|
23868
|
-
* Specifies the minimum angle position that is allowed for this adjustment handle. If this attribute is omitted,
|
|
23869
|
-
* then it will be assumed that this adjust handle cannot move angularly.
|
|
23870
|
-
*/
|
|
23871
|
-
minAng: number;
|
|
23872
|
-
/**
|
|
23873
|
-
* Specifies the minimum radial position that is allowed for this adjustment handle. If this attribute is omitted,
|
|
23874
|
-
* then it will be assumed that this adjust handle cannot move radially.
|
|
23875
|
-
*/
|
|
23876
|
-
minR: number;
|
|
23877
|
-
}
|
|
23878
|
-
interface XYAdjustmentHandle extends AdjustmentHandle {
|
|
23879
|
-
type: 'xy';
|
|
23880
|
-
/**
|
|
23881
|
-
* Specifies the name of the guide that will be updated with the adjustment x position from this adjust handle.
|
|
23882
|
-
*/
|
|
23883
|
-
gdRefX: string;
|
|
23884
|
-
/**
|
|
23885
|
-
* Specifies the name of the guide that will be updated with the adjustment y position from this adjust handle.
|
|
23886
|
-
*/
|
|
23887
|
-
gdRefY: string;
|
|
23888
|
-
/**
|
|
23889
|
-
* Specifies the maximum horizontal position that is allowed for this adjustment handle. If this attribute is omitted,
|
|
23890
|
-
* then it will be assumed that this adjust handle cannot move in the x direction.
|
|
23891
|
-
*/
|
|
23892
|
-
maxX: number;
|
|
23893
|
-
/**
|
|
23894
|
-
* Specifies the maximum vertical position that is allowed for this adjustment handle. If this attribute is omitted,
|
|
23895
|
-
* then it will be assumed that this adjust handle cannot move in the y direction.
|
|
23896
|
-
*/
|
|
23897
|
-
maxY: number;
|
|
23898
|
-
/**
|
|
23899
|
-
* Specifies the minimum horizontal position that is allowed for this adjustment handle. If this attribute is omitted,
|
|
23900
|
-
* then it will be assumed that this adjust handle cannot move in the x direction.
|
|
23901
|
-
*/
|
|
23902
|
-
minX: number;
|
|
23903
|
-
/**
|
|
23904
|
-
* Specifies the minimum vertical position that is allowed for this adjustment handle. If this attribute is omitted,
|
|
23905
|
-
* then it will be assumed that this adjust handle cannot move in the y direction.
|
|
23906
|
-
*/
|
|
23907
|
-
minY: number;
|
|
25075
|
+
interface PictureMemberJSON extends JSON {
|
|
25076
|
+
type: typeof Type.Picture;
|
|
25077
|
+
/** The image, as an image fill. */
|
|
25078
|
+
fill?: IFill.ImageJSON;
|
|
23908
25079
|
}
|
|
23909
25080
|
/**
|
|
23910
|
-
*
|
|
23911
|
-
*
|
|
23912
|
-
* bounding box using the transform coordinate system which is also called the shape coordinate system,
|
|
23913
|
-
* as it encompasses the entire shape.
|
|
25081
|
+
* One glued end of a connector: the shape it is attached to, by the id the file gives that
|
|
25082
|
+
* shape (its `sourceId` here), and which of that shape's connection sites.
|
|
23914
25083
|
*/
|
|
23915
|
-
interface
|
|
23916
|
-
|
|
23917
|
-
|
|
23918
|
-
* incoming connector will try to be routed to. This allows connectors to know where the shape is in
|
|
23919
|
-
* relation to the connection site and route connectors so as to avoid any overlap with the shape.
|
|
23920
|
-
*/
|
|
23921
|
-
angle: string;
|
|
23922
|
-
/**
|
|
23923
|
-
* Specifies a position coordinate within the shape bounding box. It should be noted that this coordinate
|
|
23924
|
-
* is placed within the shape bounding box using the transform coordinate system which is also called the
|
|
23925
|
-
* shape coordinate system, as it encompasses the entire shape.
|
|
23926
|
-
*/
|
|
23927
|
-
pos: Point;
|
|
23928
|
-
}
|
|
23929
|
-
interface GeometryJSON extends GeometryProperties {
|
|
23930
|
-
}
|
|
23931
|
-
interface Events extends IModel.Events {
|
|
23932
|
-
}
|
|
23933
|
-
interface IListeners extends IListener.Callbacks<IShape, IShape.Events> {
|
|
23934
|
-
}
|
|
23935
|
-
interface IConnection {
|
|
23936
|
-
}
|
|
23937
|
-
interface Connection extends IShape.JSON {
|
|
23938
|
-
cxnSp?: any;
|
|
25084
|
+
interface ConnectorEndJSON {
|
|
25085
|
+
id: number;
|
|
25086
|
+
index: number;
|
|
23939
25087
|
}
|
|
23940
|
-
/**
|
|
23941
|
-
* @see {@link https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_ST_ShapeType_topic_ID0EBTFOB.html#topic_ID0EBTFOB}
|
|
23942
|
-
*/
|
|
23943
|
-
const PresetGeometry: {
|
|
23944
|
-
readonly Line: "line";
|
|
23945
|
-
readonly LineInv: "lineInv";
|
|
23946
|
-
readonly triangle: "triangle";
|
|
23947
|
-
readonly rtTriangle: "rtTriangle";
|
|
23948
|
-
readonly Rect: "rect";
|
|
23949
|
-
};
|
|
23950
|
-
type PresetGeometry = typeof PresetGeometry[keyof typeof PresetGeometry];
|
|
23951
25088
|
}
|
|
23952
25089
|
|
|
23953
25090
|
/**
|
|
@@ -24183,12 +25320,9 @@ declare global {
|
|
|
24183
25320
|
*/
|
|
24184
25321
|
getCodeName(): string | null;
|
|
24185
25322
|
/**
|
|
24186
|
-
*
|
|
24187
|
-
*
|
|
24188
|
-
* @remarks
|
|
24189
|
-
* Always fully populated: a sheet that declares nothing reports the defaults.
|
|
25323
|
+
* The row and column groups on this sheet, and how they are laid out.
|
|
24190
25324
|
*/
|
|
24191
|
-
|
|
25325
|
+
getOutline(): IOutline;
|
|
24192
25326
|
/**
|
|
24193
25327
|
* Whether conditional formats on this sheet are recalculated as the sheet changes.
|
|
24194
25328
|
*
|
|
@@ -24893,12 +26027,13 @@ declare global {
|
|
|
24893
26027
|
*/
|
|
24894
26028
|
container?: ISheet.ContainerOptions;
|
|
24895
26029
|
/**
|
|
24896
|
-
*
|
|
24897
|
-
*
|
|
26030
|
+
* The sheet's id ({@link ISheet.getId}): what formulas and operations (copy/paste) identify it
|
|
26031
|
+
* by. Must be unique among all in-memory sheets.
|
|
24898
26032
|
*
|
|
24899
|
-
* @returns
|
|
26033
|
+
* @returns The id. If not provided a new one is made.
|
|
24900
26034
|
* @remarks
|
|
24901
|
-
*
|
|
26035
|
+
* Not saved as part of the {@link ISheet.JSON} persisted model. A container that names its
|
|
26036
|
+
* sheets before it builds them (a workbook loading its sheets) supplies it.
|
|
24902
26037
|
*/
|
|
24903
26038
|
uid?: () => string;
|
|
24904
26039
|
/**
|
|
@@ -24994,38 +26129,6 @@ declare global {
|
|
|
24994
26129
|
type: string;
|
|
24995
26130
|
};
|
|
24996
26131
|
}
|
|
24997
|
-
/**
|
|
24998
|
-
* How row and column groups are laid out.
|
|
24999
|
-
*
|
|
25000
|
-
* @see {@link ISheet.getOutlineSettings}
|
|
25001
|
-
*/
|
|
25002
|
-
interface OutlineSettings {
|
|
25003
|
-
/**
|
|
25004
|
-
* Whether a group's summary row sits below its detail rows. When `false` it sits above them.
|
|
25005
|
-
*
|
|
25006
|
-
* @defaultValue true
|
|
25007
|
-
*/
|
|
25008
|
-
summaryBelow: boolean;
|
|
25009
|
-
/**
|
|
25010
|
-
* Whether a group's summary column sits to the right of its detail columns. When `false` it
|
|
25011
|
-
* sits to the left.
|
|
25012
|
-
*
|
|
25013
|
-
* @defaultValue true
|
|
25014
|
-
*/
|
|
25015
|
-
summaryRight: boolean;
|
|
25016
|
-
/**
|
|
25017
|
-
* Whether the expand and collapse buttons for groups are shown.
|
|
25018
|
-
*
|
|
25019
|
-
* @defaultValue true
|
|
25020
|
-
*/
|
|
25021
|
-
showOutlineSymbols: boolean;
|
|
25022
|
-
/**
|
|
25023
|
-
* Whether the automatic outline styles are applied to summary rows and columns.
|
|
25024
|
-
*
|
|
25025
|
-
* @defaultValue false
|
|
25026
|
-
*/
|
|
25027
|
-
applyStyles: boolean;
|
|
25028
|
-
}
|
|
25029
26132
|
/**
|
|
25030
26133
|
* A drawing whose shapes are described in the origin format's own legacy vector markup rather
|
|
25031
26134
|
* than through {@link IMovable | movables}.
|
|
@@ -25073,7 +26176,6 @@ declare global {
|
|
|
25073
26176
|
*/
|
|
25074
26177
|
cols?: IRange.JSONReference<ICellHeader.JSON>[];
|
|
25075
26178
|
defaultColSize?: number;
|
|
25076
|
-
outlineLevelCol?: number;
|
|
25077
26179
|
/**
|
|
25078
26180
|
* Row headers, each addressed as an entire-row run (`'5:5'`, `'5:12'`).
|
|
25079
26181
|
*
|
|
@@ -25082,7 +26184,6 @@ declare global {
|
|
|
25082
26184
|
*/
|
|
25083
26185
|
rows?: IRange.JSONReference<ICellHeader.JSON>[];
|
|
25084
26186
|
defaultRowSize?: number;
|
|
25085
|
-
outlineLevelRow?: number;
|
|
25086
26187
|
styles?: IStyleCollection.JSON;
|
|
25087
26188
|
resources?: IResource.JSON[];
|
|
25088
26189
|
strings?: string[];
|
|
@@ -25135,9 +26236,9 @@ declare global {
|
|
|
25135
26236
|
/**
|
|
25136
26237
|
* The outline settings that differ from their defaults.
|
|
25137
26238
|
*
|
|
25138
|
-
* @see {@link ISheet.
|
|
26239
|
+
* @see {@link ISheet.getOutline}
|
|
25139
26240
|
*/
|
|
25140
|
-
outline?:
|
|
26241
|
+
outline?: IOutline.JSON;
|
|
25141
26242
|
/**
|
|
25142
26243
|
* Present, as `false`, only when conditional format calculation is turned off.
|
|
25143
26244
|
*
|
|
@@ -25465,6 +26566,10 @@ declare global {
|
|
|
25465
26566
|
* Called when headers visibility (hidden) has changed.
|
|
25466
26567
|
*/
|
|
25467
26568
|
onHiddenChange?(source: ISheetHeader): void;
|
|
26569
|
+
/**
|
|
26570
|
+
* Called when header outline levels, or which groups are collapsed, have changed.
|
|
26571
|
+
*/
|
|
26572
|
+
onOutlineChange?(source: ISheetHeader): void;
|
|
25468
26573
|
}
|
|
25469
26574
|
interface IListeners extends IListener.Callbacks<ISheetHeader, ISheetHeader.Events> {
|
|
25470
26575
|
}
|
|
@@ -25882,6 +26987,21 @@ declare global {
|
|
|
25882
26987
|
* @see {@link setShowZeros}
|
|
25883
26988
|
*/
|
|
25884
26989
|
isShowZeros(): boolean;
|
|
26990
|
+
/**
|
|
26991
|
+
* Indicate whether the outline symbols (the brackets, the collapse and expand buttons and the
|
|
26992
|
+
* level buttons of the row and column groups) are shown.
|
|
26993
|
+
*
|
|
26994
|
+
* @defaultValue `true`
|
|
26995
|
+
*
|
|
26996
|
+
* @remarks
|
|
26997
|
+
* A view setting, as in Excel (`Window.DisplayOutline`, Ctrl+8): the groups stay on the sheet,
|
|
26998
|
+
* only their symbols are hidden. Round-trips through xlsx `sheetView@showOutlineSymbols`.
|
|
26999
|
+
*/
|
|
27000
|
+
setShowOutlineSymbols(showOutlineSymbols: boolean): this;
|
|
27001
|
+
/**
|
|
27002
|
+
* @see {@link setShowOutlineSymbols}
|
|
27003
|
+
*/
|
|
27004
|
+
isShowOutlineSymbols(): boolean;
|
|
25885
27005
|
/**
|
|
25886
27006
|
* The color of the gridline on the sheet.
|
|
25887
27007
|
*
|
|
@@ -26037,6 +27157,8 @@ declare global {
|
|
|
26037
27157
|
showInvalid: boolean;
|
|
26038
27158
|
/** {@inheritDoc ISheetView.setShowZeros} */
|
|
26039
27159
|
showZeros: boolean;
|
|
27160
|
+
/** {@inheritDoc ISheetView.setShowOutlineSymbols} */
|
|
27161
|
+
showOutlineSymbols: boolean;
|
|
26040
27162
|
/** {@inheritDoc ISheetView.setRightToLeft} */
|
|
26041
27163
|
rightToLeft: boolean;
|
|
26042
27164
|
/** {@inheritDoc ISheetView.setGridLineColor} */
|
|
@@ -26506,6 +27628,17 @@ declare global {
|
|
|
26506
27628
|
};
|
|
26507
27629
|
}
|
|
26508
27630
|
|
|
27631
|
+
/**
|
|
27632
|
+
* A spinner: two arrows. Content type `'spinner'`.
|
|
27633
|
+
*/
|
|
27634
|
+
export interface ISpinner extends IRangedControl {
|
|
27635
|
+
}
|
|
27636
|
+
|
|
27637
|
+
export namespace ISpinner {
|
|
27638
|
+
interface JSON extends IRangedControl.JSON {
|
|
27639
|
+
}
|
|
27640
|
+
}
|
|
27641
|
+
|
|
26509
27642
|
/**
|
|
26510
27643
|
* Contains a collection of interned strings.
|
|
26511
27644
|
*
|
|
@@ -26627,32 +27760,25 @@ declare global {
|
|
|
26627
27760
|
*/
|
|
26628
27761
|
miterLimit: number;
|
|
26629
27762
|
/**
|
|
26630
|
-
*
|
|
26631
|
-
*
|
|
26632
|
-
* @defaultValue `null`.
|
|
26633
|
-
*
|
|
26634
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-start}
|
|
27763
|
+
* The line end drawn at the start of an open path (DrawingML `headEnd`).
|
|
26635
27764
|
*
|
|
27765
|
+
* @defaultValue `'none'`
|
|
26636
27766
|
*/
|
|
26637
|
-
|
|
27767
|
+
headType: IStroke.LineEndType;
|
|
27768
|
+
/** The head's width, relative to the line width. @defaultValue `'med'` */
|
|
27769
|
+
headWidth: IStroke.LineEndSize;
|
|
27770
|
+
/** The head's length, relative to the line width. @defaultValue `'med'` */
|
|
27771
|
+
headLength: IStroke.LineEndSize;
|
|
26638
27772
|
/**
|
|
26639
|
-
*
|
|
26640
|
-
*
|
|
26641
|
-
* @defaultValue `null`.
|
|
26642
|
-
*
|
|
26643
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-mid}
|
|
26644
|
-
*
|
|
26645
|
-
*/
|
|
26646
|
-
markerMid: IStroke.IMarker;
|
|
26647
|
-
/**
|
|
26648
|
-
* Defines the arrowhead or shape that will be drawn at final vertex for the given shape.
|
|
26649
|
-
*
|
|
26650
|
-
* @defaultValue `null`.
|
|
26651
|
-
*
|
|
26652
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-end}
|
|
27773
|
+
* The line end drawn at the end of an open path (DrawingML `tailEnd`).
|
|
26653
27774
|
*
|
|
27775
|
+
* @defaultValue `'none'`
|
|
26654
27776
|
*/
|
|
26655
|
-
|
|
27777
|
+
tailType: IStroke.LineEndType;
|
|
27778
|
+
/** The tail's width, relative to the line width. @defaultValue `'med'` */
|
|
27779
|
+
tailWidth: IStroke.LineEndSize;
|
|
27780
|
+
/** The tail's length, relative to the line width. @defaultValue `'med'` */
|
|
27781
|
+
tailLength: IStroke.LineEndSize;
|
|
26656
27782
|
/**
|
|
26657
27783
|
* Custom or preset for the stroke.
|
|
26658
27784
|
*/
|
|
@@ -26677,20 +27803,24 @@ declare global {
|
|
|
26677
27803
|
*/
|
|
26678
27804
|
align: IStroke.Align;
|
|
26679
27805
|
}
|
|
26680
|
-
/**
|
|
26681
|
-
|
|
26682
|
-
|
|
26683
|
-
|
|
26684
|
-
|
|
26685
|
-
|
|
26686
|
-
|
|
26687
|
-
|
|
26688
|
-
|
|
26689
|
-
|
|
26690
|
-
|
|
26691
|
-
|
|
26692
|
-
|
|
26693
|
-
|
|
27806
|
+
/** The shape drawn at an open path's end (DrawingML `ST_LineEndType`). */
|
|
27807
|
+
const LineEndType: {
|
|
27808
|
+
readonly None: "none";
|
|
27809
|
+
readonly Triangle: "triangle";
|
|
27810
|
+
readonly Stealth: "stealth";
|
|
27811
|
+
readonly Diamond: "diamond";
|
|
27812
|
+
readonly Oval: "oval";
|
|
27813
|
+
/** An open arrowhead: two strokes of the line's width. */
|
|
27814
|
+
readonly Arrow: "arrow";
|
|
27815
|
+
};
|
|
27816
|
+
type LineEndType = typeof LineEndType[keyof typeof LineEndType];
|
|
27817
|
+
/** A line end's width or length, relative to the line width (DrawingML `ST_LineEndWidth` / `ST_LineEndLength`). */
|
|
27818
|
+
const LineEndSize: {
|
|
27819
|
+
readonly Small: "sm";
|
|
27820
|
+
readonly Medium: "med";
|
|
27821
|
+
readonly Large: "lg";
|
|
27822
|
+
};
|
|
27823
|
+
type LineEndSize = typeof LineEndSize[keyof typeof LineEndSize];
|
|
26694
27824
|
/**
|
|
26695
27825
|
* Support stroke with multiple strokes.
|
|
26696
27826
|
* ** PLACEHOLDER **
|
|
@@ -26794,13 +27924,6 @@ declare global {
|
|
|
26794
27924
|
readonly Round: "round";
|
|
26795
27925
|
};
|
|
26796
27926
|
type LineJoin = typeof LineJoin[keyof typeof LineJoin];
|
|
26797
|
-
const PresetMarkerShape: {
|
|
26798
|
-
readonly Single: "none";
|
|
26799
|
-
readonly Double: "double";
|
|
26800
|
-
readonly ThickThin: "thickThin";
|
|
26801
|
-
readonly ThinThick: "thinThick";
|
|
26802
|
-
};
|
|
26803
|
-
type PresetMarkerShape = typeof PresetMarkerShape[keyof typeof PresetMarkerShape];
|
|
26804
27927
|
const StrokeStyle: {
|
|
26805
27928
|
readonly None: "none";
|
|
26806
27929
|
readonly Dashed: "dashed";
|
|
@@ -26820,6 +27943,8 @@ declare global {
|
|
|
26820
27943
|
*/
|
|
26821
27944
|
interface JSON extends Properties {
|
|
26822
27945
|
fill: IFill.JSON;
|
|
27946
|
+
/** The line's `extLst` as a file states it (DrawingML `ln/extLst`): an opaque fragment, written back as it was. */
|
|
27947
|
+
extLst?: string;
|
|
26823
27948
|
}
|
|
26824
27949
|
}
|
|
26825
27950
|
|
|
@@ -29463,6 +30588,184 @@ declare global {
|
|
|
29463
30588
|
readonly Double: "double";
|
|
29464
30589
|
};
|
|
29465
30590
|
type StrikeStyle = typeof StrikeStyle[keyof typeof StrikeStyle];
|
|
30591
|
+
/**
|
|
30592
|
+
* How a paragraph's text is aligned between its margins.
|
|
30593
|
+
*/
|
|
30594
|
+
const ParagraphAlignment: {
|
|
30595
|
+
readonly Left: "left";
|
|
30596
|
+
readonly Center: "center";
|
|
30597
|
+
readonly Right: "right";
|
|
30598
|
+
/** Spread to both margins, the last line excepted. */
|
|
30599
|
+
readonly Justify: "justify";
|
|
30600
|
+
/** Justified with a low kashida, for Arabic text. */
|
|
30601
|
+
readonly JustifyLow: "justifyLow";
|
|
30602
|
+
/** Every line, the last included, is spread to both margins. */
|
|
30603
|
+
readonly Distributed: "distributed";
|
|
30604
|
+
/** Distributed the way Thai text is. */
|
|
30605
|
+
readonly ThaiDistributed: "thaiDistributed";
|
|
30606
|
+
};
|
|
30607
|
+
type ParagraphAlignment = typeof ParagraphAlignment[keyof typeof ParagraphAlignment];
|
|
30608
|
+
/**
|
|
30609
|
+
* Where runs of different sizes sit on a line.
|
|
30610
|
+
*/
|
|
30611
|
+
const FontAlignment: {
|
|
30612
|
+
readonly Auto: "auto";
|
|
30613
|
+
readonly Top: "top";
|
|
30614
|
+
readonly Center: "center";
|
|
30615
|
+
readonly Baseline: "baseline";
|
|
30616
|
+
readonly Bottom: "bottom";
|
|
30617
|
+
};
|
|
30618
|
+
type FontAlignment = typeof FontAlignment[keyof typeof FontAlignment];
|
|
30619
|
+
/**
|
|
30620
|
+
* How a run of drawing text is underlined.
|
|
30621
|
+
*
|
|
30622
|
+
* @remarks
|
|
30623
|
+
* Drawing text has more underlines than a cell's font ({@link IFont.UnderlineStyle}); the two
|
|
30624
|
+
* agree on `none`, `single` and `double`.
|
|
30625
|
+
*/
|
|
30626
|
+
const UnderlineStyle: {
|
|
30627
|
+
readonly None: "none";
|
|
30628
|
+
/** Each word underlined, the spaces between them not. */
|
|
30629
|
+
readonly Words: "words";
|
|
30630
|
+
readonly Single: "single";
|
|
30631
|
+
readonly Double: "double";
|
|
30632
|
+
readonly Heavy: "heavy";
|
|
30633
|
+
readonly Dotted: "dotted";
|
|
30634
|
+
readonly DottedHeavy: "dottedHeavy";
|
|
30635
|
+
readonly Dash: "dash";
|
|
30636
|
+
readonly DashHeavy: "dashHeavy";
|
|
30637
|
+
readonly DashLong: "dashLong";
|
|
30638
|
+
readonly DashLongHeavy: "dashLongHeavy";
|
|
30639
|
+
readonly DotDash: "dotDash";
|
|
30640
|
+
readonly DotDashHeavy: "dotDashHeavy";
|
|
30641
|
+
readonly DotDotDash: "dotDotDash";
|
|
30642
|
+
readonly DotDotDashHeavy: "dotDotDashHeavy";
|
|
30643
|
+
readonly Wavy: "wavy";
|
|
30644
|
+
readonly WavyHeavy: "wavyHeavy";
|
|
30645
|
+
readonly WavyDouble: "wavyDouble";
|
|
30646
|
+
};
|
|
30647
|
+
type UnderlineStyle = typeof UnderlineStyle[keyof typeof UnderlineStyle];
|
|
30648
|
+
/**
|
|
30649
|
+
* A font named by a run: a family, or one of the theme's two fonts.
|
|
30650
|
+
*/
|
|
30651
|
+
interface FontJSON {
|
|
30652
|
+
family?: string;
|
|
30653
|
+
/** The theme's heading (`major`) or body (`minor`) font, in place of a family. */
|
|
30654
|
+
scheme?: IFont.Scheme;
|
|
30655
|
+
/** PANOSE classification as the file states it (ten hex bytes). */
|
|
30656
|
+
panose?: string;
|
|
30657
|
+
/** A family to fall back to, derived from `panose` when read. */
|
|
30658
|
+
fallbacks?: string[];
|
|
30659
|
+
pitch?: string;
|
|
30660
|
+
charset?: IFont.Charset;
|
|
30661
|
+
}
|
|
30662
|
+
/**
|
|
30663
|
+
* How a run is formatted. Sizes are in points, `baseline` is a percentage of the size (`30`
|
|
30664
|
+
* raises the run as a superscript), colors are fills or serialized colors.
|
|
30665
|
+
*
|
|
30666
|
+
* @remarks
|
|
30667
|
+
* Where a cell's font has the same property ({@link IStyledFont.Properties}) the name and
|
|
30668
|
+
* values are the same: `weight`, `style`, `letterSpacing`, `family`.
|
|
30669
|
+
*/
|
|
30670
|
+
interface RunPropertiesJSON {
|
|
30671
|
+
/** Font size in points. */
|
|
30672
|
+
size?: number;
|
|
30673
|
+
/** `700` for bold, `400` for regular. */
|
|
30674
|
+
weight?: number;
|
|
30675
|
+
style?: IFont.Style;
|
|
30676
|
+
underline?: UnderlineStyle;
|
|
30677
|
+
strike?: StrikeStyle;
|
|
30678
|
+
/** The text color: a fill (solid, gradient, pattern) or a serialized color. */
|
|
30679
|
+
color?: IFill.JSON | string;
|
|
30680
|
+
/** The Latin font. */
|
|
30681
|
+
font?: FontJSON;
|
|
30682
|
+
eastAsianFont?: FontJSON;
|
|
30683
|
+
complexScriptFont?: FontJSON;
|
|
30684
|
+
symbolFont?: FontJSON;
|
|
30685
|
+
/** Language tag (`en-US`). */
|
|
30686
|
+
language?: string;
|
|
30687
|
+
alternateLanguage?: string;
|
|
30688
|
+
/** Kerning threshold in points. */
|
|
30689
|
+
kerning?: number;
|
|
30690
|
+
/** Character spacing in points. */
|
|
30691
|
+
letterSpacing?: number;
|
|
30692
|
+
/** Baseline shift as a percentage of the font size; positive raises. */
|
|
30693
|
+
baseline?: number;
|
|
30694
|
+
capitals?: SmallCaps;
|
|
30695
|
+
normalizeHeight?: boolean;
|
|
30696
|
+
/** Highlight color, serialized. */
|
|
30697
|
+
highlight?: string;
|
|
30698
|
+
hyperlink?: IHyperlink.JSON;
|
|
30699
|
+
/** The text outline. */
|
|
30700
|
+
outline?: IStroke.JSON;
|
|
30701
|
+
effects?: IEffect.JSON[];
|
|
30702
|
+
}
|
|
30703
|
+
/** A run of text. */
|
|
30704
|
+
interface RunJSON extends RunPropertiesJSON {
|
|
30705
|
+
/** The run's text; `'\n'` alone is a line break inside the paragraph. */
|
|
30706
|
+
text: string;
|
|
30707
|
+
/** Set when the run is a field (`fld`): its id and kind (`TxLink`, `slidenum`…). */
|
|
30708
|
+
field?: {
|
|
30709
|
+
id: string;
|
|
30710
|
+
type?: string;
|
|
30711
|
+
};
|
|
30712
|
+
}
|
|
30713
|
+
/** A spacing: in points, or as a percentage of a line (`100` is single spacing). */
|
|
30714
|
+
type SpacingJSON = {
|
|
30715
|
+
points: number;
|
|
30716
|
+
} | {
|
|
30717
|
+
percent: number;
|
|
30718
|
+
};
|
|
30719
|
+
/** A paragraph's bullet. Without a `type` the entry only restyles the inherited bullet. */
|
|
30720
|
+
interface BulletJSON {
|
|
30721
|
+
type?: 'none' | 'char' | 'auto' | 'image';
|
|
30722
|
+
/** The character of a `char` bullet. */
|
|
30723
|
+
char?: string;
|
|
30724
|
+
/** The numbering scheme of an `auto` bullet (`arabicPeriod`, `romanLcParenR`…). */
|
|
30725
|
+
autoType?: string;
|
|
30726
|
+
startAt?: number;
|
|
30727
|
+
font?: FontJSON;
|
|
30728
|
+
fontFollowsText?: boolean;
|
|
30729
|
+
/** Serialized color. */
|
|
30730
|
+
color?: string;
|
|
30731
|
+
colorFollowsText?: boolean;
|
|
30732
|
+
size?: SpacingJSON;
|
|
30733
|
+
sizeFollowsText?: boolean;
|
|
30734
|
+
}
|
|
30735
|
+
interface TabJSON {
|
|
30736
|
+
/** Position in pixels. */
|
|
30737
|
+
position: number;
|
|
30738
|
+
align?: ITextFrame.TabStopAlignment;
|
|
30739
|
+
}
|
|
30740
|
+
/** How a paragraph is laid out. Lengths are in pixels. */
|
|
30741
|
+
interface ParagraphPropertiesJSON {
|
|
30742
|
+
align?: ParagraphAlignment;
|
|
30743
|
+
/** Outline level, `0` to `8`. */
|
|
30744
|
+
level?: number;
|
|
30745
|
+
marginLeft?: number;
|
|
30746
|
+
marginRight?: number;
|
|
30747
|
+
/** First-line indent; negative for a hanging indent. */
|
|
30748
|
+
indent?: number;
|
|
30749
|
+
defaultTabSize?: number;
|
|
30750
|
+
rightToLeft?: boolean;
|
|
30751
|
+
eastAsianLineBreak?: boolean;
|
|
30752
|
+
latinLineBreak?: boolean;
|
|
30753
|
+
hangingPunctuation?: boolean;
|
|
30754
|
+
fontAlign?: FontAlignment;
|
|
30755
|
+
lineSpacing?: SpacingJSON;
|
|
30756
|
+
spaceBefore?: SpacingJSON;
|
|
30757
|
+
spaceAfter?: SpacingJSON;
|
|
30758
|
+
bullet?: BulletJSON;
|
|
30759
|
+
tabs?: TabJSON[];
|
|
30760
|
+
/** The run formatting the paragraph's runs inherit. */
|
|
30761
|
+
defaultRun?: RunPropertiesJSON;
|
|
30762
|
+
}
|
|
30763
|
+
/** A paragraph: runs in order, and how it is laid out. */
|
|
30764
|
+
interface ParagraphJSON extends ParagraphPropertiesJSON {
|
|
30765
|
+
runs: RunJSON[];
|
|
30766
|
+
/** The formatting of the paragraph mark (what a new run at its end takes). */
|
|
30767
|
+
endRun?: RunPropertiesJSON;
|
|
30768
|
+
}
|
|
29466
30769
|
}
|
|
29467
30770
|
|
|
29468
30771
|
/**
|
|
@@ -29934,8 +31237,92 @@ declare global {
|
|
|
29934
31237
|
* Centers text at the tab stop.
|
|
29935
31238
|
*/
|
|
29936
31239
|
readonly Center: "center";
|
|
31240
|
+
/**
|
|
31241
|
+
* Aligns numbers at the tab stop on their decimal point.
|
|
31242
|
+
*/
|
|
31243
|
+
readonly Decimal: "decimal";
|
|
29937
31244
|
};
|
|
29938
31245
|
type TabStopAlignment = typeof TabStopAlignment[keyof typeof TabStopAlignment];
|
|
31246
|
+
/**
|
|
31247
|
+
* The direction drawing text runs in its body.
|
|
31248
|
+
*/
|
|
31249
|
+
const WritingMode: {
|
|
31250
|
+
readonly Horizontal: "horizontal";
|
|
31251
|
+
/** Each line turned 90° clockwise, read top to bottom; lines advance leftwards. */
|
|
31252
|
+
readonly Vertical: "vertical";
|
|
31253
|
+
/** Each line turned 270° clockwise, read bottom to top; lines advance rightwards. */
|
|
31254
|
+
readonly Vertical270: "vertical270";
|
|
31255
|
+
/** WordArt vertical: upright letters stacked top to bottom. */
|
|
31256
|
+
readonly WordArtVertical: "wordArtVertical";
|
|
31257
|
+
/** East Asian vertical: upright ideographs, Latin text turned. */
|
|
31258
|
+
readonly EastAsianVertical: "eastAsianVertical";
|
|
31259
|
+
/** Mongolian vertical: top to bottom, lines advancing rightwards. */
|
|
31260
|
+
readonly MongolianVertical: "mongolianVertical";
|
|
31261
|
+
/** WordArt vertical read right to left. */
|
|
31262
|
+
readonly WordArtVerticalRtl: "wordArtVerticalRtl";
|
|
31263
|
+
};
|
|
31264
|
+
type WritingMode = typeof WritingMode[keyof typeof WritingMode];
|
|
31265
|
+
/** Text insets from the text rectangle, in pixels. */
|
|
31266
|
+
interface InsetsJSON {
|
|
31267
|
+
left?: number;
|
|
31268
|
+
top?: number;
|
|
31269
|
+
right?: number;
|
|
31270
|
+
bottom?: number;
|
|
31271
|
+
}
|
|
31272
|
+
/** How a text body sits in the frame that holds it. */
|
|
31273
|
+
interface BodyJSON {
|
|
31274
|
+
/** Vertical anchor of the text in the frame. */
|
|
31275
|
+
anchor?: VerticalAlignment;
|
|
31276
|
+
/** Center the text box horizontally within the frame. */
|
|
31277
|
+
anchorCenter?: boolean;
|
|
31278
|
+
wrap?: 'none' | 'square';
|
|
31279
|
+
insets?: InsetsJSON;
|
|
31280
|
+
/** `shape` grows the frame to fit the text; `normal` shrinks the text to fit the frame. */
|
|
31281
|
+
autoFit?: Autofit;
|
|
31282
|
+
/** With `normal` autofit: the font scale applied, as a percentage. */
|
|
31283
|
+
fontScale?: number;
|
|
31284
|
+
/** With `normal` autofit: the line spacing reduction applied, as a percentage. */
|
|
31285
|
+
lineSpacingReduction?: number;
|
|
31286
|
+
vertical?: WritingMode;
|
|
31287
|
+
/** What happens to text past the bottom: `visible`, `ellipsis` or `clip`. */
|
|
31288
|
+
verticalOverflow?: Overflow;
|
|
31289
|
+
/** What happens to text past the sides: `visible` or `clip`. */
|
|
31290
|
+
horizontalOverflow?: Overflow;
|
|
31291
|
+
upright?: boolean;
|
|
31292
|
+
rightToLeftColumns?: boolean;
|
|
31293
|
+
columns?: number;
|
|
31294
|
+
/** Space between columns, in pixels. */
|
|
31295
|
+
columnSpacing?: number;
|
|
31296
|
+
fromWordArt?: boolean;
|
|
31297
|
+
forceAntiAlias?: boolean;
|
|
31298
|
+
compatibleLineSpacing?: boolean;
|
|
31299
|
+
spaceFirstLastParagraph?: boolean;
|
|
31300
|
+
/** A preset text warp (`prstTxWarp`) and its adjust values, in the preset grammar's units. */
|
|
31301
|
+
warp?: {
|
|
31302
|
+
preset: string;
|
|
31303
|
+
adjustments?: Record<string, number>;
|
|
31304
|
+
};
|
|
31305
|
+
/** `bodyPr/extLst` as the file states it: an opaque DrawingML fragment, written back as it was. */
|
|
31306
|
+
extLst?: string;
|
|
31307
|
+
}
|
|
31308
|
+
/** The paragraph formatting a text body's levels inherit (`lstStyle`). */
|
|
31309
|
+
interface ListStyleJSON {
|
|
31310
|
+
default?: IText.ParagraphPropertiesJSON;
|
|
31311
|
+
/** Levels 1 to 9, by index; a level the file does not state is absent. */
|
|
31312
|
+
levels?: (IText.ParagraphPropertiesJSON | undefined)[];
|
|
31313
|
+
}
|
|
31314
|
+
/**
|
|
31315
|
+
* The text written in a frame — a shape's text body — as JSON: its paragraphs, how the body
|
|
31316
|
+
* sits in the frame, and the list style the paragraphs inherit from.
|
|
31317
|
+
*/
|
|
31318
|
+
interface JSON {
|
|
31319
|
+
paragraphs: IText.ParagraphJSON[];
|
|
31320
|
+
/** Text rotation in degrees, when the body states one. */
|
|
31321
|
+
rotation?: number;
|
|
31322
|
+
/** How the body sits in the frame; absent for the defaults. */
|
|
31323
|
+
body?: BodyJSON;
|
|
31324
|
+
listStyle?: ListStyleJSON;
|
|
31325
|
+
}
|
|
29939
31326
|
interface CloneableTextFrame extends ITextFrame {
|
|
29940
31327
|
clone(visitor?: TextVisitor): ITextFrame;
|
|
29941
31328
|
equals(other: ITextFrame): boolean;
|
|
@@ -30253,6 +31640,29 @@ declare global {
|
|
|
30253
31640
|
}
|
|
30254
31641
|
interface FontSchemeJSON extends Partial<FontSchemeProperties> {
|
|
30255
31642
|
}
|
|
31643
|
+
/**
|
|
31644
|
+
* One reference into a theme style list (`fillRef`, `lnRef`, `effectRef`): the one-based position
|
|
31645
|
+
* in the list, `0` for none, and the color the list entry's placeholder (`phClr`) takes.
|
|
31646
|
+
*/
|
|
31647
|
+
interface StyleRefJSON {
|
|
31648
|
+
index: number;
|
|
31649
|
+
color?: string;
|
|
31650
|
+
}
|
|
31651
|
+
/** The font a theme style refers to: the theme's `major` or `minor` font, or `none`, and the text color. */
|
|
31652
|
+
interface FontRefJSON {
|
|
31653
|
+
index: IFont.Scheme;
|
|
31654
|
+
color?: string;
|
|
31655
|
+
}
|
|
31656
|
+
/**
|
|
31657
|
+
* References into the theme's format scheme — what a shape or chart draws with wherever it
|
|
31658
|
+
* states nothing of its own: DrawingML's `style` element.
|
|
31659
|
+
*/
|
|
31660
|
+
interface StyleRefsJSON {
|
|
31661
|
+
fill?: StyleRefJSON;
|
|
31662
|
+
stroke?: StyleRefJSON;
|
|
31663
|
+
effect?: StyleRefJSON;
|
|
31664
|
+
font?: FontRefJSON;
|
|
31665
|
+
}
|
|
30256
31666
|
interface JSON {
|
|
30257
31667
|
name: string;
|
|
30258
31668
|
fonts?: ITheme.FontSchemeJSON;
|
|
@@ -34017,18 +35427,6 @@ declare global {
|
|
|
34017
35427
|
*/
|
|
34018
35428
|
export type LanguageTag = string;
|
|
34019
35429
|
|
|
34020
|
-
/**
|
|
34021
|
-
* The placed geometry for all columns — see {@link layoutColumns}.
|
|
34022
|
-
*/
|
|
34023
|
-
export interface Layout {
|
|
34024
|
-
/** The slot pitch: the font's line height. Also the column width. */
|
|
34025
|
-
pitch: number;
|
|
34026
|
-
/** One entry per column, in reading order (left → right). */
|
|
34027
|
-
columns: readonly Column[];
|
|
34028
|
-
/** The axis-aligned union of all columns. */
|
|
34029
|
-
bounds: Bounds;
|
|
34030
|
-
}
|
|
34031
|
-
|
|
34032
35430
|
/**
|
|
34033
35431
|
* Declares a parameter the engine may hand over UNEVALUATED — the argument's subtree is not run
|
|
34034
35432
|
* before the call, and it runs only if this call's answer needs it.
|
|
@@ -34257,7 +35655,7 @@ declare global {
|
|
|
34257
35655
|
export interface Line {
|
|
34258
35656
|
/**
|
|
34259
35657
|
* Where the strip's un-rotated top-left sits (content-box coordinate space). The strip is the
|
|
34260
|
-
* line's box (`size`) rotated by the layout {@link
|
|
35658
|
+
* line's box (`size`) rotated by the layout {@link RotatedLayout.angle angle} **about this point**.
|
|
34261
35659
|
*/
|
|
34262
35660
|
origin: Point;
|
|
34263
35661
|
/** The un-rotated strip box: the line's text width × line height. */
|
|
@@ -34731,6 +36129,66 @@ declare global {
|
|
|
34731
36129
|
vol?: 1;
|
|
34732
36130
|
}
|
|
34733
36131
|
|
|
36132
|
+
/**
|
|
36133
|
+
* The kinds of content a movable can place, by type, and how each is created.
|
|
36134
|
+
*
|
|
36135
|
+
* @remarks
|
|
36136
|
+
* A sheet creates a movable's content from its JSON by looking the content's `type` up here. The
|
|
36137
|
+
* built-in kinds (picture, chart, shape, slicer, the form controls) are registered when the SDK
|
|
36138
|
+
* loads; a host registers its own the same way, and from then on a workbook that carries that
|
|
36139
|
+
* type creates the host's content, saves it through its `toJSON`, and offers it to the UI under
|
|
36140
|
+
* the same type (`registerMovableRenderer` in `@sheetxl/react`).
|
|
36141
|
+
*
|
|
36142
|
+
* A type nobody has registered still loads and saves: it becomes an unmodeled content that
|
|
36143
|
+
* carries its JSON as it was.
|
|
36144
|
+
*/
|
|
36145
|
+
export namespace MovableContentRegistry {
|
|
36146
|
+
/**
|
|
36147
|
+
* What a movable's content is given when created.
|
|
36148
|
+
*/
|
|
36149
|
+
interface CreateOptions extends AbstractMovableContent.ConstructorOptions<any> {
|
|
36150
|
+
/** The content's type, as registered. */
|
|
36151
|
+
type: string;
|
|
36152
|
+
/** The content's JSON, as saved. */
|
|
36153
|
+
json?: any;
|
|
36154
|
+
/** Returns an IResource from the resourceId or null if not found. */
|
|
36155
|
+
fromResourceId?: (resourceId: number) => IResource;
|
|
36156
|
+
/** Useful for load/save/copying. */
|
|
36157
|
+
beginPersistResource: () => IResourceCollection.IPersistScope<IResource.JSON>;
|
|
36158
|
+
/** Allow for the default lock aspect ratio to be overwritten. */
|
|
36159
|
+
defaultLockAspectRatio?: boolean;
|
|
36160
|
+
/** Resolves an address against the workbook the content lives in. */
|
|
36161
|
+
getRange: (address: string) => ICellRange | null;
|
|
36162
|
+
/** Hands formulas to the calculation engine so they follow structural edits. */
|
|
36163
|
+
holdFormulas: (getExpressions: () => readonly string[]) => IMovable.HeldFormulas;
|
|
36164
|
+
}
|
|
36165
|
+
/**
|
|
36166
|
+
* What a movable needs of its content: {@link IMovable.IContent}, and that it can be saved.
|
|
36167
|
+
*/
|
|
36168
|
+
interface Content extends IMovable.IContent {
|
|
36169
|
+
toJSON(toResourceId?: (resource: IResource) => number | null): any;
|
|
36170
|
+
}
|
|
36171
|
+
/**
|
|
36172
|
+
* Creates the content of one kind.
|
|
36173
|
+
*/
|
|
36174
|
+
type Factory = (options: CreateOptions) => Content;
|
|
36175
|
+
/**
|
|
36176
|
+
* Registers how a kind of content is created, replacing any earlier registration.
|
|
36177
|
+
*
|
|
36178
|
+
* @param type The content type (`IMovable.IContent.getType()`).
|
|
36179
|
+
* @returns A function that removes the registration.
|
|
36180
|
+
*/
|
|
36181
|
+
function register(type: string, factory: Factory): () => void;
|
|
36182
|
+
/**
|
|
36183
|
+
* The factory for a kind of content, or `undefined` if none is registered.
|
|
36184
|
+
*/
|
|
36185
|
+
function get(type: string): Factory | undefined;
|
|
36186
|
+
/**
|
|
36187
|
+
* The registered types.
|
|
36188
|
+
*/
|
|
36189
|
+
function getTypes(): string[];
|
|
36190
|
+
}
|
|
36191
|
+
|
|
34734
36192
|
/**
|
|
34735
36193
|
* Declares that the members reaching a REPEATING scalar parameter are COERCED rather than
|
|
34736
36194
|
* filtered — one that cannot be coerced is `#VALUE!` for the whole call.
|
|
@@ -35938,6 +37396,28 @@ declare global {
|
|
|
35938
37396
|
folders: string[];
|
|
35939
37397
|
}
|
|
35940
37398
|
|
|
37399
|
+
/**
|
|
37400
|
+
* The placed geometry for all lines — see {@link layoutLines}.
|
|
37401
|
+
*/
|
|
37402
|
+
export interface RotatedLayout {
|
|
37403
|
+
/** The rotation, CSS degrees clockwise, normalized to [0, 360). Never 0 or 180 (callers skip). */
|
|
37404
|
+
angle: number;
|
|
37405
|
+
/**
|
|
37406
|
+
* The available text length along a rotated line before it exhausts the content height. Wrapped
|
|
37407
|
+
* text breaks at this length; fit tests (`####`, repeat fills) measure against it.
|
|
37408
|
+
*/
|
|
37409
|
+
lineLength: number;
|
|
37410
|
+
/**
|
|
37411
|
+
* The signed horizontal advance between consecutive line origins (`-lineHeight / sin θ`).
|
|
37412
|
+
* Positive marches right (up-slanted text), negative marches left (down-slanted).
|
|
37413
|
+
*/
|
|
37414
|
+
advance: number;
|
|
37415
|
+
/** One entry per laid-out text line, in reading order. */
|
|
37416
|
+
lines: readonly Line[];
|
|
37417
|
+
/** The axis-aligned union of all strips — the painted footprint (may exceed the content box). */
|
|
37418
|
+
bounds: Bounds;
|
|
37419
|
+
}
|
|
37420
|
+
|
|
35941
37421
|
/**
|
|
35942
37422
|
* A RunCoords represents a discrete set of values in a single dimension.
|
|
35943
37423
|
*
|
|
@@ -36285,6 +37765,18 @@ declare global {
|
|
|
36285
37765
|
thisRow: string;
|
|
36286
37766
|
}
|
|
36287
37767
|
|
|
37768
|
+
/**
|
|
37769
|
+
* The placed geometry for all columns — see {@link layoutColumns}.
|
|
37770
|
+
*/
|
|
37771
|
+
export interface StackedLayout {
|
|
37772
|
+
/** The slot pitch: the font's line height. Also the column width. */
|
|
37773
|
+
pitch: number;
|
|
37774
|
+
/** One entry per column, in reading order (left → right). */
|
|
37775
|
+
columns: readonly Column[];
|
|
37776
|
+
/** The axis-aligned union of all columns. */
|
|
37777
|
+
bounds: Bounds;
|
|
37778
|
+
}
|
|
37779
|
+
|
|
36288
37780
|
/**
|
|
36289
37781
|
* Returns meta data about the number format.
|
|
36290
37782
|
*/
|