Skip to content
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
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ The build and tests use webpack to compile all the source modules into one bundl
## Running the demo
Navigate to `/demo` directory

Install npm dependencies:
```
npm install
```

Serve the demo directory:
```
npm start
Expand Down
21 changes: 20 additions & 1 deletion demo/v2-demo/sample.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<div id="playground-banner" onclick="openBannerLink();">
<p id="playground-banner-text">Influence the future of Power BI Embedded by joining our research panel.&nbsp;</p><p id="playground-banner-text-underlined">Sign up now!</p>
<img id="playground-banner-close" src="images\close.png" onclick="closeBanner();"/>
</div>
<div id="steps-nav-bar">
<div id="steps-ul-dev">
<ul id="steps-ul" class="steps-ul">
Expand Down Expand Up @@ -28,4 +32,19 @@ <h3>Welcome to the Power BI Embedded Playground</h3>
</div>

<div id="mainContent">
</div>
</div>

<script>
var showBanner = true;
function closeBanner() {
showBanner = false;
$("#playground-banner").hide();
}

function openBannerLink() {
if (!showBanner)
return;

window.open("https://www.usertesting.com/panels/7wZ4nzGa/join?RID=Playground", '_blank');
}
</script>
1 change: 1 addition & 0 deletions demo/v2-demo/scripts/codesamples.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ function _Embed_BasicEmbed_Mobile() {
permissions: permissions,
pageName: "ReportSectioneb8c865100f8508cc533",
settings: {
filterPaneEnabled: false,
layoutType: models.LayoutType.MobilePortrait
}
};
Expand Down
4 changes: 4 additions & 0 deletions demo/v2-demo/scripts/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ function OpenSamplesStep() {
$("#embed-and-interact-steps-wrapper").hide();

$("#welcome-text").show();

if (window.innerWidth > 540)
$("#playground-banner").show();

trackEvent(TelemetryEventName.InnerSectionOpen, { section: TelemetryInnerSection.Sample, src: TelemetryEventSource.UserClick });
}
Expand All @@ -55,6 +58,7 @@ function OpenCodeStep(mode, entityType, tokenType) {
$("#embed-and-interact-steps-wrapper").show();

$("#welcome-text").hide();
$("#playground-banner").hide();

$("#highlighter").empty();

Expand Down
50 changes: 50 additions & 0 deletions demo/v2-demo/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1862,4 +1862,54 @@ input:checked + .slider.round {
right: calc(50% - 60px);
position: absolute;
font-size: 14px;
}

/* Playground Banner */

#playground-banner {
height: 48px;
text-align: center;
background-color: #F2C811;
padding: 12px;
border-bottom: solid 1px #F1F1F1;
cursor: pointer;
}

#playground-banner:hover {
background-color: #ddb612;
}

#playground-banner-text, #playground-banner-text-underlined {
font-size: 16px;
font-weight: 600;
display: inline-block;
}

#playground-banner-text-underlined {
text-decoration: underline;
}

#playground-banner-close {
float: right;
margin-top: 4px;
margin-right: 8px;
}

@media only screen and (max-width: 675px) {
#playground-banner-text-underlined {
display: none;
}
}


@media only screen and (max-width: 605px) {
#playground-banner-text {
font-size: 14px;
}
}

@media only screen and (max-width: 540px) {
#playground-banner {
display: none;
}
}
21 changes: 15 additions & 6 deletions dist/powerbi-client.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! powerbi-client v2.10.3 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-client v2.10.4 | (c) 2016 Microsoft Corporation MIT */
declare module "util" {
import { HttpPostMessage } from 'http-post-message';
/**
Expand Down Expand Up @@ -77,10 +77,18 @@ declare module "util" {
* Checks if the embed url is for RDL report.
*
* @export
* @param {string} embedUrl
* @returns {boolean}
* @param {string} embedUrl
* @returns {boolean}
*/
export function isRDLEmbed(embedUrl: string): boolean;
/**
* Checks if the embed url contains autoAuth=true.
*
* @export
* @param {string} embedUrl
* @returns {boolean}
*/
export function autoAuthInEmbedUrl(embedUrl: string): boolean;
/**
* Returns random number
*/
Expand All @@ -100,6 +108,10 @@ declare module "defaults" {
static defaultQnaSettings: models.IQnaSettings;
}
}
declare module "errors" {
export let APINotSupportedForRDLError: string;
export let EmbedUrlNotSupported: string;
}
declare module "embed" {
import * as service from "service";
import * as models from 'powerbi-models';
Expand Down Expand Up @@ -495,9 +507,6 @@ declare module "embed" {
private frontLoadSendConfig(config);
}
}
declare module "errors" {
export let APINotSupportedForRDLError: string;
}
declare module "ifilterable" {
import * as models from 'powerbi-models';
/**
Expand Down
Loading