Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/dbrailovsky/5.7.0 #81

Merged
merged 4 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Change Log - Power BI Custom Visuals API
## 5.6.0
* Adds the `storageV2` service.
* Adds the `acquireAADToken` service.
## 5.7.0
* `acquireAADTokenService` : Enables visuals to obtain Microsoft Entra ID (formerly known as Azure AD) access tokens for signed-in users.
* Dynamic drill control : Adds new API and capability to dynamically control the drill and expand collapse features.

## 5.4.0
* Adds `isDataFilterApplied` into DataViewMetadata, to provide a boolean value of whether any applied filter affects the visual.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "powerbi-visuals-api",
"version": "5.6.1",
"version": "5.7.0",
"description": "Power BI Custom Visuals API type definitions for typescript",
"types": "index",
"main": "index.js",
Expand Down
13 changes: 13 additions & 0 deletions schema.capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,19 @@
"type": "string",
"description": "The name of the role"
}
},
"canDisableDrill": {
"$ref": "#/definitions/drilldown.canDisableDrill"
}
}
},
"drilldown.canDisableDrill": {
"type": "object",
"description": "Indicates whether the visual can dynamically control drill",
"properties": {
"disabledByDefault": {
"type": "boolean",
"description": "Indicates whether the drill should be disabled by default"
}
}
},
Expand Down
49 changes: 4 additions & 45 deletions src/visuals-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@ declare module powerbi {

export interface DataRolesInfo {
drillableRoles?: powerbi.DrillableRoles;

/** Indicates whether the drill is disabled */
isDrillDisabled?: boolean;
}

export interface DataViewMetadataColumn {
Expand Down Expand Up @@ -1617,50 +1620,6 @@ declare module powerbi.extensibility {
}
}

declare module powerbi.extensibility {

interface StorageV2ResultInfo {
success: boolean;
}

/**
* Provides an access to local storage for read / write access
*/
interface IVisualLocalStorageV2Service {
/**
* Returns the availability status of the service.
*
* @returns the promise that resolves to privilege status of the service
*/
status(): IPromise<PrivilegeStatus>;

/**
* Returns promise that resolves to the data associated with 'key' if it was found or rejects otherwise.
*
* @param key - the name of the payload to retrieve
* @returns the promise that resolves to the data required or rejects if it wasn't found or an error occured.
*/
get(key: string): IPromise<string>;

/**
* Saves the data to local storage. This data can be later be retrieved using the 'key'.
* Returns a promise that resolves to StorageV2ResultInfo, or rejects if an error occured.
*
* @param key - the name of the payload to store
* @param data - the payload string to store
* @returns the promise resolves to StorageV2ResultInfo, or rejects if an error occured.
*/
set(key: string, data: string): IPromise<StorageV2ResultInfo>;

/**
* Deletes data associated with 'key' from local storage.
*
* @param key - the name of the payload to remove
*/
remove(key: string): void;
}
}

declare module powerbi.extensibility {
/**
* An interface for reporting rendering events
Expand Down Expand Up @@ -1797,8 +1756,8 @@ declare module powerbi.extensibility.visual {
webAccessService: IWebAccessService;
drill: (args: DrillArgs) => void;
applyCustomSort: (args: CustomVisualApplyCustomSortArgs) => void;
storageV2Service: IVisualLocalStorageV2Service;
acquireAADTokenService: IAcquireAADTokenService;
setCanDrill: (drillAllowed: boolean) => void;
}

export interface VisualUpdateOptions extends extensibility.VisualUpdateOptions {
Expand Down