@thisisagile/easy-domain 17.30.0 → 17.30.1

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.
Files changed (39) hide show
  1. package/dist/chunk-4N72FQFX.mjs +16 -0
  2. package/dist/{chunk-H2VHSGNX.mjs → chunk-PUMIWHDN.mjs} +2 -2
  3. package/dist/{chunk-DWTEWOSJ.mjs → chunk-RTHQLVEA.mjs} +3 -9
  4. package/dist/{chunk-DWTEWOSJ.mjs.map → chunk-RTHQLVEA.mjs.map} +1 -1
  5. package/dist/enums/Country.mjs +1 -1
  6. package/dist/enums/Currency.mjs +1 -1
  7. package/dist/enums/Locale.mjs +1 -1
  8. package/dist/enums/UnitOfMeasurement.mjs +1 -1
  9. package/dist/enums/UnitOfWeight.mjs +1 -1
  10. package/dist/index.js +8 -6861
  11. package/dist/index.js.map +1 -1
  12. package/dist/structs/Address.mjs +2 -3
  13. package/dist/structs/Address.mjs.map +1 -1
  14. package/dist/structs/Box.mjs +2 -2
  15. package/dist/structs/Dimension.mjs +2 -2
  16. package/dist/structs/Money.mjs +1 -1
  17. package/dist/structs/Name.mjs +1 -1
  18. package/dist/structs/Weight.mjs +1 -1
  19. package/dist/values/DunsNumber.mjs +3 -8
  20. package/dist/values/DunsNumber.mjs.map +1 -1
  21. package/dist/values/EAN.mjs +3 -8
  22. package/dist/values/EAN.mjs.map +1 -1
  23. package/dist/values/Email.mjs +3 -8
  24. package/dist/values/Email.mjs.map +1 -1
  25. package/dist/values/IBAN.mjs +3 -8
  26. package/dist/values/IBAN.mjs.map +1 -1
  27. package/dist/values/PostalCode.mjs +2 -3
  28. package/dist/values/Slug.mjs +3 -8
  29. package/dist/values/Slug.mjs.map +1 -1
  30. package/dist/values/Url.mjs +3 -8
  31. package/dist/values/Url.mjs.map +1 -1
  32. package/dist/values/VAT.mjs +3 -8
  33. package/dist/values/VAT.mjs.map +1 -1
  34. package/package.json +4 -4
  35. package/dist/chunk-CF2KLUD7.mjs +0 -6848
  36. package/dist/chunk-CF2KLUD7.mjs.map +0 -1
  37. package/dist/chunk-RDITZTSA.mjs +0 -41
  38. /package/dist/{chunk-RDITZTSA.mjs.map → chunk-4N72FQFX.mjs.map} +0 -0
  39. /package/dist/{chunk-H2VHSGNX.mjs.map → chunk-PUMIWHDN.mjs.map} +0 -0
@@ -0,0 +1,16 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+
13
+ export {
14
+ __decorateClass
15
+ };
16
+ //# sourceMappingURL=chunk-4N72FQFX.mjs.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-XBORRJ6W.mjs";
4
4
  import {
5
5
  __decorateClass
6
- } from "./chunk-RDITZTSA.mjs";
6
+ } from "./chunk-4N72FQFX.mjs";
7
7
 
8
8
  // src/structs/Dimension.ts
9
9
  import { Struct, required } from "@thisisagile/easy";
@@ -32,4 +32,4 @@ var Dimension = _Dimension;
32
32
  export {
33
33
  Dimension
34
34
  };
35
- //# sourceMappingURL=chunk-H2VHSGNX.mjs.map
35
+ //# sourceMappingURL=chunk-PUMIWHDN.mjs.map
@@ -1,23 +1,17 @@
1
- import {
2
- require_validator
3
- } from "./chunk-CF2KLUD7.mjs";
4
1
  import {
5
2
  Country
6
3
  } from "./chunk-WHI6D6DX.mjs";
7
- import {
8
- __toESM
9
- } from "./chunk-RDITZTSA.mjs";
10
4
 
11
5
  // src/values/PostalCode.ts
12
6
  import { text, Value } from "@thisisagile/easy";
13
- var import_validator = __toESM(require_validator());
7
+ import { isPostalCode } from "validator";
14
8
  var PostalCode = class extends Value {
15
9
  constructor(postalCode2, country = Country.NL) {
16
10
  super(text(postalCode2).replace(" ", "").toString());
17
11
  this.country = country;
18
12
  }
19
13
  get isValid() {
20
- return (0, import_validator.isPostalCode)(this.value, this.country instanceof Country ? this.country.id : text(this.country).upper);
14
+ return isPostalCode(this.value, this.country instanceof Country ? this.country.id : text(this.country).upper);
21
15
  }
22
16
  };
23
17
  var postalCode = (postalCode2, country = Country.NL) => new PostalCode(postalCode2, country);
@@ -26,4 +20,4 @@ export {
26
20
  PostalCode,
27
21
  postalCode
28
22
  };
29
- //# sourceMappingURL=chunk-DWTEWOSJ.mjs.map
23
+ //# sourceMappingURL=chunk-RTHQLVEA.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/values/PostalCode.ts"],"sourcesContent":["import { Id, text, Value } from '@thisisagile/easy';\nimport { Country } from '../enums/Country';\nimport { isPostalCode, PostalCodeLocale } from 'validator';\n\nexport class PostalCode extends Value {\n constructor(\n postalCode?: unknown,\n readonly country: Country | Id = Country.NL\n ) {\n super(text(postalCode).replace(' ', '').toString());\n }\n get isValid(): boolean {\n return isPostalCode(this.value, (this.country instanceof Country ? this.country.id : text(this.country).upper) as PostalCodeLocale);\n }\n}\n\nexport const postalCode = (postalCode?: unknown, country: Country | Id = Country.NL) => new PostalCode(postalCode, country);\n"],"mappings":";;;;;;;;;;;AAAA,SAAa,MAAM,aAAa;AAEhC,uBAA+C;AAExC,IAAM,aAAN,cAAyB,MAAM;AAAA,EACpC,YACEA,aACS,UAAwB,QAAQ,IACzC;AACA,UAAM,KAAKA,WAAU,EAAE,QAAQ,KAAK,EAAE,EAAE,SAAS,CAAC;AAFzC;AAAA,EAGX;AAAA,EACA,IAAI,UAAmB;AACrB,eAAO,+BAAa,KAAK,OAAQ,KAAK,mBAAmB,UAAU,KAAK,QAAQ,KAAK,KAAK,KAAK,OAAO,EAAE,KAA0B;AAAA,EACpI;AACF;AAEO,IAAM,aAAa,CAACA,aAAsB,UAAwB,QAAQ,OAAO,IAAI,WAAWA,aAAY,OAAO;","names":["postalCode"]}
1
+ {"version":3,"sources":["../src/values/PostalCode.ts"],"sourcesContent":["import { Id, text, Value } from '@thisisagile/easy';\nimport { Country } from '../enums/Country';\nimport { isPostalCode, PostalCodeLocale } from 'validator';\n\nexport class PostalCode extends Value {\n constructor(\n postalCode?: unknown,\n readonly country: Country | Id = Country.NL\n ) {\n super(text(postalCode).replace(' ', '').toString());\n }\n get isValid(): boolean {\n return isPostalCode(this.value, (this.country instanceof Country ? this.country.id : text(this.country).upper) as PostalCodeLocale);\n }\n}\n\nexport const postalCode = (postalCode?: unknown, country: Country | Id = Country.NL) => new PostalCode(postalCode, country);\n"],"mappings":";;;;;AAAA,SAAa,MAAM,aAAa;AAEhC,SAAS,oBAAsC;AAExC,IAAM,aAAN,cAAyB,MAAM;AAAA,EACpC,YACEA,aACS,UAAwB,QAAQ,IACzC;AACA,UAAM,KAAKA,WAAU,EAAE,QAAQ,KAAK,EAAE,EAAE,SAAS,CAAC;AAFzC;AAAA,EAGX;AAAA,EACA,IAAI,UAAmB;AACrB,WAAO,aAAa,KAAK,OAAQ,KAAK,mBAAmB,UAAU,KAAK,QAAQ,KAAK,KAAK,KAAK,OAAO,EAAE,KAA0B;AAAA,EACpI;AACF;AAEO,IAAM,aAAa,CAACA,aAAsB,UAAwB,QAAQ,OAAO,IAAI,WAAWA,aAAY,OAAO;","names":["postalCode"]}
@@ -2,7 +2,7 @@ import {
2
2
  Country,
3
3
  inEurope
4
4
  } from "../chunk-WHI6D6DX.mjs";
5
- import "../chunk-RDITZTSA.mjs";
5
+ import "../chunk-4N72FQFX.mjs";
6
6
  export {
7
7
  Country,
8
8
  inEurope
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Currency
3
3
  } from "../chunk-PHJVJXA3.mjs";
4
- import "../chunk-RDITZTSA.mjs";
4
+ import "../chunk-4N72FQFX.mjs";
5
5
  export {
6
6
  Currency
7
7
  };
@@ -1,4 +1,4 @@
1
- import "../chunk-RDITZTSA.mjs";
1
+ import "../chunk-4N72FQFX.mjs";
2
2
 
3
3
  // src/enums/Locale.ts
4
4
  import { Enum, text } from "@thisisagile/easy";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  UnitOfMeasurement
3
3
  } from "../chunk-XBORRJ6W.mjs";
4
- import "../chunk-RDITZTSA.mjs";
4
+ import "../chunk-4N72FQFX.mjs";
5
5
  export {
6
6
  UnitOfMeasurement
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  UnitOfWeight
3
3
  } from "../chunk-CKW4QYDN.mjs";
4
- import "../chunk-RDITZTSA.mjs";
4
+ import "../chunk-4N72FQFX.mjs";
5
5
  export {
6
6
  UnitOfWeight
7
7
  };