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
16 changes: 16 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Microsoft.PowerBI.JavaScript

THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
Do Not Translate or Localize

This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise.

1. SyntaxHighlighter (https://github.com/syntaxhighlighter/syntaxhighlighter)

Copyright (c) 2004-2013, Alex Gorbatchev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13 changes: 13 additions & 0 deletions demo/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Microsoft.PowerBI.JavaScript

Copyright (c) Microsoft Corporation

All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16 changes: 16 additions & 0 deletions demo/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Microsoft.PowerBI.JavaScript

THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
Do Not Translate or Localize

This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise.

1. SyntaxHighlighter (https://github.com/syntaxhighlighter/syntaxhighlighter)

Copyright (c) 2004-2013, Alex Gorbatchev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 changes: 5 additions & 3 deletions demo/code-demo/code_area.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
<div class="editorTitle">Code</div>
<div class="textAreaControls">
<button id="btnRunCode" class="textAreaControl">
<img src="images\run.png"/> Run
<img src="images\run.png" /> Run
</button>
<button id="btnCopyCode" class="textAreaControl" onclick="CopyCode();">
<img src="images\copy.png"/> Copy
<img src="images\copy.png" /> Copy
</button>
</div>
<textarea id="txtCode" readonly />

<div id="highlighter">
</div>
5 changes: 4 additions & 1 deletion demo/code-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="syntaxhighlighter/theme.css">
<link rel="stylesheet" type="text/css" href="style/style.css">
<link rel="stylesheet" type="text/css" href="style/layout.css">
<link rel="stylesheet" type="text/css" href="style/syntaxHighlighterOverride.css">

</head>

<body>
Expand Down Expand Up @@ -48,7 +51,7 @@
<script src="../node_modules/jquery/dist/jquery.js"></script>
<script src="../node_modules/es6-promise/dist/es6-promise.js"></script>
<script src="../node_modules/powerbi-client/dist/powerbi.js"></script>

<script src="scripts/codesamples.js"></script>

<script src="scripts/index.js"></script>
Expand Down
4 changes: 3 additions & 1 deletion demo/code-demo/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ function LoadLogWindow(divSelector) {
}

function SetCode(func) {
$("#txtCode").val(BodyCodeOfFunction(func));
var codeHtml = '<pre id="txtCode" class="brush: js; gutter: false;">';
codeHtml = codeHtml + BodyCodeOfFunction(func) + '</pre><script type="text/javascript" src="syntaxhighlighter/syntaxhighlighter.js"></script>';
$("#highlighter").html(codeHtml);

var runFunc = mapFunc(func);

Expand Down
2 changes: 1 addition & 1 deletion demo/code-demo/step_authorize.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<div id="authStepDiv">
<div id="sampleReport" class="line">
<div id="sampleReport" class="pbi-line">
<div class="pageTitle">
<h3>Sample Report</h3>
<h8>You can embed a sample report and interact with Power BI Embedded firsthand by clicking below.</h8>
Expand Down
8 changes: 5 additions & 3 deletions demo/code-demo/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ a {
width: 100%;
}

.line {
.pbi-line {
display: inline-block;
width: 100%;
}
Expand Down Expand Up @@ -509,10 +509,12 @@ a {
width: 100%;
height: 300px;
border: none;
padding-top: 40px;
padding: 20px;
position: relative;
top: -30px;
padding-left: 20px;
background: #FFFFFF;
overflow: auto;
white-space: pre-wrap;
}

#GoToEmbedStepButton {
Expand Down
10 changes: 10 additions & 0 deletions demo/code-demo/style/syntaxHighlighterOverride.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.syntaxhighlighter {
overflow: hidden !important;
margin: 0em !important;
padding: 0em !important;
top: -98px !important;
}

.syntaxhighlighter .line {
white-space: pre-wrap !important;
}
Loading