@nmshd/content 2.8.5 → 2.8.6
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/dist/ValidationErrorWithoutProperty.d.ts +5 -0
- package/dist/ValidationErrorWithoutProperty.d.ts.map +1 -0
- package/dist/ValidationErrorWithoutProperty.js +12 -0
- package/dist/ValidationErrorWithoutProperty.js.map +1 -0
- package/dist/attributes/types/birth/BirthDate.d.ts +2 -0
- package/dist/attributes/types/birth/BirthDate.d.ts.map +1 -1
- package/dist/attributes/types/birth/BirthDate.js +17 -1
- package/dist/attributes/types/birth/BirthDate.js.map +1 -1
- package/dist/buildInformation.js +4 -4
- package/lib-web/nmshd.content.js +42 -5
- package/lib-web/nmshd.content.min.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidationErrorWithoutProperty.d.ts","sourceRoot":"","sources":["../src/ValidationErrorWithoutProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,8BAA+B,SAAQ,eAAe;gBAC5C,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAKjE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationErrorWithoutProperty = void 0;
|
|
4
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
5
|
+
class ValidationErrorWithoutProperty extends ts_serval_1.ValidationError {
|
|
6
|
+
constructor(type, reason, cause) {
|
|
7
|
+
super(type, "n/a", reason, cause);
|
|
8
|
+
this.message = `${type} :: ${reason}`;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.ValidationErrorWithoutProperty = ValidationErrorWithoutProperty;
|
|
12
|
+
//# sourceMappingURL=ValidationErrorWithoutProperty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidationErrorWithoutProperty.js","sourceRoot":"","sources":["../src/ValidationErrorWithoutProperty.ts"],"names":[],"mappings":";;;AAAA,kDAAqD;AAErD,MAAa,8BAA+B,SAAQ,2BAAe;IAC/D,YAAmB,IAAY,EAAE,MAAc,EAAE,KAAa;QAC1D,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QAElC,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,OAAO,MAAM,EAAE,CAAC;IAC1C,CAAC;CACJ;AAND,wEAMC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Serializable } from "@js-soft/ts-serval";
|
|
1
2
|
import { AbstractComplexValue, AbstractComplexValueJSON, IAbstractComplexValue } from "../../AbstractComplexValue";
|
|
2
3
|
import { RenderHints, ValueHints } from "../../hints";
|
|
3
4
|
import { BirthDay, IBirthDay } from "./BirthDay";
|
|
@@ -1123,6 +1124,7 @@ export declare class BirthDate extends AbstractComplexValue implements IBirthDat
|
|
|
1123
1124
|
day: BirthDay;
|
|
1124
1125
|
month: BirthMonth;
|
|
1125
1126
|
year: BirthYear;
|
|
1127
|
+
protected static postFrom<T extends Serializable>(value: T): T;
|
|
1126
1128
|
static get valueHints(): ValueHints;
|
|
1127
1129
|
static get renderHints(): RenderHints;
|
|
1128
1130
|
static from(value: IBirthDate | Omit<BirthDateJSON, "@type">): BirthDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BirthDate.d.ts","sourceRoot":"","sources":["../../../../src/attributes/types/birth/BirthDate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BirthDate.d.ts","sourceRoot":"","sources":["../../../../src/attributes/types/birth/BirthDate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA6B,MAAM,oBAAoB,CAAC;AAK7E,OAAO,EAAE,oBAAoB,EAAE,wBAA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EAAE,OAAO,GAAG,SAAS,GAAG,aAAa;CAGhH"}
|
|
@@ -11,11 +11,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
|
+
var BirthDate_1;
|
|
14
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
16
|
exports.BirthDate = void 0;
|
|
16
17
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
17
18
|
const easy_tsnameof_1 = __importDefault(require("easy-tsnameof"));
|
|
18
19
|
const luxon_1 = require("luxon");
|
|
20
|
+
const ValidationErrorWithoutProperty_1 = require("../../../ValidationErrorWithoutProperty");
|
|
19
21
|
const AbstractAttributeValue_1 = require("../../AbstractAttributeValue");
|
|
20
22
|
const AbstractComplexValue_1 = require("../../AbstractComplexValue");
|
|
21
23
|
const hints_1 = require("../../hints");
|
|
@@ -23,7 +25,21 @@ const BirthDay_1 = require("./BirthDay");
|
|
|
23
25
|
const BirthMonth_1 = require("./BirthMonth");
|
|
24
26
|
const BirthYear_1 = require("./BirthYear");
|
|
25
27
|
let BirthDate = class BirthDate extends AbstractComplexValue_1.AbstractComplexValue {
|
|
28
|
+
static { BirthDate_1 = this; }
|
|
26
29
|
static { this.propertyNames = (0, easy_tsnameof_1.default)(); }
|
|
30
|
+
static postFrom(value) {
|
|
31
|
+
if (!(value instanceof BirthDate_1))
|
|
32
|
+
throw new Error("this should never happen");
|
|
33
|
+
const dateTime = luxon_1.DateTime.fromObject({ day: value.day.value, month: value.month.value, year: value.year.value });
|
|
34
|
+
const isValid = dateTime.isValid;
|
|
35
|
+
if (!isValid) {
|
|
36
|
+
throw new ValidationErrorWithoutProperty_1.ValidationErrorWithoutProperty(BirthDate_1.name, "The BirthDate is not a valid date.");
|
|
37
|
+
}
|
|
38
|
+
if (luxon_1.DateTime.utc() < dateTime) {
|
|
39
|
+
throw new ValidationErrorWithoutProperty_1.ValidationErrorWithoutProperty(BirthDate_1.name, "You cannot enter a BirthDate that is in the future.");
|
|
40
|
+
}
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
27
43
|
static get valueHints() {
|
|
28
44
|
return hints_1.ValueHints.from({
|
|
29
45
|
propertyHints: {
|
|
@@ -72,7 +88,7 @@ __decorate([
|
|
|
72
88
|
(0, ts_serval_1.validate)(),
|
|
73
89
|
__metadata("design:type", BirthYear_1.BirthYear)
|
|
74
90
|
], BirthDate.prototype, "year", void 0);
|
|
75
|
-
exports.BirthDate = BirthDate = __decorate([
|
|
91
|
+
exports.BirthDate = BirthDate = BirthDate_1 = __decorate([
|
|
76
92
|
(0, ts_serval_1.type)("BirthDate")
|
|
77
93
|
], BirthDate);
|
|
78
94
|
//# sourceMappingURL=BirthDate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BirthDate.js","sourceRoot":"","sources":["../../../../src/attributes/types/birth/BirthDate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BirthDate.js","sourceRoot":"","sources":["../../../../src/attributes/types/birth/BirthDate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA6E;AAC7E,kEAAmC;AACnC,iCAAiC;AACjC,4FAAyF;AACzF,yEAAsE;AACtE,qEAAmH;AACnH,uCAAsD;AACtD,yCAAiD;AACjD,6CAAuD;AACvD,2CAAoD;AAgB7C,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,2CAAoB;;aACxB,kBAAa,GAAG,IAAA,uBAAM,GAAoB,AAA7B,CAA8B;IAcxD,MAAM,CAAU,QAAQ,CAAyB,KAAQ;QAC/D,IAAI,CAAC,CAAC,KAAK,YAAY,WAAS,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAE/E,MAAM,QAAQ,GAAG,gBAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,C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CAAC;IACP,CAAC;IAEM,MAAM,CAAC,IAAI,CAAC,KAAgD;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAEe,QAAQ;QACpB,OAAO,gBAAQ,CAAC,UAAU,CAAC;YACvB,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK;YACnB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;SACxB,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC9B,CAAC;IAEe,MAAM,CAAC,OAA6B,EAAE,iBAAuC;QACzF,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,CAAkB,CAAC;IACrE,CAAC;;AAlEQ,8BAAS;AAKX;IAFN,IAAA,qBAAS,EAAC,EAAE,eAAe,EAAE,+CAAsB,CAAC,cAAc,EAAE,CAAC;IACrE,IAAA,oBAAQ,GAAE;8BACC,mBAAQ;sCAAC;AAId;IAFN,IAAA,qBAAS,EAAC,EAAE,eAAe,EAAE,+CAAsB,CAAC,cAAc,EAAE,CAAC;IACrE,IAAA,oBAAQ,GAAE;8BACG,uBAAU;wCAAC;AAIlB;IAFN,IAAA,qBAAS,EAAC,EAAE,eAAe,EAAE,+CAAsB,CAAC,cAAc,EAAE,CAAC;IACrE,IAAA,oBAAQ,GAAE;8BACE,qBAAS;uCAAC;oBAbd,SAAS;IADrB,IAAA,gBAAI,EAAC,WAAW,CAAC;GACL,SAAS,CAmErB"}
|
package/dist/buildInformation.js
CHANGED
|
@@ -5,10 +5,10 @@ const ts_serval_1 = require("@js-soft/ts-serval");
|
|
|
5
5
|
const crypto_1 = require("@nmshd/crypto");
|
|
6
6
|
const transport_1 = require("@nmshd/transport");
|
|
7
7
|
exports.buildInformation = {
|
|
8
|
-
version: "2.8.
|
|
9
|
-
build: "
|
|
10
|
-
date: "2024-02-
|
|
11
|
-
commit: "
|
|
8
|
+
version: "2.8.6",
|
|
9
|
+
build: "26",
|
|
10
|
+
date: "2024-02-19T15:34:09+00:00",
|
|
11
|
+
commit: "5242e1473f97fa0e5315c0b1ee9790f22468efde",
|
|
12
12
|
dependencies: {"@js-soft/logging-abstractions":"^1.0.1","@nmshd/iql":"^1.0.0","easy-tsnameof":"^3.0.6"},
|
|
13
13
|
libraries: {
|
|
14
14
|
serval: ts_serval_1.buildInformation,
|
package/lib-web/nmshd.content.js
CHANGED
|
@@ -7575,6 +7575,27 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
7575
7575
|
|
|
7576
7576
|
/***/ }),
|
|
7577
7577
|
|
|
7578
|
+
/***/ "./dist/ValidationErrorWithoutProperty.js":
|
|
7579
|
+
/*!************************************************!*\
|
|
7580
|
+
!*** ./dist/ValidationErrorWithoutProperty.js ***!
|
|
7581
|
+
\************************************************/
|
|
7582
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7583
|
+
|
|
7584
|
+
|
|
7585
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7586
|
+
exports.ValidationErrorWithoutProperty = void 0;
|
|
7587
|
+
const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
|
|
7588
|
+
class ValidationErrorWithoutProperty extends ts_serval_1.ValidationError {
|
|
7589
|
+
constructor(type, reason, cause) {
|
|
7590
|
+
super(type, "n/a", reason, cause);
|
|
7591
|
+
this.message = `${type} :: ${reason}`;
|
|
7592
|
+
}
|
|
7593
|
+
}
|
|
7594
|
+
exports.ValidationErrorWithoutProperty = ValidationErrorWithoutProperty;
|
|
7595
|
+
//# sourceMappingURL=ValidationErrorWithoutProperty.js.map
|
|
7596
|
+
|
|
7597
|
+
/***/ }),
|
|
7598
|
+
|
|
7578
7599
|
/***/ "./dist/attributes/AbstractAttribute.js":
|
|
7579
7600
|
/*!**********************************************!*\
|
|
7580
7601
|
!*** ./dist/attributes/AbstractAttribute.js ***!
|
|
@@ -10943,11 +10964,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10943
10964
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10944
10965
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10945
10966
|
};
|
|
10967
|
+
var BirthDate_1;
|
|
10946
10968
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10947
10969
|
exports.BirthDate = void 0;
|
|
10948
10970
|
const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
|
|
10949
10971
|
const easy_tsnameof_1 = __importDefault(__webpack_require__(/*! easy-tsnameof */ "../../node_modules/easy-tsnameof/dist/easy-tsnameof.esm.js"));
|
|
10950
10972
|
const luxon_1 = __webpack_require__(/*! luxon */ "../../node_modules/luxon/build/node/luxon.js");
|
|
10973
|
+
const ValidationErrorWithoutProperty_1 = __webpack_require__(/*! ../../../ValidationErrorWithoutProperty */ "./dist/ValidationErrorWithoutProperty.js");
|
|
10951
10974
|
const AbstractAttributeValue_1 = __webpack_require__(/*! ../../AbstractAttributeValue */ "./dist/attributes/AbstractAttributeValue.js");
|
|
10952
10975
|
const AbstractComplexValue_1 = __webpack_require__(/*! ../../AbstractComplexValue */ "./dist/attributes/AbstractComplexValue.js");
|
|
10953
10976
|
const hints_1 = __webpack_require__(/*! ../../hints */ "./dist/attributes/hints/index.js");
|
|
@@ -10955,7 +10978,21 @@ const BirthDay_1 = __webpack_require__(/*! ./BirthDay */ "./dist/attributes/type
|
|
|
10955
10978
|
const BirthMonth_1 = __webpack_require__(/*! ./BirthMonth */ "./dist/attributes/types/birth/BirthMonth.js");
|
|
10956
10979
|
const BirthYear_1 = __webpack_require__(/*! ./BirthYear */ "./dist/attributes/types/birth/BirthYear.js");
|
|
10957
10980
|
let BirthDate = class BirthDate extends AbstractComplexValue_1.AbstractComplexValue {
|
|
10981
|
+
static { BirthDate_1 = this; }
|
|
10958
10982
|
static { this.propertyNames = (0, easy_tsnameof_1.default)(); }
|
|
10983
|
+
static postFrom(value) {
|
|
10984
|
+
if (!(value instanceof BirthDate_1))
|
|
10985
|
+
throw new Error("this should never happen");
|
|
10986
|
+
const dateTime = luxon_1.DateTime.fromObject({ day: value.day.value, month: value.month.value, year: value.year.value });
|
|
10987
|
+
const isValid = dateTime.isValid;
|
|
10988
|
+
if (!isValid) {
|
|
10989
|
+
throw new ValidationErrorWithoutProperty_1.ValidationErrorWithoutProperty(BirthDate_1.name, "The BirthDate is not a valid date.");
|
|
10990
|
+
}
|
|
10991
|
+
if (luxon_1.DateTime.utc() < dateTime) {
|
|
10992
|
+
throw new ValidationErrorWithoutProperty_1.ValidationErrorWithoutProperty(BirthDate_1.name, "You cannot enter a BirthDate that is in the future.");
|
|
10993
|
+
}
|
|
10994
|
+
return value;
|
|
10995
|
+
}
|
|
10959
10996
|
static get valueHints() {
|
|
10960
10997
|
return hints_1.ValueHints.from({
|
|
10961
10998
|
propertyHints: {
|
|
@@ -11004,7 +11041,7 @@ __decorate([
|
|
|
11004
11041
|
(0, ts_serval_1.validate)(),
|
|
11005
11042
|
__metadata("design:type", BirthYear_1.BirthYear)
|
|
11006
11043
|
], BirthDate.prototype, "year", void 0);
|
|
11007
|
-
exports.BirthDate = BirthDate = __decorate([
|
|
11044
|
+
exports.BirthDate = BirthDate = BirthDate_1 = __decorate([
|
|
11008
11045
|
(0, ts_serval_1.type)("BirthDate")
|
|
11009
11046
|
], BirthDate);
|
|
11010
11047
|
//# sourceMappingURL=BirthDate.js.map
|
|
@@ -14701,10 +14738,10 @@ const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-s
|
|
|
14701
14738
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
14702
14739
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
14703
14740
|
exports.buildInformation = {
|
|
14704
|
-
version: "2.8.
|
|
14705
|
-
build: "
|
|
14706
|
-
date: "2024-02-
|
|
14707
|
-
commit: "
|
|
14741
|
+
version: "2.8.6",
|
|
14742
|
+
build: "26",
|
|
14743
|
+
date: "2024-02-19T15:34:09+00:00",
|
|
14744
|
+
commit: "5242e1473f97fa0e5315c0b1ee9790f22468efde",
|
|
14708
14745
|
dependencies: {"@js-soft/logging-abstractions":"^1.0.1","@nmshd/iql":"^1.0.0","easy-tsnameof":"^3.0.6"},
|
|
14709
14746
|
libraries: {
|
|
14710
14747
|
serval: ts_serval_1.buildInformation,
|