From e64c46abc4d31deffb5e52a86634df54471490a4 Mon Sep 17 00:00:00 2001 From: Alex Jerabek <38896772+AlexJerabek@users.noreply.github.com> Date: Wed, 31 Jul 2019 10:58:52 -0700 Subject: [PATCH] [office-js-preview] Updating Excel preview (#37249) * Updating Excel preview * Fixing load options --- types/office-js-preview/index.d.ts | 285 ++++++++++++++++++++++++----- 1 file changed, 238 insertions(+), 47 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 637037bf81..21cbe01f92 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -18628,7 +18628,7 @@ declare namespace Excel { address: string; /** * - * Gets the change type that represents how the Changed event is triggered. See Excel.RowHiddenChangeType for details. + * Gets the change type that represents how the RowHiddenChanged event is triggered. See Excel.RowHiddenChangeType for details. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -18961,7 +18961,7 @@ declare namespace Excel { address: string; /** * - * The distance, in points, from the left-clicked/tapped point to the left (right for RTL) gridline edge of the left-clicked/tapped cell. + * The distance, in points, from the left-clicked/tapped point to the left (or right for RTL) gridline edge of the left-clicked/tapped cell. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -20463,6 +20463,21 @@ declare namespace Excel { * @returns The number of replacements performed. */ replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria): OfficeExtension.ClientResult; + /** + * + * Shows row or column groups by their outline levels. + Outlines group and summarize a list of data in the worksheet. + The `rowLevels` and `columnLevels` parameters specify how many levels of the outline will be displayed. + The acceptable argument range is between 0 and 8. + A value of 0 does not change the current display. A value greater than the current number of levels displays all the levels. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param rowLevels The number of row levels of an outline to display. + * @param columnLevels The number of column levels of an outline to display. + */ + showOutlineLevels(rowLevels: number, columnLevels: number): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -20580,7 +20595,9 @@ declare namespace Excel { readonly onSelectionChanged: OfficeExtension.EventHandlers; /** * - * Occurs when left-clicked/tapped operation happens in the worksheet. + * Occurs when left-clicked/tapped operation happens in the worksheet. This event will not be fired when clicking in the following cases: + - The user drags the mouse for multi-selection. + - The user selects a cell in the mode when cell arguments are selected for formula references. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @@ -20825,7 +20842,9 @@ declare namespace Excel { readonly onSelectionChanged: OfficeExtension.EventHandlers; /** * - * Occurs when left-clicked/tapped operation happens in the worksheet collection. + * Occurs when left-clicked/tapped operation happens in the worksheet collection. This event will not be fired when clicking in the following cases: + - The user drags the mouse for multi-selection. + - The user selects a cell in the mode when cell arguments are selected for formula references. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @@ -21812,6 +21831,50 @@ declare namespace Excel { * [Api set: ExcelApi 1.3] */ getVisibleView(): Excel.RangeView; + /** + * + * Groups columns and rows for an outline. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param groupOption Specifies how the range can be grouped by rows or columns. + An `InvalidArgument` error is thrown when the group option differs from the range's + `isEntireRow` or `isEntireColumn` property (i.e., `range.isEntireRow` is true and `groupOption` is "ByColumns" + or `range.isEntireColumn` is true and `groupOption` is "ByRows"). + */ + group(groupOption: Excel.GroupOption): void; + /** + * + * Groups columns and rows for an outline. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param groupOption Specifies how the range can be grouped by rows or columns. + An `InvalidArgument` error is thrown when the group option differs from the range's + `isEntireRow` or `isEntireColumn` property (i.e., `range.isEntireRow` is true and `groupOption` is "ByColumns" + or `range.isEntireColumn` is true and `groupOption` is "ByRows"). + */ + group(groupOption: "ByRows" | "ByColumns"): void; + /** + * + * Hide details of the row or column group. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param groupOption Specifies whether to hide details of grouped rows or grouped columns. + */ + hideGroupDetails(groupOption: Excel.GroupOption): void; + /** + * + * Hide details of the row or column group. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param groupOption Specifies whether to hide details of grouped rows or grouped columns. + */ + hideGroupDetails(groupOption: "ByRows" | "ByColumns"): void; /** * * Inserts a cell or a range of cells into the worksheet in place of this range, and shifts the other cells to make space. Returns a new Range object at the now blank space. @@ -21910,6 +21973,44 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ showCard(): void; + /** + * + * Show details of the row or column group. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param groupOption Specifies whether to show details of grouped rows or grouped columns. + */ + showGroupDetails(groupOption: Excel.GroupOption): void; + /** + * + * Show details of the row or column group. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param groupOption Specifies whether to show details of grouped rows or grouped columns. + */ + showGroupDetails(groupOption: "ByRows" | "ByColumns"): void; + /** + * + * Ungroups columns and rows for an outline. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param groupOption Specifies how the range can be ungrouped by rows or columns. + */ + ungroup(groupOption: Excel.GroupOption): void; + /** + * + * Ungroups columns and rows for an outline. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param groupOption Specifies how the range can be ungrouped by rows or columns. + */ + ungroup(groupOption: "ByRows" | "ByColumns"): void; /** * * Unmerge the range cells into separate cells. @@ -31292,7 +31393,7 @@ declare namespace Excel { } /** * - * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * Represents a collection of all the PivotHierarchies that are part of the PivotTable. * * [Api set: ExcelApi 1.8] */ @@ -31314,7 +31415,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.8] * - * @param name Name of the PivotTable to be retrieved. + * @param name Name of the PivotHierarchy to be retrieved. */ getItem(name: string): Excel.PivotHierarchy; /** @@ -31453,7 +31554,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.8] * - * @param name Name of the PivotTable to be retrieved. + * @param name Name of the RowColumnPivotHierarchy to be retrieved. */ getItem(name: string): Excel.RowColumnPivotHierarchy; /** @@ -31613,7 +31714,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.8] * - * @param name Name of the PivotTable to be retrieved. + * @param name Name of the FilterPivotHierarchy to be retrieved. */ getItem(name: string): Excel.FilterPivotHierarchy; /** @@ -31779,7 +31880,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.8] * - * @param name Name of the PivotTable to be retrieved. + * @param name Name of the DataPivotHierarchy to be retrieved. */ getItem(name: string): Excel.DataPivotHierarchy; /** @@ -31956,7 +32057,7 @@ declare namespace Excel { } /** * - * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * Represents a collection of all the PivotFields that are part of a PivotTable's hierarchy. * * [Api set: ExcelApi 1.8] */ @@ -31967,27 +32068,27 @@ declare namespace Excel { readonly items: Excel.PivotField[]; /** * - * Gets the number of pivot hierarchies in the collection. + * Gets the number of pivot fields in the collection. * * [Api set: ExcelApi 1.8] */ getCount(): OfficeExtension.ClientResult; /** * - * Gets a PivotHierarchy by its name or id. + * Gets a PivotField by its name or id. * * [Api set: ExcelApi 1.8] * - * @param name Name of the PivotTable to be retrieved. + * @param name Name of the PivotField to be retrieved. */ getItem(name: string): Excel.PivotField; /** * - * Gets a PivotHierarchy by name. If the PivotHierarchy does not exist, will return a null object. + * Gets a PivotField by name. If the PivotField does not exist, will return a null object. * * [Api set: ExcelApi 1.8] * - * @param name Name of the PivotHierarchy to be retrieved. + * @param name Name of the PivotField to be retrieved. */ getItemOrNullObject(name: string): Excel.PivotField; /** @@ -32140,7 +32241,7 @@ declare namespace Excel { } /** * - * Represents a collection of all the Pivot Items related to their parent PivotField. + * Represents a collection of all the PivotItems related to their parent PivotField. * * [Api set: ExcelApi 1.8] */ @@ -32151,27 +32252,27 @@ declare namespace Excel { readonly items: Excel.PivotItem[]; /** * - * Gets the number of pivot hierarchies in the collection. + * Gets the number of PivotItems in the collection. * * [Api set: ExcelApi 1.8] */ getCount(): OfficeExtension.ClientResult; /** * - * Gets a PivotHierarchy by its name or id. + * Gets a PivotItem by its name or id. * * [Api set: ExcelApi 1.8] * - * @param name Name of the PivotTable to be retrieved. + * @param name Name of the PivotItem to be retrieved. */ getItem(name: string): Excel.PivotItem; /** * - * Gets a PivotHierarchy by name. If the PivotHierarchy does not exist, will return a null object. + * Gets a PivotItem by name. If the PivotItem does not exist, will return a null object. * * [Api set: ExcelApi 1.8] * - * @param name Name of the PivotHierarchy to be retrieved. + * @param name Name of the PivotItem to be retrieved. */ getItemOrNullObject(name: string): Excel.PivotItem; /** @@ -34974,7 +35075,7 @@ declare namespace Excel { name: string; /** * - * Specifies if this TableStyle object is read-only. Read-only. + * Specifies whether this TableStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -35155,7 +35256,7 @@ declare namespace Excel { name: string; /** * - * Specifies if this PivotTableStyle object is read-only. Read-only. + * Specifies whether this PivotTableStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -35336,7 +35437,7 @@ declare namespace Excel { name: string; /** * - * Specifies if this SlicerStyle object is read-only. Read-only. + * Specifies whether this SlicerStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -35517,7 +35618,7 @@ declare namespace Excel { name: string; /** * - * Specifies if this TimelineStyle object is read-only. Read-only. + * Specifies whether this TimelineStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -36391,7 +36492,7 @@ declare namespace Excel { getItemAt(index: number): Excel.Comment; /** * - * Gets the comment from the specified cell. + * Gets the comment from the specifed cell. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -36491,6 +36592,14 @@ declare namespace Excel { * @beta */ readonly id: string; + /** + * + * Gets or sets the comment thread status. A value of "true" means the comment thread is in the resolved state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + resolved: boolean; /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * * @remarks @@ -36684,6 +36793,14 @@ declare namespace Excel { * @beta */ readonly id: string; + /** + * + * Gets or sets the comment reply status. A value of "true" means the comment reply is in the resolved state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly resolved: boolean; /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * * @remarks @@ -40772,6 +40889,24 @@ declare namespace Excel { growthTrend = "GrowthTrend", flashFill = "FlashFill" } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum GroupOption { + /** + * + * Group by rows. + * + */ + byRows = "ByRows", + /** + * + * Group by columns. + * + */ + byColumns = "ByColumns" + } /** * [Api set: ExcelApi 1.9] */ @@ -49346,6 +49481,14 @@ declare namespace Excel { * @beta */ content?: string; + /** + * + * Gets or sets the comment thread status. A value of "true" means the comment thread is in the resolved state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + resolved?: boolean; } /** An interface for updating data on the CommentReplyCollection object, for use in "commentReplyCollection.set({ ... })". */ interface CommentReplyCollectionUpdateData { @@ -50484,8 +50627,8 @@ declare namespace Excel { /** * * Represents if ALL the cells would be saved as an array formula. - Returns true if ALL cells would be saved as an array, or false if ALL cells would NOT be saved as an array formula. - Returns null if there is a mixture of cells that would and would not be saved as an array formula. + * Returns true if ALL cells would be saved as an array, or false if ALL cells would NOT be saved as an array formula. + * Returns null if there is a mixture of cells that would and would not be saved as an array formula. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -54781,7 +54924,7 @@ declare namespace Excel { name?: string; /** * - * Specifies if this TableStyle object is read-only. Read-only. + * Specifies whether this TableStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -54804,7 +54947,7 @@ declare namespace Excel { name?: string; /** * - * Specifies if this PivotTableStyle object is read-only. Read-only. + * Specifies whether this PivotTableStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -54827,7 +54970,7 @@ declare namespace Excel { name?: string; /** * - * Specifies if this SlicerStyle object is read-only. Read-only. + * Specifies whether this SlicerStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -54850,7 +54993,7 @@ declare namespace Excel { name?: string; /** * - * Specifies if this TimelineStyle object is read-only. Read-only. + * Specifies whether this TimelineStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -55182,6 +55325,14 @@ declare namespace Excel { * @beta */ id?: string; + /** + * + * Gets or sets the comment thread status. A value of "true" means the comment thread is in the resolved state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + resolved?: boolean; } /** An interface describing the data returned by calling "commentReplyCollection.toJSON()". */ interface CommentReplyCollectionData { @@ -55229,6 +55380,14 @@ declare namespace Excel { * @beta */ id?: string; + /** + * + * Gets or sets the comment reply status. A value of "true" means the comment reply is in the resolved state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + resolved?: boolean; } /** An interface describing the data returned by calling "shapeCollection.toJSON()". */ interface ShapeCollectionData { @@ -56572,8 +56731,8 @@ declare namespace Excel { /** * * Represents if ALL the cells would be saved as an array formula. - Returns true if ALL cells would be saved as an array, or false if ALL cells would NOT be saved as an array formula. - Returns null if there is a mixture of cells that would and would not be saved as an array formula. + * Returns true if ALL cells would be saved as an array, or false if ALL cells would NOT be saved as an array formula. + * Returns null if there is a mixture of cells that would and would not be saved as an array formula. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -61458,7 +61617,7 @@ declare namespace Excel { } /** * - * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * Represents a collection of all the PivotHierarchies that are part of the PivotTable. * * [Api set: ExcelApi 1.8] */ @@ -61754,7 +61913,7 @@ declare namespace Excel { } /** * - * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * Represents a collection of all the PivotFields that are part of a PivotTable's hierarchy. * * [Api set: ExcelApi 1.8] */ @@ -61828,7 +61987,7 @@ declare namespace Excel { } /** * - * Represents a collection of all the Pivot Items related to their parent PivotField. + * Represents a collection of all the PivotItems related to their parent PivotField. * * [Api set: ExcelApi 1.8] */ @@ -63222,7 +63381,7 @@ declare namespace Excel { name?: boolean; /** * - * For EACH ITEM in the collection: Specifies if this TableStyle object is read-only. Read-only. + * For EACH ITEM in the collection: Specifies whether this TableStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -63248,7 +63407,7 @@ declare namespace Excel { name?: boolean; /** * - * Specifies if this TableStyle object is read-only. Read-only. + * Specifies whether this TableStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -63274,7 +63433,7 @@ declare namespace Excel { name?: boolean; /** * - * For EACH ITEM in the collection: Specifies if this PivotTableStyle object is read-only. Read-only. + * For EACH ITEM in the collection: Specifies whether this PivotTableStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -63300,7 +63459,7 @@ declare namespace Excel { name?: boolean; /** * - * Specifies if this PivotTableStyle object is read-only. Read-only. + * Specifies whether this PivotTableStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -63326,7 +63485,7 @@ declare namespace Excel { name?: boolean; /** * - * For EACH ITEM in the collection: Specifies if this SlicerStyle object is read-only. Read-only. + * For EACH ITEM in the collection: Specifies whether this SlicerStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -63352,7 +63511,7 @@ declare namespace Excel { name?: boolean; /** * - * Specifies if this SlicerStyle object is read-only. Read-only. + * Specifies whether this SlicerStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -63378,7 +63537,7 @@ declare namespace Excel { name?: boolean; /** * - * For EACH ITEM in the collection: Specifies if this TimelineStyle object is read-only. Read-only. + * For EACH ITEM in the collection: Specifies whether this TimelineStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -63404,7 +63563,7 @@ declare namespace Excel { name?: boolean; /** * - * Specifies if this TimelineStyle object is read-only. Read-only. + * Specifies whether this TimelineStyle object is read-only. Read-only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -63899,8 +64058,8 @@ declare namespace Excel { /** * * For EACH ITEM in the collection: Represents if ALL the cells would be saved as an array formula. - Returns true if ALL cells would be saved as an array, or false if ALL cells would NOT be saved as an array formula. - Returns null if there is a mixture of cells that would and would not be saved as an array formula. + * Returns true if ALL cells would be saved as an array, or false if ALL cells would NOT be saved as an array formula. + * Returns null if there is a mixture of cells that would and would not be saved as an array formula. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -64003,6 +64162,14 @@ declare namespace Excel { * @beta */ id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the comment thread status. A value of "true" means the comment thread is in the resolved state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + resolved?: boolean; } /** * @@ -64053,6 +64220,14 @@ declare namespace Excel { * @beta */ id?: boolean; + /** + * + * Gets or sets the comment thread status. A value of "true" means the comment thread is in the resolved state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + resolved?: boolean; } /** * @@ -64103,6 +64278,14 @@ declare namespace Excel { * @beta */ id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the comment reply status. A value of "true" means the comment reply is in the resolved state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + resolved?: boolean; } /** * @@ -64153,6 +64336,14 @@ declare namespace Excel { * @beta */ id?: boolean; + /** + * + * Gets or sets the comment reply status. A value of "true" means the comment reply is in the resolved state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + resolved?: boolean; } /** *