Package changes.
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ This package contains type definitions for office-js (https://github.com/OfficeD
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 03 Mar 2025 21:02:17 GMT
|
||||
* Last updated: Fri, 07 Mar 2025 19:02:31 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
|
||||
+66
-3
@@ -241,6 +241,10 @@ declare namespace Office {
|
||||
* Represents the Auth interface.
|
||||
*/
|
||||
const auth: Auth;
|
||||
/**
|
||||
* Represents the context menu object associated with the Office application.
|
||||
*/
|
||||
const contextMenu: ContextMenu;
|
||||
/**
|
||||
* Represents the Device Permission interface.
|
||||
*/
|
||||
@@ -4744,12 +4748,71 @@ declare namespace Office {
|
||||
*/
|
||||
version: string;
|
||||
}
|
||||
/**
|
||||
* Provides options to manage the state of the Office context menu.
|
||||
*
|
||||
* To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Change the availability of add-in commands}.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/context-menu-api-requirement-sets | ContextMenuApi 1.1}
|
||||
*/
|
||||
interface ContextMenu {
|
||||
/**
|
||||
* Sends a request to Office to update the context menu.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/context-menu-api-requirement-sets | ContextMenuApi 1.1}
|
||||
*
|
||||
* **Important**: This API is only used to request an update. The actual UI update to the context menu is controlled by the Office application,
|
||||
* so the exact timing of the context menu update (or refresh) can't be determined by the completion of this API.
|
||||
*
|
||||
* @param input - Represents the updates to be made to the context menu controls. Only the changes specified in the `control` parameter are made.
|
||||
* Other context menu controls that aren't specified remain as is in the Office application.
|
||||
*/
|
||||
requestUpdate(input: ContextMenuUpdaterData): Promise<void>;
|
||||
}
|
||||
/**
|
||||
* Represents an individual context menu control and its state.
|
||||
*
|
||||
* To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Change the availability of add-in commands}.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/context-menu-api-requirement-sets | ContextMenuApi 1.1}
|
||||
*/
|
||||
interface ContextMenuControl {
|
||||
/**
|
||||
* Identifier of the context menu control as specified in the manifest.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Indicates whether the control is available on the context menu.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
}
|
||||
/**
|
||||
* Represents the changes to the context menu.
|
||||
*
|
||||
* To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Change the availability of add-in commands}.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/context-menu-api-requirement-sets | ContextMenuApi 1.1}
|
||||
*/
|
||||
interface ContextMenuUpdaterData {
|
||||
/**
|
||||
* Collection of context menu controls whose state is set using `Office.contextMenu.requestUpdate`.
|
||||
*/
|
||||
controls: ContextMenuControl[];
|
||||
}
|
||||
/**
|
||||
* Represents an individual control or command and the state it should have.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* For code samples showing how to use a `Control` object and its properties, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Enable and Disable Add-in Commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}.
|
||||
* For code samples showing how to use a `Control` object and its properties, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Change the availability of add-in commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}.
|
||||
*
|
||||
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1}
|
||||
*/
|
||||
@@ -7189,7 +7252,7 @@ declare namespace Office {
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* For code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Enable and Disable Add-in Commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}.
|
||||
* For code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Change the availability of add-in commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}.
|
||||
*
|
||||
* @param input - Represents the updates to be made to the ribbon. Note that only the changes specified in the input parameter are made.
|
||||
*/
|
||||
@@ -7736,7 +7799,7 @@ declare namespace Office {
|
||||
size: number;
|
||||
}
|
||||
/**
|
||||
* Represents an individual tab and the state it should have. For code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Enable and Disable Add-in Commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}.
|
||||
* Represents an individual tab and the state it should have. For code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Change the availability of add-in commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@types/office-js",
|
||||
"version": "1.0.474",
|
||||
"version": "1.0.475",
|
||||
"description": "TypeScript definitions for office-js",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js",
|
||||
"license": "MIT",
|
||||
@@ -46,6 +46,6 @@
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "2c3b0bb2b9e42aaf43a598224e667362fc47d07d0bfd07c5a58c7dc6e9a45a3d",
|
||||
"typesPublisherContentHash": "de6360fcfb86983b5df792a9927bac4cb2eea5042e8ff0f4f4750574d157e866",
|
||||
"typeScriptVersion": "5.0"
|
||||
}
|
||||
Reference in New Issue
Block a user