diff --git a/src/client/app/admin/admin.controller.js b/src/client/app/admin/admin.controller.js index fe0a319..3d18681 100644 --- a/src/client/app/admin/admin.controller.js +++ b/src/client/app/admin/admin.controller.js @@ -1,21 +1,15 @@ -var app; -(function (app) { - var admin; - (function (admin) { - 'use strict'; - var AdminController = (function () { - function AdminController(logger) { - this.logger = logger; - this.title = 'Admin'; - this.logger.info('Activated Admin View'); - } - AdminController.$inject = ['logger']; - return AdminController; - })(); - admin.AdminController = AdminController; - angular - .module('app.admin') - .controller('AdminController', AdminController); - })(admin = app.admin || (app.admin = {})); -})(app || (app = {})); +'use strict'; +var AdminController = (function () { + function AdminController(logger) { + this.logger = logger; + this.title = 'Admin'; + this.logger.info('Activated Admin View'); + } + AdminController.$inject = ['logger']; + return AdminController; +})(); +exports.AdminController = AdminController; +angular + .module('app.admin') + .controller('AdminController', AdminController); //# sourceMappingURL=admin.controller.js.map \ No newline at end of file diff --git a/src/client/app/admin/admin.controller.js.map b/src/client/app/admin/admin.controller.js.map index 741fa26..27e86c8 100644 --- a/src/client/app/admin/admin.controller.js.map +++ b/src/client/app/admin/admin.controller.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.controller.js","sourceRoot":"","sources":["admin.controller.ts"],"names":["app","app.admin","app.admin.AdminController","app.admin.AdminController.constructor"],"mappings":"AAAA,IAAO,GAAG,CAkBT;AAlBD,WAAO,GAAG;IAACA,IAAAA,KAAKA,CAkBfA;IAlBUA,WAAAA,KAAKA,EAACA,CAACA;QACdC,YAAYA,CAACA;QAKbA;YAIIC,yBAAoBA,MAA4BA;gBAA5BC,WAAMA,GAANA,MAAMA,CAAsBA;gBAHhDA,UAAKA,GAAWA,OAAOA,CAACA;gBAIpBA,IAAIA,CAACA,MAAMA,CAACA,IAAIA,CAACA,sBAAsBA,CAACA,CAACA;YAC7CA,CAACA;YAHMD,uBAAOA,GAAkBA,CAACA,QAAQA,CAACA,CAACA;YAI/CA,sBAACA;QAADA,CAACA,AAPDD,IAOCA;QAPYA,qBAAeA,kBAO3BA,CAAAA;QAEDA,OAAOA;aACFA,MAAMA,CAACA,WAAWA,CAACA;aACnBA,UAAUA,CAACA,iBAAiBA,EAAEA,eAAeA,CAACA,CAACA;IACxDA,CAACA,EAlBUD,KAAKA,GAALA,SAAKA,KAALA,SAAKA,QAkBfA;AAADA,CAACA,EAlBM,GAAG,KAAH,GAAG,QAkBT"} \ No newline at end of file +{"version":3,"file":"admin.controller.js","sourceRoot":"","sources":["admin.controller.ts"],"names":["AdminController","AdminController.constructor"],"mappings":"AAEA,YAAY,CAAC;AAKb;IAIIA,yBAAoBA,MAAcA;QAAdC,WAAMA,GAANA,MAAMA,CAAQA;QAHlCA,UAAKA,GAAWA,OAAOA,CAACA;QAIpBA,IAAIA,CAACA,MAAMA,CAACA,IAAIA,CAACA,sBAAsBA,CAACA,CAACA;IAC7CA,CAACA;IAHMD,uBAAOA,GAAkBA,CAACA,QAAQA,CAACA,CAACA;IAI/CA,sBAACA;AAADA,CAACA,AAPD,IAOC;AAPY,uBAAe,kBAO3B,CAAA;AAED,OAAO;KACF,MAAM,CAAC,WAAW,CAAC;KACnB,UAAU,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/admin/admin.controller.ts b/src/client/app/admin/admin.controller.ts index 8c4057c..3cb2b5f 100644 --- a/src/client/app/admin/admin.controller.ts +++ b/src/client/app/admin/admin.controller.ts @@ -1,19 +1,19 @@ -module app.admin { - 'use strict'; +import { Logger } from '../blocks/logger/logger'; - interface IAdminVm { - title: string; - } - export class AdminController implements IAdminVm { - title: string = 'Admin'; +'use strict'; - static $inject: Array = ['logger']; - constructor(private logger: blocks.logger.Logger) { - this.logger.info('Activated Admin View'); - } - } +interface IAdminVm { + title: string; +} +export class AdminController implements IAdminVm { + title: string = 'Admin'; - angular - .module('app.admin') - .controller('AdminController', AdminController); + static $inject: Array = ['logger']; + constructor(private logger: Logger) { + this.logger.info('Activated Admin View'); + } } + +angular + .module('app.admin') + .controller('AdminController', AdminController); diff --git a/src/client/app/admin/admin.module.js b/src/client/app/admin/admin.module.js index e19ae18..9ded50a 100644 --- a/src/client/app/admin/admin.module.js +++ b/src/client/app/admin/admin.module.js @@ -1,12 +1,6 @@ -var app; -(function (app) { - var admin; - (function (admin) { - 'use strict'; - angular.module('app.admin', [ - 'app.core', - 'app.widgets' - ]); - })(admin = app.admin || (app.admin = {})); -})(app || (app = {})); +'use strict'; +angular.module('app.admin', [ + 'app.core', + 'app.widgets' +]); //# sourceMappingURL=admin.module.js.map \ No newline at end of file diff --git a/src/client/app/admin/admin.module.js.map b/src/client/app/admin/admin.module.js.map index 0d5b4d8..64d2940 100644 --- a/src/client/app/admin/admin.module.js.map +++ b/src/client/app/admin/admin.module.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.module.js","sourceRoot":"","sources":["admin.module.ts"],"names":["app","app.admin"],"mappings":"AAAA,IAAO,GAAG,CAOT;AAPD,WAAO,GAAG;IAACA,IAAAA,KAAKA,CAOfA;IAPUA,WAAAA,KAAKA,EAACA,CAACA;QACdC,YAAYA,CAACA;QAEbA,OAAOA,CAACA,MAAMA,CAACA,WAAWA,EAAEA;YACxBA,UAAUA;YACVA,aAAaA;SACdA,CAACA,CAACA;IACTA,CAACA,EAPUD,KAAKA,GAALA,SAAKA,KAALA,SAAKA,QAOfA;AAADA,CAACA,EAPM,GAAG,KAAH,GAAG,QAOT"} \ No newline at end of file +{"version":3,"file":"admin.module.js","sourceRoot":"","sources":["admin.module.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE;IACxB,UAAU;IACV,aAAa;CAChB,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/admin/admin.module.ts b/src/client/app/admin/admin.module.ts index 27f5c49..21ffc8a 100644 --- a/src/client/app/admin/admin.module.ts +++ b/src/client/app/admin/admin.module.ts @@ -1,8 +1,6 @@ -module app.admin { - 'use strict'; +'use strict'; - angular.module('app.admin', [ - 'app.core', - 'app.widgets' - ]); -} +angular.module('app.admin', [ + 'app.core', + 'app.widgets' +]); diff --git a/src/client/app/admin/admin.route.js b/src/client/app/admin/admin.route.js index c64154a..2f55293 100644 --- a/src/client/app/admin/admin.route.js +++ b/src/client/app/admin/admin.route.js @@ -1,37 +1,34 @@ -var app; -(function (app) { - var admin; - (function (admin) { - 'use strict'; - angular - .module('app.admin') - .config(configureStates); - configureStates.$inject = ['$stateProvider']; - /* @ngInject */ - function configureStates($stateProvider) { - var states = getStates(); - states.forEach(function (state) { - $stateProvider.state(state.state, state.config); - }); - } - function getStates() { - return [ - { - state: 'admin', - config: { - url: '/admin', - templateUrl: 'app/admin/admin.html', - controller: 'AdminController', - controllerAs: 'vm', - title: 'Admin', - settings: { - nav: 2, - content: ' Admin' - } +'use strict'; +var AdminRoute = (function () { + function AdminRoute($stateProvider) { + this.states = [ + { + state: 'admin', + config: { + url: '/admin', + templateUrl: 'app/admin/admin.html', + controller: 'AdminController', + controllerAs: 'vm', + title: 'Admin', + settings: { + nav: 2, + content: ' Admin' } } - ]; - } - })(admin = app.admin || (app.admin = {})); -})(app || (app = {})); + } + ]; + this.configureStates(); + } + AdminRoute.prototype.configureStates = function () { + // var states: any[] = this.states; + this.states.forEach(function (state) { + this.$stateProvider.state(state.state, state.config); + }); + }; + AdminRoute.$inject = ['stateProvider']; + return AdminRoute; +})(); +angular + .module('app.admin') + .config(AdminRoute); //# sourceMappingURL=admin.route.js.map \ No newline at end of file diff --git a/src/client/app/admin/admin.route.js.map b/src/client/app/admin/admin.route.js.map index 23e3c18..83b0705 100644 --- a/src/client/app/admin/admin.route.js.map +++ b/src/client/app/admin/admin.route.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.route.js","sourceRoot":"","sources":["admin.route.ts"],"names":["app","app.admin","app.admin.configureStates","app.admin.getStates"],"mappings":"AAAA,IAAO,GAAG,CAkCT;AAlCD,WAAO,GAAG;IAACA,IAAAA,KAAKA,CAkCfA;IAlCUA,WAAAA,KAAKA,EAACA,CAACA;QACdC,YAAYA,CAACA;QAEbA,OAAOA;aACFA,MAAMA,CAACA,WAAWA,CAACA;aACnBA,MAAMA,CAACA,eAAeA,CAACA,CAACA;QAE7BA,eAAeA,CAACA,OAAOA,GAAGA,CAACA,gBAAgBA,CAACA,CAACA;QAE7CA,AADAA,eAAeA;iCACUA,cAAoCA;YACzDC,IAAIA,MAAMA,GAAUA,SAASA,EAAEA,CAACA;YAChCA,MAAMA,CAACA,OAAOA,CAACA,UAAUA,KAAKA;gBAC1B,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YACpD,CAAC,CAACA,CAACA;QACPA,CAACA;QAEDD;YACIE,MAAMA,CAACA;gBACHA;oBACIA,KAAKA,EAAEA,OAAOA;oBACdA,MAAMA,EAAEA;wBACJA,GAAGA,EAAEA,QAAQA;wBACbA,WAAWA,EAAEA,sBAAsBA;wBACnCA,UAAUA,EAAEA,iBAAiBA;wBAC7BA,YAAYA,EAAEA,IAAIA;wBAClBA,KAAKA,EAAEA,OAAOA;wBACdA,QAAQA,EAAEA;4BACNA,GAAGA,EAAEA,CAACA;4BACNA,OAAOA,EAAEA,kCAAkCA;yBAC9CA;qBACJA;iBACJA;aACJA,CAACA;QACNA,CAACA;IACLF,CAACA,EAlCUD,KAAKA,GAALA,SAAKA,KAALA,SAAKA,QAkCfA;AAADA,CAACA,EAlCM,GAAG,KAAH,GAAG,QAkCT"} \ No newline at end of file +{"version":3,"file":"admin.route.js","sourceRoot":"","sources":["admin.route.ts"],"names":["AdminRoute","AdminRoute.constructor","AdminRoute.configureStates"],"mappings":"AAAA,YAAY,CAAC;AAGb;IAEIA,oBAAYA,cAAoCA;QAUhDC,WAAMA,GAAUA;YACZA;gBACIA,KAAKA,EAAEA,OAAOA;gBACdA,MAAMA,EAAEA;oBACJA,GAAGA,EAAEA,QAAQA;oBACbA,WAAWA,EAAEA,sBAAsBA;oBACnCA,UAAUA,EAAEA,iBAAiBA;oBAC7BA,YAAYA,EAAEA,IAAIA;oBAClBA,KAAKA,EAAEA,OAAOA;oBACdA,QAAQA,EAAEA;wBACNA,GAAGA,EAAEA,CAACA;wBACNA,OAAOA,EAAEA,kCAAkCA;qBAC9CA;iBACJA;aACJA;SACJA,CAACA;QAxBEA,IAAIA,CAACA,eAAeA,EAAEA,CAAAA;IAC1BA,CAACA;IACDD,oCAAeA,GAAfA;QAEIE,AADAA,mCAAmCA;QACnCA,IAAIA,CAACA,MAAMA,CAACA,OAAOA,CAACA,UAASA,KAAKA;YAC9B,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QACzD,CAAC,CAACA,CAACA;IACPA,CAACA;IATMF,kBAAOA,GAAkBA,CAACA,eAAeA,CAACA,CAACA;IA2BtDA,iBAACA;AAADA,CAACA,AA5BD,IA4BC;AAED,OAAO;KACF,MAAM,CAAC,WAAW,CAAC;KACnB,MAAM,CAAC,UAAU,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/admin/admin.route.ts b/src/client/app/admin/admin.route.ts index 15c218c..eaba582 100644 --- a/src/client/app/admin/admin.route.ts +++ b/src/client/app/admin/admin.route.ts @@ -1,35 +1,36 @@ -module app.admin { - 'use strict'; +'use strict'; - angular - .module('app.admin') - .config(configureStates); - configureStates.$inject = ['$stateProvider']; - /* @ngInject */ - function configureStates($stateProvider: ng.ui.IStateProvider) { - var states: any[] = getStates(); - states.forEach(function (state) { - $stateProvider.state(state.state, state.config); +class AdminRoute { + static $inject: Array = ['stateProvider']; + constructor($stateProvider: ng.ui.IStateProvider) { + this.configureStates() + } + configureStates() { + // var states: any[] = this.states; + this.states.forEach(function(state) { + this.$stateProvider.state(state.state, state.config); }); } - function getStates(): any[] { - return [ - { - state: 'admin', - config: { - url: '/admin', - templateUrl: 'app/admin/admin.html', - controller: 'AdminController', - controllerAs: 'vm', - title: 'Admin', - settings: { - nav: 2, - content: ' Admin' - } + states: any[] = [ + { + state: 'admin', + config: { + url: '/admin', + templateUrl: 'app/admin/admin.html', + controller: 'AdminController', + controllerAs: 'vm', + title: 'Admin', + settings: { + nav: 2, + content: ' Admin' } } - ]; - } + } + ]; } + +angular + .module('app.admin') + .config(AdminRoute); diff --git a/src/client/app/app.module.js b/src/client/app/app.module.js index 401b0a3..f381045 100644 --- a/src/client/app/app.module.js +++ b/src/client/app/app.module.js @@ -1,12 +1,9 @@ -var app; -(function (app) { - 'use strict'; - angular.module('app', [ - 'app.core', - 'app.widgets', - 'app.admin', - 'app.dashboard', - 'app.layout' - ]); -})(app || (app = {})); +'use strict'; +angular.module('app', [ + 'app.core', + 'app.widgets', + 'app.admin', + 'app.dashboard', + 'app.layout' +]); //# sourceMappingURL=app.module.js.map \ No newline at end of file diff --git a/src/client/app/app.module.js.map b/src/client/app/app.module.js.map index 87b85e0..1cae3c0 100644 --- a/src/client/app/app.module.js.map +++ b/src/client/app/app.module.js.map @@ -1 +1 @@ -{"version":3,"file":"app.module.js","sourceRoot":"","sources":["app.module.ts"],"names":["app"],"mappings":"AAAA,IAAO,GAAG,CAUT;AAVD,WAAO,GAAG,EAAC,CAAC;IACRA,YAAYA,CAACA;IAEbA,OAAOA,CAACA,MAAMA,CAACA,KAAKA,EAAEA;QAClBA,UAAUA;QACVA,aAAaA;QACbA,WAAWA;QACXA,eAAeA;QACfA,YAAYA;KACfA,CAACA,CAACA;AACPA,CAACA,EAVM,GAAG,KAAH,GAAG,QAUT"} \ No newline at end of file +{"version":3,"file":"app.module.js","sourceRoot":"","sources":["app.module.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE;IAClB,UAAU;IACV,aAAa;IACb,WAAW;IACX,eAAe;IACf,YAAY;CACf,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/app.module.ts b/src/client/app/app.module.ts index de30812..b921f5e 100644 --- a/src/client/app/app.module.ts +++ b/src/client/app/app.module.ts @@ -1,11 +1,9 @@ -module app { - 'use strict'; +'use strict'; - angular.module('app', [ - 'app.core', - 'app.widgets', - 'app.admin', - 'app.dashboard', - 'app.layout' - ]); -} +angular.module('app', [ + 'app.core', + 'app.widgets', + 'app.admin', + 'app.dashboard', + 'app.layout' +]); diff --git a/src/client/app/blocks/exception/exception-handler.provider.js b/src/client/app/blocks/exception/exception-handler.provider.js index 48214a8..900f895 100644 --- a/src/client/app/blocks/exception/exception-handler.provider.js +++ b/src/client/app/blocks/exception/exception-handler.provider.js @@ -1,60 +1,51 @@ // Include in index.html so that app level exceptions are handled. // Exclude from testRunner.html which should run exactly what it wants to run -var blocks; -(function (blocks) { - var exception; - (function (exception_1) { - 'use strict'; - var ExceptionHandlerProvider = (function () { - function ExceptionHandlerProvider() { - var _this = this; - this.config = { - appErrorPrefix: undefined - }; - this.$get = function () { return { config: _this.config }; }; - } - ExceptionHandlerProvider.prototype.configure = function (appErrorPrefix) { - this.config.appErrorPrefix = appErrorPrefix; - }; - ExceptionHandlerProvider.$inject = []; - return ExceptionHandlerProvider; - })(); - exception_1.ExceptionHandlerProvider = ExceptionHandlerProvider; - config.$inject = ['$provide']; - function config($provide) { - $provide.decorator('$exceptionHandler', extendExceptionHandler); - } - extendExceptionHandler.$inject = ['$delegate', 'exceptionHandler', 'logger']; - /** - * Extend the $exceptionHandler service to also display a toast. - * @param {Object} $delegate - * @param {Object} exceptionHandler - * @param {Object} logger - * @return {Function} the decorated $exceptionHandler service - */ - function extendExceptionHandler($delegate, exceptionHandler, logger) { - return function (exception, cause) { - // var appErrorPrefix = '[Error] '; - var appErrorPrefix = exceptionHandler.config.appErrorPrefix || ''; - var errorData = { exception: exception, cause: cause }; - exception.message = appErrorPrefix + exception.message; - $delegate(exception, cause); - /** - * Could add the error to a service's collection, - * add errors to $rootScope, log errors to remote web server, - * or log locally. Or throw hard. It is entirely up to you. - * throw exception; - * - * @example - * throw { message: 'error message we added' }; - */ - logger.error(exception.message, errorData); - }; - } - angular - .module('blocks.exception') - .provider('exceptionHandler', ExceptionHandlerProvider) - .config(config); - })(exception = blocks.exception || (blocks.exception = {})); -})(blocks || (blocks = {})); +'use strict'; +var ExceptionHandlerProvider = (function () { + function ExceptionHandlerProvider() { + var _this = this; + this.config = { + appErrorPrefix: undefined + }; + this.$get = function () { return { config: _this.config }; }; + } + ExceptionHandlerProvider.prototype.configure = function (appErrorPrefix) { + this.config.appErrorPrefix = appErrorPrefix; + }; + ExceptionHandlerProvider.$inject = []; + return ExceptionHandlerProvider; +})(); +exports.ExceptionHandlerProvider = ExceptionHandlerProvider; +var ExceptionHandlerConfig = (function () { + function ExceptionHandlerConfig($provide, $delegate, exceptionHandler, logger) { + $provide.decorator('$exceptionHandler', this.extendedExceptionHandler); + } + // configure() { + // this.$provide.decorator('$exceptionHandler', this.extendedExceptionHandler); + // } + ExceptionHandlerConfig.prototype.extendedExceptionHandler = function () { + return function (exception, cause) { + var appErrorPrefix = this.exceptionHandler.config.appErrorPrefix || ''; + var errorData = { exception: exception, cause: cause }; + exception.message = appErrorPrefix + exception.message; + this.$delegate(exception, cause); + /** + * Could add the error to a service's collection, + * add errors to $rootScope, log errors to remote web server, + * or log locally. Or throw hard. It is entirely up to you. + * throw exception; + * + * @example + * throw { message: 'error message we added' }; + */ + this.logger.error(exception.message, errorData); + }; + }; + ExceptionHandlerConfig.$inject = ['$delegate', '$provide', 'exceptionHandler', 'logger']; + return ExceptionHandlerConfig; +})(); +angular + .module('blocks.exception') + .provider('exceptionHandler', ExceptionHandlerProvider) + .config(ExceptionHandlerConfig); //# sourceMappingURL=exception-handler.provider.js.map \ No newline at end of file diff --git a/src/client/app/blocks/exception/exception-handler.provider.js.map b/src/client/app/blocks/exception/exception-handler.provider.js.map index f5a1c71..a883f2b 100644 --- a/src/client/app/blocks/exception/exception-handler.provider.js.map +++ b/src/client/app/blocks/exception/exception-handler.provider.js.map @@ -1 +1 @@ -{"version":3,"file":"exception-handler.provider.js","sourceRoot":"","sources":["exception-handler.provider.ts"],"names":["blocks","blocks.exception","blocks.exception.ExceptionHandlerProvider","blocks.exception.ExceptionHandlerProvider.constructor","blocks.exception.ExceptionHandlerProvider.configure","blocks.exception.config","blocks.exception.extendExceptionHandler"],"mappings":"AAAA,kEAAkE;AAClE,6EAA6E;AAE7E,IAAO,MAAM,CA0DZ;AA1DD,WAAO,MAAM;IAACA,IAAAA,SAASA,CA0DtBA;IA1DaA,WAAAA,WAASA,EAACA,CAACA;QACrBC,YAAYA,CAACA;QAKbA;YAEIC;gBAFJC,iBAWCA;gBARGA,WAAMA,GAA4BA;oBAC9BA,cAAcA,EAAEA,SAASA;iBAC5BA,CAAAA;gBAKDA,SAAIA,GAA8CA,cAAQA,MAAMA,CAACA,EAAEA,MAAMA,EAAEA,KAAIA,CAACA,MAAMA,EAAEA,CAACA,CAACA,CAACA,CAAAA;YAR3EA,CAACA;YAKjBD,4CAASA,GAATA,UAAUA,cAAmBA;gBACzBE,IAAIA,CAACA,MAAMA,CAACA,cAAcA,GAAGA,cAAcA,CAACA;YAChDA,CAACA;YARMF,gCAAOA,GAAkBA,EAAEA,CAACA;YAUvCA,+BAACA;QAADA,CAACA,AAXDD,IAWCA;QAXYA,oCAAwBA,2BAWpCA,CAAAA;QAEDA,MAAMA,CAACA,OAAOA,GAAGA,CAACA,UAAUA,CAACA,CAACA;QAC9BA,gBAAgBA,QAAiCA;YAC7CI,QAAQA,CAACA,SAASA,CAACA,mBAAmBA,EAAEA,sBAAsBA,CAACA,CAACA;QACpEA,CAACA;QAEDJ,sBAAsBA,CAACA,OAAOA,GAAGA,CAACA,WAAWA,EAAEA,kBAAkBA,EAAEA,QAAQA,CAACA,CAACA;QAQ7EA,AAPAA;;;;;;WAMGA;wCAC6BA,SAAsCA,EAClEA,gBAAqBA,EACrBA,MAA4BA;YAC5BK,MAAMA,CAACA,UAAUA,SAAcA,EAAEA,KAAUA;gBAEvC,AADZ,8CAA8C;oBAC9B,cAAc,GAAG,gBAAgB,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC;gBAClE,IAAI,SAAS,GAAG,EAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAC,CAAC;gBACrD,SAAS,CAAC,OAAO,GAAG,cAAc,GAAG,SAAS,CAAC,OAAO,CAAC;gBACvD,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;gBAU5B,AATA;;;;;;;;mBAQG;gBACH,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAC/C,CAAC,CAACA;QACNA,CAACA;QAEDL,OAAOA;aACFA,MAAMA,CAACA,kBAAkBA,CAACA;aAC1BA,QAAQA,CAACA,kBAAkBA,EAAEA,wBAAwBA,CAACA;aACtDA,MAAMA,CAACA,MAAMA,CAACA,CAACA;IACxBA,CAACA,EA1DaD,SAASA,GAATA,gBAASA,KAATA,gBAASA,QA0DtBA;AAADA,CAACA,EA1DM,MAAM,KAAN,MAAM,QA0DZ"} \ No newline at end of file +{"version":3,"file":"exception-handler.provider.js","sourceRoot":"","sources":["exception-handler.provider.ts"],"names":["ExceptionHandlerProvider","ExceptionHandlerProvider.constructor","ExceptionHandlerProvider.configure","ExceptionHandlerConfig","ExceptionHandlerConfig.constructor","ExceptionHandlerConfig.extendedExceptionHandler"],"mappings":"AAAA,kEAAkE;AAClE,6EAA6E;AAK7E,YAAY,CAAC;AAKb;IAEIA;QAFJC,iBAWCA;QARGA,WAAMA,GAA4BA;YAC9BA,cAAcA,EAAEA,SAASA;SAC5BA,CAAAA;QAKDA,SAAIA,GAA8CA,cAAQA,MAAMA,CAACA,EAAEA,MAAMA,EAAEA,KAAIA,CAACA,MAAMA,EAAEA,CAACA,CAACA,CAACA,CAAAA;IAR3EA,CAACA;IAKjBD,4CAASA,GAATA,UAAUA,cAAmBA;QACzBE,IAAIA,CAACA,MAAMA,CAACA,cAAcA,GAAGA,cAAcA,CAACA;IAChDA,CAACA;IARMF,gCAAOA,GAAkBA,EAAEA,CAACA;IAUvCA,+BAACA;AAADA,CAACA,AAXD,IAWC;AAXY,gCAAwB,2BAWpC,CAAA;AAED;IAGIG,gCAAYA,QAAiCA,EAAEA,SAAsCA,EACjFA,gBAAqBA,EACrBA,MAAcA;QACdC,QAAQA,CAACA,SAASA,CAACA,mBAAmBA,EAAEA,IAAIA,CAACA,wBAAwBA,CAACA,CAACA;IAC3EA,CAACA;IAEDD,gBAAgBA;IAChBA,mFAAmFA;IACnFA,IAAIA;IAEJA,yDAAwBA,GAAxBA;QACIE,MAAMA,CAACA,UAASA,SAAcA,EAAEA,KAAUA;YACtC,IAAI,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC;YACvE,IAAI,SAAS,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;YACvD,SAAS,CAAC,OAAO,GAAG,cAAc,GAAG,SAAS,CAAC,OAAO,CAAC;YACvD,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;YAUjC,AATA;;;;;;;;eAQG;YACH,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACpD,CAAC,CAACA;IACNA,CAACA;IA7BMF,8BAAOA,GAAkBA,CAACA,WAAWA,EAAEA,UAAUA,EAAEA,kBAAkBA,EAAEA,QAAQA,CAACA,CAACA;IA8B5FA,6BAACA;AAADA,CAACA,AA/BD,IA+BC;AAID,OAAO;KACF,MAAM,CAAC,kBAAkB,CAAC;KAC1B,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;KACtD,MAAM,CAAC,sBAAsB,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/blocks/exception/exception-handler.provider.ts b/src/client/app/blocks/exception/exception-handler.provider.ts index fe6bd6d..955c2f4 100644 --- a/src/client/app/blocks/exception/exception-handler.provider.ts +++ b/src/client/app/blocks/exception/exception-handler.provider.ts @@ -1,47 +1,46 @@ // Include in index.html so that app level exceptions are handled. // Exclude from testRunner.html which should run exactly what it wants to run -module blocks.exception { - 'use strict'; +// import { angular } from 'angular'; +import { Logger } from '../logger/logger'; - export interface IExceptionHandlerConfig { - appErrorPrefix: string - } - export class ExceptionHandlerProvider { - static $inject: Array = []; - constructor() { } - config: IExceptionHandlerConfig = { - appErrorPrefix: undefined - } - - configure(appErrorPrefix: any) { - this.config.appErrorPrefix = appErrorPrefix; - } - $get: () => { config: IExceptionHandlerConfig } = () => { return { config: this.config }; } +'use strict'; + +export interface IExceptionHandlerConfig { + appErrorPrefix: string +} +export class ExceptionHandlerProvider { + static $inject: Array = []; + constructor() { } + config: IExceptionHandlerConfig = { + appErrorPrefix: undefined } - config.$inject = ['$provide']; - function config($provide: ng.auto.IProvideService) { - $provide.decorator('$exceptionHandler', extendExceptionHandler); + configure(appErrorPrefix: any) { + this.config.appErrorPrefix = appErrorPrefix; } + $get: () => { config: IExceptionHandlerConfig } = () => { return { config: this.config }; } +} - extendExceptionHandler.$inject = ['$delegate', 'exceptionHandler', 'logger']; - /** - * Extend the $exceptionHandler service to also display a toast. - * @param {Object} $delegate - * @param {Object} exceptionHandler - * @param {Object} logger - * @return {Function} the decorated $exceptionHandler service - */ - function extendExceptionHandler($delegate: ng.IExceptionHandlerService, - exceptionHandler: any , - logger: blocks.logger.Logger) { - return function (exception: any, cause: any) { -// var appErrorPrefix = '[Error] '; - var appErrorPrefix = exceptionHandler.config.appErrorPrefix || ''; - var errorData = {exception: exception, cause: cause}; +class ExceptionHandlerConfig { + static $inject: Array = ['$delegate', '$provide', 'exceptionHandler', 'logger']; + + constructor($provide: ng.auto.IProvideService, $delegate: ng.IExceptionHandlerService, + exceptionHandler: any, + logger: Logger) { + $provide.decorator('$exceptionHandler', this.extendedExceptionHandler); + } + + // configure() { + // this.$provide.decorator('$exceptionHandler', this.extendedExceptionHandler); + // } + + extendedExceptionHandler() { + return function(exception: any, cause: any) { + var appErrorPrefix = this.exceptionHandler.config.appErrorPrefix || ''; + var errorData = { exception: exception, cause: cause }; exception.message = appErrorPrefix + exception.message; - $delegate(exception, cause); + this.$delegate(exception, cause); /** * Could add the error to a service's collection, * add errors to $rootScope, log errors to remote web server, @@ -51,12 +50,14 @@ module blocks.exception { * @example * throw { message: 'error message we added' }; */ - logger.error(exception.message, errorData); + this.logger.error(exception.message, errorData); }; - } - - angular - .module('blocks.exception') - .provider('exceptionHandler', ExceptionHandlerProvider) - .config(config); + } } + + + +angular + .module('blocks.exception') + .provider('exceptionHandler', ExceptionHandlerProvider) + .config(ExceptionHandlerConfig); diff --git a/src/client/app/blocks/exception/exception.js b/src/client/app/blocks/exception/exception.js index 947af7e..58bc66a 100644 --- a/src/client/app/blocks/exception/exception.js +++ b/src/client/app/blocks/exception/exception.js @@ -1,21 +1,15 @@ -var blocks; -(function (blocks) { - var exception; - (function (exception) { - 'use strict'; - var Exception = (function () { - function Exception(logger) { - var _this = this; - this.logger = logger; - this.catcher = function (message) { return function (reason) { return _this.logger.error(message, reason); }; }; - } - Exception.$inject = ['logger']; - return Exception; - })(); - exception.Exception = Exception; - angular - .module('blocks.exception') - .service('exception', Exception); - })(exception = blocks.exception || (blocks.exception = {})); -})(blocks || (blocks = {})); +'use strict'; +var Exception = (function () { + function Exception(logger) { + var _this = this; + this.logger = logger; + this.catcher = function (message) { return function (reason) { return _this.logger.error(message, reason); }; }; + } + Exception.$inject = ['logger']; + return Exception; +})(); +exports.Exception = Exception; +angular + .module('blocks.exception') + .service('exception', Exception); //# sourceMappingURL=exception.js.map \ No newline at end of file diff --git a/src/client/app/blocks/exception/exception.js.map b/src/client/app/blocks/exception/exception.js.map index f1d4fc3..adb7278 100644 --- a/src/client/app/blocks/exception/exception.js.map +++ b/src/client/app/blocks/exception/exception.js.map @@ -1 +1 @@ -{"version":3,"file":"exception.js","sourceRoot":"","sources":["exception.ts"],"names":["blocks","blocks.exception","blocks.exception.Exception","blocks.exception.Exception.constructor"],"mappings":"AAAA,IAAO,MAAM,CAiBZ;AAjBD,WAAO,MAAM;IAACA,IAAAA,SAASA,CAiBtBA;IAjBaA,WAAAA,SAASA,EAACA,CAACA;QACrBC,YAAYA,CAACA;QAMbA;YAEIC,mBAAoBA,MAA4BA;gBAFpDC,iBAKCA;gBAHuBA,WAAMA,GAANA,MAAMA,CAAsBA;gBAEhDA,YAAOA,GAAGA,UAACA,OAAeA,IAAKA,OAAAA,UAACA,MAAcA,IAAKA,OAAAA,KAAIA,CAACA,MAAMA,CAACA,KAAKA,CAACA,OAAOA,EAAEA,MAAMA,CAACA,EAAlCA,CAAkCA,EAAtDA,CAAsDA,CAACA;YAFnCA,CAACA;YAD7CD,iBAAOA,GAAkBA,CAACA,QAAQA,CAACA,CAACA;YAI/CA,gBAACA;QAADA,CAACA,AALDD,IAKCA;QALYA,mBAASA,YAKrBA,CAAAA;QAEDA,OAAOA;aACFA,MAAMA,CAACA,kBAAkBA,CAACA;aAC1BA,OAAOA,CAACA,WAAWA,EAAEA,SAASA,CAACA,CAACA;IACzCA,CAACA,EAjBaD,SAASA,GAATA,gBAASA,KAATA,gBAASA,QAiBtBA;AAADA,CAACA,EAjBM,MAAM,KAAN,MAAM,QAiBZ"} \ No newline at end of file +{"version":3,"file":"exception.js","sourceRoot":"","sources":["exception.ts"],"names":["Exception","Exception.constructor"],"mappings":"AAGA,YAAY,CAAC;AAMb;IAEIA,mBAAoBA,MAAcA;QAFtCC,iBAKCA;QAHuBA,WAAMA,GAANA,MAAMA,CAAQA;QAElCA,YAAOA,GAAGA,UAACA,OAAeA,IAAKA,OAAAA,UAACA,MAAcA,IAAKA,OAAAA,KAAIA,CAACA,MAAMA,CAACA,KAAKA,CAACA,OAAOA,EAAEA,MAAMA,CAACA,EAAlCA,CAAkCA,EAAtDA,CAAsDA,CAACA;IAFhDA,CAACA;IADhCD,iBAAOA,GAAkBA,CAACA,QAAQA,CAACA,CAACA;IAI/CA,gBAACA;AAADA,CAACA,AALD,IAKC;AALY,iBAAS,YAKrB,CAAA;AAED,OAAO;KACF,MAAM,CAAC,kBAAkB,CAAC;KAC1B,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/blocks/exception/exception.module.js b/src/client/app/blocks/exception/exception.module.js index e01c5c5..4c5579a 100644 --- a/src/client/app/blocks/exception/exception.module.js +++ b/src/client/app/blocks/exception/exception.module.js @@ -1,9 +1,4 @@ -var blocks; -(function (blocks) { - var exception; - (function (exception) { - 'use strict'; - angular.module('blocks.exception', ['blocks.logger']); - })(exception = blocks.exception || (blocks.exception = {})); -})(blocks || (blocks = {})); +// import { angular } from 'angular'; +'use strict'; +angular.module('blocks.exception', ['blocks.logger']); //# sourceMappingURL=exception.module.js.map \ No newline at end of file diff --git a/src/client/app/blocks/exception/exception.module.js.map b/src/client/app/blocks/exception/exception.module.js.map index ad9fc3b..3a333e3 100644 --- a/src/client/app/blocks/exception/exception.module.js.map +++ b/src/client/app/blocks/exception/exception.module.js.map @@ -1 +1 @@ -{"version":3,"file":"exception.module.js","sourceRoot":"","sources":["exception.module.ts"],"names":["blocks","blocks.exception"],"mappings":"AAAA,IAAO,MAAM,CAIZ;AAJD,WAAO,MAAM;IAACA,IAAAA,SAASA,CAItBA;IAJaA,WAAAA,SAASA,EAACA,CAACA;QACrBC,YAAYA,CAACA;QAEbA,OAAOA,CAACA,MAAMA,CAACA,kBAAkBA,EAAEA,CAACA,eAAeA,CAACA,CAACA,CAACA;IAC1DA,CAACA,EAJaD,SAASA,GAATA,gBAASA,KAATA,gBAASA,QAItBA;AAADA,CAACA,EAJM,MAAM,KAAN,MAAM,QAIZ"} \ No newline at end of file +{"version":3,"file":"exception.module.js","sourceRoot":"","sources":["exception.module.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,YAAY,CAAC;AAEb,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/blocks/exception/exception.module.ts b/src/client/app/blocks/exception/exception.module.ts index 70f6512..3bbd0fb 100644 --- a/src/client/app/blocks/exception/exception.module.ts +++ b/src/client/app/blocks/exception/exception.module.ts @@ -1,5 +1,5 @@ -module blocks.exception { - 'use strict'; +// import { angular } from 'angular'; - angular.module('blocks.exception', ['blocks.logger']); -} +'use strict'; + +angular.module('blocks.exception', ['blocks.logger']); diff --git a/src/client/app/blocks/exception/exception.ts b/src/client/app/blocks/exception/exception.ts index f2e337a..6b7370f 100644 --- a/src/client/app/blocks/exception/exception.ts +++ b/src/client/app/blocks/exception/exception.ts @@ -1,18 +1,19 @@ -module blocks.exception { - 'use strict'; +// import { angular } from 'angular'; +import { Logger } from '../logger/logger'; - export interface IException { - catcher: (message: string) => (reason: string) => void; - } +'use strict'; - export class Exception implements IException { - static $inject: Array = ['logger']; - constructor(private logger: blocks.logger.Logger) {} +export interface IException { + catcher: (message: string) => (reason: string) => void; +} - catcher = (message: string) => (reason: string) => this.logger.error(message, reason); - } +export class Exception implements IException { + static $inject: Array = ['logger']; + constructor(private logger: Logger) { } - angular - .module('blocks.exception') - .service('exception', Exception); + catcher = (message: string) => (reason: string) => this.logger.error(message, reason); } + +angular + .module('blocks.exception') + .service('exception', Exception); diff --git a/src/client/app/blocks/logger/logger.js b/src/client/app/blocks/logger/logger.js index 5396995..d9aa7b1 100644 --- a/src/client/app/blocks/logger/logger.js +++ b/src/client/app/blocks/logger/logger.js @@ -1,44 +1,39 @@ -var blocks; -(function (blocks) { - var logger; - (function (logger) { - 'use strict'; - var Logger = (function () { - function Logger($log, toastr) { - this.$log = $log; - this.toastr = toastr; - } - // straight to console; bypass toastr - Logger.prototype.log = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i - 0] = arguments[_i]; - } - this.$log.log(args); - }; - Logger.prototype.error = function (message, data, title) { - this.toastr.error(message, title); - this.$log.error('Error: ' + message, '\nSummary:', title, '\nDetails:', data); - }; - Logger.prototype.info = function (message, data, title) { - this.toastr.info(message, title); - this.$log.info('Info: ' + message, '\nSummary:', title, '\nDetails:', data); - }; - Logger.prototype.success = function (message, data, title) { - this.toastr.success(message, title); - this.$log.info('Success: ' + message, '\nSummary:', title, '\nDetails:', data); - }; - Logger.prototype.warning = function (message, data, title) { - this.toastr.warning(message, title); - this.$log.warn('Warning: ' + message, '\nSummary:', title, '\nDetails:', data); - }; - Logger.$inject = ['$log', 'toastr']; - return Logger; - })(); - logger.Logger = Logger; - angular - .module('blocks.logger') - .service('logger', Logger); - })(logger = blocks.logger || (blocks.logger = {})); -})(blocks || (blocks = {})); +// import { angular } from 'angular'; +'use strict'; +var Logger = (function () { + function Logger($log, toastr) { + this.$log = $log; + this.toastr = toastr; + } + // straight to console; bypass toastr + Logger.prototype.log = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i - 0] = arguments[_i]; + } + this.$log.log(args); + }; + Logger.prototype.error = function (message, data, title) { + this.toastr.error(message, title); + this.$log.error('Error: ' + message, '\nSummary:', title, '\nDetails:', data); + }; + Logger.prototype.info = function (message, data, title) { + this.toastr.info(message, title); + this.$log.info('Info: ' + message, '\nSummary:', title, '\nDetails:', data); + }; + Logger.prototype.success = function (message, data, title) { + this.toastr.success(message, title); + this.$log.info('Success: ' + message, '\nSummary:', title, '\nDetails:', data); + }; + Logger.prototype.warning = function (message, data, title) { + this.toastr.warning(message, title); + this.$log.warn('Warning: ' + message, '\nSummary:', title, '\nDetails:', data); + }; + Logger.$inject = ['$log', 'toastr']; + return Logger; +})(); +exports.Logger = Logger; +angular + .module('blocks.logger') + .service('logger', Logger); //# sourceMappingURL=logger.js.map \ No newline at end of file diff --git a/src/client/app/blocks/logger/logger.js.map b/src/client/app/blocks/logger/logger.js.map index df46e1e..0b7a70d 100644 --- a/src/client/app/blocks/logger/logger.js.map +++ b/src/client/app/blocks/logger/logger.js.map @@ -1 +1 @@ -{"version":3,"file":"logger.js","sourceRoot":"","sources":["logger.ts"],"names":["blocks","blocks.logger","blocks.logger.Logger","blocks.logger.Logger.constructor","blocks.logger.Logger.log","blocks.logger.Logger.error","blocks.logger.Logger.info","blocks.logger.Logger.success","blocks.logger.Logger.warning"],"mappings":"AAAA,IAAO,MAAM,CA4CZ;AA5CD,WAAO,MAAM;IAACA,IAAAA,MAAMA,CA4CnBA;IA5CaA,WAAAA,MAAMA,EAACA,CAACA;QAClBC,YAAYA,CAACA;QAUbA;YAEIC,gBAAoBA,IAAoBA,EAAUA,MAAcA;gBAA5CC,SAAIA,GAAJA,IAAIA,CAAgBA;gBAAUA,WAAMA,GAANA,MAAMA,CAAQA;YAAGA,CAACA;YAEpED,qCAAqCA;YACrCA,oBAAGA,GAAHA;gBAAIE,cAAcA;qBAAdA,WAAcA,CAAdA,sBAAcA,CAAdA,IAAcA;oBAAdA,6BAAcA;;gBACdA,IAAIA,CAACA,IAAIA,CAACA,GAAGA,CAACA,IAAIA,CAACA,CAACA;YACxBA,CAACA;YAEDF,sBAAKA,GAALA,UAAMA,OAAeA,EAAEA,IAASA,EAAEA,KAAcA;gBAC5CG,IAAIA,CAACA,MAAMA,CAACA,KAAKA,CAACA,OAAOA,EAAEA,KAAKA,CAACA,CAACA;gBAClCA,IAAIA,CAACA,IAAIA,CAACA,KAAKA,CAACA,SAASA,GAAGA,OAAOA,EAAEA,YAAYA,EAAEA,KAAKA,EAAEA,YAAYA,EAAEA,IAAIA,CAACA,CAACA;YAClFA,CAACA;YAEDH,qBAAIA,GAAJA,UAAKA,OAAeA,EAAEA,IAASA,EAAEA,KAAcA;gBAC3CI,IAAIA,CAACA,MAAMA,CAACA,IAAIA,CAACA,OAAOA,EAAEA,KAAKA,CAACA,CAACA;gBACjCA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,EAAEA,YAAYA,EAAEA,KAAKA,EAAEA,YAAYA,EAAEA,IAAIA,CAACA,CAACA;YAChFA,CAACA;YAEDJ,wBAAOA,GAAPA,UAAQA,OAAeA,EAAEA,IAASA,EAAEA,KAAcA;gBAC9CK,IAAIA,CAACA,MAAMA,CAACA,OAAOA,CAACA,OAAOA,EAAEA,KAAKA,CAACA,CAACA;gBACpCA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,CAACA,WAAWA,GAAGA,OAAOA,EAAEA,YAAYA,EAAEA,KAAKA,EAAEA,YAAYA,EAAEA,IAAIA,CAACA,CAACA;YACnFA,CAACA;YAEDL,wBAAOA,GAAPA,UAAQA,OAAeA,EAAEA,IAASA,EAAEA,KAAcA;gBAC9CM,IAAIA,CAACA,MAAMA,CAACA,OAAOA,CAACA,OAAOA,EAAEA,KAAKA,CAACA,CAACA;gBACpCA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,CAACA,WAAWA,GAAGA,OAAOA,EAAEA,YAAYA,EAAEA,KAAKA,EAAEA,YAAYA,EAAEA,IAAIA,CAACA,CAACA;YACnFA,CAACA;YA1BMN,cAAOA,GAAkBA,CAACA,MAAMA,EAAEA,QAAQA,CAACA,CAACA;YA2BvDA,aAACA;QAADA,CAACA,AA5BDD,IA4BCA;QA5BYA,aAAMA,SA4BlBA,CAAAA;QAEDA,OAAOA;aACFA,MAAMA,CAACA,eAAeA,CAACA;aACvBA,OAAOA,CAACA,QAAQA,EAAEA,MAAMA,CAACA,CAACA;IACnCA,CAACA,EA5CaD,MAAMA,GAANA,aAAMA,KAANA,aAAMA,QA4CnBA;AAADA,CAACA,EA5CM,MAAM,KAAN,MAAM,QA4CZ"} \ No newline at end of file +{"version":3,"file":"logger.js","sourceRoot":"","sources":["logger.ts"],"names":["Logger","Logger.constructor","Logger.log","Logger.error","Logger.info","Logger.success","Logger.warning"],"mappings":"AAAA,qCAAqC;AAErC,YAAY,CAAC;AAUb;IAEIA,gBAAoBA,IAAoBA,EAAUA,MAAcA;QAA5CC,SAAIA,GAAJA,IAAIA,CAAgBA;QAAUA,WAAMA,GAANA,MAAMA,CAAQA;IAAIA,CAACA;IAErED,qCAAqCA;IACrCA,oBAAGA,GAAHA;QAAIE,cAAcA;aAAdA,WAAcA,CAAdA,sBAAcA,CAAdA,IAAcA;YAAdA,6BAAcA;;QACdA,IAAIA,CAACA,IAAIA,CAACA,GAAGA,CAACA,IAAIA,CAACA,CAACA;IACxBA,CAACA;IAEDF,sBAAKA,GAALA,UAAMA,OAAeA,EAAEA,IAASA,EAAEA,KAAcA;QAC5CG,IAAIA,CAACA,MAAMA,CAACA,KAAKA,CAACA,OAAOA,EAAEA,KAAKA,CAACA,CAACA;QAClCA,IAAIA,CAACA,IAAIA,CAACA,KAAKA,CAACA,SAASA,GAAGA,OAAOA,EAAEA,YAAYA,EAAEA,KAAKA,EAAEA,YAAYA,EAAEA,IAAIA,CAACA,CAACA;IAClFA,CAACA;IAEDH,qBAAIA,GAAJA,UAAKA,OAAeA,EAAEA,IAASA,EAAEA,KAAcA;QAC3CI,IAAIA,CAACA,MAAMA,CAACA,IAAIA,CAACA,OAAOA,EAAEA,KAAKA,CAACA,CAACA;QACjCA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,EAAEA,YAAYA,EAAEA,KAAKA,EAAEA,YAAYA,EAAEA,IAAIA,CAACA,CAACA;IAChFA,CAACA;IAEDJ,wBAAOA,GAAPA,UAAQA,OAAeA,EAAEA,IAASA,EAAEA,KAAcA;QAC9CK,IAAIA,CAACA,MAAMA,CAACA,OAAOA,CAACA,OAAOA,EAAEA,KAAKA,CAACA,CAACA;QACpCA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,CAACA,WAAWA,GAAGA,OAAOA,EAAEA,YAAYA,EAAEA,KAAKA,EAAEA,YAAYA,EAAEA,IAAIA,CAACA,CAACA;IACnFA,CAACA;IAEDL,wBAAOA,GAAPA,UAAQA,OAAeA,EAAEA,IAASA,EAAEA,KAAcA;QAC9CM,IAAIA,CAACA,MAAMA,CAACA,OAAOA,CAACA,OAAOA,EAAEA,KAAKA,CAACA,CAACA;QACpCA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,CAACA,WAAWA,GAAGA,OAAOA,EAAEA,YAAYA,EAAEA,KAAKA,EAAEA,YAAYA,EAAEA,IAAIA,CAACA,CAACA;IACnFA,CAACA;IA1BMN,cAAOA,GAAkBA,CAACA,MAAMA,EAAEA,QAAQA,CAACA,CAACA;IA2BvDA,aAACA;AAADA,CAACA,AA5BD,IA4BC;AA5BY,cAAM,SA4BlB,CAAA;AAED,OAAO;KACF,MAAM,CAAC,eAAe,CAAC;KACvB,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/blocks/logger/logger.module.js b/src/client/app/blocks/logger/logger.module.js index 93a74e4..23ab4f3 100644 --- a/src/client/app/blocks/logger/logger.module.js +++ b/src/client/app/blocks/logger/logger.module.js @@ -1,9 +1,4 @@ -var blocks; -(function (blocks) { - var logger; - (function (logger) { - 'use strict'; - angular.module('blocks.logger', []); - })(logger = blocks.logger || (blocks.logger = {})); -})(blocks || (blocks = {})); +// import { angular } from 'angular'; +'use strict'; +angular.module('blocks.logger', []); //# sourceMappingURL=logger.module.js.map \ No newline at end of file diff --git a/src/client/app/blocks/logger/logger.module.js.map b/src/client/app/blocks/logger/logger.module.js.map index ba2a0cd..774a43d 100644 --- a/src/client/app/blocks/logger/logger.module.js.map +++ b/src/client/app/blocks/logger/logger.module.js.map @@ -1 +1 @@ -{"version":3,"file":"logger.module.js","sourceRoot":"","sources":["logger.module.ts"],"names":["blocks","blocks.logger"],"mappings":"AAAA,IAAO,MAAM,CAIZ;AAJD,WAAO,MAAM;IAACA,IAAAA,MAAMA,CAInBA;IAJaA,WAAAA,MAAMA,EAACA,CAACA;QAClBC,YAAYA,CAACA;QAEbA,OAAOA,CAACA,MAAMA,CAACA,eAAeA,EAAEA,EAAEA,CAACA,CAACA;IACxCA,CAACA,EAJaD,MAAMA,GAANA,aAAMA,KAANA,aAAMA,QAInBA;AAADA,CAACA,EAJM,MAAM,KAAN,MAAM,QAIZ"} \ No newline at end of file +{"version":3,"file":"logger.module.js","sourceRoot":"","sources":["logger.module.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,YAAY,CAAC;AAEb,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/blocks/logger/logger.module.ts b/src/client/app/blocks/logger/logger.module.ts index d6a49ef..b9afac4 100644 --- a/src/client/app/blocks/logger/logger.module.ts +++ b/src/client/app/blocks/logger/logger.module.ts @@ -1,5 +1,5 @@ -module blocks.logger { - 'use strict'; +// import { angular } from 'angular'; - angular.module('blocks.logger', []); -} +'use strict'; + +angular.module('blocks.logger', []); diff --git a/src/client/app/blocks/logger/logger.ts b/src/client/app/blocks/logger/logger.ts index 5a60d1b..8dc4ee6 100644 --- a/src/client/app/blocks/logger/logger.ts +++ b/src/client/app/blocks/logger/logger.ts @@ -1,45 +1,45 @@ -module blocks.logger { - 'use strict'; - - export interface ILogger { - info: (message: string, data?: {}, title?: string) => void; - error: (message: string, data?: {}, title?: string) => void; - success: (message: string, data?: {}, title?: string) => void; - warning: (message: string, data?: {}, title?: string) => void; - log: (...args: any[]) => void; +// import { angular } from 'angular'; + +'use strict'; + +export interface ILogger { + info: (message: string, data?: {}, title?: string) => void; + error: (message: string, data?: {}, title?: string) => void; + success: (message: string, data?: {}, title?: string) => void; + warning: (message: string, data?: {}, title?: string) => void; + log: (...args: any[]) => void; +} + +export class Logger implements ILogger { + static $inject: Array = ['$log', 'toastr']; + constructor(private $log: ng.ILogService, private toastr: Toastr) { } + + // straight to console; bypass toastr + log(...args: any[]) { + this.$log.log(args); } - export class Logger implements ILogger { - static $inject: Array = ['$log', 'toastr']; - constructor(private $log: ng.ILogService, private toastr: Toastr) {} - - // straight to console; bypass toastr - log(...args: any[]) { - this.$log.log(args); - } - - error(message: string, data?: {}, title?: string) { - this.toastr.error(message, title); - this.$log.error('Error: ' + message, '\nSummary:', title, '\nDetails:', data); - } - - info(message: string, data?: {}, title?: string) { - this.toastr.info(message, title); - this.$log.info('Info: ' + message, '\nSummary:', title, '\nDetails:', data); - } - - success(message: string, data?: {}, title?: string) { - this.toastr.success(message, title); - this.$log.info('Success: ' + message, '\nSummary:', title, '\nDetails:', data); - } - - warning(message: string, data?: {}, title?: string) { - this.toastr.warning(message, title); - this.$log.warn('Warning: ' + message, '\nSummary:', title, '\nDetails:', data); - } + error(message: string, data?: {}, title?: string) { + this.toastr.error(message, title); + this.$log.error('Error: ' + message, '\nSummary:', title, '\nDetails:', data); } - angular - .module('blocks.logger') - .service('logger', Logger); + info(message: string, data?: {}, title?: string) { + this.toastr.info(message, title); + this.$log.info('Info: ' + message, '\nSummary:', title, '\nDetails:', data); + } + + success(message: string, data?: {}, title?: string) { + this.toastr.success(message, title); + this.$log.info('Success: ' + message, '\nSummary:', title, '\nDetails:', data); + } + + warning(message: string, data?: {}, title?: string) { + this.toastr.warning(message, title); + this.$log.warn('Warning: ' + message, '\nSummary:', title, '\nDetails:', data); + } } + +angular + .module('blocks.logger') + .service('logger', Logger); diff --git a/src/client/app/blocks/router/router-helper.module.js b/src/client/app/blocks/router/router-helper.module.js index 980ab95..075ee9d 100644 --- a/src/client/app/blocks/router/router-helper.module.js +++ b/src/client/app/blocks/router/router-helper.module.js @@ -1,9 +1,3 @@ -var blocks; -(function (blocks) { - var router; - (function (router) { - 'use strict'; - angular.module('blocks.router', []); - })(router = blocks.router || (blocks.router = {})); -})(blocks || (blocks = {})); +'use strict'; +angular.module('blocks.router', []); //# sourceMappingURL=router-helper.module.js.map \ No newline at end of file diff --git a/src/client/app/blocks/router/router-helper.module.js.map b/src/client/app/blocks/router/router-helper.module.js.map index 39e47dc..af1f11b 100644 --- a/src/client/app/blocks/router/router-helper.module.js.map +++ b/src/client/app/blocks/router/router-helper.module.js.map @@ -1 +1 @@ -{"version":3,"file":"router-helper.module.js","sourceRoot":"","sources":["router-helper.module.ts"],"names":["blocks","blocks.router"],"mappings":"AAAA,IAAO,MAAM,CAIZ;AAJD,WAAO,MAAM;IAACA,IAAAA,MAAMA,CAInBA;IAJaA,WAAAA,MAAMA,EAACA,CAACA;QAClBC,YAAYA,CAACA;QAEbA,OAAOA,CAACA,MAAMA,CAACA,eAAeA,EAAEA,EAAEA,CAACA,CAACA;IACxCA,CAACA,EAJaD,MAAMA,GAANA,aAAMA,KAANA,aAAMA,QAInBA;AAADA,CAACA,EAJM,MAAM,KAAN,MAAM,QAIZ"} \ No newline at end of file +{"version":3,"file":"router-helper.module.js","sourceRoot":"","sources":["router-helper.module.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/blocks/router/router-helper.module.ts b/src/client/app/blocks/router/router-helper.module.ts index c43c5d9..26221c1 100644 --- a/src/client/app/blocks/router/router-helper.module.ts +++ b/src/client/app/blocks/router/router-helper.module.ts @@ -1,5 +1,3 @@ -module blocks.router { - 'use strict'; +'use strict'; - angular.module('blocks.router', []); -} +angular.module('blocks.router', []); diff --git a/src/client/app/blocks/router/router-helper.service.js b/src/client/app/blocks/router/router-helper.service.js index 58da876..c682c7e 100644 --- a/src/client/app/blocks/router/router-helper.service.js +++ b/src/client/app/blocks/router/router-helper.service.js @@ -1,58 +1,52 @@ -var blocks; -(function (blocks) { - var router; - (function (router) { - 'use strict'; - var RouterHelper = (function () { - function RouterHelper($location, $rootScope, $state, logger) { - this.$location = $location; - this.$rootScope = $rootScope; - this.$state = $state; - this.logger = logger; - this.stateCounts = { errors: 0, changes: 0 }; - this.handlingStateChangeError = false; - this.handleRoutingErrors(); - this.handleStateChanges(); +'use strict'; +var RouterHelper = (function () { + function RouterHelper($location, $rootScope, $state, logger) { + this.$location = $location; + this.$rootScope = $rootScope; + this.$state = $state; + this.logger = logger; + this.stateCounts = { errors: 0, changes: 0 }; + this.handlingStateChangeError = false; + this.handleRoutingErrors(); + this.handleStateChanges(); + } + RouterHelper.prototype.handleRoutingErrors = function () { + var _this = this; + //TODO: must inject $state so we can kick off routing + // Route cancellation: + // On routing error, go to the dashboard. + // Provide an exit clause if it tries to do it twice. + this.$rootScope.$on('$stateChangeError', function (event, toState, toParams, fromState, fromParams, error) { + if (_this.handlingStateChangeError) { + return; } - RouterHelper.prototype.handleRoutingErrors = function () { - var _this = this; - //TODO: must inject $state so we can kick off routing - // Route cancellation: - // On routing error, go to the dashboard. - // Provide an exit clause if it tries to do it twice. - this.$rootScope.$on('$stateChangeError', function (event, toState, toParams, fromState, fromParams, error) { - if (_this.handlingStateChangeError) { - return; - } - _this.stateCounts.errors++; - _this.handlingStateChangeError = true; - var destination = (toState && - (toState.title || toState.name || toState.loadedTemplateUrl)) || - 'unknown target'; - var msg = 'Error routing to ' + destination + '. ' + - (error.data || '') + '.
' + (error.statusText || '') + - ': ' + (error.status || ''); - _this.logger.warning(msg, [toState]); - _this.$location.path('/'); - }); - }; - RouterHelper.prototype.handleStateChanges = function () { - var _this = this; - this.$rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams, error) { - _this.stateCounts.changes++; - _this.handlingStateChangeError = false; - //var title = config.docTitle + ' ' + (toState.title || ''); - var title = (toState.title || ''); - _this.$rootScope.title = title; // data bind to - }); - }; - RouterHelper.$inject = ['$location', '$rootScope', '$state', 'logger']; - return RouterHelper; - })(); - router.RouterHelper = RouterHelper; - angular - .module('blocks.router') - .service('RouterHelper', RouterHelper); - })(router = blocks.router || (blocks.router = {})); -})(blocks || (blocks = {})); + _this.stateCounts.errors++; + _this.handlingStateChangeError = true; + var destination = (toState && + (toState.title || toState.name || toState.loadedTemplateUrl)) || + 'unknown target'; + var msg = 'Error routing to ' + destination + '. ' + + (error.data || '') + '. <br/>' + (error.statusText || '') + + ': ' + (error.status || ''); + _this.logger.warning(msg, [toState]); + _this.$location.path('/'); + }); + }; + RouterHelper.prototype.handleStateChanges = function () { + var _this = this; + this.$rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams, error) { + _this.stateCounts.changes++; + _this.handlingStateChangeError = false; + //var title = config.docTitle + ' ' + (toState.title || ''); + var title = (toState.title || ''); + _this.$rootScope.title = title; // data bind to <title> + }); + }; + RouterHelper.$inject = ['$location', '$rootScope', '$state', 'logger']; + return RouterHelper; +})(); +exports.RouterHelper = RouterHelper; +angular + .module('blocks.router') + .service('RouterHelper', RouterHelper); //# sourceMappingURL=router-helper.service.js.map \ No newline at end of file diff --git a/src/client/app/blocks/router/router-helper.service.js.map b/src/client/app/blocks/router/router-helper.service.js.map index eefbc19..d787e22 100644 --- a/src/client/app/blocks/router/router-helper.service.js.map +++ b/src/client/app/blocks/router/router-helper.service.js.map @@ -1 +1 @@ -{"version":3,"file":"router-helper.service.js","sourceRoot":"","sources":["router-helper.service.ts"],"names":["blocks","blocks.router","blocks.router.RouterHelper","blocks.router.RouterHelper.constructor","blocks.router.RouterHelper.handleRoutingErrors","blocks.router.RouterHelper.handleStateChanges"],"mappings":"AAAA,IAAO,MAAM,CAyDZ;AAzDD,WAAO,MAAM;IAACA,IAAAA,MAAMA,CAyDnBA;IAzDaA,WAAAA,MAAMA,EAACA,CAACA;QAClBC,YAAYA,CAACA;QAMbA;YAEIC,sBAAoBA,SAAcA,EAAUA,UAAeA,EAAUA,MAAWA,EAAUA,MAAWA;gBAAjFC,cAASA,GAATA,SAASA,CAAKA;gBAAUA,eAAUA,GAAVA,UAAUA,CAAKA;gBAAUA,WAAMA,GAANA,MAAMA,CAAKA;gBAAUA,WAAMA,GAANA,MAAMA,CAAKA;gBAKrGA,gBAAWA,GAAGA,EAAEA,MAAMA,EAAEA,CAACA,EAAEA,OAAOA,EAAEA,CAACA,EAAEA,CAACA;gBAEhCA,6BAAwBA,GAAYA,KAAKA,CAACA;gBAN9CA,IAAIA,CAACA,mBAAmBA,EAAEA,CAACA;gBAC3BA,IAAIA,CAACA,kBAAkBA,EAAEA,CAACA;YAC9BA,CAACA;YAMOD,0CAAmBA,GAA3BA;gBAAAE,iBAsBCA;gBAjBGA,AAJAA,qDAAqDA;gBACrDA,sBAAsBA;gBACtBA,yCAAyCA;gBACzCA,qDAAqDA;gBACrDA,IAAIA,CAACA,UAAUA,CAACA,GAAGA,CAACA,mBAAmBA,EACnCA,UAACA,KAAUA,EAAEA,OAAYA,EAAEA,QAAaA,EAAEA,SAAcA,EAAEA,UAAeA,EAAEA,KAAUA;oBACjFA,EAAEA,CAACA,CAACA,KAAIA,CAACA,wBAAwBA,CAACA,CAACA,CAACA;wBAChCA,MAAMA,CAACA;oBACXA,CAACA;oBACDA,KAAIA,CAACA,WAAWA,CAACA,MAAMA,EAAEA,CAACA;oBAC1BA,KAAIA,CAACA,wBAAwBA,GAAGA,IAAIA,CAACA;oBACrCA,IAAIA,WAAWA,GAAGA,CAACA,OAAOA;wBACtBA,CAACA,OAAOA,CAACA,KAAKA,IAAIA,OAAOA,CAACA,IAAIA,IAAIA,OAAOA,CAACA,iBAAiBA,CAACA,CAACA;wBAC7DA,gBAAgBA,CAACA;oBACrBA,IAAIA,GAAGA,GAAGA,mBAAmBA,GAAGA,WAAWA,GAAGA,IAAIA;wBAC9CA,CAACA,KAAKA,CAACA,IAAIA,IAAIA,EAAEA,CAACA,GAAGA,SAASA,GAAGA,CAACA,KAAKA,CAACA,UAAUA,IAAIA,EAAEA,CAACA;wBACzDA,IAAIA,GAAGA,CAACA,KAAKA,CAACA,MAAMA,IAAIA,EAAEA,CAACA,CAACA;oBAChCA,KAAIA,CAACA,MAAMA,CAACA,OAAOA,CAACA,GAAGA,EAAEA,CAACA,OAAOA,CAACA,CAACA,CAACA;oBACpCA,KAAIA,CAACA,SAASA,CAACA,IAAIA,CAACA,GAAGA,CAACA,CAACA;gBAC7BA,CAACA,CACAA,CAACA;YACVA,CAACA;YAEOF,yCAAkBA,GAA1BA;gBAAAG,iBASCA;gBARGA,IAAIA,CAACA,UAAUA,CAACA,GAAGA,CAACA,qBAAqBA,EACrCA,UAACA,KAAUA,EAAEA,OAAYA,EAAEA,QAAaA,EAAEA,SAAcA,EAAEA,UAAeA,EAAEA,KAAUA;oBACjFA,KAAIA,CAACA,WAAWA,CAACA,OAAOA,EAAEA,CAACA;oBAC3BA,KAAIA,CAACA,wBAAwBA,GAAGA,KAAKA,CAACA;oBAEtCA,AADAA,4DAA4DA;wBACxDA,KAAKA,GAAGA,CAACA,OAAOA,CAACA,KAAKA,IAAIA,EAAEA,CAACA,CAACA;oBAClCA,KAAIA,CAACA,UAAUA,CAACA,KAAKA,GAAGA,KAAKA,EAAEA,uBAAuBA;oBAAxBA,JAClCA,CAACA,CAACA,CAACA;YACXA,CAACA;YA3CMH,oBAAOA,GAAkBA,CAACA,WAAWA,EAAEA,YAAYA,EAAEA,QAAQA,EAAEA,QAAQA,CAACA,CAACA;YA4CpFA,mBAACA;QAADA,CAACA,AA7CDD,IA6CCA;QA7CYA,mBAAYA,eA6CxBA,CAAAA;QAEDA,OAAOA;aACFA,MAAMA,CAACA,eAAeA,CAACA;aACvBA,OAAOA,CAACA,cAAcA,EAAEA,YAAYA,CAACA,CAACA;IAC/CA,CAACA,EAzDaD,MAAMA,GAANA,aAAMA,KAANA,aAAMA,QAyDnBA;AAADA,CAACA,EAzDM,MAAM,KAAN,MAAM,QAyDZ"} \ No newline at end of file +{"version":3,"file":"router-helper.service.js","sourceRoot":"","sources":["router-helper.service.ts"],"names":["RouterHelper","RouterHelper.constructor","RouterHelper.handleRoutingErrors","RouterHelper.handleStateChanges"],"mappings":"AAAA,YAAY,CAAC;AAMb;IAEIA,sBAAoBA,SAAcA,EAAUA,UAAeA,EAAUA,MAAWA,EAAUA,MAAWA;QAAjFC,cAASA,GAATA,SAASA,CAAKA;QAAUA,eAAUA,GAAVA,UAAUA,CAAKA;QAAUA,WAAMA,GAANA,MAAMA,CAAKA;QAAUA,WAAMA,GAANA,MAAMA,CAAKA;QAKrGA,gBAAWA,GAAGA,EAAEA,MAAMA,EAAEA,CAACA,EAAEA,OAAOA,EAAEA,CAACA,EAAEA,CAACA;QAEhCA,6BAAwBA,GAAYA,KAAKA,CAACA;QAN9CA,IAAIA,CAACA,mBAAmBA,EAAEA,CAACA;QAC3BA,IAAIA,CAACA,kBAAkBA,EAAEA,CAACA;IAC9BA,CAACA;IAMOD,0CAAmBA,GAA3BA;QAAAE,iBAsBCA;QAjBGA,AAJAA,qDAAqDA;QACrDA,sBAAsBA;QACtBA,yCAAyCA;QACzCA,qDAAqDA;QACrDA,IAAIA,CAACA,UAAUA,CAACA,GAAGA,CAACA,mBAAmBA,EACnCA,UAACA,KAAUA,EAAEA,OAAYA,EAAEA,QAAaA,EAAEA,SAAcA,EAAEA,UAAeA,EAAEA,KAAUA;YACjFA,EAAEA,CAACA,CAACA,KAAIA,CAACA,wBAAwBA,CAACA,CAACA,CAACA;gBAChCA,MAAMA,CAACA;YACXA,CAACA;YACDA,KAAIA,CAACA,WAAWA,CAACA,MAAMA,EAAEA,CAACA;YAC1BA,KAAIA,CAACA,wBAAwBA,GAAGA,IAAIA,CAACA;YACrCA,IAAIA,WAAWA,GAAGA,CAACA,OAAOA;gBACtBA,CAACA,OAAOA,CAACA,KAAKA,IAAIA,OAAOA,CAACA,IAAIA,IAAIA,OAAOA,CAACA,iBAAiBA,CAACA,CAACA;gBAC7DA,gBAAgBA,CAACA;YACrBA,IAAIA,GAAGA,GAAGA,mBAAmBA,GAAGA,WAAWA,GAAGA,IAAIA;gBAC9CA,CAACA,KAAKA,CAACA,IAAIA,IAAIA,EAAEA,CAACA,GAAGA,SAASA,GAAGA,CAACA,KAAKA,CAACA,UAAUA,IAAIA,EAAEA,CAACA;gBACzDA,IAAIA,GAAGA,CAACA,KAAKA,CAACA,MAAMA,IAAIA,EAAEA,CAACA,CAACA;YAChCA,KAAIA,CAACA,MAAMA,CAACA,OAAOA,CAACA,GAAGA,EAAEA,CAACA,OAAOA,CAACA,CAACA,CAACA;YACpCA,KAAIA,CAACA,SAASA,CAACA,IAAIA,CAACA,GAAGA,CAACA,CAACA;QAC7BA,CAACA,CACAA,CAACA;IACVA,CAACA;IAEOF,yCAAkBA,GAA1BA;QAAAG,iBASCA;QARGA,IAAIA,CAACA,UAAUA,CAACA,GAAGA,CAACA,qBAAqBA,EACrCA,UAACA,KAAUA,EAAEA,OAAYA,EAAEA,QAAaA,EAAEA,SAAcA,EAAEA,UAAeA,EAAEA,KAAUA;YACjFA,KAAIA,CAACA,WAAWA,CAACA,OAAOA,EAAEA,CAACA;YAC3BA,KAAIA,CAACA,wBAAwBA,GAAGA,KAAKA,CAACA;YAEtCA,AADAA,4DAA4DA;gBACxDA,KAAKA,GAAGA,CAACA,OAAOA,CAACA,KAAKA,IAAIA,EAAEA,CAACA,CAACA;YAClCA,KAAIA,CAACA,UAAUA,CAACA,KAAKA,GAAGA,KAAKA,EAAEA,uBAAuBA;YAAxBA,JAClCA,CAACA,CAACA,CAACA;IACXA,CAACA;IA3CMH,oBAAOA,GAAkBA,CAACA,WAAWA,EAAEA,YAAYA,EAAEA,QAAQA,EAAEA,QAAQA,CAACA,CAACA;IA4CpFA,mBAACA;AAADA,CAACA,AA7CD,IA6CC;AA7CY,oBAAY,eA6CxB,CAAA;AAED,OAAO;KACF,MAAM,CAAC,eAAe,CAAC;KACvB,OAAO,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/blocks/router/router-helper.service.ts b/src/client/app/blocks/router/router-helper.service.ts index f60183f..ebde0f9 100644 --- a/src/client/app/blocks/router/router-helper.service.ts +++ b/src/client/app/blocks/router/router-helper.service.ts @@ -1,58 +1,56 @@ -module blocks.router { - 'use strict'; +'use strict'; - export interface IRouterHelper { - stateCounts: { errors: number; changes: number}; - } +export interface IRouterHelper { + stateCounts: { errors: number; changes: number }; +} - export class RouterHelper implements IRouterHelper { - static $inject: Array<string> = ['$location', '$rootScope', '$state', 'logger']; - constructor(private $location: any, private $rootScope: any, private $state: any, private logger: any) { - this.handleRoutingErrors(); - this.handleStateChanges(); - } +export class RouterHelper implements IRouterHelper { + static $inject: Array<string> = ['$location', '$rootScope', '$state', 'logger']; + constructor(private $location: any, private $rootScope: any, private $state: any, private logger: any) { + this.handleRoutingErrors(); + this.handleStateChanges(); + } - stateCounts = { errors: 0, changes: 0 }; + stateCounts = { errors: 0, changes: 0 }; - private handlingStateChangeError: boolean = false; + private handlingStateChangeError: boolean = false; - private handleRoutingErrors() { - //TODO: must inject $state so we can kick off routing - // Route cancellation: - // On routing error, go to the dashboard. - // Provide an exit clause if it tries to do it twice. - this.$rootScope.$on('$stateChangeError', - (event: any, toState: any, toParams: any, fromState: any, fromParams: any, error: any) => { - if (this.handlingStateChangeError) { - return; - } - this.stateCounts.errors++; - this.handlingStateChangeError = true; - var destination = (toState && - (toState.title || toState.name || toState.loadedTemplateUrl)) || - 'unknown target'; - var msg = 'Error routing to ' + destination + '. ' + - (error.data || '') + '. <br/>' + (error.statusText || '') + - ': ' + (error.status || ''); - this.logger.warning(msg, [toState]); - this.$location.path('/'); + private handleRoutingErrors() { + //TODO: must inject $state so we can kick off routing + // Route cancellation: + // On routing error, go to the dashboard. + // Provide an exit clause if it tries to do it twice. + this.$rootScope.$on('$stateChangeError', + (event: any, toState: any, toParams: any, fromState: any, fromParams: any, error: any) => { + if (this.handlingStateChangeError) { + return; } - ); - } + this.stateCounts.errors++; + this.handlingStateChangeError = true; + var destination = (toState && + (toState.title || toState.name || toState.loadedTemplateUrl)) || + 'unknown target'; + var msg = 'Error routing to ' + destination + '. ' + + (error.data || '') + '. <br/>' + (error.statusText || '') + + ': ' + (error.status || ''); + this.logger.warning(msg, [toState]); + this.$location.path('/'); + } + ); + } - private handleStateChanges() { - this.$rootScope.$on('$stateChangeSuccess', - (event: any, toState: any, toParams: any, fromState: any, fromParams: any, error: any) => { - this.stateCounts.changes++; - this.handlingStateChangeError = false; - //var title = config.docTitle + ' ' + (toState.title || ''); - var title = (toState.title || ''); - this.$rootScope.title = title; // data bind to <title> - }); - } + private handleStateChanges() { + this.$rootScope.$on('$stateChangeSuccess', + (event: any, toState: any, toParams: any, fromState: any, fromParams: any, error: any) => { + this.stateCounts.changes++; + this.handlingStateChangeError = false; + //var title = config.docTitle + ' ' + (toState.title || ''); + var title = (toState.title || ''); + this.$rootScope.title = title; // data bind to <title> + }); } +} - angular - .module('blocks.router') - .service('RouterHelper', RouterHelper); -} \ No newline at end of file +angular + .module('blocks.router') + .service('RouterHelper', RouterHelper); \ No newline at end of file diff --git a/src/client/app/core/config.js b/src/client/app/core/config.js index 5ca1c3e..46ab449 100644 --- a/src/client/app/core/config.js +++ b/src/client/app/core/config.js @@ -1,31 +1,26 @@ -var app; -(function (app) { - var core; - (function (core) { - 'use strict'; - var config = { - appErrorPrefix: '[helloworld Error] ', - appTitle: 'helloworld' - }; - angular - .module('app.core') - .config(toastrConfig) - .config(configure) - .value('config', config); - toastrConfig.$inject = ['toastr']; - /* @ngInject */ - function toastrConfig(toastr) { - toastr.options.timeOut = 4000; - toastr.options.positionClass = 'toast-bottom-right'; - } - configure.$inject = ['$logProvider', 'exceptionHandlerProvider']; - /* @ngInject */ - function configure($logProvider, exceptionHandlerProvider) { - if ($logProvider.debugEnabled) { - $logProvider.debugEnabled(true); - } - exceptionHandlerProvider.configure(config.appErrorPrefix); - } - })(core = app.core || (app.core = {})); -})(app || (app = {})); +'use strict'; +var config = { + appErrorPrefix: '[helloworld Error] ', + appTitle: 'helloworld' +}; +angular + .module('app.core') + .config(toastrConfig) + .config(configure) + .value('config', config); +toastrConfig.$inject = ['toastr']; +/* @ngInject */ +function toastrConfig(toastr) { + toastr.options.timeOut = 4000; + toastr.options.positionClass = 'toast-bottom-right'; +} +configure.$inject = ['$logProvider']; //, 'exceptionHandlerProvider']; +/* @ngInject */ +function configure($logProvider) { + // exceptionHandlerProvider: ExceptionHandlerProvider) { + if ($logProvider.debugEnabled) { + $logProvider.debugEnabled(true); + } + // exceptionHandlerProvider.configure(config.appErrorPrefix); +} //# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/src/client/app/core/config.js.map b/src/client/app/core/config.js.map index aa628f3..c2e382e 100644 --- a/src/client/app/core/config.js.map +++ b/src/client/app/core/config.js.map @@ -1 +1 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["config.ts"],"names":["app","app.core","app.core.toastrConfig","app.core.configure"],"mappings":"AAAA,IAAO,GAAG,CA8BT;AA9BD,WAAO,GAAG;IAACA,IAAAA,IAAIA,CA8BdA;IA9BUA,WAAAA,IAAIA,EAACA,CAACA;QACbC,YAAYA,CAACA;QAEbA,IAAIA,MAAMA,GAAGA;YACTA,cAAcA,EAAEA,qBAAqBA;YACrCA,QAAQA,EAAEA,YAAYA;SACzBA,CAACA;QAEFA,OAAOA;aACFA,MAAMA,CAACA,UAAUA,CAACA;aAClBA,MAAMA,CAACA,YAAYA,CAACA;aACpBA,MAAMA,CAACA,SAASA,CAACA;aACjBA,KAAKA,CAACA,QAAQA,EAAEA,MAAMA,CAACA,CAACA;QAE7BA,YAAYA,CAACA,OAAOA,GAAGA,CAACA,QAAQA,CAACA,CAACA;QAElCA,AADAA,eAAeA;8BACOA,MAAcA;YAChCC,MAAMA,CAACA,OAAOA,CAACA,OAAOA,GAAGA,IAAIA,CAACA;YAC9BA,MAAMA,CAACA,OAAOA,CAACA,aAAaA,GAAGA,oBAAoBA,CAACA;QACxDA,CAACA;QAEDD,SAASA,CAACA,OAAOA,GAAGA,CAACA,cAAcA,EAAEA,0BAA0BA,CAACA,CAACA;QAEjEA,AADAA,eAAeA;2BACIA,YAA6BA,EAC5CA,wBAAmEA;YACnEE,EAAEA,CAACA,CAACA,YAAYA,CAACA,YAAYA,CAACA,CAACA,CAACA;gBAC5BA,YAAYA,CAACA,YAAYA,CAACA,IAAIA,CAACA,CAACA;YACpCA,CAACA;YACDA,wBAAwBA,CAACA,SAASA,CAACA,MAAMA,CAACA,cAAcA,CAACA,CAACA;QAC9DA,CAACA;IACLF,CAACA,EA9BUD,IAAIA,GAAJA,QAAIA,KAAJA,QAAIA,QA8BdA;AAADA,CAACA,EA9BM,GAAG,KAAH,GAAG,QA8BT"} \ No newline at end of file +{"version":3,"file":"config.js","sourceRoot":"","sources":["config.ts"],"names":["toastrConfig","configure"],"mappings":"AAEA,YAAY,CAAC;AAEb,IAAI,MAAM,GAAG;IACT,cAAc,EAAE,qBAAqB;IACrC,QAAQ,EAAE,YAAY;CACzB,CAAC;AAEF,OAAO;KACF,MAAM,CAAC,UAAU,CAAC;KAClB,MAAM,CAAC,YAAY,CAAC;KACpB,MAAM,CAAC,SAAS,CAAC;KACjB,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAE7B,YAAY,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;AAElC,AADA,eAAe;sBACO,MAAc;IAChCA,MAAMA,CAACA,OAAOA,CAACA,OAAOA,GAAGA,IAAIA,CAACA;IAC9BA,MAAMA,CAACA,OAAOA,CAACA,aAAaA,GAAGA,oBAAoBA,CAACA;AACxDA,CAACA;AAED,SAAS,CAAC,OAAO,GAAG,CAAC,cAAc,CAAC,EAAE,gCAAgC;AAEtE,AADA,eAAe;mBACI,YAA6B;IAE5CC,AADAA,wDAAwDA;IACxDA,EAAEA,CAACA,CAACA,YAAYA,CAACA,YAAYA,CAACA,CAACA,CAACA;QAC5BA,YAAYA,CAACA,YAAYA,CAACA,IAAIA,CAACA,CAACA;IACpCA,CAACA;IACLA,gEAAgEA;AAChEA,CAACA"} \ No newline at end of file diff --git a/src/client/app/core/config.ts b/src/client/app/core/config.ts index 8257579..187c745 100644 --- a/src/client/app/core/config.ts +++ b/src/client/app/core/config.ts @@ -1,31 +1,31 @@ -module app.core { - 'use strict'; +import { ExceptionHandlerProvider } from '../blocks/exception/exception-handler.provider'; - var config = { - appErrorPrefix: '[helloworld Error] ', - appTitle: 'helloworld' - }; +'use strict'; - angular - .module('app.core') - .config(toastrConfig) - .config(configure) - .value('config', config); +var config = { + appErrorPrefix: '[helloworld Error] ', + appTitle: 'helloworld' +}; - toastrConfig.$inject = ['toastr']; - /* @ngInject */ - function toastrConfig(toastr: Toastr) { - toastr.options.timeOut = 4000; - toastr.options.positionClass = 'toast-bottom-right'; - } +angular + .module('app.core') + .config(toastrConfig) + .config(configure) + .value('config', config); + +toastrConfig.$inject = ['toastr']; +/* @ngInject */ +function toastrConfig(toastr: Toastr) { + toastr.options.timeOut = 4000; + toastr.options.positionClass = 'toast-bottom-right'; +} - configure.$inject = ['$logProvider', 'exceptionHandlerProvider']; - /* @ngInject */ - function configure($logProvider: ng.ILogProvider, - exceptionHandlerProvider: blocks.exception.ExceptionHandlerProvider) { - if ($logProvider.debugEnabled) { - $logProvider.debugEnabled(true); - } - exceptionHandlerProvider.configure(config.appErrorPrefix); +configure.$inject = ['$logProvider']; //, 'exceptionHandlerProvider']; +/* @ngInject */ +function configure($logProvider: ng.ILogProvider) { //, + // exceptionHandlerProvider: ExceptionHandlerProvider) { + if ($logProvider.debugEnabled) { + $logProvider.debugEnabled(true); } +// exceptionHandlerProvider.configure(config.appErrorPrefix); } diff --git a/src/client/app/core/constants.js b/src/client/app/core/constants.js index 11d9a31..286a976 100644 --- a/src/client/app/core/constants.js +++ b/src/client/app/core/constants.js @@ -1,13 +1,7 @@ /* global toastr:false, moment:false */ -var app; -(function (app) { - var core; - (function (core) { - 'use strict'; - angular - .module('app.core') - .constant('toastr', toastr) - .constant('moment', moment); - })(core = app.core || (app.core = {})); -})(app || (app = {})); +'use strict'; +angular + .module('app.core') + .constant('toastr', toastr) + .constant('moment', moment); //# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/src/client/app/core/constants.js.map b/src/client/app/core/constants.js.map index 40f8f4e..b55de5f 100644 --- a/src/client/app/core/constants.js.map +++ b/src/client/app/core/constants.js.map @@ -1 +1 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["constants.ts"],"names":["app","app.core"],"mappings":"AAAA,uCAAuC;AAEvC,IAAO,GAAG,CAOT;AAPD,WAAO,GAAG;IAACA,IAAAA,IAAIA,CAOdA;IAPUA,WAAAA,IAAIA,EAACA,CAACA;QACbC,YAAYA,CAACA;QAEbA,OAAOA;aACFA,MAAMA,CAACA,UAAUA,CAACA;aAClBA,QAAQA,CAACA,QAAQA,EAAEA,MAAMA,CAACA;aAC1BA,QAAQA,CAACA,QAAQA,EAAEA,MAAMA,CAACA,CAACA;IACpCA,CAACA,EAPUD,IAAIA,GAAJA,QAAIA,KAAJA,QAAIA,QAOdA;AAADA,CAACA,EAPM,GAAG,KAAH,GAAG,QAOT"} \ No newline at end of file +{"version":3,"file":"constants.js","sourceRoot":"","sources":["constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,YAAY,CAAC;AAEb,OAAO;KACF,MAAM,CAAC,UAAU,CAAC;KAClB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;KAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/core/constants.ts b/src/client/app/core/constants.ts index f6c2b66..212eaf1 100644 --- a/src/client/app/core/constants.ts +++ b/src/client/app/core/constants.ts @@ -1,10 +1,8 @@ /* global toastr:false, moment:false */ -module app.core { - 'use strict'; +'use strict'; - angular - .module('app.core') - .constant('toastr', toastr) - .constant('moment', moment); -} +angular + .module('app.core') + .constant('toastr', toastr) + .constant('moment', moment); diff --git a/src/client/app/core/core.module.js b/src/client/app/core/core.module.js index f333af3..1f72ba8 100644 --- a/src/client/app/core/core.module.js +++ b/src/client/app/core/core.module.js @@ -1,14 +1,8 @@ -var app; -(function (app) { - var core; - (function (core) { - 'use strict'; - angular - .module('app.core', [ - 'ngAnimate', 'ngSanitize', - 'blocks.exception', 'blocks.logger', 'blocks.router', - 'ui.router', 'ngplus' - ]); - })(core = app.core || (app.core = {})); -})(app || (app = {})); +'use strict'; +angular + .module('app.core', [ + 'ngAnimate', 'ngSanitize', + 'blocks.exception', 'blocks.logger', 'blocks.router', + 'ui.router', 'ngplus' +]); //# sourceMappingURL=core.module.js.map \ No newline at end of file diff --git a/src/client/app/core/core.module.js.map b/src/client/app/core/core.module.js.map index b6305a6..a955669 100644 --- a/src/client/app/core/core.module.js.map +++ b/src/client/app/core/core.module.js.map @@ -1 +1 @@ -{"version":3,"file":"core.module.js","sourceRoot":"","sources":["core.module.ts"],"names":["app","app.core"],"mappings":"AAAA,IAAO,GAAG,CAST;AATD,WAAO,GAAG;IAACA,IAAAA,IAAIA,CASdA;IATUA,WAAAA,IAAIA,EAACA,CAACA;QACbC,YAAYA,CAACA;QAEbA,OAAOA;aACFA,MAAMA,CAACA,UAAUA,EAAEA;YAChBA,WAAWA,EAAEA,YAAYA;YACzBA,kBAAkBA,EAAEA,eAAeA,EAAEA,eAAeA;YACpDA,WAAWA,EAAEA,QAAQA;SACxBA,CAACA,CAACA;IACXA,CAACA,EATUD,IAAIA,GAAJA,QAAIA,KAAJA,QAAIA,QASdA;AAADA,CAACA,EATM,GAAG,KAAH,GAAG,QAST"} \ No newline at end of file +{"version":3,"file":"core.module.js","sourceRoot":"","sources":["core.module.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO;KACF,MAAM,CAAC,UAAU,EAAE;IAChB,WAAW,EAAE,YAAY;IACzB,kBAAkB,EAAE,eAAe,EAAE,eAAe;IACpD,WAAW,EAAE,QAAQ;CACxB,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/core/core.module.ts b/src/client/app/core/core.module.ts index fa5e46c..305cde5 100644 --- a/src/client/app/core/core.module.ts +++ b/src/client/app/core/core.module.ts @@ -1,10 +1,8 @@ -module app.core { - 'use strict'; +'use strict'; - angular - .module('app.core', [ - 'ngAnimate', 'ngSanitize', - 'blocks.exception', 'blocks.logger', 'blocks.router', - 'ui.router', 'ngplus' - ]); -} +angular + .module('app.core', [ + 'ngAnimate', 'ngSanitize', + 'blocks.exception', 'blocks.logger', 'blocks.router', + 'ui.router', 'ngplus' + ]); diff --git a/src/client/app/core/core.route.js b/src/client/app/core/core.route.js index 5a8c78a..1401fae 100644 --- a/src/client/app/core/core.route.js +++ b/src/client/app/core/core.route.js @@ -1,42 +1,37 @@ -var app; -(function (app) { - var core; - (function (core) { - // ((): void => { - // })(); - // What: Creates an IIFE - // When: Use when you have no TypeScript components to export - // Less function wrapping - 'use strict'; - angular - .module('app.core') - .config(configureStates) - .run(appRun); - appRun.$inject = ['RouterHelper']; - function appRun(RouterHelper) { } - configureStates.$inject = ['$stateProvider', '$locationProvider', '$urlRouterProvider']; - /* @ngInject */ - function configureStates($stateProvider, $locationProvider, $urlRouterProvider) { - var otherwise = '/404'; - var states = getStates(); - states.forEach(function (state) { - $stateProvider.state(state.state, state.config); - }); - $locationProvider.html5Mode(true); - $urlRouterProvider.otherwise(otherwise); - } - function getStates() { - return [ - { - state: '404', - config: { - url: '/404', - templateUrl: 'app/core/404.html', - title: '404' - } +// ((): void => { +// })(); +// What: Creates an IIFE +// When: Use when you have no TypeScript components to export +// Less function wrapping +'use strict'; +var CoreRoute = (function () { + function CoreRoute() { + } + CoreRoute.prototype.appRun = function (RouterHelper) { }; + CoreRoute.prototype.configureStates = function ($stateProvider, $locationProvider, $urlRouterProvider) { + var otherwise = '/404'; + var states = [ + { + state: '404', + config: { + url: '/404', + templateUrl: 'app/core/404.html', + title: '404' } - ]; - } - })(core = app.core || (app.core = {})); -})(app || (app = {})); + } + ]; + states.forEach(function (state) { + $stateProvider.state(state.state, state.config); + }); + $locationProvider.html5Mode(true); + $urlRouterProvider.otherwise(otherwise); + }; + CoreRoute.$inject = ['stateProvider', '$locationProvider', '$urlRouterProvider']; + return CoreRoute; +})(); +var coreRoute = new CoreRoute(); +angular + .module('app.core') + .config(coreRoute.configureStates) + .run(coreRoute.appRun); //# sourceMappingURL=core.route.js.map \ No newline at end of file diff --git a/src/client/app/core/core.route.js.map b/src/client/app/core/core.route.js.map index 3f98958..52801df 100644 --- a/src/client/app/core/core.route.js.map +++ b/src/client/app/core/core.route.js.map @@ -1 +1 @@ -{"version":3,"file":"core.route.js","sourceRoot":"","sources":["core.route.ts"],"names":["app","app.core","app.core.appRun","app.core.configureStates","app.core.getStates"],"mappings":"AAAA,IAAO,GAAG,CA0CT;AA1CD,WAAO,GAAG;IAACA,IAAAA,IAAIA,CA0CdA;IA1CUA,WAAAA,IAAIA,EAACA,CAACA;QAMbC,AALJA,iBAAiBA;QACjBA,QAAQA;QACRA,wBAAwBA;QACxBA,6DAA6DA;QAC7DA,yBAAyBA;QACrBA,YAAYA,CAACA;QAEbA,OAAOA;aACFA,MAAMA,CAACA,UAAUA,CAACA;aAClBA,MAAMA,CAACA,eAAeA,CAACA;aACvBA,GAAGA,CAACA,MAAMA,CAACA,CAACA;QAEjBA,MAAMA,CAACA,OAAOA,GAAGA,CAACA,cAAcA,CAACA,CAACA;QAClCA,gBAAgBA,YAAyCA,IAAIC,CAACA;QAE9DD,eAAeA,CAACA,OAAOA,GAAGA,CAACA,gBAAgBA,EAAEA,mBAAmBA,EAAEA,oBAAoBA,CAACA,CAACA;QAExFA,AADAA,eAAeA;iCACUA,cAAoCA,EACzDA,iBAAuCA,EACvCA,kBAA4CA;YAC5CE,IAAIA,SAASA,GAAGA,MAAMA,CAACA;YACvBA,IAAIA,MAAMA,GAAGA,SAASA,EAAEA,CAACA;YACzBA,MAAMA,CAACA,OAAOA,CAACA,UAAUA,KAAKA;gBAC1B,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YACpD,CAAC,CAACA,CAACA;YACHA,iBAAiBA,CAACA,SAASA,CAACA,IAAIA,CAACA,CAACA;YAClCA,kBAAkBA,CAACA,SAASA,CAACA,SAASA,CAACA,CAACA;QAC5CA,CAACA;QAEDF;YACIG,MAAMA,CAACA;gBACHA;oBACIA,KAAKA,EAAEA,KAAKA;oBACZA,MAAMA,EAAEA;wBACJA,GAAGA,EAAEA,MAAMA;wBACXA,WAAWA,EAAEA,mBAAmBA;wBAChCA,KAAKA,EAAEA,KAAKA;qBACfA;iBACJA;aACJA,CAACA;QACNA,CAACA;IACLH,CAACA,EA1CUD,IAAIA,GAAJA,QAAIA,KAAJA,QAAIA,QA0CdA;AAADA,CAACA,EA1CM,GAAG,KAAH,GAAG,QA0CT"} \ No newline at end of file +{"version":3,"file":"core.route.js","sourceRoot":"","sources":["core.route.ts"],"names":["CoreRoute","CoreRoute.constructor","CoreRoute.appRun","CoreRoute.configureStates"],"mappings":"AAAA,iBAAiB;AACjB,QAAQ;AACR,wBAAwB;AACxB,6DAA6D;AAC7D,yBAAyB;AAIzB,YAAY,CAAC;AAEb;IAAAA;IAyBAC,CAACA;IAvBGD,0BAAMA,GAANA,UAAOA,YAA2BA,IAAIE,CAACA;IAGvCF,mCAAeA,GAAfA,UAAgBA,cAAoCA,EAChDA,iBAAuCA,EACvCA,kBAA4CA;QAC5CG,IAAIA,SAASA,GAAGA,MAAMA,CAACA;QACvBA,IAAIA,MAAMA,GAAGA;YACTA;gBACIA,KAAKA,EAAEA,KAAKA;gBACZA,MAAMA,EAAEA;oBACJA,GAAGA,EAAEA,MAAMA;oBACXA,WAAWA,EAAEA,mBAAmBA;oBAChCA,KAAKA,EAAEA,KAAKA;iBACfA;aACJA;SACJA,CAACA;QACFA,MAAMA,CAACA,OAAOA,CAACA,UAASA,KAAKA;YACzB,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QACpD,CAAC,CAACA,CAACA;QACHA,iBAAiBA,CAACA,SAASA,CAACA,IAAIA,CAACA,CAACA;QAClCA,kBAAkBA,CAACA,SAASA,CAACA,SAASA,CAACA,CAACA;IAC5CA,CAACA;IApBMH,iBAAOA,GAAkBA,CAACA,eAAeA,EAAEA,mBAAmBA,EAAEA,oBAAoBA,CAACA,CAACA;IAqBjGA,gBAACA;AAADA,CAACA,AAzBD,IAyBC;AAED,IAAI,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;AAEhC,OAAO;KACF,MAAM,CAAC,UAAU,CAAC;KAClB,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC;KACjC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/core/core.route.ts b/src/client/app/core/core.route.ts index 3b20325..cc7e8eb 100644 --- a/src/client/app/core/core.route.ts +++ b/src/client/app/core/core.route.ts @@ -1,35 +1,23 @@ -module app.core { // ((): void => { // })(); // What: Creates an IIFE // When: Use when you have no TypeScript components to export // Less function wrapping - 'use strict'; - angular - .module('app.core') - .config(configureStates) - .run(appRun); +import { IRouterHelper } from '../blocks/router/router-helper.service'; - appRun.$inject = ['RouterHelper']; - function appRun(RouterHelper: blocks.router.IRouterHelper) { } +'use strict'; - configureStates.$inject = ['$stateProvider', '$locationProvider', '$urlRouterProvider']; - /* @ngInject */ - function configureStates($stateProvider: ng.ui.IStateProvider, +class CoreRoute { + + appRun(RouterHelper: IRouterHelper) { } + + static $inject: Array<string> = ['stateProvider', '$locationProvider', '$urlRouterProvider']; + configureStates($stateProvider: ng.ui.IStateProvider, $locationProvider: ng.ILocationProvider, $urlRouterProvider: ng.ui.IUrlRouterProvider) { var otherwise = '/404'; - var states = getStates(); - states.forEach(function (state) { - $stateProvider.state(state.state, state.config); - }); - $locationProvider.html5Mode(true); - $urlRouterProvider.otherwise(otherwise); - } - - function getStates() { - return [ + let states = [ { state: '404', config: { @@ -39,5 +27,18 @@ module app.core { } } ]; + states.forEach(function(state) { + $stateProvider.state(state.state, state.config); + }); + $locationProvider.html5Mode(true); + $urlRouterProvider.otherwise(otherwise); } -} \ No newline at end of file +} + +let coreRoute = new CoreRoute(); + +angular + .module('app.core') + .config(coreRoute.configureStates) + .run(coreRoute.appRun); + diff --git a/src/client/app/core/dataservice.js b/src/client/app/core/dataservice.js index 2c034b6..a8d936e 100644 --- a/src/client/app/core/dataservice.js +++ b/src/client/app/core/dataservice.js @@ -1,36 +1,30 @@ -var app; -(function (app) { - var core; - (function (core) { - 'use strict'; - var DataService = (function () { - function DataService($http, $q, exception, logger) { - var _this = this; - this.$http = $http; - this.$q = $q; - this.exception = exception; - this.logger = logger; - this.getMessageCount = function () { return _this.$q.when(72); }; - this.getPeople = function () { - return _this.$http.get('/api/people') - .then(_this.success) - .catch(_this.fail); - }; - this.success = function (response) { return response.data; }; - this.fail = function (error) { - var msg = error.data.description; - var reason = 'query for people failed.'; - _this.exception.catcher(msg)(reason); - return _this.$q.reject(msg); - }; - } - DataService.$inject = ['$http', '$q', 'exception', 'logger']; - return DataService; - })(); - core.DataService = DataService; - angular - .module('app.core') - .service('dataservice', DataService); - })(core = app.core || (app.core = {})); -})(app || (app = {})); +'use strict'; +var DataService = (function () { + function DataService($http, $q, exception, logger) { + var _this = this; + this.$http = $http; + this.$q = $q; + this.exception = exception; + this.logger = logger; + this.getMessageCount = function () { return _this.$q.when(72); }; + this.getPeople = function () { + return _this.$http.get('/api/people') + .then(_this.success) + .catch(_this.fail); + }; + this.success = function (response) { return response.data; }; + this.fail = function (error) { + var msg = error.data.description; + var reason = 'query for people failed.'; + _this.exception.catcher(msg)(reason); + return _this.$q.reject(msg); + }; + } + DataService.$inject = ['$http', '$q', 'exception', 'logger']; + return DataService; +})(); +exports.DataService = DataService; +angular + .module('app.core') + .service('dataservice', DataService); //# sourceMappingURL=dataservice.js.map \ No newline at end of file diff --git a/src/client/app/core/dataservice.js.map b/src/client/app/core/dataservice.js.map index 943b546..7e72439 100644 --- a/src/client/app/core/dataservice.js.map +++ b/src/client/app/core/dataservice.js.map @@ -1 +1 @@ -{"version":3,"file":"dataservice.js","sourceRoot":"","sources":["dataservice.ts"],"names":["app","app.core","app.core.DataService","app.core.DataService.constructor"],"mappings":"AAAA,IAAO,GAAG,CAoCT;AApCD,WAAO,GAAG;IAACA,IAAAA,IAAIA,CAoCdA;IApCUA,WAAAA,IAAIA,EAACA,CAACA;QACbC,YAAYA,CAACA;QAObA;YAEIC,qBAAoBA,KAAsBA,EAC9BA,EAAgBA,EAChBA,SAAsCA,EACtCA,MAA4BA;gBAL5CC,iBAuBCA;gBArBuBA,UAAKA,GAALA,KAAKA,CAAiBA;gBAC9BA,OAAEA,GAAFA,EAAEA,CAAcA;gBAChBA,cAASA,GAATA,SAASA,CAA6BA;gBACtCA,WAAMA,GAANA,MAAMA,CAAsBA;gBAGxCA,oBAAeA,GAA8BA,cAAMA,OAAAA,KAAIA,CAACA,EAAEA,CAACA,IAAIA,CAACA,EAAEA,CAACA,EAAhBA,CAAgBA,CAACA;gBAEpEA,cAASA,GAA2BA;2BAChCA,KAAIA,CAACA,KAAKA,CAACA,GAAGA,CAACA,aAAaA,CAACA;yBACxBA,IAAIA,CAACA,KAAIA,CAACA,OAAOA,CAACA;yBAClBA,KAAKA,CAACA,KAAIA,CAACA,IAAIA,CAACA;gBAFrBA,CAEqBA,CAACA;gBAElBA,YAAOA,GAA0BA,UAACA,QAAQA,IAAKA,OAAAA,QAAQA,CAACA,IAAIA,EAAbA,CAAaA,CAACA;gBAE7DA,SAAIA,GAAuBA,UAACA,KAAKA;oBACrCA,IAAIA,GAAGA,GAAGA,KAAKA,CAACA,IAAIA,CAACA,WAAWA,CAACA;oBACjCA,IAAIA,MAAMA,GAAGA,0BAA0BA,CAACA;oBACxCA,KAAIA,CAACA,SAASA,CAACA,OAAOA,CAACA,GAAGA,CAACA,CAACA,MAAMA,CAACA,CAACA;oBACpCA,MAAMA,CAACA,KAAIA,CAACA,EAAEA,CAACA,MAAMA,CAACA,GAAGA,CAACA,CAACA;gBAC/BA,CAACA,CAAAA;YAhBDA,CAACA;YALMD,mBAAOA,GAAkBA,CAACA,OAAOA,EAAEA,IAAIA,EAAEA,WAAWA,EAAEA,QAAQA,CAACA,CAACA;YAsB3EA,kBAACA;QAADA,CAACA,AAvBDD,IAuBCA;QAvBYA,gBAAWA,cAuBvBA,CAAAA;QAEDA,OAAOA;aACFA,MAAMA,CAACA,UAAUA,CAACA;aAClBA,OAAOA,CAACA,aAAaA,EAAEA,WAAWA,CAACA,CAACA;IAC7CA,CAACA,EApCUD,IAAIA,GAAJA,QAAIA,KAAJA,QAAIA,QAoCdA;AAADA,CAACA,EApCM,GAAG,KAAH,GAAG,QAoCT"} \ No newline at end of file +{"version":3,"file":"dataservice.js","sourceRoot":"","sources":["dataservice.ts"],"names":["DataService","DataService.constructor"],"mappings":"AAGA,YAAY,CAAC;AAOb;IAEIA,qBAAoBA,KAAsBA,EAC9BA,EAAgBA,EAChBA,SAAqBA,EACrBA,MAAcA;QAL9BC,iBAuBCA;QArBuBA,UAAKA,GAALA,KAAKA,CAAiBA;QAC9BA,OAAEA,GAAFA,EAAEA,CAAcA;QAChBA,cAASA,GAATA,SAASA,CAAYA;QACrBA,WAAMA,GAANA,MAAMA,CAAQA;QAG1BA,oBAAeA,GAA8BA,cAAMA,OAAAA,KAAIA,CAACA,EAAEA,CAACA,IAAIA,CAACA,EAAEA,CAACA,EAAhBA,CAAgBA,CAACA;QAEpEA,cAASA,GAA2BA;mBAChCA,KAAIA,CAACA,KAAKA,CAACA,GAAGA,CAACA,aAAaA,CAACA;iBACxBA,IAAIA,CAACA,KAAIA,CAACA,OAAOA,CAACA;iBAClBA,KAAKA,CAACA,KAAIA,CAACA,IAAIA,CAACA;QAFrBA,CAEqBA,CAACA;QAElBA,YAAOA,GAA0BA,UAACA,QAAQA,IAAKA,OAAAA,QAAQA,CAACA,IAAIA,EAAbA,CAAaA,CAACA;QAE7DA,SAAIA,GAAuBA,UAACA,KAAKA;YACrCA,IAAIA,GAAGA,GAAGA,KAAKA,CAACA,IAAIA,CAACA,WAAWA,CAACA;YACjCA,IAAIA,MAAMA,GAAGA,0BAA0BA,CAACA;YACxCA,KAAIA,CAACA,SAASA,CAACA,OAAOA,CAACA,GAAGA,CAACA,CAACA,MAAMA,CAACA,CAACA;YACpCA,MAAMA,CAACA,KAAIA,CAACA,EAAEA,CAACA,MAAMA,CAACA,GAAGA,CAACA,CAACA;QAC/BA,CAACA,CAAAA;IAhBDA,CAACA;IALMD,mBAAOA,GAAkBA,CAACA,OAAOA,EAAEA,IAAIA,EAAEA,WAAWA,EAAEA,QAAQA,CAACA,CAACA;IAsB3EA,kBAACA;AAADA,CAACA,AAvBD,IAuBC;AAvBY,mBAAW,cAuBvB,CAAA;AAED,OAAO;KACF,MAAM,CAAC,UAAU,CAAC;KAClB,OAAO,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/core/dataservice.ts b/src/client/app/core/dataservice.ts index 4b668cc..3a8a092 100644 --- a/src/client/app/core/dataservice.ts +++ b/src/client/app/core/dataservice.ts @@ -1,37 +1,38 @@ -module app.core { - 'use strict'; +import { Logger } from '../blocks/logger/logger'; +import { IException } from '../blocks/exception/exception'; - export interface IDataService { - getMessageCount: () => ng.IPromise<number>; - getPeople: () => ng.IPromise<any>; - } +'use strict'; + +export interface IDataService { + getMessageCount: () => ng.IPromise<number>; + getPeople: () => ng.IPromise<any>; +} - export class DataService implements IDataService { - static $inject: Array<string> = ['$http', '$q', 'exception', 'logger']; - constructor(private $http: ng.IHttpService, - private $q: ng.IQService, - private exception: blocks.exception.IException, - private logger: blocks.logger.Logger) { - } - - getMessageCount: () => ng.IPromise<number> = () => this.$q.when(72); - - getPeople: () => ng.IPromise<any> = () => - this.$http.get('/api/people') - .then(this.success) - .catch(this.fail); - - private success: (response: any) => {} = (response) => response.data; - - private fail: (error: any) => {} = (error) => { - var msg = error.data.description; - var reason = 'query for people failed.'; - this.exception.catcher(msg)(reason); - return this.$q.reject(msg); - } +export class DataService implements IDataService { + static $inject: Array<string> = ['$http', '$q', 'exception', 'logger']; + constructor(private $http: ng.IHttpService, + private $q: ng.IQService, + private exception: IException, + private logger: Logger) { } - angular - .module('app.core') - .service('dataservice', DataService); + getMessageCount: () => ng.IPromise<number> = () => this.$q.when(72); + + getPeople: () => ng.IPromise<any> = () => + this.$http.get('/api/people') + .then(this.success) + .catch(this.fail); + + private success: (response: any) => {} = (response) => response.data; + + private fail: (error: any) => {} = (error) => { + var msg = error.data.description; + var reason = 'query for people failed.'; + this.exception.catcher(msg)(reason); + return this.$q.reject(msg); + } } + +angular + .module('app.core') + .service('dataservice', DataService); diff --git a/src/client/app/dashboard/dashboard.controller.js b/src/client/app/dashboard/dashboard.controller.js index 402ffa8..a2db533 100644 --- a/src/client/app/dashboard/dashboard.controller.js +++ b/src/client/app/dashboard/dashboard.controller.js @@ -1,46 +1,39 @@ -var app; -(function (app) { - var dashboard; - (function (dashboard) { - 'use strict'; - var DashboardController = (function () { - function DashboardController($q, dataservice, logger) { - this.$q = $q; - this.dataservice = dataservice; - this.logger = logger; - this.news = { - title: 'helloworld', - description: 'Hot Towel Angular is a SPA template for Angular developers.' - }; - this.messageCount = 0; - this.people = []; - this.title = 'Dashboard'; - var promises = [this.getMessageCount(), this.getPeople()]; - this.$q.all(promises).then(function () { - logger.info('Activated Dashboard View'); - }); - } - DashboardController.prototype.getMessageCount = function () { - var _this = this; - return this.dataservice.getMessageCount().then(function (data) { - _this.messageCount = data; - return _this.messageCount; - }); - }; - DashboardController.prototype.getPeople = function () { - var _this = this; - return this.dataservice.getPeople().then(function (data) { - _this.people = data; - return _this.people; - }); - }; - DashboardController.$inject = ['$q', 'dataservice', 'logger']; - return DashboardController; - })(); - dashboard.DashboardController = DashboardController; - angular - .module('app.dashboard') - .controller('DashboardController', DashboardController); - })(dashboard = app.dashboard || (app.dashboard = {})); -})(app || (app = {})); +'use strict'; +var DashboardController = (function () { + function DashboardController($q, dataservice, logger) { + this.$q = $q; + this.dataservice = dataservice; + this.logger = logger; + this.news = { + title: 'helloworld', + description: 'Hot Towel Angular is a SPA template for Angular developers.' + }; + this.messageCount = 0; + this.people = []; + this.title = 'Dashboard'; + var promises = [this.getMessageCount(), this.getPeople()]; + this.$q.all(promises).then(function () { + logger.info('Activated Dashboard View'); + }); + } + DashboardController.prototype.getMessageCount = function () { + var _this = this; + return this.dataservice.getMessageCount().then(function (data) { + _this.messageCount = data; + return _this.messageCount; + }); + }; + DashboardController.prototype.getPeople = function () { + var _this = this; + return this.dataservice.getPeople().then(function (data) { + _this.people = data; + return _this.people; + }); + }; + DashboardController.$inject = ['$q', 'dataservice', 'logger']; + return DashboardController; +})(); +angular + .module('app.dashboard') + .controller('DashboardController', DashboardController); //# sourceMappingURL=dashboard.controller.js.map \ No newline at end of file diff --git a/src/client/app/dashboard/dashboard.controller.js.map b/src/client/app/dashboard/dashboard.controller.js.map index fc26572..f8fc20f 100644 --- a/src/client/app/dashboard/dashboard.controller.js.map +++ b/src/client/app/dashboard/dashboard.controller.js.map @@ -1 +1 @@ -{"version":3,"file":"dashboard.controller.js","sourceRoot":"","sources":["dashboard.controller.ts"],"names":["app","app.dashboard","app.dashboard.DashboardController","app.dashboard.DashboardController.constructor","app.dashboard.DashboardController.getMessageCount","app.dashboard.DashboardController.getPeople"],"mappings":"AAAA,IAAO,GAAG,CAiDT;AAjDD,WAAO,GAAG;IAACA,IAAAA,SAASA,CAiDnBA;IAjDUA,WAAAA,SAASA,EAACA,CAACA;QAClBC,YAAYA,CAACA;QAWbA;YAEIC,6BAAoBA,EAAgBA,EACxBA,WAAkCA,EAClCA,MAA4BA;gBAFpBC,OAAEA,GAAFA,EAAEA,CAAcA;gBACxBA,gBAAWA,GAAXA,WAAWA,CAAuBA;gBAClCA,WAAMA,GAANA,MAAMA,CAAsBA;gBAOxCA,SAAIA,GAAGA;oBACHA,KAAKA,EAAEA,YAAYA;oBACnBA,WAAWA,EAAEA,6DAA6DA;iBAC7EA,CAACA;gBACFA,iBAAYA,GAAWA,CAACA,CAACA;gBACzBA,WAAMA,GAAeA,EAAEA,CAACA;gBACxBA,UAAKA,GAAWA,WAAWA,CAACA;gBAZxBA,IAAIA,QAAQA,GAAGA,CAACA,IAAIA,CAACA,eAAeA,EAAEA,EAAEA,IAAIA,CAACA,SAASA,EAAEA,CAACA,CAACA;gBAC1DA,IAAIA,CAACA,EAAEA,CAACA,GAAGA,CAACA,QAAQA,CAACA,CAACA,IAAIA,CAACA;oBACvB,MAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;gBAC5C,CAAC,CAACA,CAACA;YACPA,CAACA;YAUDD,6CAAeA,GAAfA;gBAAAE,iBAKCA;gBAJGA,MAAMA,CAACA,IAAIA,CAACA,WAAWA,CAACA,eAAeA,EAAEA,CAACA,IAAIA,CAACA,UAACA,IAAIA;oBAChDA,KAAIA,CAACA,YAAYA,GAAGA,IAAIA,CAACA;oBACzBA,MAAMA,CAACA,KAAIA,CAACA,YAAYA,CAACA;gBAC7BA,CAACA,CAACA,CAACA;YACPA,CAACA;YAEDF,uCAASA,GAATA;gBAAAG,iBAKCA;gBAJGA,MAAMA,CAACA,IAAIA,CAACA,WAAWA,CAACA,SAASA,EAAEA,CAACA,IAAIA,CAACA,UAACA,IAAIA;oBAC1CA,KAAIA,CAACA,MAAMA,GAAGA,IAAIA,CAACA;oBACnBA,MAAMA,CAACA,KAAIA,CAACA,MAAMA,CAACA;gBACvBA,CAACA,CAACA,CAACA;YACPA,CAACA;YA9BMH,2BAAOA,GAAkBA,CAACA,IAAIA,EAAEA,aAAaA,EAAEA,QAAQA,CAACA,CAACA;YA+BpEA,0BAACA;QAADA,CAACA,AAhCDD,IAgCCA;QAhCYA,6BAAmBA,sBAgC/BA,CAAAA;QAEDA,OAAOA;aACFA,MAAMA,CAACA,eAAeA,CAACA;aACvBA,UAAUA,CAACA,qBAAqBA,EAAEA,mBAAmBA,CAACA,CAACA;IAChEA,CAACA,EAjDUD,SAASA,GAATA,aAASA,KAATA,aAASA,QAiDnBA;AAADA,CAACA,EAjDM,GAAG,KAAH,GAAG,QAiDT"} \ No newline at end of file +{"version":3,"file":"dashboard.controller.js","sourceRoot":"","sources":["dashboard.controller.ts"],"names":["DashboardController","DashboardController.constructor","DashboardController.getMessageCount","DashboardController.getPeople"],"mappings":"AAGA,YAAY,CAAC;AAWb;IAEIA,6BAAoBA,EAAgBA,EACxBA,WAAyBA,EACzBA,MAAcA;QAFNC,OAAEA,GAAFA,EAAEA,CAAcA;QACxBA,gBAAWA,GAAXA,WAAWA,CAAcA;QACzBA,WAAMA,GAANA,MAAMA,CAAQA;QAO1BA,SAAIA,GAAGA;YACHA,KAAKA,EAAEA,YAAYA;YACnBA,WAAWA,EAAEA,6DAA6DA;SAC7EA,CAACA;QACFA,iBAAYA,GAAWA,CAACA,CAACA;QACzBA,WAAMA,GAAeA,EAAEA,CAACA;QACxBA,UAAKA,GAAWA,WAAWA,CAACA;QAZxBA,IAAIA,QAAQA,GAAGA,CAACA,IAAIA,CAACA,eAAeA,EAAEA,EAAEA,IAAIA,CAACA,SAASA,EAAEA,CAACA,CAACA;QAC1DA,IAAIA,CAACA,EAAEA,CAACA,GAAGA,CAACA,QAAQA,CAACA,CAACA,IAAIA,CAACA;YACvB,MAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;QAC5C,CAAC,CAACA,CAACA;IACPA,CAACA;IAUDD,6CAAeA,GAAfA;QAAAE,iBAKCA;QAJGA,MAAMA,CAACA,IAAIA,CAACA,WAAWA,CAACA,eAAeA,EAAEA,CAACA,IAAIA,CAACA,UAACA,IAAIA;YAChDA,KAAIA,CAACA,YAAYA,GAAGA,IAAIA,CAACA;YACzBA,MAAMA,CAACA,KAAIA,CAACA,YAAYA,CAACA;QAC7BA,CAACA,CAACA,CAACA;IACPA,CAACA;IAEDF,uCAASA,GAATA;QAAAG,iBAKCA;QAJGA,MAAMA,CAACA,IAAIA,CAACA,WAAWA,CAACA,SAASA,EAAEA,CAACA,IAAIA,CAACA,UAACA,IAAIA;YAC1CA,KAAIA,CAACA,MAAMA,GAAGA,IAAIA,CAACA;YACnBA,MAAMA,CAACA,KAAIA,CAACA,MAAMA,CAACA;QACvBA,CAACA,CAACA,CAACA;IACPA,CAACA;IA9BMH,2BAAOA,GAAkBA,CAACA,IAAIA,EAAEA,aAAaA,EAAEA,QAAQA,CAACA,CAACA;IA+BpEA,0BAACA;AAADA,CAACA,AAhCD,IAgCC;AAED,OAAO;KACF,MAAM,CAAC,eAAe,CAAC;KACvB,UAAU,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/dashboard/dashboard.controller.ts b/src/client/app/dashboard/dashboard.controller.ts index e639996..1d3e43a 100644 --- a/src/client/app/dashboard/dashboard.controller.ts +++ b/src/client/app/dashboard/dashboard.controller.ts @@ -1,50 +1,51 @@ -module app.dashboard { - 'use strict'; +import { Logger } from '../blocks/logger/logger'; +import { IDataService } from '../core/dataservice'; - interface IDashboardVm { - news: { title: string, description: string }; - messageCount: number; - people: Array<any>; - title: string; - getMessageCount: () => ng.IPromise<number>; - getPeople: () => ng.IPromise<Array<any>>; - } - - export class DashboardController implements IDashboardVm { - static $inject: Array<string> = ['$q', 'dataservice', 'logger']; - constructor(private $q: ng.IQService, - private dataservice: app.core.IDataService, - private logger: blocks.logger.Logger) { - var promises = [this.getMessageCount(), this.getPeople()]; - this.$q.all(promises).then(function () { - logger.info('Activated Dashboard View'); - }); - } +'use strict'; + +interface IDashboardVm { + news: { title: string, description: string }; + messageCount: number; + people: Array<any>; + title: string; + getMessageCount: () => ng.IPromise<number>; + getPeople: () => ng.IPromise<Array<any>>; +} - news = { - title: 'helloworld', - description: 'Hot Towel Angular is a SPA template for Angular developers.' - }; - messageCount: number = 0; - people: Array<any> = []; - title: string = 'Dashboard'; +class DashboardController implements IDashboardVm { + static $inject: Array<string> = ['$q', 'dataservice', 'logger']; + constructor(private $q: ng.IQService, + private dataservice: IDataService, + private logger: Logger) { + var promises = [this.getMessageCount(), this.getPeople()]; + this.$q.all(promises).then(function() { + logger.info('Activated Dashboard View'); + }); + } - getMessageCount() { - return this.dataservice.getMessageCount().then((data) => { - this.messageCount = data; - return this.messageCount; - }); - } + news = { + title: 'helloworld', + description: 'Hot Towel Angular is a SPA template for Angular developers.' + }; + messageCount: number = 0; + people: Array<any> = []; + title: string = 'Dashboard'; - getPeople() { - return this.dataservice.getPeople().then((data) => { - this.people = data; - return this.people; - }); - } + getMessageCount() { + return this.dataservice.getMessageCount().then((data) => { + this.messageCount = data; + return this.messageCount; + }); } - angular - .module('app.dashboard') - .controller('DashboardController', DashboardController); + getPeople() { + return this.dataservice.getPeople().then((data) => { + this.people = data; + return this.people; + }); + } } + +angular + .module('app.dashboard') + .controller('DashboardController', DashboardController); diff --git a/src/client/app/dashboard/dashboard.module.js b/src/client/app/dashboard/dashboard.module.js index c78961e..0b1d945 100644 --- a/src/client/app/dashboard/dashboard.module.js +++ b/src/client/app/dashboard/dashboard.module.js @@ -1,12 +1,6 @@ -var app; -(function (app) { - var dashboard; - (function (dashboard) { - 'use strict'; - angular.module('app.dashboard', [ - 'app.core', - 'app.widgets' - ]); - })(dashboard = app.dashboard || (app.dashboard = {})); -})(app || (app = {})); +'use strict'; +angular.module('app.dashboard', [ + 'app.core', + 'app.widgets' +]); //# sourceMappingURL=dashboard.module.js.map \ No newline at end of file diff --git a/src/client/app/dashboard/dashboard.module.js.map b/src/client/app/dashboard/dashboard.module.js.map index 7c2092f..2c56392 100644 --- a/src/client/app/dashboard/dashboard.module.js.map +++ b/src/client/app/dashboard/dashboard.module.js.map @@ -1 +1 @@ -{"version":3,"file":"dashboard.module.js","sourceRoot":"","sources":["dashboard.module.ts"],"names":["app","app.dashboard"],"mappings":"AAAA,IAAO,GAAG,CAOT;AAPD,WAAO,GAAG;IAACA,IAAAA,SAASA,CAOnBA;IAPUA,WAAAA,SAASA,EAACA,CAACA;QAClBC,YAAYA,CAACA;QAEbA,OAAOA,CAACA,MAAMA,CAACA,eAAeA,EAAEA;YAC5BA,UAAUA;YACVA,aAAaA;SACdA,CAACA,CAACA;IACTA,CAACA,EAPUD,SAASA,GAATA,aAASA,KAATA,aAASA,QAOnBA;AAADA,CAACA,EAPM,GAAG,KAAH,GAAG,QAOT"} \ No newline at end of file +{"version":3,"file":"dashboard.module.js","sourceRoot":"","sources":["dashboard.module.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE;IAC5B,UAAU;IACV,aAAa;CAChB,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/dashboard/dashboard.module.ts b/src/client/app/dashboard/dashboard.module.ts index c3ccb9c..258a30d 100644 --- a/src/client/app/dashboard/dashboard.module.ts +++ b/src/client/app/dashboard/dashboard.module.ts @@ -1,8 +1,6 @@ -module app.dashboard { - 'use strict'; +'use strict'; - angular.module('app.dashboard', [ - 'app.core', - 'app.widgets' - ]); -} +angular.module('app.dashboard', [ + 'app.core', + 'app.widgets' +]); diff --git a/src/client/app/dashboard/dashboard.route.js b/src/client/app/dashboard/dashboard.route.js index 3b2b56c..154341f 100644 --- a/src/client/app/dashboard/dashboard.route.js +++ b/src/client/app/dashboard/dashboard.route.js @@ -1,37 +1,35 @@ -var app; -(function (app) { - var dashboard; - (function (dashboard) { - 'use strict'; - angular - .module('app.dashboard') - .config(configureStates); - configureStates.$inject = ['$stateProvider']; - /* @ngInject */ - function configureStates($stateProvider) { - var states = getStates(); - states.forEach(function (state) { - $stateProvider.state(state.state, state.config); - }); - } - function getStates() { - return [ - { - state: 'dashboard', - config: { - url: '/', - templateUrl: 'app/dashboard/dashboard.html', - controller: 'DashboardController', - controllerAs: 'vm', - title: 'dashboard', - settings: { - nav: 1, - content: '<i class="fa fa-dashboard"></i> Dashboard' - } +'use strict'; +var DashboardRoute = (function () { + function DashboardRoute() { + } + DashboardRoute.prototype.configureStates = function ($stateProvider) { + var states = this.getStates(); + states.forEach(function (state) { + $stateProvider.state(state.state, state.config); + }); + }; + DashboardRoute.prototype.getStates = function () { + return [ + { + state: 'dashboard', + config: { + url: '/', + templateUrl: 'app/dashboard/dashboard.html', + controller: 'DashboardController', + controllerAs: 'vm', + title: 'dashboard', + settings: { + nav: 1, + content: '<i class="fa fa-dashboard"></i> Dashboard' } } - ]; - } - })(dashboard = app.dashboard || (app.dashboard = {})); -})(app || (app = {})); + } + ]; + }; + DashboardRoute.$inject = ['stateProvider']; + return DashboardRoute; +})(); +angular + .module('app.dashboard') + .config(new DashboardRoute().configureStates); //# sourceMappingURL=dashboard.route.js.map \ No newline at end of file diff --git a/src/client/app/dashboard/dashboard.route.js.map b/src/client/app/dashboard/dashboard.route.js.map index 3d73d29..d0223a9 100644 --- a/src/client/app/dashboard/dashboard.route.js.map +++ b/src/client/app/dashboard/dashboard.route.js.map @@ -1 +1 @@ -{"version":3,"file":"dashboard.route.js","sourceRoot":"","sources":["dashboard.route.ts"],"names":["app","app.dashboard","app.dashboard.configureStates","app.dashboard.getStates"],"mappings":"AAAA,IAAO,GAAG,CAkCT;AAlCD,WAAO,GAAG;IAACA,IAAAA,SAASA,CAkCnBA;IAlCUA,WAAAA,SAASA,EAACA,CAACA;QAClBC,YAAYA,CAACA;QAEbA,OAAOA;aACFA,MAAMA,CAACA,eAAeA,CAACA;aACvBA,MAAMA,CAACA,eAAeA,CAACA,CAACA;QAE7BA,eAAeA,CAACA,OAAOA,GAAGA,CAACA,gBAAgBA,CAACA,CAACA;QAE7CA,AADAA,eAAeA;iCACUA,cAAoCA;YACzDC,IAAIA,MAAMA,GAAGA,SAASA,EAAEA,CAACA;YACzBA,MAAMA,CAACA,OAAOA,CAACA,UAAUA,KAAKA;gBAC1B,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YACpD,CAAC,CAACA,CAACA;QACPA,CAACA;QAEDD;YACIE,MAAMA,CAACA;gBACHA;oBACIA,KAAKA,EAAEA,WAAWA;oBAClBA,MAAMA,EAAEA;wBACJA,GAAGA,EAAEA,GAAGA;wBACRA,WAAWA,EAAEA,8BAA8BA;wBAC3CA,UAAUA,EAAEA,qBAAqBA;wBACjCA,YAAYA,EAAEA,IAAIA;wBAClBA,KAAKA,EAAEA,WAAWA;wBAClBA,QAAQA,EAAEA;4BACNA,GAAGA,EAAEA,CAACA;4BACNA,OAAOA,EAAEA,2CAA2CA;yBACvDA;qBACJA;iBACJA;aACJA,CAACA;QACNA,CAACA;IACLF,CAACA,EAlCUD,SAASA,GAATA,aAASA,KAATA,aAASA,QAkCnBA;AAADA,CAACA,EAlCM,GAAG,KAAH,GAAG,QAkCT"} \ No newline at end of file +{"version":3,"file":"dashboard.route.js","sourceRoot":"","sources":["dashboard.route.ts"],"names":["DashboardRoute","DashboardRoute.constructor","DashboardRoute.configureStates","DashboardRoute.getStates"],"mappings":"AAAA,YAAY,CAAC;AAEb;IAAAA;IA2BAC,CAACA;IAzBGD,wCAAeA,GAAfA,UAAgBA,cAAoCA;QAChDE,IAAIA,MAAMA,GAAGA,IAAIA,CAACA,SAASA,EAAEA,CAACA;QAC9BA,MAAMA,CAACA,OAAOA,CAACA,UAASA,KAAKA;YACzB,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QACpD,CAAC,CAACA,CAACA;IACPA,CAACA;IAEDF,kCAASA,GAATA;QACIG,MAAMA,CAACA;YACHA;gBACIA,KAAKA,EAAEA,WAAWA;gBAClBA,MAAMA,EAAEA;oBACJA,GAAGA,EAAEA,GAAGA;oBACRA,WAAWA,EAAEA,8BAA8BA;oBAC3CA,UAAUA,EAAEA,qBAAqBA;oBACjCA,YAAYA,EAAEA,IAAIA;oBAClBA,KAAKA,EAAEA,WAAWA;oBAClBA,QAAQA,EAAEA;wBACNA,GAAGA,EAAEA,CAACA;wBACNA,OAAOA,EAAEA,2CAA2CA;qBACvDA;iBACJA;aACJA;SACJA,CAACA;IACNA,CAACA;IAzBMH,sBAAOA,GAAkBA,CAACA,eAAeA,CAACA,CAACA;IA0BtDA,qBAACA;AAADA,CAACA,AA3BD,IA2BC;AAED,OAAO;KACF,MAAM,CAAC,eAAe,CAAC;KACvB,MAAM,CAAC,IAAI,cAAc,EAAE,CAAC,eAAe,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/dashboard/dashboard.route.ts b/src/client/app/dashboard/dashboard.route.ts index 6975dd6..ee52b5f 100644 --- a/src/client/app/dashboard/dashboard.route.ts +++ b/src/client/app/dashboard/dashboard.route.ts @@ -1,20 +1,15 @@ -module app.dashboard { - 'use strict'; +'use strict'; - angular - .module('app.dashboard') - .config(configureStates); - - configureStates.$inject = ['$stateProvider']; - /* @ngInject */ - function configureStates($stateProvider: ng.ui.IStateProvider) { - var states = getStates(); - states.forEach(function (state) { +class DashboardRoute { + static $inject: Array<string> = ['stateProvider']; + configureStates($stateProvider: ng.ui.IStateProvider) { + var states = this.getStates(); + states.forEach(function(state) { $stateProvider.state(state.state, state.config); }); } - function getStates() { + getStates() { return [ { state: 'dashboard', @@ -33,3 +28,7 @@ module app.dashboard { ]; } } + +angular + .module('app.dashboard') + .config(new DashboardRoute().configureStates); diff --git a/src/client/app/layout/ht-sidebar.directive.js b/src/client/app/layout/ht-sidebar.directive.js index fa5b5f0..e9a8fe8 100644 --- a/src/client/app/layout/ht-sidebar.directive.js +++ b/src/client/app/layout/ht-sidebar.directive.js @@ -1,50 +1,44 @@ -var app; -(function (app) { - var layout; - (function (layout) { - 'use strict'; - // Opens and closes the sidebar menu. - // Usage: - // <div ht-sidebar"> - // <div ht-sidebar whenDoneAnimating="vm.sidebarReady()"> - // Creates: - // <div ht-sidebar class="sidebar"> - var HtSidebar = (function () { - function HtSidebar() { - this.bindToController = true; - this.link = this.linkFn; - this.restrict = 'EA'; - this.scope = { - whenDoneAnimating: '&?' - }; +'use strict'; +// Opens and closes the sidebar menu. +// Usage: +// <div ht-sidebar"> +// <div ht-sidebar whenDoneAnimating="vm.sidebarReady()"> +// Creates: +// <div ht-sidebar class="sidebar"> +var HtSidebar = (function () { + function HtSidebar() { + this.bindToController = true; + this.link = this.linkFn; + this.restrict = 'EA'; + this.scope = { + whenDoneAnimating: '&?' + }; + } + HtSidebar.instance = function () { + return new HtSidebar(); + }; + HtSidebar.prototype.linkFn = function (scope, element, attrs) { + var $sidebarInner = element.find('.sidebar-inner'); + var $dropdownElement = element.find('.sidebar-dropdown a'); + element.addClass('sidebar'); + $dropdownElement.click(dropdown); + function dropdown(e) { + var dropClass = 'dropy'; + e.preventDefault(); + if (!$dropdownElement.hasClass(dropClass)) { + $sidebarInner.slideDown(350, scope.whenDoneAnimating); + $dropdownElement.addClass(dropClass); } - HtSidebar.instance = function () { - return new HtSidebar(); - }; - HtSidebar.prototype.linkFn = function (scope, element, attrs) { - var $sidebarInner = element.find('.sidebar-inner'); - var $dropdownElement = element.find('.sidebar-dropdown a'); - element.addClass('sidebar'); - $dropdownElement.click(dropdown); - function dropdown(e) { - var dropClass = 'dropy'; - e.preventDefault(); - if (!$dropdownElement.hasClass(dropClass)) { - $sidebarInner.slideDown(350, scope.whenDoneAnimating); - $dropdownElement.addClass(dropClass); - } - else if ($dropdownElement.hasClass(dropClass)) { - $dropdownElement.removeClass(dropClass); - $sidebarInner.slideUp(350, scope.whenDoneAnimating); - } - } - }; - HtSidebar.$inject = ['']; - return HtSidebar; - })(); - angular - .module('app.layout') - .directive('htSidebar', HtSidebar.instance); - })(layout = app.layout || (app.layout = {})); -})(app || (app = {})); + else if ($dropdownElement.hasClass(dropClass)) { + $dropdownElement.removeClass(dropClass); + $sidebarInner.slideUp(350, scope.whenDoneAnimating); + } + } + }; + HtSidebar.$inject = ['']; + return HtSidebar; +})(); +angular + .module('app.layout') + .directive('htSidebar', HtSidebar.instance); //# sourceMappingURL=ht-sidebar.directive.js.map \ No newline at end of file diff --git a/src/client/app/layout/ht-sidebar.directive.js.map b/src/client/app/layout/ht-sidebar.directive.js.map index c616dc9..f2662a8 100644 --- a/src/client/app/layout/ht-sidebar.directive.js.map +++ b/src/client/app/layout/ht-sidebar.directive.js.map @@ -1 +1 @@ -{"version":3,"file":"ht-sidebar.directive.js","sourceRoot":"","sources":["ht-sidebar.directive.ts"],"names":["app","app.layout","app.layout.HtSidebar","app.layout.HtSidebar.constructor","app.layout.HtSidebar.instance","app.layout.HtSidebar.linkFn","app.layout.HtSidebar.linkFn.dropdown"],"mappings":"AAAA,IAAO,GAAG,CAmDT;AAnDD,WAAO,GAAG;IAACA,IAAAA,MAAMA,CAmDhBA;IAnDUA,WAAAA,MAAMA,EAACA,CAACA;QACfC,YAAYA,CAACA;QAYbA,AANAA,qCAAqCA;QACrCA,SAASA;QACTA,qBAAqBA;QACrBA,0DAA0DA;QAC1DA,WAAWA;QACXA,oCAAoCA;;YAGhCC;gBAMAC,qBAAgBA,GAAYA,IAAIA,CAACA;gBACjCA,SAAIA,GAAoFA,IAAIA,CAACA,MAAMA,CAACA;gBACpGA,aAAQA,GAAWA,IAAIA,CAACA;gBACxBA,UAAKA,GAAoBA;oBACrBA,iBAAiBA,EAAEA,IAAIA;iBAC1BA,CAACA;YAXcA,CAACA;YAEVD,kBAAQA,GAAfA;gBACIE,MAAMA,CAACA,IAAIA,SAASA,EAAEA,CAACA;YAC3BA,CAACA;YASOF,0BAAMA,GAAdA,UAAeA,KAAUA,EAAEA,OAAYA,EAAEA,KAAUA;gBAC/CG,IAAIA,aAAaA,GAAGA,OAAOA,CAACA,IAAIA,CAACA,gBAAgBA,CAACA,CAACA;gBACnDA,IAAIA,gBAAgBA,GAAGA,OAAOA,CAACA,IAAIA,CAACA,qBAAqBA,CAACA,CAACA;gBAC3DA,OAAOA,CAACA,QAAQA,CAACA,SAASA,CAACA,CAACA;gBAC5BA,gBAAgBA,CAACA,KAAKA,CAACA,QAAQA,CAACA,CAACA;gBAEjCA,kBAAkBA,CAAMA;oBACpBC,IAAIA,SAASA,GAAGA,OAAOA,CAACA;oBACxBA,CAACA,CAACA,cAAcA,EAAEA,CAACA;oBACnBA,EAAEA,CAACA,CAACA,CAACA,gBAAgBA,CAACA,QAAQA,CAACA,SAASA,CAACA,CAACA,CAACA,CAACA;wBACxCA,aAAaA,CAACA,SAASA,CAACA,GAAGA,EAAEA,KAAKA,CAACA,iBAAiBA,CAACA,CAACA;wBACtDA,gBAAgBA,CAACA,QAAQA,CAACA,SAASA,CAACA,CAACA;oBACzCA,CAACA;oBAACA,IAAIA,CAACA,EAAEA,CAACA,CAACA,gBAAgBA,CAACA,QAAQA,CAACA,SAASA,CAACA,CAACA,CAACA,CAACA;wBAC9CA,gBAAgBA,CAACA,WAAWA,CAACA,SAASA,CAACA,CAACA;wBACxCA,aAAaA,CAACA,OAAOA,CAACA,GAAGA,EAAEA,KAAKA,CAACA,iBAAiBA,CAACA,CAACA;oBACxDA,CAACA;gBACLA,CAACA;YACLD,CAACA;YA/BMH,iBAAOA,GAAkBA,CAACA,EAAEA,CAACA,CAACA;YAgCzCA,gBAACA;QAADA,CAACA,AAjCDD,IAiCCA;QAEDA,OAAOA;aACFA,MAAMA,CAACA,YAAYA,CAACA;aACpBA,SAASA,CAACA,WAAWA,EAAEA,SAASA,CAACA,QAAQA,CAACA,CAACA;IACpDA,CAACA,EAnDUD,MAAMA,GAANA,UAAMA,KAANA,UAAMA,QAmDhBA;AAADA,CAACA,EAnDM,GAAG,KAAH,GAAG,QAmDT"} \ No newline at end of file +{"version":3,"file":"ht-sidebar.directive.js","sourceRoot":"","sources":["ht-sidebar.directive.ts"],"names":["HtSidebar","HtSidebar.constructor","HtSidebar.instance","HtSidebar.linkFn","HtSidebar.linkFn.dropdown"],"mappings":"AAAA,YAAY,CAAC;AAYb,AANA,qCAAqC;AACrC,SAAS;AACT,qBAAqB;AACrB,0DAA0D;AAC1D,WAAW;AACX,oCAAoC;;IAGhCA;QAMAC,qBAAgBA,GAAYA,IAAIA,CAACA;QACjCA,SAAIA,GAAoFA,IAAIA,CAACA,MAAMA,CAACA;QACpGA,aAAQA,GAAWA,IAAIA,CAACA;QACxBA,UAAKA,GAAoBA;YACrBA,iBAAiBA,EAAEA,IAAIA;SAC1BA,CAACA;IAXcA,CAACA;IAEVD,kBAAQA,GAAfA;QACIE,MAAMA,CAACA,IAAIA,SAASA,EAAEA,CAACA;IAC3BA,CAACA;IASOF,0BAAMA,GAAdA,UAAeA,KAAUA,EAAEA,OAAYA,EAAEA,KAAUA;QAC/CG,IAAIA,aAAaA,GAAGA,OAAOA,CAACA,IAAIA,CAACA,gBAAgBA,CAACA,CAACA;QACnDA,IAAIA,gBAAgBA,GAAGA,OAAOA,CAACA,IAAIA,CAACA,qBAAqBA,CAACA,CAACA;QAC3DA,OAAOA,CAACA,QAAQA,CAACA,SAASA,CAACA,CAACA;QAC5BA,gBAAgBA,CAACA,KAAKA,CAACA,QAAQA,CAACA,CAACA;QAEjCA,kBAAkBA,CAAMA;YACpBC,IAAIA,SAASA,GAAGA,OAAOA,CAACA;YACxBA,CAACA,CAACA,cAAcA,EAAEA,CAACA;YACnBA,EAAEA,CAACA,CAACA,CAACA,gBAAgBA,CAACA,QAAQA,CAACA,SAASA,CAACA,CAACA,CAACA,CAACA;gBACxCA,aAAaA,CAACA,SAASA,CAACA,GAAGA,EAAEA,KAAKA,CAACA,iBAAiBA,CAACA,CAACA;gBACtDA,gBAAgBA,CAACA,QAAQA,CAACA,SAASA,CAACA,CAACA;YACzCA,CAACA;YAACA,IAAIA,CAACA,EAAEA,CAACA,CAACA,gBAAgBA,CAACA,QAAQA,CAACA,SAASA,CAACA,CAACA,CAACA,CAACA;gBAC9CA,gBAAgBA,CAACA,WAAWA,CAACA,SAASA,CAACA,CAACA;gBACxCA,aAAaA,CAACA,OAAOA,CAACA,GAAGA,EAAEA,KAAKA,CAACA,iBAAiBA,CAACA,CAACA;YACxDA,CAACA;QACLA,CAACA;IACLD,CAACA;IA/BMH,iBAAOA,GAAkBA,CAACA,EAAEA,CAACA,CAACA;IAgCzCA,gBAACA;AAADA,CAACA,AAjCD,IAiCC;AAED,OAAO;KACF,MAAM,CAAC,YAAY,CAAC;KACpB,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/layout/ht-sidebar.directive.ts b/src/client/app/layout/ht-sidebar.directive.ts index b01f257..6d09d87 100644 --- a/src/client/app/layout/ht-sidebar.directive.ts +++ b/src/client/app/layout/ht-sidebar.directive.ts @@ -1,52 +1,50 @@ -module app.layout { - 'use strict'; +'use strict'; - interface IHtSidebarScope { - whenDoneAnimating: string; - } +interface IHtSidebarScope { + whenDoneAnimating: string; +} - // Opens and closes the sidebar menu. - // Usage: - // <div ht-sidebar"> - // <div ht-sidebar whenDoneAnimating="vm.sidebarReady()"> - // Creates: - // <div ht-sidebar class="sidebar"> - class HtSidebar implements ng.IDirective { - static $inject: Array<string> = ['']; - constructor() { } +// Opens and closes the sidebar menu. +// Usage: +// <div ht-sidebar"> +// <div ht-sidebar whenDoneAnimating="vm.sidebarReady()"> +// Creates: +// <div ht-sidebar class="sidebar"> +class HtSidebar implements ng.IDirective { + static $inject: Array<string> = ['']; + constructor() { } - static instance(): ng.IDirective { - return new HtSidebar(); - } + static instance(): ng.IDirective { + return new HtSidebar(); + } - bindToController: boolean = true; - link: (scope: ng.IScope, element: ng.IAugmentedJQuery, attrs: ng.IAttributes) => void = this.linkFn; - restrict: string = 'EA'; - scope: IHtSidebarScope = { - whenDoneAnimating: '&?' - }; + bindToController: boolean = true; + link: (scope: ng.IScope, element: ng.IAugmentedJQuery, attrs: ng.IAttributes) => void = this.linkFn; + restrict: string = 'EA'; + scope: IHtSidebarScope = { + whenDoneAnimating: '&?' + }; - private linkFn(scope: any, element: any, attrs: any) { - var $sidebarInner = element.find('.sidebar-inner'); - var $dropdownElement = element.find('.sidebar-dropdown a'); - element.addClass('sidebar'); - $dropdownElement.click(dropdown); + private linkFn(scope: any, element: any, attrs: any) { + var $sidebarInner = element.find('.sidebar-inner'); + var $dropdownElement = element.find('.sidebar-dropdown a'); + element.addClass('sidebar'); + $dropdownElement.click(dropdown); - function dropdown(e: any) { - var dropClass = 'dropy'; - e.preventDefault(); - if (!$dropdownElement.hasClass(dropClass)) { - $sidebarInner.slideDown(350, scope.whenDoneAnimating); - $dropdownElement.addClass(dropClass); - } else if ($dropdownElement.hasClass(dropClass)) { - $dropdownElement.removeClass(dropClass); - $sidebarInner.slideUp(350, scope.whenDoneAnimating); - } + function dropdown(e: any) { + var dropClass = 'dropy'; + e.preventDefault(); + if (!$dropdownElement.hasClass(dropClass)) { + $sidebarInner.slideDown(350, scope.whenDoneAnimating); + $dropdownElement.addClass(dropClass); + } else if ($dropdownElement.hasClass(dropClass)) { + $dropdownElement.removeClass(dropClass); + $sidebarInner.slideUp(350, scope.whenDoneAnimating); } } } - - angular - .module('app.layout') - .directive('htSidebar', HtSidebar.instance); } + +angular + .module('app.layout') + .directive('htSidebar', HtSidebar.instance); diff --git a/src/client/app/layout/ht-top-nav.directive.js b/src/client/app/layout/ht-top-nav.directive.js index 59d4673..3bcaaed 100644 --- a/src/client/app/layout/ht-top-nav.directive.js +++ b/src/client/app/layout/ht-top-nav.directive.js @@ -1,30 +1,27 @@ -var applayout; -(function (applayout) { - 'use strict'; - var HtTopNav = (function () { - function HtTopNav() { - this.bindToController = true; - this.controller = TopNavController; - this.controllerAs = 'vm'; - this.restrict = 'EA'; - this.scope = { - 'navline': '=' - }; - this.templateUrl = 'app/layout/ht-top-nav.html'; - } - HtTopNav.instance = function () { - return new HtTopNav(); +'use strict'; +var HtTopNav = (function () { + function HtTopNav() { + this.bindToController = true; + this.controller = TopNavController; + this.controllerAs = 'vm'; + this.restrict = 'EA'; + this.scope = { + 'navline': '=' }; - HtTopNav.$inject = ['']; - return HtTopNav; - })(); - var TopNavController = (function () { - function TopNavController() { - } - return TopNavController; - })(); - angular - .module('app.layout') - .directive('htTopNav', HtTopNav.instance); -})(applayout || (applayout = {})); + this.templateUrl = 'app/layout/ht-top-nav.html'; + } + HtTopNav.instance = function () { + return new HtTopNav(); + }; + HtTopNav.$inject = ['']; + return HtTopNav; +})(); +var TopNavController = (function () { + function TopNavController() { + } + return TopNavController; +})(); +angular + .module('app.layout') + .directive('htTopNav', HtTopNav.instance); //# sourceMappingURL=ht-top-nav.directive.js.map \ No newline at end of file diff --git a/src/client/app/layout/ht-top-nav.directive.js.map b/src/client/app/layout/ht-top-nav.directive.js.map index 1349e7a..937bafa 100644 --- a/src/client/app/layout/ht-top-nav.directive.js.map +++ b/src/client/app/layout/ht-top-nav.directive.js.map @@ -1 +1 @@ -{"version":3,"file":"ht-top-nav.directive.js","sourceRoot":"","sources":["ht-top-nav.directive.ts"],"names":["applayout","applayout.HtTopNav","applayout.HtTopNav.constructor","applayout.HtTopNav.instance","applayout.TopNavController","applayout.TopNavController.constructor"],"mappings":"AAAA,IAAO,SAAS,CAiCf;AAjCD,WAAO,SAAS,EAAC,CAAC;IACdA,YAAYA,CAACA;IAMbA;QAEIC;YAMAC,qBAAgBA,GAAYA,IAAIA,CAACA;YACjCA,eAAUA,GAAqBA,gBAAgBA,CAACA;YAChDA,iBAAYA,GAAWA,IAAIA,CAACA;YAE5BA,aAAQA,GAAWA,IAAIA,CAACA;YACxBA,UAAKA,GAAmBA;gBACpBA,SAASA,EAAEA,GAAGA;aACjBA,CAACA;YACFA,gBAAWA,GAAWA,4BAA4BA,CAACA;QAdnCA,CAACA;QAEVD,iBAAQA,GAAfA;YACIE,MAAMA,CAACA,IAAIA,QAAQA,EAAEA,CAACA;QAC1BA,CAACA;QALMF,gBAAOA,GAAkBA,CAACA,EAAEA,CAACA,CAACA;QAgBzCA,eAACA;IAADA,CAACA,AAjBDD,IAiBCA;IAEDA;QACII;QAAeC,CAACA;QACpBD,uBAACA;IAADA,CAACA,AAFDJ,IAECA;IAEDA,OAAOA;SACFA,MAAMA,CAACA,YAAYA,CAACA;SACpBA,SAASA,CAACA,UAAUA,EAAEA,QAAQA,CAACA,QAAQA,CAACA,CAACA;AAClDA,CAACA,EAjCM,SAAS,KAAT,SAAS,QAiCf"} \ No newline at end of file +{"version":3,"file":"ht-top-nav.directive.js","sourceRoot":"","sources":["ht-top-nav.directive.ts"],"names":["HtTopNav","HtTopNav.constructor","HtTopNav.instance","TopNavController","TopNavController.constructor"],"mappings":"AAAA,YAAY,CAAC;AAMb;IAEIA;QAMAC,qBAAgBA,GAAYA,IAAIA,CAACA;QACjCA,eAAUA,GAAqBA,gBAAgBA,CAACA;QAChDA,iBAAYA,GAAWA,IAAIA,CAACA;QAE5BA,aAAQA,GAAWA,IAAIA,CAACA;QACxBA,UAAKA,GAAmBA;YACpBA,SAASA,EAAEA,GAAGA;SACjBA,CAACA;QACFA,gBAAWA,GAAWA,4BAA4BA,CAACA;IAdnCA,CAACA;IAEVD,iBAAQA,GAAfA;QACIE,MAAMA,CAACA,IAAIA,QAAQA,EAAEA,CAACA;IAC1BA,CAACA;IALMF,gBAAOA,GAAkBA,CAACA,EAAEA,CAACA,CAACA;IAgBzCA,eAACA;AAADA,CAACA,AAjBD,IAiBC;AAED;IACIG;IAAgBC,CAACA;IACrBD,uBAACA;AAADA,CAACA,AAFD,IAEC;AAED,OAAO;KACF,MAAM,CAAC,YAAY,CAAC;KACpB,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/layout/ht-top-nav.directive.ts b/src/client/app/layout/ht-top-nav.directive.ts index 079fc6d..c807cfe 100644 --- a/src/client/app/layout/ht-top-nav.directive.ts +++ b/src/client/app/layout/ht-top-nav.directive.ts @@ -1,34 +1,32 @@ -module applayout { - 'use strict'; +'use strict'; - interface IHtTopNavScope { - navline: string - } - - class HtTopNav implements ng.IDirective { - static $inject: Array<string> = ['']; - constructor() { } +interface IHtTopNavScope { + navline: string +} - static instance() : ng.IDirective { - return new HtTopNav(); - } +class HtTopNav implements ng.IDirective { + static $inject: Array<string> = ['']; + constructor() { } - bindToController: boolean = true; - controller: TopNavController = TopNavController; - controllerAs: string = 'vm'; - link: (scope: ng.IScope, element: ng.IAugmentedJQuery, attrs: ng.IAttributes) => void; - restrict: string = 'EA'; - scope: IHtTopNavScope = { - 'navline': '=' - }; - templateUrl: string = 'app/layout/ht-top-nav.html'; + static instance(): ng.IDirective { + return new HtTopNav(); } - class TopNavController { - constructor() {} - } + bindToController: boolean = true; + controller: TopNavController = TopNavController; + controllerAs: string = 'vm'; + link: (scope: ng.IScope, element: ng.IAugmentedJQuery, attrs: ng.IAttributes) => void; + restrict: string = 'EA'; + scope: IHtTopNavScope = { + 'navline': '=' + }; + templateUrl: string = 'app/layout/ht-top-nav.html'; +} - angular - .module('app.layout') - .directive('htTopNav', HtTopNav.instance); +class TopNavController { + constructor() { } } + +angular + .module('app.layout') + .directive('htTopNav', HtTopNav.instance); diff --git a/src/client/app/layout/layout.module.js b/src/client/app/layout/layout.module.js index 0598c6e..8fde9a8 100644 --- a/src/client/app/layout/layout.module.js +++ b/src/client/app/layout/layout.module.js @@ -1,9 +1,3 @@ -var app; -(function (app) { - var layout; - (function (layout) { - 'use strict'; - angular.module('app.layout', ['app.core']); - })(layout = app.layout || (app.layout = {})); -})(app || (app = {})); +'use strict'; +angular.module('app.layout', ['app.core']); //# sourceMappingURL=layout.module.js.map \ No newline at end of file diff --git a/src/client/app/layout/layout.module.js.map b/src/client/app/layout/layout.module.js.map index 73afe1c..d868048 100644 --- a/src/client/app/layout/layout.module.js.map +++ b/src/client/app/layout/layout.module.js.map @@ -1 +1 @@ -{"version":3,"file":"layout.module.js","sourceRoot":"","sources":["layout.module.ts"],"names":["app","app.layout"],"mappings":"AAAA,IAAO,GAAG,CAIT;AAJD,WAAO,GAAG;IAACA,IAAAA,MAAMA,CAIhBA;IAJUA,WAAAA,MAAMA,EAACA,CAACA;QACfC,YAAYA,CAACA;QAEbA,OAAOA,CAACA,MAAMA,CAACA,YAAYA,EAAEA,CAACA,UAAUA,CAACA,CAACA,CAACA;IAC/CA,CAACA,EAJUD,MAAMA,GAANA,UAAMA,KAANA,UAAMA,QAIhBA;AAADA,CAACA,EAJM,GAAG,KAAH,GAAG,QAIT"} \ No newline at end of file +{"version":3,"file":"layout.module.js","sourceRoot":"","sources":["layout.module.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/layout/layout.module.ts b/src/client/app/layout/layout.module.ts index 6f8f252..57a7bb4 100644 --- a/src/client/app/layout/layout.module.ts +++ b/src/client/app/layout/layout.module.ts @@ -1,5 +1,3 @@ -module app.layout { - 'use strict'; +'use strict'; - angular.module('app.layout', ['app.core']); -} +angular.module('app.layout', ['app.core']); diff --git a/src/client/app/layout/shell.controller.js b/src/client/app/layout/shell.controller.js index 6c5deb0..5f74003 100644 --- a/src/client/app/layout/shell.controller.js +++ b/src/client/app/layout/shell.controller.js @@ -1,37 +1,31 @@ -var app; -(function (app) { - var layout; - (function (layout) { - 'use strict'; - var ShellController = (function () { - function ShellController($rootScope, $timeout, config, logger) { - this.$rootScope = $rootScope; - this.$timeout = $timeout; - this.config = config; - this.logger = logger; - this.busyMessage = 'Please wait ...'; - this.isBusy = true; - this.navline = { - title: this.config.appTitle, - text: 'Created by John Papa', - link: 'http://twitter.com/john_papa' - }; - this.logger.success(config.appTitle + ' loaded!', null); - this.hideSplash(); - this.$rootScope.showSplash = true; - } - ShellController.prototype.hideSplash = function () { - var _this = this; - //Force a 1 second delay so we can see the splash. - this.$timeout(function () { _this.$rootScope.showSplash = false; }, 1000); - }; - ShellController.$inject = ['$rootScope', '$timeout', 'config', 'logger']; - return ShellController; - })(); - layout.ShellController = ShellController; - angular - .module('app.layout') - .controller('ShellController', ShellController); - })(layout = app.layout || (app.layout = {})); -})(app || (app = {})); +'use strict'; +var ShellController = (function () { + function ShellController($rootScope, $timeout, config, logger) { + this.$rootScope = $rootScope; + this.$timeout = $timeout; + this.config = config; + this.logger = logger; + this.busyMessage = 'Please wait ...'; + this.isBusy = true; + this.navline = { + title: this.config.appTitle, + text: 'Created by John Papa', + link: 'http://twitter.com/john_papa' + }; + this.logger.success(config.appTitle + ' loaded!', null); + this.hideSplash(); + this.$rootScope.showSplash = true; + } + ShellController.prototype.hideSplash = function () { + var _this = this; + //Force a 1 second delay so we can see the splash. + this.$timeout(function () { _this.$rootScope.showSplash = false; }, 1000); + }; + ShellController.$inject = ['$rootScope', '$timeout', 'config', 'logger']; + return ShellController; +})(); +exports.ShellController = ShellController; +angular + .module('app.layout') + .controller('ShellController', ShellController); //# sourceMappingURL=shell.controller.js.map \ No newline at end of file diff --git a/src/client/app/layout/shell.controller.js.map b/src/client/app/layout/shell.controller.js.map index f9f7311..bfa329e 100644 --- a/src/client/app/layout/shell.controller.js.map +++ b/src/client/app/layout/shell.controller.js.map @@ -1 +1 @@ -{"version":3,"file":"shell.controller.js","sourceRoot":"","sources":["shell.controller.ts"],"names":["app","app.layout","app.layout.ShellController","app.layout.ShellController.constructor","app.layout.ShellController.hideSplash"],"mappings":"AAAA,IAAO,GAAG,CA+BT;AA/BD,WAAO,GAAG;IAACA,IAAAA,MAAMA,CA+BhBA;IA/BUA,WAAAA,MAAMA,EAACA,CAACA;QACfC,YAAYA,CAACA;QAEbA;YAEIC,yBAAoBA,UAAeA,EACvBA,QAA4BA,EAC5BA,MAA0BA,EAC1BA,MAA4BA;gBAHpBC,eAAUA,GAAVA,UAAUA,CAAKA;gBACvBA,aAAQA,GAARA,QAAQA,CAAoBA;gBAC5BA,WAAMA,GAANA,MAAMA,CAAoBA;gBAC1BA,WAAMA,GAANA,MAAMA,CAAsBA;gBAMxCA,gBAAWA,GAAGA,iBAAiBA,CAACA;gBAChCA,WAAMA,GAAGA,IAAIA,CAACA;gBACdA,YAAOA,GAAGA;oBACNA,KAAKA,EAAEA,IAAIA,CAACA,MAAMA,CAACA,QAAQA;oBAC3BA,IAAIA,EAAEA,sBAAsBA;oBAC5BA,IAAIA,EAAEA,8BAA8BA;iBACvCA,CAACA;gBAXEA,IAAIA,CAACA,MAAMA,CAACA,OAAOA,CAACA,MAAMA,CAACA,QAAQA,GAAGA,UAAUA,EAAEA,IAAIA,CAACA,CAACA;gBACxDA,IAAIA,CAACA,UAAUA,EAAEA,CAACA;gBAClBA,IAAIA,CAACA,UAAUA,CAACA,UAAUA,GAAGA,IAAIA,CAACA;YACtCA,CAACA;YAUDD,oCAAUA,GAAVA;gBAAAE,iBAGCA;gBADGA,AADAA,kDAAkDA;gBAClDA,IAAIA,CAACA,QAAQA,CAACA,cAAQA,KAAIA,CAACA,UAAUA,CAACA,UAAUA,GAAGA,KAAKA,CAACA,CAACA,CAACA,EAAEA,IAAIA,CAACA,CAACA;YACvEA,CAACA;YArBMF,uBAAOA,GAAkBA,CAACA,YAAYA,EAAEA,UAAUA,EAAEA,QAAQA,EAAEA,QAAQA,CAACA,CAACA;YAsBnFA,sBAACA;QAADA,CAACA,AAvBDD,IAuBCA;QAvBYA,sBAAeA,kBAuB3BA,CAAAA;QAEDA,OAAOA;aACFA,MAAMA,CAACA,YAAYA,CAACA;aACpBA,UAAUA,CAACA,iBAAiBA,EAAEA,eAAeA,CAACA,CAACA;IACxDA,CAACA,EA/BUD,MAAMA,GAANA,UAAMA,KAANA,UAAMA,QA+BhBA;AAADA,CAACA,EA/BM,GAAG,KAAH,GAAG,QA+BT"} \ No newline at end of file +{"version":3,"file":"shell.controller.js","sourceRoot":"","sources":["shell.controller.ts"],"names":["ShellController","ShellController.constructor","ShellController.hideSplash"],"mappings":"AAEA,YAAY,CAAC;AAEb;IAEIA,yBAAoBA,UAAeA,EACvBA,QAA4BA,EAC5BA,MAA4BA,EAC5BA,MAAcA;QAHNC,eAAUA,GAAVA,UAAUA,CAAKA;QACvBA,aAAQA,GAARA,QAAQA,CAAoBA;QAC5BA,WAAMA,GAANA,MAAMA,CAAsBA;QAC5BA,WAAMA,GAANA,MAAMA,CAAQA;QAM1BA,gBAAWA,GAAGA,iBAAiBA,CAACA;QAChCA,WAAMA,GAAGA,IAAIA,CAACA;QACdA,YAAOA,GAAGA;YACNA,KAAKA,EAAEA,IAAIA,CAACA,MAAMA,CAACA,QAAQA;YAC3BA,IAAIA,EAAEA,sBAAsBA;YAC5BA,IAAIA,EAAEA,8BAA8BA;SACvCA,CAACA;QAXEA,IAAIA,CAACA,MAAMA,CAACA,OAAOA,CAACA,MAAMA,CAACA,QAAQA,GAAGA,UAAUA,EAAEA,IAAIA,CAACA,CAACA;QACxDA,IAAIA,CAACA,UAAUA,EAAEA,CAACA;QAClBA,IAAIA,CAACA,UAAUA,CAACA,UAAUA,GAAGA,IAAIA,CAACA;IACtCA,CAACA;IAUDD,oCAAUA,GAAVA;QAAAE,iBAGCA;QADGA,AADAA,kDAAkDA;QAClDA,IAAIA,CAACA,QAAQA,CAACA,cAAQA,KAAIA,CAACA,UAAUA,CAACA,UAAUA,GAAGA,KAAKA,CAACA,CAACA,CAACA,EAAEA,IAAIA,CAACA,CAACA;IACvEA,CAACA;IArBMF,uBAAOA,GAAkBA,CAACA,YAAYA,EAAEA,UAAUA,EAAEA,QAAQA,EAAEA,QAAQA,CAACA,CAACA;IAsBnFA,sBAACA;AAADA,CAACA,AAvBD,IAuBC;AAvBY,uBAAe,kBAuB3B,CAAA;AAED,OAAO;KACF,MAAM,CAAC,YAAY,CAAC;KACpB,UAAU,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/layout/shell.controller.ts b/src/client/app/layout/shell.controller.ts index 47e48df..95c6c73 100644 --- a/src/client/app/layout/shell.controller.ts +++ b/src/client/app/layout/shell.controller.ts @@ -1,32 +1,32 @@ -module app.layout { - 'use strict'; +import { Logger } from '../blocks/logger/logger'; - export class ShellController { - static $inject: Array<string> = ['$rootScope', '$timeout', 'config', 'logger']; - constructor(private $rootScope: any, - private $timeout: ng.ITimeoutService, - private config: {appTitle: string}, - private logger: blocks.logger.Logger) { - this.logger.success(config.appTitle + ' loaded!', null); - this.hideSplash(); - this.$rootScope.showSplash = true; - } +'use strict'; - busyMessage = 'Please wait ...'; - isBusy = true; - navline = { - title: this.config.appTitle, - text: 'Created by John Papa', - link: 'http://twitter.com/john_papa' - }; - - hideSplash() { - //Force a 1 second delay so we can see the splash. - this.$timeout(() => { this.$rootScope.showSplash = false; }, 1000); - } +export class ShellController { + static $inject: Array<string> = ['$rootScope', '$timeout', 'config', 'logger']; + constructor(private $rootScope: any, + private $timeout: ng.ITimeoutService, + private config: { appTitle: string }, + private logger: Logger) { + this.logger.success(config.appTitle + ' loaded!', null); + this.hideSplash(); + this.$rootScope.showSplash = true; } - angular - .module('app.layout') - .controller('ShellController', ShellController); + busyMessage = 'Please wait ...'; + isBusy = true; + navline = { + title: this.config.appTitle, + text: 'Created by John Papa', + link: 'http://twitter.com/john_papa' + }; + + hideSplash() { + //Force a 1 second delay so we can see the splash. + this.$timeout(() => { this.$rootScope.showSplash = false; }, 1000); + } } + +angular + .module('app.layout') + .controller('ShellController', ShellController); diff --git a/src/client/app/layout/sidebar.controller.js b/src/client/app/layout/sidebar.controller.js index 7dd9c80..7cc8f16 100644 --- a/src/client/app/layout/sidebar.controller.js +++ b/src/client/app/layout/sidebar.controller.js @@ -1,34 +1,28 @@ -var app; -(function (app) { - var layout; - (function (layout) { - 'use strict'; - var SidebarController = (function () { - function SidebarController($state) { - this.$state = $state; - this.states = this.$state.get(); - this.getNavRoutes(); - } - SidebarController.prototype.isCurrent = function (route) { - var currentState = this.$state.current; - if (!route.title || !currentState || !currentState.title) { - return ''; - } - var menuName = route.title; - return currentState.title.substr(0, menuName.length) === menuName ? 'current' : ''; - }; - SidebarController.prototype.getNavRoutes = function () { - this.navRoutes = this.states - .filter(function (state) { return state.settings && state.settings.nav; }) - .sort(function (state1, state2) { return state1.settings.nav - state2.settings.nav; }); - }; - SidebarController.$inject = ['$state']; - return SidebarController; - })(); - layout.SidebarController = SidebarController; - angular - .module('app.layout') - .controller('SidebarController', SidebarController); - })(layout = app.layout || (app.layout = {})); -})(app || (app = {})); +'use strict'; +var SidebarController = (function () { + function SidebarController($state) { + this.$state = $state; + this.states = this.$state.get(); + this.getNavRoutes(); + } + SidebarController.prototype.isCurrent = function (route) { + var currentState = this.$state.current; + if (!route.title || !currentState || !currentState.title) { + return ''; + } + var menuName = route.title; + return currentState.title.substr(0, menuName.length) === menuName ? 'current' : ''; + }; + SidebarController.prototype.getNavRoutes = function () { + this.navRoutes = this.states + .filter(function (state) { return state.settings && state.settings.nav; }) + .sort(function (state1, state2) { return state1.settings.nav - state2.settings.nav; }); + }; + SidebarController.$inject = ['$state']; + return SidebarController; +})(); +exports.SidebarController = SidebarController; +angular + .module('app.layout') + .controller('SidebarController', SidebarController); //# sourceMappingURL=sidebar.controller.js.map \ No newline at end of file diff --git a/src/client/app/layout/sidebar.controller.js.map b/src/client/app/layout/sidebar.controller.js.map index 84215bc..4b46b2a 100644 --- a/src/client/app/layout/sidebar.controller.js.map +++ b/src/client/app/layout/sidebar.controller.js.map @@ -1 +1 @@ -{"version":3,"file":"sidebar.controller.js","sourceRoot":"","sources":["sidebar.controller.ts"],"names":["app","app.layout","app.layout.SidebarController","app.layout.SidebarController.constructor","app.layout.SidebarController.isCurrent","app.layout.SidebarController.getNavRoutes"],"mappings":"AAAA,IAAO,GAAG,CAmCT;AAnCD,WAAO,GAAG;IAACA,IAAAA,MAAMA,CAmChBA;IAnCUA,WAAAA,MAAMA,EAACA,CAACA;QACfC,YAAYA,CAACA;QAMbA;YAEIC,2BAAoBA,MAA2BA;gBAA3BC,WAAMA,GAANA,MAAMA,CAAqBA;gBAK/CA,WAAMA,GAAiCA,IAAIA,CAACA,MAAMA,CAACA,GAAGA,EAAEA,CAACA;gBAJrDA,IAAIA,CAACA,YAAYA,EAAEA,CAACA;YACxBA,CAACA;YAKDD,qCAASA,GAATA,UAAUA,KAAwBA;gBAC9BE,IAAIA,YAAYA,GAAQA,IAAIA,CAACA,MAAMA,CAACA,OAAOA,CAACA;gBAC5CA,EAAEA,CAACA,CAACA,CAACA,KAAKA,CAACA,KAAKA,IAAIA,CAACA,YAAYA,IAAIA,CAACA,YAAYA,CAACA,KAAKA,CAACA,CAACA,CAACA;oBACvDA,MAAMA,CAACA,EAAEA,CAACA;gBACdA,CAACA;gBACDA,IAAIA,QAAQA,GAAWA,KAAKA,CAACA,KAAKA,CAACA;gBACnCA,MAAMA,CAACA,YAAYA,CAACA,KAAKA,CAACA,MAAMA,CAACA,CAACA,EAAEA,QAAQA,CAACA,MAAMA,CAACA,KAAKA,QAAQA,GAAGA,SAASA,GAAGA,EAAEA,CAACA;YACvFA,CAACA;YAEOF,wCAAYA,GAApBA;gBACIG,IAAIA,CAACA,SAASA,GAAGA,IAAIA,CAACA,MAAMA;qBACvBA,MAAMA,CAACA,UAACA,KAAKA,IAAKA,OAAAA,KAAKA,CAACA,QAAQA,IAAIA,KAAKA,CAACA,QAAQA,CAACA,GAAGA,EAApCA,CAAoCA,CAACA;qBACvDA,IAAIA,CAACA,UAACA,MAAMA,EAAEA,MAAMA,IAAKA,OAAAA,MAAMA,CAACA,QAAQA,CAACA,GAAGA,GAAGA,MAAMA,CAACA,QAAQA,CAACA,GAAGA,EAAzCA,CAAyCA,CAACA,CAACA;YAC7EA,CAACA;YArBMH,yBAAOA,GAAkBA,CAACA,QAAQA,CAACA,CAACA;YAsB/CA,wBAACA;QAADA,CAACA,AAvBDD,IAuBCA;QAvBYA,wBAAiBA,oBAuB7BA,CAAAA;QAEDA,OAAOA;aACFA,MAAMA,CAACA,YAAYA,CAACA;aACpBA,UAAUA,CAACA,mBAAmBA,EAAEA,iBAAiBA,CAACA,CAACA;IAC5DA,CAACA,EAnCUD,MAAMA,GAANA,UAAMA,KAANA,UAAMA,QAmChBA;AAADA,CAACA,EAnCM,GAAG,KAAH,GAAG,QAmCT"} \ No newline at end of file +{"version":3,"file":"sidebar.controller.js","sourceRoot":"","sources":["sidebar.controller.ts"],"names":["SidebarController","SidebarController.constructor","SidebarController.isCurrent","SidebarController.getNavRoutes"],"mappings":"AAAA,YAAY,CAAC;AAMb;IAEIA,2BAAoBA,MAA2BA;QAA3BC,WAAMA,GAANA,MAAMA,CAAqBA;QAK/CA,WAAMA,GAAiCA,IAAIA,CAACA,MAAMA,CAACA,GAAGA,EAAEA,CAACA;QAJrDA,IAAIA,CAACA,YAAYA,EAAEA,CAACA;IACxBA,CAACA;IAKDD,qCAASA,GAATA,UAAUA,KAAwBA;QAC9BE,IAAIA,YAAYA,GAAQA,IAAIA,CAACA,MAAMA,CAACA,OAAOA,CAACA;QAC5CA,EAAEA,CAACA,CAACA,CAACA,KAAKA,CAACA,KAAKA,IAAIA,CAACA,YAAYA,IAAIA,CAACA,YAAYA,CAACA,KAAKA,CAACA,CAACA,CAACA;YACvDA,MAAMA,CAACA,EAAEA,CAACA;QACdA,CAACA;QACDA,IAAIA,QAAQA,GAAWA,KAAKA,CAACA,KAAKA,CAACA;QACnCA,MAAMA,CAACA,YAAYA,CAACA,KAAKA,CAACA,MAAMA,CAACA,CAACA,EAAEA,QAAQA,CAACA,MAAMA,CAACA,KAAKA,QAAQA,GAAGA,SAASA,GAAGA,EAAEA,CAACA;IACvFA,CAACA;IAEOF,wCAAYA,GAApBA;QACIG,IAAIA,CAACA,SAASA,GAAGA,IAAIA,CAACA,MAAMA;aACvBA,MAAMA,CAACA,UAACA,KAAKA,IAAKA,OAAAA,KAAKA,CAACA,QAAQA,IAAIA,KAAKA,CAACA,QAAQA,CAACA,GAAGA,EAApCA,CAAoCA,CAACA;aACvDA,IAAIA,CAACA,UAACA,MAAMA,EAAEA,MAAMA,IAAKA,OAAAA,MAAMA,CAACA,QAAQA,CAACA,GAAGA,GAAGA,MAAMA,CAACA,QAAQA,CAACA,GAAGA,EAAzCA,CAAyCA,CAACA,CAACA;IAC7EA,CAACA;IArBMH,yBAAOA,GAAkBA,CAACA,QAAQA,CAACA,CAACA;IAsB/CA,wBAACA;AAADA,CAACA,AAvBD,IAuBC;AAvBY,yBAAiB,oBAuB7B,CAAA;AAED,OAAO;KACF,MAAM,CAAC,YAAY,CAAC;KACpB,UAAU,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/layout/sidebar.controller.ts b/src/client/app/layout/sidebar.controller.ts index 0ca3c54..ef0e112 100644 --- a/src/client/app/layout/sidebar.controller.ts +++ b/src/client/app/layout/sidebar.controller.ts @@ -1,36 +1,34 @@ -module app.layout { - 'use strict'; +'use strict'; - export interface IStateExtra extends ng.ui.IState { - settings: any; - } - - export class SidebarController { - static $inject: Array<string> = ['$state']; - constructor(private $state: ng.ui.IStateService) { - this.getNavRoutes(); - } +export interface IStateExtra extends ng.ui.IState { + settings: any; +} - navRoutes: IStateExtra[]; - states: IStateExtra[] = <IStateExtra[]>this.$state.get(); +export class SidebarController { + static $inject: Array<string> = ['$state']; + constructor(private $state: ng.ui.IStateService) { + this.getNavRoutes(); + } - isCurrent(route: { title: string }) { - var currentState: any = this.$state.current; - if (!route.title || !currentState || !currentState.title) { - return ''; - } - var menuName: string = route.title; - return currentState.title.substr(0, menuName.length) === menuName ? 'current' : ''; - } + navRoutes: IStateExtra[]; + states: IStateExtra[] = <IStateExtra[]>this.$state.get(); - private getNavRoutes() { - this.navRoutes = this.states - .filter((state) => state.settings && state.settings.nav) - .sort((state1, state2) => state1.settings.nav - state2.settings.nav); + isCurrent(route: { title: string }) { + var currentState: any = this.$state.current; + if (!route.title || !currentState || !currentState.title) { + return ''; } + var menuName: string = route.title; + return currentState.title.substr(0, menuName.length) === menuName ? 'current' : ''; } - angular - .module('app.layout') - .controller('SidebarController', SidebarController); + private getNavRoutes() { + this.navRoutes = this.states + .filter((state) => state.settings && state.settings.nav) + .sort((state1, state2) => state1.settings.nav - state2.settings.nav); + } } + +angular + .module('app.layout') + .controller('SidebarController', SidebarController); diff --git a/src/client/app/widgets/ht-widget-header.directive.js b/src/client/app/widgets/ht-widget-header.directive.js index 1e50e3c..5c90f83 100644 --- a/src/client/app/widgets/ht-widget-header.directive.js +++ b/src/client/app/widgets/ht-widget-header.directive.js @@ -1,34 +1,28 @@ -var app; -(function (app) { - var widgets; - (function (widgets) { - 'use strict'; - //Usage: - //<div ht-widget-header title="vm.map.title"></div> - // Creates: - // <div ht-widget-header="" - // title="Movie" - // allow-collapse="true" </div> - var HtWidgetHeader = (function () { - function HtWidgetHeader() { - this.scope = { - 'title': '@', - 'subtitle': '@', - 'rightText': '@', - 'allowCollapse': '@' - }; - this.templateUrl = 'app/widgets/widget-header.html'; - this.restrict = 'EA'; - } - HtWidgetHeader.instance = function () { - return new HtWidgetHeader(); - }; - HtWidgetHeader.$inject = ['']; - return HtWidgetHeader; - })(); - angular - .module('app.widgets') - .directive('htWidgetHeader', HtWidgetHeader.instance); - })(widgets = app.widgets || (app.widgets = {})); -})(app || (app = {})); +'use strict'; +//Usage: +//<div ht-widget-header title="vm.map.title"></div> +// Creates: +// <div ht-widget-header="" +// title="Movie" +// allow-collapse="true" </div> +var HtWidgetHeader = (function () { + function HtWidgetHeader() { + this.scope = { + 'title': '@', + 'subtitle': '@', + 'rightText': '@', + 'allowCollapse': '@' + }; + this.templateUrl = 'app/widgets/widget-header.html'; + this.restrict = 'EA'; + } + HtWidgetHeader.instance = function () { + return new HtWidgetHeader(); + }; + HtWidgetHeader.$inject = ['']; + return HtWidgetHeader; +})(); +angular + .module('app.widgets') + .directive('htWidgetHeader', HtWidgetHeader.instance); //# sourceMappingURL=ht-widget-header.directive.js.map \ No newline at end of file diff --git a/src/client/app/widgets/ht-widget-header.directive.js.map b/src/client/app/widgets/ht-widget-header.directive.js.map index 318bff4..bb6035c 100644 --- a/src/client/app/widgets/ht-widget-header.directive.js.map +++ b/src/client/app/widgets/ht-widget-header.directive.js.map @@ -1 +1 @@ -{"version":3,"file":"ht-widget-header.directive.js","sourceRoot":"","sources":["ht-widget-header.directive.ts"],"names":["app","app.widgets","app.widgets.HtWidgetHeader","app.widgets.HtWidgetHeader.constructor","app.widgets.HtWidgetHeader.instance"],"mappings":"AAAA,IAAO,GAAG,CAoCT;AApCD,WAAO,GAAG;IAACA,IAAAA,OAAOA,CAoCjBA;IApCUA,WAAAA,OAAOA,EAACA,CAACA;QAChBC,YAAYA,CAACA;QAcbA,AANAA,QAAQA;QACRA,mDAAmDA;QACnDA,WAAWA;QACXA,2BAA2BA;QAC3BA,qBAAqBA;QACrBA,oCAAoCA;;YAGhCC;gBAMAC,UAAKA,GAAyBA;oBAC1BA,OAAOA,EAAEA,GAAGA;oBACZA,UAAUA,EAAEA,GAAGA;oBACfA,WAAWA,EAAEA,GAAGA;oBAChBA,eAAeA,EAAEA,GAAGA;iBACvBA,CAACA;gBACFA,gBAAWA,GAAWA,gCAAgCA,CAACA;gBACvDA,aAAQA,GAAWA,IAAIA,CAACA;YAbTA,CAACA;YAETD,uBAAQA,GAAfA;gBACIE,MAAMA,CAACA,IAAIA,cAAcA,EAAEA,CAACA;YAChCA,CAACA;YALMF,sBAAOA,GAAkBA,CAACA,EAAEA,CAACA,CAACA;YAezCA,qBAACA;QAADA,CAACA,AAhBDD,IAgBCA;QAEDA,OAAOA;aACFA,MAAMA,CAACA,aAAaA,CAACA;aACrBA,SAASA,CAACA,gBAAgBA,EAAEA,cAAcA,CAACA,QAAQA,CAACA,CAACA;IAC9DA,CAACA,EApCUD,OAAOA,GAAPA,WAAOA,KAAPA,WAAOA,QAoCjBA;AAADA,CAACA,EApCM,GAAG,KAAH,GAAG,QAoCT"} \ No newline at end of file +{"version":3,"file":"ht-widget-header.directive.js","sourceRoot":"","sources":["ht-widget-header.directive.ts"],"names":["HtWidgetHeader","HtWidgetHeader.constructor","HtWidgetHeader.instance"],"mappings":"AAAA,YAAY,CAAC;AAcb,AANA,QAAQ;AACR,mDAAmD;AACnD,WAAW;AACX,2BAA2B;AAC3B,qBAAqB;AACrB,oCAAoC;;IAGhCA;QAMAC,UAAKA,GAAyBA;YAC1BA,OAAOA,EAAEA,GAAGA;YACZA,UAAUA,EAAEA,GAAGA;YACfA,WAAWA,EAAEA,GAAGA;YAChBA,eAAeA,EAAEA,GAAGA;SACvBA,CAACA;QACFA,gBAAWA,GAAWA,gCAAgCA,CAACA;QACvDA,aAAQA,GAAWA,IAAIA,CAACA;IAbRA,CAACA;IAEVD,uBAAQA,GAAfA;QACIE,MAAMA,CAACA,IAAIA,cAAcA,EAAEA,CAACA;IAChCA,CAACA;IALMF,sBAAOA,GAAkBA,CAACA,EAAEA,CAACA,CAACA;IAezCA,qBAACA;AAADA,CAACA,AAhBD,IAgBC;AAED,OAAO;KACF,MAAM,CAAC,aAAa,CAAC;KACrB,SAAS,CAAC,gBAAgB,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/widgets/ht-widget-header.directive.ts b/src/client/app/widgets/ht-widget-header.directive.ts index 7e4341c..767607d 100644 --- a/src/client/app/widgets/ht-widget-header.directive.ts +++ b/src/client/app/widgets/ht-widget-header.directive.ts @@ -1,37 +1,35 @@ -module app.widgets { - 'use strict'; +'use strict'; - interface IHtWidgetHeaderScope { - title: string; - subtitle: string; - rightText: string; - allowCollapse: string; - } - //Usage: - //<div ht-widget-header title="vm.map.title"></div> - // Creates: - // <div ht-widget-header="" - // title="Movie" - // allow-collapse="true" </div> - class HtWidgetHeader implements ng.IDirective { - static $inject: Array<string> = ['']; - constructor() {} - - static instance(): ng.IDirective { - return new HtWidgetHeader(); - } +interface IHtWidgetHeaderScope { + title: string; + subtitle: string; + rightText: string; + allowCollapse: string; +} +//Usage: +//<div ht-widget-header title="vm.map.title"></div> +// Creates: +// <div ht-widget-header="" +// title="Movie" +// allow-collapse="true" </div> +class HtWidgetHeader implements ng.IDirective { + static $inject: Array<string> = ['']; + constructor() { } - scope: IHtWidgetHeaderScope = { - 'title': '@', - 'subtitle': '@', - 'rightText': '@', - 'allowCollapse': '@' - }; - templateUrl: string = 'app/widgets/widget-header.html'; - restrict: string = 'EA'; + static instance(): ng.IDirective { + return new HtWidgetHeader(); } - angular - .module('app.widgets') - .directive('htWidgetHeader', HtWidgetHeader.instance); + scope: IHtWidgetHeaderScope = { + 'title': '@', + 'subtitle': '@', + 'rightText': '@', + 'allowCollapse': '@' + }; + templateUrl: string = 'app/widgets/widget-header.html'; + restrict: string = 'EA'; } + +angular + .module('app.widgets') + .directive('htWidgetHeader', HtWidgetHeader.instance); diff --git a/src/client/app/widgets/widgets.module.js b/src/client/app/widgets/widgets.module.js index 17cb2bb..29451ce 100644 --- a/src/client/app/widgets/widgets.module.js +++ b/src/client/app/widgets/widgets.module.js @@ -1,9 +1,3 @@ -var app; -(function (app) { - var widgets; - (function (widgets) { - 'use strict'; - angular.module('app.widgets', []); - })(widgets = app.widgets || (app.widgets = {})); -})(app || (app = {})); +'use strict'; +angular.module('app.widgets', []); //# sourceMappingURL=widgets.module.js.map \ No newline at end of file diff --git a/src/client/app/widgets/widgets.module.js.map b/src/client/app/widgets/widgets.module.js.map index 15db1b7..23bac69 100644 --- a/src/client/app/widgets/widgets.module.js.map +++ b/src/client/app/widgets/widgets.module.js.map @@ -1 +1 @@ -{"version":3,"file":"widgets.module.js","sourceRoot":"","sources":["widgets.module.ts"],"names":["app","app.widgets"],"mappings":"AAAA,IAAO,GAAG,CAIT;AAJD,WAAO,GAAG;IAACA,IAAAA,OAAOA,CAIjBA;IAJUA,WAAAA,OAAOA,EAACA,CAACA;QAChBC,YAAYA,CAACA;QAEbA,OAAOA,CAACA,MAAMA,CAACA,aAAaA,EAAEA,EAAEA,CAACA,CAACA;IACtCA,CAACA,EAJUD,OAAOA,GAAPA,WAAOA,KAAPA,WAAOA,QAIjBA;AAADA,CAACA,EAJM,GAAG,KAAH,GAAG,QAIT"} \ No newline at end of file +{"version":3,"file":"widgets.module.js","sourceRoot":"","sources":["widgets.module.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/src/client/app/widgets/widgets.module.ts b/src/client/app/widgets/widgets.module.ts index dc1b374..aee9595 100644 --- a/src/client/app/widgets/widgets.module.ts +++ b/src/client/app/widgets/widgets.module.ts @@ -1,5 +1,3 @@ -module app.widgets { - 'use strict'; +'use strict'; - angular.module('app.widgets', []); -} +angular.module('app.widgets', []); diff --git a/src/client/tsconfig.json b/src/client/tsconfig.json index e8a1e5a..5f61f26 100644 --- a/src/client/tsconfig.json +++ b/src/client/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "module": "commonjs", "noImplicitAny": true, "removeComments": false, "preserveConstEnums": true,