@types/office-js-preview 1.0.390 → 1.0.392
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.
office-js-preview/README.md
CHANGED
|
@@ -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,
|
|
11
|
+
* Last updated: Tue, 13 Jun 2023 23:02:50 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
|
|
14
14
|
|
office-js-preview/index.d.ts
CHANGED
|
@@ -1550,13 +1550,19 @@ declare namespace Office {
|
|
|
1550
1550
|
*
|
|
1551
1551
|
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3}
|
|
1552
1552
|
*
|
|
1553
|
-
* **Important**:
|
|
1553
|
+
* **Important**:
|
|
1554
|
+
*
|
|
1555
|
+
* - In Outlook, this API isn't supported in the following scenarios.
|
|
1556
|
+
*
|
|
1557
|
+
* - If the add-in is loaded in an Outlook.com or Gmail mailbox.
|
|
1554
1558
|
*
|
|
1555
|
-
*
|
|
1559
|
+
* - If the add-in is loaded in Outlook on the web in the Safari browser. This results in error 13001 ("The user is not signed into Office").
|
|
1556
1560
|
*
|
|
1557
|
-
* -
|
|
1561
|
+
* - In Outlook on the web, if you use the
|
|
1562
|
+
* {@link https://learn.microsoft.com/javascript/api/office/office.ui#office-office-ui-displaydialogasync-member(1) | displayDialogAsync}
|
|
1563
|
+
* method to open a dialog, you must close the dialog before you can call `getAccessToken`.
|
|
1558
1564
|
*
|
|
1559
|
-
*
|
|
1565
|
+
* - In an Outlook event-based activation add-in, this API is supported in Outlook on Windows starting from Version 2111 (Build 14701.20000).
|
|
1560
1566
|
* To retrieve an access token in older builds, use
|
|
1561
1567
|
* {@link https://learn.microsoft.com/javascript/api/office-runtime/officeruntime.auth?view=common-js-preview#office-runtime-officeruntime-auth-getaccesstoken-member(1) |
|
|
1562
1568
|
* OfficeRuntime.auth.getAccessToken} instead. For more information, see
|
|
@@ -19745,8 +19751,15 @@ declare namespace OfficeExtension {
|
|
|
19745
19751
|
readonly debugInfo: RequestContextDebugInfo;
|
|
19746
19752
|
}
|
|
19747
19753
|
|
|
19754
|
+
/**
|
|
19755
|
+
* Specifies options for a session of a Visio diagram embedded in a SharePoint page. Called by constructor of `EmbeddedSession`.
|
|
19756
|
+
* For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}.
|
|
19757
|
+
*/
|
|
19748
19758
|
interface EmbeddedOptions {
|
|
19749
19759
|
sessionKey?: string,
|
|
19760
|
+
/*
|
|
19761
|
+
* The iframe element that hosts the Visio diagram.
|
|
19762
|
+
*/
|
|
19750
19763
|
container?: HTMLElement,
|
|
19751
19764
|
id?: string;
|
|
19752
19765
|
timeoutInMilliseconds?: number;
|
|
@@ -19754,8 +19767,15 @@ declare namespace OfficeExtension {
|
|
|
19754
19767
|
width?: string;
|
|
19755
19768
|
}
|
|
19756
19769
|
|
|
19770
|
+
/**
|
|
19771
|
+
* Represents a session of a Visio diagram embedded in a SharePoint page.
|
|
19772
|
+
* For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}.
|
|
19773
|
+
*/
|
|
19757
19774
|
class EmbeddedSession {
|
|
19758
19775
|
constructor(url: string, options?: EmbeddedOptions);
|
|
19776
|
+
/**
|
|
19777
|
+
* Initializes the session.
|
|
19778
|
+
*/
|
|
19759
19779
|
public init(): Promise<any>;
|
|
19760
19780
|
}
|
|
19761
19781
|
|
|
@@ -19921,13 +19941,25 @@ declare namespace OfficeExtension {
|
|
|
19921
19941
|
remove(handler: (args: T) => Promise<any>): void;
|
|
19922
19942
|
}
|
|
19923
19943
|
|
|
19944
|
+
/**
|
|
19945
|
+
* Enables the removal of an event handler. Returned by the `EventHandlers.add` method.
|
|
19946
|
+
*
|
|
19947
|
+
* **Note**: The same {@link OfficeExtension.ClientRequestContext | RequestContext} object that the handler was added in must be used when removing the handler.
|
|
19948
|
+
* 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}.
|
|
19949
|
+
*/
|
|
19924
19950
|
class EventHandlerResult<T> {
|
|
19925
19951
|
constructor(context: ClientRequestContext, handlers: EventHandlers<T>, handler: (args: T) => Promise<any>);
|
|
19926
19952
|
/** The request context associated with the object */
|
|
19927
19953
|
context: ClientRequestContext;
|
|
19954
|
+
/**
|
|
19955
|
+
* Removes the handler from the event.
|
|
19956
|
+
*/
|
|
19928
19957
|
remove(): void;
|
|
19929
19958
|
}
|
|
19930
19959
|
|
|
19960
|
+
/**
|
|
19961
|
+
* Used by Office to construct event handlers. Do not call in your code.
|
|
19962
|
+
*/
|
|
19931
19963
|
interface EventInfo<T> {
|
|
19932
19964
|
registerFunc: (callback: (args: any) => void) => Promise<any>;
|
|
19933
19965
|
unregisterFunc: (callback: (args: any) => void) => Promise<any>;
|
office-js-preview/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/office-js-preview",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.392",
|
|
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": "
|
|
48
|
+
"typesPublisherContentHash": "d1594d9b07c6dc9f5d7d3485f09c19a9482348312886cbc25db0997c0659239a",
|
|
49
49
|
"typeScriptVersion": "4.3"
|
|
50
50
|
}
|