@types/office-js-preview 1.0.389 → 1.0.391

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 (https://github.com/OfficeD
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: Tue, 30 May 2023 21:32:44 GMT
11
+ * Last updated: Fri, 09 Jun 2023 17:33:06 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
14
14
 
@@ -12269,10 +12269,6 @@ declare namespace Office {
12269
12269
  *
12270
12270
  * This method returns the entire current body in the format specified by `coercionType`.
12271
12271
  *
12272
- * When working with HTML-formatted bodies, it is important to note that the `Body.getAsync` and `Body.setAsync` methods are not idempotent.
12273
- * The value returned from the `getAsync` method will not necessarily be exactly the same as the value that was passed in the `setAsync` method previously.
12274
- * The client may modify the value passed to `setAsync` in order to make it render efficiently with its rendering engine.
12275
- *
12276
12272
  * @remarks
12277
12273
  * [Api set: Mailbox 1.3]
12278
12274
  *
@@ -12280,6 +12276,10 @@ declare namespace Office {
12280
12276
  *
12281
12277
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
12282
12278
  *
12279
+ * **Important**: When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12280
+ * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it
12281
+ * render efficiently with its rendering engine.
12282
+ *
12283
12283
  * @param coercionType - The format for the returned body.
12284
12284
  * @param options - An object literal that contains one or more of the following properties:-
12285
12285
  * `asyncContext`: Developers can provide any object they wish to access in the callback function.
@@ -12292,10 +12292,6 @@ declare namespace Office {
12292
12292
  *
12293
12293
  * This method returns the entire current body in the format specified by `coercionType`.
12294
12294
  *
12295
- * When working with HTML-formatted bodies, it is important to note that the `Body.getAsync` and `Body.setAsync` methods are not idempotent.
12296
- * The value returned from the `getAsync` method will not necessarily be exactly the same as the value that was passed in the `setAsync` method previously.
12297
- * The client may modify the value passed to `setAsync` in order to make it render efficiently with its rendering engine.
12298
- *
12299
12295
  * @remarks
12300
12296
  * [Api set: Mailbox 1.3]
12301
12297
  *
@@ -12303,6 +12299,10 @@ declare namespace Office {
12303
12299
  *
12304
12300
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
12305
12301
  *
12302
+ * **Important**: When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12303
+ * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it
12304
+ * render efficiently with its rendering engine.
12305
+ *
12306
12306
  * @param coercionType - The format for the returned body.
12307
12307
  * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
12308
12308
  * of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.
@@ -12343,18 +12343,6 @@ declare namespace Office {
12343
12343
  /**
12344
12344
  * Adds the specified content to the beginning of the item body.
12345
12345
  *
12346
- * The `prependAsync` method inserts the specified string at the beginning of the item body.
12347
- * After insertion, the cursor is returned to its original place, relative to the inserted content.
12348
- *
12349
- * When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` in order to
12350
- * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
12351
- * (introduced in Mailbox 1.3) will not necessarily exactly contain the value that was passed in the `prependAsync` method previously.
12352
- *
12353
- * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12354
- * (see the **Examples** section for a sample).
12355
- *
12356
- * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12357
- *
12358
12346
  * @remarks
12359
12347
  * [Api set: Mailbox 1.1]
12360
12348
  *
@@ -12362,6 +12350,25 @@ declare namespace Office {
12362
12350
  *
12363
12351
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12364
12352
  *
12353
+ * **Important**:
12354
+ *
12355
+ * - After the content is prepended, the position of the cursor depends on which client the add-in is running.
12356
+ *
12357
+ * - **Windows, Web**: The cursor position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning
12358
+ * of the body prior to the `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call.
12359
+ *
12360
+ * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12361
+ * body of the mail item.
12362
+ *
12363
+ * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to
12364
+ * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
12365
+ * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call.
12366
+ *
12367
+ * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12368
+ * (see the **Examples** section for a sample).
12369
+ *
12370
+ * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter.
12371
+ *
12365
12372
  * **Errors**:
12366
12373
  *
12367
12374
  * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
@@ -12377,18 +12384,6 @@ declare namespace Office {
12377
12384
  /**
12378
12385
  * Adds the specified content to the beginning of the item body.
12379
12386
  *
12380
- * The `prependAsync` method inserts the specified string at the beginning of the item body.
12381
- * After insertion, the cursor is returned to its original place, relative to the inserted content.
12382
- *
12383
- * When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` in order to
12384
- * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
12385
- * (introduced in Mailbox 1.3) will not necessarily exactly contain the value that was passed in the `prependAsync` method previously.
12386
- *
12387
- * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12388
- * (see the **Examples** section for a sample).
12389
- *
12390
- * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12391
- *
12392
12387
  * @remarks
12393
12388
  * [Api set: Mailbox 1.1]
12394
12389
  *
@@ -12396,6 +12391,25 @@ declare namespace Office {
12396
12391
  *
12397
12392
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12398
12393
  *
12394
+ * **Important**:
12395
+ *
12396
+ * - After the content is prepended, the position of the cursor depends on which client the add-in is running.
12397
+ *
12398
+ * - **Windows, Web**: The cursor position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning
12399
+ * of the body prior to the `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call.
12400
+ *
12401
+ * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12402
+ * body of the mail item.
12403
+ *
12404
+ * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to
12405
+ * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
12406
+ * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call.
12407
+ *
12408
+ * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12409
+ * (see the **Examples** section for a sample).
12410
+ *
12411
+ * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter.
12412
+ *
12399
12413
  * **Errors**:
12400
12414
  *
12401
12415
  * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
@@ -12487,17 +12501,6 @@ declare namespace Office {
12487
12501
  /**
12488
12502
  * Replaces the entire body with the specified text.
12489
12503
  *
12490
- * When working with HTML-formatted bodies, it is important to note that the `Body.getAsync` and `Body.setAsync` methods are not idempotent.
12491
- * The value returned from the `getAsync` method will not necessarily be exactly the same as the value that was passed in the `setAsync` method
12492
- * previously. The client may modify the value passed to `setAsync` in order to make it render efficiently with its rendering engine.
12493
- *
12494
- * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12495
- * (see the **Examples** section for a sample).
12496
- *
12497
- * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12498
- *
12499
- * **Important**: In Outlook on Windows and on Mac, the add-in user won't be able to revert this action with the **Undo** command.
12500
- *
12501
12504
  * @remarks
12502
12505
  * [Api set: Mailbox 1.3]
12503
12506
  *
@@ -12505,6 +12508,28 @@ declare namespace Office {
12505
12508
  *
12506
12509
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12507
12510
  *
12511
+ * **Important**:
12512
+ *
12513
+ * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running.
12514
+ *
12515
+ * - **Windows**: The cursor appears at the beginning of the body of the mail item.
12516
+ *
12517
+ * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12518
+ * body of the mail item.
12519
+ *
12520
+ * - **Web**: The cursor appears at the end of the body of the mail item.
12521
+ *
12522
+ * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12523
+ * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it
12524
+ * render efficiently with its rendering engine.
12525
+ *
12526
+ * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12527
+ * (see the **Examples** section for a sample).
12528
+ *
12529
+ * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command.
12530
+ *
12531
+ * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter.
12532
+ *
12508
12533
  * **Errors**:
12509
12534
  *
12510
12535
  * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
@@ -12522,17 +12547,6 @@ declare namespace Office {
12522
12547
  /**
12523
12548
  * Replaces the entire body with the specified text.
12524
12549
  *
12525
- * When working with HTML-formatted bodies, it is important to note that the `Body.getAsync` and `Body.setAsync` methods are not idempotent.
12526
- * The value returned from the `getAsync` method will not necessarily be exactly the same as the value that was passed in the `setAsync` method
12527
- * previously. The client may modify the value passed to `setAsync` in order to make it render efficiently with its rendering engine.
12528
- *
12529
- * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12530
- * (see the **Examples** section for a sample).
12531
- *
12532
- * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12533
- *
12534
- * **Important**: In Outlook on Windows and on Mac, the add-in user won't be able to revert this action with the **Undo** command.
12535
- *
12536
12550
  * @remarks
12537
12551
  * [Api set: Mailbox 1.3]
12538
12552
  *
@@ -12540,6 +12554,28 @@ declare namespace Office {
12540
12554
  *
12541
12555
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12542
12556
  *
12557
+ * **Important**:
12558
+ *
12559
+ * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running.
12560
+ *
12561
+ * - **Windows**: The cursor appears at the beginning of the body of the mail item.
12562
+ *
12563
+ * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12564
+ * body of the mail item.
12565
+ *
12566
+ * - **Web**: The cursor appears at the end of the body of the mail item.
12567
+ *
12568
+ * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12569
+ * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it
12570
+ * render efficiently with its rendering engine.
12571
+ *
12572
+ * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12573
+ * (see the **Examples** section for a sample).
12574
+ *
12575
+ * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command.
12576
+ *
12577
+ * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter.
12578
+ *
12543
12579
  * **Errors**:
12544
12580
  *
12545
12581
  * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
@@ -19709,8 +19745,15 @@ declare namespace OfficeExtension {
19709
19745
  readonly debugInfo: RequestContextDebugInfo;
19710
19746
  }
19711
19747
 
19748
+ /**
19749
+ * Specifies options for a session of a Visio diagram embedded in a SharePoint page. Called by constructor of `EmbeddedSession`.
19750
+ * For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}.
19751
+ */
19712
19752
  interface EmbeddedOptions {
19713
19753
  sessionKey?: string,
19754
+ /*
19755
+ * The iframe element that hosts the Visio diagram.
19756
+ */
19714
19757
  container?: HTMLElement,
19715
19758
  id?: string;
19716
19759
  timeoutInMilliseconds?: number;
@@ -19718,8 +19761,15 @@ declare namespace OfficeExtension {
19718
19761
  width?: string;
19719
19762
  }
19720
19763
 
19764
+ /**
19765
+ * Represents a session of a Visio diagram embedded in a SharePoint page.
19766
+ * For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}.
19767
+ */
19721
19768
  class EmbeddedSession {
19722
19769
  constructor(url: string, options?: EmbeddedOptions);
19770
+ /**
19771
+ * Initializes the session.
19772
+ */
19723
19773
  public init(): Promise<any>;
19724
19774
  }
19725
19775
 
@@ -19885,13 +19935,25 @@ declare namespace OfficeExtension {
19885
19935
  remove(handler: (args: T) => Promise<any>): void;
19886
19936
  }
19887
19937
 
19938
+ /**
19939
+ * Enables the removal of an event handler. Returned by the `EventHandlers.add` method.
19940
+ *
19941
+ * **Note**: The same {@link OfficeExtension.ClientRequestContext | RequestContext} object that the handler was added in must be used when removing the handler.
19942
+ * More information can be found in {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-events#remove-an-event-handler | Remove an event handler}.
19943
+ */
19888
19944
  class EventHandlerResult<T> {
19889
19945
  constructor(context: ClientRequestContext, handlers: EventHandlers<T>, handler: (args: T) => Promise<any>);
19890
19946
  /** The request context associated with the object */
19891
19947
  context: ClientRequestContext;
19948
+ /**
19949
+ * Removes the handler from the event.
19950
+ */
19892
19951
  remove(): void;
19893
19952
  }
19894
19953
 
19954
+ /**
19955
+ * Used by Office to construct event handlers. Do not call in your code.
19956
+ */
19895
19957
  interface EventInfo<T> {
19896
19958
  registerFunc: (callback: (args: any) => void) => Promise<any>;
19897
19959
  unregisterFunc: (callback: (args: any) => void) => Promise<any>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.389",
3
+ "version": "1.0.391",
4
4
  "description": "TypeScript definitions for Office.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview",
6
6
  "license": "MIT",
@@ -45,6 +45,6 @@
45
45
  },
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
- "typesPublisherContentHash": "07fd1a2f72c042f59b175f686a119385f6578d87fb632293d7da586b4d85aaf9",
48
+ "typesPublisherContentHash": "876c566111b10a806622789993158019b4205d5d8e5e5c5d54a7c6fbfcb62186",
49
49
  "typeScriptVersion": "4.3"
50
50
  }