@ardimedia/angular-portal-azure 0.2.273 → 0.2.275

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var Debug = (function () {
4
+ // #region Constructor
5
+ function Debug() {
6
+ }
7
+ // #endregion
8
+ // #region Methods
9
+ Debug.enable = function (key) {
10
+ Debug.isEnabled = true;
11
+ if (key) {
12
+ Debug.keys.push(key);
13
+ }
14
+ };
15
+ Debug.disable = function (key) {
16
+ if (key) {
17
+ var indexToDelete = Debug.keys.indexOf(key);
18
+ Debug.keys.splice(indexToDelete, 1);
19
+ }
20
+ if (Debug.keys.length === 0) {
21
+ Debug.isEnabled = false;
22
+ }
23
+ };
24
+ Debug.write = function (debugLine, objects) {
25
+ if ((Debug.isEnabled && Debug.keys.length === 0)
26
+ || (Debug.isEnabled && Debug.isInKeys(debugLine))) {
27
+ console.log(debugLine);
28
+ if (objects !== undefined && Debug.isWithObjects) {
29
+ objects.forEach(function (item) {
30
+ console.log(item);
31
+ });
32
+ }
33
+ return true;
34
+ }
35
+ return false;
36
+ };
37
+ /** Extract the key (e.g. [azureportal] from a string */
38
+ Debug.extractKey = function (text) {
39
+ var extractKey = '';
40
+ var firstCharacter = text.substring(0, 1);
41
+ if (firstCharacter === '[') {
42
+ // Find closing bracket
43
+ var closingPos = text.indexOf(']');
44
+ if (closingPos > 0) {
45
+ extractKey = text.substring(0, closingPos + 1);
46
+ }
47
+ }
48
+ return extractKey;
49
+ };
50
+ /** Extract the key (e.g. [azureportal] from a string */
51
+ Debug.isInKeys = function (debugLine) {
52
+ var key = Debug.extractKey(debugLine);
53
+ if (Debug.keys.indexOf(key) !== -1) {
54
+ return true;
55
+ }
56
+ return false;
57
+ };
58
+ // #endregion
59
+ // #region Properties
60
+ Debug.isEnabled = false;
61
+ Debug.isWithObjects = false;
62
+ Debug.keys = new Array();
63
+ return Debug;
64
+ }());
65
+ exports.Debug = Debug;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return function (d, b) {
7
+ extendStatics(d, b);
8
+ function __() { this.constructor = d; }
9
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
+ };
11
+ })();
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ var validationsexceptiondotnet_1 = require("./validationsexceptiondotnet");
14
+ var Exception = (function (_super) {
15
+ __extends(Exception, _super);
16
+ function Exception() {
17
+ return _super !== null && _super.apply(this, arguments) || this;
18
+ }
19
+ // #endregion
20
+ // #region Static Methods
21
+ Exception.getOneLineMessage = function (exception) {
22
+ var message = 'FEHLER ';
23
+ if (exception.Message !== undefined) {
24
+ message = message + ': ' + exception.Message + ' ';
25
+ }
26
+ if (exception.ExceptionMessage !== undefined && exception.ExceptionMessage.toLowerCase().indexOf('see the inner exception for details') === -1) {
27
+ message = message + ': ' + exception.ExceptionMessage + ' ';
28
+ }
29
+ if (exception.ExceptionMessage !== undefined && exception.ExceptionMessage.toLowerCase().indexOf('see the inner exception for details') > 0) {
30
+ if (exception.InnerException !== undefined) {
31
+ if (exception.InnerException.InnerException !== undefined) {
32
+ message = message + ': ' + exception.InnerException.InnerException.ExceptionMessage + ' ';
33
+ }
34
+ else {
35
+ message = message + ': ' + exception.InnerException.ExceptionMessage + ' ';
36
+ }
37
+ }
38
+ }
39
+ if (exception.Messages !== undefined) {
40
+ exception.Messages.forEach(function (item) {
41
+ message = message + '- ' + item + ' ';
42
+ });
43
+ }
44
+ if (message === 'FEHLER ') {
45
+ message = message + ' : JavaScript-Fehler oder Probleme mit der Internetverbindung. Ggf. weitere Informationen im Log. ' + exception;
46
+ console.log(exception);
47
+ }
48
+ return message;
49
+ };
50
+ // TODO:2017-01-09/hp: [any] will be [Response] in angular2
51
+ Exception.prepareException = function (response) {
52
+ console.log('Exception.prepareException - Logging Exception: Find more information in the following console messages for [Responsee] and [Exception].');
53
+ var exception = new Exception();
54
+ if (response.headers === undefined) {
55
+ console.log('> Get information from [processDotNetException1.data].');
56
+ exception = Exception.processDotNetException1(response);
57
+ }
58
+ else {
59
+ console.log('> Get information from [processDotNetException2.json()].');
60
+ exception = Exception.processDotNetException2(response);
61
+ }
62
+ exception.convertResponse(response);
63
+ exception.Url = response.url;
64
+ exception.Status = response.status;
65
+ exception.StatusText = response.statusText;
66
+ //// Find a better way to log information, maybe to the database or to Google Analytics.
67
+ console.log(response);
68
+ console.log(exception);
69
+ return exception;
70
+ };
71
+ Exception.processDotNetException1 = function (response) {
72
+ var exception = new Exception();
73
+ // #region Convert data to Messages
74
+ exception.Messages = [];
75
+ if (response.data.Data === undefined) {
76
+ exception.Messages.push('No further information found in [response.data.Data].');
77
+ }
78
+ else {
79
+ var i = 1;
80
+ while (response.data.Data[i + ''] !== undefined) {
81
+ exception.Messages.push(response.data.Data[i + '']);
82
+ i++;
83
+ }
84
+ }
85
+ // #endregion
86
+ return exception;
87
+ };
88
+ // TODO:2017-01-09/hp: Implement this function for angular2
89
+ Exception.processDotNetException2 = function (response) {
90
+ var exception = new Exception();
91
+ if (response.json().data !== undefined) {
92
+ console.log('[Exception.processDotNetException2] not implemented. Implement it to get proper exception data.');
93
+ }
94
+ return exception;
95
+ };
96
+ return Exception;
97
+ }(validationsexceptiondotnet_1.ValidationsExceptionDotNet));
98
+ exports.Exception = Exception;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var ExceptionDotNet = (function () {
4
+ function ExceptionDotNet() {
5
+ }
6
+ return ExceptionDotNet;
7
+ }());
8
+ exports.ExceptionDotNet = ExceptionDotNet;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return function (d, b) {
7
+ extendStatics(d, b);
8
+ function __() { this.constructor = d; }
9
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
+ };
11
+ })();
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ var angular = require("angular");
14
+ var usercontrolbase_1 = require("./usercontrolbase");
15
+ var avatarmenu_1 = require("./avatarmenu");
16
+ var startboard_1 = require("./startboard");
17
+ var Panorama = (function (_super) {
18
+ __extends(Panorama, _super);
19
+ // #endregion
20
+ // #region Constructor
21
+ function Panorama($scope, title, portalService) {
22
+ var _this = _super.call(this, $scope, portalService) || this;
23
+ _this.isVisible = true;
24
+ _this.title = title;
25
+ _this.portalService.panorama = _this;
26
+ _this.avatarMenu = new avatarmenu_1.AvatarMenu(_this.$scope, _this.portalService);
27
+ _this.startboard = new startboard_1.Startboard(_this.$scope, _this.portalService);
28
+ return _this;
29
+ }
30
+ return Panorama;
31
+ }(usercontrolbase_1.UserControlBase));
32
+ exports.Panorama = Panorama;
33
+ exports.default = angular.module('angularportalazure', [])
34
+ .service('angularportalazure.panorama', Panorama)
35
+ .name;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var panorama_1 = require("./panorama");
4
+ var PortalShell = (function () {
5
+ // #region Constructor
6
+ function PortalShell(portalService, title) {
7
+ if (title === void 0) { title = null; }
8
+ this.portalService = portalService;
9
+ this.portalService = portalService;
10
+ this.portalService.panorama = new panorama_1.Panorama(null, title, this.portalService);
11
+ if (title === '' || title === null || title === undefined) {
12
+ this.portalService.panorama.title = this.portalService.$window.location.hostname.toLowerCase();
13
+ }
14
+ else {
15
+ this.portalService.panorama.title = title;
16
+ }
17
+ }
18
+ return PortalShell;
19
+ }());
20
+ exports.PortalShell = PortalShell;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return function (d, b) {
7
+ extendStatics(d, b);
8
+ function __() { this.constructor = d; }
9
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
+ };
11
+ })();
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ var tiles_1 = require("./tiles");
14
+ var usercontrolbase_1 = require("./usercontrolbase");
15
+ var Startboard = (function (_super) {
16
+ __extends(Startboard, _super);
17
+ // #region Constructor
18
+ function Startboard($scope, portalService) {
19
+ var _this = _super.call(this, $scope, portalService) || this;
20
+ _this.tiles = new tiles_1.Tiles();
21
+ return _this;
22
+ }
23
+ return Startboard;
24
+ }(usercontrolbase_1.UserControlBase));
25
+ exports.Startboard = Startboard;
package/domain/tile.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tilesizes_1 = require("./tilesizes");
4
+ var Tile = (function () {
5
+ // #region Constructor
6
+ function Tile(title, bladePath, portalService) {
7
+ this.portalService = portalService;
8
+ this.title = title;
9
+ this.bladePath = bladePath;
10
+ this.tileSize = tilesizes_1.TileSizes.normal;
11
+ }
12
+ Object.defineProperty(Tile.prototype, "bladePath", {
13
+ // #region bladePath
14
+ get: function () {
15
+ return this._bladePath;
16
+ },
17
+ // For the moment we do not distinguish between lower and upper case path name
18
+ set: function (newBladePath) {
19
+ this._bladePath = newBladePath.toLowerCase();
20
+ },
21
+ enumerable: true,
22
+ configurable: true
23
+ });
24
+ // #endregion
25
+ // #region Methods
26
+ Tile.prototype.clicked = function () {
27
+ this.portalService.areaBlades.setFirstBlade(this.bladePath);
28
+ };
29
+ return Tile;
30
+ }());
31
+ exports.Tile = Tile;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tilesize_1 = require("./tilesize");
4
+ var tilesizes_1 = require("./tilesizes");
5
+ var Tiles = (function () {
6
+ function Tiles() {
7
+ // #region Properties
8
+ this.showTiles = true;
9
+ this.tiles = new Array();
10
+ this.isTilesLoaded = false;
11
+ this.hideTileIfOnlyOne = true; // not yet evaluated in HTML, but this is the standard behavior
12
+ this.tileSizes = tilesize_1.TileSize.getTileSizes();
13
+ this.nextLeft = 0;
14
+ this.nextTop = 0;
15
+ this.columnHeightMax = 0;
16
+ // #endregion
17
+ }
18
+ // #endregion
19
+ // #region Methods
20
+ Tiles.prototype.addTile = function (tile) {
21
+ this.isTilesLoaded = true;
22
+ var tileSize = this.tileSizes[tile.tileSize];
23
+ tile.size = tilesizes_1.TileSizes[tile.tileSize]; // Get CSS Name
24
+ tile.top = this.nextTop + 'px';
25
+ tile.left = this.nextLeft + 'px';
26
+ this.nextLeft += tileSize.width;
27
+ if (tileSize.height > this.columnHeightMax) {
28
+ this.columnHeightMax = tileSize.height;
29
+ }
30
+ if (this.nextLeft > 540) {
31
+ this.nextLeft = 0;
32
+ this.nextTop += this.columnHeightMax;
33
+ this.columnHeightMax = 0;
34
+ }
35
+ this.tiles.push(tile);
36
+ return tile;
37
+ };
38
+ return Tiles;
39
+ }());
40
+ exports.Tiles = Tiles;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tilesizes_1 = require("./tilesizes");
4
+ var TileSize = (function () {
5
+ // #region Constructor
6
+ function TileSize(tileSizes, width, height) {
7
+ this.tileSizes = tileSizes;
8
+ this.width = width;
9
+ this.height = height;
10
+ }
11
+ // #endregion
12
+ // #region Methods
13
+ TileSize.getTileSizes = function () {
14
+ var tileSizes = Array();
15
+ tileSizes.push(new TileSize(tilesizes_1.TileSizes.small, 90, 90));
16
+ tileSizes.push(new TileSize(tilesizes_1.TileSizes.mini, 180, 90));
17
+ tileSizes.push(new TileSize(tilesizes_1.TileSizes.normal, 180, 180));
18
+ tileSizes.push(new TileSize(tilesizes_1.TileSizes.herowide, 540, 360));
19
+ return tileSizes;
20
+ };
21
+ return TileSize;
22
+ }());
23
+ exports.TileSize = TileSize;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /** The names are used in CSS for layouting, e.g. style='mini' */
4
+ var TileSizes;
5
+ (function (TileSizes) {
6
+ TileSizes[TileSizes["small"] = 0] = "small";
7
+ TileSizes[TileSizes["mini"] = 1] = "mini";
8
+ TileSizes[TileSizes["normal"] = 2] = "normal";
9
+ TileSizes[TileSizes["herowide"] = 3] = "herowide";
10
+ })(TileSizes = exports.TileSizes || (exports.TileSizes = {}));
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var UserAccount = (function () {
4
+ // #region Constructor
5
+ function UserAccount(username, firstName, lastName) {
6
+ if (firstName === void 0) { firstName = ''; }
7
+ if (lastName === void 0) { lastName = ''; }
8
+ this.userName = username;
9
+ this.firstName = firstName;
10
+ this.lastName = lastName;
11
+ }
12
+ Object.defineProperty(UserAccount.prototype, "firstName", {
13
+ get: function () {
14
+ return this._firstName;
15
+ },
16
+ set: function (value) {
17
+ this._firstName = value;
18
+ this._name = (this._firstName || '') + ' ' + (this._lastName || '');
19
+ },
20
+ enumerable: true,
21
+ configurable: true
22
+ });
23
+ Object.defineProperty(UserAccount.prototype, "lastName", {
24
+ get: function () {
25
+ return this._lastName;
26
+ },
27
+ set: function (value) {
28
+ this._lastName = value;
29
+ this._name = (this._firstName || '') + ' ' + (this._lastName || '');
30
+ },
31
+ enumerable: true,
32
+ configurable: true
33
+ });
34
+ Object.defineProperty(UserAccount.prototype, "name", {
35
+ get: function () {
36
+ return this._name;
37
+ },
38
+ set: function (value) {
39
+ throw new Error('[angularportalazure.UserAccount] \'name\' is a calculated value from \'firsName\' and \'lastName\'. Assignment not allowed.');
40
+ },
41
+ enumerable: true,
42
+ configurable: true
43
+ });
44
+ return UserAccount;
45
+ }());
46
+ exports.UserAccount = UserAccount;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var UserControlBase = (function () {
4
+ // #region Constructor
5
+ function UserControlBase($scope, portalService) {
6
+ this.$scope = $scope;
7
+ this.portalService = portalService;
8
+ }
9
+ // #endregion
10
+ // #region Methods
11
+ /** angular1: $onInit(), $onChanges(changesObj), $doCheck(), $onDestroy(), $postLink() */
12
+ UserControlBase.prototype.$onDestroy = function () {
13
+ this.removeWindowResizeListener();
14
+ };
15
+ /** angular2: ngOnChanges(), ngOnInit, ngDoCheck, ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy */
16
+ UserControlBase.prototype.ngOnDestroy = function () {
17
+ this.removeWindowResizeListener();
18
+ };
19
+ UserControlBase.prototype.removeWindowResizeListener = function () {
20
+ if (this.windowResizeHandler !== undefined) {
21
+ this.portalService.$window.removeEventListener('resize', this.windowResizeHandler);
22
+ }
23
+ };
24
+ UserControlBase.prototype.setupWindowResizeListener = function (callback) {
25
+ // http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing
26
+ var id;
27
+ this.portalService.$window.addEventListener('resize', this.windowResizeHandler = function () {
28
+ window.clearTimeout(id);
29
+ id = window.setTimeout(function () { callback(); }, 50);
30
+ });
31
+ };
32
+ UserControlBase.prototype.isStringNullOrEmpty = function (value) {
33
+ if (value && value.replace(' ', '').length > 0) {
34
+ return false;
35
+ }
36
+ else {
37
+ return true;
38
+ }
39
+ };
40
+ UserControlBase.prototype.getRandomString = function (length) {
41
+ if (length === void 0) { length = 20; }
42
+ return Math.round((Math.pow(36, length + 1) - Math.random() * Math.pow(36, length))).toString(36).replace('.', '').replace('(e+', '').replace(')', '').slice(1);
43
+ };
44
+ return UserControlBase;
45
+ }());
46
+ exports.UserControlBase = UserControlBase;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var ValidationResultDotNet = (function () {
4
+ function ValidationResultDotNet() {
5
+ }
6
+ return ValidationResultDotNet;
7
+ }());
8
+ exports.ValidationResultDotNet = ValidationResultDotNet;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return function (d, b) {
7
+ extendStatics(d, b);
8
+ function __() { this.constructor = d; }
9
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
+ };
11
+ })();
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ var exceptiondotnet_1 = require("./exceptiondotnet");
14
+ var ValidationsExceptionDotNet = (function (_super) {
15
+ __extends(ValidationsExceptionDotNet, _super);
16
+ function ValidationsExceptionDotNet() {
17
+ return _super !== null && _super.apply(this, arguments) || this;
18
+ }
19
+ ValidationsExceptionDotNet.prototype.convertResponse = function (response) {
20
+ if (response.headers === undefined) {
21
+ ValidationsExceptionDotNet.convertResponse(this, response.data);
22
+ ValidationsExceptionDotNet.convertExceptionType(this, response.data);
23
+ }
24
+ else {
25
+ ValidationsExceptionDotNet.convertResponse(this, response.json());
26
+ ValidationsExceptionDotNet.convertExceptionType(this, response.json());
27
+ }
28
+ };
29
+ ValidationsExceptionDotNet.convertResponse = function (exception, responseData) {
30
+ // ExceptionDotNet
31
+ exception.ExceptionMessage = responseData.ExceptionMessage;
32
+ exception.Message = responseData.Message;
33
+ exception.StackTrace = responseData.StackTrace;
34
+ exception.InnerException = responseData.InnerException;
35
+ // ValidationsExceptionDotNet
36
+ // exception.ClassName = 'Not yet implemented';
37
+ // exception.Data = [{ key: 0, value: 'Not yet implemented' }];
38
+ // ValidationResultDotNet
39
+ // exception.ValidationResults = [{ ErrorMessage: 'Not yet implemented', MemberNames: [] }];
40
+ };
41
+ ValidationsExceptionDotNet.convertExceptionType = function (exception, responseData) {
42
+ if (responseData.ExceptionType === undefined) {
43
+ return;
44
+ }
45
+ if (responseData.ExceptionType === 'System.Data.Entity.Validation.DbEntityValidationException') {
46
+ exception.ExceptionType = 'DbEntityValidationException';
47
+ return;
48
+ }
49
+ else if (responseData.ExceptionType === 'System.Data.Entity.Infrastructure.DbUpdateConcurrencyException') {
50
+ exception.ExceptionType = 'DbUpdateConcurrencyException';
51
+ return;
52
+ }
53
+ // ClassName should by ExceptionType
54
+ if (responseData.ClassName !== undefined && responseData.ClassName.indexOf('ValidationsException') > 0) {
55
+ console.log('[angularportalazure.Exception.setExceptionType2] Why is this in ClassName? Can this be changed?');
56
+ exception.ExceptionType = 'ValidationsException';
57
+ return;
58
+ }
59
+ exception.ExceptionType = responseData.ExceptionType;
60
+ };
61
+ return ValidationsExceptionDotNet;
62
+ }(exceptiondotnet_1.ExceptionDotNet));
63
+ exports.ValidationsExceptionDotNet = ValidationsExceptionDotNet;
package/index.js CHANGED
@@ -1,14 +1,58 @@
1
- require('./apn');
2
- module.exports = angularportalazure;
3
-
4
- // TODO: 2016-10-25/hp: maybe we should use someting like this and change our code from [global] to [umd]
5
- /// https://www.typescriptlang.org/docs/handbook/declaration-files/library-structures.html
6
- (function (root, factory) {
7
- if (typeof define === "function" && define.amd) {
8
- define(["libName"], factory);
9
- } else if (typeof module === "object" && module.exports) {
10
- module.exports = factory(require("libName"));
11
- } else {
12
- root.returnExports = factory(root.libName);
1
+ "use strict";
2
+ /* README:
3
+ - http://angular-tips.com/blog/2015/06/using-angular-1-dot-x-with-es6-and-webpack/
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ require("./css/apn");
7
+ var angular = require("angular");
8
+ var ngResource = require("angular-resource");
9
+ var translate = require("angular-translate");
10
+ var PortalService_1 = require("./domain/PortalService");
11
+ var angular_portal_blade_1 = require("./directives/blade/angular-portal-blade");
12
+ var angular_portal_grid_1 = require("./directives/grid/angular-portal-grid");
13
+ var angular_portal_home_1 = require("./directives/home/angular-portal-home");
14
+ var angular_portal_nav_1 = require("./directives/nav/angular-portal-nav");
15
+ /** Define Angular module and its dependencies */
16
+ var angularModule = angular.module('angularportalazure', [
17
+ ngResource,
18
+ translate,
19
+ 'ngDialog',
20
+ 'angulartics',
21
+ 'angulartics.google.analytics'
22
+ ]);
23
+ /** Configure Angular: $translateProvider */
24
+ angularModule.config(['$translateProvider',
25
+ function ($translateProvider) {
26
+ $translateProvider.useSanitizeValueStrategy('escape');
27
+ $translateProvider.fallbackLanguage('de');
28
+ $translateProvider.use(readCookie('SAMPLE_TRANSLATE_LANG_KEY'));
29
+ }]);
30
+ angularModule.config([function () {
31
+ }]);
32
+ angular.module('angularportalazure', [])
33
+ .service('angularportalazure.portalService', PortalService_1.PortalService);
34
+ angular.module('angularportalazure')
35
+ .component('angularPortalBlade', angular_portal_blade_1.default);
36
+ angular.module('angularportalazure')
37
+ .component('angularPortalGrid', angular_portal_grid_1.default);
38
+ angular.module('angularportalazure')
39
+ .component('angularPortalHome', angular_portal_home_1.default);
40
+ angular.module('angularportalazure')
41
+ .component('angularPortalNav', angular_portal_nav_1.default);
42
+ angularModule.run(function () {
43
+ });
44
+ /** Read cookie */
45
+ function readCookie(cookieName) {
46
+ var cookieNameEQ = cookieName + '=';
47
+ var cookies = document.cookie.split(';');
48
+ for (var i = 0; i < cookies.length; i++) {
49
+ var cookie = cookies[i];
50
+ while (cookie.charAt(0) === ' ') {
51
+ cookie = cookie.substring(1, cookie.length);
52
+ }
53
+ if (cookie.indexOf(cookieNameEQ) === 0) {
54
+ return cookie.substring(cookieNameEQ.length, cookie.length);
55
+ }
13
56
  }
14
- }(this, function (b) { console.log(b); }))
57
+ return null;
58
+ }