From 4e4fb1df5babc346c30b16506f55445d323e5b96 Mon Sep 17 00:00:00 2001 From: Gennady Laventman Date: Mon, 22 Aug 2022 16:43:31 +0300 Subject: [PATCH 1/7] API 5.1.0 Creating API 5.1.0 Adding rowSubtotalsType to schema.capabilities.json for subtotals position API Adding RowSubtotalType enum index.d.ts for subtotals position API Signed-off-by: Gennady Laventman --- index.d.ts | 5 +++++ package-lock.json | 4 ++-- package.json | 2 +- schema.capabilities.json | 24 ++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 7add024..f82287a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1742,6 +1742,11 @@ declare module powerbi.extensibility.visual { /** Indicates whether the licenses info could be retrieved. */ isLicenseInfoAvailable: boolean; } + + export const enum RowSubtotalType { + Top = "Top", + Bottom = "Bottom", + } } export default powerbi; diff --git a/package-lock.json b/package-lock.json index b2a8c89..7cbfef5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "powerbi-visuals-api", - "version": "4.7.0", + "version": "5.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "powerbi-visuals-api", - "version": "4.7.0", + "version": "5.1.0", "license": "MIT", "dependencies": { "semver": "^7.3.5" diff --git a/package.json b/package.json index a61fea0..cb5fd07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "powerbi-visuals-api", - "version": "4.7.0", + "version": "5.1.0", "description": "Power BI Custom Visuals API type definitions for typescript", "types": "index", "main": "index.js", diff --git a/schema.capabilities.json b/schema.capabilities.json index 74e0f6b..84099a7 100644 --- a/schema.capabilities.json +++ b/schema.capabilities.json @@ -1415,6 +1415,30 @@ "type": "boolean" } } + }, + "rowSubtotalsType": { + "type": "object", + "description": "Indicates location of row subtotals locations (Top, Bottom). Top means subtotals located on top of DS and calculated even before all DS rows fetched, Bottom means subtotals located at the end of DS and shown only after all rows are fetched", + "properties": { + "propertyIdentifier": { + "type": "object", + "properties": { + "objectName": { + "type": "string" + }, + "propertyName": { + "type": "string" + } + } + }, + "defaultValue": { + "type": "string", + "enum": [ + "Top", + "Botton" + ] + } + } } }, "requires": [ From 44785d6b5815df9f2efd11116367b7b64d72c6c6 Mon Sep 17 00:00:00 2001 From: Roi-Hochler <95178231+Roi-Hochler@users.noreply.github.com> Date: Mon, 29 Aug 2022 09:02:40 +0300 Subject: [PATCH 2/7] Adding migration section --- schema.capabilities.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/schema.capabilities.json b/schema.capabilities.json index 84099a7..29fb77a 100644 --- a/schema.capabilities.json +++ b/schema.capabilities.json @@ -72,6 +72,9 @@ "subtotals": { "description": "Specifies the subtotal customizations applied in the customizeQuery method", "$ref": "#/definitions/subtotals" + }, + "migration": { + "$ref": "#/definitions/migration" } }, "required": [ @@ -1444,6 +1447,25 @@ "requires": [ "matrix" ] + }, + "migration": { + "type": "object", + "description": "Defines the supported APIs for migration", + "properties": { + "filter": { + "$ref": "#/definitions/migration.filter" + } + } + }, + "migration.filter": { + "type": "object", + "description": "Defines the capabilities for migrating the filter API", + "properties": { + "shouldUseIdentityFilter": { + "type": "boolean", + "description": "Indicates whether the new filter should be identity filter" + } + } } } } From 447fbecb541a55d7a70b6047b4e41115b2b01a82 Mon Sep 17 00:00:00 2001 From: anitamayorov <80410523+anitamayorov@users.noreply.github.com> Date: Mon, 29 Aug 2022 09:26:23 +0300 Subject: [PATCH 3/7] Update schema.capabilities.json adding keepAllMetadataColumns flag to receive all metadata no matter what the active projections are (expand\collapse) --- schema.capabilities.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/schema.capabilities.json b/schema.capabilities.json index 29fb77a..68464c8 100644 --- a/schema.capabilities.json +++ b/schema.capabilities.json @@ -75,7 +75,11 @@ }, "migration": { "$ref": "#/definitions/migration" - } + }, + "keepAllMetadataColumns": { + "type": "boolean", + "description": "Indicates that visual is going to receive all metadata columns, no matter what the active projections are" + }, }, "required": [ "privileges" From f70d0d649c7700d8b324a31dd2e0b320e538d487 Mon Sep 17 00:00:00 2001 From: anitamayorov <80410523+anitamayorov@users.noreply.github.com> Date: Mon, 29 Aug 2022 10:58:58 +0300 Subject: [PATCH 4/7] Update schema.capabilities.json comment --- schema.capabilities.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema.capabilities.json b/schema.capabilities.json index 68464c8..9cf6da6 100644 --- a/schema.capabilities.json +++ b/schema.capabilities.json @@ -79,7 +79,7 @@ "keepAllMetadataColumns": { "type": "boolean", "description": "Indicates that visual is going to receive all metadata columns, no matter what the active projections are" - }, + } }, "required": [ "privileges" From 384c99822f3251178a68b58f7881087cf80d586a Mon Sep 17 00:00:00 2001 From: Gennady Laventman Date: Mon, 29 Aug 2022 12:13:26 +0300 Subject: [PATCH 5/7] API 5.1.0 - subtotals Fixed typos Signed-off-by: Gennady Laventman --- index.d.ts | 10 +++++----- schema.capabilities.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/index.d.ts b/index.d.ts index f82287a..3501fdf 100644 --- a/index.d.ts +++ b/index.d.ts @@ -138,6 +138,11 @@ declare namespace powerbi { /** Grouping becomes the next level in the hierarchy exclusively. Current level grouping is dropped. */ MoveToNextlevel = 3, } + + export const enum RowSubtotalType { + Top = "Top", + Bottom = "Bottom", + } } @@ -1742,11 +1747,6 @@ declare module powerbi.extensibility.visual { /** Indicates whether the licenses info could be retrieved. */ isLicenseInfoAvailable: boolean; } - - export const enum RowSubtotalType { - Top = "Top", - Bottom = "Bottom", - } } export default powerbi; diff --git a/schema.capabilities.json b/schema.capabilities.json index 9cf6da6..fa05b7a 100644 --- a/schema.capabilities.json +++ b/schema.capabilities.json @@ -1442,7 +1442,7 @@ "type": "string", "enum": [ "Top", - "Botton" + "Bottom" ] } } From b596b2627b9f4c6b3cd55114feb0a318d5e4b384 Mon Sep 17 00:00:00 2001 From: dbrailov <57748147+dbrailov@users.noreply.github.com> Date: Sun, 4 Sep 2022 13:53:17 +0300 Subject: [PATCH 6/7] Enable multiple sorting options https://dev.azure.com/powerbi/Power%20BI/_workitems/edit/341430 --- schema.capabilities.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema.capabilities.json b/schema.capabilities.json index fa05b7a..925b458 100644 --- a/schema.capabilities.json +++ b/schema.capabilities.json @@ -895,7 +895,7 @@ } }, "additionalProperties": false, - "oneOf": [ + "anyOf": [ { "required": [ "default" From 302e4db8ef1316f4823ab3f5f1f489e6e16bdbea Mon Sep 17 00:00:00 2001 From: dbrailov <57748147+dbrailov@users.noreply.github.com> Date: Sun, 4 Sep 2022 14:03:18 +0300 Subject: [PATCH 7/7] Added ApplyCustomSort API --- index.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.d.ts b/index.d.ts index 3501fdf..85ccc89 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1681,6 +1681,7 @@ declare module powerbi.extensibility.visual { licenseManager: IVisualLicenseManager; webAccessService: IWebAccessService; drill: (args: DrillArgs) => void; + applyCustomSort: (args: CustomVisualApplyCustomSortArgs) => void; } export interface VisualUpdateOptions extends extensibility.VisualUpdateOptions { @@ -1747,6 +1748,15 @@ declare module powerbi.extensibility.visual { /** Indicates whether the licenses info could be retrieved. */ isLicenseInfoAvailable: boolean; } + + export interface CustomVisualApplyCustomSortArgs { + sortDescriptors: CustomVisualSortableFieldDescriptor[]; + } + + export interface CustomVisualSortableFieldDescriptor { + queryName: string; + sortDirection: SortDirection; + } } export default powerbi;