@types/office-js-preview 1.0.284 → 1.0.287
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 +1 -1
- office-js-preview/index.d.ts +55 -26
- office-js-preview/package.json +3 -3
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:
|
|
11
|
+
* Last updated: Thu, 03 Mar 2022 19:31:43 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
|
@@ -531,6 +531,9 @@ declare namespace Office {
|
|
|
531
531
|
}
|
|
532
532
|
/**
|
|
533
533
|
* Manages actions and keyboard shortcuts.
|
|
534
|
+
*
|
|
535
|
+
* @remarks
|
|
536
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/shared-runtime-requirement-sets | SharedRuntime 1.1}
|
|
534
537
|
*/
|
|
535
538
|
interface Actions {
|
|
536
539
|
/**
|
|
@@ -538,6 +541,9 @@ declare namespace Office {
|
|
|
538
541
|
*
|
|
539
542
|
* @param actionId The ID of an action that is defined in an extended manifest.
|
|
540
543
|
* @param actionFunction The function that is run when the action is invoked.
|
|
544
|
+
*
|
|
545
|
+
* @remarks
|
|
546
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/shared-runtime-requirement-sets | SharedRuntime 1.1}
|
|
541
547
|
*/
|
|
542
548
|
associate: (actionId: string, actionFunction: (arg?: any) => void) => void;
|
|
543
549
|
/**
|
|
@@ -545,7 +551,7 @@ declare namespace Office {
|
|
|
545
551
|
*
|
|
546
552
|
* @remarks
|
|
547
553
|
*
|
|
548
|
-
* **Requirement set**: KeyboardShortcuts 1.1
|
|
554
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/keyboard-shortcuts-requirement-sets | KeyboardShortcuts 1.1}
|
|
549
555
|
* @beta
|
|
550
556
|
*
|
|
551
557
|
* @param shortcuts An object of custom shortcuts with keys being the IDs of the actions (as defined in an extended manifest) and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2"}`.
|
|
@@ -560,7 +566,7 @@ declare namespace Office {
|
|
|
560
566
|
*
|
|
561
567
|
* @remarks
|
|
562
568
|
*
|
|
563
|
-
* **Requirement set**: KeyboardShortcuts 1.1
|
|
569
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/keyboard-shortcuts-requirement-sets | KeyboardShortcuts 1.1}
|
|
564
570
|
* @beta
|
|
565
571
|
*
|
|
566
572
|
* @returns A promise that resolves to an object of shortcuts, with keys being the IDs of the actions (as defined in an extended manifest) and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2", "SetUnderline": null}`.
|
|
@@ -571,7 +577,7 @@ declare namespace Office {
|
|
|
571
577
|
*
|
|
572
578
|
* @remarks
|
|
573
579
|
*
|
|
574
|
-
* **Requirement set**: KeyboardShortcuts 1.1
|
|
580
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/keyboard-shortcuts-requirement-sets | KeyboardShortcuts 1.1}
|
|
575
581
|
* @beta
|
|
576
582
|
*
|
|
577
583
|
* @param shortcuts An array of shortcut combinations. For example, `["Ctrl+1", "Ctrl+2"]`.
|
|
@@ -590,31 +596,50 @@ declare namespace Office {
|
|
|
590
596
|
}
|
|
591
597
|
/**
|
|
592
598
|
* Represents add-in level functionality for operating or configuring various aspects of the add-in.
|
|
599
|
+
*
|
|
600
|
+
* @remarks
|
|
601
|
+
*
|
|
602
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/shared-runtime-requirement-sets | SharedRuntime 1.1}
|
|
593
603
|
*/
|
|
594
604
|
interface Addin {
|
|
595
605
|
/**
|
|
596
606
|
* Sets the startup behavior for the add-in for when the document is opened next time.
|
|
597
607
|
* @param behavior - Specifies startup behavior of the add-in.
|
|
608
|
+
*
|
|
609
|
+
* @remarks
|
|
610
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/shared-runtime-requirement-sets | SharedRuntime 1.1}
|
|
598
611
|
*/
|
|
599
612
|
setStartupBehavior(behavior: Office.StartupBehavior): Promise<void>;
|
|
600
613
|
/**
|
|
601
614
|
* Gets the current startup behavior for the add-in.
|
|
615
|
+
*
|
|
616
|
+
* @remarks
|
|
617
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/shared-runtime-requirement-sets | SharedRuntime 1.1}
|
|
602
618
|
*/
|
|
603
619
|
getStartupBehavior(): Promise<Office.StartupBehavior>;
|
|
604
620
|
/**
|
|
605
621
|
* Shows the task pane associated with the add-in.
|
|
606
622
|
* @returns A promise that is resolved when the UI is shown.
|
|
623
|
+
*
|
|
624
|
+
* @remarks
|
|
625
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/shared-runtime-requirement-sets | SharedRuntime 1.1}
|
|
607
626
|
*/
|
|
608
627
|
showAsTaskpane(): Promise<void>;
|
|
609
628
|
/**
|
|
610
629
|
* Hides the task pane.
|
|
611
630
|
* @returns A promise that is resolved when the UI is hidden.
|
|
631
|
+
*
|
|
632
|
+
* @remarks
|
|
633
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/shared-runtime-requirement-sets | SharedRuntime 1.1}
|
|
612
634
|
*/
|
|
613
635
|
hide(): Promise<void>;
|
|
614
636
|
/**
|
|
615
637
|
* Adds a handler for the `onVisibilityModeChanged` event.
|
|
616
638
|
* @param handler - The handler function that is called when the event is emitted. This function takes in a message for the receiving component.
|
|
617
639
|
* @returns A promise that resolves to a function when the handler is added. Calling it removes the handler.
|
|
640
|
+
*
|
|
641
|
+
* @remarks
|
|
642
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/shared-runtime-requirement-sets | SharedRuntime 1.1}
|
|
618
643
|
*/
|
|
619
644
|
onVisibilityModeChanged(
|
|
620
645
|
handler: (message: VisibilityModeChangedMessage) => void,
|
|
@@ -678,7 +703,7 @@ declare namespace Office {
|
|
|
678
703
|
*
|
|
679
704
|
* @remarks
|
|
680
705
|
*
|
|
681
|
-
* **Requirement set**:
|
|
706
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/ribbon-api-requirement-sets | RibbonApi 1.1}
|
|
682
707
|
*/
|
|
683
708
|
interface Ribbon {
|
|
684
709
|
/**
|
|
@@ -686,7 +711,7 @@ declare namespace Office {
|
|
|
686
711
|
*
|
|
687
712
|
* @remarks
|
|
688
713
|
*
|
|
689
|
-
* **Requirement set**:
|
|
714
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/ribbon-api-requirement-sets | RibbonApi 1.2}
|
|
690
715
|
*
|
|
691
716
|
* This method only requests that the tab be registered. The actual registration is controlled by the Office application and may not be complete when the returned `Promise` object is resolved.
|
|
692
717
|
* For more information and code examples, see {@link https://docs.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}.
|
|
@@ -699,7 +724,7 @@ declare namespace Office {
|
|
|
699
724
|
*
|
|
700
725
|
* @remarks
|
|
701
726
|
*
|
|
702
|
-
* **Requirement set**:
|
|
727
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/ribbon-api-requirement-sets | RibbonApi 1.1}
|
|
703
728
|
*
|
|
704
729
|
* Note that this API is only to request an update. The actual UI update to the ribbon is controlled by the Office application and hence the exact timing of the ribbon update (or refresh) cannot be determined by the completion of this API.
|
|
705
730
|
*
|
|
@@ -714,7 +739,7 @@ declare namespace Office {
|
|
|
714
739
|
*
|
|
715
740
|
* @remarks
|
|
716
741
|
*
|
|
717
|
-
* **Requirement set**:
|
|
742
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/ribbon-api-requirement-sets | RibbonApi 1.1}
|
|
718
743
|
*/
|
|
719
744
|
interface RibbonUpdaterData {
|
|
720
745
|
/**
|
|
@@ -727,7 +752,7 @@ declare namespace Office {
|
|
|
727
752
|
*
|
|
728
753
|
* @remarks
|
|
729
754
|
*
|
|
730
|
-
* **Requirement set**:
|
|
755
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/ribbon-api-requirement-sets | RibbonApi 1.1}
|
|
731
756
|
*/
|
|
732
757
|
interface Tab {
|
|
733
758
|
/**
|
|
@@ -747,7 +772,7 @@ declare namespace Office {
|
|
|
747
772
|
*
|
|
748
773
|
* @remarks
|
|
749
774
|
*
|
|
750
|
-
* **Requirement set**:
|
|
775
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/ribbon-api-requirement-sets | RibbonApi 1.2}
|
|
751
776
|
*/
|
|
752
777
|
visible?: boolean;
|
|
753
778
|
/**
|
|
@@ -757,14 +782,14 @@ declare namespace Office {
|
|
|
757
782
|
*
|
|
758
783
|
* When the `Tab` object is part of an {@link Office.RibbonUpdaterData} object passed to the `requestUpdate` method of {@link Office.Ribbon}, the `controls` properties of the various {@link Office.Group} objects specify which controls have their enabled status changed; the `controls` property of the `Tab` object is ignored.
|
|
759
784
|
*
|
|
760
|
-
* **Requirement set**:
|
|
785
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/ribbon-api-requirement-sets | RibbonApi 1.1}
|
|
761
786
|
*/
|
|
762
787
|
groups?: Group[];
|
|
763
788
|
}
|
|
764
789
|
/**
|
|
765
790
|
* Represents a group of controls on a ribbon tab.
|
|
766
791
|
*
|
|
767
|
-
* **Requirement set**:
|
|
792
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/ribbon-api-requirement-sets | RibbonApi 1.1}
|
|
768
793
|
*/
|
|
769
794
|
interface Group {
|
|
770
795
|
/**
|
|
@@ -788,7 +813,7 @@ declare namespace Office {
|
|
|
788
813
|
*
|
|
789
814
|
* @remarks
|
|
790
815
|
*
|
|
791
|
-
* **Requirement set**:
|
|
816
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/ribbon-api-requirement-sets | RibbonApi 1.1}
|
|
792
817
|
*/
|
|
793
818
|
interface Control {
|
|
794
819
|
/**
|
|
@@ -1427,7 +1452,7 @@ declare namespace Office {
|
|
|
1427
1452
|
*
|
|
1428
1453
|
* **Hosts**: Excel, OneNote, Outlook, PowerPoint, Word
|
|
1429
1454
|
*
|
|
1430
|
-
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/identity-api-requirement-sets | IdentityAPI}
|
|
1455
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/identity-api-requirement-sets | IdentityAPI 1.3}
|
|
1431
1456
|
*
|
|
1432
1457
|
* This API requires a single sign-on configuration that bridges the add-in to an Azure application. Office users sign in with Organizational
|
|
1433
1458
|
* Accounts and Microsoft Accounts. Microsoft Azure returns tokens intended for both user account types to access resources in the Microsoft Graph.
|
|
@@ -1452,7 +1477,7 @@ declare namespace Office {
|
|
|
1452
1477
|
*
|
|
1453
1478
|
* **Hosts**: Excel, OneNote, Outlook, PowerPoint, Word
|
|
1454
1479
|
*
|
|
1455
|
-
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/identity-api-requirement-sets | IdentityAPI}
|
|
1480
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/identity-api-requirement-sets | IdentityAPI 1.3}
|
|
1456
1481
|
*
|
|
1457
1482
|
* This API requires a single sign-on configuration that bridges the add-in to an Azure application. Office users sign in with Organizational
|
|
1458
1483
|
* Accounts and Microsoft Accounts. Microsoft Azure returns tokens intended for both user account types to access resources in the Microsoft Graph.
|
|
@@ -1474,7 +1499,7 @@ declare namespace Office {
|
|
|
1474
1499
|
*
|
|
1475
1500
|
* **Important**: In Outlook, this API is not supported if the add-in is loaded in an Outlook.com or Gmail mailbox.
|
|
1476
1501
|
*
|
|
1477
|
-
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/identity-api-requirement-sets | IdentityAPI}
|
|
1502
|
+
* **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/identity-api-requirement-sets | IdentityAPI 1.3}
|
|
1478
1503
|
*
|
|
1479
1504
|
* @param options - Optional. Accepts an `AuthOptions` object to define sign-on behaviors.
|
|
1480
1505
|
* @returns Promise to the access token.
|
|
@@ -2164,7 +2189,7 @@ declare namespace Office {
|
|
|
2164
2189
|
*/
|
|
2165
2190
|
enum EventType {
|
|
2166
2191
|
/**
|
|
2167
|
-
* A Document.ActiveViewChanged event was raised.
|
|
2192
|
+
* A Document.ActiveViewChanged event was raised in PowerPoint.
|
|
2168
2193
|
*
|
|
2169
2194
|
* @remarks
|
|
2170
2195
|
*
|
|
@@ -2340,9 +2365,13 @@ declare namespace Office {
|
|
|
2340
2365
|
*/
|
|
2341
2366
|
Text,
|
|
2342
2367
|
/**
|
|
2343
|
-
* Returns the entire document (.pptx, .docx, or .
|
|
2368
|
+
* Returns the entire document (.pptx, .docx, .xlsx, or .xlsm) in Office Open XML (OOXML) format as a byte array.
|
|
2369
|
+
*
|
|
2370
|
+
* Note: The .xslm file type is supported in Excel on Windows and Mac. It's not supported in Excel on the web.
|
|
2371
|
+
* In Excel on Windows, the file slices from the `getFileAsync` method include the VBA signature files for .xslm file types. The VBA signature files are vbaProjectSignature.bin, vbaProbjectSignatureAgile.bin, and vbaProjectSignatureV3.bin.
|
|
2372
|
+
* In Excel on Mac, the file slices from the `getFileAsync` method don't include the VBA signature files, because this platform doesn't support the VBA signature feature.
|
|
2344
2373
|
*/
|
|
2345
|
-
|
|
2374
|
+
Compressed,
|
|
2346
2375
|
/**
|
|
2347
2376
|
* Returns the entire document in PDF format as a byte array.
|
|
2348
2377
|
*/
|
|
@@ -3900,8 +3929,8 @@ declare namespace Office {
|
|
|
3900
3929
|
* @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.
|
|
3901
3930
|
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
3902
3931
|
* The `value` property of the result is the state of the presentation's current view.
|
|
3903
|
-
* The value returned can be either "edit" or "read". "edit" corresponds to any of the views in which you can edit slides
|
|
3904
|
-
*
|
|
3932
|
+
* The value returned can be either "edit" or "read". "edit" corresponds to any of the views in which you can edit slides:
|
|
3933
|
+
* Normal, Slide Sorter, or Outline View. "read" corresponds to either Slide Show or Reading View.
|
|
3905
3934
|
*/
|
|
3906
3935
|
getActiveViewAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<"edit" | "read">) => void): void;
|
|
3907
3936
|
/**
|
|
@@ -3915,8 +3944,8 @@ declare namespace Office {
|
|
|
3915
3944
|
*
|
|
3916
3945
|
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
3917
3946
|
* The `value` property of the result is the state of the presentation's current view.
|
|
3918
|
-
* The value returned can be either "edit" or "read". "edit" corresponds to any of the views in which you can edit slides
|
|
3919
|
-
*
|
|
3947
|
+
* The value returned can be either "edit" or "read". "edit" corresponds to any of the views in which you can edit slides:
|
|
3948
|
+
* Normal, Slide Sorter, or Outline View. "read" corresponds to either Slide Show or Reading View.
|
|
3920
3949
|
*/
|
|
3921
3950
|
getActiveViewAsync(callback?: (result: AsyncResult<"edit" | "read">) => void): void;
|
|
3922
3951
|
/**
|
|
@@ -4092,7 +4121,7 @@ declare namespace Office {
|
|
|
4092
4121
|
* <td>`Office.CoercionType.SlideRange`</td>
|
|
4093
4122
|
* </tr>
|
|
4094
4123
|
* <tr>
|
|
4095
|
-
* <td>Excel, PowerPoint, and Word</td>
|
|
4124
|
+
* <td>Excel on Windows and Mac, PowerPoint on Windows, Mac, and the web, and Word on Windows and Mac</td>
|
|
4096
4125
|
* <td>`Office.CoercionType.XmlSvg`</td>
|
|
4097
4126
|
* </tr>
|
|
4098
4127
|
* </table>
|
|
@@ -4184,7 +4213,7 @@ declare namespace Office {
|
|
|
4184
4213
|
* <td>`Office.CoercionType.SlideRange`</td>
|
|
4185
4214
|
* </tr>
|
|
4186
4215
|
* <tr>
|
|
4187
|
-
* <td>Excel, PowerPoint, and Word</td>
|
|
4216
|
+
* <td>Excel on Windows and Mac, PowerPoint on Windows, Mac, and the web, and Word on Windows and Mac</td>
|
|
4188
4217
|
* <td>`Office.CoercionType.XmlSvg`</td>
|
|
4189
4218
|
* </tr>
|
|
4190
4219
|
* </table>
|
|
@@ -4424,7 +4453,7 @@ declare namespace Office {
|
|
|
4424
4453
|
* <td>`Office.CoercionType.SlideRange`</td>
|
|
4425
4454
|
* </tr>
|
|
4426
4455
|
* <tr>
|
|
4427
|
-
* <td>Excel, PowerPoint, and Word</td>
|
|
4456
|
+
* <td>Excel on Windows and Mac, PowerPoint on Windows, Mac, and the web, and Word on Windows and Mac</td>
|
|
4428
4457
|
* <td>`Office.CoercionType.XmlSvg`</td>
|
|
4429
4458
|
* </tr>
|
|
4430
4459
|
* </table>
|
|
@@ -4613,7 +4642,7 @@ declare namespace Office {
|
|
|
4613
4642
|
* <td>`Office.CoercionType.SlideRange`</td>
|
|
4614
4643
|
* </tr>
|
|
4615
4644
|
* <tr>
|
|
4616
|
-
* <td>Excel, PowerPoint, and Word</td>
|
|
4645
|
+
* <td>Excel on Windows and Mac, PowerPoint on Windows, Mac, and the web, and Word on Windows and Mac</td>
|
|
4617
4646
|
* <td>`Office.CoercionType.XmlSvg`</td>
|
|
4618
4647
|
* </tr>
|
|
4619
4648
|
* </table>
|
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.287",
|
|
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": "
|
|
49
|
-
"typeScriptVersion": "3.
|
|
48
|
+
"typesPublisherContentHash": "bea7806ad001f2aa21fc4dccfa6af3405eb146cbe420204dc9a34832a061ef3d",
|
|
49
|
+
"typeScriptVersion": "3.9"
|
|
50
50
|
}
|