-
-
Save pjlamb12/d70e9023263bd9709e8d6c6f99b7ff2f to your computer and use it in GitHub Desktop.
SystemJS Configuration for Angular 2 App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<!-- Other Stuff --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.35.0/es6-shim.min.js"></script> | |
<script src="js/dependencies/zone.js/dist/zone.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/reflect-metadata/0.1.3/Reflect.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.27/system.src.js"></script> | |
<script src="/js/systemjs.config.js"></script> | |
<script type="text/javascript"> | |
System.import('app').catch(function(err) { console.error(err); }) | |
</script> | |
</head> | |
<body> | |
<%- body %> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | |
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | |
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | |
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | |
return c > 3 && r && Object.defineProperty(target, key, r), r; | |
}; | |
var __metadata = (this && this.__metadata) || function (k, v) { | |
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | |
}; | |
var __extends = (this && this.__extends) || function (d, b) { | |
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
var __param = (this && this.__param) || function (paramIndex, decorator) { | |
return function (target, key) { decorator(target, key, paramIndex); } | |
}; | |
System.register("config/config", ['@angular/core', 'rxjs/Observable', '@angular/http'], function(exports_1, context_1) { | |
"use strict"; | |
var __moduleName = context_1 && context_1.id; | |
var core_1, Observable_1, http_1; | |
var Config; | |
return { | |
setters:[ | |
function (core_1_1) { | |
core_1 = core_1_1; | |
}, | |
function (Observable_1_1) { | |
Observable_1 = Observable_1_1; | |
}, | |
function (http_1_1) { | |
http_1 = http_1_1; | |
}], | |
execute: function() { | |
Config = (function () { | |
function Config(http) { | |
this.http = http; | |
} | |
Config.prototype.load = function () { | |
var _this = this; | |
return new Promise(function (resolve, reject) { | |
_this.http.get('js/app/config/env.json') | |
.map(function (res) { return res.json(); }) | |
.subscribe(function (env_data) { | |
_this._env = env_data; | |
_this.http.get('js/app/config/' + env_data.env + '.json') | |
.map(function (res) { return res.json(); }) | |
.catch(function (error) { | |
console.error(error); | |
return Observable_1.Observable.throw(error.json().error || 'Server error'); | |
}) | |
.subscribe(function (data) { | |
_this._config = data; | |
resolve(true); | |
}); | |
}); | |
}); | |
}; | |
Config.prototype.getEnv = function (key) { | |
return this._env[key]; | |
}; | |
Config.prototype.get = function (key) { | |
return this._config[key]; | |
}; | |
Config.prototype.setCustom = function (key, val) { | |
this._configCustom[key] = val; | |
}; | |
Config.prototype.getCustom = function (key) { | |
return this._configCustom[key]; | |
}; | |
Config = __decorate([ | |
core_1.Injectable(), | |
__metadata('design:paramtypes', [http_1.Http]) | |
], Config); | |
return Config; | |
}()); | |
exports_1("Config", Config); | |
; | |
} | |
} | |
}); | |
System.register("shared/directives/custom-router-outlet", ['@angular/core', '@angular/router-deprecated', "config/config"], function(exports_2, context_2) { | |
"use strict"; | |
var __moduleName = context_2 && context_2.id; | |
var core_2, router_deprecated_1, config_1; | |
var CustomRouterOutlet; | |
return { | |
setters:[ | |
function (core_2_1) { | |
core_2 = core_2_1; | |
}, | |
function (router_deprecated_1_1) { | |
router_deprecated_1 = router_deprecated_1_1; | |
}, | |
function (config_1_1) { | |
config_1 = config_1_1; | |
}], | |
execute: function() { | |
CustomRouterOutlet = (function (_super) { | |
__extends(CustomRouterOutlet, _super); | |
function CustomRouterOutlet(_elementRef, _loader, _parentRouter, nameAttr, _config) { | |
_super.call(this, _elementRef, _loader, _parentRouter, nameAttr); | |
this._config = _config; | |
this.parentRouter = _parentRouter; | |
} | |
CustomRouterOutlet.prototype.activate = function (instruction) { | |
var _this = this; | |
return this._config.load().then(function () { return _super.prototype.activate.call(_this, instruction); }); | |
}; | |
CustomRouterOutlet = __decorate([ | |
core_2.Directive({ | |
selector: 'custom-router-outlet' | |
}), | |
__param(3, core_2.Attribute('name')), | |
__metadata('design:paramtypes', [core_2.ViewContainerRef, core_2.DynamicComponentLoader, router_deprecated_1.Router, String, config_1.Config]) | |
], CustomRouterOutlet); | |
return CustomRouterOutlet; | |
}(router_deprecated_1.RouterOutlet)); | |
exports_2("CustomRouterOutlet", CustomRouterOutlet); | |
} | |
} | |
}); | |
System.register("auth_module/auth/app_injector", [], function(exports_3, context_3) { | |
"use strict"; | |
var __moduleName = context_3 && context_3.id; | |
var appInjectorRef, appInjector; | |
return { | |
setters:[], | |
execute: function() { | |
exports_3("appInjector", appInjector = function (injector) { | |
if (injector) { | |
appInjectorRef = injector; | |
} | |
return appInjectorRef; | |
}); | |
} | |
} | |
}); | |
System.register("auth_module/auth/auth", [], function(exports_4, context_4) { | |
"use strict"; | |
var __moduleName = context_4 && context_4.id; | |
var Auth; | |
return { | |
setters:[], | |
execute: function() { | |
Auth = (function () { | |
function Auth() { | |
this.loggedIn = false; | |
this.emptyLoginData(); | |
} | |
Auth.prototype.login = function (loginData) { | |
this.loggedIn = true; | |
this.loginData = loginData; | |
// set session | |
localStorage.setItem('a2authLoginData', JSON.stringify(loginData)); | |
console.log('login()'); | |
}; | |
Auth.prototype.loginFromSession = function () { | |
// load from session | |
if (localStorage.getItem("a2authLoginData") !== null && this.loggedIn === false) { | |
console.log('loginFromSession()'); | |
var a2authLoginData = JSON.parse(localStorage.getItem("a2authLoginData")); | |
console.log(a2authLoginData); | |
this.login(a2authLoginData); | |
} | |
}; | |
Auth.prototype.logout = function () { | |
this.loggedIn = false; | |
this.emptyLoginData(); | |
localStorage.removeItem('a2authLoginData'); | |
}; | |
Auth.prototype.check = function () { | |
if (localStorage.getItem("a2authLoginData") === null) { | |
console.log('Auth.check: Login false'); | |
return false; | |
} | |
var a2authLoginData = JSON.parse(localStorage.getItem("a2authLoginData")); | |
// session exits therefore, make at it login | |
if (a2authLoginData.token) { | |
console.log('Auth.check: Login true'); | |
this.loginFromSession(); | |
return true; | |
} | |
}; | |
Auth.prototype.emptyLoginData = function () { | |
this.loginData = {}; | |
}; | |
return Auth; | |
}()); | |
exports_4("Auth", Auth); | |
} | |
} | |
}); | |
System.register("auth_module/auth/check_auth", ['@angular/common', "auth_module/auth/app_injector", "auth_module/auth/auth", '@angular/router-deprecated'], function(exports_5, context_5) { | |
"use strict"; | |
var __moduleName = context_5 && context_5.id; | |
var common_1, app_injector_1, auth_1, router_deprecated_2; | |
var checkAuth; | |
return { | |
setters:[ | |
function (common_1_1) { | |
common_1 = common_1_1; | |
}, | |
function (app_injector_1_1) { | |
app_injector_1 = app_injector_1_1; | |
}, | |
function (auth_1_1) { | |
auth_1 = auth_1_1; | |
}, | |
function (router_deprecated_2_1) { | |
router_deprecated_2 = router_deprecated_2_1; | |
}], | |
execute: function() { | |
exports_5("checkAuth", checkAuth = function (next, previous) { | |
var injector = app_injector_1.appInjector(); // get the stored reference to the injector | |
var auth = injector.get(auth_1.Auth); | |
var router = injector.get(router_deprecated_2.Router); | |
var location = injector.get(common_1.Location); | |
// return a boolean or a promise that resolves a boolean | |
return new Promise(function (resolve, reject) { | |
if (auth.check()) { | |
// already login, redirect to default page | |
if (next.urlPath == 'login' || next.urlPath == 'signup') { | |
router.navigate(['/Home']); // r | |
// window.location.href = 'index.html'; | |
resolve(false); | |
} | |
else { | |
resolve(true); | |
} | |
} | |
else { | |
// not login; show the login page | |
if (next.urlPath == 'login' || next.urlPath == 'signup') { | |
resolve(true); | |
} | |
else { | |
router.navigate(['/Login']); // r | |
// window.location.href = 'login.html'; | |
resolve(false); | |
} | |
} | |
}); | |
}); | |
} | |
} | |
}); | |
System.register("shared/services/data.service", ['@angular/core', '@angular/http', 'rxjs/Observable', "config/config", 'rxjs/add/operator/map', 'rxjs/add/operator/catch'], function(exports_6, context_6) { | |
"use strict"; | |
var __moduleName = context_6 && context_6.id; | |
var core_3, http_2, Observable_2, config_2; | |
var DataService; | |
return { | |
setters:[ | |
function (core_3_1) { | |
core_3 = core_3_1; | |
}, | |
function (http_2_1) { | |
http_2 = http_2_1; | |
}, | |
function (Observable_2_1) { | |
Observable_2 = Observable_2_1; | |
}, | |
function (config_2_1) { | |
config_2 = config_2_1; | |
}, | |
function (_1) {}, | |
function (_2) {}], | |
execute: function() { | |
DataService = (function () { | |
function DataService(_http, _config) { | |
this._http = _http; | |
this._config = _config; | |
// API path | |
this.baseUrl = '/js/app'; | |
} | |
DataService.prototype.loginUser = function (formValues) { | |
// change this to your server login api which will be returning token and basic data | |
return this._http.get(this._config.get('apiUrl') + 'login.json') | |
.map(function (res) { return res.json(); }) | |
.catch(this.handleError); | |
}; | |
DataService.prototype.signupUser = function (formValues) { | |
// change this to your server signup api | |
// Will also making user logged in & returning token and basic data | |
return this._http.get(this._config.get('apiUrl') + 'login.json') | |
.map(function (res) { return res.json(); }) | |
.catch(this.handleError); | |
}; | |
DataService.prototype.handleError = function (error) { | |
console.error(error); | |
return Observable_2.Observable.throw(error.json().error || 'Server error'); | |
}; | |
DataService = __decorate([ | |
core_3.Injectable(), | |
__metadata('design:paramtypes', [http_2.Http, config_2.Config]) | |
], DataService); | |
return DataService; | |
}()); | |
exports_6("DataService", DataService); | |
} | |
} | |
}); | |
System.register("auth_module/login/login.component", ['@angular/core', '@angular/router-deprecated', '@angular/common', "shared/services/data.service", "auth_module/auth/auth", "auth_module/auth/check_auth"], function(exports_7, context_7) { | |
"use strict"; | |
var __moduleName = context_7 && context_7.id; | |
var core_4, router_deprecated_3, common_2, data_service_1, auth_2, check_auth_1; | |
var LoginComponent; | |
return { | |
setters:[ | |
function (core_4_1) { | |
core_4 = core_4_1; | |
}, | |
function (router_deprecated_3_1) { | |
router_deprecated_3 = router_deprecated_3_1; | |
}, | |
function (common_2_1) { | |
common_2 = common_2_1; | |
}, | |
function (data_service_1_1) { | |
data_service_1 = data_service_1_1; | |
}, | |
function (auth_2_1) { | |
auth_2 = auth_2_1; | |
}, | |
function (check_auth_1_1) { | |
check_auth_1 = check_auth_1_1; | |
}], | |
execute: function() { | |
LoginComponent = (function () { | |
function LoginComponent(_router, _dataService, _auth, _formBuilder) { | |
this._router = _router; | |
this._dataService = _dataService; | |
this._auth = _auth; | |
this._formBuilder = _formBuilder; | |
this.username = new common_2.Control("", common_2.Validators.compose([common_2.Validators.required])); | |
this.password = new common_2.Control("", common_2.Validators.compose([common_2.Validators.required])); | |
this.form = _formBuilder.group({ | |
username: this.username, | |
password: this.password, | |
}); | |
} | |
LoginComponent.prototype.login = function (event) { | |
var _this = this; | |
// This will be called when the user clicks on the Login button | |
event.preventDefault(); | |
this._dataService.loginUser(this.form.value) | |
.subscribe(function (response) { | |
_this._auth.login(response); | |
// and then we redirect the user to the home | |
_this._router.navigate(['\Home']); | |
}); | |
}; | |
LoginComponent = __decorate([ | |
core_4.Component({ | |
selector: 'login', | |
providers: [data_service_1.DataService, auth_2.Auth], | |
directives: [router_deprecated_3.RouterLink], | |
templateUrl: 'js/app/auth_module/login/login.component.html', | |
styles: ["\n body {\n background: #d2d6de;\n }\n "], | |
encapsulation: core_4.ViewEncapsulation.None | |
}), | |
router_deprecated_3.CanActivate(function (next, previous) { | |
return check_auth_1.checkAuth(next, previous); | |
}), | |
__metadata('design:paramtypes', [router_deprecated_3.Router, data_service_1.DataService, auth_2.Auth, common_2.FormBuilder]) | |
], LoginComponent); | |
return LoginComponent; | |
}()); | |
exports_7("LoginComponent", LoginComponent); | |
} | |
} | |
}); | |
// Contirbute at this | |
// Project https://github.com/hasanhameed07/angular2-validators | |
System.register("shared/validators/common", [], function(exports_8, context_8) { | |
"use strict"; | |
var __moduleName = context_8 && context_8.id; | |
var CommonValidators; | |
return { | |
setters:[], | |
execute: function() { | |
CommonValidators = (function () { | |
function CommonValidators() { | |
} | |
CommonValidators.email = function (control) { | |
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
if (control.value != "" && re.test(control.value)) { | |
return null; | |
} | |
return { "email": true }; | |
}; | |
CommonValidators.matchingPasswords = function (passwordKey, confirmPasswordKey) { | |
return function (group) { | |
var password = group.controls[passwordKey]; | |
var confirmPassword = group.controls[confirmPasswordKey]; | |
if (password.value !== confirmPassword.value) { | |
return { | |
matchingPasswords: true | |
}; | |
} | |
}; | |
}; | |
return CommonValidators; | |
}()); | |
exports_8("CommonValidators", CommonValidators); | |
} | |
} | |
}); | |
System.register("auth_module/signup/signup.component", ['@angular/core', '@angular/router-deprecated', '@angular/common', "shared/validators/common", "shared/services/data.service", "auth_module/auth/auth", "auth_module/auth/check_auth"], function(exports_9, context_9) { | |
"use strict"; | |
var __moduleName = context_9 && context_9.id; | |
var core_5, router_deprecated_4, common_3, common_4, data_service_2, auth_3, check_auth_2; | |
var SignupComponent; | |
return { | |
setters:[ | |
function (core_5_1) { | |
core_5 = core_5_1; | |
}, | |
function (router_deprecated_4_1) { | |
router_deprecated_4 = router_deprecated_4_1; | |
}, | |
function (common_3_1) { | |
common_3 = common_3_1; | |
}, | |
function (common_4_1) { | |
common_4 = common_4_1; | |
}, | |
function (data_service_2_1) { | |
data_service_2 = data_service_2_1; | |
}, | |
function (auth_3_1) { | |
auth_3 = auth_3_1; | |
}, | |
function (check_auth_2_1) { | |
check_auth_2 = check_auth_2_1; | |
}], | |
execute: function() { | |
SignupComponent = (function () { | |
function SignupComponent(_router, _dataService, _auth, _formBuilder) { | |
this._router = _router; | |
this._dataService = _dataService; | |
this._auth = _auth; | |
this._formBuilder = _formBuilder; | |
this.appName = new common_3.Control("", common_3.Validators.compose([common_3.Validators.required])); | |
this.username = new common_3.Control("", common_3.Validators.compose([common_3.Validators.required])); | |
this.email = new common_3.Control("", common_3.Validators.compose([common_3.Validators.required, common_4.CommonValidators.email])); | |
this.password = new common_3.Control("", common_3.Validators.compose([common_3.Validators.required])); | |
this.passwordConfirm = new common_3.Control("", common_3.Validators.compose([common_3.Validators.required])); | |
this.form = _formBuilder.group({ | |
appName: this.appName, | |
username: this.username, | |
email: this.email, | |
password: this.password, | |
passwordConfirm: this.passwordConfirm | |
}, { validator: common_4.CommonValidators.matchingPasswords('password', 'passwordConfirm') }); | |
} | |
SignupComponent.prototype.ngAfterViewInit = function () { | |
jQuery('input').iCheck({ | |
checkboxClass: 'icheckbox_square-blue', | |
radioClass: 'iradio_square-blue', | |
increaseArea: '20%' // optional | |
}); | |
}; | |
SignupComponent.prototype.submitForm = function () { | |
var _this = this; | |
console.log(JSON.stringify(this.form.value)); | |
this._dataService.signupUser(this.form.value) | |
.subscribe(function (response) { | |
// login user | |
_this._auth.login(response); | |
// and then we redirect the user to the home | |
_this._router.navigate(['\Home']); | |
}); | |
}; | |
SignupComponent = __decorate([ | |
core_5.Component({ | |
selector: 'signup', | |
providers: [data_service_2.DataService, auth_3.Auth], | |
directives: [common_3.FORM_DIRECTIVES, router_deprecated_4.RouterLink], | |
templateUrl: 'js/app/auth_module/signup/signup.component.html', | |
styles: ["\n body {\n background: #d2d6de;\n }\n "], | |
encapsulation: core_5.ViewEncapsulation.None | |
}), | |
router_deprecated_4.CanActivate(function (next, previous) { | |
return check_auth_2.checkAuth(next, previous); | |
}), | |
__metadata('design:paramtypes', [router_deprecated_4.Router, data_service_2.DataService, auth_3.Auth, common_3.FormBuilder]) | |
], SignupComponent); | |
return SignupComponent; | |
}()); | |
exports_9("SignupComponent", SignupComponent); | |
} | |
} | |
}); | |
System.register("shared/utilities/util", [], function(exports_10, context_10) { | |
"use strict"; | |
var __moduleName = context_10 && context_10.id; | |
var Util; | |
return { | |
setters:[], | |
execute: function() { | |
Util = (function () { | |
function Util() { | |
} | |
Util.prototype.fixWindowLayout = function () { | |
//Get window height and the wrapper height | |
var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight(); | |
var window_height = $(window).height(); | |
var sidebar_height = $(".sidebar").height(); | |
//Set the min-height of the content and sidebar based on the | |
//the height of the document. | |
if ($("body").hasClass("fixed")) { | |
$(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight()); | |
} | |
else { | |
var postSetWidth; | |
if (window_height >= sidebar_height) { | |
$(".content-wrapper, .right-side").css('min-height', window_height - neg); | |
postSetWidth = window_height - neg; | |
} | |
else { | |
$(".content-wrapper, .right-side").css('min-height', sidebar_height); | |
postSetWidth = sidebar_height; | |
} | |
} | |
}; | |
return Util; | |
}()); | |
exports_10("Util", Util); | |
} | |
} | |
}); | |
System.register("components/dashboard_layout/dashboard_layout.component", ['@angular/core', '@angular/router-deprecated', '@angular/common', "shared/services/data.service", "auth_module/auth/auth", "shared/utilities/util"], function(exports_11, context_11) { | |
"use strict"; | |
var __moduleName = context_11 && context_11.id; | |
var core_6, router_deprecated_5, common_5, data_service_3, auth_4, util_1; | |
var DashboardLayoutComponent; | |
return { | |
setters:[ | |
function (core_6_1) { | |
core_6 = core_6_1; | |
}, | |
function (router_deprecated_5_1) { | |
router_deprecated_5 = router_deprecated_5_1; | |
}, | |
function (common_5_1) { | |
common_5 = common_5_1; | |
}, | |
function (data_service_3_1) { | |
data_service_3 = data_service_3_1; | |
}, | |
function (auth_4_1) { | |
auth_4 = auth_4_1; | |
}, | |
function (util_1_1) { | |
util_1 = util_1_1; | |
}], | |
execute: function() { | |
DashboardLayoutComponent = (function () { | |
function DashboardLayoutComponent(router, _auth, _util) { | |
this.router = router; | |
this._auth = _auth; | |
this._util = _util; | |
this.loginData = this._auth.loginData; | |
this.loggedIn = this._auth.loggedIn; | |
} | |
DashboardLayoutComponent.prototype.ngAfterViewChecked = function () { | |
this._util.fixWindowLayout(); | |
}; | |
DashboardLayoutComponent.prototype.logout = function () { | |
this._auth.logout(); | |
this.router.navigate(['/Login']); // r | |
}; | |
DashboardLayoutComponent = __decorate([ | |
core_6.Component({ | |
selector: 'dashboard-layout', | |
inputs: ['pageTitle', 'pageSubtitle'], | |
templateUrl: 'js/app/components/dashboard_layout/dashboard_layout.component.html', | |
providers: [data_service_3.DataService, util_1.Util], | |
directives: [router_deprecated_5.ROUTER_DIRECTIVES, common_5.NgIf] | |
}), | |
__metadata('design:paramtypes', [router_deprecated_5.Router, auth_4.Auth, util_1.Util]) | |
], DashboardLayoutComponent); | |
return DashboardLayoutComponent; | |
}()); | |
exports_11("DashboardLayoutComponent", DashboardLayoutComponent); | |
} | |
} | |
}); | |
System.register("components/home/home.component", ['@angular/core', '@angular/router-deprecated', '@angular/common', "shared/services/data.service", "components/dashboard_layout/dashboard_layout.component", "auth_module/auth/check_auth", "auth_module/auth/auth"], function(exports_12, context_12) { | |
"use strict"; | |
var __moduleName = context_12 && context_12.id; | |
var core_7, router_deprecated_6, common_6, data_service_4, dashboard_layout_component_1, check_auth_3, auth_5; | |
var HomeComponent; | |
return { | |
setters:[ | |
function (core_7_1) { | |
core_7 = core_7_1; | |
}, | |
function (router_deprecated_6_1) { | |
router_deprecated_6 = router_deprecated_6_1; | |
}, | |
function (common_6_1) { | |
common_6 = common_6_1; | |
}, | |
function (data_service_4_1) { | |
data_service_4 = data_service_4_1; | |
}, | |
function (dashboard_layout_component_1_1) { | |
dashboard_layout_component_1 = dashboard_layout_component_1_1; | |
}, | |
function (check_auth_3_1) { | |
check_auth_3 = check_auth_3_1; | |
}, | |
function (auth_5_1) { | |
auth_5 = auth_5_1; | |
}], | |
execute: function() { | |
HomeComponent = (function () { | |
function HomeComponent(_router, _auth) { | |
this._router = _router; | |
this._auth = _auth; | |
} | |
HomeComponent = __decorate([ | |
core_7.Component({ | |
selector: 'home', | |
providers: [data_service_4.DataService], | |
templateUrl: 'js/app/components/home/home.component.html', | |
directives: [dashboard_layout_component_1.DashboardLayoutComponent, common_6.NgIf] | |
}), | |
router_deprecated_6.CanActivate(function (next, previous) { | |
return check_auth_3.checkAuth(next, previous); | |
}), | |
__metadata('design:paramtypes', [router_deprecated_6.Router, auth_5.Auth]) | |
], HomeComponent); | |
return HomeComponent; | |
}()); | |
exports_12("HomeComponent", HomeComponent); | |
} | |
} | |
}); | |
System.register("shared/services/member.service", ['@angular/core', '@angular/http', 'rxjs/Observable'], function(exports_13, context_13) { | |
"use strict"; | |
var __moduleName = context_13 && context_13.id; | |
var core_8, http_3, Observable_3; | |
var MemberService; | |
return { | |
setters:[ | |
function (core_8_1) { | |
core_8 = core_8_1; | |
}, | |
function (http_3_1) { | |
http_3 = http_3_1; | |
}, | |
function (Observable_3_1) { | |
Observable_3 = Observable_3_1; | |
}], | |
execute: function() { | |
MemberService = (function () { | |
function MemberService(http) { | |
this.http = http; | |
} | |
MemberService.prototype.getAllPeople = function () { | |
return this.http.get('member/get-people').map(function (res) { return res.json(); }).subscribe(function (data) { | |
console.log(data); | |
}); | |
}; | |
MemberService.prototype.getCommunicationsForPerson = function (id) { | |
return this.http.get('member/communications/' + id).map(function (res) { return res.json(); }); | |
}; | |
MemberService.prototype.getPersonById = function (id) { | |
return this.http.get('member/person/' + id).map(function (res) { return res.json(); }).catch(this.handleError); | |
}; | |
MemberService.prototype.searchPeople = function (param) { | |
param = param.toLowerCase(); | |
return this.http.get('member/get-people/' + param).map(function (res) { return res.json(); }).catch(this.handleError); | |
}; | |
MemberService.prototype.handleError = function (error) { | |
console.error(error); | |
return Observable_3.Observable.throw(error.json().error || 'Server error'); | |
}; | |
MemberService.prototype.updatePerson = function (personObject) { | |
console.log('I will update a person given an ID on the personObject'); | |
}; | |
MemberService.prototype.getClaimsForPerson = function (id, suffix) { | |
return this.http.get('member/claims/' + id).map(function (res) { return res.json(); }).catch(this.handleError); | |
}; | |
MemberService.prototype.getClaimById = function (id, suffix, claimId) { | |
return this.http.get('member/claims/' + id + '/' + claimId).map(function (res) { return res.json(); }).catch(this.handleError); | |
}; | |
MemberService.prototype.getFinancialsForPerson = function (id) { | |
return this.http.get('member/financials/' + id).map(function (res) { return res.json(); }).catch(this.handleError); | |
}; | |
MemberService.prototype.getMedicalConditions = function (id) { | |
return this.http.get('member/medical-conditions/' + id).map(function (res) { return res.json(); }).catch(this.handleError); | |
}; | |
MemberService = __decorate([ | |
core_8.Injectable(), | |
__metadata('design:paramtypes', [http_3.Http]) | |
], MemberService); | |
return MemberService; | |
}()); | |
exports_13("MemberService", MemberService); | |
} | |
} | |
}); | |
System.register("components/member-search/member-search.component", ['@angular/core', '@angular/router-deprecated', "shared/services/member.service"], function(exports_14, context_14) { | |
"use strict"; | |
var __moduleName = context_14 && context_14.id; | |
var core_9, router_deprecated_7, member_service_1; | |
var MemberSearch; | |
return { | |
setters:[ | |
function (core_9_1) { | |
core_9 = core_9_1; | |
}, | |
function (router_deprecated_7_1) { | |
router_deprecated_7 = router_deprecated_7_1; | |
}, | |
function (member_service_1_1) { | |
member_service_1 = member_service_1_1; | |
}], | |
execute: function() { | |
MemberSearch = (function () { | |
function MemberSearch(userService) { | |
this.userService = userService; | |
this.resultsLoading = false; | |
} | |
MemberSearch.prototype.routerCanDeactivate = function (next, prev) { | |
if (next.componentType.name.toLowerCase() === 'dashboard') { | |
return true; | |
} | |
else { | |
return confirm('Have you confirmed the member\'s information for this HIPAA protected section?'); | |
} | |
}; | |
MemberSearch.prototype.searchMembers = function (form) { | |
var _this = this; | |
this.searchParam = form.searchParam; | |
if (this.searchParam != '') { | |
this.resultsLoading = true; | |
this.results = null; | |
this.userService.searchPeople(this.searchParam).subscribe(function (data) { | |
_this.resultsLoading = false; | |
_this.results = data; | |
}, function (error) { return console.error(error); }); | |
} | |
}; | |
MemberSearch = __decorate([ | |
core_9.Component({ | |
selector: 'member-search', | |
templateUrl: 'js/app/components/member-search/member-search.component.html', | |
directives: [router_deprecated_7.ROUTER_DIRECTIVES], | |
providers: [member_service_1.MemberService] | |
}), | |
__metadata('design:paramtypes', [member_service_1.MemberService]) | |
], MemberSearch); | |
return MemberSearch; | |
}()); | |
exports_14("MemberSearch", MemberSearch); | |
} | |
} | |
}); | |
System.register("shared/interfaces/address", [], function(exports_15, context_15) { | |
"use strict"; | |
var __moduleName = context_15 && context_15.id; | |
return { | |
setters:[], | |
execute: function() { | |
} | |
} | |
}); | |
System.register("shared/interfaces/Plan", [], function(exports_16, context_16) { | |
"use strict"; | |
var __moduleName = context_16 && context_16.id; | |
return { | |
setters:[], | |
execute: function() { | |
; | |
} | |
} | |
}); | |
System.register("shared/interfaces/member", [], function(exports_17, context_17) { | |
"use strict"; | |
var __moduleName = context_17 && context_17.id; | |
return { | |
setters:[], | |
execute: function() { | |
} | |
} | |
}); | |
System.register("shared/pipes/name.pipe", ['@angular/core'], function(exports_18, context_18) { | |
"use strict"; | |
var __moduleName = context_18 && context_18.id; | |
var core_10; | |
var NamePipe; | |
return { | |
setters:[ | |
function (core_10_1) { | |
core_10 = core_10_1; | |
}], | |
execute: function() { | |
NamePipe = (function () { | |
function NamePipe() { | |
} | |
NamePipe.prototype.transform = function (value, args) { | |
if (value) { | |
return value.firstName + ' ' + value.lastName; | |
} | |
else { | |
return ''; | |
} | |
}; | |
NamePipe = __decorate([ | |
core_10.Pipe({ | |
name: 'name' | |
}), | |
__metadata('design:paramtypes', []) | |
], NamePipe); | |
return NamePipe; | |
}()); | |
exports_18("NamePipe", NamePipe); | |
} | |
} | |
}); | |
System.register("shared/pipes/ssn-filter.pipe", ['@angular/core'], function(exports_19, context_19) { | |
"use strict"; | |
var __moduleName = context_19 && context_19.id; | |
var core_11; | |
var SSNFilterPipe; | |
return { | |
setters:[ | |
function (core_11_1) { | |
core_11 = core_11_1; | |
}], | |
execute: function() { | |
SSNFilterPipe = (function () { | |
function SSNFilterPipe() { | |
} | |
SSNFilterPipe.prototype.transform = function (value, args) { | |
if (value) { | |
return value.substr(value.length - 4, value.length); | |
} | |
else { | |
return ''; | |
} | |
}; | |
SSNFilterPipe = __decorate([ | |
core_11.Pipe({ | |
name: 'ssnFilter' | |
}), | |
__metadata('design:paramtypes', []) | |
], SSNFilterPipe); | |
return SSNFilterPipe; | |
}()); | |
exports_19("SSNFilterPipe", SSNFilterPipe); | |
} | |
} | |
}); | |
System.register("shared/pipes/phone.pipe", ['@angular/core'], function(exports_20, context_20) { | |
"use strict"; | |
var __moduleName = context_20 && context_20.id; | |
var core_12; | |
var PhoneNumber; | |
return { | |
setters:[ | |
function (core_12_1) { | |
core_12 = core_12_1; | |
}], | |
execute: function() { | |
PhoneNumber = (function () { | |
function PhoneNumber() { | |
} | |
PhoneNumber.prototype.transform = function (value, args) { | |
if (value) { | |
value = value.replace(/-/g, ''); | |
var str = ""; | |
switch (value.length) { | |
case 0: | |
case 1: | |
case 2: | |
case 3: | |
str = value; | |
break; | |
case 4: | |
case 5: | |
case 6: | |
str = value.substring(0, 3) + '-' + value.substring(3, value.length); | |
break; | |
case 7: | |
case 8: | |
case 9: | |
case 10: | |
str = value.substring(0, 3) + '-' + value.substring(3, 6) + '-' + value.substring(6); | |
break; | |
} | |
return str; | |
} | |
else { | |
return value; | |
} | |
}; | |
PhoneNumber = __decorate([ | |
core_12.Pipe({ | |
name: 'phone' | |
}), | |
__metadata('design:paramtypes', []) | |
], PhoneNumber); | |
return PhoneNumber; | |
}()); | |
exports_20("PhoneNumber", PhoneNumber); | |
} | |
} | |
}); | |
System.register("components/member-info-form/member-info-form.component", ['@angular/core', "shared/services/member.service", "shared/pipes/phone.pipe"], function(exports_21, context_21) { | |
"use strict"; | |
var __moduleName = context_21 && context_21.id; | |
var core_13, member_service_2, phone_pipe_1; | |
var MemberInfoForm; | |
return { | |
setters:[ | |
function (core_13_1) { | |
core_13 = core_13_1; | |
}, | |
function (member_service_2_1) { | |
member_service_2 = member_service_2_1; | |
}, | |
function (phone_pipe_1_1) { | |
phone_pipe_1 = phone_pipe_1_1; | |
}], | |
execute: function() { | |
MemberInfoForm = (function () { | |
function MemberInfoForm(_memberService) { | |
this._memberService = _memberService; | |
this.editing = false; | |
} | |
MemberInfoForm.prototype.saveMemberInfo = function (form) { | |
if (this.editing) { | |
this._memberService.updatePerson(form); | |
} | |
}; | |
MemberInfoForm.prototype.toggleEdit = function () { | |
this.editing = !this.editing; | |
}; | |
MemberInfoForm = __decorate([ | |
core_13.Component({ | |
selector: 'member-info-form', | |
templateUrl: 'js/app/components/member-info-form/member-info-form.component.html', | |
inputs: ['member'], | |
pipes: [phone_pipe_1.PhoneNumber], | |
providers: [member_service_2.MemberService] | |
}), | |
__metadata('design:paramtypes', [member_service_2.MemberService]) | |
], MemberInfoForm); | |
return MemberInfoForm; | |
}()); | |
exports_21("MemberInfoForm", MemberInfoForm); | |
} | |
} | |
}); | |
System.register("components/modal/member-info-form-modal/member-info-form-modal.component", ['@angular/core', "components/member-info-form/member-info-form.component", "shared/pipes/phone.pipe"], function(exports_22, context_22) { | |
"use strict"; | |
var __moduleName = context_22 && context_22.id; | |
var core_14, member_info_form_component_1, phone_pipe_2; | |
var MemberInfoFormModal; | |
return { | |
setters:[ | |
function (core_14_1) { | |
core_14 = core_14_1; | |
}, | |
function (member_info_form_component_1_1) { | |
member_info_form_component_1 = member_info_form_component_1_1; | |
}, | |
function (phone_pipe_2_1) { | |
phone_pipe_2 = phone_pipe_2_1; | |
}], | |
execute: function() { | |
MemberInfoFormModal = (function () { | |
function MemberInfoFormModal() { | |
this.onClose = new core_14.EventEmitter(); | |
this.returnData = null; | |
} | |
MemberInfoFormModal.prototype.closeModal = function (form) { | |
this.onClose.next(form); | |
}; | |
MemberInfoFormModal = __decorate([ | |
core_14.Component({ | |
selector: 'member-info-form-modal', | |
templateUrl: 'js/app/components/modal/member-info-form-modal/member-info-form-modal.component.html', | |
inputs: ['closeButtonTitle', 'modalId', 'member'], | |
outputs: ['onClose'], | |
directives: [member_info_form_component_1.MemberInfoForm], | |
pipes: [phone_pipe_2.PhoneNumber] | |
}), | |
__metadata('design:paramtypes', []) | |
], MemberInfoFormModal); | |
return MemberInfoFormModal; | |
}()); | |
exports_22("MemberInfoFormModal", MemberInfoFormModal); | |
} | |
} | |
}); | |
System.register("components/modal/dependents-modal/dependents-modal.component", ['@angular/core', "shared/pipes/name.pipe", "shared/pipes/ssn-filter.pipe"], function(exports_23, context_23) { | |
"use strict"; | |
var __moduleName = context_23 && context_23.id; | |
var core_15, name_pipe_1, ssn_filter_pipe_1; | |
var DependentsModal; | |
return { | |
setters:[ | |
function (core_15_1) { | |
core_15 = core_15_1; | |
}, | |
function (name_pipe_1_1) { | |
name_pipe_1 = name_pipe_1_1; | |
}, | |
function (ssn_filter_pipe_1_1) { | |
ssn_filter_pipe_1 = ssn_filter_pipe_1_1; | |
}], | |
execute: function() { | |
DependentsModal = (function () { | |
function DependentsModal() { | |
this.onClose = new core_15.EventEmitter(); | |
this.returnData = null; | |
} | |
DependentsModal = __decorate([ | |
core_15.Component({ | |
selector: 'dependents-modal', | |
templateUrl: 'js/app/components/modal/dependents-modal/dependents-modal.component.html', | |
inputs: ['dependents', 'modalId'], | |
pipes: [name_pipe_1.NamePipe, ssn_filter_pipe_1.SSNFilterPipe] | |
}), | |
__metadata('design:paramtypes', []) | |
], DependentsModal); | |
return DependentsModal; | |
}()); | |
exports_23("DependentsModal", DependentsModal); | |
} | |
} | |
}); | |
System.register("components/member-info/member-info.component", ['@angular/core', "shared/pipes/name.pipe", "shared/pipes/ssn-filter.pipe", "shared/services/member.service", "components/modal/member-info-form-modal/member-info-form-modal.component", "components/modal/dependents-modal/dependents-modal.component"], function(exports_24, context_24) { | |
"use strict"; | |
var __moduleName = context_24 && context_24.id; | |
var core_16, name_pipe_2, ssn_filter_pipe_2, member_service_3, member_info_form_modal_component_1, dependents_modal_component_1; | |
var MemberInfo; | |
return { | |
setters:[ | |
function (core_16_1) { | |
core_16 = core_16_1; | |
}, | |
function (name_pipe_2_1) { | |
name_pipe_2 = name_pipe_2_1; | |
}, | |
function (ssn_filter_pipe_2_1) { | |
ssn_filter_pipe_2 = ssn_filter_pipe_2_1; | |
}, | |
function (member_service_3_1) { | |
member_service_3 = member_service_3_1; | |
}, | |
function (member_info_form_modal_component_1_1) { | |
member_info_form_modal_component_1 = member_info_form_modal_component_1_1; | |
}, | |
function (dependents_modal_component_1_1) { | |
dependents_modal_component_1 = dependents_modal_component_1_1; | |
}], | |
execute: function() { | |
MemberInfo = (function () { | |
function MemberInfo(_memberService) { | |
this._memberService = _memberService; | |
} | |
MemberInfo.prototype.saveMemberInfo = function (form) { | |
console.log('form: ', form); | |
this._memberService.updatePerson(form); | |
}; | |
MemberInfo = __decorate([ | |
core_16.Component({ | |
selector: 'member-info', | |
templateUrl: 'js/app/components/member-info/member-info.component.html', | |
inputs: ['member'], | |
pipes: [name_pipe_2.NamePipe, ssn_filter_pipe_2.SSNFilterPipe], | |
directives: [member_info_form_modal_component_1.MemberInfoFormModal, dependents_modal_component_1.DependentsModal] | |
}), | |
__metadata('design:paramtypes', [member_service_3.MemberService]) | |
], MemberInfo); | |
return MemberInfo; | |
}()); | |
exports_24("MemberInfo", MemberInfo); | |
} | |
} | |
}); | |
System.register("components/member-communications/member-communications.component", ['@angular/core', '@angular/router-deprecated', "shared/services/member.service"], function(exports_25, context_25) { | |
"use strict"; | |
var __moduleName = context_25 && context_25.id; | |
var core_17, router_deprecated_8, member_service_4; | |
var MemberCommunications; | |
return { | |
setters:[ | |
function (core_17_1) { | |
core_17 = core_17_1; | |
}, | |
function (router_deprecated_8_1) { | |
router_deprecated_8 = router_deprecated_8_1; | |
}, | |
function (member_service_4_1) { | |
member_service_4 = member_service_4_1; | |
}], | |
execute: function() { | |
MemberCommunications = (function () { | |
function MemberCommunications(_userService, _routeParams) { | |
this._userService = _userService; | |
this._routeParams = _routeParams; | |
} | |
MemberCommunications.prototype.ngOnInit = function () { | |
var _this = this; | |
var id = this._routeParams.get('memberId'); | |
this._userService.getCommunicationsForPerson(id).subscribe(function (commObject) { | |
_this.communications = commObject; | |
}); | |
}; | |
MemberCommunications.prototype.saveMemberInfo = function (form) { | |
this._userService.updatePerson(form); | |
}; | |
MemberCommunications = __decorate([ | |
core_17.Component({ | |
selector: 'member-communications', | |
templateUrl: 'js/app/components/member-communications/member-communications.component.html', | |
inputs: ['member'], | |
providers: [member_service_4.MemberService] | |
}), | |
__metadata('design:paramtypes', [member_service_4.MemberService, router_deprecated_8.RouteParams]) | |
], MemberCommunications); | |
return MemberCommunications; | |
}()); | |
exports_25("MemberCommunications", MemberCommunications); | |
} | |
} | |
}); | |
System.register("components/modal/claims-modal/claims-modal.component", ['@angular/core'], function(exports_26, context_26) { | |
"use strict"; | |
var __moduleName = context_26 && context_26.id; | |
var core_18; | |
var ClaimsModal; | |
return { | |
setters:[ | |
function (core_18_1) { | |
core_18 = core_18_1; | |
}], | |
execute: function() { | |
ClaimsModal = (function () { | |
function ClaimsModal() { | |
this.onClose = new core_18.EventEmitter(); | |
this.returnData = null; | |
} | |
ClaimsModal.prototype.closeModal = function () { | |
this.onClose.next(this.returnData); | |
}; | |
ClaimsModal = __decorate([ | |
core_18.Component({ | |
selector: 'claims-modal', | |
templateUrl: 'js/app/components/modal/claims-modal/claims-modal.component.html', | |
inputs: ['claim', 'closeButtonTitle', 'modalId'], | |
outputs: ['onClose'] | |
}), | |
__metadata('design:paramtypes', []) | |
], ClaimsModal); | |
return ClaimsModal; | |
}()); | |
exports_26("ClaimsModal", ClaimsModal); | |
} | |
} | |
}); | |
System.register("shared/pipes/claim-filter", ['@angular/core'], function(exports_27, context_27) { | |
"use strict"; | |
var __moduleName = context_27 && context_27.id; | |
var core_19; | |
var ClaimsFilterPipe; | |
return { | |
setters:[ | |
function (core_19_1) { | |
core_19 = core_19_1; | |
}], | |
execute: function() { | |
ClaimsFilterPipe = (function () { | |
function ClaimsFilterPipe() { | |
} | |
ClaimsFilterPipe.prototype.filterByTypeAndSuffix = function (claim, suffix, type) { | |
if (claim.suffix === suffix && claim.type === type) { | |
return true; | |
} | |
return false; | |
}; | |
ClaimsFilterPipe.prototype.filterBySuffix = function (claim, suffix) { | |
if (claim.suffix === suffix) { | |
return true; | |
} | |
return false; | |
}; | |
ClaimsFilterPipe.prototype.filterByType = function (claim, type) { | |
if (claim.type === type) { | |
return true; | |
} | |
return false; | |
}; | |
ClaimsFilterPipe.prototype.transform = function (value, args) { | |
var _this = this; | |
var suffix = args[0]; | |
var type = args[1]; | |
var filtered = []; | |
if (value) { | |
value.forEach(function (claim) { | |
if (suffix == '00' && type == '') { | |
filtered = value; | |
} | |
else if (suffix == '00' && type != '') { | |
if (_this.filterByType(claim, type)) { | |
filtered.push(claim); | |
} | |
} | |
else { | |
if (type == '') { | |
if (_this.filterBySuffix(claim, suffix)) { | |
filtered.push(claim); | |
} | |
} | |
else { | |
if (_this.filterByTypeAndSuffix(claim, suffix, type)) { | |
filtered.push(claim); | |
} | |
} | |
} | |
}); | |
return filtered; | |
} | |
else { | |
return ''; | |
} | |
}; | |
ClaimsFilterPipe = __decorate([ | |
core_19.Pipe({ | |
name: 'claims' | |
}), | |
__metadata('design:paramtypes', []) | |
], ClaimsFilterPipe); | |
return ClaimsFilterPipe; | |
}()); | |
exports_27("ClaimsFilterPipe", ClaimsFilterPipe); | |
} | |
} | |
}); | |
System.register("components/claims-summary/claims-summary.component", ['@angular/core', '@angular/router-deprecated', "shared/services/member.service", "components/modal/claims-modal/claims-modal.component", "shared/pipes/claim-filter"], function(exports_28, context_28) { | |
"use strict"; | |
var __moduleName = context_28 && context_28.id; | |
var core_20, router_deprecated_9, member_service_5, claims_modal_component_1, claim_filter_1; | |
var ClaimsSummary; | |
return { | |
setters:[ | |
function (core_20_1) { | |
core_20 = core_20_1; | |
}, | |
function (router_deprecated_9_1) { | |
router_deprecated_9 = router_deprecated_9_1; | |
}, | |
function (member_service_5_1) { | |
member_service_5 = member_service_5_1; | |
}, | |
function (claims_modal_component_1_1) { | |
claims_modal_component_1 = claims_modal_component_1_1; | |
}, | |
function (claim_filter_1_1) { | |
claim_filter_1 = claim_filter_1_1; | |
}], | |
execute: function() { | |
ClaimsSummary = (function () { | |
function ClaimsSummary(_memberService, _routeParams) { | |
this._memberService = _memberService; | |
this._routeParams = _routeParams; | |
this.backupClaims = null; | |
this.selectedSuffix = '00'; | |
this.claims = null; | |
this.listAllClaims = false; | |
this.selectedClaimsPerson = 'Family'; | |
this.sliceLimit = 5; | |
this.selectedFilter = { | |
"filter": "", | |
"display": "All" | |
}; | |
} | |
ClaimsSummary.prototype.ngOnInit = function () { | |
var _this = this; | |
this.id = this._routeParams.get('memberId'); | |
this.getClaims(); | |
this._memberService.getFinancialsForPerson(this.id).subscribe(function (financialObject) { | |
_this.financials = financialObject; | |
if (_this.financials.breakdowns && _this.financials.breakdowns.length > 0) { | |
_this.changeSelectedFinancials(); | |
} | |
}); | |
}; | |
ClaimsSummary.prototype.changeSelectedFinancials = function () { | |
var _this = this; | |
this.selectedFinancials = this.financials.breakdowns.find(function (obj) { | |
return obj.suffix === _this.selectedSuffix; | |
}); | |
}; | |
ClaimsSummary.prototype.getClaims = function () { | |
var _this = this; | |
this._memberService.getClaimsForPerson(this.id, this.selectedSuffix).subscribe(function (claimsArray) { | |
_this.claims = _this.backupClaims = claimsArray; | |
_this.claims.forEach(function (claim) { | |
claim.modalId = '#' + claim.claimId; | |
}); | |
_this.filteredLength = new claim_filter_1.ClaimsFilterPipe().transform(_this.claims, [_this.selectedSuffix, _this.selectedFilter.filter]).length; | |
}); | |
}; | |
ClaimsSummary.prototype.limitClaims = function () { | |
this.listAllClaims = !this.listAllClaims; | |
if (this.listAllClaims) { | |
this.sliceLimit = this.claims.length; | |
} | |
else { | |
this.sliceLimit = 5; | |
} | |
}; | |
ClaimsSummary.prototype.changeClaimsPerson = function (event, name, suffix) { | |
event.preventDefault(); | |
this.selectedClaimsPerson = name; | |
this.selectedSuffix = suffix; | |
this.changeSelectedFinancials(); | |
this.filteredLength = new claim_filter_1.ClaimsFilterPipe().transform(this.claims, [this.selectedSuffix, this.selectedFilter.filter]).length; | |
}; | |
ClaimsSummary.prototype.changeClaimsFilter = function ($event, filter, display) { | |
event.preventDefault(); | |
this.selectedFilter.filter = filter; | |
this.selectedFilter.display = display; | |
this.filteredLength = new claim_filter_1.ClaimsFilterPipe().transform(this.claims, [this.selectedSuffix, this.selectedFilter.filter]).length; | |
}; | |
ClaimsSummary.prototype.searchById = function (form) { | |
var _this = this; | |
this._memberService.getClaimById(this.id, this.selectedSuffix, form.claimId).subscribe(function (claim) { | |
_this.claims = _this.backupClaims = claim; | |
_this.claims.forEach(function (aClaim) { | |
aClaim.modalId = '#' + aClaim.claimId; | |
}); | |
}); | |
}; | |
ClaimsSummary.prototype.resetClaims = function (event) { | |
event.preventDefault(); | |
this.getClaims(); | |
}; | |
ClaimsSummary = __decorate([ | |
core_20.Component({ | |
selector: 'claims-summary', | |
templateUrl: 'js/app/components/claims-summary/claims-summary.component.html', | |
providers: [member_service_5.MemberService], | |
inputs: ['member'], | |
directives: [claims_modal_component_1.ClaimsModal], | |
pipes: [claim_filter_1.ClaimsFilterPipe] | |
}), | |
__metadata('design:paramtypes', [member_service_5.MemberService, router_deprecated_9.RouteParams]) | |
], ClaimsSummary); | |
return ClaimsSummary; | |
}()); | |
exports_28("ClaimsSummary", ClaimsSummary); | |
} | |
} | |
}); | |
System.register("components/modal/modal.component", ['@angular/core'], function(exports_29, context_29) { | |
"use strict"; | |
var __moduleName = context_29 && context_29.id; | |
var core_21; | |
var Modal; | |
return { | |
setters:[ | |
function (core_21_1) { | |
core_21 = core_21_1; | |
}], | |
execute: function() { | |
Modal = (function () { | |
function Modal() { | |
this.onClose = new core_21.EventEmitter(); | |
this.returnData = null; | |
} | |
Modal.prototype.closeModal = function (shouldClose) { | |
this.onClose.emit(shouldClose); | |
}; | |
Modal = __decorate([ | |
core_21.Component({ | |
selector: 'modal', | |
templateUrl: 'js/app/components/modal/modal.component.html', | |
inputs: ['data', 'html', 'title', 'declineButtonTitle', 'acceptButtonTitle', 'modalId'], | |
outputs: ['onClose'] | |
}), | |
__metadata('design:paramtypes', []) | |
], Modal); | |
return Modal; | |
}()); | |
exports_29("Modal", Modal); | |
} | |
} | |
}); | |
System.register("components/medical-conditions/medical-conditions.component", ['@angular/core', '@angular/router-deprecated', "shared/services/member.service", "components/modal/modal.component"], function(exports_30, context_30) { | |
"use strict"; | |
var __moduleName = context_30 && context_30.id; | |
var core_22, router_deprecated_10, member_service_6, modal_component_1; | |
var MedicalConditions; | |
return { | |
setters:[ | |
function (core_22_1) { | |
core_22 = core_22_1; | |
}, | |
function (router_deprecated_10_1) { | |
router_deprecated_10 = router_deprecated_10_1; | |
}, | |
function (member_service_6_1) { | |
member_service_6 = member_service_6_1; | |
}, | |
function (modal_component_1_1) { | |
modal_component_1 = modal_component_1_1; | |
}], | |
execute: function() { | |
MedicalConditions = (function () { | |
function MedicalConditions(_userService, _routeParams) { | |
this._userService = _userService; | |
this._routeParams = _routeParams; | |
} | |
MedicalConditions.prototype.ngOnInit = function () { | |
var _this = this; | |
var id = this._routeParams.get('memberId'); | |
this._userService.getMedicalConditions(id).subscribe(function (conditions) { | |
_this.conditions = conditions; | |
}); | |
}; | |
MedicalConditions = __decorate([ | |
core_22.Component({ | |
selector: 'medical-conditions', | |
templateUrl: 'js/app/components/medical-conditions/medical-conditions.component.html', | |
providers: [member_service_6.MemberService], | |
directives: [modal_component_1.Modal] | |
}), | |
__metadata('design:paramtypes', [member_service_6.MemberService, router_deprecated_10.RouteParams]) | |
], MedicalConditions); | |
return MedicalConditions; | |
}()); | |
exports_30("MedicalConditions", MedicalConditions); | |
} | |
} | |
}); | |
System.register("shared/services/system.service", ['@angular/core', '@angular/http', 'rxjs/Observable'], function(exports_31, context_31) { | |
"use strict"; | |
var __moduleName = context_31 && context_31.id; | |
var core_23, http_4, Observable_4; | |
var SystemService; | |
return { | |
setters:[ | |
function (core_23_1) { | |
core_23 = core_23_1; | |
}, | |
function (http_4_1) { | |
http_4 = http_4_1; | |
}, | |
function (Observable_4_1) { | |
Observable_4 = Observable_4_1; | |
}], | |
execute: function() { | |
SystemService = (function () { | |
function SystemService(http) { | |
this.http = http; | |
} | |
SystemService.prototype.getCallTypes = function () { | |
return this.http.get('/system/call-types').map(function (res) { return res.json(); }).catch(this.handleError); | |
}; | |
SystemService.prototype.getCallerRelations = function () { | |
return this.http.get('/system/caller-relations').map(function (res) { return res.json(); }).catch(this.handleError); | |
}; | |
SystemService.prototype.createCase = function (types, startTime, endTime, caseNotes, callerRelation) { | |
console.log('this case was created at: ', startTime, ' with the following types: ', types, ' and ended at: ', endTime, ' with the notes: ', caseNotes, '. The caller\'s relation to the member is: ', callerRelation); | |
}; | |
SystemService.prototype.createCaseAndResolve = function (types, startTime, endTime, caseNotes, callerRelation) { | |
console.log('this case was created and resolved at: ', startTime, ' with the following types: ', types, ' and ended at: ', endTime, ' with the notes: ', caseNotes, '. The caller\'s relation to the member is: ', callerRelation); | |
}; | |
SystemService.prototype.getCommunicationTypes = function () { | |
return this.http.get('/system/communication-types').map(function (res) { return res.json(); }).catch(this.handleError); | |
}; | |
SystemService.prototype.sendCommunication = function (type) { | |
console.log('sending email for: ', type); | |
}; | |
SystemService.prototype.handleError = function (error) { | |
console.error(error); | |
return Observable_4.Observable.throw(error.json().error || 'Server error'); | |
}; | |
SystemService = __decorate([ | |
core_23.Injectable(), | |
__metadata('design:paramtypes', [http_4.Http]) | |
], SystemService); | |
return SystemService; | |
}()); | |
exports_31("SystemService", SystemService); | |
} | |
} | |
}); | |
System.register("components/member-education/member-education.component", ['@angular/core', '@angular/common', '@angular/router-deprecated', "shared/services/member.service", "shared/services/system.service"], function(exports_32, context_32) { | |
"use strict"; | |
var __moduleName = context_32 && context_32.id; | |
var core_24, common_7, router_deprecated_11, member_service_7, system_service_1; | |
var MemberEducation; | |
return { | |
setters:[ | |
function (core_24_1) { | |
core_24 = core_24_1; | |
}, | |
function (common_7_1) { | |
common_7 = common_7_1; | |
}, | |
function (router_deprecated_11_1) { | |
router_deprecated_11 = router_deprecated_11_1; | |
}, | |
function (member_service_7_1) { | |
member_service_7 = member_service_7_1; | |
}, | |
function (system_service_1_1) { | |
system_service_1 = system_service_1_1; | |
}], | |
execute: function() { | |
MemberEducation = (function () { | |
function MemberEducation(_userService, _routeParams, _system) { | |
this._userService = _userService; | |
this._routeParams = _routeParams; | |
this._system = _system; | |
this.memberId = this._routeParams.get('memberId'); | |
this.communications = []; | |
} | |
MemberEducation.prototype.ngOnInit = function () { | |
var _this = this; | |
this._system.getCommunicationTypes().subscribe(function (commArray) { | |
commArray.forEach(function (comm) { | |
_this.communications.push({ "title": comm, "selected": false }); | |
}); | |
}); | |
}; | |
MemberEducation.prototype.sendMessages = function () { | |
var _this = this; | |
this.communications.forEach(function (comm) { | |
if (comm.selected) { | |
_this._system.sendCommunication(comm.title); | |
comm.selected = false; | |
} | |
}); | |
}; | |
MemberEducation.prototype.sendMessage = function (event, title) { | |
event.preventDefault(); | |
this._system.sendCommunication(title); | |
}; | |
MemberEducation = __decorate([ | |
core_24.Component({ | |
selector: 'member-education', | |
templateUrl: 'js/app/components/member-education/member-education.component.html', | |
providers: [member_service_7.MemberService, system_service_1.SystemService, common_7.NgClass] | |
}), | |
__metadata('design:paramtypes', [member_service_7.MemberService, router_deprecated_11.RouteParams, system_service_1.SystemService]) | |
], MemberEducation); | |
return MemberEducation; | |
}()); | |
exports_32("MemberEducation", MemberEducation); | |
} | |
} | |
}); | |
System.register("components/program-details/program-details.component", ['@angular/core', '@angular/router-deprecated', "shared/services/member.service"], function(exports_33, context_33) { | |
"use strict"; | |
var __moduleName = context_33 && context_33.id; | |
var core_25, router_deprecated_12, member_service_8; | |
var ProgramDetails; | |
return { | |
setters:[ | |
function (core_25_1) { | |
core_25 = core_25_1; | |
}, | |
function (router_deprecated_12_1) { | |
router_deprecated_12 = router_deprecated_12_1; | |
}, | |
function (member_service_8_1) { | |
member_service_8 = member_service_8_1; | |
}], | |
execute: function() { | |
ProgramDetails = (function () { | |
function ProgramDetails(_userService, _routeParams) { | |
this._userService = _userService; | |
this._routeParams = _routeParams; | |
} | |
ProgramDetails.prototype.ngOnInit = function () { | |
var _this = this; | |
var id = this._routeParams.get('memberId'); | |
this._userService.getMedicalConditions(id).subscribe(function (conditions) { | |
_this.conditions = conditions; | |
}); | |
}; | |
ProgramDetails = __decorate([ | |
core_25.Component({ | |
selector: 'program-details', | |
templateUrl: 'js/app/components/program-details/program-details.component.html', | |
providers: [member_service_8.MemberService] | |
}), | |
__metadata('design:paramtypes', [member_service_8.MemberService, router_deprecated_12.RouteParams]) | |
], ProgramDetails); | |
return ProgramDetails; | |
}()); | |
exports_33("ProgramDetails", ProgramDetails); | |
} | |
} | |
}); | |
System.register("components/modal/instructions-modal/instructions-modal.component", ['@angular/core'], function(exports_34, context_34) { | |
"use strict"; | |
var __moduleName = context_34 && context_34.id; | |
var core_26; | |
var InstructionsModal; | |
return { | |
setters:[ | |
function (core_26_1) { | |
core_26 = core_26_1; | |
}], | |
execute: function() { | |
InstructionsModal = (function () { | |
function InstructionsModal() { | |
this.onClose = new core_26.EventEmitter(); | |
this.returnData = null; | |
} | |
InstructionsModal.prototype.closeModal = function () { | |
this.onClose.next(this.returnData); | |
}; | |
InstructionsModal = __decorate([ | |
core_26.Component({ | |
selector: 'instructions-modal', | |
templateUrl: 'js/app/components/modal/instructions-modal/instructions-modal.component.html', | |
inputs: ['instructions', 'title', 'closeButtonTitle', 'modalId'], | |
outputs: ['onClose'] | |
}), | |
__metadata('design:paramtypes', []) | |
], InstructionsModal); | |
return InstructionsModal; | |
}()); | |
exports_34("InstructionsModal", InstructionsModal); | |
} | |
} | |
}); | |
System.register("components/call-tracking/call-tracking.component", ['@angular/core', '@angular/common', '@angular/router-deprecated', "shared/services/member.service", "shared/services/system.service", "components/modal/instructions-modal/instructions-modal.component"], function(exports_35, context_35) { | |
"use strict"; | |
var __moduleName = context_35 && context_35.id; | |
var core_27, common_8, router_deprecated_13, member_service_9, system_service_2, instructions_modal_component_1; | |
var CaseCreation; | |
return { | |
setters:[ | |
function (core_27_1) { | |
core_27 = core_27_1; | |
}, | |
function (common_8_1) { | |
common_8 = common_8_1; | |
}, | |
function (router_deprecated_13_1) { | |
router_deprecated_13 = router_deprecated_13_1; | |
}, | |
function (member_service_9_1) { | |
member_service_9 = member_service_9_1; | |
}, | |
function (system_service_2_1) { | |
system_service_2 = system_service_2_1; | |
}, | |
function (instructions_modal_component_1_1) { | |
instructions_modal_component_1 = instructions_modal_component_1_1; | |
}], | |
execute: function() { | |
CaseCreation = (function () { | |
function CaseCreation(_memberService, _routeParams, _system) { | |
this._memberService = _memberService; | |
this._routeParams = _routeParams; | |
this._system = _system; | |
this.memberId = this._routeParams.get('memberId'); | |
this.callTypes = []; | |
this.callerRelations = []; | |
this.defaultRelation = { value: 0, display: 'Select Caller Relation' }; | |
this.selectedCallerRelation = this.defaultRelation; | |
} | |
CaseCreation.prototype.ngOnInit = function () { | |
var _this = this; | |
this.startTime = new Date(); | |
this._system.getCallTypes().subscribe(function (typesArray) { | |
_this.callTypes = typesArray; | |
_this.callTypes.forEach(function (type) { | |
type.selected = false; | |
if (type.modal) { | |
type.modalId = "#" + type.modal; | |
} | |
}); | |
}); | |
this._system.getCallerRelations().subscribe(function (relations) { | |
_this.callerRelations = relations; | |
}); | |
this._memberService.getCommunicationsForPerson(this.memberId).subscribe(function (commObject) { | |
_this.communications = commObject; | |
}); | |
}; | |
CaseCreation.prototype.createCase = function () { | |
this.endTime = new Date(); | |
var types = []; | |
types = this.setTypesArray(types); | |
this._system.createCase(types, this.startTime, this.endTime, this.callNotes, this.selectedCallerRelation); | |
this.callNotes = ""; | |
}; | |
CaseCreation.prototype.setTypesArray = function (types) { | |
this.callTypes.forEach(function (type) { | |
if (type.selected) { | |
types.push(type.title); | |
} | |
type.selected = false; | |
}); | |
return types; | |
}; | |
CaseCreation.prototype.saveCall = function () { | |
this.endTime = new Date(); | |
var types = []; | |
types = this.setTypesArray(types); | |
this._system.createCaseAndResolve(types, this.startTime, this.endTime, this.callNotes, this.selectedCallerRelation); | |
this.callNotes = ""; | |
}; | |
CaseCreation.prototype.openModal = function (callType) { | |
if (!callType.selected && callType.instructions && callType.modalId) { | |
$(callType.modalId).modal('show'); | |
} | |
}; | |
CaseCreation.prototype.setCallerRelation = function (rel, ev) { | |
ev.preventDefault(); | |
this.selectedCallerRelation = rel; | |
}; | |
CaseCreation = __decorate([ | |
core_27.Component({ | |
selector: 'call-tracking', | |
templateUrl: 'js/app/components/call-tracking/call-tracking.component.html', | |
providers: [member_service_9.MemberService, system_service_2.SystemService], | |
directives: [instructions_modal_component_1.InstructionsModal, common_8.NgClass] | |
}), | |
__metadata('design:paramtypes', [member_service_9.MemberService, router_deprecated_13.RouteParams, system_service_2.SystemService]) | |
], CaseCreation); | |
return CaseCreation; | |
}()); | |
exports_35("CaseCreation", CaseCreation); | |
} | |
} | |
}); | |
System.register("components/modal/keyboard-shortcuts-modal/keyboard-shortcuts-modal.component", ['@angular/core'], function(exports_36, context_36) { | |
"use strict"; | |
var __moduleName = context_36 && context_36.id; | |
var core_28; | |
var KeyboardShortcutsModal; | |
return { | |
setters:[ | |
function (core_28_1) { | |
core_28 = core_28_1; | |
}], | |
execute: function() { | |
KeyboardShortcutsModal = (function () { | |
function KeyboardShortcutsModal() { | |
} | |
KeyboardShortcutsModal = __decorate([ | |
core_28.Component({ | |
selector: 'keyboard-shortcuts-modal', | |
templateUrl: 'js/app/components/modal/keyboard-shortcuts-modal/keyboard-shortcuts-modal.component.html' | |
}), | |
__metadata('design:paramtypes', []) | |
], KeyboardShortcutsModal); | |
return KeyboardShortcutsModal; | |
}()); | |
exports_36("KeyboardShortcutsModal", KeyboardShortcutsModal); | |
} | |
} | |
}); | |
System.register("shared/services/deferred", [], function(exports_37, context_37) { | |
"use strict"; | |
var __moduleName = context_37 && context_37.id; | |
var Deferred; | |
return { | |
setters:[], | |
execute: function() { | |
Deferred = (function () { | |
function Deferred() { | |
var _this = this; | |
this.promise = new Promise(function (resolve, reject) { | |
_this.resolve = resolve; | |
_this.reject = reject; | |
}); | |
} | |
return Deferred; | |
}()); | |
exports_37("Deferred", Deferred); | |
} | |
} | |
}); | |
System.register("components/member-detail/member-detail.component", ['@angular/core', '@angular/router-deprecated', "components/member-info/member-info.component", "components/member-communications/member-communications.component", "components/claims-summary/claims-summary.component", "components/medical-conditions/medical-conditions.component", "components/member-education/member-education.component", "components/program-details/program-details.component", "components/call-tracking/call-tracking.component", "components/modal/modal.component", "components/modal/keyboard-shortcuts-modal/keyboard-shortcuts-modal.component", "shared/services/member.service", "shared/pipes/name.pipe", "shared/services/deferred"], function(exports_38, context_38) { | |
"use strict"; | |
var __moduleName = context_38 && context_38.id; | |
var core_29, router_deprecated_14, member_info_component_1, member_communications_component_1, claims_summary_component_1, medical_conditions_component_1, member_education_component_1, program_details_component_1, call_tracking_component_1, modal_component_2, keyboard_shortcuts_modal_component_1, member_service_10, name_pipe_3, deferred_1; | |
var MemberDetail; | |
return { | |
setters:[ | |
function (core_29_1) { | |
core_29 = core_29_1; | |
}, | |
function (router_deprecated_14_1) { | |
router_deprecated_14 = router_deprecated_14_1; | |
}, | |
function (member_info_component_1_1) { | |
member_info_component_1 = member_info_component_1_1; | |
}, | |
function (member_communications_component_1_1) { | |
member_communications_component_1 = member_communications_component_1_1; | |
}, | |
function (claims_summary_component_1_1) { | |
claims_summary_component_1 = claims_summary_component_1_1; | |
}, | |
function (medical_conditions_component_1_1) { | |
medical_conditions_component_1 = medical_conditions_component_1_1; | |
}, | |
function (member_education_component_1_1) { | |
member_education_component_1 = member_education_component_1_1; | |
}, | |
function (program_details_component_1_1) { | |
program_details_component_1 = program_details_component_1_1; | |
}, | |
function (call_tracking_component_1_1) { | |
call_tracking_component_1 = call_tracking_component_1_1; | |
}, | |
function (modal_component_2_1) { | |
modal_component_2 = modal_component_2_1; | |
}, | |
function (keyboard_shortcuts_modal_component_1_1) { | |
keyboard_shortcuts_modal_component_1 = keyboard_shortcuts_modal_component_1_1; | |
}, | |
function (member_service_10_1) { | |
member_service_10 = member_service_10_1; | |
}, | |
function (name_pipe_3_1) { | |
name_pipe_3 = name_pipe_3_1; | |
}, | |
function (deferred_1_1) { | |
deferred_1 = deferred_1_1; | |
}], | |
execute: function() { | |
MemberDetail = (function () { | |
function MemberDetail(_memberService, _routeParams) { | |
this._memberService = _memberService; | |
this._routeParams = _routeParams; | |
this.canDeactivate = { | |
"html": "<p>Are you sure you want to leave this page? You will lose all progress made.</p>", | |
"title": "Are you sure?" | |
}; | |
this.deferred = new deferred_1.Deferred(); | |
} | |
MemberDetail.prototype.ngOnInit = function () { | |
var _this = this; | |
var id = this._routeParams.get('memberId'); | |
this._memberService.getPersonById(id).subscribe(function (personObject) { | |
_this.member = personObject; | |
}); | |
}; | |
MemberDetail.prototype.routerCanDeactivate = function () { | |
// $('#router-deactivate').modal('show'); | |
// return this.deferred.promise; | |
return confirm('Are you sure you want to leave this page? All progress will be lost.'); | |
}; | |
MemberDetail.prototype.handleResponse = function (res) { | |
if (res) { | |
this.deferred.resolve(res); | |
} | |
else { | |
this.deferred.reject(res); | |
} | |
}; | |
MemberDetail = __decorate([ | |
core_29.Component({ | |
selector: 'member-search', | |
templateUrl: 'js/app/components/member-detail/member-detail.component.html', | |
directives: [member_info_component_1.MemberInfo, member_communications_component_1.MemberCommunications, claims_summary_component_1.ClaimsSummary, medical_conditions_component_1.MedicalConditions, program_details_component_1.ProgramDetails, member_education_component_1.MemberEducation, call_tracking_component_1.CaseCreation, modal_component_2.Modal, keyboard_shortcuts_modal_component_1.KeyboardShortcutsModal, router_deprecated_14.ROUTER_DIRECTIVES], | |
providers: [member_service_10.MemberService], | |
pipes: [name_pipe_3.NamePipe] | |
}), | |
__metadata('design:paramtypes', [member_service_10.MemberService, router_deprecated_14.RouteParams]) | |
], MemberDetail); | |
return MemberDetail; | |
}()); | |
exports_38("MemberDetail", MemberDetail); | |
} | |
} | |
}); | |
System.register("shared/services/user.service", ['@angular/core', '@angular/http'], function(exports_39, context_39) { | |
"use strict"; | |
var __moduleName = context_39 && context_39.id; | |
var core_30, http_5; | |
var UserService; | |
return { | |
setters:[ | |
function (core_30_1) { | |
core_30 = core_30_1; | |
}, | |
function (http_5_1) { | |
http_5 = http_5_1; | |
}], | |
execute: function() { | |
UserService = (function () { | |
function UserService(http) { | |
this.http = http; | |
} | |
UserService.prototype.getOpenCases = function () { | |
return this.http.get('user/get-open-cases').map(function (res) { return res.json(); }); | |
}; | |
UserService = __decorate([ | |
core_30.Injectable(), | |
__metadata('design:paramtypes', [http_5.Http]) | |
], UserService); | |
return UserService; | |
}()); | |
exports_39("UserService", UserService); | |
} | |
} | |
}); | |
System.register("components/dashboard/dashboard.component", ['@angular/core', "shared/services/user.service"], function(exports_40, context_40) { | |
"use strict"; | |
var __moduleName = context_40 && context_40.id; | |
var core_31, user_service_1; | |
var Dashboard; | |
return { | |
setters:[ | |
function (core_31_1) { | |
core_31 = core_31_1; | |
}, | |
function (user_service_1_1) { | |
user_service_1 = user_service_1_1; | |
}], | |
execute: function() { | |
Dashboard = (function () { | |
function Dashboard(_userService) { | |
this._userService = _userService; | |
} | |
Dashboard.prototype.ngOnInit = function () { | |
var _this = this; | |
this._userService.getOpenCases().subscribe(function (data) { | |
_this.openCases = data; | |
console.log('openCases: ', _this.openCases); | |
}); | |
}; | |
Dashboard = __decorate([ | |
core_31.Component({ | |
selector: 'dashboard', | |
templateUrl: 'js/app/components/dashboard/dashboard.component.html', | |
providers: [user_service_1.UserService] | |
}), | |
__metadata('design:paramtypes', [user_service_1.UserService]) | |
], Dashboard); | |
return Dashboard; | |
}()); | |
exports_40("Dashboard", Dashboard); | |
} | |
} | |
}); | |
System.register("app.component", ['@angular/core', '@angular/router', "shared/directives/custom-router-outlet", "components/dashboard_layout/dashboard_layout.component", "components/member-search/member-search.component", "components/member-detail/member-detail.component", "components/dashboard/dashboard.component"], function(exports_41, context_41) { | |
"use strict"; | |
var __moduleName = context_41 && context_41.id; | |
var core_32, router_1, custom_router_outlet_1, dashboard_layout_component_2, member_search_component_1, member_detail_component_1, dashboard_component_1; | |
var AppComponent; | |
return { | |
setters:[ | |
function (core_32_1) { | |
core_32 = core_32_1; | |
}, | |
function (router_1_1) { | |
router_1 = router_1_1; | |
}, | |
function (custom_router_outlet_1_1) { | |
custom_router_outlet_1 = custom_router_outlet_1_1; | |
}, | |
function (dashboard_layout_component_2_1) { | |
dashboard_layout_component_2 = dashboard_layout_component_2_1; | |
}, | |
function (member_search_component_1_1) { | |
member_search_component_1 = member_search_component_1_1; | |
}, | |
function (member_detail_component_1_1) { | |
member_detail_component_1 = member_detail_component_1_1; | |
}, | |
function (dashboard_component_1_1) { | |
dashboard_component_1 = dashboard_component_1_1; | |
}], | |
execute: function() { | |
AppComponent = (function () { | |
function AppComponent() { | |
} | |
AppComponent = __decorate([ | |
core_32.Component({ | |
selector: 'app-container', | |
templateUrl: 'js/app/app.component.html', | |
directives: [custom_router_outlet_1.CustomRouterOutlet, dashboard_layout_component_2.DashboardLayoutComponent] | |
}), | |
router_1.Routes([ | |
{ path: '/', component: dashboard_component_1.Dashboard }, | |
{ path: '/member/search', component: member_search_component_1.MemberSearch }, | |
{ path: '/member/:memberId', component: member_detail_component_1.MemberDetail }, | |
{ path: '*', component: dashboard_component_1.Dashboard }, | |
]), | |
__metadata('design:paramtypes', []) | |
], AppComponent); | |
return AppComponent; | |
}()); | |
exports_41("AppComponent", AppComponent); | |
} | |
} | |
}); | |
System.register("main", ['@angular/platform-browser-dynamic', '@angular/core', "@angular/common", '@angular/router-deprecated', '@angular/http', "app.component", "auth_module/auth/auth", "config/config", "auth_module/auth/app_injector"], function(exports_42, context_42) { | |
"use strict"; | |
var __moduleName = context_42 && context_42.id; | |
var platform_browser_dynamic_1, core_33, common_9, router_deprecated_15, http_6, app_component_1, auth_6, config_3, app_injector_2; | |
return { | |
setters:[ | |
function (platform_browser_dynamic_1_1) { | |
platform_browser_dynamic_1 = platform_browser_dynamic_1_1; | |
}, | |
function (core_33_1) { | |
core_33 = core_33_1; | |
}, | |
function (common_9_1) { | |
common_9 = common_9_1; | |
}, | |
function (router_deprecated_15_1) { | |
router_deprecated_15 = router_deprecated_15_1; | |
}, | |
function (http_6_1) { | |
http_6 = http_6_1; | |
}, | |
function (app_component_1_1) { | |
app_component_1 = app_component_1_1; | |
}, | |
function (auth_6_1) { | |
auth_6 = auth_6_1; | |
}, | |
function (config_3_1) { | |
config_3 = config_3_1; | |
}, | |
function (app_injector_2_1) { | |
app_injector_2 = app_injector_2_1; | |
}], | |
execute: function() { | |
platform_browser_dynamic_1.bootstrap(app_component_1.AppComponent, [ | |
auth_6.Auth, | |
config_3.Config, | |
router_deprecated_15.ROUTER_PROVIDERS, | |
common_9.FORM_PROVIDERS, | |
http_6.HTTP_PROVIDERS, | |
core_33.bind(common_9.LocationStrategy).toClass(common_9.HashLocationStrategy) | |
]).then(function (appRef) { | |
console.log('the app has been bootstrapped'); | |
app_injector_2.appInjector(appRef.injector); | |
}, function (error) { return console.log(error); }); | |
} | |
} | |
}); | |
System.register("shared/pubSubService", ['@angular/core'], function(exports_43, context_43) { | |
"use strict"; | |
var __moduleName = context_43 && context_43.id; | |
var core_34; | |
var PubSubService; | |
return { | |
setters:[ | |
function (core_34_1) { | |
core_34 = core_34_1; | |
}], | |
execute: function() { | |
PubSubService = (function () { | |
function PubSubService() { | |
} | |
PubSubService.emit = function (eventData) { | |
this.eventEmitter.emit({ event: eventData.eventName, data: eventData.data }); | |
}; | |
PubSubService.on = function (eventName, callback) { | |
var found; | |
this.eventsList.forEach(function (eventEntry) { | |
if (eventEntry.eventName === eventName) { | |
eventEntry.callbacks.push(callback); | |
found = true; | |
} | |
}); | |
if (!found) { | |
this.eventsList.push({ eventName: eventName, callbacks: [callback] }); | |
} | |
}; | |
PubSubService.initialize = function () { | |
this.eventEmitter.subscribe(function (eventData) { | |
}); | |
}; | |
PubSubService.eventEmitter = new core_34.EventEmitter(); | |
PubSubService.eventsList = []; | |
return PubSubService; | |
}()); | |
exports_43("PubSubService", PubSubService); | |
PubSubService.initialize(); | |
} | |
} | |
}); | |
System.register("shared/pipes/full-name.pipe", ['@angular/core'], function(exports_44, context_44) { | |
"use strict"; | |
var __moduleName = context_44 && context_44.id; | |
var core_35; | |
var FullNamePipe; | |
return { | |
setters:[ | |
function (core_35_1) { | |
core_35 = core_35_1; | |
}], | |
execute: function() { | |
FullNamePipe = (function () { | |
function FullNamePipe() { | |
} | |
FullNamePipe.prototype.transform = function (value, args) { | |
if (value) { | |
return value.firstName + ' ' + value.middleName + ' ' + value.lastName; | |
} | |
else { | |
return ''; | |
} | |
}; | |
FullNamePipe = __decorate([ | |
core_35.Pipe({ | |
name: 'fullName' | |
}), | |
__metadata('design:paramtypes', []) | |
], FullNamePipe); | |
return FullNamePipe; | |
}()); | |
exports_44("FullNamePipe", FullNamePipe); | |
} | |
} | |
}); | |
//# sourceMappingURL=main.js.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { bootstrap } from '@angular/platform-browser-dynamic'; | |
import { bind, ComponentRef } from '@angular/core'; | |
import { FORM_PROVIDERS, LocationStrategy, HashLocationStrategy } from "@angular/common"; | |
import { ROUTER_PROVIDERS } from '@angular/router-deprecated'; | |
import { HTTP_PROVIDERS } from '@angular/http'; | |
import { AppComponent } from './app.component'; | |
import { Auth } from './auth_module/auth/auth'; | |
import { Config } from './config/config' | |
import { appInjector } from './auth_module/auth/app_injector'; | |
bootstrap(AppComponent, [ | |
Auth, | |
Config, | |
ROUTER_PROVIDERS, | |
FORM_PROVIDERS, | |
HTTP_PROVIDERS, | |
bind(LocationStrategy).toClass(HashLocationStrategy) | |
]).then( | |
(appRef: ComponentRef<any>) => { | |
console.log('the app has been bootstrapped'); | |
appInjector(appRef.injector); | |
}, | |
error => console.log(error) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* System configuration for Angular 2 samples | |
* Adjust as necessary for your application needs. | |
* Override at the last minute with global.filterSystemConfig (as plunkers do) | |
*/ | |
var System; | |
(function(global) { | |
// map tells the System loader where to look for things | |
var map = { | |
'app': 'js', // 'dist', | |
'rxjs': 'js/dependencies/rxjs', | |
// 'angular2-in-memory-web-api': 'angular2-in-memory-web-api', | |
'@angular': 'js/dependencies/@angular', | |
}; | |
// packages tells the System loader how to load when no filename and/or no extension | |
var packages = { | |
'app': { main: 'main.js', defaultExtension: 'js' }, | |
'rxjs': { defaultExtension: 'js' }, | |
// 'angular2-in-memory-web-api': { defaultExtension: 'js' }, | |
// '/angular2-jwt': { defaultExtension: 'js' } | |
}; | |
var packageNames = [ | |
'@angular/common', | |
'@angular/compiler', | |
'@angular/core', | |
'@angular/http', | |
'@angular/platform-browser', | |
'@angular/platform-browser-dynamic', | |
'@angular/router', | |
'@angular/router-deprecated', | |
'@angular/testing', | |
'@angular/upgrade', | |
]; | |
// add package entries for angular packages in the form '@angular/common': { main: 'index.js', defaultExtension: 'js' } | |
packageNames.forEach(function(pkgName) { | |
packages[pkgName] = { main: 'index.js', defaultExtension: 'js' }; | |
}); | |
console.log('packages: ', packages); | |
var config = { | |
map: map, | |
packages: packages | |
}; | |
System.config(config); | |
})(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment