Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf56df24

Browse files
authored
Merge pull request#375 from microsoft/version_2.18.0
Version 2.18.0
2 parentsdf40b4e +a238e96 commitf56df24

28 files changed

+716
-176
lines changed

‎dist/powerbi-client.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
/*! powerbi-client v2.17.2 | (c) 2016 Microsoft Corporation MIT */
1+
// powerbi-client v2.18.0
2+
// Copyright (c) Microsoft Corporation.
3+
// Licensed under the MIT License.
24
declare module"util"{
35
import{HttpPostMessage}from'http-post-message';
46
/**

‎dist/powerbi.js

Lines changed: 504 additions & 46 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎dist/powerbi.min.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎gulpfile.js

Lines changed: 129 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,41 @@
1-
vargulp=require('gulp');
2-
varghPages=require('gulp-gh-pages'),
3-
header=require('gulp-header'),
4-
help=require('gulp-help-four'),
5-
rename=require('gulp-rename'),
6-
replace=require('gulp-replace'),
7-
eslint=require("gulp-eslint"),
8-
ts=require('gulp-typescript'),
9-
flatten=require('gulp-flatten'),
10-
fs=require('fs'),
11-
del=require('del'),
12-
moment=require('moment'),
13-
karma=require('karma'),
14-
typedoc=require('gulp-typedoc'),
15-
watch=require('gulp-watch'),
16-
webpack=require('webpack'),
17-
webpackStream=require('webpack-stream'),
18-
webpackConfig=require('./webpack.config'),
19-
webpackTestConfig=require('./webpack.test.config'),
20-
runSequence=require('gulp4-run-sequence'),
21-
argv=require('yargs').argv;
22-
;
1+
constfs=require('fs');
2+
constgulp=require('gulp');
3+
constghPages=require('gulp-gh-pages');
4+
constheader=require('gulp-header');
5+
consthelp=require('gulp-help-four');
6+
constrename=require('gulp-rename');
7+
constreplace=require('gulp-replace');
8+
consteslint=require("gulp-eslint");
9+
constts=require('gulp-typescript');
10+
constflatten=require('gulp-flatten');
11+
constdel=require('del');
12+
constmoment=require('moment');
13+
constkarma=require('karma');
14+
consttypedoc=require('gulp-typedoc');
15+
constwatch=require('gulp-watch');
16+
constwebpack=require('webpack');
17+
constwebpackStream=require('webpack-stream');
18+
construnSequence=require('gulp4-run-sequence');
19+
constwebpackConfig=require('./webpack.config');
20+
constwebpackTestConfig=require('./webpack.test.config');
21+
constargv=require('yargs').argv;
2322

2423
help(gulp,undefined);
2524

26-
varpackage=require('./package.json');
27-
varwebpackBanner=package.name+" v"+package.version+" | (c) 2016 Microsoft Corporation "+package.license;
28-
vargulpBanner="/*! "+webpackBanner+" */\n";
25+
constpackage=require('./package.json');
26+
constwebpackBanner="// "+package.name+" v"+package.version+"\n"
27+
+"// Copyright (c) Microsoft Corporation.\n"
28+
+"// Licensed under the MIT License.";
29+
constbanner=webpackBanner+"\n";
2930

3031
gulp.task('ghpages','Deploy documentation to gh-pages',['nojekyll'],function(){
31-
returngulp.src(['./docs/**/*'],{
32-
dot:true
33-
})
34-
.pipe(ghPages({
35-
force:true,
36-
message:'Update '+moment().format('LLL')
37-
}));
32+
returngulp.src(['./docs/**/*'],{
33+
dot:true
34+
})
35+
.pipe(ghPages({
36+
force:true,
37+
message:'Update '+moment().format('LLL')
38+
}));
3839
});
3940

4041
gulp.task("docs",'Compile documentation from src code',function(){
@@ -64,105 +65,109 @@ gulp.task('copydemotodocs', 'Copy the demo to the docs', function () {
6465
});
6566

6667
gulp.task('nojekyll','Add .nojekyll file to docs directory',function(done){
67-
fs.writeFile('./docs/.nojekyll','',function(error){
68-
if(error){
69-
throwerror;
70-
}
68+
fs.writeFile('./docs/.nojekyll','',function(error){
69+
if(error){
70+
throwerror;
71+
}
7172

72-
done();
73-
});
73+
done();
74+
});
7475
});
7576

7677
gulp.task('watch','Watches for changes',['lint'],function(){
77-
gulp.watch(['./src/**/*.ts','./test/**/*.ts'],['lint:ts']);
78-
gulp.watch(['./test/**/*.ts'],['test']);
78+
gulp.watch(['./src/**/*.ts','./test/**/*.ts'],['lint:ts']);
79+
gulp.watch(['./test/**/*.ts'],['test']);
7980
});
8081

8182
gulp.task('lint','Lints all files',function(done){
82-
runSequence(
83-
'lint:ts',
84-
done
85-
);
83+
runSequence(
84+
'lint:ts',
85+
done
86+
);
8687
});
8788

8889
gulp.task('test','Runs all tests',function(done){
89-
runSequence(
90-
'lint:ts',
91-
'config',
92-
'compile:spec',
93-
'test:js',
94-
done
95-
);
90+
runSequence(
91+
'lint:ts',
92+
'config',
93+
'compile:spec',
94+
'test:js',
95+
done
96+
);
9697
});
9798

9899
gulp.task('build','Runs a full build',function(done){
99-
runSequence(
100-
'lint:ts',
101-
'clean',
102-
'config',
103-
['compile:ts','compile:dts'],
104-
'min:js',
105-
'header',
106-
done
107-
);
100+
runSequence(
101+
'lint:ts',
102+
'clean',
103+
'config',
104+
['compile:ts','compile:dts'],
105+
'min:js',
106+
'header',
107+
done
108+
);
108109
});
109110

110111
gulp.task('build:docs','Build docs folder',function(done){
111-
returnrunSequence(
112-
'clean:docs',
113-
'docs',
114-
'nojekyll',
115-
'copydemotodocs',
116-
done
117-
);
112+
returnrunSequence(
113+
'clean:docs',
114+
'docs',
115+
'nojekyll',
116+
'copydemotodocs',
117+
done
118+
);
118119
});
119120

120121
gulp.task('config','Update config version with package version',function(){
121-
returngulp.src(['./src/config.ts'],{base:"./"})
122-
.pipe(replace(/version:'([^']+)'/,`version: '${package.version}'`))
123-
.pipe(gulp.dest('.'));
122+
returngulp.src(['./src/config.ts'],{base:"./"})
123+
.pipe(replace(/version:'([^']+)'/,`version: '${package.version}'`))
124+
.pipe(gulp.dest('.'));
124125
});
125126

126127
gulp.task('header','Add header to distributed files',function(){
127-
returngulp.src(['./dist/*.d.ts'])
128-
.pipe(header(gulpBanner))
129-
.pipe(gulp.dest('./dist'));
128+
returngulp.src(['./dist/*.d.ts'])
129+
.pipe(header(banner))
130+
.pipe(gulp.dest('./dist'));
130131
});
131132

132133
gulp.task('clean','Cleans destination folder',function(done){
133-
returndel([
134-
'./dist/**/*'
135-
]);
134+
returndel([
135+
'./dist/**/*'
136+
]);
136137
});
137138

138139
gulp.task('clean:docs','Clean docs directory',function(){
139-
returndel([
140-
'docs/**/*',
141-
'docs'
142-
]);
140+
returndel([
141+
'docs/**/*',
142+
'docs'
143+
]);
143144
});
144145

145146
gulp.task('lint:ts','Lints all TypeScript',function(){
146-
returngulp.src(['./src/**/*.ts','./test/**/*.ts'])
147-
.pipe(eslint({
148-
formatter:"verbose"
149-
}))
150-
.pipe(eslint.format());
147+
returngulp.src(['./src/**/*.ts','./test/**/*.ts'])
148+
.pipe(eslint({
149+
formatter:"verbose"
150+
}))
151+
.pipe(eslint.format());
151152
});
152153

153154
gulp.task('min:js','Creates minified JavaScript file',function(){
154155
webpackConfig.plugins=[
155-
newwebpack.BannerPlugin(webpackBanner)
156+
newwebpack.BannerPlugin({
157+
banner:webpackBanner,
158+
raw:true
159+
})
156160
];
157-
161+
158162
// Create minified bundle without source map
159163
webpackConfig.mode='production';
160-
webpackConfig.devtool='none'
164+
webpackConfig.devtool='none';
161165

162166
returngulp.src(['./src/powerbi-client.ts'])
163167
.pipe(webpackStream({
164168
config:webpackConfig
165169
}))
170+
.pipe(header(banner))
166171
.pipe(rename({
167172
suffix:'.min'
168173
}))
@@ -171,64 +176,67 @@ gulp.task('min:js', 'Creates minified JavaScript file', function () {
171176

172177
gulp.task('compile:ts','Compile typescript for powerbi-client library',function(){
173178
webpackConfig.plugins=[
174-
newwebpack.BannerPlugin(webpackBanner)
179+
newwebpack.BannerPlugin({
180+
banner:webpackBanner,
181+
raw:true
182+
})
175183
];
176184
webpackConfig.mode="development";
177185

178-
returngulp.src(['./src/powerbi-client.ts'])
179-
.pipe(webpackStream(webpackConfig))
180-
.pipe(gulp.dest('dist/'));
186+
returngulp.src(['./src/powerbi-client.ts'])
187+
.pipe(webpackStream(webpackConfig))
188+
.pipe(gulp.dest('dist/'));
181189
});
182190

183191
gulp.task('compile:dts','Generate one dts file from modules',function(){
184-
vartsProject=ts.createProject('tsconfig.json',{
185-
declaration:true,
186-
sourceMap:false
187-
});
192+
consttsProject=ts.createProject('tsconfig.json',{
193+
declaration:true,
194+
sourceMap:false
195+
});
188196

189-
varsettings={
197+
constsettings={
190198
out:"powerbi-client.js",
191199
declaration:true,
192200
module:"system",
193201
moduleResolution:"node"
194202
};
195203

196-
vartsResult=tsProject.src()
197-
.pipe(ts(settings));
204+
consttsResult=tsProject.src()
205+
.pipe(ts(settings));
198206

199-
returntsResult.dts
200-
.pipe(flatten())
201-
.pipe(gulp.dest('./dist'));
207+
returntsResult.dts
208+
.pipe(flatten())
209+
.pipe(gulp.dest('./dist'));
202210
});
203211

204212
gulp.task('compile:spec','Compile spec tests',function(){
205-
returngulp.src(['./test/test.spec.ts'])
206-
.pipe(webpackStream(webpackTestConfig))
207-
.pipe(gulp.dest('./tmp'));
213+
returngulp.src(['./test/test.spec.ts'])
214+
.pipe(webpackStream(webpackTestConfig))
215+
.pipe(gulp.dest('./tmp'));
208216
});
209217

210218
gulp.task('test:js','Run js tests',function(done){
211-
newkarma.Server({
212-
configFile:__dirname+'/karma.conf.js',
213-
singleRun:argv.watch ?false :true,
214-
captureTimeout:argv.timeout||60000
215-
},function(){
216-
done();
219+
newkarma.Server({
220+
configFile:__dirname+'/karma.conf.js',
221+
singleRun:argv.watch ?false :true,
222+
captureTimeout:argv.timeout||60000
223+
},function(){
224+
done();
217225
})
218-
.on('browser_register',(browser)=>{
219-
if(argv.chrome){
226+
.on('browser_register',(browser)=>{
227+
if(argv.chrome){
220228
browser.socket.on('disconnect',function(reason){
221229
if(reason==="transport close"||reason==="transport error"){
222-
done(0);
223-
process.exit(0);
230+
done(0);
231+
process.exit(0);
224232
}
225-
});
226-
}
227-
})
228-
.start();
233+
});
234+
}
235+
})
236+
.start();
229237
if(argv.chrome){
230238
returnwatch(["src/**/*.ts","test/**/*.ts"],function(){
231-
runSequence('compile:spec');
239+
runSequence('compile:spec');
232240
});
233241
}
234-
});
242+
});

‎package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"powerbi-client",
3-
"version":"2.17.2",
3+
"version":"2.18.0",
44
"description":"JavaScript library for embedding Power BI into your apps. Provides service which makes it easy to embed different types of components and an object model which allows easy interaction with these components such as changing pages, applying filters, and responding to data selection.",
55
"main":"dist/powerbi.js",
66
"types":"dist/powerbi-client.d.ts",
@@ -81,7 +81,7 @@
8181
},
8282
"dependencies": {
8383
"http-post-message":"^0.2",
84-
"powerbi-models":"^1.8",
84+
"powerbi-models":"^1.9",
8585
"powerbi-router":"^0.1",
8686
"window-post-message-proxy":"^0.2"
8787
},

‎src/bookmarksManager.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
import{
25
BookmarksPlayMode,
36
IApplyBookmarkByNameRequest,

‎src/config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
/**@ignore *//** */
25
constconfig={
3-
version:'2.17.2',
6+
version:'2.18.0',
47
type:'js'
58
};
69

‎src/create.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
import{IReportCreateConfiguration,IError,validateCreateReport}from'powerbi-models';
25
import{Service}from'./service';
36
import{Embed,IEmbedConfigurationBase,IEmbedConfiguration}from'./embed';

‎src/dashboard.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
import{IError,validateDashboardLoad,PageView}from'powerbi-models';
25
import{Service,IService}from'./service';
36
import{Embed,IDashboardEmbedConfiguration,IEmbedConfigurationBase}from'./embed';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp