@ardimedia/angular-portal-azure 0.2.299 → 0.2.300
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 +40 -12
- package/apn.js +86 -43
- package/package.json +2 -2
package/apn.d.ts
CHANGED
|
@@ -424,27 +424,53 @@ declare namespace angularportalazure {
|
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
declare namespace angularportalazure {
|
|
427
|
-
class ExceptionDotNet {
|
|
428
|
-
ExceptionMessage: string;
|
|
429
|
-
ExceptionType: string;
|
|
430
|
-
InnerException: ExceptionDotNet;
|
|
431
|
-
Message: string;
|
|
432
|
-
StackTrace: string;
|
|
433
|
-
}
|
|
434
427
|
class ValidationResultDotNet {
|
|
435
428
|
ErrorMessage: string;
|
|
436
429
|
MemberNames: string[];
|
|
437
430
|
}
|
|
438
|
-
class
|
|
439
|
-
ClassName: string;
|
|
431
|
+
class ExceptionDotNet {
|
|
432
|
+
ClassName: string | void;
|
|
433
|
+
Data: {
|
|
434
|
+
key: number;
|
|
435
|
+
value: string;
|
|
436
|
+
}[] | null;
|
|
437
|
+
ExceptionMethod: string | void;
|
|
438
|
+
HelpURL: string | null | void;
|
|
439
|
+
HelpLink: string | null | void;
|
|
440
|
+
HResult: number;
|
|
441
|
+
InnerException: ExceptionDotNet | null;
|
|
442
|
+
Message: string | null;
|
|
443
|
+
RemoteStackIndex: number | void;
|
|
444
|
+
RemoteStackTraceString: string | null | void;
|
|
445
|
+
Source: string;
|
|
446
|
+
StackTrace: string;
|
|
447
|
+
WatsonBuckets: string | null | void;
|
|
448
|
+
/**
|
|
449
|
+
* @deprecated ExceptionMessage is obsolete
|
|
450
|
+
*/
|
|
451
|
+
ExceptionMessage: string | void;
|
|
452
|
+
/**
|
|
453
|
+
* @deprecated ExceptionType is obsolete
|
|
454
|
+
*/
|
|
455
|
+
ExceptionType: string | void;
|
|
456
|
+
}
|
|
457
|
+
class ArgumentNullException extends ExceptionDotNet {
|
|
458
|
+
ParamName: string;
|
|
459
|
+
}
|
|
460
|
+
class EntityValidationException extends ExceptionDotNet {
|
|
440
461
|
Data: {
|
|
441
462
|
key: number;
|
|
442
463
|
value: string;
|
|
443
464
|
}[];
|
|
444
465
|
ValidationResults: ValidationResultDotNet[];
|
|
445
466
|
convertResponse(response: any): void;
|
|
446
|
-
|
|
447
|
-
|
|
467
|
+
protected static convertResponse(exceptionTo: EntityValidationException | ValidationsExceptionDotNet, responseDataFrom: ExceptionDotNet): void;
|
|
468
|
+
protected static convertExceptionType(exception: EntityValidationException | ValidationsExceptionDotNet, responseData: any): void;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* @deprecated ValidationsExceptionDotNet should be replaced by EntityValidationException
|
|
472
|
+
*/
|
|
473
|
+
class ValidationsExceptionDotNet extends EntityValidationException {
|
|
448
474
|
}
|
|
449
475
|
}
|
|
450
476
|
declare namespace angularportalazure {
|
|
@@ -457,7 +483,9 @@ declare namespace angularportalazure {
|
|
|
457
483
|
Url: string;
|
|
458
484
|
static getOneLineMessage(exception: angularportalazure.Exception): string;
|
|
459
485
|
static prepareException(response: angular.IHttpPromiseCallbackArg<angularportalazure.Exception> | any): angularportalazure.Exception;
|
|
460
|
-
private static
|
|
486
|
+
private static createException;
|
|
487
|
+
private static processResponseWithData;
|
|
488
|
+
private static processResponseData;
|
|
461
489
|
private static processDotNetException2;
|
|
462
490
|
}
|
|
463
491
|
}
|
package/apn.js
CHANGED
|
@@ -1499,67 +1499,88 @@ var angularportalazure;
|
|
|
1499
1499
|
})(angularportalazure || (angularportalazure = {}));
|
|
1500
1500
|
var angularportalazure;
|
|
1501
1501
|
(function (angularportalazure) {
|
|
1502
|
+
var ValidationResultDotNet = /** @class */ (function () {
|
|
1503
|
+
function ValidationResultDotNet() {
|
|
1504
|
+
}
|
|
1505
|
+
return ValidationResultDotNet;
|
|
1506
|
+
}());
|
|
1507
|
+
angularportalazure.ValidationResultDotNet = ValidationResultDotNet;
|
|
1502
1508
|
var ExceptionDotNet = /** @class */ (function () {
|
|
1503
1509
|
function ExceptionDotNet() {
|
|
1504
1510
|
}
|
|
1505
1511
|
return ExceptionDotNet;
|
|
1506
1512
|
}());
|
|
1507
1513
|
angularportalazure.ExceptionDotNet = ExceptionDotNet;
|
|
1508
|
-
var
|
|
1509
|
-
|
|
1514
|
+
var ArgumentNullException = /** @class */ (function (_super) {
|
|
1515
|
+
__extends(ArgumentNullException, _super);
|
|
1516
|
+
function ArgumentNullException() {
|
|
1517
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1510
1518
|
}
|
|
1511
|
-
return
|
|
1512
|
-
}());
|
|
1513
|
-
angularportalazure.
|
|
1514
|
-
var
|
|
1515
|
-
__extends(
|
|
1516
|
-
function
|
|
1519
|
+
return ArgumentNullException;
|
|
1520
|
+
}(ExceptionDotNet));
|
|
1521
|
+
angularportalazure.ArgumentNullException = ArgumentNullException;
|
|
1522
|
+
var EntityValidationException = /** @class */ (function (_super) {
|
|
1523
|
+
__extends(EntityValidationException, _super);
|
|
1524
|
+
function EntityValidationException() {
|
|
1517
1525
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1518
1526
|
}
|
|
1519
|
-
|
|
1527
|
+
EntityValidationException.prototype.convertResponse = function (response) {
|
|
1520
1528
|
if (response.headers === undefined) {
|
|
1529
|
+
console.debug('angularportalazure.EntityValidationException.convertResponse - response.data');
|
|
1521
1530
|
ValidationsExceptionDotNet.convertResponse(this, response.data);
|
|
1522
1531
|
ValidationsExceptionDotNet.convertExceptionType(this, response.data);
|
|
1523
1532
|
}
|
|
1524
1533
|
else {
|
|
1534
|
+
console.debug('angularportalazure.EntityValidationException.convertResponse - response.json()');
|
|
1525
1535
|
ValidationsExceptionDotNet.convertResponse(this, response.json());
|
|
1526
1536
|
ValidationsExceptionDotNet.convertExceptionType(this, response.json());
|
|
1527
1537
|
}
|
|
1528
1538
|
};
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
// ValidationsExceptionDotNet
|
|
1536
|
-
// exception.ClassName = 'Not yet implemented';
|
|
1537
|
-
// exception.Data = [{ key: 0, value: 'Not yet implemented' }];
|
|
1538
|
-
// ValidationResultDotNet
|
|
1539
|
-
// exception.ValidationResults = [{ ErrorMessage: 'Not yet implemented', MemberNames: [] }];
|
|
1539
|
+
EntityValidationException.convertResponse = function (exceptionTo, responseDataFrom) {
|
|
1540
|
+
console.debug('angularportalazure.EntityValidationException.convertResponse');
|
|
1541
|
+
exceptionTo.ExceptionMessage = responseDataFrom.ExceptionMessage;
|
|
1542
|
+
exceptionTo.Message = responseDataFrom.Message;
|
|
1543
|
+
exceptionTo.StackTrace = responseDataFrom.StackTrace;
|
|
1544
|
+
exceptionTo.InnerException = responseDataFrom.InnerException;
|
|
1540
1545
|
};
|
|
1541
|
-
|
|
1546
|
+
EntityValidationException.convertExceptionType = function (exception, responseData) {
|
|
1542
1547
|
if (responseData.ExceptionType === undefined) {
|
|
1548
|
+
console.debug('angularportalazure.EntityValidationException.convertExceptionType - undefined');
|
|
1543
1549
|
return;
|
|
1544
1550
|
}
|
|
1545
|
-
if (responseData.ExceptionType === 'System.Data.Entity.Validation.DbEntityValidationException') {
|
|
1551
|
+
else if (responseData.ExceptionType === 'System.Data.Entity.Validation.DbEntityValidationException') {
|
|
1552
|
+
console.debug('angularportalazure.EntityValidationException.convertExceptionType - DbEntityValidationException');
|
|
1546
1553
|
exception.ExceptionType = 'DbEntityValidationException';
|
|
1547
1554
|
return;
|
|
1548
1555
|
}
|
|
1549
1556
|
else if (responseData.ExceptionType === 'System.Data.Entity.Infrastructure.DbUpdateConcurrencyException') {
|
|
1557
|
+
console.debug('angularportalazure.EntityValidationException.convertExceptionType - DbUpdateConcurrencyException');
|
|
1550
1558
|
exception.ExceptionType = 'DbUpdateConcurrencyException';
|
|
1551
1559
|
return;
|
|
1552
1560
|
}
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
console.log('[angularportalazure.Exception.setExceptionType2] Why is this in ClassName? Can this be changed?');
|
|
1561
|
+
else if (responseData.ClassName !== undefined && responseData.ClassName.indexOf('ValidationsException') > 0) {
|
|
1562
|
+
console.debug('angularportalazure.EntityValidationException.convertExceptionType - ValidationsException');
|
|
1556
1563
|
exception.ExceptionType = 'ValidationsException';
|
|
1557
1564
|
return;
|
|
1558
1565
|
}
|
|
1559
|
-
|
|
1566
|
+
else {
|
|
1567
|
+
console.debug('angularportalazure.EntityValidationException.convertExceptionType - else');
|
|
1568
|
+
exception.ExceptionType = responseData.ExceptionType;
|
|
1569
|
+
}
|
|
1560
1570
|
};
|
|
1561
|
-
return
|
|
1571
|
+
return EntityValidationException;
|
|
1562
1572
|
}(ExceptionDotNet));
|
|
1573
|
+
angularportalazure.EntityValidationException = EntityValidationException;
|
|
1574
|
+
/**
|
|
1575
|
+
* @deprecated ValidationsExceptionDotNet should be replaced by EntityValidationException
|
|
1576
|
+
*/
|
|
1577
|
+
var ValidationsExceptionDotNet = /** @class */ (function (_super) {
|
|
1578
|
+
__extends(ValidationsExceptionDotNet, _super);
|
|
1579
|
+
function ValidationsExceptionDotNet() {
|
|
1580
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1581
|
+
}
|
|
1582
|
+
return ValidationsExceptionDotNet;
|
|
1583
|
+
}(EntityValidationException));
|
|
1563
1584
|
angularportalazure.ValidationsExceptionDotNet = ValidationsExceptionDotNet;
|
|
1564
1585
|
})(angularportalazure || (angularportalazure = {}));
|
|
1565
1586
|
// #region Declarations
|
|
@@ -1598,42 +1619,54 @@ var angularportalazure;
|
|
|
1598
1619
|
});
|
|
1599
1620
|
}
|
|
1600
1621
|
if (message === 'FEHLER ') {
|
|
1622
|
+
console.debug(exception);
|
|
1601
1623
|
message = message + ' : JavaScript-Fehler oder Probleme mit der Internetverbindung. Ggf. weitere Informationen im Log. ' + exception;
|
|
1602
|
-
console.log(exception);
|
|
1603
1624
|
}
|
|
1604
1625
|
return message;
|
|
1605
1626
|
};
|
|
1606
1627
|
// TODO:2017-01-09/hp: [any] will be [Response] in angular2
|
|
1607
1628
|
Exception.prepareException = function (response) {
|
|
1608
|
-
console.
|
|
1609
|
-
console.
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
if (response.
|
|
1613
|
-
exception = angularportalazure.Exception.
|
|
1629
|
+
console.debug('angularportalazure.Exception.prepareException');
|
|
1630
|
+
console.debug(response);
|
|
1631
|
+
var exception = angularportalazure.Exception.createException();
|
|
1632
|
+
// #region Process EntityValidationException, etc.
|
|
1633
|
+
if (response.json().Data != undefined) {
|
|
1634
|
+
exception = angularportalazure.Exception.processResponseData(exception, response.json().Data);
|
|
1614
1635
|
}
|
|
1636
|
+
// #endregion
|
|
1637
|
+
// #region Process Angular 1?
|
|
1638
|
+
else if (response.headers === undefined) {
|
|
1639
|
+
exception = angularportalazure.Exception.processResponseWithData(exception, response);
|
|
1640
|
+
}
|
|
1641
|
+
// #endregion
|
|
1642
|
+
// #region Process Angular 2?
|
|
1615
1643
|
else {
|
|
1616
|
-
exception = angularportalazure.Exception.processDotNetException2(response);
|
|
1644
|
+
exception = angularportalazure.Exception.processDotNetException2(exception, response);
|
|
1617
1645
|
}
|
|
1646
|
+
// #endregion
|
|
1618
1647
|
exception.convertResponse(response);
|
|
1619
1648
|
exception.Url = response.url;
|
|
1620
1649
|
exception.Status = response.status;
|
|
1621
1650
|
exception.StatusText = response.statusText;
|
|
1622
|
-
|
|
1623
|
-
console.log(response);
|
|
1624
|
-
console.log(exception);
|
|
1651
|
+
console.debug(exception);
|
|
1625
1652
|
return exception;
|
|
1626
1653
|
};
|
|
1627
|
-
Exception.
|
|
1654
|
+
Exception.createException = function () {
|
|
1628
1655
|
var exception = new angularportalazure.Exception();
|
|
1629
|
-
// #region Convert data to Messages
|
|
1630
1656
|
exception.Messages = [];
|
|
1657
|
+
return exception;
|
|
1658
|
+
};
|
|
1659
|
+
Exception.processResponseWithData = function (exception, response) {
|
|
1660
|
+
console.debug('angularportalazure.Exception.processResponseWithData');
|
|
1661
|
+
// #region Convert data to Messages
|
|
1631
1662
|
if (response.data.Data === undefined) {
|
|
1632
1663
|
exception.Messages.push('No further information found in [response.data.Data].');
|
|
1664
|
+
exception.Messages.push('No further information found in [response.data.Data].');
|
|
1633
1665
|
}
|
|
1634
1666
|
else {
|
|
1635
1667
|
var i = 1;
|
|
1636
1668
|
while (response.data.Data[i + ''] !== undefined) {
|
|
1669
|
+
console.debug('Add to exception.Messages : ' + response.data.Data[i + '']);
|
|
1637
1670
|
exception.Messages.push(response.data.Data[i + '']);
|
|
1638
1671
|
i++;
|
|
1639
1672
|
}
|
|
@@ -1641,11 +1674,21 @@ var angularportalazure;
|
|
|
1641
1674
|
// #endregion
|
|
1642
1675
|
return exception;
|
|
1643
1676
|
};
|
|
1677
|
+
Exception.processResponseData = function (exception, data) {
|
|
1678
|
+
console.debug('angularportalazure.Exception.processResponseData');
|
|
1679
|
+
var i = 1;
|
|
1680
|
+
while (data[i + ''] !== undefined) {
|
|
1681
|
+
console.debug('Add to exception.Messages : ' + data[i + '']);
|
|
1682
|
+
exception.Messages.push(data[i + '']);
|
|
1683
|
+
i++;
|
|
1684
|
+
}
|
|
1685
|
+
return exception;
|
|
1686
|
+
};
|
|
1644
1687
|
// TODO:2017-01-09/hp: Implement this function for angular2
|
|
1645
|
-
Exception.processDotNetException2 = function (response) {
|
|
1646
|
-
|
|
1688
|
+
Exception.processDotNetException2 = function (exception, response) {
|
|
1689
|
+
console.debug('angularportalazure.Exception.processDotNetException2');
|
|
1647
1690
|
if (response.json().data !== undefined) {
|
|
1648
|
-
console.
|
|
1691
|
+
console.debug('[angularportalazure.Exception.processDotNetException2] not implemented. Implement it to get proper exception data.');
|
|
1649
1692
|
}
|
|
1650
1693
|
return exception;
|
|
1651
1694
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
{
|
|
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.300",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"typings": "apn.d.ts",
|
|
8
8
|
"dependencies": {
|