@types/office-js-preview 1.0.473 → 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 21:35:52 GMT
11
+ * Last updated: Fri, 31 May 2024 21:07:10 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -241,6 +241,10 @@ declare namespace Office {
241
241
  * Represents the Auth interface.
242
242
  */
243
243
  const auth: Auth;
244
+ /**
245
+ * Represents the Device Permission interface.
246
+ */
247
+ const devicePermission: DevicePermission;
244
248
  /**
245
249
  * Represents the ribbon associated with the Office application.
246
250
  */
@@ -21668,6 +21672,65 @@ declare namespace OfficeCore {
21668
21672
 
21669
21673
 
21670
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;
21671
21734
  /**
21672
21735
  * Represents a 2D array of cell values.
21673
21736
  *
@@ -27628,7 +27691,8 @@ declare namespace Excel {
27628
27691
  * Represents the type of this cell value.
27629
27692
  *
27630
27693
  * @remarks
27631
- * [Api set: ExcelApi 1.16]
27694
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
27695
+ * @beta
27632
27696
  */
27633
27697
  type: CellValueType.localImage | "LocalImage";
27634
27698
  /**
@@ -27637,14 +27701,16 @@ declare namespace Excel {
27637
27701
  * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale.
27638
27702
  *
27639
27703
  * @remarks
27640
- * [Api set: ExcelApi 1.16]
27704
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
27705
+ * @beta
27641
27706
  */
27642
27707
  basicValue?: "#VALUE!" | string;
27643
27708
  /**
27644
27709
  * Represents the value that would be returned by `Range.valueTypes` for a cell with this value.
27645
27710
  *
27646
27711
  * @remarks
27647
- * [Api set: ExcelApi 1.16]
27712
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
27713
+ * @beta
27648
27714
  */
27649
27715
  basicType?: RangeValueType.error | "Error";
27650
27716
  /**
@@ -29183,6 +29249,35 @@ declare namespace Excel {
29183
29249
  function run<T>(context: OfficeExtension.ClientRequestContext, batch: (context: Excel.RequestContext) => Promise<T>): Promise<T>;
29184
29250
  function postprocessBindingDescriptor(response: any): any;
29185
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
+ }
29186
29281
  /**
29187
29282
  * Represents an `AllowEditRange` object found in a worksheet. This object works with worksheet protection properties.
29188
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.
@@ -30049,7 +30144,7 @@ declare namespace Excel {
30049
30144
  */
30050
30145
  readonly changedBy: Excel.EmailIdentity;
30051
30146
  /**
30052
- * 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.
30053
30148
  *
30054
30149
  * @remarks
30055
30150
  * [Api set: ExcelApi BETA (PREVIEW ONLY)]
@@ -32603,6 +32698,44 @@ declare namespace Excel {
32603
32698
  */
32604
32699
  type: "WorkbookAutoSaveSettingChanged";
32605
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
+ }
32606
32739
  /**
32607
32740
  * Represents the direction that existing or remaining cells in a worksheet will shift when cells are inserted into or deleted from a worksheet.
32608
32741
  *
@@ -34148,6 +34281,14 @@ declare namespace Excel {
34148
34281
  * [Api set: ExcelApiOnline 1.1]
34149
34282
  */
34150
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;
34151
34292
  /**
34152
34293
  * Represents a collection of workbook-scoped named items (named ranges and constants).
34153
34294
  *
@@ -34534,7 +34675,7 @@ declare namespace Excel {
34534
34675
  */
34535
34676
  readonly protected: boolean;
34536
34677
  /**
34537
- * Protects a workbook. Fails if the workbook has been protected.
34678
+ * Protects the workbook. Fails if the workbook has been protected.
34538
34679
  *
34539
34680
  * @remarks
34540
34681
  * [Api set: ExcelApi 1.7]
@@ -34543,7 +34684,7 @@ declare namespace Excel {
34543
34684
  */
34544
34685
  protect(password?: string): void;
34545
34686
  /**
34546
- * Unprotects a workbook.
34687
+ * Unprotects the workbook.
34547
34688
  *
34548
34689
  * @remarks
34549
34690
  * [Api set: ExcelApi 1.7]
@@ -34747,7 +34888,7 @@ declare namespace Excel {
34747
34888
  */
34748
34889
  readonly id: string;
34749
34890
  /**
34750
- * The display name of the worksheet.
34891
+ * The display name of the worksheet. The name must be fewer than 32 characters.
34751
34892
  *
34752
34893
  * @remarks
34753
34894
  * [Api set: ExcelApi 1.1]
@@ -35923,6 +36064,15 @@ declare namespace Excel {
35923
36064
  * [Api set: ExcelApi 1.1]
35924
36065
  */
35925
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;
35926
36076
  /**
35927
36077
  * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead.
35928
36078
  *
@@ -36351,6 +36501,7 @@ declare namespace Excel {
36351
36501
  getColumnsBefore(count?: number): Excel.Range;
36352
36502
  /**
36353
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.
36354
36505
  *
36355
36506
  * @remarks
36356
36507
  * [Api set: ExcelApi 1.15]
@@ -36358,6 +36509,7 @@ declare namespace Excel {
36358
36509
  getDependents(): Excel.WorkbookRangeAreas;
36359
36510
  /**
36360
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.
36361
36513
  *
36362
36514
  * @remarks
36363
36515
  * [Api set: ExcelApi 1.13]
@@ -36365,6 +36517,7 @@ declare namespace Excel {
36365
36517
  getDirectDependents(): Excel.WorkbookRangeAreas;
36366
36518
  /**
36367
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.
36368
36521
  *
36369
36522
  * @remarks
36370
36523
  * [Api set: ExcelApi 1.12]
@@ -36482,6 +36635,7 @@ declare namespace Excel {
36482
36635
  getPivotTables(fullyContained?: boolean): Excel.PivotTableScopedCollection;
36483
36636
  /**
36484
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.
36485
36639
  *
36486
36640
  * @remarks
36487
36641
  * [Api set: ExcelApi 1.14]
@@ -36776,6 +36930,16 @@ declare namespace Excel {
36776
36930
  * @returns The number of replacements performed.
36777
36931
  */
36778
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;
36779
36943
  /**
36780
36944
  * Selects the specified range in the Excel UI.
36781
36945
  *
@@ -44213,6 +44377,13 @@ declare namespace Excel {
44213
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").
44214
44378
  */
44215
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
+ };
44216
44387
  }
44217
44388
  /**
44218
44389
  * Represents the border formatting of a chart element.
@@ -52784,6 +52955,17 @@ declare namespace Excel {
52784
52955
  * @param connectorType Represents the connector type. See `Excel.ConnectorType` for details.
52785
52956
  */
52786
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;
52787
52969
  /**
52788
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.
52789
52971
  *
@@ -59214,7 +59396,7 @@ declare namespace Excel {
59214
59396
  * @remarks
59215
59397
  * [Api set: ExcelApi 1.7]
59216
59398
  */
59217
- workbookNavigationObjectChanged = "WorkbookNavigationObjectChanged",
59399
+ lineageActivityUpdateAvailable = "LineageActivityUpdateAvailable",
59218
59400
  /**
59219
59401
  * WorksheetRowHeightChanged represents the type of event registered when the height of a worksheet row is changed.
59220
59402
  * @remarks
@@ -66141,7 +66323,7 @@ declare namespace Excel {
66141
66323
  */
66142
66324
  enableCalculation?: boolean;
66143
66325
  /**
66144
- * The display name of the worksheet.
66326
+ * The display name of the worksheet. The name must be fewer than 32 characters.
66145
66327
  *
66146
66328
  * @remarks
66147
66329
  * [Api set: ExcelApi 1.1]
@@ -66220,6 +66402,15 @@ declare namespace Excel {
66220
66402
  * [Api set: ExcelApi 1.2]
66221
66403
  */
66222
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;
66223
66414
  /**
66224
66415
  * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead.
66225
66416
  *
@@ -71022,7 +71213,7 @@ declare namespace Excel {
71022
71213
  */
71023
71214
  changedBy?: Excel.EmailIdentity;
71024
71215
  /**
71025
- * 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.
71026
71217
  *
71027
71218
  * @remarks
71028
71219
  * [Api set: ExcelApi BETA (PREVIEW ONLY)]
@@ -71623,7 +71814,7 @@ declare namespace Excel {
71623
71814
  */
71624
71815
  id?: string;
71625
71816
  /**
71626
- * The display name of the worksheet.
71817
+ * The display name of the worksheet. The name must be fewer than 32 characters.
71627
71818
  *
71628
71819
  * @remarks
71629
71820
  * [Api set: ExcelApi 1.1]
@@ -71812,6 +72003,15 @@ declare namespace Excel {
71812
72003
  * [Api set: ExcelApi 1.1]
71813
72004
  */
71814
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;
71815
72015
  /**
71816
72016
  * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead.
71817
72017
  *
@@ -78126,7 +78326,7 @@ declare namespace Excel {
78126
78326
  */
78127
78327
  changedBy?: boolean;
78128
78328
  /**
78129
- * 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.
78130
78330
  *
78131
78331
  * @remarks
78132
78332
  * [Api set: ExcelApi BETA (PREVIEW ONLY)]
@@ -78239,7 +78439,7 @@ declare namespace Excel {
78239
78439
  */
78240
78440
  changedBy?: boolean;
78241
78441
  /**
78242
- * 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.
78243
78443
  *
78244
78444
  * @remarks
78245
78445
  * [Api set: ExcelApi BETA (PREVIEW ONLY)]
@@ -78878,7 +79078,7 @@ declare namespace Excel {
78878
79078
  */
78879
79079
  id?: boolean;
78880
79080
  /**
78881
- * The display name of the worksheet.
79081
+ * The display name of the worksheet. The name must be fewer than 32 characters.
78882
79082
  *
78883
79083
  * @remarks
78884
79084
  * [Api set: ExcelApi 1.1]
@@ -79006,7 +79206,7 @@ declare namespace Excel {
79006
79206
  */
79007
79207
  id?: boolean;
79008
79208
  /**
79009
- * 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.
79010
79210
  *
79011
79211
  * @remarks
79012
79212
  * [Api set: ExcelApi 1.1]
@@ -79202,6 +79402,15 @@ declare namespace Excel {
79202
79402
  * [Api set: ExcelApi 1.1]
79203
79403
  */
79204
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;
79205
79414
  /**
79206
79415
  * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead.
79207
79416
  *
@@ -87517,6 +87726,15 @@ declare namespace Excel {
87517
87726
  * [Api set: ExcelApi 1.1]
87518
87727
  */
87519
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;
87520
87738
  /**
87521
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.
87522
87740
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.473",
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": "735c05c8355d969fb6738be33a9b7e0849571425739d1b85ab499fa260bb6cc6",
48
+ "typesPublisherContentHash": "a51479e683c9cbb0179ba6026a0cd9e3649da1c1a42f6dc37a75b72d2375f370",
49
49
  "typeScriptVersion": "4.7",
50
50
  "nonNpm": true
51
51
  }