@nmshd/content 2.10.1 → 2.10.2

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.
@@ -1,6 +1,7 @@
1
1
  import { RenderHints, ValueHints } from "../../../attributes/hints";
2
2
  import { AbstractString } from "../AbstractString";
3
3
  export declare abstract class AbstractEMailAddress extends AbstractString {
4
+ private static readonly regExp;
4
5
  value: string;
5
6
  static get valueHints(): ValueHints;
6
7
  static get renderHints(): RenderHints;
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractEMailAddress.d.ts","sourceRoot":"","sources":["../../../../src/attributes/types/strings/AbstractEMailAddress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAA4C,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,8BAAsB,oBAAqB,SAAQ,cAAc;IAQ7C,KAAK,EAAE,MAAM,CAAC;IAE9B,WAA2B,UAAU,IAAI,UAAU,CAMlD;IAED,WAA2B,WAAW,IAAI,WAAW,CAKpD;CACJ"}
1
+ {"version":3,"file":"AbstractEMailAddress.d.ts","sourceRoot":"","sources":["../../../../src/attributes/types/strings/AbstractEMailAddress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAA4C,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,8BAAsB,oBAAqB,SAAQ,cAAc;IAE7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAE5B;IAOc,KAAK,EAAE,MAAM,CAAC;IAE9B,WAA2B,UAAU,IAAI,UAAU,CAMlD;IAED,WAA2B,WAAW,IAAI,WAAW,CAKpD;CACJ"}
@@ -14,11 +14,13 @@ const ts_serval_1 = require("@js-soft/ts-serval");
14
14
  const hints_1 = require("../../../attributes/hints");
15
15
  const AbstractString_1 = require("../AbstractString");
16
16
  class AbstractEMailAddress extends AbstractString_1.AbstractString {
17
+ // from https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
18
+ static { this.regExp = new RegExp(/^[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@([A-Za-z0-9ÄäÖöÜüß]([A-Za-z0-9ÄäÖöÜüß-]{0,61}[A-Za-z0-9ÄäÖöÜüß])?\.)+[A-Za-z0-9ÄäÖöÜüß][A-Za-z0-9ÄäÖöÜüß-]{0,61}[A-Za-z0-9ÄäÖöÜüß]$/); }
17
19
  static get valueHints() {
18
20
  return super.valueHints.copyWith({
19
21
  min: 3,
20
- max: 100,
21
- pattern: "/^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,}$/i"
22
+ max: 254,
23
+ pattern: String(AbstractEMailAddress.regExp)
22
24
  });
23
25
  }
24
26
  static get renderHints() {
@@ -33,8 +35,8 @@ __decorate([
33
35
  (0, ts_serval_1.serialize)(),
34
36
  (0, ts_serval_1.validate)({
35
37
  min: 3,
36
- max: 100,
37
- regExp: new RegExp("^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,}$", "i")
38
+ max: 254,
39
+ regExp: AbstractEMailAddress.regExp
38
40
  }),
39
41
  __metadata("design:type", String)
40
42
  ], AbstractEMailAddress.prototype, "value", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractEMailAddress.js","sourceRoot":"","sources":["../../../../src/attributes/types/strings/AbstractEMailAddress.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAyD;AACzD,qDAA8G;AAC9G,sDAAmD;AAEnD,MAAsB,oBAAqB,SAAQ,+BAAc;IAUtD,MAAM,KAAc,UAAU;QACjC,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC;YAC7B,GAAG,EAAE,CAAC;YACN,GAAG,EAAE,GAAG;YACR,OAAO,EAAE,2CAA2C;SACvD,CAAC,CAAC;IACP,CAAC;IAEM,MAAM,KAAc,WAAW;QAClC,OAAO,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC;YAC9B,QAAQ,EAAE,2BAAmB,CAAC,SAAS;YACvC,QAAQ,EAAE,2BAAmB,CAAC,YAAY;SAC7C,CAAC,CAAC;IACP,CAAC;CACJ;AAxBD,oDAwBC;AAhBmB;IANf,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC;QACN,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,GAAG;QACR,MAAM,EAAE,IAAI,MAAM,CAAC,wCAAwC,EAAE,GAAG,CAAC;KACpE,CAAC;;mDAC4B"}
1
+ {"version":3,"file":"AbstractEMailAddress.js","sourceRoot":"","sources":["../../../../src/attributes/types/strings/AbstractEMailAddress.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAyD;AACzD,qDAA8G;AAC9G,sDAAmD;AAEnD,MAAsB,oBAAqB,SAAQ,+BAAc;IAC7D,8EAA8E;aACtD,WAAM,GAAG,IAAI,MAAM,CACvC,0MAA0M,CAC7M,CAAC;IASK,MAAM,KAAc,UAAU;QACjC,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC;YAC7B,GAAG,EAAE,CAAC;YACN,GAAG,EAAE,GAAG;YACR,OAAO,EAAE,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC;SAC/C,CAAC,CAAC;IACP,CAAC;IAEM,MAAM,KAAc,WAAW;QAClC,OAAO,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC;YAC9B,QAAQ,EAAE,2BAAmB,CAAC,SAAS;YACvC,QAAQ,EAAE,2BAAmB,CAAC,YAAY;SAC7C,CAAC,CAAC;IACP,CAAC;;AA1BL,oDA2BC;AAhBmB;IANf,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,EAAC;QACN,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,GAAG;QACR,MAAM,EAAE,oBAAoB,CAAC,MAAM;KACtC,CAAC;;mDAC4B"}
@@ -1,6 +1,7 @@
1
1
  import { RenderHints, ValueHints } from "../../../attributes/hints";
2
2
  import { AbstractString } from "../AbstractString";
3
3
  export declare abstract class AbstractURL extends AbstractString {
4
+ private static readonly regExp;
4
5
  value: string;
5
6
  static get valueHints(): ValueHints;
6
7
  static get renderHints(): RenderHints;
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractURL.d.ts","sourceRoot":"","sources":["../../../../src/attributes/types/strings/AbstractURL.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAA4C,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,8BAAsB,WAAY,SAAQ,cAAc;IAUpC,KAAK,EAAE,MAAM,CAAC;IAE9B,WAA2B,UAAU,IAAI,UAAU,CAOlD;IAED,WAA2B,WAAW,IAAI,WAAW,CAKpD;CACJ"}
1
+ {"version":3,"file":"AbstractURL.d.ts","sourceRoot":"","sources":["../../../../src/attributes/types/strings/AbstractURL.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAA4C,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,8BAAsB,WAAY,SAAQ,cAAc;IACpD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAE5B;IAQc,KAAK,EAAE,MAAM,CAAC;IAE9B,WAA2B,UAAU,IAAI,UAAU,CAMlD;IAED,WAA2B,WAAW,IAAI,WAAW,CAKpD;CACJ"}
@@ -14,11 +14,12 @@ const ts_serval_1 = require("@js-soft/ts-serval");
14
14
  const hints_1 = require("../../../attributes/hints");
15
15
  const AbstractString_1 = require("../AbstractString");
16
16
  class AbstractURL extends AbstractString_1.AbstractString {
17
+ static { this.regExp = new RegExp(/^([A-Za-z]+:\/\/)?((www\.)|(?!www\.))([A-Za-z0-9ÄäÖöÜüß]([A-Za-zÄäÖöÜüß0-9-]{0,61}[A-Za-zÄäÖöÜüß0-9])?\.)+([A-Za-z0-9ÄäÖöÜüß]([A-Za-zÄäÖöÜüß0-9-]{0,61}[A-Za-zÄäÖöÜüß0-9])?)(:[0-9]+)?(\/[A-Za-zÄäÖöÜüß0-9?#@!$&'()*+,;=%-]*)*$/); }
17
18
  static get valueHints() {
18
19
  return super.valueHints.copyWith({
19
20
  min: 3,
20
21
  max: 1024,
21
- pattern: "/((([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\\+\\$,\\w]+@)[A-Za-z0-9.-]+)((?:\\/[\\+~%\\/.\\w\\-_]*)?\\??(?:[-\\+=&;%@.\\w_]*)#?(?:[\\w]*))?)/"
22
+ pattern: String(AbstractURL.regExp)
22
23
  });
23
24
  }
24
25
  static get renderHints() {
@@ -34,9 +35,7 @@ __decorate([
34
35
  (0, ts_serval_1.validate)({
35
36
  min: 3,
36
37
  max: 1024,
37
- regExp: new RegExp(
38
- // eslint-disable-next-line no-useless-escape
39
- /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/)
38
+ regExp: AbstractURL.regExp
40
39
  }),
41
40
  __metadata("design:type", String)
42
41
  ], AbstractURL.prototype, "value", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractURL.js","sourceRoot":"","sources":["../../../../src/attributes/types/strings/AbstractURL.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAyD;AACzD,qDAA8G;AAC9G,sDAAmD;AAEnD,MAAsB,WAAY,SAAQ,+BAAc;IAY7C,MAAM,KAAc,UAAU;QACjC,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC;YAC7B,GAAG,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T,MAAM,EAAE,WAAW,CAAC,MAAM;KAC7B,CAAC;;0CAC4B"}
@@ -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.10.1",
9
- build: "100",
10
- date: "2024-05-29T13:30:06+00:00",
11
- commit: "8fa588cdc3701d5408ef5d389a08aedd27d6117a",
8
+ version: "2.10.2",
9
+ build: "107",
10
+ date: "2024-06-07T09:25:00+00:00",
11
+ commit: "45dc922e862488dd0b02b0fdbefc0ffa6e28cfc5",
12
12
  dependencies: {"@js-soft/logging-abstractions":"^1.0.1","@nmshd/iql":"^1.0.2","ts-simple-nameof":"^1.3.1"},
13
13
  libraries: {
14
14
  serval: ts_serval_1.buildInformation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nmshd/content",
3
- "version": "2.10.1",
3
+ "version": "2.10.2",
4
4
  "description": "The content library defines data structures that can be transmitted using the transport library.",
5
5
  "homepage": "https://enmeshed.eu",
6
6
  "repository": {