@ardimedia/angular-portal-azure 0.2.6 → 0.2.8
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.
- package/apn.d.ts +4 -1
- package/apn.js +43 -6
- package/package.json +1 -1
package/apn.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ declare namespace angularportalazure {
|
|
|
47
47
|
constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
|
|
48
48
|
listener1: Function;
|
|
49
49
|
path: string;
|
|
50
|
+
private _path;
|
|
50
51
|
title: string;
|
|
51
52
|
subTitle: string;
|
|
52
53
|
width: {
|
|
@@ -123,6 +124,7 @@ declare namespace angularportalazure {
|
|
|
123
124
|
onActivate(): void;
|
|
124
125
|
navigateTo(arg: any): void;
|
|
125
126
|
onNavigateTo(arg: any): void;
|
|
127
|
+
comparePaths(path1: string, path2: string): boolean;
|
|
126
128
|
/** close blade. */
|
|
127
129
|
close(): void;
|
|
128
130
|
onCommandBrowse(): void;
|
|
@@ -203,17 +205,18 @@ declare namespace angularportalazure {
|
|
|
203
205
|
}
|
|
204
206
|
declare namespace angularportalazure {
|
|
205
207
|
class Tile {
|
|
208
|
+
constructor(title: string, bladePath: string, portalService: angularportalazure.PortalService);
|
|
206
209
|
portalService: angularportalazure.PortalService;
|
|
207
210
|
title: string;
|
|
208
211
|
subTitle: string;
|
|
209
212
|
bladePath: string;
|
|
213
|
+
private _bladePath;
|
|
210
214
|
tileSize: angularportalazure.TileSizes;
|
|
211
215
|
size: string;
|
|
212
216
|
left: string;
|
|
213
217
|
top: string;
|
|
214
218
|
leftN: string;
|
|
215
219
|
topN: string;
|
|
216
|
-
constructor(title: string, bladePath: string, portalService: angularportalazure.PortalService);
|
|
217
220
|
clicked(): void;
|
|
218
221
|
}
|
|
219
222
|
}
|
package/apn.js
CHANGED
|
@@ -170,6 +170,7 @@ var angularportalazure;
|
|
|
170
170
|
if (subtitle === void 0) { subtitle = ''; }
|
|
171
171
|
if (width === void 0) { width = 200; }
|
|
172
172
|
_super.call(this, portalService);
|
|
173
|
+
//#endregion
|
|
173
174
|
this.title = '';
|
|
174
175
|
this.subTitle = '';
|
|
175
176
|
this.width = { 'width': '0' };
|
|
@@ -272,12 +273,23 @@ var angularportalazure;
|
|
|
272
273
|
// Register listener1
|
|
273
274
|
this.listener1 = that.portalService.$rootScope.$on('BladeArea.AddBlade', function (event, args) {
|
|
274
275
|
angularportalazure.Debug.write('[angularportalazure-debug] \'Blade\' BladeArea.AddBlade event processing.', [this, event, args]);
|
|
275
|
-
if (args.path
|
|
276
|
+
if (that.blade.comparePaths(args.path, that.blade.path)) {
|
|
276
277
|
that.activate();
|
|
277
278
|
}
|
|
278
279
|
});
|
|
279
280
|
//#endregion
|
|
280
281
|
}
|
|
282
|
+
Object.defineProperty(Blade.prototype, "path", {
|
|
283
|
+
//#region path
|
|
284
|
+
get: function () {
|
|
285
|
+
return this._path;
|
|
286
|
+
},
|
|
287
|
+
set: function (newPath) {
|
|
288
|
+
this._path = newPath.toLowerCase();
|
|
289
|
+
},
|
|
290
|
+
enumerable: true,
|
|
291
|
+
configurable: true
|
|
292
|
+
});
|
|
281
293
|
//#endregion
|
|
282
294
|
//#endregion
|
|
283
295
|
//#region Methods
|
|
@@ -296,6 +308,15 @@ var angularportalazure;
|
|
|
296
308
|
Blade.prototype.onNavigateTo = function (arg) {
|
|
297
309
|
throw new Error('[angularportalazure.Blade] \'onNavigateTo\' is an abstract function. Define one in the derived class.');
|
|
298
310
|
};
|
|
311
|
+
// At the moment we do not distinguish between lower and upper case path name
|
|
312
|
+
Blade.prototype.comparePaths = function (path1, path2) {
|
|
313
|
+
if (path1.toLowerCase() === path2.toLowerCase()) {
|
|
314
|
+
return true;
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
return false;
|
|
318
|
+
}
|
|
319
|
+
};
|
|
299
320
|
/** close blade. */
|
|
300
321
|
Blade.prototype.close = function () {
|
|
301
322
|
angularportalazure.Debug.write('[angularportalazure-debug] \'Blade.close\' called.', [this]);
|
|
@@ -442,6 +463,8 @@ var angularportalazure;
|
|
|
442
463
|
if (senderPath === void 0) { senderPath = ''; }
|
|
443
464
|
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.addBlade\' called.', [this, senderPath, path]);
|
|
444
465
|
var that = this;
|
|
466
|
+
path = path.toLowerCase();
|
|
467
|
+
senderPath = senderPath.toLowerCase();
|
|
445
468
|
//#region Verify
|
|
446
469
|
if (path === undefined || path === '') {
|
|
447
470
|
return;
|
|
@@ -461,7 +484,8 @@ var angularportalazure;
|
|
|
461
484
|
//#endregion
|
|
462
485
|
//#region Make sure the blade is not yet show
|
|
463
486
|
this.blades.forEach(function (blade) {
|
|
464
|
-
|
|
487
|
+
// we do not distinguish between lower and upper case path name
|
|
488
|
+
if (blade.comparePaths(blade.path, path)) {
|
|
465
489
|
throw new Error('[angularportalazure.BladeArea] path: \'' + path + '\' will not be added. It is already added.');
|
|
466
490
|
}
|
|
467
491
|
;
|
|
@@ -495,8 +519,10 @@ var angularportalazure;
|
|
|
495
519
|
BladeArea.prototype.clearPath = function (path) {
|
|
496
520
|
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearPath\' called.', [this, path]);
|
|
497
521
|
var that = this;
|
|
522
|
+
// we do not distinguish between lower and upper case path name
|
|
523
|
+
path = path.toLowerCase();
|
|
498
524
|
var isremoved = that.blades.some(function (blade, index) {
|
|
499
|
-
if (blade.path
|
|
525
|
+
if (blade.comparePaths(blade.path, path)) {
|
|
500
526
|
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearPath\' set bladeUrls.length to: ' + index);
|
|
501
527
|
that.blades.length = index;
|
|
502
528
|
return true;
|
|
@@ -526,13 +552,14 @@ var angularportalazure;
|
|
|
526
552
|
BladeArea.prototype.clearChild = function (path) {
|
|
527
553
|
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearChild\' called.', [this, path]);
|
|
528
554
|
var that = this;
|
|
555
|
+
path = path.toLowerCase();
|
|
529
556
|
if (path === '') {
|
|
530
557
|
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearChild\' path is empty, nothing to clear.');
|
|
531
558
|
return;
|
|
532
559
|
}
|
|
533
560
|
var isremoved = that.blades.some(function (blade, index) {
|
|
534
|
-
// we do not distinguish between lower and upper case
|
|
535
|
-
if (blade.path
|
|
561
|
+
// we do not distinguish between lower and upper case path name
|
|
562
|
+
if (blade.comparePaths(blade.path, path)) {
|
|
536
563
|
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearChild\' set bladeUrls.length to: ' + (index + 1));
|
|
537
564
|
that.blades.length = index + 1;
|
|
538
565
|
return true;
|
|
@@ -663,7 +690,6 @@ var angularportalazure;
|
|
|
663
690
|
var angularportalazure;
|
|
664
691
|
(function (angularportalazure) {
|
|
665
692
|
var Tile = (function () {
|
|
666
|
-
//#endregion
|
|
667
693
|
//#region Constructors
|
|
668
694
|
function Tile(title, bladePath, portalService) {
|
|
669
695
|
angularportalazure.Debug.write('[angularportalazure-debug] \'Tile\' constructor called.', [this, title, bladePath, portalService]);
|
|
@@ -672,6 +698,17 @@ var angularportalazure;
|
|
|
672
698
|
this.bladePath = bladePath;
|
|
673
699
|
this.tileSize = angularportalazure.TileSizes.normal;
|
|
674
700
|
}
|
|
701
|
+
Object.defineProperty(Tile.prototype, "bladePath", {
|
|
702
|
+
//#region bladePath
|
|
703
|
+
get: function () {
|
|
704
|
+
return this._bladePath;
|
|
705
|
+
},
|
|
706
|
+
set: function (newBladePath) {
|
|
707
|
+
this._bladePath = newBladePath.toLowerCase();
|
|
708
|
+
},
|
|
709
|
+
enumerable: true,
|
|
710
|
+
configurable: true
|
|
711
|
+
});
|
|
675
712
|
//#endregion
|
|
676
713
|
//#region Methods
|
|
677
714
|
Tile.prototype.clicked = function () {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@ardimedia/angular-portal-azure",
|
|
3
3
|
"description": "Angular Portal Azure - GUI Framework.",
|
|
4
4
|
"author": "Ardimedia Anstalt <info@ardimedia.com> (http://www.ardimedia.com)",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.8",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"typings": "apn.d.ts",
|
|
8
8
|
"dependencies": {
|