@types/office-js-preview 1.0.474 → 1.0.475

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.
@@ -8,7 +8,7 @@ This package contains type definitions for office-js-preview (https://github.com
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 24 May 2024 23:36:04 GMT
11
+ * Last updated: Fri, 31 May 2024 21:07:10 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -21672,6 +21672,65 @@ declare namespace OfficeCore {
21672
21672
 
21673
21673
 
21674
21674
  declare namespace Excel {
21675
+ /**
21676
+ * Represents the type of cell control.
21677
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21678
+ */
21679
+ enum CellControlType {
21680
+ /**
21681
+ * Type representing an unknown control.
21682
+ * This represents a control that was added in a future version of Excel, and the current version of Excel doesn't know how to display this control.
21683
+ */
21684
+ Unknown = 0,
21685
+ /**
21686
+ * Type representing an empty control.
21687
+ */
21688
+ Empty = 1,
21689
+ /**
21690
+ * Type representing a query that results in a mix of control results.
21691
+ */
21692
+ Mixed = 2,
21693
+ /**
21694
+ * Type representing a checkbox control.
21695
+ */
21696
+ Checkbox = 3
21697
+ }
21698
+ /**
21699
+ * Represents an unknown cell control.
21700
+ * This represents a control that was added in a future version of Excel, and the current version of Excel doesn't know how to display this control.
21701
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21702
+ */
21703
+ interface UnknownCellControl {
21704
+ type: CellControlType.Unknown;
21705
+ }
21706
+ /**
21707
+ * Represents an empty cell control.
21708
+ * This represents the state where a cell does not have a control.
21709
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21710
+ */
21711
+ interface EmptyCellControl {
21712
+ type: CellControlType.Empty;
21713
+ }
21714
+ /**
21715
+ * Represents the result of a query that resulted in multiple cell controls.
21716
+ * If the result has multiple controls, then they can't be represented as a single result.
21717
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21718
+ */
21719
+ interface MixedCellControl {
21720
+ type: CellControlType.Mixed;
21721
+ }
21722
+ /**
21723
+ * Represents a checkbox. This is a cell control that allows a user to toggle the boolean value in a cell.
21724
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21725
+ */
21726
+ interface CheckboxCellControl {
21727
+ type: CellControlType.Checkbox;
21728
+ }
21729
+ /**
21730
+ * Represents an interactable control inside of a cell.
21731
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21732
+ */
21733
+ type CellControl = UnknownCellControl | EmptyCellControl | MixedCellControl | CheckboxCellControl;
21675
21734
  /**
21676
21735
  * Represents a 2D array of cell values.
21677
21736
  *
@@ -27632,7 +27691,8 @@ declare namespace Excel {
27632
27691
  * Represents the type of this cell value.
27633
27692
  *
27634
27693
  * @remarks
27635
- * [Api set: ExcelApi 1.16]
27694
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
27695
+ * @beta
27636
27696
  */
27637
27697
  type: CellValueType.localImage | "LocalImage";
27638
27698
  /**
@@ -27641,14 +27701,16 @@ declare namespace Excel {
27641
27701
  * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale.
27642
27702
  *
27643
27703
  * @remarks
27644
- * [Api set: ExcelApi 1.16]
27704
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
27705
+ * @beta
27645
27706
  */
27646
27707
  basicValue?: "#VALUE!" | string;
27647
27708
  /**
27648
27709
  * Represents the value that would be returned by `Range.valueTypes` for a cell with this value.
27649
27710
  *
27650
27711
  * @remarks
27651
- * [Api set: ExcelApi 1.16]
27712
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
27713
+ * @beta
27652
27714
  */
27653
27715
  basicType?: RangeValueType.error | "Error";
27654
27716
  /**
@@ -29187,6 +29249,35 @@ declare namespace Excel {
29187
29249
  function run<T>(context: OfficeExtension.ClientRequestContext, batch: (context: Excel.RequestContext) => Promise<T>): Promise<T>;
29188
29250
  function postprocessBindingDescriptor(response: any): any;
29189
29251
  function getDataCommonPostprocess(response: any, callArgs: any): any;
29252
+ /**
29253
+ * Provides information about the local image.
29254
+ *
29255
+ * @remarks
29256
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
29257
+ * @beta
29258
+ */
29259
+ class LocalImage extends OfficeExtension.ClientObject {
29260
+ /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
29261
+ context: RequestContext;
29262
+ /**
29263
+ * Gets the base64-encoded image data stored in the shared image cache with the cache unique identifier (UID).
29264
+ *
29265
+ * @remarks
29266
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
29267
+ * @beta
29268
+ *
29269
+ * @param cacheUid Represents the unique identifier (UID) of the image as it appears in the cache. The cache UID can be obtained from JSON representation of the values in the cell.
29270
+ * @returns The base64-encoded image data.
29271
+ */
29272
+ getBase64EncodedImageData(cacheUid: string): OfficeExtension.ClientResult<string>;
29273
+ /**
29274
+ * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.)
29275
+ * Whereas the original Excel.LocalImage object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LocalImageData`) that contains shallow copies of any loaded child properties from the original object.
29276
+ */
29277
+ toJSON(): {
29278
+ [key: string]: string;
29279
+ };
29280
+ }
29190
29281
  /**
29191
29282
  * Represents an `AllowEditRange` object found in a worksheet. This object works with worksheet protection properties.
29192
29283
  When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet.
@@ -30053,7 +30144,7 @@ declare namespace Excel {
30053
30144
  */
30054
30145
  readonly changedBy: Excel.EmailIdentity;
30055
30146
  /**
30056
- * Represents the ID of the `comment` or `commentReply` to which the task change is anchored.
30147
+ * Represents the ID of the comment or comment reply to which the task change is anchored.
30057
30148
  *
30058
30149
  * @remarks
30059
30150
  * [Api set: ExcelApi BETA (PREVIEW ONLY)]
@@ -32607,6 +32698,44 @@ declare namespace Excel {
32607
32698
  */
32608
32699
  type: "WorkbookAutoSaveSettingChanged";
32609
32700
  }
32701
+ /**
32702
+ * Represents the type of cell control.
32703
+ *
32704
+ * @remarks
32705
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
32706
+ * @beta
32707
+ */
32708
+ enum CellControlType {
32709
+ /**
32710
+ * Type representing an unknown control.
32711
+ This represents a control that was added in a future version of Excel, and the current version of Excel doesn't know how to display this control.
32712
+ * @remarks
32713
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
32714
+ * @beta
32715
+ */
32716
+ unknown = "Unknown",
32717
+ /**
32718
+ * Type representing an empty control.
32719
+ * @remarks
32720
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
32721
+ * @beta
32722
+ */
32723
+ empty = "Empty",
32724
+ /**
32725
+ * Type representing a query that results in a mix of control results.
32726
+ * @remarks
32727
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
32728
+ * @beta
32729
+ */
32730
+ mixed = "Mixed",
32731
+ /**
32732
+ * Type representing a checkbox control.
32733
+ * @remarks
32734
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
32735
+ * @beta
32736
+ */
32737
+ checkbox = "Checkbox"
32738
+ }
32610
32739
  /**
32611
32740
  * Represents the direction that existing or remaining cells in a worksheet will shift when cells are inserted into or deleted from a worksheet.
32612
32741
  *
@@ -34152,6 +34281,14 @@ declare namespace Excel {
34152
34281
  * [Api set: ExcelApiOnline 1.1]
34153
34282
  */
34154
34283
  readonly linkedWorkbooks: Excel.LinkedWorkbookCollection;
34284
+ /**
34285
+ * Returns the `LocalImage` object associated with the workbook.
34286
+ *
34287
+ * @remarks
34288
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
34289
+ * @beta
34290
+ */
34291
+ readonly localImage: Excel.LocalImage;
34155
34292
  /**
34156
34293
  * Represents a collection of workbook-scoped named items (named ranges and constants).
34157
34294
  *
@@ -34538,7 +34675,7 @@ declare namespace Excel {
34538
34675
  */
34539
34676
  readonly protected: boolean;
34540
34677
  /**
34541
- * Protects a workbook. Fails if the workbook has been protected.
34678
+ * Protects the workbook. Fails if the workbook has been protected.
34542
34679
  *
34543
34680
  * @remarks
34544
34681
  * [Api set: ExcelApi 1.7]
@@ -34547,7 +34684,7 @@ declare namespace Excel {
34547
34684
  */
34548
34685
  protect(password?: string): void;
34549
34686
  /**
34550
- * Unprotects a workbook.
34687
+ * Unprotects the workbook.
34551
34688
  *
34552
34689
  * @remarks
34553
34690
  * [Api set: ExcelApi 1.7]
@@ -34751,7 +34888,7 @@ declare namespace Excel {
34751
34888
  */
34752
34889
  readonly id: string;
34753
34890
  /**
34754
- * The display name of the worksheet.
34891
+ * The display name of the worksheet. The name must be fewer than 32 characters.
34755
34892
  *
34756
34893
  * @remarks
34757
34894
  * [Api set: ExcelApi 1.1]
@@ -35927,6 +36064,15 @@ declare namespace Excel {
35927
36064
  * [Api set: ExcelApi 1.1]
35928
36065
  */
35929
36066
  readonly columnIndex: number;
36067
+ /**
36068
+ * Accesses the cell control applied to this range.
36069
+ If the range has multiple cell controls, this returns `EmptyCellControl`.
36070
+ *
36071
+ * @remarks
36072
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
36073
+ * @beta
36074
+ */
36075
+ control: CellControl;
35930
36076
  /**
35931
36077
  * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead.
35932
36078
  *
@@ -36355,6 +36501,7 @@ declare namespace Excel {
36355
36501
  getColumnsBefore(count?: number): Excel.Range;
36356
36502
  /**
36357
36503
  * Returns a `WorkbookRangeAreas` object that represents the range containing all the dependent cells of a specified range in the same worksheet or across multiple worksheets.
36504
+ * Note: This API returns an `ItemNotFound` error if no dependents are found.
36358
36505
  *
36359
36506
  * @remarks
36360
36507
  * [Api set: ExcelApi 1.15]
@@ -36362,6 +36509,7 @@ declare namespace Excel {
36362
36509
  getDependents(): Excel.WorkbookRangeAreas;
36363
36510
  /**
36364
36511
  * Returns a `WorkbookRangeAreas` object that represents the range containing all the direct dependent cells of a specified range in the same worksheet or across multiple worksheets.
36512
+ * Note: This API returns an `ItemNotFound` error if no dependents are found.
36365
36513
  *
36366
36514
  * @remarks
36367
36515
  * [Api set: ExcelApi 1.13]
@@ -36369,6 +36517,7 @@ declare namespace Excel {
36369
36517
  getDirectDependents(): Excel.WorkbookRangeAreas;
36370
36518
  /**
36371
36519
  * Returns a `WorkbookRangeAreas` object that represents the range containing all the direct precedent cells of a specified range in the same worksheet or across multiple worksheets.
36520
+ * Note: This API returns an `ItemNotFound` error if no precedents are found.
36372
36521
  *
36373
36522
  * @remarks
36374
36523
  * [Api set: ExcelApi 1.12]
@@ -36486,6 +36635,7 @@ declare namespace Excel {
36486
36635
  getPivotTables(fullyContained?: boolean): Excel.PivotTableScopedCollection;
36487
36636
  /**
36488
36637
  * Returns a `WorkbookRangeAreas` object that represents the range containing all the precedent cells of a specified range in the same worksheet or across multiple worksheets.
36638
+ * Note: This API returns an `ItemNotFound` error if no precedents are found.
36489
36639
  *
36490
36640
  * @remarks
36491
36641
  * [Api set: ExcelApi 1.14]
@@ -36780,6 +36930,16 @@ declare namespace Excel {
36780
36930
  * @returns The number of replacements performed.
36781
36931
  */
36782
36932
  replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria): OfficeExtension.ClientResult<number>;
36933
+ /**
36934
+ * Sets all cells in the range to their default state.
36935
+ Cells with cell controls are set to the default value defined by each control.
36936
+ Cells without cell controls are set to blank.
36937
+ *
36938
+ * @remarks
36939
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
36940
+ * @beta
36941
+ */
36942
+ resetContent(): void;
36783
36943
  /**
36784
36944
  * Selects the specified range in the Excel UI.
36785
36945
  *
@@ -44217,6 +44377,13 @@ declare namespace Excel {
44217
44377
  * @param color HTML color code representing the color of the background, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange").
44218
44378
  */
44219
44379
  setSolidColor(color: string): void;
44380
+ /**
44381
+ * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.)
44382
+ * Whereas the original Excel.ChartFill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartFillData`) that contains shallow copies of any loaded child properties from the original object.
44383
+ */
44384
+ toJSON(): {
44385
+ [key: string]: string;
44386
+ };
44220
44387
  }
44221
44388
  /**
44222
44389
  * Represents the border formatting of a chart element.
@@ -52788,6 +52955,17 @@ declare namespace Excel {
52788
52955
  * @param connectorType Represents the connector type. See `Excel.ConnectorType` for details.
52789
52956
  */
52790
52957
  addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: "Straight" | "Elbow" | "Curve"): Excel.Shape;
52958
+ /**
52959
+ * Creates a reference for the local image stored in the cell address and displays it as a floating shape over cells.
52960
+ *
52961
+ * @remarks
52962
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
52963
+ * @beta
52964
+ *
52965
+ * @param address The address of the cell that contains the local image.
52966
+ * @returns The `Shape` object associated with the floating shape.
52967
+ */
52968
+ addLocalImageReference(address: string): Excel.Shape;
52791
52969
  /**
52792
52970
  * Creates a scalable vector graphic (SVG) from an XML string and adds it to the worksheet. Returns a `Shape` object that represents the new image.
52793
52971
  *
@@ -59218,7 +59396,7 @@ declare namespace Excel {
59218
59396
  * @remarks
59219
59397
  * [Api set: ExcelApi 1.7]
59220
59398
  */
59221
- workbookNavigationObjectChanged = "WorkbookNavigationObjectChanged",
59399
+ lineageActivityUpdateAvailable = "LineageActivityUpdateAvailable",
59222
59400
  /**
59223
59401
  * WorksheetRowHeightChanged represents the type of event registered when the height of a worksheet row is changed.
59224
59402
  * @remarks
@@ -66145,7 +66323,7 @@ declare namespace Excel {
66145
66323
  */
66146
66324
  enableCalculation?: boolean;
66147
66325
  /**
66148
- * The display name of the worksheet.
66326
+ * The display name of the worksheet. The name must be fewer than 32 characters.
66149
66327
  *
66150
66328
  * @remarks
66151
66329
  * [Api set: ExcelApi 1.1]
@@ -66224,6 +66402,15 @@ declare namespace Excel {
66224
66402
  * [Api set: ExcelApi 1.2]
66225
66403
  */
66226
66404
  columnHidden?: boolean;
66405
+ /**
66406
+ * Accesses the cell control applied to this range.
66407
+ If the range has multiple cell controls, this returns `EmptyCellControl`.
66408
+ *
66409
+ * @remarks
66410
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
66411
+ * @beta
66412
+ */
66413
+ control?: CellControl;
66227
66414
  /**
66228
66415
  * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead.
66229
66416
  *
@@ -71026,7 +71213,7 @@ declare namespace Excel {
71026
71213
  */
71027
71214
  changedBy?: Excel.EmailIdentity;
71028
71215
  /**
71029
- * Represents the ID of the `Comment` or `CommentReply` to which the task change is anchored.
71216
+ * Represents the ID of the comment or comment reply to which the task change is anchored.
71030
71217
  *
71031
71218
  * @remarks
71032
71219
  * [Api set: ExcelApi BETA (PREVIEW ONLY)]
@@ -71627,7 +71814,7 @@ declare namespace Excel {
71627
71814
  */
71628
71815
  id?: string;
71629
71816
  /**
71630
- * The display name of the worksheet.
71817
+ * The display name of the worksheet. The name must be fewer than 32 characters.
71631
71818
  *
71632
71819
  * @remarks
71633
71820
  * [Api set: ExcelApi 1.1]
@@ -71816,6 +72003,15 @@ declare namespace Excel {
71816
72003
  * [Api set: ExcelApi 1.1]
71817
72004
  */
71818
72005
  columnIndex?: number;
72006
+ /**
72007
+ * Accesses the cell control applied to this range.
72008
+ If the range has multiple cell controls, this returns `EmptyCellControl`.
72009
+ *
72010
+ * @remarks
72011
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
72012
+ * @beta
72013
+ */
72014
+ control?: CellControl;
71819
72015
  /**
71820
72016
  * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead.
71821
72017
  *
@@ -78130,7 +78326,7 @@ declare namespace Excel {
78130
78326
  */
78131
78327
  changedBy?: boolean;
78132
78328
  /**
78133
- * Represents the ID of the `comment` or `commentReply` to which the task change is anchored.
78329
+ * Represents the ID of the comment or comment reply to which the task change is anchored.
78134
78330
  *
78135
78331
  * @remarks
78136
78332
  * [Api set: ExcelApi BETA (PREVIEW ONLY)]
@@ -78243,7 +78439,7 @@ declare namespace Excel {
78243
78439
  */
78244
78440
  changedBy?: boolean;
78245
78441
  /**
78246
- * For EACH ITEM in the collection: Represents the ID of the `comment` or `commentReply` to which the task change is anchored.
78442
+ * For EACH ITEM in the collection: Represents the ID of the comment or comment reply to which the task change is anchored.
78247
78443
  *
78248
78444
  * @remarks
78249
78445
  * [Api set: ExcelApi BETA (PREVIEW ONLY)]
@@ -78882,7 +79078,7 @@ declare namespace Excel {
78882
79078
  */
78883
79079
  id?: boolean;
78884
79080
  /**
78885
- * The display name of the worksheet.
79081
+ * The display name of the worksheet. The name must be fewer than 32 characters.
78886
79082
  *
78887
79083
  * @remarks
78888
79084
  * [Api set: ExcelApi 1.1]
@@ -79010,7 +79206,7 @@ declare namespace Excel {
79010
79206
  */
79011
79207
  id?: boolean;
79012
79208
  /**
79013
- * For EACH ITEM in the collection: The display name of the worksheet.
79209
+ * For EACH ITEM in the collection: The display name of the worksheet. The name must be fewer than 32 characters.
79014
79210
  *
79015
79211
  * @remarks
79016
79212
  * [Api set: ExcelApi 1.1]
@@ -79206,6 +79402,15 @@ declare namespace Excel {
79206
79402
  * [Api set: ExcelApi 1.1]
79207
79403
  */
79208
79404
  columnIndex?: boolean;
79405
+ /**
79406
+ * Accesses the cell control applied to this range.
79407
+ If the range has multiple cell controls, this returns `EmptyCellControl`.
79408
+ *
79409
+ * @remarks
79410
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
79411
+ * @beta
79412
+ */
79413
+ control?: boolean;
79209
79414
  /**
79210
79415
  * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead.
79211
79416
  *
@@ -87521,6 +87726,15 @@ declare namespace Excel {
87521
87726
  * [Api set: ExcelApi 1.1]
87522
87727
  */
87523
87728
  columnIndex?: boolean;
87729
+ /**
87730
+ * For EACH ITEM in the collection: Accesses the cell control applied to this range.
87731
+ If the range has multiple cell controls, this returns `EmptyCellControl`.
87732
+ *
87733
+ * @remarks
87734
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
87735
+ * @beta
87736
+ */
87737
+ control?: boolean;
87524
87738
  /**
87525
87739
  * For EACH ITEM in the collection: Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead.
87526
87740
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.474",
3
+ "version": "1.0.475",
4
4
  "description": "TypeScript definitions for office-js-preview",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
- "typesPublisherContentHash": "207a31d6442f7bde128055760e127aa9ee6b52918cb1c8b65b88835c47b425ce",
48
+ "typesPublisherContentHash": "a51479e683c9cbb0179ba6026a0cd9e3649da1c1a42f6dc37a75b72d2375f370",
49
49
  "typeScriptVersion": "4.7",
50
50
  "nonNpm": true
51
51
  }