mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-24 11:29:30 +08:00
Merge branch 'master' of https://github.com/borisyankov/DefinitelyTyped into has-one-association-mixins
This commit is contained in:
+56
-23
@@ -16,9 +16,6 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](amplify-deferred/amplify-deferred.d.ts) [AmplifyJs 1.1.0 using JQuery Deferred](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks), [Laurentiu Stamate](https://github.com/laurentiustamate94)
|
||||
* [:link:](amqp-rpc/amqp-rpc.d.ts) [amqp-rpc](https://github.com/demchenkoe/node-amqp-rpc) by [Wonshik Kim](https://github.com/wokim)
|
||||
* [:link:](amqplib/amqplib.d.ts) [amqplib 0.3.x](https://github.com/squaremo/amqp.node) by [Michael Nahkies](https://github.com/mnahkies)
|
||||
* [:link:](angular2/angular2.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
|
||||
* [:link:](angular2/http.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
|
||||
* [:link:](angular2/router.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
|
||||
* [:link:](ng-file-upload/ng-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-file-upload) by [John Reilly](https://github.com/johnnyreilly)
|
||||
* [:link:](angular-file-upload/angular-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-file-upload) by [John Reilly](https://github.com/johnnyreilly)
|
||||
* [:link:](angular-growl-v2/angular-growl-v2.d.ts) [Angular Growl 2 v.0.7.3](http://janstevens.github.io/angular-growl-2) by [Tadeusz Hucal](https://github.com/mkp05)
|
||||
@@ -38,6 +35,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](angular-toasty/angular-toasty.d.ts) [Angular Toasty](https://github.com/invertase/angular-toasty) by [Dominik Muench](https://github.com/muenchdo)
|
||||
* [:link:](angular-translate/angular-translate.d.ts) [Angular Translate (pascalprecht.translate module)](https://github.com/PascalPrecht/angular-translate) by [Michel Salib](https://github.com/michelsalib)
|
||||
* [:link:](angular-ui-bootstrap/angular-ui-bootstrap.d.ts) [Angular UI Bootstrap](https://github.com/angular-ui/bootstrap) by [Brian Surowiec](https://github.com/xt0rted)
|
||||
* [:link:](angular2/router.d.ts) [Angular v2.0.0-39](http://angular.io) by [angular team](https://github.com/angular)
|
||||
* [:link:](angular2/angular2.d.ts) [Angular v2.0.0-39](http://angular.io) by [angular team](https://github.com/angular)
|
||||
* [:link:](angular2/http.d.ts) [Angular v2.0.0-local_sha.7d5c3eb](http://angular.io) by [angular team](https://github.com/angular)
|
||||
* [:link:](angular2/test_lib.d.ts) [Angular v2.0.0-local_sha.7d5c3eb](http://angular.io) by [angular team](https://github.com/angular)
|
||||
* [:link:](angular-wizard/angular-wizard.d.ts) [Angular Wizard](https://github.com/mgonto/angular-wizard) by [Marko Jurisic](https://github.com/mjurisic)
|
||||
* [:link:](angular-bootstrap-lightbox/angular-bootstrap-lightbox.d.ts) [angular-bootstrap-lightbox](https://github.com/compact/angular-bootstrap-lightbox) by [Roland Zwaga](https://github.com/rolandzwaga)
|
||||
* [:link:](angular-dynamic-locale/angular-dynamic-locale.d.ts) [angular-dynamic-locale](https://github.com/lgalfaso/angular-dynamic-locale) by [Stephen Lautier](https://github.com/stephenlautier)
|
||||
@@ -107,6 +108,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](backgrid/backgrid.d.ts) [Backgrid](http://backgridjs.com) by [Jeremy Lujan](https://github.com/jlujan)
|
||||
* [:link:](baconjs/baconjs.d.ts) [Bacon.js](https://baconjs.github.io) by [Alexander Matsievsky](https://github.com/alexander-matsievsky)
|
||||
* [:link:](bardjs/bardjs.d.ts) [bardjs](https://github.com/wardbell/bardjs) by [Andrew Archibald](https://github.com/TepigMC)
|
||||
* [:link:](basic-auth/basic-auth.d.ts) [basic-auth](https://github.com/jshttp/basic-auth) by [Clément Bourgeois](https://github.com/moonpyk)
|
||||
* [:link:](batch-stream/batch-stream.d.ts) [batch-stream](https://github.com/segmentio/batch-stream) by [Nicholas Penree](http://github.com/drudge)
|
||||
* [:link:](bcrypt/bcrypt.d.ts) [bcrypt](https://www.npmjs.org/package/bcrypt) by [Peter Harris](https://github.com/codeanimal)
|
||||
* [:link:](better-curry/better-curry.d.ts) [better-curry](https://github.com/pocesar/js-bettercurry) by [Paulo Cesar](https://github.com/pocesar)
|
||||
@@ -130,8 +132,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](bootstrap-slider/bootstrap-slider.d.ts) [bootstrap-slider.js](https://github.com/seiyria/bootstrap-slider) by [Daniel Beckwith](https://github.com/dbeckwith)
|
||||
* [:link:](bootstrap.datepicker/bootstrap.datepicker.d.ts) [bootstrap.datepicker](https://github.com/eternicode/bootstrap-datepicker) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](bootstrap.paginator/bootstrap.paginator.d.ts) [bootstrap.paginator](https://github.com/lyonlai/bootstrap-paginator) by [derikwhittaker](https://github.com/derikwhittaker)
|
||||
* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
|
||||
* [:link:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin)
|
||||
* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
|
||||
* [:link:](bowser/bowser.d.ts) [Bowser 1.x](https://github.com/ded/bowser) by [Paulo Cesar](https://github.com/pocesar)
|
||||
* [:link:](breeze/breeze.d.ts) [Breeze 1.5.x](http://www.breezejs.com) by [Boris Yankov](https://github.com/borisyankov), [IdeaBlade](https://github.com/IdeaBlade/Breeze)
|
||||
* [:link:](browser-harness/browser-harness.d.ts) [Browser Harness](https://github.com/scriby/browser-harness) by [Chris Scribner](https://github.com/scriby)
|
||||
@@ -178,10 +180,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](classnames/classnames.d.ts) [classnames](https://github.com/JedWatson/classnames) by [Dave Keen](http://www.keendevelopment.ch), [Adi Dahiya](https://github.com/adidahiya), [Jason Killian](https://github.com/JKillian)
|
||||
* [:link:](cli-color/cli-color.d.ts) [cli-color](https://github.com/medikoo/cli-color) by [Joel Spadin](https://github.com/ChaosinaCan)
|
||||
* [:link:](clone/clone.d.ts) [clone](https://github.com/pvorb/node-clone) by [Kieran Simpson](https://github.com/kierans/DefinitelyTyped)
|
||||
* [:link:](codemirror/codemirror.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [mihailik](https://github.com/mihailik)
|
||||
* [:link:](codemirror/searchcursor.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt)
|
||||
* [:link:](codemirror/codemirror-matchbrackets.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [Sixin Li](https://github.com/sixinli)
|
||||
* [:link:](codemirror/codemirror-showhint.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt), [basarat](https://github.com/basarat)
|
||||
* [:link:](codemirror/codemirror.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [mihailik](https://github.com/mihailik)
|
||||
* [:link:](codemirror/searchcursor.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt)
|
||||
* [:link:](coffeeify/coffeeify.d.ts) [coffeeify](https://github.com/jnordberg/coffeeify) by [Qubo](https://github.com/tkQubo)
|
||||
* [:link:](colorbrewer/colorbrewer.d.ts) [colorbrewer](https://github.com/jeanlauliac/colorbrewer) by [Matt Traynham](https://github.com/mtraynham)
|
||||
* [:link:](colors/colors.d.ts) [Colors.js 0.6.0-1](https://github.com/Marak/colors.js) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
@@ -192,6 +194,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](configstore/configstore.d.ts) [configstore](https://github.com/yeoman/configstore) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](connect-flash/connect-flash.d.ts) [connect-flash](https://github.com/jaredhanson/connect-flash) by [Andreas Gassmann](https://github.com/AndreasGassmann)
|
||||
* [:link:](connect-modrewrite/connect-modrewrite.d.ts) [connect-modrewrite](https://github.com/tinganho/connect-modrewrite) by [Tingan Ho](https://github.com/tinganho)
|
||||
* [:link:](connect-mongo/connect-mongo.d.ts) [connect-mongo](https://github.com/kcbanner/connect-mongo) by [Mizuki Yamamoto](https://github.com/Syati)
|
||||
* [:link:](connect-slashes/connect-slashes.d.ts) [connect-slashes](https://github.com/avinoamr/connect-slashes) by [Sam Herrmann](https://github.com/samherrmann)
|
||||
* [:link:](consolidate/consolidate.d.ts) [consolidate](https://github.com/visionmedia/consolidate.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](constant-case/constant-case.d.ts) [constant-case](https://github.com/blakeembrey/constant-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
@@ -204,6 +207,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](cordova-ionic/plugins/keyboard.d.ts) [Cordova Keyboard plugin](https://github.com/driftyco/ionic-plugins-keyboard) by [Hendrik Maus](https://github.com/hendrikmaus)
|
||||
* [:link:](cordova-plugin-app-version/cordova-plugin-app-version.d.ts) [cordova-plugin-app-version](https://github.com/whiteoctober/cordova-plugin-app-version) by [Markus Wagner](https://github.com/Ritzlgrmft)
|
||||
* [:link:](cordova-plugin-ibeacon/cordova-plugin-ibeacon.d.ts) [cordova-plugin-ibeacon](https://github.com/petermetz/cordova-plugin-ibeacon) by [Markus Wagner](https://github.com/Ritzlgrmft)
|
||||
* [:link:](cordova-plugin-ouralabs/cordova-plugin-ouralabs.d.ts) [cordova-plugin-ouralabs](https://github.com/Justin-Credible/cordova-plugin-ouralabs) by [Justin Unterreiner](https://github.com/Justin-Credible)
|
||||
* [:link:](cordovarduino/cordovarduino.d.ts) [Cordovarduino plugin](https://github.com/stereolux/cordovarduino) by [Hendrik Maus](https://github.com/hendrikmaus)
|
||||
* [:link:](core-decorators/core-decorators.d.ts) [core-decorators.js](https://github.com/jayphelps/core-decorators.js) by [Qubo](https://github.com/tkqubo)
|
||||
* [:link:](core-js/core-js.d.ts) [core-js](https://github.com/zloirock/core-js) by [Ron Buckton](http://github.com/rbuckton)
|
||||
@@ -260,6 +264,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](dotdotdot/dotdotdot.d.ts) [dotdotdot](http://dotdotdot.frebsite.nl) by [Milan Jaros](https://github.com/milanjaros)
|
||||
* [:link:](doublearray/doublearray.d.ts) [doublearray](https://github.com/takuyaa/doublearray) by [MIZUSHIMA Junki](https://github.com/mzsm)
|
||||
* [:link:](dragula/dragula.d.ts) [dragula](http://bevacqua.github.io/dragula) by [Paul Welter](https://github.com/pwelter34)
|
||||
* [:link:](hystrixjs/hystrixjs.d.ts) [dragula](https://bitbucket.org/igor_sechyn/hystrixjs) by [Igor Sechyn](https://github.com/igorsechyn)
|
||||
* [:link:](drop/drop.d.ts) [Drop](http://github.hubspot.com/drop) by [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](dropboxjs/dropboxjs.d.ts) [dropbox-js](https://github.com/dropbox/dropbox-js) by [Steve Fenton](https://github.com/Steve-Fenton), [Pedro Casaubon](https://github.com/xperiments)
|
||||
* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo), [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com), [Vasya Aksyonov](https://github.com/outring)
|
||||
@@ -272,8 +277,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](easy-jsend/easy-jsend.d.ts) [easy-jsend](https://github.com/DeadAlready/easy-jsend) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easy-session/easy-session.d.ts) [easy-session](https://github.com/DeadAlready/node-easy-session) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easy-table/easy-table.d.ts) [easy-table](https://github.com/eldargab/easy-table) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](easy-x-headers/easy-x-headers.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easy-xapi-supertest/easy-xapi-supertest.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easy-x-headers/easy-x-headers.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easy-xapi/easy-xapi.d.ts) [easy-xapi](https://github.com/DeadAlready/easy-xapi) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easy-xapi-utils/easy-xapi-utils.d.ts) [easy-xapi-utils](https://github.com/DeadAlready/easy-xapi-utils) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easystarjs/easystarjs.d.ts) [EasyStar.js](http://easystarjs.com) by [Magnus Gustafsson](https://github.com/borundin)
|
||||
@@ -314,6 +319,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](express-less/express-less.d.ts) [express-less](https://www.npmjs.com/package/express-less) by [xyb](https://github.com/xieyubo)
|
||||
* [:link:](express-myconnection/express-myconnection.d.ts) [express-myconnection](https://www.npmjs.org/package/express-myconnection) by [Michael Ferris](https://github.com/Cellule)
|
||||
* [:link:](express-partials/express-partials.d.ts) [express-partials](https://github.com/publicclass/express-partials) by [jt000](https://github.com/jt000)
|
||||
* [:link:](express-route-fs/express-route-fs.d.ts) [express-route-fs](https://github.com/kripod/express-route-fs) by [Kristóf Poduszló](https://github.com/kripod)
|
||||
* [:link:](express-session/express-session.d.ts) [express-session](https://www.npmjs.org/package/express-session) by [Hiroki Horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](express-unless/express-unless.d.ts) [express-unless](https://www.npmjs.org/package/express-unless) by [Wonshik Kim](https://github.com/wokim)
|
||||
* [:link:](express-validator/express-validator.d.ts) [express-validator](https://github.com/ctavan/express-validator) by [Nathan Ridley](https://github.com/axefrog), [Jonathan Häberle](http://dreampulse.de)
|
||||
@@ -344,6 +350,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](firebase-client/firebase-client.d.ts) [Firebase Client](https://www.github.com/jpstevens/firebase-client) by [Andrew Breen](https://github.com/fpsscarecrow)
|
||||
* [:link:](firebase/firebase-simplelogin.d.ts) [Firebase Simple Login](https://www.firebase.com/docs/security/simple-login-overview.html) by [Wilker Lucio](http://github.com/wilkerlucio)
|
||||
* [:link:](first-mate/first-mate.d.ts) [first-mate](https://github.com/atom/first-mate) by [Vadim Macagon](https://github.com/enlight)
|
||||
* [:link:](flake-idgen/flake-idgen.d.ts) [flakge-idgen](https://github.com/T-PWK/flake-idgen) by [Yuce Tekol](http://yuce.me)
|
||||
* [:link:](flexSlider/flexSlider.d.ts) [FlexSlider 2 jquery plugin](https://github.com/woothemes/FlexSlider) by [Diullei Gomes](https://github.com/diullei)
|
||||
* [:link:](flight/flight.d.ts) [Flight](http://flightjs.github.com/flight) by [Jonathan Hedrén](https://github.com/jonathanhedren)
|
||||
* [:link:](flipsnap/flipsnap.d.ts) [flipsnap.js](http://pxgrid.github.io/js-flipsnap) by [kubosho](https://github.com/kubosho), [gsino](https://github.com/gsino), [Mayuki Sawatari](https://github.com/mayuki)
|
||||
@@ -358,9 +365,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](formidable/formidable.d.ts) [Formidable](https://github.com/felixge/node-formidable) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](foundation/foundation.d.ts) [Foundation](http://foundation.zurb.com) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](fpsmeter/FPSMeter.d.ts) [FPSmeter](http://darsa.in/fpsmeter) by [Aaron Lampros](http://github.com/alampros)
|
||||
* [:link:](freedom/freedom.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
|
||||
* [:link:](freedom/freedom-module-env.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
|
||||
* [:link:](freedom/freedom-core-env.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
|
||||
* [:link:](freedom/freedom-module-env.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
|
||||
* [:link:](freedom/freedom.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
|
||||
* [:link:](from/from.d.ts) [from](https://github.com/dominictarr/from) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](fs-ext/fs-ext.d.ts) [fs-ext](https://github.com/baudehlo/node-fs-ext) by [Oguzhan Ergin](https://github.com/OguzhanE)
|
||||
* [:link:](fs-extra/fs-extra.d.ts) [fs-extra](https://github.com/jprichardson/node-fs-extra) by [midknight41](https://github.com/midknight41)
|
||||
@@ -409,9 +416,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](gridfs-stream/gridfs-stream.d.ts) [gridfs-stream](https://github.com/aheckmann/gridfs-stream) by [Lior Mualem](https://github.com/liorm)
|
||||
* [:link:](gridstack/gridstack.d.ts) [Gridstack](http://troolee.github.io/gridstack.js) by [Pascal Senn](https://github.com/PascalSenn)
|
||||
* [:link:](gruntjs/gruntjs.d.ts) [Grunt 0.4.x](http://gruntjs.com) by [Jeff May](https://github.com/jeffmay), [Basarat Ali Syed](https://github.com/basarat)
|
||||
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gulp/gulp.d.ts) [Gulp v3.8.x](http://gulpjs.com) by [Drew Noakes](https://drewnoakes.com)
|
||||
* [:link:](gulp-autoprefixer/gulp-autoprefixer.d.ts) [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-cached/gulp-cached.d.ts) [gulp-cached](https://github.com/wearefractal/gulp-cached) by [Thomas Corbière](https://github.com/tomc974)
|
||||
@@ -420,8 +427,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](gulp-coffeeify/gulp-coffeeify.d.ts) [gulp-coffeeify](https://github.com/nariyu/gulp-coffeeify) by [Qubo](https://github.com/tkQubo)
|
||||
* [:link:](gulp-coffeelint/gulp-coffeelint.d.ts) [gulp-coffeelint](https://github.com/janraasch/gulp-coffeelint) by [Qubo](https://github.com/tkQubo)
|
||||
* [:link:](gulp-concat/gulp-concat.d.ts) [gulp-concat](http://github.com/wearefractal/gulp-concat) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](gulp-rev/gulp-rev.d.ts) [gulp-csso](https://github.com/sindresorhus/gulp-rev) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-csso/gulp-csso.d.ts) [gulp-csso](https://github.com/ben-eb/gulp-csso) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-rev/gulp-rev.d.ts) [gulp-csso](https://github.com/sindresorhus/gulp-rev) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-debug/gulp-debug.d.ts) [gulp-debug](https://github.com/sindresorhus/gulp-debug) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-dtsm/gulp-dtsm.d.ts) [gulp-dtsm](https://github.com/9joneg/gulp-dtsm) by [Aya Morisawa](https://github.com/AyaMorisawa)
|
||||
* [:link:](gulp-espower/gulp-espower.d.ts) [gulp-espower](https://github.com/power-assert-js/gulp-espower) by [Qubo](https://github.com/tkQubo)
|
||||
@@ -493,8 +500,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](humane/humane.d.ts) [Humane](http://wavded.github.com/humane-js) by [jmvrbanac](https://github.com/jmvrbanac)
|
||||
* [:link:](hypertext-application-language/hypertext-application-language.d.ts) [Hypertext Application Language Draft 6](https://tools.ietf.org/html/draft-kelly-json-hal-06) by [Maks3w](https://github.com/maks3w)
|
||||
* [:link:](i18n-node/i18n-node.d.ts) [i18n-node](https://github.com/mashpie/i18n-node) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](i18next/i18next.d.ts) [i18next](http://i18next.com) by [Maarten Docter](https://github.com/mdocter)
|
||||
* [:link:](ng-i18next/ng-i18next.d.ts) [i18next](https://github.com/i18next/ng-i18next) by [Cyril Schumacher](https://github.com/cyrilschumacher)
|
||||
* [:link:](i18next/i18next.d.ts) [i18next](http://i18next.com) by [Maarten Docter](https://github.com/mdocter)
|
||||
* [:link:](iban/iban.d.ts) [iban.js](https://github.com/arhs/iban.js) by [Cyril Schumacher](https://github.com/cyrilschumacher)
|
||||
* [:link:](icheck/icheck.d.ts) [iCheck](http://damirfoy.com/iCheck) by [Dániel Tar](https://github.com/qcz)
|
||||
* [:link:](imagemagick/imagemagick.d.ts) [imagemagick](http://github.com/rsms/node-imagemagick) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
@@ -524,6 +531,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](iso8601-localizer/iso8601-localizer.d.ts) [ISO8601-Localizer](https://github.com/avielfedida/ISO8601-Localizer) by [Aviel Fedida](https://github.com/avielfedida)
|
||||
* [:link:](ix.js/ix.d.ts) [IxJS 1.0.6 / ix.js](https://github.com/Reactive-Extensions/IxJS) by [Igor Oleinikov](https://github.com/Igorbek)
|
||||
* [:link:](ix.js/l2o.d.ts) [IxJS 1.0.6 / l2o.js](https://github.com/Reactive-Extensions/IxJS) by [Igor Oleinikov](https://github.com/Igorbek)
|
||||
* [:link:](jade/jade.d.ts) [jade](https://github.com/jadejs/jade) by [Panu Horsmalahti](https://github.com/panuhorsmalahti)
|
||||
* [:link:](jake/jake.d.ts) [jake](https://github.com/mde/jake) by [Kon](http://phyzkit.net)
|
||||
* [:link:](jasmine/jasmine.d.ts) [Jasmine](http://jasmine.github.io) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb), [David Pärsson](https://github.com/davidparsson)
|
||||
* [:link:](jasmine-data_driven_tests/jasmine-data_driven_tests.d.ts) [Jasmine Data Driven Tests](https://github.com/gburghardt/jasmine-data_driven_tests) by [Anthony MacKinnon](https://github.com/AnthonyMacKinnon)
|
||||
@@ -544,7 +552,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jjve/jjve.d.ts) [JJVE](https://github.com/silas/jjve) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](joData/joData.d.ts) [joData](https://github.com/mccow002/joData) by [Chris Wrench](https://github.com/cgwrench)
|
||||
* [:link:](johnny-five/johnny-five.d.ts) [johnny-five](https://github.com/rwaldron/johnny-five) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](joi/joi.d.ts) [joi](https://github.com/spumko/joi) by [Bart van der Schoor](https://github.com/Bartvds), [Laurence Dougal Myers](https://github.com/laurence-myers)
|
||||
* [:link:](joi/joi.d.ts) [joi](https://github.com/spumko/joi) by [Bart van der Schoor](https://github.com/Bartvds), [Laurence Dougal Myers](https://github.com/laurence-myers), [Christopher Glantschnig](https://github.com/cglantschnig)
|
||||
* [:link:](jointjs/jointjs.d.ts) [Joint JS](http://www.jointjs.com) by [Aidan Reel](http://github.com/areel), [David Durman](http://github.com/DavidDurman), [Ewout Van Gossum](https://github.com/DenEwout)
|
||||
* [:link:](jqrangeslider/jqrangeslider.d.ts) [jQRangeSlider](http://ghusse.github.com/jQRangeSlider) by [Dániel Tar](https://github.com/qcz)
|
||||
* [:link:](jquery/jquery.d.ts) [jQuery 1.10.x / 2.0.x](http://jquery.com) by [Boris Yankov](https://github.com/borisyankov), [Christian Hoffmeister](https://github.com/choffmeister), [Steve Fenton](https://github.com/Steve-Fenton), [Diullei Gomes](https://github.com/Diullei), [Tass Iliopoulos](https://github.com/tasoili), [Jason Swearingen](https://github.com/jasons-novaleaf), [Sean Hill](https://github.com/seanski), [Guus Goossens](https://github.com/Guuz), [Kelly Summerlin](https://github.com/ksummerlin), [Basarat Ali Syed](https://github.com/basarat), [Nicholas Wolverson](https://github.com/nwolverson), [Derek Cicerone](https://github.com/derekcicerone), [Andrew Gaspar](https://github.com/AndrewGaspar), [James Harrison Fisher](https://github.com/jameshfisher), [Seikichi Kondo](https://github.com/seikichi), [Benjamin Jackman](https://github.com/benjaminjackman), [Poul Sorensen](https://github.com/s093294), [Josh Strobl](https://github.com/JoshStrobl), [John Reilly](https://github.com/johnnyreilly), [Dick van den Brink](https://github.com/DickvdBrink)
|
||||
@@ -553,6 +561,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery.colorpicker/jquery.colorpicker.d.ts) [jQuery Colorpicker Plugin](https://github.com/vanderlee/colorpicker) by [Jeffery Grajkowski](https://github.com/pushplay)
|
||||
* [:link:](jquery.contextMenu/jquery.contextMenu.d.ts) [jQuery contextMenu](http://medialize.github.com/jQuery-contextMenu) by [Natan Vivo](https://github.com/nvivo)
|
||||
* [:link:](jquery.cookie/jquery.cookie.d.ts) [jQuery Cookie Plugin](https://github.com/carhartl/jquery-cookie) by [Roy Goode](https://github.com/RoyGoode), [Ben Lorantfy](https://github.com/BenLorantfy)
|
||||
* [:link:](jquery-cropbox/jquery-cropbox.d.ts) [jQuery cropbox](https://github.com/acornejo/jquery-cropbox) by [Per Kastman](https://github.com/PerKastman)
|
||||
* [:link:](jquery.cycle2/jquery.cycle2.d.ts) [jQuery Cycle2 version (build 20140216)](http://jquery.malsup.com/cycle2) by [Donny Nadolny](https://github.com/dnadolny)
|
||||
* [:link:](jquery.dataTables/jquery.dataTables.d.ts) [JQuery DataTables](http://www.datatables.net) by [Kiarash Ghiaseddin](https://github.com/Silver-Connection/DefinitelyTyped), [Omid Rad](https://github.com/omidkrad), [Armin Sander](https://github.com/pragmatrix)
|
||||
* [:link:](jquery.fileupload/jquery.fileupload.d.ts) [jQuery File Upload Plugin](https://github.com/blueimp/jQuery-File-Upload) by [Rob Alarcon](https://github.com/rob-alarcon)
|
||||
@@ -581,6 +590,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery-handsontable/jquery-handsontable.d.ts) [jquery-handsontable](http://handsontable.com) by [Ted John](https://github.com/intelorca)
|
||||
* [:link:](jquery.menuaim/jquery.menuaim.d.ts) [jQuery-menu-aim](https://github.com/kamens/jQuery-menu-aim) by [Robert Fonseca-Ensor](http://www.robfe.com)
|
||||
* [:link:](jquery.pjax/jquery.pjax.d.ts) [jquery-pjax](https://github.com/defunkt/jquery-pjax) by [Junle Li](https://github.com/lijunle)
|
||||
* [:link:](jquery-timeentry/jquery-timeentry.d.ts) [jQuery-timeentry.js](https://github.com/kbwood/timeentry) by [Mark Nadig](https://github.com/marknadig)
|
||||
* [:link:](jquery-urlparam/jquery-urlparam.d.ts) [jquery-urlparam](https://gist.github.com/stpettersens/e1f4478f299b6f4905c1) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](jquery.address/jquery.address.d.ts) [jQuery.Address](https://github.com/asual/jquery-address) by [Martin Duparc](https://github.com/martinduparc), [Tim Klingeleers](https://github.com/mardaneus86)
|
||||
* [:link:](jquery.ajaxfile/jquery.ajaxFile.d.ts) [jquery.ajaxfile](https://github.com/fpellet/jquery.ajaxFile) by [Florent PELLET](https://github.com/fpellet)
|
||||
@@ -609,6 +619,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery.scrollTo/jquery.scrollTo.d.ts) [jQuery.scrollTo.js](https://github.com/flesler/jquery.scrollTo) by [Neil Stalker](https://github.com/nestalk)
|
||||
* [:link:](jquery.simulate/jquery.simulate.d.ts) [jquery.simulate.js](https://github.com/jquery/jquery-simulate) by [Derek Cicerone](https://github.com/derekcicerone)
|
||||
* [:link:](jquery.slimScroll/jquery.slimScroll.d.ts) [jQuery.slimScroll](https://github.com/rochal/jQuery-slimScroll) by [Chintan Shah](https://github.com/Promact)
|
||||
* [:link:](jquery.soap/jquery.soap.d.ts) [jQuery.SOAP](https://github.com/doedje/jquery.soap) by [Roland Greim](https://github.com/tigerxy)
|
||||
* [:link:](jquery.sortElements/jquery.sortElement.d.ts) [jQuery.sortElements](http://james.padolsey.com/javascript/sorting-elements-with-jquery) by [Tim Bureck](https://github.com/tbureck)
|
||||
* [:link:](jquery.superLink/jquery.superLink.d.ts) [jquery.superLink](http://james.padolsey.com/demos/plugins/jQuery/superLink/superlink.jquery.js) by [Blake Niemyjski](https://github.com/niemyjski)
|
||||
* [:link:](jquery.tile/jquery.tile.d.ts) [jquery.tile.js](https://github.com/urin/jquery.tile.js) by [Shunsuke Ohtani](https://github.com/zaneli)
|
||||
@@ -624,6 +635,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](js-cookie/js-cookie.d.ts) [js-cookie](https://github.com/js-cookie/js-cookie) by [Theodore Brown](https://github.com/theodorejb)
|
||||
* [:link:](js-fixtures/fixtures.d.ts) [js-fixtures](https://github.com/badunk/js-fixtures) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid)
|
||||
* [:link:](js-git/js-git.d.ts) [js-git](https://github.com/creationix/js-git) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](js-md5/md5.d.ts) [js-md5](https://github.com/emn178/js-md5) by [Roland Greim](https://github.com/tigerxy)
|
||||
* [:link:](js-signals/js-signals.d.ts) [JS-Signals](http://millermedeiros.github.io/js-signals) by [Diullei Gomes](https://github.com/diullei)
|
||||
* [:link:](js-yaml/js-yaml.d.ts) [js-yaml](https://github.com/nodeca/js-yaml) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](blocks/blocks.d.ts) [jsblocks](http://jsblocks.com) by [Krzysztof Śmigiel](https://github.com/ksmigiel)
|
||||
@@ -712,6 +724,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery.livestampjs/jquery.livestampjs.d.ts) [Livestamp.js](http://mattbradley.github.com/livestampjs) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](lodash/lodash.d.ts) [Lo-Dash](http://lodash.com) by [Brian Zengel](https://github.com/bczengel), [Ilya Mochalov](https://github.com/chrootsu)
|
||||
* [:link:](lockfile/lockfile.d.ts) [lockfile](https://github.com/isaacs/lockfile) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](lodash-decorators/lodash-decorators.d.ts) [lodash-decorators](https://github.com/steelsojka/lodash-decorators) by [Qubo](https://github.com/tkqubo)
|
||||
* [:link:](log4javascript/log4javascript.d.ts) [log4javascript](http://log4javascript.org) by [Markus Wagner](https://github.com/Ritzlgrmft)
|
||||
* [:link:](log4js/log4js.d.ts) [log4js](https://github.com/nomiddlename/log4js-node) by [Kentaro Okuno](http://github.com/armorik83)
|
||||
* [:link:](logg/logg.d.ts) [logg](https://github.com/dpup/node-logg) by [Bret Little](https://github.com/blittle)
|
||||
@@ -745,12 +758,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](marionette/marionette.d.ts) [Marionette](https://github.com/marionettejs) by [Zeeshan Hamid](https://github.com/zhamid), [Natan Vivo](https://github.com/nvivo), [Sven Tschui](https://github.com/sventschui)
|
||||
* [:link:](marked/marked.d.ts) [Marked](https://github.com/chjj/marked) by [William Orr](https://github.com/worr)
|
||||
* [:link:](markerclustererplus/markerclustererplus.d.ts) [MarkerClustererPlus for Google Maps V3](http://github.com/mahnunchik/markerclustererplus) by [Mathias Rodriguez](http://github.com/enanox)
|
||||
* [:link:](markitup/markitup.d.ts) [markitup 1.x](https://github.com/markitup/1.x) by [drillbits](https://github.com/drillbits)
|
||||
* [:link:](maskedinput/maskedinput.d.ts) [Masked Input plugin for jQuery](http://digitalbush.com/projects/masked-input-plugin) by [Lokesh Peta](https://github.com/lokeshpeta)
|
||||
* [:link:](material-ui/material-ui.d.ts) [material-ui](https://github.com/callemall/material-ui) by [Nathan Brown](https://github.com/ngbrown)
|
||||
* [:link:](mathjax/mathjax.d.ts) [MathJax](https://github.com/mathjax/MathJax) by [Roland Zwaga](https://github.com/rolandzwaga)
|
||||
* [:link:](matter-js/matter-js.d.ts) [Matter.js](https://github.com/liabru/matter-js) by [Ivane Gegia](https://twitter.com/ivanegegia)
|
||||
* [:link:](mCustomScrollbar/mCustomScrollbar.d.ts) [mCustomScrollbar](https://github.com/malihu/malihu-custom-scrollbar-plugin) by [Sarah Williams](https://github.com/flurg)
|
||||
* [:link:](memory-cache/memory-cache.d.ts) [memory-cache](http://github.com/ptarjan/node-cache) by [Jeff Goddard](https://github.com/jedigo)
|
||||
* [:link:](mendixmodelsdk/mendixmodelsdk.d.ts) [mendixmodelsdk](http://www.mendix.com) by [Mendix](https://github.com/mendix)
|
||||
* [:link:](merge-stream/merge-stream.d.ts) [merge-stream](https://github.com/grncdr/merge-stream) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](merge2/merge2.d.ts) [merge2](https://github.com/teambition/merge2) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](meshblu/meshblu.d.ts) [meshblu.js](https://github.com/octoblu/meshblu-npm) by [Felipe Nipo](https://github.com/fnipo)
|
||||
@@ -787,16 +802,16 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](mobile-detect/mobile-detect.d.ts) [mobile-detect](http://hgoebl.github.io/mobile-detect.js) by [Martin McWhorter](https://github.com/martinmcwhorter)
|
||||
* [:link:](mobservable/mobservable.d.ts) [mobservable](https://mweststrate.github.io/mobservable) by [Michel Weststrate](https://github.com/mweststrate)
|
||||
* [:link:](mobservable-react/mobservable-react.d.ts) [mobservable](https://github.com/mweststrate/mobservable-react) by [Michel Weststrate](https://github.com/mweststrate)
|
||||
* [:link:](mocha/mocha-node.d.ts) [mocha](http://mochajs.org) by [Vadim Macagon](https://github.com/enlight), [vvakame](https://github.com/vvakame)
|
||||
* [:link:](mocha/mocha.d.ts) [mocha](http://mochajs.org) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [otiai10](https://github.com/otiai10), [jt000](https://github.com/jt000), [Vadim Macagon](https://github.com/enlight)
|
||||
* [:link:](mocha/mocha-node.d.ts) [mocha](http://mochajs.org) by [Vadim Macagon](https://github.com/enlight), [vvakame](https://github.com/vvakame)
|
||||
* [:link:](mocha-phantomjs/mocha-phantomjs.d.ts) [mocha-phantomjs](http://metaskills.net/mocha-phantomjs) by [Erik Schierboom](https://github.com/ErikSchierboom)
|
||||
* [:link:](mock-fs/mock-fs.d.ts) [mock-fs](https://github.com/tschaub/mock-fs) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](mockery/mockery.d.ts) [mockery](https://github.com/mfncooper/mockery) by [jt000](https://github.com/jt000)
|
||||
* [:link:](modernizr/modernizr.d.ts) [Modernizr](http://modernizr.com) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb)
|
||||
* [:link:](moment-timezone/moment-timezone.d.ts) [moment-timezone.js](http://momentjs.com/timezone) by [Michel Salib](https://github.com/michelsalib)
|
||||
* [:link:](moment/moment-node.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
|
||||
* [:link:](moment/moment.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
|
||||
* [:link:](moment-range/moment-range.d.ts) [Moment.js](https://github.com/gf3/moment-range) by [Bart van den Burg](https://github.com/Burgov), [Wilgert Velinga](https://github.com/wilgert)
|
||||
* [:link:](moment/moment-node.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
|
||||
* [:link:](mongodb/mongodb.d.ts) [MongoDB](https://github.com/mongodb/node-mongodb-native) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](mongoose/mongoose.d.ts) [Mongoose](http://mongoosejs.com) by [horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](mongoose-mock/mongoose-mock.d.ts) [mongoose-mock](https://github.com/JohanObrink/mongoose-mock) by [jt000](https://github.com/jt000)
|
||||
@@ -845,6 +860,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](node-cache/node-cache.d.ts) [node-cache](https://github.com/tcs-de/nodecache) by [Ilya Mochalov](https://github.com/chrootsu)
|
||||
* [:link:](node-calendar/node-calendar.d.ts) [node-calendar](https://www.npmjs.com/package/node-calendar) by [Luzian Zagadinow](https://github.com/luzianz)
|
||||
* [:link:](config/config.d.ts) [node-config](https://github.com/lorenwest/node-config) by [Roman Korneev](https://github.com/RWander)
|
||||
* [:link:](node-config-manager/node-config-manager.d.ts) [node-config-manager](https://www.npmjs.com/package/node-config-manager) by [TANAKA Koichi](https://gitnub.com/mugeso)
|
||||
* [:link:](convict/convict.d.ts) [node-convict](https://github.com/mozilla/node-convict) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](node-ffi/node-ffi.d.ts) [node-ffi](https://github.com/rbranson/node-ffi) by [Paul Loyd](https://github.com/loyd)
|
||||
* [:link:](node-fibers/node-fibers.d.ts) [node-fibers](https://github.com/laverdet/node-fibers) by [Cary Haynie](https://github.com/caryhaynie)
|
||||
@@ -866,7 +882,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](node-schedule/node-schedule.d.ts) [node-schedule](https://github.com/tejasmanohar/node-schedule) by [Cyril Schumacher](https://github.com/cyrilschumacher)
|
||||
* [:link:](node-slack/node-slack.d.ts) [node-slack](https://github.com/xoxco/node-slack) by [Qubo](https://github.com/tkQubo)
|
||||
* [:link:](stack-trace/stack-trace.d.ts) [node-stack-trace](https://github.com/felixge/node-stack-trace) by [Exceptionless](https://github.com/exceptionless)
|
||||
* [:link:](node-uuid/node-uuid-global.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay)
|
||||
* [:link:](node-uuid/node-uuid.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay)
|
||||
* [:link:](node-uuid/node-uuid-base.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay)
|
||||
* [:link:](node-uuid/node-uuid-cjs.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay)
|
||||
* [:link:](node-validator/node-validator.d.ts) [node-validator](https://www.npmjs.com/package/node-validator) by [Ken Gorab](https://github.com/kengorab)
|
||||
* [:link:](node-webkit/node-webkit.d.ts) [node-webkit](https://github.com/rogerwang/node-webkit) by [Pedro Casaubon](https://github.com/xperiments)
|
||||
* [:link:](xml2js/xml2js.d.ts) [node-xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) by [Michel Salib](https://github.com/michelsalib), [Jason McNeil](https://github.com/jasonrm)
|
||||
* [:link:](node/node.d.ts) [Node.js](http://nodejs.org) by [Microsoft TypeScript](http://typescriptlang.org), [DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped)
|
||||
@@ -884,13 +904,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](nopt/nopt.d.ts) [nopt](https://github.com/npm/nopt) by [jbondc](https://github.com/jbondc)
|
||||
* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker)
|
||||
* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar)
|
||||
* [:link:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) by [Patrick Davies](https://github.com/bleuarg)
|
||||
* [:link:](wnumb/wnumb.d.ts) [nouislider](https://github.com/leongersen/wnumb) by [Corey Jepperson](https://github.com/acoreyj)
|
||||
* [:link:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) by [Patrick Davies](https://github.com/bleuarg)
|
||||
* [:link:](noVNC/noVNC.d.ts) [noVNC](https://github.com/kanaka/noVNC) by [Ken Smith](https://github.com/smithkl42)
|
||||
* [:link:](npm/npm.d.ts) [npm](https://github.com/npm/npm) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](nprogress/NProgress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com)
|
||||
* [:link:](numbro/numbro.d.ts) [Numbro.js](https://github.com/foretagsplatsen/numbro) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](numeraljs/numeraljs.d.ts) [Numeral.js](https://github.com/adamwdraper/Numeral-js) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](obelisk.js/obelisk.js.d.ts) [obelisk.js](https://github.com/nosir/obelisk.js) by [Brian Drupieski](https://github.com/bdrupieski)
|
||||
* [:link:](object-assign/object-assign.d.ts) [object-assign](https://github.com/sindresorhus/object-assign) by [Christopher Brown](https://github.com/chbrown)
|
||||
* [:link:](object-hash/object-hash.d.ts) [object-hash](https://github.com/puleos/object-hash) by [Michael Zabka](https://github.com/misak113)
|
||||
* [:link:](object-path/object-path.d.ts) [objectPath v0.9.x](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar)
|
||||
@@ -904,6 +925,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](onsenui/onsenui.d.ts) [Onsen UI](http://onsen.io) by [Fran Dios](https://github.com/frankdiox)
|
||||
* [:link:](open/open.d.ts) [open](https://github.com/jjrdn/node-open) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](openlayers/openlayers.d.ts) [OpenLayers](http://openlayers.org) by [Wouter Goedhart](https://github.com/woutergd)
|
||||
* [:link:](openpgp/openpgp.d.ts) [openpgpjs](http://openpgpjs.org) by [Guillaume Lacasa](https://blog.lacasa.fr)
|
||||
* [:link:](opn/opn.d.ts) [opn](https://github.com/sindresorhus/opn) by [Shinnosuke Watanabe](https://github.com/shinnn)
|
||||
* [:link:](optimist/optimist.d.ts) [optimist](https://github.com/substack/node-optimist) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](orchestrator/orchestrator.d.ts) [Orchestrator](https://github.com/orchestrator/orchestrator) by [Qubo](https://github.com/tkQubo)
|
||||
@@ -919,9 +941,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](pascal-case/pascal-case.d.ts) [pascal-case](https://github.com/blakeembrey/pascal-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](passport/passport.d.ts) [Passport](http://passportjs.org) by [Horiuchi_H](https://github.com/horiuchi)
|
||||
* [:link:](passport-strategy/passport-strategy.d.ts) [Passport Strategy module](https://github.com/jaredhanson/passport-strategy) by [Lior Mualem](https://github.com/liorm)
|
||||
* [:link:](passport-facebook/passport-facebook.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](passport-google-oauth/passport-google-oauth.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](passport-twitter/passport-twitter.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](passport-google-oauth/passport-google-oauth.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](passport-facebook/passport-facebook.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](passport-facebook-token/passport-facebook-token.d.ts) [passport-facebook-token](https://github.com/drudge/passport-facebook-token) by [Ray Martone](https://github.com/rmartone)
|
||||
* [:link:](passport-local/passport-local.d.ts) [passport-local](https://github.com/jaredhanson/passport-local) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](path-case/path-case.d.ts) [path-case](https://github.com/blakeembrey/path-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
@@ -942,6 +964,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](phonegap/phonegap.d.ts) [PhoneGap](http://phonegap.com) by [Boris Yankov](https://github.com/borisyankov), [Dick van den Brink](https://github.com/DickvdBrink)
|
||||
* [:link:](phonegap-facebook-plugin/phonegap-facebook-plugin.d.ts) [phonegap-facebook-plugin](https://github.com/Wizcorp/phonegap-facebook-plugin) by [Justin Unterreiner](https://github.com/Justin-Credible)
|
||||
* [:link:](phonegap-plugin-push/phonegap-plugin-push.d.ts) [phonegap-plugin-push](https://github.com/phonegap/phonegap-plugin-push) by [Frederico Galvão](https://github.com/fredgalvao)
|
||||
* [:link:](urbanairship-cordova/urbanairship-cordova.d.ts) [phonegap-ua-push](https://github.com/urbanairship/phonegap-ua-push) by [Justin Unterreiner](https://github.com/Justin-Credible)
|
||||
* [:link:](photonui/photonui.d.ts) [PhotonUI](https://github.com/wanadev/PhotonUI) by [Florent Poujol](https://github.com/florentpoujol)
|
||||
* [:link:](photoswipe/photoswipe.d.ts) [PhotoSwipe](http://photoswipe.com) by [Xiaohan Zhang](https://github.com/hellochar)
|
||||
* [:link:](physijs/physijs.d.ts) [Physijs](http://chandlerprall.github.io/Physijs) by [Satoru Kimura](https://github.com/gyohk)
|
||||
@@ -1000,6 +1023,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](react/react-global.d.ts) [React (namespace)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com)
|
||||
* [:link:](react-dnd/react-dnd.d.ts) [React DnD](https://github.com/gaearon/react-dnd) by [Asana](https://asana.com)
|
||||
* [:link:](react-router/react-router.d.ts) [React Router](https://github.com/rackt/react-router) by [Yuichi Murata](https://github.com/mrk21), [Václav Ostrožlík](https://github.com/vasek17)
|
||||
* [:link:](react-bootstrap/react-bootstrap.d.ts) [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) by [Walker Burgin](https://github.com/walkerburgin)
|
||||
* [:link:](react-mixin/react-mixin.d.ts) [react-mixin](https://github.com/brigand/react-mixin) by [Qubo](https://github.com/tkqubo)
|
||||
* [:link:](react-props-decorators/react-props-decorators.d.ts) [react-props-decorators](https://github.com/popkirby/react-props-decorators) by [Qubo](https://github.com/tkqubo)
|
||||
* [:link:](react-redux/react-redux.d.ts) [react-redux](https://github.com/rackt/react-redux) by [Qubo](https://github.com/tkqubo)
|
||||
@@ -1014,6 +1038,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](redux-actions/redux-actions.d.ts) [redux-actions](https://github.com/acdlite/redux-actions) by [Jack Hsu](https://github.com/jaysoo)
|
||||
* [:link:](redux-devtools/redux-devtools.d.ts) [redux-devtools](https://github.com/gaearon/redux-devtools) by [Qubo](https://github.com/tkqubo)
|
||||
* [:link:](redux-logger/redux-logger.d.ts) [redux-logger](https://github.com/fcomb/redux-logger) by [Alexander Rusakov](https://github.com/arusakov)
|
||||
* [:link:](redux-thunk/redux-thunk.d.ts) [redux-thunk](https://github.com/gaearon/redux-thunk) by [Qubo](https://github.com/tkqubo)
|
||||
* [:link:](ref/ref.d.ts) [ref](https://github.com/TooTallNate/ref) by [Paul Loyd](https://github.com/loyd)
|
||||
* [:link:](ref-array/ref-array.d.ts) [ref-array](https://github.com/TooTallNate/ref-array) by [Paul Loyd](https://github.com/loyd)
|
||||
* [:link:](ref-struct/ref-struct.d.ts) [ref-struct](https://github.com/TooTallNate/ref-struct) by [Paul Loyd](https://github.com/loyd)
|
||||
@@ -1035,6 +1060,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](riotjs/riotjs.d.ts) [riot.js](https://github.com/moot/riotjs) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](riotcontrol/riotcontrol.d.ts) [RiotControl](https://github.com/jimsparkman/RiotControl) by [Ilya Mochalov](https://github.com/chrootsu)
|
||||
* [:link:](rivets/rivets.d.ts) [rivets](http://rivetsjs.com) by [Trevor Baron](https://github.com/TrevorDev)
|
||||
* [:link:](rosie/rosie.d.ts) [rosie](https://github.com/rosiejs/rosie) by [Abner Oliveira](https://github.com/abner)
|
||||
* [:link:](route-recognizer/route-recognizer.d.ts) [route-recognizer](https://github.com/tildeio/route-recognizer) by [Dave Keen](http://www.keendevelopment.ch)
|
||||
* [:link:](routie/routie.d.ts) [routie](https://github.com/jgallen23/routie) by [Adilson](https://github.com/Adilson)
|
||||
* [:link:](rsmq/rsmq.d.ts) [rsmq](http://smrchy.github.io/rsmq) by [Qubo](https://github.com/MugeSo)
|
||||
@@ -1060,11 +1086,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](sanitize-filename/sanitize-filename.d.ts) [sanitize-filename](https://github.com/parshap/node-sanitize-filename) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](sanitize-html/sanitize-html.d.ts) [sanitize-html](https://github.com/punkave/sanitize-html) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](sanitizer/sanitizer.d.ts) [Sanitizer](https://github.com/theSmaw/Caja-HTML-Sanitizer) by [Dave Taylor](http://davetayls.me)
|
||||
* [:link:](satnav/satnav.d.ts) [satnav](https://github.com/f5io/satnav-js) by [Christian Holm Diget](https://github.com/DotNetNerd)
|
||||
* [:link:](sax/sax.d.ts) [sax js](https://github.com/isaacs/sax-js) by [Asana](https://asana.com)
|
||||
* [:link:](screenfull/screenfull.d.ts) [screenfull.js](https://github.com/sindresorhus/screenfull.js) by [Ilia Choly](http://github.com/icholy)
|
||||
* [:link:](scrolltofixed/scrolltofixed.d.ts) [ScrollToFixed](https://github.com/bigspotteddog/ScrollToFixed) by [Ben Dixon](https://github.com/bmdixon)
|
||||
* [:link:](seedrandom/seedrandom.d.ts) [seedrandom](https://github.com/davidbau/seedrandom) by [Kern Handa](https://github.com/kernhanda)
|
||||
* [:link:](segment-analytics/segment-analytics.d.ts) [Segment's analytics.js](https://segment.com/docs/libraries/analytics.js) by [Andrew Fong](https://github.com/fongandrew)
|
||||
* [:link:](analytics-node/analytics-node.d.ts) [Segment's analytics.js for Node.js](https://segment.com/docs/libraries/node) by [Andrew Fong](https://github.com/fongandrew)
|
||||
* [:link:](select2/select2.d.ts) [Select2](http://ivaynberg.github.com/select2) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](selectize/selectize.d.ts) [Selectize](https://github.com/brianreavis/selectize.js) by [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](selenium-webdriver/selenium-webdriver.d.ts) [Selenium WebDriverJS](https://code.google.com/p/selenium) by [Bill Armstrong](https://github.com/BillArmstrong), [Yuki Kokubun](https://github.com/Kuniwak)
|
||||
@@ -1104,11 +1132,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](slickgrid/slick.rowselectionmodel.d.ts) [SlickGrid RowSelectionModel Plugin](https://github.com/mleibman/SlickGrid) by [Derek Cicerone](https://github.com/derekcicerone)
|
||||
* [:link:](smoothie/smoothie.d.ts) [Smoothie Charts](https://github.com/joewalnes/smoothie) by [Drew Noakes](https://drewnoakes.com), [Mike H. Hawley](https://github.com/mikehhawley)
|
||||
* [:link:](snake-case/snake-case.d.ts) [snake-case](https://github.com/blakeembrey/snake-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](snapsvg/snapsvg.d.ts) [Snap-SVG](https://github.com/adobe-webplatform/Snap.svg) by [Lars Klein](https://github.com/lhk)
|
||||
* [:link:](snapsvg/snapsvg.d.ts) [Snap-SVG](https://github.com/adobe-webplatform/Snap.svg) by [Lars Klein](https://github.com/lhk), [Mattanja Kern](https://github.com/mattanja)
|
||||
* [:link:](socket.io/socket.io.d.ts) [socket.io](http://socket.io) by [PROGRE](https://github.com/progre), [Damian Connolly](https://github.com/divillysausages)
|
||||
* [:link:](socket.io-client/socket.io-client.d.ts) [socket.io-client](http://socket.io) by [PROGRE](https://github.com/progre), [Damian Connolly](https://github.com/divillysausages)
|
||||
* [:link:](socket.io.users/socket.io.users.d.ts) [socket.io.users](https://github.com/nodets/socket.io.users) by [Makis Maropoulos](https://github.com/kataras)
|
||||
* [:link:](sockjs/sockjs.d.ts) [SockJS 0.3.x](https://github.com/sockjs/sockjs-client) by [Emil Ivanov](https://github.com/vladev)
|
||||
* [:link:](sockjs-client/sockjs-client.d.ts) [sockjs-client](https://github.com/sockjs/sockjs-client) by [Emil Ivanov](https://github.com/vladev), [Alexander Rusakov](https://github.com/arusakov)
|
||||
* [:link:](sockjs-node/sockjs-node.d.ts) [sockjs-node 0.3.x](https://github.com/sockjs/sockjs-node) by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing)
|
||||
* [:link:](soundjs/soundjs.d.ts) [SoundJS](http://www.createjs.com/#!/SoundJS) by [Pedro Ferreira](https://bitbucket.org/drk4)
|
||||
* [:link:](source-map/source-map.d.ts) [source-map](https://github.com/mozilla/source-map) by [Morten Houston Ludvigsen](https://github.com/MortenHoustonLudvigsen)
|
||||
@@ -1125,6 +1154,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](stack-mapper/stack-mapper.d.ts) [stack-mapper](https://github.com/thlorenz/stack-mapper) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](stacktrace-js/stacktrace-js.d.ts) [stacktrace.js](https://github.com/stacktracejs/stacktrace.js) by [Exceptionless](https://github.com/exceptionless)
|
||||
* [:link:](stampit/stampit.d.ts) [stampit](https://github.com/stampit-org/stampit) by [Vasyl Boroviak](https://github.com/koresar)
|
||||
* [:link:](stamplay-js-sdk/stamplay-js-sdk.d.ts) [stamplay-js-sdk](https://github.com/Stamplay/stamplay-js-sdk) by [Riderman de Sousa Barbosa](https://github.com/ridermansb)
|
||||
* [:link:](static-eval/static-eval.d.ts) [static-eval](https://github.com/substack/static-eval) by [Ben Liddicott](https://github.com/benliddicott/DefinitelyTyped)
|
||||
* [:link:](stats/stats.d.ts) [Stats.js r12](http://github.com/mrdoob/stats.js) by [Gregory Dalton](https://github.com/gregolai)
|
||||
* [:link:](statsd-client/statsd-client.d.ts) [statsd-client](https://github.com/msiebuhr/node-statsd-client) by [Peter Kooijmans](https://github.com/peterkooijmans)
|
||||
@@ -1159,7 +1189,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](swipe/swipe.d.ts) [Swipe](https://github.com/thebird/Swipe) by [Andrey Kurdyumov](https://github.com/kant2002)
|
||||
* [:link:](swiper/swiper.d.ts) [Swiper](https://github.com/nolimits4web/Swiper) by [Sebastián Galiano](https://github.com/sgaliano)
|
||||
* [:link:](swipeview/swipeview.d.ts) [SwipeView](http://cubiq.org/swipeview) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](switchery/switchery.d.ts) [switchery](https://github.com/abpetkov/switchery) by [Bruno Grieder](https://github.com/bgrieder)
|
||||
* [:link:](switchery/switchery.d.ts) [switchery](https://github.com/abpetkov/switchery) by [Bruno Grieder](https://github.com/bgrieder), [Clayton Lautier](https://github.com/claylaut)
|
||||
* [:link:](swiz/swiz.d.ts) [swiz](https://github.com/racker/node-swiz) by [Jeff Goddard](https://github.com/jedigo)
|
||||
* [:link:](systemjs/systemjs.d.ts) [System.js](https://github.com/systemjs/systemjs) by [Ludovic HENIN](https://github.com/ludohenin), [Nathan Walker](https://github.com/NathanWalker)
|
||||
* [:link:](tabris/tabris.d.ts) [Tabris.js](http://tabrisjs.com) by [Tabris.js team](http://github.com/eclipsesource/tabris)
|
||||
@@ -1227,14 +1257,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](typescript-deferred/typescript-deferred.d.ts) [typescript-deferred](https://github.com/DirtyHairy/typescript-deferred) by [Christian Speckner](https://github.com/DirtyHairy)
|
||||
* [:link:](typescript-services/typescriptServices.d.ts) [TypeScript-Services](https://www.npmjs.org/package/typescript-services) by [Basarat Ali Syed](http://github.com/basarat)
|
||||
* [:link:](unity-webapi/unity-webapi.d.ts) [Ubuntu Unity Web API](https://launchpad.net/libunity-webapps) by [John Vrbanac](jhttps://github.com/jmvrbanac)
|
||||
* [:link:](ui-grid/ui-grid.d.ts) [ui-grid](http://www.ui-grid.info) by [Ben Tesser](https://github.com/btesser)
|
||||
* [:link:](ui-grid/ui-grid.d.ts) [ui-grid](http://www.ui-grid.info) by [Ben Tesser](https://github.com/btesser), [Joe Skeen](http://github.com/joeskeen)
|
||||
* [:link:](ui-router-extras/ui-router-extras.d.ts) [UI-Router Extras (ct.ui.router.extras module)](https://github.com/christopherthielen/ui-router-extras) by [Michael Putters](https://github.com/mputters), [Marcel van de Kamp](https://github.com/marcel-k)
|
||||
* [:link:](umbraco/umbraco-services.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
|
||||
* [:link:](umbraco/umbraco.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
|
||||
* [:link:](umbraco/umbraco-resources.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
|
||||
* [:link:](umbraco/umbraco.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
|
||||
* [:link:](umbraco/umbraco-services.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
|
||||
* [:link:](underscore/underscore.d.ts) [Underscore](http://underscorejs.org) by [Boris Yankov](https://github.com/borisyankov), [Josh Baldwin](https://github.com/jbaldwin)
|
||||
* [:link:](underscore-ko/underscore-ko.d.ts) [Underscore-ko 1.2.2 with underscore](https://github.com/kamranayub/UnderscoreKO) by [Maurits Elbers](https://github.com/MagicMau)
|
||||
* [:link:](underscore.string/underscore.string.d.ts) [underscore.string](https://github.com/epeli/underscore.string) by [Ry Racherbaumer](http://github.com/rygine)
|
||||
* [:link:](undertaker/undertaker.d.ts) [undertaker](https://github.com/phated/undertaker) by [Qubo](https://github.com/tkqubo)
|
||||
* [:link:](jquery.uniform/jquery.uniform.d.ts) [Uniform.js](https://github.com/pixelmatrix/uniform) by [flyfishMT](https://github.com/flyfishMT)
|
||||
* [:link:](uniq/uniq.d.ts) [uniq](https://www.npmjs.com/package/uniq) by [Hans Windhoff](https://github.com/hansrwindhoff)
|
||||
* [:link:](unique-random/unique-random.d.ts) [unique-random](https://github.com/sindresorhus/unique-random) by [Yuki Kokubun](https://github.com/Kuniwak)
|
||||
@@ -1274,12 +1305,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](webaudioapi/waa.d.ts) [Web Audio API](http://www.w3.org/TR/webaudio) by [Baruch Berger](https://github.com/bbss), [Kon](http://phyzkit.net), [kubosho](https://github.com/kubosho)
|
||||
* [:link:](webmidi/webmidi.d.ts) [Web MIDI API](http://www.w3.org/TR/webmidi) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](webspeechapi/webspeechapi.d.ts) [Web Speech API](https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html) by [SaschaNaz](https://github.com/saschanaz)
|
||||
* [:link:](webcl/webcl.d.ts) [WebCL](https://www.khronos.org/registry/webcl/specs/1.0.0) by [Ralph Brown](https://github.com/NCARalph)
|
||||
* [:link:](webcola/webcola.d.ts) [webcola](https://github.com/tgdwyer/WebCola) by [Qinfeng Chen](https://github.com/qinfchen)
|
||||
* [:link:](webcomponents.js/webcomponents.js.d.ts) [webcomponents.js](https://github.com/webcomponents/webcomponentsjs) by [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](webcrypto/WebCrypto.d.ts) [WebCrypto](http://www.w3.org/TR/WebCryptoAPI) by [Lucas Dixon](https://github.com/iislucas)
|
||||
* [:link:](webgl-ext/webgl-ext.d.ts) [WebGL Extensions](http://webgl.org) by [Arthur Langereis](https://github.com/zenmumbler)
|
||||
* [:link:](webix/webix.d.ts) [Webix UI](http://webix.com) by [Maksim Kozhukh](http://github.com/mkozhukh)
|
||||
* [:link:](webpack/webpack.d.ts) [webpack](https://github.com/webpack/webpack) by [Qubo](https://github.com/tkqubo)
|
||||
* [:link:](webpack/webpack-env.d.ts) [webpack (module API)](https://github.com/webpack/webpack) by [use-strict](https://github.com/use-strict)
|
||||
* [:link:](webrtc/MediaStream.d.ts) [WebRTC](http://dev.w3.org/2011/webrtc) by [Ken Smith](https://github.com/smithkl42)
|
||||
* [:link:](websocket/websocket.d.ts) [websocket](https://github.com/Worlize/WebSocket-Node) by [Paul Loyd](https://github.com/loyd)
|
||||
* [:link:](websql/websql.d.ts) [websql](http://www.w3.org/TR/webdatabase) by [TeamworkGuy2](https://github.com/TeamworkGuy2)
|
||||
|
||||
Vendored
+288
-80
@@ -178,15 +178,15 @@ declare module AmCharts {
|
||||
/** You can trigger the animation of the pie chart. */
|
||||
animateAgain();
|
||||
/** You can trigger the click on a slice from outside. index - the number of a slice or Slice object. */
|
||||
clickSlice(index);
|
||||
clickSlice(index: number);
|
||||
/** Hides slice. index - the number of a slice or Slice object. */
|
||||
hideSlice(index);
|
||||
hideSlice(index: number);
|
||||
/** You can simulate roll-out of a slice from outside. index - the number of a slice or Slice object. */
|
||||
rollOutSlice(index);
|
||||
rollOutSlice(index: number);
|
||||
/** You can simulate roll-over a slice from outside. index - the number of a slice or Slice object. */
|
||||
rollOverSlice(index);
|
||||
rollOverSlice(index: number);
|
||||
/** Shows slice. index - the number of a slice or Slice object. */
|
||||
showSlice(index);
|
||||
showSlice(index: number);
|
||||
|
||||
/** Adds event listener of the type "clickSlice" or "pullInSlice" or "pullOutSlice" to the object.
|
||||
@param type Always "clickSlice" or "pullInSlice" or "pullOutSlice".
|
||||
@@ -311,22 +311,32 @@ declare module AmCharts {
|
||||
|
||||
If you do not set properties such as dashLength, lineAlpha, lineColor, etc - values of the axis are used.*/
|
||||
class Guide {
|
||||
/** If you set it to true, the guide will be displayed above the graphs. */
|
||||
above: boolean;
|
||||
/** Radar chart only. Specifies angle at which guide should start. Affects only fills, not lines. */
|
||||
angle: number;
|
||||
/** Baloon fill color. */
|
||||
balloonColor: string;
|
||||
/** The text which will be displayed if the user rolls-over the guide. */
|
||||
balloonText: string;
|
||||
/** Specifies if label should be bold or not. */
|
||||
boldLabel: boolean;
|
||||
/** Category of the guide (in case the guide is for category axis). */
|
||||
category: string;
|
||||
/** Dash length. */
|
||||
dashLength: number;
|
||||
/** Date of the guide (in case the guide is for category axis and parseDates is set to true). */
|
||||
date: Date;
|
||||
/** Works if a guide is added to CategoryAxis and this axis is non-date-based. If you set it to true, the guide will start (or be placed, if it's not a fill) on the beginning of the category cell and will end at the end of toCategory cell. */
|
||||
expand: boolean;
|
||||
/** Fill opacity. Value range is 0 - 1. */
|
||||
fillAlpha: number;
|
||||
/** Fill color. */
|
||||
fillColor: string;
|
||||
/** Font size of guide label. */
|
||||
fontSize: string;
|
||||
/** Unique id of a Guide. You don't need to set it, unless you want to. */
|
||||
id: string;
|
||||
/** Specifies whether label should be placed inside or outside plot area. */
|
||||
inside: boolean;
|
||||
/** The label which will be displayed near the guide. */
|
||||
@@ -339,6 +349,8 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
lineColor: string;
|
||||
/** Line thickness. */
|
||||
lineThickness: number;
|
||||
/** Position of guide label. Possible values are "left" or "right" for horizontal axis and "top" or "bottom" for vertical axis. */
|
||||
position: string;
|
||||
/** Tick length. */
|
||||
tickLength: number;
|
||||
/** Radar chart only. Specifies angle at which guide should end. Affects only fills, not lines. */
|
||||
@@ -351,6 +363,8 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
toValue: number;
|
||||
/** Value of the guide (in case the guide is for value axis). */
|
||||
value: number;
|
||||
/** Value axis of a guide. As you can add guides directly to the chart, you might need to specify which which value axis should be used. */
|
||||
valueAxis: ValueAxis;
|
||||
}
|
||||
/** ImagesSettings is a class which holds common settings of all MapImage objects. */
|
||||
class ImagesSettings {
|
||||
@@ -381,7 +395,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** Font size of a label.
|
||||
@default 11
|
||||
*/
|
||||
labelFontSize: number;
|
||||
labelfontSize: string;
|
||||
/** Position of the label. Allowed values are: left, right, top, bottom and middle. right */
|
||||
labelPosition: string;
|
||||
/** Label roll-over color. #00CC00 */
|
||||
@@ -546,7 +560,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** Hides event bullets. */
|
||||
hideStockEvents();
|
||||
/** Removes event listener from the object. */
|
||||
removeListener(obj, type, handler);
|
||||
removeListener(obj: any, type: string, handler: any);
|
||||
/** Removes panel from the stock chart. Requires stockChart.validateNow() method to be called after this action. */
|
||||
removePanel(panel: StockPanel);
|
||||
/** Shows event bullets. */
|
||||
@@ -556,7 +570,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** Method which forces the stock chart to rebuild. Should be called after properties are changed. */
|
||||
validateNow();
|
||||
/** Zooms chart to specified dates. startDate, endDate - Date objects. */
|
||||
zoom(startDate, endDate);
|
||||
zoom(startDate: Date, endDate: Date);
|
||||
/** Zooms out the chart. */
|
||||
zoomOut();
|
||||
|
||||
@@ -716,7 +730,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
*/
|
||||
equalWidths: boolean;
|
||||
/** Font size. Will use chart's font size if not set. */
|
||||
fontSize: number;
|
||||
fontSize: string;
|
||||
/** Horizontal space between legend item and left/right border. */
|
||||
horizontalGap: number;
|
||||
/** The text which will be displayed in the legend. Tag [[title]] will be replaced with the title of the graph. [[title]] */
|
||||
@@ -886,8 +900,17 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** AmChart is a base class of all charts. It can not be instantiated explicitly. AmCoordinateChart, AmPieChart and AmMap extend AmChart class. */
|
||||
class AmChart {
|
||||
/** used when constructing a chart with a theme */
|
||||
constructor(theme: any);
|
||||
/** Background color. You should set backgroundAlpha to >0 value in order background to be visible. We recommend setting background color directly on a chart's DIV instead of using this property. #FFFFFF */
|
||||
constructor(theme?: any);
|
||||
/** Specifies, if class names should be added to chart elements. */
|
||||
addClassNames: boolean;
|
||||
/** Array of Labels. Example of label object, with all possible properties:
|
||||
{"x": 20, "y": 20, "text": "this is label", "align": "left", "size": 12, "color": "#CC0000", "alpha": 1, "rotation": 0, "bold": true, "url": "http://www.amcharts.com"} */
|
||||
allLabels: Label[];
|
||||
/** Set this to false if you don't want chart to resize itself whenever its parent container size changes. */
|
||||
autoResize: boolean;
|
||||
/** Opacity of background. Set it to >0 value if you want backgroundColor to work. However we recommend changing div's background-color style for changing background color. */
|
||||
backgroundAlpha: number;
|
||||
/** Background color. You should set backgroundAlpha to >0 value in order background to be visible. We recommend setting background color directly on a chart's DIV instead of using this property. #FFFFFF */
|
||||
backgroundColor: string;
|
||||
/** The chart creates AmBalloon class itself. If you want to customize balloon, get balloon instance using this property, and then change balloon's properties. AmBalloon */
|
||||
balloon: AmBalloon;
|
||||
@@ -895,32 +918,83 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
borderAlpha: number;
|
||||
/** Color of chart's border. You should set borderAlpha >0 in order border to be visible. We recommend setting border color directly on a chart's DIV instead of using this property. #000000 */
|
||||
borderColor: string;
|
||||
/** This prefix is added to all class names which are added to all visual elements of a chart in case addClassNames is set to true. */
|
||||
classNamePrefix: string;
|
||||
/** Text color. #000000 */
|
||||
color: string;
|
||||
/** Non-commercial version only. Specifies position of link to amCharts site. Allowed values are: top-left, top-right, bottom-left and bottom-right.
|
||||
@default 'top-left'
|
||||
*/
|
||||
creditsPosition: string;
|
||||
/** Array of data objects, for example: [{country:"US", value:524},{country:"UK", value:624},{country:"Lithuania", value:824}]. You can have any number of fields and use any field names. In case of AmMap, data provider should be MapData object. */
|
||||
dataProvider: any[];
|
||||
/** Decimal separator.
|
||||
@Default . */
|
||||
decimalSeparator: string;
|
||||
/** Using this property you can add any additional information to SVG, like SVG filters or clip paths. The structure of this object should be identical to XML structure of a object you are adding, only in JSON format. */
|
||||
defs: any;
|
||||
/** Export config. Specifies how export to image/data export/print/annotate menu will look and behave. You can find a lot of examples in amcharts/plugins/export folder. */
|
||||
export: ExportSettings;
|
||||
/** Font family. Verdana */
|
||||
fontFamily: string;
|
||||
/** Font size.
|
||||
@default 11
|
||||
*/
|
||||
fontSize: number;
|
||||
/** Height of a chart. "100%" means the chart's height will be equal to it's container's (DIV) height and will resize if height of the container changes. Set a number instead of percents if your chart's size needs to be fixed.
|
||||
@default 1
|
||||
fontSize: string;
|
||||
/** If you set this to true, the lines of the chart will be distorted and will produce hand-drawn effect. Try to adjust chart.handDrawScatter and chart.handDrawThickness properties for a more scattered result.
|
||||
@Default false
|
||||
*/
|
||||
height: any;
|
||||
handDrawn: boolean;
|
||||
/** Defines by how many pixels hand-drawn line (when handDrawn is set to true) will fluctuate.
|
||||
@Default 2
|
||||
*/
|
||||
handDrawScatter: number;
|
||||
/** Defines by how many pixels line thickness will fluctuate (when handDrawn is set to true).
|
||||
@Default 1
|
||||
*/
|
||||
handDrawThickness: number;
|
||||
/** Time, in milliseconds after which balloon is hidden if the user rolls-out of the object. Might be useful for AmMap to avoid balloon flickering while moving mouse over the areas. Note, this is not duration of fade-out. Duration of fade-out is set in AmBalloon class.
|
||||
@Default 150
|
||||
*/
|
||||
hideBalloonTime: number;
|
||||
/** Legend of a chart. */
|
||||
legend: AmLegend;
|
||||
/** Reference to the div of the legend. */
|
||||
legendDiv: HTMLElement;
|
||||
/** Object with precision, decimalSeparator and thousandsSeparator set which will be used for number formatting. Precision set to -1 means that values won't be rounded. {precision:-1, decimalSeparator:'.', thousandsSeparator:','} */
|
||||
numberFormatter: Object;
|
||||
/** You can add listeners of events using this property. Example: listeners = [{"event":"dataUpdated", "method":handleEvent}]; */
|
||||
listerns: Object[];
|
||||
/** This setting affects touch-screen devices only. If a chart is on a page, and panEventsEnabled are set to true, the page won't move if the user touches the chart first. If a chart is big enough and occupies all the screen of your touch device, the user won’t be able to move the page at all. That's why the default value is "false". If you think that selecting/panning the chart or moving/pinching the map is a primary purpose of your users, you should set panEventsEnabled to true. */
|
||||
panEventsEnabled: boolean;
|
||||
/** Object with precision, decimalSeparator and thousandsSeparator set which will be used for formatting percent values. {precision:2, decimalSeparator:'.', thousandsSeparator:','} */
|
||||
percentFormatter: Object;
|
||||
/** Specifies absolute or relative path to amCharts files, i.e. "amcharts/". (where all .js files are located)
|
||||
If relative URLs are used, they will be relative to the current web page, displaying the chart.
|
||||
You can also set path globally, using global JavaScript variable AmCharts_path. If this variable is set, and "path" is not set in chart config, the chart will assume the path from the global variable. This allows setting amCharts path globally. I.e.:
|
||||
var AmCharts_path = "/libs/amcharts/";
|
||||
"path" parameter will be used by the charts to locate it's files, like images, plugins or patterns.*/
|
||||
path: string;
|
||||
/** Specifies path to the folder where images like resize grips, lens and similar are.
|
||||
IMPORTANT: Since V3.14.12, you should use "path" to point to amCharts directory instead. The "pathToImages" will be automatically set and does not need to be in the chart config, unless you keep your images separately from other amCharts files. */
|
||||
pathToImages: string;
|
||||
/** Precision of percent values. -1 means percent values won't be rounded at all and show as they are.
|
||||
@default 2
|
||||
*/
|
||||
percentPrecision: number;
|
||||
/** Precision of values. -1 means values won't be rounded at all and show as they are.
|
||||
@Default 1*/
|
||||
precision: number;
|
||||
/** Prefixes which are used to make big numbers shorter: 2M instead of 2000000, etc. Prefixes are used on value axes and in the legend. To enable prefixes, set usePrefixes property to true. [{number:1e+3,prefix:"k"},{number:1e+6,prefix:"M"},{number:1e+9,prefix:"G"},{number:1e+12,prefix:"T"},{number:1e+15,prefix:"P"},{number:1e+18,prefix:"E"},{number:1e+21,prefix:"Z"},{number:1e+24,prefix:"Y"}] */
|
||||
prefixesOfBigNumbers: any[];
|
||||
/** Prefixes which are used to make small numbers shorter: 2μ instead of 0.000002, etc. Prefixes are used on value axes and in the legend. To enable prefixes, set usePrefixes property to true. [{number:1e-24, prefix:"y"},{number:1e-21, prefix:"z"},{number:1e-18, prefix:"a"},{number:1e-15, prefix:"f"},{number:1e-12, prefix:"p"},{number:1e-9, prefix:"n"},{number:1e-6, prefix:"μ"},{number:1e-3, prefix:"m"}] */
|
||||
prefixesOfSmallNumbers: any[];
|
||||
/** Theme of a chart. Config files of themes can be found in amcharts/themes/ folder. More info about using themes. */
|
||||
theme: string;
|
||||
/** Thousands separator.
|
||||
@default .
|
||||
*/
|
||||
thousandsSeparator: string;
|
||||
/** Array of Title objects. */
|
||||
titles: Title[];
|
||||
/** Type of a chart. Required when creating chart using JSON. Possible types are: serial, pie, xy, radar, funnel, gauge, map, stock. */
|
||||
type: string;
|
||||
/** If true, prefixes will be used for big and small numbers. You can set arrays of prefixes via prefixesOfSmallNumbers and prefixesOfBigNumbers properties. */
|
||||
usePrefixes: boolean;
|
||||
/** Read-only. Indicates current version of a script. */
|
||||
@@ -938,7 +1012,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
bold - specifies if text is bold (true/false),
|
||||
url - url
|
||||
*/
|
||||
addLabel(x: number, y: number, text: string, align: string, size, color: string, rotation, alpha: number, bold: boolean, url: string);
|
||||
addLabel(x: number, y: number, text: string, align: string, size: number, color: string, rotation: number, alpha: number, bold: boolean, url: string);
|
||||
/** Adds a legend to the chart.
|
||||
By default, you don't need to create div for your legend, however if you want it to be positioned in some different way, you can create div anywhere you want and pass id or reference to your div as a second parameter.
|
||||
(NOTE: This method will not work on StockPanel.)
|
||||
@@ -955,7 +1029,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
addLegend(legend: AmLegend, legendDiv: HTMLElement);
|
||||
|
||||
/** Adds title to the top of the chart. Pie, Radar positions are updated so that they won't overlap. Plot area of Serial/XY chart is also updated unless autoMargins property is set to false. You can add any number of titles - each of them will be placed in a new line. To remove titles, simply clear titles array: chart.titles = []; and call chart.validateNow() method. text - text of a title size - font size color - title color alpha - title opacity bold - boolean value indicating if title should be bold. */
|
||||
addTitle(text, size, color, alpha, bold);
|
||||
addTitle(text: string, size: number, color: string, alpha: number, bold: boolean);
|
||||
/** Clears the chart area, intervals, etc. */
|
||||
clear();
|
||||
/** Removes all labels added to the chart. */
|
||||
@@ -996,34 +1070,22 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** AmCoordinateChart is a base class of AmRectangularChart. It can not be instantiated explicitly. */
|
||||
|
||||
class AmCoordinateChart extends AmChart {
|
||||
/** Read-only. Array, holding processed chart's data. */
|
||||
chartData: Object[];
|
||||
/** Specifies the colors of the graphs if the lineColor of a graph is not set.
|
||||
It there are more graphs then colors in this array, the chart picks random color.
|
||||
@default ['#FF6600', '#FCD202', '#B0DE09', '#0D8ECF', '#2A0CD0', '#CD0D74', '#CC0000', '#00CC00', '#0000CC', '#DDDDDD', '#999999', '#333333', '#990000'] */
|
||||
colors: any[];
|
||||
colors: string[];
|
||||
/** The array of graphs belonging to this chart.
|
||||
To add/remove graph use addGraph/removeGraph methods instead of adding/removing graphs directly to array.
|
||||
*/
|
||||
graphs: any[];
|
||||
/** The opacity of plot area's border.
|
||||
Value range is 0 - 1.
|
||||
graphs: AmGraph[];
|
||||
/** Specifies if grid should be drawn above the graphs or below. Will not work properly with 3D charts.
|
||||
@default false
|
||||
*/
|
||||
plotAreaBorderAlpha: number;
|
||||
/** The color of the plot area's border.
|
||||
Note, the it is invisible by default, as plotAreaBorderAlpha default value is 0.
|
||||
Set it to a value higher than 0 to make it visible.
|
||||
@default #000000
|
||||
*/
|
||||
plotAreaBorderColor: string;
|
||||
/** Opacity of plot area.
|
||||
Plural form is used to keep the same property names as our Flex charts'.
|
||||
Flex charts can accept array of numbers to generate gradients.
|
||||
Although you can set array here, only first value of this array will be used.
|
||||
*/
|
||||
plotAreaFillAlphas: number;
|
||||
/** You can set both one color if you need a solid color or array of colors to generate gradients, for example: ["#000000", "#0000CC"]
|
||||
@default #FFFFFF
|
||||
*/
|
||||
plotAreaFillColors: any;
|
||||
gridAboveGraphs: boolean;
|
||||
/** Instead of adding guides to the axes, you can push all of them to this array. In case guide has category or date defined, it will automatically will be assigned to the category axis. Otherwise to first value axis, unless you specify a different valueAxis for the guide. */
|
||||
guides: Guide[];
|
||||
/** Specifies whether the animation should be sequenced or all objects should appear at once.
|
||||
@default true
|
||||
*/
|
||||
@@ -1053,6 +1115,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** Adds a graph to the chart.
|
||||
*/
|
||||
addGraph(graph: AmGraph);
|
||||
/** Adds a legend to the chart. By default, you don't need to create div for your legend, however if you want it to be positioned in some different way, you can create div anywhere you want and pass id or reference to your div as a second parameter. (NOTE: This method will not work on StockPanel.) */
|
||||
/** Adds value axis to the chart.
|
||||
One value axis is created automatically, so if you don't want to change anything or add more value axes, you don't need to add it.
|
||||
*/
|
||||
@@ -1186,16 +1249,16 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
startOnAxis: boolean;
|
||||
|
||||
/** Number returns coordinate of a category. Works only if parseDates is false. If parseDates is true, use dateToCoordinate method. category - String */
|
||||
categoryToCoordinate(category);
|
||||
categoryToCoordinate(category: string);
|
||||
|
||||
/** date - Date object Returns Date of the coordinate, in case parseDates is set to true and equalSpacing is set to false. coordinate - Number */
|
||||
coordinateToDate(coordinate);
|
||||
coordinateToDate(coordinate: number);
|
||||
|
||||
/** Number Returns coordinate of the date, in case parseDates is set to true. if parseDates is false, use categoryToCoordinate method. date - Date object */
|
||||
dateToCoordinate(date);
|
||||
dateToCoordinate(date: Date);
|
||||
|
||||
/** Number Returns index of the category which is most close to specified coordinate. x - coordinate */
|
||||
xToIndex(x);
|
||||
xToIndex(x: number);
|
||||
}
|
||||
|
||||
/** ChartScrollbar class displays chart scrollbar. Supported by AmSerialChart and AmXYChart.
|
||||
@@ -1269,7 +1332,9 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
|
||||
/** AmRectangularChart is a base class of AmSerialChart and AmXYChart. It can not be instantiated explicitly.*/
|
||||
class AmRectangularChart extends AmCoordinateChart {
|
||||
/** The angle of the 3D part of plot area. This creates a 3D effect (if the "depth3D" is > 0). */
|
||||
/** The angle of the 3D part of plot area. This creates a 3D effect (if the "depth3D" is > 0).
|
||||
@default 0
|
||||
*/
|
||||
angle: number;
|
||||
/** Space left from axis labels/title to the chart's outside border, if autoMargins set to true.
|
||||
@default 10
|
||||
@@ -1279,11 +1344,12 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
@default true
|
||||
*/
|
||||
autoMargins: boolean;
|
||||
/** Chart cursor. */
|
||||
/** Cursor of a chart. */
|
||||
chartCursor: ChartCursor;
|
||||
/** Chart scrollbar. */
|
||||
chartScrollbar: ChartScrollbar;
|
||||
/** The depth of the 3D part of plot area. This creates a 3D effect (if the "angle" is > 0). */
|
||||
/** The depth of the 3D part of plot area. This creates a 3D effect (if the "angle" is > 0).
|
||||
@default 0*/
|
||||
depth3D: number;
|
||||
/** Number of pixels between the container's bottom border and plot area. This space can be used for bottom axis' values. If autoMargin is true and bottom side has axis, this property is ignored.
|
||||
@default 20
|
||||
@@ -1297,18 +1363,66 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
@default 20
|
||||
*/
|
||||
marginRight: number;
|
||||
/** Flag which should be set to false if you need margins to be recalculated on next chart.validateNow() call. */
|
||||
/** Flag which should be set to false if you need margins to be recalculated on next chart.validateNow() call.
|
||||
@default false
|
||||
*/
|
||||
marginsUpdated: boolean;
|
||||
/** Number of pixels between the container's top border and plot area. This space can be used for top axis' values. If autoMargin is true and top side has axis, this property is ignored.
|
||||
@default 20
|
||||
*/
|
||||
marginTop: number;
|
||||
/** The opacity of plot area's border. Value range is 0 - 1.
|
||||
@default 0
|
||||
*/
|
||||
plotAreaBorderAlpha: number;
|
||||
/** The color of the plot area's border. Note, the it is invisible by default, as plotAreaBorderAlpha default value is 0. Set it to a value higher than 0 to make it visible.
|
||||
@default '#000000'*/
|
||||
plotAreaBorderColor: string;
|
||||
/** Opacity of plot area. Plural form is used to keep the same property names as our Flex charts'. Flex charts can accept array of numbers to generate gradients. Although you can set array here, only first value of this array will be used.
|
||||
@default 0
|
||||
*/
|
||||
plotAreaFillAlphas: number;
|
||||
/** You can set both one color if you need a solid color or array of colors to generate gradients, for example: ["#000000", "#0000CC"]
|
||||
@default '#FFFFFF'
|
||||
*/
|
||||
plotAreaFillColors: any;
|
||||
/** If you are using gradients to fill the plot area, you can use this property to set gradient angle. The only allowed values are horizontal and vertical: 0, 90, 180, 270.
|
||||
@default 0
|
||||
*/
|
||||
plotAreaGradientAngle: number;
|
||||
/** Array of trend lines added to a chart. You can add trend lines to a chart using this array or access already existing trend lines */
|
||||
trendLines: any[];
|
||||
/** It's a simple object containing information about zoom-out button. Other available properties of this object are fontSize and color. color specifies text color of a button. {backgroundColor:'#b2e1ff',backgroundAlpha:1} */
|
||||
zoomOutButton: Object;
|
||||
trendLines: TrendLine[];
|
||||
/** Opacity of zoom-out button background.
|
||||
@default 0
|
||||
*/
|
||||
zoomOutButtonAlpha: number;
|
||||
/** Zoom-out button background color.
|
||||
@default '#e5e5e5'
|
||||
*/
|
||||
zoomOutButtonColor: string;
|
||||
/** Name of zoom-out button image. In the images folder there is another lens image, called lensWhite.png. You might want to have white lens when background is dark. Or you can simply use your own image.
|
||||
@default lens.png
|
||||
*/
|
||||
zoomOutButtonImage: string;
|
||||
/** Size of zoom-out button image
|
||||
@default: 17
|
||||
*/
|
||||
zoomOutButtonImageSize: number;
|
||||
/** Padding around the text and image.
|
||||
@default: 8
|
||||
*/
|
||||
zoomOutButtonPadding: number;
|
||||
/** Opacity of zoom-out button background when mouse is over it.
|
||||
@default: 1
|
||||
*/
|
||||
zoomOutButtonRollOverAlpha: number;
|
||||
/** Text in the zoom-out button. Show all */
|
||||
zoomOutText: string;
|
||||
|
||||
/** Adds a ChartCursor object to a chart */
|
||||
addChartCursor(cursor: ChartCursor);
|
||||
/** Adds a ChartScrollbar to a chart */
|
||||
addChartScrollbar(scrollbar: ChartScrollbar);
|
||||
/** Adds a TrendLine to a chart.
|
||||
You should call chart.validateNow() after this method is called in order the trend line to be visible. */
|
||||
addTrendLine(trendLine: TrendLine);
|
||||
@@ -1318,7 +1432,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
removeChartScrollbar();
|
||||
/** Removes a trend line from a chart.
|
||||
You should call chart.validateNow() in order the changes to be visible. */
|
||||
removeTrendLine;
|
||||
removeTrendLine(trendLine: TrendLine);
|
||||
}
|
||||
|
||||
/* Trend lines are straight lines indicating trends, might also be used for some different purposes. Can be used by Serial and XY charts. To add/remove trend line, use chart.addTrendLine(trendLine)/chart.removeTrendLine(trendLine) methods or simply pass array of trend lines: chart.trendLines = [trendLine1, trendLine2].
|
||||
@@ -1395,7 +1509,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** Hides cursor. */
|
||||
hideCursor();
|
||||
/** You can force cursor to appear at specified cateogry or date. */
|
||||
showCursorAt(category);
|
||||
showCursorAt(category: string);
|
||||
/** Adds event listener of the type "changed" to the object.
|
||||
@param type Always "changed".
|
||||
@param handler Dispatched when cursor position is changed. "index" is a series index over which chart cursors currently is. "zooming" specifies if user is currently zooming (is selecting) the chart. mostCloseGraph property is set only when oneBalloonOnly is set to true.*/
|
||||
@@ -1439,20 +1553,26 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
chart.write("chartdiv");
|
||||
*/
|
||||
class AmSerialChart extends AmRectangularChart {
|
||||
/** Read-only. Chart creates category axis itself. If you want to change some properties, you should get this axis from the chart and set properties to this object. */
|
||||
/** Date format of the graph balloon (if chart parses dates and you don't use chartCursor).
|
||||
@default 'MMM DD, YYYY'
|
||||
*/
|
||||
balloonDateFormat: string;
|
||||
/** Read-only. Chart creates category axis itself. If you want to change some properties, you should get this axis from the chart and set properties to this object. */
|
||||
categoryAxis: CategoryAxis;
|
||||
/** Category field name tells the chart the name of the field in your dataProvider object which will be used for category axis values. */
|
||||
categoryField: string;
|
||||
/** Read-only. Array of SerialDataItem objects generated from dataProvider. */
|
||||
chartData: any[];
|
||||
/** The gap in pixels between two columns of the same category.
|
||||
@default 5
|
||||
*/
|
||||
columnSpacing: number;
|
||||
/** Relative width of columns. Value range is 0 - 1. 0.8 */
|
||||
/** Space between 3D stacked columns.
|
||||
@default 0
|
||||
*/
|
||||
columnSpacing3D: number;
|
||||
/** Relative width of columns. Value range is 0 - 1.
|
||||
@default 0.8
|
||||
*/
|
||||
columnWidth: number;
|
||||
/** Array holding chart's data. */
|
||||
dataProvider: any[];
|
||||
/** Read-only. If category axis parses dates endDate indicates date to which the chart is currently displayed. */
|
||||
endDate: Date;
|
||||
/** Read-only. Category index to which the chart is currently displayed. */
|
||||
@@ -1461,8 +1581,14 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
maxSelectedSeries: number;
|
||||
/** The longest time span allowed to select (in milliseconds) for example, 259200000 will limit selection to 3 days. */
|
||||
maxSelectedTime: number;
|
||||
/** The shortest time span allowed to select (in milliseconds) for example, 1000 will limit selection to 1 second. */
|
||||
/** The shortest time span allowed to select (in milliseconds) for example, 1000 will limit selection to 1 second.
|
||||
@default 0
|
||||
*/
|
||||
minSelectedTime: number;
|
||||
/** Specifies if scrolling of a chart with mouse wheel is enabled. If you press shift while rotating mouse wheel, the chart will zoom-in/out. */
|
||||
mouseWheelScrollEnabled: boolean;
|
||||
/** Specifies if zooming of a chart with mouse wheel is enabled. If you press shift while rotating mouse wheel, the chart will scroll. */
|
||||
mouseWheelZoomEnabled: boolean;
|
||||
/** If you set this to true, the chart will be rotated by 90 degrees (the columns will become bars). */
|
||||
rotate: boolean;
|
||||
/** Read-only. If category axis parses dates startDate indicates date from which the chart is currently displayed. */
|
||||
@@ -1475,15 +1601,15 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
zoomOutOnDataUpdate: boolean;
|
||||
|
||||
/** Number Returns index of the specified category value. value - series (category value) which index you want to find. */
|
||||
getCategoryIndexByValue(value);
|
||||
getCategoryIndexByValue(value: number);
|
||||
/** Zooms out, charts shows all available data. */
|
||||
zoomOut();
|
||||
/** Zooms the chart by the value of the category axis. start - category value, String \\ end - category value, String */
|
||||
zoomToCategoryValues(start, end);
|
||||
zoomToCategoryValues(start: Date, end: Date);
|
||||
/** Zooms the chart from one date to another. start - start date, Date object \\ end - end date, Date object */
|
||||
zoomToDates(start, end);
|
||||
zoomToDates(start: Date, end: Date);
|
||||
/** Zooms the chart by the index of the category. start - start index, Number \\ end - end index, Number */
|
||||
zoomToIndexes(start, end);
|
||||
zoomToIndexes(start: Date, end: Date);
|
||||
}
|
||||
|
||||
class PeriodSelector {
|
||||
@@ -1522,7 +1648,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
.
|
||||
@param handler - Dispatched when dates in period selector input fields are changed or user clicks on one of the predefined period buttons. */
|
||||
|
||||
addListener(type, handler: (e: {
|
||||
addListener(type: string, handler: (e: {
|
||||
/** Always: "changed" */
|
||||
|
||||
type: string;
|
||||
@@ -1695,6 +1821,31 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
urlTarget: string;
|
||||
}
|
||||
|
||||
/** Creates a label on the chart which can be placed anywhere, multiple can be assigned. */
|
||||
class Label {
|
||||
/** @Default 'left' */
|
||||
align: string;
|
||||
/** @Default 1 */
|
||||
alpha: number;
|
||||
/** Specifies if label is bold or not. */
|
||||
bold: boolean;
|
||||
/** Color of a label */
|
||||
color: string;
|
||||
/** Unique id of a Label. You don't need to set it, unless you want to. */
|
||||
id: string;
|
||||
/** Rotation angle. */
|
||||
rotation: number;
|
||||
/** Text size */
|
||||
size: number;
|
||||
/** Text of a label */
|
||||
text: string;
|
||||
/** URL which will be access if user clicks on a label. */
|
||||
url: string;
|
||||
/** X position of a label. */
|
||||
x: number|string;
|
||||
/** y position of a label. */
|
||||
y: number|string;
|
||||
}
|
||||
/** Common settings of legends. If you change a property after the chart is initialized, you should call stockChart.validateNow() method in order for it to work. If there is no default value specified, default value of StockLegend class will be used. */
|
||||
class LegendSettings {
|
||||
/** Alignment of legend entries. Possible values are: "left", "right" and "center". */
|
||||
@@ -1807,7 +1958,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** Balloon background color. Usually balloon background color is set by the chart. Only if "adjustBorderColor" is "true" this color will be used. #CC0000 */
|
||||
fillColor: string;
|
||||
/** Size of text in the balloon. Chart's fontSize is used by default. */
|
||||
fontSize: number;
|
||||
fontSize: string;
|
||||
/** Horizontal padding of the balloon.
|
||||
@default 8
|
||||
3*/
|
||||
@@ -1865,7 +2016,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** Fill color. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills. */
|
||||
fillColor: string;
|
||||
/** Text size. */
|
||||
fontSize: number;
|
||||
fontSize: string;
|
||||
/** Opacity of grid lines. */
|
||||
gridAlpha: number;
|
||||
/** Color of grid lines. */
|
||||
@@ -1945,7 +2096,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
*/
|
||||
enabled: boolean;
|
||||
/** Font size. */
|
||||
fontSize: number;
|
||||
fontSize: string;
|
||||
/** Specifies which graph will be displayed in the scrollbar. */
|
||||
graph: AmGraph;
|
||||
/** Graph fill opacity. */
|
||||
@@ -2004,6 +2155,8 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
alphaField: string;
|
||||
/** Value balloon color. Will use graph or data item color if not set. */
|
||||
balloonColor: string;
|
||||
/** If you set some function, the graph will call it and pass GraphDataItem and AmGraph object to it. This function should return a string which will be displayed in a balloon. */
|
||||
balloonFunction(graphDataItem: GraphDataItem, amGraph: AmGraph): string;
|
||||
/** Balloon text. You can use tags like [[value]], [[description]], [[percents]], [[open]], [[category]] [[value]] */
|
||||
balloonText: string;
|
||||
/** Specifies if the line graph should be placed behind column graphs */
|
||||
@@ -2069,7 +2222,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** You can set another graph here and if fillAlpha is >0, the area from this graph to fillToGraph will be filled (instead of filling the area to the X axis). */
|
||||
fillToGraph: AmGraph;
|
||||
/** Size of value labels text. Will use chart's fontSize if not set. */
|
||||
fontSize: number;
|
||||
fontSize: string;
|
||||
/** Orientation of the gradient fills (only for "column" graph type). Possible values are "vertical" and "horizontal". vertical */
|
||||
gradientOrientation: string;
|
||||
/** Specifies whether the graph is hidden. Do not use this to show/hide the graph, use hideGraph(graph) and showGraph(graph) methods instead. */
|
||||
@@ -2193,7 +2346,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** Fill color. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills. #FFFFFF */
|
||||
fillColor: string;
|
||||
/** Size of value labels text. Will use chart's fontSize if not set. */
|
||||
fontSize: number;
|
||||
fontSize: string;
|
||||
/** Opacity of grid lines. 0.2 */
|
||||
gridAlpha: number;
|
||||
/** Color of grid lines. #000000 */
|
||||
@@ -2247,7 +2400,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** Color of axis title. Will use text color of chart if not set any. */
|
||||
titleColor: string;
|
||||
/** Font size of axis title. Will use font size of chart plus two pixels if not set any. */
|
||||
titleFontSize: number;
|
||||
titlefontSize: string;
|
||||
|
||||
/** Adds guide to the axis. */
|
||||
addGuide(guide:Guide);
|
||||
@@ -2269,24 +2422,43 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
durationUnits: Object;
|
||||
/** Radar chart only. Possible values are: "polygons" and "circles". Set "circles" for polar charts. polygons */
|
||||
gridType: string;
|
||||
/** Unique id of value axis. It is not required to set it, unless you need to tell the graph which exact value axis it should use. */
|
||||
id: string;
|
||||
/** Specifies whether guide values should be included when calculating min and max of the axis. */
|
||||
includeGuidesInMinMax: boolean;
|
||||
/** If true, the axis will include hidden graphs when calculating min and max values. */
|
||||
includeHidden: boolean;
|
||||
/** Specifies whether values on axis can only be integers or both integers and doubles. */
|
||||
integersOnly: boolean;
|
||||
/** You can use this function to format Value axis labels. This function is called and these parameters are passed: labelFunction(value, valueText, valueAxis);
|
||||
Where value is numeric value, valueText is formatted string and valueAxis is a reference to valueAxis object.
|
||||
|
||||
If axis type is "date", labelFunction will pass different arguments:
|
||||
labelFunction(valueText, date, valueAxis)
|
||||
|
||||
Your function should return string.*/
|
||||
labelFunction(value: number, valueText: string, valueAxis: ValueAxis): string;
|
||||
labelFunction(valueText: string, data: Date, valueAxis: ValueAxis): string;
|
||||
/** Specifies if this value axis' scale should be logarithmic. */
|
||||
logarithmic: boolean;
|
||||
/** Read-only. Maximum value of the axis. */
|
||||
max: number;
|
||||
/** If you don't want max value to be calculated by the chart, set it using this property. This value might still be adjusted so that it would be possible to draw grid at rounded intervals. */
|
||||
maximum: number;
|
||||
/** If your value axis is date-based, you can specify maximum date of the axis. Can be set as date object, timestamp number or string if dataDateFormat is set. */
|
||||
maximumData: Date;
|
||||
/** Read-only. Minimum value of the axis. */
|
||||
min: number;
|
||||
/** If you don't want min value to be calculated by the chart, set it using this property. This value might still be adjusted so that it would be possible to draw grid at rounded intervals. */
|
||||
minimum: number;
|
||||
/** If your value axis is date-based, you can specify minimum date of the axis. Can be set as date object, timestamp number or string if dataDateFormat is set. */
|
||||
minimumDate: Date;
|
||||
/** If set value axis scale (min and max numbers) will be multiplied by it. I.e. if set to 1.2 the scope of values will increase by 20%. */
|
||||
minMaxMultiplier: number;
|
||||
/** Works with radar charts only. If you set it to “middle”, labels and data points will be placed in the middle between axes. */
|
||||
pointPosition: string;
|
||||
/** Possible values are: "top", "bottom", "left", "right". If axis is vertical, default position is "left". If axis is horizontal, default position is "bottom". */
|
||||
position: string;
|
||||
/** Precision (number of decimals) of values. */
|
||||
precision: number;
|
||||
/** Radar chart only. Specifies if categories (axes' titles) should be displayed near axes)
|
||||
@@ -2301,10 +2473,22 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
stackType: string;
|
||||
/** Read-only. Value difference between two grid lines. */
|
||||
step: number;
|
||||
/** If you set minimum and maximum for your axis, chart adjusts them so that grid would start and end on the beginning and end of plot area and grid would be at equal intervals. If you set strictMinMax to true, the chart will not adjust minimum and maximum of value axis. */
|
||||
strictMinMax: boolean;
|
||||
/** In case you synchronize one value axis with another, you need to set the synchronization multiplier. Use synchronizeWithAxis method to set with which axis it should be synced. */
|
||||
synchronizationMultiplier: number;
|
||||
/** One value axis can be synchronized with another value axis. You can use both reference to your axis or id of the axis here. You should set synchronizationMultiplyer in order for this to work. */
|
||||
synchronizeWith: ValueAxis;
|
||||
/** If this value axis is stacked and has columns, setting valueAxis.totalText = "[[total]]" will make it to display total value above the most-top column. */
|
||||
totalText: string;
|
||||
/** Color of total text. */
|
||||
totalTextColor: string;
|
||||
/** Distance from data point to total text. */
|
||||
totalTextOffset: number;
|
||||
/** This allows you to have logarithmic value axis and have zero values in the data. You must set it to >0 value in order to work. */
|
||||
treatZeroAs: number;
|
||||
/** Type of value axis. If your values in data provider are dates and you want this axis to show dates instead of numbers, set it to "date". */
|
||||
type: string;
|
||||
/** Unit which will be added to the value label. */
|
||||
unit: string;
|
||||
/** Position of the unit. Possible values are "left" and "right". right */
|
||||
@@ -2314,20 +2498,23 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** If true, values will always be formatted using scientific notation (5e+8, 5e-8...) Otherwise only values bigger then 1e+21 and smaller then 1e-7 will be displayed in scientific notation. */
|
||||
useScientificNotation: boolean;
|
||||
|
||||
/** Adds guide to the axis. */
|
||||
addGuide(guide: Guide);
|
||||
/** Adds event listener to the object. type - string like 'axisChanged' (should be listed in 'events' section of this class or classes which extend this class). handler - function which is called when event happens */
|
||||
addListener(type, handler);
|
||||
addListener(type: string, handler: any);
|
||||
/** Number, - value of coordinate. Returns value of the coordinate. coordinate - y or x coordinate, in pixels. */
|
||||
coordinateToValue(coordinate);
|
||||
coordinateToValue(coordinate: number);
|
||||
/** Number - coordinate Returns coordinate of the value in pixels. value - Number */
|
||||
getCoordinate(value);
|
||||
|
||||
getCoordinate(value: number);
|
||||
/** Removes guide from the axis.*/
|
||||
removeGuide(guide: Guide);
|
||||
/** Removes event listener from the object. */
|
||||
removeListener(obj, type, handler);
|
||||
removeListener(obj: any, type: string, handler: any);
|
||||
|
||||
/** One value axis can be synchronized with another value axis. You should set synchronizationMultiplyer in order for this to work. */
|
||||
synchronizeWithAxis(axis:ValueAxis);
|
||||
/** XY Chart only. Zooms-in the axis to the provided values. */
|
||||
zoomToValues(startValue, endValue);
|
||||
zoomToValues(startValue: number, endValue: number);
|
||||
|
||||
/** Adds event listener of the type "axisZoomed" to the object.
|
||||
@param type Always "axisZoomed".
|
||||
@@ -2347,4 +2534,25 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
/** Removes event listener from chart object. */
|
||||
removeListener(chart: AmChart, type: string, handler: any);
|
||||
}
|
||||
}
|
||||
|
||||
class Title {
|
||||
/** @default 1 */
|
||||
alpha: number;
|
||||
/** Specifies if the tile is bold or not.
|
||||
@default false*/
|
||||
bold: boolean;
|
||||
/** Text color of a title. */
|
||||
color: string;
|
||||
/** Unique id of a Title. You don't need to set it, unless you want to. */
|
||||
id: string;
|
||||
/** Text size */
|
||||
size: number;
|
||||
/** Text of a label */
|
||||
text: string;
|
||||
}
|
||||
class ExportSettings {
|
||||
enabled: boolean;
|
||||
libs: Object;
|
||||
menu: Object;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
/// <reference path="./analytics-node.d.ts" />
|
||||
|
||||
var analytics: AnalyticsNode.Analytics;
|
||||
import Analytics = require("analytics-node");
|
||||
|
||||
function testConfig(): void {
|
||||
analytics = new Analytics('YOUR_WRITE_KEY', {
|
||||
flushAt: 20,
|
||||
flushAfter: 10000
|
||||
});
|
||||
}
|
||||
|
||||
function testIdentify(): void {
|
||||
analytics.identify({
|
||||
userId: '019mr8mf4r',
|
||||
traits: {
|
||||
name: 'Michael Bolton',
|
||||
email: 'mbolton@initech.com',
|
||||
plan: 'Enterprise',
|
||||
friends: 42
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function testTrack(): void {
|
||||
analytics.track({
|
||||
userId: '019mr8mf4r',
|
||||
event: 'Purchased an Item',
|
||||
properties: {
|
||||
revenue: 39.95,
|
||||
shippingMethod: '2-day'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function testPage(): void {
|
||||
analytics.page({
|
||||
userId: '019mr8mf4r',
|
||||
category: 'Docs',
|
||||
name: 'Node.js Library',
|
||||
properties: {
|
||||
url: 'https://segment.com/docs/libraries/node',
|
||||
path: '/docs/libraries/node/',
|
||||
title: 'Node.js Library - Segment',
|
||||
referrer: 'https://github.com/segmentio/analytics-node'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function testAlias(): void {
|
||||
// the anonymous user does actions ...
|
||||
analytics.track({ userId: 'anonymous_user', event: 'Anonymous Event' })
|
||||
// the anonymous user signs up and is aliased
|
||||
analytics.alias({ previousId: 'anonymous_user', userId: 'identified@gmail.com' })
|
||||
// the identified user is identified
|
||||
analytics.identify({ userId: 'identified@gmail.com', traits: { plan: 'Free' } })
|
||||
// the identified user does actions ...
|
||||
analytics.track({ userId: 'identified@gmail.com', event: 'Identified Action' })
|
||||
}
|
||||
|
||||
function testGroup(): void {
|
||||
analytics.group({
|
||||
userId: '019mr8mf4r',
|
||||
groupId: '56',
|
||||
traits: {
|
||||
name: 'Initech',
|
||||
description: 'Accounting Software'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function testIntegrations(): void {
|
||||
analytics.track({
|
||||
event: 'Upgraded Membershipt',
|
||||
userId: '97234974',
|
||||
integrations: {
|
||||
'All': false,
|
||||
'Vero': true,
|
||||
'Google Analytics': false
|
||||
}
|
||||
});
|
||||
}
|
||||
Vendored
+73
@@ -0,0 +1,73 @@
|
||||
// Type definitions for Segment's analytics.js for Node.js
|
||||
// Project: https://segment.com/docs/libraries/node/
|
||||
// Definitions by: Andrew Fong <https://github.com/fongandrew>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module AnalyticsNode {
|
||||
|
||||
interface Integrations {
|
||||
[index: string]: boolean;
|
||||
}
|
||||
|
||||
export class Analytics {
|
||||
constructor(writeKey: string, opts?: {
|
||||
flushAt?: number,
|
||||
flushAfter?: number
|
||||
});
|
||||
|
||||
/* The identify method lets you tie a user to their actions and record
|
||||
traits about them. */
|
||||
identify(message: {
|
||||
userId: string | number;
|
||||
traits?: Object;
|
||||
timestamp?: Date;
|
||||
context?: Object;
|
||||
integrations?: Integrations;
|
||||
}): Analytics;
|
||||
|
||||
/* The track method lets you record the actions your users perform. */
|
||||
track(message: {
|
||||
userId: string | number;
|
||||
event: string;
|
||||
properties?: Object;
|
||||
timestamp?: Date;
|
||||
context?: Object;
|
||||
integrations?: Integrations;
|
||||
}): Analytics;
|
||||
|
||||
/* The page method lets you record page views on your website, along with
|
||||
optional extra information about the page being viewed. */
|
||||
page(message: {
|
||||
userId: string | number;
|
||||
category?: string;
|
||||
name?: string;
|
||||
properties?: Object;
|
||||
timestamp?: Date;
|
||||
context?: Object;
|
||||
integrations?: Integrations;
|
||||
}): Analytics;
|
||||
|
||||
/* alias is how you associate one identity with another. */
|
||||
alias(message: {
|
||||
previousId: string | number;
|
||||
userId: string | number;
|
||||
integrations?: Integrations;
|
||||
}): Analytics;
|
||||
|
||||
/* Group calls can be used to associate individual users with shared
|
||||
accounts or companies. */
|
||||
group(message: {
|
||||
userId: string | number;
|
||||
groupId: string | number;
|
||||
traits?: Object;
|
||||
context?: Object;
|
||||
timestamp?: Date;
|
||||
anonymous_id?: string | number;
|
||||
integrations?: Integrations;
|
||||
}): Analytics;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "analytics-node" {
|
||||
export = AnalyticsNode.Analytics;
|
||||
}
|
||||
+4
-1
@@ -26,9 +26,12 @@ declare module angular.growl {
|
||||
disableCountDown?: boolean;
|
||||
disableIcons?: boolean;
|
||||
disableCloseButton?: boolean;
|
||||
referenceId?: number;
|
||||
onclose?: Function;
|
||||
onopen?: Function;
|
||||
position?: string;
|
||||
referenceId?: number;
|
||||
translateMessage?: boolean;
|
||||
variables?: { [variable: string]: any; };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+17106
File diff suppressed because it is too large
Load Diff
+17105
File diff suppressed because it is too large
Load Diff
@@ -24,13 +24,13 @@ Cmp.annotations = [
|
||||
}),
|
||||
Directive({
|
||||
selector: '[tooltip]',
|
||||
properties: [
|
||||
inputs: [
|
||||
'text: tooltip'
|
||||
],
|
||||
host: {
|
||||
'(onmouseenter)': 'onMouseEnter()',
|
||||
'(onmouseleave)': 'onMouseLeave()'
|
||||
}
|
||||
outputs: [
|
||||
'(mouseenter):onMouseEnter()',
|
||||
'(mouseleave):onMouseLeave()'
|
||||
]
|
||||
})
|
||||
];
|
||||
|
||||
|
||||
Vendored
+13550
-8659
File diff suppressed because it is too large
Load Diff
Vendored
+1310
File diff suppressed because it is too large
Load Diff
Vendored
+1310
File diff suppressed because it is too large
Load Diff
Vendored
+829
-526
File diff suppressed because it is too large
Load Diff
Vendored
+1330
File diff suppressed because it is too large
Load Diff
Vendored
+1330
File diff suppressed because it is too large
Load Diff
Vendored
+995
-403
File diff suppressed because it is too large
Load Diff
+408
@@ -0,0 +1,408 @@
|
||||
// Type definitions for Angular v2.0.0-local_sha.f77234e
|
||||
// Project: http://angular.io/
|
||||
// Definitions by: angular team <https://github.com/angular/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// ***********************************************************
|
||||
// This file is generated by the Angular build process.
|
||||
// Please do not create manual edits or send pull requests
|
||||
// modifying this file.
|
||||
// ***********************************************************
|
||||
|
||||
// angular2/test_lib depends transitively on these libraries.
|
||||
// If you don't have them installed you can install them using TSD
|
||||
// https://github.com/DefinitelyTyped/tsd
|
||||
|
||||
///<reference path="./angular2.d.ts"/>
|
||||
///<reference path="../jasmine/jasmine.d.ts"/>
|
||||
|
||||
|
||||
|
||||
declare module ngTestLib {
|
||||
/**
|
||||
* Allows injecting dependencies in `beforeEach()` and `it()`.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```
|
||||
* beforeEach(inject([Dependency, AClass], (dep, object) => {
|
||||
* // some code that uses `dep` and `object`
|
||||
* // ...
|
||||
* }));
|
||||
*
|
||||
* it('...', inject([AClass, AsyncTestCompleter], (object, async) => {
|
||||
* object.doSomething().then(() => {
|
||||
* expect(...);
|
||||
* async.done();
|
||||
* });
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* Notes:
|
||||
* - injecting an `AsyncTestCompleter` allow completing async tests - this is the equivalent of
|
||||
* adding a `done` parameter in Jasmine,
|
||||
* - inject is currently a function because of some Traceur limitation the syntax should eventually
|
||||
* becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`
|
||||
*
|
||||
* @param {Array} tokens
|
||||
* @param {Function} fn
|
||||
* @return {FunctionWithParamTokens}
|
||||
*/
|
||||
function inject(tokens: any[], fn: Function): FunctionWithParamTokens;
|
||||
|
||||
|
||||
|
||||
var proxy: ClassDecorator;
|
||||
|
||||
|
||||
|
||||
var afterEach: Function;
|
||||
|
||||
|
||||
|
||||
type SyncTestFn = () => void
|
||||
|
||||
|
||||
interface NgMatchers extends jasmine.Matchers {
|
||||
|
||||
toBe(expected: any): boolean;
|
||||
|
||||
toEqual(expected: any): boolean;
|
||||
|
||||
toBePromise(): boolean;
|
||||
|
||||
toBeAnInstanceOf(expected: any): boolean;
|
||||
|
||||
toHaveText(expected: any): boolean;
|
||||
|
||||
toHaveCssClass(expected: any): boolean;
|
||||
|
||||
toImplement(expected: any): boolean;
|
||||
|
||||
toContainError(expected: any): boolean;
|
||||
|
||||
toThrowErrorWith(expectedMessage: any): boolean;
|
||||
|
||||
not: NgMatchers;
|
||||
|
||||
}
|
||||
|
||||
|
||||
var expect: (actual: any) => NgMatchers;
|
||||
|
||||
|
||||
|
||||
class AsyncTestCompleter {
|
||||
|
||||
constructor(_done: Function);
|
||||
|
||||
done(): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function describe(...args: any[]): void;
|
||||
|
||||
|
||||
|
||||
function ddescribe(...args: any[]): void;
|
||||
|
||||
|
||||
|
||||
function xdescribe(...args: any[]): void;
|
||||
|
||||
|
||||
|
||||
function beforeEach(fn: FunctionWithParamTokens | SyncTestFn): void;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Allows overriding default bindings defined in test_injector.js.
|
||||
*
|
||||
* The given function must return a list of DI bindings.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* beforeEachBindings(() => [
|
||||
* bind(Compiler).toClass(MockCompiler),
|
||||
* bind(SomeToken).toValue(myValue),
|
||||
* ]);
|
||||
*/
|
||||
function beforeEachBindings(fn: any): void;
|
||||
|
||||
|
||||
|
||||
function it(name: any, fn: any, timeOut?: any): void;
|
||||
|
||||
|
||||
|
||||
function xit(name: any, fn: any, timeOut?: any): void;
|
||||
|
||||
|
||||
|
||||
function iit(name: any, fn: any, timeOut?: any): void;
|
||||
|
||||
|
||||
|
||||
interface GuinessCompatibleSpy extends jasmine.Spy {
|
||||
|
||||
/**
|
||||
* By chaining the spy with and.returnValue, all calls to the function will return a specific
|
||||
* value.
|
||||
*/
|
||||
andReturn(val: any): void;
|
||||
|
||||
/**
|
||||
* By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied
|
||||
* function.
|
||||
*/
|
||||
andCallFake(fn: Function): GuinessCompatibleSpy;
|
||||
|
||||
/**
|
||||
* removes all recorded calls
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
class SpyObject {
|
||||
|
||||
constructor(type?: any);
|
||||
|
||||
static stub(object?: any, config?: any, overrides?: any): void;
|
||||
|
||||
noSuchMethod(args: any): void;
|
||||
|
||||
spy(name: any): void;
|
||||
|
||||
prop(name: any, value: any): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function isInInnerZone(): boolean;
|
||||
|
||||
|
||||
|
||||
interface RootTestComponent {
|
||||
|
||||
debugElement: ng.DebugElement;
|
||||
|
||||
detectChanges(): void;
|
||||
|
||||
destroy(): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Builds a RootTestComponent for use in component level tests.
|
||||
*/
|
||||
class TestComponentBuilder {
|
||||
|
||||
constructor(_injector: ng.Injector);
|
||||
|
||||
/**
|
||||
* Overrides only the html of a {@link ComponentMetadata}.
|
||||
* All the other properties of the component's {@link ng.ViewMetadata} are preserved.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {string} html
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideTemplate(componentType: ng.Type, template: string): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Overrides a component's {@link ng.ViewMetadata}.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {view} View
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideView(componentType: ng.Type, view: ng.ViewMetadata): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Overrides the directives from the component {@link ng.ViewMetadata}.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {ng.Type} from
|
||||
* @param {ng.Type} to
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideDirective(componentType: ng.Type, from: ng.Type, to: ng.Type): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Overrides one or more injectables configured via `bindings` metadata property of a directive or
|
||||
* component.
|
||||
* Very useful when certain bindings need to be mocked out.
|
||||
*
|
||||
* The bindings specified via this method are appended to the existing `bindings` causing the
|
||||
* duplicated bindings to
|
||||
* be overridden.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {any[]} bindings
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideBindings(type: ng.Type, bindings: any[]): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Overrides one or more injectables configured via `bindings` metadata property of a directive or
|
||||
* component.
|
||||
* Very useful when certain bindings need to be mocked out.
|
||||
*
|
||||
* The bindings specified via this method are appended to the existing `bindings` causing the
|
||||
* duplicated bindings to
|
||||
* be overridden.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {any[]} bindings
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideViewBindings(type: ng.Type, bindings: any[]): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Builds and returns a RootTestComponent.
|
||||
*
|
||||
* @return {Promise<RootTestComponent>}
|
||||
*/
|
||||
createAsync(rootComponentType: ng.Type): Promise<RootTestComponent>;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function createTestInjector(bindings: Array<ng.Type | ng.Binding | any[]>): ng.Injector;
|
||||
|
||||
|
||||
|
||||
class FunctionWithParamTokens {
|
||||
|
||||
constructor(_tokens: any[], _fn: Function);
|
||||
|
||||
/**
|
||||
* Returns the value of the executed function.
|
||||
*/
|
||||
execute(injector: ng.Injector): any;
|
||||
|
||||
hasToken(token: any): boolean;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Wraps a function to be executed in the fakeAsync zone:
|
||||
* - microtasks are manually executed by calling `flushMicrotasks()`,
|
||||
* - timers are synchronous, `tick()` simulates the asynchronous passage of time.
|
||||
*
|
||||
* If there are any pending timers at the end of the function, an exception will be thrown.
|
||||
*
|
||||
* @param fn
|
||||
* @returns {Function} The function wrapped to be executed in the fakeAsync zone
|
||||
*/
|
||||
function fakeAsync(fn: Function): Function;
|
||||
|
||||
|
||||
|
||||
function clearPendingTimers(): void;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone.
|
||||
*
|
||||
* The microtasks queue is drained at the very start of this function and after any timer callback
|
||||
* has been executed.
|
||||
*
|
||||
* @param {number} millis Number of millisecond, defaults to 0
|
||||
*/
|
||||
function tick(millis?: number): void;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Flush any pending microtasks.
|
||||
*/
|
||||
function flushMicrotasks(): void;
|
||||
|
||||
|
||||
|
||||
class Log {
|
||||
|
||||
constructor();
|
||||
|
||||
add(value: any): void;
|
||||
|
||||
fn(value: any): void;
|
||||
|
||||
clear(): void;
|
||||
|
||||
result(): string;
|
||||
|
||||
}
|
||||
|
||||
|
||||
class BrowserDetection {
|
||||
|
||||
constructor(ua: string);
|
||||
|
||||
isFirefox: boolean;
|
||||
|
||||
isAndroid: boolean;
|
||||
|
||||
isEdge: boolean;
|
||||
|
||||
isIE: boolean;
|
||||
|
||||
isWebkit: boolean;
|
||||
|
||||
isIOS7: boolean;
|
||||
|
||||
isSlow: boolean;
|
||||
|
||||
supportsIntlApi: boolean;
|
||||
|
||||
}
|
||||
|
||||
|
||||
var browserDetection: BrowserDetection;
|
||||
|
||||
|
||||
|
||||
function dispatchEvent(element: any, eventType: any): void;
|
||||
|
||||
|
||||
|
||||
function el(html: string): HTMLElement;
|
||||
|
||||
|
||||
|
||||
function containsRegexp(input: string): RegExp;
|
||||
|
||||
|
||||
|
||||
function normalizeCSS(css: string): string;
|
||||
|
||||
|
||||
|
||||
function stringifyElement(el: any): string;
|
||||
|
||||
|
||||
|
||||
var RootTestComponent: ng.InjectableReference;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
declare module "angular2/test_lib" {
|
||||
export = ngTestLib;
|
||||
}
|
||||
|
||||
|
||||
+408
@@ -0,0 +1,408 @@
|
||||
// Type definitions for Angular v2.0.0-local_sha.7d5c3eb
|
||||
// Project: http://angular.io/
|
||||
// Definitions by: angular team <https://github.com/angular/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// ***********************************************************
|
||||
// This file is generated by the Angular build process.
|
||||
// Please do not create manual edits or send pull requests
|
||||
// modifying this file.
|
||||
// ***********************************************************
|
||||
|
||||
// angular2/test_lib depends transitively on these libraries.
|
||||
// If you don't have them installed you can install them using TSD
|
||||
// https://github.com/DefinitelyTyped/tsd
|
||||
|
||||
///<reference path="./angular2.d.ts"/>
|
||||
///<reference path="../jasmine/jasmine.d.ts"/>
|
||||
|
||||
|
||||
|
||||
declare module ngTestLib {
|
||||
/**
|
||||
* Allows injecting dependencies in `beforeEach()` and `it()`.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```
|
||||
* beforeEach(inject([Dependency, AClass], (dep, object) => {
|
||||
* // some code that uses `dep` and `object`
|
||||
* // ...
|
||||
* }));
|
||||
*
|
||||
* it('...', inject([AClass, AsyncTestCompleter], (object, async) => {
|
||||
* object.doSomething().then(() => {
|
||||
* expect(...);
|
||||
* async.done();
|
||||
* });
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* Notes:
|
||||
* - injecting an `AsyncTestCompleter` allow completing async tests - this is the equivalent of
|
||||
* adding a `done` parameter in Jasmine,
|
||||
* - inject is currently a function because of some Traceur limitation the syntax should eventually
|
||||
* becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`
|
||||
*
|
||||
* @param {Array} tokens
|
||||
* @param {Function} fn
|
||||
* @return {FunctionWithParamTokens}
|
||||
*/
|
||||
function inject(tokens: any[], fn: Function): FunctionWithParamTokens;
|
||||
|
||||
|
||||
|
||||
var proxy: ClassDecorator;
|
||||
|
||||
|
||||
|
||||
var afterEach: Function;
|
||||
|
||||
|
||||
|
||||
type SyncTestFn = () => void
|
||||
|
||||
|
||||
interface NgMatchers extends jasmine.Matchers {
|
||||
|
||||
toBe(expected: any): boolean;
|
||||
|
||||
toEqual(expected: any): boolean;
|
||||
|
||||
toBePromise(): boolean;
|
||||
|
||||
toBeAnInstanceOf(expected: any): boolean;
|
||||
|
||||
toHaveText(expected: any): boolean;
|
||||
|
||||
toHaveCssClass(expected: any): boolean;
|
||||
|
||||
toImplement(expected: any): boolean;
|
||||
|
||||
toContainError(expected: any): boolean;
|
||||
|
||||
toThrowErrorWith(expectedMessage: any): boolean;
|
||||
|
||||
not: NgMatchers;
|
||||
|
||||
}
|
||||
|
||||
|
||||
var expect: (actual: any) => NgMatchers;
|
||||
|
||||
|
||||
|
||||
class AsyncTestCompleter {
|
||||
|
||||
constructor(_done: Function);
|
||||
|
||||
done(): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function describe(...args: any[]): void;
|
||||
|
||||
|
||||
|
||||
function ddescribe(...args: any[]): void;
|
||||
|
||||
|
||||
|
||||
function xdescribe(...args: any[]): void;
|
||||
|
||||
|
||||
|
||||
function beforeEach(fn: FunctionWithParamTokens | SyncTestFn): void;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Allows overriding default bindings defined in test_injector.js.
|
||||
*
|
||||
* The given function must return a list of DI bindings.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* beforeEachBindings(() => [
|
||||
* bind(Compiler).toClass(MockCompiler),
|
||||
* bind(SomeToken).toValue(myValue),
|
||||
* ]);
|
||||
*/
|
||||
function beforeEachBindings(fn: any): void;
|
||||
|
||||
|
||||
|
||||
function it(name: any, fn: any, timeOut?: any): void;
|
||||
|
||||
|
||||
|
||||
function xit(name: any, fn: any, timeOut?: any): void;
|
||||
|
||||
|
||||
|
||||
function iit(name: any, fn: any, timeOut?: any): void;
|
||||
|
||||
|
||||
|
||||
interface GuinessCompatibleSpy extends jasmine.Spy {
|
||||
|
||||
/**
|
||||
* By chaining the spy with and.returnValue, all calls to the function will return a specific
|
||||
* value.
|
||||
*/
|
||||
andReturn(val: any): void;
|
||||
|
||||
/**
|
||||
* By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied
|
||||
* function.
|
||||
*/
|
||||
andCallFake(fn: Function): GuinessCompatibleSpy;
|
||||
|
||||
/**
|
||||
* removes all recorded calls
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
class SpyObject {
|
||||
|
||||
constructor(type?: any);
|
||||
|
||||
static stub(object?: any, config?: any, overrides?: any): void;
|
||||
|
||||
noSuchMethod(args: any): void;
|
||||
|
||||
spy(name: any): void;
|
||||
|
||||
prop(name: any, value: any): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function isInInnerZone(): boolean;
|
||||
|
||||
|
||||
|
||||
interface RootTestComponent {
|
||||
|
||||
debugElement: ng.DebugElement;
|
||||
|
||||
detectChanges(): void;
|
||||
|
||||
destroy(): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Builds a RootTestComponent for use in component level tests.
|
||||
*/
|
||||
class TestComponentBuilder {
|
||||
|
||||
constructor(_injector: ng.Injector);
|
||||
|
||||
/**
|
||||
* Overrides only the html of a {@link ComponentMetadata}.
|
||||
* All the other properties of the component's {@link ng.ViewMetadata} are preserved.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {string} html
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideTemplate(componentType: ng.Type, template: string): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Overrides a component's {@link ng.ViewMetadata}.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {view} View
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideView(componentType: ng.Type, view: ng.ViewMetadata): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Overrides the directives from the component {@link ng.ViewMetadata}.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {ng.Type} from
|
||||
* @param {ng.Type} to
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideDirective(componentType: ng.Type, from: ng.Type, to: ng.Type): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Overrides one or more injectables configured via `bindings` metadata property of a directive or
|
||||
* component.
|
||||
* Very useful when certain bindings need to be mocked out.
|
||||
*
|
||||
* The bindings specified via this method are appended to the existing `bindings` causing the
|
||||
* duplicated bindings to
|
||||
* be overridden.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {any[]} bindings
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideBindings(type: ng.Type, bindings: any[]): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Overrides one or more injectables configured via `bindings` metadata property of a directive or
|
||||
* component.
|
||||
* Very useful when certain bindings need to be mocked out.
|
||||
*
|
||||
* The bindings specified via this method are appended to the existing `bindings` causing the
|
||||
* duplicated bindings to
|
||||
* be overridden.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {any[]} bindings
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideViewBindings(type: ng.Type, bindings: any[]): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Builds and returns a RootTestComponent.
|
||||
*
|
||||
* @return {Promise<RootTestComponent>}
|
||||
*/
|
||||
createAsync(rootComponentType: ng.Type): Promise<RootTestComponent>;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function createTestInjector(bindings: Array<ng.Type | ng.Binding | any[]>): ng.Injector;
|
||||
|
||||
|
||||
|
||||
class FunctionWithParamTokens {
|
||||
|
||||
constructor(_tokens: any[], _fn: Function);
|
||||
|
||||
/**
|
||||
* Returns the value of the executed function.
|
||||
*/
|
||||
execute(injector: ng.Injector): any;
|
||||
|
||||
hasToken(token: any): boolean;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Wraps a function to be executed in the fakeAsync zone:
|
||||
* - microtasks are manually executed by calling `flushMicrotasks()`,
|
||||
* - timers are synchronous, `tick()` simulates the asynchronous passage of time.
|
||||
*
|
||||
* If there are any pending timers at the end of the function, an exception will be thrown.
|
||||
*
|
||||
* @param fn
|
||||
* @returns {Function} The function wrapped to be executed in the fakeAsync zone
|
||||
*/
|
||||
function fakeAsync(fn: Function): Function;
|
||||
|
||||
|
||||
|
||||
function clearPendingTimers(): void;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone.
|
||||
*
|
||||
* The microtasks queue is drained at the very start of this function and after any timer callback
|
||||
* has been executed.
|
||||
*
|
||||
* @param {number} millis Number of millisecond, defaults to 0
|
||||
*/
|
||||
function tick(millis?: number): void;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Flush any pending microtasks.
|
||||
*/
|
||||
function flushMicrotasks(): void;
|
||||
|
||||
|
||||
|
||||
class Log {
|
||||
|
||||
constructor();
|
||||
|
||||
add(value: any): void;
|
||||
|
||||
fn(value: any): void;
|
||||
|
||||
clear(): void;
|
||||
|
||||
result(): string;
|
||||
|
||||
}
|
||||
|
||||
|
||||
class BrowserDetection {
|
||||
|
||||
constructor(ua: string);
|
||||
|
||||
isFirefox: boolean;
|
||||
|
||||
isAndroid: boolean;
|
||||
|
||||
isEdge: boolean;
|
||||
|
||||
isIE: boolean;
|
||||
|
||||
isWebkit: boolean;
|
||||
|
||||
isIOS7: boolean;
|
||||
|
||||
isSlow: boolean;
|
||||
|
||||
supportsIntlApi: boolean;
|
||||
|
||||
}
|
||||
|
||||
|
||||
var browserDetection: BrowserDetection;
|
||||
|
||||
|
||||
|
||||
function dispatchEvent(element: any, eventType: any): void;
|
||||
|
||||
|
||||
|
||||
function el(html: string): HTMLElement;
|
||||
|
||||
|
||||
|
||||
function containsRegexp(input: string): RegExp;
|
||||
|
||||
|
||||
|
||||
function normalizeCSS(css: string): string;
|
||||
|
||||
|
||||
|
||||
function stringifyElement(el: any): string;
|
||||
|
||||
|
||||
|
||||
var RootTestComponent: ng.InjectableReference;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
declare module "angular2/test_lib" {
|
||||
export = ngTestLib;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+408
@@ -0,0 +1,408 @@
|
||||
// Type definitions for Angular v2.0.0-local_sha.7d5c3eb
|
||||
// Project: http://angular.io/
|
||||
// Definitions by: angular team <https://github.com/angular/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// ***********************************************************
|
||||
// This file is generated by the Angular build process.
|
||||
// Please do not create manual edits or send pull requests
|
||||
// modifying this file.
|
||||
// ***********************************************************
|
||||
|
||||
// angular2/test_lib depends transitively on these libraries.
|
||||
// If you don't have them installed you can install them using TSD
|
||||
// https://github.com/DefinitelyTyped/tsd
|
||||
|
||||
///<reference path="./angular2.d.ts"/>
|
||||
///<reference path="../jasmine/jasmine.d.ts"/>
|
||||
|
||||
|
||||
|
||||
declare module ngTestLib {
|
||||
/**
|
||||
* Allows injecting dependencies in `beforeEach()` and `it()`.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```
|
||||
* beforeEach(inject([Dependency, AClass], (dep, object) => {
|
||||
* // some code that uses `dep` and `object`
|
||||
* // ...
|
||||
* }));
|
||||
*
|
||||
* it('...', inject([AClass, AsyncTestCompleter], (object, async) => {
|
||||
* object.doSomething().then(() => {
|
||||
* expect(...);
|
||||
* async.done();
|
||||
* });
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* Notes:
|
||||
* - injecting an `AsyncTestCompleter` allow completing async tests - this is the equivalent of
|
||||
* adding a `done` parameter in Jasmine,
|
||||
* - inject is currently a function because of some Traceur limitation the syntax should eventually
|
||||
* becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`
|
||||
*
|
||||
* @param {Array} tokens
|
||||
* @param {Function} fn
|
||||
* @return {FunctionWithParamTokens}
|
||||
*/
|
||||
function inject(tokens: any[], fn: Function): FunctionWithParamTokens;
|
||||
|
||||
|
||||
|
||||
var proxy: ClassDecorator;
|
||||
|
||||
|
||||
|
||||
var afterEach: Function;
|
||||
|
||||
|
||||
|
||||
type SyncTestFn = () => void
|
||||
|
||||
|
||||
interface NgMatchers extends jasmine.Matchers {
|
||||
|
||||
toBe(expected: any): boolean;
|
||||
|
||||
toEqual(expected: any): boolean;
|
||||
|
||||
toBePromise(): boolean;
|
||||
|
||||
toBeAnInstanceOf(expected: any): boolean;
|
||||
|
||||
toHaveText(expected: any): boolean;
|
||||
|
||||
toHaveCssClass(expected: any): boolean;
|
||||
|
||||
toImplement(expected: any): boolean;
|
||||
|
||||
toContainError(expected: any): boolean;
|
||||
|
||||
toThrowErrorWith(expectedMessage: any): boolean;
|
||||
|
||||
not: NgMatchers;
|
||||
|
||||
}
|
||||
|
||||
|
||||
var expect: (actual: any) => NgMatchers;
|
||||
|
||||
|
||||
|
||||
class AsyncTestCompleter {
|
||||
|
||||
constructor(_done: Function);
|
||||
|
||||
done(): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function describe(...args: any[]): void;
|
||||
|
||||
|
||||
|
||||
function ddescribe(...args: any[]): void;
|
||||
|
||||
|
||||
|
||||
function xdescribe(...args: any[]): void;
|
||||
|
||||
|
||||
|
||||
function beforeEach(fn: FunctionWithParamTokens | SyncTestFn): void;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Allows overriding default bindings defined in test_injector.js.
|
||||
*
|
||||
* The given function must return a list of DI bindings.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* beforeEachBindings(() => [
|
||||
* bind(Compiler).toClass(MockCompiler),
|
||||
* bind(SomeToken).toValue(myValue),
|
||||
* ]);
|
||||
*/
|
||||
function beforeEachBindings(fn: any): void;
|
||||
|
||||
|
||||
|
||||
function it(name: any, fn: any, timeOut?: any): void;
|
||||
|
||||
|
||||
|
||||
function xit(name: any, fn: any, timeOut?: any): void;
|
||||
|
||||
|
||||
|
||||
function iit(name: any, fn: any, timeOut?: any): void;
|
||||
|
||||
|
||||
|
||||
interface GuinessCompatibleSpy extends jasmine.Spy {
|
||||
|
||||
/**
|
||||
* By chaining the spy with and.returnValue, all calls to the function will return a specific
|
||||
* value.
|
||||
*/
|
||||
andReturn(val: any): void;
|
||||
|
||||
/**
|
||||
* By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied
|
||||
* function.
|
||||
*/
|
||||
andCallFake(fn: Function): GuinessCompatibleSpy;
|
||||
|
||||
/**
|
||||
* removes all recorded calls
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
class SpyObject {
|
||||
|
||||
constructor(type?: any);
|
||||
|
||||
static stub(object?: any, config?: any, overrides?: any): void;
|
||||
|
||||
noSuchMethod(args: any): void;
|
||||
|
||||
spy(name: any): void;
|
||||
|
||||
prop(name: any, value: any): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function isInInnerZone(): boolean;
|
||||
|
||||
|
||||
|
||||
interface RootTestComponent {
|
||||
|
||||
debugElement: ng.DebugElement;
|
||||
|
||||
detectChanges(): void;
|
||||
|
||||
destroy(): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Builds a RootTestComponent for use in component level tests.
|
||||
*/
|
||||
class TestComponentBuilder {
|
||||
|
||||
constructor(_injector: ng.Injector);
|
||||
|
||||
/**
|
||||
* Overrides only the html of a {@link ComponentMetadata}.
|
||||
* All the other properties of the component's {@link ng.ViewMetadata} are preserved.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {string} html
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideTemplate(componentType: ng.Type, template: string): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Overrides a component's {@link ng.ViewMetadata}.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {view} View
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideView(componentType: ng.Type, view: ng.ViewMetadata): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Overrides the directives from the component {@link ng.ViewMetadata}.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {ng.Type} from
|
||||
* @param {ng.Type} to
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideDirective(componentType: ng.Type, from: ng.Type, to: ng.Type): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Overrides one or more injectables configured via `bindings` metadata property of a directive or
|
||||
* component.
|
||||
* Very useful when certain bindings need to be mocked out.
|
||||
*
|
||||
* The bindings specified via this method are appended to the existing `bindings` causing the
|
||||
* duplicated bindings to
|
||||
* be overridden.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {any[]} bindings
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideBindings(type: ng.Type, bindings: any[]): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Overrides one or more injectables configured via `bindings` metadata property of a directive or
|
||||
* component.
|
||||
* Very useful when certain bindings need to be mocked out.
|
||||
*
|
||||
* The bindings specified via this method are appended to the existing `bindings` causing the
|
||||
* duplicated bindings to
|
||||
* be overridden.
|
||||
*
|
||||
* @param {ng.Type} component
|
||||
* @param {any[]} bindings
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideViewBindings(type: ng.Type, bindings: any[]): TestComponentBuilder;
|
||||
|
||||
/**
|
||||
* Builds and returns a RootTestComponent.
|
||||
*
|
||||
* @return {Promise<RootTestComponent>}
|
||||
*/
|
||||
createAsync(rootComponentType: ng.Type): Promise<RootTestComponent>;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function createTestInjector(bindings: Array<ng.Type | ng.Binding | any[]>): ng.Injector;
|
||||
|
||||
|
||||
|
||||
class FunctionWithParamTokens {
|
||||
|
||||
constructor(_tokens: any[], _fn: Function);
|
||||
|
||||
/**
|
||||
* Returns the value of the executed function.
|
||||
*/
|
||||
execute(injector: ng.Injector): any;
|
||||
|
||||
hasToken(token: any): boolean;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Wraps a function to be executed in the fakeAsync zone:
|
||||
* - microtasks are manually executed by calling `flushMicrotasks()`,
|
||||
* - timers are synchronous, `tick()` simulates the asynchronous passage of time.
|
||||
*
|
||||
* If there are any pending timers at the end of the function, an exception will be thrown.
|
||||
*
|
||||
* @param fn
|
||||
* @returns {Function} The function wrapped to be executed in the fakeAsync zone
|
||||
*/
|
||||
function fakeAsync(fn: Function): Function;
|
||||
|
||||
|
||||
|
||||
function clearPendingTimers(): void;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone.
|
||||
*
|
||||
* The microtasks queue is drained at the very start of this function and after any timer callback
|
||||
* has been executed.
|
||||
*
|
||||
* @param {number} millis Number of millisecond, defaults to 0
|
||||
*/
|
||||
function tick(millis?: number): void;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Flush any pending microtasks.
|
||||
*/
|
||||
function flushMicrotasks(): void;
|
||||
|
||||
|
||||
|
||||
class Log {
|
||||
|
||||
constructor();
|
||||
|
||||
add(value: any): void;
|
||||
|
||||
fn(value: any): void;
|
||||
|
||||
clear(): void;
|
||||
|
||||
result(): string;
|
||||
|
||||
}
|
||||
|
||||
|
||||
class BrowserDetection {
|
||||
|
||||
constructor(ua: string);
|
||||
|
||||
isFirefox: boolean;
|
||||
|
||||
isAndroid: boolean;
|
||||
|
||||
isEdge: boolean;
|
||||
|
||||
isIE: boolean;
|
||||
|
||||
isWebkit: boolean;
|
||||
|
||||
isIOS7: boolean;
|
||||
|
||||
isSlow: boolean;
|
||||
|
||||
supportsIntlApi: boolean;
|
||||
|
||||
}
|
||||
|
||||
|
||||
var browserDetection: BrowserDetection;
|
||||
|
||||
|
||||
|
||||
function dispatchEvent(element: any, eventType: any): void;
|
||||
|
||||
|
||||
|
||||
function el(html: string): HTMLElement;
|
||||
|
||||
|
||||
|
||||
function containsRegexp(input: string): RegExp;
|
||||
|
||||
|
||||
|
||||
function normalizeCSS(css: string): string;
|
||||
|
||||
|
||||
|
||||
function stringifyElement(el: any): string;
|
||||
|
||||
|
||||
|
||||
var RootTestComponent: ng.InjectableReference;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
declare module "angular2/test_lib" {
|
||||
export = ngTestLib;
|
||||
}
|
||||
|
||||
|
||||
+108
-10
@@ -398,9 +398,11 @@ module TestPromise {
|
||||
|
||||
var tresult: TResult;
|
||||
var tresultPromise: ng.IPromise<TResult>;
|
||||
var tresultHttpPromise: ng.IHttpPromise<TResult>;
|
||||
|
||||
var tother: TOther;
|
||||
var totherPromise: ng.IPromise<TOther>;
|
||||
var totherHttpPromise: ng.IHttpPromise<TOther>;
|
||||
|
||||
var promise: angular.IPromise<TResult>;
|
||||
|
||||
@@ -415,6 +417,9 @@ module TestPromise {
|
||||
result = <angular.IPromise<TResult>>promise.then((result) => tresultPromise);
|
||||
result = <angular.IPromise<TResult>>promise.then((result) => tresultPromise, (any) => any);
|
||||
result = <angular.IPromise<TResult>>promise.then((result) => tresultPromise, (any) => any, (any) => any);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TResult>>>promise.then((result) => tresultHttpPromise);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TResult>>>promise.then((result) => tresultHttpPromise, (any) => any);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TResult>>>promise.then((result) => tresultHttpPromise, (any) => any, (any) => any);
|
||||
|
||||
result = <angular.IPromise<TOther>>promise.then((result) => tother);
|
||||
result = <angular.IPromise<TOther>>promise.then((result) => tother, (any) => any);
|
||||
@@ -422,11 +427,18 @@ module TestPromise {
|
||||
result = <angular.IPromise<TOther>>promise.then((result) => totherPromise);
|
||||
result = <angular.IPromise<TOther>>promise.then((result) => totherPromise, (any) => any);
|
||||
result = <angular.IPromise<TOther>>promise.then((result) => totherPromise, (any) => any, (any) => any);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TOther>>>promise.then((result) => totherHttpPromise);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TOther>>>promise.then((result) => totherHttpPromise, (any) => any);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TOther>>>promise.then((result) => totherHttpPromise, (any) => any, (any) => any);
|
||||
|
||||
// promise.catch
|
||||
result = <angular.IPromise<any>>promise.catch((err) => any);
|
||||
result = <angular.IPromise<TResult>>promise.catch((err) => tresult);
|
||||
result = <angular.IPromise<TResult>>promise.catch((err) => tresultPromise);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TResult>>>promise.catch((err) => tresultHttpPromise);
|
||||
result = <angular.IPromise<TOther>>promise.catch((err) => tother);
|
||||
result = <angular.IPromise<TOther>>promise.catch((err) => totherPromise);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TOther>>>promise.catch((err) => totherHttpPromise);
|
||||
|
||||
// promise.finally
|
||||
result = <angular.IPromise<TResult>>promise.finally(() => any);
|
||||
@@ -495,7 +507,7 @@ function test_IAttributes(attributes: ng.IAttributes){
|
||||
}
|
||||
|
||||
test_IAttributes({
|
||||
$normalize: function (classVal){},
|
||||
$normalize: function (classVal){ return "foo" },
|
||||
$addClass: function (classVal){},
|
||||
$removeClass: function(classVal){},
|
||||
$set: function(key, value){},
|
||||
@@ -945,22 +957,93 @@ function NgModelControllerTyping() {
|
||||
};
|
||||
}
|
||||
|
||||
function ngFilterTyping() {
|
||||
var $filter: angular.IFilterService;
|
||||
var items: string[];
|
||||
var $filter: angular.IFilterService;
|
||||
|
||||
$filter("name")(items, "test");
|
||||
$filter("name")(items, {name: "test"});
|
||||
$filter("name")(items, (val, index, array) => {
|
||||
return array;
|
||||
function testFilter() {
|
||||
|
||||
var items: string[];
|
||||
$filter("filter")(items, "test");
|
||||
$filter("filter")(items, {name: "test"});
|
||||
$filter("filter")(items, (val, index, array) => {
|
||||
return true;
|
||||
});
|
||||
$filter("name")(items, (val, index, array) => {
|
||||
return array;
|
||||
$filter("filter")(items, (val, index, array) => {
|
||||
return true;
|
||||
}, (actual, expected) => {
|
||||
return actual == expected;
|
||||
});
|
||||
}
|
||||
|
||||
function testCurrency() {
|
||||
$filter("currency")(126);
|
||||
$filter("currency")(126, "$", 2);
|
||||
}
|
||||
|
||||
function testNumber() {
|
||||
$filter("number")(167);
|
||||
$filter("number")(167, 2);
|
||||
}
|
||||
|
||||
function testDate() {
|
||||
$filter("date")(new Date());
|
||||
$filter("date")(new Date(), 'yyyyMMdd');
|
||||
$filter("date")(new Date(), 'yyyyMMdd', '+0430');
|
||||
}
|
||||
|
||||
function testJson() {
|
||||
var json: string = $filter("json")({test:true}, 2);
|
||||
}
|
||||
|
||||
function testLowercase() {
|
||||
var lower: string = $filter("lowercase")('test');
|
||||
}
|
||||
|
||||
function testUppercase() {
|
||||
var lower: string = $filter("uppercase")('test');
|
||||
}
|
||||
|
||||
function testLimitTo() {
|
||||
var limitTo = $filter("limitTo");
|
||||
var filtered: number[] = $filter("limitTo")([1,2,3], 5);
|
||||
filtered = $filter("limitTo")([1,2,3], 5, 2);
|
||||
|
||||
var filteredString: string = $filter("limitTo")("124", 4);
|
||||
filteredString = $filter("limitTo")(124, 4);
|
||||
}
|
||||
|
||||
function testOrderBy() {
|
||||
var filtered: number[] = $filter("orderBy")([1,2,3], "test");
|
||||
filtered = $filter("orderBy")([1,2,3], "test", true);
|
||||
filtered = $filter("orderBy")([1,2,3], ['prop1', 'prop2']);
|
||||
filtered = $filter("orderBy")([1,2,3], (val: number) => 1);
|
||||
var filtered2: string[] = $filter("orderBy")(["1","2","3"], (val: string) => 1);
|
||||
filtered2 = $filter("orderBy")(["1","2","3"], [
|
||||
(val: string) => 1,
|
||||
(val: string) => 2
|
||||
]);
|
||||
}
|
||||
|
||||
function testDynamicFilter() {
|
||||
// Test with separate variables
|
||||
var dateFilter = $filter("date");
|
||||
var myDate = new Date();
|
||||
dateFilter(myDate , "EEE, MMM d");
|
||||
|
||||
// Test with dynamic name
|
||||
var filterName = 'date';
|
||||
var dynDateFilter = $filter<ng.IFilterDate>(filterName);
|
||||
dynDateFilter(new Date());
|
||||
}
|
||||
|
||||
interface MyCustomFilter {
|
||||
(value: string): string;
|
||||
}
|
||||
|
||||
function testCustomFilter() {
|
||||
var filterCustom = $filter<MyCustomFilter>('custom');
|
||||
var filtered: string = filterCustom("test");
|
||||
}
|
||||
|
||||
function parseTyping() {
|
||||
var $parse: angular.IParseService;
|
||||
var compiledExp = $parse('a.b.c');
|
||||
@@ -970,3 +1053,18 @@ function parseTyping() {
|
||||
return compiledExp({}, {a: {b: {c: 42}}});
|
||||
}
|
||||
}
|
||||
|
||||
function doBootstrap(element: Element | JQuery, mode: string): ng.auto.IInjectorService {
|
||||
if (mode === 'debug') {
|
||||
return angular.bootstrap(element, ['main', function($provide: ng.auto.IProvideService) {
|
||||
$provide.decorator('$rootScope', function($delegate: ng.IRootScopeService) {
|
||||
$delegate['debug'] = true;
|
||||
});
|
||||
}, 'debug-helpers'], {
|
||||
debugInfoEnabled: true
|
||||
});
|
||||
}
|
||||
return angular.bootstrap(element, ['main'], {
|
||||
debugInfoEnabled: false
|
||||
});
|
||||
}
|
||||
|
||||
Vendored
+115
-140
@@ -41,6 +41,7 @@ declare module angular {
|
||||
|
||||
interface IAngularBootstrapConfig {
|
||||
strictDi?: boolean;
|
||||
debugInfoEnabled?: boolean;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -56,132 +57,11 @@ declare module angular {
|
||||
* @param element DOM element which is the root of angular application.
|
||||
* @param modules An array of modules to load into the application.
|
||||
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
||||
* function that will be invoked by the injector as a run block.
|
||||
* function that will be invoked by the injector as a config block.
|
||||
* @param config an object for defining configuration options for the application. The following keys are supported:
|
||||
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
||||
*/
|
||||
bootstrap(element: string, modules?: string, config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
/**
|
||||
* Use this function to manually start up angular application.
|
||||
*
|
||||
* @param element DOM element which is the root of angular application.
|
||||
* @param modules An array of modules to load into the application.
|
||||
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
||||
* function that will be invoked by the injector as a run block.
|
||||
* @param config an object for defining configuration options for the application. The following keys are supported:
|
||||
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
||||
*/
|
||||
bootstrap(element: string, modules?: Function, config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
/**
|
||||
* Use this function to manually start up angular application.
|
||||
*
|
||||
* @param element DOM element which is the root of angular application.
|
||||
* @param modules An array of modules to load into the application.
|
||||
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
||||
* function that will be invoked by the injector as a run block.
|
||||
* @param config an object for defining configuration options for the application. The following keys are supported:
|
||||
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
||||
*/
|
||||
bootstrap(element: string, modules?: string[], config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
/**
|
||||
* Use this function to manually start up angular application.
|
||||
*
|
||||
* @param element DOM element which is the root of angular application.
|
||||
* @param modules An array of modules to load into the application.
|
||||
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
||||
* function that will be invoked by the injector as a run block.
|
||||
* @param config an object for defining configuration options for the application. The following keys are supported:
|
||||
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
||||
*/
|
||||
bootstrap(element: JQuery, modules?: string, config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
/**
|
||||
* Use this function to manually start up angular application.
|
||||
*
|
||||
* @param element DOM element which is the root of angular application.
|
||||
* @param modules An array of modules to load into the application.
|
||||
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
||||
* function that will be invoked by the injector as a run block.
|
||||
* @param config an object for defining configuration options for the application. The following keys are supported:
|
||||
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
||||
*/
|
||||
bootstrap(element: JQuery, modules?: Function, config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
/**
|
||||
* Use this function to manually start up angular application.
|
||||
*
|
||||
* @param element DOM element which is the root of angular application.
|
||||
* @param modules An array of modules to load into the application.
|
||||
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
||||
* function that will be invoked by the injector as a run block.
|
||||
* @param config an object for defining configuration options for the application. The following keys are supported:
|
||||
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
||||
*/
|
||||
bootstrap(element: JQuery, modules?: string[], config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
/**
|
||||
* Use this function to manually start up angular application.
|
||||
*
|
||||
* @param element DOM element which is the root of angular application.
|
||||
* @param modules An array of modules to load into the application.
|
||||
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
||||
* function that will be invoked by the injector as a run block.
|
||||
* @param config an object for defining configuration options for the application. The following keys are supported:
|
||||
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
||||
*/
|
||||
bootstrap(element: Element, modules?: string, config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
/**
|
||||
* Use this function to manually start up angular application.
|
||||
*
|
||||
* @param element DOM element which is the root of angular application.
|
||||
* @param modules An array of modules to load into the application.
|
||||
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
||||
* function that will be invoked by the injector as a run block.
|
||||
* @param config an object for defining configuration options for the application. The following keys are supported:
|
||||
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
||||
*/
|
||||
bootstrap(element: Element, modules?: Function, config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
/**
|
||||
* Use this function to manually start up angular application.
|
||||
*
|
||||
* @param element DOM element which is the root of angular application.
|
||||
* @param modules An array of modules to load into the application.
|
||||
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
||||
* function that will be invoked by the injector as a run block.
|
||||
* @param config an object for defining configuration options for the application. The following keys are supported:
|
||||
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
||||
*/
|
||||
bootstrap(element: Element, modules?: string[], config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
/**
|
||||
* Use this function to manually start up angular application.
|
||||
*
|
||||
* @param element DOM element which is the root of angular application.
|
||||
* @param modules An array of modules to load into the application.
|
||||
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
||||
* function that will be invoked by the injector as a run block.
|
||||
* @param config an object for defining configuration options for the application. The following keys are supported:
|
||||
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
||||
*/
|
||||
bootstrap(element: Document, modules?: string, config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
/**
|
||||
* Use this function to manually start up angular application.
|
||||
*
|
||||
* @param element DOM element which is the root of angular application.
|
||||
* @param modules An array of modules to load into the application.
|
||||
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
||||
* function that will be invoked by the injector as a run block.
|
||||
* @param config an object for defining configuration options for the application. The following keys are supported:
|
||||
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
||||
*/
|
||||
bootstrap(element: Document, modules?: Function, config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
/**
|
||||
* Use this function to manually start up angular application.
|
||||
*
|
||||
* @param element DOM element which is the root of angular application.
|
||||
* @param modules An array of modules to load into the application.
|
||||
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
||||
* function that will be invoked by the injector as a run block.
|
||||
* @param config an object for defining configuration options for the application. The following keys are supported:
|
||||
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
||||
*/
|
||||
bootstrap(element: Document, modules?: string[], config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
bootstrap(element: string|Element|JQuery|Document, modules?: (string|Function|any[])[], config?: IAngularBootstrapConfig): auto.IInjectorService;
|
||||
|
||||
/**
|
||||
* Creates a deep copy of source, which should be an object or an array.
|
||||
@@ -426,7 +306,7 @@ declare module angular {
|
||||
*
|
||||
* For further information check out the guide on @see https://docs.angularjs.org/guide/directive#matching-directives
|
||||
*/
|
||||
$normalize(name: string): void;
|
||||
$normalize(name: string): string;
|
||||
|
||||
/**
|
||||
* Adds the CSS class value specified by the classVal parameter to the
|
||||
@@ -674,7 +554,7 @@ declare module angular {
|
||||
*/
|
||||
$odd: boolean;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
interface IAngularEvent {
|
||||
/**
|
||||
@@ -776,31 +656,127 @@ declare module angular {
|
||||
* see https://docs.angularjs.org/api/ng/service/$filter
|
||||
*/
|
||||
interface IFilterService {
|
||||
(name: 'filter'): IFilterFilter;
|
||||
(name: 'currency'): IFilterCurrency;
|
||||
(name: 'number'): IFilterNumber;
|
||||
(name: 'date'): IFilterDate;
|
||||
(name: 'json'): IFilterJson;
|
||||
(name: 'lowercase'): IFilterLowercase;
|
||||
(name: 'uppercase'): IFilterUppercase;
|
||||
(name: 'limitTo'): IFilterLimitTo;
|
||||
(name: 'orderBy'): IFilterOrderBy;
|
||||
/**
|
||||
* Usage:
|
||||
* $filter(name);
|
||||
*
|
||||
* @param name Name of the filter function to retrieve
|
||||
*/
|
||||
(name: string): IFilterFunc;
|
||||
<T>(name: string): T;
|
||||
}
|
||||
|
||||
interface IFilterFunc {
|
||||
<T>(array: T[], expression: string | IFilterPatternObject | IFilterPredicateFunc<T>, comparator?: IFilterComparatorFunc<T>|boolean): T[];
|
||||
|
||||
interface IFilterFilter {
|
||||
<T>(array: T[], expression: string | IFilterFilterPatternObject | IFilterFilterPredicateFunc<T>, comparator?: IFilterFilterComparatorFunc<T>|boolean): T[];
|
||||
}
|
||||
|
||||
interface IFilterPatternObject {
|
||||
[name: string]: string;
|
||||
|
||||
interface IFilterFilterPatternObject {
|
||||
[name: string]: any;
|
||||
}
|
||||
|
||||
interface IFilterPredicateFunc<T> {
|
||||
(value: T, index: number, array: T[]): T[];
|
||||
|
||||
interface IFilterFilterPredicateFunc<T> {
|
||||
(value: T, index: number, array: T[]): boolean;
|
||||
}
|
||||
|
||||
interface IFilterComparatorFunc<T> {
|
||||
|
||||
interface IFilterFilterComparatorFunc<T> {
|
||||
(actual: T, expected: T): boolean;
|
||||
}
|
||||
|
||||
interface IFilterCurrency {
|
||||
/**
|
||||
* Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default symbol for current locale is used.
|
||||
* @param amount Input to filter.
|
||||
* @param symbol Currency symbol or identifier to be displayed.
|
||||
* @param fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale
|
||||
* @return Formatted number
|
||||
*/
|
||||
(amount: number, symbol?: string, fractionSize?: number): string;
|
||||
}
|
||||
|
||||
interface IFilterNumber {
|
||||
/**
|
||||
* Formats a number as text.
|
||||
* @param number Number to format.
|
||||
* @param fractionSize Number of decimal places to round the number to. If this is not provided then the fraction size is computed from the current locale's number formatting pattern. In the case of the default locale, it will be 3.
|
||||
* @return Number rounded to decimalPlaces and places a “,” after each third digit.
|
||||
*/
|
||||
(value: number|string, fractionSize?: number|string): string;
|
||||
}
|
||||
|
||||
interface IFilterDate {
|
||||
/**
|
||||
* Formats date to a string based on the requested format.
|
||||
*
|
||||
* @param date Date to format either as Date object, milliseconds (string or number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is specified in the string input, the time is considered to be in the local timezone.
|
||||
* @param format Formatting rules (see Description). If not specified, mediumDate is used.
|
||||
* @param timezone Timezone to be used for formatting. It understands UTC/GMT and the continental US time zone abbreviations, but for general use, use a time zone offset, for example, '+0430' (4 hours, 30 minutes east of the Greenwich meridian) If not specified, the timezone of the browser will be used.
|
||||
* @return Formatted string or the input if input is not recognized as date/millis.
|
||||
*/
|
||||
(date: Date | number | string, format?: string, timezone?: string): string;
|
||||
}
|
||||
|
||||
interface IFilterJson {
|
||||
/**
|
||||
* Allows you to convert a JavaScript object into JSON string.
|
||||
* @param object Any JavaScript object (including arrays and primitive types) to filter.
|
||||
* @param spacing The number of spaces to use per indentation, defaults to 2.
|
||||
* @return JSON string.
|
||||
*/
|
||||
(object: any, spacing?: number): string;
|
||||
}
|
||||
|
||||
interface IFilterLowercase {
|
||||
/**
|
||||
* Converts string to lowercase.
|
||||
*/
|
||||
(value: string): string;
|
||||
}
|
||||
|
||||
interface IFilterUppercase {
|
||||
/**
|
||||
* Converts string to uppercase.
|
||||
*/
|
||||
(value: string): string;
|
||||
}
|
||||
|
||||
interface IFilterLimitTo {
|
||||
/**
|
||||
* Creates a new array containing only a specified number of elements. The elements are taken from either the beginning or the end of the source array, string or number, as specified by the value and sign (positive or negative) of limit.
|
||||
* @param input Source array to be limited.
|
||||
* @param limit The length of the returned array. If the limit number is positive, limit number of items from the beginning of the source array/string are copied. If the number is negative, limit number of items from the end of the source array are copied. The limit will be trimmed if it exceeds array.length. If limit is undefined, the input will be returned unchanged.
|
||||
* @param begin Index at which to begin limitation. As a negative index, begin indicates an offset from the end of input. Defaults to 0.
|
||||
* @return A new sub-array of length limit or less if input array had less than limit elements.
|
||||
*/
|
||||
<T>(input: T[], limit: string|number, begin?: string|number): T[];
|
||||
/**
|
||||
* Creates a new string containing only a specified number of elements. The elements are taken from either the beginning or the end of the source string or number, as specified by the value and sign (positive or negative) of limit. If a number is used as input, it is converted to a string.
|
||||
* @param input Source string or number to be limited.
|
||||
* @param limit The length of the returned string. If the limit number is positive, limit number of items from the beginning of the source string are copied. If the number is negative, limit number of items from the end of the source string are copied. The limit will be trimmed if it exceeds input.length. If limit is undefined, the input will be returned unchanged.
|
||||
* @param begin Index at which to begin limitation. As a negative index, begin indicates an offset from the end of input. Defaults to 0.
|
||||
* @return A new substring of length limit or less if input had less than limit elements.
|
||||
*/
|
||||
(input: string|number, limit: string|number, begin?: string|number): string;
|
||||
}
|
||||
|
||||
interface IFilterOrderBy {
|
||||
/**
|
||||
* Orders a specified array by the expression predicate. It is ordered alphabetically for strings and numerically for numbers. Note: if you notice numbers are not being sorted as expected, make sure they are actually being saved as numbers and not strings.
|
||||
* @param array The array to sort.
|
||||
* @param expression A predicate to be used by the comparator to determine the order of elements.
|
||||
* @param reverse Reverse the order of the array.
|
||||
* @return Reverse the order of the array.
|
||||
*/
|
||||
<T>(array: T[], expression: string|string[]|((value: T) => any)|((value: T) => any)[], reverse?: boolean): T[];
|
||||
}
|
||||
|
||||
/**
|
||||
* $filterProvider - $filter - provider in module ng
|
||||
*
|
||||
@@ -1078,12 +1054,12 @@ declare module angular {
|
||||
* The successCallBack may return IPromise<void> for when a $q.reject() needs to be returned
|
||||
* This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
|
||||
*/
|
||||
then<TResult>(successCallback: (promiseValue: T) => IHttpPromise<TResult>|IPromise<TResult>|TResult|IPromise<void>, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise<TResult>;
|
||||
then<TResult>(successCallback: (promiseValue: T) => IPromise<TResult>|TResult, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise<TResult>;
|
||||
|
||||
/**
|
||||
* Shorthand for promise.then(null, errorCallback)
|
||||
*/
|
||||
catch<TResult>(onRejected: (reason: any) => IHttpPromise<TResult>|IPromise<TResult>|TResult): IPromise<TResult>;
|
||||
catch<TResult>(onRejected: (reason: any) => IPromise<TResult>|TResult): IPromise<TResult>;
|
||||
|
||||
/**
|
||||
* Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful to release resources or do some clean-up that needs to be done whether the promise was rejected or resolved. See the full specification for more information.
|
||||
@@ -1411,7 +1387,6 @@ declare module angular {
|
||||
interface IHttpPromise<T> extends IPromise<IHttpPromiseCallbackArg<T>> {
|
||||
success(callback: IHttpPromiseCallback<T>): IHttpPromise<T>;
|
||||
error(callback: IHttpPromiseCallback<any>): IHttpPromise<T>;
|
||||
then<TResult>(successCallback: (response: IHttpPromiseCallbackArg<T>) => IPromise<TResult>|TResult, errorCallback?: (response: IHttpPromiseCallbackArg<any>) => any): IPromise<TResult>;
|
||||
}
|
||||
|
||||
// See the jsdoc for transformData() at https://github.com/angular/angular.js/blob/master/src/ng/http.js#L228
|
||||
|
||||
Vendored
+215
-146
@@ -4,197 +4,266 @@
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../when/when.d.ts" />
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
|
||||
declare module autobahn {
|
||||
|
||||
export class Session {
|
||||
id: number;
|
||||
realm: string;
|
||||
isOpen: boolean;
|
||||
features: any;
|
||||
caller_disclose_me: boolean;
|
||||
publisher_disclose_me: boolean;
|
||||
subscriptions: ISubscription[][];
|
||||
registrations: IRegistration[];
|
||||
export class Session {
|
||||
id: number;
|
||||
realm: string;
|
||||
isOpen: boolean;
|
||||
features: any;
|
||||
caller_disclose_me: boolean;
|
||||
publisher_disclose_me: boolean;
|
||||
subscriptions: ISubscription[][];
|
||||
registrations: IRegistration[];
|
||||
|
||||
constructor(transport: ITransport, defer: DeferFactory, challenge: OnChallengeHandler);
|
||||
constructor(transport: ITransport, defer: DeferFactory, challenge: OnChallengeHandler);
|
||||
|
||||
join(realm: string, authmethods: string[], authid: string): void;
|
||||
join(realm: string, authmethods: string[], authid: string): void;
|
||||
|
||||
leave(reason: string, message: string): void;
|
||||
leave(reason: string, message: string): void;
|
||||
|
||||
call<TResult>(procedure: string, args?: any[], kwargs?: any, options?: ICallOptions): When.Promise<TResult>;
|
||||
call<TResult>(procedure: string, args?: any[], kwargs?: any, options?: ICallOptions): When.Promise<TResult>;
|
||||
|
||||
publish(topic: string, args?: any[], kwargs?: any, options?: IPublishOptions): When.Promise<IPublication>;
|
||||
publish(topic: string, args?: any[], kwargs?: any, options?: IPublishOptions): When.Promise<IPublication>;
|
||||
|
||||
subscribe(topic: string, handler: SubscribeHandler, options?: ISubscribeOptions): When.Promise<ISubscription>;
|
||||
subscribe(topic: string, handler: SubscribeHandler, options?: ISubscribeOptions): When.Promise<ISubscription>;
|
||||
|
||||
register(procedure: string, endpoint: RegisterEndpoint, options?: IRegisterOptions): When.Promise<IRegistration>;
|
||||
register(procedure: string, endpoint: RegisterEndpoint, options?: IRegisterOptions): When.Promise<IRegistration>;
|
||||
|
||||
unsubscribe(subscription: ISubscription): When.Promise<any>;
|
||||
unsubscribe(subscription: ISubscription): When.Promise<any>;
|
||||
|
||||
unregister(registration: IRegistration): When.Promise<any>;
|
||||
unregister(registration: IRegistration): When.Promise<any>;
|
||||
|
||||
prefix(prefix: string, uri: string): void;
|
||||
prefix(prefix: string, uri: string): void;
|
||||
|
||||
resolve(curie: string): string;
|
||||
resolve(curie: string): string;
|
||||
|
||||
onjoin: (roleFeatures: any) => void;
|
||||
onleave: (reason: string, details: any) => void;
|
||||
}
|
||||
onjoin: (roleFeatures: any) => void;
|
||||
onleave: (reason: string, details: any) => void;
|
||||
}
|
||||
|
||||
interface IInvocation {
|
||||
caller?: number;
|
||||
progress?: boolean;
|
||||
procedure: string;
|
||||
}
|
||||
interface IInvocation {
|
||||
caller?: number;
|
||||
progress?: boolean;
|
||||
procedure: string;
|
||||
}
|
||||
|
||||
interface IEvent {
|
||||
publication: number;
|
||||
publisher?: number;
|
||||
topic: string;
|
||||
}
|
||||
class Invocation implements IInvocation {
|
||||
constructor(caller?: number, progress?: boolean, procedure?: string);
|
||||
|
||||
interface IResult {
|
||||
args: any[];
|
||||
kwargs: any;
|
||||
}
|
||||
procedure: string;
|
||||
}
|
||||
|
||||
interface IError {
|
||||
error: string;
|
||||
args: any[];
|
||||
kwargs: any;
|
||||
}
|
||||
interface IEvent {
|
||||
publication: number;
|
||||
publisher?: number;
|
||||
topic: string;
|
||||
}
|
||||
|
||||
type SubscribeHandler = (args?: any[], kwargs?: any, details?: IEvent) => void;
|
||||
class Event implements IEvent {
|
||||
constructor(publication?: number, publisher?: string, topic?: string);
|
||||
|
||||
interface ISubscription {
|
||||
topic: string;
|
||||
handler: SubscribeHandler;
|
||||
options: ISubscribeOptions;
|
||||
session: Session;
|
||||
id: number;
|
||||
active: boolean;
|
||||
unsubscribe(): When.Promise<any>;
|
||||
}
|
||||
publication: number;
|
||||
topic: string;
|
||||
}
|
||||
|
||||
type RegisterEndpoint = (args?: any[], kwargs?: any, details?: IInvocation) => void;
|
||||
interface IResult {
|
||||
args: any[];
|
||||
kwargs: any;
|
||||
}
|
||||
|
||||
interface IRegistration {
|
||||
procedure: string;
|
||||
endpoint: RegisterEndpoint;
|
||||
options: IRegisterOptions;
|
||||
session: Session;
|
||||
id: number;
|
||||
active: boolean;
|
||||
unregister(): When.Promise<any>;
|
||||
}
|
||||
class Result implements IResult {
|
||||
constructor(args?: any[], kwargs?: any);
|
||||
|
||||
interface IPublication {
|
||||
id: number;
|
||||
}
|
||||
args: any[];
|
||||
kwargs: any;
|
||||
}
|
||||
|
||||
interface ICallOptions {
|
||||
timeout?: number;
|
||||
receive_progress?: boolean;
|
||||
disclose_me?: boolean;
|
||||
}
|
||||
interface IError {
|
||||
error: string;
|
||||
args: any[];
|
||||
kwargs: any;
|
||||
}
|
||||
|
||||
interface IPublishOptions {
|
||||
exclude?: number[];
|
||||
eligible?: number[];
|
||||
disclose_me? : Boolean;
|
||||
}
|
||||
class Error implements IError {
|
||||
constructor(error?: string, args?: any[], kwargs?: any);
|
||||
|
||||
interface ISubscribeOptions {
|
||||
match? : string;
|
||||
}
|
||||
error: string;
|
||||
args: any[];
|
||||
kwargs: any;
|
||||
}
|
||||
|
||||
interface IRegisterOptions {
|
||||
disclose_caller?: boolean;
|
||||
}
|
||||
type SubscribeHandler = (args?: any[], kwargs?: any, details?: IEvent) => void;
|
||||
|
||||
export class Connection {
|
||||
constructor(options?: IConnectionOptions);
|
||||
interface ISubscription {
|
||||
topic: string;
|
||||
handler: SubscribeHandler;
|
||||
options: ISubscribeOptions;
|
||||
session: Session;
|
||||
id: number;
|
||||
active: boolean;
|
||||
unsubscribe(): When.Promise<any>;
|
||||
}
|
||||
|
||||
open(): void;
|
||||
class Subscription implements ISubscription {
|
||||
constructor(topic? : string, handler?: SubscribeHandler, options?: ISubscribeOptions, session?: Session, id?: number);
|
||||
|
||||
close(reason: string, message: string): void;
|
||||
handler: SubscribeHandler;
|
||||
|
||||
onopen: (session: Session, details: any) => void;
|
||||
onclose: (reason: string, details: any) => boolean;
|
||||
}
|
||||
unsubscribe(): When.Promise<any>;
|
||||
|
||||
interface ITransportDefinition {
|
||||
url?: string;
|
||||
protocols?: string[];
|
||||
type: string;
|
||||
}
|
||||
topic: string;
|
||||
options: ISubscribeOptions;
|
||||
session: Session;
|
||||
id: number;
|
||||
active: boolean;
|
||||
}
|
||||
|
||||
type DeferFactory = () => any;
|
||||
type RegisterEndpoint = (args?: any[], kwargs?: any, details?: IInvocation) => void;
|
||||
|
||||
type OnChallengeHandler = (session: Session, method: string, extra: any) => When.Promise<string>;
|
||||
interface IRegistration {
|
||||
procedure: string;
|
||||
endpoint: RegisterEndpoint;
|
||||
options: IRegisterOptions;
|
||||
session: Session;
|
||||
id: number;
|
||||
active: boolean;
|
||||
unregister(): When.Promise<any>;
|
||||
}
|
||||
|
||||
interface IConnectionOptions {
|
||||
use_es6_promises?: boolean;
|
||||
// use explicit deferred factory, e.g. jQuery.Deferred or Q.defer
|
||||
use_deferred?: DeferFactory;
|
||||
transports?: ITransportDefinition[];
|
||||
retry_if_unreachable?: boolean;
|
||||
max_retries?: number;
|
||||
initial_retry_delay?: number;
|
||||
max_retry_delay?: number;
|
||||
retry_delay_growth?: number;
|
||||
retry_delay_jitter?: number;
|
||||
url?: string;
|
||||
protocols?: string[];
|
||||
onchallenge?: (session: Session, method: string, extra: any) => OnChallengeHandler;
|
||||
realm?: string;
|
||||
authmethods?: string[];
|
||||
authid?: string;
|
||||
}
|
||||
class Registration implements IRegistration {
|
||||
constructor(procedure?: string, endpoint?: RegisterEndpoint, options?: IRegisterOptions, session?: Session, id?: number);
|
||||
|
||||
interface ICloseEventDetails {
|
||||
wasClean: boolean;
|
||||
reason: string;
|
||||
code: number;
|
||||
}
|
||||
endpoint: RegisterEndpoint;
|
||||
|
||||
interface ITransport {
|
||||
onopen: () => void;
|
||||
onmessage: (message: any[]) => void;
|
||||
onclose: (details: ICloseEventDetails) => void;
|
||||
unregister(): When.Promise<any>;
|
||||
|
||||
send(message: any[]): void;
|
||||
close(errorCode: number, reason?: string): void;
|
||||
}
|
||||
procedure: string;
|
||||
options: IRegisterOptions;
|
||||
session: Session;
|
||||
id: number;
|
||||
active: boolean;
|
||||
}
|
||||
|
||||
interface ITransportFactory {
|
||||
//constructor(options: any);
|
||||
type: string;
|
||||
create(): ITransport;
|
||||
}
|
||||
interface IPublication {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface ITransports {
|
||||
register(name: string, factory: any): void;
|
||||
isRegistered(name: string): boolean;
|
||||
get(name: string): any;
|
||||
list(): any[];
|
||||
}
|
||||
class Publication implements IPublication {
|
||||
constructor(id: number);
|
||||
|
||||
interface ILog {
|
||||
debug(...args: any[]): void;
|
||||
}
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface IUtil {
|
||||
assert(condition: boolean, message: string): void;
|
||||
}
|
||||
interface ICallOptions {
|
||||
timeout?: number;
|
||||
receive_progress?: boolean;
|
||||
disclose_me?: boolean;
|
||||
}
|
||||
|
||||
var util: IUtil;
|
||||
var log: ILog;
|
||||
var transports: ITransports;
|
||||
interface IPublishOptions {
|
||||
exclude?: number[];
|
||||
eligible?: number[];
|
||||
disclose_me?: Boolean;
|
||||
}
|
||||
|
||||
interface ISubscribeOptions {
|
||||
match?: string;
|
||||
}
|
||||
|
||||
interface IRegisterOptions {
|
||||
disclose_caller?: boolean;
|
||||
}
|
||||
|
||||
export class Connection {
|
||||
constructor(options?: IConnectionOptions);
|
||||
|
||||
open(): void;
|
||||
|
||||
close(reason: string, message: string): void;
|
||||
|
||||
onopen: (session: Session, details: any) => void;
|
||||
onclose: (reason: string, details: any) => boolean;
|
||||
}
|
||||
|
||||
interface ITransportDefinition {
|
||||
url?: string;
|
||||
protocols?: string[];
|
||||
type: string;
|
||||
}
|
||||
|
||||
type DeferFactory = () => JQueryPromise<any>;
|
||||
|
||||
type OnChallengeHandler = (session: Session, method: string, extra: any) => When.Promise<string>;
|
||||
|
||||
interface IConnectionOptions {
|
||||
use_es6_promises?: boolean;
|
||||
// use explicit deferred factory, e.g. jQuery.Deferred or Q.defer
|
||||
use_deferred?: DeferFactory;
|
||||
transports?: ITransportDefinition[];
|
||||
retry_if_unreachable?: boolean;
|
||||
max_retries?: number;
|
||||
initial_retry_delay?: number;
|
||||
max_retry_delay?: number;
|
||||
retry_delay_growth?: number;
|
||||
retry_delay_jitter?: number;
|
||||
url?: string;
|
||||
protocols?: string[];
|
||||
onchallenge?: (session: Session, method: string, extra: any) => OnChallengeHandler;
|
||||
realm?: string;
|
||||
authmethods?: string[];
|
||||
authid?: string;
|
||||
}
|
||||
|
||||
interface ICloseEventDetails {
|
||||
wasClean: boolean;
|
||||
reason: string;
|
||||
code: number;
|
||||
}
|
||||
|
||||
interface ITransport {
|
||||
onopen: () => void;
|
||||
onmessage: (message: any[]) => void;
|
||||
onclose: (details: ICloseEventDetails) => void;
|
||||
|
||||
send(message: any[]): void;
|
||||
close(errorCode: number, reason?: string): void;
|
||||
}
|
||||
|
||||
interface ITransportFactory {
|
||||
// constructor(options: any);
|
||||
type: string;
|
||||
create(): ITransport;
|
||||
}
|
||||
|
||||
interface ITransports {
|
||||
register(name: string, factory: any): void;
|
||||
isRegistered(name: string): boolean;
|
||||
get(name: string): any;
|
||||
list(): string[];
|
||||
}
|
||||
|
||||
interface ILog {
|
||||
debug(...args: any[]): void;
|
||||
}
|
||||
|
||||
interface IUtil {
|
||||
assert(condition: boolean, message: string): void;
|
||||
}
|
||||
|
||||
interface IAuthCra {
|
||||
derive_key(secret: string, salt: string, iterations: number, keylen: number): string;
|
||||
sign(key: string, challenge: string): string;
|
||||
}
|
||||
|
||||
var util: IUtil;
|
||||
var log: ILog;
|
||||
var transports: ITransports;
|
||||
var auth_cra: IAuthCra;
|
||||
}
|
||||
|
||||
declare module "autobahn" {
|
||||
export = autobahn;
|
||||
export = autobahn;
|
||||
}
|
||||
|
||||
@@ -16,3 +16,13 @@ axios<Repository>({
|
||||
method: HttpMethod[HttpMethod.GET],
|
||||
headers: {},
|
||||
}).then(r => console.log("ID:" + r.data.id + " Name: " + r.data.name));
|
||||
|
||||
axios.post("http://example.com/", {}, {
|
||||
transformRequest: (data: any) => data
|
||||
});
|
||||
|
||||
axios.post("http://example.com/", {}, {
|
||||
transformRequest: [
|
||||
(data: any) => data
|
||||
]
|
||||
});
|
||||
|
||||
Vendored
+1
-1
@@ -17,7 +17,7 @@ declare module Axios {
|
||||
* This is only applicable for request methods 'PUT', 'POST', and 'PATCH'
|
||||
* The last function in the array must return a string or an ArrayBuffer
|
||||
*/
|
||||
transformRequest?: <U>(data:T) => U;
|
||||
transformRequest?: (<U>(data:T) => U)|[<U>(data:T) => U];
|
||||
|
||||
/**
|
||||
* change the response data to be made before it is passed to then/catch
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
/// <reference path="basic-auth.d.ts" />
|
||||
|
||||
import auth = require('basic-auth');
|
||||
|
||||
auth(null);
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// Type definitions for basic-auth
|
||||
// Project: https://github.com/jshttp/basic-auth
|
||||
// Definitions by: Clément Bourgeois <https://github.com/moonpyk>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
declare module "basic-auth" {
|
||||
function auth(req: Express.Request): auth.BasicAuthResult;
|
||||
|
||||
namespace auth {
|
||||
interface BasicAuthResult {
|
||||
name: string;
|
||||
pass: string;
|
||||
}
|
||||
}
|
||||
|
||||
export = auth;
|
||||
}
|
||||
@@ -48,6 +48,10 @@ declare module BootstrapV3DatetimePicker {
|
||||
direction?: string;
|
||||
sideBySide?: boolean;
|
||||
daysOfWeekDisabled?: Array<any>;
|
||||
calendarWeeks?: boolean;
|
||||
format?: string | boolean;
|
||||
locale?: string;
|
||||
showTodayButton?: boolean;
|
||||
}
|
||||
|
||||
interface Datetimepicker {
|
||||
@@ -97,4 +101,4 @@ interface JQuery {
|
||||
on(events: 'dp.error', handler: (eventObject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
|
||||
|
||||
data(key: 'DateTimePicker'): BootstrapV3DatetimePicker.Datetimepicker;
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -857,7 +857,7 @@ declare module breeze {
|
||||
tag: Object;
|
||||
static defaultInstance: SaveOptions;
|
||||
|
||||
constructor(config?: { allowConcurrentSaves?: boolean; });
|
||||
constructor(config?: { allowConcurrentSaves?: boolean; resourceName?: string; dataService?: DataService; tag?: any});
|
||||
|
||||
setAsDefault(): SaveOptions;
|
||||
using(config: SaveOptionsConfiguration): SaveOptions;
|
||||
|
||||
Vendored
+1
-1
@@ -182,7 +182,7 @@ declare module Chartist {
|
||||
labelOffset?: {
|
||||
x?: number;
|
||||
y?: number;
|
||||
},
|
||||
};
|
||||
showLabel?: boolean;
|
||||
showGrid?: boolean;
|
||||
labelInterpolationFnc?: Function;
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/// <reference path="connect-mongo.d.ts" />
|
||||
|
||||
import * as express from 'express';
|
||||
import * as mongoose from 'mongoose';
|
||||
import * as session from 'express-session';
|
||||
import * as connectMongo from 'connect-mongo';
|
||||
import * as mongodb from 'mongodb';
|
||||
|
||||
var app = express();
|
||||
|
||||
/// Create MongoStore
|
||||
var MongoStore = connectMongo(session);
|
||||
|
||||
/// Use MongoStore
|
||||
|
||||
// MongoUrlOptions
|
||||
app.use(session({
|
||||
secret: 'secret',
|
||||
store: new MongoStore({url: 'mongodb://localhost/test'})
|
||||
}));
|
||||
|
||||
|
||||
app.use(session({
|
||||
secret: 'secret',
|
||||
store: new MongoStore({
|
||||
url: 'mongodb://localhost/test',
|
||||
collection: "test-sessions",
|
||||
ttl: 30 * 24 * 60 * 60 // = 30 days
|
||||
})
|
||||
}));
|
||||
|
||||
// MongooseConnectionOptions
|
||||
mongoose.connect('mongodb://localhost/test')
|
||||
app.use(session({
|
||||
secret: 'secret',
|
||||
store: new MongoStore({mongooseConnection: mongoose.connection})
|
||||
}));
|
||||
|
||||
// NativeMongoOptions
|
||||
var Db = mongodb.Db
|
||||
var Server = mongodb.Server
|
||||
var mongoDb = new Db('test', new Server('localhost', 27017));
|
||||
app.use(session({
|
||||
secret: 'secret',
|
||||
store: new MongoStore({db: mongoDb})
|
||||
}));
|
||||
Vendored
+113
@@ -0,0 +1,113 @@
|
||||
// Type definitions for connect-mongo
|
||||
// Project: https://github.com/kcbanner/connect-mongo
|
||||
// Definitions by: Mizuki Yamamoto <https://github.com/Syati>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
/// <reference path="../mongoose/mongoose.d.ts" />
|
||||
/// <reference path="../mongodb/mongodb.d.ts" />
|
||||
/// <reference path="../express-session/express-session.d.ts" />
|
||||
|
||||
declare module "connect-mongo" {
|
||||
import * as express from 'express';
|
||||
import * as mongoose from 'mongoose';
|
||||
import * as mongodb from 'mongodb';
|
||||
import * as session from 'express-session';
|
||||
|
||||
function connectMongo(connect: (options?: session.SessionOptions) => express.RequestHandler): connectMongo.MongoStoreFactory;
|
||||
|
||||
module connectMongo {
|
||||
|
||||
export interface DefaultOptions{
|
||||
/**
|
||||
* The hostname of the database you are connecting to.
|
||||
* (Default: '127.0.0.1')
|
||||
*/
|
||||
host?: string;
|
||||
|
||||
/**
|
||||
* The port number to connect to.
|
||||
* (Default: 27017)
|
||||
*/
|
||||
port?: string;
|
||||
|
||||
/**
|
||||
* (Default: false)
|
||||
*/
|
||||
autoReconnect?: boolean;
|
||||
|
||||
/**
|
||||
* (Default: true)
|
||||
*/
|
||||
ssl?: boolean;
|
||||
|
||||
/**
|
||||
* (Default: 1)
|
||||
*/
|
||||
w?: number;
|
||||
|
||||
/**
|
||||
* The colletion of the database you are connecting to.
|
||||
* (Default: sessions)
|
||||
*/
|
||||
collection?: string;
|
||||
|
||||
/**
|
||||
* Serialize sessions using JSON.stringify and deserialize them with JSON.parse.
|
||||
* (Default: true)
|
||||
*/
|
||||
stringify?: boolean;
|
||||
|
||||
/**
|
||||
* Default: false
|
||||
*/
|
||||
hash?: boolean;
|
||||
|
||||
/**
|
||||
* Default: 14 days (60 * 60 * 24 * 14)
|
||||
*/
|
||||
ttl?: number;
|
||||
|
||||
/**
|
||||
* Automatically remove expired sessions.
|
||||
* (Default: 'native')
|
||||
*/
|
||||
autoRemove?: string;
|
||||
|
||||
/**
|
||||
* (Default: 10)
|
||||
*/
|
||||
autoRemoveInterval?: number;
|
||||
}
|
||||
|
||||
export interface MongoUrlOptions extends DefaultOptions {
|
||||
url: string;
|
||||
mongoOptions?: mongoose.ConnectionOptions;
|
||||
}
|
||||
|
||||
export interface MogooseConnectionOptions extends DefaultOptions {
|
||||
mongooseConnection: mongoose.Connection;
|
||||
}
|
||||
|
||||
export interface NaitiveMongoOptions extends DefaultOptions {
|
||||
db: mongodb.Db;
|
||||
}
|
||||
|
||||
export interface MongoStoreFactory {
|
||||
new (options: MongoUrlOptions): MongoStore;
|
||||
new (options: MogooseConnectionOptions): MongoStore;
|
||||
new (options: NaitiveMongoOptions): MongoStore;
|
||||
}
|
||||
|
||||
export class MongoStore implements session.Store {
|
||||
get: (sid: string, callback: (err: any, session: Express.Session) => void) => void;
|
||||
set: (sid: string, session: Express.Session, callback: (err: any) => void) => void;
|
||||
destroy: (sid: string, callback: (err: any) => void) => void;
|
||||
length: (callback: (err: any, length: number) => void) => void;
|
||||
clear: (callback: (err: any) => void) => void;
|
||||
touch: (sid: string, session: Express.Session, callback:(err: any) => void) => void;
|
||||
}
|
||||
}
|
||||
|
||||
export = connectMongo;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/// <reference path="express-route-fs.d.ts" />
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
import express = require('express');
|
||||
import routeFs = require('express-route-fs');
|
||||
|
||||
var app = express();
|
||||
|
||||
routeFs(app);
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// Type definitions for express-route-fs v0.1.0
|
||||
// Project: https://github.com/kripod/express-route-fs
|
||||
// Definitions by: Kristóf Poduszló <https://github.com/kripod>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "express-route-fs" {
|
||||
/**
|
||||
Sets up file system-based routing in Express.
|
||||
@param {Object} app Express application object.
|
||||
@param {Object[]} [options] Options for setting up routes.
|
||||
*/
|
||||
function routeFs(app: any, options?: any): void;
|
||||
export = routeFs;
|
||||
}
|
||||
Vendored
+2
@@ -108,6 +108,8 @@ declare module "express" {
|
||||
use(path: string, handler: ErrorRequestHandler): T;
|
||||
use(path: string[], ...handler: RequestHandler[]): T;
|
||||
use(path: string[], handler: ErrorRequestHandler): T;
|
||||
use(path: RegExp, ...handler: RequestHandler[]): T;
|
||||
use(path: RegExp, handler: ErrorRequestHandler): T;
|
||||
}
|
||||
|
||||
export function Router(options?: any): Router;
|
||||
|
||||
Vendored
+8
-8
@@ -65,23 +65,23 @@ interface FirebaseDataSnapshot {
|
||||
|
||||
interface FirebaseOnDisconnect {
|
||||
/**
|
||||
* Ensures the data at this location is set to the specified value when the client is disconnected
|
||||
* Ensures the data at this location is set to the specified value when the client is disconnected
|
||||
* (due to closing the browser, navigating to a new page, or network issues).
|
||||
*/
|
||||
set(value: any, onComplete?: (error: any) => void): void;
|
||||
/**
|
||||
* Ensures the data at this location is set to the specified value and priority when the client is disconnected
|
||||
* Ensures the data at this location is set to the specified value and priority when the client is disconnected
|
||||
* (due to closing the browser, navigating to a new page, or network issues).
|
||||
*/
|
||||
setWithPriority(value: any, priority: string, onComplete?: (error: any) => void): void;
|
||||
setWithPriority(value: any, priority: number, onComplete?: (error: any) => void): void;
|
||||
/**
|
||||
* Writes the enumerated children at this Firebase location when the client is disconnected
|
||||
* Writes the enumerated children at this Firebase location when the client is disconnected
|
||||
* (due to closing the browser, navigating to a new page, or network issues).
|
||||
*/
|
||||
update(value: Object, onComplete?: (error: any) => void): void;
|
||||
/**
|
||||
* Ensures the data at this location is deleted when the client is disconnected
|
||||
* Ensures the data at this location is deleted when the client is disconnected
|
||||
* (due to closing the browser, navigating to a new page, or network issues).
|
||||
*/
|
||||
remove(onComplete?: (error: any) => void): void;
|
||||
@@ -127,13 +127,13 @@ interface FirebaseQuery {
|
||||
*/
|
||||
limit(limit: number): FirebaseQuery;
|
||||
/**
|
||||
* Creates a Query with the specified starting point.
|
||||
* Creates a Query with the specified starting point.
|
||||
* The generated Query includes children which match the specified starting point.
|
||||
*/
|
||||
startAt(value: string, key?: string): FirebaseQuery;
|
||||
startAt(value: number, key?: string): FirebaseQuery;
|
||||
/**
|
||||
* Creates a Query with the specified ending point.
|
||||
* Creates a Query with the specified ending point.
|
||||
* The generated Query includes children which match the specified ending point.
|
||||
*/
|
||||
endAt(value: string, key?: string): FirebaseQuery;
|
||||
@@ -263,7 +263,7 @@ interface Firebase extends FirebaseQuery {
|
||||
/**
|
||||
* Creates a new user account using an email / password combination.
|
||||
*/
|
||||
createUser(credentials: FirebaseCredentials, onComplete: (error: any) => void): void;
|
||||
createUser(credentials: FirebaseCredentials, onComplete: (error: any, userData: any) => void): void;
|
||||
/**
|
||||
* Updates the email associated with an email / password user account.
|
||||
*/
|
||||
@@ -298,7 +298,7 @@ interface FirebaseStatic {
|
||||
|
||||
ServerValue: {
|
||||
/**
|
||||
* A placeholder value for auto-populating the current timestamp
|
||||
* A placeholder value for auto-populating the current timestamp
|
||||
* (time since the Unix epoch, in milliseconds) by the Firebase servers.
|
||||
*/
|
||||
TIMESTAMP: any;
|
||||
|
||||
@@ -12,5 +12,6 @@ gulp.task('sass', function () {
|
||||
gulp.task('sass', function () {
|
||||
gulp.src('./scss/*.scss')
|
||||
.pipe(sass({errLogToConsole: true}))
|
||||
.pipe(sass.sync())
|
||||
.pipe(gulp.dest('./css'));
|
||||
});
|
||||
Vendored
+2
@@ -45,6 +45,8 @@ declare module "gulp-sass" {
|
||||
|
||||
interface Sass {
|
||||
(opts?: Options): NodeJS.ReadWriteStream;
|
||||
logError(error?: string): void;
|
||||
sync(options?: Options): NodeJS.ReadWriteStream;
|
||||
}
|
||||
|
||||
var _tmp: Sass;
|
||||
|
||||
Vendored
+2
-2
@@ -30,7 +30,7 @@ interface HighstockNavigatorOptions {
|
||||
|
||||
interface RangeSelectorButton {
|
||||
type: string; //Defines the timespan, can be one of 'millisecond', 'second', 'minute', 'day', 'week', 'month', 'ytd' (year to date), 'year' and 'all'.
|
||||
count: number;
|
||||
count?: number;
|
||||
text: string;
|
||||
dataGrouping?: any; //not sure how this works
|
||||
}
|
||||
@@ -117,4 +117,4 @@ interface JQuery {
|
||||
highcharts(type: string): HighchartsChartObject;
|
||||
highcharts(type: string, options: HighchartsOptions): JQuery;
|
||||
highcharts(type: string, options: HighchartsOptions, callback: (chart: HighchartsChartObject) => void): JQuery;
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
// Type definitions for joi v4.6.0
|
||||
// Project: https://github.com/spumko/joi
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Laurence Dougal Myers <https://github.com/laurence-myers>
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Laurence Dougal Myers <https://github.com/laurence-myers>, Christopher Glantschnig <https://github.com/cglantschnig>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// TODO express type of Schema in a type-parameter (.default, .valid, .example etc)
|
||||
@@ -120,7 +120,7 @@ declare module 'joi' {
|
||||
cidr?: string
|
||||
}
|
||||
|
||||
export interface ValidationError {
|
||||
export interface ValidationError extends Error {
|
||||
message: string;
|
||||
details: ValidationErrorItem[];
|
||||
simple(): string;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
/// <reference path="jquery-cropbox.d.ts"/>
|
||||
|
||||
var cropboxWithDefaultSettings = $("#element").cropbox();
|
||||
|
||||
var cropboxOptions: jQueryCropBox.CropboxOptions = {
|
||||
height: 500,
|
||||
zoom: 5,
|
||||
width: 0.5,
|
||||
};
|
||||
|
||||
var cropboxWithOptions = $("#element").cropbox(cropboxOptions);
|
||||
|
||||
cropboxWithOptions.zoomIn();
|
||||
cropboxWithOptions.zoomOut();
|
||||
cropboxWithOptions.zoom(50);
|
||||
|
||||
var cropDragOption: jQueryCropBox.CropboxDragOptions = {
|
||||
startX: 10,
|
||||
startY: 0,
|
||||
dx: 100,
|
||||
dy: 100
|
||||
};
|
||||
|
||||
cropboxWithOptions.drag(cropDragOption);
|
||||
|
||||
var cropboxSetCropOption: jQueryCropBox.CropboxSetCropOptions = {
|
||||
cropX: 10,
|
||||
cropY: 10,
|
||||
cropW: 50,
|
||||
cropH: 50
|
||||
};
|
||||
|
||||
cropboxWithOptions.setCrop(cropboxSetCropOption);
|
||||
|
||||
cropboxWithOptions.update();
|
||||
cropboxWithOptions.getDataURL();
|
||||
cropboxWithOptions.getBlob();
|
||||
cropboxWithOptions.remove();
|
||||
Vendored
+115
@@ -0,0 +1,115 @@
|
||||
// Type definitions for jQuery cropbox
|
||||
// Project: https://github.com/acornejo/jquery-cropbox
|
||||
// Definitions by: Per Kastman <https://github.com/PerKastman/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
|
||||
declare module jQueryCropBox {
|
||||
|
||||
enum ShowControls {
|
||||
never,
|
||||
always,
|
||||
hover,
|
||||
auto
|
||||
}
|
||||
|
||||
interface CropboxArea {
|
||||
cropX: number;
|
||||
cropY: number;
|
||||
cropW: number;
|
||||
cropH: number;
|
||||
}
|
||||
|
||||
interface CropboxOptions {
|
||||
/**
|
||||
* Width in pixels of the cropping window
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* Height in pixels of the cropping window
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* Number of incremental zoom steps. With the default of 10, you have to click the zoom-in button 9 times to reach 100%.
|
||||
*/
|
||||
zoom?: number;
|
||||
/**
|
||||
* Maximum zoom value. With the default of 1.0 users can't zoom beyond the maximum image resolution.
|
||||
*/
|
||||
maxZoom?: number;
|
||||
/**
|
||||
* If not null, this is the entire html block that should appear on hover over the image for instructions and/or buttons (could include the zoom in/out buttons for example). If null, the default html block is used which has the text "Click to drag" and the zoom in/out buttons. Use false to disable controls.
|
||||
*/
|
||||
controls?: any;
|
||||
/**
|
||||
* Set the initial cropping area
|
||||
*/
|
||||
result?: CropboxArea;
|
||||
/**
|
||||
* This flag is used to determine when to display the controls. Never, always and hover do exactly what you would expect (never show them, always show them, show them on hover). The auto flag is the same as the hover flag, except that on mobile devices it always shows the controls (since there is no hover event).
|
||||
*/
|
||||
showControls?: ShowControls
|
||||
}
|
||||
|
||||
interface CropboxDragOptions {
|
||||
startX: number,
|
||||
startY: number,
|
||||
dx: number,
|
||||
dy: number
|
||||
}
|
||||
|
||||
interface CropboxSetCropOptions {
|
||||
cropX: number,
|
||||
cropY: number,
|
||||
cropW: number,
|
||||
cropH: number
|
||||
}
|
||||
|
||||
interface Cropbox {
|
||||
/**
|
||||
* Increase image zoom level by one step
|
||||
*/
|
||||
zoomIn(): void;
|
||||
/**
|
||||
* Decrease image zoom level by one step
|
||||
*/
|
||||
zoomOut(): void;
|
||||
/**
|
||||
* Set zoom leevl to a value between 0 and 1. Need to call update to reflect the changes.
|
||||
*/
|
||||
zoom(percent: number): void;
|
||||
/**
|
||||
* Simulate image dragging, starting from (startX,startY) and moving a delta of (dx,dy). Need to call update to reflect the changes.
|
||||
*/
|
||||
drag(options: CropboxDragOptions): void;
|
||||
/**
|
||||
* Set crop window.
|
||||
*/
|
||||
setCrop(options: CropboxSetCropOptions): void;
|
||||
/**
|
||||
* Update the cropped result (must call after zoom and drag).
|
||||
*/
|
||||
update(): void;
|
||||
/**
|
||||
* Generate a URL for the cropped image on the client (requires HTML5 compliant browser).
|
||||
*/
|
||||
getDataURL(): string;
|
||||
/**
|
||||
* Generate a Blob with the cropped image (requires HTML5 compliant browser).
|
||||
*/
|
||||
getBlob(): any;
|
||||
/**
|
||||
* Remove the cropbox functionality from the image.
|
||||
*/
|
||||
remove(): void;
|
||||
}
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
cropbox(params?: jQueryCropBox.CropboxOptions): jQueryCropBox.Cropbox
|
||||
}
|
||||
|
||||
interface JQueryStatic {
|
||||
cropbox(params?: jQueryCropBox.CropboxOptions): jQueryCropBox.Cropbox
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
/// <reference path="jquery-timeentry.d.ts"/>
|
||||
|
||||
var selector = '#example';
|
||||
|
||||
// basic
|
||||
$(selector).timeEntry();
|
||||
|
||||
var options: ITimeEntryOptions = {};
|
||||
options.show24Hours = true;
|
||||
options.showSeconds = true;
|
||||
options.unlimitedHours = true;
|
||||
options.separator = '!';
|
||||
options.ampmPrefix = 'x';
|
||||
options.ampmNames = ['am','pm'];
|
||||
options.appendText = 'foo';
|
||||
options.timeSteps = [1,1,1];
|
||||
options.initialField = 0;
|
||||
options.noSeparatorEntry = false;
|
||||
options.tabToExit = true;
|
||||
options.useMouseWheel = false;
|
||||
|
||||
options.defaultTime = new Date(0, 0, 0, 11, 30, 0);
|
||||
options.defaultTime = '11:30AM';
|
||||
options.defaultTime= +20;
|
||||
options.defaultTime= '!+2h +30m';
|
||||
|
||||
options.minTime = new Date(0, 0, 0, 8, 30, 0);
|
||||
options.minTime = '08:30AM';
|
||||
options.minTime = -15;
|
||||
options.minTime = '-1h -10m';
|
||||
|
||||
options.maxTime = new Date(0, 0, 0, 17, 30, 0);
|
||||
options.maxTime = '05:30pM';
|
||||
options.maxTime = +30;
|
||||
options.maxTime = '+20h +10s';
|
||||
|
||||
options.spinnerImage = 'foo.png';
|
||||
options.spinnerSize = [1, 2, 3];
|
||||
|
||||
options.spinnerBigImage = 'big.png';
|
||||
options.spinnerBigSize = [4, 5, 6];
|
||||
|
||||
options.spinnerIncDecOnly = true;
|
||||
options.spinnerTexts = ['Now', 'Prev', 'Next', 'incr', 'decr'];
|
||||
options.spinnerRepeat = [500, 250];
|
||||
|
||||
options.beforeShow = (input: any): void => {
|
||||
console.log(input.id);
|
||||
};
|
||||
options.beforeSetTime = (oldTime: Date, newTime: Date, minTime: Date, maxTime: Date): Date => {
|
||||
return newTime;
|
||||
};
|
||||
|
||||
$(selector).timeEntry(options);
|
||||
|
||||
// functions by name
|
||||
$(selector).timeEntry('option', {show24Hours: true});
|
||||
$(selector).timeEntry('option', 'show24Hours', true);
|
||||
|
||||
// global settings
|
||||
$.timeEntry.setDefaults(options);
|
||||
var fr: ITimeEntryRegionalOptions = $.timeEntry.regionalOptions['fr'];
|
||||
+212
@@ -0,0 +1,212 @@
|
||||
// Type definitions for jQuery-timeentry.js 2.0.1
|
||||
// Project: https://github.com/kbwood/timeentry
|
||||
// Definitions by: Mark Nadig <https://github.com/marknadig>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
|
||||
interface ITimeEntryRegionalOptions {
|
||||
/**
|
||||
* Indicate whether to use 12-hour (false) or 24-hour (true) time. This is one of the regional settings fields.
|
||||
*
|
||||
* default: False
|
||||
*/
|
||||
show24Hours?: boolean;
|
||||
/**
|
||||
* The separator between time portions. This is one of the regional settings fields.
|
||||
*
|
||||
* default: ':'
|
||||
*/
|
||||
separator?: string;
|
||||
/**
|
||||
* The text that separates the time from the AM and PM indicators. This is one of the regional settings fields.
|
||||
*
|
||||
* default: ''
|
||||
*/
|
||||
ampmPrefix?: string;
|
||||
/**
|
||||
* The AM and PM display text. This is one of the regional settings fields.
|
||||
*
|
||||
* default: ['AM','PM']
|
||||
*/
|
||||
ampmNames?: string[];
|
||||
/**
|
||||
* The tooltip text for the spinner buttons. This is one of the regional settings fields.
|
||||
*
|
||||
* default: ['Now', 'Previous field', 'Next field', 'Increment', 'Decrement']
|
||||
*/
|
||||
spinnerTexts?: string[];
|
||||
}
|
||||
|
||||
interface ITimeEntryOptions extends ITimeEntryRegionalOptions {
|
||||
/**
|
||||
* Indicate whether or not the seconds part of the time should be displayed.
|
||||
*
|
||||
* default: False
|
||||
*/
|
||||
showSeconds?: boolean;
|
||||
/**
|
||||
* Indicate whether to restrict hours to just those in one day (false) or to allow for any value for hours (true).
|
||||
*
|
||||
* default: false
|
||||
*/
|
||||
unlimitedHours?: boolean;
|
||||
/**
|
||||
* Add content to display after each time field. This may contain HTML markup.
|
||||
*
|
||||
* default: ''
|
||||
*/
|
||||
appendText?: string;
|
||||
/**
|
||||
* The increment/decrement values for each of the time portions - hours, minutes, and seconds.
|
||||
* Use this to constrain the portions, e.g. [1, 15, 0] restricts the times to quarter hours.
|
||||
*
|
||||
* default: [1,1,1]
|
||||
*/
|
||||
timeSteps?: number[];
|
||||
/**
|
||||
* The number of the portion of the time field to highlight initially.
|
||||
* Use 0 for hours, 1 for minutes, etc., or null for the user selection.
|
||||
*
|
||||
* default: null
|
||||
*/
|
||||
initialField?: number;
|
||||
/**
|
||||
* Set to true to allow direct entry of a time from the keyboard without needing to type separators,
|
||||
* i.e. the field moves on after two digits.
|
||||
*
|
||||
* default: false
|
||||
*/
|
||||
noSeparatorEntry?: boolean;
|
||||
/**
|
||||
* true to have the tab key exit this field and move to the next one, or false to have the tab key step
|
||||
* through the date subfields.
|
||||
*
|
||||
* default: false
|
||||
*/
|
||||
tabToExit?: boolean;
|
||||
/**
|
||||
* Set to true to use the mouse wheel for increment/decrement if possible, or false to never use it.
|
||||
*
|
||||
* default: true
|
||||
*/
|
||||
useMouseWheel?: boolean;
|
||||
/**
|
||||
* The default time to show when no other value has been entered. This may be a Date object
|
||||
* (but the year/month/day values are ignored), a string in the current time format, a numeric
|
||||
* value as seconds offset from now, or a string value indicating a number and units, e.g. '+2h'.
|
||||
* In the latter case, use 'h' for hours, 'm' for minutes, or 's' for seconds. Letters may be upper
|
||||
* or lower case. Multiple offsets may be combined into one setting, e.g. '-2h -20m'. Prefix with '!'
|
||||
* to prevent a wrap around into another day. Leave as null to default to the current time.
|
||||
*
|
||||
* default: null
|
||||
*/
|
||||
defaultTime?: Date | number | string;
|
||||
/**
|
||||
* The minimum time that may be selected, or null for no limit. See defaultTime for a description
|
||||
* of the possible formats. Use an array of number for hours, minutes, seconds in conjunction with unlimitedHours.
|
||||
*
|
||||
* default: null
|
||||
*/
|
||||
minTime?: Date | number | number[] | string;
|
||||
/**
|
||||
* The maximum time that may be selected, or null for no limit. See defaultTime for a description of the possible
|
||||
* formats. Use an array of number for hours, minutes, seconds in conjunction with unlimitedHours.
|
||||
*
|
||||
* Note that the maxTime may be set to less than the minTime in which case the entered time is restricted to
|
||||
* the period between the minimum and the maximum on the "next day".
|
||||
*
|
||||
* default: null
|
||||
*/
|
||||
maxTime?: Date | number | number[] | string;
|
||||
/**
|
||||
* The URL for the spinner images to use, or '' for no spinner. The file must contain seven images horizontally
|
||||
* for the normal view, then for each "button" pressed (now, previous, next, increment, and decrement), and,
|
||||
* finally, the disabled view.
|
||||
*
|
||||
* default: 'spinnerDefault.png'
|
||||
*/
|
||||
spinnerImage?: string;
|
||||
/**
|
||||
* The dimensions of the spinner image for determining which "button" was clicked. The first two values are the
|
||||
* width and height of the individual images, the third is the size of the central button for setting the current
|
||||
* time, or 0 for no central button.
|
||||
*
|
||||
* default: [20, 20, 8]
|
||||
*/
|
||||
spinnerSize?: number[];
|
||||
/**
|
||||
* The URL for an expanded spinner image to use, or '' for no expansion. The layout is the same as for
|
||||
* spinnerImage but should be a larger size. The expanded spinner appears when the user hovers over the
|
||||
* original spinner and disappears when they move off it.
|
||||
*
|
||||
* default: ''
|
||||
*/
|
||||
spinnerBigImage?: string;
|
||||
/**
|
||||
* The dimensions of the expanded spinner image for determining which "button" was clicked. The first two values
|
||||
* are the width and height of the individual images, the third is the size of the central button for setting the
|
||||
* current time, or 0 for no central button.
|
||||
*
|
||||
* default: [40, 40, 16]
|
||||
*/
|
||||
spinnerBigSize?: number[];
|
||||
/**
|
||||
* Set to true to have only the increment and decrement buttons on the spinner, or false for all the buttons.
|
||||
*
|
||||
* default: false
|
||||
*/
|
||||
spinnerIncDecOnly?: boolean;
|
||||
/**
|
||||
* The times in milliseconds for the auto-repeat feature on the increment and decrement spinner buttons.
|
||||
* The first value is the initial delay and the second one is the subsequent delay. Hold the mouse button down
|
||||
* on these spinner buttons to trigger this feature. Use [0, 0] to disable the auto-repeat.
|
||||
*
|
||||
* default: [500, 250]
|
||||
*/
|
||||
spinnerRepeat?: number[];
|
||||
/**
|
||||
* A function that accepts an input field and returns a settings object containing new settings for the time
|
||||
* entry for this field. For example, you can use it to set up a time range wherein both fields restrict the
|
||||
* possible values of the other field. this refers to the input field as well. Leave as null for no per-field
|
||||
* customisation.
|
||||
*
|
||||
* default: null
|
||||
*/
|
||||
beforeShow?: Function;
|
||||
/**
|
||||
* A function that accepts the old and new times, and minimum and maximum times, and returns an updated time.
|
||||
* This refers to the associated input field. This call is made just before the time is updated into the field
|
||||
* allowing for additional restrictions to be applied. Leave as null for no additional restrictions.
|
||||
*
|
||||
* default: null
|
||||
*/
|
||||
beforeSetTime?: Function;
|
||||
}
|
||||
|
||||
interface ITimeEntry {
|
||||
/**
|
||||
* initialize TimeEntry plugin
|
||||
*/
|
||||
(configOrFnName?: ITimeEntryOptions | string, nameOrOption?: any, value?: any): any; // functions accessed with string key :/
|
||||
}
|
||||
|
||||
interface ITimeEntryLocales {
|
||||
[index: string]: ITimeEntryRegionalOptions;
|
||||
}
|
||||
|
||||
interface ITimeEntryStatic {
|
||||
regionalOptions: ITimeEntryLocales;
|
||||
setDefaults(settings: ITimeEntryOptions): void;
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
/**
|
||||
* initialize TimeEntry plugin
|
||||
*/
|
||||
timeEntry: ITimeEntry;
|
||||
}
|
||||
|
||||
interface JQueryStatic {
|
||||
timeEntry: ITimeEntryStatic;
|
||||
}
|
||||
@@ -1136,6 +1136,13 @@ function test_jQuery_removeData() {
|
||||
$("span:eq(3)").text("" + jQuery.data(div, "test2"));
|
||||
}
|
||||
|
||||
function test_removeDataAll() {
|
||||
var el = $("div");
|
||||
el.data("test1", "VALUE-1");
|
||||
el.data("test2", "VALUE-2");
|
||||
el.removeData();
|
||||
}
|
||||
|
||||
function test_dblclick() {
|
||||
$('#target').dblclick(function () {
|
||||
alert('Handler for .dblclick() called.');
|
||||
|
||||
Vendored
+4
@@ -1581,6 +1581,10 @@ interface JQuery {
|
||||
* @param list An array of strings naming the pieces of data to delete.
|
||||
*/
|
||||
removeData(list: string[]): JQuery;
|
||||
/**
|
||||
* Remove all previously-stored piece of data.
|
||||
*/
|
||||
removeData(): JQuery;
|
||||
|
||||
/**
|
||||
* Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.
|
||||
|
||||
Vendored
+62
-7
@@ -3,7 +3,13 @@
|
||||
// Definitions by: Asana <https://asana.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path='../node/node.d.ts' />
|
||||
/// <reference path='../jquery/jquery.d.ts' />
|
||||
|
||||
declare module "jsdom" {
|
||||
|
||||
import EventEmitter = NodeJS.EventEmitter;
|
||||
|
||||
/**
|
||||
* The do-what-I-mean API.
|
||||
*
|
||||
@@ -26,6 +32,51 @@ declare module "jsdom" {
|
||||
export function env(urlOrHtml: string, config: Config, callback?: Callback): void;
|
||||
export function env(config: Config, callback?: Callback): void;
|
||||
|
||||
export function serializeDocument(doc: Document): string;
|
||||
|
||||
export interface VirtualConsole extends EventEmitter {
|
||||
sendTo(console: Console): VirtualConsole;
|
||||
}
|
||||
|
||||
export interface VirtualConsoleOptions {
|
||||
}
|
||||
|
||||
export interface WindowProperties {
|
||||
parsingMode?: string; // html, xml, auto, undefined
|
||||
contentType?: string;
|
||||
parser?: any;
|
||||
url?: string;
|
||||
referrer?: string;
|
||||
cookieJar?: CookieJar;
|
||||
cookie?: string;
|
||||
resourceLoader?: any;
|
||||
deferClose?: boolean;
|
||||
concurrentNodeIterators?: number;
|
||||
virtualConsole?: VirtualConsole;
|
||||
created?: (something: any, window: Window) => any;
|
||||
features?: FeatureOptions;
|
||||
top?: Window;
|
||||
}
|
||||
|
||||
// tough-cookie
|
||||
export interface CookieJar {
|
||||
|
||||
}
|
||||
|
||||
export function createVirtualConsole(options?: VirtualConsoleOptions): VirtualConsole;
|
||||
export function getVirtualConsole(window: Window): VirtualConsole;
|
||||
export function createCookieJar(): CookieJar;
|
||||
export function nodeLocation(node: Node): any;
|
||||
export function reconfigureWindow(window: Window, newProps: WindowProperties): void;
|
||||
|
||||
export function jQueryify(window: Window, jqueryUrl: string, callback: (window: Window, jquery: JQuery) => any): void;
|
||||
|
||||
export var debugMode: boolean;
|
||||
|
||||
export interface DocumentWithParentWindow extends Document {
|
||||
parentWindow: Window;
|
||||
}
|
||||
|
||||
/**
|
||||
* The jsdom.jsdom method does less things automatically; it takes in only HTML source, and does not let you to
|
||||
* separately supply script that it will inject and execute. It just gives you back a document object,
|
||||
@@ -37,12 +88,14 @@ declare module "jsdom" {
|
||||
* equivalent to what a browser will give if you open up an empty .html file.
|
||||
* @param options see the explanation of the config object above.
|
||||
*/
|
||||
export function jsdom(markup: string, config?: Config): Document;
|
||||
export function jsdom(markup: string, config?: Config): DocumentWithParentWindow;
|
||||
|
||||
/**
|
||||
* Before creating any documents, you can modify the defaults for all future documents:
|
||||
*/
|
||||
export var defaultDocumentFeatures: FeatureOptions;
|
||||
export var availableDocumentFeatures: FeatureOptions;
|
||||
export var defaultDocumentFeatures: FeatureOptions;
|
||||
export var applyDocumentFeatures: FeatureOptions;
|
||||
|
||||
export interface Callback {
|
||||
(errors: Error[], window: Window): any;
|
||||
@@ -54,7 +107,7 @@ declare module "jsdom" {
|
||||
* Allowed: ["script", "img", "css", "frame", "iframe", "link"] or false
|
||||
* Default for jsdom.env: false
|
||||
*/
|
||||
FetchExternalResources?: any;
|
||||
FetchExternalResources?: string[] | boolean;
|
||||
|
||||
/**
|
||||
* Enables/disables JavaScript execution
|
||||
@@ -62,7 +115,7 @@ declare module "jsdom" {
|
||||
* Allowed: ["script"] or false,
|
||||
* Default for jsdom.env: false
|
||||
*/
|
||||
ProcessExternalResources?: any;
|
||||
ProcessExternalResources?: string[] | boolean;
|
||||
|
||||
/**
|
||||
* Filters resource downloading and processing to disallow those matching the given regular expression
|
||||
@@ -70,7 +123,7 @@ declare module "jsdom" {
|
||||
* Allowed: /url to be skipped/ or false
|
||||
* Example: /http:\/\/example.org/js/bad\.js/
|
||||
*/
|
||||
SkipExternalResources?: any;
|
||||
SkipExternalResources?: string | boolean;
|
||||
}
|
||||
|
||||
export interface EnvDocument {
|
||||
@@ -112,7 +165,7 @@ declare module "jsdom" {
|
||||
/**
|
||||
* a custom cookie jar, if desired; see mikeal/request documentation.
|
||||
*/
|
||||
jar?: any;
|
||||
jar?: CookieJar;
|
||||
/**
|
||||
* either "auto", "html", or "xml". The default is "auto", which uses HTML behavior unless config.url responds with an XML Content-Type, or config.file contains a filename ending in .xml or .xhtml. Setting to "xml" will attempt to parse the document as an XHTML document. (jsdom is currently only OK at doing that.)
|
||||
*/
|
||||
@@ -123,6 +176,8 @@ declare module "jsdom" {
|
||||
*/
|
||||
features?: FeatureOptions;
|
||||
|
||||
virtualConsole?: VirtualConsole;
|
||||
|
||||
/**
|
||||
* Now that you know about created and loaded, you can see that done is essentially both of them smashed together:
|
||||
* If window creation succeeds and no <script>s cause errors, then errors will be null, and window will be usable.
|
||||
@@ -140,4 +195,4 @@ declare module "jsdom" {
|
||||
*/
|
||||
created?: (error: Error, window: Window) => void;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+8
-1
@@ -5,13 +5,18 @@
|
||||
|
||||
|
||||
interface KnockoutSubscribableFunctions<T> {
|
||||
[key: string]: KnockoutBindingHandler;
|
||||
|
||||
notifySubscribers(valueToWrite?: T, event?: string): void;
|
||||
}
|
||||
|
||||
interface KnockoutComputedFunctions<T> {
|
||||
[key: string]: KnockoutBindingHandler;
|
||||
}
|
||||
|
||||
interface KnockoutObservableFunctions<T> {
|
||||
[key: string]: KnockoutBindingHandler;
|
||||
|
||||
equalityComparer(a: any, b: any): boolean;
|
||||
}
|
||||
|
||||
@@ -30,6 +35,8 @@ interface KnockoutObservableArrayFunctions<T> {
|
||||
sort(compareFunction: (left: T, right: T) => number): void;
|
||||
|
||||
// Ko specific
|
||||
[key: string]: KnockoutBindingHandler;
|
||||
|
||||
replace(oldItem: T, newItem: T): void;
|
||||
|
||||
remove(item: T): T[];
|
||||
@@ -261,7 +268,7 @@ interface KnockoutUtils {
|
||||
|
||||
compareArrays<T>(a: T[], b: T[]): Array<KnockoutArrayChange<T>>;
|
||||
|
||||
arrayForEach<T>(array: T[], action: (item: T) => void): void;
|
||||
arrayForEach<T>(array: T[], action: (item: T, index: number) => void): void;
|
||||
|
||||
arrayIndexOf<T>(array: T[], item: T): number;
|
||||
|
||||
|
||||
Vendored
+3
-2
@@ -42,7 +42,7 @@ declare module "libxmljs" {
|
||||
name():string;
|
||||
name(newName:string):void;
|
||||
text():string;
|
||||
attr(name:string):string;
|
||||
attr(name:string):Attribute;
|
||||
attr(attr:Attribute):void;
|
||||
attr(attrObject:{[key:string]:string;}):void;
|
||||
attrs():Attribute[];
|
||||
@@ -59,8 +59,9 @@ declare module "libxmljs" {
|
||||
addPrevSibling(siblingNode:Element):Element;
|
||||
find(xpath:string):Element[];
|
||||
find(xpath:string, ns_uri:string):Element[];
|
||||
get(xpath:string, ns_uri:string):Element;
|
||||
find(xpath:string, namespaces:{[key:string]:string;}):Element[];
|
||||
get(xpath:string):Element;
|
||||
get(xpath:string, ns_uri:string):Element;
|
||||
get(xpath:string, ns_uri:{[key:string]:string;}):Element;
|
||||
defineNamespace(href:string):Namespace;
|
||||
defineNamespace(prefix:string, href:string):Namespace;
|
||||
|
||||
@@ -0,0 +1,370 @@
|
||||
/// <reference path="lodash-decorators.d.ts" />
|
||||
/// <reference path="../lodash/lodash.d.ts" />
|
||||
|
||||
//
|
||||
// With Arguments
|
||||
//
|
||||
|
||||
import { after, debounce, memoize, curry } from 'lodash-decorators'
|
||||
|
||||
class Person {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
constructor(firstName: string, lastName: string) {
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
@after(3)
|
||||
@debounce(100)
|
||||
getFullName(): string {
|
||||
return `${this.firstName} ${this.lastName}`
|
||||
}
|
||||
|
||||
@curry(2)
|
||||
@memoize()
|
||||
doSomeHeavyProcessing(arg1: any, arg2: any) {
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Without Arguments
|
||||
//
|
||||
|
||||
import { tap } from 'lodash-decorators'
|
||||
|
||||
class Person2 {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
constructor(firstName?: string, lastName?: string) {
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
@once
|
||||
getFullName(): string {
|
||||
return `${this.firstName} ${this.lastName}`
|
||||
}
|
||||
|
||||
@tap
|
||||
popIt(list: number[]): void {
|
||||
list.pop();
|
||||
}
|
||||
}
|
||||
|
||||
const person2 = new Person2();
|
||||
|
||||
person2.popIt([1, 2, 3]); //=> [1, 2]
|
||||
|
||||
//
|
||||
// Partials
|
||||
//
|
||||
|
||||
import { partial, wrap } from 'lodash-decorators'
|
||||
|
||||
class Person3 {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
constructor(firstName?: string, lastName?: string) {
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
getName(type: string) {
|
||||
return type === 'firstName' ? this.firstName : this.lastName
|
||||
}
|
||||
|
||||
@partial('getName', 'firstName')
|
||||
getFirstName(): string { return null; }
|
||||
|
||||
@partial('getName', null)
|
||||
getLastName(): string { return null; }
|
||||
|
||||
@wrap('getName')
|
||||
getUpperCaseName(fn: () => string): string {
|
||||
return fn().toUpperCase();
|
||||
}
|
||||
}
|
||||
|
||||
//by .d.ts author: a workaround to ensure type
|
||||
interface Person3Ex extends Person3 {
|
||||
getUpperCaseName(): string;
|
||||
}
|
||||
|
||||
const person3 = new Person3('Joe', 'Smith') as Person3Ex;
|
||||
|
||||
person3.getFirstName(); // 'Joe'
|
||||
person3.getLastName(); // 'Smith'
|
||||
person3.getUpperCaseName(); // JOE SMITH
|
||||
|
||||
//
|
||||
// Composition
|
||||
//
|
||||
|
||||
//import { kebabCase } from 'lodash';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
class Person4 {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
constructor(firstName?: string, lastName?: string) {
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
getName(): string {
|
||||
return `${this.firstName} ${this.lastName}`;
|
||||
}
|
||||
|
||||
@compose(_.kebabCase, 'getName')
|
||||
logName(name: string): void {
|
||||
console.log(name);
|
||||
}
|
||||
}
|
||||
|
||||
//by .d.ts author: a workaround to ensure type
|
||||
interface Person4Ex extends Person4 {
|
||||
logName(): void;
|
||||
}
|
||||
|
||||
const person4 = new Person4('Joe', 'Smith') as Person4Ex;
|
||||
|
||||
person4.logName(); // joe-smith
|
||||
|
||||
//
|
||||
// Instance Decorators
|
||||
//
|
||||
|
||||
class Person5 {
|
||||
|
||||
@curry(2) // <= prototype decorator
|
||||
@debounce(100) // <= instance decorator
|
||||
getName() {} //=> Throws an error. (╯°□°)╯︵ ┻━┻
|
||||
|
||||
@debounce(100) // <= instance decorator
|
||||
@curry(2) // <= prototype decorator
|
||||
getName2() {} //=> All is well :)
|
||||
}
|
||||
|
||||
//
|
||||
// Getters and Setters
|
||||
//
|
||||
|
||||
import { once, compose } from 'lodash-decorators'
|
||||
|
||||
function alwaysArray(value: string|string[]): string[] {
|
||||
return Array.isArray(value) ? value : _.isUndefined(value) ? [] : [value];
|
||||
}
|
||||
|
||||
class Person6 {
|
||||
constructor() {}
|
||||
private nameList: string[];
|
||||
|
||||
//TODO: So far, TypeScript doesn't allow to put multiple decoratoes on set/get accessors.
|
||||
// see https://github.com/Microsoft/TypeScript/issues/2249#issuecomment-141684146
|
||||
//@once.get
|
||||
get names(): string[] {
|
||||
//MEMO: Resolve type inconsistency
|
||||
return [this.nameList.join(' ')];
|
||||
//MEMO: Original expression in repo
|
||||
//return this.nameList.join(' ');
|
||||
}
|
||||
|
||||
@compose.set(alwaysArray)
|
||||
set names(names: string[]) {
|
||||
this.nameList = names;
|
||||
}
|
||||
}
|
||||
|
||||
//by .d.ts author: a workaround to ensure type
|
||||
interface Person6Alt {
|
||||
names: string[]|string;
|
||||
}
|
||||
|
||||
const person6 = new Person6();
|
||||
|
||||
// nameList will always be an array.
|
||||
person6.names = undefined; //=> []
|
||||
(person6 as Person6Alt).names = 'Joe'; //=> ['Joe']
|
||||
person6.names = ['Jim']; //=> ['Jim']
|
||||
|
||||
//
|
||||
// Bind
|
||||
//
|
||||
|
||||
import { bind } from 'lodash-decorators'
|
||||
|
||||
class Person7 {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
constructor(firstName: string, lastName: string) {
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
@bind()
|
||||
getName(): string {
|
||||
return `${this.firstName} ${this.lastName}`;
|
||||
}
|
||||
|
||||
// It can also function as a partial
|
||||
@bind('Joe')
|
||||
getUpperCaseName(name: string): string {
|
||||
return name.toUpperCase();
|
||||
}
|
||||
}
|
||||
|
||||
//by .d.ts author: a workaround to ensure type
|
||||
interface Person7Ex extends Person7 {
|
||||
getUpperCaseName(): string;
|
||||
}
|
||||
|
||||
const person7 = new Person7('Joe', 'Smith') as Person7Ex;
|
||||
|
||||
person7.getName.call(null); // Joe Smith
|
||||
person7.getUpperCaseName(); // JOE
|
||||
|
||||
|
||||
import { bindAll } from 'lodash-decorators'
|
||||
|
||||
@bindAll()
|
||||
class Person8 {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
constructor(firstName: string, lastName: string) {
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
getName() {
|
||||
return `${this.firstName} ${this.lastName}`;
|
||||
}
|
||||
}
|
||||
|
||||
const person8 = new Person8('Joe', 'Smith');
|
||||
|
||||
person8.getName.call(null); // Joe Smith
|
||||
|
||||
//
|
||||
// Forcing Decorator on Prototype
|
||||
//
|
||||
|
||||
import { throttle } from 'lodash-decorators';
|
||||
|
||||
class Person9 {
|
||||
@throttle(1000)
|
||||
doStuff() {}
|
||||
|
||||
@throttle.proto(1000)
|
||||
doStuffMore() {}
|
||||
}
|
||||
|
||||
const person9_1 = new Person9();
|
||||
const person9_2 = new Person9();
|
||||
|
||||
person9_1.doStuff(); //=> Both are called
|
||||
person9_2.doStuff();
|
||||
|
||||
person9_1.doStuffMore();
|
||||
person9_2.doStuffMore();
|
||||
|
||||
// Only one of these methods is actual invoked because throttle is applied to the prototype method
|
||||
// and not the instance method.
|
||||
|
||||
//
|
||||
// Extensions
|
||||
//
|
||||
|
||||
import { deprecated } from 'lodash-decorators/extensions'
|
||||
|
||||
// This is applied globally.
|
||||
deprecated.methodAction = fn => console.log(`Don't use ${fn.name}!`);
|
||||
|
||||
@deprecated
|
||||
class Person10 {
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
class OtherPerson {
|
||||
@deprecated
|
||||
fn() {}
|
||||
}
|
||||
|
||||
let person10 = new Person10(); //=> Warning!
|
||||
|
||||
let otherPerson = new OtherPerson();
|
||||
otherPerson.fn(); //=> Don't use fn!
|
||||
|
||||
|
||||
//
|
||||
// https://github.com/steelsojka/lodash-decorators/tree/master/src/extensions
|
||||
//
|
||||
|
||||
import { Writable, ReturnsArg } from 'lodash-decorators/extensions';
|
||||
|
||||
class Person11 {
|
||||
constructor() {}
|
||||
|
||||
@Writable(false)
|
||||
getName() {}
|
||||
|
||||
@ReturnsArg(1)
|
||||
doSomething(x: any, y: any, z: any) {
|
||||
// Do something here
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// https://github.com/steelsojka/lodash-decorators/tree/master/src/validate
|
||||
//
|
||||
|
||||
import { Validate } from 'lodash-decorators/validate';
|
||||
|
||||
class Person12 {
|
||||
name: string;
|
||||
constructor() {}
|
||||
|
||||
@Validate(_.isString)
|
||||
setName(name: any) {
|
||||
this.name = name as string;
|
||||
}
|
||||
}
|
||||
|
||||
class Person13 {
|
||||
name: string;
|
||||
age: number;
|
||||
constructor() {}
|
||||
|
||||
@Validate(
|
||||
_.isString,
|
||||
[_.isNumber, _.partial(_.lt, 10) as ((_: any) => boolean)]
|
||||
)
|
||||
setData(name: any, age: any) {
|
||||
this.name = name as string;
|
||||
this.age = age as number;
|
||||
}
|
||||
}
|
||||
|
||||
const person13 = new Person13();
|
||||
|
||||
person13.setData('test', 5); //=> TypeError
|
||||
person13.setData('test', 12); //=> Valid
|
||||
|
||||
|
||||
//
|
||||
// Additional typings
|
||||
//
|
||||
|
||||
import { validateReturn } from 'lodash-decorators/validate';
|
||||
|
||||
class Calc {
|
||||
@validateReturn((c: number) => c > 0)
|
||||
add(a: number, b: number): number {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
@validateReturn<number>([c => c > 0])
|
||||
mul(a: number, b: number): number {
|
||||
return a + b;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
--experimentalDecorators --noImplicitAny --target ES5
|
||||
+272
@@ -0,0 +1,272 @@
|
||||
// Type definitions for lodash-decorators 1.0.5
|
||||
// Project: https://github.com/steelsojka/lodash-decorators
|
||||
// Definitions by: Qubo <https://github.com/tkqubo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
///<reference path="../lodash/lodash.d.ts"/>
|
||||
|
||||
|
||||
declare module "lodash-decorators" {
|
||||
// Originally copied from ../node_modules/typescript/lib/lib.es6.d.ts
|
||||
export interface ClassDecorator {
|
||||
<TFunction extends Function>(target: TFunction): TFunction|void;
|
||||
}
|
||||
export interface PropertyDecorator {
|
||||
(target: Object, propertyKey: string | symbol): void;
|
||||
}
|
||||
export interface MethodDecorator {
|
||||
<T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;
|
||||
}
|
||||
export interface ParameterDecorator {
|
||||
(target: Object, propertyKey: string | symbol, parameterIndex: number): void;
|
||||
}
|
||||
|
||||
export interface TypedMethodDecorator<TFunction extends Function> {
|
||||
(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<TFunction>): TypedPropertyDescriptor<TFunction> | void;
|
||||
}
|
||||
|
||||
export interface MethodDecoratorWithAccessor extends MethodDecorator, Accessor<MethodDecorator> {
|
||||
}
|
||||
|
||||
export interface Accessor<T> {
|
||||
set: T;
|
||||
get: T;
|
||||
proto: T;
|
||||
}
|
||||
|
||||
export interface DebounceDecorator {
|
||||
(wait: number, options?: _.DebounceSettings): MethodDecorator;
|
||||
}
|
||||
export interface ThrottleDecorator {
|
||||
(wait: number, options?: _.ThrottleSettings): MethodDecorator;
|
||||
}
|
||||
export interface MemoizeDecorator {
|
||||
(resolver?: Function): MethodDecorator;
|
||||
}
|
||||
export interface AfterDecorator {
|
||||
(n: number): MethodDecorator;
|
||||
}
|
||||
export interface BeforeDecorator {
|
||||
(n: number): MethodDecorator;
|
||||
}
|
||||
export interface AryDecorator {
|
||||
(n: number): MethodDecorator;
|
||||
}
|
||||
export interface CurryDecorator {
|
||||
(arity?: number): MethodDecorator;
|
||||
}
|
||||
export interface CurryRightDecorator {
|
||||
(arity?: number): MethodDecorator;
|
||||
}
|
||||
export interface RestParamDecorator {
|
||||
(start?: number): MethodDecorator;
|
||||
}
|
||||
export interface PartialDecorator {
|
||||
(func: Function|string, ...args: any[]): MethodDecorator;
|
||||
}
|
||||
export interface WrapDecorator {
|
||||
(wrapper: ((func: Function, ...args: any[]) => any)|string): MethodDecorator;
|
||||
}
|
||||
export interface ComposeDecorator {
|
||||
(...funcs: (Function|string)[]): MethodDecorator;
|
||||
}
|
||||
export interface DelayDecorator {
|
||||
(wait: number, ...args: any[]): MethodDecorator;
|
||||
}
|
||||
export interface DeferDecorator {
|
||||
(...args: any[]): MethodDecorator;
|
||||
}
|
||||
export interface BindDecorator {
|
||||
(): TypedMethodDecorator<(<R>() => R)>;
|
||||
<T1>(param1?: T1):
|
||||
TypedMethodDecorator<(<R>(param1: T1) => R)>;
|
||||
<T1, T2>(param1?: T1, param2?: T2):
|
||||
TypedMethodDecorator<(<R>(param1: T1, param2: T2) => R)>;
|
||||
<T1, T2, T3>(param1?: T1, param2?: T2, param3?: T3):
|
||||
TypedMethodDecorator<(<R>(param1: T1, param2: T2, param3: T3) => R)>;
|
||||
<T1, T2, T3, T4>(param1?: T1, param2?: T2, param3?: T3, param4?: T4):
|
||||
TypedMethodDecorator<(<R>(param1: T1, param2: T2, param3: T3, param4: T4) => R)>;
|
||||
<T1, T2, T3, T4, T5>(param1?: T1, param2?: T2, param3?: T3, param4?: T4, param5?: T5):
|
||||
TypedMethodDecorator<(<R>(param1: T1, param2: T2, param3: T3, param4: T4, param5: T5) => R)>;
|
||||
<T1, T2, T3, T4, T5, T6>(param1?: T1, param2?: T2, param3?: T3, param4?: T4, param5?: T5, param6?: T6):
|
||||
TypedMethodDecorator<(<R>(param1: T1, param2: T2, param3: T3, param4: T4, param5: T5, param6: T6) => R)>;
|
||||
}
|
||||
export interface BindAllDecorator {
|
||||
(...methodNames: string[]): ClassDecorator;
|
||||
}
|
||||
export interface ModArgsDecorator {
|
||||
(...transforms: Function[]): MethodDecorator;
|
||||
}
|
||||
|
||||
export const debounce: DebounceDecorator & Accessor<DebounceDecorator>;
|
||||
export const Debounce: DebounceDecorator & Accessor<DebounceDecorator>;
|
||||
|
||||
export const throttle: ThrottleDecorator & Accessor<ThrottleDecorator>;
|
||||
export const Throttle: ThrottleDecorator & Accessor<ThrottleDecorator>;
|
||||
|
||||
export const memoize: MemoizeDecorator & Accessor<MemoizeDecorator>;
|
||||
export const Memoize: MemoizeDecorator & Accessor<MemoizeDecorator>;
|
||||
|
||||
export const after: AfterDecorator & Accessor<AfterDecorator>;
|
||||
export const After: AfterDecorator & Accessor<AfterDecorator>;
|
||||
|
||||
export const before: BeforeDecorator & Accessor<BeforeDecorator>;
|
||||
export const Before: BeforeDecorator & Accessor<BeforeDecorator>;
|
||||
|
||||
export const ary: AryDecorator & Accessor<AryDecorator>;
|
||||
export const Ary: AryDecorator & Accessor<AryDecorator>;
|
||||
|
||||
export const curry: CurryDecorator & Accessor<CurryDecorator>;
|
||||
export const Curry: CurryDecorator & Accessor<CurryDecorator>;
|
||||
|
||||
export const curryRight: CurryRightDecorator & Accessor<CurryRightDecorator>;
|
||||
export const CurryRight: CurryRightDecorator & Accessor<CurryRightDecorator>;
|
||||
|
||||
export const restParam: RestParamDecorator & Accessor<RestParamDecorator>;
|
||||
export const RestParam: RestParamDecorator & Accessor<RestParamDecorator>;
|
||||
|
||||
export const partial: PartialDecorator & Accessor<PartialDecorator>;
|
||||
export const Partial: PartialDecorator & Accessor<PartialDecorator>;
|
||||
|
||||
export const partialRight: PartialDecorator & Accessor<PartialDecorator>;
|
||||
export const PartialRight: PartialDecorator & Accessor<PartialDecorator>;
|
||||
|
||||
export const wrap: WrapDecorator & Accessor<WrapDecorator>;
|
||||
export const Wrap: WrapDecorator & Accessor<WrapDecorator>;
|
||||
|
||||
export const compose: ComposeDecorator & Accessor<ComposeDecorator>;
|
||||
export const Compose: ComposeDecorator & Accessor<ComposeDecorator>;
|
||||
|
||||
export const flow: ComposeDecorator & Accessor<ComposeDecorator>;
|
||||
export const Flow: ComposeDecorator & Accessor<ComposeDecorator>;
|
||||
|
||||
export const flowRight: ComposeDecorator & Accessor<ComposeDecorator>;
|
||||
export const FlowRight: ComposeDecorator & Accessor<ComposeDecorator>;
|
||||
|
||||
export const backflow: ComposeDecorator & Accessor<ComposeDecorator>;
|
||||
export const Backflow: ComposeDecorator & Accessor<ComposeDecorator>;
|
||||
|
||||
export const delay: DelayDecorator & Accessor<DelayDecorator>;
|
||||
export const Delay: DelayDecorator & Accessor<DelayDecorator>;
|
||||
|
||||
export const defer: DeferDecorator & Accessor<DeferDecorator>;
|
||||
export const Defer: DeferDecorator & Accessor<DeferDecorator>;
|
||||
|
||||
export const bind: BindDecorator & Accessor<BindDecorator>;
|
||||
export const Bind: BindDecorator & Accessor<BindDecorator>;
|
||||
|
||||
export const bindAll: BindAllDecorator;
|
||||
export const BindAll: BindAllDecorator;
|
||||
|
||||
export const modArgs: ModArgsDecorator & Accessor<ModArgsDecorator>;
|
||||
export const ModArgs: ModArgsDecorator & Accessor<ModArgsDecorator>;
|
||||
|
||||
export const once: MethodDecoratorWithAccessor;
|
||||
export const Once: MethodDecoratorWithAccessor;
|
||||
|
||||
export const spread: MethodDecoratorWithAccessor;
|
||||
export const Spread: MethodDecoratorWithAccessor;
|
||||
|
||||
export const rearg: MethodDecoratorWithAccessor;
|
||||
export const Rearg: MethodDecoratorWithAccessor;
|
||||
|
||||
export const negate: MethodDecoratorWithAccessor;
|
||||
export const Negate: MethodDecoratorWithAccessor;
|
||||
|
||||
export const tap: MethodDecoratorWithAccessor;
|
||||
export const Tap: MethodDecoratorWithAccessor;
|
||||
}
|
||||
|
||||
declare module "lodash-decorators/extensions" {
|
||||
// Originally copied from ../node_modules/typescript/lib/lib.es6.d.ts
|
||||
export interface ClassDecorator {
|
||||
<TFunction extends Function>(target: TFunction): TFunction|void;
|
||||
}
|
||||
export interface PropertyDecorator {
|
||||
(target: Object, propertyKey: string | symbol): void;
|
||||
}
|
||||
export interface MethodDecorator {
|
||||
<T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;
|
||||
}
|
||||
export interface ParameterDecorator {
|
||||
(target: Object, propertyKey: string | symbol, parameterIndex: number): void;
|
||||
}
|
||||
|
||||
export interface DeprecatedDecorator extends MethodDecorator, ClassDecorator {
|
||||
methodAction(fn: Function & { name: string }): void;
|
||||
}
|
||||
|
||||
export const deprecated: DeprecatedDecorator;
|
||||
export const Deprecated: DeprecatedDecorator;
|
||||
|
||||
export const writable: (writable?: boolean) => MethodDecorator;
|
||||
export const Writable: (writable?: boolean) => MethodDecorator;
|
||||
|
||||
export const configurable: (configurable?: boolean) => MethodDecorator;
|
||||
export const Configurable: (configurable?: boolean) => MethodDecorator;
|
||||
|
||||
export const returnsArg: (index?: number) => MethodDecorator;
|
||||
export const ReturnsArg: (index?: number) => MethodDecorator;
|
||||
|
||||
export const enumerable: (enumerable?: boolean) => MethodDecorator;
|
||||
export const Enumerable: (enumerable?: boolean) => MethodDecorator;
|
||||
|
||||
export const nonenumerable: MethodDecorator;
|
||||
export const Nonenumerable: MethodDecorator;
|
||||
|
||||
export const nonconfigurable: MethodDecorator;
|
||||
export const Nonconfigurable: MethodDecorator;
|
||||
|
||||
export const readonly: MethodDecorator;
|
||||
export const Readonly: MethodDecorator;
|
||||
}
|
||||
|
||||
declare module "lodash-decorators/validate" {
|
||||
// Originally copied from ../node_modules/typescript/lib/lib.es6.d.ts
|
||||
export interface ClassDecorator {
|
||||
<TFunction extends Function>(target: TFunction): TFunction|void;
|
||||
}
|
||||
export interface PropertyDecorator {
|
||||
(target: Object, propertyKey: string | symbol): void;
|
||||
}
|
||||
export interface MethodDecorator {
|
||||
<T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;
|
||||
}
|
||||
export interface ParameterDecorator {
|
||||
(target: Object, propertyKey: string | symbol, parameterIndex: number): void;
|
||||
}
|
||||
|
||||
export interface TypedMethodDecorator<TFunction extends Function> {
|
||||
(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<TFunction>): TypedPropertyDescriptor<TFunction> | void;
|
||||
}
|
||||
|
||||
export interface Predicate<T> {
|
||||
(t: T): boolean;
|
||||
}
|
||||
type Predicates<T> = Predicate<T>|Predicate<T>[];
|
||||
|
||||
export interface ValidateDecorator {
|
||||
<T1>(p1: Predicates<T1>):
|
||||
TypedMethodDecorator<(<R>(param1: T1) => R)>;
|
||||
<T1, T2>(p1: Predicates<T1>, p2?: Predicates<T2>):
|
||||
TypedMethodDecorator<(<R>(param1: T1, param2: T2) => R)>;
|
||||
<T1, T2, T3>(p1: Predicates<T1>, p2?: Predicates<T2>, p3?: Predicates<T3>):
|
||||
TypedMethodDecorator<(<R>(param1: T1, param2: T2, param3: T3) => R)>;
|
||||
<T1, T2, T3, T4>(p1: Predicates<T1>, p2?: Predicates<T2>, p3?: Predicates<T3>, p4?: Predicates<T4>):
|
||||
TypedMethodDecorator<(<R>(param1: T1, param2: T2, param3: T3, param4: T4) => R)>;
|
||||
<T1, T2, T3, T4, T5>(p1: Predicates<T1>, p2?: Predicates<T2>, p3?: Predicates<T3>, p4?: Predicates<T4>, p5?: Predicates<T5>):
|
||||
TypedMethodDecorator<(<R>(param1: T1, param2: T2, param3: T3, param4: T4, param5: T5) => R)>;
|
||||
<T1, T2, T3, T4, T5, T6>(p1: Predicates<T1>, p2?: Predicates<T2>, p3?: Predicates<T3>, p4?: Predicates<T4>, p5?: Predicates<T5>, p6?: Predicates<T6>):
|
||||
TypedMethodDecorator<(<R>(param1: T1, param2: T2, param3: T3, param4: T4, param5: T5, param6: T6) => R)>;
|
||||
}
|
||||
|
||||
export interface ValidateReturnDecorator {
|
||||
<R>(p1: Predicates<R>): TypedMethodDecorator<((...args: any[]) => R)>;
|
||||
}
|
||||
|
||||
export const validate: ValidateDecorator;
|
||||
export const Validate: ValidateDecorator;
|
||||
|
||||
export const validateReturn: ValidateReturnDecorator;
|
||||
export const ValidateReturn: ValidateReturnDecorator;
|
||||
}
|
||||
+177
-38
@@ -240,6 +240,42 @@ module TestDropRight {
|
||||
result = _(list).dropRight<TResult>(42).value();
|
||||
}
|
||||
|
||||
// _.dropWhile
|
||||
module TestDropWhile {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
let predicateFn: (value: TResult, index: number, collection: _.List<TResult>) => boolean;
|
||||
let result: TResult[];
|
||||
|
||||
result = _.dropWhile<TResult>(array);
|
||||
result = _.dropWhile<TResult>(array, predicateFn);
|
||||
result = _.dropWhile<TResult>(array, predicateFn, any);
|
||||
result = _.dropWhile<TResult>(array, '')
|
||||
result = _.dropWhile<TResult>(array, '', any);
|
||||
result = _.dropWhile<{a: number;}, TResult>(array, {a: 42});
|
||||
|
||||
result = _.dropWhile<TResult>(list);
|
||||
result = _.dropWhile<TResult>(list, predicateFn);
|
||||
result = _.dropWhile<TResult>(list, predicateFn, any);
|
||||
result = _.dropWhile<TResult>(list, '')
|
||||
result = _.dropWhile<TResult>(list, '', any);
|
||||
result = _.dropWhile<{a: number;}, TResult>(list, {a: 42});
|
||||
|
||||
result = _(array).dropWhile().value();
|
||||
result = _(array).dropWhile(predicateFn).value();
|
||||
result = _(array).dropWhile(predicateFn, any).value();
|
||||
result = _(array).dropWhile('').value();
|
||||
result = _(array).dropWhile('', any).value();
|
||||
result = _(array).dropWhile<{a: number;}>({a: 42}).value();
|
||||
|
||||
result = _(list).dropWhile<TResult>().value();
|
||||
result = _(list).dropWhile<TResult>(predicateFn).value();
|
||||
result = _(list).dropWhile<TResult>(predicateFn, any).value();
|
||||
result = _(list).dropWhile<TResult>('').value();
|
||||
result = _(list).dropWhile<TResult>('', any).value();
|
||||
result = _(list).dropWhile<{a: number;}, TResult>({a: 42}).value();
|
||||
}
|
||||
|
||||
result = <number[]>_.rest([1, 2, 3]);
|
||||
result = <number[]>_.rest([1, 2, 3], 2);
|
||||
result = <number[]>_.rest([1, 2, 3], (num) => num < 3)
|
||||
@@ -344,16 +380,6 @@ module TestFirst {
|
||||
result = _(list).first<TResult>();
|
||||
}
|
||||
|
||||
result = <number[]>_.takeWhile([1, 2, 3], (num) => num < 3);
|
||||
result = <boolean[]>_.takeWhile(foodsOrganic, 'organic');
|
||||
result = <IFoodType[]>_.takeWhile(foodsType, { 'type': 'fruit' });
|
||||
|
||||
result = <number[]>_([1, 2, 3]).takeWhile(function (num) {
|
||||
return num < 3;
|
||||
}).value();
|
||||
result = <boolean[]>_(foodsType).takeWhile('organic').value();
|
||||
result = <IFoodType[]>_(foodsType).takeWhile({ 'type': 'fruit' }).value();
|
||||
|
||||
result = <Array<number>>_.flatten([[1, 2], [3, 4]]);
|
||||
result = <Array<number>>_.flatten([[1, 2], [3, 4], 5, 6]);
|
||||
result = <Array<number|Array<Array<number>>>>_.flatten([1, [2], [3, [[4]]]]);
|
||||
@@ -612,6 +638,78 @@ module TestTake {
|
||||
result = _(testTakeRightList).takeRight<TResult>(42).value();
|
||||
}
|
||||
|
||||
// _.takeRightWhile
|
||||
module TestTakeRightWhile {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
let predicateFn: (value: TResult, index: number, collection: _.List<TResult>) => boolean;
|
||||
let result: TResult[];
|
||||
|
||||
result = _.takeRightWhile<TResult>(array);
|
||||
result = _.takeRightWhile<TResult>(array, predicateFn);
|
||||
result = _.takeRightWhile<TResult>(array, predicateFn, any);
|
||||
result = _.takeRightWhile<TResult>(array, '')
|
||||
result = _.takeRightWhile<TResult>(array, '', any);
|
||||
result = _.takeRightWhile<{a: number;}, TResult>(array, {a: 42});
|
||||
|
||||
result = _.takeRightWhile<TResult>(list);
|
||||
result = _.takeRightWhile<TResult>(list, predicateFn);
|
||||
result = _.takeRightWhile<TResult>(list, predicateFn, any);
|
||||
result = _.takeRightWhile<TResult>(list, '')
|
||||
result = _.takeRightWhile<TResult>(list, '', any);
|
||||
result = _.takeRightWhile<{a: number;}, TResult>(list, {a: 42});
|
||||
|
||||
result = _(array).takeRightWhile().value();
|
||||
result = _(array).takeRightWhile(predicateFn).value();
|
||||
result = _(array).takeRightWhile(predicateFn, any).value();
|
||||
result = _(array).takeRightWhile('').value();
|
||||
result = _(array).takeRightWhile('', any).value();
|
||||
result = _(array).takeRightWhile<{a: number;}>({a: 42}).value();
|
||||
|
||||
result = _(list).takeRightWhile<TResult>().value();
|
||||
result = _(list).takeRightWhile<TResult>(predicateFn).value();
|
||||
result = _(list).takeRightWhile<TResult>(predicateFn, any).value();
|
||||
result = _(list).takeRightWhile<TResult>('').value();
|
||||
result = _(list).takeRightWhile<TResult>('', any).value();
|
||||
result = _(list).takeRightWhile<{a: number;}, TResult>({a: 42}).value();
|
||||
}
|
||||
|
||||
// _.takeWhile
|
||||
module TestTakeWhile {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
let predicateFn: (value: TResult, index: number, collection: _.List<TResult>) => boolean;
|
||||
let result: TResult[];
|
||||
|
||||
result = _.takeWhile<TResult>(array);
|
||||
result = _.takeWhile<TResult>(array, predicateFn);
|
||||
result = _.takeWhile<TResult>(array, predicateFn, any);
|
||||
result = _.takeWhile<TResult>(array, '')
|
||||
result = _.takeWhile<TResult>(array, '', any);
|
||||
result = _.takeWhile<{a: number;}, TResult>(array, {a: 42});
|
||||
|
||||
result = _.takeWhile<TResult>(list);
|
||||
result = _.takeWhile<TResult>(list, predicateFn);
|
||||
result = _.takeWhile<TResult>(list, predicateFn, any);
|
||||
result = _.takeWhile<TResult>(list, '')
|
||||
result = _.takeWhile<TResult>(list, '', any);
|
||||
result = _.takeWhile<{a: number;}, TResult>(list, {a: 42});
|
||||
|
||||
result = _(array).takeWhile().value();
|
||||
result = _(array).takeWhile(predicateFn).value();
|
||||
result = _(array).takeWhile(predicateFn, any).value();
|
||||
result = _(array).takeWhile('').value();
|
||||
result = _(array).takeWhile('', any).value();
|
||||
result = _(array).takeWhile<{a: number;}>({a: 42}).value();
|
||||
|
||||
result = _(list).takeWhile<TResult>().value();
|
||||
result = _(list).takeWhile<TResult>(predicateFn).value();
|
||||
result = _(list).takeWhile<TResult>(predicateFn, any).value();
|
||||
result = _(list).takeWhile<TResult>('').value();
|
||||
result = _(list).takeWhile<TResult>('', any).value();
|
||||
result = _(list).takeWhile<{a: number;}, TResult>({a: 42}).value();
|
||||
}
|
||||
|
||||
result = <number[]>_.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
|
||||
result = <number[]>_([1, 2, 3]).union([101, 2, 1, 10], [2, 1]).value();
|
||||
@@ -690,21 +788,29 @@ result = <{ x: number; }[]>_([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }]).unique('x').v
|
||||
}
|
||||
|
||||
// _.xor
|
||||
var testXorArray: number[];
|
||||
var testXorList: _.List<number>;
|
||||
result = <number[]>_.xor<number>();
|
||||
result = <number[]>_.xor<number>(testXorArray);
|
||||
result = <number[]>_.xor<number>(testXorArray, testXorArray);
|
||||
result = <number[]>_.xor<number>(testXorArray, testXorArray, testXorArray);
|
||||
result = <number[]>_.xor<number>(testXorList);
|
||||
result = <number[]>_.xor<number>(testXorList, testXorList);
|
||||
result = <number[]>_.xor<number>(testXorList, testXorList, testXorList);
|
||||
result = <number[]>(_(testXorArray).xor().value());
|
||||
result = <number[]>(_(testXorArray).xor(testXorArray).value());
|
||||
result = <number[]>(_(testXorArray).xor(testXorArray, testXorArray).value());
|
||||
result = <number[]>(_(testXorList).xor().value());
|
||||
result = <number[]>(_(testXorList).xor(testXorList).value());
|
||||
result = <number[]>(_(testXorList).xor(testXorList, testXorList).value());
|
||||
module TestXor {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
let result: TResult[];
|
||||
|
||||
result = _.xor<TResult>();
|
||||
|
||||
result = _.xor<TResult>(array);
|
||||
result = _.xor<TResult>(array, list);
|
||||
result = _.xor<TResult>(array, list, array);
|
||||
|
||||
result = _.xor<TResult>(list);
|
||||
result = _.xor<TResult>(list, array);
|
||||
result = _.xor<TResult>(list, array, list);
|
||||
|
||||
result = _(array).xor().value();
|
||||
result = _(array).xor(list).value();
|
||||
result = _(array).xor(list, array).value();
|
||||
|
||||
result = _(list).xor<TResult>().value();
|
||||
result = _(list).xor<TResult>(array).value();
|
||||
result = _(list).xor<TResult>(array, list).value();
|
||||
}
|
||||
|
||||
result = <any[][]>_.zip(['moe', 'larry'], [30, 40], [true, false]);
|
||||
result = <any[][]>_.unzip(['moe', 'larry'], [30, 40], [true, false]);
|
||||
@@ -2013,28 +2119,43 @@ result = <DefaultsDeepResult>_(TestDefaultsDeepObject).defaultsDeep<DefaultsDeep
|
||||
|
||||
// _.findKey
|
||||
module TestFindKey {
|
||||
let predicateFn: (value: any, key?: string, object?: {}) => boolean;
|
||||
let result: string;
|
||||
|
||||
result = _.findKey<{a: string;}>({a: ''});
|
||||
{
|
||||
let predicateFn: (value: any, key?: string, object?: {}) => boolean;
|
||||
|
||||
result = _.findKey<{a: string;}>({a: ''}, predicateFn);
|
||||
result = _.findKey<{a: string;}>({a: ''}, predicateFn, any);
|
||||
result = _.findKey<{a: string;}>({a: ''});
|
||||
|
||||
result = _.findKey<{a: string;}>({a: ''}, '');
|
||||
result = _.findKey<{a: string;}>({a: ''}, '', any);
|
||||
result = _.findKey<{a: string;}>({a: ''}, predicateFn);
|
||||
result = _.findKey<{a: string;}>({a: ''}, predicateFn, any);
|
||||
|
||||
result = _.findKey<{a: number;}, {a: string;}>({a: ''}, {a: 42});
|
||||
|
||||
result = _<{a: string;}>({a: ''}).findKey();
|
||||
result = _.findKey<{a: string;}>({a: ''}, '');
|
||||
result = _.findKey<{a: string;}>({a: ''}, '', any);
|
||||
|
||||
result = _<{a: string;}>({a: ''}).findKey(predicateFn);
|
||||
result = _<{a: string;}>({a: ''}).findKey(predicateFn, any);
|
||||
result = _.findKey<{a: number;}, {a: string;}>({a: ''}, {a: 42});
|
||||
|
||||
result = _<{a: string;}>({a: ''}).findKey('');
|
||||
result = _<{a: string;}>({a: ''}).findKey('', any);
|
||||
result = _<{a: string;}>({a: ''}).findKey();
|
||||
|
||||
result = _<{a: string;}>({a: ''}).findKey<{a: number;}>({a: 42});
|
||||
result = _<{a: string;}>({a: ''}).findKey(predicateFn);
|
||||
result = _<{a: string;}>({a: ''}).findKey(predicateFn, any);
|
||||
|
||||
|
||||
result = _<{a: string;}>({a: ''}).findKey('');
|
||||
result = _<{a: string;}>({a: ''}).findKey('', any);
|
||||
|
||||
result = _<{a: string;}>({a: ''}).findKey<{a: number;}>({a: 42});
|
||||
}
|
||||
|
||||
{
|
||||
let predicateFn: (value: string, key?: string, collection?: _.Dictionary<string>) => boolean;
|
||||
|
||||
result = _.findKey<string, {a: string;}>({a: ''}, predicateFn);
|
||||
result = _.findKey<string, {a: string;}>({a: ''}, predicateFn, any);
|
||||
|
||||
result = _<{a: string;}>({a: ''}).findKey<string>(predicateFn);
|
||||
result = _<{a: string;}>({a: ''}).findKey<string>(predicateFn, any);
|
||||
}
|
||||
}
|
||||
|
||||
result = <string>_.findLastKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function (num) {
|
||||
@@ -2696,6 +2817,24 @@ module TestMatches {
|
||||
}
|
||||
}
|
||||
|
||||
// _.matchesProperty
|
||||
module TestMatches {
|
||||
let path: {toString(): string;}|{toString(): string;}[];
|
||||
let source: TResult;
|
||||
|
||||
{
|
||||
let result: (value: any) => boolean;
|
||||
result = _.matchesProperty<TResult>(path, source);
|
||||
result = _(path).matchesProperty<TResult>(source).value();
|
||||
}
|
||||
|
||||
{
|
||||
let result: (value: TResult) => boolean;
|
||||
result = _.matchesProperty<TResult, TResult>(path, source);
|
||||
result = _(path).matchesProperty<TResult, TResult>(source).value();
|
||||
}
|
||||
}
|
||||
|
||||
// _.method
|
||||
class TestMethod {
|
||||
a = {
|
||||
|
||||
Vendored
+345
-63
@@ -457,6 +457,100 @@ declare module _ {
|
||||
dropRight<TResult>(n?: number): LoDashArrayWrapper<TResult>;
|
||||
}
|
||||
|
||||
//_.dropWhile
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate
|
||||
* returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
|
||||
*
|
||||
* If a property name is provided for predicate the created _.property style callback returns the property
|
||||
* value of the given element.
|
||||
*
|
||||
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
|
||||
* elements that have a matching property value, else false.
|
||||
*
|
||||
* If an object is provided for predicate the created _.matches style callback returns true for elements that
|
||||
* have the properties of the given object, else false.
|
||||
*
|
||||
* @param array The array to query.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @param thisArg The this binding of predicate.
|
||||
* @return Returns the slice of array.
|
||||
*/
|
||||
dropWhile<TValue>(
|
||||
array: List<TValue>,
|
||||
predicate?: ListIterator<TValue, boolean>,
|
||||
thisArg?: any
|
||||
): TValue[];
|
||||
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile<TValue>(
|
||||
array: List<TValue>,
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): TValue[];
|
||||
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile<TWhere, TValue>(
|
||||
array: List<TValue>,
|
||||
predicate?: TWhere
|
||||
): TValue[];
|
||||
}
|
||||
|
||||
interface LoDashArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile(
|
||||
predicate?: ListIterator<T, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile<TWhere>(
|
||||
predicate?: TWhere
|
||||
): LoDashArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile<TValue>(
|
||||
predicate?: ListIterator<TValue, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashArrayWrapper<TValue>;
|
||||
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile<TValue>(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashArrayWrapper<TValue>;
|
||||
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile<TWhere, TValue>(
|
||||
predicate?: TWhere
|
||||
): LoDashArrayWrapper<TValue>;
|
||||
}
|
||||
|
||||
//_.findIndex
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -671,66 +765,6 @@ declare module _ {
|
||||
first<TResult>(): TResult;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Takes the first items from an array or list based on a predicate
|
||||
* @param array The array or list of items on which the result set will be based
|
||||
* @param predicate A predicate function to determine whether a value will be taken. Optional; defaults to identity.
|
||||
* @param [thisArg] The this binding of predicate.
|
||||
*/
|
||||
takeWhile<T>(
|
||||
array: (Array<T>|List<T>),
|
||||
predicate?: ListIterator<T, boolean>,
|
||||
thisArg?: any
|
||||
): T[];
|
||||
|
||||
/**
|
||||
* Takes the first items from an array or list based on a predicate
|
||||
* @param array The array or list of items on which the result set will be based
|
||||
* @param pluckValue Uses a _.property style callback to return the property value of the given element
|
||||
*/
|
||||
takeWhile<T>(
|
||||
array: (Array<T>|List<T>),
|
||||
pluckValue: string
|
||||
): any[];
|
||||
|
||||
/**
|
||||
* Takes the first items from an array or list based on a predicate
|
||||
* @param array The array or list of items on which the result set will be based
|
||||
* @param whereValue Uses a _.matches style callback to return the first elements that match the given value
|
||||
*/
|
||||
takeWhile<W, T>(
|
||||
array: (Array<T>|List<T>),
|
||||
whereValue: W
|
||||
): T[];
|
||||
}
|
||||
|
||||
interface LoDashArrayWrapper<T> {
|
||||
/**
|
||||
* Takes the first items based on a predicate
|
||||
* @param predicate The function called per element.
|
||||
* @param [thisArg] The this binding of callback.
|
||||
**/
|
||||
takeWhile(
|
||||
predicate: ListIterator<T, boolean>,
|
||||
thisArg?: any): LoDashArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
* Takes the first items based on a predicate
|
||||
* @param pluckValue Uses a _.property style callback to return the property value of the given element
|
||||
**/
|
||||
takeWhile<T>(
|
||||
pluckValue: string): LoDashArrayWrapper<any>;
|
||||
|
||||
/**
|
||||
* Takes the first items based on a predicate
|
||||
* @param whereValue Uses a _.matches style callback to return the first elements that match the given value
|
||||
**/
|
||||
takeWhile<W, T>(
|
||||
whereValue: W): LoDashArrayWrapper<T>;
|
||||
|
||||
}
|
||||
|
||||
interface MaybeNestedList<T> extends List<T|List<T>> { }
|
||||
interface RecursiveList<T> extends List<T|RecursiveList<T>> { }
|
||||
|
||||
@@ -1437,6 +1471,194 @@ declare module _ {
|
||||
takeRight<TResult>(n?: number): LoDashArrayWrapper<TResult>;
|
||||
}
|
||||
|
||||
//_.takeRightWhile
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a slice of array with elements taken from the end. Elements are taken until predicate returns
|
||||
* falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
|
||||
*
|
||||
* If a property name is provided for predicate the created _.property style callback returns the property
|
||||
* value of the given element.
|
||||
*
|
||||
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
|
||||
* elements that have a matching property value, else false.
|
||||
*
|
||||
* If an object is provided for predicate the created _.matches style callback returns true for elements that
|
||||
* have the properties of the given object, else false.
|
||||
*
|
||||
* @param array The array to query.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @param thisArg The this binding of predicate.
|
||||
* @return Returns the slice of array.
|
||||
*/
|
||||
takeRightWhile<TValue>(
|
||||
array: List<TValue>,
|
||||
predicate?: ListIterator<TValue, boolean>,
|
||||
thisArg?: any
|
||||
): TValue[];
|
||||
|
||||
/**
|
||||
* @see _.takeRightWhile
|
||||
*/
|
||||
takeRightWhile<TValue>(
|
||||
array: List<TValue>,
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): TValue[];
|
||||
|
||||
/**
|
||||
* @see _.takeRightWhile
|
||||
*/
|
||||
takeRightWhile<TWhere, TValue>(
|
||||
array: List<TValue>,
|
||||
predicate?: TWhere
|
||||
): TValue[];
|
||||
}
|
||||
|
||||
interface LoDashArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.takeRightWhile
|
||||
*/
|
||||
takeRightWhile(
|
||||
predicate?: ListIterator<T, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.takeRightWhile
|
||||
*/
|
||||
takeRightWhile(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.takeRightWhile
|
||||
*/
|
||||
takeRightWhile<TWhere>(
|
||||
predicate?: TWhere
|
||||
): LoDashArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.takeRightWhile
|
||||
*/
|
||||
takeRightWhile<TValue>(
|
||||
predicate?: ListIterator<TValue, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashArrayWrapper<TValue>;
|
||||
|
||||
/**
|
||||
* @see _.takeRightWhile
|
||||
*/
|
||||
takeRightWhile<TValue>(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashArrayWrapper<TValue>;
|
||||
|
||||
/**
|
||||
* @see _.takeRightWhile
|
||||
*/
|
||||
takeRightWhile<TWhere, TValue>(
|
||||
predicate?: TWhere
|
||||
): LoDashArrayWrapper<TValue>;
|
||||
}
|
||||
|
||||
//_.takeWhile
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns
|
||||
* falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
|
||||
*
|
||||
* If a property name is provided for predicate the created _.property style callback returns the property
|
||||
* value of the given element.
|
||||
*
|
||||
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
|
||||
* elements that have a matching property value, else false.
|
||||
*
|
||||
* If an object is provided for predicate the created _.matches style callback returns true for elements that
|
||||
* have the properties of the given object, else false.
|
||||
*
|
||||
* @param array The array to query.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @param thisArg The this binding of predicate.
|
||||
* @return Returns the slice of array.
|
||||
*/
|
||||
takeWhile<TValue>(
|
||||
array: List<TValue>,
|
||||
predicate?: ListIterator<TValue, boolean>,
|
||||
thisArg?: any
|
||||
): TValue[];
|
||||
|
||||
/**
|
||||
* @see _.takeWhile
|
||||
*/
|
||||
takeWhile<TValue>(
|
||||
array: List<TValue>,
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): TValue[];
|
||||
|
||||
/**
|
||||
* @see _.takeWhile
|
||||
*/
|
||||
takeWhile<TWhere, TValue>(
|
||||
array: List<TValue>,
|
||||
predicate?: TWhere
|
||||
): TValue[];
|
||||
}
|
||||
|
||||
interface LoDashArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.takeWhile
|
||||
*/
|
||||
takeWhile(
|
||||
predicate?: ListIterator<T, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.takeWhile
|
||||
*/
|
||||
takeWhile(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.takeWhile
|
||||
*/
|
||||
takeWhile<TWhere>(
|
||||
predicate?: TWhere
|
||||
): LoDashArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.takeWhile
|
||||
*/
|
||||
takeWhile<TValue>(
|
||||
predicate?: ListIterator<TValue, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashArrayWrapper<TValue>;
|
||||
|
||||
/**
|
||||
* @see _.takeWhile
|
||||
*/
|
||||
takeWhile<TValue>(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashArrayWrapper<TValue>;
|
||||
|
||||
/**
|
||||
* @see _.takeWhile
|
||||
*/
|
||||
takeWhile<TWhere, TValue>(
|
||||
predicate?: TWhere
|
||||
): LoDashArrayWrapper<TValue>;
|
||||
}
|
||||
|
||||
//_.union
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -1874,6 +2096,7 @@ declare module _ {
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates an array of unique values that is the symmetric difference of the provided arrays.
|
||||
*
|
||||
* @param arrays The arrays to inspect.
|
||||
* @return Returns the new array of values.
|
||||
*/
|
||||
@@ -1884,14 +2107,14 @@ declare module _ {
|
||||
/**
|
||||
* @see _.xor
|
||||
*/
|
||||
xor(...arrays: T[][]): LoDashArrayWrapper<T>;
|
||||
xor(...arrays: List<T>[]): LoDashArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.xor
|
||||
*/
|
||||
xor(...arrays: T[]): LoDashObjectWrapper<T>;
|
||||
xor<TValue>(...arrays: List<TValue>[]): LoDashArrayWrapper<TValue>;
|
||||
}
|
||||
|
||||
//_.zip
|
||||
@@ -7104,6 +7327,15 @@ declare module _ {
|
||||
* @param thisArg The this binding of predicate.
|
||||
* @return Returns the key of the matched element, else undefined.
|
||||
*/
|
||||
findKey<TValues, TObject>(
|
||||
object: TObject,
|
||||
predicate?: DictionaryIterator<TValues, boolean>,
|
||||
thisArg?: any
|
||||
): string;
|
||||
|
||||
/**
|
||||
* @see _.findKey
|
||||
*/
|
||||
findKey<TObject>(
|
||||
object: TObject,
|
||||
predicate?: ObjectIterator<any, boolean>,
|
||||
@@ -7129,6 +7361,14 @@ declare module _ {
|
||||
}
|
||||
|
||||
interface LoDashObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.findKey
|
||||
*/
|
||||
findKey<TValues>(
|
||||
predicate?: DictionaryIterator<TValues, boolean>,
|
||||
thisArg?: any
|
||||
): string;
|
||||
|
||||
/**
|
||||
* @see _.findKey
|
||||
*/
|
||||
@@ -8654,6 +8894,48 @@ declare module _ {
|
||||
matches<V>(): LoDashObjectWrapper<(value: V) => boolean>;
|
||||
}
|
||||
|
||||
//_.matchesProperty
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a function that compares the property value of path on a given object to value.
|
||||
*
|
||||
* Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and
|
||||
* strings. Objects are compared by their own, not inherited, enumerable properties.
|
||||
*
|
||||
* @param path The path of the property to get.
|
||||
* @param srcValue The value to match.
|
||||
* @return Returns the new function.
|
||||
*/
|
||||
matchesProperty<T>(
|
||||
path: StringRepresentable|StringRepresentable[],
|
||||
srcValue: T
|
||||
): (value: any) => boolean;
|
||||
|
||||
/**
|
||||
* @see _.matchesProperty
|
||||
*/
|
||||
matchesProperty<T, V>(
|
||||
path: StringRepresentable|StringRepresentable[],
|
||||
srcValue: T
|
||||
): (value: V) => boolean;
|
||||
}
|
||||
|
||||
interface LoDashWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* @see _.matchesProperty
|
||||
*/
|
||||
matchesProperty<SrcValue>(
|
||||
srcValue: SrcValue
|
||||
): LoDashObjectWrapper<(value: any) => boolean>;
|
||||
|
||||
/**
|
||||
* @see _.matchesProperty
|
||||
*/
|
||||
matchesProperty<SrcValue, Value>(
|
||||
srcValue: SrcValue
|
||||
): LoDashObjectWrapper<(value: Value) => boolean>;
|
||||
}
|
||||
|
||||
//_.method
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -8988,7 +9270,7 @@ declare module _ {
|
||||
}
|
||||
|
||||
interface DictionaryIterator<T, TResult> {
|
||||
(value: T, key: string, collection: Dictionary<T>): TResult;
|
||||
(value: T, key?: string, collection?: Dictionary<T>): TResult;
|
||||
}
|
||||
|
||||
interface ObjectIterator<T, TResult> {
|
||||
|
||||
@@ -0,0 +1,476 @@
|
||||
///<reference path='../../react/react.d.ts' />
|
||||
///<reference path='material-ui-0.11.1.d.ts' />
|
||||
|
||||
import * as React from "react/addons";
|
||||
import mui = require("material-ui");
|
||||
import Colors = require("material-ui/lib/styles/colors");
|
||||
import AppBar = require("material-ui/lib/app-bar");
|
||||
import IconButton = require("material-ui/lib/icon-button");
|
||||
import FlatButton = require("material-ui/lib/flat-button");
|
||||
import Avatar = require("material-ui/lib/avatar");
|
||||
import FontIcon = require("material-ui/lib/font-icon");
|
||||
import Typography = require("material-ui/lib/styles/typography");
|
||||
import RaisedButton = require("material-ui/lib/raised-button");
|
||||
import FloatingActionButton = require("material-ui/lib/floating-action-button");
|
||||
import Card = require("material-ui/lib/card/card");
|
||||
import CardHeader = require("material-ui/lib/card/card-header");
|
||||
import CardText = require("material-ui/lib/card/card-text");
|
||||
import CardActions = require("material-ui/lib/card/card-actions");
|
||||
import Dialog = require("material-ui/lib/dialog");
|
||||
import DropDownMenu = require("material-ui/lib/drop-down-menu");
|
||||
import RadioButtonGroup = require("material-ui/lib/radio-button-group");
|
||||
import RadioButton = require("material-ui/lib/radio-button");
|
||||
import Toggle = require("material-ui/lib/toggle");
|
||||
import TextField = require("material-ui/lib/text-field");
|
||||
import SelectField = require("material-ui/lib/select-field");
|
||||
import IconMenu = require("material-ui/lib/menus/icon-menu");
|
||||
import Menu = require('material-ui/lib/menus/menu');
|
||||
import MenuItem = require('material-ui/lib/menus/menu-item');
|
||||
import MenuDivider = require('material-ui/lib/menus/menu-divider');
|
||||
|
||||
import NavigationClose = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/navigation/close", but they aren't defined yet.
|
||||
import FileFolder = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/file/folder", but they aren't defined yet.
|
||||
import ToggleStar = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/toggle/star", but they aren't defined yet.
|
||||
import ActionGrade = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/action/grade", but they aren't defined yet.
|
||||
import ToggleStarBorder = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/toggle/star-border", but they aren't defined yet.
|
||||
import ArrowDropRight = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/toggle/star-border", but they aren't defined yet.
|
||||
|
||||
class MaterialUiTests extends React.Component<{}, {}> implements React.LinkedStateMixin {
|
||||
|
||||
// injected with mixin
|
||||
linkState: <T>(key: string) => React.ReactLink<T>;
|
||||
dialog: mui.Dialog;
|
||||
//dialog2: Dialog; // can't get type directly from require("material-ui/lib/dialog");
|
||||
|
||||
private touchTapEventHandler(e: __MaterialUI.TouchTapEvent) {
|
||||
this.dialog.show();
|
||||
//this.dialog2.show();
|
||||
}
|
||||
private formEventHandler(e: React.FormEvent) {
|
||||
}
|
||||
private selectFieldChangeHandler(e: __MaterialUI.TouchTapEvent, si: number, mi: any) {
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
// "http://material-ui.com/#/customization/themes"
|
||||
let ThemeManager = new mui.Styles.ThemeManager();
|
||||
ThemeManager.setTheme(ThemeManager.types.LIGHT);
|
||||
ThemeManager.setTheme(ThemeManager.types.DARK);
|
||||
let muiTheme = ThemeManager.getCurrentTheme();
|
||||
ThemeManager.setComponentThemes({
|
||||
toggle: {
|
||||
thumbOnColor: "#00bcd4",
|
||||
trackOnColor: "LightCyan",
|
||||
}
|
||||
});
|
||||
|
||||
// "http://material-ui.com/#/customization/inline-styles"
|
||||
let Checkbox = mui.Checkbox;
|
||||
let element: React.ReactElement<any>;
|
||||
element = <Checkbox
|
||||
id="checkboxId1"
|
||||
name="checkboxName1"
|
||||
value="checkboxValue1"
|
||||
label="went for a run today"
|
||||
style={{
|
||||
width: '50%',
|
||||
margin: '0 auto'
|
||||
}}
|
||||
iconStyle={{
|
||||
fill: '#FF4081'
|
||||
}}/>
|
||||
element = React.createElement<__MaterialUI.CheckboxProps>(Checkbox, {
|
||||
id: "checkboxId1", name: "checkboxName1", value: "checkboxValue1", label: "went for a run today", style: {
|
||||
width: '50%',
|
||||
margin: '0 auto'
|
||||
}, iconStyle: {
|
||||
fill: '#FF4081'
|
||||
}
|
||||
});
|
||||
|
||||
// "http://material-ui.com/#/customization/colors"
|
||||
ThemeManager.setComponentThemes({
|
||||
toggle: {
|
||||
thumbOnColor: Colors.cyan200,
|
||||
thumbOffColor: Colors.grey400,
|
||||
}
|
||||
});
|
||||
|
||||
// "http://material-ui.com/#/components/appbar"
|
||||
element = <AppBar
|
||||
title="Title"
|
||||
iconClassNameRight="muidocs-icon-navigation-expand-more" />
|
||||
element = <AppBar
|
||||
title="Title"
|
||||
iconElementLeft={<IconButton><NavigationClose /></IconButton>}
|
||||
iconElementRight={<FlatButton label="Save" />} />;
|
||||
|
||||
// "http://material-ui.com/#/components/avatars"
|
||||
//image avatar
|
||||
element = <Avatar src="images/uxceo-128.jpg" />;
|
||||
//SvgIcon avatar
|
||||
element = <Avatar icon={<FileFolder />} />;
|
||||
//SvgIcon avatar with custom colors
|
||||
element = <Avatar
|
||||
icon={<FileFolder />}
|
||||
color={Colors.orange200}
|
||||
backgroundColor={Colors.pink400} />;
|
||||
//FontIcon avatar
|
||||
element = <Avatar
|
||||
icon={
|
||||
<FontIcon className="muidocs-icon-communication-voicemail" />
|
||||
} />;
|
||||
//FontIcon avatar with custom colors
|
||||
element = <Avatar
|
||||
icon={<FontIcon className="muidocs-icon-communication-voicemail" />}
|
||||
color={Colors.blue300}
|
||||
backgroundColor={Colors.indigo900} />;
|
||||
//Letter avatar
|
||||
element = <Avatar>A</Avatar>;
|
||||
//Letter avatar with custom colors
|
||||
element = <Avatar
|
||||
color={Colors.deepOrange300}
|
||||
backgroundColor={Colors.purple500}>
|
||||
</Avatar>
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/buttons"
|
||||
element = <FlatButton linkButton={true} href="https://github.com/callemall/material-ui" secondary={true} label="GitHub">
|
||||
<FontIcon style={{ color: Typography.textFullWhite }} className="muidocs-icon-custom-github"/>
|
||||
</FlatButton>;
|
||||
element = <RaisedButton linkButton={true} href="https://github.com/callemall/material-ui" secondary={true} label="GitHub">
|
||||
<FontIcon style={{ color: Typography.textFullWhite }} className="muidocs-icon-custom-github"/>
|
||||
</RaisedButton>;
|
||||
element = <FloatingActionButton secondary={true} mini={true} linkButton={true}
|
||||
href="https://github.com/callemall/material-ui" >
|
||||
<ToggleStar />
|
||||
</FloatingActionButton>;
|
||||
|
||||
// "http://material-ui.com/#/components/cards"
|
||||
element = <Card initiallyExpanded={true}>
|
||||
<CardHeader
|
||||
title="Title"
|
||||
subtitle="Subtitle"
|
||||
avatar={<Avatar style={{ color: 'red' }}>A</Avatar>}
|
||||
showExpandableButton={true}>
|
||||
</CardHeader>
|
||||
<CardText expandable={true}>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
</CardText>
|
||||
<CardActions expandable={true}>
|
||||
<FlatButton label="Action1"/>
|
||||
<FlatButton label="Action2"/>
|
||||
</CardActions>
|
||||
<CardText expandable={true}>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
</CardText>
|
||||
</Card>;
|
||||
|
||||
// "http://material-ui.com/#/components/date-picker"
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/dialog"
|
||||
let standardActions = [
|
||||
{ text: 'Cancel' },
|
||||
{ text: 'Submit', onTouchTap: this.touchTapEventHandler, ref: 'submit' }
|
||||
];
|
||||
|
||||
element = <Dialog
|
||||
title="Dialog With Standard Actions"
|
||||
actions={standardActions}
|
||||
actionFocus="submit"
|
||||
modal={true}>
|
||||
The actions in this window are created from the json that's passed in.
|
||||
</Dialog>;
|
||||
|
||||
//Custom Actions
|
||||
let customActions = [
|
||||
<FlatButton
|
||||
label="Cancel"
|
||||
secondary={true}
|
||||
onTouchTap={this.touchTapEventHandler} />,
|
||||
<FlatButton
|
||||
label="Submit"
|
||||
primary={true}
|
||||
onTouchTap={this.touchTapEventHandler} />
|
||||
];
|
||||
|
||||
element = <Dialog
|
||||
title="Dialog With Custom Actions"
|
||||
actions={customActions}
|
||||
modal={false}
|
||||
autoDetectWindowHeight={true}
|
||||
autoScrollBodyContent={true}>
|
||||
The actions in this window were passed in as an array of react objects.
|
||||
</Dialog>;
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/dropdown-menu"
|
||||
let menuItems = [
|
||||
{ payload: '1', text: 'Never' },
|
||||
{ payload: '2', text: 'Every Night' },
|
||||
{ payload: '3', text: 'Weeknights' },
|
||||
{ payload: '4', text: 'Weekends' },
|
||||
{ payload: '5', text: 'Weekly' },
|
||||
];
|
||||
element = <DropDownMenu menuItems={menuItems} />;
|
||||
|
||||
// "http://material-ui.com/#/components/icons"
|
||||
element = <FontIcon className= "material-icons" color= { Colors.red500 } > home</FontIcon>;
|
||||
|
||||
// "http://material-ui.com/#/components/icon-buttons"
|
||||
//Method 1: muidocs-icon-github is defined in a style sheet.
|
||||
element = <IconButton iconClassName="muidocs-icon-custom-github" tooltip="GitHub"/>;
|
||||
//Method 2: ActionGrade is a component created using mui.SvgIcon.
|
||||
element = <IconButton tooltip= "Star" touch= { true}>
|
||||
<ActionGrade/>
|
||||
</IconButton >;
|
||||
//Method 3: Manually creating a mui.FontIcon component within IconButton
|
||||
element = <IconButton tooltip= "Sort" disabled= {true}>
|
||||
<FontIcon className="muidocs-icon-custom-sort"/>
|
||||
</IconButton>;
|
||||
//Method 4: Using Google material-icons
|
||||
element = <IconButton iconClassName="material-icons" tooltipPosition="bottom-center"
|
||||
tooltip="Sky">settings_system_daydream</IconButton>;
|
||||
|
||||
// "http://material-ui.com/#/components/icon-menus"
|
||||
element = <IconMenu iconButtonElement={<IconButton />}>
|
||||
<MenuItem primaryText="Refresh" />
|
||||
<MenuItem primaryText="Send feedback" />
|
||||
<MenuItem primaryText="Settings" />
|
||||
<MenuItem primaryText="Help" />
|
||||
<MenuItem primaryText="Sign out" />
|
||||
</IconMenu>;
|
||||
|
||||
// "http://material-ui.com/#/components/left-nav"
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/lists"
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/menus"
|
||||
element = <Menu>
|
||||
<MenuItem primaryText="Maps" />
|
||||
<MenuItem primaryText="Books" />
|
||||
<MenuItem primaryText="Flights" />
|
||||
<MenuItem primaryText="Apps" />
|
||||
</Menu>;
|
||||
element = <Menu desktop={true} width={320}>
|
||||
<MenuItem primaryText="Bold" secondaryText="⌘B" />
|
||||
<MenuItem primaryText="Italic" secondaryText="⌘I" />
|
||||
<MenuItem primaryText="Underline" secondaryText="⌘U" />
|
||||
<MenuItem primaryText="Strikethrough" secondaryText="Alt+Shift+5" />
|
||||
<MenuItem primaryText="Superscript" secondaryText="⌘." />
|
||||
<MenuItem primaryText="Subscript" secondaryText="⌘," />
|
||||
<MenuDivider />
|
||||
<MenuItem primaryText="Paragraph styles" rightIcon={<ArrowDropRight />} />
|
||||
<MenuItem primaryText="Align" rightIcon={<ArrowDropRight />} />
|
||||
<MenuItem primaryText="Line spacing" rightIcon={<ArrowDropRight />} />
|
||||
<MenuItem primaryText="Numbered list" rightIcon={<ArrowDropRight />} />
|
||||
<MenuItem primaryText="List options" rightIcon={<ArrowDropRight />} />
|
||||
<MenuDivider />
|
||||
<MenuItem primaryText="Clear formatting" secondaryText="⌘/" />
|
||||
</Menu>;
|
||||
|
||||
// "http://material-ui.com/#/components/paper"
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/progress"
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/refresh-indicator"
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/sliders"
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/switches"
|
||||
element = <Checkbox
|
||||
name="checkboxName2"
|
||||
value="checkboxValue2"
|
||||
label="fed the dog"
|
||||
defaultChecked={true}/>;
|
||||
element = <Checkbox
|
||||
name = "checkboxName3"
|
||||
value = "checkboxValue3"
|
||||
label = "built a house on the moon"
|
||||
disabled = {true}/>;
|
||||
element = <Checkbox
|
||||
name="checkboxName4"
|
||||
value="checkboxValue4"
|
||||
checkedIcon={<ToggleStar />}
|
||||
unCheckedIcon={<ToggleStarBorder />}
|
||||
label="custom icon" />;
|
||||
|
||||
element = <RadioButtonGroup name="shipSpeed" defaultSelected="not_light">
|
||||
<RadioButton
|
||||
value="light"
|
||||
label="prepare for light speed"
|
||||
style={{ marginBottom: 16 }} />;
|
||||
<RadioButton
|
||||
value="not_light"
|
||||
label="light speed too slow"
|
||||
style={{ marginBottom: 16 }}/>;
|
||||
<RadioButton
|
||||
value="ludicrous"
|
||||
label="go to ludicrous speed"
|
||||
style={{ marginBottom: 16 }}
|
||||
disabled={true}/>
|
||||
</RadioButtonGroup>;
|
||||
|
||||
element = <Toggle
|
||||
name="toggleName1"
|
||||
value="toggleValue1"
|
||||
label="activate thrusters"/>;
|
||||
|
||||
element = <Toggle
|
||||
name = "toggleName2"
|
||||
value = "toggleValue2"
|
||||
label = "auto-pilot"
|
||||
defaultToggled = { true}/>;
|
||||
|
||||
element = <Toggle
|
||||
name="toggleName3"
|
||||
value="toggleValue3"
|
||||
label="initiate self-destruct sequence"
|
||||
disabled={true}/>;
|
||||
|
||||
// "http://material-ui.com/#/components/snackbar"
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/table"
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/tabs"
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/text-fields"
|
||||
element = <TextField
|
||||
hintText="Hint Text" />;
|
||||
element = <TextField
|
||||
hintText="Hint Text"
|
||||
defaultValue="Default Value" />;
|
||||
element = <TextField
|
||||
hintText = "Hint Text"
|
||||
value = { "value" }
|
||||
underlineStyle = {{ borderColor: Colors.green500 }}
|
||||
onChange = { this.formEventHandler } />;
|
||||
element = <TextField
|
||||
hintText="Custom Underline Focus Color"
|
||||
underlineFocusStyle={{ borderColor: Colors.amber900 }} />;
|
||||
element = <TextField
|
||||
hintText = "Hint Text"
|
||||
valueLink = { this.linkState<string>('valueLinkValue') } />;
|
||||
element = <TextField
|
||||
hintText="Hint Text (MultiLine)"
|
||||
multiLine={true} />;
|
||||
element = <TextField
|
||||
hintText = "The hint text can be as long as you want, it will wrap."
|
||||
multiLine = { true} />;
|
||||
element = <TextField
|
||||
hintText="Hint Text"
|
||||
errorText="The error text can be as long as you want, it will wrap." />;
|
||||
element = <TextField
|
||||
hintText = "Hint Text"
|
||||
errorText = { "error text" }
|
||||
onChange = { this.formEventHandler } />;
|
||||
element = <TextField
|
||||
hintText="Hint Text (custom error color)"
|
||||
errorText={"error text"}
|
||||
errorStyle={{ color: 'orange' }}
|
||||
onChange={ this.formEventHandler }
|
||||
defaultValue="Custom error color" />;
|
||||
element = <TextField
|
||||
hintText = "Disabled Hint Text"
|
||||
disabled = { true} />;
|
||||
element = <TextField
|
||||
hintText="Disabled Hint Text"
|
||||
disabled={true}
|
||||
defaultValue="Disabled With Value" />;
|
||||
|
||||
//Select Fields
|
||||
let arbitraryArrayMenuItems = [
|
||||
{
|
||||
id: 0,
|
||||
name: "zero",
|
||||
},
|
||||
];
|
||||
element = <SelectField
|
||||
value = { 0 }
|
||||
onChange = { this.selectFieldChangeHandler }
|
||||
hintText = "Hint Text"
|
||||
menuItems = { menuItems } />;
|
||||
element = <SelectField
|
||||
valueLink={this.linkState('selectValueLinkValue') }
|
||||
floatingLabelText="Float Label Text"
|
||||
valueMember="id"
|
||||
displayMember="name"
|
||||
menuItems={arbitraryArrayMenuItems} />;
|
||||
element = <SelectField
|
||||
valueLink = { this.linkState('selectValueLinkValue2') }
|
||||
floatingLabelText = "Float Custom Label Text"
|
||||
floatingLabelStyle = {{ color: "red" }}
|
||||
valueMember = "id"
|
||||
displayMember = "name"
|
||||
menuItems = { arbitraryArrayMenuItems } />;
|
||||
element = <SelectField
|
||||
value={0}
|
||||
onChange={ this.selectFieldChangeHandler }
|
||||
menuItems={arbitraryArrayMenuItems} />;
|
||||
|
||||
//Floating Hint Text Labels
|
||||
element = <TextField
|
||||
hintText = "Hint Text"
|
||||
floatingLabelText = "Floating Label Text" />;
|
||||
element = <TextField
|
||||
hintText="Hint Text"
|
||||
defaultValue="Default Value"
|
||||
floatingLabelText="Floating Label Text" />;
|
||||
element = <TextField
|
||||
hintText = "Hint Text"
|
||||
floatingLabelText = "Floating Label Text"
|
||||
value = { "value" }
|
||||
onChange = { this.formEventHandler } />;
|
||||
element = <TextField
|
||||
hintText="Hint Text"
|
||||
floatingLabelText="Floating Label Text"
|
||||
valueLink={this.linkState<string>('floatingValueLinkValue') } />;
|
||||
element = <TextField
|
||||
hintText = "Hint Text (MultiLine)"
|
||||
floatingLabelText = "Floating Label Text"
|
||||
multiLine = { true} />;
|
||||
element = <TextField
|
||||
hintText="Hint Text"
|
||||
errorText={"floating text"}
|
||||
floatingLabelText="Floating Label Text"
|
||||
onChange={this.formEventHandler } />;
|
||||
element = <TextField
|
||||
hintText = "Hint Text"
|
||||
errorText = { "error text" }
|
||||
defaultValue = "abc"
|
||||
floatingLabelText = "Floating Label Text"
|
||||
onChange = { this.formEventHandler } />;
|
||||
element = <TextField
|
||||
hintText="Disabled Hint Text"
|
||||
disabled={true}
|
||||
floatingLabelText="Floating Label Text" />;
|
||||
element = <TextField
|
||||
hintText = "Disabled Hint Text"
|
||||
disabled = { true}
|
||||
defaultValue = "Disabled With Value"
|
||||
floatingLabelText = "Floating Label Text" />;
|
||||
element = <TextField
|
||||
hintText="Password Field"
|
||||
floatingLabelText="Password"
|
||||
type="password" />;
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/time-picker"
|
||||
|
||||
|
||||
// "http://material-ui.com/#/components/toolbars"
|
||||
|
||||
return element;
|
||||
}
|
||||
}
|
||||
+2096
File diff suppressed because it is too large
Load Diff
@@ -54,14 +54,13 @@ class MaterialUiTests extends React.Component<{}, {}> implements React.LinkedSta
|
||||
render() {
|
||||
|
||||
// "http://material-ui.com/#/customization/themes"
|
||||
let ThemeManager = new mui.Styles.ThemeManager();
|
||||
ThemeManager.setTheme(ThemeManager.types.LIGHT);
|
||||
ThemeManager.setTheme(ThemeManager.types.DARK);
|
||||
let muiTheme = ThemeManager.getCurrentTheme();
|
||||
ThemeManager.setComponentThemes({
|
||||
toggle: {
|
||||
thumbOnColor: "#00bcd4",
|
||||
trackOnColor: "LightCyan",
|
||||
let ThemeManager = mui.Styles.ThemeManager;
|
||||
let muiTheme: mui.Styles.MuiTheme = ThemeManager.getMuiTheme({
|
||||
palette: {
|
||||
accent1Color: Colors.cyan100
|
||||
},
|
||||
spacing: {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -89,14 +88,6 @@ class MaterialUiTests extends React.Component<{}, {}> implements React.LinkedSta
|
||||
}
|
||||
});
|
||||
|
||||
// "http://material-ui.com/#/customization/colors"
|
||||
ThemeManager.setComponentThemes({
|
||||
toggle: {
|
||||
thumbOnColor: Colors.cyan200,
|
||||
thumbOffColor: Colors.grey400,
|
||||
}
|
||||
});
|
||||
|
||||
// "http://material-ui.com/#/components/appbar"
|
||||
element = <AppBar
|
||||
title="Title"
|
||||
|
||||
Vendored
+118
-49
@@ -1,4 +1,4 @@
|
||||
// Type definitions for material-ui v0.11.1
|
||||
// Type definitions for material-ui v0.12.1
|
||||
// Project: https://github.com/callemall/material-ui
|
||||
// Definitions by: Nathan Brown <https://github.com/ngbrown>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -72,7 +72,7 @@ declare module "material-ui" {
|
||||
export import TableHeaderColumn = __MaterialUI.Table.TableHeaderColumn; // require('material-ui/lib/table/table-header-column');
|
||||
export import TableRow = __MaterialUI.Table.TableRow; // require('material-ui/lib/table/table-row');
|
||||
export import TableRowColumn = __MaterialUI.Table.TableRowColumn; // require('material-ui/lib/table/table-row-column');
|
||||
export import Theme = __MaterialUI.Theme; // require('material-ui/lib/theme');
|
||||
export import ThemeWrapper = __MaterialUI.ThemeWrapper; // require('material-ui/lib/theme-wrapper');
|
||||
export import Toggle = __MaterialUI.Toggle; // require('material-ui/lib/toggle');
|
||||
export import TimePicker = __MaterialUI.TimePicker; // require('material-ui/lib/time-picker');
|
||||
export import TextField = __MaterialUI.TextField; // require('material-ui/lib/text-field');
|
||||
@@ -319,7 +319,7 @@ declare namespace __MaterialUI {
|
||||
minDate?: Date;
|
||||
mode?: string;
|
||||
onDismiss?: () => void;
|
||||
|
||||
|
||||
// e is always null
|
||||
onChange?: (e: any, d: Date) => void;
|
||||
|
||||
@@ -350,6 +350,7 @@ declare namespace __MaterialUI {
|
||||
}
|
||||
|
||||
export interface DialogAction {
|
||||
id?: string;
|
||||
text: string;
|
||||
ref?: string;
|
||||
|
||||
@@ -672,7 +673,7 @@ declare namespace __MaterialUI {
|
||||
labelPosition?: string;
|
||||
style?: React.CSSProperties;
|
||||
value?: string;
|
||||
|
||||
|
||||
onCheck?: (e: React.FormEvent, selected: string) => void;
|
||||
}
|
||||
export class RadioButton extends React.Component<RadioButtonProps, {}> {
|
||||
@@ -843,23 +844,29 @@ declare namespace __MaterialUI {
|
||||
desktopToolbarHeight?: number;
|
||||
}
|
||||
interface ThemePalette {
|
||||
primary1Color?: string,
|
||||
primary2Color?: string,
|
||||
primary3Color?: string,
|
||||
accent1Color?: string,
|
||||
accent2Color?: string,
|
||||
accent3Color?: string,
|
||||
textColor?: string,
|
||||
canvasColor?: string,
|
||||
borderColor?: string,
|
||||
disabledColor?: string
|
||||
primary1Color?: string;
|
||||
primary2Color?: string;
|
||||
primary3Color?: string;
|
||||
accent1Color?: string;
|
||||
accent2Color?: string;
|
||||
accent3Color?: string;
|
||||
textColor?: string;
|
||||
canvasColor?: string;
|
||||
borderColor?: string;
|
||||
disabledColor?: string;
|
||||
alternateTextColor?: string;
|
||||
}
|
||||
interface Theme {
|
||||
interface MuiTheme {
|
||||
rawTheme: RawTheme;
|
||||
static: boolean;
|
||||
appBar?: {
|
||||
color?: string,
|
||||
textColor?: string,
|
||||
height?: number
|
||||
},
|
||||
avatar?: {
|
||||
borderColor?: string;
|
||||
}
|
||||
button?: {
|
||||
height?: number,
|
||||
minWidth?: number,
|
||||
@@ -900,10 +907,16 @@ declare namespace __MaterialUI {
|
||||
disabledColor?: string,
|
||||
disabledTextColor?: string
|
||||
},
|
||||
inkBar?: {
|
||||
backgroundColor?: string;
|
||||
},
|
||||
leftNav?: {
|
||||
width?: number,
|
||||
color?: string,
|
||||
},
|
||||
listItem?: {
|
||||
nestedLevelDepth?: number;
|
||||
},
|
||||
menu?: {
|
||||
backgroundColor?: string,
|
||||
containerBackgroundColor?: string,
|
||||
@@ -943,6 +956,10 @@ declare namespace __MaterialUI {
|
||||
disabledColor?: string,
|
||||
disabledTextColor?: string
|
||||
},
|
||||
refreshIndicator?: {
|
||||
strokeColor?: string;
|
||||
loadingStrokeColor?: string;
|
||||
};
|
||||
slider?: {
|
||||
trackSize?: number,
|
||||
trackColor?: string,
|
||||
@@ -960,6 +977,38 @@ declare namespace __MaterialUI {
|
||||
backgroundColor?: string,
|
||||
actionColor?: string,
|
||||
},
|
||||
table?: {
|
||||
backgroundColor?: string;
|
||||
};
|
||||
tableHeader?: {
|
||||
borderColor?: string;
|
||||
};
|
||||
tableHeaderColumn?: {
|
||||
textColor?: string;
|
||||
};
|
||||
tableFooter?: {
|
||||
borderColor?: string;
|
||||
textColor?: string;
|
||||
};
|
||||
tableRow?: {
|
||||
hoverColor?: string;
|
||||
stripeColor?: string;
|
||||
selectedColor?: string;
|
||||
textColor?: string;
|
||||
borderColor?: string;
|
||||
};
|
||||
tableRowColumn?: {
|
||||
height?: number;
|
||||
spacing?: number;
|
||||
};
|
||||
timePicker?: {
|
||||
color?: string;
|
||||
textColor?: string;
|
||||
accentColor?: string;
|
||||
clockColor?: string;
|
||||
selectColor?: string;
|
||||
selectTextColor?: string;
|
||||
};
|
||||
toggle?: {
|
||||
thumbOnColor?: string,
|
||||
thumbOffColor?: string,
|
||||
@@ -979,36 +1028,38 @@ declare namespace __MaterialUI {
|
||||
iconColor?: string,
|
||||
separatorColor?: string,
|
||||
menuHoverColor?: string,
|
||||
}
|
||||
}
|
||||
interface CustomTheme {
|
||||
spacing?: Spacing;
|
||||
contentFontFamily?: string;
|
||||
getPalette(): ThemePalette;
|
||||
getComponentThemes(palette: ThemePalette, spacing: Spacing): Theme;
|
||||
}
|
||||
|
||||
export class ThemeManager {
|
||||
static: boolean;
|
||||
spacing: Spacing;
|
||||
palette: ThemePalette;
|
||||
component: Theme;
|
||||
contentFontFamily: string;
|
||||
template: CustomTheme;
|
||||
types: {
|
||||
LIGHT: CustomTheme;
|
||||
DARK: CustomTheme;
|
||||
};
|
||||
|
||||
getCurrentTheme(): ThemeManager;
|
||||
setContentFontFamily(newContentFontFamily: string): void;
|
||||
setTheme(newTheme: CustomTheme): void;
|
||||
setSpacing(newSpacing: Spacing): void;
|
||||
setPalette(newPalette: ThemePalette): void;
|
||||
setComponentThemes(overrides: Theme): void;
|
||||
setIsRtl(isRtl: boolean): void;
|
||||
tabs?: {
|
||||
backgroundColor?: string;
|
||||
};
|
||||
textField?: {
|
||||
textColor?: string;
|
||||
hintColor?: string;
|
||||
floatingLabelColor?: string;
|
||||
disabledTextColor?: string;
|
||||
errorColor?: string;
|
||||
focusColor?: string;
|
||||
backgroundColor?: string;
|
||||
borderColor?: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface RawTheme {
|
||||
spacing: Spacing;
|
||||
fontFamily?: string;
|
||||
palette: ThemePalette;
|
||||
}
|
||||
|
||||
export function ThemeDecorator(muiTheme: Styles.MuiTheme): <P>(Component: React.ComponentClass<P>) => React.ComponentClass<P>;
|
||||
|
||||
interface ThemeManager {
|
||||
getMuiTheme(rawTheme: RawTheme): MuiTheme;
|
||||
modifyRawThemeSpacing(muiTheme: MuiTheme, newSpacing: Spacing): MuiTheme;
|
||||
modifyRawThemePalette(muiTheme: MuiTheme, newPaletteKeys: ThemePalette): MuiTheme;
|
||||
modifyRawThemeFontFamily(muiTheme: MuiTheme, newFontFamily: string): MuiTheme;
|
||||
}
|
||||
export var ThemeManager: ThemeManager;
|
||||
|
||||
interface Transitions {
|
||||
easeOut(duration?: string, property?: string | string[], delay?: string, easeFunction?: string): string;
|
||||
create(duration?: string, property?: string, delay?: string, easeFunction?: string): string;
|
||||
@@ -1034,6 +1085,9 @@ declare namespace __MaterialUI {
|
||||
fontStyleButtonFontSize: number;
|
||||
}
|
||||
export var Typography: Typography;
|
||||
|
||||
export var DarkRawTheme: RawTheme;
|
||||
export var LightRawTheme: RawTheme;
|
||||
}
|
||||
|
||||
interface SnackbarProps extends React.Props<Snackbar> {
|
||||
@@ -1054,7 +1108,7 @@ declare namespace __MaterialUI {
|
||||
value?: string;
|
||||
selected?: boolean;
|
||||
width?: string;
|
||||
|
||||
|
||||
// Called by Tabs component
|
||||
onActive?: (tab: Tab) => void;
|
||||
|
||||
@@ -1167,11 +1221,10 @@ declare namespace __MaterialUI {
|
||||
}
|
||||
}
|
||||
|
||||
interface ThemeProps extends React.Props<Theme> {
|
||||
theme: Styles.CustomTheme;
|
||||
interface ThemeWrapperProps extends React.Props<ThemeWrapper> {
|
||||
theme: Styles.MuiTheme;
|
||||
}
|
||||
export class Theme extends React.Component<ThemeProps, {}> {
|
||||
static theme(customTheme: Styles.CustomTheme): <P>(Component: React.ComponentClass<P>) => React.ComponentClass<P>;
|
||||
export class ThemeWrapper extends React.Component<ThemeWrapperProps, {}> {
|
||||
}
|
||||
|
||||
interface ToggleProps extends CommonEnhancedSwitchProps<Toggle> {
|
||||
@@ -1632,6 +1685,9 @@ declare module 'material-ui/lib/styles/' {
|
||||
export import ThemeManager = __MaterialUI.Styles.ThemeManager; // require('material-ui/lib/styles/theme-manager');
|
||||
export import Transitions = __MaterialUI.Styles.Transitions; // require('material-ui/lib/styles/transitions');
|
||||
export import Typography = __MaterialUI.Styles.Typography; // require('material-ui/lib/styles/typography');
|
||||
export import LightRawTheme = __MaterialUI.Styles.LightRawTheme; // require('material-ui/lib/styles/raw-themes/light-raw-theme'),
|
||||
export import DarkRawTheme = __MaterialUI.Styles.DarkRawTheme; // require('material-ui/lib/styles/raw-themes/dark-raw-theme'),
|
||||
export import ThemeDecorator = __MaterialUI.Styles.ThemeDecorator; //require('material-ui/lib/styles/theme-decorator');
|
||||
}
|
||||
|
||||
declare module 'material-ui/lib/styles/auto-prefix' {
|
||||
@@ -1655,6 +1711,19 @@ declare module 'material-ui/lib/styles/typography' {
|
||||
export = __MaterialUI.Styles.Typography;
|
||||
}
|
||||
|
||||
declare module 'material-ui/lib/styles/raw-themes/light-raw-theme' {
|
||||
export = __MaterialUI.Styles.LightRawTheme;
|
||||
}
|
||||
|
||||
declare module 'material-ui/lib/styles/raw-themes/dark-raw-theme' {
|
||||
export = __MaterialUI.Styles.DarkRawTheme;
|
||||
}
|
||||
|
||||
declare module 'material-ui/lib/styles/theme-decorator' {
|
||||
export = __MaterialUI.Styles.ThemeDecorator;
|
||||
}
|
||||
|
||||
|
||||
declare module 'material-ui/lib/snackbar' {
|
||||
export = __MaterialUI.Snackbar;
|
||||
}
|
||||
@@ -1695,8 +1764,8 @@ declare module 'material-ui/lib/table/table-row-column' {
|
||||
export = __MaterialUI.Table.TableRowColumn;
|
||||
}
|
||||
|
||||
declare module 'material-ui/lib/theme' {
|
||||
export = __MaterialUI.Theme;
|
||||
declare module 'material-ui/lib/theme-wrapper' {
|
||||
export = __MaterialUI.ThemeWrapper;
|
||||
}
|
||||
|
||||
declare module 'material-ui/lib/toggle' {
|
||||
|
||||
Vendored
+1
-1
@@ -576,7 +576,7 @@ declare module Mongo {
|
||||
|
||||
var ObjectID: ObjectIDStatic;
|
||||
interface ObjectIDStatic {
|
||||
new(hexString: string): ObjectID;
|
||||
new(hexString?: string): ObjectID;
|
||||
}
|
||||
interface ObjectID {
|
||||
}
|
||||
|
||||
Vendored
+8
@@ -19,6 +19,13 @@ declare module moment {
|
||||
month?: number;
|
||||
/** Month */
|
||||
M?: number;
|
||||
|
||||
/** Week */
|
||||
weeks?: number;
|
||||
/** Week */
|
||||
week?: number;
|
||||
/** Week */
|
||||
w?: number;
|
||||
|
||||
/** Day/Date */
|
||||
days?: number;
|
||||
@@ -242,6 +249,7 @@ declare module moment {
|
||||
|
||||
from(f: Moment|string|number|Date|number[], suffix?: boolean): string;
|
||||
to(f: Moment|string|number|Date|number[], suffix?: boolean): string;
|
||||
toNow(withoutPrefix?: boolean): string;
|
||||
|
||||
diff(b: Moment): number;
|
||||
diff(b: Moment, unitOfTime: string): number;
|
||||
|
||||
@@ -23,6 +23,10 @@ class DialogTestController {
|
||||
name: "login-popup"
|
||||
});
|
||||
|
||||
loginDialog.closePromise.then((result) => {
|
||||
var val: any = result.value;
|
||||
});
|
||||
|
||||
if (loginDialog.id === "login-popup") {
|
||||
loginDialog.close("closing");
|
||||
}
|
||||
@@ -49,4 +53,4 @@ app.config((ngDialogProvider: angular.dialog.IDialogProvider) => {
|
||||
className: "flat-ui"
|
||||
})
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Vendored
+10
-5
@@ -26,14 +26,19 @@ declare module angular.dialog {
|
||||
interface IDialogOpenResult {
|
||||
id: string;
|
||||
close: (value?: string) => void;
|
||||
closePromise: IPromise<void>;
|
||||
closePromise: IPromise<IDialogClosePromise>;
|
||||
}
|
||||
|
||||
interface IDialogClosePromise {
|
||||
id: string;
|
||||
value: any;
|
||||
}
|
||||
|
||||
interface IDialogProvider extends angular.IServiceProvider {
|
||||
/**
|
||||
* Default options for the dialogs.
|
||||
* @param defaultOptions
|
||||
* @returns {}
|
||||
* @param defaultOptions
|
||||
* @returns {}
|
||||
*/
|
||||
setDefaults(defaultOptions: IDialogOptions): void;
|
||||
}
|
||||
@@ -44,7 +49,7 @@ declare module angular.dialog {
|
||||
interface IDialogScope extends angular.IScope {
|
||||
/**
|
||||
* This allows you to close dialog straight from handler in a popup element.
|
||||
* @param value Any value passed to this function will be attached to the object which resolves on the close promise for this dialog.
|
||||
* @param value Any value passed to this function will be attached to the object which resolves on the close promise for this dialog.
|
||||
* For dialogs opened with the openConfirm() method the value is used as the reject reason.
|
||||
*/
|
||||
closeThisDialog(value?: any): void;
|
||||
@@ -102,4 +107,4 @@ declare module angular.dialog {
|
||||
*/
|
||||
scope?: ng.IScope;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
This folder contains definitions for the node-uuid library in 3 flavors:
|
||||
|
||||
- node-uuid.d.ts
|
||||
- for use in node environment (default)
|
||||
- node-uuid-global.d.ts
|
||||
- for use in browser environment as a global variable
|
||||
- node-uuid-cjs.d.ts
|
||||
- for use in browser environment as a CommonJS module (using a loader such as webpack)
|
||||
Vendored
+52
@@ -0,0 +1,52 @@
|
||||
// Type definitions for node-uuid.js
|
||||
// Project: https://github.com/broofa/node-uuid
|
||||
// Definitions by: Jeff May <https://github.com/jeffmay>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/** Common definitions for all environments */
|
||||
declare namespace __NodeUUID {
|
||||
interface UUIDOptions {
|
||||
|
||||
/**
|
||||
* Node id as Array of 6 bytes (per 4.1.6).
|
||||
* Default: Randomly generated ID. See note 1.
|
||||
*/
|
||||
node?: any[];
|
||||
|
||||
/**
|
||||
* (Number between 0 - 0x3fff) RFC clock sequence.
|
||||
* Default: An internally maintained clockseq is used.
|
||||
*/
|
||||
clockseq?: number;
|
||||
|
||||
/**
|
||||
* (Number | Date) Time in milliseconds since unix Epoch.
|
||||
* Default: The current time is used.
|
||||
*/
|
||||
msecs?: number|Date;
|
||||
|
||||
/**
|
||||
* (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if msecs is unspecified.
|
||||
* Default: internal uuid counter is used, as per 4.2.1.2.
|
||||
*/
|
||||
nsecs?: number;
|
||||
}
|
||||
|
||||
interface UUID {
|
||||
v1(options?: UUIDOptions): string;
|
||||
v1(options?: UUIDOptions, buffer?: number[], offset?: number): number[];
|
||||
|
||||
v2(options?: UUIDOptions): string;
|
||||
v2(options?: UUIDOptions, buffer?: number[], offset?: number): number[];
|
||||
|
||||
v3(options?: UUIDOptions): string;
|
||||
v3(options?: UUIDOptions, buffer?: number[], offset?: number): number[];
|
||||
|
||||
v4(options?: UUIDOptions): string;
|
||||
v4(options?: UUIDOptions, buffer?: number[], offset?: number): number[];
|
||||
|
||||
parse(id: string, buffer?: number[], offset?: number): number[];
|
||||
|
||||
unparse(buffer: number[], offset?: number): string;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/// <reference path="node-uuid-cjs.d.ts" />
|
||||
|
||||
import nodeUuid = require('node-uuid');
|
||||
|
||||
var uid1: string = nodeUuid.v1();
|
||||
var uid2: string = nodeUuid.v2();
|
||||
var uid3: string = nodeUuid.v3();
|
||||
var uid4: string = nodeUuid.v4();
|
||||
|
||||
var options: __NodeUUID.UUIDOptions = {
|
||||
node: [],
|
||||
clockseq: 2,
|
||||
nsecs: 3,
|
||||
msecs: new Date()
|
||||
};
|
||||
|
||||
var padding: number[] = [0, 1, 2];
|
||||
|
||||
var offset: number = 15;
|
||||
|
||||
var buf : number[] = [];
|
||||
|
||||
nodeUuid.parse(uid4, buf, offset);
|
||||
nodeUuid.unparse(buf, offset);
|
||||
|
||||
var uid21: number[] = nodeUuid.v1(options, padding, offset);
|
||||
var uid22: number[] = nodeUuid.v2(options, padding, offset);
|
||||
var uid23: number[] = nodeUuid.v3(options, padding, offset);
|
||||
var uid24: number[] = nodeUuid.v4(options, padding, offset);
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// Type definitions for node-uuid.js
|
||||
// Project: https://github.com/broofa/node-uuid
|
||||
// Definitions by: Jeff May <https://github.com/jeffmay>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="./node-uuid-base.d.ts" />
|
||||
|
||||
/**
|
||||
* Expose as CommonJS module
|
||||
* For use in node environment or browser environment (using webpack or other module loaders)
|
||||
*/
|
||||
declare module "node-uuid" {
|
||||
var uuid: __NodeUUID.UUID;
|
||||
export = uuid;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/// <reference path="node-uuid-global.d.ts" />
|
||||
|
||||
var uid1: string = uuid.v1();
|
||||
var uid2: string = uuid.v2();
|
||||
var uid3: string = uuid.v3();
|
||||
var uid4: string = uuid.v4();
|
||||
|
||||
var options: __NodeUUID.UUIDOptions = {
|
||||
node: [],
|
||||
clockseq: 2,
|
||||
nsecs: 3,
|
||||
msecs: new Date()
|
||||
};
|
||||
|
||||
var padding: number[] = [0, 1, 2];
|
||||
|
||||
var offset: number = 15;
|
||||
|
||||
var buf : number[] = [];
|
||||
|
||||
uuid.parse(uid4, buf, offset);
|
||||
uuid.unparse(buf, offset);
|
||||
|
||||
var uid21: number[] = uuid.v1(options, padding, offset);
|
||||
var uid22: number[] = uuid.v2(options, padding, offset);
|
||||
var uid23: number[] = uuid.v3(options, padding, offset);
|
||||
var uid24: number[] = uuid.v4(options, padding, offset);
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// Type definitions for node-uuid.js
|
||||
// Project: https://github.com/broofa/node-uuid
|
||||
// Definitions by: Jeff May <https://github.com/jeffmay>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="./node-uuid-base.d.ts" />
|
||||
|
||||
/** Expose as global variable */
|
||||
declare var uuid: __NodeUUID.UUID;
|
||||
@@ -1,36 +1,36 @@
|
||||
/// <reference path="node-uuid.d.ts" />
|
||||
|
||||
import uuid = require('node-uuid');
|
||||
import nodeUuid = require('node-uuid');
|
||||
|
||||
var uid1: string = uuid.v1()
|
||||
var uid2: string = uuid.v2()
|
||||
var uid3: string = uuid.v3()
|
||||
var uid4: string = uuid.v4()
|
||||
var uid1: string = nodeUuid.v1();
|
||||
var uid2: string = nodeUuid.v2();
|
||||
var uid3: string = nodeUuid.v3();
|
||||
var uid4: string = nodeUuid.v4();
|
||||
|
||||
var options: UUIDOptions = {
|
||||
var options: __NodeUUID.UUIDOptions = {
|
||||
node: [],
|
||||
clockseq: 2,
|
||||
nsecs: 3,
|
||||
msecs: new Date()
|
||||
}
|
||||
};
|
||||
|
||||
var padding: number[] = [0, 1, 2]
|
||||
var padding: number[] = [0, 1, 2];
|
||||
|
||||
var offset: number = 15
|
||||
var offset: number = 15;
|
||||
|
||||
var buf : number[] = []
|
||||
var buf : number[] = [];
|
||||
|
||||
uuid.parse(uid4, buf, offset)
|
||||
uuid.unparse(buf, offset)
|
||||
nodeUuid.parse(uid4, buf, offset);
|
||||
nodeUuid.unparse(buf, offset);
|
||||
|
||||
var uid21: number[] = uuid.v1(options, padding, offset)
|
||||
var uid22: number[] = uuid.v2(options, padding, offset)
|
||||
var uid23: number[] = uuid.v3(options, padding, offset)
|
||||
var uid24: number[] = uuid.v4(options, padding, offset)
|
||||
var uid21: number[] = nodeUuid.v1(options, padding, offset);
|
||||
var uid22: number[] = nodeUuid.v2(options, padding, offset);
|
||||
var uid23: number[] = nodeUuid.v3(options, padding, offset);
|
||||
var uid24: number[] = nodeUuid.v4(options, padding, offset);
|
||||
|
||||
var buffer: Buffer;
|
||||
|
||||
var uid31: Buffer = uuid.v1(options, buffer, offset)
|
||||
var uid32: Buffer = uuid.v2(options, buffer, offset)
|
||||
var uid33: Buffer = uuid.v3(options, buffer, offset)
|
||||
var uid34: Buffer = uuid.v4(options, buffer, offset)
|
||||
var uid31: Buffer = nodeUuid.v1(options, buffer, offset);
|
||||
var uid32: Buffer = nodeUuid.v2(options, buffer, offset);
|
||||
var uid33: Buffer = nodeUuid.v3(options, buffer, offset);
|
||||
var uid34: Buffer = nodeUuid.v4(options, buffer, offset);
|
||||
|
||||
Vendored
+29
-48
@@ -4,60 +4,41 @@
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
/// <reference path="./node-uuid-base.d.ts" />
|
||||
/// <reference path="./node-uuid-cjs.d.ts" />
|
||||
|
||||
interface UUIDOptions {
|
||||
|
||||
/**
|
||||
* Definitions for use in node environment
|
||||
*
|
||||
* !! For browser enviroments, use node-uuid-global or node-uuid-cjs
|
||||
*/
|
||||
declare module __NodeUUID {
|
||||
/**
|
||||
* Node id as Array of 6 bytes (per 4.1.6).
|
||||
* Default: Randomly generated ID. See note 1.
|
||||
* Overloads for node environment
|
||||
* We need to duplicate some declarations because
|
||||
* interface merging doesn't work with overloads
|
||||
*/
|
||||
node?: any[]
|
||||
interface UUID {
|
||||
v1(options?: UUIDOptions): string;
|
||||
v1(options?: UUIDOptions, buffer?: number[], offset?: number): number[];
|
||||
v1(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer;
|
||||
|
||||
/**
|
||||
* (Number between 0 - 0x3fff) RFC clock sequence.
|
||||
* Default: An internally maintained clockseq is used.
|
||||
*/
|
||||
clockseq?: number
|
||||
v2(options?: UUIDOptions): string;
|
||||
v2(options?: UUIDOptions, buffer?: number[], offset?: number): number[];
|
||||
v2(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer;
|
||||
|
||||
/**
|
||||
* (Number | Date) Time in milliseconds since unix Epoch.
|
||||
* Default: The current time is used.
|
||||
*/
|
||||
msecs?: number|Date
|
||||
v3(options?: UUIDOptions): string;
|
||||
v3(options?: UUIDOptions, buffer?: number[], offset?: number): number[];
|
||||
v3(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer;
|
||||
|
||||
/**
|
||||
* (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if msecs is unspecified.
|
||||
* Default: internal uuid counter is used, as per 4.2.1.2.
|
||||
*/
|
||||
nsecs?: number
|
||||
}
|
||||
v4(options?: UUIDOptions): string;
|
||||
v4(options?: UUIDOptions, buffer?: number[], offset?: number): number[];
|
||||
v4(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer;
|
||||
|
||||
interface UUID {
|
||||
v1(options?: UUIDOptions): string
|
||||
v1(options?: UUIDOptions, buffer?: number[], offset?: number): number[]
|
||||
v1(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer
|
||||
parse(id: string, buffer?: number[], offset?: number): number[];
|
||||
parse(id: string, buffer?: Buffer, offset?: number): Buffer;
|
||||
|
||||
v2(options?: UUIDOptions): string
|
||||
v2(options?: UUIDOptions, buffer?: number[], offset?: number): number[]
|
||||
v2(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer
|
||||
|
||||
v3(options?: UUIDOptions): string
|
||||
v3(options?: UUIDOptions, buffer?: number[], offset?: number): number[]
|
||||
v3(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer
|
||||
|
||||
v4(options?: UUIDOptions): string
|
||||
v4(options?: UUIDOptions, buffer?: number[], offset?: number): number[]
|
||||
v4(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer
|
||||
|
||||
parse(id: string, buffer?: number[], offset?: number): number[]
|
||||
parse(id: string, buffer?: Buffer, offset?: number): Buffer
|
||||
|
||||
unparse(buffer: number[], offset?: number): string
|
||||
unparse(buffer: Buffer, offset?: number): string
|
||||
}
|
||||
|
||||
declare var uuid: UUID;
|
||||
|
||||
declare module "node-uuid" {
|
||||
export = uuid;
|
||||
unparse(buffer: number[], offset?: number): string;
|
||||
unparse(buffer: Buffer, offset?: number): string;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/// <reference path="node-validator.d.ts"/>
|
||||
|
||||
import { run, isObject, isString, isIsoDate, isArray } from 'node-validator';
|
||||
|
||||
let checkChild = isObject()
|
||||
.withRequired('prop', isString({ regex: /^[abc]+$/ }));
|
||||
|
||||
let check = isObject()
|
||||
.withRequired('_id', isString({ regex: /^[abc]+$/ }))
|
||||
.withOptional('date', isIsoDate())
|
||||
.withOptional('children', isArray(checkChild, {min: 1}));
|
||||
|
||||
let toValidate = {
|
||||
_id: 'abababa',
|
||||
date: '2013-10-24',
|
||||
children: [{
|
||||
prop: 'zxzx'
|
||||
}]
|
||||
};
|
||||
|
||||
run(check, toValidate, function(errorCount, errors) {
|
||||
|
||||
});
|
||||
Vendored
+64
@@ -0,0 +1,64 @@
|
||||
// Type definitions for node-validator
|
||||
// Project: https://www.npmjs.com/package/node-validator
|
||||
// Definitions by: Ken Gorab <https://github.com/kengorab>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module ValidatorOptions {
|
||||
interface IsStringOptions {
|
||||
regex?: RegExp,
|
||||
message?: String
|
||||
}
|
||||
|
||||
interface IsNumberOptions {
|
||||
min?: Number,
|
||||
max?: Number
|
||||
}
|
||||
|
||||
interface IsDateOptions {
|
||||
format?: String,
|
||||
message?: String
|
||||
}
|
||||
|
||||
type Options = IsStringOptions | IsNumberOptions | IsDateOptions;
|
||||
}
|
||||
|
||||
declare module Validator {
|
||||
type ValidateFn = (value: any, onError: (message: String, childName: String, childValie: any) => void) => void;
|
||||
|
||||
interface Validatable {
|
||||
validate: ValidateFn
|
||||
}
|
||||
|
||||
interface IsObjectValidator extends Validatable {
|
||||
withRequired: (name: String, validator: Validatable) => IsObjectValidator,
|
||||
withOptional: (name: String, validator: Validatable) => IsObjectValidator,
|
||||
custom: (customValidator: Validatable) => IsObjectValidator,
|
||||
validate: ValidateFn
|
||||
}
|
||||
|
||||
function express(validator: Validatable): any;
|
||||
function bodyValidator(validator: Validatable): any;
|
||||
function expressParams(validator: Validatable): any;
|
||||
function paramsValidator(validator: Validatable): any;
|
||||
function expressQuery(validator: Validatable): any;
|
||||
function queryValidator(validator: Validatable): any;
|
||||
|
||||
function run(validator: Validatable, value: any, callback: (errorCount: Number, errors: Array<any>) => void): void;
|
||||
|
||||
function isObject(): IsObjectValidator;
|
||||
function isString(options?: ValidatorOptions.IsStringOptions): Validatable;
|
||||
function isStringOrNull(options?: ValidatorOptions.IsStringOptions): Validatable;
|
||||
function isBoolean(): Validatable;
|
||||
function isNumber(options?: ValidatorOptions.IsNumberOptions): Validatable;
|
||||
function isInteger(options?: ValidatorOptions.IsNumberOptions): Validatable;
|
||||
function isDate(options?: ValidatorOptions.IsDateOptions): Validatable;
|
||||
function isIsoDate(options?: ValidatorOptions.IsDateOptions): Validatable;
|
||||
function isIsoDateTime(options?: ValidatorOptions.IsDateOptions): Validatable;
|
||||
|
||||
function isArray(validator?: Validatable, options?: ValidatorOptions.Options): Validatable;
|
||||
function isAnyObject(): IsObjectValidator;
|
||||
}
|
||||
|
||||
declare module 'node-validator' {
|
||||
export = Validator;
|
||||
}
|
||||
+28
-1
@@ -13,6 +13,7 @@ import * as dgram from "dgram";
|
||||
import * as querystring from "querystring";
|
||||
import * as path from "path";
|
||||
import * as readline from "readline";
|
||||
import * as childProcess from "child_process";
|
||||
|
||||
assert(1 + 1 - 2 === 0, "The universe isn't how it should.");
|
||||
|
||||
@@ -34,7 +35,7 @@ assert.doesNotThrow(() => {
|
||||
fs.writeFile("thebible.txt",
|
||||
"Do unto others as you would have them do unto you.",
|
||||
assert.ifError);
|
||||
|
||||
|
||||
fs.write(1234, "test");
|
||||
|
||||
fs.writeFile("Harry Potter",
|
||||
@@ -87,6 +88,25 @@ function bufferTests() {
|
||||
console.log(Buffer.byteLength('xyz123', 'ascii'));
|
||||
var result1 = Buffer.concat([utf8Buffer, base64Buffer]);
|
||||
var result2 = Buffer.concat([utf8Buffer, base64Buffer], 9999999);
|
||||
|
||||
// Test that TS 1.6 works with the 'as Buffer' annotation
|
||||
// on isBuffer.
|
||||
var a: Buffer | number;
|
||||
a = new Buffer(10);
|
||||
if (Buffer.isBuffer(a)) {
|
||||
a.writeUInt8(3, 4);
|
||||
}
|
||||
|
||||
// write* methods return offsets.
|
||||
var b = new Buffer(16);
|
||||
var result: number = b.writeUInt32LE(0, 0);
|
||||
result = b.writeUInt16LE(0, 4);
|
||||
result = b.writeUInt8(0, 6);
|
||||
result = b.writeInt8(0, 7);
|
||||
result = b.writeDoubleLE(0, 8);
|
||||
|
||||
// fill returns the input buffer.
|
||||
b.fill('a').fill('b');
|
||||
}
|
||||
|
||||
|
||||
@@ -382,3 +402,10 @@ rl.prompt(true);
|
||||
rl.question("do you like typescript?", function(answer: string) {
|
||||
rl.close();
|
||||
});
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
/// Child Process tests: https://nodejs.org/api/child_process.html ///
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
childProcess.exec("echo test");
|
||||
childProcess.spawnSync("echo test");
|
||||
|
||||
Vendored
+36
-16
@@ -119,7 +119,7 @@ declare var Buffer: {
|
||||
*
|
||||
* @param obj object to test.
|
||||
*/
|
||||
isBuffer(obj: any): boolean;
|
||||
isBuffer(obj: any): obj is Buffer;
|
||||
/**
|
||||
* Returns true if {encoding} is a valid encoding argument.
|
||||
* Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
|
||||
@@ -377,21 +377,21 @@ interface NodeBuffer {
|
||||
readFloatBE(offset: number, noAssert?: boolean): number;
|
||||
readDoubleLE(offset: number, noAssert?: boolean): number;
|
||||
readDoubleBE(offset: number, noAssert?: boolean): number;
|
||||
writeUInt8(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeUInt16LE(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeUInt16BE(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeUInt32LE(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeUInt32BE(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeInt8(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeInt16LE(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeInt16BE(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeInt32LE(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeInt32BE(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeFloatLE(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeFloatBE(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeDoubleLE(value: number, offset: number, noAssert?: boolean): void;
|
||||
writeDoubleBE(value: number, offset: number, noAssert?: boolean): void;
|
||||
fill(value: any, offset?: number, end?: number): void;
|
||||
writeUInt8(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeInt8(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
|
||||
writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
|
||||
fill(value: any, offset?: number, end?: number): Buffer;
|
||||
}
|
||||
|
||||
/************************************************
|
||||
@@ -868,6 +868,26 @@ declare module "child_process" {
|
||||
env?: any;
|
||||
encoding?: string;
|
||||
}): ChildProcess;
|
||||
export function spawnSync(command: string, args?: string[], options?: {
|
||||
cwd?: string;
|
||||
input?: string | Buffer;
|
||||
stdio?: any;
|
||||
env?: any;
|
||||
uid?: number;
|
||||
gid?: number;
|
||||
timeout?: number;
|
||||
maxBuffer?: number;
|
||||
killSignal?: string;
|
||||
encoding?: string;
|
||||
}): {
|
||||
pid: number;
|
||||
output: string[];
|
||||
stdout: string | Buffer;
|
||||
stderr: string | Buffer;
|
||||
status: number;
|
||||
signal: string;
|
||||
error: Error;
|
||||
};
|
||||
export function execSync(command: string, options?: {
|
||||
cwd?: string;
|
||||
input?: string|Buffer;
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
/// <reference path="obelisk.js.d.ts"/>
|
||||
|
||||
function test_brick() {
|
||||
var canvas = <HTMLCanvasElement>document.getElementById('canvas-demo');
|
||||
|
||||
var point = new obelisk.Point(500, 20);
|
||||
var pixelView = new obelisk.PixelView(canvas, point);
|
||||
|
||||
var color = new obelisk.SideColor().getByInnerColor(obelisk.ColorPattern.PINK);
|
||||
var dimension = new obelisk.BrickDimension(300, 400);
|
||||
var brick = new obelisk.Brick(dimension, color);
|
||||
|
||||
pixelView.renderObject(brick);
|
||||
var p3D = new obelisk.Point3D(20, 20, 0);
|
||||
pixelView.renderObject(brick, p3D);
|
||||
}
|
||||
|
||||
function test_cube() {
|
||||
var canvas = <HTMLCanvasElement>document.getElementById('canvas-demo');
|
||||
|
||||
var point = new obelisk.Point(500, 240);
|
||||
var pixelView = new obelisk.PixelView(canvas, point);
|
||||
|
||||
var dimension = new obelisk.CubeDimension(120, 200, 60);
|
||||
var color = new obelisk.CubeColor().getByHorizontalColor(obelisk.ColorPattern.GRAY);
|
||||
var cube = new obelisk.Cube(dimension, color, false);
|
||||
pixelView.renderObject(cube);
|
||||
}
|
||||
|
||||
function test_pyramid() {
|
||||
var canvas = <HTMLCanvasElement>document.getElementById('canvas-demo');
|
||||
|
||||
var point = new obelisk.Point(500, 240);
|
||||
var pixelView = new obelisk.PixelView(canvas, point);
|
||||
|
||||
var dimension = new obelisk.PyramidDimension(120);
|
||||
var color = new obelisk.PyramidColor().getByRightColor(obelisk.ColorPattern.YELLOW);
|
||||
var pyramid = new obelisk.Pyramid(dimension, color);
|
||||
pixelView.renderObject(pyramid);
|
||||
}
|
||||
|
||||
function test_side() {
|
||||
var canvas = <HTMLCanvasElement>document.getElementById('canvas-demo');
|
||||
|
||||
var point = new obelisk.Point(500, 200);
|
||||
var pixelView = new obelisk.PixelView(canvas, point);
|
||||
|
||||
var colorX = new obelisk.SideColor().getByInnerColor(obelisk.ColorPattern.PINK);
|
||||
var colorY = new obelisk.SideColor().getByInnerColor(obelisk.ColorPattern.GRASS_GREEN);
|
||||
var dimensionX = new obelisk.SideXDimension(300, 100);
|
||||
var dimensionY = new obelisk.SideYDimension(300, 100);
|
||||
var sideX = new obelisk.SideX(dimensionX, colorX);
|
||||
var sideY = new obelisk.SideY(dimensionY, colorY);
|
||||
|
||||
pixelView.renderObject(sideX);
|
||||
|
||||
var p3DY = new obelisk.Point3D(0, 30, 0);
|
||||
pixelView.renderObject(sideY, p3DY);
|
||||
}
|
||||
|
||||
function test_slope() {
|
||||
var canvas = <HTMLCanvasElement>document.getElementById('canvas-demo');
|
||||
|
||||
var point = new obelisk.Point(550, 50);
|
||||
var pixelView = new obelisk.PixelView(canvas, point);
|
||||
|
||||
var colorBrick = new obelisk.SideColor().getByInnerColor(obelisk.ColorPattern.GRAY);
|
||||
var dimension = new obelisk.BrickDimension(150, 400);
|
||||
var brick = new obelisk.Brick(dimension, colorBrick);
|
||||
|
||||
pixelView.renderObject(brick);
|
||||
|
||||
var color = new obelisk.SlopeColor().getByHorizontalColor(obelisk.ColorPattern.GRAY);
|
||||
|
||||
var dimensionNorth = new obelisk.SlopeDimension(50, 40);
|
||||
var dimensionEast = new obelisk.SlopeDimension(40, 50);
|
||||
var dimensionSouth = new obelisk.SlopeDimension(50, 40);
|
||||
var dimensionWest = new obelisk.SlopeDimension(40, 50);
|
||||
|
||||
var slopeNorth = new obelisk.SlopeNorth(dimensionNorth, color, false);
|
||||
var slopeEast = new obelisk.SlopeEast(dimensionEast, color);
|
||||
var slopeSouth = new obelisk.SlopeSouth(dimensionSouth, color);
|
||||
var slopeWest = new obelisk.SlopeWest(dimensionWest, color);
|
||||
|
||||
var p3dNorth = new obelisk.Point3D(50, 50, 0);
|
||||
var p3dEast = new obelisk.Point3D(50, 200, 0);
|
||||
var p3dSouth = new obelisk.Point3D(50, 125, 0);
|
||||
var p3dWest = new obelisk.Point3D(50, 275, 0);
|
||||
|
||||
pixelView.renderObject(slopeNorth, p3dNorth);
|
||||
pixelView.renderObject(slopeSouth, p3dSouth);
|
||||
pixelView.renderObject(slopeEast, p3dEast);
|
||||
pixelView.renderObject(slopeWest, p3dWest);
|
||||
|
||||
pixelView.clear();
|
||||
}
|
||||
|
||||
function test_gif_rendering() {
|
||||
var WIDTH = 64;
|
||||
var HEIGHT = 28;
|
||||
|
||||
var img = <HTMLCanvasElement>document.getElementById('animation');
|
||||
var ctx = <CanvasRenderingContext2D>document.createElement('canvas').getContext("2d");
|
||||
var canvas = <HTMLCanvasElement>document.getElementById('canvas-uncle');
|
||||
|
||||
var stack: any[] = [];
|
||||
var size = 8;
|
||||
var point = new obelisk.Point(50, 120);
|
||||
var pixelView = new obelisk.PixelView(canvas, point);
|
||||
|
||||
function draw() {
|
||||
ctx.drawImage(img, 0, 0, WIDTH, HEIGHT);
|
||||
var imgData = ctx.getImageData(0, 0, WIDTH, HEIGHT);
|
||||
pixelView.clear();
|
||||
for (var y = HEIGHT - 1; y >= 0; y--) {
|
||||
for (var x = 0; x < WIDTH - 1; x++) {
|
||||
var pixelColor = obelisk.CanvasTool.getPixel(imgData, x, y);
|
||||
if (pixelColor !== 0xFFFFFF) {
|
||||
var cube: obelisk.Cube;
|
||||
var flag = false;
|
||||
for (var i in stack) {
|
||||
if (stack[i][1] === pixelColor) {
|
||||
cube = stack[i][0];
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
var fixedColor = obelisk.ColorGeom.applyBrightness(pixelColor, 50);
|
||||
var color = new obelisk.CubeColor().getByHorizontalColor(fixedColor);
|
||||
var dimension = new obelisk.CubeDimension(size, size + 2, size);
|
||||
cube = new obelisk.Cube(dimension, color, false);
|
||||
stack.push([cube, pixelColor]);
|
||||
}
|
||||
var p3d = new obelisk.Point3D(x * (size - 2), 0, (HEIGHT - 1 - y) * (size));
|
||||
pixelView.renderObject(cube, p3d);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
window.setInterval(draw, 50);
|
||||
|
||||
var canvasFloor = <HTMLCanvasElement>document.getElementById('canvas-floor');
|
||||
var pixelViewFloor = new obelisk.PixelView(canvasFloor, point);
|
||||
var floorDimension = new obelisk.CubeDimension((size - 2) * (WIDTH + 2), (size - 2) * 9, size);
|
||||
var floor = new obelisk.Cube(floorDimension, new obelisk.CubeColor(), false);
|
||||
pixelViewFloor.renderObject(floor, new obelisk.Point3D(-20, -30, 0));
|
||||
}
|
||||
Vendored
+228
@@ -0,0 +1,228 @@
|
||||
// Type definitions for obelisk.js v1.1.0
|
||||
// Project: https://github.com/nosir/obelisk.js/
|
||||
// Definitions by: Brian Drupieski <https://github.com/bdrupieski/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module obelisk {
|
||||
|
||||
export var version: string;
|
||||
export var author: string;
|
||||
|
||||
export class Matrix {
|
||||
constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number);
|
||||
|
||||
a: number;
|
||||
b: number;
|
||||
c: number;
|
||||
d: number;
|
||||
tx: number;
|
||||
ty: number;
|
||||
}
|
||||
|
||||
export class Point {
|
||||
constructor(x?: number, y?: number);
|
||||
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export class Point3D {
|
||||
constructor(x?: number, y?: number, z?: number);
|
||||
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
|
||||
toGlobalCoordinates(offset?: obelisk.Point): obelisk.Point;
|
||||
}
|
||||
|
||||
export class ColorGeom {
|
||||
static get32(color: number): number;
|
||||
static applyBrightness(color: number, brightness: number, highlight?: boolean): number;
|
||||
}
|
||||
|
||||
export class ColorPattern {
|
||||
static GRASS_GREEN: number;
|
||||
static YELLOW: number;
|
||||
static WINE_RED: number;
|
||||
static PINK: number;
|
||||
static PURPLE: number;
|
||||
static BLUE: number;
|
||||
static GRAY: number;
|
||||
static BLACK: number;
|
||||
static FINE_COLORS: number[];
|
||||
|
||||
static getRandomComfortableColor(): number;
|
||||
}
|
||||
|
||||
export class CanvasTool {
|
||||
static getPixel(imageData: ImageData, x: number, y: number): number;
|
||||
}
|
||||
|
||||
export class CanvasManager {
|
||||
static defaultCanvas: HTMLCanvasElement;
|
||||
|
||||
static getDefaultCanvas(): HTMLCanvasElement;
|
||||
static getNewCanvas(): HTMLCanvasElement;
|
||||
}
|
||||
|
||||
export class AbstractColor {
|
||||
constructor();
|
||||
|
||||
inner: number;
|
||||
border: number;
|
||||
borderHighlight: number;
|
||||
left: number;
|
||||
right: number;
|
||||
horizontal: number;
|
||||
leftSlope: number;
|
||||
rightSlope: number;
|
||||
}
|
||||
|
||||
export class CubeColor extends AbstractColor {
|
||||
constructor(border?: number, borderHighlight?: number, left?: number, right?: number, horizontal?: number);
|
||||
|
||||
BRIGHTNESS_GAIN: number;
|
||||
|
||||
getByHorizontalColor(horizontal: number): CubeColor;
|
||||
}
|
||||
|
||||
export class PyramidColor extends AbstractColor {
|
||||
constructor(border?: number, borderHighlight?: number, left?: number, right?: number);
|
||||
|
||||
BRIGHTNESS_GAIN: number;
|
||||
|
||||
getByRightColor(horizontal: number): PyramidColor;
|
||||
}
|
||||
|
||||
export class SideColor extends AbstractColor {
|
||||
constructor(border?: number, inner?: number);
|
||||
|
||||
BRIGHTNESS_GAIN: number;
|
||||
|
||||
getByInnerColor(inner: number): SideColor;
|
||||
}
|
||||
|
||||
export class SlopeColor extends AbstractColor {
|
||||
constructor(border?: number, borderHighlight?: number, left?: number, right?: number, leftSlope?: number, rightSlope?: number);
|
||||
|
||||
BRIGHTNESS_GAIN: number;
|
||||
|
||||
getByHorizontalColor(horizontal: number): SlopeColor;
|
||||
}
|
||||
|
||||
export class AbstractDimension {
|
||||
constructor();
|
||||
|
||||
xAxis: number;
|
||||
yAxis: number;
|
||||
zAxis: number;
|
||||
tall: boolean;
|
||||
}
|
||||
|
||||
export class BrickDimension extends AbstractDimension {
|
||||
constructor(xAxis?: number, yAxis?: number);
|
||||
}
|
||||
|
||||
export class CubeDimension extends AbstractDimension {
|
||||
constructor(xAxis?: number, yAxis?: number, zAxis?: number);
|
||||
}
|
||||
|
||||
export class PyramidDimension extends AbstractDimension {
|
||||
constructor(axis?: number, tall?: boolean);
|
||||
}
|
||||
|
||||
export class SideXDimension extends AbstractDimension {
|
||||
constructor(xAxis?: number, zAxis?: number);
|
||||
}
|
||||
|
||||
export class SideYDimension extends AbstractDimension {
|
||||
constructor(yAxis?: number, zAxis?: number);
|
||||
}
|
||||
|
||||
export class SlopeDimension extends AbstractDimension {
|
||||
constructor(xAxis?: number, yAxis?: number);
|
||||
}
|
||||
|
||||
export class BitmapData {
|
||||
constructor(w: number, h: number, useDefaultCanvas?: boolean);
|
||||
|
||||
imageData: ImageData;
|
||||
canvas: HTMLCanvasElement;
|
||||
context : CanvasRenderingContext2D;
|
||||
|
||||
setPixel(posX: number, posY: number, color: number): void;
|
||||
setPixelByIndex(index: number, color: number): void;
|
||||
checkPixelAvailable(x: number, y: number): boolean;
|
||||
floodFill(posX: number, posY: number, color: number): void;
|
||||
}
|
||||
|
||||
export class PixelObject {
|
||||
constructor(primitive: AbstractPrimitive, point3D?: Point3D);
|
||||
|
||||
x: number;
|
||||
y: number;
|
||||
canvas: HTMLCanvasElement;
|
||||
}
|
||||
|
||||
export class PixelView {
|
||||
constructor(canvas: HTMLCanvasElement, point?: Point);
|
||||
|
||||
canvas: HTMLCanvasElement;
|
||||
context: CanvasRenderingContext2D;
|
||||
point: Point;
|
||||
|
||||
renderObject(primitive: AbstractPrimitive, point3D?: Point3D): void;
|
||||
clear(): void;
|
||||
}
|
||||
|
||||
export class AbstractPrimitive {
|
||||
constructor();
|
||||
|
||||
canvas: HTMLCanvasElement;
|
||||
w: number;
|
||||
h: number;
|
||||
dimension: AbstractDimension;
|
||||
color: AbstractColor;
|
||||
border: boolean;
|
||||
bitmapData: BitmapData;
|
||||
useDefaultCanvas: boolean;
|
||||
matrix: Matrix;
|
||||
}
|
||||
|
||||
export class Brick extends AbstractPrimitive {
|
||||
constructor(dimension?: BrickDimension, color?: SideColor, border?: boolean, useDefaultCanvas?: boolean);
|
||||
}
|
||||
|
||||
export class Cube extends AbstractPrimitive {
|
||||
constructor(dimension?: CubeDimension, color?: CubeColor, border?: boolean, useDefaultCanvas?: boolean);
|
||||
}
|
||||
|
||||
export class Pyramid extends AbstractPrimitive {
|
||||
constructor(dimension?: PyramidDimension, color?: PyramidColor, border?: boolean, useDefaultCanvas?: boolean);
|
||||
}
|
||||
|
||||
export class SideX extends AbstractPrimitive {
|
||||
constructor(dimension?: SideXDimension, color?: SideColor, border?: boolean, useDefaultCanvas?: boolean);
|
||||
}
|
||||
|
||||
export class SideY extends AbstractPrimitive {
|
||||
constructor(dimension?: SideYDimension, color?: SideColor, border?: boolean, useDefaultCanvas?: boolean);
|
||||
}
|
||||
|
||||
export class SlopeEast extends AbstractPrimitive {
|
||||
constructor(dimension?: SlopeDimension, color?: SlopeColor, border?: boolean, useDefaultCanvas?: boolean);
|
||||
}
|
||||
|
||||
export class SlopeNorth extends AbstractPrimitive {
|
||||
constructor(dimension?: SlopeDimension, color?: SlopeColor, border?: boolean, useDefaultCanvas?: boolean);
|
||||
}
|
||||
|
||||
export class SlopeSouth extends AbstractPrimitive {
|
||||
constructor(dimension?: SlopeDimension, color?: SlopeColor, border?: boolean, useDefaultCanvas?: boolean);
|
||||
}
|
||||
|
||||
export class SlopeWest extends AbstractPrimitive {
|
||||
constructor(dimension?: SlopeDimension, color?: SlopeColor, border?: boolean, useDefaultCanvas?: boolean);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
/// <reference path="openpgp.d.ts" />
|
||||
|
||||
// Open PGP Sample codes
|
||||
|
||||
var options: openpgp.KeyOptions = {
|
||||
numBits: 2048,
|
||||
userId: 'Jon Smith <jon.smith@example.org>',
|
||||
passphrase: 'super long and hard to guess secret'
|
||||
};
|
||||
|
||||
openpgp.generateKeyPair(options).then(function (keypair) {
|
||||
// success
|
||||
var privkey = keypair.privateKeyArmored;
|
||||
var pubkey = keypair.publicKeyArmored;
|
||||
}).catch(function (error) {
|
||||
// failure
|
||||
});
|
||||
|
||||
|
||||
var spubkey = '-----BEGIN PGP PUBLIC KEY BLOCK ... END PGP PUBLIC KEY BLOCK-----';
|
||||
var publicKey = openpgp.key.readArmored(spubkey);
|
||||
|
||||
openpgp.encryptMessage(publicKey.keys, 'Hello, World!').then(function (pgpMessage) {
|
||||
// success
|
||||
}).catch(function (error) {
|
||||
// failure
|
||||
});
|
||||
|
||||
|
||||
|
||||
var sprivkey = '-----BEGIN PGP PRIVATE KEY BLOCK ... END PGP PRIVATE KEY BLOCK-----';
|
||||
var privateKey = openpgp.key.readArmored(sprivkey).keys[0];
|
||||
privateKey.decrypt('passphrase');
|
||||
|
||||
var pgpMessageStr = '-----BEGIN PGP MESSAGE ... END PGP MESSAGE-----';
|
||||
var pgpMessage = openpgp.message.readArmored(pgpMessageStr);
|
||||
|
||||
openpgp.decryptMessage(privateKey, pgpMessage).then(function (plaintext) {
|
||||
// success
|
||||
}).catch(function (error) {
|
||||
// failure
|
||||
});
|
||||
|
||||
|
||||
// Open PGP Tests
|
||||
|
||||
|
||||
var keyoptions: openpgp.KeyOptions;
|
||||
var key= openpgp.key.generate(keyoptions);
|
||||
var keys: Array<openpgp.key.Key>;
|
||||
var message = openpgp.message.readArmored("");
|
||||
var cleartextmessage = openpgp.cleartext.readArmored("");
|
||||
var mpi: openpgp.crypto.Mpi;
|
||||
var mpis: Array<openpgp.crypto.Mpi>;
|
||||
|
||||
|
||||
openpgp.decryptAndVerifyMessage(key, key, "").then();
|
||||
openpgp.decryptAndVerifyMessage(key, keys, "").then();
|
||||
|
||||
openpgp.decryptMessage(key, message).then();
|
||||
|
||||
openpgp.encryptMessage(key, "").then();
|
||||
openpgp.encryptMessage(keys, "").then();
|
||||
|
||||
openpgp.generateKeyPair(keyoptions).then(function (keypair) {
|
||||
key = keypair.key;
|
||||
});
|
||||
|
||||
openpgp.signAndEncryptMessage(key, key, "").then();
|
||||
openpgp.signAndEncryptMessage(keys, key, "").then();
|
||||
|
||||
openpgp.signClearMessage(key, "").then();
|
||||
openpgp.signClearMessage(keys, "").then();
|
||||
|
||||
openpgp.verifyClearSignedMessage(key, cleartextmessage);
|
||||
openpgp.verifyClearSignedMessage(keys, cleartextmessage);
|
||||
|
||||
openpgp.armor.armor(openpgp.enums.armor.message, {}, 0, 1);
|
||||
openpgp.armor.dearmor("");
|
||||
|
||||
openpgp.cleartext.readArmored("");
|
||||
|
||||
openpgp.crypto.generateSessionKey(openpgp.enums.symmetric.aes128);
|
||||
openpgp.crypto.getPrefixRandom(openpgp.enums.symmetric.aes128);
|
||||
openpgp.crypto.getPrivateMpiCount(openpgp.enums.symmetric.aes128);
|
||||
openpgp.crypto.publicKeyDecrypt(openpgp.enums.publicKey.rsa_encrypt, mpis, mpis, mpi);
|
||||
openpgp.crypto.publicKeyEncrypt(openpgp.enums.publicKey.rsa_encrypt, mpis, mpi);
|
||||
|
||||
openpgp.crypto.cfb.decrypt("", "", "", true);
|
||||
openpgp.crypto.cfb.encrypt("", "", "", "", true);
|
||||
openpgp.crypto.cfb.mdc({}, "", "");
|
||||
|
||||
openpgp.crypto.hash.digest(openpgp.enums.hash.md5, "");
|
||||
openpgp.crypto.hash.getHashByteLength(openpgp.enums.hash.md5);
|
||||
|
||||
openpgp.crypto.random.getRandomBigInteger(0);
|
||||
openpgp.crypto.random.getRandomBytes(0);
|
||||
openpgp.crypto.random.getRandomValues(openpgp.util.str2Uint8Array(""));
|
||||
openpgp.crypto.random.getSecureRandom(0, 1);
|
||||
|
||||
openpgp.crypto.signature.sign(openpgp.enums.hash.md5, openpgp.enums.publicKey.rsa_encrypt, mpis, mpis, "");
|
||||
openpgp.crypto.signature.verify(openpgp.enums.publicKey.rsa_encrypt, openpgp.enums.hash.md5, mpis, mpis, "");
|
||||
|
||||
openpgp.key.generate(keyoptions);
|
||||
openpgp.key.readArmored("");
|
||||
|
||||
openpgp.message.fromBinary("");
|
||||
openpgp.message.fromText("");
|
||||
openpgp.message.readArmored("");
|
||||
|
||||
openpgp.packet.fromStructuredClone({});
|
||||
openpgp.packet.newPacketFromTag("");
|
||||
|
||||
openpgp.util.bin2str([0, 1]);
|
||||
openpgp.util.calc_checksum("");
|
||||
openpgp.util.decode_utf8("");
|
||||
openpgp.util.encode_utf8("");
|
||||
openpgp.util.get_hashAlgorithmString();
|
||||
openpgp.util.getWebCrypto();
|
||||
openpgp.util.hex2bin("");
|
||||
openpgp.util.hexidump("");
|
||||
openpgp.util.hexstrdump("");
|
||||
openpgp.util.print_debug("");
|
||||
openpgp.util.print_debug_hexstr_dump("");
|
||||
openpgp.util.shiftRight("", 1);
|
||||
openpgp.util.str2bin("");
|
||||
openpgp.util.str2Uint8Array("");
|
||||
openpgp.util.Uint8Array2str(openpgp.util.str2Uint8Array(""));
|
||||
Vendored
+552
@@ -0,0 +1,552 @@
|
||||
// Type definitions for openpgpjs
|
||||
// Project: http://openpgpjs.org/
|
||||
// Definitions by: Guillaume Lacasa <https://blog.lacasa.fr>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../es6-promise/es6-promise.d.ts" />
|
||||
|
||||
declare module openpgp {
|
||||
|
||||
interface KeyPair {
|
||||
key: key.Key,
|
||||
privateKeyArmored: string,
|
||||
publicKeyArmored: string
|
||||
}
|
||||
|
||||
interface KeyOptions {
|
||||
keyType?: enums.publicKey,
|
||||
numBits: number,
|
||||
userId: string,
|
||||
passphrase: string,
|
||||
unlocked?: boolean
|
||||
}
|
||||
|
||||
interface Keyid {
|
||||
bytes: String,
|
||||
}
|
||||
|
||||
interface Signature {
|
||||
keyid: Keyid,
|
||||
valid: boolean
|
||||
}
|
||||
|
||||
interface VerifiedMessage {
|
||||
text: String,
|
||||
signatures: Array<Signature>
|
||||
}
|
||||
|
||||
/** Decrypts message and verifies signatures
|
||||
|
||||
@param privateKey private key with decrypted secret key data
|
||||
@param publicKeys array of keys to verify signatures
|
||||
@param msg the message object with signed and encrypted data
|
||||
*/
|
||||
function decryptAndVerifyMessage(privateKey: key.Key, publicKeys: Array<key.Key>, msg: String): Promise<VerifiedMessage>;
|
||||
/** Decrypts message and verifies signatures
|
||||
|
||||
@param privateKey private key with decrypted secret key data
|
||||
@param publicKey single key to verify signatures
|
||||
@param msg the message object with signed and encrypted data
|
||||
*/
|
||||
function decryptAndVerifyMessage(privateKey: key.Key, publicKey: key.Key, msg: String): Promise<VerifiedMessage>;
|
||||
|
||||
/** Decrypts message
|
||||
|
||||
@param privateKey private key with decrypted secret key data
|
||||
@param msg the message object with the encrypted data
|
||||
*/
|
||||
function decryptMessage(privateKey: key.Key, msg: message.Message): Promise<String>;
|
||||
|
||||
/** Encrypts message text with keys
|
||||
@param keys array of keys used to encrypt the message
|
||||
@param text message as native JavaScript string
|
||||
@returns encrypted ASCII armored message
|
||||
*/
|
||||
function encryptMessage(keys: Array<key.Key>, message: string): Promise<String>;
|
||||
/** Encrypts message text with keys
|
||||
|
||||
@param single key used to encrypt the message
|
||||
@param text message as native JavaScript string
|
||||
*/
|
||||
function encryptMessage(key: key.Key, message: string): Promise<String>;
|
||||
|
||||
/** Generates a new OpenPGP key pair. Currently only supports RSA keys. Primary and subkey will be of same type.
|
||||
@param options
|
||||
*/
|
||||
function generateKeyPair(options: KeyOptions): Promise<KeyPair>;
|
||||
|
||||
/** Signs message text and encrypts it
|
||||
|
||||
@param publicKeys array of keys used to encrypt the message
|
||||
@param privateKey private key with decrypted secret key data for signing
|
||||
@param text private key with decrypted secret key data for signing
|
||||
*/
|
||||
function signAndEncryptMessage(publicKeys: Array<key.Key>, privateKey: key.Key, text: String): Promise<String>;
|
||||
/** Signs message text and encrypts it
|
||||
|
||||
@param publicKeys single key used to encrypt the message
|
||||
@param privateKey private key with decrypted secret key data for signing
|
||||
@param text private key with decrypted secret key data for signing
|
||||
*/
|
||||
function signAndEncryptMessage(publicKey: key.Key, privateKey: key.Key, text: String): Promise<String>;
|
||||
|
||||
/** Signs a cleartext message
|
||||
|
||||
@param privateKeys array of keys with decrypted secret key data to sign cleartext
|
||||
@param text cleartext
|
||||
*/
|
||||
function signClearMessage(privateKeys: Array<key.Key>, text: String): Promise<String>;
|
||||
/** Signs a cleartext message
|
||||
|
||||
@param privateKeys single key with decrypted secret key data to sign cleartext
|
||||
@param text cleartext
|
||||
*/
|
||||
function signClearMessage(privateKey: key.Key, text: String): Promise<String>;
|
||||
|
||||
/** Verifies signatures of cleartext signed message
|
||||
|
||||
@param publicKeys array of keys to verify signatures
|
||||
@param msg cleartext message object with signatures
|
||||
*/
|
||||
function verifyClearSignedMessage(publicKeys: Array<key.Key>, msg: cleartext.CleartextMessage): Promise<VerifiedMessage>;
|
||||
/** Verifies signatures of cleartext signed message
|
||||
|
||||
@param publicKeys single key to verify signatures
|
||||
@param msg cleartext message object with signatures
|
||||
*/
|
||||
function verifyClearSignedMessage(publicKey: key.Key, msg: cleartext.CleartextMessage): Promise<VerifiedMessage>;
|
||||
}
|
||||
|
||||
declare module openpgp.armor {
|
||||
|
||||
/** Armor an OpenPGP binary packet block
|
||||
|
||||
@param messagetype type of the message
|
||||
@param body
|
||||
@param partindex
|
||||
@param parttotal
|
||||
*/
|
||||
function armor(messagetype: enums.armor, body: Object, partindex: Number, parttotal: Number): String;
|
||||
|
||||
/** DeArmor an OpenPGP armored message; verify the checksum and return the encoded bytes
|
||||
|
||||
@param text OpenPGP armored message
|
||||
*/
|
||||
function dearmor(text: String): Object;
|
||||
}
|
||||
|
||||
declare module openpgp.cleartext {
|
||||
|
||||
/** Class that represents an OpenPGP cleartext signed message.
|
||||
*/
|
||||
interface CleartextMessage {
|
||||
/** Returns ASCII armored text of cleartext signed message
|
||||
*/
|
||||
armor(): String;
|
||||
|
||||
/** Returns the key IDs of the keys that signed the cleartext message
|
||||
*/
|
||||
getSigningKeyIds(): Array<Keyid>;
|
||||
|
||||
/** Get cleartext
|
||||
*/
|
||||
getText(): String;
|
||||
|
||||
/** Sign the cleartext message
|
||||
@param privateKeys private keys with decrypted secret key data for signing
|
||||
*/
|
||||
sign(privateKeys: Array<key.Key>): void;
|
||||
|
||||
/** Verify signatures of cleartext signed message
|
||||
@param keys array of keys to verify signatures
|
||||
*/
|
||||
verify(keys: Array<key.Key>): Array<VerifiedMessage>;
|
||||
}
|
||||
|
||||
function readArmored(armoredText: String): CleartextMessage;
|
||||
}
|
||||
|
||||
declare module openpgp.config {
|
||||
var prefer_hash_algorithm: enums.hash;
|
||||
var encryption_cipher: enums.symmetric;
|
||||
var compression: enums.compression;
|
||||
var show_version: Boolean;
|
||||
var show_comment: Boolean;
|
||||
var integrity_protect: Boolean;
|
||||
var keyserver: String;
|
||||
var debug: Boolean;
|
||||
}
|
||||
|
||||
declare module openpgp.crypto {
|
||||
interface Mpi {
|
||||
data: Number,
|
||||
read(input: String): Number,
|
||||
write(): String,
|
||||
}
|
||||
|
||||
/** Generating a session key for the specified symmetric algorithm
|
||||
@param algo Algorithm to use
|
||||
*/
|
||||
function generateSessionKey(algo: enums.symmetric): String;
|
||||
|
||||
/** generate random byte prefix as string for the specified algorithm
|
||||
@param algo Algorithm to use
|
||||
*/
|
||||
function getPrefixRandom(algo: enums.symmetric): String;
|
||||
|
||||
/** Returns the number of integers comprising the private key of an algorithm
|
||||
@param algo The public key algorithm
|
||||
*/
|
||||
function getPrivateMpiCount(algo: enums.symmetric): Number;
|
||||
|
||||
/** Decrypts data using the specified public key multiprecision integers of the private key, the specified secretMPIs of the private key and the specified algorithm.
|
||||
@param algo Algorithm to be used
|
||||
@param publicMPIs Algorithm dependent multiprecision integers of the public key part of the private key
|
||||
@param secretMPIs Algorithm dependent multiprecision integers of the private key used
|
||||
@param data Data to be encrypted as MPI
|
||||
*/
|
||||
function publicKeyDecrypt(algo: enums.publicKey, publicMPIs: Array<Mpi>, secretMPIs: Array<Mpi>, data: Mpi): Mpi;
|
||||
|
||||
/** Encrypts data using the specified public key multiprecision integers and the specified algorithm.
|
||||
@param algo Algorithm to be used
|
||||
@param publicMPIs Algorithm dependent multiprecision integers
|
||||
@param data Data to be encrypted as MPI
|
||||
*/
|
||||
function publicKeyEncrypt(algo: enums.publicKey, publicMPIs: Array<Mpi>, data: Mpi): Array<Mpi>;
|
||||
}
|
||||
|
||||
declare module openpgp.crypto.cfb {
|
||||
/** This function decrypts a given plaintext using the specified blockcipher to decrypt a message
|
||||
@param cipherfn the algorithm cipher class to decrypt data in one block_size encryption
|
||||
@param key binary string representation of key to be used to decrypt the ciphertext. This will be passed to the cipherfn
|
||||
@param ciphertext to be decrypted provided as a string
|
||||
@param resync a boolean value specifying if a resync of the IV should be used or not. The encrypteddatapacket uses the "old" style with a resync. Decryption within an encryptedintegrityprotecteddata packet is not resyncing the IV.
|
||||
*/
|
||||
function decrypt(cipherfn: String, key: String, ciphertext: String, resync: Boolean): String;
|
||||
|
||||
/** This function encrypts a given with the specified prefixrandom using the specified blockcipher to encrypt a message
|
||||
@param prefixrandom random bytes of block_size length provided as a string to be used in prefixing the data
|
||||
@param cipherfn the algorithm cipher class to encrypt data in one block_size encryption
|
||||
@param plaintext data to be encrypted provided as a string
|
||||
@param key binary string representation of key to be used to encrypt the plaintext. This will be passed to the cipherfn
|
||||
@param resync a boolean value specifying if a resync of the IV should be used or not. The encrypteddatapacket uses the "old" style with a resync. Encryption within an encryptedintegrityprotecteddata packet is not resyncing the IV.
|
||||
*/
|
||||
function encrypt(prefixrandom: String, cipherfn: String, plaintext: String, key: String, resync: Boolean): String;
|
||||
|
||||
/** Decrypts the prefixed data for the Modification Detection Code (MDC) computation
|
||||
@param cipherfn cipherfn.encrypt Cipher function to use
|
||||
@param key binary string representation of key to be used to check the mdc This will be passed to the cipherfn
|
||||
@param ciphertext The encrypted data
|
||||
*/
|
||||
function mdc(cipherfn: Object, key: String, ciphertext: String): String;
|
||||
}
|
||||
|
||||
declare module openpgp.crypto.hash {
|
||||
/** Create a hash on the specified data using the specified algorithm
|
||||
@param algo Hash algorithm type
|
||||
@param data Data to be hashed
|
||||
*/
|
||||
function digest(algo: enums.hash, data: String): String;
|
||||
|
||||
/** Returns the hash size in bytes of the specified hash algorithm type
|
||||
@param algo Hash algorithm type
|
||||
*/
|
||||
function getHashByteLength(algo: enums.hash): Number;
|
||||
}
|
||||
|
||||
declare module openpgp.crypto.random {
|
||||
/** Create a secure random big integer of bits length
|
||||
@param bits Bit length of the MPI to create
|
||||
*/
|
||||
function getRandomBigInteger(bits: Number): Number;
|
||||
|
||||
/** Retrieve secure random byte string of the specified length
|
||||
@param length Length in bytes to generate
|
||||
*/
|
||||
function getRandomBytes(length: Number): String;
|
||||
|
||||
/** Helper routine which calls platform specific crypto random generator
|
||||
@param buf
|
||||
*/
|
||||
function getRandomValues(buf: Uint8Array): void;
|
||||
|
||||
/** Return a secure random number in the specified range
|
||||
@param from Min of the random number
|
||||
@param to Max of the random number (max 32bit)
|
||||
*/
|
||||
function getSecureRandom(from: Number, to: Number): Number;
|
||||
}
|
||||
|
||||
declare module openpgp.crypto.signature {
|
||||
/** Create a signature on data using the specified algorithm
|
||||
@param hash_algo hash Algorithm to use
|
||||
@param algo Asymmetric cipher algorithm to use
|
||||
@param publicMPIs Public key multiprecision integers of the private key
|
||||
@param secretMPIs Private key multiprecision integers which is used to sign the data
|
||||
@param data Data to be signed
|
||||
*/
|
||||
function sign(hash_algo: enums.hash, algo: enums.publicKey, publicMPIs: Array<Mpi>, secretMPIs: Array<Mpi>, data: String): Mpi;
|
||||
|
||||
/**
|
||||
@param algo public Key algorithm
|
||||
@param hash_algo Hash algorithm
|
||||
@param msg_MPIs Signature multiprecision integers
|
||||
@param publickey_MPIs Public key multiprecision integers
|
||||
@param data Data on where the signature was computed on
|
||||
*/
|
||||
function verify(algo: enums.publicKey, hash_algo: enums.hash, msg_MPIs: Array<Mpi>, publickey_MPIs: Array<Mpi>, data: String): Boolean;
|
||||
}
|
||||
|
||||
declare module openpgp.enums {
|
||||
|
||||
enum armor {
|
||||
multipart_section,
|
||||
multipart_last,
|
||||
signed,
|
||||
message,
|
||||
public_key,
|
||||
private_key
|
||||
}
|
||||
|
||||
enum compression {
|
||||
uncompressed,
|
||||
zip,
|
||||
zlib,
|
||||
bzip2
|
||||
}
|
||||
|
||||
enum hash {
|
||||
md5,
|
||||
sha1,
|
||||
ripemd,
|
||||
sha256,
|
||||
sha384,
|
||||
sha512,
|
||||
sha224
|
||||
}
|
||||
|
||||
enum packet {
|
||||
publicKeyEncryptedSessionKey,
|
||||
signature,
|
||||
symEncryptedSessionKey,
|
||||
onePassSignature,
|
||||
secretKey,
|
||||
publicKey,
|
||||
secretSubkey,
|
||||
compressed,
|
||||
symmetricallyEncrypted,
|
||||
marker,
|
||||
literal,
|
||||
trust,
|
||||
userid,
|
||||
publicSubkey,
|
||||
userAttribute,
|
||||
symEncryptedIntegrityProtected,
|
||||
modificationDetectionCode,
|
||||
}
|
||||
|
||||
enum publicKey {
|
||||
rsa_encrypt_sign,
|
||||
rsa_encrypt,
|
||||
rsa_sign,
|
||||
elgamal,
|
||||
dsa
|
||||
}
|
||||
|
||||
enum symmetric {
|
||||
plaintext,
|
||||
idea,
|
||||
tripledes,
|
||||
cast5,
|
||||
blowfish,
|
||||
aes128,
|
||||
aes192,
|
||||
aes256,
|
||||
twofish
|
||||
}
|
||||
}
|
||||
|
||||
declare module openpgp.key {
|
||||
|
||||
interface KeyResult {
|
||||
keys: Array<Key>,
|
||||
err: Array<Error>
|
||||
}
|
||||
|
||||
/** Class that represents an OpenPGP key. Must contain a primary key. Can contain additional subkeys, signatures, user ids, user attributes.
|
||||
*/
|
||||
interface Key {
|
||||
armor(): String,
|
||||
decrypt(passphrase: String): Boolean,
|
||||
}
|
||||
|
||||
/** Generates a new OpenPGP key. Currently only supports RSA keys. Primary and subkey will be of same type.
|
||||
|
||||
@param options
|
||||
*/
|
||||
function generate(options: KeyOptions): Key;
|
||||
|
||||
/** Reads an OpenPGP armored text and returns one or multiple key objects
|
||||
|
||||
@param armoredText text to be parsed
|
||||
*/
|
||||
function readArmored(armoredText: String): KeyResult;
|
||||
|
||||
}
|
||||
|
||||
declare module openpgp.message {
|
||||
/** Class that represents an OpenPGP message. Can be an encrypted message, signed message, compressed message or literal message
|
||||
*/
|
||||
interface Message {
|
||||
/** Returns ASCII armored text of message
|
||||
*/
|
||||
armor(): String,
|
||||
|
||||
/** Decrypt the message
|
||||
@param privateKey private key with decrypted secret data
|
||||
*/
|
||||
decrypt(privateKey: key.Key): Array<Message>,
|
||||
|
||||
/** Encrypt the message
|
||||
@param keys array of keys, used to encrypt the message
|
||||
*/
|
||||
encrypt(keys: Array<key.Key>): Array<Message>,
|
||||
|
||||
/** Returns the key IDs of the keys to which the session key is encrypted
|
||||
*/
|
||||
getEncryptionKeyIds(): Array<Keyid>,
|
||||
|
||||
/** Get literal data that is the body of the message
|
||||
*/
|
||||
getLiteralData(): String,
|
||||
|
||||
/** Returns the key IDs of the keys that signed the message
|
||||
*/
|
||||
getSigningKeyIds(): Array<Keyid>,
|
||||
|
||||
/** Get literal data as text
|
||||
*/
|
||||
getText(): String,
|
||||
|
||||
/** Sign the message (the literal data packet of the message)
|
||||
@param privateKey private keys with decrypted secret key data for signing
|
||||
*/
|
||||
sign(privateKey: Array<key.Key>): Message,
|
||||
|
||||
/** Unwrap compressed message
|
||||
*/
|
||||
unwrapCompressed(): Message,
|
||||
|
||||
/** Verify message signatures
|
||||
@param keys array of keys to verify signatures
|
||||
*/
|
||||
verify(keys: Array<key.Key>): Array<Object>,
|
||||
}
|
||||
|
||||
/** creates new message object from binary data
|
||||
@param bytes
|
||||
*/
|
||||
function fromBinary(bytes: String): Message;
|
||||
|
||||
/** creates new message object from text
|
||||
@param text
|
||||
*/
|
||||
function fromText(text: String): Message;
|
||||
|
||||
/** reads an OpenPGP armored message and returns a message object
|
||||
|
||||
@param armoredText text to be parsed
|
||||
*/
|
||||
function readArmored(armoredText: String): Message;
|
||||
}
|
||||
|
||||
declare module openpgp.packet {
|
||||
|
||||
/** Allocate a new packet from structured packet clone
|
||||
@param packetClone packet clone
|
||||
*/
|
||||
function fromStructuredClone(packetClone: Object): Object
|
||||
|
||||
/** Allocate a new packet
|
||||
@param property name from enums.packet
|
||||
*/
|
||||
function newPacketFromTag(tag: String): Object;
|
||||
}
|
||||
|
||||
declare module openpgp.util {
|
||||
/** Convert an array of integers(0.255) to a string
|
||||
@param bin An array of (binary) integers to convert
|
||||
*/
|
||||
function bin2str(bin: Array<Number>): String;
|
||||
|
||||
/** Calculates a 16bit sum of a string by adding each character codes modulus 65535
|
||||
@param text String to create a sum of
|
||||
*/
|
||||
function calc_checksum(text: String): Number;
|
||||
|
||||
/** Convert a string of utf8 bytes to a native javascript string
|
||||
@param utf8 A valid squence of utf8 bytes
|
||||
*/
|
||||
function decode_utf8(utf8: String): String
|
||||
|
||||
/** Convert a native javascript string to a string of utf8 bytes
|
||||
param str The string to convert
|
||||
*/
|
||||
function encode_utf8(str: String): String
|
||||
|
||||
/** Return the algorithm type as string
|
||||
*/
|
||||
function get_hashAlgorithmString(): String
|
||||
|
||||
/** Get native Web Cryptography api. The default configuration is to use the api when available. But it can also be deactivated with config.useWebCrypto
|
||||
*/
|
||||
function getWebCrypto(): Object
|
||||
|
||||
/** Create binary string from a hex encoded string
|
||||
@param str Hex string to convert
|
||||
*/
|
||||
function hex2bin(str: String): String;
|
||||
|
||||
/** Creating a hex string from an binary array of integers (0..255)
|
||||
@param str Array of bytes to convert
|
||||
*/
|
||||
function hexidump(str: String): String;
|
||||
|
||||
/** Create hexstring from a binary
|
||||
@param str String to convert
|
||||
*/
|
||||
function hexstrdump(str: String): String;
|
||||
|
||||
/** Helper function to print a debug message. Debug messages are only printed if
|
||||
@param str String of the debug message
|
||||
*/
|
||||
function print_debug(str: String): void;
|
||||
|
||||
/** Helper function to print a debug message. Debug messages are only printed if
|
||||
@param str String of the debug message
|
||||
*/
|
||||
function print_debug_hexstr_dump(str: String): void;
|
||||
|
||||
/** Shifting a string to n bits right
|
||||
@param value The string to shift
|
||||
@param bitcount Amount of bits to shift (MUST be smaller than 9)
|
||||
*/
|
||||
function shiftRight(value: String, bitcount: Number): String;
|
||||
|
||||
/** Convert a string to an array of integers(0.255)
|
||||
@param str String to convert
|
||||
*/
|
||||
function str2bin(str: String): Array<Number>;
|
||||
|
||||
/** Convert a string to a Uint8Array
|
||||
@param str String to convert
|
||||
*/
|
||||
function str2Uint8Array(str: String): Uint8Array;
|
||||
|
||||
/** Convert a Uint8Array to a string. This currently functions the same as bin2str.
|
||||
@param bin An array of (binary) integers to convert
|
||||
*/
|
||||
function Uint8Array2str(bin: Uint8Array): String;
|
||||
|
||||
|
||||
}
|
||||
@@ -400,3 +400,16 @@ function test_view() {
|
||||
var model = Parse.User.current();
|
||||
var view = new Parse.View<Parse.User>();
|
||||
}
|
||||
|
||||
function test_promise() {
|
||||
let resolved = Parse.Promise.as(true);
|
||||
let rejected = Parse.Promise.error("an error object");
|
||||
Parse.Promise.when([resolved, rejected]).then(function() {
|
||||
// success
|
||||
}, function() {
|
||||
// failed
|
||||
});
|
||||
|
||||
// can check whether an object is a Parse.Promise object or not
|
||||
Parse.Promise.is(resolved);
|
||||
}
|
||||
|
||||
Vendored
+12
-12
@@ -72,14 +72,16 @@ declare namespace Parse {
|
||||
then<U>(resolvedCallback: (value: T) => U, rejectedCallback?: (reason: any) => U): IPromise<U>;
|
||||
}
|
||||
|
||||
interface Promise<T> {
|
||||
class Promise<T> {
|
||||
|
||||
static as<U>(resolvedValue: U): Promise<U>;
|
||||
static error<U>(error: U): Promise<U>;
|
||||
static is(possiblePromise: any): Boolean;
|
||||
static when(promises: Promise<any>[]): Promise<any>;
|
||||
|
||||
always(callback: Function): Promise<T>;
|
||||
as(): Promise<T>;
|
||||
done(callback: Function): Promise<T>;
|
||||
error(): Promise<T>;
|
||||
fail(callback: Function): Promise<T>;
|
||||
is(): Promise<T>;
|
||||
reject(error: any): void;
|
||||
resolve(result: any): void;
|
||||
then<U>(resolvedCallback: (value: T) => Promise<U>,
|
||||
@@ -88,8 +90,6 @@ declare namespace Parse {
|
||||
rejectedCallback?: (reason: any) => IPromise<U>): IPromise<T>;
|
||||
then<U>(resolvedCallback: (value: T) => U,
|
||||
rejectedCallback?: (reason: any) => U): IPromise<T>;
|
||||
|
||||
when(promises: Promise<T>[]): Promise<T>;
|
||||
}
|
||||
|
||||
interface IBaseObject {
|
||||
@@ -1050,11 +1050,11 @@ declare namespace Parse {
|
||||
|
||||
}
|
||||
|
||||
declare module "parse/node" {
|
||||
export = { Parse };
|
||||
}
|
||||
|
||||
declare module "parse" {
|
||||
var type: typeof Parse;
|
||||
var subType: {
|
||||
Parse: typeof type;
|
||||
}
|
||||
|
||||
export = subType;
|
||||
import parse = require("parse/node");
|
||||
export = parse
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/// <reference path="pngjs2.d.ts" />
|
||||
|
||||
import * as fs from "fs";
|
||||
import { PNG } from "pngjs2";
|
||||
|
||||
let png = new PNG({ filterType: 4 });
|
||||
|
||||
fs.createReadStream("in.png")
|
||||
.pipe(png)
|
||||
.on("parsed", () => {
|
||||
for (let y = 0; y < png.height; y++) {
|
||||
for (let x = 0; x < png.width; x++) {
|
||||
let idx = (png.width * y + x) << 2;
|
||||
|
||||
// invert color
|
||||
png.data[idx] = 255 - png.data[idx];
|
||||
png.data[idx+1] = 255 - png.data[idx+1];
|
||||
png.data[idx+2] = 255 - png.data[idx+2];
|
||||
|
||||
// and reduce opacity
|
||||
png.data[idx+3] = png.data[idx+3] >> 1;
|
||||
}
|
||||
}
|
||||
|
||||
png.pack().pipe(fs.createWriteStream('out.png'));
|
||||
});
|
||||
Vendored
+64
@@ -0,0 +1,64 @@
|
||||
// Type definitions for pngjs2 2.0.0
|
||||
// Project: https://www.npmjs.com/package/pngjs2
|
||||
// Definitions by: Elisée Maurer <https://sparklinlabs.com/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "pngjs2" {
|
||||
import fs = require("fs");
|
||||
import events = require("events");
|
||||
import stream = require("stream");
|
||||
|
||||
interface PNGOptions {
|
||||
width?: number;
|
||||
height?: number;
|
||||
checkCRC?: boolean;
|
||||
deflateChunkSize?: number;
|
||||
deflateLevel?: number;
|
||||
deflateStrategy?: number;
|
||||
deflateFactory?: any;
|
||||
filterType?: number|number[];
|
||||
colorType?: number;
|
||||
inputHasAlpha?: boolean;
|
||||
}
|
||||
|
||||
interface PNGMetadata {
|
||||
width: number;
|
||||
height: number;
|
||||
palette: boolean;
|
||||
color: boolean;
|
||||
alpha: boolean;
|
||||
interlace: boolean;
|
||||
}
|
||||
|
||||
export class PNG extends stream.Writable {
|
||||
constructor(options?: PNGOptions);
|
||||
|
||||
width: number;
|
||||
height: number;
|
||||
data: Buffer;
|
||||
gamma: number;
|
||||
|
||||
on(event: string, callback: Function): PNG;
|
||||
on(event: "metadata", callback: (metadata: PNGMetadata) => void): PNG;
|
||||
on(event: "parsed", callback: (data: Buffer) => void): PNG;
|
||||
on(event: "error", callback: (err: Error) => void): PNG;
|
||||
|
||||
parse(data: string|Buffer, callback?: (err: Error, data: Buffer) => void): PNG;
|
||||
pack(): PNG;
|
||||
pipe(destination: fs.WriteStream): PNG;
|
||||
|
||||
static bitblt(src: PNG, dst: PNG, srcX: number, srcY: number,
|
||||
width: number, height: number, deltaX: number, deltaY: number): void;
|
||||
|
||||
bitblt(dst: PNG, srcX: number, srcY: number,
|
||||
width: number, height: number, deltaX: number, deltaY: number): PNG;
|
||||
}
|
||||
|
||||
export namespace PNG {
|
||||
namespace sync {
|
||||
function read(buffer: string|Buffer, options?: PNGOptions): PNG;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/// <reference path="./power-assert.d.ts" />
|
||||
|
||||
import assert = require("power-assert");
|
||||
import assert from "power-assert";
|
||||
|
||||
assert(1 + 1 - 2 === 0, "The universe isn't how it should.");
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -9,7 +9,7 @@
|
||||
/// <reference path="../power-assert-formatter/power-assert-formatter.d.ts" />
|
||||
|
||||
declare function assert(value:any, message?:string):void;
|
||||
declare module assert {
|
||||
declare namespace assert {
|
||||
export class AssertionError implements Error {
|
||||
name:string;
|
||||
message:string;
|
||||
@@ -62,5 +62,5 @@ declare module assert {
|
||||
}
|
||||
|
||||
declare module "power-assert" {
|
||||
export = assert;
|
||||
export default assert;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,898 @@
|
||||
// React-Bootstrap Test
|
||||
// ================================================================================
|
||||
///<reference path="react-bootstrap.d.ts"/>
|
||||
///<reference path="../react/react.d.ts"/>
|
||||
|
||||
// Imports
|
||||
// --------------------------------------------------------------------------------
|
||||
import * as React from 'react';
|
||||
import { Component, CSSProperties } from 'react';
|
||||
import { Button, ButtonToolbar, Modal, Well, ButtonGroup, DropdownButton, MenuItem, Panel, ListGroup, ListGroupItem, Accordion, Tooltip, OverlayTrigger, Popover, ProgressBar, Nav, NavItem, Navbar, NavDropdown, Tabs, Tab, Pager, PageItem, Pagination, Alert, Carousel, CarouselItem, Grid, Row, Col, Thumbnail, Label, Badge, Jumbotron, PageHeader, Glyphicon, Table, Input, ButtonInput } from 'react-bootstrap';
|
||||
|
||||
|
||||
export class ReactBootstrapTest extends Component<any, any> {
|
||||
callback() {
|
||||
alert('Callback: ' + JSON.stringify(arguments));
|
||||
}
|
||||
|
||||
public render() {
|
||||
let style: CSSProperties = { padding: '50px' };
|
||||
let tooltip = (<Tooltip><strong>Holy guacamole!</strong> Check this info.</Tooltip>);
|
||||
|
||||
const innerGlyphicon = <Glyphicon glyph='music' />;
|
||||
const innerButton = <Button>Before</Button>;
|
||||
const innerDropdown = (
|
||||
<DropdownButton title='Action' id='input-dropdown-addon'>
|
||||
<MenuItem key='1'>Item</MenuItem>
|
||||
</DropdownButton>
|
||||
);
|
||||
const innerRadio = <input type='radio' aria-label='...' />;
|
||||
const innerCheckbox = <input type='checkbox' aria-label='...' />;
|
||||
|
||||
return (
|
||||
<div style={style}>
|
||||
<div style={style}>
|
||||
<ButtonToolbar>
|
||||
<Button>Default</Button>
|
||||
<Button bsStyle='primary'>Primary</Button>
|
||||
<Button bsStyle='success'>Success</Button>
|
||||
<Button bsStyle='info'>Info</Button>
|
||||
<Button bsStyle='warning'>Warning</Button>
|
||||
<Button bsStyle='danger'>Danger</Button>
|
||||
<Button bsStyle='link'>Link</Button>
|
||||
</ButtonToolbar>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ButtonToolbar>
|
||||
<Button bsStyle='primary' bsSize='large'>Large button</Button>
|
||||
<Button bsSize='large'>Large button</Button>
|
||||
</ButtonToolbar>
|
||||
<ButtonToolbar>
|
||||
<Button bsStyle='primary'>Default button</Button>
|
||||
<Button>Default button</Button>
|
||||
</ButtonToolbar>
|
||||
<ButtonToolbar>
|
||||
<Button bsStyle='primary' bsSize='small'>Small button</Button>
|
||||
<Button bsSize='small'>Small button</Button>
|
||||
</ButtonToolbar>
|
||||
<ButtonToolbar>
|
||||
<Button bsStyle='primary' bsSize='xsmall'>Extra small button</Button>
|
||||
<Button bsSize='xsmall'>Extra small button</Button>
|
||||
</ButtonToolbar>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Well>
|
||||
<Button bsStyle='primary' bsSize='large' block>Block level button</Button>
|
||||
<Button bsSize='large' block>Block level button</Button>
|
||||
</Well>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ButtonToolbar>
|
||||
<Button bsStyle='primary' bsSize='large' active>Primary button</Button>
|
||||
<Button bsSize='large' active>Button</Button>
|
||||
</ButtonToolbar>
|
||||
</div>
|
||||
|
||||
|
||||
<div style={style}>
|
||||
<ButtonToolbar>
|
||||
<Button href='#'>Link</Button>
|
||||
<Button>Button</Button>
|
||||
</ButtonToolbar>
|
||||
</div>
|
||||
|
||||
|
||||
<div style={style}>
|
||||
<ButtonGroup>
|
||||
<Button>Left</Button>
|
||||
<Button>Middle</Button>
|
||||
<Button>Right</Button>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
|
||||
|
||||
<div style={style as CSSProperties}>
|
||||
<ButtonToolbar>
|
||||
<ButtonGroup>
|
||||
<Button>1</Button>
|
||||
<Button>2</Button>
|
||||
<Button>3</Button>
|
||||
<Button>4</Button>
|
||||
</ButtonGroup>
|
||||
<ButtonGroup>
|
||||
<Button>5</Button>
|
||||
<Button>6</Button>
|
||||
<Button>7</Button>
|
||||
</ButtonGroup>
|
||||
<ButtonGroup>
|
||||
<Button>8</Button>
|
||||
</ButtonGroup>
|
||||
</ButtonToolbar>
|
||||
</div>
|
||||
|
||||
// TODO: Start here
|
||||
|
||||
<div style={style}>
|
||||
<ButtonToolbar>
|
||||
<ButtonGroup bsSize='large'>
|
||||
<Button>Left</Button>
|
||||
<Button>Middle</Button>
|
||||
<Button>Right</Button>
|
||||
</ButtonGroup>
|
||||
</ButtonToolbar>
|
||||
|
||||
<ButtonToolbar>
|
||||
<ButtonGroup>
|
||||
<Button>Left</Button>
|
||||
<Button>Middle</Button>
|
||||
<Button>Right</Button>
|
||||
</ButtonGroup>
|
||||
</ButtonToolbar>
|
||||
|
||||
<ButtonToolbar>
|
||||
<ButtonGroup bsSize='small'>
|
||||
<Button>Left</Button>
|
||||
<Button>Middle</Button>
|
||||
<Button>Right</Button>
|
||||
</ButtonGroup>
|
||||
</ButtonToolbar>
|
||||
|
||||
<ButtonToolbar>
|
||||
<ButtonGroup bsSize='xsmall'>
|
||||
<Button>Left</Button>
|
||||
<Button>Middle</Button>
|
||||
<Button>Right</Button>
|
||||
</ButtonGroup>
|
||||
</ButtonToolbar>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ButtonGroup vertical>
|
||||
<Button>Button</Button>
|
||||
<Button>Button</Button>
|
||||
<DropdownButton title='Dropdown' id='bg-vertical-dropdown-1'>
|
||||
<MenuItem eventKey='1'>Dropdown link</MenuItem>
|
||||
<MenuItem eventKey='2'>Dropdown link</MenuItem>
|
||||
</DropdownButton>
|
||||
<Button>Button</Button>
|
||||
<Button>Button</Button>
|
||||
<DropdownButton title='Dropdown' id='bg-vertical-dropdown-2'>
|
||||
<MenuItem eventKey='1'>Dropdown link</MenuItem>
|
||||
<MenuItem eventKey='2'>Dropdown link</MenuItem>
|
||||
</DropdownButton>
|
||||
<DropdownButton title='Dropdown' id='bg-vertical-dropdown-3'>
|
||||
<MenuItem eventKey='1'>Dropdown link</MenuItem>
|
||||
<MenuItem eventKey='2'>Dropdown link</MenuItem>
|
||||
</DropdownButton>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<DropdownButton bsStyle={'default'} title={'hello'} key={0} id={0}>
|
||||
<MenuItem eventKey='1'>Action</MenuItem>
|
||||
<MenuItem eventKey='2'>Another action</MenuItem>
|
||||
<MenuItem eventKey='3' active>Active Item</MenuItem>
|
||||
<MenuItem divider />
|
||||
<MenuItem eventKey='4'>Separated link</MenuItem>
|
||||
</DropdownButton>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div className="clearfix">
|
||||
<ul className="dropdown-menu open">
|
||||
<MenuItem header>Header</MenuItem>
|
||||
<MenuItem>link</MenuItem>
|
||||
<MenuItem divider/>
|
||||
<MenuItem header>Header</MenuItem>
|
||||
<MenuItem>link</MenuItem>
|
||||
<MenuItem disabled>disabled</MenuItem>
|
||||
<MenuItem title="See? I have a title.">
|
||||
link with title
|
||||
</MenuItem>
|
||||
<MenuItem eventKey={1} href="#someHref" onSelect={this.callback}>
|
||||
link that alerts
|
||||
</MenuItem>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Panel onClick={this.callback}>
|
||||
Basic panel example
|
||||
</Panel>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div>
|
||||
<Panel header='Panel heading without title'>
|
||||
Panel content
|
||||
</Panel>
|
||||
<Panel header='Header'>
|
||||
Panel content
|
||||
</Panel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Panel footer='Panel footer'>
|
||||
Panel content
|
||||
</Panel>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div>
|
||||
<Panel header='Header'>
|
||||
Panel content
|
||||
</Panel>
|
||||
|
||||
<Panel header='Header' bsStyle='primary'>
|
||||
Panel content
|
||||
</Panel>
|
||||
|
||||
<Panel header='Header' bsStyle='success'>
|
||||
Panel content
|
||||
</Panel>
|
||||
|
||||
<Panel header='Header' bsStyle='info'>
|
||||
Panel content
|
||||
</Panel>
|
||||
|
||||
<Panel header='Header' bsStyle='warning'>
|
||||
Panel content
|
||||
</Panel>
|
||||
|
||||
<Panel header='Header' bsStyle='danger'>
|
||||
Panel content
|
||||
</Panel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Panel collapsible defaultExpanded header='Panel heading'>
|
||||
Some default panel content here.
|
||||
<ListGroup fill>
|
||||
<ListGroupItem>Item 1</ListGroupItem>
|
||||
<ListGroupItem>Item 2</ListGroupItem>
|
||||
<ListGroupItem>…</ListGroupItem>
|
||||
</ListGroup>
|
||||
Some more panel content here.
|
||||
</Panel>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Accordion>
|
||||
<Panel header='Collapsible Group Item #1' eventKey='1'>
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer
|
||||
farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
|
||||
</Panel>
|
||||
<Panel header='Collapsible Group Item #2' eventKey='2'>
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer
|
||||
farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
|
||||
</Panel>
|
||||
<Panel header='Collapsible Group Item #3' eventKey='3'>
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer
|
||||
farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
|
||||
</Panel>
|
||||
</Accordion>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div className='static-modal'>
|
||||
<Modal.Dialog>
|
||||
<Modal.Header>
|
||||
<Modal.Title>Modal title</Modal.Title>
|
||||
</Modal.Header>
|
||||
|
||||
<Modal.Body>
|
||||
One fine body...
|
||||
</Modal.Body>
|
||||
|
||||
<Modal.Footer>
|
||||
<Button>Close</Button>
|
||||
<Button bsStyle='primary'>Save changes</Button>
|
||||
</Modal.Footer>
|
||||
|
||||
</Modal.Dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style} className="static-tooltip">
|
||||
<div>
|
||||
<Tooltip placement="right" className="in">
|
||||
Tooltip right
|
||||
</Tooltip>
|
||||
|
||||
<Tooltip placement="top" className="in">
|
||||
Tooltip top
|
||||
</Tooltip>
|
||||
|
||||
<Tooltip placement="left" className="in">
|
||||
Tooltip left
|
||||
</Tooltip>
|
||||
|
||||
<Tooltip placement="bottom" className="in">
|
||||
Tooltip bottom
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ButtonToolbar>
|
||||
<OverlayTrigger placement='left' overlay={tooltip}>
|
||||
<Button bsStyle='default'>Holy guacamole!</Button>
|
||||
</OverlayTrigger>
|
||||
|
||||
<OverlayTrigger placement='top' overlay={tooltip}>
|
||||
<Button bsStyle='default'>Holy guacamole!</Button>
|
||||
</OverlayTrigger>
|
||||
|
||||
<OverlayTrigger placement='bottom' overlay={tooltip}>
|
||||
<Button bsStyle='default'>Holy guacamole!</Button>
|
||||
</OverlayTrigger>
|
||||
|
||||
<OverlayTrigger placement='right' overlay={tooltip}>
|
||||
<Button bsStyle='default'>Holy guacamole!</Button>
|
||||
</OverlayTrigger>
|
||||
</ButtonToolbar>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div style={{ height: 120, position: 'relative' } as CSSProperties}>
|
||||
<Popover placement='right' positionLeft={200} positionTop={50} title='Popover right'>
|
||||
And here's some <strong>amazing</strong> content. It's very engaging. right?
|
||||
</Popover>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ButtonToolbar>
|
||||
<OverlayTrigger trigger='click' placement='left' overlay={<Popover title='Popover left'><strong>Holy guacamole!</strong> Check this info.</Popover>}>
|
||||
<Button bsStyle='default'>Holy guacamole!</Button>
|
||||
</OverlayTrigger>
|
||||
<OverlayTrigger trigger='click' placement='top' overlay={<Popover title='Popover top'><strong>Holy guacamole!</strong> Check this info.</Popover>}>
|
||||
<Button bsStyle='default'>Holy guacamole!</Button>
|
||||
</OverlayTrigger>
|
||||
<OverlayTrigger trigger='click' placement='bottom' overlay={<Popover title='Popover bottom'><strong>Holy guacamole!</strong> Check this info.</Popover>}>
|
||||
<Button bsStyle='default'>Holy guacamole!</Button>
|
||||
</OverlayTrigger>
|
||||
<OverlayTrigger trigger='click' placement='right' overlay={<Popover title='Popover right'><strong>Holy guacamole!</strong> Check this info.</Popover>}>
|
||||
<Button bsStyle='default'>Holy guacamole!</Button>
|
||||
</OverlayTrigger>
|
||||
</ButtonToolbar>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ButtonToolbar>
|
||||
<OverlayTrigger trigger='click' placement='bottom' overlay={<Popover title='Popover bottom'><strong>Holy guacamole!</strong> Check this info.</Popover>}>
|
||||
<Button bsStyle='default'>Click</Button>
|
||||
</OverlayTrigger>
|
||||
<OverlayTrigger trigger='hover' placement='bottom' overlay={<Popover title='Popover bottom'><strong>Holy guacamole!</strong> Check this info.</Popover>}>
|
||||
<Button bsStyle='default'>Hover</Button>
|
||||
</OverlayTrigger>
|
||||
<OverlayTrigger trigger='focus' placement='bottom' overlay={<Popover title='Popover bottom'><strong>Holy guacamole!</strong> Check this info.</Popover>}>
|
||||
<Button bsStyle='default'>Focus</Button>
|
||||
</OverlayTrigger>
|
||||
<OverlayTrigger trigger='click' rootClose placement='bottom' overlay={<Popover title='Popover bottom'><strong>Holy guacamole!</strong> Check this info.</Popover>}>
|
||||
<Button bsStyle='default'>Click + rootClose</Button>
|
||||
</OverlayTrigger>
|
||||
</ButtonToolbar>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ProgressBar now={60} />
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ProgressBar now={60} label='%(percent)s%' />
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div>
|
||||
<ProgressBar bsStyle='success' now={40} />
|
||||
<ProgressBar bsStyle='info' now={20} />
|
||||
<ProgressBar bsStyle='warning' now={60} />
|
||||
<ProgressBar bsStyle='danger' now={80} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div>
|
||||
<ProgressBar striped bsStyle='success' now={40} />
|
||||
<ProgressBar striped bsStyle='info' now={20} />
|
||||
<ProgressBar striped bsStyle='warning' now={60} />
|
||||
<ProgressBar striped bsStyle='danger' now={80} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ProgressBar active now={45} />
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ProgressBar>
|
||||
<ProgressBar striped bsStyle='success' now={35} key={1} />
|
||||
<ProgressBar bsStyle='warning' now={20} key={2} />
|
||||
<ProgressBar active bsStyle='danger' now={10} key={3} />
|
||||
</ProgressBar>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Nav bsStyle='pills' activeKey={1} onSelect={this.callback}>
|
||||
<NavItem eventKey={1} href='/home'>NavItem 1 content</NavItem>
|
||||
<NavItem eventKey={2} title='Item'>NavItem 2 content</NavItem>
|
||||
<NavItem eventKey={3} disabled>NavItem 3 content</NavItem>
|
||||
</Nav>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Nav bsStyle='pills' stacked activeKey={1} onSelect={this.callback}>
|
||||
<NavItem eventKey={1} href='/home'>NavItem 1 content</NavItem>
|
||||
<NavItem eventKey={2} title='Item'>NavItem 2 content</NavItem>
|
||||
<NavItem eventKey={3} disabled>NavItem 3 content</NavItem>
|
||||
</Nav>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div>
|
||||
<Nav bsStyle='tabs' justified activeKey={1} onSelect={this.callback}>
|
||||
<NavItem eventKey={1} href='/home'>NavItem 1 content</NavItem>
|
||||
<NavItem eventKey={2} title='Item'>NavItem 2 content</NavItem>
|
||||
<NavItem eventKey={3} disabled>NavItem 3 content</NavItem>
|
||||
</Nav>
|
||||
<br />
|
||||
<Nav bsStyle='pills' justified activeKey={1} onSelect={this.callback}>
|
||||
<NavItem eventKey={1} href='/home'>NavItem 1 content</NavItem>
|
||||
<NavItem eventKey={2} title='Item'>NavItem 2 content</NavItem>
|
||||
<NavItem eventKey={3} disabled>NavItem 3 content</NavItem>
|
||||
</Nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Navbar brand='React-Bootstrap'>
|
||||
<Nav>
|
||||
<NavItem eventKey={1} href='#'>Link</NavItem>
|
||||
<NavItem eventKey={2} href='#'>Link</NavItem>
|
||||
<NavDropdown eventKey={3} title='Dropdown' id='basic-nav-dropdown'>
|
||||
<MenuItem eventKey='1'>Action</MenuItem>
|
||||
<MenuItem eventKey='2'>Another action</MenuItem>
|
||||
<MenuItem eventKey='3'>Something else here</MenuItem>
|
||||
<MenuItem divider />
|
||||
<MenuItem eventKey='4'>Separated link</MenuItem>
|
||||
</NavDropdown>
|
||||
</Nav>
|
||||
</Navbar>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Navbar brand='React-Bootstrap' inverse toggleNavKey={0}>
|
||||
<Nav right eventKey={0}> {/* This is the eventKey referenced */}
|
||||
<NavItem eventKey={1} href='#'>Link</NavItem>
|
||||
<NavItem eventKey={2} href='#'>Link</NavItem>
|
||||
</Nav>
|
||||
</Navbar>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Pager>
|
||||
<PageItem href='#'>Previous</PageItem>
|
||||
<PageItem href='#'>Next</PageItem>
|
||||
</Pager>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Tabs defaultActiveKey={1} animation={false}>
|
||||
<Tab eventKey={1} title='Tab 1'>Tab 1 content</Tab>
|
||||
<Tab eventKey={2} title='Tab 2'>Tab 2 content</Tab>
|
||||
<Tab eventKey={3} title='Tab 3' disabled>Tab 3 content</Tab>
|
||||
</Tabs>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Pager>
|
||||
<PageItem href='#'>Previous</PageItem>
|
||||
<PageItem href='#'>Next</PageItem>
|
||||
</Pager>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Pager>
|
||||
<PageItem previous href='#'>← Previous Page</PageItem>
|
||||
<PageItem next href='#'>Next Page →</PageItem>
|
||||
</Pager>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Pager>
|
||||
<PageItem previous href='#'>← Previous</PageItem>
|
||||
<PageItem disabled next href='#'>Next →</PageItem>
|
||||
</Pager>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div>
|
||||
<Pagination
|
||||
bsSize='large'
|
||||
items={10}
|
||||
activePage={1}
|
||||
onSelect={this.callback} />
|
||||
<br />
|
||||
<Pagination
|
||||
bsSize='medium'
|
||||
items={10}
|
||||
activePage={1}
|
||||
onSelect={this.callback} />
|
||||
<br />
|
||||
|
||||
<Pagination
|
||||
bsSize='small'
|
||||
items={10}
|
||||
activePage={1}
|
||||
onSelect={this.callback} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Alert bsStyle='warning'>
|
||||
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
|
||||
</Alert>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Carousel>
|
||||
<CarouselItem>
|
||||
<img width={900} height={500} alt='900x500' src='carousel.png'/>
|
||||
<div className='carousel-caption'>
|
||||
<h3>First slide label</h3>
|
||||
<p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
|
||||
</div>
|
||||
</CarouselItem>
|
||||
<CarouselItem>
|
||||
<img width={900} height={500} alt='900x500' src='carousel.png'/>
|
||||
<div className='carousel-caption'>
|
||||
<h3>Second slide label</h3>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
||||
</div>
|
||||
</CarouselItem>
|
||||
<CarouselItem>
|
||||
<img width={900} height={500} alt='900x500' src='carousel.png'/>
|
||||
<div className='carousel-caption'>
|
||||
<h3>Third slide label</h3>
|
||||
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
|
||||
</div>
|
||||
</CarouselItem>
|
||||
</Carousel>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Grid>
|
||||
<Row className='show-grid'>
|
||||
<Col xs={12} md={8}><code><{'Col xs={12} md={8}'} /></code></Col>
|
||||
<Col xs={6} md={4}><code><{'Col xs={6} md={4}'} /></code></Col>
|
||||
</Row>
|
||||
|
||||
<Row className='show-grid'>
|
||||
<Col xs={6} md={4}><code><{'Col xs={6} md={4}'} /></code></Col>
|
||||
<Col xs={6} md={4}><code><{'Col xs={6} md={4}'} /></code></Col>
|
||||
<Col xs={6} md={4}><code><{'Col xs={6} md={4}'} /></code></Col>
|
||||
</Row>
|
||||
|
||||
<Row className='show-grid'>
|
||||
<Col xs={6} xsOffset={6}><code><{'Col xs={6} xsOffset={6}'} /></code></Col>
|
||||
</Row>
|
||||
|
||||
<Row className='show-grid'>
|
||||
<Col md={6} mdPush={6}><code><{'Col md={6} mdPush={6}'} /></code></Col>
|
||||
<Col md={6} mdPull={6}><code><{'Col md={6} mdPull={6}'} /></code></Col>
|
||||
</Row>
|
||||
</Grid>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Grid>
|
||||
<Row>
|
||||
<Col xs={6} md={3}>
|
||||
<Thumbnail href='#' alt='171x180' src='thumbnail.png' />
|
||||
</Col>
|
||||
<Col xs={6} md={3}>
|
||||
<Thumbnail href='#' alt='171x180' src='thumbnail.png' />
|
||||
</Col>
|
||||
<Col xs={6} md={3}>
|
||||
<Thumbnail href='#' alt='171x180' src='thumbnail.png' />
|
||||
</Col>
|
||||
</Row>
|
||||
</Grid>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ListGroup>
|
||||
<ListGroupItem>Item 1</ListGroupItem>
|
||||
<ListGroupItem>Item 2</ListGroupItem>
|
||||
<ListGroupItem>...</ListGroupItem>
|
||||
</ListGroup>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ListGroup>
|
||||
<ListGroupItem href='#link1'>Link 1</ListGroupItem>
|
||||
<ListGroupItem href='#link2'>Link 2</ListGroupItem>
|
||||
<ListGroupItem onClick={this.callback}>
|
||||
Trigger an alert
|
||||
</ListGroupItem>
|
||||
</ListGroup>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ListGroup>
|
||||
<ListGroupItem href='#' active>Link 1</ListGroupItem>
|
||||
<ListGroupItem href='#'>Link 2</ListGroupItem>
|
||||
<ListGroupItem href='#' disabled>Link 3</ListGroupItem>
|
||||
</ListGroup>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ListGroup>
|
||||
<ListGroupItem bsStyle='success'>Success</ListGroupItem>
|
||||
<ListGroupItem bsStyle='info'>Info</ListGroupItem>
|
||||
<ListGroupItem bsStyle='warning'>Warning</ListGroupItem>
|
||||
<ListGroupItem bsStyle='danger'>Danger</ListGroupItem>
|
||||
</ListGroup>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<ListGroup>
|
||||
<ListGroupItem header='Heading 1'>Some body text</ListGroupItem>
|
||||
<ListGroupItem header='Heading 2' href='#'>Linked item</ListGroupItem>
|
||||
<ListGroupItem header='Heading 3' bsStyle='danger'>Danger styling</ListGroupItem>
|
||||
</ListGroup>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div>
|
||||
<h1>Label <Label>New</Label></h1>
|
||||
<h2>Label <Label>New</Label></h2>
|
||||
<h3>Label <Label>New</Label></h3>
|
||||
<h4>Label <Label>New</Label></h4>
|
||||
<h5>Label <Label>New</Label></h5>
|
||||
<p>Label <Label>New</Label></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div>
|
||||
<Label bsStyle='default'>Default</Label>
|
||||
<Label bsStyle='primary'>Primary</Label>
|
||||
<Label bsStyle='success'>Success</Label>
|
||||
<Label bsStyle='info'>Info</Label>
|
||||
<Label bsStyle='warning'>Warning</Label>
|
||||
<Label bsStyle='danger'>Danger</Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<p>Badges <Badge>42</Badge></p>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Jumbotron>
|
||||
<h1>Hello, world!</h1>
|
||||
<p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
|
||||
<p><Button bsStyle='primary'>Learn more</Button></p>
|
||||
</Jumbotron>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<PageHeader>Example page header <small>Subtext for header</small></PageHeader>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Well>Look I'm in a well!</Well>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div>
|
||||
<Well bsSize='large'>Look I'm in a large well!</Well>
|
||||
<Well bsSize='small'>Look I'm in a small well!</Well>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<div>
|
||||
<ButtonToolbar>
|
||||
<ButtonGroup>
|
||||
<Button><Glyphicon glyph='align-left' /></Button>
|
||||
<Button><Glyphicon glyph='align-center' /></Button>
|
||||
<Button><Glyphicon glyph='align-right' /></Button>
|
||||
<Button><Glyphicon glyph='align-justify' /></Button>
|
||||
</ButtonGroup>
|
||||
</ButtonToolbar>
|
||||
<ButtonToolbar>
|
||||
<ButtonGroup>
|
||||
<Button bsSize='large'><Glyphicon glyph='star' /> Star</Button>
|
||||
<Button><Glyphicon glyph='star' /> Star</Button>
|
||||
<Button bsSize='small'><Glyphicon glyph='star' /> Star</Button>
|
||||
<Button bsSize='xsmall'><Glyphicon glyph='star' /> Star</Button>
|
||||
</ButtonGroup>
|
||||
</ButtonToolbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Table striped bordered condensed hover>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Username</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Mark</td>
|
||||
<td>Otto</td>
|
||||
<td>@mdo</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Jacob</td>
|
||||
<td>Thornton</td>
|
||||
<td>@fat</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td colSpan={2}>Larry the Bird</td>
|
||||
<td>@twitter</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Table responsive>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
<th>Table heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
<td>Table cell</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Input type='text'
|
||||
value="hello"
|
||||
placeholder='Enter text'
|
||||
label='Working example with validation'
|
||||
help='Validation is based on string length.'
|
||||
bsStyle="success"
|
||||
hasFeedback
|
||||
ref='input'
|
||||
groupClassName='group-class'
|
||||
labelClassName='label-class'
|
||||
onChange={this.callback} />
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<form>
|
||||
<Input type='text' label='Text' placeholder='Enter text' />
|
||||
<Input type='email' label='Email Address' placeholder='Enter email' />
|
||||
<Input type='password' label='Password' />
|
||||
<Input type='file' label='File' help='[Optional] Block level help text' />
|
||||
<Input type='checkbox' label='Checkbox' checked readOnly />
|
||||
<Input type='radio' label='Radio' checked readOnly />
|
||||
<Input type='select' label='Select' placeholder='select'>
|
||||
<option value='select'>select</option>
|
||||
<option value='other'>...</option>
|
||||
</Input>
|
||||
<Input type='select' label='Multiple Select' multiple>
|
||||
<option value='select'>select (multiple)</option>
|
||||
<option value='other'>...</option>
|
||||
</Input>
|
||||
<Input type='textarea' label='Text Area' placeholder='textarea' />
|
||||
<ButtonInput value='Button Input' />
|
||||
<ButtonInput type='reset' value='Reset Button' />
|
||||
<ButtonInput type='submit' value='Submit Button' />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<form>
|
||||
<Input type="text" ref="input" onChange={this.callback} />
|
||||
<ButtonInput bsSize="small">Child Text</ButtonInput>
|
||||
<ButtonInput type="reset" bsStyle="primary" onClick={this.callback} />
|
||||
<ButtonInput type="submit" value="Submit Your Input" bsStyle="success" bsSize="large" disabled={false} />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<form>
|
||||
<Input type='text' addonBefore='@' />
|
||||
<Input type='text' addonAfter='.00' />
|
||||
<Input type='text' addonBefore='$' addonAfter='.00' />
|
||||
<Input type='text' addonAfter={innerGlyphicon} />
|
||||
<Input type='text' buttonBefore={innerButton} />
|
||||
<Input type='text' buttonAfter={innerDropdown} />
|
||||
<Input type='text' addonBefore={innerRadio} />
|
||||
<Input type='text' addonBefore={innerCheckbox} />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<form>
|
||||
<Input type='text' bsSize="large" placeholder='Large text' />
|
||||
<Input type='text' bsSize="medium" placeholder='Normal text' />
|
||||
<Input type='text' bsSize="small" placeholder='Small text' />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<form>
|
||||
<Input type='text' bsStyle='success' label='Success' hasFeedback />
|
||||
<Input type='text' bsStyle='warning' label='Warning' hasFeedback />
|
||||
<Input type='text' bsStyle='error' label='Error' hasFeedback />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<form className='form-horizontal'>
|
||||
<Input type='text' label='Text' labelClassName='col-xs-2' wrapperClassName='col-xs-10' />
|
||||
<Input type='textarea' label='Textarea' labelClassName='col-xs-2' wrapperClassName='col-xs-10' />
|
||||
<Input type='checkbox' label='Checkbox' wrapperClassName='col-xs-offset-2 col-xs-10' help='Offset is applied to wrapper.' />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div style={style}>
|
||||
<Input label='Input wrapper' help='Use this when you need something other than the available input types.' wrapperClassName='wrapper'>
|
||||
<Row>
|
||||
<Col xs={6}>
|
||||
<input type='text' className='form-control' />
|
||||
</Col>
|
||||
<Col xs={6}>
|
||||
<input type='text' className='form-control' />
|
||||
</Col>
|
||||
</Row>
|
||||
</Input>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
Vendored
+908
@@ -0,0 +1,908 @@
|
||||
// Type definitions for react-bootstrap
|
||||
// Project: https://github.com/react-bootstrap/react-bootstrap
|
||||
// Definitions by: Walker Burgin <https://github.com/walkerburgin>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
///<reference path="../react/react.d.ts"/>
|
||||
///<reference path="../es6-promise/es6-promise.d.ts" />
|
||||
|
||||
declare module "react-bootstrap" {
|
||||
// Import React
|
||||
import React = require("react");
|
||||
|
||||
|
||||
// <Button />
|
||||
// ----------------------------------------
|
||||
interface ButtonProps {
|
||||
|
||||
// Optional
|
||||
active?: boolean;
|
||||
disabled?: boolean;
|
||||
block?: boolean;
|
||||
bsStyle?: string;
|
||||
bsSize?: string;
|
||||
navItem?: boolean;
|
||||
navDropdown?: boolean;
|
||||
componentClass?: string;
|
||||
href?: string;
|
||||
onClick?: Function; // Add more specific type
|
||||
target?: string;
|
||||
type?: string;
|
||||
}
|
||||
interface Button extends React.ReactElement<ButtonProps> { }
|
||||
interface ButtonClass extends React.ComponentClass<ButtonProps> { }
|
||||
var Button: ButtonClass;
|
||||
|
||||
|
||||
// <ButtonToolbar />
|
||||
// ----------------------------------------
|
||||
interface ButtonToolbarProps {
|
||||
|
||||
// Optional
|
||||
block?: boolean;
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
justified?: boolean;
|
||||
vertical?: boolean;
|
||||
}
|
||||
interface ButtonToolbar extends React.ReactElement<ButtonToolbarProps> { }
|
||||
interface ButtonToolbarClass extends React.ComponentClass<ButtonToolbarProps> { }
|
||||
var ButtonToolbar: ButtonToolbarClass;
|
||||
|
||||
// <ButtonGroup />
|
||||
// ----------------------------------------
|
||||
interface ButtonGroupProps {
|
||||
// Optional
|
||||
block?: boolean;
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
justified?: boolean;
|
||||
vertical?: boolean;
|
||||
}
|
||||
interface ButtonGroup extends React.ReactElement<ButtonGroupProps> { }
|
||||
interface ButtonGroupClass extends React.ComponentClass<ButtonGroupProps> { }
|
||||
var ButtonGroup: ButtonGroupClass;
|
||||
|
||||
|
||||
// <DropdownButton />
|
||||
// ----------------------------------------
|
||||
interface DropdownButtonProps {
|
||||
bsStyle?: string;
|
||||
bsSize?: string;
|
||||
buttonClassName?: string;
|
||||
children?: any; // TODO: Add more specific type
|
||||
className?: string;
|
||||
dropup?: boolean;
|
||||
href?: string;
|
||||
id?: string | number;
|
||||
key?: any; // TODO: Add more specific type
|
||||
navItem?: boolean;
|
||||
noCaret?: boolean;
|
||||
onClick?: Function; // TODO: Add more specifc type
|
||||
onSelect?: Function; // TODO: Add more specific type
|
||||
pullRight?: boolean;
|
||||
title?: any; // TODO: Add more specific type
|
||||
}
|
||||
interface DropdownButton extends React.ReactElement<DropdownButtonProps> { }
|
||||
interface DropdownButtonClass extends React.ComponentClass<DropdownButtonProps> { }
|
||||
var DropdownButton: DropdownButtonClass;
|
||||
|
||||
|
||||
// <SplitButton />
|
||||
// ----------------------------------------
|
||||
interface SplitButtonProps {
|
||||
bsStyle?: string;
|
||||
bsSize?: string;
|
||||
children?: any; // TODO: Add more specific type
|
||||
className?: string;
|
||||
disabled?: boolean;
|
||||
dropdownTitle?: any; // TODO: Add more specific type
|
||||
dropup?: boolean;
|
||||
href?: string;
|
||||
id?: string;
|
||||
onClick?: Function; // TODO: Add more specific type
|
||||
onSelect?: Function; // TODO: Add more specific type
|
||||
pullRight?: boolean;
|
||||
target?: string;
|
||||
title?: any; // TODO: Add more specific type
|
||||
}
|
||||
interface SplitButton extends React.ReactElement<SplitButtonProps> { }
|
||||
interface SplitButtonClass extends React.ComponentClass<SplitButtonProps> { }
|
||||
var SplitButton: SplitButtonClass;
|
||||
|
||||
|
||||
// <MenuItem />
|
||||
// ----------------------------------------
|
||||
interface MenuItemProps {
|
||||
active?: boolean;
|
||||
disabled?: boolean;
|
||||
divider?: boolean;
|
||||
eventKey?: any;
|
||||
header?: boolean;
|
||||
href?: string;
|
||||
key?: any;
|
||||
onSelect?: Function;
|
||||
target?: string;
|
||||
title?: string;
|
||||
}
|
||||
interface MenuItem extends React.ReactElement<MenuItemProps> { }
|
||||
interface MenuItemClass extends React.ComponentClass<MenuItemProps> { }
|
||||
var MenuItem: MenuItemClass;
|
||||
|
||||
|
||||
// <Panel />
|
||||
// ----------------------------------------
|
||||
interface PanelProps {
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
collapsible?: boolean;
|
||||
defaultExpanded?: boolean;
|
||||
eventKey?: any;
|
||||
expanded?: boolean;
|
||||
footer?: any; // TODO: Add more specific type
|
||||
header?: any; // TODO: Add more specific type
|
||||
id?: string;
|
||||
onSelect?: Function; // TODO: Add more specific type
|
||||
onClick?: Function; // TODO: Add more specific type
|
||||
}
|
||||
interface Panel extends React.ReactElement<PanelProps> { }
|
||||
interface PanelClass extends React.ComponentClass<PanelProps> { }
|
||||
var Panel: PanelClass;
|
||||
|
||||
|
||||
// <Accordion />
|
||||
// ----------------------------------------
|
||||
interface AccordionProps {
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
collapsible?: boolean;
|
||||
defaultExpanded?: boolean;
|
||||
eventKey?: any;
|
||||
expanded?: boolean;
|
||||
footer?: any; // TODO: Add more specific type
|
||||
header?: any; // TODO: Add more specific type
|
||||
id?: string;
|
||||
onSelect?: Function; // TODO: Add more specific type
|
||||
}
|
||||
interface Accordion extends React.ReactElement<AccordionProps> { }
|
||||
interface AccordionClass extends React.ComponentClass<AccordionProps> { }
|
||||
var Accordion: AccordionClass;
|
||||
|
||||
|
||||
// <PanelGroup />
|
||||
// ----------------------------------------
|
||||
interface PanelGroupProps {
|
||||
accordion?: boolean;
|
||||
activeKey?: any;
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
children?: any;
|
||||
className?: string;
|
||||
defaultActiveKey?: any;
|
||||
onSelect?: Function;
|
||||
}
|
||||
interface PanelGroup extends React.ReactElement<PanelGroupProps> { }
|
||||
interface PanelGroupClass extends React.ComponentClass<PanelGroupProps> { }
|
||||
var PanelGroup: PanelGroupClass;
|
||||
|
||||
|
||||
// <Modal.Dialog />
|
||||
// ----------------------------------------
|
||||
interface ModalDialogProps {
|
||||
// TODO: Add more specific type
|
||||
}
|
||||
interface ModalDialog extends React.ReactElement<ModalDialogProps> { }
|
||||
interface ModalDialogClass extends React.ComponentClass<ModalHeaderProps> { }
|
||||
|
||||
|
||||
// <Modal.Header />
|
||||
// ----------------------------------------
|
||||
interface ModalHeaderProps {
|
||||
closeButton?: boolean;
|
||||
modalClassName?: string;
|
||||
onHide?: Function;
|
||||
// undefined?: string;
|
||||
}
|
||||
interface ModalHeader extends React.ReactElement<ModalHeaderProps> { }
|
||||
interface ModalHeaderClass extends React.ComponentClass<ModalHeaderProps> { }
|
||||
|
||||
|
||||
// <Modal.Title/>
|
||||
// ----------------------------------------
|
||||
interface ModalTitleProps {
|
||||
modalClassName?: string;
|
||||
}
|
||||
interface ModalTitle extends React.ReactElement<ModalTitleProps> { }
|
||||
interface ModalTitleClass extends React.ComponentClass<ModalTitleProps> { }
|
||||
|
||||
|
||||
// <Modal.Body />
|
||||
// ----------------------------------------
|
||||
interface ModalBodyProps {
|
||||
modalClassName?: string;
|
||||
}
|
||||
interface ModalBody extends React.ReactElement<ModalBodyProps> { }
|
||||
interface ModalBodyClass extends React.ComponentClass<ModalBodyProps> { }
|
||||
|
||||
|
||||
// <Modal.Footer />
|
||||
// ----------------------------------------
|
||||
interface ModalFooterProps {
|
||||
modalClassName?: string;
|
||||
}
|
||||
interface ModalFooter extends React.ReactElement<ModalFooterProps> { }
|
||||
interface ModalFooterClass extends React.ComponentClass<ModalFooterProps> { }
|
||||
|
||||
|
||||
// <Modal />
|
||||
// ----------------------------------------
|
||||
interface ModalProps {
|
||||
// Required
|
||||
onHide: Function;
|
||||
|
||||
// Optional
|
||||
animation?: boolean;
|
||||
autoFocus?: boolean;
|
||||
backdrop?: boolean|string;
|
||||
bsSize?: string;
|
||||
container?: any; // TODO: Add more specific type
|
||||
dialogClassName?: string;
|
||||
dialogComponent?: any; // TODO: Add more specific type
|
||||
enforceFocus?: boolean;
|
||||
keyboard?: boolean;
|
||||
}
|
||||
interface Modal extends React.ReactElement<ModalProps> { }
|
||||
interface ModalClass extends React.ComponentClass<ModalProps> {
|
||||
Header: ModalHeaderClass;
|
||||
Title: ModalTitleClass;
|
||||
Body: ModalBodyClass;
|
||||
Footer: ModalFooterClass;
|
||||
Dialog: ModalDialogClass;
|
||||
}
|
||||
var Modal: ModalClass;
|
||||
|
||||
|
||||
// <OverlayTrigger />
|
||||
// ----------------------------------------
|
||||
interface OverlayTriggerProps {
|
||||
// Required
|
||||
overlay: any; // TODO: Add more specific type
|
||||
|
||||
// Optional
|
||||
animation?: any; // TODO: Add more specific type
|
||||
container?: any; // TODO: Add more specific type
|
||||
containerPadding?: number;
|
||||
defaultOverlayShown?: boolean;
|
||||
delay?: number;
|
||||
delayHide?: number;
|
||||
delayShow?: number;
|
||||
onEnter?: Function;
|
||||
onEntered?: Function;
|
||||
onEntering?: Function;
|
||||
onExit?: Function;
|
||||
onExited?: Function;
|
||||
onExiting?: Function;
|
||||
placement?: string;
|
||||
rootClose?: boolean;
|
||||
trigger?: string;
|
||||
}
|
||||
interface OverlayTrigger extends React.ReactElement<OverlayTriggerProps> { }
|
||||
interface OverlayTriggerClass extends React.ComponentClass<OverlayTriggerProps> { }
|
||||
var OverlayTrigger: OverlayTriggerClass;
|
||||
|
||||
|
||||
// <Tooltip />
|
||||
// ----------------------------------------
|
||||
interface TooltipProps {
|
||||
// Optional
|
||||
arrowOffsetLeft?: number | string;
|
||||
arrowOffsetTop?: number | string;
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
className?: string;
|
||||
id?: string;
|
||||
placement?: string;
|
||||
positionLeft?: number;
|
||||
positionTop?: number;
|
||||
title?: any; // TODO: Add more specific type
|
||||
}
|
||||
interface Tooltip extends React.ReactElement<TooltipProps> { }
|
||||
interface TooltipClass extends React.ComponentClass<TooltipProps> { }
|
||||
var Tooltip: TooltipClass;
|
||||
|
||||
|
||||
// <Popover/>
|
||||
// ----------------------------------------
|
||||
interface PopoverProps {
|
||||
// Optional
|
||||
arrowOffsetLeft?: number | string;
|
||||
arrowOffsetTop?: number | string;
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
id?: string;
|
||||
placement?: string;
|
||||
positionLeft?: number;
|
||||
positionTop?: number;
|
||||
title: any; // TODO: Add more specific type
|
||||
}
|
||||
interface Popover extends React.ReactElement<PopoverProps> { }
|
||||
interface PopoverClass extends React.ComponentClass<PopoverProps> { }
|
||||
var Popover: PopoverClass;
|
||||
|
||||
|
||||
// <Overlay />
|
||||
// ----------------------------------------
|
||||
interface OverlayProps {
|
||||
// Optional
|
||||
animation?: any; // TODO: Add more specific type
|
||||
container?: any; // TODO: Add more specific type
|
||||
containerPadding?: number; // TODO: Add more specific type
|
||||
onEnter?: Function;
|
||||
onEntered?: Function;
|
||||
onEntering?: Function;
|
||||
onExit?: Function;
|
||||
onExited?: Function;
|
||||
onExiting?: Function;
|
||||
onHide?: Function;
|
||||
placement?: string;
|
||||
rootClose?: boolean;
|
||||
show?: boolean;
|
||||
target?: Function;
|
||||
}
|
||||
interface Overlay extends React.ReactElement<OverlayProps> { }
|
||||
interface OverlayClass extends React.ComponentClass<OverlayProps> { }
|
||||
var Overlay: OverlayClass;
|
||||
|
||||
|
||||
// <ProgressBar />
|
||||
// ----------------------------------------
|
||||
interface ProgressBarProps {
|
||||
// Optional
|
||||
active?: boolean;
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
children?: any; // TODO: Add more specific type
|
||||
className?: string;
|
||||
interpolatedClass?: any; // TODO: Add more specific type
|
||||
label?: any; // TODO: Add more specific type
|
||||
key?: number; // TODO: Add more specific type
|
||||
max?: number;
|
||||
min?: number;
|
||||
now?: number;
|
||||
srOnly?: boolean;
|
||||
striped?: boolean;
|
||||
}
|
||||
interface ProgressBar extends React.ReactElement<ProgressBarProps> { }
|
||||
interface ProgressBarClass extends React.ComponentClass<ProgressBarProps> { }
|
||||
var ProgressBar: ProgressBarClass;
|
||||
|
||||
|
||||
// <Nav />
|
||||
// ----------------------------------------
|
||||
// TODO: This one turned into a union of two different types
|
||||
interface NavProps {
|
||||
// Optional
|
||||
activeHref?: string;
|
||||
activeKey?: any;
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
className?: string;
|
||||
collapsible?: boolean;
|
||||
eventKey?: any;
|
||||
expanded?: boolean;
|
||||
id?: string;
|
||||
justified?: boolean;
|
||||
navbar?: boolean;
|
||||
onSelect?: Function;
|
||||
pullRight?: boolean;
|
||||
right?: boolean;
|
||||
stacked?: boolean;
|
||||
ulClassName?: string;
|
||||
ulId?: string;
|
||||
}
|
||||
interface Nav extends React.ReactElement<NavProps> { }
|
||||
interface NavClass extends React.ComponentClass<NavProps> { }
|
||||
var Nav: NavClass;
|
||||
|
||||
|
||||
// <NavItem />
|
||||
// ----------------------------------------
|
||||
interface NavItemProps {
|
||||
active?: boolean;
|
||||
brand?: any; // TODO: Add more specific type
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
componentClass?: any; // TODO: Add more specific type
|
||||
defaultNavExpanded?: boolean;
|
||||
disabled?: boolean;
|
||||
eventKey?: any;
|
||||
fixedBottom?: boolean;
|
||||
fixedTop?: boolean;
|
||||
fluid?: boolean;
|
||||
href?: string;
|
||||
inverse?: boolean;
|
||||
linkId?: string;
|
||||
navExpanded?: boolean;
|
||||
onSelect?: Function;
|
||||
onToggle?: Function;
|
||||
role?: string;
|
||||
staticTop?: boolean;
|
||||
target?: string;
|
||||
title?: string;
|
||||
toggleButton?: any; // TODO: Add more specific type
|
||||
toggleNavKey?: string | number;
|
||||
}
|
||||
interface NavItem extends React.ReactElement<NavItemProps> { }
|
||||
interface NavItemClass extends React.ComponentClass<NavItemProps> { }
|
||||
var NavItem: NavItemClass;
|
||||
|
||||
|
||||
// <Navbar />
|
||||
// ----------------------------------------
|
||||
interface NavbarProps {
|
||||
brand?: any; // TODO: Add more specific type
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
componentClass?: any; // TODO: Add more specific type
|
||||
defaultNavExpanded?: boolean;
|
||||
fixedBottom?: boolean;
|
||||
fixedTop?: boolean;
|
||||
fluid?: boolean;
|
||||
inverse?: boolean;
|
||||
navExpanded?: boolean;
|
||||
onToggle?: Function;
|
||||
role?: string;
|
||||
staticTop?: boolean;
|
||||
toggleButton?: any; // TODO: Add more specific type
|
||||
toggleNavKey?: string | number;
|
||||
}
|
||||
interface Navbar extends React.ReactElement<NavbarProps> { }
|
||||
interface NavbarClass extends React.ComponentClass<NavbarProps> { }
|
||||
var Navbar: NavbarClass;
|
||||
|
||||
|
||||
// <NavDropdown />
|
||||
// ----------------------------------------
|
||||
interface NavDropdownProps {
|
||||
eventKey?: any;
|
||||
title?: string;
|
||||
id?: string;
|
||||
}
|
||||
interface NavDropdown extends React.ReactElement<NavDropdownProps> { }
|
||||
interface NavDropdownClass extends React.ComponentClass<NavDropdownProps> { }
|
||||
var NavDropdown: NavDropdownClass;
|
||||
|
||||
|
||||
// <Tabs />
|
||||
// ----------------------------------------
|
||||
interface TabsProps {
|
||||
activeKey?: any;
|
||||
animation?: boolean;
|
||||
bsStyle?: string;
|
||||
defaultActiveKey?: any;
|
||||
id?: string | number;
|
||||
onSelect?: Function;
|
||||
paneWidth?: any; // TODO: Add more specific type
|
||||
position?: string;
|
||||
tabWidth?: any; // TODO: Add more specific type
|
||||
}
|
||||
interface Tabs extends React.ReactElement<TabsProps> { }
|
||||
interface TabsClass extends React.ComponentClass<TabsProps> { }
|
||||
var Tabs: TabsClass;
|
||||
|
||||
|
||||
// <Tab />
|
||||
// ----------------------------------------
|
||||
interface TabProps {
|
||||
animation?: boolean;
|
||||
disabled?: boolean;
|
||||
eventKey?: any; // TODO: Add more specific type
|
||||
title?: any; // TODO: Add more specific type
|
||||
}
|
||||
interface Tab extends React.ReactElement<TabProps> { }
|
||||
interface TabClass extends React.ComponentClass<TabProps> { }
|
||||
var Tab: TabClass;
|
||||
|
||||
|
||||
// <Pager />
|
||||
// ----------------------------------------
|
||||
interface PagerProps {
|
||||
onSelect?: Function;
|
||||
}
|
||||
interface Pager extends React.ReactElement<PagerProps> { }
|
||||
interface PagerClass extends React.ComponentClass<PagerProps> { }
|
||||
var Pager: PagerClass;
|
||||
|
||||
|
||||
// <PageItem />
|
||||
// ----------------------------------------
|
||||
interface PageItemProps {
|
||||
disabled?: boolean;
|
||||
eventKey?: any;
|
||||
href?: string;
|
||||
next?: boolean;
|
||||
onSelect?: Function;
|
||||
previous?: boolean;
|
||||
target?: string;
|
||||
title?: string;
|
||||
}
|
||||
interface PageItem extends React.ReactElement<PageItemProps> { }
|
||||
interface PageItemClass extends React.ComponentClass<PageItemProps> { }
|
||||
var PageItem: PageItemClass;
|
||||
|
||||
|
||||
// <Pagination />
|
||||
// ----------------------------------------
|
||||
interface PaginationProps {
|
||||
activePage?: number;
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
buttonComponentClass?: any; // TODO: Add more specific type
|
||||
ellipsis?: boolean;
|
||||
first?: boolean;
|
||||
items?: number;
|
||||
last?: boolean;
|
||||
maxButtons?: number;
|
||||
next?: boolean;
|
||||
onSelect?: Function;
|
||||
prev?: boolean;
|
||||
}
|
||||
interface Pagination extends React.ReactElement<PaginationProps> { }
|
||||
interface PaginationClass extends React.ComponentClass<PaginationProps> { }
|
||||
var Pagination: PaginationClass;
|
||||
|
||||
|
||||
// <Alert />
|
||||
// ----------------------------------------
|
||||
interface AlertProps {
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
closeLabel?: string;
|
||||
dismissAfter?: number;
|
||||
onDismiss?: Function;
|
||||
}
|
||||
interface Alert extends React.ReactElement<AlertProps> { }
|
||||
interface AlertClass extends React.ComponentClass<AlertProps> { }
|
||||
var Alert: AlertClass;
|
||||
|
||||
|
||||
// <Carousel />
|
||||
// ----------------------------------------
|
||||
interface CarouselProps {
|
||||
activeIndex?: number;
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
controls?: boolean;
|
||||
defaultActiveIndex?: number;
|
||||
direction?: string;
|
||||
indicators?: boolean;
|
||||
interval?: number;
|
||||
nextIcon?: any; // TODO: Add more specific type
|
||||
onSelect?: Function;
|
||||
onSlideEnd?: Function;
|
||||
pauseOnHover?: boolean;
|
||||
prevIcon?: any; // TODO: Add more specific type
|
||||
slide?: boolean;
|
||||
wrap?: boolean;
|
||||
}
|
||||
interface Carousel extends React.ReactElement<CarouselProps> { }
|
||||
interface CarouselClass extends React.ComponentClass<CarouselProps> { }
|
||||
var Carousel: CarouselClass;
|
||||
|
||||
|
||||
// <CarouselItem />
|
||||
// ----------------------------------------
|
||||
interface CarouselItemProps {
|
||||
active?: boolean;
|
||||
animtateIn?: boolean;
|
||||
animateOut?: boolean;
|
||||
caption?: any; // TODO: Add more specific type
|
||||
direction?: string;
|
||||
index?: number;
|
||||
onAnimateOutEnd?: Function;
|
||||
}
|
||||
interface CarouselItem extends React.ReactElement<CarouselItemProps> { }
|
||||
interface CarouselItemClass extends React.ComponentClass<CarouselItemProps> { }
|
||||
var CarouselItem: CarouselItemClass;
|
||||
|
||||
|
||||
// <Grid />
|
||||
// ----------------------------------------
|
||||
interface GridProps {
|
||||
componentClass?: any; // TODO: Add more specific type
|
||||
fluid?: boolean;
|
||||
}
|
||||
interface Grid extends React.ReactElement<GridProps> { }
|
||||
interface GridClass extends React.ComponentClass<GridProps> { }
|
||||
var Grid: GridClass;
|
||||
|
||||
|
||||
// <Row />
|
||||
// ----------------------------------------
|
||||
interface RowProps {
|
||||
className?: string;
|
||||
componentClass?: any; // TODO: Add more specific type
|
||||
}
|
||||
interface Row extends React.ReactElement<RowProps> { }
|
||||
interface RowClass extends React.ComponentClass<RowProps> { }
|
||||
var Row: RowClass;
|
||||
|
||||
|
||||
// <Col />
|
||||
// ----------------------------------------
|
||||
interface ColProps {
|
||||
componentClass?: any; // TODO: Add more specific type
|
||||
lg?: number;
|
||||
lgOffset?: number;
|
||||
lgPull?: number;
|
||||
lgPush?: number;
|
||||
md?: number;
|
||||
mdOffset?: number;
|
||||
mdPull?: number;
|
||||
mdPush?: number;
|
||||
sm?: number;
|
||||
smOffset?: number;
|
||||
smPull?: number;
|
||||
smPush?: number;
|
||||
xs?: number;
|
||||
xsOffset?: number;
|
||||
xsPull?: number;
|
||||
xsPush?: number;
|
||||
}
|
||||
interface Col extends React.ReactElement<ColProps> { }
|
||||
interface ColClass extends React.ComponentClass<ColProps> { }
|
||||
var Col: ColClass;
|
||||
|
||||
|
||||
// <Thumbnail />
|
||||
// ----------------------------------------
|
||||
interface ThumbnailProps {
|
||||
alt?: string;
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
href?: string;
|
||||
src?: string;
|
||||
}
|
||||
interface Thumbnail extends React.ReactElement<ThumbnailProps> { }
|
||||
interface ThumbnailClass extends React.ComponentClass<ThumbnailProps> { }
|
||||
var Thumbnail: ThumbnailClass;
|
||||
|
||||
|
||||
// <ListGroup />
|
||||
// ----------------------------------------
|
||||
interface ListGroupProps {
|
||||
className?: string;
|
||||
id?: string | number;
|
||||
fill?: boolean; // TODO: Add more specific type
|
||||
}
|
||||
interface ListGroup extends React.ReactElement<ListGroupProps> { }
|
||||
interface ListGroupClass extends React.ComponentClass<ListGroupProps> { }
|
||||
var ListGroup: ListGroupClass;
|
||||
|
||||
|
||||
// <ListGroupItem />
|
||||
// ----------------------------------------
|
||||
interface ListGroupItemProps {
|
||||
active?: any;
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
className?: string;
|
||||
disabled?: any;
|
||||
eventKey?: any;
|
||||
header?: any; // TODO: Add more specific type
|
||||
href?: string;
|
||||
key?: any; // TODO: Add more specific type
|
||||
listItem?: boolean;
|
||||
onClick?: Function; // TODO: Add more specific type
|
||||
target?: string;
|
||||
}
|
||||
interface ListGroupItem extends React.ReactElement<ListGroupItemProps> { }
|
||||
interface ListGroupItemClass extends React.ComponentClass<ListGroupItemProps> { }
|
||||
var ListGroupItem: ListGroupItemClass;
|
||||
|
||||
|
||||
// <Label />
|
||||
// ----------------------------------------
|
||||
interface LabelProps {
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
}
|
||||
interface Label extends React.ReactElement<LabelProps> { }
|
||||
interface LabelClass extends React.ComponentClass<LabelProps> { }
|
||||
var Label: LabelClass;
|
||||
|
||||
|
||||
// <Badge />
|
||||
// ----------------------------------------
|
||||
interface BadgeProps {
|
||||
pullRight?: boolean;
|
||||
}
|
||||
interface Badge extends React.ReactElement<BadgeProps> { }
|
||||
interface BadgeClass extends React.ComponentClass<BadgeProps> { }
|
||||
var Badge: BadgeClass;
|
||||
|
||||
|
||||
// <Jumbotron />
|
||||
// ----------------------------------------
|
||||
interface JumbotronProps {
|
||||
componentClass?: any; // TODO: Add more specific type
|
||||
}
|
||||
interface Jumbotron extends React.ReactElement<JumbotronProps> { }
|
||||
interface JumbotronClass extends React.ComponentClass<JumbotronProps> { }
|
||||
var Jumbotron: JumbotronClass;
|
||||
|
||||
|
||||
// <PageHeader />
|
||||
// ----------------------------------------
|
||||
interface PageHeaderProps {
|
||||
// No props
|
||||
}
|
||||
interface PageHeader extends React.ReactElement<PageHeaderProps> { }
|
||||
interface PageHeaderClass extends React.ComponentClass<PageHeaderProps> { }
|
||||
var PageHeader: PageHeaderClass;
|
||||
|
||||
|
||||
// <Well />
|
||||
// ----------------------------------------
|
||||
interface WellProps {
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
}
|
||||
interface Well extends React.ReactElement<WellProps> { }
|
||||
interface WellClass extends React.ComponentClass<WellProps> { }
|
||||
var Well: WellClass;
|
||||
|
||||
|
||||
// <Glyphicon />
|
||||
// ----------------------------------------
|
||||
interface GlyphiconProps {
|
||||
// Required
|
||||
glyph: string;
|
||||
}
|
||||
interface Glyphicon extends React.ReactElement<GlyphiconProps> { }
|
||||
interface GlyphiconClass extends React.ComponentClass<GlyphiconProps> { }
|
||||
var Glyphicon: GlyphiconClass;
|
||||
|
||||
|
||||
// <Table />
|
||||
// ----------------------------------------
|
||||
interface TableProps {
|
||||
bordered?: boolean;
|
||||
condensed?: boolean;
|
||||
hover?: boolean;
|
||||
responsive?: boolean;
|
||||
striped?: boolean;
|
||||
}
|
||||
interface Table extends React.ReactElement<TableProps> { }
|
||||
interface TableClass extends React.ComponentClass<TableProps> { }
|
||||
var Table: TableClass;
|
||||
|
||||
|
||||
// <Input />
|
||||
// ----------------------------------------
|
||||
interface InputProps {
|
||||
addonAfter?: any; // TODO: Add more specific type
|
||||
addonBefore?: any; // TODO: Add more specific type
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
buttonAfter?: any; // TODO: Add more specific type
|
||||
buttonBefore?: any; // TODO: Add more specific type
|
||||
checked?: boolean;
|
||||
disabled?: boolean;
|
||||
feedbackIcon?: any; // TODO: Add more specific type
|
||||
groupClassName?: string;
|
||||
hasFeedback?: boolean;
|
||||
help?: any; // TODO: Add more specific type
|
||||
id?: string | number;
|
||||
label?: any; // TODO: Add more specific type
|
||||
labelClassName?: string;
|
||||
multiple?: boolean;
|
||||
placeholder?: string;
|
||||
ref?: string;
|
||||
readOnly?: boolean;
|
||||
type?: string;
|
||||
onChange?: Function; // TODO: Add more specific type
|
||||
onKeyDown?: Function; // TODO: Add more specific type
|
||||
onKeyUp?: Function; // TODO: Add more specific type
|
||||
onKeyPress?: Function; // TODO: Add more specific type
|
||||
value?: any; // TODO: Add more specific type
|
||||
wrapperClassName?: string;
|
||||
}
|
||||
interface Input extends React.ReactElement<InputProps> { }
|
||||
interface InputClass extends React.ComponentClass<InputProps> { }
|
||||
var Input: InputClass;
|
||||
|
||||
|
||||
// <ButtonInput />
|
||||
// ----------------------------------------
|
||||
interface ButtonInputProps {
|
||||
addonAfter?: any; // TODO: Add more specific type
|
||||
addonBefore?: any; // TODO: Add more specific type
|
||||
bsSize?: string;
|
||||
bsStyle?: string;
|
||||
buttonAfter?: any; // TODO: Add more specific type
|
||||
buttonBefore?: any; // TODO: Add more specific type
|
||||
disabled?: boolean;
|
||||
feedbackIcon?: any; // TODO: Add more specific type
|
||||
groupClassName?: string;
|
||||
hasFeedback?: boolean;
|
||||
help?: any; // TODO: Add more specific type
|
||||
id?: string | number;
|
||||
label?: any; // TODO: Add more specific type
|
||||
labelClassName?: string;
|
||||
multiple?: boolean;
|
||||
onClick?: Function; // TODO: Add more specific type
|
||||
type?: string;
|
||||
value?: any; // TODO: Add more specific type
|
||||
wrapperClassName?: string;
|
||||
}
|
||||
interface ButtonInput extends React.ReactElement<ButtonInputProps> { }
|
||||
interface ButtonInputClass extends React.ComponentClass<ButtonInputProps> { }
|
||||
var ButtonInput: ButtonInputClass;
|
||||
|
||||
|
||||
// TODO: FormControls.Static
|
||||
|
||||
|
||||
// <Portal />
|
||||
// ----------------------------------------
|
||||
interface PortalProps {
|
||||
dimension?: string | Function;
|
||||
getDimensionValue?: Function;
|
||||
in?: boolean;
|
||||
onEnter?: Function;
|
||||
onEntered?: Function;
|
||||
onEntering?: Function;
|
||||
onExit?: Function;
|
||||
onExited?: Function;
|
||||
onExiting?: Function;
|
||||
role?: string;
|
||||
timeout?: number;
|
||||
transitionAppear?: boolean;
|
||||
unmountOnExit?: boolean;
|
||||
}
|
||||
interface Portal extends React.ReactElement<PortalProps> { }
|
||||
interface PortalClass extends React.ComponentClass<PortalProps> { }
|
||||
var Portal: PortalClass;
|
||||
|
||||
|
||||
// <Position />
|
||||
// ----------------------------------------
|
||||
interface PositionProps {
|
||||
dimension?: string | Function;
|
||||
getDimensionValue?: Function;
|
||||
in?: boolean;
|
||||
onEnter?: Function;
|
||||
onEntered?: Function;
|
||||
onEntering?: Function;
|
||||
onExit?: Function;
|
||||
onExited?: Function;
|
||||
onExiting?: Function;
|
||||
role?: string;
|
||||
timeout?: number;
|
||||
transitionAppear?: boolean;
|
||||
unmountOnExit?: boolean;
|
||||
}
|
||||
interface Position extends React.ReactElement<PositionProps> { }
|
||||
interface PositionClass extends React.ComponentClass<PositionProps> { }
|
||||
var Position: PositionClass;
|
||||
|
||||
|
||||
// <Fade />
|
||||
// ----------------------------------------
|
||||
interface FadeProps {
|
||||
in?: boolean;
|
||||
onEnter?: Function;
|
||||
onEntered?: Function;
|
||||
onEntering?: Function;
|
||||
onExit?: Function;
|
||||
onExited?: Function;
|
||||
onExiting?: Function;
|
||||
timeout?: number;
|
||||
transitionAppear?: boolean;
|
||||
unmountOnExit?: boolean;
|
||||
}
|
||||
interface Fade extends React.ReactElement<FadeProps> { }
|
||||
interface FadeClass extends React.ComponentClass<FadeProps> { }
|
||||
var Fade: FadeClass;
|
||||
}
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
// Type definitions for React-DOM v0.14.0-rc
|
||||
// Project: https://www.npmjs.com/package/react-dom
|
||||
// Definitions by: Stefan-Bieliauskas <http://www.conts.de>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="./../react/react.d.ts" />
|
||||
|
||||
declare class __ReactDom {
|
||||
public render<P>(
|
||||
element: __React.DOMElement<P>,
|
||||
container: Element,
|
||||
callback?: () => any): __React.DOMComponent<P>;
|
||||
public render<P, S>(
|
||||
element: __React.ClassicElement<P>,
|
||||
container: Element,
|
||||
callback?: () => any): __React.ClassicComponent<P, S>;
|
||||
public render<P, S>(
|
||||
element: __React.ReactElement<P>,
|
||||
container: Element,
|
||||
callback?: () => any): __React.Component<P, S>;
|
||||
|
||||
public findDOMNode<TElement extends Element>(
|
||||
componentOrElement: __React.Component<any, any> | Element): TElement;
|
||||
public findDOMNode(
|
||||
componentOrElement: __React.Component<any, any> | Element): Element;
|
||||
|
||||
public unmountComponentAtNode(container: Element): boolean;
|
||||
}
|
||||
|
||||
declare class __ReactDomServer {
|
||||
public renderToString(element: __React.ReactElement<any>): string;
|
||||
public renderToStaticMarkup(element: __React.ReactElement<any>): string;
|
||||
}
|
||||
declare module "react-dom" {
|
||||
export = __ReactDom
|
||||
}
|
||||
|
||||
declare module "react-dom/server" {
|
||||
export = __ReactDomServer
|
||||
}
|
||||
Vendored
+8
-3
@@ -85,14 +85,19 @@ declare namespace __React {
|
||||
// Reat.addons.update
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
interface UpdateSpec {
|
||||
interface UpdateSpecCommand {
|
||||
$set?: any;
|
||||
$merge?: {};
|
||||
$apply?(value: any): any;
|
||||
// [key: string]: UpdateSpec;
|
||||
}
|
||||
|
||||
interface UpdateArraySpec extends UpdateSpec {
|
||||
interface UpdateSpecPath {
|
||||
[key: string]: UpdateSpec;
|
||||
}
|
||||
|
||||
type UpdateSpec = UpdateSpecCommand | UpdateSpecPath;
|
||||
|
||||
interface UpdateArraySpec extends UpdateSpecCommand {
|
||||
$push?: any[];
|
||||
$unshift?: any[];
|
||||
$splice?: any[][];
|
||||
|
||||
Vendored
+12
-7
@@ -136,7 +136,7 @@ declare namespace __React {
|
||||
static contextTypes: ValidationMap<any>;
|
||||
static childContextTypes: ValidationMap<any>;
|
||||
static defaultProps: Props<any>;
|
||||
|
||||
|
||||
constructor(props?: P, context?: any);
|
||||
setState(f: (prevState: S, props: P) => S, callback?: () => any): void;
|
||||
setState(state: S, callback?: () => any): void;
|
||||
@@ -376,7 +376,7 @@ declare namespace __React {
|
||||
onTouchStart?: TouchEventHandler;
|
||||
onScroll?: UIEventHandler;
|
||||
onWheel?: WheelEventHandler;
|
||||
|
||||
|
||||
className?: string;
|
||||
id?: string;
|
||||
|
||||
@@ -944,7 +944,7 @@ declare module "react/addons" {
|
||||
static contextTypes: ValidationMap<any>;
|
||||
static childContextTypes: ValidationMap<any>;
|
||||
static defaultProps: Props<any>;
|
||||
|
||||
|
||||
constructor(props?: P, context?: any);
|
||||
setState(f: (prevState: S, props: P) => S, callback?: () => any): void;
|
||||
setState(state: S, callback?: () => any): void;
|
||||
@@ -1613,7 +1613,7 @@ declare module "react/addons" {
|
||||
item(index: number): Touch;
|
||||
identifiedTouch(identifier: number): Touch;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// React.addons
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -1691,14 +1691,19 @@ declare module "react/addons" {
|
||||
// Reat.addons.update
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
interface UpdateSpec {
|
||||
interface UpdateSpecCommand {
|
||||
$set?: any;
|
||||
$merge?: {};
|
||||
$apply?(value: any): any;
|
||||
// [key: string]: UpdateSpec;
|
||||
}
|
||||
|
||||
interface UpdateArraySpec extends UpdateSpec {
|
||||
interface UpdateSpecPath {
|
||||
[key: string]: UpdateSpec;
|
||||
}
|
||||
|
||||
type UpdateSpec = UpdateSpecCommand | UpdateSpecPath;
|
||||
|
||||
interface UpdateArraySpec extends UpdateSpecCommand {
|
||||
$push?: any[];
|
||||
$unshift?: any[];
|
||||
$splice?: any[][];
|
||||
|
||||
Vendored
+1
@@ -264,6 +264,7 @@ declare module Sinon {
|
||||
fakeHTTPMethods: boolean;
|
||||
getHTTPMethod: (request: SinonFakeXMLHttpRequest) => string;
|
||||
requests: SinonFakeXMLHttpRequest[];
|
||||
respondImmediately: boolean;
|
||||
|
||||
// Methods
|
||||
respondWith(body: string): void;
|
||||
|
||||
Vendored
+97
-47
@@ -217,7 +217,7 @@ declare module Slick {
|
||||
* @extends Slick.NonDataItem
|
||||
* @constructor
|
||||
*/
|
||||
export class Group<T, R> extends NonDataRow {
|
||||
export class Group<T extends SlickData> extends NonDataRow {
|
||||
|
||||
constructor();
|
||||
|
||||
@@ -240,7 +240,7 @@ declare module Slick {
|
||||
* @property value
|
||||
* @type {Object}
|
||||
*/
|
||||
public value: T;
|
||||
public value: any;
|
||||
|
||||
/***
|
||||
* Formatted display value of the group.
|
||||
@@ -261,21 +261,21 @@ declare module Slick {
|
||||
* @property totals
|
||||
* @type {GroupTotals}
|
||||
*/
|
||||
public totals: GroupTotals<T, R>;
|
||||
public totals: GroupTotals<T>;
|
||||
|
||||
/**
|
||||
* Rows that are part of the group.
|
||||
* @property rows
|
||||
* @type {Array}
|
||||
*/
|
||||
public rows: R[];
|
||||
public rows: T[];
|
||||
|
||||
/**
|
||||
* Sub-groups that are part of the group.
|
||||
* @property groups
|
||||
* @type {Array}
|
||||
*/
|
||||
public groups: Group<T, R>[];
|
||||
public groups: Group<T>[];
|
||||
|
||||
/**
|
||||
* A unique key used to identify the group. This key can be used in calls to DataView
|
||||
@@ -292,7 +292,7 @@ declare module Slick {
|
||||
* @param group {Group} Group instance to compare to.
|
||||
* todo: this is on the prototype (NonDataRow()) instance, not Group, maybe doesn't matter?
|
||||
*/
|
||||
public equals(group: Group<T, R>): boolean;
|
||||
public equals(group: Group<T>): boolean;
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -304,7 +304,7 @@ declare module Slick {
|
||||
* @extends Slick.NonDataItem
|
||||
* @constructor
|
||||
*/
|
||||
export class GroupTotals<T, R> extends NonDataRow {
|
||||
export class GroupTotals<T> extends NonDataRow {
|
||||
|
||||
constructor();
|
||||
|
||||
@@ -313,7 +313,7 @@ declare module Slick {
|
||||
* @param group
|
||||
* @type {Group}
|
||||
*/
|
||||
public group: Group<T, R>;
|
||||
public group: Group<T>;
|
||||
|
||||
}
|
||||
|
||||
@@ -690,14 +690,86 @@ declare module Slick {
|
||||
}
|
||||
|
||||
export interface DataProvider<T extends SlickData> {
|
||||
getItem(index: number): T;
|
||||
/**
|
||||
* Returns the number of data items in the set.
|
||||
*/
|
||||
getLength(): number;
|
||||
|
||||
/**
|
||||
* Returns the item at a given index.
|
||||
* @param index
|
||||
*/
|
||||
getItem(index: number): T;
|
||||
|
||||
/**
|
||||
* Returns the metadata for the item at a given index (optional).
|
||||
* @param index
|
||||
*/
|
||||
getItemMetadata?(index: number): RowMetadata<T>;
|
||||
}
|
||||
|
||||
export interface SlickData {
|
||||
// todo ? might be able to leave as empty
|
||||
}
|
||||
|
||||
export interface RowMetadata<T> {
|
||||
/**
|
||||
* One or more (space-separated) CSS classes to be added to the entire row.
|
||||
*/
|
||||
cssClasses?: string;
|
||||
|
||||
/**
|
||||
* Whether or not any cells in the row can be set as "active".
|
||||
*/
|
||||
focusable?: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not a row or any cells in it can be selected.
|
||||
*/
|
||||
selectable?: boolean;
|
||||
|
||||
/**
|
||||
* Metadata related to individual columns
|
||||
*/
|
||||
columns?: {
|
||||
/**
|
||||
* Metadata indexed by column id
|
||||
*/
|
||||
[index: string]: ColumnMetadata<T>;
|
||||
/**
|
||||
* Metadata indexed by column index
|
||||
*/
|
||||
[index: number]: ColumnMetadata<T>;
|
||||
}
|
||||
}
|
||||
|
||||
export interface ColumnMetadata<T extends SlickData> {
|
||||
/**
|
||||
* Whether or not a cell can be set as "active".
|
||||
*/
|
||||
focusable?: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not a cell can be selected.
|
||||
*/
|
||||
selectable?: boolean;
|
||||
|
||||
/**
|
||||
* A custom cell formatter.
|
||||
*/
|
||||
formatter?: Formatter<T>;
|
||||
|
||||
/**
|
||||
* A custom cell editor.
|
||||
*/
|
||||
editor?: Slick.Editors.Editor<T>;
|
||||
|
||||
/**
|
||||
* Number of columns this cell will span. Can also contain "*" to indicate that the cell should span the rest of the row.
|
||||
*/
|
||||
colspan?: number|string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Selecting cells in SlickGrid is handled by a selection model.
|
||||
* Selection models are controllers responsible for handling user interactions and notifying subscribers of the changes in the selection. Selection is represented as an array of Slick.Range objects.
|
||||
@@ -1489,8 +1561,7 @@ declare module Slick {
|
||||
public fastSort(field: string, ascending: boolean): void;
|
||||
public fastSort(field: Function, ascending: boolean): void; // todo: typeof(field), should be the same callback as Array.sort
|
||||
public reSort(): void;
|
||||
public setGrouping(groupingInfos: GroupingOptions<T>[]): void;
|
||||
public setGrouping(groupingInfo: GroupingOptions<T>): void;
|
||||
public setGrouping(groupingInfos: GroupingOptions<T> | GroupingOptions<T>[]): void;
|
||||
public getGrouping(): GroupingOptions<T>[];
|
||||
|
||||
/**
|
||||
@@ -1528,7 +1599,7 @@ declare module Slick {
|
||||
* the 'high' setGrouping.
|
||||
*/
|
||||
public expandGroup(...varArgs: string[]): void;
|
||||
public getGroups(): Group<T, any>[];
|
||||
public getGroups(): Group<T>[];
|
||||
public getIdxById(id: string): number;
|
||||
public getRowById(id: string): number;
|
||||
public getItemById(id: any): T;
|
||||
@@ -1546,7 +1617,7 @@ declare module Slick {
|
||||
|
||||
public getLength(): number;
|
||||
public getItem(index: number): T;
|
||||
public getItemMetadata(index?: number): TotalsRowMetadata<T>;
|
||||
public getItemMetadata(index: number): RowMetadata<T>;
|
||||
|
||||
public onRowCountChanged: Slick.Event<OnRowCountChangedEventData>;
|
||||
public onRowsChanged: Slick.Event<OnRowsChangedEventData>;
|
||||
@@ -1554,16 +1625,16 @@ declare module Slick {
|
||||
}
|
||||
|
||||
export interface GroupingOptions<T> {
|
||||
getter: Function; // todo
|
||||
formatter: Formatter<T>;
|
||||
comparer: (a:any, b:any) => any; // todo
|
||||
predefinedValues: any[]; // todo
|
||||
aggregators: Aggregators.Aggregator<T>[];
|
||||
aggregateEmpty: boolean;
|
||||
aggregateCollapsed: boolean;
|
||||
aggregateChildGroups: boolean;
|
||||
collapsed: boolean;
|
||||
displayTotalsRow: boolean;
|
||||
getter?: ((item?: T) => any) | string;
|
||||
formatter?: (item?: T) => string;
|
||||
comparer?: (a: Group<T>, b: Group<T>) => number;
|
||||
predefinedValues?: any[]; // todo
|
||||
aggregators?: Aggregators.Aggregator<T>[];
|
||||
aggregateEmpty?: boolean;
|
||||
aggregateCollapsed?: boolean;
|
||||
aggregateChildGroups?: boolean;
|
||||
collapsed?: boolean;
|
||||
displayTotalsRow?: boolean;
|
||||
}
|
||||
|
||||
export interface PagingOptions {
|
||||
@@ -1596,7 +1667,7 @@ declare module Slick {
|
||||
public field: string;
|
||||
public init(): void;
|
||||
public accumulate(item: T): void;
|
||||
public storeResult(groupTotals: GroupTotals<T, any>): void; // todo "R"
|
||||
public storeResult(groupTotals: GroupTotals<T>): void;
|
||||
}
|
||||
|
||||
export class Avg<T> extends Aggregator<T> {
|
||||
@@ -1633,29 +1704,8 @@ declare module Slick {
|
||||
export class GroupItemMetadataProvider<T extends Slick.SlickData> {
|
||||
public init(): void;
|
||||
public destroy(): void;
|
||||
public getGroupRowMetadata(): GroupRowMetadata<T>;
|
||||
public getTotalsRowMetadata(): TotalsRowMetadata<T>;
|
||||
}
|
||||
|
||||
export interface GroupRowMetadata<T extends Slick.SlickData> {
|
||||
selectable: boolean;
|
||||
focusable: boolean;
|
||||
cssClasses: string;
|
||||
columns: {
|
||||
0: {
|
||||
colspan: string;
|
||||
formatter: Formatter<T>;
|
||||
editor: Slick.Editors.Editor<T>;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export interface TotalsRowMetadata<T extends Slick.SlickData> {
|
||||
selectable: boolean;
|
||||
focusable: boolean;
|
||||
cssClasses: string;
|
||||
formatter: Formatter<T>;
|
||||
editor: Slick.Editors.Editor<T>;
|
||||
public getGroupRowMetadata(item?: Group<T>): RowMetadata<T>;
|
||||
public getTotalsRowMetadata(item?: GroupTotals<T>): RowMetadata<T>;
|
||||
}
|
||||
|
||||
export interface GroupItemMetadataProviderOptions {
|
||||
|
||||
Vendored
+1
-1
@@ -687,7 +687,7 @@ declare module SocketIO {
|
||||
* Removes all event listeners on this object
|
||||
* @return This Socket
|
||||
*/
|
||||
removeAllListeners(): Socket;
|
||||
removeAllListeners( event?: string ): Socket;
|
||||
|
||||
/**
|
||||
* Sets the maximum number of listeners this instance can have
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/// <reference path="./sockjs-client.d.ts" />
|
||||
|
||||
import * as SockJS from 'sockjs-client';
|
||||
import BaseEvent = __SockJSClient.BaseEvent;
|
||||
import SockJSClass = __SockJSClient.SockJSClass;
|
||||
|
||||
let sockJs: SockJSClass;
|
||||
|
||||
sockJs = new SockJS('url');
|
||||
sockJs = SockJS('url');
|
||||
sockJs = SockJS('url', null, {
|
||||
server: '1233445',
|
||||
sessionId: 23,
|
||||
transports: 'websocket'
|
||||
});
|
||||
sockJs = SockJS('url', null, {
|
||||
sessionId: () => 'SID',
|
||||
transports: ['websocket', 'eventsource']
|
||||
});
|
||||
|
||||
let listener = (e: BaseEvent) => e;
|
||||
let listenerObj = {
|
||||
handleEvent: (e: BaseEvent) => e
|
||||
};
|
||||
|
||||
sockJs.addEventListener('onopen', listener);
|
||||
sockJs.addEventListener('onclose', listener, true);
|
||||
sockJs.addEventListener('onopen', listenerObj);
|
||||
sockJs.addEventListener('onclose', listenerObj, true);
|
||||
|
||||
sockJs.removeEventListener('onopen', listener);
|
||||
sockJs.removeEventListener('onclose', listener, true);
|
||||
sockJs.removeEventListener('onopen', listenerObj);
|
||||
sockJs.removeEventListener('onclose', listenerObj, true);
|
||||
|
||||
sockJs.onopen = e => console.log(e);
|
||||
sockJs.onmessage = e => console.log(e.data);
|
||||
sockJs.onclose = e => console.log(e.code, e.reason, e.wasClean);
|
||||
|
||||
let testStates = SockJS.CONNECTING !== -1 && SockJS.OPEN !== -1 &&
|
||||
SockJS.CLOSING !== -1 && SockJS.CLOSED !== -1;
|
||||
|
||||
sockJs.send('send');
|
||||
sockJs.send({x: 1});
|
||||
|
||||
sockJs.close(100, 'reason');
|
||||
sockJs.close(200);
|
||||
sockJs.close();
|
||||
Vendored
+65
@@ -0,0 +1,65 @@
|
||||
// Type definitions for sockjs-client 1.0.3
|
||||
// Project: https://github.com/sockjs/sockjs-client
|
||||
// Definitions by: Emil Ivanov <https://github.com/vladev>, Alexander Rusakov <https://github.com/arusakov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare namespace __SockJSClient {
|
||||
interface BaseEvent {
|
||||
type: string;
|
||||
}
|
||||
|
||||
interface OpenEvent extends BaseEvent {}
|
||||
|
||||
interface CloseEvent extends BaseEvent {
|
||||
code: number;
|
||||
reason: string;
|
||||
wasClean: boolean;
|
||||
}
|
||||
|
||||
interface MessageEvent extends BaseEvent {
|
||||
data: string;
|
||||
}
|
||||
|
||||
interface SessionGenerator {
|
||||
(): string;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
server?: string;
|
||||
sessionId?: number | SessionGenerator;
|
||||
transports?: string | string[]
|
||||
}
|
||||
|
||||
enum State {
|
||||
CONNECTING = 0, OPEN, CLOSING, CLOSED
|
||||
}
|
||||
|
||||
interface SockJSClass extends EventTarget {
|
||||
readyState: State;
|
||||
protocol: string;
|
||||
url: string;
|
||||
onopen: (e: OpenEvent) => any;
|
||||
onclose: (e: CloseEvent) => any;
|
||||
onmessage: (e: MessageEvent) => any;
|
||||
send(data: any): void;
|
||||
close(code?: number, reason?: string): void;
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'sockjs-client' {
|
||||
import SockJSClass = __SockJSClient.SockJSClass;
|
||||
import Options = __SockJSClient.Options;
|
||||
import State = __SockJSClient.State;
|
||||
|
||||
var SockJS: {
|
||||
new(url: string, _reserved?: any, options?: Options): SockJSClass;
|
||||
(url: string, _reserved?: any, options?: Options): SockJSClass;
|
||||
prototype: SockJSClass;
|
||||
CONNECTING: State;
|
||||
OPEN: State;
|
||||
CLOSING: State;
|
||||
CLOSED: State;
|
||||
};
|
||||
|
||||
export = SockJS;
|
||||
}
|
||||
@@ -11,7 +11,7 @@ function testSourceMapConsumer() {
|
||||
version: 'foo',
|
||||
sources: ['foo', 'bar'],
|
||||
names: ['foo', 'bar'],
|
||||
sourcesContent: 'foo',
|
||||
sourcesContent: ['foo'],
|
||||
mappings: 'foo'
|
||||
});
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -13,7 +13,7 @@ declare module SourceMap {
|
||||
version: string;
|
||||
sources: Array<string>;
|
||||
names: Array<string>;
|
||||
sourcesContent?: string;
|
||||
sourcesContent?: string[];
|
||||
mappings: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,69 +3,86 @@
|
||||
//
|
||||
// Examples from https://github.com/abpetkov/switchery
|
||||
//
|
||||
import {default as Switchery} from "switchery";
|
||||
|
||||
function multipleSwitches() {
|
||||
|
||||
var elems = Array.prototype.slice.call( document.querySelectorAll( '.js-switch' ) );
|
||||
var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
|
||||
|
||||
elems.forEach( (html: Element) => {
|
||||
var switchery = new Switchery( html );
|
||||
} );
|
||||
elems.forEach((html: Element) => {
|
||||
var switchery = new Switchery(html);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function disabledSwitch() {
|
||||
|
||||
var elem = document.querySelector( '.js-switch' )
|
||||
var elem = document.querySelector('.js-switch')
|
||||
|
||||
//inactive switch
|
||||
var switchery = new Switchery( elem, {disabled: true} );
|
||||
var switchery = new Switchery(elem, { disabled: true });
|
||||
|
||||
//Customize the default opacity of the disabled switch, using the disabledOpacity option.
|
||||
switchery = new Switchery( elem, {disabled: true, disabledOpacity: 0.75} );
|
||||
switchery = new Switchery(elem, { disabled: true, disabledOpacity: 0.75 });
|
||||
}
|
||||
|
||||
|
||||
function coloredSwitch() {
|
||||
|
||||
var elem = document.querySelector( '.js-switch' )
|
||||
var elem = document.querySelector('.js-switch')
|
||||
|
||||
//You can change the primary color of the switch to fit your design perfectly:
|
||||
var switchery = new Switchery( elem, {color: '#41b7f1'} );
|
||||
var switchery = new Switchery(elem, { color: '#41b7f1' });
|
||||
|
||||
//Or the secondary color, which will change the switch background color and border color:
|
||||
switchery = new Switchery( elem, {secondaryColor: '#bbf0f0'} );
|
||||
switchery = new Switchery(elem, { secondaryColor: '#bbf0f0' });
|
||||
|
||||
//Since version 0.6.3, you're even allowed to change the jack color from JS, as follows:
|
||||
switchery = new Switchery( elem, {jackColor: '#fffc00'} );
|
||||
switchery = new Switchery(elem, { jackColor: '#fffc00', jackSecondaryColor: '#41b7f1' });
|
||||
}
|
||||
|
||||
function switchSizes() {
|
||||
|
||||
var elem = document.querySelector( '.js-switch' )
|
||||
var elem = document.querySelector('.js-switch')
|
||||
|
||||
var switchery = new Switchery( elem, {size: 'small'} );
|
||||
switchery = new Switchery( elem, {size: 'large'} );
|
||||
var switchery = new Switchery(elem, { size: 'small' });
|
||||
switchery = new Switchery(elem, { size: 'large' });
|
||||
}
|
||||
|
||||
function checkingState() {
|
||||
|
||||
var elem = document.querySelector( '.js-switch' )
|
||||
var elem = document.querySelector('.js-switch')
|
||||
|
||||
//On click:
|
||||
|
||||
var clickCheckbox = <HTMLInputElement> document.querySelector( '.js-check-click' )
|
||||
var clickButton = <HTMLInputElement> document.querySelector( '.js-check-click-button' );
|
||||
var clickCheckbox = <HTMLInputElement> document.querySelector('.js-check-click')
|
||||
var clickButton = <HTMLInputElement> document.querySelector('.js-check-click-button');
|
||||
|
||||
clickButton.addEventListener( 'click', () => {
|
||||
alert( clickCheckbox.checked );
|
||||
} );
|
||||
clickButton.addEventListener('click', () => {
|
||||
alert(clickCheckbox.checked);
|
||||
});
|
||||
|
||||
//On change:
|
||||
|
||||
var changeCheckbox = <HTMLInputElement> document.querySelector( '.js-check-change' );
|
||||
var changeCheckbox = <HTMLInputElement> document.querySelector('.js-check-change');
|
||||
|
||||
changeCheckbox.onchange = function () {
|
||||
alert( changeCheckbox.checked );
|
||||
changeCheckbox.onchange = function() {
|
||||
alert(changeCheckbox.checked);
|
||||
};
|
||||
}
|
||||
|
||||
function detached() {
|
||||
var elem = document.querySelector('.js-switch')
|
||||
var switchery = new Switchery(elem, { size: 'small' });
|
||||
|
||||
switchery.destroy();
|
||||
}
|
||||
|
||||
function toggleState() {
|
||||
var elem = document.querySelector('.js-switch')
|
||||
var switchery = new Switchery(elem, { size: 'small' });
|
||||
var isDisabled = switchery.isDisabled();
|
||||
|
||||
switchery.enable();
|
||||
switchery.disable();
|
||||
}
|
||||
Vendored
+47
-18
@@ -1,64 +1,93 @@
|
||||
// Type definitions for switchery 0.7.0
|
||||
// Type definitions for switchery 0.8.1
|
||||
// Project: https://github.com/abpetkov/switchery
|
||||
// Definitions by: Bruno Grieder <https://github.com/bgrieder>
|
||||
// Definitions by: Bruno Grieder <https://github.com/bgrieder>, Clayton Lautier <https://github.com/claylaut>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module Switchery {
|
||||
|
||||
export interface Options {
|
||||
interface SwitcheryStatic {
|
||||
new (node: Node, options?: Options): Switchery;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
|
||||
/**
|
||||
* color of the switch element (HEX or RGB value)
|
||||
* @default '#64bd63'
|
||||
*/
|
||||
color? : string;
|
||||
color?: string;
|
||||
/**
|
||||
* secondary color for background color and border, when the switch is off
|
||||
* @default '#dfdfdf'
|
||||
*/
|
||||
secondaryColor? : string;
|
||||
secondaryColor?: string;
|
||||
/**
|
||||
* color of the jack/handle element
|
||||
* @default '#fff'
|
||||
*/
|
||||
jackColor? : string;
|
||||
jackColor?: string;
|
||||
/**
|
||||
* color of unchecked jack/handle element
|
||||
* @default 'null'
|
||||
*/
|
||||
jackSecondaryColor?: string;
|
||||
/**
|
||||
* class name for the switch element (by default styled in switchery.css)
|
||||
* @default 'switchery'
|
||||
*/
|
||||
className? : string;
|
||||
className?: string;
|
||||
/**
|
||||
* enable or disable click events and changing the state of the switch (boolean value)
|
||||
* @default false
|
||||
*/
|
||||
disabled? : boolean;
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* opacity of the switch when it's disabled (0 to 1)
|
||||
* @default 0.5
|
||||
*/
|
||||
disabledOpacity? : number;
|
||||
disabledOpacity?: number;
|
||||
/**
|
||||
* length of time that the transition will take, ex. '0.4s', '1s', '2.2s' (Note: transition speed of the handle is twice shorter)
|
||||
* @default '0.4s'
|
||||
* @default '0.1s'
|
||||
*/
|
||||
speed? : string;
|
||||
speed?: string;
|
||||
/**
|
||||
* size of the switch element (small or large)
|
||||
* @default 'default'
|
||||
*/
|
||||
size? : string;
|
||||
size?: string;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
declare class Switchery {
|
||||
interface Switchery {
|
||||
|
||||
constructor(node: Node, options?: Switchery.Options);
|
||||
/**
|
||||
* Unbinding all event handlers attached to the switch element to prepare the object for garbage collection.
|
||||
* @returns {void}
|
||||
*/
|
||||
destroy(): void;
|
||||
|
||||
/**
|
||||
* Enable disabled switch by re-adding event handlers and changing the opacity to 1.
|
||||
* @returns {void}
|
||||
*/
|
||||
enable(): void;
|
||||
|
||||
/**
|
||||
* Disable switch by unbinding attached events and changing opacity to disabledOpacity value
|
||||
* @returns {void}
|
||||
*/
|
||||
disable(): void;
|
||||
|
||||
/**
|
||||
* Check if switch is currently disabled by checking the readonly and disabled attributes on the checkbox and the disabled option set via JS.
|
||||
* If any of those are present, the returned value is true.
|
||||
* @returns {boolean} whether it's disabled or not.
|
||||
*/
|
||||
isDisabled(): boolean;
|
||||
}
|
||||
|
||||
declare module "switchery" {
|
||||
|
||||
export = Switchery
|
||||
var switchery: Switchery.SwitcheryStatic;
|
||||
export default switchery;
|
||||
}
|
||||
+7
-7
@@ -21,7 +21,7 @@ declare module angular.ui {
|
||||
/*
|
||||
* This method resets stored $deepStateRedirect data so following transitions will behave like there have not been previous transitions.
|
||||
* @param stateParams Can be passed in to select specific states to reset:
|
||||
* {
|
||||
* {
|
||||
* 'paramName': 'paramvalue' | ['list', 'of', 'possible', 'paramvalues']
|
||||
* }
|
||||
*/
|
||||
@@ -33,13 +33,13 @@ declare module angular.ui {
|
||||
*/
|
||||
interface IDeepStateRedirectConfig {
|
||||
/*
|
||||
* If no deep state has been recorded, DSR will instead redirect to the default substate and params that you specify.
|
||||
* If no deep state has been recorded, DSR will instead redirect to the default substate and params that you specify.
|
||||
* If default is a string it is interpreted as the substate.
|
||||
*/
|
||||
default?: string | IRedirectParams;
|
||||
/*
|
||||
* Specify params: true if your DSR state takes parameters.
|
||||
* If only a subset of the parameters should be included in the parameter grouping for recording deep states,
|
||||
* If only a subset of the parameters should be included in the parameter grouping for recording deep states,
|
||||
* specify an array of parameter names.
|
||||
*/
|
||||
params?: boolean | string[];
|
||||
@@ -58,8 +58,8 @@ declare module angular.ui {
|
||||
/*
|
||||
* Previous state
|
||||
*/
|
||||
interface IPreviousState {
|
||||
state: IState;
|
||||
interface IPreviousState {
|
||||
state: IState;
|
||||
params?: ui.IStateParamsService;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ declare module angular.ui {
|
||||
* @param memoName Memo name
|
||||
*/
|
||||
forget(memoName: string): void;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sticky state
|
||||
@@ -128,7 +128,7 @@ declare module angular.ui {
|
||||
/*
|
||||
* Note: named views are mandatory when using sticky states!
|
||||
*/
|
||||
views?: {};
|
||||
views?: { [name:string]: angular.ui.IState };
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,4 +37,9 @@ var uri: uri.URI = $('a').uri();
|
||||
|
||||
URI('http://example.org/foo/hello.html').segment('bar');
|
||||
URI('http://example.org/foo/hello.html').segment(0, 'bar');
|
||||
URI('http://example.org/foo/hello.html').segment(['foo', 'bar', 'foobar.html']);
|
||||
URI('http://example.org/foo/hello.html').segment(['foo', 'bar', 'foobar.html']);
|
||||
|
||||
var withDuplicates = URI("?bar=1&bar=1")
|
||||
.duplicateQueryParameters(true)
|
||||
.normalizeQuery()
|
||||
.toString();
|
||||
Vendored
+2
@@ -27,6 +27,8 @@ declare module uri {
|
||||
domain(): string;
|
||||
domain(domain: boolean): string;
|
||||
domain(domain: string): URI;
|
||||
|
||||
duplicateQueryParameters(val: boolean): URI;
|
||||
|
||||
equals(): boolean;
|
||||
equals(url: string): boolean;
|
||||
|
||||
Vendored
+2
-2
@@ -65,8 +65,8 @@ declare module vuejs {
|
||||
* http://vuejs.org/api/instance-properties.html
|
||||
*/
|
||||
$el: HTMLElement;
|
||||
$data: {};
|
||||
$options: {};
|
||||
$data: any;
|
||||
$options: any;
|
||||
$parent: Vue;
|
||||
$root: Vue;
|
||||
$: {};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user