@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.
- package/dist/chunk-4N72FQFX.mjs +16 -0
- package/dist/{chunk-H2VHSGNX.mjs → chunk-PUMIWHDN.mjs} +2 -2
- package/dist/{chunk-DWTEWOSJ.mjs → chunk-RTHQLVEA.mjs} +3 -9
- package/dist/{chunk-DWTEWOSJ.mjs.map → chunk-RTHQLVEA.mjs.map} +1 -1
- package/dist/enums/Country.mjs +1 -1
- package/dist/enums/Currency.mjs +1 -1
- package/dist/enums/Locale.mjs +1 -1
- package/dist/enums/UnitOfMeasurement.mjs +1 -1
- package/dist/enums/UnitOfWeight.mjs +1 -1
- package/dist/index.js +8 -6861
- package/dist/index.js.map +1 -1
- package/dist/structs/Address.mjs +2 -3
- package/dist/structs/Address.mjs.map +1 -1
- package/dist/structs/Box.mjs +2 -2
- package/dist/structs/Dimension.mjs +2 -2
- package/dist/structs/Money.mjs +1 -1
- package/dist/structs/Name.mjs +1 -1
- package/dist/structs/Weight.mjs +1 -1
- package/dist/values/DunsNumber.mjs +3 -8
- package/dist/values/DunsNumber.mjs.map +1 -1
- package/dist/values/EAN.mjs +3 -8
- package/dist/values/EAN.mjs.map +1 -1
- package/dist/values/Email.mjs +3 -8
- package/dist/values/Email.mjs.map +1 -1
- package/dist/values/IBAN.mjs +3 -8
- package/dist/values/IBAN.mjs.map +1 -1
- package/dist/values/PostalCode.mjs +2 -3
- package/dist/values/Slug.mjs +3 -8
- package/dist/values/Slug.mjs.map +1 -1
- package/dist/values/Url.mjs +3 -8
- package/dist/values/Url.mjs.map +1 -1
- package/dist/values/VAT.mjs +3 -8
- package/dist/values/VAT.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-CF2KLUD7.mjs +0 -6848
- package/dist/chunk-CF2KLUD7.mjs.map +0 -1
- package/dist/chunk-RDITZTSA.mjs +0 -41
- /package/dist/{chunk-RDITZTSA.mjs.map → chunk-4N72FQFX.mjs.map} +0 -0
- /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-
|
|
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-
|
|
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
|
-
|
|
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
|
|
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-
|
|
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":"
|
|
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"]}
|
package/dist/enums/Country.mjs
CHANGED
package/dist/enums/Currency.mjs
CHANGED
package/dist/enums/Locale.mjs
CHANGED