@aidc-toolkit/gs1 0.9.19-beta → 0.9.21-beta
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/character-set.d.ts +4 -4
- package/dist/character-set.d.ts.map +1 -1
- package/dist/character-set.js +7 -7
- package/dist/character-set.js.map +1 -1
- package/dist/gtin-creator.d.ts +68 -0
- package/dist/gtin-creator.d.ts.map +1 -0
- package/dist/gtin-creator.js +158 -0
- package/dist/gtin-creator.js.map +1 -0
- package/dist/gtin-validator.d.ts +202 -0
- package/dist/gtin-validator.d.ts.map +1 -0
- package/dist/gtin-validator.js +470 -0
- package/dist/gtin-validator.js.map +1 -0
- package/dist/identifier-creator.d.ts +72 -0
- package/dist/identifier-creator.d.ts.map +1 -0
- package/dist/identifier-creator.js +50 -0
- package/dist/identifier-creator.js.map +1 -0
- package/dist/identifier-type.d.ts +58 -0
- package/dist/identifier-type.d.ts.map +1 -0
- package/dist/identifier-type.js +54 -0
- package/dist/identifier-type.js.map +1 -0
- package/dist/identifier-validator.d.ts +174 -0
- package/dist/identifier-validator.d.ts.map +1 -0
- package/dist/identifier-validator.js +145 -0
- package/dist/identifier-validator.js.map +1 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/locale/en/locale-strings.d.ts +3 -3
- package/dist/locale/en/locale-strings.js +3 -3
- package/dist/locale/en/locale-strings.js.map +1 -1
- package/dist/locale/fr/locale-strings.d.ts +3 -3
- package/dist/locale/fr/locale-strings.js +3 -3
- package/dist/locale/fr/locale-strings.js.map +1 -1
- package/dist/non-gtin-numeric-identifier-creator.d.ts +30 -0
- package/dist/non-gtin-numeric-identifier-creator.d.ts.map +1 -0
- package/dist/non-gtin-numeric-identifier-creator.js +30 -0
- package/dist/non-gtin-numeric-identifier-creator.js.map +1 -0
- package/dist/non-gtin-numeric-identifier-validator.d.ts +41 -0
- package/dist/non-gtin-numeric-identifier-validator.d.ts.map +1 -0
- package/dist/non-gtin-numeric-identifier-validator.js +40 -0
- package/dist/non-gtin-numeric-identifier-validator.js.map +1 -0
- package/dist/non-numeric-identifier-creator.d.ts +55 -0
- package/dist/non-numeric-identifier-creator.d.ts.map +1 -0
- package/dist/non-numeric-identifier-creator.js +93 -0
- package/dist/non-numeric-identifier-creator.js.map +1 -0
- package/dist/non-numeric-identifier-validator.d.ts +78 -0
- package/dist/non-numeric-identifier-validator.d.ts.map +1 -0
- package/dist/non-numeric-identifier-validator.js +95 -0
- package/dist/non-numeric-identifier-validator.js.map +1 -0
- package/dist/numeric-identifier-creator.d.ts +121 -0
- package/dist/numeric-identifier-creator.d.ts.map +1 -0
- package/dist/numeric-identifier-creator.js +135 -0
- package/dist/numeric-identifier-creator.js.map +1 -0
- package/dist/numeric-identifier-validator.d.ts +76 -0
- package/dist/numeric-identifier-validator.d.ts.map +1 -0
- package/dist/numeric-identifier-validator.js +84 -0
- package/dist/numeric-identifier-validator.js.map +1 -0
- package/dist/prefix-manager.d.ts +224 -0
- package/dist/prefix-manager.d.ts.map +1 -0
- package/dist/prefix-manager.js +369 -0
- package/dist/prefix-manager.js.map +1 -0
- package/dist/prefix-provider.d.ts +27 -0
- package/dist/prefix-provider.d.ts.map +1 -0
- package/dist/prefix-provider.js +2 -0
- package/dist/prefix-provider.js.map +1 -0
- package/dist/prefix-type.d.ts +22 -0
- package/dist/prefix-type.d.ts.map +1 -0
- package/dist/prefix-type.js +18 -0
- package/dist/prefix-type.js.map +1 -0
- package/dist/prefix-validator.d.ts +58 -0
- package/dist/prefix-validator.d.ts.map +1 -0
- package/dist/prefix-validator.js +154 -0
- package/dist/prefix-validator.js.map +1 -0
- package/dist/serializable-numeric-identifier-creator.d.ts +86 -0
- package/dist/serializable-numeric-identifier-creator.d.ts.map +1 -0
- package/dist/serializable-numeric-identifier-creator.js +116 -0
- package/dist/serializable-numeric-identifier-creator.js.map +1 -0
- package/dist/serializable-numeric-identifier-validator.d.ts +79 -0
- package/dist/serializable-numeric-identifier-validator.d.ts.map +1 -0
- package/dist/serializable-numeric-identifier-validator.js +99 -0
- package/dist/serializable-numeric-identifier-validator.js.map +1 -0
- package/gs1.iml +4 -1
- package/package.json +2 -3
- package/src/character-set.ts +7 -7
- package/src/gtin-creator.ts +195 -0
- package/src/gtin-validator.ts +564 -0
- package/src/identifier-creator.ts +97 -0
- package/src/identifier-type.ts +69 -0
- package/src/identifier-validator.ts +235 -0
- package/src/index.ts +16 -1
- package/src/locale/en/locale-strings.ts +3 -3
- package/src/locale/fr/locale-strings.ts +3 -3
- package/src/non-gtin-numeric-identifier-creator.ts +33 -0
- package/src/non-gtin-numeric-identifier-validator.ts +54 -0
- package/src/non-numeric-identifier-creator.ts +111 -0
- package/src/non-numeric-identifier-validator.ts +128 -0
- package/src/numeric-identifier-creator.ts +200 -0
- package/src/numeric-identifier-validator.ts +128 -0
- package/src/prefix-manager.ts +446 -0
- package/src/prefix-provider.ts +31 -0
- package/src/prefix-type.ts +24 -0
- package/src/prefix-validator.ts +191 -0
- package/src/serializable-numeric-identifier-creator.ts +128 -0
- package/src/serializable-numeric-identifier-validator.ts +124 -0
- package/test/check.test.ts +0 -4
- package/test/creator.test.ts +30 -0
- package/test/gtin-creator.ts +239 -0
- package/test/gtin-validator.test.ts +149 -0
- package/test/identifier-creator.ts +84 -0
- package/test/identifier-validator.ts +8 -0
- package/test/non-gtin-numeric-identifier-creator.ts +98 -0
- package/test/non-gtin-numeric-identifier-validator.ts +6 -0
- package/test/non-numeric-identifier-validator.ts +24 -0
- package/test/numeric-identifier-creator.ts +132 -0
- package/test/numeric-identifier-validator.ts +23 -0
- package/test/prefix-manager.test.ts +112 -0
- package/test/serializable-numeric-identifier-creator.ts +56 -0
- package/test/serializable-numeric-identifier-validator.ts +24 -0
- package/test/setup.ts +4 -0
- package/test/sparse.test.ts +56 -0
- package/test/utility.ts +22 -0
- package/test/validator.test.ts +52 -0
- package/test/variable-measure-rcn.test.ts +201 -0
- package/vitest.config.ts +7 -0
- package/dist/idkey.d.ts +0 -1346
- package/dist/idkey.d.ts.map +0 -1
- package/dist/idkey.js +0 -2024
- package/dist/idkey.js.map +0 -1
- package/src/idkey.ts +0 -2532
- package/test/idkey.test.ts +0 -1247
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { CharacterSetCreator, Exclusions, NUMERIC_CREATOR } from "@aidc-toolkit/utility";
|
|
2
|
+
import { checkDigit, checkDigitSum } from "./check.js";
|
|
3
|
+
import { AbstractIdentifierCreator } from "./identifier-creator.js";
|
|
4
|
+
import { LeaderTypes } from "./numeric-identifier-validator.js";
|
|
5
|
+
/**
|
|
6
|
+
* Abstract numeric identifier creator. Implements common functionality for a numeric identifier
|
|
7
|
+
* creator.
|
|
8
|
+
*/
|
|
9
|
+
export class AbstractNumericIdentifierCreator extends AbstractIdentifierCreator {
|
|
10
|
+
/**
|
|
11
|
+
* Capacity.
|
|
12
|
+
*/
|
|
13
|
+
_capacity;
|
|
14
|
+
/**
|
|
15
|
+
* Tweak for sparse creation.
|
|
16
|
+
*/
|
|
17
|
+
_tweak = 0n;
|
|
18
|
+
/**
|
|
19
|
+
* Initialize the prefix provider. This method is in lieu of a constructor due to the mixin architecture.
|
|
20
|
+
*
|
|
21
|
+
* @param prefixProvider
|
|
22
|
+
* Prefix provider.
|
|
23
|
+
*
|
|
24
|
+
* @param prefix
|
|
25
|
+
* Prefix within prefix manager to use to calculate reference length.
|
|
26
|
+
*/
|
|
27
|
+
init(prefixProvider, prefix) {
|
|
28
|
+
super.init(prefixProvider, prefix, 1);
|
|
29
|
+
// Capacity is always in number range.
|
|
30
|
+
this._capacity = Number(CharacterSetCreator.powerOf10(this.referenceLength));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
get capacity() {
|
|
36
|
+
return this._capacity;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get the tweak for sparse creation.
|
|
40
|
+
*/
|
|
41
|
+
get tweak() {
|
|
42
|
+
return this._tweak;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Set the tweak for sparse creation.
|
|
46
|
+
*/
|
|
47
|
+
set tweak(value) {
|
|
48
|
+
this._tweak = value;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Build an identifier from a reference by merging it with the prefix and adding the check digit.
|
|
52
|
+
*
|
|
53
|
+
* @param reference
|
|
54
|
+
* Identifier reference.
|
|
55
|
+
*
|
|
56
|
+
* @returns
|
|
57
|
+
* Identifier.
|
|
58
|
+
*/
|
|
59
|
+
buildIdentifier(reference) {
|
|
60
|
+
const partialIdentifier = this.leaderType === LeaderTypes.ExtensionDigit ? reference.substring(0, 1) + this.prefix + reference.substring(1) : this.prefix + reference;
|
|
61
|
+
return partialIdentifier + checkDigit(partialIdentifier);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @inheritDoc
|
|
65
|
+
*/
|
|
66
|
+
create(valueOrValues, sparse = false) {
|
|
67
|
+
return NUMERIC_CREATOR.create(this.referenceLength, valueOrValues, Exclusions.None, sparse ? this.tweak : undefined, reference => this.buildIdentifier(reference));
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Create all identifiers from a partial identifier. Call is recursive until remaining reference
|
|
71
|
+
* length is 0.
|
|
72
|
+
*
|
|
73
|
+
* @param partialIdentifier
|
|
74
|
+
* Partial identifier. Initial value is `this.prefix`.
|
|
75
|
+
*
|
|
76
|
+
* @param remainingReferenceLength
|
|
77
|
+
* Remaining reference length. Initial value is `this.referenceLength`.
|
|
78
|
+
*
|
|
79
|
+
* @param extensionWeight
|
|
80
|
+
* If this value is not zero, the identifier has an extension digit, this call is setting it, and this value
|
|
81
|
+
* is applied to the calculation of the check digit.
|
|
82
|
+
*
|
|
83
|
+
* @param weight
|
|
84
|
+
* If the extension weight is zero, this value is applied to the calculation of the check digit.
|
|
85
|
+
*
|
|
86
|
+
* @param partialCheckDigitSum
|
|
87
|
+
* Partial check digit sum for the partial identifier.
|
|
88
|
+
*
|
|
89
|
+
* @yields
|
|
90
|
+
* Identifier.
|
|
91
|
+
*/
|
|
92
|
+
static *createAllPartial(partialIdentifier, remainingReferenceLength, extensionWeight, weight, partialCheckDigitSum) {
|
|
93
|
+
if (remainingReferenceLength === 0) {
|
|
94
|
+
// Finalize check digit calculation and append.
|
|
95
|
+
yield partialIdentifier + NUMERIC_CREATOR.character(9 - (partialCheckDigitSum + 9) % 10);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
const nextRemainingReferenceLength = remainingReferenceLength - 1;
|
|
99
|
+
let nextPartialCheckDigitSum = partialCheckDigitSum;
|
|
100
|
+
if (extensionWeight !== 0) {
|
|
101
|
+
// Apply every digit to the extension digit.
|
|
102
|
+
for (const c of NUMERIC_CREATOR.characterSet) {
|
|
103
|
+
yield* AbstractNumericIdentifierCreator.createAllPartial(c + partialIdentifier, nextRemainingReferenceLength, 0, weight, nextPartialCheckDigitSum);
|
|
104
|
+
nextPartialCheckDigitSum += extensionWeight;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
const nextWeight = 4 - weight;
|
|
109
|
+
// Apply every digit to the current character in the identifier.
|
|
110
|
+
for (const c of NUMERIC_CREATOR.characterSet) {
|
|
111
|
+
yield* AbstractNumericIdentifierCreator.createAllPartial(partialIdentifier + c, nextRemainingReferenceLength, 0, nextWeight, nextPartialCheckDigitSum);
|
|
112
|
+
nextPartialCheckDigitSum += weight;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @inheritDoc
|
|
119
|
+
*/
|
|
120
|
+
createAll() {
|
|
121
|
+
const hasExtensionDigit = this.leaderType === LeaderTypes.ExtensionDigit;
|
|
122
|
+
const prefix = this.prefix;
|
|
123
|
+
const length = this.length;
|
|
124
|
+
const referenceLength = this.referenceLength;
|
|
125
|
+
// Start weight is for reference excluding extension digit, which has its weight calculated separately.
|
|
126
|
+
const startWeight = 3 - 2 * ((referenceLength + 1 - Number(hasExtensionDigit)) % 2);
|
|
127
|
+
// Returning separate Iterable object makes iteration repeatable.
|
|
128
|
+
return {
|
|
129
|
+
[Symbol.iterator]() {
|
|
130
|
+
return AbstractNumericIdentifierCreator.createAllPartial(prefix, referenceLength, hasExtensionDigit ? 3 - 2 * length % 2 : 0, startWeight, checkDigitSum(startWeight === 3, prefix));
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=numeric-identifier-creator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numeric-identifier-creator.js","sourceRoot":"","sources":["../src/numeric-identifier-creator.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EACnB,UAAU,EACV,eAAe,EAGlB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAA0B,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAmB,WAAW,EAAmC,MAAM,mCAAmC,CAAC;AA2ClH;;;GAGG;AACH,MAAM,OAAgB,gCAAiC,SAAQ,yBAAyB;IACpF;;OAEG;IACK,SAAS,CAAU;IAE3B;;OAEG;IACK,MAAM,GAAG,EAAE,CAAC;IAEpB;;;;;;;;OAQG;IACgB,IAAI,CAAC,cAA8B,EAAE,MAAc;QAClE,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QAEtC,sCAAsC;QACtC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IACjF,CAAC;IAID;;OAEG;IACH,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;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,gCAAgC,CAAC,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,aAAa,CAAC,WAAW,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;YACzL,CAAC;SACJ,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { IdentifierType, IdentifierTypes } from "./identifier-type.js";
|
|
2
|
+
import { AbstractIdentifierValidator, type IdentifierValidation, type IdentifierValidator } from "./identifier-validator.js";
|
|
3
|
+
import type { PrefixType } from "./prefix-type.js";
|
|
4
|
+
/**
|
|
5
|
+
* Numeric identifier type.
|
|
6
|
+
*/
|
|
7
|
+
export type NumericIdentifierType = typeof IdentifierTypes.GTIN | typeof IdentifierTypes.GLN | typeof IdentifierTypes.SSCC | typeof IdentifierTypes.GRAI | typeof IdentifierTypes.GSRN | typeof IdentifierTypes.GDTI | typeof IdentifierTypes.GSIN | typeof IdentifierTypes.GCN;
|
|
8
|
+
/**
|
|
9
|
+
* Leader type.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LeaderTypes: {
|
|
12
|
+
/**
|
|
13
|
+
* No leader.
|
|
14
|
+
*/
|
|
15
|
+
None: string;
|
|
16
|
+
/**
|
|
17
|
+
* Indicator digit (GTIN only).
|
|
18
|
+
*/
|
|
19
|
+
IndicatorDigit: string;
|
|
20
|
+
/**
|
|
21
|
+
* Extension digit (SSCC only).
|
|
22
|
+
*/
|
|
23
|
+
ExtensionDigit: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Leader type.
|
|
27
|
+
*/
|
|
28
|
+
export type LeaderType = typeof LeaderTypes[keyof typeof LeaderTypes];
|
|
29
|
+
/**
|
|
30
|
+
* Numeric identifier validator. Validates a numeric identifier.
|
|
31
|
+
*/
|
|
32
|
+
export interface NumericIdentifierValidator extends IdentifierValidator {
|
|
33
|
+
/**
|
|
34
|
+
* Get the leader type.
|
|
35
|
+
*/
|
|
36
|
+
get leaderType(): LeaderType;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Abstract numeric identifier validator. Implements common functionality for a numeric identifier
|
|
40
|
+
* validator.
|
|
41
|
+
*/
|
|
42
|
+
export declare abstract class AbstractNumericIdentifierValidator extends AbstractIdentifierValidator implements NumericIdentifierValidator {
|
|
43
|
+
/**
|
|
44
|
+
* Leader type.
|
|
45
|
+
*/
|
|
46
|
+
private readonly _leaderType;
|
|
47
|
+
/**
|
|
48
|
+
* Prefix position, determined by the leader type.
|
|
49
|
+
*/
|
|
50
|
+
private readonly _prefixPosition;
|
|
51
|
+
/**
|
|
52
|
+
* Constructor.
|
|
53
|
+
*
|
|
54
|
+
* @param identifierType
|
|
55
|
+
* Identifier type.
|
|
56
|
+
*
|
|
57
|
+
* @param prefixType
|
|
58
|
+
* Prefix type.
|
|
59
|
+
*
|
|
60
|
+
* @param length
|
|
61
|
+
* Length.
|
|
62
|
+
*
|
|
63
|
+
* @param leaderType
|
|
64
|
+
* Leader type.
|
|
65
|
+
*/
|
|
66
|
+
protected constructor(identifierType: IdentifierType, prefixType: PrefixType, length: number, leaderType: LeaderType);
|
|
67
|
+
/**
|
|
68
|
+
* @inheritDoc
|
|
69
|
+
*/
|
|
70
|
+
get leaderType(): LeaderType;
|
|
71
|
+
/**
|
|
72
|
+
* @inheritDoc
|
|
73
|
+
*/
|
|
74
|
+
validate(identifier: string, validation?: IdentifierValidation): void;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=numeric-identifier-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numeric-identifier-validator.d.ts","sourceRoot":"","sources":["../src/numeric-identifier-validator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5E,O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
1
|
+
import { hasValidCheckDigit } from "./check.js";
|
|
2
|
+
import { AbstractIdentifierValidator, ContentCharacterSets } from "./identifier-validator.js";
|
|
3
|
+
import { i18nextGS1 } from "./locale/i18n.js";
|
|
4
|
+
/**
|
|
5
|
+
* Leader type.
|
|
6
|
+
*/
|
|
7
|
+
export const LeaderTypes = {
|
|
8
|
+
/**
|
|
9
|
+
* No leader.
|
|
10
|
+
*/
|
|
11
|
+
None: "None",
|
|
12
|
+
/**
|
|
13
|
+
* Indicator digit (GTIN only).
|
|
14
|
+
*/
|
|
15
|
+
IndicatorDigit: "Indicator digit",
|
|
16
|
+
/**
|
|
17
|
+
* Extension digit (SSCC only).
|
|
18
|
+
*/
|
|
19
|
+
ExtensionDigit: "Extension digit"
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Abstract numeric identifier validator. Implements common functionality for a numeric identifier
|
|
23
|
+
* validator.
|
|
24
|
+
*/
|
|
25
|
+
export class AbstractNumericIdentifierValidator extends AbstractIdentifierValidator {
|
|
26
|
+
/**
|
|
27
|
+
* Leader type.
|
|
28
|
+
*/
|
|
29
|
+
_leaderType;
|
|
30
|
+
/**
|
|
31
|
+
* Prefix position, determined by the leader type.
|
|
32
|
+
*/
|
|
33
|
+
_prefixPosition;
|
|
34
|
+
/**
|
|
35
|
+
* Constructor.
|
|
36
|
+
*
|
|
37
|
+
* @param identifierType
|
|
38
|
+
* Identifier type.
|
|
39
|
+
*
|
|
40
|
+
* @param prefixType
|
|
41
|
+
* Prefix type.
|
|
42
|
+
*
|
|
43
|
+
* @param length
|
|
44
|
+
* Length.
|
|
45
|
+
*
|
|
46
|
+
* @param leaderType
|
|
47
|
+
* Leader type.
|
|
48
|
+
*/
|
|
49
|
+
constructor(identifierType, prefixType, length, leaderType) {
|
|
50
|
+
super(identifierType, prefixType, length, ContentCharacterSets.Numeric);
|
|
51
|
+
this._leaderType = leaderType;
|
|
52
|
+
this._prefixPosition = Number(this.leaderType === LeaderTypes.ExtensionDigit);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @inheritDoc
|
|
56
|
+
*/
|
|
57
|
+
get leaderType() {
|
|
58
|
+
return this._leaderType;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @inheritDoc
|
|
62
|
+
*/
|
|
63
|
+
validate(identifier, validation) {
|
|
64
|
+
// Validate the prefix, with care taken for its position within the identifier.
|
|
65
|
+
if (this._prefixPosition === 0) {
|
|
66
|
+
super.validatePrefix(identifier, validation?.positionOffset);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
super.validatePrefix(identifier.substring(this._prefixPosition), validation?.positionOffset === undefined ? this._prefixPosition : validation.positionOffset + this._prefixPosition);
|
|
70
|
+
}
|
|
71
|
+
// Validate the length.
|
|
72
|
+
if (identifier.length !== this.length) {
|
|
73
|
+
throw new RangeError(i18nextGS1.t("Identifier.identifierTypeLength", {
|
|
74
|
+
identifierType: this.identifierType,
|
|
75
|
+
length: this.length
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
// Validating the check digit will also validate the characters.
|
|
79
|
+
if (!hasValidCheckDigit(this.padIdentifier(identifier, validation))) {
|
|
80
|
+
throw new RangeError(i18nextGS1.t("Identifier.invalidCheckDigit"));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=numeric-identifier-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numeric-identifier-validator.js","sourceRoot":"","sources":["../src/numeric-identifier-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EACH,2BAA2B,EAC3B,oBAAoB,EAGvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAgB9C;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB;;OAEG;IACH,IAAI,EAA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Ac,EAAE,IAAI,CAAC,cAAc;gBACnC,MAAM,EAAE,IAAI,CAAC,MAAM;aACtB,CAAC,CAAC,CAAC;QACR,CAAC;QAED,gEAAgE;QAChE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC;YAClE,MAAM,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC;QACvE,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { GTINCreator } from "./gtin-creator.js";
|
|
2
|
+
import { NonGTINNumericIdentifierCreator } from "./non-gtin-numeric-identifier-creator.js";
|
|
3
|
+
import { NonNumericIdentifierCreator } from "./non-numeric-identifier-creator.js";
|
|
4
|
+
import type { PrefixProvider } from "./prefix-provider.js";
|
|
5
|
+
import { type PrefixType } from "./prefix-type.js";
|
|
6
|
+
import { SerializableNumericIdentifierCreator } from "./serializable-numeric-identifier-creator.js";
|
|
7
|
+
/**
|
|
8
|
+
* Prefix manager. This is the core class for identifier creation.
|
|
9
|
+
*
|
|
10
|
+
* A prefix manager may be created for any {@link PrefixType | prefix type}. As most applications work with a limited
|
|
11
|
+
* number of prefixes for creating identifiers, prefix managers are cached in memory and may be reused.
|
|
12
|
+
*
|
|
13
|
+
* Prefix managers are keyed by GS1 Company Prefix, so the prefix type that is requested may not match the prefix type
|
|
14
|
+
* of the returned prefix manager. For example, the prefix manager for GS1 Company Prefix 0614141 is identical to the
|
|
15
|
+
* one for U.P.C. Company Prefix 614141, with the prefix type equal to {@link PrefixTypes.UPCCompanyPrefix} and the
|
|
16
|
+
* prefix equal to "614141".
|
|
17
|
+
*
|
|
18
|
+
* To support the creation of sparse identifiers, a prefix manager maintains a {@link tweakFactor | tweak
|
|
19
|
+
* factor} which is used, along with a type-specific multiplier, as the tweak when creating numeric identifiers.
|
|
20
|
+
* The default tweak factor is the numeric value of the GS1 Company Prefix representation of the prefix preceded by '1'
|
|
21
|
+
* to ensure uniqueness (i.e., so that prefixes 0 N1 N2 N3... and N1 N2 N3... produce different tweak factors). This is
|
|
22
|
+
* usually sufficient for obfuscation, but as the sparse creation algorithm is reversible and as the GS1 Company Prefix
|
|
23
|
+
* is discoverable via {@link https://www.gs1.org/services/verified-by-gs1 | Verified by GS1}, a user-defined tweak
|
|
24
|
+
* factor should be used if a higher degree of obfuscation is required. When using a tweak factor other than the
|
|
25
|
+
* default, care should be taken to restore it when resuming the application. A tweak factor of 0 creates a straight
|
|
26
|
+
* sequence.
|
|
27
|
+
*/
|
|
28
|
+
export declare class PrefixManager implements PrefixProvider {
|
|
29
|
+
/**
|
|
30
|
+
* Cached prefix managers, keyed by GS1 Company Prefix.
|
|
31
|
+
*/
|
|
32
|
+
private static readonly PREFIX_MANAGERS_MAP;
|
|
33
|
+
/**
|
|
34
|
+
* Creator tweak factors. Different numeric identifier types have different tweak factors so that sparse
|
|
35
|
+
* creation generates different sequences for each.
|
|
36
|
+
*/
|
|
37
|
+
private static readonly CREATOR_TWEAK_FACTORS_MAP;
|
|
38
|
+
/**
|
|
39
|
+
* Normalized prefix type.
|
|
40
|
+
*/
|
|
41
|
+
private readonly _prefixType;
|
|
42
|
+
/**
|
|
43
|
+
* Normalized prefix.
|
|
44
|
+
*/
|
|
45
|
+
private readonly _prefix;
|
|
46
|
+
/**
|
|
47
|
+
* Prefix as GS1 Company Prefix.
|
|
48
|
+
*/
|
|
49
|
+
private readonly _gs1CompanyPrefix;
|
|
50
|
+
/**
|
|
51
|
+
* U.P.C. Company Prefix if prefix type is {@link PrefixTypes.UPCCompanyPrefix}.
|
|
52
|
+
*/
|
|
53
|
+
private readonly _upcCompanyPrefix;
|
|
54
|
+
/**
|
|
55
|
+
* GS1-8 Prefix if prefix type is {@link PrefixTypes.GS18Prefix}.
|
|
56
|
+
*/
|
|
57
|
+
private readonly _gs18Prefix;
|
|
58
|
+
/**
|
|
59
|
+
* Default tweak factor.
|
|
60
|
+
*/
|
|
61
|
+
private readonly _defaultTweakFactor;
|
|
62
|
+
/**
|
|
63
|
+
* Tweak factor.
|
|
64
|
+
*/
|
|
65
|
+
private _tweakFactor;
|
|
66
|
+
/**
|
|
67
|
+
* Cached identifier creators.
|
|
68
|
+
*/
|
|
69
|
+
private readonly _identifierCreatorsMap;
|
|
70
|
+
/**
|
|
71
|
+
* Constructor.
|
|
72
|
+
*
|
|
73
|
+
* @param gs1CompanyPrefix
|
|
74
|
+
* GS1 Company Prefix.
|
|
75
|
+
*/
|
|
76
|
+
private constructor();
|
|
77
|
+
/**
|
|
78
|
+
* Get the prefix type.
|
|
79
|
+
*/
|
|
80
|
+
get prefixType(): PrefixType;
|
|
81
|
+
/**
|
|
82
|
+
* Get the prefix.
|
|
83
|
+
*/
|
|
84
|
+
get prefix(): string;
|
|
85
|
+
/**
|
|
86
|
+
* Get the GS1 Company Prefix.
|
|
87
|
+
*/
|
|
88
|
+
get gs1CompanyPrefix(): string;
|
|
89
|
+
/**
|
|
90
|
+
* Get the U.P.C. Company Prefix if prefix type is {@link PrefixTypes.UPCCompanyPrefix} or undefined if not.
|
|
91
|
+
*/
|
|
92
|
+
get upcCompanyPrefix(): string | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Get the GS1-8 Prefix if prefix type is {@link PrefixTypes.GS18Prefix} or undefined if not.
|
|
95
|
+
*/
|
|
96
|
+
get gs18Prefix(): string | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Set the tweak for an identifier creator if it's a numeric identifier creator.
|
|
99
|
+
*
|
|
100
|
+
* @param creator
|
|
101
|
+
* Identifier creator.
|
|
102
|
+
*/
|
|
103
|
+
private setCreatorTweak;
|
|
104
|
+
/**
|
|
105
|
+
* Get the tweak factor.
|
|
106
|
+
*/
|
|
107
|
+
get tweakFactor(): bigint;
|
|
108
|
+
/**
|
|
109
|
+
* Set the tweak factor.
|
|
110
|
+
*
|
|
111
|
+
* @param value
|
|
112
|
+
* Tweak factor.
|
|
113
|
+
*/
|
|
114
|
+
set tweakFactor(value: number | bigint);
|
|
115
|
+
/**
|
|
116
|
+
* Reset the tweak factor to its default (numeric value of the GS1 Company Prefix preceded by '1').
|
|
117
|
+
*/
|
|
118
|
+
resetTweakFactor(): void;
|
|
119
|
+
/**
|
|
120
|
+
* Get a prefix manager.
|
|
121
|
+
*
|
|
122
|
+
* @param prefixType
|
|
123
|
+
* Prefix type.
|
|
124
|
+
*
|
|
125
|
+
* @param prefix
|
|
126
|
+
* Prefix.
|
|
127
|
+
*
|
|
128
|
+
* @returns
|
|
129
|
+
* Prefix manager with normalized prefix type and prefix.
|
|
130
|
+
*/
|
|
131
|
+
static get(prefixType: PrefixType, prefix: string): PrefixManager;
|
|
132
|
+
/**
|
|
133
|
+
* Get an identifier creator.
|
|
134
|
+
*
|
|
135
|
+
* @param identifierType
|
|
136
|
+
* Identifier type.
|
|
137
|
+
*
|
|
138
|
+
* @param constructorCallback
|
|
139
|
+
* Constructor callback.
|
|
140
|
+
*
|
|
141
|
+
* @returns
|
|
142
|
+
* Identifier creator.
|
|
143
|
+
*/
|
|
144
|
+
private getIdentifierCreator;
|
|
145
|
+
/**
|
|
146
|
+
* Get non-GTIN numeric identifier creator.
|
|
147
|
+
*
|
|
148
|
+
* @param validator
|
|
149
|
+
* Validator on which identifier creator is based.
|
|
150
|
+
*
|
|
151
|
+
* @returns
|
|
152
|
+
* Identifier creator.
|
|
153
|
+
*/
|
|
154
|
+
private getNonGTINNumericIdentifierCreator;
|
|
155
|
+
/**
|
|
156
|
+
* Get serialized numeric identifier creator.
|
|
157
|
+
*
|
|
158
|
+
* @param validator
|
|
159
|
+
* Validator on which identifier creator is based.
|
|
160
|
+
*
|
|
161
|
+
* @returns
|
|
162
|
+
* Identifier creator.
|
|
163
|
+
*/
|
|
164
|
+
private getSerializableNumericIdentifierCreator;
|
|
165
|
+
/**
|
|
166
|
+
* Get non-numeric identifier creator.
|
|
167
|
+
*
|
|
168
|
+
* @param validator
|
|
169
|
+
* Validator on which identifier creator is based.
|
|
170
|
+
*
|
|
171
|
+
* @returns
|
|
172
|
+
* Identifier creator.
|
|
173
|
+
*/
|
|
174
|
+
private getNonNumericIdentifierCreator;
|
|
175
|
+
/**
|
|
176
|
+
* Get GTIN creator.
|
|
177
|
+
*/
|
|
178
|
+
get gtinCreator(): GTINCreator;
|
|
179
|
+
/**
|
|
180
|
+
* Get GLN creator.
|
|
181
|
+
*/
|
|
182
|
+
get glnCreator(): NonGTINNumericIdentifierCreator;
|
|
183
|
+
/**
|
|
184
|
+
* Get SSCC creator.
|
|
185
|
+
*/
|
|
186
|
+
get ssccCreator(): NonGTINNumericIdentifierCreator;
|
|
187
|
+
/**
|
|
188
|
+
* Get GRAI creator.
|
|
189
|
+
*/
|
|
190
|
+
get graiCreator(): SerializableNumericIdentifierCreator;
|
|
191
|
+
/**
|
|
192
|
+
* Get GIAI creator.
|
|
193
|
+
*/
|
|
194
|
+
get giaiCreator(): NonNumericIdentifierCreator;
|
|
195
|
+
/**
|
|
196
|
+
* Get GSRN creator.
|
|
197
|
+
*/
|
|
198
|
+
get gsrnCreator(): NonGTINNumericIdentifierCreator;
|
|
199
|
+
/**
|
|
200
|
+
* Get GDTI creator.
|
|
201
|
+
*/
|
|
202
|
+
get gdtiCreator(): SerializableNumericIdentifierCreator;
|
|
203
|
+
/**
|
|
204
|
+
* Get GINC creator.
|
|
205
|
+
*/
|
|
206
|
+
get gincCreator(): NonNumericIdentifierCreator;
|
|
207
|
+
/**
|
|
208
|
+
* Get GSIN creator.
|
|
209
|
+
*/
|
|
210
|
+
get gsinCreator(): NonGTINNumericIdentifierCreator;
|
|
211
|
+
/**
|
|
212
|
+
* Get GCN creator.
|
|
213
|
+
*/
|
|
214
|
+
get gcnCreator(): SerializableNumericIdentifierCreator;
|
|
215
|
+
/**
|
|
216
|
+
* Get CPID creator.
|
|
217
|
+
*/
|
|
218
|
+
get cpidCreator(): NonNumericIdentifierCreator;
|
|
219
|
+
/**
|
|
220
|
+
* Get GMN creator.
|
|
221
|
+
*/
|
|
222
|
+
get gmnCreator(): NonNumericIdentifierCreator;
|
|
223
|
+
}
|
|
224
|
+
//# sourceMappingURL=prefix-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefix-manager.d.ts","sourceRoot":"","sources":["../src/prefix-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKhD,OAAO,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAC;AAQ3F,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AASlF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,KAAK,UAAU,EAAe,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,oCAAoC,EAAE,MAAM,8CAA8C,CAAC;AAQpG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,aAAc,YAAW,cAAc;IAChD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAoC;IAE/E;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAS9C;IAEH;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IAEzC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IAEjC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAE3C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAqB;IAEvD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IAEjD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAS;IAE7C;;OAEG;IACH,OAAO,CAAC,YAAY,CAAM;IAE1B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAgD;IAEvF;;;;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