Skip to content

Commit bccb787

Browse files
author
Shahak Yosef
committed
Merge remote-tracking branch 'powerbi/master' into release-2.13.2
2 parents 4c26578 + 3b28e94 commit bccb787

14 files changed

+315
-145
lines changed

.pipelines/pipeline.user.windows.yml

+16-7
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ artifact_publish_options:
1313
publish_to_pipeline_artifacts: true
1414
publish_to_cloudvault_artifacts: false
1515

16+
# Enable signing on all declared artifacts.
1617
signing_options:
1718
profile: 'external_distribution'
19+
codesign_validation_glob_pattern: 'regex|.+(?:exe|dll)$;-|*.nd.dll;-|.gdn\\**'
1820

1921
static_analysis_options:
2022
moderncop_options:
@@ -68,12 +70,13 @@ build:
6870
arguments: 'build.ps1'
6971
command: '.pipelines\cdpx_run_ps.cmd'
7072
artifacts:
71-
- from: 'dist'
72-
to: 'build_artifacts'
73+
- to: 'build_artifacts'
7374
include:
74-
- '**/*'
75-
exclude:
76-
- '**/node_modules/**/*.*'
75+
- 'dist/**/*'
76+
- 'LICENSE.txt'
77+
- 'package.json'
78+
- 'README.md'
79+
7780
- to: 'source'
7881
include:
7982
- '**/*'
@@ -85,12 +88,18 @@ build:
8588
- '**/dist/**/*.*'
8689
- '**/node_modules/**/*.*'
8790

91+
# All build stage artifacts get signed right after the build stage
92+
# because the global signing profile is defined.
93+
94+
package:
95+
commands:
8896
- !!buildcommand
8997
name: 'Package'
9098
arguments: 'package.ps1'
9199
command: '.pipelines\cdpx_run_ps.cmd'
92100
artifacts:
93-
- include:
101+
- to: 'tgz-package'
102+
include:
94103
- "**/*.tgz"
95104

96105
- !!buildcommand
@@ -100,7 +109,7 @@ build:
100109
artifacts:
101110
- to: 'Release'
102111
include:
103-
- "**/*.nupkg"
112+
- "**/Microsoft.PowerBI.JavaScript.*.nupkg"
104113

105114
test:
106115
commands:

.pipelines/version.ps1

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
try {
22
# package.json is in root folder, while version.ps1 runs in .pipelines folder.
33
$version = (Get-Content "package.json") -join "`n" | ConvertFrom-Json | Select -ExpandProperty "version"
4-
$revision = $env:CDP_DEFINITION_BUILD_COUNT_DAY
5-
$buildNumber = "$version.$revision"
4+
$buildNumber = "$version"
65

76
Write-Host "Build Number is" $buildNumber
87

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,10 @@ However, the library is exported as a Universal Module and the powerbi.js script
4949
When included directly, the library is exposed as a global named `powerbi-client`.
5050
There is also another global named `powerbi` which is an instance of the service.
5151

52+
## Contributing
5253

54+
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit <https://cla.opensource.microsoft.com>.
55+
56+
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
57+
58+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments

demo/code-demo/scripts/step_authorize.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
const SampleReport = {
2-
// Expires on 1.1.2030
3-
AccessToken : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXIiOiIwLjIuMCIsIndjbiI6IlBvd2VyQmlBenVyZVNhbXBsZXMiLCJ3aWQiOiJmODFjMTk2Ni1lZGVlLTQxMWItOGY4YS1mODQ0NjAxOWIwNDQiLCJyaWQiOiJjNTJhZjhhYi0wNDY4LTQxNjUtOTJhZi1kYzM5ODU4ZDY2YWQiLCJpc3MiOiJQb3dlckJJU0RLIiwiYXVkIjoiaHR0cHM6Ly9hbmFseXNpcy53aW5kb3dzLm5ldC9wb3dlcmJpL2FwaSIsImV4cCI6MTg5MzQ0ODgwMCwibmJmIjoxNDgxMDM3MTY5fQ.m4SwqmRWA9rJgfl72lEQ_G-Ijpw9Up5YwmBOfXi00YU",
2+
AccessToken : "",
43
EmbedUrl : "https://embedded.powerbi.com/appTokenReportEmbed?reportId=c52af8ab-0468-4165-92af-dc39858d66ad",
54
EmbedId : "c52af8ab-0468-4165-92af-dc39858d66ad"
65
};
76

87
const SampleDataset = {
9-
// Expires on 1.1.2030
10-
AccessToken : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXIiOiIwLjIuMCIsInR5cGUiOiJlbWJlZCIsIndjbiI6IlBvd2VyQmlBenVyZVNhbXBsZXMiLCJ3aWQiOiJmODFjMTk2Ni1lZGVlLTQxMWItOGY4YS1mODQ0NjAxOWIwNDQiLCJkaWQiOiIxZWUwYjI2NC1iMjgwLTQzZjEtYmJiNy05ZDhiZDJkMDNhNzgiLCJzY3AiOiJEYXRhc2V0LlJlYWQiLCJpc3MiOiJQb3dlckJJU0RLIiwiYXVkIjoiaHR0cHM6Ly9hbmFseXNpcy53aW5kb3dzLm5ldC9wb3dlcmJpL2FwaSIsImV4cCI6MTk2MTg1NDIzNiwibmJmIjoxNDg4NDY4NjM2fQ.Udv5Y6gMrTKUw0-5mXeCwud8u4JI5Y5loAwJc2jWugQ",
8+
AccessToken : "",
119
EmbedUrl : "https://embedded.powerbi.com/appTokenReportEmbed",
1210
EmbedId : "1ee0b264-b280-43f1-bbb7-9d8bd2d03a78"
1311
};

demo/v2-demo/sample.html

+1-20
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
<div id="playground-banner" onclick="openBannerLink();">
2-
<p id="playground-banner-text">Help us learn about your Power BI Embedded experience.&nbsp;</p><p id="playground-banner-text-underlined">Take our survey now!</p>
3-
<img id="playground-banner-close" src="images\close.png" onclick="closeBanner();"/>
4-
</div>
51
<div id="steps-nav-bar">
62
<div id="steps-ul-dev">
73
<ul id="steps-ul" class="steps-ul">
@@ -32,19 +28,4 @@ <h3>Welcome to the Power BI Embedded Playground</h3>
3228
</div>
3329

3430
<div id="mainContent">
35-
</div>
36-
37-
<script>
38-
var showBanner = true;
39-
function closeBanner() {
40-
showBanner = false;
41-
$("#playground-banner").hide();
42-
}
43-
44-
function openBannerLink() {
45-
if (!showBanner)
46-
return;
47-
48-
window.open("https://aka.ms/pbiesurvey_general", '_blank');
49-
}
50-
</script>
31+
</div>

demo/v2-demo/scripts/report.js

-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ function OpenSamplesStep() {
3030
$("#embed-and-interact-steps-wrapper").hide();
3131

3232
$("#welcome-text").show();
33-
34-
if (window.innerWidth > 540)
35-
$("#playground-banner").show();
3633

3734
trackEvent(TelemetryEventName.InnerSectionOpen, { section: TelemetryInnerSection.Sample, src: TelemetryEventSource.UserClick });
3835
}

demo/v2-demo/scripts/session_utils.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
const reportUrl = 'https://powerbiplaygroundbe.azurewebsites.net/api/Reports/SampleReport';
2-
const datasetUrl = 'https://powerbiplaygroundbe.azurewebsites.net/api/Reports/SampleCreate';
3-
const dashboardUrl = 'https://powerbiplaygroundbe.azurewebsites.net/api/Dashboards/SampleDashboard';
4-
const tileUrl = 'https://powerbiplaygroundbe.azurewebsites.net/api/Tiles/SampleTile';
5-
const qnaUrl = 'https://powerbiplaygroundbe.azurewebsites.net/api/Datasets/SampleQna';
6-
const paginatedReportUrl = 'https://powerbiplaygroundbe.azurewebsites.net/api/Reports/SampleRdlReport';
7-
const layoutShowcaseReportUrl = 'https://powerbiplaygroundbe.azurewebsites.net/api/Reports/LayoutDemoReport';
8-
const insightToActionShowcaseReportUrl = 'https://powerbiplaygroundbe.azurewebsites.net/api/Reports/InsightToActionReport';
9-
const themesShowcaseReportUrl = 'https://powerbiplaygroundbe.azurewebsites.net/api/Reports/ThemesReport';
10-
const quickVisualCreatorShowcaseReportUrl = 'https://powerbiplaygroundbe.azurewebsites.net/api/Reports/EmptyReport';
1+
const reportUrl = 'https://playgroundbe-bck-1.azurewebsites.net/Reports/SampleReport';
2+
const datasetUrl = 'https://playgroundbe-bck-1.azurewebsites.net/Reports/SampleCreate';
3+
const dashboardUrl = 'https://playgroundbe-bck-1.azurewebsites.net/Dashboards/SampleDashboard';
4+
const tileUrl = 'https://playgroundbe-bck-1.azurewebsites.net/Tiles/SampleTile';
5+
const qnaUrl = 'https://playgroundbe-bck-1.azurewebsites.net/Datasets/SampleQna';
6+
const paginatedReportUrl = 'https://playgroundbe-bck-1.azurewebsites.net/Reports/SampleRdlReport';
7+
const layoutShowcaseReportUrl = 'https://playgroundbe-bck-1.azurewebsites.net/Reports/LayoutDemoReport';
8+
const insightToActionShowcaseReportUrl = 'https://playgroundbe-bck-1.azurewebsites.net/Reports/InsightToActionReport';
9+
const themesShowcaseReportUrl = 'https://playgroundbe-bck-1.azurewebsites.net/Reports/ThemesReport';
10+
const quickVisualCreatorShowcaseReportUrl = 'https://playgroundbe-bck-1.azurewebsites.net/Reports/EmptyReport';
1111

1212
var LastReportSampleUrl = null;
1313
var ReportRefreshTokenTimer = 0;
@@ -194,21 +194,21 @@ function SetTextBoxesFromSessionOrUrlParam(accessTokenSelector, embedUrlSelector
194194

195195
function FetchUrlIntoSession(url, updateCurrentToken) {
196196
return $.getJSON(url, function (embedConfig) {
197-
setSession(embedConfig.embedToken.token, embedConfig.embedUrl, embedConfig.id, embedConfig.dashboardId);
198-
SetSession(SessionKeys.SampleId, embedConfig.id);
197+
setSession(embedConfig.EmbedToken.Token, embedConfig.EmbedUrl, embedConfig.Id, embedConfig.DashboardId);
198+
SetSession(SessionKeys.SampleId, embedConfig.Id);
199199

200200
if (updateCurrentToken)
201201
{
202-
let embedContainerId = getEmbedContainerID(capitalizeFirstLetter(embedConfig.type));
202+
let embedContainerId = getEmbedContainerID(capitalizeFirstLetter(embedConfig.Type));
203203

204204
let embedContainer = powerbi.embeds.filter(function(embedElement) { return embedElement.element.id === embedContainerId; })[0];
205205
if (embedContainer)
206206
{
207-
embedContainer.setAccessToken(embedConfig.embedToken.token);
207+
embedContainer.setAccessToken(embedConfig.EmbedToken.Token);
208208
}
209209
}
210210

211-
if (embedConfig.type === "report" || embedConfig.type === "visual")
211+
if (embedConfig.Type === "report" || embedConfig.Type === "visual")
212212
{
213213
// Set single visual embed sample details.
214214
SetSession(SessionKeys.PageName, "ReportSectioneb8c865100f8508cc533");
@@ -217,7 +217,7 @@ function FetchUrlIntoSession(url, updateCurrentToken) {
217217
LastReportSampleUrl = url;
218218
}
219219

220-
TokenExpirationRefreshListener(embedConfig.minutesToExpiration, capitalizeFirstLetter(embedConfig.type));
220+
TokenExpirationRefreshListener(embedConfig.MinutesToExpiration, capitalizeFirstLetter(embedConfig.Type));
221221
});
222222
}
223223

demo/v2-demo/style/style.css

-52
Original file line numberDiff line numberDiff line change
@@ -1863,55 +1863,3 @@ input:checked + .slider.round {
18631863
position: absolute;
18641864
font-size: 14px;
18651865
}
1866-
1867-
/* Playground Banner */
1868-
1869-
#playground-banner {
1870-
height: 48px;
1871-
text-align: center;
1872-
color: #000000;
1873-
background-color: #FBEEB5;
1874-
padding: 12px;
1875-
border-bottom: solid 1px #F1F1F1;
1876-
cursor: pointer;
1877-
}
1878-
1879-
#playground-banner:hover {
1880-
background-color: #F7DE6D;
1881-
}
1882-
1883-
#playground-banner-text, #playground-banner-text-underlined {
1884-
font-size: 16px;
1885-
font-weight: 400;
1886-
display: inline-block;
1887-
}
1888-
1889-
#playground-banner-text-underlined {
1890-
text-decoration: underline;
1891-
font-weight: 600;
1892-
}
1893-
1894-
#playground-banner-close {
1895-
float: right;
1896-
margin-top: 4px;
1897-
margin-right: 8px;
1898-
}
1899-
1900-
@media only screen and (max-width: 675px) {
1901-
#playground-banner-text-underlined {
1902-
display: none;
1903-
}
1904-
}
1905-
1906-
1907-
@media only screen and (max-width: 605px) {
1908-
#playground-banner-text {
1909-
font-size: 14px;
1910-
}
1911-
}
1912-
1913-
@media only screen and (max-width: 540px) {
1914-
#playground-banner {
1915-
display: none;
1916-
}
1917-
}

dist/powerbi-client.d.ts

+28-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! powerbi-client v2.12.2 | (c) 2016 Microsoft Corporation MIT */
1+
/*! powerbi-client v2.13.2 | (c) 2016 Microsoft Corporation MIT */
22
declare module "util" {
33
import { HttpPostMessage } from 'http-post-message';
44
/**
@@ -1166,6 +1166,33 @@ declare module "report" {
11661166
* ```
11671167
*/
11681168
resetTheme(): Promise<void>;
1169+
/**
1170+
* Reset user's filters, slicers, and other data view changes to the default state of the report
1171+
*
1172+
* ```javascript
1173+
* report.resetPersistentFilters();
1174+
* ```
1175+
*/
1176+
resetPersistentFilters(): Promise<void>;
1177+
/**
1178+
* Save user's filters, slicers, and other data view changes of the report
1179+
*
1180+
* ```javascript
1181+
* report.savePersistentFilters();
1182+
* ```
1183+
*/
1184+
savePersistentFilters(): Promise<void>;
1185+
/**
1186+
* Returns if there are user's filters, slicers, or other data view changes applied on the report.
1187+
* If persistent filters is disable, returns false.
1188+
*
1189+
* ```javascript
1190+
* report.arePersistentFiltersApplied();
1191+
* ```
1192+
*
1193+
* @returns {Promise<boolean>}
1194+
*/
1195+
arePersistentFiltersApplied(): Promise<boolean>;
11691196
/**
11701197
* @hidden
11711198
*/

0 commit comments

Comments
 (0)