From 6b01807e9752728aa259f50e95b855be4cc19b79 Mon Sep 17 00:00:00 2001 From: Mathew Henson Date: Thu, 7 Jul 2016 16:11:35 +0100 Subject: [PATCH] Removing admin app as its now in its own repo. See #25 --- admin/.vscode/settings.json | 5 - admin/.vscode/tasks.json | 26 - admin/gulpfile.js | 343 -- admin/lib/application.ts | 88 - admin/lib/authenticator.ts | 71 - admin/lib/config.ts | 177 - admin/lib/css/animations.scss | 21 - admin/lib/css/bootstrap.scss | 321 -- admin/lib/css/mce-style.css | 14 - admin/lib/css/shapes.scss | 94 - admin/lib/css/utils.scss | 33 - .../definitions/custom/modepress-client.d.ts | 31 - admin/lib/definitions/custom/tinymce.d.ts | 84 - .../required/angular-ui-router.d.ts | 132 - admin/lib/definitions/required/angular.d.ts | 1666 --------- .../lib/definitions/required/es6-promise.d.ts | 74 - admin/lib/definitions/required/express.d.ts | 1108 ------ admin/lib/definitions/required/jquery.d.ts | 3163 ----------------- admin/lib/definitions/required/node.d.ts | 1463 -------- admin/lib/definitions/required/recaptcha.d.ts | 42 - .../definitions/required/webinate-users.d.ts | 587 --- admin/lib/directives/buttons/buttons.ts | 125 - admin/lib/directives/buttons/style.scss | 40 - admin/lib/directives/detail/detail.ts | 36 - admin/lib/directives/detail/style.scss | 25 - .../directives/error-modal/error-modal.html | 6 - .../lib/directives/error-modal/error-modal.ts | 28 - admin/lib/directives/error-modal/style.scss | 20 - .../lib/directives/item-panel/item-panel.html | 11 - admin/lib/directives/item-panel/item-panel.ts | 35 - admin/lib/directives/item-panel/style.scss | 40 - admin/lib/directives/pager/pager.html | 13 - admin/lib/directives/pager/pager.ts | 145 - admin/lib/directives/pager/style.scss | 49 - admin/lib/directives/search-bar/search-bar.ts | 32 - admin/lib/directives/search-bar/style.scss | 32 - .../directives/state-header/state-header.ts | 31 - admin/lib/directives/state-header/style.scss | 27 - admin/lib/directives/tick-box/style.scss | 39 - admin/lib/directives/tick-box/tick-box.ts | 65 - admin/lib/index-prod.jade | 27 - admin/lib/index.jade | 33 - admin/lib/media/images/image-icon.png | Bin 344 -> 0 bytes admin/lib/media/images/loader.gif | Bin 2608 -> 0 bytes admin/lib/media/sprites/file-info-clock.jpg | Bin 634 -> 0 bytes .../lib/media/sprites/file-info-downloads.jpg | Bin 555 -> 0 bytes admin/lib/media/sprites/file-info-id.jpg | Bin 437 -> 0 bytes admin/lib/media/sprites/file-info-mime.jpg | Bin 632 -> 0 bytes admin/lib/media/sprites/file-info-size.jpg | Bin 566 -> 0 bytes admin/lib/media/sprites/folder.png | Bin 369 -> 0 bytes admin/lib/media/sprites/logo-home-small.jpg | Bin 1476 -> 0 bytes admin/lib/media/sprites/media.png | Bin 1108 -> 0 bytes admin/lib/media/sprites/posts.png | Bin 318 -> 0 bytes admin/lib/media/sprites/search.png | Bin 854 -> 0 bytes admin/lib/media/sprites/seo.png | Bin 586 -> 0 bytes admin/lib/media/sprites/standard-file.png | Bin 567 -> 0 bytes admin/lib/media/sprites/users.png | Bin 673 -> 0 bytes admin/lib/references.d.ts | 10 - admin/lib/states/default/dashboard.html | 34 - admin/lib/states/default/style.scss | 140 - admin/lib/states/login/log-in.html | 19 - admin/lib/states/login/login-ctrl.ts | 72 - admin/lib/states/login/style.scss | 16 - admin/lib/states/media/dash-media.html | 78 - admin/lib/states/media/media-ctrl.ts | 276 -- admin/lib/states/media/style.scss | 193 - admin/lib/states/message/message.html | 5 - admin/lib/states/message/style.scss | 24 - .../states/password-reset/password-ctrl.ts | 124 - .../states/password-reset/password-reset.html | 21 - admin/lib/states/password-reset/style.scss | 9 - admin/lib/states/posts/dash-posts.html | 203 -- admin/lib/states/posts/posts-ctrl.ts | 445 --- admin/lib/states/posts/style.scss | 142 - admin/lib/states/register/register-ctrl.ts | 136 - admin/lib/states/register/register.html | 26 - admin/lib/states/register/style.scss | 21 - admin/lib/states/seo/dash-seo.html | 30 - admin/lib/states/seo/seo-ctrl.ts | 126 - admin/lib/states/seo/style.scss | 36 - admin/lib/states/users/dash-users.html | 84 - admin/lib/states/users/style.scss | 21 - admin/lib/states/users/users-ctrl.ts | 146 - admin/lib/style.scss | 223 -- admin/package.json | 33 - admin/tsconfig.json | 37 - 86 files changed, 13132 deletions(-) delete mode 100644 admin/.vscode/settings.json delete mode 100644 admin/.vscode/tasks.json delete mode 100644 admin/gulpfile.js delete mode 100644 admin/lib/application.ts delete mode 100644 admin/lib/authenticator.ts delete mode 100644 admin/lib/config.ts delete mode 100644 admin/lib/css/animations.scss delete mode 100644 admin/lib/css/bootstrap.scss delete mode 100644 admin/lib/css/mce-style.css delete mode 100644 admin/lib/css/shapes.scss delete mode 100644 admin/lib/css/utils.scss delete mode 100644 admin/lib/definitions/custom/modepress-client.d.ts delete mode 100644 admin/lib/definitions/custom/tinymce.d.ts delete mode 100644 admin/lib/definitions/required/angular-ui-router.d.ts delete mode 100644 admin/lib/definitions/required/angular.d.ts delete mode 100644 admin/lib/definitions/required/es6-promise.d.ts delete mode 100644 admin/lib/definitions/required/express.d.ts delete mode 100644 admin/lib/definitions/required/jquery.d.ts delete mode 100644 admin/lib/definitions/required/node.d.ts delete mode 100644 admin/lib/definitions/required/recaptcha.d.ts delete mode 100644 admin/lib/definitions/required/webinate-users.d.ts delete mode 100644 admin/lib/directives/buttons/buttons.ts delete mode 100644 admin/lib/directives/buttons/style.scss delete mode 100644 admin/lib/directives/detail/detail.ts delete mode 100644 admin/lib/directives/detail/style.scss delete mode 100644 admin/lib/directives/error-modal/error-modal.html delete mode 100644 admin/lib/directives/error-modal/error-modal.ts delete mode 100644 admin/lib/directives/error-modal/style.scss delete mode 100644 admin/lib/directives/item-panel/item-panel.html delete mode 100644 admin/lib/directives/item-panel/item-panel.ts delete mode 100644 admin/lib/directives/item-panel/style.scss delete mode 100644 admin/lib/directives/pager/pager.html delete mode 100644 admin/lib/directives/pager/pager.ts delete mode 100644 admin/lib/directives/pager/style.scss delete mode 100644 admin/lib/directives/search-bar/search-bar.ts delete mode 100644 admin/lib/directives/search-bar/style.scss delete mode 100644 admin/lib/directives/state-header/state-header.ts delete mode 100644 admin/lib/directives/state-header/style.scss delete mode 100644 admin/lib/directives/tick-box/style.scss delete mode 100644 admin/lib/directives/tick-box/tick-box.ts delete mode 100644 admin/lib/index-prod.jade delete mode 100644 admin/lib/index.jade delete mode 100644 admin/lib/media/images/image-icon.png delete mode 100644 admin/lib/media/images/loader.gif delete mode 100644 admin/lib/media/sprites/file-info-clock.jpg delete mode 100644 admin/lib/media/sprites/file-info-downloads.jpg delete mode 100644 admin/lib/media/sprites/file-info-id.jpg delete mode 100644 admin/lib/media/sprites/file-info-mime.jpg delete mode 100644 admin/lib/media/sprites/file-info-size.jpg delete mode 100644 admin/lib/media/sprites/folder.png delete mode 100644 admin/lib/media/sprites/logo-home-small.jpg delete mode 100644 admin/lib/media/sprites/media.png delete mode 100644 admin/lib/media/sprites/posts.png delete mode 100644 admin/lib/media/sprites/search.png delete mode 100644 admin/lib/media/sprites/seo.png delete mode 100644 admin/lib/media/sprites/standard-file.png delete mode 100644 admin/lib/media/sprites/users.png delete mode 100644 admin/lib/references.d.ts delete mode 100644 admin/lib/states/default/dashboard.html delete mode 100644 admin/lib/states/default/style.scss delete mode 100644 admin/lib/states/login/log-in.html delete mode 100644 admin/lib/states/login/login-ctrl.ts delete mode 100644 admin/lib/states/login/style.scss delete mode 100644 admin/lib/states/media/dash-media.html delete mode 100644 admin/lib/states/media/media-ctrl.ts delete mode 100644 admin/lib/states/media/style.scss delete mode 100644 admin/lib/states/message/message.html delete mode 100644 admin/lib/states/message/style.scss delete mode 100644 admin/lib/states/password-reset/password-ctrl.ts delete mode 100644 admin/lib/states/password-reset/password-reset.html delete mode 100644 admin/lib/states/password-reset/style.scss delete mode 100644 admin/lib/states/posts/dash-posts.html delete mode 100644 admin/lib/states/posts/posts-ctrl.ts delete mode 100644 admin/lib/states/posts/style.scss delete mode 100644 admin/lib/states/register/register-ctrl.ts delete mode 100644 admin/lib/states/register/register.html delete mode 100644 admin/lib/states/register/style.scss delete mode 100644 admin/lib/states/seo/dash-seo.html delete mode 100644 admin/lib/states/seo/seo-ctrl.ts delete mode 100644 admin/lib/states/seo/style.scss delete mode 100644 admin/lib/states/users/dash-users.html delete mode 100644 admin/lib/states/users/style.scss delete mode 100644 admin/lib/states/users/users-ctrl.ts delete mode 100644 admin/lib/style.scss delete mode 100644 admin/package.json delete mode 100644 admin/tsconfig.json diff --git a/admin/.vscode/settings.json b/admin/.vscode/settings.json deleted file mode 100644 index ecbcce6c..00000000 --- a/admin/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -// Place your settings in this file to overwrite default and user settings. -{ - "editor.tabSize": 4, - "files.trimTrailingWhitespace": true -} \ No newline at end of file diff --git a/admin/.vscode/tasks.json b/admin/.vscode/tasks.json deleted file mode 100644 index 941eadfe..00000000 --- a/admin/.vscode/tasks.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "version": "0.1.0", - "command": "gulp", - "isShellCommand": true, - "args": [ - "--no-color" - ], - "tasks": [ - { - "taskName": "build-all", - "isBuildCommand": true, - "showOutput": "always", - "problemMatcher": { - "fileLocation": ["relative", "${workspaceRoot}"], - "pattern": { - "regexp": "^(.*)\\((.*),(.*)\\):\\s(error|warning)\\s(.*)$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "message": 5 - } - } - } - ] -} \ No newline at end of file diff --git a/admin/gulpfile.js b/admin/gulpfile.js deleted file mode 100644 index a44059f5..00000000 --- a/admin/gulpfile.js +++ /dev/null @@ -1,343 +0,0 @@ -var gulp = require('gulp'); -var fs = require('fs'); -var concat = require('gulp-concat'); -var ts = require('gulp-typescript'); -var merge = require('merge-stream'); -var gutil = require('gulp-util'); -var gunzip = require('gulp-gunzip'); -var request = require('request'); -var untar = require('gulp-untar'); -var source = require('vinyl-source-stream'); -var filter = require('gulp-filter'); -var ngHtml2Js = require("gulp-ng-html2js"); -var minifyHtml = require("gulp-minify-html"); -var uglify = require("gulp-uglify"); -var gulpif = require("gulp-if"); -var sprity = require('sprity'); -var sass = require('gulp-sass'); -var spritySass = require('sprity-sass'); -var rimraf = require('rimraf'); -var download = require('gulp-download'); -var rename = require("gulp-rename"); -var cleanCss = require('gulp-clean-css'); - -// CONFIG -// ============================== -var outDir = "./dist"; -var outDirDefinitions = "../server/dist/definitions"; -var tsConfig = JSON.parse(fs.readFileSync('tsconfig.json')); -var tsFiles = tsConfig.files; -var thirdPartyFiles = [ - './third-party/jquery/dist/jquery.js', - './third-party/angular/angular.js', - './third-party/angular-ui-router/release/angular-ui-router.js', - './third-party/angular-sanitize/angular-sanitize.js', - './third-party/angular-animate/angular-animate.js', - './third-party/angular-loading-bar/build/loading-bar.js', - './third-party/angular-loading-bar/build/loading-bar.css', - './third-party/angular-file-upload/dist/ng-file-upload.js' -]; - -/** - * Checks to see that all TS files listed exist - */ -gulp.task('check-files', function(){ - - // Make sure the files exist - for (var i = 0, l = tsFiles.length; i < l; i++ ) - if(!fs.existsSync(tsFiles[i])) - { - console.log("File does not exist:" + tsFiles[i] ); - process.exit(); - } -}); - -gulp.task('sass', ['sprites'], function(){ - - // Compile all sass files into temp/css - return gulp.src('./lib/style.scss', { base: "./lib" }) - .pipe(sass().on('error', sass.logError)) - .pipe(gulp.dest(outDir + '/css')) -}) - -gulp.task('sass-release', ['sprites'], function() { - - // Compile all sass files into temp/css - return gulp.src('./lib/style.scss', { base: "./lib" }) - .pipe(sass().on('error', sass.logError)) - .pipe(cleanCss()) - .pipe(gulp.dest(outDir + '/css')) -}) - -/** - * Generate dist/media/sprites/sprite.png and /lib/temp/sprite.scss - */ -gulp.task('sprites', function () { - return sprity.src({ - src: './lib/media/sprites/**/*.{png,jpg}', - style: './sprites.scss', - cssPath: '/media/sprites', - name: 'sprites', - orientation : 'binary-tree', - prefix: 'sprite', - processor: 'sass', - 'style-type': 'scss', - margin:0 - }) - .pipe(gulpif('*.png', gulp.dest( outDir + '/media/sprites'), gulp.dest( "lib/temp-css" ))) -}); - -/** - * Builds each of the ts files into JS files in the output folder - */ -gulp.task('ts-code', ['check-files'], function() { - - return gulp.src(tsFiles, { base: "." }) - .pipe(ts({ - "module": tsConfig.compilerOptions.module, - "removeComments": tsConfig.compilerOptions.removeComments, - "noEmitOnError": tsConfig.compilerOptions.noEmitOnError, - "declaration": tsConfig.compilerOptions.declaration, - "sourceMap": tsConfig.compilerOptions.sourceMap, - "preserveConstEnums": tsConfig.compilerOptions.preserveConstEnums, - "target": tsConfig.compilerOptions.target, - "noImplicitAny": tsConfig.compilerOptions.noImplicitAny, - "allowUnreachableCode": tsConfig.compilerOptions.allowUnreachableCode, - "allowUnusedLabels": tsConfig.compilerOptions.allowUnusedLabels, - "out":"main.js", - })) - .pipe(gulp.dest(outDir)); -}); - -/** - * Builds each of the ts files into JS files in the output folder - */ -gulp.task('ts-code-release', ['check-files'], function() { - - return gulp.src(tsFiles, { base: "." }) - .pipe(ts({ - "module": tsConfig.compilerOptions.module, - "removeComments": tsConfig.compilerOptions.removeComments, - "noEmitOnError": tsConfig.compilerOptions.noEmitOnError, - "declaration": tsConfig.compilerOptions.declaration, - "sourceMap": tsConfig.compilerOptions.sourceMap, - "preserveConstEnums": tsConfig.compilerOptions.preserveConstEnums, - "target": tsConfig.compilerOptions.target, - "noImplicitAny": tsConfig.compilerOptions.noImplicitAny, - "allowUnreachableCode": tsConfig.compilerOptions.allowUnreachableCode, - "allowUnusedLabels": tsConfig.compilerOptions.allowUnusedLabels, - "out":"main.js", - })) - .pipe(uglify()) - .pipe(gulp.dest(outDir)); -}); - -/** - * Copies the html source to its output directory - */ -gulp.task('copy-index', function() { - - return gulp.src(["lib/index.jade", "lib/css/mce-style.css", "lib/media/images/**.*"], { base: "lib" }) - .pipe(gulp.dest(outDir)); - -}); - -/** - * Copies the html source to its output directory - */ -gulp.task('copy-index-release', function() { - - return Promise.all([ - - gulp.src( "lib/index-prod.jade", { base: "lib" }) - .pipe(rename("index.jade")) - .pipe(gulp.dest(outDir)), - - gulp.src([ - "lib/media/images/**/*.*", - "lib/css/mce-style.css" - ], { base: "lib" }) - .pipe(gulp.dest(outDir)) - ]); -}); - - - -/** - * Deletes a folder and all its children recursively - * @param {string} path The folder path to remove - */ -function deleteFolderRecursive(path) { - if( fs.existsSync(path) ) { - fs.readdirSync(path).forEach(function(file,index){ - var curPath = path + "/" + file; - if(fs.lstatSync(curPath).isDirectory()) { // recurse - deleteFolderRecursive(curPath); - } - else - fs.unlinkSync(curPath); - }); - fs.rmdirSync(path); - } -}; - -/** - * This function downloads a definition file from github and writes it to a destination - * @param {string} url The url of the file to download - * @param {string} dest The destination folder to move the file to - */ -function getDefinition(url, dest, name) { - return new Promise(function(resolve, reject) { - download(url) - .pipe(rename(name)) - .pipe(gulp.dest(dest)) - .on('error', function(err) { - throw(err) - }) - .on('end', function() { - resolve(true); - }) - }); -} - -/** - * Downloads the definition files used in the development of the application and moves them into the definitions folder - */ -gulp.task('install-definitions', function () { - return Promise.all([ - getDefinition("https://raw.githubusercontent.com/MKHenson/users/dev/src/definitions/custom/definitions.d.ts", "lib/definitions/required/", "webinate-users.d.ts") - ]); -}); - -/** - * Downloads a tarbal from a given url and unzips it into a specified folder - * @param {string} url The URL of the tarball to download - * @param {string} folder The folder we are moving the contents to - */ -function downloadTarball(url, folder){ - return new Promise(function(resolve, reject){ - gutil.log('Downloading file "'+ url +'" into folder "' + folder + '"'); - return request(url) - .pipe(source('hello.tar.gz')) - .on('end', function(){ - gutil.log('Unzipping... "'+ url +'"'); - }) - .pipe(gunzip()) - .pipe(untar()) - .pipe(gulp.dest(folder)) - .on('end', function() { - var folders = fs.readdirSync(folder); - gulp.src( folder + '/' + folders[0] + "/**/*.*" ) - .pipe(gulp.dest(folder)) - .on('end', function() { - deleteFolderRecursive(folder + '/' + folders[0]); - gutil.log(gutil.colors.green('Finished download of "'+ url +'"')); - resolve(true); - }); - }) - }); -} - -/** - * Downloads each of the third party archives and unzips them into the third-party folder respectively - */ -gulp.task('install-third-parties', function () { - return Promise.all([ - downloadTarball("https://github.com/angular/bower-angular/tarball/v1.5.3-build.4695+sha.7489d56", './third-party/angular'), - downloadTarball("https://github.com/angular/bower-angular-animate/tarball/v1.5.3-build.4691+sha.e34ef23", './third-party/angular-animate'), - downloadTarball("https://github.com/angular/bower-angular-sanitize/tarball/v1.5.3-build.4691+sha.e34ef23", './third-party/angular-sanitize'), - downloadTarball("https://github.com/angular-ui/ui-router/tarball/0.2.18", './third-party/angular-ui-router'), - downloadTarball("https://github.com/jquery/jquery/tarball/2.2.2", './third-party/jquery'), - downloadTarball("https://github.com/chieffancypants/angular-loading-bar/tarball/0.9.0", './third-party/angular-loading-bar'), - downloadTarball("https://github.com/tinymce/tinymce-dist/tarball/4.3.8", './third-party/tinymce'), - downloadTarball("https://github.com/danialfarid/ng-file-upload/tarball/12.0.4", './third-party/angular-file-upload') - ]); -}); - - -/** - * Copies the required third party files to the index file - */ -gulp.task('deploy-third-party', function() { - - var thirdParties = thirdPartyFiles.concat(['./third-party/tinymce/**']); - - return gulp.src(thirdParties, { base: "third-party" } ) - .pipe(gulp.dest(outDir + "/third-party")); -}); - -/** - * Copies the required third party files to the index file. Also concatenates the files into 1, compressed, JS file - */ -gulp.task('deploy-third-party-release', function() { - - const jsFilter = filter('**/*.js', {restore: true}); - const cssFilter = filter('**/*.css', {restore: true}); - - return Promise.all( [ - gulp.src( thirdPartyFiles, { base: "third-party" } ) - .pipe(jsFilter) - .pipe(concat("third-party.min.js")) - .pipe(uglify()) - .pipe(jsFilter.restore) - .pipe(cssFilter) - .pipe(cleanCss()) - .pipe(concat("third-party.min.css")) - .pipe(cssFilter.restore) - .pipe(gulp.dest(outDir + "/third-party")), - - gulp.src(['./third-party/tinymce/**'], { base: "third-party" } ) - .pipe(gulp.dest(outDir + "/third-party")) - ]); -}); - -/** - * Builds the definition - */ -gulp.task('html-to-ng', function() { - return gulp.src("./lib/**/*.html") - .pipe(minifyHtml({ - empty: true, - spare: true, - quotes: true - })) - .pipe(ngHtml2Js({ - moduleName: "admin-templates", - prefix: "" - })) - .pipe(concat("partials.min.js")) - .pipe(uglify()) - .pipe(gulp.dest(outDir + "/templates")); -}); - -/** - * Builds the definition - */ -gulp.task('ts-code-declaration', function() { - - var requiredDeclarationFiles = gulp.src([ - "./lib/definitions/custom/modepress-client.d.ts", - ]); - - var tsDefinition = gulp.src(tsFiles, { base: "." }) - .pipe(ts({ - "module": "amd", - "removeComments": false, - "noEmitOnError": true, - "declaration": true, - "sourceMap": false, - "preserveConstEnums": true, - "target": "es5", - "out":"definitions.js", - "noImplicitAny": false - })).dts; - - - // Merge the streams - return merge(requiredDeclarationFiles, tsDefinition) - .pipe(gulp.dest(outDirDefinitions)); -}); - -gulp.task('install', [ 'install-definitions', 'install-third-parties']); -gulp.task('build-all', [ 'sass', 'copy-index', 'deploy-third-party', 'html-to-ng', 'ts-code', 'ts-code-declaration']); -gulp.task('build-all-release', [ 'sass-release', 'copy-index-release', 'deploy-third-party-release', 'html-to-ng', 'ts-code-release', 'ts-code-declaration']); \ No newline at end of file diff --git a/admin/lib/application.ts b/admin/lib/application.ts deleted file mode 100644 index bc184097..00000000 --- a/admin/lib/application.ts +++ /dev/null @@ -1,88 +0,0 @@ -declare var _users: string; -declare var _cache: string; -declare var _plugins: Array; - -/** -* The admin code for the website -*/ -module clientAdmin -{ - 'use strict'; - - var appModule = angular.module("admin", ["ui.router", "ngAnimate", "ngSanitize", 'angular-loading-bar', 'ngFileUpload', 'admin-templates']) - .constant("usersURL", _users ) - .constant("apiURL", "./api") - .constant("cacheURL", _cache) - .constant("capthaPublicKey", "6LdiW-USAAAAAGxGfZnQEPP2gDW2NLZ3kSMu3EtT") - .filter("htmlToPlaintext", function() - { - return function (text) - { - return String(text).replace(/<[^>]+>/gm, ''); - } - }) - .filter('bytes', function () - { - return function (bytes, precision) - { - if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-'; - if (typeof precision === 'undefined') precision = 1; - var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'], - number = Math.floor(Math.log(bytes) / Math.log(1024)); - return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number]; - } - }) - .controller("loginCtrl", LoginCtrl) - .controller("registerCtrl", RegisterCtrl) - .controller("passwordCtrl", PasswordCtrl) - .controller("usersCtrl", UsersCtrl) - .controller("postsCtrl", PostsCtrl) - .controller("seoCtrl", SEOCtrl) - .controller("mediaCtrl", MediaCtrl) - .service("Authenticator", Authenticator) - .directive('pager', Pager.factory()) - .directive('errorModal', ErrorModal.factory()) - .directive('addButton', AddButton.factory()) - .directive('approveButton', ApproveButton.factory()) - .directive('removeButton', RemoveButton.factory()) - .directive('toggleButton', ToggleButton.factory()) - .directive('itemPanel', ItemPanel.factory()) - .directive('searchBar', SearchBar.factory()) - .directive('stateHeader', StateHeader.factory()) - .directive('tickBox', TickBox.factory()) - .directive('detail', Detail.factory()) - .config(Config) - .run(["$rootScope", "$location", "$state", "Authenticator", function ($rootScope, $location, $state: ng.ui.IStateService, auth: Authenticator) - { - // Redirect to login if route requires auth and you're not logged in - $rootScope.$on('$stateChangeStart', function (event, toState, toParams ) - { - if (!toState.forceTransition && toState.authenticate !== undefined) { - event.preventDefault(); - - auth.authenticated().then(function (val) - { - if (toState.authenticate && !val) { - $rootScope.returnToState = toState.url; - $rootScope.returnToStateParams = toParams.Id; - toState.forceTransition = false; - $state.go("login"); - } - else if (!toState.authenticate && val) { - $rootScope.returnToState = toState.url; - $rootScope.returnToStateParams = toParams.Id; - toState.forceTransition = false; - $state.go("default"); - } - else { - toState.forceTransition = true; - $state.go(toState.name); - } - }); - } - }); - }]); - - for (var i = 0, l = _plugins.length; i < l; i++) - _plugins[i].onInit(appModule); -} \ No newline at end of file diff --git a/admin/lib/authenticator.ts b/admin/lib/authenticator.ts deleted file mode 100644 index 16da56ca..00000000 --- a/admin/lib/authenticator.ts +++ /dev/null @@ -1,71 +0,0 @@ -module clientAdmin -{ - /** - * An authentication service for checking if the user is logged in - */ - export class Authenticator - { - private _http: ng.IHttpService; - private _q: ng.IQService; - private _usersURL: string; - public static user: UsersInterface.IUserEntry; - - // $inject annotation. - public static $inject = ["$http", "$q", "usersURL"]; - constructor(http: ng.IHttpService, q: ng.IQService, usersURL: string ) - { - this._http = http; - this._q = q; - this._usersURL = usersURL; - } - - /** - * Logs the user out if they are already logged in - * @returns {ng.IPromise} - */ - public logout(): ng.IPromise - { - var that = this; - return new this._q(function (resolve, reject) - { - that._http.get(`${that._usersURL}/logout`).then(function (response) - { - var token: UsersInterface.IResponse = response.data; - if (token.error) - return resolve(false); - - return resolve(true); - - }).catch(function (error: Error) - { - return resolve(false); - }); - }); - } - - /** - * Checks to see if the current session is authenticated - * @returns {ng.IPromise} - */ - public authenticated(): ng.IPromise - { - var that = this; - return new this._q( function(resolve, reject) - { - that._http.get(`${that._usersURL}/authenticated`).then(function (response) - { - var token: UsersInterface.IAuthenticationResponse = response.data; - if (token.error) - return resolve(false); - - Authenticator.user = token.user; - return resolve(token.authenticated); - - }).catch(function(error: Error) - { - return resolve(false); - }); - }); - } - } -} \ No newline at end of file diff --git a/admin/lib/config.ts b/admin/lib/config.ts deleted file mode 100644 index 1e8ea8bb..00000000 --- a/admin/lib/config.ts +++ /dev/null @@ -1,177 +0,0 @@ -module clientAdmin -{ - 'use strict'; - - /** - * A custom interface using our additional variables - */ - interface CustomState extends ng.ui.IState - { - authenticate?: boolean; - } - - /** - * Configures the Angular application - */ - export class Config - { - // $inject annotation. - public static $inject = [ - "$urlRouterProvider", - "$stateProvider", - "$locationProvider", - "$httpProvider", - "cfpLoadingBarProvider" - ]; - - /** - * Creates an instance of the configurator - */ - constructor(routeProvider: angular.ui.IUrlRouterProvider, stateProvider: angular.ui.IStateProvider, $locationProvider: angular.ILocationProvider, $httpProvider: angular.IHttpProvider, cfpLoadingBarProvider) - { - $locationProvider.html5Mode(true); - - // Turn off the loading bar spinner - cfpLoadingBarProvider.includeSpinner = false; - - // Allows us to use CORS with angular - $httpProvider.defaults.withCredentials = true; - - // When we go to logout - it redirects us back to the login screen after its task is complete - routeProvider.when("/logout", ["$state", "Authenticator", function(state: ng.ui.IStateService, auth: Authenticator) - { - return auth.logout().then(function (val) - { - state.go("login"); - }); - }]); - - // If the path doesn't match any of the urls go to the default state - routeProvider.otherwise(function ($injector, $location) - { - var $state = $injector.get("$state"); - $state.go("default"); - }); - - // Setup the different states - stateProvider - .state("default", { - views: { - "main-view": { - templateUrl: "states/default/dashboard.html", - "controller": ["$scope", function ($scope) - { - var dashLinks = []; - for (var i = 0, l = _plugins.length; i < l; i++) - dashLinks = dashLinks.concat(_plugins[i].dashboardLinks); - - $scope.dashLinks = dashLinks; - }] - } - }, - url: "/", - authenticate: true - }) - .state('default.seo', { - templateUrl: 'states/seo/dash-seo.html', - url: 'seo', - authenticate: true, - controller: "seoCtrl", - controllerAs: "controller" - }) - .state('default.media', { - templateUrl: 'states/media/dash-media.html', - url: 'media', - authenticate: true, - controller: "mediaCtrl", - controllerAs: "mediaController" - }) - .state('default.users', { - templateUrl: 'states/users/dash-users.html', - url: 'users', - authenticate: true, - controller: "usersCtrl", - controllerAs: "controller" - }) - .state('default.posts', { - templateUrl: 'states/posts/dash-posts.html', - url: 'posts', - authenticate: true, - controller: "postsCtrl", - controllerAs: "controller", - onExit: function() - { - tinymce.remove("textarea"); - }, - resolve: { - categories: ["$http", "apiURL", function ($http: ng.IHttpService, apiURL: string) - { - return $http.get(`${apiURL}/categories`).then(function (categories) - { - return categories.data.data; - }); - }] - } - }) - .state("login", { - views: { - "main-view": { - templateUrl: "states/login/log-in.html", - controller: "loginCtrl", - controllerAs: "controller" - } - }, - url: '/login', - authenticate: false - }) - .state("register", { - views: { - "main-view": { - templateUrl: "states/register/register.html", - controller: "registerCtrl", - controllerAs: "controller" - } - }, - onExit: function () - { - Recaptcha.destroy(); - }, - url: '/register', - authenticate: false - }) - .state("message", { - views: { - "main-view": { - templateUrl: "states/message/message.html", - controller: ["$scope", "$stateParams", function ($scope, $stateParams ) - { - // Decodes the html - var txtbox = document.createElement("textarea"); - txtbox.innerHTML = $stateParams.message; - $scope.message = txtbox.value; - - txtbox.innerHTML = $stateParams.origin; - $scope.origin = txtbox.value; - - $scope.error = ($stateParams.status == "error" ? true : false ); - }] - } - }, - url: "/message?message&status&origin" - }) - .state("password-rest", { - views: { - "main-view": { - templateUrl: "states/password-reset/password-reset.html", - controllerAs: "controller", - controller: "passwordCtrl" - } - }, - url: "/password-reset-form?key&user&origin" - }) - - for (var i = 0, l = _plugins.length; i < l; i++) - _plugins[i].onStatesInit(stateProvider); - } - } -} \ No newline at end of file diff --git a/admin/lib/css/animations.scss b/admin/lib/css/animations.scss deleted file mode 100644 index 0a916071..00000000 --- a/admin/lib/css/animations.scss +++ /dev/null @@ -1,21 +0,0 @@ -.animated-panel { - overflow:hidden; -} -.animated-panel.ng-hide { - max-height: 0 !important; -} -.animated-panel.ng-hide-add.ng-hide-add-active, -.animated-panel.ng-hide-remove.ng-hide-remove-active { - -webkit-transition: all linear 0.25s; - transition: all linear 0.25s; -} - -.animated-panel-small { - max-height: 100px; -} -.animated-panel-med { - max-height: 400px; -} -.animated-panel-large { - max-height: 800px; -} \ No newline at end of file diff --git a/admin/lib/css/bootstrap.scss b/admin/lib/css/bootstrap.scss deleted file mode 100644 index 61897191..00000000 --- a/admin/lib/css/bootstrap.scss +++ /dev/null @@ -1,321 +0,0 @@ -/** -====================================================== - CSS BASE DEFINITIONS -====================================================== -Please only put css rules in here that fix / provide -global rules for all pages - - eg: Default font for all pages - -The base css was generated by normalize.css v3.0.2 -**/ - -html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { - font-family: 'Roboto Condensed', Helvetica, Arial, sans-serif; - color:#666666; - font-size:25px; -} - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ - -} - -body, html { - margin: 0; - height: 100%; -} - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -audio:not([controls]) { - display: none; - height: 0; -} - -[hidden], -template { - display: none; -} - -a { - background-color: transparent; -} - -a:active, -a:hover { - outline: 0; -} - -abbr[title] { - border-bottom: 1px dotted; -} - -b, -strong { - font-weight: bold; -} - -dfn { - font-style: italic; -} - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -mark { - background: #ff0; - color: #000; -} - -small { - font-size: 80%; -} - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -img { - border: 0; -} - -svg:not(:root) { - overflow: hidden; -} - -figure { - margin: 1em 40px; -} - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -pre { - overflow: auto; -} - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ - border: 1px solid #ddd; - background: #F2F2F2; -} - -button { - overflow: visible; -} - -button, -select { - text-transform: none; -} - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -button[disabled], -html input[disabled] { - cursor: default; -} - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -input { - line-height: normal; -} - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -textarea { - overflow: auto; -} - -optgroup { - font-weight: bold; -} - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} - - -input { - outline:none; -} -input.error { - border:1px solid red; -} -.success { - color:green; -} -button[disabled], html input[disabled] { - opacity:0.5; -} -.contact-blocks { - width: 80%; - margin: 120px auto; -} - -.block { - float: left; - width: 33.333333%; - text-align: center; -} -.block .title { - font-weight:bold; - font-size:30px; - margin: 30px 0 40px 0; -} -.block-content { - line-height:40px; - padding: 5px; - box-sizing: content-box; -} -.error { - color:red; -} -.button { - cursor:pointer; - text-align: center; - padding:10px; - border-radius:5px; - display:inline-block; - border:none; -} -.button.img-selector { - padding: 0 5px; - margin: 0 5px 0 0; -} -.animate-fast { - -webkit-transition: all linear 0.25s; - transition: all linear 0.25s; -} - -.dropdown { - border: 0px solid #ccc; - border-radius: 3px; - overflow: hidden; - background: #F0F0F0 url("data:image/png;base64,R0lGODlhDwAUAIABAAAAAP///yH5BAEAAAEALAAAAAAPABQAAAIXjI+py+0Po5wH2HsXzmw//lHiSJZmUAAAOw==") no-repeat 90% 50%; -} - -.dropdown select { - padding: 5px 8px; - width: 100%; - border: none; - box-shadow: none; - background: transparent; - background-image: none; - -webkit-appearance: none; -} - -.dropdown select:focus { - outline: none; -} -.hidden { - visibility:hidden; -} -.sprite { - display: inline-block; -} \ No newline at end of file diff --git a/admin/lib/css/mce-style.css b/admin/lib/css/mce-style.css deleted file mode 100644 index 122a43cc..00000000 --- a/admin/lib/css/mce-style.css +++ /dev/null @@ -1,14 +0,0 @@ -/** -====================================================== - TINY OVERRIDES -====================================================== -Overrides for the TinyMCE editor -**/ -.mce-container .mce-panel{ - border: 0 solid #efefef; -} - -.mce-content-body { - font-size: inherit; - color: #444; -} \ No newline at end of file diff --git a/admin/lib/css/shapes.scss b/admin/lib/css/shapes.scss deleted file mode 100644 index 649d7ac3..00000000 --- a/admin/lib/css/shapes.scss +++ /dev/null @@ -1,94 +0,0 @@ -.cross { - position: relative; - display:inline-block; - width: 20px; - height: 20px; - margin: 0px 5px 0 5px; -} - -.cross:before, .cross:after { - content: ""; - position: absolute; - background: #eae9e9; -} - -.cross:before { - left: 50%; - width: 30%; - margin-left: -15%; - height: 100%; -} - -.cross:after { - top: 50%; - left: 0; - height: 30%; - margin-top: -15%; - width: 100%; -} - - -.tick { - position: relative; - display:inline-block; - -ms-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - transform: rotate(45deg); -} - -.tick:before, .tick:after { - content: ""; - position: absolute; - background: #84D86C; -} - -.tick:before { - left: 50%; - width: 30%; - margin-left: -15%; - height: 100%; -} -.tick:after { - top: 85%; - left: 0; - height: 30%; - margin-top: -15%; - width: 65%; -} - -.minus { - width: 20px; - height: 20px; - margin: 0px 5px 0 5px; - position: relative; - display:inline-block; -} -.minus:before, .minus:after { - content: ""; - position: absolute; - background: #d0d0f0; -} -.minus:after { - top: 50%; - left: 0; - height: 30%; - margin-top: -15%; - width: 100%; -} - -.arrow { - width: 0; - height: 0; - float: left; - cursor: pointer; - margin: 5px 10px; - - border-top: 10px solid transparent; - border-bottom: 10px solid transparent; - border-left: 20px solid $util-background; -} -.arrow.active { - -ms-transform: rotate(90deg); - -webkit-transform: rotate(90deg); - transform: rotate(90deg); -} \ No newline at end of file diff --git a/admin/lib/css/utils.scss b/admin/lib/css/utils.scss deleted file mode 100644 index 7de4fc7e..00000000 --- a/admin/lib/css/utils.scss +++ /dev/null @@ -1,33 +0,0 @@ -@function shade($color, $percentage) { - @return mix(#000000, $color, $percentage); -} - -@function tint($color, $percentage) { - @return mix(#ffffff, $color, $percentage); -} - -@mixin keyframes($animation-name) { - @-webkit-keyframes #{$animation-name} { - @content; - } - @-moz-keyframes #{$animation-name} { - @content; - } - @-ms-keyframes #{$animation-name} { - @content; - } - @-o-keyframes #{$animation-name} { - @content; - } - @keyframes #{$animation-name} { - @content; - } -} - -@mixin animation($str) { - -webkit-animation: #{$str}; - -moz-animation: #{$str}; - -ms-animation: #{$str}; - -o-animation: #{$str}; - animation: #{$str}; -} \ No newline at end of file diff --git a/admin/lib/definitions/custom/modepress-client.d.ts b/admin/lib/definitions/custom/modepress-client.d.ts deleted file mode 100644 index 0c1f6581..00000000 --- a/admin/lib/definitions/custom/modepress-client.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -declare module ModepressAdmin -{ - /* - * Describes a dashboard link - */ - export interface IDashLik - { - label: string; - icon: string; - state: string; - children?: Array; - } - - /* - * The interface to describe the modepress admin plugins - */ - export interface IAdminPlugin - { - dashboardLinks: Array; - - /** - * Called when the application module is being setup - */ - onInit: (mod: angular.IModule) => void; - - /** - * Called when the states are being setup in config - */ - onStatesInit: (stateProvider: angular.ui.IStateProvider) => void; - } -} \ No newline at end of file diff --git a/admin/lib/definitions/custom/tinymce.d.ts b/admin/lib/definitions/custom/tinymce.d.ts deleted file mode 100644 index 3454fd61..00000000 --- a/admin/lib/definitions/custom/tinymce.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -// incomplete definitions for http://www.tinymce.com - -interface TinyMceObservable -{ - off: (name?: string, callback?: Function) => Object - on: (name: string, callback: Function) => Object - fire: (name: string, args?: Object, bubble?: Boolean) => Event -} - -interface TinyMceEditor extends TinyMceObservable -{ - destroy: (automatic: boolean) => void - remove: () => void - hide: () => void - show: () => void - getContent: (args?: Object) => string - setContent: (content: string, args?: Object) => string - insertContent: (content: string) => string - focus: (skip_focus?: Boolean) => void - undoManager: TinyMceUndoManager - settings: Object -} - -interface TinyMceUndoManager -{ - undo: () => Object - clear: () => void - hasUndo: () => Boolean -} - -interface TinyMceOptions -{ - /** Selector option, allows you to use CSS selector syntax for determining what areas should be editable, this is the recommended way of selecting what elements should be editable. **/ - selector?: string; - - content_css?: string; - - toolbar1?: string; - toolbar2?: string; - - /** This option enables you to specify location of the current skin. Enables you to load TinyMCE from one URL for example a CDN then load a local skin on the current server. */ - skin_url?: string; - - /** This option enables you to auto focus an editor instance. The value of this option should be an editor instance id. The editor instance id is the id for the original textarea or div element that got replaced. */ - auto_focus?: string; - - /** Set the default directionality of the editor. Possible values are: ltr or rtl */ - directionality?: string; - - /** This option will make the editable are behave like very much like a
 tag, and add a scroll instead of wrapping text. */
-    nowrap?: boolean;
-
-    /** This options allows you to turn on/off the resizing handles on images, tables or media objects. This option is enabled by default and allows you to resize table and images. You can also specify a CSS3 selector of what you want to enable resizing on. */
-    object_resizing?: boolean | string;
-
-    /** Set the theme of TinyMCE. */
-    theme?: string;
-
-    /** This option enables you to specify location of the current theme. Enables you to load TinyMCE from one URL for example a CDN then load a local theme on the current server. */
-    theme_url?: string;
-
-    /**
-    * Set what plugins should be included, by default, NO plugins are loaded.
-    * See http://www.tinymce.com/wiki.php/Plugins
-    */
-    plugins?: Array;
-
-    /** Set the height of the editor **/
-    height?: number;
-
-    setup?: (editor) => void;
-}
-
-interface TinyMceStatic extends TinyMceObservable
-{
-    init: (settings: TinyMceOptions) => void;
-    execCommand: (c: string, u: boolean, v: string) => Boolean;
-    editors: Array;
-    activeEditor: TinyMceEditor;
-    get: (id: string) => TinyMceEditor;
-    remove: (id?: string) => TinyMceEditor;
-}
-
-declare var tinymce: TinyMceStatic;
\ No newline at end of file
diff --git a/admin/lib/definitions/required/angular-ui-router.d.ts b/admin/lib/definitions/required/angular-ui-router.d.ts
deleted file mode 100644
index 2b2ccb54..00000000
--- a/admin/lib/definitions/required/angular-ui-router.d.ts
+++ /dev/null
@@ -1,132 +0,0 @@
-// Type definitions for Angular JS 1.1.5+ (ui.router module)
-// Project: https://github.com/angular-ui/ui-router
-// Definitions by: Michel Salib 
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
-
-/// 
-
-declare module angular.ui
-{
-
-    interface IState
-	{
-        name?: string;
-        template?: any;
-        templateUrl?: any;
-        templateProvider?: any;
-        controller?: any;
-        controllerAs?: string;
-        controllerProvider?: any;
-        resolve?: {};
-        url?: string;
-        params?: any;
-        views?: {};
-        abstract?: boolean;
-        onEnter?: any;
-        onExit?: any;
-        data?: any;
-        reloadOnSearch?: boolean;
-    }
-
-    interface IStateProvider extends IServiceProvider
-	{
-        state(name: string, config: IState): IStateProvider;
-        state(config: IState): IStateProvider;
-        decorator(name?: string, decorator?: (state: IState, parent: Function) => any): any;
-    }
-
-    interface IUrlMatcher
-	{
-        concat(pattern: string): IUrlMatcher;
-        exec(path: string, searchParams: {}): {};
-        parameters(): string[];
-        format(values: {}): string;
-    }
-
-    interface IUrlMatcherFactory
-	{
-        compile(pattern: string): IUrlMatcher;
-        isMatcher(o: any): boolean;
-        type(name: string, definition: any, definitionFn?: any): any;
-    }
-
-    interface IUrlRouterProvider extends IServiceProvider
-	{
-        when(whenPath: RegExp, handler: Function): IUrlRouterProvider;
-        when(whenPath: RegExp, handler: any[]): IUrlRouterProvider;
-        when(whenPath: RegExp, toPath: string): IUrlRouterProvider;
-        when(whenPath: IUrlMatcher, hanlder: Function): IUrlRouterProvider;
-        when(whenPath: IUrlMatcher, handler: any[]): IUrlRouterProvider;
-        when(whenPath: IUrlMatcher, toPath: string): IUrlRouterProvider;
-        when(whenPath: string, handler: Function): IUrlRouterProvider;
-        when(whenPath: string, handler: any[]): IUrlRouterProvider;
-        when(whenPath: string, toPath: string): IUrlRouterProvider;
-        otherwise(handler: Function): IUrlRouterProvider;
-        otherwise(handler: any[]): IUrlRouterProvider;
-        otherwise(path: string): IUrlRouterProvider;
-        rule(handler: Function): IUrlRouterProvider;
-        rule(handler: any[]): IUrlRouterProvider;
-    }
-
-    interface IStateOptions
-	{
-        location?: any;
-        inherit?: boolean;
-        relative?: IState;
-        notify?: boolean;
-    }
-
-    interface IHrefOptions
-	{
-        lossy?: boolean;
-        inherit?: boolean;
-        relative?: IState;
-        absolute?: boolean;
-    }
-
-    interface IStateService
-	{
-        go(to: string, params?: {}, options?: IStateOptions): IPromise;
-        transitionTo(state: string, params?: {}, updateLocation?: boolean): void;
-        transitionTo(state: string, params?: {}, options?: IStateOptions): void;
-        includes(state: string, params?: {}): boolean;
-        is(state: string, params?: {}): boolean;
-        is(state: IState, params?: {}): boolean;
-        href(state: IState, params?: {}, options?: IHrefOptions): string;
-        href(state: string, params?: {}, options?: IHrefOptions): string;
-        get(state: string): IState;
-        get(): IState[];
-        current: IState;
-        params: IStateParamsService;
-        reload(): void;
-    }
-
-    interface IStateParamsService
-	{
-        [key: string]: any;
-    }
-
-    interface IUrlRouterService
-	{
-    	/*
-    	 * Triggers an update; the same update that happens when the address bar
-    	 * url changes, aka $locationChangeSuccess.
-    	 *
-    	 * This method is useful when you need to use preventDefault() on the
-    	 * $locationChangeSuccess event, perform some custom logic (route protection,
-    	 * auth, config, redirection, etc) and then finally proceed with the transition
-    	 * by calling $urlRouter.sync().
-    	 *
-    	 */
-        sync(): void;
-    }
-
-    interface IUiViewScrollProvider
-	{
-        /*
-         * Reverts back to using the core $anchorScroll service for scrolling
-         * based on the url anchor.
-         */
-        useAnchorScroll(): void;
-    }
-}
\ No newline at end of file
diff --git a/admin/lib/definitions/required/angular.d.ts b/admin/lib/definitions/required/angular.d.ts
deleted file mode 100644
index 35f8b722..00000000
--- a/admin/lib/definitions/required/angular.d.ts
+++ /dev/null
@@ -1,1666 +0,0 @@
-// Type definitions for Angular JS 1.3+
-// Project: http://angularjs.org
-// Definitions by: Diego Vilar 
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
-
-declare var angular: angular.IAngularStatic;
-
-// Support for painless dependency injection
-interface Function
-{
-    $inject?: string[];
-}
-
-// Collapse angular into ng
-import ng = angular;
-// Support AMD require
-declare module 'angular' {
-    export = angular;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// ng module (angular.js)
-///////////////////////////////////////////////////////////////////////////////
-declare module angular
-{
-
-    // not directly implemented, but ensures that constructed class implements $get
-    interface IServiceProviderClass
-	{
-        new (...args: any[]): IServiceProvider;
-    }
-
-    interface IServiceProviderFactory
-	{
-        (...args: any[]): IServiceProvider;
-    }
-
-    // All service providers extend this interface
-    interface IServiceProvider
-	{
-        $get: any;
-    }
-
-    interface IAngularBootstrapConfig
-	{
-        strictDi?: boolean;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // AngularStatic
-    // see http://docs.angularjs.org/api
-    ///////////////////////////////////////////////////////////////////////////
-    interface IAngularStatic
-	{
-        bind(context: any, fn: Function, ...args: any[]): Function;
-
-        /**
-         * 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: 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;
-
-        /**
-         * Creates a deep copy of source, which should be an object or an array.
-         *
-         * - If no destination is supplied, a copy of the object or array is created.
-         * - If a destination is provided, all of its elements (for array) or properties (for objects) are deleted and then all elements/properties from the source are copied to it.
-         * - If source is not an object or array (inc. null and undefined), source is returned.
-         * - If source is identical to 'destination' an exception will be thrown.
-         *
-         * @param source The source that will be used to make a copy. Can be any type, including primitives, null, and undefined.
-         * @param destination Destination into which the source is copied. If provided, must be of the same type as source.
-         */
-        copy(source: T, destination?: T): T;
-
-        /**
-         * Wraps a raw DOM element or HTML string as a jQuery element.
-         *
-         * If jQuery is available, angular.element is an alias for the jQuery function. If jQuery is not available, angular.element delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite."
-         */
-        element: IAugmentedJQueryStatic;
-        equals(value1: any, value2: any): boolean;
-        extend(destination: any, ...sources: any[]): any;
-
-        /**
-         * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
-         *
-         * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
-         *
-         * @param obj Object to iterate over.
-         * @param iterator Iterator function.
-         * @param context Object to become context (this) for the iterator function.
-         */
-        forEach(obj: T[], iterator: (value: T, key: number) => any, context?: any): any;
-        /**
-         * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
-         *
-         * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
-         *
-         * @param obj Object to iterate over.
-         * @param iterator Iterator function.
-         * @param context Object to become context (this) for the iterator function.
-         */
-        forEach(obj: { [index: string]: T; }, iterator: (value: T, key: string) => any, context?: any): any;
-        /**
-         * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
-         *
-         * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
-         *
-         * @param obj Object to iterate over.
-         * @param iterator Iterator function.
-         * @param context Object to become context (this) for the iterator function.
-         */
-        forEach(obj: any, iterator: (value: any, key: any) => any, context?: any): any;
-
-        fromJson(json: string): any;
-        identity(arg?: any): any;
-        injector(modules?: any[]): auto.IInjectorService;
-        isArray(value: any): boolean;
-        isDate(value: any): boolean;
-        isDefined(value: any): boolean;
-        isElement(value: any): boolean;
-        isFunction(value: any): boolean;
-        isNumber(value: any): boolean;
-        isObject(value: any): boolean;
-        isString(value: any): boolean;
-        isUndefined(value: any): boolean;
-        lowercase(str: string): string;
-
-        /**
-         * The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism.
-         *
-         * When passed two or more arguments, a new module is created. If passed only one argument, an existing module (the name passed as the first argument to module) is retrieved.
-         *
-         * @param name The name of the module to create or retrieve.
-         * @param requires The names of modules this module depends on. If specified then new module is being created. If unspecified then the module is being retrieved for further configuration.
-         * @param configFn Optional configuration function for the module.
-         */
-        module(
-            name: string,
-            requires?: string[],
-            configFn?: Function): IModule;
-
-        noop(...args: any[]): void;
-        reloadWithDebugInfo(): void;
-        toJson(obj: any, pretty?: boolean): string;
-        uppercase(str: string): string;
-        version: {
-            full: string;
-            major: number;
-            minor: number;
-            dot: number;
-            codeName: string;
-        };
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // Module
-    // see http://docs.angularjs.org/api/angular.Module
-    ///////////////////////////////////////////////////////////////////////////
-    interface IModule
-	{
-        animation(name: string, animationFactory: Function): IModule;
-        animation(name: string, inlineAnnotatedFunction: any[]): IModule;
-        animation(object: Object): IModule;
-        /**
-         * Use this method to register work which needs to be performed on module loading.
-         *
-         * @param configFn Execute this function on module load. Useful for service configuration.
-         */
-        config(configFn: Function): IModule;
-        /**
-         * Use this method to register work which needs to be performed on module loading.
-         *
-         * @param inlineAnnotatedFunction Execute this function on module load. Useful for service configuration.
-         */
-        config(inlineAnnotatedFunction: any[]): IModule;
-        /**
-         * Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator.
-         *
-         * @param name The name of the constant.
-         * @param value The constant value.
-         */
-        constant(name: string, value: any): IModule;
-        constant(object: Object): IModule;
-        /**
-         * The $controller service is used by Angular to create new controllers.
-         *
-         * This provider allows controller registration via the register method.
-         *
-         * @param name Controller name, or an object map of controllers where the keys are the names and the values are the constructors.
-         * @param controllerConstructor Controller constructor fn (optionally decorated with DI annotations in the array notation).
-         */
-        controller(name: string, controllerConstructor: Function): IModule;
-        /**
-         * The $controller service is used by Angular to create new controllers.
-         *
-         * This provider allows controller registration via the register method.
-         *
-         * @param name Controller name, or an object map of controllers where the keys are the names and the values are the constructors.
-         * @param controllerConstructor Controller constructor fn (optionally decorated with DI annotations in the array notation).
-         */
-        controller(name: string, inlineAnnotatedConstructor: any[]): IModule;
-        controller(object: Object): IModule;
-        /**
-         * Register a new directive with the compiler.
-         *
-         * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind)
-         * @param directiveFactory An injectable directive factory function.
-         */
-        directive(name: string, directiveFactory: IDirectiveFactory): IModule;
-        /**
-         * Register a new directive with the compiler.
-         *
-         * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind)
-         * @param directiveFactory An injectable directive factory function.
-         */
-        directive(name: string, inlineAnnotatedFunction: any[]): IModule;
-        directive(object: Object): IModule;
-        /**
-         * Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider.
-         *
-         * @param name The name of the instance.
-         * @param $getFn The $getFn for the instance creation. Internally this is a short hand for $provide.provider(name, {$get: $getFn}).
-         */
-        factory(name: string, $getFn: Function): IModule;
-        /**
-         * Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider.
-         *
-         * @param name The name of the instance.
-         * @param inlineAnnotatedFunction The $getFn for the instance creation. Internally this is a short hand for $provide.provider(name, {$get: $getFn}).
-         */
-        factory(name: string, inlineAnnotatedFunction: any[]): IModule;
-        factory(object: Object): IModule;
-        filter(name: string, filterFactoryFunction: Function): IModule;
-        filter(name: string, inlineAnnotatedFunction: any[]): IModule;
-        filter(object: Object): IModule;
-        provider(name: string, serviceProviderFactory: IServiceProviderFactory): IModule;
-        provider(name: string, serviceProviderConstructor: IServiceProviderClass): IModule;
-        provider(name: string, inlineAnnotatedConstructor: any[]): IModule;
-        provider(name: string, providerObject: IServiceProvider): IModule;
-        provider(object: Object): IModule;
-        /**
-         * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests.
-         */
-        run(initializationFunction: Function): IModule;
-        /**
-         * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests.
-         */
-        run(inlineAnnotatedFunction: any[]): IModule;
-        service(name: string, serviceConstructor: Function): IModule;
-        service(name: string, inlineAnnotatedConstructor: any[]): IModule;
-        service(object: Object): IModule;
-        /**
-         * Register a value service with the $injector, such as a string, a number, an array, an object or a function. This is short for registering a service where its provider's $get property is a factory function that takes no arguments and returns the value service.
-
-           Value services are similar to constant services, except that they cannot be injected into a module configuration function (see config) but they can be overridden by an Angular decorator.
-         *
-         * @param name The name of the instance.
-         * @param value The value.
-         */
-        value(name: string, value: any): IModule;
-        value(object: Object): IModule;
-
-        // Properties
-        name: string;
-        requires: string[];
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // Attributes
-    // see http://docs.angularjs.org/api/ng.$compile.directive.Attributes
-    ///////////////////////////////////////////////////////////////////////////
-    interface IAttributes
-	{
-        /**
-         * this is necessary to be able to access the scoped attributes. it's not very elegant
-         * because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way
-         * this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656
-         */
-        [name: string]: any;
-
-        /**
-         * Adds the CSS class value specified by the classVal parameter to the
-         * element. If animations are enabled then an animation will be triggered
-         * for the class addition.
-         */
-        $addClass(classVal: string): void;
-
-        /**
-         * Removes the CSS class value specified by the classVal parameter from the
-         * element. If animations are enabled then an animation will be triggered for
-         * the class removal.
-         */
-        $removeClass(classVal: string): void;
-
-        /**
-         * Set DOM element attribute value.
-         */
-        $set(key: string, value: any): void;
-
-        /**
-         * Observes an interpolated attribute.
-         * The observer function will be invoked once during the next $digest
-         * following compilation. The observer is then invoked whenever the
-         * interpolated value changes.
-         */
-        $observe(name: string, fn: (value?: any) => any): Function;
-
-        /**
-         * A map of DOM element attribute names to the normalized name. This is needed
-         * to do reverse lookup from normalized name back to actual name.
-         */
-        $attr: Object;
-    }
-
-    /**
-     * form.FormController - type in module ng
-     * see https://docs.angularjs.org/api/ng/type/form.FormController
-     */
-    interface IFormController
-	{
-
-        /**
-         * Indexer which should return ng.INgModelController for most properties but cannot because of "All named properties must be assignable to string indexer type" constraint - see https://github.com/Microsoft/TypeScript/issues/272
-         */
-        [name: string]: any;
-
-        $pristine: boolean;
-        $dirty: boolean;
-        $valid: boolean;
-        $invalid: boolean;
-        $submitted: boolean;
-        $error: any;
-        $addControl(control: ng.INgModelController): void;
-        $removeControl(control: ng.INgModelController): void;
-        $setValidity(validationErrorKey: string, isValid: boolean, control: ng.INgModelController): void;
-        $setDirty(): void;
-        $setPristine(): void;
-        $commitViewValue(): void;
-        $rollbackViewValue(): void;
-        $setSubmitted(): void;
-        $setUntouched(): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // NgModelController
-    // see http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController
-    ///////////////////////////////////////////////////////////////////////////
-    interface INgModelController
-	{
-        $render(): void;
-        $setValidity(validationErrorKey: string, isValid: boolean): void;
-        // Documentation states viewValue and modelValue to be a string but other
-        // types do work and it's common to use them.
-        $setViewValue(value: any, trigger?: string): void;
-        $setPristine(): void;
-        $validate(): void;
-        $setTouched(): void;
-        $setUntouched(): void;
-        $rollbackViewValue(): void;
-        $commitViewValue(): void;
-        $isEmpty(value: any): boolean;
-
-        $viewValue: any;
-
-        $modelValue: any;
-
-        $parsers: IModelParser[];
-        $formatters: IModelFormatter[];
-        $viewChangeListeners: IModelViewChangeListener[];
-        $error: any;
-        $name: string;
-
-        $touched: boolean;
-        $untouched: boolean;
-
-        $validators: IModelValidators;
-        $asyncValidators: IAsyncModelValidators;
-
-        $pending: any;
-        $pristine: boolean;
-        $dirty: boolean;
-        $valid: boolean;
-        $invalid: boolean;
-    }
-
-    interface IModelValidators
-	{
-        [index: string]: (...args: any[]) => boolean;
-    }
-
-    interface IAsyncModelValidators
-	{
-        [index: string]: (...args: any[]) => ng.IPromise;
-    }
-
-    interface IModelParser
-	{
-        (value: any): any;
-    }
-
-    interface IModelFormatter
-	{
-        (value: any): any;
-    }
-
-    interface IModelViewChangeListener
-	{
-        (): void;
-    }
-
-    /**
-     * $rootScope - $rootScopeProvider - service in module ng
-     * see https://docs.angularjs.org/api/ng/type/$rootScope.Scope and https://docs.angularjs.org/api/ng/service/$rootScope
-     */
-    interface IRootScopeService
-	{
-        [index: string]: any;
-
-        $apply(): any;
-        $apply(exp: string): any;
-        $apply(exp: (scope: IScope) => any): any;
-
-        $applyAsync(): any;
-        $applyAsync(exp: string): any;
-        $applyAsync(exp: (scope: IScope) => any): any;
-
-        $broadcast(name: string, ...args: any[]): IAngularEvent;
-        $destroy(): void;
-        $digest(): void;
-        $emit(name: string, ...args: any[]): IAngularEvent;
-
-        $eval(): any;
-        $eval(expression: string, locals?: Object): any;
-        $eval(expression: (scope: IScope) => any, locals?: Object): any;
-
-        $evalAsync(): void;
-        $evalAsync(expression: string): void;
-        $evalAsync(expression: (scope: IScope) => any): void;
-
-        // Defaults to false by the implementation checking strategy
-        $new(isolate?: boolean, parent?: IScope): IScope;
-
-        /**
-         * Listens on events of a given type. See $emit for discussion of event life cycle.
-         *
-         * The event listener function format is: function(event, args...).
-         *
-         * @param name Event name to listen on.
-         * @param listener Function to call when the event is emitted.
-         */
-        $on(name: string, listener: (event: IAngularEvent, ...args: any[]) => any): Function;
-
-        $watch(watchExpression: string, listener?: string, objectEquality?: boolean): Function;
-        $watch(watchExpression: string, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: boolean): Function;
-        $watch(watchExpression: (scope: IScope) => any, listener?: string, objectEquality?: boolean): Function;
-        $watch(watchExpression: (scope: IScope) => any, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: boolean): Function;
-
-        $watchCollection(watchExpression: string, listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
-        $watchCollection(watchExpression: (scope: IScope) => any, listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
-
-        $watchGroup(watchExpressions: any[], listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
-        $watchGroup(watchExpressions: { (scope: IScope): any }[], listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
-
-        $parent: IScope;
-        $root: IRootScopeService;
-        $id: number;
-
-        // Hidden members
-        $$isolateBindings: any;
-        $$phase: any;
-    }
-
-    interface IScope extends IRootScopeService { }
-	
-    /**
-     * $scope for ngRepeat directive.
-     * see https://docs.angularjs.org/api/ng/directive/ngRepeat
-     */
-    interface IRepeatScope extends IScope
-	{
-	
-        /**
-         * iterator offset of the repeated element (0..length-1).
-         */
-        $index: number;
-
-        /**
-         * true if the repeated element is first in the iterator.
-         */
-        $first: boolean;
-
-        /**
-         * true if the repeated element is between the first and last in the iterator.
-         */
-        $middle: boolean;
-
-        /**
-         * true if the repeated element is last in the iterator.
-         */
-        $last: boolean;
-
-        /**
-         * true if the iterator position $index is even (otherwise false).
-         */
-        $even: boolean;
-
-        /**
-         * true if the iterator position $index is odd (otherwise false).
-         */
-        $odd: boolean;
-
-	}
-
-    interface IAngularEvent
-	{
-        /**
-         * the scope on which the event was $emit-ed or $broadcast-ed.
-         */
-        targetScope: IScope;
-        /**
-         * the scope that is currently handling the event. Once the event propagates through the scope hierarchy, this property is set to null.
-         */
-        currentScope: IScope;
-        /**
-         * name of the event.
-         */
-        name: string;
-        /**
-         * calling stopPropagation function will cancel further event propagation (available only for events that were $emit-ed).
-         */
-        stopPropagation?: Function;
-        /**
-         * calling preventDefault sets defaultPrevented flag to true.
-         */
-        preventDefault: Function;
-        /**
-         * true if preventDefault was called.
-         */
-        defaultPrevented: boolean;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // WindowService
-    // see http://docs.angularjs.org/api/ng.$window
-    ///////////////////////////////////////////////////////////////////////////
-    interface IWindowService extends Window
-	{
-        [key: string]: any;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // BrowserService
-    // TODO undocumented, so we need to get it from the source code
-    ///////////////////////////////////////////////////////////////////////////
-    interface IBrowserService
-	{
-        [key: string]: any;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // TimeoutService
-    // see http://docs.angularjs.org/api/ng.$timeout
-    ///////////////////////////////////////////////////////////////////////////
-    interface ITimeoutService
-	{
-        (func: Function, delay?: number, invokeApply?: boolean): IPromise;
-        cancel(promise: IPromise): boolean;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // IntervalService
-    // see http://docs.angularjs.org/api/ng.$interval
-    ///////////////////////////////////////////////////////////////////////////
-    interface IIntervalService
-	{
-        (func: Function, delay: number, count?: number, invokeApply?: boolean): IPromise;
-        cancel(promise: IPromise): boolean;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // AngularProvider
-    // see http://docs.angularjs.org/api/ng/provider/$animateProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface IAnimateProvider
-	{
-        /**
-         * Registers a new injectable animation factory function.
-         *
-         * @param name The name of the animation.
-         * @param factory The factory function that will be executed to return the animation object.
-         */
-        register(name: string, factory: () => IAnimateCallbackObject): void;
-
-        /**
-         * Gets and/or sets the CSS class expression that is checked when performing an animation.
-         *
-         * @param expression The className expression which will be checked against all animations.
-         * @returns The current CSS className expression value. If null then there is no expression value.
-         */
-        classNameFilter(expression?: RegExp): RegExp;
-    }
-
-    /**
-     * The animation object which contains callback functions for each event that is expected to be animated.
-     */
-    interface IAnimateCallbackObject
-	{
-        eventFn(element: Node, doneFn: () => void): Function;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // FilterService
-    // see http://docs.angularjs.org/api/ng.$filter
-    // see http://docs.angularjs.org/api/ng.$filterProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface IFilterService
-	{
-        (name: string): Function;
-    }
-
-    interface IFilterProvider extends IServiceProvider
-	{
-        register(name: string, filterFactory: Function): IServiceProvider;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // LocaleService
-    // see http://docs.angularjs.org/api/ng.$locale
-    ///////////////////////////////////////////////////////////////////////////
-    interface ILocaleService
-	{
-        id: string;
-
-        // These are not documented
-        // Check angular's i18n files for exemples
-        NUMBER_FORMATS: ILocaleNumberFormatDescriptor;
-        DATETIME_FORMATS: ILocaleDateTimeFormatDescriptor;
-        pluralCat: (num: any) => string;
-    }
-
-    interface ILocaleNumberFormatDescriptor
-	{
-        DECIMAL_SEP: string;
-        GROUP_SEP: string;
-        PATTERNS: ILocaleNumberPatternDescriptor[];
-        CURRENCY_SYM: string;
-    }
-
-    interface ILocaleNumberPatternDescriptor
-	{
-        minInt: number;
-        minFrac: number;
-        maxFrac: number;
-        posPre: string;
-        posSuf: string;
-        negPre: string;
-        negSuf: string;
-        gSize: number;
-        lgSize: number;
-    }
-
-    interface ILocaleDateTimeFormatDescriptor
-	{
-        MONTH: string[];
-        SHORTMONTH: string[];
-        DAY: string[];
-        SHORTDAY: string[];
-        AMPMS: string[];
-        medium: string;
-        short: string;
-        fullDate: string;
-        longDate: string;
-        mediumDate: string;
-        shortDate: string;
-        mediumTime: string;
-        shortTime: string;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // LogService
-    // see http://docs.angularjs.org/api/ng.$log
-    // see http://docs.angularjs.org/api/ng.$logProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface ILogService
-	{
-        debug: ILogCall;
-        error: ILogCall;
-        info: ILogCall;
-        log: ILogCall;
-        warn: ILogCall;
-    }
-
-    interface ILogProvider
-	{
-        debugEnabled(): boolean;
-        debugEnabled(enabled: boolean): ILogProvider;
-    }
-
-    // We define this as separate interface so we can reopen it later for
-    // the ngMock module.
-    interface ILogCall
-	{
-        (...args: any[]): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // ParseService
-    // see http://docs.angularjs.org/api/ng.$parse
-    // see http://docs.angularjs.org/api/ng.$parseProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface IParseService
-	{
-        (expression: string): ICompiledExpression;
-    }
-
-    interface IParseProvider
-	{
-        logPromiseWarnings(): boolean;
-        logPromiseWarnings(value: boolean): IParseProvider;
-
-        unwrapPromises(): boolean;
-        unwrapPromises(value: boolean): IParseProvider;
-    }
-
-    interface ICompiledExpression
-	{
-        (context: any, locals?: any): any;
-
-        // If value is not provided, undefined is gonna be used since the implementation
-        // does not check the parameter. Let's force a value for consistency. If consumer
-        // whants to undefine it, pass the undefined value explicitly.
-        assign(context: any, value: any): any;
-    }
-
-    /**
-     * $location - $locationProvider - service in module ng
-     * see https://docs.angularjs.org/api/ng/service/$location
-     */
-    interface ILocationService
-	{
-        absUrl(): string;
-        hash(): string;
-        hash(newHash: string): ILocationService;
-        host(): string;
-
-        /**
-         * Return path of current url
-         */
-        path(): string;
-
-        /**
-         * Change path when called with parameter and return $location.
-         * Note: Path should always begin with forward slash (/), this method will add the forward slash if it is missing.
-         *
-         * @param path New path
-         */
-        path(path: string): ILocationService;
-
-        port(): number;
-        protocol(): string;
-        replace(): ILocationService;
-
-        /**
-         * Return search part (as object) of current url
-         */
-        search(): any;
-
-        /**
-         * Change search part when called with parameter and return $location.
-         *
-         * @param search When called with a single argument the method acts as a setter, setting the search component of $location to the specified value.
-         *
-         * If the argument is a hash object containing an array of values, these values will be encoded as duplicate search parameters in the url.
-         */
-        search(search: any): ILocationService;
-
-        /**
-         * Change search part when called with parameter and return $location.
-         *
-         * @param search New search params
-         * @param paramValue If search is a string or a Number, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted. If paramValue is an array, it will override the property of the search component of $location specified via the first argument. If paramValue is true, the property specified via the first argument will be added with no value nor trailing equal sign.
-         */
-        search(search: string, paramValue: string|number|string[]|boolean): ILocationService;
-
-        state(): any;
-        state(state: any): ILocationService;
-        url(): string;
-        url(url: string): ILocationService;
-    }
-
-    interface ILocationProvider extends IServiceProvider
-	{
-        hashPrefix(): string;
-        hashPrefix(prefix: string): ILocationProvider;
-        html5Mode(): boolean;
-
-        // Documentation states that parameter is string, but
-        // implementation tests it as boolean, which makes more sense
-        // since this is a toggler
-        html5Mode(active: boolean): ILocationProvider;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // DocumentService
-    // see http://docs.angularjs.org/api/ng.$document
-    ///////////////////////////////////////////////////////////////////////////
-    interface IDocumentService extends IAugmentedJQuery { }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // ExceptionHandlerService
-    // see http://docs.angularjs.org/api/ng.$exceptionHandler
-    ///////////////////////////////////////////////////////////////////////////
-    interface IExceptionHandlerService
-	{
-        (exception: Error, cause?: string): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // RootElementService
-    // see http://docs.angularjs.org/api/ng.$rootElement
-    ///////////////////////////////////////////////////////////////////////////
-    interface IRootElementService extends JQuery { }
-
-    interface IQResolveReject
-	{
-        (): void;
-        (value: T): void;
-    }
-    /**
-     * $q - service in module ng
-     * A promise/deferred implementation inspired by Kris Kowal's Q.
-     * See http://docs.angularjs.org/api/ng/service/$q
-     */
-    interface IQService
-	{
-        new (resolver: (resolve: IQResolveReject) => any): IPromise;
-        new (resolver: (resolve: IQResolveReject, reject: IQResolveReject) => any): IPromise;
-        new (resolver: (resolve: IQResolveReject, reject: IQResolveReject) => any): IPromise;
-
-        /**
-         * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
-         *
-         * Returns a single promise that will be resolved with an array/hash of values, each value corresponding to the promise at the same index/key in the promises array/hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
-         *
-         * @param promises An array or hash of promises.
-         */
-        all(promises: IPromise[]|{ [id: string]: IPromise; }): IPromise;
-        /**
-         * Creates a Deferred object which represents a task which will finish in the future.
-         */
-        defer(): IDeferred;
-        /**
-         * Creates a promise that is resolved as rejected with the specified reason. This api should be used to forward rejection in a chain of promises. If you are dealing with the last promise in a promise chain, you don't need to worry about it.
-         *
-         * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of reject as the throw keyword in JavaScript. This also means that if you "catch" an error via a promise error callback and you want to forward the error to the promise derived from the current promise, you have to "rethrow" the error by returning a rejection constructed via reject.
-         *
-         * @param reason Constant, message, exception or an object representing the rejection reason.
-         */
-        reject(reason?: any): IPromise;
-        /**
-         * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
-         *
-         * @param value Value or a promise
-         */
-        when(value: IPromise|T): IPromise;
-        /**
-         * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
-         *
-         * @param value Value or a promise
-         */
-        when(): IPromise;
-    }
-
-    interface IPromise
-	{
-        /**
-         * Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected.
-         *
-         * 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(successCallback: (promiseValue: T) => IHttpPromise|IPromise|TResult, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise;
-
-        /**
-         * Shorthand for promise.then(null, errorCallback)
-         */
-        catch(onRejected: (reason: any) => IHttpPromise|IPromise|TResult): IPromise;
-
-        /**
-         * 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.
-         *
-         * Because finally is a reserved word in JavaScript and reserved keywords are not supported as property names by ES3, you'll need to invoke the method like promise['finally'](callback) to make your code IE8 and Android 2.x compatible.
-         */
-        finally(finallyCallback: () => any): IPromise;
-    }
-
-    interface IDeferred
-	{
-        resolve(value?: T): void;
-        reject(reason?: any): void;
-        notify(state?: any): void;
-        promise: IPromise;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // AnchorScrollService
-    // see http://docs.angularjs.org/api/ng.$anchorScroll
-    ///////////////////////////////////////////////////////////////////////////
-    interface IAnchorScrollService
-	{
-        (): void;
-        yOffset: any;
-    }
-
-    interface IAnchorScrollProvider extends IServiceProvider
-	{
-        disableAutoScrolling(): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // CacheFactoryService
-    // see http://docs.angularjs.org/api/ng.$cacheFactory
-    ///////////////////////////////////////////////////////////////////////////
-    interface ICacheFactoryService
-	{
-        // Lets not foce the optionsMap to have the capacity member. Even though
-        // it's the ONLY option considered by the implementation today, a consumer
-        // might find it useful to associate some other options to the cache object.
-        //(cacheId: string, optionsMap?: { capacity: number; }): CacheObject;
-        (cacheId: string, optionsMap?: { capacity: number; }): ICacheObject;
-
-        // Methods bellow are not documented
-        info(): any;
-        get(cacheId: string): ICacheObject;
-    }
-
-    interface ICacheObject
-	{
-        info():
-			{
-				id: string;
-				size: number;
-
-				// Not garanteed to have, since it's a non-mandatory option
-				//capacity: number;
-			};
-        put(key: string, value?: T): T;
-        get(key: string): any;
-        remove(key: string): void;
-        removeAll(): void;
-        destroy(): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // CompileService
-    // see http://docs.angularjs.org/api/ng.$compile
-    // see http://docs.angularjs.org/api/ng.$compileProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface ICompileService
-	{
-        (element: string, transclude?: ITranscludeFunction, maxPriority?: number): ITemplateLinkingFunction;
-        (element: Element, transclude?: ITranscludeFunction, maxPriority?: number): ITemplateLinkingFunction;
-        (element: JQuery, transclude?: ITranscludeFunction, maxPriority?: number): ITemplateLinkingFunction;
-    }
-
-    interface ICompileProvider extends IServiceProvider
-	{
-        directive(name: string, directiveFactory: Function): ICompileProvider;
-
-        // Undocumented, but it is there...
-        directive(directivesMap: any): ICompileProvider;
-
-        aHrefSanitizationWhitelist(): RegExp;
-        aHrefSanitizationWhitelist(regexp: RegExp): ICompileProvider;
-
-        imgSrcSanitizationWhitelist(): RegExp;
-        imgSrcSanitizationWhitelist(regexp: RegExp): ICompileProvider;
-
-        debugInfoEnabled(enabled?: boolean): any;
-    }
-
-    interface ICloneAttachFunction
-	{
-        // Let's hint but not force cloneAttachFn's signature
-        (clonedElement?: JQuery, scope?: IScope): any;
-    }
-
-    // This corresponds to the "publicLinkFn" returned by $compile.
-    interface ITemplateLinkingFunction
-	{
-        (scope: IScope, cloneAttachFn?: ICloneAttachFunction): IAugmentedJQuery;
-    }
-
-    // This corresponds to $transclude (and also the transclude function passed to link).
-    interface ITranscludeFunction
-	{
-        // If the scope is provided, then the cloneAttachFn must be as well.
-        (scope: IScope, cloneAttachFn: ICloneAttachFunction): IAugmentedJQuery;
-        // If one argument is provided, then it's assumed to be the cloneAttachFn.
-        (cloneAttachFn?: ICloneAttachFunction): IAugmentedJQuery;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // ControllerService
-    // see http://docs.angularjs.org/api/ng.$controller
-    // see http://docs.angularjs.org/api/ng.$controllerProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface IControllerService
-	{
-        // Although the documentation doesn't state this, locals are optional
-        (controllerConstructor: Function, locals?: any): any;
-        (controllerName: string, locals?: any): any;
-    }
-
-    interface IControllerProvider extends IServiceProvider
-	{
-        register(name: string, controllerConstructor: Function): void;
-        register(name: string, dependencyAnnotatedConstructor: any[]): void;
-        allowGlobals(): void;
-    }
-
-    /**
-     * HttpService
-     * see http://docs.angularjs.org/api/ng/service/$http
-     */
-    interface IHttpService
-	{
-        /**
-         * Object describing the request to be made and how it should be processed.
-         */
-        (config: IRequestConfig): IHttpPromise;
-
-        /**
-         * Shortcut method to perform GET request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param config Optional configuration object
-         */
-        get(url: string, config?: IRequestShortcutConfig): IHttpPromise;
-
-        /**
-         * Shortcut method to perform DELETE request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param config Optional configuration object
-         */
-        delete(url: string, config?: IRequestShortcutConfig): IHttpPromise;
-
-        /**
-         * Shortcut method to perform HEAD request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param config Optional configuration object
-         */
-        head(url: string, config?: IRequestShortcutConfig): IHttpPromise;
-
-        /**
-         * Shortcut method to perform JSONP request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param config Optional configuration object
-         */
-        jsonp(url: string, config?: IRequestShortcutConfig): IHttpPromise;
-
-        /**
-         * Shortcut method to perform POST request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param data Request content
-         * @param config Optional configuration object
-         */
-        post(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise;
-
-        /**
-         * Shortcut method to perform PUT request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param data Request content
-         * @param config Optional configuration object
-         */
-        put(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise;
-
-        /**
-         * Shortcut method to perform PATCH request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param data Request content
-         * @param config Optional configuration object
-         */
-        patch(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise;
-
-        /**
-         * Runtime equivalent of the $httpProvider.defaults property. Allows configuration of default headers, withCredentials as well as request and response transformations.
-         */
-        defaults: IRequestConfig;
-
-        /**
-         * Array of config objects for currently pending requests. This is primarily meant to be used for debugging purposes.
-         */
-        pendingRequests: any[];
-    }
-
-    /**
-     * Object describing the request to be made and how it should be processed.
-     * see http://docs.angularjs.org/api/ng/service/$http#usage
-     */
-    interface IRequestShortcutConfig
-	{
-        /**
-         * {Object.}
-         * Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url. If the value is not a string, it will be JSONified.
-         */
-        params?: any;
-
-        /**
-         * Map of strings or functions which return strings representing HTTP headers to send to the server. If the return value of a function is null, the header will not be sent.
-         */
-        headers?: any;
-
-        /**
-         * Name of HTTP header to populate with the XSRF token.
-         */
-        xsrfHeaderName?: string;
-
-        /**
-         * Name of cookie containing the XSRF token.
-         */
-        xsrfCookieName?: string;
-
-        /**
-         * {boolean|Cache}
-         * If true, a default $http cache will be used to cache the GET request, otherwise if a cache instance built with $cacheFactory, this cache will be used for caching.
-         */
-        cache?: any;
-
-        /**
-         * whether to to set the withCredentials flag on the XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5 for more information.
-         */
-        withCredentials?: boolean;
-
-        /**
-         * {string|Object}
-         * Data to be sent as the request message data.
-         */
-        data?: any;
-
-        /**
-         * {function(data, headersGetter)|Array.}
-         * Transform function or an array of such functions. The transform function takes the http request body and headers and returns its transformed (typically serialized) version.
-         */
-        transformRequest?: any;
-
-        /**
-         * {function(data, headersGetter)|Array.}
-         * Transform function or an array of such functions. The transform function takes the http response body and headers and returns its transformed (typically deserialized) version.
-         */
-        transformResponse?: any;
-
-        /**
-         * {number|Promise}
-         * Timeout in milliseconds, or promise that should abort the request when resolved.
-         */
-        timeout?: any;
-
-        /**
-         * See requestType.
-         */
-        responseType?: string;
-    }
-
-    /**
-     * Object describing the request to be made and how it should be processed.
-     * see http://docs.angularjs.org/api/ng/service/$http#usage
-     */
-    interface IRequestConfig extends IRequestShortcutConfig
-	{
-        /**
-         * HTTP method (e.g. 'GET', 'POST', etc)
-         */
-        method: string;
-        /**
-         * Absolute or relative URL of the resource that is being requested.
-         */
-        url: string;
-    }
-
-    interface IHttpHeadersGetter
-	{
-        (): { [name: string]: string; };
-        (headerName: string): string;
-    }
-
-    interface IHttpPromiseCallback
-	{
-        (data: T, status: number, headers: IHttpHeadersGetter, config: IRequestConfig): void;
-    }
-
-    interface IHttpPromiseCallbackArg
-	{
-        data?: T;
-        status?: number;
-        headers?: (headerName: string) => string;
-        config?: IRequestConfig;
-        statusText?: string;
-    }
-
-    interface IHttpPromise extends IPromise>
-	{
-        success(callback: IHttpPromiseCallback): IHttpPromise;
-        error(callback: IHttpPromiseCallback): IHttpPromise;
-        then(successCallback: (response: IHttpPromiseCallbackArg) => IPromise|TResult, errorCallback?: (response: IHttpPromiseCallbackArg) => any): IPromise;
-    }
-
-    /**
-    * Object that controls the defaults for $http provider
-    * https://docs.angularjs.org/api/ng/service/$http#defaults
-    */
-    interface IHttpProviderDefaults
-	{
-        xsrfCookieName?: string;
-        xsrfHeaderName?: string;
-        withCredentials?: boolean;
-        headers?: {
-            common?: any;
-            post?: any;
-            put?: any;
-            patch?: any;
-        }
-    }
-
-    interface IHttpProvider extends IServiceProvider
-	{
-        defaults: IHttpProviderDefaults;
-        interceptors: any[];
-        useApplyAsync(): boolean;
-        useApplyAsync(value: boolean): IHttpProvider;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // HttpBackendService
-    // see http://docs.angularjs.org/api/ng.$httpBackend
-    // You should never need to use this service directly.
-    ///////////////////////////////////////////////////////////////////////////
-    interface IHttpBackendService
-	{
-        // XXX Perhaps define callback signature in the future
-        (method: string, url: string, post?: any, callback?: Function, headers?: any, timeout?: number, withCredentials?: boolean): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // InterpolateService
-    // see http://docs.angularjs.org/api/ng.$interpolate
-    // see http://docs.angularjs.org/api/ng.$interpolateProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface IInterpolateService
-	{
-        (text: string, mustHaveExpression?: boolean, trustedContext?: string, allOrNothing?: boolean): IInterpolationFunction;
-        endSymbol(): string;
-        startSymbol(): string;
-    }
-
-    interface IInterpolationFunction
-	{
-        (context: any): string;
-    }
-
-    interface IInterpolateProvider extends IServiceProvider
-	{
-        startSymbol(): string;
-        startSymbol(value: string): IInterpolateProvider;
-        endSymbol(): string;
-        endSymbol(value: string): IInterpolateProvider;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // TemplateCacheService
-    // see http://docs.angularjs.org/api/ng.$templateCache
-    ///////////////////////////////////////////////////////////////////////////
-    interface ITemplateCacheService extends ICacheObject { }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // SCEService
-    // see http://docs.angularjs.org/api/ng.$sce
-    ///////////////////////////////////////////////////////////////////////////
-    interface ISCEService
-	{
-        getTrusted(type: string, mayBeTrusted: any): any;
-        getTrustedCss(value: any): any;
-        getTrustedHtml(value: any): any;
-        getTrustedJs(value: any): any;
-        getTrustedResourceUrl(value: any): any;
-        getTrustedUrl(value: any): any;
-        parse(type: string, expression: string): (context: any, locals: any) => any;
-        parseAsCss(expression: string): (context: any, locals: any) => any;
-        parseAsHtml(expression: string): (context: any, locals: any) => any;
-        parseAsJs(expression: string): (context: any, locals: any) => any;
-        parseAsResourceUrl(expression: string): (context: any, locals: any) => any;
-        parseAsUrl(expression: string): (context: any, locals: any) => any;
-        trustAs(type: string, value: any): any;
-        trustAsHtml(value: any): any;
-        trustAsJs(value: any): any;
-        trustAsResourceUrl(value: any): any;
-        trustAsUrl(value: any): any;
-        isEnabled(): boolean;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // SCEProvider
-    // see http://docs.angularjs.org/api/ng.$sceProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface ISCEProvider extends IServiceProvider
-	{
-        enabled(value: boolean): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // SCEDelegateService
-    // see http://docs.angularjs.org/api/ng.$sceDelegate
-    ///////////////////////////////////////////////////////////////////////////
-    interface ISCEDelegateService
-	{
-        getTrusted(type: string, mayBeTrusted: any): any;
-        trustAs(type: string, value: any): any;
-        valueOf(value: any): any;
-    }
-
-
-    ///////////////////////////////////////////////////////////////////////////
-    // SCEDelegateProvider
-    // see http://docs.angularjs.org/api/ng.$sceDelegateProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface ISCEDelegateProvider extends IServiceProvider
-	{
-        resourceUrlBlacklist(blacklist: any[]): void;
-        resourceUrlWhitelist(whitelist: any[]): void;
-    }
-
-    /**
-     * $templateRequest service
-     * see http://docs.angularjs.org/api/ng/service/$templateRequest
-     */
-    interface ITemplateRequestService
-	{
-        /**
-         * Downloads a template using $http and, upon success, stores the
-         * contents inside of $templateCache.
-         *
-         * If the HTTP request fails or the response data of the HTTP request is
-         * empty then a $compile error will be thrown (unless
-         * {ignoreRequestError} is set to true).
-         *
-         * @param tpl                  The template URL.
-         * @param ignoreRequestError   Whether or not to ignore the exception
-         *                             when the request fails or the template is
-         *                             empty.
-         *
-         * @return   A promise whose value is the template content.
-         */
-        (tpl: string, ignoreRequestError?: boolean): IPromise;
-        /**
-         * total amount of pending template requests being downloaded.
-         * @type {number}
-         */
-        totalPendingRequests: number;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // Directive
-    // see http://docs.angularjs.org/api/ng.$compileProvider#directive
-    // and http://docs.angularjs.org/guide/directive
-    ///////////////////////////////////////////////////////////////////////////
-
-    interface IDirectiveFactory
-	{
-        (...args: any[]): IDirective;
-    }
-
-    interface IDirectiveLinkFn
-	{
-        (
-		scope: IScope,
-		instanceElement: IAugmentedJQuery,
-		instanceAttributes: IAttributes,
-		controller: any,
-		transclude: ITranscludeFunction
-        ): void;
-    }
-
-    interface IDirectivePrePost
-	{
-        pre?: IDirectiveLinkFn;
-        post?: IDirectiveLinkFn;
-    }
-
-    interface IDirectiveCompileFn
-	{
-        (
-		templateElement: IAugmentedJQuery,
-		templateAttributes: IAttributes,
-		transclude: ITranscludeFunction
-        ): IDirectivePrePost;
-    }
-
-    interface IDirective
-	{
-        compile?: IDirectiveCompileFn;
-        controller?: any;
-        controllerAs?: string;
-        bindToController?: boolean;
-        link?: IDirectiveLinkFn | IDirectivePrePost;
-        name?: string;
-        priority?: number;
-        replace?: boolean;
-        require?: any;
-        restrict?: string;
-        scope?: any;
-        template?: any;
-        templateUrl?: any;
-        terminal?: boolean;
-        transclude?: any;
-    }
-
-    /**
-     * angular.element
-     * when calling angular.element, angular returns a jQuery object,
-     * augmented with additional methods like e.g. scope.
-     * see: http://docs.angularjs.org/api/angular.element
-     */
-    interface IAugmentedJQueryStatic extends JQueryStatic
-	{
-        (selector: string, context?: any): IAugmentedJQuery;
-        (element: Element): IAugmentedJQuery;
-        (object: {}): IAugmentedJQuery;
-        (elementArray: Element[]): IAugmentedJQuery;
-        (object: JQuery): IAugmentedJQuery;
-        (func: Function): IAugmentedJQuery;
-        (array: any[]): IAugmentedJQuery;
-        (): IAugmentedJQuery;
-    }
-
-    interface IAugmentedJQuery extends JQuery
-	{
-        // TODO: events, how to define?
-        //$destroy
-
-        find(selector: string): IAugmentedJQuery;
-        find(element: any): IAugmentedJQuery;
-        find(obj: JQuery): IAugmentedJQuery;
-        controller(): any;
-        controller(name: string): any;
-        injector(): any;
-        scope(): IScope;
-        isolateScope(): IScope;
-
-        inheritedData(key: string, value: any): JQuery;
-        inheritedData(obj: { [key: string]: any; }): JQuery;
-        inheritedData(key?: string): any;
-    }
-
-    ///////////////////////////////////////////////////////////////////////
-    // AnimateService
-    // see http://docs.angularjs.org/api/ng.$animate
-    ///////////////////////////////////////////////////////////////////////
-    interface IAnimateService
-	{
-        addClass(element: JQuery, className: string, done?: Function): IPromise;
-        enter(element: JQuery, parent: JQuery, after: JQuery, done?: Function): void;
-        leave(element: JQuery, done?: Function): void;
-        move(element: JQuery, parent: JQuery, after: JQuery, done?: Function): void;
-        removeClass(element: JQuery, className: string, done?: Function): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // AUTO module (angular.js)
-    ///////////////////////////////////////////////////////////////////////////
-    export module auto
-	{
-
-        ///////////////////////////////////////////////////////////////////////
-        // InjectorService
-        // see http://docs.angularjs.org/api/AUTO.$injector
-        ///////////////////////////////////////////////////////////////////////
-        interface IInjectorService
-		{
-            annotate(fn: Function): string[];
-            annotate(inlineAnnotatedFunction: any[]): string[];
-            get(name: string): any;
-            has(name: string): boolean;
-            instantiate(typeConstructor: Function, locals?: any): any;
-            invoke(inlineAnnotatedFunction: any[]): any;
-            invoke(func: Function, context?: any, locals?: any): any;
-        }
-
-        ///////////////////////////////////////////////////////////////////////
-        // ProvideService
-        // see http://docs.angularjs.org/api/AUTO.$provide
-        ///////////////////////////////////////////////////////////////////////
-        interface IProvideService
-		{
-            // Documentation says it returns the registered instance, but actual
-            // implementation does not return anything.
-            // constant(name: string, value: any): any;
-            /**
-             * Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator.
-             *
-             * @param name The name of the constant.
-             * @param value The constant value.
-             */
-            constant(name: string, value: any): void;
-
-            /**
-             * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
-             *
-             * @param name The name of the service to decorate.
-             * @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:
-             *
-             * $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
-             */
-            decorator(name: string, decorator: Function): void;
-            /**
-             * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
-             *
-             * @param name The name of the service to decorate.
-             * @param inlineAnnotatedFunction This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:
-             *
-             * $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
-             */
-            decorator(name: string, inlineAnnotatedFunction: any[]): void;
-            factory(name: string, serviceFactoryFunction: Function): ng.IServiceProvider;
-            factory(name: string, inlineAnnotatedFunction: any[]): ng.IServiceProvider;
-            provider(name: string, provider: ng.IServiceProvider): ng.IServiceProvider;
-            provider(name: string, serviceProviderConstructor: Function): ng.IServiceProvider;
-            service(name: string, constructor: Function): ng.IServiceProvider;
-            value(name: string, value: any): ng.IServiceProvider;
-        }
-
-    }
-}
\ No newline at end of file
diff --git a/admin/lib/definitions/required/es6-promise.d.ts b/admin/lib/definitions/required/es6-promise.d.ts
deleted file mode 100644
index 4c9a5e1a..00000000
--- a/admin/lib/definitions/required/es6-promise.d.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-// Type definitions for es6-promise
-// Project: https://github.com/jakearchibald/ES6-Promise
-// Definitions by: François de Campredon , vvakame 
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
-
-interface Thenable
-{
-	then(onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => U | Thenable): Thenable;
-}
-
-declare class Promise implements Thenable {
-	/**
-	 * If you call resolve in the body of the callback passed to the constructor,
-	 * your promise is fulfilled with result object passed to resolve.
-	 * If you call reject your promise is rejected with the object passed to resolve.
-	 * For consistency and debugging (eg stack traces), obj should be an instanceof Error.
-	 * Any errors thrown in the constructor callback will be implicitly passed to reject().
-	 */
-	constructor(callback: (resolve: (value?: R | Thenable) => void, reject: (error?: any) => void) => void);
-
-	/**
-	 * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects.
-	 * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called.
-	 * Both callbacks have a single parameter , the fulfillment value or rejection reason.
-	 * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve.
-	 * If an error is thrown in the callback, the returned promise rejects with that error.
-	 *
-	 * @param onFulfilled called when/if "promise" resolves
-	 * @param onRejected called when/if "promise" rejects
-	 */
-	then(onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => U | Thenable): Promise;
-
-	/**
-	 * Sugar for promise.then(undefined, onRejected)
-	 *
-	 * @param onRejected called when/if "promise" rejects
-	 */
-	catch(onRejected?: (error: any) => U | Thenable): Promise;
-}
-
-declare module Promise
-{
-	/**
-	 * Make a new promise from the thenable.
-	 * A thenable is promise-like in as far as it has a "then" method.
-	 */
-	function resolve(value?: R | Thenable): Promise;
-
-	/**
-	 * Make a promise that rejects to obj. For consistency and debugging (eg stack traces), obj should be an instanceof Error
-	 */
-	function reject(error: any): Promise;
-
-	/**
-	 * Make a promise that fulfills when every item in the array fulfills, and rejects if (and when) any item rejects.
-	 * the array passed to all can be a mixture of promise-like objects and other objects.
-	 * The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value.
-	 */
-	function all(promises: (R | Thenable)[]): Promise;
-
-	/**
-	 * Make a Promise that fulfills when any item fulfills, and rejects if any item rejects.
-	 */
-	function race(promises: (R | Thenable)[]): Promise;
-}
-
-declare module 'es6-promise' {
-	var foo: typeof Promise; // Temp variable to reference Promise in local context
-	module rsvp
-	{
-		export var Promise: typeof foo;
-	}
-	export = rsvp;
-}
\ No newline at end of file
diff --git a/admin/lib/definitions/required/express.d.ts b/admin/lib/definitions/required/express.d.ts
deleted file mode 100644
index 4aa97aa9..00000000
--- a/admin/lib/definitions/required/express.d.ts
+++ /dev/null
@@ -1,1108 +0,0 @@
-// Type definitions for Express 4.x
-// Project: http://expressjs.com
-// Definitions by: Boris Yankov 
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
-
-/* =================== USAGE ===================
-
-    import express = require('express');
-    var app = express();
-
- =============================================== */
-
-/// 
-
-declare module Express
-{
-
-    // These open interfaces may be extended in an application-specific manner via declaration merging.
-    // See for example method-override.d.ts (https://github.com/borisyankov/DefinitelyTyped/blob/master/method-override/method-override.d.ts)
-    export interface Request { }
-    export interface Response { }
-    export interface Application { }
-}
-
-
-declare module "express" {
-    import http = require('http');
-
-    function e(): e.Express;
-
-    module e
-    {
-        interface IRoute
-        {
-            path: string;
-            stack: any;
-            all(...handler: RequestHandler[]): IRoute;
-            get(...handler: RequestHandler[]): IRoute;
-            post(...handler: RequestHandler[]): IRoute;
-            put(...handler: RequestHandler[]): IRoute;
-            delete(...handler: RequestHandler[]): IRoute;
-            patch(...handler: RequestHandler[]): IRoute;
-            options(...handler: RequestHandler[]): IRoute;
-        }
-
-        interface IRouterMatcher
-        {
-            (name: string, ...handlers: RequestHandler[]): T;
-            (name: RegExp, ...handlers: RequestHandler[]): T;
-        }
-
-        interface IRouter extends RequestHandler
-        {
-            /**
-             * Map the given param placeholder `name`(s) to the given callback(s).
-             *
-             * Parameter mapping is used to provide pre-conditions to routes
-             * which use normalized placeholders. For example a _:user_id_ parameter
-             * could automatically load a user's information from the database without
-             * any additional code,
-             *
-             * The callback uses the samesignature as middleware, the only differencing
-             * being that the value of the placeholder is passed, in this case the _id_
-             * of the user. Once the `next()` function is invoked, just like middleware
-             * it will continue on to execute the route, or subsequent parameter functions.
-             *
-             *      app.param('user_id', function(req, res, next, id){
-             *        User.find(id, function(err, user){
-             *          if (err) {
-             *            next(err);
-             *          } else if (user) {
-             *            req.user = user;
-             *            next();
-             *          } else {
-             *            next(new Error('failed to load user'));
-             *          }
-             *        });
-             *      });
-             *
-             * @param name
-             * @param fn
-             */
-            param(name: string, handler: RequestParamHandler): T;
-            param(name: string, matcher: RegExp): T;
-            param(name: string, mapper: (param: any) => any): T;
-            // Alternatively, you can pass only a callback, in which case you have the opportunity to alter the app.param() API
-            param(callback: (name: string, matcher: RegExp) => RequestParamHandler): T;
-
-            /**
-             * Special-cased "all" method, applying the given route `path`,
-             * middleware, and callback to _every_ HTTP method.
-             *
-             * @param path
-             * @param fn
-             */
-            all: IRouterMatcher;
-            get: IRouterMatcher;
-            post: IRouterMatcher;
-            put: IRouterMatcher;
-            delete: IRouterMatcher;
-            patch: IRouterMatcher;
-            options: IRouterMatcher;
-
-            route(path: string): IRoute;
-
-            use(...handler: RequestHandler[]): T;
-            use(handler: ErrorRequestHandler): T;
-            use(path: string, ...handler: RequestHandler[]): T;
-            use(path: string, handler: ErrorRequestHandler): T;
-        }
-
-        export function Router(options?: any): Router;
-
-        export interface Router extends IRouter { }
-
-        interface CookieOptions
-        {
-            maxAge?: number;
-            signed?: boolean;
-            expires?: Date;
-            httpOnly?: boolean;
-            path?: string;
-            domain?: string;
-            secure?: boolean;
-        }
-
-        interface Errback { (err: Error): void; }
-
-        interface Request extends http.ServerRequest, Express.Request
-        {
-
-            /**
-             * Return request header.
-             *
-             * The `Referrer` header field is special-cased,
-             * both `Referrer` and `Referer` are interchangeable.
-             *
-             * Examples:
-             *
-             *     req.get('Content-Type');
-             *     // => "text/plain"
-             *
-             *     req.get('content-type');
-             *     // => "text/plain"
-             *
-             *     req.get('Something');
-             *     // => undefined
-             *
-             * Aliased as `req.header()`.
-             *
-             * @param name
-             */
-            get(name: string): string;
-
-            header(name: string): string;
-
-            headers: { [key: string]: string; };
-
-            /**
-             * Check if the given `type(s)` is acceptable, returning
-             * the best match when true, otherwise `undefined`, in which
-             * case you should respond with 406 "Not Acceptable".
-             *
-             * The `type` value may be a single mime type string
-             * such as "application/json", the extension name
-             * such as "json", a comma-delimted list such as "json, html, text/plain",
-             * or an array `["json", "html", "text/plain"]`. When a list
-             * or array is given the _best_ match, if any is returned.
-             *
-             * Examples:
-             *
-             *     // Accept: text/html
-             *     req.accepts('html');
-             *     // => "html"
-             *
-             *     // Accept: text/*, application/json
-             *     req.accepts('html');
-             *     // => "html"
-             *     req.accepts('text/html');
-             *     // => "text/html"
-             *     req.accepts('json, text');
-             *     // => "json"
-             *     req.accepts('application/json');
-             *     // => "application/json"
-             *
-             *     // Accept: text/*, application/json
-             *     req.accepts('image/png');
-             *     req.accepts('png');
-             *     // => undefined
-             *
-             *     // Accept: text/*;q=.5, application/json
-             *     req.accepts(['html', 'json']);
-             *     req.accepts('html, json');
-             *     // => "json"
-             */
-            accepts(type: string): string;
-
-            accepts(type: string[]): string;
-
-            /**
-             * Check if the given `charset` is acceptable,
-             * otherwise you should respond with 406 "Not Acceptable".
-             *
-             * @param charset
-             */
-            acceptsCharset(charset: string): boolean;
-
-            /**
-             * Check if the given `lang` is acceptable,
-             * otherwise you should respond with 406 "Not Acceptable".
-             *
-             * @param lang
-             */
-            acceptsLanguage(lang: string): boolean;
-
-            /**
-             * Parse Range header field,
-             * capping to the given `size`.
-             *
-             * Unspecified ranges such as "0-" require
-             * knowledge of your resource length. In
-             * the case of a byte range this is of course
-             * the total number of bytes. If the Range
-             * header field is not given `null` is returned,
-             * `-1` when unsatisfiable, `-2` when syntactically invalid.
-             *
-             * NOTE: remember that ranges are inclusive, so
-             * for example "Range: users=0-3" should respond
-             * with 4 users when available, not 3.
-             *
-             * @param size
-             */
-            range(size: number): any[];
-
-            /**
-             * Return an array of Accepted media types
-             * ordered from highest quality to lowest.
-             */
-            accepted: MediaType[];
-
-            /**
-             * Return an array of Accepted languages
-             * ordered from highest quality to lowest.
-             *
-             * Examples:
-             *
-             *     Accept-Language: en;q=.5, en-us
-             *     ['en-us', 'en']
-             */
-            acceptedLanguages: any[];
-
-            /**
-             * Return an array of Accepted charsets
-             * ordered from highest quality to lowest.
-             *
-             * Examples:
-             *
-             *     Accept-Charset: iso-8859-5;q=.2, unicode-1-1;q=0.8
-             *     ['unicode-1-1', 'iso-8859-5']
-             */
-            acceptedCharsets: any[];
-
-            /**
-             * Return the value of param `name` when present or `defaultValue`.
-             *
-             *  - Checks route placeholders, ex: _/user/:id_
-             *  - Checks body params, ex: id=12, {"id":12}
-             *  - Checks query string params, ex: ?id=12
-             *
-             * To utilize request bodies, `req.body`
-             * should be an object. This can be done by using
-             * the `connect.bodyParser()` middleware.
-             *
-             * @param name
-             * @param defaultValue
-             */
-            param(name: string, defaultValue?: any): string;
-
-            /**
-             * Check if the incoming request contains the "Content-Type"
-             * header field, and it contains the give mime `type`.
-             *
-             * Examples:
-             *
-             *      // With Content-Type: text/html; charset=utf-8
-             *      req.is('html');
-             *      req.is('text/html');
-             *      req.is('text/*');
-             *      // => true
-             *
-             *      // When Content-Type is application/json
-             *      req.is('json');
-             *      req.is('application/json');
-             *      req.is('application/*');
-             *      // => true
-             *
-             *      req.is('html');
-             *      // => false
-             *
-             * @param type
-             */
-            is(type: string): boolean;
-
-            /**
-             * Return the protocol string "http" or "https"
-             * when requested with TLS. When the "trust proxy"
-             * setting is enabled the "X-Forwarded-Proto" header
-             * field will be trusted. If you're running behind
-             * a reverse proxy that supplies https for you this
-             * may be enabled.
-             */
-            protocol: string;
-
-            /**
-             * Short-hand for:
-             *
-             *    req.protocol == 'https'
-             */
-            secure: boolean;
-
-            /**
-             * Return the remote address, or when
-             * "trust proxy" is `true` return
-             * the upstream addr.
-             */
-            ip: string;
-
-            /**
-             * When "trust proxy" is `true`, parse
-             * the "X-Forwarded-For" ip address list.
-             *
-             * For example if the value were "client, proxy1, proxy2"
-             * you would receive the array `["client", "proxy1", "proxy2"]`
-             * where "proxy2" is the furthest down-stream.
-             */
-            ips: string[];
-
-            /**
-             * Return subdomains as an array.
-             *
-             * Subdomains are the dot-separated parts of the host before the main domain of
-             * the app. By default, the domain of the app is assumed to be the last two
-             * parts of the host. This can be changed by setting "subdomain offset".
-             *
-             * For example, if the domain is "tobi.ferrets.example.com":
-             * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`.
-             * If "subdomain offset" is 3, req.subdomains is `["tobi"]`.
-             */
-            subdomains: string[];
-
-            /**
-             * Short-hand for `url.parse(req.url).pathname`.
-             */
-            path: string;
-
-            /**
-             * Parse the "Host" header field hostname.
-             */
-            host: string;
-
-            /**
-             * Check if the request is fresh, aka
-             * Last-Modified and/or the ETag
-             * still match.
-             */
-            fresh: boolean;
-
-            /**
-             * Check if the request is stale, aka
-             * "Last-Modified" and / or the "ETag" for the
-             * resource has changed.
-             */
-            stale: boolean;
-
-            /**
-             * Check if the request was an _XMLHttpRequest_.
-             */
-            xhr: boolean;
-
-            //body: { username: string; password: string; remember: boolean; title: string; };
-            body: any;
-
-            //cookies: { string; remember: boolean; };
-            cookies: any;
-
-            method: string;
-
-            params: any;
-
-            user: any;
-
-            authenticatedUser: any;
-
-            files: any;
-
-            /**
-             * Clear cookie `name`.
-             *
-             * @param name
-             * @param options
-             */
-            clearCookie(name: string, options?: any): Response;
-
-            query: any;
-
-            route: any;
-
-            signedCookies: any;
-
-            originalUrl: string;
-
-            url: string;
-        }
-
-        interface MediaType
-        {
-            value: string;
-            quality: number;
-            type: string;
-            subtype: string;
-        }
-
-        interface Send
-        {
-            (status: number, body?: any): Response;
-            (body: any): Response;
-        }
-
-        interface Response extends http.ServerResponse, Express.Response
-        {
-            /**
-             * Set status `code`.
-             *
-             * @param code
-             */
-            status(code: number): Response;
-            
-            /**
-             * Set the response HTTP status code to `statusCode` and send its string representation as the response body.
-             * @link http://expressjs.com/4x/api.html#res.sendStatus
-             * 
-             * Examples:
-             * 
-             *    res.sendStatus(200); // equivalent to res.status(200).send('OK')
-             *    res.sendStatus(403); // equivalent to res.status(403).send('Forbidden')
-             *    res.sendStatus(404); // equivalent to res.status(404).send('Not Found')
-             *    res.sendStatus(500); // equivalent to res.status(500).send('Internal Server Error')
-             * 
-             * @param code
-             */
-            sendStatus(code: number): Response;
-            
-            /**
-             * Set Link header field with the given `links`.
-             *
-             * Examples:
-             *
-             *    res.links({
-             *      next: 'http://api.example.com/users?page=2',
-             *      last: 'http://api.example.com/users?page=5'
-             *    });
-             *
-             * @param links
-             */
-            links(links: any): Response;
-
-            /**
-             * Send a response.
-             *
-             * Examples:
-             *
-             *     res.send(new Buffer('wahoo'));
-             *     res.send({ some: 'json' });
-             *     res.send('

some html

'); - * res.send(404, 'Sorry, cant find that'); - * res.send(404); - */ - send: Send; - - /** - * Send JSON response. - * - * Examples: - * - * res.json(null); - * res.json({ user: 'tj' }); - * res.json(500, 'oh noes!'); - * res.json(404, 'I dont have that'); - */ - json: Send; - - /** - * Send JSON response with JSONP callback support. - * - * Examples: - * - * res.jsonp(null); - * res.jsonp({ user: 'tj' }); - * res.jsonp(500, 'oh noes!'); - * res.jsonp(404, 'I dont have that'); - */ - jsonp: Send; - - /** - * Transfer the file at the given `path`. - * - * Automatically sets the _Content-Type_ response header field. - * The callback `fn(err)` is invoked when the transfer is complete - * or when an error occurs. Be sure to check `res.sentHeader` - * if you wish to attempt responding, as the header and some data - * may have already been transferred. - * - * Options: - * - * - `maxAge` defaulting to 0 (can be string converted by `ms`) - * - `root` root directory for relative filenames - * - `headers` object of headers to serve with file - * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them - * - * Other options are passed along to `send`. - * - * Examples: - * - * The following example illustrates how `res.sendFile()` may - * be used as an alternative for the `static()` middleware for - * dynamic situations. The code backing `res.sendFile()` is actually - * the same code, so HTTP cache support etc is identical. - * - * app.get('/user/:uid/photos/:file', function(req, res){ - * var uid = req.params.uid - * , file = req.params.file; - * - * req.user.mayViewFilesFrom(uid, function(yes){ - * if (yes) { - * res.sendFile('/uploads/' + uid + '/' + file); - * } else { - * res.send(403, 'Sorry! you cant see that.'); - * } - * }); - * }); - * - * @api public - */ - sendFile(path: string): void; - sendFile(path: string, options: any): void; - sendFile(path: string, fn: Errback): void; - sendFile(path: string, options: any, fn: Errback): void; - - /** - * deprecated, use sendFile instead. - */ - sendfile(path: string): void; - /** - * deprecated, use sendFile instead. - */ - sendfile(path: string, options: any): void; - /** - * deprecated, use sendFile instead. - */ - sendfile(path: string, fn: Errback): void; - /** - * deprecated, use sendFile instead. - */ - sendfile(path: string, options: any, fn: Errback): void; - - /** - * Transfer the file at the given `path` as an attachment. - * - * Optionally providing an alternate attachment `filename`, - * and optional callback `fn(err)`. The callback is invoked - * when the data transfer is complete, or when an error has - * ocurred. Be sure to check `res.headerSent` if you plan to respond. - * - * This method uses `res.sendfile()`. - */ - download(path: string): void; - download(path: string, filename: string): void; - download(path: string, fn: Errback): void; - download(path: string, filename: string, fn: Errback): void; - - /** - * Set _Content-Type_ response header with `type` through `mime.lookup()` - * when it does not contain "/", or set the Content-Type to `type` otherwise. - * - * Examples: - * - * res.type('.html'); - * res.type('html'); - * res.type('json'); - * res.type('application/json'); - * res.type('png'); - * - * @param type - */ - contentType(type: string): Response; - - /** - * Set _Content-Type_ response header with `type` through `mime.lookup()` - * when it does not contain "/", or set the Content-Type to `type` otherwise. - * - * Examples: - * - * res.type('.html'); - * res.type('html'); - * res.type('json'); - * res.type('application/json'); - * res.type('png'); - * - * @param type - */ - type(type: string): Response; - - /** - * Respond to the Acceptable formats using an `obj` - * of mime-type callbacks. - * - * This method uses `req.accepted`, an array of - * acceptable types ordered by their quality values. - * When "Accept" is not present the _first_ callback - * is invoked, otherwise the first match is used. When - * no match is performed the server responds with - * 406 "Not Acceptable". - * - * Content-Type is set for you, however if you choose - * you may alter this within the callback using `res.type()` - * or `res.set('Content-Type', ...)`. - * - * res.format({ - * 'text/plain': function(){ - * res.send('hey'); - * }, - * - * 'text/html': function(){ - * res.send('

hey

'); - * }, - * - * 'appliation/json': function(){ - * res.send({ message: 'hey' }); - * } - * }); - * - * In addition to canonicalized MIME types you may - * also use extnames mapped to these types: - * - * res.format({ - * text: function(){ - * res.send('hey'); - * }, - * - * html: function(){ - * res.send('

hey

'); - * }, - * - * json: function(){ - * res.send({ message: 'hey' }); - * } - * }); - * - * By default Express passes an `Error` - * with a `.status` of 406 to `next(err)` - * if a match is not made. If you provide - * a `.default` callback it will be invoked - * instead. - * - * @param obj - */ - format(obj: any): Response; - - /** - * Set _Content-Disposition_ header to _attachment_ with optional `filename`. - * - * @param filename - */ - attachment(filename?: string): Response; - - /** - * Set header `field` to `val`, or pass - * an object of header fields. - * - * Examples: - * - * res.set('Foo', ['bar', 'baz']); - * res.set('Accept', 'application/json'); - * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' }); - * - * Aliased as `res.header()`. - */ - set(field: any): Response; - set(field: string, value?: string): Response; - - header(field: any): Response; - header(field: string, value?: string): Response; - - // Property indicating if HTTP headers has been sent for the response. - headersSent: boolean; - - /** - * Get value for header `field`. - * - * @param field - */ - get(field: string): string; - - /** - * Clear cookie `name`. - * - * @param name - * @param options - */ - clearCookie(name: string, options?: any): Response; - - /** - * Set cookie `name` to `val`, with the given `options`. - * - * Options: - * - * - `maxAge` max-age in milliseconds, converted to `expires` - * - `signed` sign the cookie - * - `path` defaults to "/" - * - * Examples: - * - * // "Remember Me" for 15 minutes - * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true }); - * - * // save as above - * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true }) - */ - cookie(name: string, val: string, options: CookieOptions): Response; - cookie(name: string, val: any, options: CookieOptions): Response; - cookie(name: string, val: any): Response; - - /** - * Set the location header to `url`. - * - * The given `url` can also be the name of a mapped url, for - * example by default express supports "back" which redirects - * to the _Referrer_ or _Referer_ headers or "/". - * - * Examples: - * - * res.location('/foo/bar').; - * res.location('http://example.com'); - * res.location('../login'); // /blog/post/1 -> /blog/login - * - * Mounting: - * - * When an application is mounted and `res.location()` - * is given a path that does _not_ lead with "/" it becomes - * relative to the mount-point. For example if the application - * is mounted at "/blog", the following would become "/blog/login". - * - * res.location('login'); - * - * While the leading slash would result in a location of "/login": - * - * res.location('/login'); - * - * @param url - */ - location(url: string): Response; - - /** - * Redirect to the given `url` with optional response `status` - * defaulting to 302. - * - * The resulting `url` is determined by `res.location()`, so - * it will play nicely with mounted apps, relative paths, - * `"back"` etc. - * - * Examples: - * - * res.redirect('/foo/bar'); - * res.redirect('http://example.com'); - * res.redirect(301, 'http://example.com'); - * res.redirect('http://example.com', 301); - * res.redirect('../login'); // /blog/post/1 -> /blog/login - */ - redirect(url: string): void; - redirect(status: number, url: string): void; - redirect(url: string, status: number): void; - - /** - * Render `view` with the given `options` and optional callback `fn`. - * When a callback function is given a response will _not_ be made - * automatically, otherwise a response of _200_ and _text/html_ is given. - * - * Options: - * - * - `cache` boolean hinting to the engine it should cache - * - `filename` filename of the view being rendered - */ - render(view: string, options?: Object, callback?: (err: Error, html: string) => void): void; - render(view: string, callback?: (err: Error, html: string) => void): void; - - locals: any; - - charset: string; - } - - interface ErrorRequestHandler - { - (err: any, req: Request, res: Response, next: Function): any; - } - - interface RequestHandler - { - (req: Request, res: Response, next: Function): any; - } - - interface Handler extends RequestHandler { } - - interface RequestParamHandler - { - (req: Request, res: Response, next: Function, param: any): any; - } - - interface Application extends IRouter, Express.Application - { - /** - * Initialize the server. - * - * - setup default configuration - * - setup default middleware - * - setup route reflection methods - */ - init(): void; - - /** - * Initialize application configuration. - */ - defaultConfiguration(): void; - - /** - * Register the given template engine callback `fn` - * as `ext`. - * - * By default will `require()` the engine based on the - * file extension. For example if you try to render - * a "foo.jade" file Express will invoke the following internally: - * - * app.engine('jade', require('jade').__express); - * - * For engines that do not provide `.__express` out of the box, - * or if you wish to "map" a different extension to the template engine - * you may use this method. For example mapping the EJS template engine to - * ".html" files: - * - * app.engine('html', require('ejs').renderFile); - * - * In this case EJS provides a `.renderFile()` method with - * the same signature that Express expects: `(path, options, callback)`, - * though note that it aliases this method as `ejs.__express` internally - * so if you're using ".ejs" extensions you dont need to do anything. - * - * Some template engines do not follow this convention, the - * [Consolidate.js](https://github.com/visionmedia/consolidate.js) - * library was created to map all of node's popular template - * engines to follow this convention, thus allowing them to - * work seamlessly within Express. - */ - engine(ext: string, fn: Function): Application; - - /** - * Assign `setting` to `val`, or return `setting`'s value. - * - * app.set('foo', 'bar'); - * app.get('foo'); - * // => "bar" - * app.set('foo', ['bar', 'baz']); - * app.get('foo'); - * // => ["bar", "baz"] - * - * Mounted servers inherit their parent server's settings. - * - * @param setting - * @param val - */ - set(setting: string, val: any): Application; - get: { - (name: string): any; // Getter - (name: string, ...handlers: RequestHandler[]): Application; - (name: RegExp, ...handlers: RequestHandler[]): Application; - }; - - /** - * Return the app's absolute pathname - * based on the parent(s) that have - * mounted it. - * - * For example if the application was - * mounted as "/admin", which itself - * was mounted as "/blog" then the - * return value would be "/blog/admin". - */ - path(): string; - - /** - * Check if `setting` is enabled (truthy). - * - * app.enabled('foo') - * // => false - * - * app.enable('foo') - * app.enabled('foo') - * // => true - */ - enabled(setting: string): boolean; - - /** - * Check if `setting` is disabled. - * - * app.disabled('foo') - * // => true - * - * app.enable('foo') - * app.disabled('foo') - * // => false - * - * @param setting - */ - disabled(setting: string): boolean; - - /** - * Enable `setting`. - * - * @param setting - */ - enable(setting: string): Application; - - /** - * Disable `setting`. - * - * @param setting - */ - disable(setting: string): Application; - - /** - * Configure callback for zero or more envs, - * when no `env` is specified that callback will - * be invoked for all environments. Any combination - * can be used multiple times, in any order desired. - * - * Examples: - * - * app.configure(function(){ - * // executed for all envs - * }); - * - * app.configure('stage', function(){ - * // executed staging env - * }); - * - * app.configure('stage', 'production', function(){ - * // executed for stage and production - * }); - * - * Note: - * - * These callbacks are invoked immediately, and - * are effectively sugar for the following: - * - * var env = process.env.NODE_ENV || 'development'; - * - * switch (env) { - * case 'development': - * ... - * break; - * case 'stage': - * ... - * break; - * case 'production': - * ... - * break; - * } - * - * @param env - * @param fn - */ - configure(fn: Function): Application; - configure(env0: string, fn: Function): Application; - configure(env0: string, env1: string, fn: Function): Application; - configure(env0: string, env1: string, env2: string, fn: Function): Application; - configure(env0: string, env1: string, env2: string, env3: string, fn: Function): Application; - configure(env0: string, env1: string, env2: string, env3: string, env4: string, fn: Function): Application; - - /** - * Render the given view `name` name with `options` - * and a callback accepting an error and the - * rendered template string. - * - * Example: - * - * app.render('email', { name: 'Tobi' }, function(err, html){ - * // ... - * }) - * - * @param name - * @param options or fn - * @param fn - */ - render(name: string, options?: Object, callback?: (err: Error, html: string) => void): void; - render(name: string, callback: (err: Error, html: string) => void): void; - - - /** - * Listen for connections. - * - * A node `http.Server` is returned, with this - * application (which is a `Function`) as its - * callback. If you wish to create both an HTTP - * and HTTPS server you may do so with the "http" - * and "https" modules as shown here: - * - * var http = require('http') - * , https = require('https') - * , express = require('express') - * , app = express(); - * - * http.createServer(app).listen(80); - * https.createServer({ ... }, app).listen(443); - */ - listen(port: number, hostname: string, backlog: number, callback?: Function): http.Server; - listen(port: number, hostname: string, callback?: Function): http.Server; - listen(port: number, callback?: Function): http.Server; - listen(path: string, callback?: Function): http.Server; - listen(handle: any, listeningListener?: Function): http.Server; - - route(path: string): IRoute; - - router: string; - - settings: any; - - resource: any; - - map: any; - - locals: any; - - /** - * The app.routes object houses all of the routes defined mapped by the - * associated HTTP verb. This object may be used for introspection - * capabilities, for example Express uses this internally not only for - * routing but to provide default OPTIONS behaviour unless app.options() - * is used. Your application or framework may also remove routes by - * simply by removing them from this object. - */ - routes: any; - } - - interface Express extends Application - { - /** - * Framework version. - */ - version: string; - - /** - * Expose mime. - */ - mime: string; - - (): Application; - - /** - * Create an express application. - */ - createApplication(): Application; - - createServer(): Application; - - application: any; - - request: Request; - - response: Response; - } - - /** - * Static: - * - * Static file server with the given `root` path. - * - * Examples: - * - * var oneDay = 86400000; - * - * connect() - * .use(connect.static(__dirname + '/public')) - * - * connect() - * .use(connect.static(__dirname + '/public', { maxAge: oneDay })) - * - * Options: - * - * - `maxAge` Browser cache maxAge in milliseconds. defaults to 0 - * - `hidden` Allow transfer of hidden files. defaults to false - * - `redirect` Redirect to trailing "/" when the pathname is a dir. defaults to true - * - * @param root - * @param options - */ - function static(root: string, options?: any): RequestHandler; - } - - export = e; -} \ No newline at end of file diff --git a/admin/lib/definitions/required/jquery.d.ts b/admin/lib/definitions/required/jquery.d.ts deleted file mode 100644 index a794cbe6..00000000 --- a/admin/lib/definitions/required/jquery.d.ts +++ /dev/null @@ -1,3163 +0,0 @@ -// Type definitions for jQuery 1.10.x / 2.0.x -// Project: http://jquery.com/ -// Definitions by: Boris Yankov , Christian Hoffmeister , Steve Fenton , Diullei Gomes , Tass Iliopoulos , Jason Swearingen , Sean Hill , Guus Goossens , Kelly Summerlin , Basarat Ali Syed , Nicholas Wolverson , Derek Cicerone , Andrew Gaspar , James Harrison Fisher , Seikichi Kondo , Benjamin Jackman , Poul Sorensen , Josh Strobl , John Reilly , Dick van den Brink -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/* ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - - -/** - * Interface for the AJAX setting that will configure the AJAX request - */ -interface JQueryAjaxSettings -{ - /** - * The content type sent in the request header that tells the server what kind of response it will accept in return. If the accepts setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. - */ - accepts?: any; - /** - * By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done() or the deprecated jqXHR.success(). - */ - async?: boolean; - /** - * A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and settings objects are passed as arguments. This is an Ajax Event. Returning false in the beforeSend function will cancel the request. As of jQuery 1.5, the beforeSend option will be called regardless of the type of request. - */ - beforeSend? (jqXHR: JQueryXHR, settings: JQueryAjaxSettings): any; - /** - * If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET. - */ - cache?: boolean; - /** - * A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request ("success", "notmodified", "error", "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. - */ - complete? (jqXHR: JQueryXHR, textStatus: string): any; - /** - * An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type. (version added: 1.5) - */ - contents?: { [key: string]: any; }; - //According to jQuery.ajax source code, ajax's option actually allows contentType to set to "false" - // https://github.com/borisyankov/DefinitelyTyped/issues/742 - /** - * When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding. - */ - contentType?: any; - /** - * This object will be made the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). - */ - context?: any; - /** - * An object containing dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response. (version added: 1.5) - */ - converters?: { [key: string]: any; }; - /** - * If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain to true. This allows, for example, server-side redirection to another domain. (version added: 1.5) - */ - crossDomain?: boolean; - /** - * Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below). - */ - data?: any; - /** - * A function to be used to handle the raw response data of XMLHttpRequest.This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter. - */ - dataFilter? (data: any, ty: any): any; - /** - * The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). - */ - dataType?: string; - /** - * A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event. - */ - error? (jqXHR: JQueryXHR, textStatus: string, errorThrown: string): any; - /** - * Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events. - */ - global?: boolean; - /** - * An object of additional header key/value pairs to send along with requests using the XMLHttpRequest transport. The header X-Requested-With: XMLHttpRequest is always added, but its default XMLHttpRequest value can be changed here. Values in the headers setting can also be overwritten from within the beforeSend function. (version added: 1.5) - */ - headers?: { [key: string]: any; }; - /** - * Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header. In jQuery 1.4 this technique also checks the 'etag' specified by the server to catch unmodified data. - */ - ifModified?: boolean; - /** - * Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. (version added: 1.5.1) - */ - isLocal?: boolean; - /** - * Override the callback function name in a jsonp request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" } - */ - jsonp?: any; - /** - * Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function. - */ - jsonpCallback?: any; - /** - * A mime type to override the XHR mime type. (version added: 1.5.1) - */ - mimeType?: string; - /** - * A password to be used with XMLHttpRequest in response to an HTTP access authentication request. - */ - password?: string; - /** - * By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false. - */ - processData?: boolean; - /** - * Only applies when the "script" transport is used (e.g., cross-domain requests with "jsonp" or "script" dataType and "GET" type). Sets the charset attribute on the script tag used in the request. Used when the character set on the local page is not the same as the one on the remote script. - */ - scriptCharset?: string; - /** - * An object of numeric HTTP codes and functions to be called when the response has the corresponding code. f the request is successful, the status code functions take the same parameters as the success callback; if it results in an error (including 3xx redirect), they take the same parameters as the error callback. (version added: 1.5) - */ - statusCode?: { [key: string]: any; }; - /** - * A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the dataType parameter; a string describing the status; and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. - */ - success? (data: any, textStatus: string, jqXHR: JQueryXHR): any; - /** - * Set a timeout (in milliseconds) for the request. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period. - */ - timeout?: number; - /** - * Set this to true if you wish to use the traditional style of param serialization. - */ - traditional?: boolean; - /** - * The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers. - */ - type?: string; - /** - * A string containing the URL to which the request is sent. - */ - url?: string; - /** - * A username to be used with XMLHttpRequest in response to an HTTP access authentication request. - */ - username?: string; - /** - * Callback for creating the XMLHttpRequest object. Defaults to the ActiveXObject when available (IE), the XMLHttpRequest otherwise. Override to provide your own implementation for XMLHttpRequest or enhancements to the factory. - */ - xhr?: any; - /** - * An object of fieldName-fieldValue pairs to set on the native XHR object. For example, you can use it to set withCredentials to true for cross-domain requests if needed. In jQuery 1.5, the withCredentials property was not propagated to the native XHR and thus CORS requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ should you require the use of it. (version added: 1.5.1) - */ - xhrFields?: { [key: string]: any; }; -} - -/** - * Interface for the jqXHR object - */ -interface JQueryXHR extends XMLHttpRequest, JQueryPromise -{ - /** - * The .overrideMimeType() method may be used in the beforeSend() callback function, for example, to modify the response content-type header. As of jQuery 1.5.1, the jqXHR object also contains the overrideMimeType() method (it was available in jQuery 1.4.x, as well, but was temporarily removed in jQuery 1.5). - */ - overrideMimeType(mimeType: string): any; - /** - * Cancel the request. - * - * @param statusText A string passed as the textStatus parameter for the done callback. Default value: "canceled" - */ - abort(statusText?: string): void; - /** - * Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated. Refer to deferred.then() for implementation details. - */ - then(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => void, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise; - /** - * Property containing the parsed response if the response Content-Type is json - */ - responseJSON?: any; -} - -/** - * Interface for the JQuery callback - */ -interface JQueryCallback -{ - /** - * Add a callback or a collection of callbacks to a callback list. - * - * @param callbacks A function, or array of functions, that are to be added to the callback list. - */ - add(callbacks: Function): JQueryCallback; - /** - * Add a callback or a collection of callbacks to a callback list. - * - * @param callbacks A function, or array of functions, that are to be added to the callback list. - */ - add(callbacks: Function[]): JQueryCallback; - - /** - * Disable a callback list from doing anything more. - */ - disable(): JQueryCallback; - - /** - * Determine if the callbacks list has been disabled. - */ - disabled(): boolean; - - /** - * Remove all of the callbacks from a list. - */ - empty(): JQueryCallback; - - /** - * Call all of the callbacks with the given arguments - * - * @param arguments The argument or list of arguments to pass back to the callback list. - */ - fire(...arguments: any[]): JQueryCallback; - - /** - * Determine if the callbacks have already been called at least once. - */ - fired(): boolean; - - /** - * Call all callbacks in a list with the given context and arguments. - * - * @param context A reference to the context in which the callbacks in the list should be fired. - * @param arguments An argument, or array of arguments, to pass to the callbacks in the list. - */ - fireWith(context?: any, ...args: any[]): JQueryCallback; - - /** - * Determine whether a supplied callback is in a list - * - * @param callback The callback to search for. - */ - has(callback: Function): boolean; - - /** - * Lock a callback list in its current state. - */ - lock(): JQueryCallback; - - /** - * Determine if the callbacks list has been locked. - */ - locked(): boolean; - - /** - * Remove a callback or a collection of callbacks from a callback list. - * - * @param callbacks A function, or array of functions, that are to be removed from the callback list. - */ - remove(callbacks: Function): JQueryCallback; - /** - * Remove a callback or a collection of callbacks from a callback list. - * - * @param callbacks A function, or array of functions, that are to be removed from the callback list. - */ - remove(callbacks: Function[]): JQueryCallback; -} - -/** - * Allows jQuery Promises to interop with non-jQuery promises - */ -interface JQueryGenericPromise -{ - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - */ - then(doneFilter: (value: T, ...values: any[]) => U|JQueryPromise, failFilter?: (...reasons: any[]) => U|JQueryPromise, progressFilter?: (...progression: any[]) => any): JQueryPromise; - - /** - * Determine the current state of a Deferred object. - */ - state(): string; - - // Deprecated - given no typings - pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise; -} - -/** - * Interface for the JQuery promise/deferred callbacks - */ -interface JQueryPromiseCallback -{ - (value?: T, ...args: any[]): void; -} - -interface JQueryPromiseOperator -{ - (callback1: JQueryPromiseCallback|JQueryPromiseCallback[], ...callbacksN: Array|JQueryPromiseCallback[]>): JQueryPromise; -} - -/** - * Interface for the JQuery promise, part of callbacks - */ -interface JQueryPromise extends JQueryGenericPromise -{ - /** - * Add handlers to be called when the Deferred object is either resolved or rejected. - * - * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected. - * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. - */ - always(alwaysCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...alwaysCallbacksN: Array|JQueryPromiseCallback[]>): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is resolved. - * - * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved. - * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. - */ - done(doneCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...doneCallbackN: Array|JQueryPromiseCallback[]>): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is rejected. - * - * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected. - * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. - */ - fail(failCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...failCallbacksN: Array|JQueryPromiseCallback[]>): JQueryPromise; - /** - * Add handlers to be called when the Deferred object generates progress notifications. - * - * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications. - */ - progress(progressCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...progressCallbackN: Array|JQueryPromiseCallback[]>): JQueryPromise; -} - -/** - * Interface for the JQuery deferred, part of callbacks - */ -interface JQueryDeferred extends JQueryGenericPromise -{ - /** - * Add handlers to be called when the Deferred object is either resolved or rejected. - * - * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected. - * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. - */ - always(alwaysCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...alwaysCallbacksN: Array|JQueryPromiseCallback[]>): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object is resolved. - * - * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved. - * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. - */ - done(doneCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...doneCallbackN: Array|JQueryPromiseCallback[]>): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object is rejected. - * - * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected. - * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. - */ - fail(failCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...failCallbacksN: Array|JQueryPromiseCallback[]>): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object generates progress notifications. - * - * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications. - */ - progress(progressCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...progressCallbackN: Array|JQueryPromiseCallback[]>): JQueryDeferred; - - /** - * Call the progressCallbacks on a Deferred object with the given args. - * - * @param args Optional arguments that are passed to the progressCallbacks. - */ - notify(value?: any, ...args: any[]): JQueryDeferred; - - /** - * Call the progressCallbacks on a Deferred object with the given context and args. - * - * @param context Context passed to the progressCallbacks as the this object. - * @param args Optional arguments that are passed to the progressCallbacks. - */ - notifyWith(context: any, value?: any, ...args: any[]): JQueryDeferred; - - /** - * Reject a Deferred object and call any failCallbacks with the given args. - * - * @param args Optional arguments that are passed to the failCallbacks. - */ - reject(value?: any, ...args: any[]): JQueryDeferred; - /** - * Reject a Deferred object and call any failCallbacks with the given context and args. - * - * @param context Context passed to the failCallbacks as the this object. - * @param args An optional array of arguments that are passed to the failCallbacks. - */ - rejectWith(context: any, value?: any, ...args: any[]): JQueryDeferred; - - /** - * Resolve a Deferred object and call any doneCallbacks with the given args. - * - * @param value First argument passed to doneCallbacks. - * @param args Optional subsequent arguments that are passed to the doneCallbacks. - */ - resolve(value?: T, ...args: any[]): JQueryDeferred; - - /** - * Resolve a Deferred object and call any doneCallbacks with the given context and args. - * - * @param context Context passed to the doneCallbacks as the this object. - * @param args An optional array of arguments that are passed to the doneCallbacks. - */ - resolveWith(context: any, value?: T, ...args: any[]): JQueryDeferred; - - /** - * Return a Deferred's Promise object. - * - * @param target Object onto which the promise methods have to be attached - */ - promise(target?: any): JQueryPromise; -} - -/** - * Interface of the JQuery extension of the W3C event object - */ -interface BaseJQueryEventObject extends Event -{ - data: any; - delegateTarget: Element; - isDefaultPrevented(): boolean; - isImmediatePropagationStopped(): boolean; - isPropagationStopped(): boolean; - namespace: string; - originalEvent: Event; - preventDefault(): any; - relatedTarget: Element; - result: any; - stopImmediatePropagation(): void; - stopPropagation(): void; - target: Element; - pageX: number; - pageY: number; - which: number; - metaKey: boolean; -} - -interface JQueryInputEventObject extends BaseJQueryEventObject -{ - altKey: boolean; - ctrlKey: boolean; - metaKey: boolean; - shiftKey: boolean; -} - -interface JQueryMouseEventObject extends JQueryInputEventObject -{ - button: number; - clientX: number; - clientY: number; - offsetX: number; - offsetY: number; - pageX: number; - pageY: number; - screenX: number; - screenY: number; -} - -interface JQueryKeyEventObject extends JQueryInputEventObject -{ - char: any; - charCode: number; - key: any; - keyCode: number; -} - -interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject -{ -} - -/* - Collection of properties of the current browser -*/ - -interface JQuerySupport -{ - ajax?: boolean; - boxModel?: boolean; - changeBubbles?: boolean; - checkClone?: boolean; - checkOn?: boolean; - cors?: boolean; - cssFloat?: boolean; - hrefNormalized?: boolean; - htmlSerialize?: boolean; - leadingWhitespace?: boolean; - noCloneChecked?: boolean; - noCloneEvent?: boolean; - opacity?: boolean; - optDisabled?: boolean; - optSelected?: boolean; - scriptEval? (): boolean; - style?: boolean; - submitBubbles?: boolean; - tbody?: boolean; -} - -interface JQueryParam -{ - /** - * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - * - * @param obj An array or object to serialize. - */ - (obj: any): string; - - /** - * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - * - * @param obj An array or object to serialize. - * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization. - */ - (obj: any, traditional: boolean): string; -} - -/** - * The interface used to construct jQuery events (with $.Event). It is - * defined separately instead of inline in JQueryStatic to allow - * overriding the construction function with specific strings - * returning specific event objects. - */ -interface JQueryEventConstructor -{ - (name: string, eventProperties?: any): JQueryEventObject; - new (name: string, eventProperties?: any): JQueryEventObject; -} - -/** - * The interface used to specify coordinates. - */ -interface JQueryCoordinates -{ - left: number; - top: number; -} - -/** - * Elements in the array returned by serializeArray() - */ -interface JQuerySerializeArrayElement -{ - name: string; - value: string; -} - -interface JQueryAnimationOptions -{ - /** - * A string or number determining how long the animation will run. - */ - duration?: any; - /** - * A string indicating which easing function to use for the transition. - */ - easing?: string; - /** - * A function to call once the animation is complete. - */ - complete?: Function; - /** - * A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. - */ - step?: (now: number, tween: any) => any; - /** - * A function to be called after each step of the animation, only once per animated element regardless of the number of animated properties. (version added: 1.8) - */ - progress?: (animation: JQueryPromise, progress: number, remainingMs: number) => any; - /** - * A function to call when the animation begins. (version added: 1.8) - */ - start?: (animation: JQueryPromise) => any; - /** - * A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8) - */ - done?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; - /** - * A function to be called when the animation fails to complete (its Promise object is rejected). (version added: 1.8) - */ - fail?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; - /** - * A function to be called when the animation completes or stops without completing (its Promise object is either resolved or rejected). (version added: 1.8) - */ - always?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; - /** - * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. - */ - queue?: any; - /** - * A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. (version added: 1.4) - */ - specialEasing?: Object; -} - -/** - * Static members of jQuery (those on $ and jQuery themselves) - */ -interface JQueryStatic -{ - - /** - * Perform an asynchronous HTTP (Ajax) request. - * - * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). - */ - ajax(settings: JQueryAjaxSettings): JQueryXHR; - /** - * Perform an asynchronous HTTP (Ajax) request. - * - * @param url A string containing the URL to which the request is sent. - * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). - */ - ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR; - - /** - * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax(). - * - * @param dataTypes An optional string containing one or more space-separated dataTypes - * @param handler A handler to set default values for future Ajax requests. - */ - ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void; - /** - * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax(). - * - * @param handler A handler to set default values for future Ajax requests. - */ - ajaxPrefilter(handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void; - - ajaxSettings: JQueryAjaxSettings; - - /** - * Set default values for future Ajax requests. Its use is not recommended. - * - * @param options A set of key/value pairs that configure the default Ajax request. All options are optional. - */ - ajaxSetup(options: JQueryAjaxSettings): void; - - /** - * Load data from the server using a HTTP GET request. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). - */ - get(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP GET request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). - */ - get(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load JSON-encoded data from the server using a GET HTTP request. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. - */ - getJSON(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - /** - * Load JSON-encoded data from the server using a GET HTTP request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. - */ - getJSON(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - /** - * Load a JavaScript file from the server using a GET HTTP request, then execute it. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. - */ - getScript(url: string, success?: (script: string, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - - /** - * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - */ - param: JQueryParam; - - /** - * Load data from the server using a HTTP POST request. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). - */ - post(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP POST request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). - */ - post(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - - /** - * A multi-purpose callbacks list object that provides a powerful way to manage callback lists. - * - * @param flags An optional list of space-separated flags that change how the callback list behaves. - */ - Callbacks(flags?: string): JQueryCallback; - - /** - * Holds or releases the execution of jQuery's ready event. - * - * @param hold Indicates whether the ready hold is being requested or released - */ - holdReady(hold: boolean): void; - - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param selector A string containing a selector expression - * @param context A DOM Element, Document, or jQuery to use as context - */ - (selector: string, context?: Element|JQuery): JQuery; - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param element A DOM element to wrap in a jQuery object. - */ - (element: Element): JQuery; - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object. - */ - (elementArray: Element[]): JQuery; - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param object A plain object to wrap in a jQuery object. - */ - (object: {}): JQuery; - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param object An existing jQuery object to clone. - */ - (object: JQuery): JQuery; - /** - * Specify a function to execute when the DOM is fully loaded. - */ - (): JQuery; - - /** - * Creates DOM elements on the fly from the provided string of raw HTML. - * - * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML. - * @param ownerDocument A document in which the new elements will be created. - */ - (html: string, ownerDocument?: Document): JQuery; - /** - * Creates DOM elements on the fly from the provided string of raw HTML. - * - * @param html A string defining a single, standalone, HTML element (e.g.
or
). - * @param attributes An object of attributes, events, and methods to call on the newly-created element. - */ - (html: string, attributes: Object): JQuery; - - /** - * Binds a function to be executed when the DOM has finished loading. - * - * @param callback A function to execute after the DOM is ready. - */ - (callback: Function): JQuery; - - /** - * Relinquish jQuery's control of the $ variable. - * - * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself). - */ - noConflict(removeAll?: boolean): Object; - - /** - * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events. - * - * @param deferreds One or more Deferred objects, or plain JavaScript objects. - */ - when(...deferreds: Array/* as JQueryDeferred */>): JQueryPromise; - - /** - * Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties. - */ - cssHooks: { [key: string]: any; }; - cssNumber: any; - - /** - * Store arbitrary data associated with the specified element. Returns the value that was set. - * - * @param element The DOM element to associate with the data. - * @param key A string naming the piece of data to set. - * @param value The new data value. - */ - data(element: Element, key: string, value: T): T; - /** - * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element. - * - * @param element The DOM element to associate with the data. - * @param key A string naming the piece of data to set. - */ - data(element: Element, key: string): any; - /** - * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element. - * - * @param element The DOM element to associate with the data. - */ - data(element: Element): any; - - /** - * Execute the next function on the queue for the matched element. - * - * @param element A DOM element from which to remove and execute a queued function. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - dequeue(element: Element, queueName?: string): void; - - /** - * Determine whether an element has any jQuery data associated with it. - * - * @param element A DOM element to be checked for data. - */ - hasData(element: Element): boolean; - - /** - * Show the queue of functions to be executed on the matched element. - * - * @param element A DOM element to inspect for an attached queue. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - queue(element: Element, queueName?: string): any[]; - /** - * Manipulate the queue of functions to be executed on the matched element. - * - * @param element A DOM element where the array of queued functions is attached. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param newQueue An array of functions to replace the current queue contents. - */ - queue(element: Element, queueName: string, newQueue: Function[]): JQuery; - /** - * Manipulate the queue of functions to be executed on the matched element. - * - * @param element A DOM element on which to add a queued function. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param callback The new function to add to the queue. - */ - queue(element: Element, queueName: string, callback: Function): JQuery; - - /** - * Remove a previously-stored piece of data. - * - * @param element A DOM element from which to remove data. - * @param name A string naming the piece of data to remove. - */ - removeData(element: Element, name?: string): JQuery; - - /** - * A constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function. - * - * @param beforeStart A function that is called just before the constructor returns. - */ - Deferred(beforeStart?: (deferred: JQueryDeferred) => any): JQueryDeferred; - - /** - * Effects - */ - fx: { - tick: () => void; - /** - * The rate (in milliseconds) at which animations fire. - */ - interval: number; - stop: () => void; - speeds: { slow: number; fast: number; }; - /** - * Globally disable all animations. - */ - off: boolean; - step: any; - }; - - /** - * Takes a function and returns a new one that will always have a particular context. - * - * @param fnction The function whose context will be changed. - * @param context The object to which the context (this) of the function should be set. - * @param additionalArguments Any number of arguments to be passed to the function referenced in the function argument. - */ - proxy(fnction: (...args: any[]) => any, context: Object, ...additionalArguments: any[]): any; - /** - * Takes a function and returns a new one that will always have a particular context. - * - * @param context The object to which the context (this) of the function should be set. - * @param name The name of the function whose context will be changed (should be a property of the context object). - * @param additionalArguments Any number of arguments to be passed to the function named in the name argument. - */ - proxy(context: Object, name: string, ...additionalArguments: any[]): any; - - Event: JQueryEventConstructor; - - /** - * Takes a string and throws an exception containing it. - * - * @param message The message to send out. - */ - error(message: any): JQuery; - - expr: any; - fn: any; //TODO: Decide how we want to type this - - isReady: boolean; - - // Properties - support: JQuerySupport; - - /** - * Check to see if a DOM element is a descendant of another DOM element. - * - * @param container The DOM element that may contain the other element. - * @param contained The DOM element that may be contained by (a descendant of) the other element. - */ - contains(container: Element, contained: Element): boolean; - - /** - * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. - * - * @param collection The object or array to iterate over. - * @param callback The function that will be executed on every object. - */ - each( - collection: T[], - callback: (indexInArray: number, valueOfElement: T) => any - ): any; - - /** - * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. - * - * @param collection The object or array to iterate over. - * @param callback The function that will be executed on every object. - */ - each( - collection: any, - callback: (indexInArray: any, valueOfElement: any) => any - ): any; - - /** - * Merge the contents of two or more objects together into the first object. - * - * @param target An object that will receive the new properties if additional objects are passed in or that will extend the jQuery namespace if it is the sole argument. - * @param object1 An object containing additional properties to merge in. - * @param objectN Additional objects containing properties to merge in. - */ - extend(target: any, object1?: any, ...objectN: any[]): any; - /** - * Merge the contents of two or more objects together into the first object. - * - * @param deep If true, the merge becomes recursive (aka. deep copy). - * @param target The object to extend. It will receive the new properties. - * @param object1 An object containing additional properties to merge in. - * @param objectN Additional objects containing properties to merge in. - */ - extend(deep: boolean, target: any, object1?: any, ...objectN: any[]): any; - - /** - * Execute some JavaScript code globally. - * - * @param code The JavaScript code to execute. - */ - globalEval(code: string): any; - - /** - * Finds the elements of an array which satisfy a filter function. The original array is not affected. - * - * @param array The array to search through. - * @param func The function to process each item against. The first argument to the function is the item, and the second argument is the index. The function should return a Boolean value. this will be the global window object. - * @param invert If "invert" is false, or not provided, then the function returns an array consisting of all elements for which "callback" returns true. If "invert" is true, then the function returns an array consisting of all elements for which "callback" returns false. - */ - grep(array: T[], func: (elementOfArray: T, indexInArray: number) => boolean, invert?: boolean): T[]; - - /** - * Search for a specified value within an array and return its index (or -1 if not found). - * - * @param value The value to search for. - * @param array An array through which to search. - * @param fromIndex he index of the array at which to begin the search. The default is 0, which will search the whole array. - */ - inArray(value: T, array: T[], fromIndex?: number): number; - - /** - * Determine whether the argument is an array. - * - * @param obj Object to test whether or not it is an array. - */ - isArray(obj: any): boolean; - /** - * Check to see if an object is empty (contains no enumerable properties). - * - * @param obj The object that will be checked to see if it's empty. - */ - isEmptyObject(obj: any): boolean; - /** - * Determine if the argument passed is a Javascript function object. - * - * @param obj Object to test whether or not it is a function. - */ - isFunction(obj: any): boolean; - /** - * Determines whether its argument is a number. - * - * @param obj The value to be tested. - */ - isNumeric(value: any): boolean; - /** - * Check to see if an object is a plain object (created using "{}" or "new Object"). - * - * @param obj The object that will be checked to see if it's a plain object. - */ - isPlainObject(obj: any): boolean; - /** - * Determine whether the argument is a window. - * - * @param obj Object to test whether or not it is a window. - */ - isWindow(obj: any): boolean; - /** - * Check to see if a DOM node is within an XML document (or is an XML document). - * - * @param node he DOM node that will be checked to see if it's in an XML document. - */ - isXMLDoc(node: Node): boolean; - - /** - * Convert an array-like object into a true JavaScript array. - * - * @param obj Any object to turn into a native Array. - */ - makeArray(obj: any): any[]; - - /** - * Translate all items in an array or object to new array of items. - * - * @param array The Array to translate. - * @param callback The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object. - */ - map(array: T[], callback: (elementOfArray: T, indexInArray: number) => U): U[]; - /** - * Translate all items in an array or object to new array of items. - * - * @param arrayOrObject The Array or Object to translate. - * @param callback The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object. - */ - map(arrayOrObject: any, callback: (value: any, indexOrKey: any) => any): any; - - /** - * Merge the contents of two arrays together into the first array. - * - * @param first The first array to merge, the elements of second added. - * @param second The second array to merge into the first, unaltered. - */ - merge(first: T[], second: T[]): T[]; - - /** - * An empty function. - */ - noop(): any; - - /** - * Return a number representing the current time. - */ - now(): number; - - /** - * Takes a well-formed JSON string and returns the resulting JavaScript object. - * - * @param json The JSON string to parse. - */ - parseJSON(json: string): any; - - /** - * Parses a string into an XML document. - * - * @param data a well-formed XML string to be parsed - */ - parseXML(data: string): XMLDocument; - - /** - * Remove the whitespace from the beginning and end of a string. - * - * @param str Remove the whitespace from the beginning and end of a string. - */ - trim(str: string): string; - - /** - * Determine the internal JavaScript [[Class]] of an object. - * - * @param obj Object to get the internal JavaScript [[Class]] of. - */ - type(obj: any): string; - - /** - * Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers. - * - * @param array The Array of DOM elements. - */ - unique(array: Element[]): Element[]; - - /** - * Parses a string into an array of DOM nodes. - * - * @param data HTML string to be parsed - * @param context DOM element to serve as the context in which the HTML fragment will be created - * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string - */ - parseHTML(data: string, context?: HTMLElement, keepScripts?: boolean): any[]; - - /** - * Parses a string into an array of DOM nodes. - * - * @param data HTML string to be parsed - * @param context DOM element to serve as the context in which the HTML fragment will be created - * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string - */ - parseHTML(data: string, context?: Document, keepScripts?: boolean): any[]; -} - -/** - * The jQuery instance members - */ -interface JQuery -{ - /** - * Register a handler to be called when Ajax requests complete. This is an AjaxEvent. - * - * @param handler The function to be invoked. - */ - ajaxComplete(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any): JQuery; - /** - * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxError(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxSettings: JQueryAjaxSettings, thrownError: any) => any): JQuery; - /** - * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxSend(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any): JQuery; - /** - * Register a handler to be called when the first Ajax request begins. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxStart(handler: () => any): JQuery; - /** - * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxStop(handler: () => any): JQuery; - /** - * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxSuccess(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any): JQuery; - - /** - * Load data from the server and place the returned HTML into the matched element. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param complete A callback function that is executed when the request completes. - */ - load(url: string, data?: string|Object, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery; - - /** - * Encode a set of form elements as a string for submission. - */ - serialize(): string; - /** - * Encode a set of form elements as an array of names and values. - */ - serializeArray(): JQuerySerializeArrayElement[]; - - /** - * Adds the specified class(es) to each of the set of matched elements. - * - * @param className One or more space-separated classes to be added to the class attribute of each matched element. - */ - addClass(className: string): JQuery; - /** - * Adds the specified class(es) to each of the set of matched elements. - * - * @param function A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set. - */ - addClass(func: (index: number, className: string) => string): JQuery; - - /** - * Add the previous set of elements on the stack to the current set, optionally filtered by a selector. - */ - addBack(selector?: string): JQuery; - - /** - * Get the value of an attribute for the first element in the set of matched elements. - * - * @param attributeName The name of the attribute to get. - */ - attr(attributeName: string): string; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributeName The name of the attribute to set. - * @param value A value to set for the attribute. - */ - attr(attributeName: string, value: string|number): JQuery; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributeName The name of the attribute to set. - * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments. - */ - attr(attributeName: string, func: (index: number, attr: string) => string|number): JQuery; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributes An object of attribute-value pairs to set. - */ - attr(attributes: Object): JQuery; - - /** - * Determine whether any of the matched elements are assigned the given class. - * - * @param className The class name to search for. - */ - hasClass(className: string): boolean; - - /** - * Get the HTML contents of the first element in the set of matched elements. - */ - html(): string; - /** - * Set the HTML contents of each element in the set of matched elements. - * - * @param htmlString A string of HTML to set as the content of each matched element. - */ - html(htmlString: string): JQuery; - /** - * Set the HTML contents of each element in the set of matched elements. - * - * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set. - */ - html(func: (index: number, oldhtml: string) => string): JQuery; - /** - * Set the HTML contents of each element in the set of matched elements. - * - * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set. - */ - - /** - * Get the value of a property for the first element in the set of matched elements. - * - * @param propertyName The name of the property to get. - */ - prop(propertyName: string): any; - /** - * Set one or more properties for the set of matched elements. - * - * @param propertyName The name of the property to set. - * @param value A value to set for the property. - */ - prop(propertyName: string, value: string|number|boolean): JQuery; - /** - * Set one or more properties for the set of matched elements. - * - * @param properties An object of property-value pairs to set. - */ - prop(properties: Object): JQuery; - /** - * Set one or more properties for the set of matched elements. - * - * @param propertyName The name of the property to set. - * @param func A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element. - */ - prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): JQuery; - - /** - * Remove an attribute from each element in the set of matched elements. - * - * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes. - */ - removeAttr(attributeName: string): JQuery; - - /** - * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. - * - * @param className One or more space-separated classes to be removed from the class attribute of each matched element. - */ - removeClass(className?: string): JQuery; - /** - * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. - * - * @param function A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments. - */ - removeClass(func: (index: number, className: string) => string): JQuery; - - /** - * Remove a property for the set of matched elements. - * - * @param propertyName The name of the property to remove. - */ - removeProp(propertyName: string): JQuery; - - /** - * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. - * - * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set. - * @param swtch A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed. - */ - toggleClass(className: string, swtch?: boolean): JQuery; - /** - * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. - * - * @param swtch A boolean value to determine whether the class should be added or removed. - */ - toggleClass(swtch?: boolean): JQuery; - /** - * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. - * - * @param func A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments. - * @param swtch A boolean value to determine whether the class should be added or removed. - */ - toggleClass(func: (index: number, className: string, swtch: boolean) => string, swtch?: boolean): JQuery; - - /** - * Get the current value of the first element in the set of matched elements. - */ - val(): any; - /** - * Set the value of each element in the set of matched elements. - * - * @param value A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked. - */ - val(value: string|string[]): JQuery; - /** - * Set the value of each element in the set of matched elements. - * - * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. - */ - val(func: (index: number, value: string) => string): JQuery; - - - /** - * Get the value of style properties for the first element in the set of matched elements. - * - * @param propertyName A CSS property. - */ - css(propertyName: string): string; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param propertyName A CSS property name. - * @param value A value to set for the property. - */ - css(propertyName: string, value: string|number): JQuery; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param propertyName A CSS property name. - * @param value A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. - */ - css(propertyName: string, value: (index: number, value: string) => string|number): JQuery; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param properties An object of property-value pairs to set. - */ - css(properties: Object): JQuery; - - /** - * Get the current computed height for the first element in the set of matched elements. - */ - height(): number; - /** - * Set the CSS height of every matched element. - * - * @param value An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string). - */ - height(value: number|string): JQuery; - /** - * Set the CSS height of every matched element. - * - * @param func A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set. - */ - height(func: (index: number, height: number) => number|string): JQuery; - - /** - * Get the current computed height for the first element in the set of matched elements, including padding but not border. - */ - innerHeight(): number; - - /** - * Sets the inner height on elements in the set of matched elements, including padding but not border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - innerHeight(height: number|string): JQuery; - - /** - * Get the current computed width for the first element in the set of matched elements, including padding but not border. - */ - innerWidth(): number; - - /** - * Sets the inner width on elements in the set of matched elements, including padding but not border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - innerWidth(width: number|string): JQuery; - - /** - * Get the current coordinates of the first element in the set of matched elements, relative to the document. - */ - offset(): JQueryCoordinates; - /** - * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements. - * - * @param coordinates An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements. - */ - offset(coordinates: JQueryCoordinates): JQuery; - /** - * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements. - * - * @param func A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties. - */ - offset(func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates): JQuery; - - /** - * Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without "px") representation of the value or null if called on an empty set of elements. - * - * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. - */ - outerHeight(includeMargin?: boolean): number; - - /** - * Sets the outer height on elements in the set of matched elements, including padding and border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - outerHeight(height: number|string): JQuery; - - /** - * Get the current computed width for the first element in the set of matched elements, including padding and border. - * - * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. - */ - outerWidth(includeMargin?: boolean): number; - - /** - * Sets the outer width on elements in the set of matched elements, including padding and border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - outerWidth(width: number|string): JQuery; - - /** - * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent. - */ - position(): JQueryCoordinates; - - /** - * Get the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element. - */ - scrollLeft(): number; - /** - * Set the current horizontal position of the scroll bar for each of the set of matched elements. - * - * @param value An integer indicating the new position to set the scroll bar to. - */ - scrollLeft(value: number): JQuery; - - /** - * Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element. - */ - scrollTop(): number; - /** - * Set the current vertical position of the scroll bar for each of the set of matched elements. - * - * @param value An integer indicating the new position to set the scroll bar to. - */ - scrollTop(value: number): JQuery; - - /** - * Get the current computed width for the first element in the set of matched elements. - */ - width(): number; - /** - * Set the CSS width of each element in the set of matched elements. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - width(value: number|string): JQuery; - /** - * Set the CSS width of each element in the set of matched elements. - * - * @param func A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set. - */ - width(func: (index: number, width: number) => number|string): JQuery; - - /** - * Remove from the queue all items that have not yet been run. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - clearQueue(queueName?: string): JQuery; - - /** - * Store arbitrary data associated with the matched elements. - * - * @param key A string naming the piece of data to set. - * @param value The new data value; it can be any Javascript type including Array or Object. - */ - data(key: string, value: any): JQuery; - /** - * Store arbitrary data associated with the matched elements. - * - * @param obj An object of key-value pairs of data to update. - */ - data(obj: { [key: string]: any; }): JQuery; - /** - * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. - * - * @param key Name of the data stored. - */ - data(key: string): any; - /** - * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. - */ - data(): any; - - /** - * Execute the next function on the queue for the matched elements. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - dequeue(queueName?: string): JQuery; - - /** - * Remove a previously-stored piece of data. - * - * @param name A string naming the piece of data to delete or space-separated string naming the pieces of data to delete. - */ - removeData(name: string): JQuery; - /** - * Remove a previously-stored piece of data. - * - * @param list An array of strings naming the pieces of data to delete. - */ - removeData(list: string[]): JQuery; - - /** - * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. - * - * @param type The type of queue that needs to be observed. (default: fx) - * @param target Object onto which the promise methods have to be attached - */ - promise(type?: string, target?: Object): JQueryPromise; - - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - animate(properties: Object, duration?: string|number, complete?: Function): JQuery; - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. (default: swing) - * @param complete A function to call once the animation is complete. - */ - animate(properties: Object, duration?: string|number, easing?: string, complete?: Function): JQuery; - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param options A map of additional options to pass to the method. - */ - animate(properties: Object, options: JQueryAnimationOptions): JQuery; - - /** - * Set a timer to delay execution of subsequent items in the queue. - * - * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - delay(duration: number, queueName?: string): JQuery; - - /** - * Display the matched elements by fading them to opaque. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - fadeIn(duration?: number|string, complete?: Function): JQuery; - /** - * Display the matched elements by fading them to opaque. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeIn(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements by fading them to opaque. - * - * @param options A map of additional options to pass to the method. - */ - fadeIn(options: JQueryAnimationOptions): JQuery; - - /** - * Hide the matched elements by fading them to transparent. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - fadeOut(duration?: number|string, complete?: Function): JQuery; - /** - * Hide the matched elements by fading them to transparent. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeOut(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements by fading them to transparent. - * - * @param options A map of additional options to pass to the method. - */ - fadeOut(options: JQueryAnimationOptions): JQuery; - - /** - * Adjust the opacity of the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param opacity A number between 0 and 1 denoting the target opacity. - * @param complete A function to call once the animation is complete. - */ - fadeTo(duration: string|number, opacity: number, complete?: Function): JQuery; - /** - * Adjust the opacity of the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param opacity A number between 0 and 1 denoting the target opacity. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeTo(duration: string|number, opacity: number, easing?: string, complete?: Function): JQuery; - - /** - * Display or hide the matched elements by animating their opacity. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - fadeToggle(duration?: number|string, complete?: Function): JQuery; - /** - * Display or hide the matched elements by animating their opacity. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeToggle(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements by animating their opacity. - * - * @param options A map of additional options to pass to the method. - */ - fadeToggle(options: JQueryAnimationOptions): JQuery; - - /** - * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements. - * - * @param queue The name of the queue in which to stop animations. - */ - finish(queue?: string): JQuery; - - /** - * Hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - hide(duration?: number|string, complete?: Function): JQuery; - /** - * Hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - hide(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements. - * - * @param options A map of additional options to pass to the method. - */ - hide(options: JQueryAnimationOptions): JQuery; - - /** - * Display the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - show(duration?: number|string, complete?: Function): JQuery; - /** - * Display the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - show(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements. - * - * @param options A map of additional options to pass to the method. - */ - show(options: JQueryAnimationOptions): JQuery; - - /** - * Display the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - slideDown(duration?: number|string, complete?: Function): JQuery; - /** - * Display the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - slideDown(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements with a sliding motion. - * - * @param options A map of additional options to pass to the method. - */ - slideDown(options: JQueryAnimationOptions): JQuery; - - /** - * Display or hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - slideToggle(duration?: number|string, complete?: Function): JQuery; - /** - * Display or hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - slideToggle(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements with a sliding motion. - * - * @param options A map of additional options to pass to the method. - */ - slideToggle(options: JQueryAnimationOptions): JQuery; - - /** - * Hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - slideUp(duration?: number|string, complete?: Function): JQuery; - /** - * Hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - slideUp(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements with a sliding motion. - * - * @param options A map of additional options to pass to the method. - */ - slideUp(options: JQueryAnimationOptions): JQuery; - - /** - * Stop the currently-running animation on the matched elements. - * - * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. - * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. - */ - stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery; - /** - * Stop the currently-running animation on the matched elements. - * - * @param queue The name of the queue in which to stop animations. - * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. - * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. - */ - stop(queue?: string, clearQueue?: boolean, jumpToEnd?: boolean): JQuery; - - /** - * Display or hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - toggle(duration?: number|string, complete?: Function): JQuery; - /** - * Display or hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - toggle(duration?: number|string, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements. - * - * @param options A map of additional options to pass to the method. - */ - toggle(options: JQueryAnimationOptions): JQuery; - /** - * Display or hide the matched elements. - * - * @param showOrHide A Boolean indicating whether to show or hide the elements. - */ - toggle(showOrHide: boolean): JQuery; - - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param handler A function to execute each time the event is triggered. - */ - bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param eventData An object containing data that will be passed to the event handler. - * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true. - */ - bind(eventType: string, eventData: any, preventBubble: boolean): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true. - */ - bind(eventType: string, preventBubble: boolean): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param events An object containing one or more DOM event types and functions to execute for them. - */ - bind(events: any): JQuery; - - /** - * Trigger the "blur" event on an element - */ - blur(): JQuery; - /** - * Bind an event handler to the "blur" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - blur(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "blur" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "change" event on an element. - */ - change(): JQuery; - /** - * Bind an event handler to the "change" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - change(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "change" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "click" event on an element. - */ - click(): JQuery; - /** - * Bind an event handler to the "click" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - */ - click(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "click" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "dblclick" event on an element. - */ - dblclick(): JQuery; - /** - * Bind an event handler to the "dblclick" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "dblclick" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - delegate(selector: any, eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "focus" event on an element. - */ - focus(): JQuery; - /** - * Bind an event handler to the "focus" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - focus(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "focus" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Bind an event handler to the "focusin" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - focusin(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "focusin" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - focusin(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Bind an event handler to the "focusout" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - focusout(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "focusout" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - focusout(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements. - * - * @param handlerIn A function to execute when the mouse pointer enters the element. - * @param handlerOut A function to execute when the mouse pointer leaves the element. - */ - hover(handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements. - * - * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element. - */ - hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "keydown" event on an element. - */ - keydown(): JQuery; - /** - * Bind an event handler to the "keydown" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; - /** - * Bind an event handler to the "keydown" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; - - /** - * Trigger the "keypress" event on an element. - */ - keypress(): JQuery; - /** - * Bind an event handler to the "keypress" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; - /** - * Bind an event handler to the "keypress" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; - - /** - * Trigger the "keyup" event on an element. - */ - keyup(): JQuery; - /** - * Bind an event handler to the "keyup" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; - /** - * Bind an event handler to the "keyup" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; - - /** - * Bind an event handler to the "load" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - load(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "load" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "mousedown" event on an element. - */ - mousedown(): JQuery; - /** - * Bind an event handler to the "mousedown" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mousedown" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mousedown(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseenter" event on an element. - */ - mouseenter(): JQuery; - /** - * Bind an event handler to be fired when the mouse enters an element. - * - * @param handler A function to execute when the event is triggered. - */ - mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to be fired when the mouse enters an element. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseenter(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseleave" event on an element. - */ - mouseleave(): JQuery; - /** - * Bind an event handler to be fired when the mouse leaves an element. - * - * @param handler A function to execute when the event is triggered. - */ - mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to be fired when the mouse leaves an element. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseleave(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mousemove" event on an element. - */ - mousemove(): JQuery; - /** - * Bind an event handler to the "mousemove" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mousemove" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mousemove(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseout" event on an element. - */ - mouseout(): JQuery; - /** - * Bind an event handler to the "mouseout" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mouseout" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseout(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseover" event on an element. - */ - mouseover(): JQuery; - /** - * Bind an event handler to the "mouseover" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mouseover" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseover(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseup" event on an element. - */ - mouseup(): JQuery; - /** - * Bind an event handler to the "mouseup" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mouseup" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseup(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Remove an event handler. - */ - off(): JQuery; - /** - * Remove an event handler. - * - * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". - * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. - * @param handler A handler function previously attached for the event(s), or the special value false. - */ - off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove an event handler. - * - * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". - * @param handler A handler function previously attached for the event(s), or the special value false. - */ - off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove an event handler. - * - * @param events An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s). - * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. - */ - off(events: { [key: string]: any; }, selector?: string): JQuery; - - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax). - */ - on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - on(events: string, data: any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event occurs. - */ - on(events: { [key: string]: any; }, selector?: string, data?: any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param data Data to be passed to the handler in event.data when an event occurs. - */ - on(events: { [key: string]: any; }, data?: any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. - * @param handler A function to execute at the time the event is triggered. - */ - one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. - * @param data An object containing data that will be passed to the event handler. - * @param handler A function to execute at the time the event is triggered. - */ - one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event occurs. - */ - one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param data Data to be passed to the handler in event.data when an event occurs. - */ - one(events: { [key: string]: any; }, data?: any): JQuery; - - - /** - * Specify a function to execute when the DOM is fully loaded. - * - * @param handler A function to execute after the DOM is ready. - */ - ready(handler: Function): JQuery; - - /** - * Trigger the "resize" event on an element. - */ - resize(): JQuery; - /** - * Bind an event handler to the "resize" JavaScript event. - * - * @param handler A function to execute each time the event is triggered. - */ - resize(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "resize" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - resize(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "scroll" event on an element. - */ - scroll(): JQuery; - /** - * Bind an event handler to the "scroll" JavaScript event. - * - * @param handler A function to execute each time the event is triggered. - */ - scroll(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "scroll" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - scroll(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "select" event on an element. - */ - select(): JQuery; - /** - * Bind an event handler to the "select" JavaScript event. - * - * @param handler A function to execute each time the event is triggered. - */ - select(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "select" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - select(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "submit" event on an element. - */ - submit(): JQuery; - /** - * Bind an event handler to the "submit" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - submit(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "submit" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Execute all handlers and behaviors attached to the matched elements for the given event type. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param extraParameters Additional parameters to pass along to the event handler. - */ - trigger(eventType: string, extraParameters?: any[]|Object): JQuery; - /** - * Execute all handlers and behaviors attached to the matched elements for the given event type. - * - * @param event A jQuery.Event object. - * @param extraParameters Additional parameters to pass along to the event handler. - */ - trigger(event: JQueryEventObject, extraParameters?: any[]|Object): JQuery; - - /** - * Execute all handlers attached to an element for an event. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param extraParameters An array of additional parameters to pass along to the event handler. - */ - triggerHandler(eventType: string, ...extraParameters: any[]): Object; - - /** - * Remove a previously-attached event handler from the elements. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param handler The function that is to be no longer executed. - */ - unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove a previously-attached event handler from the elements. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ). - */ - unbind(eventType: string, fls: boolean): JQuery; - /** - * Remove a previously-attached event handler from the elements. - * - * @param evt A JavaScript event object as passed to an event handler. - */ - unbind(evt: any): JQuery; - - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - */ - undelegate(): JQuery; - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * - * @param selector A selector which will be used to filter the event results. - * @param eventType A string containing a JavaScript event type, such as "click" or "keydown" - * @param handler A function to execute at the time the event is triggered. - */ - undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * - * @param selector A selector which will be used to filter the event results. - * @param events An object of one or more event types and previously bound functions to unbind from them. - */ - undelegate(selector: string, events: Object): JQuery; - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * - * @param namespace A string containing a namespace to unbind all events from. - */ - undelegate(namespace: string): JQuery; - - /** - * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8) - * - * @param handler A function to execute when the event is triggered. - */ - unload(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8) - * - * @param eventData A plain object of data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. (DEPRECATED from v1.10) - */ - context: Element; - - jquery: string; - - /** - * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8) - * - * @param handler A function to execute when the event is triggered. - */ - error(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8) - * - * @param eventData A plain object of data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Add a collection of DOM elements onto the jQuery stack. - * - * @param elements An array of elements to push onto the stack and make into a new jQuery object. - */ - pushStack(elements: any[]): JQuery; - /** - * Add a collection of DOM elements onto the jQuery stack. - * - * @param elements An array of elements to push onto the stack and make into a new jQuery object. - * @param name The name of a jQuery method that generated the array of elements. - * @param arguments The arguments that were passed in to the jQuery method (for serialization). - */ - pushStack(elements: any[], name: string, arguments: any[]): JQuery; - - /** - * Insert content, specified by the parameter, after each element in the set of matched elements. - * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements. - */ - after(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, after each element in the set of matched elements. - * - * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - */ - after(func: (index: number, html: string) => string|Element|JQuery): JQuery; - - /** - * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements. - */ - append(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * - * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set. - */ - append(func: (index: number, html: string) => string|Element|JQuery): JQuery; - - /** - * Insert every element in the set of matched elements to the end of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter. - */ - appendTo(target: JQuery|any[]|Element|string): JQuery; - - /** - * Insert content, specified by the parameter, before each element in the set of matched elements. - * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements. - */ - before(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, before each element in the set of matched elements. - * - * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - */ - before(func: (index: number, html: string) => string|Element|JQuery): JQuery; - - /** - * Create a deep copy of the set of matched elements. - * - * param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false. - * param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false). - */ - clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery; - - /** - * Remove the set of matched elements from the DOM. - * - * param selector A selector expression that filters the set of matched elements to be removed. - */ - detach(selector?: string): JQuery; - - /** - * Remove all child nodes of the set of matched elements from the DOM. - */ - empty(): JQuery; - - /** - * Insert every element in the set of matched elements after the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter. - */ - insertAfter(target: JQuery|any[]|Element|Text|string): JQuery; - - /** - * Insert every element in the set of matched elements before the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter. - */ - insertBefore(target: JQuery|any[]|Element|Text|string): JQuery; - - /** - * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements. - */ - prepend(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * - * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set. - */ - prepend(func: (index: number, html: string) => string|Element|JQuery): JQuery; - - /** - * Insert every element in the set of matched elements to the beginning of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter. - */ - prependTo(target: JQuery|any[]|Element|string): JQuery; - - /** - * Remove the set of matched elements from the DOM. - * - * @param selector A selector expression that filters the set of matched elements to be removed. - */ - remove(selector?: string): JQuery; - - /** - * Replace each target element with the set of matched elements. - * - * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. - */ - replaceAll(target: JQuery|any[]|Element|string): JQuery; - - /** - * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * - * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. - */ - replaceWith(newContent: JQuery|any[]|Element|Text|string): JQuery; - /** - * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * - * param func A function that returns content with which to replace the set of matched elements. - */ - replaceWith(func: () => Element|JQuery): JQuery; - - /** - * Get the combined text contents of each element in the set of matched elements, including their descendants. - */ - text(): string; - /** - * Set the content of each element in the set of matched elements to the specified text. - * - * @param text The text to set as the content of each matched element. When Number or Boolean is supplied, it will be converted to a String representation. - */ - text(text: string|number|boolean): JQuery; - /** - * Set the content of each element in the set of matched elements to the specified text. - * - * @param func A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments. - */ - text(func: (index: number, text: string) => string): JQuery; - - /** - * Retrieve all the elements contained in the jQuery set, as an array. - */ - toArray(): any[]; - - /** - * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place. - */ - unwrap(): JQuery; - - /** - * Wrap an HTML structure around each element in the set of matched elements. - * - * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. - */ - wrap(wrappingElement: JQuery|Element|string): JQuery; - /** - * Wrap an HTML structure around each element in the set of matched elements. - * - * @param func A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - */ - wrap(func: (index: number) => string|JQuery): JQuery; - - /** - * Wrap an HTML structure around all elements in the set of matched elements. - * - * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. - */ - wrapAll(wrappingElement: JQuery|Element|string): JQuery; - wrapAll(func: (index: number) => string): JQuery; - - /** - * Wrap an HTML structure around the content of each element in the set of matched elements. - * - * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements. - */ - wrapInner(wrappingElement: JQuery|Element|string): JQuery; - /** - * Wrap an HTML structure around the content of each element in the set of matched elements. - * - * @param func A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - */ - wrapInner(func: (index: number) => string): JQuery; - - /** - * Iterate over a jQuery object, executing a function for each matched element. - * - * @param func A function to execute for each matched element. - */ - each(func: (index: number, elem: Element) => any): JQuery; - - /** - * Retrieve one of the elements matched by the jQuery object. - * - * @param index A zero-based integer indicating which element to retrieve. - */ - get(index: number): HTMLElement; - /** - * Retrieve the elements matched by the jQuery object. - */ - get(): any[]; - - /** - * Search for a given element from among the matched elements. - */ - index(): number; - /** - * Search for a given element from among the matched elements. - * - * @param selector A selector representing a jQuery collection in which to look for an element. - */ - index(selector: string|JQuery|Element): number; - - /** - * The number of elements in the jQuery object. - */ - length: number; - /** - * A selector representing selector passed to jQuery(), if any, when creating the original set. - * version deprecated: 1.7, removed: 1.9 - */ - selector: string; - [index: string]: any; - [index: number]: HTMLElement; - - /** - * Add elements to the set of matched elements. - * - * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements. - * @param context The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method. - */ - add(selector: string, context?: Element): JQuery; - /** - * Add elements to the set of matched elements. - * - * @param elements One or more elements to add to the set of matched elements. - */ - add(...elements: Element[]): JQuery; - /** - * Add elements to the set of matched elements. - * - * @param html An HTML fragment to add to the set of matched elements. - */ - add(html: string): JQuery; - /** - * Add elements to the set of matched elements. - * - * @param obj An existing jQuery object to add to the set of matched elements. - */ - add(obj: JQuery): JQuery; - - /** - * Get the children of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - children(selector?: string): JQuery; - - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param selector A string containing a selector expression to match elements against. - */ - closest(selector: string): JQuery; - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param selector A string containing a selector expression to match elements against. - * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead. - */ - closest(selector: string, context?: Element): JQuery; - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param obj A jQuery object to match elements against. - */ - closest(obj: JQuery): JQuery; - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param element An element to match elements against. - */ - closest(element: Element): JQuery; - - /** - * Get an array of all the elements and selectors matched against the current element up through the DOM tree. - * - * @param selectors An array or string containing a selector expression to match elements against (can also be a jQuery object). - * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead. - */ - closest(selectors: any, context?: Element): any[]; - - /** - * Get the children of each element in the set of matched elements, including text and comment nodes. - */ - contents(): JQuery; - - /** - * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state. - */ - end(): JQuery; - - /** - * Reduce the set of matched elements to the one at the specified index. - * - * @param index An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set. - * - */ - eq(index: number): JQuery; - - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param selector A string containing a selector expression to match the current set of elements against. - */ - filter(selector: string): JQuery; - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param func A function used as a test for each element in the set. this is the current DOM element. - */ - filter(func: (index: number, element: Element) => any): JQuery; - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param element An element to match the current set of elements against. - */ - filter(element: Element): JQuery; - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param obj An existing jQuery object to match the current set of elements against. - */ - filter(obj: JQuery): JQuery; - - /** - * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * - * @param selector A string containing a selector expression to match elements against. - */ - find(selector: string): JQuery; - /** - * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * - * @param element An element to match elements against. - */ - find(element: Element): JQuery; - /** - * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * - * @param obj A jQuery object to match elements against. - */ - find(obj: JQuery): JQuery; - - /** - * Reduce the set of matched elements to the first in the set. - */ - first(): JQuery; - - /** - * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. - * - * @param selector A string containing a selector expression to match elements against. - */ - has(selector: string): JQuery; - /** - * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. - * - * @param contained A DOM element to match elements against. - */ - has(contained: Element): JQuery; - - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param selector A string containing a selector expression to match elements against. - */ - is(selector: string): boolean; - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param func A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element. - */ - is(func: (index: number, element: Element) => boolean): boolean; - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param obj An existing jQuery object to match the current set of elements against. - */ - is(obj: JQuery): boolean; - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param elements One or more elements to match the current set of elements against. - */ - is(elements: any): boolean; - - /** - * Reduce the set of matched elements to the final one in the set. - */ - last(): JQuery; - - /** - * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values. - * - * @param callback A function object that will be invoked for each element in the current set. - */ - map(callback: (index: number, domElement: Element) => any): JQuery; - - /** - * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - next(selector?: string): JQuery; - - /** - * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - nextAll(selector?: string): JQuery; - - /** - * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * - * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - nextUntil(selector?: string, filter?: string): JQuery; - /** - * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * - * @param element A DOM node or jQuery object indicating where to stop matching following sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - nextUntil(element?: Element, filter?: string): JQuery; - /** - * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * - * @param obj A DOM node or jQuery object indicating where to stop matching following sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - nextUntil(obj?: JQuery, filter?: string): JQuery; - - /** - * Remove elements from the set of matched elements. - * - * @param selector A string containing a selector expression to match elements against. - */ - not(selector: string): JQuery; - /** - * Remove elements from the set of matched elements. - * - * @param func A function used as a test for each element in the set. this is the current DOM element. - */ - not(func: (index: number, element: Element) => boolean): JQuery; - /** - * Remove elements from the set of matched elements. - * - * @param elements One or more DOM elements to remove from the matched set. - */ - not(...elements: Element[]): JQuery; - /** - * Remove elements from the set of matched elements. - * - * @param obj An existing jQuery object to match the current set of elements against. - */ - not(obj: JQuery): JQuery; - - /** - * Get the closest ancestor element that is positioned. - */ - offsetParent(): JQuery; - - /** - * Get the parent of each element in the current set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - parent(selector?: string): JQuery; - - /** - * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - parents(selector?: string): JQuery; - - /** - * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements. - * @param filter A string containing a selector expression to match elements against. - */ - parentsUntil(selector?: string, filter?: string): JQuery; - /** - * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param element A DOM node or jQuery object indicating where to stop matching ancestor elements. - * @param filter A string containing a selector expression to match elements against. - */ - parentsUntil(element?: Element, filter?: string): JQuery; - /** - * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param obj A DOM node or jQuery object indicating where to stop matching ancestor elements. - * @param filter A string containing a selector expression to match elements against. - */ - parentsUntil(obj?: JQuery, filter?: string): JQuery; - - /** - * Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - prev(selector?: string): JQuery; - - /** - * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - prevAll(selector?: string): JQuery; - - /** - * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - prevUntil(selector?: string, filter?: string): JQuery; - /** - * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param element A DOM node or jQuery object indicating where to stop matching preceding sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - prevUntil(element?: Element, filter?: string): JQuery; - /** - * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param obj A DOM node or jQuery object indicating where to stop matching preceding sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - prevUntil(obj?: JQuery, filter?: string): JQuery; - - /** - * Get the siblings of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - siblings(selector?: string): JQuery; - - /** - * Reduce the set of matched elements to a subset specified by a range of indices. - * - * @param start An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set. - * @param end An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set. - */ - slice(start: number, end?: number): JQuery; - - /** - * Show the queue of functions to be executed on the matched elements. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - queue(queueName?: string): any[]; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param newQueue An array of functions to replace the current queue contents. - */ - queue(newQueue: Function[]): JQuery; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param callback The new function to add to the queue, with a function to call that will dequeue the next item. - */ - queue(callback: Function): JQuery; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param newQueue An array of functions to replace the current queue contents. - */ - queue(queueName: string, newQueue: Function[]): JQuery; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param callback The new function to add to the queue, with a function to call that will dequeue the next item. - */ - queue(queueName: string, callback: Function): JQuery; -} -declare module "jquery" { - export = $; -} -declare var jQuery: JQueryStatic; -declare var $: JQueryStatic; \ No newline at end of file diff --git a/admin/lib/definitions/required/node.d.ts b/admin/lib/definitions/required/node.d.ts deleted file mode 100644 index 76cd767d..00000000 --- a/admin/lib/definitions/required/node.d.ts +++ /dev/null @@ -1,1463 +0,0 @@ -// Type definitions for Node.js v0.12.0 -// Project: http://nodejs.org/ -// Definitions by: Microsoft TypeScript , DefinitelyTyped -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/************************************************ -* * -* Node.js v0.12.0 API * -* * -************************************************/ - -/************************************************ -* * -* GLOBAL * -* * -************************************************/ -declare var process: NodeJS.Process; -declare var global: any; - -declare var __filename: string; -declare var __dirname: string; - -declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; -declare function clearTimeout(timeoutId: NodeJS.Timer): void; -declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; -declare function clearInterval(intervalId: NodeJS.Timer): void; -declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; -declare function clearImmediate(immediateId: any): void; - -declare var require: { - (id: string): any; - resolve(id: string): string; - cache: any; - extensions: any; - main: any; -}; - -declare var module: { - exports: any; - require(id: string): any; - id: string; - filename: string; - loaded: boolean; - parent: any; - children: any[]; -}; - -// Same as module.exports -declare var exports: any; -declare var SlowBuffer: { - new (str: string, encoding?: string): Buffer; - new (size: number): Buffer; - new (size: Uint8Array): Buffer; - new (array: any[]): Buffer; - prototype: Buffer; - isBuffer(obj: any): boolean; - byteLength(string: string, encoding?: string): number; - concat(list: Buffer[], totalLength?: number): Buffer; -}; - - -// Buffer class -interface Buffer extends NodeBuffer { } -declare var Buffer: { - new (str: string, encoding?: string): Buffer; - new (size: number): Buffer; - new (size: Uint8Array): Buffer; - new (array: any[]): Buffer; - prototype: Buffer; - isBuffer(obj: any): boolean; - byteLength(string: string, encoding?: string): number; - concat(list: Buffer[], totalLength?: number): Buffer; -}; - -/************************************************ -* * -* GLOBAL INTERFACES * -* * -************************************************/ -declare module NodeJS -{ - export interface ErrnoException extends Error - { - errno?: any; - code?: string; - path?: string; - syscall?: string; - } - - export interface EventEmitter - { - addListener(event: string, listener: Function): EventEmitter; - on(event: string, listener: Function): EventEmitter; - once(event: string, listener: Function): EventEmitter; - removeListener(event: string, listener: Function): EventEmitter; - removeAllListeners(event?: string): EventEmitter; - setMaxListeners(n: number): void; - listeners(event: string): Function[]; - emit(event: string, ...args: any[]): boolean; - } - - export interface ReadableStream extends EventEmitter - { - readable: boolean; - read(size?: number): any; - setEncoding(encoding: string): void; - pause(): void; - resume(): void; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: string): void; - unshift(chunk: Buffer): void; - wrap(oldStream: ReadableStream): ReadableStream; - } - - export interface WritableStream extends EventEmitter - { - writable: boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } - - export interface ReadWriteStream extends ReadableStream, WritableStream { } - - export interface Process extends EventEmitter - { - stdout: WritableStream; - stderr: WritableStream; - stdin: ReadableStream; - argv: string[]; - execPath: string; - abort(): void; - chdir(directory: string): void; - cwd(): string; - env: any; - exit(code?: number): void; - getgid(): number; - setgid(id: number): void; - setgid(id: string): void; - getuid(): number; - setuid(id: number): void; - setuid(id: string): void; - version: string; - versions: { - http_parser: string; - node: string; - v8: string; - ares: string; - uv: string; - zlib: string; - openssl: string; - }; - config: { - target_defaults: { - cflags: any[]; - default_configuration: string; - defines: string[]; - include_dirs: string[]; - libraries: string[]; - }; - variables: { - clang: number; - host_arch: string; - node_install_npm: boolean; - node_install_waf: boolean; - node_prefix: string; - node_shared_openssl: boolean; - node_shared_v8: boolean; - node_shared_zlib: boolean; - node_use_dtrace: boolean; - node_use_etw: boolean; - node_use_openssl: boolean; - target_arch: string; - v8_no_strict_aliasing: number; - v8_use_snapshot: boolean; - visibility: string; - }; - }; - kill(pid: number, signal?: string): void; - pid: number; - title: string; - arch: string; - platform: string; - memoryUsage(): { rss: number; heapTotal: number; heapUsed: number; }; - nextTick(callback: Function): void; - umask(mask?: number): number; - uptime(): number; - hrtime(time?: number[]): number[]; - - // Worker - send?(message: any, sendHandle?: any): void; - } - - export interface Timer - { - ref(): void; - unref(): void; - } -} - -/** - * @deprecated - */ -interface NodeBuffer -{ - [index: number]: number; - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): any; - length: number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - readUInt8(offset: number, noAsset?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - 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; -} - -/************************************************ -* * -* MODULES * -* * -************************************************/ -declare module "buffer" { - export var INSPECT_MAX_BYTES: number; -} - -declare module "querystring" { - export function stringify(obj: any, sep?: string, eq?: string): string; - export function parse(str: string, sep?: string, eq?: string, options?: { maxKeys?: number; }): any; - export function escape(str: string): string; - export function unescape(str: string): string; -} - -declare module "events" { - export class EventEmitter implements NodeJS.EventEmitter - { - static listenerCount(emitter: EventEmitter, event: string): number; - - addListener(event: string, listener: Function): EventEmitter; - on(event: string, listener: Function): EventEmitter; - once(event: string, listener: Function): EventEmitter; - removeListener(event: string, listener: Function): EventEmitter; - removeAllListeners(event?: string): EventEmitter; - setMaxListeners(n: number): void; - listeners(event: string): Function[]; - emit(event: string, ...args: any[]): boolean; - } -} - -declare module "http" { - import events = require("events"); - import net = require("net"); - import stream = require("stream"); - - export interface Server extends events.EventEmitter - { - listen(port: number, hostname?: string, backlog?: number, callback?: Function): Server; - listen(path: string, callback?: Function): Server; - listen(handle: any, listeningListener?: Function): Server; - close(cb?: any): Server; - address(): { port: number; family: string; address: string; }; - maxHeadersCount: number; - } - export interface ServerRequest extends events.EventEmitter, stream.Readable - { - method: string; - url: string; - headers: any; - trailers: string; - httpVersion: string; - setEncoding(encoding?: string): void; - pause(): void; - resume(): void; - connection: net.Socket; - } - export interface ServerResponse extends events.EventEmitter, stream.Writable - { - // Extended base methods - write(buffer: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - - writeContinue(): void; - writeHead(statusCode: number, reasonPhrase?: string, headers?: any): void; - writeHead(statusCode: number, headers?: any): void; - statusCode: number; - setHeader(name: string, value: string): void; - sendDate: boolean; - getHeader(name: string): string; - removeHeader(name: string): void; - write(chunk: any, encoding?: string): any; - addTrailers(headers: any): void; - - // Extended base methods - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): void; - } - export interface ClientRequest extends events.EventEmitter, stream.Writable - { - // Extended base methods - write(buffer: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - - write(chunk: any, encoding?: string): void; - abort(): void; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; - - // Extended base methods - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): void; - } - export interface ClientResponse extends events.EventEmitter, stream.Readable - { - statusCode: number; - httpVersion: string; - headers: any; - trailers: any; - setEncoding(encoding?: string): void; - pause(): void; - resume(): void; - } - - export interface AgentOptions - { - /** - * Keep sockets around in a pool to be used by other requests in the future. Default = false - */ - keepAlive?: boolean; - /** - * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. - * Only relevant if keepAlive is set to true. - */ - keepAliveMsecs?: number; - /** - * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity - */ - maxSockets?: number; - /** - * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. - */ - maxFreeSockets?: number; - } - - export class Agent - { - maxSockets: number; - sockets: any; - requests: any; - - constructor(opts?: AgentOptions); - - /** - * Destroy any sockets that are currently in use by the agent. - * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, - * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, - * sockets may hang open for quite a long time before the server terminates them. - */ - destroy(): void; - } - - export var STATUS_CODES: { - [errorCode: number]: string; - [errorCode: string]: string; - }; - export function createServer(requestListener?: (request: ServerRequest, response: ServerResponse) => void): Server; - export function createClient(port?: number, host?: string): any; - export function request(options: any, callback?: Function): ClientRequest; - export function get(options: any, callback?: Function): ClientRequest; - export var globalAgent: Agent; -} - -declare module "cluster" { - import child = require("child_process"); - import events = require("events"); - - export interface ClusterSettings - { - exec?: string; - args?: string[]; - silent?: boolean; - } - - export class Worker extends events.EventEmitter - { - id: string; - process: child.ChildProcess; - suicide: boolean; - send(message: any, sendHandle?: any): void; - kill(signal?: string): void; - destroy(signal?: string): void; - disconnect(): void; - } - - export var settings: ClusterSettings; - export var isMaster: boolean; - export var isWorker: boolean; - export function setupMaster(settings?: ClusterSettings): void; - export function fork(env?: any): Worker; - export function disconnect(callback?: Function): void; - export var worker: Worker; - export var workers: Worker[]; - - // Event emitter - export function addListener(event: string, listener: Function): void; - export function on(event: string, listener: Function): any; - export function once(event: string, listener: Function): void; - export function removeListener(event: string, listener: Function): void; - export function removeAllListeners(event?: string): void; - export function setMaxListeners(n: number): void; - export function listeners(event: string): Function[]; - export function emit(event: string, ...args: any[]): boolean; -} - -declare module "zlib" { - import stream = require("stream"); - export interface ZlibOptions { chunkSize?: number; windowBits?: number; level?: number; memLevel?: number; strategy?: number; dictionary?: any; } - - export interface Gzip extends stream.Transform { } - export interface Gunzip extends stream.Transform { } - export interface Deflate extends stream.Transform { } - export interface Inflate extends stream.Transform { } - export interface DeflateRaw extends stream.Transform { } - export interface InflateRaw extends stream.Transform { } - export interface Unzip extends stream.Transform { } - - export function createGzip(options?: ZlibOptions): Gzip; - export function createGunzip(options?: ZlibOptions): Gunzip; - export function createDeflate(options?: ZlibOptions): Deflate; - export function createInflate(options?: ZlibOptions): Inflate; - export function createDeflateRaw(options?: ZlibOptions): DeflateRaw; - export function createInflateRaw(options?: ZlibOptions): InflateRaw; - export function createUnzip(options?: ZlibOptions): Unzip; - - export function deflate(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function deflateRaw(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function gzip(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function gunzip(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function inflate(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function inflateRaw(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function unzip(buf: Buffer, callback: (error: Error, result: any) => void): void; - - // Constants - export var Z_NO_FLUSH: number; - export var Z_PARTIAL_FLUSH: number; - export var Z_SYNC_FLUSH: number; - export var Z_FULL_FLUSH: number; - export var Z_FINISH: number; - export var Z_BLOCK: number; - export var Z_TREES: number; - export var Z_OK: number; - export var Z_STREAM_END: number; - export var Z_NEED_DICT: number; - export var Z_ERRNO: number; - export var Z_STREAM_ERROR: number; - export var Z_DATA_ERROR: number; - export var Z_MEM_ERROR: number; - export var Z_BUF_ERROR: number; - export var Z_VERSION_ERROR: number; - export var Z_NO_COMPRESSION: number; - export var Z_BEST_SPEED: number; - export var Z_BEST_COMPRESSION: number; - export var Z_DEFAULT_COMPRESSION: number; - export var Z_FILTERED: number; - export var Z_HUFFMAN_ONLY: number; - export var Z_RLE: number; - export var Z_FIXED: number; - export var Z_DEFAULT_STRATEGY: number; - export var Z_BINARY: number; - export var Z_TEXT: number; - export var Z_ASCII: number; - export var Z_UNKNOWN: number; - export var Z_DEFLATED: number; - export var Z_NULL: number; -} - -declare module "os" { - export function tmpdir(): string; - export function hostname(): string; - export function type(): string; - export function platform(): string; - export function arch(): string; - export function release(): string; - export function uptime(): number; - export function loadavg(): number[]; - export function totalmem(): number; - export function freemem(): number; - export function cpus(): { model: string; speed: number; times: { user: number; nice: number; sys: number; idle: number; irq: number; }; }[]; - export function networkInterfaces(): any; - export var EOL: string; -} - -declare module "https" { - import tls = require("tls"); - import events = require("events"); - import http = require("http"); - - export interface ServerOptions - { - pfx?: any; - key?: any; - passphrase?: string; - cert?: any; - ca?: any; - crl?: any; - ciphers?: string; - honorCipherOrder?: boolean; - requestCert?: boolean; - rejectUnauthorized?: boolean; - NPNProtocols?: any; - SNICallback?: (servername: string) => any; - } - - export interface RequestOptions - { - host?: string; - hostname?: string; - port?: number; - path?: string; - method?: string; - headers?: any; - auth?: string; - agent?: any; - pfx?: any; - key?: any; - passphrase?: string; - cert?: any; - ca?: any; - ciphers?: string; - rejectUnauthorized?: boolean; - } - - export interface Agent - { - maxSockets: number; - sockets: any; - requests: any; - } - export var Agent: { - new (options?: RequestOptions): Agent; - }; - export interface Server extends tls.Server { } - export function createServer(options: ServerOptions, requestListener?: Function): Server; - export function request(options: RequestOptions, callback?: (res: http.ClientResponse) => void): http.ClientRequest; - export function get(options: RequestOptions, callback?: (res: http.ClientResponse) => void): http.ClientRequest; - export var globalAgent: Agent; -} - -declare module "punycode" { - export function decode(string: string): string; - export function encode(string: string): string; - export function toUnicode(domain: string): string; - export function toASCII(domain: string): string; - export var ucs2: ucs2; - interface ucs2 - { - decode(string: string): string; - encode(codePoints: number[]): string; - } - export var version: any; -} - -declare module "repl" { - import stream = require("stream"); - import events = require("events"); - - export interface ReplOptions - { - prompt?: string; - input?: NodeJS.ReadableStream; - output?: NodeJS.WritableStream; - terminal?: boolean; - eval?: Function; - useColors?: boolean; - useGlobal?: boolean; - ignoreUndefined?: boolean; - writer?: Function; - } - export function start(options: ReplOptions): events.EventEmitter; -} - -declare module "readline" { - import events = require("events"); - import stream = require("stream"); - - export interface ReadLine extends events.EventEmitter - { - setPrompt(prompt: string, length: number): void; - prompt(preserveCursor?: boolean): void; - question(query: string, callback: Function): void; - pause(): void; - resume(): void; - close(): void; - write(data: any, key?: any): void; - } - export interface ReadLineOptions - { - input: NodeJS.ReadableStream; - output: NodeJS.WritableStream; - completer?: Function; - terminal?: boolean; - } - export function createInterface(options: ReadLineOptions): ReadLine; -} - -declare module "vm" { - export interface Context { } - export interface Script - { - runInThisContext(): void; - runInNewContext(sandbox?: Context): void; - } - export function runInThisContext(code: string, filename?: string): void; - export function runInNewContext(code: string, sandbox?: Context, filename?: string): void; - export function runInContext(code: string, context: Context, filename?: string): void; - export function createContext(initSandbox?: Context): Context; - export function createScript(code: string, filename?: string): Script; -} - -declare module "child_process" { - import events = require("events"); - import stream = require("stream"); - - export interface ChildProcess extends events.EventEmitter - { - stdin: stream.Writable; - stdout: stream.Readable; - stderr: stream.Readable; - pid: number; - kill(signal?: string): void; - send(message: any, sendHandle?: any): void; - disconnect(): void; - } - - export function spawn(command: string, args?: string[], options?: { - cwd?: string; - stdio?: any; - custom?: any; - env?: any; - detached?: boolean; - }): ChildProcess; - export function exec(command: string, options: { - cwd?: string; - stdio?: any; - customFds?: any; - env?: any; - encoding?: string; - timeout?: number; - maxBuffer?: number; - killSignal?: string; - }, callback: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function exec(command: string, callback: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function execFile(file: string, - callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function execFile(file: string, args?: string[], - callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function execFile(file: string, args?: string[], options?: { - cwd?: string; - stdio?: any; - customFds?: any; - env?: any; - encoding?: string; - timeout?: number; - maxBuffer?: string; - killSignal?: string; - }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function fork(modulePath: string, args?: string[], options?: { - cwd?: string; - env?: any; - encoding?: string; - }): ChildProcess; - export function execSync(command: string, options?: { - cwd?: string; - input?: string|Buffer; - stdio?: any; - env?: any; - uid?: number; - gid?: number; - timeout?: number; - maxBuffer?: number; - killSignal?: string; - encoding?: string; - }): ChildProcess; -} - -declare module "url" { - export interface Url - { - href: string; - protocol: string; - auth: string; - hostname: string; - port: string; - host: string; - pathname: string; - search: string; - query: any; // string | Object - slashes: boolean; - hash?: string; - path?: string; - } - - export interface UrlOptions - { - protocol?: string; - auth?: string; - hostname?: string; - port?: string; - host?: string; - pathname?: string; - search?: string; - query?: any; - hash?: string; - path?: string; - } - - export function parse(urlStr: string, parseQueryString?: boolean, slashesDenoteHost?: boolean): Url; - export function format(url: UrlOptions): string; - export function resolve(from: string, to: string): string; -} - -declare module "dns" { - export function lookup(domain: string, family: number, callback: (err: Error, address: string, family: number) => void): string; - export function lookup(domain: string, callback: (err: Error, address: string, family: number) => void): string; - export function resolve(domain: string, rrtype: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolve(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolve4(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolve6(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveMx(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveTxt(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveSrv(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveNs(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveCname(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function reverse(ip: string, callback: (err: Error, domains: string[]) => void): string[]; -} - -declare module "net" { - import stream = require("stream"); - - export interface Socket extends stream.Duplex - { - // Extended base methods - write(buffer: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - - connect(port: number, host?: string, connectionListener?: Function): void; - connect(path: string, connectionListener?: Function): void; - bufferSize: number; - setEncoding(encoding?: string): void; - write(data: any, encoding?: string, callback?: Function): void; - destroy(): void; - pause(): void; - resume(): void; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setKeepAlive(enable?: boolean, initialDelay?: number): void; - address(): { port: number; family: string; address: string; }; - unref(): void; - ref(): void; - - remoteAddress: string; - remotePort: number; - bytesRead: number; - bytesWritten: number; - - // Extended base methods - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): void; - } - - export var Socket: { - new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket; - }; - - export interface Server extends Socket - { - listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server; - listen(path: string, listeningListener?: Function): Server; - listen(handle: any, listeningListener?: Function): Server; - close(callback?: Function): Server; - address(): { port: number; family: string; address: string; }; - maxConnections: number; - connections: number; - } - export function createServer(connectionListener?: (socket: Socket) => void): Server; - export function createServer(options?: { allowHalfOpen?: boolean; }, connectionListener?: (socket: Socket) => void): Server; - export function connect(options: { allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; - export function connect(port: number, host?: string, connectionListener?: Function): Socket; - export function connect(path: string, connectionListener?: Function): Socket; - export function createConnection(options: { allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; - export function createConnection(port: number, host?: string, connectionListener?: Function): Socket; - export function createConnection(path: string, connectionListener?: Function): Socket; - export function isIP(input: string): number; - export function isIPv4(input: string): boolean; - export function isIPv6(input: string): boolean; -} - -declare module "dgram" { - import events = require("events"); - - interface RemoteInfo - { - address: string; - port: number; - size: number; - } - - interface AddressInfo - { - address: string; - family: string; - port: number; - } - - export function createSocket(type: string, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - - interface Socket extends events.EventEmitter - { - send(buf: Buffer, offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void; - bind(port: number, address?: string, callback?: () => void): void; - close(): void; - address(): AddressInfo; - setBroadcast(flag: boolean): void; - setMulticastTTL(ttl: number): void; - setMulticastLoopback(flag: boolean): void; - addMembership(multicastAddress: string, multicastInterface?: string): void; - dropMembership(multicastAddress: string, multicastInterface?: string): void; - } -} - -declare module "fs" { - import stream = require("stream"); - import events = require("events"); - - interface Stats - { - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - dev: number; - ino: number; - mode: number; - nlink: number; - uid: number; - gid: number; - rdev: number; - size: number; - blksize: number; - blocks: number; - atime: Date; - mtime: Date; - ctime: Date; - } - - interface FSWatcher extends events.EventEmitter - { - close(): void; - } - - export interface ReadStream extends stream.Readable - { - close(): void; - } - export interface WriteStream extends stream.Writable - { - close(): void; - } - - export function rename(oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function renameSync(oldPath: string, newPath: string): void; - export function truncate(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function truncate(path: string, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function truncateSync(path: string, len?: number): void; - export function ftruncate(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function ftruncate(fd: number, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function ftruncateSync(fd: number, len?: number): void; - export function chown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chownSync(path: string, uid: number, gid: number): void; - export function fchown(fd: number, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fchownSync(fd: number, uid: number, gid: number): void; - export function lchown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchownSync(path: string, uid: number, gid: number): void; - export function chmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chmodSync(path: string, mode: number): void; - export function chmodSync(path: string, mode: string): void; - export function fchmod(fd: number, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fchmod(fd: number, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fchmodSync(fd: number, mode: number): void; - export function fchmodSync(fd: number, mode: string): void; - export function lchmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchmodSync(path: string, mode: number): void; - export function lchmodSync(path: string, mode: string): void; - export function stat(path: string, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function lstat(path: string, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function fstat(fd: number, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function statSync(path: string): Stats; - export function lstatSync(path: string): Stats; - export function fstatSync(fd: number): Stats; - export function link(srcpath: string, dstpath: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function linkSync(srcpath: string, dstpath: string): void; - export function symlink(srcpath: string, dstpath: string, type?: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function symlinkSync(srcpath: string, dstpath: string, type?: string): void; - export function readlink(path: string, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void; - export function readlinkSync(path: string): string; - export function realpath(path: string, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; - export function realpath(path: string, cache: { [path: string]: string }, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; - export function realpathSync(path: string, cache?: { [path: string]: string }): string; - export function unlink(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function unlinkSync(path: string): void; - export function rmdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function rmdirSync(path: string): void; - export function mkdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function mkdir(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function mkdir(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function mkdirSync(path: string, mode?: number): void; - export function mkdirSync(path: string, mode?: string): void; - export function readdir(path: string, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void; - export function readdirSync(path: string): string[]; - export function close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function closeSync(fd: number): void; - export function open(path: string, flags: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; - export function open(path: string, flags: string, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; - export function open(path: string, flags: string, mode: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; - export function openSync(path: string, flags: string, mode?: number): number; - export function openSync(path: string, flags: string, mode?: string): number; - export function utimes(path: string, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function utimes(path: string, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function utimesSync(path: string, atime: number, mtime: number): void; - export function utimesSync(path: string, atime: Date, mtime: Date): void; - export function futimes(fd: number, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function futimesSync(fd: number, atime: number, mtime: number): void; - export function futimesSync(fd: number, atime: Date, mtime: Date): void; - export function fsync(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fsyncSync(fd: number): void; - export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; - export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; - export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void; - export function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; - export function readFile(filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void; - export function readFile(filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void): void; - export function readFile(filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; - export function readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; - export function readFileSync(filename: string, encoding: string): string; - export function readFileSync(filename: string, options: { encoding: string; flag?: string; }): string; - export function readFileSync(filename: string, options?: { flag?: string; }): Buffer; - export function writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; - export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void; - export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void; - export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; - export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void; - export function watchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): void; - export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: Stats, prev: Stats) => void): void; - export function unwatchFile(filename: string, listener?: (curr: Stats, prev: Stats) => void): void; - export function watch(filename: string, listener?: (event: string, filename: string) => any): FSWatcher; - export function watch(filename: string, options: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): FSWatcher; - export function exists(path: string, callback?: (exists: boolean) => void): void; - export function existsSync(path: string): boolean; - export function createReadStream(path: string, options?: { - flags?: string; - encoding?: string; - fd?: string; - mode?: number; - bufferSize?: number; - }): ReadStream; - export function createReadStream(path: string, options?: { - flags?: string; - encoding?: string; - fd?: string; - mode?: string; - bufferSize?: number; - }): ReadStream; - export function createWriteStream(path: string, options?: { - flags?: string; - encoding?: string; - string?: string; - }): WriteStream; -} - -declare module "path" { - - export interface ParsedPath - { - root: string; - dir: string; - base: string; - ext: string; - name: string; - } - - export function normalize(p: string): string; - export function join(...paths: any[]): string; - export function resolve(...pathSegments: any[]): string; - export function isAbsolute(p: string): boolean; - export function relative(from: string, to: string): string; - export function dirname(p: string): string; - export function basename(p: string, ext?: string): string; - export function extname(p: string): string; - export var sep: string; - export var delimiter: string; - export function parse(p: string): ParsedPath; - export function format(pP: ParsedPath): string; -} - -declare module "string_decoder" { - export interface NodeStringDecoder - { - write(buffer: Buffer): string; - detectIncompleteChar(buffer: Buffer): number; - } - export var StringDecoder: { - new (encoding: string): NodeStringDecoder; - }; -} - -declare module "tls" { - import crypto = require("crypto"); - import net = require("net"); - import stream = require("stream"); - - var CLIENT_RENEG_LIMIT: number; - var CLIENT_RENEG_WINDOW: number; - - export interface TlsOptions - { - pfx?: any; //string or buffer - key?: any; //string or buffer - passphrase?: string; - cert?: any; - ca?: any; //string or buffer - crl?: any; //string or string array - ciphers?: string; - honorCipherOrder?: any; - requestCert?: boolean; - rejectUnauthorized?: boolean; - NPNProtocols?: any; //array or Buffer; - SNICallback?: (servername: string) => any; - } - - export interface ConnectionOptions - { - host?: string; - port?: number; - socket?: net.Socket; - pfx?: any; //string | Buffer - key?: any; //string | Buffer - passphrase?: string; - cert?: any; //string | Buffer - ca?: any; //Array of string | Buffer - rejectUnauthorized?: boolean; - NPNProtocols?: any; //Array of string | Buffer - servername?: string; - } - - export interface Server extends net.Server - { - // Extended base methods - listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server; - listen(path: string, listeningListener?: Function): Server; - listen(handle: any, listeningListener?: Function): Server; - - listen(port: number, host?: string, callback?: Function): Server; - close(): Server; - address(): { port: number; family: string; address: string; }; - addContext(hostName: string, credentials: { - key: string; - cert: string; - ca: string; - }): void; - maxConnections: number; - connections: number; - } - - export interface ClearTextStream extends stream.Duplex - { - authorized: boolean; - authorizationError: Error; - getPeerCertificate(): any; - getCipher: { - name: string; - version: string; - }; - address: { - port: number; - family: string; - address: string; - }; - remoteAddress: string; - remotePort: number; - } - - export interface SecurePair - { - encrypted: any; - cleartext: any; - } - - export function createServer(options: TlsOptions, secureConnectionListener?: (cleartextStream: ClearTextStream) => void): Server; - export function connect(options: TlsOptions, secureConnectionListener?: () => void): ClearTextStream; - export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): ClearTextStream; - export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): ClearTextStream; - export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; -} - -declare module "crypto" { - export interface CredentialDetails - { - pfx: string; - key: string; - passphrase: string; - cert: string; - ca: any; //string | string array - crl: any; //string | string array - ciphers: string; - } - export interface Credentials { context?: any; } - export function createCredentials(details: CredentialDetails): Credentials; - export function createHash(algorithm: string): Hash; - export function createHmac(algorithm: string, key: string): Hmac; - export function createHmac(algorithm: string, key: Buffer): Hmac; - interface Hash - { - update(data: any, input_encoding?: string): Hash; - digest(encoding: 'buffer'): Buffer; - digest(encoding: string): any; - digest(): Buffer; - } - interface Hmac - { - update(data: any, input_encoding?: string): Hmac; - digest(encoding: 'buffer'): Buffer; - digest(encoding: string): any; - digest(): Buffer; - } - export function createCipher(algorithm: string, password: any): Cipher; - export function createCipheriv(algorithm: string, key: any, iv: any): Cipher; - interface Cipher - { - update(data: Buffer): Buffer; - update(data: string, input_encoding?: string, output_encoding?: string): string; - final(): Buffer; - final(output_encoding: string): string; - setAutoPadding(auto_padding: boolean): void; - } - export function createDecipher(algorithm: string, password: any): Decipher; - export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher; - interface Decipher - { - update(data: Buffer): Buffer; - update(data: string, input_encoding?: string, output_encoding?: string): string; - final(): Buffer; - final(output_encoding: string): string; - setAutoPadding(auto_padding: boolean): void; - } - export function createSign(algorithm: string): Signer; - interface Signer - { - update(data: any): void; - sign(private_key: string, output_format: string): string; - } - export function createVerify(algorith: string): Verify; - interface Verify - { - update(data: any): void; - verify(object: string, signature: string, signature_format?: string): boolean; - } - export function createDiffieHellman(prime_length: number): DiffieHellman; - export function createDiffieHellman(prime: number, encoding?: string): DiffieHellman; - interface DiffieHellman - { - generateKeys(encoding?: string): string; - computeSecret(other_public_key: string, input_encoding?: string, output_encoding?: string): string; - getPrime(encoding?: string): string; - getGenerator(encoding: string): string; - getPublicKey(encoding?: string): string; - getPrivateKey(encoding?: string): string; - setPublicKey(public_key: string, encoding?: string): void; - setPrivateKey(public_key: string, encoding?: string): void; - } - export function getDiffieHellman(group_name: string): DiffieHellman; - export function pbkdf2(password: string, salt: string, iterations: number, keylen: number, callback: (err: Error, derivedKey: Buffer) => any): void; - export function pbkdf2Sync(password: string, salt: string, iterations: number, keylen: number): Buffer; - export function randomBytes(size: number): Buffer; - export function randomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; - export function pseudoRandomBytes(size: number): Buffer; - export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; -} - -declare module "stream" { - import events = require("events"); - - export interface Stream extends events.EventEmitter - { - pipe(destination: T, options?: { end?: boolean; }): T; - } - - export interface ReadableOptions - { - highWaterMark?: number; - encoding?: string; - objectMode?: boolean; - } - - export class Readable extends events.EventEmitter implements NodeJS.ReadableStream - { - readable: boolean; - constructor(opts?: ReadableOptions); - _read(size: number): void; - read(size?: number): any; - setEncoding(encoding: string): void; - pause(): void; - resume(): void; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: string): void; - unshift(chunk: Buffer): void; - wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; - push(chunk: any, encoding?: string): boolean; - } - - export interface WritableOptions - { - highWaterMark?: number; - decodeStrings?: boolean; - } - - export class Writable extends events.EventEmitter implements NodeJS.WritableStream - { - writable: boolean; - constructor(opts?: WritableOptions); - _write(data: Buffer, encoding: string, callback: Function): void; - _write(data: string, encoding: string, callback: Function): void; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } - - export interface DuplexOptions extends ReadableOptions, WritableOptions - { - allowHalfOpen?: boolean; - } - - // Note: Duplex extends both Readable and Writable. - export class Duplex extends Readable implements NodeJS.ReadWriteStream - { - writable: boolean; - constructor(opts?: DuplexOptions); - _write(data: Buffer, encoding: string, callback: Function): void; - _write(data: string, encoding: string, callback: Function): void; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } - - export interface TransformOptions extends ReadableOptions, WritableOptions { } - - // Note: Transform lacks the _read and _write methods of Readable/Writable. - export class Transform extends events.EventEmitter implements NodeJS.ReadWriteStream - { - readable: boolean; - writable: boolean; - constructor(opts?: TransformOptions); - _transform(chunk: Buffer, encoding: string, callback: Function): void; - _transform(chunk: string, encoding: string, callback: Function): void; - _flush(callback: Function): void; - read(size?: number): any; - setEncoding(encoding: string): void; - pause(): void; - resume(): void; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: string): void; - unshift(chunk: Buffer): void; - wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; - push(chunk: any, encoding?: string): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } - - export class PassThrough extends Transform { } -} - -declare module "util" { - export interface InspectOptions - { - showHidden?: boolean; - depth?: number; - colors?: boolean; - customInspect?: boolean; - } - - export function format(format: any, ...param: any[]): string; - export function debug(string: string): void; - export function error(...param: any[]): void; - export function puts(...param: any[]): void; - export function print(...param: any[]): void; - export function log(string: string): void; - export function inspect(object: any, showHidden?: boolean, depth?: number, color?: boolean): string; - export function inspect(object: any, options: InspectOptions): string; - export function isArray(object: any): boolean; - export function isRegExp(object: any): boolean; - export function isDate(object: any): boolean; - export function isError(object: any): boolean; - export function inherits(constructor: any, superConstructor: any): void; -} - -declare module "assert" { - function internal(value: any, message?: string): void; - module internal - { - export class AssertionError implements Error - { - name: string; - message: string; - actual: any; - expected: any; - operator: string; - generatedMessage: boolean; - - constructor(options?: { - message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function - }); - } - - export function fail(actual?: any, expected?: any, message?: string, operator?: string): void; - export function ok(value: any, message?: string): void; - export function equal(actual: any, expected: any, message?: string): void; - export function notEqual(actual: any, expected: any, message?: string): void; - export function deepEqual(actual: any, expected: any, message?: string): void; - export function notDeepEqual(acutal: any, expected: any, message?: string): void; - export function strictEqual(actual: any, expected: any, message?: string): void; - export function notStrictEqual(actual: any, expected: any, message?: string): void; - export var throws: { - (block: Function, message?: string): void; - (block: Function, error: Function, message?: string): void; - (block: Function, error: RegExp, message?: string): void; - (block: Function, error: (err: any) => boolean, message?: string): void; - }; - - export var doesNotThrow: { - (block: Function, message?: string): void; - (block: Function, error: Function, message?: string): void; - (block: Function, error: RegExp, message?: string): void; - (block: Function, error: (err: any) => boolean, message?: string): void; - }; - - export function ifError(value: any): void; - } - - export = internal; -} - -declare module "tty" { - import net = require("net"); - - export function isatty(fd: number): boolean; - export interface ReadStream extends net.Socket - { - isRaw: boolean; - setRawMode(mode: boolean): void; - } - export interface WriteStream extends net.Socket - { - columns: number; - rows: number; - } -} - -declare module "domain" { - import events = require("events"); - - export class Domain extends events.EventEmitter - { - run(fn: Function): void; - add(emitter: events.EventEmitter): void; - remove(emitter: events.EventEmitter): void; - bind(cb: (err: Error, data: any) => any): any; - intercept(cb: (data: any) => any): any; - dispose(): void; - - addListener(event: string, listener: Function): Domain; - on(event: string, listener: Function): Domain; - once(event: string, listener: Function): Domain; - removeListener(event: string, listener: Function): Domain; - removeAllListeners(event?: string): Domain; - } - - export function create(): Domain; -} \ No newline at end of file diff --git a/admin/lib/definitions/required/recaptcha.d.ts b/admin/lib/definitions/required/recaptcha.d.ts deleted file mode 100644 index 445aa0f2..00000000 --- a/admin/lib/definitions/required/recaptcha.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Type definitions for Google Recaptcha -// Project: https://www.google.com/recaptcha -// Definitions by: Brent Jenkins -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare class Recaptcha -{ - constructor(); - static reload(): void; - static switch_type(newtype: string): void; - static showhelp(): void; - static get_challenge(): string; - static get_response(): string; - static focus_response_field(): void; - static create(public_key: string, element: string, options: RecaptchaOptions): void; - static destroy(): void; -} - -interface RecaptchaOptions -{ - tabindex?: number; - theme?: string; - callback?: Function; - lang?: string; - custom_theme_widget?: string; - custom_translations?: CustomTranslations; -} - -interface CustomTranslations -{ - visual_challenge?: string; - audio_challenge?: string; - refresh_btn?: string; - instructions_visual?: string; - instructions_audio?: string; - help_btn?: string; - play_again?: string; - cant_hear_this?: string; - incorrect_try_again?: string; - image_alt_text?: string; - privacy_and_terms?: string; -} \ No newline at end of file diff --git a/admin/lib/definitions/required/webinate-users.d.ts b/admin/lib/definitions/required/webinate-users.d.ts deleted file mode 100644 index 9d42f471..00000000 --- a/admin/lib/definitions/required/webinate-users.d.ts +++ /dev/null @@ -1,587 +0,0 @@ -declare module UsersInterface -{ - export class User - { - dbEntry: IUserEntry; - } - - /* - * Describes the different types of event interfaces we can use to interact with the system via web sockets - */ - export module SocketEvents - { - /* - * The base interface for all socket events - */ - export interface IEvent - { - eventType: number; - - /* - * Will be null if no error, or a string if there is - */ - error: string; - } - - /* - * A very simple echo event. This simply pings the server with a message, which then returns with the same message - * either to the client or, if broadcast is true, to all clients. - */ - export interface IEchoEvent extends IEvent - { - message: string; - broadcast?: boolean; - } - - /* - * Describes a get/set Meta request, which can fetch or set meta data for a given user - * if you provide a property value, then only that specific meta property is edited. - * If not provided, then the entire meta data is set. - */ - export interface IMetaEvent extends IEvent - { - username?: string; - property: string; - val: any; - } - - /* - * The socket user event - */ - export interface IUserEvent extends IEvent - { - username: string; - } - - /* - * Interface for file added events - */ - export interface IFileAddedEvent extends IEvent - { - username: string; - file: IFileEntry; - } - - /* - * Interface for file removed events - */ - export interface IFileRemovedEvent extends IEvent - { - file: IFileEntry; - } - - /* - * Interface for a bucket being added - */ - export interface IBucketAddedEvent extends IEvent - { - username: string; - bucket: IBucketEntry - } - - /* - * Interface for a bucket being removed - */ - export interface IBucketRemovedEvent extends IEvent - { - bucket: IBucketEntry - } - } - - /* - * An interface to describe the data stored in the database for users - */ - export interface IUserEntry - { - _id?: any; - username?: string; - email?: string; - password?: string; - registerKey?: string; - sessionId?: string; - createdOn?: number; - lastLoggedIn?: number; - privileges?: number; - passwordTag?: string; - meta?: any; - } - - /** - * The interface for describing each user's bucket - */ - export interface IBucketEntry - { - _id?:any; - name?: string; - identifier?: string; - user?: string; - created?: number; - memoryUsed?: number; - meta?: any; - } - - /** - * The interface for describing each user's bucket - */ - export interface IStorageStats - { - user?: string; - memoryUsed?: number; - memoryAllocated?: number; - apiCallsUsed?: number; - apiCallsAllocated?: number; - } - - /** - * The interface for describing each user's file - */ - export interface IFileEntry - { - _id?: any; - name?: string; - user?: string; - identifier?: string; - bucketId?: string; - bucketName?: string; - publicURL?: string; - created?: number; - size?: number; - mimeType?: string; - isPublic?: boolean; - numDownloads?: number; - parentFile?: string; - meta?: any; - } - - /** - * Adds a logged in user to the request object - */ - export interface AuthRequest extends Express.Request - { - _user: User; - _target: User; - params: any; - body: any; - query: any; - } - - /* - * An interface to describe the data stored in the database from the sessions - */ - export interface ISessionEntry - { - _id: any; - sessionId: string; - data: any; - expiration: number; - } - - /* - * Users stores data on an external cloud bucket with Google - */ - export interface IWebsocket - { - /** - * The port number to use for web socket communication. You can use this port to send and receive events or messages - * to the server. - * e.g. 8080 - */ - port: number; - - - /** - * An array of safe origins for socket communication - * [ - * "webinate.net", - * "localhost" - * ] - */ - approvedSocketDomains: Array; - } - - /* - * Users stores data on an external cloud bucket with Google - */ - export interface IGoogleProperties - { - /* - * Path to the key file - */ - keyFile: string; - - /* - * Mail settings - */ - mail: { - - /* - * The email account to use the gmail API through. This account must be authorized to - * use this application. See: https://admin.google.com/AdminHome?fral=1#SecuritySettings: - */ - apiEmail: string; - - /* - * The email to use as the from field when sending mail. This can be different from the apiEmail. - */ - from: string; - }; - - /* - * Describes the bucket details - */ - bucket : { - - /* - * Project ID - */ - projectId: string; - - /** - * The name of the mongodb collection for storing bucket details - * eg: "buckets" - */ - bucketsCollection: string; - - /** - * The name of the mongodb collection for storing file details - * eg: "files" - */ - filesCollection: string; - - /** - * The name of the mongodb collection for storing user stats - * eg: "storageAPI" - */ - statsCollection: string; - - /** - * The length of time the assets should be cached on a user's browser. - * eg: 2592000000 or 30 days - */ - cacheLifetime: number; - } - } - - /* - * The default response format - */ - export interface IResponse - { - message: string; - error: boolean; - } - - /* - * A GET request that returns the status of a user's authentication - */ - export interface IAuthenticationResponse extends IResponse - { - authenticated: boolean; - user?: IUserEntry; - } - - /* - * Token used to describe how the upload went - */ - export interface IUploadToken - { - file: string; - field: string; - filename: string; - error: boolean; - errorMsg: string; - url: string; - } - - /* - * A POST request that returns the details of a text upload - */ - export interface IUploadTextResponse extends IResponse - { - token: IUploadToken; - } - - /* - * A POST request that returns the details of a binary upload - */ - export interface IUploadBinaryResponse extends IResponse - { - token: IUploadToken; - } - - /* - * A POST request that returns the details of a multipart form upload - */ - export interface IUploadResponse extends IResponse - { - tokens: Array - } - - /* - * A GET request that returns an array of data items - */ - export interface IGetArrayResponse extends IResponse - { - data: Array; - count: number; - } - - /* - * A GET request that returns a single data item - */ - export interface IGetResponse extends IResponse - { - data: T; - } - - /* - * The token used for logging in - */ - export interface ILoginToken - { - username: string; - password: string; - rememberMe: boolean; - } - - /* - * The token used for registration - */ - export interface IRegisterToken - { - username: string; - password: string; - email: string; - captcha?: string; - challenge?: string; - meta?: any; - privileges?: number; - } - - /* - * Represents the details of the admin user - */ - export interface IAdminUser - { - username: string; - email: string; - password: string; - } - - /* - * Options for configuring the API - */ - export interface IConfig - { - /** - * If true, then the server runs in debug mode. When running tests you should have the application - * run in debug mode. You can set this via the config or else use the --debug=true command in the console. - * eg: true / false. The default is true. - */ - debugMode: boolean; - - /** - * The host to use when listening - * eg: "localhost" or "192.168.0.1" or "0.0.0.0" - */ - host: string; - - /** - * The domain or host name of the site. This is the external URL to use for connecting to users. - * eg: "webinate.net" - */ - hostName: string; - - /** - * The RESTful path of this service. - * eg: If "/api", then the API url would be 127.0.0.1:80/api (or rather host:port/api) - */ - apiPrefix: string; - - /** - * The URL to redirect to after the user attempts to activate their account. - * User's can activate their account via the "/activate-account" URL, and after its validation the server will redirect to this URL - * adding a query ?message=You%20have%20activated%20your%20account&status=success. - * The status can be either 'success' or 'error' - * - * eg: "http://localhost/notify-user" - */ - accountRedirectURL: string; - - /** - * The URL sent to users emails for when their password is reset. This URL should - * resolve to a page with a form that allows users to reset their password. (MORE TO COME ON THIS) - * - * eg: "http://localhost/reset-password" - */ - passwordResetURL: string; - - /** - * An array of approved domains that can access this API. - * e.g. ["webinate\\.net", "127.0.0.1:80", "http:\/\/127.0.0.1"] etc... - */ - approvedDomains: Array; - - /** - * The port number to use for regular HTTP requests. - * e.g. 80 - */ - portHTTP: number; - - /** - * The port number to use for SSL requests - * e.g. 443 - */ - portHTTPS: number; - - /** - * Information regarding the websocket communication. Used for events and IPC - */ - websocket: IWebsocket; - - /** - * The name of the mongo database name - */ - databaseName: string; - - /** - * The name of the mongodb collection for storing user details - * eg: "users" - */ - userCollection: string; - - /** - * The name of the mongodb collection for storing session details - * eg: "sessions" - */ - sessionCollection: string; - - /** - * The host the DB is listening on - * e.g. "127.0.0.1" - */ - databaseHost: string; - - /** - * The port number mongodb is listening on - * e.g. 27017 - */ - databasePort: number; - - /** - * If true, the API will try to secure its communications - * e.g. false/true - */ - ssl: boolean; - - /** - * The path to the SSL private key - */ - sslKey: string; - - /** - * The path to the SSL certificate authority root file - */ - sslRoot: string; - - /** - * The path to the SSL certificate authority intermediate file - */ - sslIntermediate: string; - - /** - * The path to the SSL certificate file path - */ - sslCert: string; - - /** - * The SSL pass phrase (if in use) - */ - sslPassPhrase: string; - - /* - * If set, the session will be restricted to URLs underneath the given path. - * By default the path is "/", which means that the same sessions will be shared across the entire domain. - * e.g: "/" - */ - sessionPath?: string; - - /** - * If present, the cookie (and hence the session) will apply to the given domain, including any subdomains. - * For example, on a request from foo.example.org, if the domain is set to '.example.org', then this session will persist across any subdomain of example.org. - * By default, the domain is not set, and the session will only be visible to other requests that exactly match the domain. - * Default is blank "" - */ - sessionDomain?: string; - - /** - * A persistent connection is one that will last after the user closes the window and visits the site again (true). - * A non-persistent that will forget the user once the window is closed (false) - * e.g: true/false. Default is true - */ - sessionPersistent?: boolean; - - /** - * The default length of user sessions in seconds - * e.g 1800 - */ - sessionLifetime?: number; - - /** - * The private key to use for Google captcha - * Get your key from the captcha admin: https://www.google.com/recaptcha/intro/index.html - */ - captchaPrivateKey: string; - - /** - * The public key to use for Google captcha - * Get your key from the captcha admin: https://www.google.com/recaptcha/intro/index.html - */ - captchaPublicKey: string; - - /** - * The administrative user. This is the root user that will have access to the information in the database. - * This can be anything you like, but try to use passwords that are hard to guess - * eg: - - "adminUser": { - "username": "root", - "email": "root_email@host.com", - "password": "CHANGE_THIS_PASSWORD" - } - */ - adminUser: IAdminUser; - - /** - * Information relating to the Google storage platform - * - "google": { - "keyFile": "", - "mail":{ - "apiEmail": "", - "from": "" - }, - "bucket": { - "projectId": "", - "bucketsCollection": "buckets", - "filesCollection": "files" - } - } - */ - google: IGoogleProperties; - } - - export interface IGetUser extends IGetResponse { } - export interface IGetUserStorageData extends IGetResponse { } - export interface IGetUsers extends IGetArrayResponse { count: number; } - export interface IGetSessions extends IGetArrayResponse { } - export interface IGetBuckets extends IGetArrayResponse { } - export interface IGetFile extends IGetResponse { } - export interface IGetFiles extends IGetArrayResponse { } - export interface IRemoveFiles extends IGetArrayResponse { } -} - -declare module "webinate-users" -{ - export = UsersInterface; -} \ No newline at end of file diff --git a/admin/lib/directives/buttons/buttons.ts b/admin/lib/directives/buttons/buttons.ts deleted file mode 100644 index a3983dd8..00000000 --- a/admin/lib/directives/buttons/buttons.ts +++ /dev/null @@ -1,125 +0,0 @@ -module clientAdmin -{ - /** - * Creates a blue add button - */ - export class SimpleButton implements ng.IDirective - { - restrict = 'E'; - template = ''; - scope = { - text: '=', - noIcon: '=?' - } - - constructor(color : string = `blue`, template? : string ) - { - this.template = template || `
{{text}}
`; - } - - link (scope, elem: JQuery, attributes: angular.IAttributes, ngModel: angular.INgModelController) - { - scope.noIcon = scope.noIcon || false; - } - - /** - * Creates an intance of the directive - */ - static factory(): ng.IDirectiveFactory - { - var directive = () => new SimpleButton(); - return directive; - } - } - - /** - * Creates a blue add button - */ - export class AddButton extends SimpleButton - { - constructor() - { - super(); - } - - /** - * Creates an intance of the directive - */ - static factory(): ng.IDirectiveFactory - { - var directive = () => new AddButton(); - return directive; - } - } - - /** - * Creates a red remove button - */ - export class RemoveButton extends SimpleButton - { - constructor() - { - super('red'); - } - - /** - * Creates an intance of the directive - */ - static factory(): ng.IDirectiveFactory - { - var directive = () => new RemoveButton(); - return directive; - } - } - - /** - * Creates a green approve button - */ - export class ApproveButton extends SimpleButton - { - constructor() - { - super('green') - } - - /** - * Creates an intance of the directive - */ - static factory(): ng.IDirectiveFactory - { - var directive = () => new ApproveButton(); - return directive; - } - } - - /** - * Creates a blue button that toggles from an expanded to contracted state (+ -) - */ - export class ToggleButton implements ng.IDirective - { - restrict = 'E'; - template = '
{{text}}
'; - scope = { - text: '=', - expanded: '=?' - } - - constructor() - { - } - - link (scope, elem: JQuery, attributes: angular.IAttributes, ngModel: angular.INgModelController) - { - scope.expanded = scope.expanded || false; - } - - /** - * Creates an intance of the directive - */ - static factory(): ng.IDirectiveFactory - { - var directive = () => new ToggleButton(); - return directive; - } - } -} \ No newline at end of file diff --git a/admin/lib/directives/buttons/style.scss b/admin/lib/directives/buttons/style.scss deleted file mode 100644 index 1abd5e44..00000000 --- a/admin/lib/directives/buttons/style.scss +++ /dev/null @@ -1,40 +0,0 @@ -.button.blue { - color: $highlighted-text; - background: $util-background; -} -.button.blue:hover { - background: shade($util-background, 10); -} -.button.blue:active { - background: shade($util-background, 20); -} -.button.green { - color: $highlighted-text; - background: $confirm-background; -} -.button.green:hover { - background: shade($confirm-background, 10); -} -.button.green:active { - background: shade($confirm-background, 20); -} -.button.red { - color: $highlighted-text; - background: $warning-background; -} -.button.red:hover { - background: shade($warning-background, 10); -} -.button.red:active { - background: shade($warning-background, 20); -} -.button.gray { - background: $subtle-background; - border: 1px solid #D5D5D5; -} -.button.gray:hover { - background: shade($subtle-background, 10); -} -.button.gray:active { - background: shade($subtle-background, 20); -} \ No newline at end of file diff --git a/admin/lib/directives/detail/detail.ts b/admin/lib/directives/detail/detail.ts deleted file mode 100644 index 9ba44c33..00000000 --- a/admin/lib/directives/detail/detail.ts +++ /dev/null @@ -1,36 +0,0 @@ -module clientAdmin -{ - /** - * Small directive for a detail section - */ - export class Detail implements ng.IDirective - { - restrict = 'E'; - template = ` -
-
{{text}}: {{info}}
- -
-
`; - transclude = true; - scope = { - text: '=?', - info: '=?', - onRender : '&?' - } - - link( scope ) { - if (scope.onRender) - scope.onRender(); - } - - /** - * Creates an intance of the pager directive - */ - static factory(): ng.IDirectiveFactory - { - var directive = () => new Detail(); - return directive; - } - } -} \ No newline at end of file diff --git a/admin/lib/directives/detail/style.scss b/admin/lib/directives/detail/style.scss deleted file mode 100644 index b9f8cf19..00000000 --- a/admin/lib/directives/detail/style.scss +++ /dev/null @@ -1,25 +0,0 @@ -.content-view-detail { - margin:20px 10px 0px 10px; - clear:both; - float: none; - - .label { - width: 20%; - float: left; - overflow: hidden; - white-space: nowrap; - font-weight:bold; - } - - .textbox { - color: #999; - } - - .mce-tinymce { - margin:10px 0 0 0; - - &.mce-fullscreen { - margin:0 0 0 0; - } - } -} \ No newline at end of file diff --git a/admin/lib/directives/error-modal/error-modal.html b/admin/lib/directives/error-modal/error-modal.html deleted file mode 100644 index 84341e6c..00000000 --- a/admin/lib/directives/error-modal/error-modal.html +++ /dev/null @@ -1,6 +0,0 @@ -
-
-

{{message}}

-
Ok
-
-
\ No newline at end of file diff --git a/admin/lib/directives/error-modal/error-modal.ts b/admin/lib/directives/error-modal/error-modal.ts deleted file mode 100644 index 18282631..00000000 --- a/admin/lib/directives/error-modal/error-modal.ts +++ /dev/null @@ -1,28 +0,0 @@ -module clientAdmin -{ - /** - * Controller for the modal window that shows up when an error occurs - */ - export class ErrorModal implements ng.IDirective - { - restrict = 'E'; - templateUrl = 'directives/error-modal/error-modal.html'; - scope = { - visible: '=', - message: '=' - } - - constructor() - { - } - - /** - * Creates an intance of the directive - */ - static factory(): ng.IDirectiveFactory - { - var directive = () => new ErrorModal(); - return directive; - } - } -} \ No newline at end of file diff --git a/admin/lib/directives/error-modal/style.scss b/admin/lib/directives/error-modal/style.scss deleted file mode 100644 index 3fa3aab0..00000000 --- a/admin/lib/directives/error-modal/style.scss +++ /dev/null @@ -1,20 +0,0 @@ -.dialog-modal { - position:absolute; - top:0; - left:0; - width:100%; - height:100%; - z-index:1; - background:rgba(0,0,0,0.75); - - .dialog-box { - position:absolute; - top:30%; - left:30%; - width:40%; - padding:20px; - text-align:center; - z-index:2; - background:#fff; - } -} \ No newline at end of file diff --git a/admin/lib/directives/item-panel/item-panel.html b/admin/lib/directives/item-panel/item-panel.html deleted file mode 100644 index 1f3425ee..00000000 --- a/admin/lib/directives/item-panel/item-panel.html +++ /dev/null @@ -1,11 +0,0 @@ -
-
-
Are you sure you want to delete this item?
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/admin/lib/directives/item-panel/item-panel.ts b/admin/lib/directives/item-panel/item-panel.ts deleted file mode 100644 index 952e910b..00000000 --- a/admin/lib/directives/item-panel/item-panel.ts +++ /dev/null @@ -1,35 +0,0 @@ -module clientAdmin -{ - /** - * Small directive that represents an div item that has a preview, content and delete section. - * Ideal for database entries displayed in a list. - */ - export class ItemPanel implements ng.IDirective - { - restrict = 'E'; - transclude = { - 'preview': 'panelPreview', - 'content': 'panelContent' - }; - templateUrl = 'directives/item-panel/item-panel.html'; - scope = { - onDelete: '=?', - model: '=?', - confirmDelete : '=?' - } - - link( scope ) - { - scope.confirmDelete = scope.confirmDelete || false; - } - - /** - * Creates an intance of the pager directive - */ - static factory(): ng.IDirectiveFactory - { - var directive = () => new ItemPanel(); - return directive; - } - } -} \ No newline at end of file diff --git a/admin/lib/directives/item-panel/style.scss b/admin/lib/directives/item-panel/style.scss deleted file mode 100644 index b27cc354..00000000 --- a/admin/lib/directives/item-panel/style.scss +++ /dev/null @@ -1,40 +0,0 @@ - - -.item-panel { - margin: 10px; - padding: 5px; - background:$primary-background; - - .nav-button a { - margin: 0 8px 0 0; - font-size: 20px; - } - - .item-panel-delete { - background: #FFDCDC; - padding: 10px; - margin:0 0 20px 0; - - .button { - margin:10px 10px 0 0; - } - } - - .cross { - float:right; - margin: 4px 8px; - cursor:pointer; - - -ms-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - transform: rotate(45deg); - - &:hover{ - &:before, &:after{ - background: red; - } - } - } - -} - diff --git a/admin/lib/directives/pager/pager.html b/admin/lib/directives/pager/pager.html deleted file mode 100644 index f1be49a4..00000000 --- a/admin/lib/directives/pager/pager.html +++ /dev/null @@ -1,13 +0,0 @@ - - \ No newline at end of file diff --git a/admin/lib/directives/pager/pager.ts b/admin/lib/directives/pager/pager.ts deleted file mode 100644 index d3044e54..00000000 --- a/admin/lib/directives/pager/pager.ts +++ /dev/null @@ -1,145 +0,0 @@ -module clientAdmin -{ - /** - * Interface for the object you pass as the directive's 'interface' attribute - */ - export interface IPagerRemote - { - update : (index?: number, limit? : number) => ng.IPromise; - invalidate?: () => void; - goFirst?: () => void; - goLast?: () => void; - } - - - /** - * Controller for the dashboard media section - */ - export class Pager implements ng.IDirective - { - restrict = 'A'; - transclude = true; - templateUrl = 'directives/pager/pager.html'; - scope = { - interface: '=', // must be IPagerRemote - index: '=?', - limit: '=?', - last: '=?' - } - - constructor() - { - } - - link = (scope, elem: JQuery, attributes: angular.IAttributes, ngModel: angular.INgModelController) => - { - scope.index = scope.index || 0; - scope.limit = scope.limit || 10; - scope.last = scope.last || 1; - var iPager : IPagerRemote = scope.interface; - - /** - * Creates the invalidate function which can be used externally to control - * when the pager updates its content - */ - iPager.invalidate = function() { - handlePromise(iPager.update( scope.index, scope.limit )); - } - - /** - * Go to the first page - */ - iPager.goFirst = function() { - scope.goFirst(); - } - - /** - * Go to the last page - */ - iPager.goLast = function() { - scope.goLast(); - } - - /** - * Handles the promise returned by the update function - */ - function handlePromise(promise: ng.IPromise) - { - promise.then(function(val) { - scope.last = val; - }).catch(function(err) { - scope.last = 1; - }); - } - - /** - * Gets the current page number - * @returns {number} - */ - scope.getPageNum = function(): number - { - return (scope.index / scope.limit) + 1; - } - - /** - * Gets the total number of pages - * @returns {number} - */ - scope.getTotalPages = function() - { - return Math.ceil(scope.last / scope.limit); - } - - /** - * Sets the page search back to index = 0 - */ - scope.goFirst = function() - { - scope.index = 0; - handlePromise( iPager.update( scope.index, scope.limit) ); - } - - /** - * Gets the last set of users - */ - scope.goLast = function() - { - scope.index = scope.last - (scope.last % scope.limit); - handlePromise( iPager.update( scope.index, scope.limit) ); - } - - /** - * Sets the page search back to index = 0 - */ - scope.goNext = function() - { - scope.index += scope.limit; - handlePromise( iPager.update( scope.index, scope.limit) ); - } - - /** - * Sets the page search back to index = 0 - */ - scope.goPrev = function() - { - scope.index -= scope.limit; - if (scope.index < 0) - scope.index = 0; - - handlePromise( iPager.update( scope.index, scope.limit) ); - } - - // Call the initial update - handlePromise( iPager.update( scope.index, scope.limit) ); - } - - /** - * Creates an intance of the pager directive - */ - static factory(): ng.IDirectiveFactory - { - var directive = () => new Pager(); - return directive; - } - } -} \ No newline at end of file diff --git a/admin/lib/directives/pager/style.scss b/admin/lib/directives/pager/style.scss deleted file mode 100644 index d8d36a8a..00000000 --- a/admin/lib/directives/pager/style.scss +++ /dev/null @@ -1,49 +0,0 @@ -.navigation { - padding:10px; - background:$background-light; - - .nav-button { - display:inline-block; - } - - .center { - color: #ccc; - } - - .column { - float:left; - width:33.33333%; - box-sizing:border-box; - text-align: center; - min-height: 1px; - } - .back { - text-align: left; - } - .forward { - text-align: right; - } - - .back .nav-button a::before { - content:""; - width: 0; - height: 0; - float: left; - cursor: pointer; - margin: 5px 10px; - border-top: 10px solid transparent; - border-bottom: 10px solid transparent; - border-right: 20px solid $border-light; - } - .forward .nav-button a::before { - content:""; - width: 0; - height: 0; - float: left; - cursor: pointer; - margin: 5px 10px; - border-top: 10px solid transparent; - border-bottom: 10px solid transparent; - border-left: 20px solid $border-light; - } -} \ No newline at end of file diff --git a/admin/lib/directives/search-bar/search-bar.ts b/admin/lib/directives/search-bar/search-bar.ts deleted file mode 100644 index d2d8905c..00000000 --- a/admin/lib/directives/search-bar/search-bar.ts +++ /dev/null @@ -1,32 +0,0 @@ -module clientAdmin -{ - /** - * Controller for the dashboard media section - */ - export class SearchBar implements ng.IDirective - { - restrict = 'E'; - template = ` - `; - scope = { - onClick: '=', - value: '=' - } - - constructor() - { - } - - /** - * Creates an intance of the pager directive - */ - static factory(): ng.IDirectiveFactory - { - var directive = () => new SearchBar(); - return directive; - } - } -} \ No newline at end of file diff --git a/admin/lib/directives/search-bar/style.scss b/admin/lib/directives/search-bar/style.scss deleted file mode 100644 index da3346fd..00000000 --- a/admin/lib/directives/search-bar/style.scss +++ /dev/null @@ -1,32 +0,0 @@ -.search { - - height: 30px; - float: right; - - .search-button { - @include sprite-position($search); - @include sprite-width($search); - height: sprite-height($search) / 2; - display:inline-block; - cursor:pointer; - margin:5px 10px 0 10px; - } - .search-button:hover { - background-position-y: (nth($search, 2) - (sprite-height($search) / 2)); - } - - input { - box-sizing: border-box; - float: left; - padding:5px; - width: 180px; - - -webkit-transition: background-color linear 0.25s, width linear 0.25s; - transition: background-color linear 0.25s, width linear 0.25s; - - &:active, &:focus { - background-color: #fff; - width: 200px; - } - } -} \ No newline at end of file diff --git a/admin/lib/directives/state-header/state-header.ts b/admin/lib/directives/state-header/state-header.ts deleted file mode 100644 index f6014d1e..00000000 --- a/admin/lib/directives/state-header/state-header.ts +++ /dev/null @@ -1,31 +0,0 @@ -module clientAdmin -{ - /** - * Simple directive for each state header - */ - export class StateHeader implements ng.IDirective - { - transclude = true; - restrict = 'E'; - template = ` - `; - scope = { - text: '=', - loading: '=' - } - - /** - * Creates an intance of the pager directive - */ - static factory(): ng.IDirectiveFactory { - var directive = () => new StateHeader(); - return directive; - } - } -} \ No newline at end of file diff --git a/admin/lib/directives/state-header/style.scss b/admin/lib/directives/state-header/style.scss deleted file mode 100644 index ec9cf337..00000000 --- a/admin/lib/directives/state-header/style.scss +++ /dev/null @@ -1,27 +0,0 @@ -.sub-menu { - padding:20px; - box-sizing: border-box; - overflow: hidden; - height: 15%; - height: 130px; - background: $background-light; - - img { - margin: 0px 0 0 10px; - vertical-align: middle; - } - - h { - font-size:30px; - vertical-align: middle; - } - - - .console { - margin: 10px 0 0 0; - - .button { - margin: 0 5px 0 0; - } - } -} \ No newline at end of file diff --git a/admin/lib/directives/tick-box/style.scss b/admin/lib/directives/tick-box/style.scss deleted file mode 100644 index 2f6cc0ec..00000000 --- a/admin/lib/directives/tick-box/style.scss +++ /dev/null @@ -1,39 +0,0 @@ -.checkbox{ - cursor:pointer; - &:hover .cross { - &:before, &:after { - background: red; - } - } - - .opaque{ - background: #F0F0F0; - - &:hover { - background: #dbdbdb; - } - &:active { - background: #ccc; - } - } -} -.tick-box { - width:20px; - height:20px; - display:inline-block; - - .tick { - top: -25%; - width:120%; - height:120%; - } - - .cross { - top: -5%; - left: -25%; - - -ms-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - transform: rotate(45deg); - } -} \ No newline at end of file diff --git a/admin/lib/directives/tick-box/tick-box.ts b/admin/lib/directives/tick-box/tick-box.ts deleted file mode 100644 index 44b1baf6..00000000 --- a/admin/lib/directives/tick-box/tick-box.ts +++ /dev/null @@ -1,65 +0,0 @@ -module clientAdmin -{ - /** - * Simple directive a checkbox - */ - export class TickBox implements ng.IDirective - { - transclude = true; - restrict = 'E'; - template = ` -
-
-
-
- {{text}} -
- ` - scope = { - text: '=', - checked: '=', - onTicked: '&?', - tickType : '=?' - } - - link( scope ) - { - scope.tickType = scope.tickType ? scope.tickType : 'tick'; - - /** - * Gets the tick box background type - */ - scope.getBgType = function(): any { - if (scope.tickType == 'tick') - return { opaque : true }; - } - - /** - * Gets the tick box type - */ - scope.getTickType = function(): any { - if (scope.tickType == 'tick') - return { tick : true }; - else - return { cross : true }; - } - - /** - * When we click the tick box, we toggle the checked state - */ - scope.onClick = function() - { - if (scope.onTicked) - scope.onTicked({ticked: scope.checked}); - } - } - - /** - * Creates an intance of the pager directive - */ - static factory(): ng.IDirectiveFactory { - var directive = () => new TickBox(); - return directive; - } - } -} \ No newline at end of file diff --git a/admin/lib/index-prod.jade b/admin/lib/index-prod.jade deleted file mode 100644 index 9458509f..00000000 --- a/admin/lib/index-prod.jade +++ /dev/null @@ -1,27 +0,0 @@ -doctype html -html(lang="en") - head - meta(charset="utf-8") - meta(name="viewport", content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0") - title Webinate - - link(rel="stylesheet",type="text/css",href=url + "/css/style.css") - link(rel="stylesheet",type="text/css",href=url + "/third-party/third-party.min.css") - link(href="https://fonts.googleapis.com/css?family=Lily+Script+One", rel="stylesheet", type="text/css") - link(href="https://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,300", rel="stylesheet", type="text/css") - script(type="text/javascript"). - var _users = "#{usersURL}" - var _cache = "#{cacheURL}" - var _plugins = []; - var _variables = !{ JSON.stringify(variables) }; - script(type="text/javascript", src=url + "/third-party/third-party.min.js") - script(type="text/javascript", src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js") - script(type="text/javascript", src=url + "/third-party/tinymce/tinymce.js") - each plugin, index in plugins - script(type="text/javascript", src=url + plugin) - script(type="text/javascript", src=url + "/templates/partials.min.js") - script(type="text/javascript", src=url + "/main.js") - base(href="/") - - body(ng-app="admin") - div(class="main-view", ui-view="main-view") \ No newline at end of file diff --git a/admin/lib/index.jade b/admin/lib/index.jade deleted file mode 100644 index b6001e23..00000000 --- a/admin/lib/index.jade +++ /dev/null @@ -1,33 +0,0 @@ -doctype html -html(lang="en") - head - meta(charset="utf-8") - meta(name="viewport", content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0") - title Webinate - - link(rel="stylesheet",type="text/css",href=url + "/css/style.css") - link(rel="stylesheet",type="text/css",href=url + "/third-party/angular-loading-bar/build/loading-bar.css") - link(href="https://fonts.googleapis.com/css?family=Lily+Script+One", rel="stylesheet", type="text/css") - link(href="https://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,300", rel="stylesheet", type="text/css") - script(type="text/javascript"). - var _users = "#{usersURL}" - var _cache = "#{cacheURL}" - var _plugins = []; - var _variables = !{ JSON.stringify(variables) }; - script(type="text/javascript", src=url + "/third-party/jquery/dist/jquery.js") - script(type="text/javascript", src=url + "/third-party/angular/angular.js") - script(type="text/javascript", src=url + "/third-party/angular-ui-router/release/angular-ui-router.js") - script(type="text/javascript", src=url + "/third-party/angular-animate/angular-animate.js") - script(type="text/javascript", src=url + "/third-party/angular-sanitize/angular-sanitize.js") - script(type="text/javascript", src=url + "/third-party/angular-loading-bar/build/loading-bar.js") - script(type="text/javascript", src=url + "/third-party/angular-file-upload/dist/ng-file-upload.js") - script(type="text/javascript", src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js") - script(type="text/javascript", src=url + "/third-party/tinymce/tinymce.js") - each plugin, index in plugins - script(type="text/javascript", src=url + plugin) - script(type="text/javascript", src=url + "/templates/partials.min.js") - script(type="text/javascript", src=url + "/main.js") - base(href="/") - - body(ng-app="admin") - div(class="main-view", ui-view="main-view") \ No newline at end of file diff --git a/admin/lib/media/images/image-icon.png b/admin/lib/media/images/image-icon.png deleted file mode 100644 index e5ce3db170ff04ea814b6f433c2987d15f80b673..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 344 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf4nJ za0`Jja>QWe}Xi&D$;i?WLqoP$jZw>~xls@ve{;uvDlyLa+M-ev_6*Z$uBrOeh% zo!{?^?rM}hC@9f5(dvNoG0v>|4#%!-OFjLaDk?v`+s(4#*S`3MR-;u?5og|n1nIsE z43YRewP8u*r5K$Fi|@UB!f@uy(Msd&OMCVCR7?-B_$b<`l(X>9Is9SbhreqZmhed| zzM`>matU*rfxOj+mu(Y@70X^e(o%TI#Ut6snBjb9nO+k6&Ucn(de^c|HlJ>1lK%I5 fN^!{ky65U{-m251bmX4{-Ok|Y>gTe~DWM4f{Dpnq diff --git a/admin/lib/media/images/loader.gif b/admin/lib/media/images/loader.gif deleted file mode 100644 index 2f740d4020791828ea3e89a140e3f4a12bb132ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2608 zcmdVcdr(tX9tZGC9yiG~=6!)AJOTz~R32-UVs$%^%QGtwgxavtF5!}pVAVjQf^63S zih$U%Jc@#Klt;_MvVzuviV%qbRFpu3P$(fl&~A}ZtgfQFY_PODJG=kwcBValo`24n z&-~8!dqTrQ{5MNo0axG&04y#pMrAe5KK`5e;auNWU+V{_t{W`Vj~@4qJZSA5oB8g^ zU?j5DqK}$1ZXPZm%X6LJSqe6{bp$JWAPp1y-%?^bGHnOX)|h77@%2vsld|j zF{P`)f=s zDS1U&p&yECJD=MZ2~+)j=p74kTpr^+-0Uz3v&?4q-;Fv%JTmS_Bj9Pi|F%z|8}<#( zYl!*ZsfN@s5I=-Ip-)~SM^y|9e6I?js{Bkso!AiE*)+rO8V9JHQVz%rg?A4W^&2y%67-6yYCpfHXm!*>oZT`J_7_id zV$kMuR}!Hc?UqEgjcUbFmj|w(qI&W9_6z7mfKb)wqIp|n*YbVHK-o(0jaYz{9Cq$? zF~h5Jzgu<= z5?ou@ft5$H@MKbc-B0ff_p3L`bZPtqwHcMv2nbm2b@hVU!&oT5uM0C4S}?58LjJBL zBOs55U^uHD{w}xBGj#88RgN98g!k57r)oVGJP9XOK7XRMJ4P*ej*CQcw3wqF5oh{- zGQ$6|jacx=h{$wb0@{y`IGBLD61?LS%zn@Kgq_YWAkTi&p(EciYdpyUfOB#C_UypzGabr2*@qmz z*DT%XX?ZnV`bK^Ivy!7w1)VQE>HpnR590D`1OI2G+eB;cVbqpLE<6}M{IAHiMUueP zF*o=3KSZ_!hfpdifU;M)ohA*{i@_FV9ukU~%C1b?)Qx9mjt52ru!eeI#;W{Z86qFO6n&(m7nDFbzc zVy}HycV)S6P1M-hzq~0PE0}A!HbV4SNRLa(AOS1)2SMbWfQ-X-5G}QvB8j{k!Iij}x0_ l1YH&#T%2L#Z}Gjb;i3*BJ!6k`h{6D}T z$iX1OAi~Tj$iO7X$SlbC{|JKw0|PT7BLfm(W@Bez1S5FjECjZj@(o)O$!S~vn%kO-T ztm;$$74bU4>hlv(sk%FLPHKT`XZzoGnRVff^J~><`)7(jU$3#UuQZ5Lqd!jMz@gLZ zw}NLn+8fU-o38ubHFUf)|BmhCZDMV^XStTRImKA`&fGOm-{qa8x^l#E zIr)Tbn(7;?A4o;|J}A%hnrC?Tpw|?kH=9k~9lBQhTvYhT?JV7ende%!R33hwohWI- n?b>i3*BJ!6k`h{6D}T z$iX1OAi~Tj$iO7X$SlbC{|JKw(5Vc}3`l^Dm4TfDD5EOCz{JGJ%*+CpWnyMzVPy~$ zViQ(WG7Mbk6jTUQCJEFI@+|@|0~Il`0j1=D_AoIqBN@-g#K6oVD5Mx@=vesw76T76 zBhV$xf(-TyFYjD!yLR~AhDnc}T+bGZQ%@3@*?Fs``o)xWcbMNiI=s|=LcYUSyJGDb zrPbf6Pf9&GD90@yBH{MCqvyBCtG+TLrCj$r{$kJ4-ki3*BJ!6k`h{6D}T z$iX1OAi~Tj$iO7X$SlbC{|JL50|OH?BLfm(VP#-s;{Zyj2rw`)vM@5U!lfCR1R0oF zScTXW4TY6d9RnMIs>B%?Q1t^1WMKwM$N_Bu0%jzmnHU9`SriQ&3yc2WV&DO4V-jQ* zWUyy=)&Bh84tI-h=R1GRVsO87J9pj5;&}55+`SWSoYGmnQa4X!p3mK$Z>!1*wL;?! z(I~vmQLT^Iy|C<2%I%D|& diff --git a/admin/lib/media/sprites/file-info-mime.jpg b/admin/lib/media/sprites/file-info-mime.jpg deleted file mode 100644 index 4167fa5455715d2b0a95fb98b4c79dc02fbb3450..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 632 zcmex=i3*BJ!6k`h{6D}T z$iX1OAi~Tj$iO7X$SlbC{|JKw0|PT7BLfm(VPj`v1+vHVk{ch)@)jqRWLJaqOt8x@d+5AyH z!{b(|WC4#OYtD70#uQhZyx(KCm>S;iTte9pSIK z=Sr_Jsc)^El3et7_2n${m3A+?)pK-t%T1a~+?--8d}r-CFMhH1fu2fsPuYV9VFA`SzBj%b&!U%Dg{*=h@7p@`9GNQr0=2Ugl-|ymh1PSz|^-=Y)$E gAvZQAA7xfPF2$kjJLA|lmnG{8)lQ|b>i@q90QiQ)RsaA1 diff --git a/admin/lib/media/sprites/file-info-size.jpg b/admin/lib/media/sprites/file-info-size.jpg deleted file mode 100644 index 291cc5871261e384da57537810c67f2b0a4a4b59..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 566 zcmex=i3*BJ!6k`h{6D}T z$iX1OAi~Tj$iO7X$SlbC{|JLP$f=ABNPvxnl>;cDF2KOV$i&Lb!VHsRWMW}vWndE& z5>_;H6j2InG%EZ6R44&50L2Jq76v9(po~1w9wsJc2Dk|fj7$v7EP{$khDMDO|KDQZ zVP*ungjtZmp5fJ;%mp%U>-Re4`sp31HzqyZuhKPV_I-z4Z&#eM(qP_jq|!s|5c{MqiA_w2zrWQ?&)j`y?H{Fe z7v}Z;&PiLgTLMP9lI{~mENVjN6+u>F>k2Os+ssp zLTAm~uW=$Si{_TuD+?a&lv5RSGBxz-&^ai+LGNha{B$8>F>9j+(Fu!J^93*!#fQ znX{66vV9#gS@%3*Sef?GzaePOnVeOe9QPbk(*9e_ohI?Pbau{9;kZ31-(wXT7??N| z4s2*xS~OSOpj!A{=^dlC+(wWfP)0?;`f-eOz^*>;@-MFVdQ&MBb@03fx09smFU diff --git a/admin/lib/media/sprites/logo-home-small.jpg b/admin/lib/media/sprites/logo-home-small.jpg deleted file mode 100644 index 35845076884c2ffec2db65a0d2b0140018461989..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1476 zcma)*cTm%J7{-5@#1J4MEE#301=m3V5fMum4YEwc2n3Z`L=6&ICukJ}!LWxQG9y9& zl|4i#qcmbdDZ(9SAPK7$3?YPwB16+iuljGF=ia;T-RIutegF8r($~^y0Daua*$DuF zKmcB5KspK718^u53WLI7F!&C*tmF}JI6@wUM9L$PC^TwYXq2K7T1gRw#j2=avD#W% zTH1PF^(6!(Cnu+XQqVx7H8fQ*s+wQn|9wb%0Sp2#1neOo3;@P}AQ+JJcR&*WAhKma zz&F9<;1DQ6#;ni)2m%4YU{HkIzZe9DKmiyAE~kvuH&szJFtbD82>xn@KLk+Y=@0CQ z5eeD3jk3<2pzYLenX)M`C>Sn72QacwFa!>j`)?))07GCHsIorR)Xa_`_K&Cc85rV- z0fE$P=>&j+$T$Xq0geG1Rfz`MHn!wPr&}}6i;mh#0mXIm>k%)k$e3XR;`LYR3)kTu zz9gY7*xARI@1kg^tL?6EWmFi-3cK{YH#mpUkHpb3+|h#3(m+wXcU4*=$6egguNN1g zz@!*ESJM$P@32_(4kho78-4qo*?^eV7xO8UEd`EW^YS*D2{l%pt;oF7yH96sLiae6 zP02Rm`s%1qbt*ow`R9bSRDzL>gVHH8A8ufxdh9-nsRrQB`jFC zsha7SLOsKdY_0K7xX(Dfw|KL7o-urtxEp_D*rxm8suW159nkP=cnLFcmLK}_VQn|d zvNNQClSJD(Ywz}~(jhN#nXXV@i0fThmpFkI2^TyE@LR%nq?%UC=iE%mY57yLV=*a( z`7F1=w7LxQa(Y?(N8RlD!$$7@%}KOXD*IJx3-@4fc&At4WC*9rIMX3k;JF%=&zo_| zksQhiFW08D>U-IAXfFSJTI)x~5&UHeH>8sgMXHPYb)-~ro{!iNUW-{AnRZtyP=CYg zVa}WO?;K8E5lI2TJzr*){cZi|4DoNBFKhuk341dms7&p1>=oYoAyR5+#C^_HGS9gn z#6N$%V~S%juC{1nMe2T0!dX<5Px+2mo=@}4`|D zjCgCr2-086^NhjjGp!j}^&TxeT*S;kFEZ`>Im*W7h_}V9#!n@J(zlmGo*Z6{=GRC> zu0zzk4*h&Sj+oRjXWVxwJ8kyCpx(ul%Lo%Lp}<_7ihg|eZs^IOhJoUxI&-p9k)vRd z8k4X~VrL>Tbl#g`c}SqkF4YSt*>OYkzfc_Yvdql)OLJv()8THK5h z!Mn+P;tlBBO05QMq-T&f%dm4)TQAyDCnq;&l#(xqHXlC~#Z`(YSyEsJs%*R?I7$kf zv|ApE+`!rvV5V}41UlIQp6!~luj5b~WUdgh7@kQy5l)X^(O4flZ$fZ+%Hbh%k6L=Q zr?ywSQ8tZQ&P57~@(X&_ivP~-F1najnS7(F!Iz|(k<516^?uJ!dY97K*8I<`KdRdB zgB8(%qvLC?b(^3wu3=I5=sq)4P7wM8cCE%t!#45>LU-vbwrMP%Ao2~U zf_0=W9a3O9f+>&$L0N9RGaN}+a`$tw_`85klv2E-YHsNb_=(=H*C0B)}!G2JUCkIF{S4WDMZW zb^gI&6{LB&0s>$T%w;;NWw=1k{T7%4#Vi^Z0yvhj`79bQn(VhmAkE7d9o|#m7AVrZ zOhjEdM?M$gJOK*e2RcXQZ9ZBfAjWPjs;%MNlndaGW&CSX6#6pZ8a>}r;9nh-Wd4)o zxuD5lR|G=fQ5+|-5=@<$0|}6cvkX0TouuTFgp*k`UJ2XXpx^!sp<$uujQ|D6(TTTg zH7wFO1>$^yrrK+9Zb~S+N+RGf&CAy0a|U2Iu_YZqC`&W1jbEpEX=6_>02y${t{&v< z-nwEzGt1X#mdv^gJC|dd7)g5J%KdfmZb(D|`5gHg7z!Y)0XaH=>6-zNI?=Q;ULOFO z`38#@04Y)?AuW#vK$c#;LKa5>AiQ5MtLs@betiHE_6PP8FY|TY3jn(%XUa1j9nT>F zgyOK0H4s-lqObI>1;(CmHPpEmfJ4hrDt-rWGyo&?dM^MamsbO_CrT-oYp(1Ph(3|u z8>Q4jDK&Mp>kQzg0YEJJO>KPX3ZPF@`fM2wv3Jac>kRZcAqg!YmRJra=tIvAVVW4< zM@Bxx^81rgDl>AxdH!8;AU5VStm!JJmHy1og`!^wNN)hP?C%ku(8>3$Hom20-_Vx{@6m@4zbv{X_C~e6bMBaeYM!g`nu%$W({H8J7q#Pz zm0Sx;?(`<2Dv4q-Smi=BhI+|_nd(S9^KzMj4Vw3VqWAu$1i*wH@tmS_pg^CJb&6{a z1TDId{e8hH8gScly#P$mX98RH8_@v$#?|4}R_?vRfs%)|WSIa6eGNDr*SE-o0Xt(D z7J(7)x3c4FWJpV9+o<%GArUCp(ecqE5VKzkyu>F00lWW)Ko_RK7eL<#jCgrW4+Fd7 zJ^%tVN-0&i7M&r*2%0Ii^DOvK5vY2A!YI43?^~PK`}X|J a0sIH>3$c7lB23%>0000Y0oG&>aj{f; zu>^auRN2|VdD>2k_B4F%YqEHw^RH>9?5R1It}^~$KJb)x+O1{fX?}(kk3VspV2ok) zFY1~vuCaA5yM*sNL6HRvtQroCTmcPCmJSaxL4M2OzhK=Hmec=-e@A4UyhLnP)$)gS vwhc@$rBAq?Fzl5pIK5Tr6BmO5`wm9m10g0e=QZR4^)h(6`njxgN@xNA_Ml`k diff --git a/admin/lib/media/sprites/search.png b/admin/lib/media/sprites/search.png deleted file mode 100644 index 0240468c3ac4cdada06a6c17a5ab6c53caa89968..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 854 zcmV-c1F8IpP)-`u z+y?sZfu&NaO9j8PK$pNK0*d%-q)(EKB9=%u7Qa2PmFIiMq&}xa{@!@6jrV6@VGbx0 zd;+eGzOz{HpHxe_hLJo2Gg}n$Z6-cPyG=>?aE%v6+d?Vz)74ShPWns%e;GXQV%AH1 zc8)Qk!9xo|C;A4#&J>^N8wAf1#z^tCg7<^xh1U8e)LDFn1+{ni`oP`b`5IV9^j|an zmpi+gA8c;;55E6W+8&J0A7jDhmRSRp;qyZ#)yexDcmzH<#{ACV;P4im3BD14c?_o7 z4w(DkqpB9iIpa-XiroR7uRyKmF@V;3%^{`NRtNY6dQ19 z=On1brYyQt@JXtxwqKH{7Nt*;jUtvvC#%Jj$fMMvIiO51k6M&;ov1}y6!L9`p%zn8 z?p2FTSvW6i(w1K>#;lk4ys5>rz_WxgQhcr8ky@KKQ7r#c@t1wdgBQ=bfu+`!$)=qAl{^Wv^;`t6FTz;zgRExtk&vvh_+CEw>Hf51dEjDHG_tat}{4#1W0ADp_vAhV_17ArYaxt(4 gK7zuVT6{(O4MC7=E<25=CIA2c07*qoM6N<$f}eweI{*Lx diff --git a/admin/lib/media/sprites/seo.png b/admin/lib/media/sprites/seo.png deleted file mode 100644 index 536f2c564e8314039f99c0e69bbeac669dd348ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 586 zcmeAS@N?(olHy`uVBq!ia0vp^3P9|@!3HF&`%2dVDVAa<&kznEsNqQI0P;BtJR*x3 z7`TN%nDNrxx<5ccu@cva66d1S#FEVXJcW?V+*AewGkqgteM8e4&eu{v6*3?d!TD(= z<%vb942~)JNvR5MnMJAP`9;~q3eLf%gbo;h46pEb$!gA;D8~lv5N>$t`8J_P80}eq-vZUy05l7d_s4%6*vs z{x|2m+&7$piDxRLuEsL_V?Izk|6FAxJA+VYT<E^ zH0eIvl$|p9!gU#jX`eO2xWApwnL5p$A${H1UsrZ3>@ZI--EX*NmW)FcJHzT_q7JIP zr3e0%Y+P0R_0}A37c)-Fj=LNGCYPPok*Jj|c*p9c!1STR$_j@>O R?+3;zgQu&X%Q~loCICK&?XLg; diff --git a/admin/lib/media/sprites/standard-file.png b/admin/lib/media/sprites/standard-file.png deleted file mode 100644 index 8a0716ded2128e4e502f0ca0e17de874a5ca0e3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 567 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=EX7WqAsj$Z!;#Vf4nJ za0`Jja>QWe}Xi&D$;i?WLqoP$jZw>~ywU|{U`ba4!+nDchFuh(G*iMIP*y^P$c zC4v`Q6Z9S&nyQ`u@Ko{>5jkb?j~sg)xFb!L%;szARup{fq_x#Vcj?SM^Pg0Q`F=L$ z_g9zP^kTuf>@PEgw=qcb9uP}d%y@$-r%FDd;>=0US*07>_Aysf)$W}8W5BJBcH`IHexTqQ|Np+X`V@>DWahrTb3ct`BICP71@8@WT?NDwu7A0| zq?h9plZg$(>>FYaCw%U&lKgaV-|za?)%y%|Ws0H`qjr3aee8TpSbV`tu^GBD&$b;} zQ!wMU(6`5%r+$3GYQR_&trS1ae*e2eit*F#0hK9uZuUDa{9WLU6x@3z4ABj}Yzf>O zE;8gWnn^Y29&lsczk`@1Hk>haIZ07Wu`r>mdKI;Vst E0D?W=b^rhX diff --git a/admin/lib/media/sprites/users.png b/admin/lib/media/sprites/users.png deleted file mode 100644 index 4b7d8dd945d1c2701cd3f1b58a910dd0019edd2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmV;S0$%-zP)O|BQyQpRD&;(t8qbBO=VHAG3O20d4`{PWywbsA3=mw!j5QlPGu|3b4^c zK~_{b@YG>CCsA;m6d)_A1MtVu<#!SVFIoW29!Ndy-T)7tc5i@5v?zc#PrElj>S^}_ zFd=rfn9oB(Pz7Khj=+f~17e=1p-BjonQ#jAo&{M^?P%6_XTJIiJSS058~Z(QFzp_A z0rJ+~C+7@gMHL!{+kZ?KAO=d~u*<$rqTtmRpag#Q4Pwy+2$Lu%U7f6(&>Xu%okKG# zd0!`26vQ6RTm8z4YOe+`Ywz>#ua&9+fc;3$p_zr)3UD(3F;D|yo__ZR5z(|)**#N$0ePB^}plz{;)W&gbJ`ZxP%>$F@E4AVs9rXd4a{!u} zz<>3DE4y1gQxslJ_qA#fIf}^MVGqYxf)daAfEmN8zSr}~>jSPCC_MpMJ<{x(PPtxA zzfXOD&j^|Y0B*THVB3UKq{q(7iY*hWZ#F} -/// -/// -/// -/// -/// -/// -/// -/// -/// \ No newline at end of file diff --git a/admin/lib/states/default/dashboard.html b/admin/lib/states/default/dashboard.html deleted file mode 100644 index 649c86cd..00000000 --- a/admin/lib/states/default/dashboard.html +++ /dev/null @@ -1,34 +0,0 @@ -
-
- -
-
-
-
-
Posts
-
-
-
User Management
-
-
-
Media
-
-
-
SEO
-
- -
-
-
{{(link.open ? "↓  " : "")}}{{link.label}}
-
-
-
-
{{subLink.label}}
-
-
-
- -
-
-
-
diff --git a/admin/lib/states/default/style.scss b/admin/lib/states/default/style.scss deleted file mode 100644 index 0c70fc03..00000000 --- a/admin/lib/states/default/style.scss +++ /dev/null @@ -1,140 +0,0 @@ -.admin-toolbar { - height:5%; - height:50px; - overflow:hidden; - - .nav-button a { - font-size:20px; - line-height:45px; - } -} - -.toolbar-item { - float:left; - - .sprite { - margin: 5px 0 0 20px; - } - - &:nth-last-child(2) { - float:right; - margin: 0 10px 0 0; - } -} - -.admin-nav { - width:20%; - cursor:pointer; - - a { - text-decoration:none; - } -} - -.admin-nav, .admin-view { - float:left; - height:95%; - height:calc(100% - 50px); -} - -.admin-view { - width:80%; - background:#ddd; -} - -.admin-main-view { - position:relative; - height: 100%; - overflow: auto; -} - -.admin-section { - - padding:10px 10px; - - .icon { - background-repeat:no-repeat; - width:32px; - height:32px; - display:inline-block; - vertical-align:middle; - } - - .sprite { - &.sprite-posts{ - @include sprite-position($posts); - } - &.sprite-users{ - @include sprite-position($users); - } - &.sprite-media{ - @include sprite-position($media); - } - &.sprite-seo{ - @include sprite-position($seo); - } - } - - &.active .icon { - &.sprite-posts { - background-position-y: (nth($posts, 2) - (sprite-height($posts) / 2)); - } - &.sprite-users { - background-position-y: (nth($users, 2) - (sprite-height($users) / 2)); - } - &.sprite-media { - background-position-y: (nth($media, 2) - (sprite-height($media) / 2)); - } - &.sprite-seo { - background-position-y: (nth($seo, 2) - (sprite-height($seo) / 2)); - } - } -} - -.admin-sub-section { - max-height:0; - overflow-y:hidden; - transition-property: all; - transition-duration: .5s; - transition-timing-function: cubic-bezier(0, 1, 0.5, 1); - background:#F9F9F9; - - &.open { - max-height:500px; - } - - .admin-section{ - padding-left: 25px; - } -} - -.sprite-logo-home-small{ - @include sprite-position($logo-home-small); - @include sprite-width($logo-home-small); - @include sprite-height($logo-home-small); -} - -.admin-section { - .inner { - -webkit-transition: all linear 0.15s; - transition: all linear 0.15s; - color:#aaa; - } - - &.active:hover { - border:none; - } - &:hover { - border-left:10px solid #9bea5d; - } - &.active { - background:$util-background; - } - - &:hover .inner { - color:inherit; - } - &.active .inner { - color:$highlighted-text; - } -} \ No newline at end of file diff --git a/admin/lib/states/login/log-in.html b/admin/lib/states/login/log-in.html deleted file mode 100644 index 8b367cbb..00000000 --- a/admin/lib/states/login/log-in.html +++ /dev/null @@ -1,19 +0,0 @@ - \ No newline at end of file diff --git a/admin/lib/states/login/login-ctrl.ts b/admin/lib/states/login/login-ctrl.ts deleted file mode 100644 index b5f3cd54..00000000 --- a/admin/lib/states/login/login-ctrl.ts +++ /dev/null @@ -1,72 +0,0 @@ -module clientAdmin -{ - /** - * Controller for the login HTML - */ - export class LoginCtrl - { - private http: ng.IHttpService; - private q: ng.IQService; - private loginToken: { username: string; rememberMe: boolean; password: string; }; - private error: boolean; - private errorMsg: string; - private usersURL: string; - private loading: boolean; - private _state: ng.ui.IStateService; - - // $inject annotation. - public static $inject = ["$http", "$q", "usersURL", "$state"]; - constructor(http: ng.IHttpService, q: ng.IQService, usersURL: string, state: ng.ui.IStateService) - { - this.http = http; - this.q = q; - this.usersURL = usersURL; - this._state = state; - - // Create the login token - this.loginToken = { - username: "", - password: "", - rememberMe: true - }; - - this.loading = false; - this.error = false; - this.errorMsg = "Hello"; - } - - /** - * Attempts to log the user in - */ - logIn() - { - var that = this; - var token = this.loginToken; - var host = this.usersURL; - - this.error = false; - this.errorMsg = ""; - this.loading = true; - - this.http.post(`${host}/users/login`, token).then(function (response) - { - var responseToken = response.data; - if (responseToken.error) - { - that.error = true; - that.errorMsg = responseToken.message; - } - else - that._state.go("default"); - - that.loading = false; - - }).catch( function(err) - { - that.error = true; - that.loading = false; - that.errorMsg = "Could not communicate with server"; - }); - } - } -} \ No newline at end of file diff --git a/admin/lib/states/login/style.scss b/admin/lib/states/login/style.scss deleted file mode 100644 index 5b9f1172..00000000 --- a/admin/lib/states/login/style.scss +++ /dev/null @@ -1,16 +0,0 @@ -.log-in { - width:30%; - margin:30px auto; - padding:30px; - - .button { - margin: 10px 0 0 0; - } -} - -@media screen and (max-width:655px) { - .log-in { - width:auto; - padding:10px 50px 50px 50px; - } -} \ No newline at end of file diff --git a/admin/lib/states/media/dash-media.html b/admin/lib/states/media/dash-media.html deleted file mode 100644 index 491e6221..00000000 --- a/admin/lib/states/media/dash-media.html +++ /dev/null @@ -1,78 +0,0 @@ -
- - - - -
- - - - - -
-
-
- -
-
-
-
-
-

{{mediaController.selectedEntity.name}}

- - -
{{mediaController.selectedEntity.identifier}}
-
{{mediaController.selectedEntity.created | date:"MM/dd/yyyy 'at' h:mma"}}
-
{{mediaController.selectedEntity.size | bytes}}
-
{{mediaController.selectedEntity.mimeType}}
-
{{mediaController.selectedEntity.numDownloads}}
- - -
-
-
-
-
Are you sure you want to delete these {{mediaController.selectedFolder ? "file": "folder" }}s
- - -
- -
-
-
Folder Name:
-
- - -
-
-
-
-
-
-
-
{{folder.name}} -
-
-
-
-
.. {{mediaController.selectedFolder.name}} -
-
-
- -
-
-
-
-
-
-
{{file.name}}
-
-
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/admin/lib/states/media/media-ctrl.ts b/admin/lib/states/media/media-ctrl.ts deleted file mode 100644 index 70513e06..00000000 --- a/admin/lib/states/media/media-ctrl.ts +++ /dev/null @@ -1,276 +0,0 @@ -module clientAdmin -{ - /** - * Controller for the dashboard media section - */ - export class MediaCtrl - { - private usersURL: string; - public folderFormVisible: boolean; - public scope: any; - public entries: Array; - public selectedEntities: Array; - public selectedEntity: UsersInterface.IBucketEntry | UsersInterface.IFileEntry; - public selectedFolder: UsersInterface.IBucketEntry; - public uploader: any; - public confirmDelete: boolean; - public editMode: boolean; - public multiSelect: boolean; - public editFileMode: boolean; - - private _q: ng.IQService; - private http: ng.IHttpService; - private error: boolean; - private loading: boolean; - private errorMsg: string; - private pager: IPagerRemote; - private searchTerm: string; - - // $inject annotation. - public static $inject = ["$scope", "$http", "usersURL", "Upload", "$q"]; - constructor(scope: any, http: ng.IHttpService, usersURL: string, upload: any, $q : ng.IQService) - { - this.scope = scope; - this.usersURL = usersURL; - this.folderFormVisible = false; - this.confirmDelete = false; - this.editMode = false; - this.selectedFolder = null; - this.uploader = upload; - this.selectedEntities = []; - this.selectedEntity = null; - this.multiSelect = true; - this.editFileMode = false; - - this._q = $q; - this.http = http; - this.loading = false; - this.error = false; - this.errorMsg = ""; - this.searchTerm = ""; - this.pager = this.createPagerRemote(); - } - - upload(files) - { - var that = this; - that.error = false; - - if (files && files.length) - { - - for (var i = 0; i < files.length; i++) - - for (var i = 0; i < files.length; i++) - { - var file = files[i]; - this.uploader.upload({ - url: `${that.usersURL}/buckets/${that.selectedFolder.name}/upload`, - file: file - - }).success(function (data, status, headers, config) - { - that.pager.invalidate(); - - }).error(function (data, status, headers, config) - { - that.error = true; - that.errorMsg = status; - }) - } - } - }; - - /** - * Creates a new folder - */ - newFolder() - { - var that = this; - that.error = false; - that.errorMsg = ""; - that.loading = true; - var folderName: string = $("#new-folder").val(); - - if (folderName.trim() == "") - { - that.error = true; - that.errorMsg = "Please specify a valid folder name"; - return; - } - - this.http.post(`${that.usersURL}/users/${Authenticator.user.username}/buckets/${folderName}`, null).then(function(token) - { - if (token.data.error) - { - that.error = true; - that.errorMsg = token.data.message; - } - else - { - $("#new-folder").val(""); - that.pager.invalidate(); - } - - that.loading = false; - }); - } - - /** - * Attempts to open a folder - */ - openFolder(folder: UsersInterface.IBucketEntry) - { - var that = this; - var command = "files"; - this.selectedFolder = folder; - this.folderFormVisible = false; - this.confirmDelete = false; - that.pager.goFirst(); - } - - /** - * Removes the selected entities - */ - removeEntities() - { - var that = this; - that.error = false; - that.errorMsg = ""; - that.loading = true; - var command = (this.selectedFolder ? "files" : "buckets"); - - var entities = ""; - - if (this.selectedFolder) - { - for (var i = 0, l = this.selectedEntities.length; i < l; i++) - entities += (this.selectedEntities[i]).identifier + ","; - } - else - { - for (var i = 0, l = this.selectedEntities.length; i < l; i++) - entities += (this.selectedEntities[i]).name + ","; - } - - entities = (entities.length > 0 ? entities.substr(0, entities.length - 1) : "" ); - - that.http.delete(`${that.usersURL}/${command}/${entities}`).then(function (token) - { - if (token.data.error) - { - that.error = true; - that.errorMsg = token.data.message; - } - else - that.pager.invalidate(); - - that.loading = false; - that.confirmDelete = false; - }); - } - - /** - * Attempts to rename a file - */ - renameFile(file: UsersInterface.IFileEntry) - { - var that = this; - that.error = false; - that.errorMsg = ""; - that.loading = true; - - that.http.put(`${that.usersURL}/files/${file.identifier}/rename-file`, { name: $("#file-name").val() }).then(function (token) - { - if (token.data.error) - { - that.error = true; - that.errorMsg = token.data.message; - return - } - - file.name = $("#file-name").val(); - that.loading = false; - that.editFileMode = false; - }); - } - - /** - * Sets the selected status of a file or folder - */ - selectEntity(entity) - { - entity.selected = !entity.selected; - var ents = this.selectedEntities; - - if (entity.selected) - { - if (this.multiSelect == false || !(event).ctrlKey ) - { - for (var i = 0, l = ents.length; i < l; i++) - (ents[i]).selected = false; - - ents.splice(0, ents.length); - } - - ents.push(entity); - } - else - ents.splice(ents.indexOf(entity), 1); - - if (ents.length == 0) - { - this.confirmDelete = false; - this.selectedEntity = null; - } - else - this.selectedEntity = ents[ents.length - 1]; - } - - /** - * Fetches the media entries (folers/actual media) from the database - * @returns {IPagerRemote} - */ - createPagerRemote(): IPagerRemote - { - var that = this; - var remote: IPagerRemote = { - update: function(index?: number, limit? : number) - { - that.error = false; - that.errorMsg = ""; - that.loading = true; - that.selectedEntities.splice(0, that.selectedEntities.length); - that.selectedEntity = null; - var command = ""; - - if (that.selectedFolder) - command = `${that.usersURL}/users/${Authenticator.user.username}/buckets/${that.selectedFolder.name}/files?index=${index}&limit=${limit}&search=${that.searchTerm}` - else - command = `${that.usersURL}/users/${Authenticator.user.username}/buckets?index=${index}&limit=${limit}&search=${that.searchTerm}` - - return new that._q(function(resolve, reject) - { - that.http.get(command).then(function (token) - { - if (token.data.error) { - that.error = true; - that.errorMsg = token.data.message; - that.entries = []; - resolve(1); - } - else { - that.entries = token.data.data; - resolve(token.data.count); - } - - that.loading = false; - }); - }); - } - }; - - return remote; - } - } -} \ No newline at end of file diff --git a/admin/lib/states/media/style.scss b/admin/lib/states/media/style.scss deleted file mode 100644 index 0c35993d..00000000 --- a/admin/lib/states/media/style.scss +++ /dev/null @@ -1,193 +0,0 @@ -.media { - - .panel-view { - height:100%; - overflow:auto; - - &.left { - width:100%; - - &.expanded{ - width:75%; - } - } - - &.right.expanded{ - width:25%; - } - } -} - -.user-confirmation { - margin: 10px; - padding: 10px; - max-height:200px; - background: $primary-background; - display: inline-block; - - .button { - margin: 10px 10px 0 0; - } -} - -.folder-options { - padding: 10px; - max-height:200px; -} - -.new-folder { - .button { - margin: 0 10px 10px 10px; - } - - input { - padding:8px; - } -} - -.folder, .file { - float:left; - margin:10px; - cursor:pointer; -} -.folder { - padding:10px; - - .icon { - width:nth($folder, 3); - height:nth($folder, 4) / 2; - float:left; - @include sprite-position($folder); - margin:0 5px 0 0; - } -} -.file { - width:150px; - height:150px; - overflow: hidden; -} -.file-name { - color:inherit; - text-overflow: ellipsis; - white-space: nowrap; - padding:10px; - font-size:16px; - box-sizing: border-box; - overflow: hidden; -} - -.file-preview { - padding-top: 75%; - position: relative; - - .inner { - top: 0; - left: 0; - overflow: hidden; - position: absolute; - width: 100%; - height: 100%; - text-align: center; - - .sprite-standard-file{ - @include sprite($standard-file); - display: inline-block; - vertical-align: middle; - } - } -} -.inner .div-center { - display: inline-block; - height: 100%; - vertical-align: middle; -} -.inner img { - display: inline-block; - max-height: 100%; - max-width: 100%; - vertical-align: middle; -} - -.file-info { - height:100%; - background: $primary-background; - box-sizing:border-box; - padding:20px; - overflow: auto; - - h2 { - margin: 0 0 20px 0; - } - - .file-edit { - overflow: initial; - margin: 10px 0; - } - input { - padding: 5px; - width: 100%; - box-sizing: border-box; - } - .button { - vertical-align:middle; - } - - .detail { - font-size:20px; - margin: 10px 0; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - .cancel { - margin: 0 0 0 15px; - } - - .sprite { - vertical-align:middle; - margin: 0 10px 0 0; - } - - .sprite-file-info-clock{ - @include sprite($file-info-clock, inline-block); - } - - .sprite-file-info-downloads{ - @include sprite($file-info-downloads, inline-block); - } - - .sprite-file-info-id{ - @include sprite($file-info-id, inline-block); - } - - .sprite-file-info-mime{ - @include sprite($file-info-mime, inline-block); - } - - .sprite-file-info-size{ - @include sprite($file-info-size, inline-block); - } -} - -.view-details { - margin: 0 15px 0 0; -} - - -.folder, .file-preview { - background: $primary-background; - box-shadow: 0 1px 1px 0 rgba(0,0,0,.2); -} -.file.selected .file-preview { - box-shadow: none; -} - -.folder.selected, .file.selected { - background:$util-text; - color:$highlighted-text; - box-shadow: 0 3px 3px 0 rgba(0,0,0,.3); -} -.folder.selected .icon { - background-position-y: (nth($folder, 2) - (sprite-height($folder) / 2)); -} \ No newline at end of file diff --git a/admin/lib/states/message/message.html b/admin/lib/states/message/message.html deleted file mode 100644 index 62221ccb..00000000 --- a/admin/lib/states/message/message.html +++ /dev/null @@ -1,5 +0,0 @@ -
-
-
{{message}}
-

-
\ No newline at end of file diff --git a/admin/lib/states/message/style.scss b/admin/lib/states/message/style.scss deleted file mode 100644 index 44c038ac..00000000 --- a/admin/lib/states/message/style.scss +++ /dev/null @@ -1,24 +0,0 @@ -.admin-message { - - width:40%; - margin:60px auto; - text-align:center; - - .message { - margin:50px 0; - padding:20px; - } - - .success { - background:#d3f5b2; - border:2px dashed green; - color:green; - - } - - .error { - background:#F5E5B2; - border:2px dashed red; - color:red; - } -} \ No newline at end of file diff --git a/admin/lib/states/password-reset/password-ctrl.ts b/admin/lib/states/password-reset/password-ctrl.ts deleted file mode 100644 index 61073d1f..00000000 --- a/admin/lib/states/password-reset/password-ctrl.ts +++ /dev/null @@ -1,124 +0,0 @@ -module clientAdmin -{ - /** - * Controller for the password reset html - */ - export class PasswordCtrl - { - private http: ng.IHttpService; - private q: ng.IQService; - private loginToken: { user: string; key: string; password: string; }; - private error: boolean; - private errorMsg: string; - private usersURL: string; - private loading: boolean; - private origin: string; - private complete: boolean; - - // $inject annotation. - public static $inject = ["$http", "$q", "usersURL", "$stateParams"]; - constructor(http: ng.IHttpService, q: ng.IQService, usersURL: string, stateParams : any) - { - this.http = http; - this.q = q; - this.usersURL = usersURL; - this.complete = false; - - var txtbox = document.createElement("textarea"); - txtbox.innerHTML = stateParams.user; - var userClean = txtbox.value; - - txtbox.innerHTML = stateParams.origin; - this.origin = txtbox.value; - if (this.origin == "undefined") - this.origin = "."; - - // Create the login token - this.loginToken = { - user: userClean, - key: stateParams.key, - password: "" - }; - - this.loading = false; - this.error = false; - this.errorMsg = ""; - } - - /** - * Sends another request to reset the password - */ - resendRequest() - { - var that = this; - var token = this.loginToken; - var host = this.usersURL; - - this.error = false; - this.errorMsg = ""; - this.loading = true; - - this.http.get(`${host}/users/${that.loginToken.user}/request-password-reset`).then(function (response) - { - var responseToken = response.data; - if (responseToken.error) - { - that.error = true; - that.errorMsg = responseToken.message; - } - else - { - that.error = false; - that.errorMsg = responseToken.message; - } - - that.loading = false; - - }).catch(function (err) - { - that.error = true; - that.loading = false; - that.errorMsg = "Could not communicate with server"; - }); - - } - - /** - * Attempts to reset the password based on the current credentials - */ - resetPassword() - { - var that = this; - var token = this.loginToken; - var host = this.usersURL; - - this.error = false; - this.errorMsg = ""; - this.loading = true; - - this.http.put(`${host}/password-reset`, token).then(function (response) - { - var responseToken = response.data; - if (responseToken.error) - { - that.error = true; - that.errorMsg = responseToken.message; - } - else - { - that.error = false; - that.errorMsg = responseToken.message; - that.complete = true; - } - - that.loading = false; - - }).catch( function(err) - { - that.error = true; - that.loading = false; - that.errorMsg = "Could not communicate with server"; - }); - } - } -} \ No newline at end of file diff --git a/admin/lib/states/password-reset/password-reset.html b/admin/lib/states/password-reset/password-reset.html deleted file mode 100644 index 3f65b92f..00000000 --- a/admin/lib/states/password-reset/password-reset.html +++ /dev/null @@ -1,21 +0,0 @@ - -
-
- -
{{controller.errorMsg}}
- -
-

-

Please enter your new password:
- -

- - - -
- -

-

- -
- diff --git a/admin/lib/states/password-reset/style.scss b/admin/lib/states/password-reset/style.scss deleted file mode 100644 index c98e76ff..00000000 --- a/admin/lib/states/password-reset/style.scss +++ /dev/null @@ -1,9 +0,0 @@ -.password-reset { - @extend .admin-message; -} - -.password-reset-form-label { - margin: 50px 0 20px 0; - font-weight: bold; - color: #6E98D1; -} \ No newline at end of file diff --git a/admin/lib/states/posts/dash-posts.html b/admin/lib/states/posts/dash-posts.html deleted file mode 100644 index 28a5acf5..00000000 --- a/admin/lib/states/posts/dash-posts.html +++ /dev/null @@ -1,203 +0,0 @@ -
- - -
-
- -
-
- - -
- - - -
-
- -
- - -
{{controller.successMessage}}
-
-
- -
-
-
-
Sort Order
- - -
- -
-
Sort Order
- - -
- -
-
Category
- -
- -
-
- -
-
- - -
Please enter a valid title
-
- - - - - -
Please enter a valid slug
-
- - - -
-
- - Featured Image: The main image for this post -
- -
-
-
- -
-
-
Categories:
-
-
- - - - -
-
-
- -
-
Title
- - -
Slug
- - -
-
Parent
- -
- -
- -
-
Add Category -
-
- -
- -
-
-
- -
-
Tags:
-
- -
-
-
- -
- -
-
-
- -
-
Visibility:
- - -
- -
-
- -
-
- - -
Created: {{post.createdOn | date:"MM/dd/yyyy 'at' h:mma"}}
- -
{{post.title}} : {{post.slug}}
-
- - -
{{post._id}}
-
- -
{{post.brief}}
-
- -
{{post.createdOn | date:"MM/dd/yyyy 'at' h:mma"}}
-
- -
{{post.lastUpdated | date:"MM/dd/yyyy 'at' h:mma"}}
-
- -
{{post.public ? "public" : "private"}}
-
- -
{{post.tags.join(", ")}}
-
- -
{{post.categories.join(", ")}}
-
- -
-
- -
-
-
-
- - -
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/admin/lib/states/posts/posts-ctrl.ts b/admin/lib/states/posts/posts-ctrl.ts deleted file mode 100644 index 2b0d9e36..00000000 --- a/admin/lib/states/posts/posts-ctrl.ts +++ /dev/null @@ -1,445 +0,0 @@ -module clientAdmin -{ - /** - * Controller for the dashboard posts section - */ - export class PostsCtrl - { - public postToken: Modepress.IPost; - public posts: Array; - public showNewPostForm: boolean; - public editMode: boolean; - public apiURL: string; - public scope: any; - public successMessage: string; - public tagString: string; - public newCategoryMode: boolean; - public showCategoryDelete: boolean; - public categories: Array; - public categoryToken: Modepress.ICategory; - public searchKeyword: string; - public searchCategory: string; - public sortOrder: string; - public sortType: string; - public showFilters: boolean; - public showMediaBrowser: boolean; - public defaultSlug: string; - public targetImgReciever: string; - - private _scope: any; - private _q: ng.IQService; - private http: ng.IHttpService; - private error: boolean; - private loading: boolean; - private errorMsg: string; - private pager: IPagerRemote; - - // $inject annotation. - public static $inject = ["$scope", "$http", "apiURL", "categories", "$q"]; - constructor(scope, http: ng.IHttpService, apiURL: string, categories: Array, $q: ng.IQService) - { - this.newCategoryMode = false; - this.scope = scope; - this.apiURL = apiURL; - this.posts = []; - this.successMessage = ""; - this.tagString = ""; - this.showNewPostForm = false; - this.showCategoryDelete = false; - this.editMode = false; - this.showFilters = false; - this.searchKeyword = ""; - this.searchCategory = ""; - this.sortOrder = "desc"; - this.sortType = "created"; - this.defaultSlug = ""; - this.showMediaBrowser = false; - this.targetImgReciever = ""; - this._scope = scope; - - - this.http = http; - this.loading = false; - this.error = false; - this.errorMsg = ""; - this._q = $q; - this.pager = this.createPagerRemote(); - - this.postToken = { title: "", content: "", slug: "", tags: [], categories: [], public: true, brief: "" }; - var that = this; - - - - // The category token - this.categoryToken = { title: "", description: "", slug: "" }; - - // Fetches the categories - this.categories = categories; - - scope.removePost = this.removePost.bind(this); - } - - initializeTiny() - { - var that = this; - tinymce.init({ - height: 350, - setup: function (editor) - { - editor.addButton('drive', { - text: "", - image: "/media/images/image-icon.png", - onclick: function () - { - that.openMediaBrowser(); - that._scope.$apply(); - } - }); - }, - content_css: '/css/mce-style.css', - selector: "textarea", plugins: ["media", "image", "link", "code", "textcolor", "colorpicker", "table", "wordcount", "lists", "contextmenu", "charmap", "fullpage", "pagebreak", "print", "spellchecker", "fullscreen", "searchreplace"], - toolbar1: "insertfile undo redo | styleselect | bold italic charmap | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link drive | print preview media | forecolor backcolor emoticons", - toolbar2: "pagebreak | spellchecker searchreplace | fullpage fullscreen" - }); - } - - /** - * Opens the media browser - */ - openMediaBrowser(target: string = "content") - { - this.showMediaBrowser = true; - this.targetImgReciever = target; - } - - /** - * Closes the media browser - */ - closeMediaBrowser() - { - this.showMediaBrowser = false; - } - - /** - * Selects a file from the media browser - */ - selectFile(file: UsersInterface.IFileEntry) - { - this.showMediaBrowser = false; - - if (this.targetImgReciever == "content") - { - if (file.mimeType.match(/image/)) - tinymce.editors[0].insertContent(``); - else - tinymce.editors[0].insertContent(`${file.name}`); - } - else if (this.targetImgReciever == "featured-image") - this.postToken.featuredImage = file.publicURL; - } - - /** - * Makes sure the slug doesnt have any spaces - */ - checkSlug() - { - if (this.postToken.slug) - this.postToken.slug = this.postToken.slug.replace(/\s+/g, '-'); - } - - /** - * Sets the slug to be the same as the title - except with spaces and in lower case (only if not touched first by user) - */ - updateDefaultSlug(form) - { - if (!form.nSlug.$touched || !this.postToken.slug || this.postToken.slug == "") - this.postToken.slug = this.postToken.title.split(' ').join('-').toLowerCase(); - } - - swapOrder() - { - this.sortOrder = (this.sortOrder == 'asc' ? 'desc' : 'asc'); - this.pager.invalidate(); - } - - swapSortType() - { - this.sortType = (this.sortType == 'created' ? 'updated' : 'created'); - this.pager.invalidate(); - } - - /** - * Gets a list of categories - */ - getCategories() - { - var that = this; - that.http.get(`${that.apiURL}/categories`).then(function (categories) - { - that.categories = categories.data.data; - }); - } - - /** - * Sets the page into post mode - */ - newPostMode() - { - this.scope.newPostForm.$setUntouched(); - this.scope.newPostForm.$setPristine(); - this.postToken = { title: "", content: "", slug: "", tags: [], categories: [], public : true }; - this.editMode = false; - this.successMessage = ""; - tinymce.editors[0].setContent(""); - this.showNewPostForm = !this.showNewPostForm - } - - /** - * Sets the page into edit mode - */ - editPostMode(post: Modepress.IPost) - { - this.newPostMode(); - this.editMode = true; - this.loading = true; - this.showNewPostForm = true; - - var that = this; - that.http.get(`${that.apiURL}/posts/slug/${post.slug}?verbose=true`).then(function (post) - { - that.postToken = post.data.data; - that.loading = false; - tinymce.editors[0].setContent(that.postToken.content); - }); - } - - createPagerRemote(): IPagerRemote - { - var that = this; - var remote: IPagerRemote = { - update: function(index?: number, limit? : number) - { - that.error = false; - that.errorMsg = ""; - that.loading = true; - var keyword = that.searchKeyword; - var searchCategory = that.searchCategory; - var order = that.sortOrder; - var sortType = that.sortType; - - return new that._q(function(resolve, reject) - { - that.http.get(`${that.apiURL}/posts?visibility=all&verbose=true&sort=${sortType}&sortOrder=${order}&categories=${searchCategory}&index=${index}&limit=${limit}&keyword=${keyword}`).then(function (token) - { - if (token.data.error) { - that.error = true; - that.errorMsg = token.data.message; - that.posts = []; - resolve(1); - } - else { - that.posts = token.data.data; - resolve(token.data.count); - } - - that.loading = false; - }); - }); - } - }; - - return remote; - } - - /** - * Processes the tags in a post array of keywords - */ - processTags() - { - var newTags = this.tagString.split(","); - - for (var i = 0, l = newTags.length; i < l; i++) - { - var newTag = newTags[i].trim(); - if (newTag != "" && this.postToken.tags.indexOf(newTag) == -1) - this.postToken.tags.push(newTag); - } - - this.scope.tagForm.$setUntouched(); - this.scope.tagForm.$setPristine(); - - this.tagString = ""; - } - - /** - * Removes a tag from the post array - */ - removeTag(tag : string) - { - this.postToken.tags.splice(this.postToken.tags.indexOf(tag), 1); - } - - /** - * Removes a user from the database - * @param {UsersInterface.IUserEntry} user The user to remove - */ - removePost(post: Modepress.IPost) - { - var that = this; - this.error = false; - this.errorMsg = ""; - this.loading = true; - - that.http.delete(`${that.apiURL}/posts/${post._id}`).then(function (token) - { - if (token.data.error) { - that.error = true; - that.errorMsg = token.data.message; - } - else - that.posts.splice(that.posts.indexOf(post), 1); - - that.loading = false; - (post).confirmDelete = false; - }); - } - - /** - * Removes a category from the database by ID - * @param {modepress.ICategory} category The category to remove - */ - removeCategory(category: Modepress.ICategory) - { - var that = this; - this.error = false; - this.errorMsg = ""; - this.loading = true; - - that.http.delete(`${that.apiURL}/categories/${category._id}`).then(function (token) - { - if (token.data.error) - { - that.error = true; - that.errorMsg = token.data.message; - } - else - { - if (that.postToken.categories.indexOf(category.slug) != -1) - that.postToken.categories.splice(that.postToken.categories.indexOf(category.slug), 1); - - that.categories.splice(that.categories.indexOf(category), 1); - } - - that.loading = false; - }); - } - - /** - * Creates a new user - */ - createPost() - { - this.scope.newPostForm.$setSubmitted(); - - if (this.scope.newPostForm.$valid == false) - return; - - var that = this; - this.error = false; - this.errorMsg = ""; - this.loading = true; - var postToken = this.postToken; - postToken.content = tinymce.editors[0].getContent(); - - if (this.editMode) - { - that.http.put(`${that.apiURL}/posts/${postToken._id}`, postToken).then(function (token) - { - if (token.data.error) - { - that.error = true; - that.errorMsg = token.data.message; - } - else - { - that.successMessage = token.data.message; - for (var i = 0, l = that.posts.length; i < l; i++) - if (that.posts[i]._id == that.postToken._id) - { - that.posts.splice(i, 1, that.postToken); - break; - } - } - - that.loading = false; - }); - } - else - { - that.http.post(`${that.apiURL}/posts`, postToken).then(function (token) - { - if (token.data.error) - { - that.error = true; - that.errorMsg = token.data.message; - } - else - { - that.posts.push(token.data.data); - that.showNewPostForm = false; - } - - that.loading = false; - }); - } - } - - /** - * Creates a new category - */ - createCategory() - { - this.scope.newCategoryForm.$setSubmitted(); - - if (this.scope.newCategoryForm.$valid == false) - return; - - var that = this; - this.error = false; - this.errorMsg = ""; - this.loading = true; - var categoryToken = this.categoryToken; - that.http.post(`${that.apiURL}/categories`, categoryToken).then(function (token) - { - if (token.data.error) - { - that.error = true; - that.errorMsg = token.data.message; - } - else - { - that.categories.push(token.data.data); - that.categoryToken.description = ""; - that.categoryToken.title = ""; - that.categoryToken.slug = ""; - } - - that.loading = false; - - that.scope.newCategoryForm.$setUntouched(); - that.scope.newCategoryForm.$setPristine(); - }); - } - - /** - * Adds this category to the post's selected categories - */ - selectCategory(category: Modepress.ICategory) - { - if (this.postToken.categories.indexOf(category.slug) == -1) - this.postToken.categories.push(category.slug); - else - this.postToken.categories.splice(this.postToken.categories.indexOf(category.slug), 1); - } - } -} \ No newline at end of file diff --git a/admin/lib/states/posts/style.scss b/admin/lib/states/posts/style.scss deleted file mode 100644 index 6779cec4..00000000 --- a/admin/lib/states/posts/style.scss +++ /dev/null @@ -1,142 +0,0 @@ -.posts { - .big-dialog-box { - position:absolute; - top: 5%; - left: 5%; - width: 90%; - height: 90%; - z-index:2; - background:#DDDDDD; - } - - .new-post-form { - overflow: auto; - background: $primary-background; - margin: 10px; - padding: 10px; - - .content-view-detail .label{ - width: auto; - float:none; - line-height: 36px; - margin:0; - } - - .label { - color: $util-text; - font-weight: bold; - margin: 0 0 10px 0; - } - } - - .img-selector { - margin: 0 5px 0 0; - - .button { - line-height: 15px; - } - } - - .categories { - padding: 10px; - box-sizing: border-box; - margin: 15px 0; - overflow:hidden; - - .button { - margin: 20px 0 0 0; - } - } - - .category-buttons { - margin:10px 0 0 0; - } - - form .category-buttons .nav-button { - margin: 0px 0 5px 10px; - padding-bottom: 0px; - } - - .post-categories, .all-categories { - height:100%; - overflow:auto; - } - - .post-categories { - padding: 10px; - min-height: 45px; - border-radius: 5px; - margin: 10px 0 20px 0; - } - - .category-header { - display: inline-block; - color: $util-text; - font-weight: bold; - } - .new-category { - max-height:375px; - margin: 10px 10px; - padding: 20px; - border-radius: 5px; - border: 2px dashed #ccc; - - .label { - margin:0; - } - } - - .tags { - padding: 10px; - box-sizing: border-box; - margin: 15px 0; - - .button { - margin:5px 0 0 0; - } - } - .tag { - float:left; - margin: 0 10px 0 0; - } - .tag-header, .category-header { - margin:0 0 5px 0; - } - - - - .tag-header { - color: $util-text; - font-weight: bold; - } - .tag-content { - padding:10px; - box-sizing:border-box; - } - - .filter-options { - padding:20px 20px 10px 20px; - max-height:200px; - } - - .success{ - display: inline-block; - } - - .content-view-detail { - .preview { - background: $background-light; - padding: 10px; - } - - .buttons { - margin:40px 0 0 0; - text-align: right; - - .nav-button { - margin:0 10px 0 0; - display: inline-block; - } - } - } -} diff --git a/admin/lib/states/register/register-ctrl.ts b/admin/lib/states/register/register-ctrl.ts deleted file mode 100644 index e9280cd8..00000000 --- a/admin/lib/states/register/register-ctrl.ts +++ /dev/null @@ -1,136 +0,0 @@ -module clientAdmin -{ - /** - * Controller for the registration HTML - */ - export class RegisterCtrl - { - private http: ng.IHttpService; - private q: ng.IQService; - private registerToken: UsersInterface.IRegisterToken; - private error: boolean; - private errorMsg: string; - private showSuccessMessage: boolean; - private successMessage: string; - private loading: boolean; - private usersURL: string; - - // $inject annotation. - public static $inject = ["$http", "$q", "capthaPublicKey", "usersURL"]; - constructor(http: ng.IHttpService, q: ng.IQService, capthaPublicKey: string, usersURL: string) - { - this.http = http; - this.q = q; - this.usersURL = usersURL; - - // Create the register token - this.registerToken = { - username: "", - password: "", - email: "", - captcha: "", - challenge: "", - privileges: 3, - meta: {} - }; - - this.error = false; - this.showSuccessMessage = false; - this.errorMsg = ""; - this.successMessage = ""; - this.loading = false; - - // Initialize the google captcha - jQuery('#google-captcha').each(function(){ - Recaptcha.create("6LdiW-USAAAAAGxGfZnQEPP2gDW2NLZ3kSMu3EtT", this, { theme: "white" }); - }); - } - - /** - * Resends the activation link - */ - resendActivation() - { - var that = this; - var token = this.registerToken; - var user = (token.email && token.email != "" ? token.email : token.username); - - this.loading = true; - this.error = false; - this.showSuccessMessage = false; - this.errorMsg = ""; - this.successMessage = ""; - - if (!user || user == "") - { - this.error = true; - this.loading = false; - this.errorMsg = "Please enter a valid email or username"; - return; - } - - this.http.get(`${that.usersURL}/users/${user}/resend-activation`).then(function (response) - { - var responseToken = response.data; - if (responseToken.error) - { - that.error = true; - that.errorMsg = responseToken.message; - } - else - { - that.showSuccessMessage = true; - that.successMessage = responseToken.message; - } - - that.loading = false; - - }).catch(function (err) - { - that.error = true; - that.loading = false; - that.errorMsg = "Could not communicate with server"; - }); - } - - /** - * Attempts to register a new user - */ - register() - { - var that = this; - var token = this.registerToken; - this.error = false; - this.loading = true; - this.showSuccessMessage = false; - this.errorMsg = ""; - this.successMessage = ""; - - token.challenge = Recaptcha.get_challenge(); - token.captcha = Recaptcha.get_response(); - - this.http.post(`${that.usersURL}/users/register`, token).then(function (response) - { - var responseToken = response.data; - if (responseToken.error) - { - that.error = true; - that.errorMsg = responseToken.message; - } - else - { - that.showSuccessMessage = true; - that.successMessage = responseToken.message; - } - - that.loading = false; - - }).catch(function (err) - { - that.loading = false; - that.error = true; - that.errorMsg = "Could not communicate with server"; - }); - } - } -} \ No newline at end of file diff --git a/admin/lib/states/register/register.html b/admin/lib/states/register/register.html deleted file mode 100644 index d773b165..00000000 --- a/admin/lib/states/register/register.html +++ /dev/null @@ -1,26 +0,0 @@ -
-
-
- -
Please enter a valid username
-
-
- -
Please enter a valid password
-
-
- -
Please enter an email
-
Please enter a valid email
-
- -
- -

{{controller.errorMsg}}

-

{{controller.successMessage}}

- - - - -
-
\ No newline at end of file diff --git a/admin/lib/states/register/style.scss b/admin/lib/states/register/style.scss deleted file mode 100644 index 25b26aae..00000000 --- a/admin/lib/states/register/style.scss +++ /dev/null @@ -1,21 +0,0 @@ -.register { - width:30%; - margin:30px auto; - padding:30px; - min-width: 320px; - - .button { - margin: 10px 0 0 0; - } - - img { - margin: 20px 0; - } -} - -@media screen and (max-width:655px) { - .register { - width:auto; - padding:10px 50px 50px 50px; - } -} \ No newline at end of file diff --git a/admin/lib/states/seo/dash-seo.html b/admin/lib/states/seo/dash-seo.html deleted file mode 100644 index aa0d5600..00000000 --- a/admin/lib/states/seo/dash-seo.html +++ /dev/null @@ -1,30 +0,0 @@ -
- - - - - -
-
- -
-
-
-
- -
- -
-
{{render.createdOn | date:"MM/dd/yyyy"}}
-
-
-
-
-
-
\ No newline at end of file diff --git a/admin/lib/states/seo/seo-ctrl.ts b/admin/lib/states/seo/seo-ctrl.ts deleted file mode 100644 index 36cec4e7..00000000 --- a/admin/lib/states/seo/seo-ctrl.ts +++ /dev/null @@ -1,126 +0,0 @@ -module clientAdmin -{ - /** - * Controller for the dashboard users section - */ - export class SEOCtrl - { - protected apiURL: string; - protected cacheURL: string; - protected showRenders: boolean; - protected renders: Array; - - private _q: ng.IQService; - private http: ng.IHttpService; - private error: boolean; - private loading: boolean; - private errorMsg: string; - private pager: IPagerRemote; - private searchTerm: string; - - // $inject annotation. - public static $inject = ["$scope", "$http", "apiURL", "cacheURL", "$q"]; - constructor(scope: any, http: ng.IHttpService, apiURL: string, cacheURL: string, $q : ng.IQService) - { - this.showRenders = true; - this.apiURL = apiURL; - this.cacheURL = cacheURL; - this.renders = []; - - this._q = $q; - this.http = http; - this.loading = false; - this.error = false; - this.errorMsg = ""; - this.searchTerm = ""; - this.pager = this.createPagerRemote(); - } - - /** - * Fetches the users from the database - * @returns {IPagerRemote} - */ - createPagerRemote(): IPagerRemote - { - var that = this; - var remote: IPagerRemote = { - update: function(index?: number, limit? : number) - { - that.error = false; - that.errorMsg = ""; - that.loading = true; - - return new that._q(function(resolve, reject) - { - that.http.get(`${that.apiURL}/renders/get-renders?index=${index}&verbose=true&limit=${limit}&search=${that.searchTerm}`).then(function (token) - { - if (token.data.error) { - that.error = true; - that.errorMsg = token.data.message; - that.renders = []; - resolve(1); - } - else { - that.renders = token.data.data; - resolve(token.data.count); - } - - that.loading = false; - }); - }); - } - }; - - return remote; - } - - /** - * Clears all render items - */ - clearRenders() - { - var that = this; - this.error = false; - this.errorMsg = ""; - this.loading = true; - - that.http.delete(`${that.apiURL}/renders/clear-renders`).then(function (token) - { - if (token.data.error) - { - that.error = true; - that.errorMsg = token.data.message; - } - else - that.renders = []; - - that.loading = false; - }); - } - - /** - * Removes a render from the database - */ - removeRender(render: Modepress.IRender) - { - var that = this; - this.error = false; - this.errorMsg = ""; - this.loading = true; - - that.http.delete(`${that.apiURL}/renders/remove-render/${render._id}`).then(function (token) - { - if (token.data.error) - { - that.error = true; - that.errorMsg = token.data.message; - } - else - that.renders.splice(that.renders.indexOf(render), 1); - - that.loading = false; - (render).confirmDelete = false; - }); - } - } -} \ No newline at end of file diff --git a/admin/lib/states/seo/style.scss b/admin/lib/states/seo/style.scss deleted file mode 100644 index f8c35daa..00000000 --- a/admin/lib/states/seo/style.scss +++ /dev/null @@ -1,36 +0,0 @@ -.seo { - - .sub-menu { - .nav-button { - margin: 15px 0 0 0; - } - } - - .div-list { - margin: 10px; - font-size: 20px; - text-decoration: none; - background: #fff; - padding: 5px; - - .left { - float: left; - } - - .right { - float: right; - margin: 0 10px 0 0; - } - - div { - font-size: inherit; - } - - a { - text-decoration: none; - margin:20px 0; - font-size:20px; - text-decoration: none; - } - } -} \ No newline at end of file diff --git a/admin/lib/states/users/dash-users.html b/admin/lib/states/users/dash-users.html deleted file mode 100644 index dc4f3528..00000000 --- a/admin/lib/states/users/dash-users.html +++ /dev/null @@ -1,84 +0,0 @@ -
- - - - -
- - -
-
- - -
{{controller.successMessage}}
-
-
- - -
-
-
- - -
Please enter a valid username
-
- - -
Please enter an email
-
Please enter a valid email
-
- - -
Please enter a valid password
-
- - - -
-
- -
-
- - - -
{{user.username}}
-
- - -
{{user._id}}
-
- -
{{user.email}}
-
- -
{{(user.privileges == 1 ? "Super Admin" : ( user.privileges == 2 ? "Admin" : "Regular User") )}}
-
- -
{{user.password}}
-
- -
{{user.passwordTag}}
-
- -
{{user.registerKey}}
-
- -
{{user.lastLoggedIn | date:"MM/dd/yyyy 'at' h:mma"}}
-
-
- -
-
-
-
-
-
-
\ No newline at end of file diff --git a/admin/lib/states/users/style.scss b/admin/lib/states/users/style.scss deleted file mode 100644 index d20eb7c2..00000000 --- a/admin/lib/states/users/style.scss +++ /dev/null @@ -1,21 +0,0 @@ -.users{ - .new-user-form { - overflow: auto; - background: $primary-background; - margin: 10px; - padding: 10px; - } - - .content-view-detail { - - .buttons { - margin:40px 0 0 0; - text-align: right; - - .nav-button { - margin:0 10px 0 0; - display: inline-block; - } - } - } -} diff --git a/admin/lib/states/users/users-ctrl.ts b/admin/lib/states/users/users-ctrl.ts deleted file mode 100644 index 27048109..00000000 --- a/admin/lib/states/users/users-ctrl.ts +++ /dev/null @@ -1,146 +0,0 @@ -module clientAdmin -{ - /** - * Controller for the dashboard users section - */ - export class UsersCtrl - { - private newUser: { username: string; password: string; email: string; type: string; privileges: number }; - private usersURL: string; - protected users: Array; - public showUserForm: boolean; - public scope: any; - - private _q: ng.IQService; - private http: ng.IHttpService; - private error: boolean; - private loading: boolean; - private errorMsg: string; - private pager: IPagerRemote; - private searchTerm: string; - - // $inject annotation. - public static $inject = ["$scope", "$http", "usersURL", "$q"]; - constructor(scope: any, http: ng.IHttpService, usersURL: string, $q: ng.IQService) - { - this.http = http; - this.scope = scope; - this.usersURL = usersURL; - this.users = []; - this.showUserForm = false; - this.newUser = { email: "", password: "", username: "", type: "3", privileges: 3 }; - - this._q = $q; - this.loading = false; - this.error = false; - this.errorMsg = ""; - this.searchTerm = ""; - this.pager = this.createPagerRemote(); - - scope.removeUser = this.removeUser.bind(this); - } - - /** - * Opens the new user form - */ - newUserMode() - { - this.scope.newUserForm.$setUntouched(); - this.scope.newUserForm.$setPristine(); - this.showUserForm = !this.showUserForm - } - - /** - * Fetches the users from the database - * @returns {IPagerRemote} - */ - createPagerRemote(): IPagerRemote - { - var that = this; - var remote: IPagerRemote = { - update: function(index?: number, limit? : number) - { - that.error = false; - that.errorMsg = ""; - - return new that._q(function(resolve, reject) - { - that.http.get(`${that.usersURL}/users?verbose=true&index=${index}&limit=${limit}&search=${that.searchTerm}`).then(function (token) - { - if (token.data.error) { - that.error = true; - that.errorMsg = token.data.message; - that.users = []; - resolve(1); - } - else { - that.users = token.data.data; - resolve(token.data.count); - } - - that.loading = false; - }); - }); - } - }; - - return remote; - } - - /** - * Removes a user from the database - * @param {UsersInterface.IUserEntry} user The user to remove - */ - removeUser(user: UsersInterface.IUserEntry) - { - var that = this; - this.error = false; - this.errorMsg = ""; - this.loading = true; - - that.http.delete(`${that.usersURL}/users/${user.username}`).then(function (token) - { - if (token.data.error) { - that.error = true; - that.errorMsg = token.data.message; - } - else - that.users.splice(that.users.indexOf(user), 1); - - that.loading = false; - (user).confirmDelete = false; - }); - } - - /** - * Creates a new user - */ - createNewUser() - { - this.scope.newUserForm.$setSubmitted(); - - if (this.scope.newUserForm.$valid == false) - return; - - var that = this; - this.error = false; - this.errorMsg = ""; - this.loading = true; - var registerToken = this.newUser; - - registerToken.privileges = registerToken.type == "2" ? 2 : 3; - - that.http.post(`${that.usersURL}/users`, registerToken).then(function(token) - { - if (token.data.error) { - that.error = true; - that.errorMsg = token.data.message; - } - else - that.users.push(token.data.data); - - that.loading = false; - }); - } - } -} \ No newline at end of file diff --git a/admin/lib/style.scss b/admin/lib/style.scss deleted file mode 100644 index 37ed19cd..00000000 --- a/admin/lib/style.scss +++ /dev/null @@ -1,223 +0,0 @@ -@import "temp-css/sprites.scss"; // Generated in the build process - -$background-light : #FAFAFA; -$border-light: #CFCFCF; -$primary-background: #fff; -$highlighted-text: #fff; -$util-background: #74A2E0; -$confirm-background: #84D86C; -$warning-background: #ea6363; -$subtle-background: #E0E0E0; -$util-text: $util-background; - - -@import 'css/utils.scss'; -@import 'css/bootstrap.scss'; -@import 'css/animations.scss'; - - -/** -====================================================== - IMPORTS -====================================================== -**/ -@import 'directives/error-modal/style.scss'; -@import 'directives/pager/style.scss'; -@import 'directives/buttons/style.scss'; -@import 'directives/search-bar/style.scss'; -@import 'directives/item-panel/style.scss'; -@import 'directives/state-header/style.scss'; -@import 'directives/tick-box/style.scss'; -@import 'directives/detail/style.scss'; -@import 'states/default/style.scss'; -@import 'states/login/style.scss'; -@import 'states/register/style.scss'; -@import 'states/media/style.scss'; -@import 'states/message/style.scss'; -@import 'states/password-reset/style.scss'; -@import 'states/posts/style.scss'; -@import 'states/seo/style.scss'; -@import 'states/users/style.scss'; - -/** -====================================================== - CSS LAYOUT DEFINITIONS -====================================================== -Please only put css rules in here for layout related requirements. - - eg: How to format a list or table -**/ -.right { - float:right; -} -.left{ - float:left; -} -.fix { - clear: both; - height:0; -} -.state { - position: relative; - height: 100%; -} -form .error { - margin:5px 0 25px 0; -} -form .error { - line-height: 30px; - opacity: 1; -} -form .error.ng-hide { - line-height: 0px; - opacity: 0; -} -form .error.ng-hide-add.ng-hide-add-active, -form .error.ng-hide-remove.ng-hide-remove-active { - -webkit-transition: all linear 0.25s; - transition: all linear 0.25s; -} -form input[type="text"], form input[type="password"], form input[type="email"] { - width: 100%; - padding: 3px; - margin: 6px 0 5px 0; - box-sizing: border-box; - float: none; -} -form .nav-button { - margin:15px 0 0 0; - padding-bottom:10px; - display:block; -} -.login img { - margin: 20px 0; -} - -.main-view { - height:100%; - min-width:800px; -} -.content-view { - box-sizing: border-box; - overflow: auto; - height: 85%; - height: calc(100% - 130px); -} -.content-page { - height: calc(100% - 50px); - overflow: auto; -} -.label span.info { - margin: 0 0 0 4px; - float: right; -} -.nav-button { - display:inline-block; -} -.content-view form input[type="submit"]{ - margin: 20px 0 20px 10px; -} -.content-view .dropdown { - width:300px; - margin:10px 0; -} -.red .cross { - -ms-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - transform: rotate(45deg); - cursor:pointer; -} -.filter-group { - float: left; - margin: 0 20px 0 0; - padding: 10px; - border-radius: 10px; -} -.filter-group .label { - margin: 0 0 10px 0; -} - - -/** -====================================================== - CSS MODULE DEFINITIONS -====================================================== -Please only put css rules in here for generalized modules. - - eg: classes for highlighting text on certain pages -**/ -.background-tiles { - background-color: white; - background-image: -webkit-linear-gradient(45deg,#efefef 25%,transparent 25%,transparent 75%,#efefef 75%,#efefef),-webkit-linear-gradient(45deg,#efefef 25%,transparent 25%,transparent 75%,#efefef 75%,#efefef); - background-image: linear-gradient(45deg,#efefef 25%,transparent 25%,transparent 75%,#efefef 75%,#efefef),linear-gradient(45deg,#efefef 25%,transparent 25%,transparent 75%,#efefef 75%,#efefef); - background-position: 0 0,10px 10px; - -webkit-background-size: 21px 21px; - background-size: 21px 21px; -} -.unselectable { - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; -} -form input[type="text"], form input[type="password"], form input[type="email"] { - color: #555; - font-weight: 200; - font-size: 24px; - padding:10px; - line-height: 1; - border: 1px solid #eee; - background: $background-light; - outline: 0; -} -form input[type="text"].ng-invalid.ng-dirty, form input[type="password"].ng-invalid.ng-dirty, form input[type="email"].ng-invalid.ng-dirty { - background:#FFD9D9; -} -form input[type="text"].ng-valid.ng-dirty, form input[type="password"].ng-valid.ng-dirty, form input[type="email"].ng-valid.ng-dirty { - background:#d6ffd6; -} -.nav-button { - text-decoration: none; - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; -} -.nav-button a { - color:#325D98; - text-decoration: none; - cursor:pointer; -} -.nav-button a:hover { - border-bottom: 1px solid $util-background; -} -.nav-button.red-highlight a:hover { - color:red; -} - -form label { - font-weight:bold; - color:#4D7EC0; -} - -.label span.info { - color: #ccc; - font-style: italic; - font-weight: normal; -} -.view-item-label.date { - float:right; -} -.view-item-label { - background: $background-light; -} -.view-item-label.date, .slug { - font-size: 20px; - color: #aaa; - margin:0 0 0 5px; -} -.filter-group .label { - font-weight:bold; -} -.filter-group { - background: $primary-background; -} -@import 'css/shapes.scss'; \ No newline at end of file diff --git a/admin/package.json b/admin/package.json deleted file mode 100644 index ab71712c..00000000 --- a/admin/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "modepress-admin-client", - "version": "0.3.2", - "description": "The modepress admin client for interacting with the API", - "main": "gulpfile.js", - "author": "Mathew Henson", - "license": "MIT", - "devDependencies": { - "gulp": "^3.9.1", - "gulp-typescript": "^2.13.5", - "gulp-concat": "^2.6.0", - "merge-stream": "^1.0.0", - "gulp-gunzip": "^0.0.3", - "request": "^2.72.0", - "vinyl-source-stream": "^1.1.0", - "gulp-untar": "^0.0.4", - "gulp-util": "^3.0.7", - "gulp-filter" : "^4.0.0", - "gulp-ng-html2js": "^0.2.2", - "gulp-minify-html": "^1.0.6", - "gulp-uglify": "^1.5.4", - "sprity-lwip": "https://github.com/chadwatson/sprity-lwip/tarball/cbbe0f1d0a5033be04e8682a19d8ff59e2cf3625", - "sprity": "^1.0.8", - "node-sass": "^3.8.0", - "sprity-sass": "^1.0.4", - "gulp-clean-css" : "^2.0.11", - "gulp-if": "^2.0.1", - "gulp-sass": "^2.3.1", - "rimraf": "^2.5.2", - "gulp-download": "^0.0.1", - "gulp-rename": "^1.2.2" - } -} \ No newline at end of file diff --git a/admin/tsconfig.json b/admin/tsconfig.json deleted file mode 100644 index 44ecb5b8..00000000 --- a/admin/tsconfig.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "compilerOptions": { - "module": "amd", - "removeComments": false, - "noEmitOnError": true, - "declaration": false, - "sourceMap": false, - "preserveConstEnums": true, - "target": "es5", - "allowUnreachableCode": false, - "allowUnusedLabels": false, - "outFile": "./dist/main.js", - "noImplicitAny" : false - }, - "files": [ - "../server/src/definitions/custom/modepress-api.d.ts", - "lib/references.d.ts", - "lib/states/seo/seo-ctrl.ts", - "lib/states/login/login-ctrl.ts", - "lib/states/register/register-ctrl.ts", - "lib/states/password-reset/password-ctrl.ts", - "lib/states/media/media-ctrl.ts", - "lib/states/users/users-ctrl.ts", - "lib/states/posts/posts-ctrl.ts", - "lib/directives/pager/pager.ts", - "lib/directives/search-bar/search-bar.ts", - "lib/directives/buttons/buttons.ts", - "lib/directives/detail/detail.ts", - "lib/directives/error-modal/error-modal.ts", - "lib/directives/item-panel/item-panel.ts", - "lib/directives/state-header/state-header.ts", - "lib/directives/tick-box/tick-box.ts", - "lib/authenticator.ts", - "lib/config.ts", - "lib/application.ts" - ] -} \ No newline at end of file