@types/office-js 1.0.304 → 1.0.306
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/README.md +1 -1
- office-js/index.d.ts +83 -8
- office-js/package.json +2 -2
office-js/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.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Mon,
|
|
11
|
+
* Last updated: Mon, 12 Dec 2022 21:49:43 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
|
|
14
14
|
|
office-js/index.d.ts
CHANGED
|
@@ -653,6 +653,61 @@ declare namespace Office {
|
|
|
653
653
|
onVisibilityModeChanged(
|
|
654
654
|
handler: (message: VisibilityModeChangedMessage) => void,
|
|
655
655
|
): Promise<() => Promise<void>>;
|
|
656
|
+
/**
|
|
657
|
+
* Represents a modal notification dialog that can appear when the user attempts to close a document. The document won't close until the user responds.
|
|
658
|
+
* This API is only supported in Excel.
|
|
659
|
+
*
|
|
660
|
+
* @remarks
|
|
661
|
+
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2}
|
|
662
|
+
*/
|
|
663
|
+
beforeDocumentCloseNotification: BeforeDocumentCloseNotification;
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Represents a modal notification dialog that can appear when the user attempts to close a document. The document won't close until the user responds.
|
|
667
|
+
* The notification dialog will allow the user to confirm the request to close the document or cancel the request to close the document.
|
|
668
|
+
* This API is only supported in Excel.
|
|
669
|
+
*
|
|
670
|
+
* @remarks
|
|
671
|
+
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2}
|
|
672
|
+
*/
|
|
673
|
+
interface BeforeDocumentCloseNotification {
|
|
674
|
+
/**
|
|
675
|
+
* Enable a modal notification dialog that appears when the user attempts to close a document. The document won't close until the user responds.
|
|
676
|
+
* This notification dialog asks the user to confirm the request to close the document, or allows the user to cancel the request to close the document.
|
|
677
|
+
* The `BeforeDocumentCloseNotification` API is only supported in Excel.
|
|
678
|
+
*
|
|
679
|
+
* @remarks
|
|
680
|
+
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2}
|
|
681
|
+
*/
|
|
682
|
+
enable(): Promise<void>;
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* Prevents the notification dialog from appearing when the user attempts to close a document.
|
|
686
|
+
* The `BeforeDocumentCloseNotification` API is only supported in Excel.
|
|
687
|
+
*
|
|
688
|
+
* @remarks
|
|
689
|
+
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2}
|
|
690
|
+
*/
|
|
691
|
+
disable(): Promise<void>;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Adds an event handler that detects when the `BeforeDocumentCloseNotification` close operation is cancelled.
|
|
695
|
+
* This event handler will be triggered if both of the following conditions are met.
|
|
696
|
+
*
|
|
697
|
+
* 1. The add-in calls the `enable` method on the `BeforeDocumentCloseNotification` object.
|
|
698
|
+
*
|
|
699
|
+
* 2. When the notification dialog is open, the end user clicks the **Don't close** button within the dialog, clicks the Close button in the upper right corner of the dialog, or presses the Esc key.
|
|
700
|
+
*
|
|
701
|
+
* The `BeforeDocumentCloseNotification` API is only supported in Excel.
|
|
702
|
+
* @param handler The event handler that is called when the dialog is cancelled.
|
|
703
|
+
* @returns A promise that resolves when the event handler is added.
|
|
704
|
+
*
|
|
705
|
+
* @remarks
|
|
706
|
+
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2}
|
|
707
|
+
*/
|
|
708
|
+
onCloseActionCancelled(
|
|
709
|
+
handler: () => void
|
|
710
|
+
): Promise<() => Promise<void>>;
|
|
656
711
|
}
|
|
657
712
|
/**
|
|
658
713
|
* An interface that contains all the functionality provided to manage the state of the Office ribbon.
|
|
@@ -11512,7 +11567,9 @@ declare namespace Office {
|
|
|
11512
11567
|
*/
|
|
11513
11568
|
getEntitiesByType(entityType: MailboxEnums.EntityType | string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[];
|
|
11514
11569
|
/**
|
|
11515
|
-
* Returns well-known entities in the selected item that pass the named filter defined in
|
|
11570
|
+
* Returns well-known entities in the selected item that pass the named filter defined in an XML manifest file.
|
|
11571
|
+
*
|
|
11572
|
+
* **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}.
|
|
11516
11573
|
*
|
|
11517
11574
|
* The `getFilteredEntitiesByName` method returns the entities that match the regular expression defined in the `ItemHasKnownEntity` rule element
|
|
11518
11575
|
* in the manifest XML file with the specified `FilterName` element value.
|
|
@@ -11568,7 +11625,9 @@ declare namespace Office {
|
|
|
11568
11625
|
*/
|
|
11569
11626
|
getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
11570
11627
|
/**
|
|
11571
|
-
* Returns string values in the selected item that match the regular expressions defined in
|
|
11628
|
+
* Returns string values in the selected item that match the regular expressions defined in an XML manifest file.
|
|
11629
|
+
*
|
|
11630
|
+
* **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}.
|
|
11572
11631
|
*
|
|
11573
11632
|
* The `getRegExMatches` method returns the strings that match the regular expression defined in each `ItemHasRegularExpressionMatch` or
|
|
11574
11633
|
* `ItemHasKnownEntity` rule element in the manifest XML file.
|
|
@@ -11595,7 +11654,9 @@ declare namespace Office {
|
|
|
11595
11654
|
*/
|
|
11596
11655
|
getRegExMatches(): any;
|
|
11597
11656
|
/**
|
|
11598
|
-
* Returns string values in the selected item that match the named regular expression defined in
|
|
11657
|
+
* Returns string values in the selected item that match the named regular expression defined in an XML manifest file.
|
|
11658
|
+
*
|
|
11659
|
+
* **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}.
|
|
11599
11660
|
*
|
|
11600
11661
|
* The `getRegExMatchesByName` method returns the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule
|
|
11601
11662
|
* element in the manifest XML file with the specified `RegExName` element value.
|
|
@@ -11620,6 +11681,8 @@ declare namespace Office {
|
|
|
11620
11681
|
getRegExMatchesByName(name: string): string[];
|
|
11621
11682
|
/**
|
|
11622
11683
|
* Gets the entities found in a highlighted match a user has selected. Highlighted matches apply to contextual add-ins.
|
|
11684
|
+
*
|
|
11685
|
+
* **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}.
|
|
11623
11686
|
*
|
|
11624
11687
|
* **Note**: This method is not supported in Outlook on iOS or Android.
|
|
11625
11688
|
*
|
|
@@ -11634,8 +11697,10 @@ declare namespace Office {
|
|
|
11634
11697
|
*/
|
|
11635
11698
|
getSelectedEntities(): Entities;
|
|
11636
11699
|
/**
|
|
11637
|
-
* Returns string values in a highlighted match that match the regular expressions defined in
|
|
11700
|
+
* Returns string values in a highlighted match that match the regular expressions defined in an XML manifest file.
|
|
11638
11701
|
* Highlighted matches apply to contextual add-ins.
|
|
11702
|
+
*
|
|
11703
|
+
* **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}.
|
|
11639
11704
|
*
|
|
11640
11705
|
* The `getSelectedRegExMatches` method returns the strings that match the regular expression defined in each `ItemHasRegularExpressionMatch` or
|
|
11641
11706
|
* `ItemHasKnownEntity` rule element in the manifest XML file.
|
|
@@ -16494,7 +16559,9 @@ declare namespace Office {
|
|
|
16494
16559
|
*/
|
|
16495
16560
|
getEntitiesByType(entityType: MailboxEnums.EntityType | string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[];
|
|
16496
16561
|
/**
|
|
16497
|
-
* Returns well-known entities in the selected item that pass the named filter defined in
|
|
16562
|
+
* Returns well-known entities in the selected item that pass the named filter defined in an XML manifest file.
|
|
16563
|
+
*
|
|
16564
|
+
* **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}.
|
|
16498
16565
|
*
|
|
16499
16566
|
* The `getFilteredEntitiesByName` method returns the entities that match the regular expression defined in the `ItemHasKnownEntity` rule element
|
|
16500
16567
|
* in the manifest XML file with the specified `FilterName` element value.
|
|
@@ -16550,7 +16617,9 @@ declare namespace Office {
|
|
|
16550
16617
|
*/
|
|
16551
16618
|
getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
16552
16619
|
/**
|
|
16553
|
-
* Returns string values in the selected item that match the regular expressions defined in
|
|
16620
|
+
* Returns string values in the selected item that match the regular expressions defined in an XML manifest file.
|
|
16621
|
+
*
|
|
16622
|
+
* **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}.
|
|
16554
16623
|
*
|
|
16555
16624
|
* The `getRegExMatches` method returns the strings that match the regular expression defined in each `ItemHasRegularExpressionMatch` or
|
|
16556
16625
|
* `ItemHasKnownEntity` rule element in the manifest XML file.
|
|
@@ -16577,7 +16646,9 @@ declare namespace Office {
|
|
|
16577
16646
|
*/
|
|
16578
16647
|
getRegExMatches(): any;
|
|
16579
16648
|
/**
|
|
16580
|
-
* Returns string values in the selected item that match the named regular expression defined in
|
|
16649
|
+
* Returns string values in the selected item that match the named regular expression defined in an XML manifest file.
|
|
16650
|
+
*
|
|
16651
|
+
* **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}.
|
|
16581
16652
|
*
|
|
16582
16653
|
* The `getRegExMatchesByName` method returns the strings that match the regular expression defined in the
|
|
16583
16654
|
* `ItemHasRegularExpressionMatch` rule element in the manifest XML file with the specified `RegExName` element value.
|
|
@@ -16602,6 +16673,8 @@ declare namespace Office {
|
|
|
16602
16673
|
getRegExMatchesByName(name: string): string[];
|
|
16603
16674
|
/**
|
|
16604
16675
|
* Gets the entities found in a highlighted match a user has selected. Highlighted matches apply to contextual add-ins.
|
|
16676
|
+
*
|
|
16677
|
+
* **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}.
|
|
16605
16678
|
*
|
|
16606
16679
|
* **Note**: This method is not supported in Outlook on iOS or Android.
|
|
16607
16680
|
*
|
|
@@ -16616,8 +16689,10 @@ declare namespace Office {
|
|
|
16616
16689
|
*/
|
|
16617
16690
|
getSelectedEntities(): Entities;
|
|
16618
16691
|
/**
|
|
16619
|
-
* Returns string values in a highlighted match that match the regular expressions defined in
|
|
16692
|
+
* Returns string values in a highlighted match that match the regular expressions defined in an XML manifest file.
|
|
16620
16693
|
* Highlighted matches apply to contextual add-ins.
|
|
16694
|
+
*
|
|
16695
|
+
* **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}.
|
|
16621
16696
|
*
|
|
16622
16697
|
* The `getSelectedRegExMatches` method returns the strings that match the regular expression defined in
|
|
16623
16698
|
* each `ItemHasRegularExpressionMatch` or `ItemHasKnownEntity` rule element in the manifest XML file.
|
office-js/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/office-js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.306",
|
|
4
4
|
"description": "TypeScript definitions for Office.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
},
|
|
46
46
|
"scripts": {},
|
|
47
47
|
"dependencies": {},
|
|
48
|
-
"typesPublisherContentHash": "
|
|
48
|
+
"typesPublisherContentHash": "9cd40f17dd505e2505b98cd7849e9fe331bc7a055eb2e2a202dc3a0f95146f69",
|
|
49
49
|
"typeScriptVersion": "4.2"
|
|
50
50
|
}
|