@sheetxl/sdk 0.8.0-beta.6 → 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/{CMrcyRRWS0gjwpr2.cjs → CvQ1tIq7wZ7HIGPq.cjs} +1 -1
- package/browser/cjs/CwvGOe42j8KpAF0v.cjs +1 -0
- package/browser/cjs/{KMBs7XyoINajcR-L.cjs → DCOqoH-T4Ux_1dQj.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{7_M82_Otn5kHQ0qd.mjs → BdHD3v-u8irI1XhZ.mjs} +2 -2
- package/browser/esm/{DRsp6JAObqXYGvhz.mjs → C8btlUQcQwNyzHY3.mjs} +2 -2
- package/browser/esm/{CfoNUsKHL7SzfO8c.mjs → CF3VfWX7bJu8kO_Z.mjs} +2 -2
- package/browser/esm/{DBjWjEUK9qrHG5VD.mjs → D3ll0ybMQOP4uPyW.mjs} +1 -1
- package/browser/esm/{CEk-nufZXNFx5jDl.mjs → DXmFrSnh3xSBfoD7.mjs} +9233 -8740
- package/browser/esm/{iLZfKwfSx5bQgCOp.mjs → DzgIc4oyekwA-fkl.mjs} +96 -96
- package/browser/esm/{J1egfq2ajlXPw3Ki.mjs → Iw280tlGmTHKDqzd.mjs} +2 -2
- package/browser/esm/index.mjs +920 -593
- package/node/esm/{BMtLBfP7JzIsG9_G.mjs → B_FOXd5PSfVcg0ED.mjs} +1 -1
- package/node/esm/{CynxiHhVY9UGe_h6.mjs → BzgnLKSVfN-mrMSW.mjs} +1 -1
- package/node/esm/{DYRjFZ75QYgmgEWF.mjs → D4PsEIRHxAahp5kn.mjs} +1 -1
- package/node/esm/{DpyQm1VnGyCmRRKJ.mjs → dinqlP3jU8gDOjso.mjs} +1 -1
- package/node/esm/index.mjs +10520 -9698
- 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 +7337 -6890
- package/types/scripting-enums.json +101 -21
- package/types/scripting.d.ts +1961 -466
- 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/-wfVn4ubg563jjqj.cjs +0 -93
- package/browser/cjs/B2GVAGA-CBeu_7U4.cjs +0 -1
- package/browser/cjs/DFKGFVvoELb8_p_B.cjs +0 -1
- 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
|
@@ -59,6 +59,11 @@ export interface ICondition<P = any> {
|
|
|
59
59
|
* **UI Guidance:**
|
|
60
60
|
* - Show "Ignore Blanks" checkbox for DataValidation (common use case)
|
|
61
61
|
* - Hide for ConditionalFormat/TableFilter (default behavior is usually correct)
|
|
62
|
+
*
|
|
63
|
+
* **What is blank:**
|
|
64
|
+
* - Filters and ConditionalFormat: an empty cell, a `""` result, or a string of only spaces
|
|
65
|
+
* (Excel's `LEN(TRIM(x))=0`). A tab, a non-breaking space, `0` and an error are values.
|
|
66
|
+
* - DataValidation: an empty cell only. A `""` result is a value and is judged.
|
|
62
67
|
*/
|
|
63
68
|
isIncludeBlanks(): boolean;
|
|
64
69
|
/**
|
|
@@ -383,6 +388,7 @@ export declare namespace ICondition {
|
|
|
383
388
|
readonly NextMonth: "nextMonth";
|
|
384
389
|
readonly NextQuarter: "nextQuarter";
|
|
385
390
|
readonly NextWeek: "nextWeek";
|
|
391
|
+
readonly NextYear: "nextYear";
|
|
386
392
|
readonly Null: "null";
|
|
387
393
|
readonly Q1: "Q1";
|
|
388
394
|
readonly Q2: "Q2";
|
|
@@ -391,6 +397,7 @@ export declare namespace ICondition {
|
|
|
391
397
|
readonly ThisMonth: "thisMonth";
|
|
392
398
|
readonly ThisQuarter: "thisQuarter";
|
|
393
399
|
readonly ThisWeek: "thisWeek";
|
|
400
|
+
readonly ThisYear: "thisYear";
|
|
394
401
|
readonly Today: "today";
|
|
395
402
|
readonly Tomorrow: "tomorrow";
|
|
396
403
|
readonly YearToDate: "yearToDate";
|
|
@@ -463,9 +470,30 @@ export declare namespace ICondition {
|
|
|
463
470
|
}
|
|
464
471
|
interface InSetOption {
|
|
465
472
|
/**
|
|
466
|
-
*
|
|
473
|
+
* OOXML's `filters/@blank`, carried for the file. The condition's `includeBlanks` is what
|
|
474
|
+
* keeps a blank row: a reader sets both, the engine reads `includeBlanks`.
|
|
467
475
|
*/
|
|
468
476
|
blank?: boolean;
|
|
477
|
+
/**
|
|
478
|
+
* Match string items against the text a cell SHOWS rather than the value it holds.
|
|
479
|
+
*
|
|
480
|
+
* @defaultValue `false`
|
|
481
|
+
*
|
|
482
|
+
* @remarks
|
|
483
|
+
* The identity is the value: `items: [1]` keeps every cell holding 1 however it is
|
|
484
|
+
* formatted, and `items: ['1']` keeps the cells holding the text `1`. Under `byDisplay` a
|
|
485
|
+
* string item is instead the displayed text, which is what a spreadsheet's filter list
|
|
486
|
+
* holds: `'1.50'` keeps a cell holding 1.5 under `0.00`, and `'$1'` one under `$0`. A typed
|
|
487
|
+
* item is matched by value in both modes.
|
|
488
|
+
*
|
|
489
|
+
* `byDisplay` is a filter's option, the one the column dropdown sets. A conditional format
|
|
490
|
+
* or a data validation has no displayed text to read, so the flag is inert there. Under a
|
|
491
|
+
* filter it also widens what is blank: a string of only spaces shows as nothing and is
|
|
492
|
+
* settled as a blank cell, and a whitespace-only item means `includeBlanks`. A port of
|
|
493
|
+
* Office Scripts' `applyValuesFilter` or Apps Script's `setVisibleValues` passes strings
|
|
494
|
+
* and sets it.
|
|
495
|
+
*/
|
|
496
|
+
byDisplay?: boolean;
|
|
469
497
|
/**
|
|
470
498
|
* The values that match: an array, or a list validation's source as formula text.
|
|
471
499
|
*
|
|
@@ -481,7 +509,7 @@ export declare namespace ICondition {
|
|
|
481
509
|
* evaluated for each cell, so a relative reference gives each cell its own list, and the
|
|
482
510
|
* source follows inserts and deletes as any formula does.
|
|
483
511
|
*
|
|
484
|
-
* An array
|
|
512
|
+
* An array's items match by value, or by displayed text under {@link byDisplay}.
|
|
485
513
|
*/
|
|
486
514
|
items?: Scalar[] | string;
|
|
487
515
|
/**
|
|
@@ -558,17 +586,17 @@ export declare namespace ICondition {
|
|
|
558
586
|
*/
|
|
559
587
|
toType<T extends InteropScalar>(value: Scalar, type: InteropScalarType): T;
|
|
560
588
|
/**
|
|
561
|
-
* The text the current cell shows,
|
|
589
|
+
* The text the current cell shows, under a filter; `null` elsewhere.
|
|
562
590
|
*
|
|
563
591
|
* @remarks
|
|
564
|
-
*
|
|
565
|
-
*
|
|
566
|
-
*
|
|
567
|
-
*
|
|
592
|
+
* Read by an operator asked to match displayed text ({@link InSetOption.byDisplay}): a cell
|
|
593
|
+
* holding `1.5` and showing `1.50` is the item `1.50`. A conditional format or a data
|
|
594
|
+
* validation has no displayed text, so this answers `null` there and the operator compares
|
|
595
|
+
* the value.
|
|
568
596
|
*
|
|
569
597
|
* Formatted on demand, so an operator that never asks pays nothing.
|
|
570
598
|
*/
|
|
571
|
-
|
|
599
|
+
getDisplayText(): string | null;
|
|
572
600
|
/**
|
|
573
601
|
* Resolves a condition input to a fully-built ICondition instance.
|
|
574
602
|
*
|
|
@@ -995,26 +1023,6 @@ export declare namespace ICondition {
|
|
|
995
1023
|
* with no explicit `hasHeader` evaluates the entire range, header row included.
|
|
996
1024
|
*/
|
|
997
1025
|
hasHeader?: boolean;
|
|
998
|
-
/**
|
|
999
|
-
* What a filter's list items and `equalTo` text are compared with: the text a cell shows, or
|
|
1000
|
-
* the value it holds.
|
|
1001
|
-
*
|
|
1002
|
-
* @defaultValue `'text'`
|
|
1003
|
-
*
|
|
1004
|
-
* @remarks
|
|
1005
|
-
* `'text'` is a spreadsheet's AutoFilter: the item `1.50` keeps a cell holding `1.5` under the
|
|
1006
|
-
* format `0.00`, and the item `1.5` does not. A number passed as an item or operand still
|
|
1007
|
-
* matches the cells holding that number, however they are formatted.
|
|
1008
|
-
*
|
|
1009
|
-
* `'value'` compares typed values only, so the text `"1"` never matches the number `1`.
|
|
1010
|
-
*
|
|
1011
|
-
* Comparisons (`>`, `between`), Top N, averages, date periods and date groups read the value
|
|
1012
|
-
* either way, and the text operators (contains, starts with, ends with) only ever match a
|
|
1013
|
-
* cell that holds text.
|
|
1014
|
-
*
|
|
1015
|
-
* Read by filters. Conditional formats and data validations match by value.
|
|
1016
|
-
*/
|
|
1017
|
-
match?: 'text' | 'value';
|
|
1018
1026
|
}
|
|
1019
1027
|
/**
|
|
1020
1028
|
* JSON for serialization and round-tripping.
|
|
@@ -144,15 +144,29 @@ export declare class UnresolvedCondition<P = any> implements ICondition<P> {
|
|
|
144
144
|
* of an exception that costs the caller the entire rule.
|
|
145
145
|
*/
|
|
146
146
|
export declare function fromJSON<P = any>(json: ICondition.JSON<P> | null | undefined): ICondition<P> | null;
|
|
147
|
-
/**
|
|
148
|
-
* Per-condition options shared by the single-condition ({@link evalConditions}) and
|
|
149
|
-
* multi-condition ({@link evalRangeConditions}) drivers.
|
|
150
|
-
*/
|
|
151
147
|
/**
|
|
152
148
|
* The condition's answer for the BLANK cells of a range, asked per cell — lazily, by the caller,
|
|
153
149
|
* for the cells it actually reads. Blank cells are never visited by the engine.
|
|
154
150
|
*/
|
|
155
151
|
export type BlankResolver = (rowIndex: number, colIndex: number) => boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Whether a value is blank by Excel's AutoFilter rule (`LEN(TRIM(x))=0`, DESIGN-FILTER.md §3.3):
|
|
154
|
+
* nothing, an empty string, or a string of only U+0020 spaces. A tab, a non-breaking space, `0`
|
|
155
|
+
* and an error are values.
|
|
156
|
+
*/
|
|
157
|
+
export declare function isBlankValue(value: Scalar): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* The calc engine's blank: an empty cell, or the `""` a formula returns (`=A1=""` is TRUE for
|
|
160
|
+
* both). A string of spaces is a string. The filter's rule for a value-shaped level
|
|
161
|
+
* (DESIGN-FILTER §3.3); {@link isBlankValue} is the display rule.
|
|
162
|
+
*/
|
|
163
|
+
export declare function isBlankByValue(value: Scalar): boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Whether a filter level matches displayed text somewhere in it — an `InSet` or a `blank`
|
|
166
|
+
* carrying `byDisplay` — and so takes the display rule for blanks (a string of only spaces is a
|
|
167
|
+
* blank cell). Anything else takes the calc engine's.
|
|
168
|
+
*/
|
|
169
|
+
export declare function isDisplayShaped(condition: ICondition | ICondition.JSON | null | undefined): boolean;
|
|
156
170
|
/**
|
|
157
171
|
* Iterates through all values executing a single condition (`conditions[0]`) and calling the
|
|
158
172
|
* appropriate callbacks. Used by Data Validation and Conditional Formatting.
|
|
@@ -179,11 +193,11 @@ export interface DoRunRangeConditionsOptions extends ICondition.RangeOptions {
|
|
|
179
193
|
coords: Readonly<IRange.Coords>;
|
|
180
194
|
getHiddenRuns?: (axis: IRange.Axis) => readonly RunCoords[];
|
|
181
195
|
/**
|
|
182
|
-
* The text a cell shows, backing {@link ICondition.IContext.
|
|
183
|
-
* asked only
|
|
184
|
-
*
|
|
196
|
+
* The text a cell shows, backing {@link ICondition.IContext.getDisplayText}. Supplied by the
|
|
197
|
+
* sheet; asked only for the cells an operator matching displayed text reads. `value` is the
|
|
198
|
+
* cell's, which the driver holds already.
|
|
185
199
|
*/
|
|
186
|
-
|
|
200
|
+
getDisplayText?: (rowIndex: number, colIndex: number, value: Scalar) => string;
|
|
187
201
|
/**
|
|
188
202
|
* Called once per contiguous run of rows/columns (per {@link ICondition.RangeOptions.axis})
|
|
189
203
|
* that remain visible once every condition has been applied, in ascending order.
|
|
@@ -259,5 +273,15 @@ export interface DoRunConditionsOptions extends ICondition.RangeOptions {
|
|
|
259
273
|
* FALSE in others, and the formula's own block evaluation already holds each one.
|
|
260
274
|
*/
|
|
261
275
|
onBlank?: (resolve: BlankResolver) => void;
|
|
276
|
+
/**
|
|
277
|
+
* Whether a stored value that is blank by Excel's AutoFilter rule ({@link isBlankValue}: a
|
|
278
|
+
* `""` result, a string of only spaces) is answered as the blank cell it shows as, never shown
|
|
279
|
+
* to the selector or the operator. Conditional Formatting sets it (`containsBlanks` is
|
|
280
|
+
* `LEN(TRIM(x))=0`); Data Validation does not, since there a blank is an empty cell and a
|
|
281
|
+
* `""` result is judged (DESIGN-DV §5). The filter driver decides per level: a display-shaped
|
|
282
|
+
* one ({@link isDisplayShaped}) takes this rule, any other the calc engine's, where only `""`
|
|
283
|
+
* is blank (DESIGN-FILTER §3.3).
|
|
284
|
+
*/
|
|
285
|
+
spacesAreBlank?: boolean;
|
|
262
286
|
}
|
|
263
287
|
//# sourceMappingURL=_ConditionUtils.d.ts.map
|
|
@@ -87,7 +87,7 @@ export declare namespace IFill {
|
|
|
87
87
|
* @remarks
|
|
88
88
|
* * Not support in cells. This is currently only support in drawML (charts, shapes, powerpoint).
|
|
89
89
|
*/
|
|
90
|
-
readonly Image: "
|
|
90
|
+
readonly Image: "image";
|
|
91
91
|
/**
|
|
92
92
|
* An Image.
|
|
93
93
|
* @remarks
|
|
@@ -574,22 +574,57 @@ export declare namespace IFill {
|
|
|
574
574
|
}
|
|
575
575
|
interface PatternJSON extends PatternProperties<string> {
|
|
576
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* Insets of a rectangle from the edges of another, as percentages of its width and height
|
|
579
|
+
* (an inset of `-10` on the right extends past the edge by a tenth of the width).
|
|
580
|
+
*/
|
|
581
|
+
interface RectInsets {
|
|
582
|
+
left?: number;
|
|
583
|
+
top?: number;
|
|
584
|
+
right?: number;
|
|
585
|
+
bottom?: number;
|
|
586
|
+
}
|
|
587
|
+
/** How a tiled image fill repeats (DrawingML `tile`). */
|
|
588
|
+
interface ImageTileProperties {
|
|
589
|
+
/** Offset of the first tile from the fill rectangle's origin, in pixels. */
|
|
590
|
+
offsetX?: number;
|
|
591
|
+
offsetY?: number;
|
|
592
|
+
/** Scale of each tile as a percentage (100 = natural size). */
|
|
593
|
+
scaleX?: number;
|
|
594
|
+
scaleY?: number;
|
|
595
|
+
/** Which tiles are mirrored: `none`, `x`, `y` or `xy`. */
|
|
596
|
+
flip?: string;
|
|
597
|
+
/** Where the tiles align in the shape: `tl`, `t`, `tr`, `l`, `ctr`, `r`, `bl`, `b`, `br`. */
|
|
598
|
+
alignment?: string;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* An image fill: a workbook resource stretched over the shape or tiled across it.
|
|
602
|
+
*
|
|
603
|
+
* @remarks
|
|
604
|
+
* `resId` names the resource the way `IPicture.JSON.resId` names a placed picture's image and,
|
|
605
|
+
* like it, is meaningful only inside the persist scope the JSON was made in. A shape resolves it
|
|
606
|
+
* to the resource when it is created and names the resource again when it is serialized.
|
|
607
|
+
*/
|
|
577
608
|
interface ImageProperties extends IFill.Properties {
|
|
609
|
+
/** The resource id of the image. */
|
|
610
|
+
resId?: number;
|
|
611
|
+
/** The part of the image used (`srcRect`), as insets from its edges. Absent for the whole image. */
|
|
612
|
+
sourceRect?: RectInsets;
|
|
578
613
|
/**
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
* @remarks
|
|
582
|
-
* This is a placeholder
|
|
583
|
-
*/
|
|
584
|
-
ref?: any;
|
|
585
|
-
/**
|
|
586
|
-
* Indicates whether the image fill should be tiled.
|
|
614
|
+
* The image is stretched to a rectangle inset from the shape's bounds (`stretch/fillRect`);
|
|
615
|
+
* `{}` for the whole shape. Absent when the image is tiled.
|
|
587
616
|
*/
|
|
588
|
-
|
|
617
|
+
stretch?: RectInsets;
|
|
618
|
+
/** The image is tiled (`tile`). Absent when it is stretched. */
|
|
619
|
+
tile?: ImageTileProperties;
|
|
589
620
|
/**
|
|
590
|
-
* The resolution
|
|
621
|
+
* The resolution the image is rendered at, in dots per inch (`dpi`); `0` for the image's own.
|
|
591
622
|
*/
|
|
592
623
|
dpi?: number;
|
|
624
|
+
/** The compression the image was stored for (`blip/@cstate`): `email`, `screen`, `print`, `hqprint`, `none`. */
|
|
625
|
+
compressionState?: string;
|
|
626
|
+
/** `blip/extLst` as the file states it: an opaque DrawingML fragment, written back as it was. */
|
|
627
|
+
extLst?: string;
|
|
593
628
|
}
|
|
594
629
|
interface ImageJSON extends ImageProperties {
|
|
595
630
|
}
|
|
@@ -67,32 +67,25 @@ export declare namespace IStroke {
|
|
|
67
67
|
*/
|
|
68
68
|
miterLimit: number;
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* @defaultValue `null`.
|
|
73
|
-
*
|
|
74
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-start}
|
|
70
|
+
* The line end drawn at the start of an open path (DrawingML `headEnd`).
|
|
75
71
|
*
|
|
72
|
+
* @defaultValue `'none'`
|
|
76
73
|
*/
|
|
77
|
-
|
|
74
|
+
headType: IStroke.LineEndType;
|
|
75
|
+
/** The head's width, relative to the line width. @defaultValue `'med'` */
|
|
76
|
+
headWidth: IStroke.LineEndSize;
|
|
77
|
+
/** The head's length, relative to the line width. @defaultValue `'med'` */
|
|
78
|
+
headLength: IStroke.LineEndSize;
|
|
78
79
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* @defaultValue `null`.
|
|
82
|
-
*
|
|
83
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-mid}
|
|
80
|
+
* The line end drawn at the end of an open path (DrawingML `tailEnd`).
|
|
84
81
|
*
|
|
82
|
+
* @defaultValue `'none'`
|
|
85
83
|
*/
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-end}
|
|
93
|
-
*
|
|
94
|
-
*/
|
|
95
|
-
markerEnd: IStroke.IMarker;
|
|
84
|
+
tailType: IStroke.LineEndType;
|
|
85
|
+
/** The tail's width, relative to the line width. @defaultValue `'med'` */
|
|
86
|
+
tailWidth: IStroke.LineEndSize;
|
|
87
|
+
/** The tail's length, relative to the line width. @defaultValue `'med'` */
|
|
88
|
+
tailLength: IStroke.LineEndSize;
|
|
96
89
|
/**
|
|
97
90
|
* Custom or preset for the stroke.
|
|
98
91
|
*/
|
|
@@ -117,20 +110,24 @@ export declare namespace IStroke {
|
|
|
117
110
|
*/
|
|
118
111
|
align: IStroke.Align;
|
|
119
112
|
}
|
|
120
|
-
/**
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
113
|
+
/** The shape drawn at an open path's end (DrawingML `ST_LineEndType`). */
|
|
114
|
+
const LineEndType: {
|
|
115
|
+
readonly None: "none";
|
|
116
|
+
readonly Triangle: "triangle";
|
|
117
|
+
readonly Stealth: "stealth";
|
|
118
|
+
readonly Diamond: "diamond";
|
|
119
|
+
readonly Oval: "oval";
|
|
120
|
+
/** An open arrowhead: two strokes of the line's width. */
|
|
121
|
+
readonly Arrow: "arrow";
|
|
122
|
+
};
|
|
123
|
+
type LineEndType = typeof LineEndType[keyof typeof LineEndType];
|
|
124
|
+
/** A line end's width or length, relative to the line width (DrawingML `ST_LineEndWidth` / `ST_LineEndLength`). */
|
|
125
|
+
const LineEndSize: {
|
|
126
|
+
readonly Small: "sm";
|
|
127
|
+
readonly Medium: "med";
|
|
128
|
+
readonly Large: "lg";
|
|
129
|
+
};
|
|
130
|
+
type LineEndSize = typeof LineEndSize[keyof typeof LineEndSize];
|
|
134
131
|
/**
|
|
135
132
|
* Support stroke with multiple strokes.
|
|
136
133
|
* ** PLACEHOLDER **
|
|
@@ -234,13 +231,6 @@ export declare namespace IStroke {
|
|
|
234
231
|
readonly Round: "round";
|
|
235
232
|
};
|
|
236
233
|
type LineJoin = typeof LineJoin[keyof typeof LineJoin];
|
|
237
|
-
const PresetMarkerShape: {
|
|
238
|
-
readonly Single: "none";
|
|
239
|
-
readonly Double: "double";
|
|
240
|
-
readonly ThickThin: "thickThin";
|
|
241
|
-
readonly ThinThick: "thinThick";
|
|
242
|
-
};
|
|
243
|
-
type PresetMarkerShape = typeof PresetMarkerShape[keyof typeof PresetMarkerShape];
|
|
244
234
|
const StrokeStyle: {
|
|
245
235
|
readonly None: "none";
|
|
246
236
|
readonly Dashed: "dashed";
|
|
@@ -260,6 +250,8 @@ export declare namespace IStroke {
|
|
|
260
250
|
*/
|
|
261
251
|
interface JSON extends Properties {
|
|
262
252
|
fill: IFill.JSON;
|
|
253
|
+
/** The line's `extLst` as a file states it (DrawingML `ln/extLst`): an opaque fragment, written back as it was. */
|
|
254
|
+
extLst?: string;
|
|
263
255
|
}
|
|
264
256
|
}
|
|
265
257
|
//# sourceMappingURL=IStroke.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IRange, Scalar } from '@sheetxl/primitives';
|
|
2
|
+
import { RunCoordValue } from '@sheetxl/utils';
|
|
2
3
|
import { ITransaction } from '../transaction';
|
|
3
4
|
import { ICondition } from '../condition';
|
|
4
5
|
import { ICellRange } from '../cellRange';
|
|
@@ -101,33 +102,71 @@ export declare namespace IFilter {
|
|
|
101
102
|
* @defaultValue `10000`
|
|
102
103
|
*/
|
|
103
104
|
limit?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Group the column by the text its cells SHOW rather than by value, as a spreadsheet's filter
|
|
107
|
+
* list does: `1` under `$0` and under `0%` are two items, and a string of only spaces is a
|
|
108
|
+
* blank. The items are then the texts an `InSet { byDisplay: true }` condition holds.
|
|
109
|
+
*
|
|
110
|
+
* @defaultValue `false` — by value, the identity {@link ICondition.InSetOption.items} has.
|
|
111
|
+
*/
|
|
112
|
+
byDisplay?: boolean;
|
|
104
113
|
}
|
|
105
114
|
/**
|
|
106
115
|
* One distinct value of a filtered column.
|
|
107
116
|
*/
|
|
108
117
|
interface Item {
|
|
109
118
|
/**
|
|
110
|
-
* The
|
|
111
|
-
*
|
|
119
|
+
* The item's label: by value, the value as `General` shows it (a date as its date format
|
|
120
|
+
* does); by display, the text the cells show, which is then the item an
|
|
121
|
+
* `InSet { byDisplay: true }` condition holds.
|
|
112
122
|
*/
|
|
113
123
|
text: string;
|
|
114
|
-
/** The value of the first cell showing `text`; the item's place in the order. */
|
|
124
|
+
/** The value, or by display the value of the first cell showing `text`; the item's place in the order. */
|
|
115
125
|
value: Scalar;
|
|
116
126
|
/** The rows holding the value. */
|
|
117
127
|
count: number;
|
|
118
128
|
/** Whether at least one row holding the value passes the filters. */
|
|
119
129
|
checked: boolean;
|
|
120
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* One level of the date tree {@link Items.dates}: the nodes, each the run of items it spans,
|
|
133
|
+
* in the order the items are listed.
|
|
134
|
+
*/
|
|
135
|
+
interface DateLevel {
|
|
136
|
+
/** The part this level groups by. */
|
|
137
|
+
group: ICondition.DateItemGroupingType;
|
|
138
|
+
/**
|
|
139
|
+
* The nodes. A run's `value` is the group item selecting exactly its items: the parts down
|
|
140
|
+
* to this level (`{ group: 'month', year: 1995, month: 10 }`).
|
|
141
|
+
*/
|
|
142
|
+
runs: readonly RunCoordValue<ICondition.DateGroupItem>[];
|
|
143
|
+
}
|
|
121
144
|
/**
|
|
122
145
|
* What {@link IFilter.getItems} answers.
|
|
123
146
|
*/
|
|
124
147
|
interface Items {
|
|
125
148
|
/**
|
|
126
|
-
* The distinct
|
|
127
|
-
*
|
|
149
|
+
* The distinct values, or the distinct texts under `byDisplay`. The dates come first (the tree in {@link dates}), newest year first
|
|
150
|
+
* and ascending within a year, as Excel's date tree lists them; the rest follow, ascending
|
|
151
|
+
* by the workbook's comparison of their values. Values that show alike are one item. Blanks
|
|
152
|
+
* are not an item.
|
|
128
153
|
*/
|
|
129
154
|
items: readonly Item[];
|
|
130
|
-
/**
|
|
155
|
+
/**
|
|
156
|
+
* The date tree over the leading items, one level per entry: year, month and day, then hour,
|
|
157
|
+
* minute and second when a date carries a time. Absent when the column shows no date.
|
|
158
|
+
*
|
|
159
|
+
* @remarks
|
|
160
|
+
* A date is a number shown under a date format; a time-only format is a number. Every level
|
|
161
|
+
* covers the same items, `0` to the last date, and a finer level's runs nest inside the
|
|
162
|
+
* coarser's. A node's checkbox is the state of its items; a checked node is written as its
|
|
163
|
+
* run's value, in {@link ICondition.InSetOption.dateGroups}.
|
|
164
|
+
*/
|
|
165
|
+
dates?: readonly DateLevel[];
|
|
166
|
+
/**
|
|
167
|
+
* Whether a listed row is blank: empty, or showing nothing (a `""` result, a string of only
|
|
168
|
+
* spaces). The same rows `includeBlanks` keeps.
|
|
169
|
+
*/
|
|
131
170
|
hasBlanks: boolean;
|
|
132
171
|
/** Whether at least one blank row passes the filters. */
|
|
133
172
|
blanksChecked: boolean;
|
|
@@ -135,6 +174,12 @@ export declare namespace IFilter {
|
|
|
135
174
|
truncated: boolean;
|
|
136
175
|
/** The rows read. */
|
|
137
176
|
total: number;
|
|
177
|
+
/**
|
|
178
|
+
* The mode the list was read in, so a caller writes the items back under the same one:
|
|
179
|
+
* `{ operator: 'inSet', param: { items, byDisplay } }`. A list read by value fed back as
|
|
180
|
+
* texts under `byDisplay` would match nothing for a number.
|
|
181
|
+
*/
|
|
182
|
+
byDisplay: boolean;
|
|
138
183
|
}
|
|
139
184
|
/**
|
|
140
185
|
* Interface indicating the ability to filter data.
|
|
@@ -89,6 +89,14 @@ export declare namespace IHyperlink {
|
|
|
89
89
|
screenTip?: string;
|
|
90
90
|
/** {@inheritDoc IHyperlink.getTarget} */
|
|
91
91
|
target?: string;
|
|
92
|
+
/**
|
|
93
|
+
* An action the link performs instead of, or beside, following its address, as a file states
|
|
94
|
+
* it (`hlinkClick/@action`). Office's own (`ppaction://…`) mean nothing in a workbook; kept so
|
|
95
|
+
* the file reads back as written.
|
|
96
|
+
*/
|
|
97
|
+
action?: string;
|
|
98
|
+
/** Whether following the link adds it to the browsing history (`hlinkClick/@history`). */
|
|
99
|
+
history?: boolean;
|
|
92
100
|
}
|
|
93
101
|
/**
|
|
94
102
|
* A JSON representation useful for persistence.
|
package/types/src/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AbstractModel, IModel } from '../model';
|
|
2
|
+
import { IStyleCollection } from '../style';
|
|
2
3
|
import { IMovable } from './IMovable';
|
|
3
4
|
/**
|
|
4
5
|
* What every content shares: its name, its description and the movable that places it.
|
|
@@ -49,6 +50,11 @@ export declare namespace AbstractMovableContent {
|
|
|
49
50
|
* Returns the movable that places the content. Not provided for content that has none.
|
|
50
51
|
*/
|
|
51
52
|
getMovable?: () => IMovable | null;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the styles the content's theme references resolve against. Not provided for
|
|
55
|
+
* content outside a workbook.
|
|
56
|
+
*/
|
|
57
|
+
getStyles?: () => IStyleCollection | null;
|
|
52
58
|
}
|
|
53
59
|
}
|
|
54
60
|
//# sourceMappingURL=AbstractMovableContent.d.ts.map
|