@aidc-toolkit/gs1 0.9.7-beta → 0.9.9-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/LICENSE +0 -27
- package/README.md +14 -0
- package/dist/index.cjs +143 -131
- package/dist/index.d.cts +145 -6
- package/dist/index.d.ts +145 -6
- package/dist/index.js +104 -105
- package/package.json +9 -8
- package/src/check.ts +24 -9
- package/src/idkey.ts +53 -99
- package/src/index.ts +18 -2
- package/src/locale/en/{locale_strings.ts → locale-strings.ts} +2 -0
- package/src/locale/fr/{locale_strings.ts → locale-strings.ts} +2 -0
- package/src/locale/i18n.ts +40 -6
- package/src/locale/i18next.d.ts +5 -3
- package/test/check.test.ts +9 -8
- package/test/idkey.test.ts +17 -16
- /package/src/{character_set.ts → character-set.ts} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,145 @@
|
|
|
1
|
+
import { I18NEnvironment } from '@aidc-toolkit/core';
|
|
2
|
+
import { i18n } from 'i18next';
|
|
1
3
|
import { CharacterSetCreator, StringValidation, StringValidator, CharacterSetValidation, Exclusion, TransformerInput, TransformerOutput } from '@aidc-toolkit/utility';
|
|
2
4
|
import * as ts_mixer_dist_types_types_js from 'ts-mixer/dist/types/types.js';
|
|
3
5
|
|
|
6
|
+
declare const localeStrings: {
|
|
7
|
+
readonly Check: {
|
|
8
|
+
readonly lengthOfStringForPriceOrWeightMustBeExactly: "Length {{length}} of string for price or weight sum must be exactly {{exactLength}}";
|
|
9
|
+
readonly priceOrWeightComponent: "price or weight";
|
|
10
|
+
readonly lengthOfStringForCheckCharacterPairMustBeLessThanOrEqualTo: "Length {{length}} of string for check character pair must be less than or equal to {{maximumLength}}";
|
|
11
|
+
};
|
|
12
|
+
readonly IdentificationKey: {
|
|
13
|
+
readonly identificationKeyTypeLength: "{{identificationKeyType}} must be {{length}} digits long";
|
|
14
|
+
readonly invalidCheckDigit: "Invalid check digit";
|
|
15
|
+
readonly invalidGTINLength: "GTIN must be 13, 12, 8, or 14 digits long";
|
|
16
|
+
readonly invalidGTIN14Length: "GTIN must be 14 digits long";
|
|
17
|
+
readonly invalidZeroSuppressedGTIN12: "Invalid zero-suppressed GTIN-12";
|
|
18
|
+
readonly invalidZeroSuppressibleGTIN12: "GTIN-12 not zero-suppressible";
|
|
19
|
+
readonly invalidZeroSuppressedGTIN12AsGTIN13: "Invalid zero-suppressed GTIN-12 as GTIN-13";
|
|
20
|
+
readonly invalidZeroSuppressedGTIN12AsGTIN14: "Invalid zero-suppressed GTIN-12 as GTIN-14";
|
|
21
|
+
readonly invalidGTIN13AtRetail: "GTIN-13 at retail consumer trade item level can't start with zero";
|
|
22
|
+
readonly invalidGTINAtRetail: "GTIN not supported at retail consumer trade item level";
|
|
23
|
+
readonly invalidGTINAtOtherThanRetail: "GTIN not supported at other than retail consumer trade item level";
|
|
24
|
+
readonly indicatorDigit: "indicator digit";
|
|
25
|
+
readonly serialComponent: "serial component";
|
|
26
|
+
readonly reference: "reference";
|
|
27
|
+
readonly referenceCantBeAllNumeric: "Reference can't be all-numeric";
|
|
28
|
+
readonly invalidCheckCharacterPair: "Invalid check character pair";
|
|
29
|
+
};
|
|
30
|
+
readonly Prefix: {
|
|
31
|
+
readonly gs1CompanyPrefix: "GS1 Company Prefix";
|
|
32
|
+
readonly upcCompanyPrefix: "U.P.C. Company Prefix";
|
|
33
|
+
readonly gs18Prefix: "GS1-8 Prefix";
|
|
34
|
+
readonly gs1CompanyPrefixCantStartWith0: "GS1 Company Prefix can't start with \"0\"";
|
|
35
|
+
readonly gs1CompanyPrefixCantStartWith00000: "GS1 Company Prefix can't start with \"00000\"";
|
|
36
|
+
readonly gs1CompanyPrefixCantStartWith000000: "GS1 Company Prefix can't start with \"000000\"";
|
|
37
|
+
readonly upcCompanyPrefixCantStartWith0000: "U.P.C. Company Prefix can't start with \"0000\"";
|
|
38
|
+
readonly gs18PrefixCantStartWith0: "GS1-8 Prefix can't start with \"0\"";
|
|
39
|
+
readonly identificationKeyTypeNotSupportedByGS18Prefix: "{{identificationKeyType}} not supported by GS1-8 Prefix";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
4
43
|
declare const gs1NS = "aidct_gs1";
|
|
44
|
+
/**
|
|
45
|
+
* Locale strings type is extracted from the English locale strings object.
|
|
46
|
+
*/
|
|
47
|
+
type GS1LocaleStrings = typeof localeStrings;
|
|
48
|
+
/**
|
|
49
|
+
* GS1 resources.
|
|
50
|
+
*/
|
|
51
|
+
declare const gs1Resources: {
|
|
52
|
+
en: {
|
|
53
|
+
aidct_gs1: {
|
|
54
|
+
readonly Check: {
|
|
55
|
+
readonly lengthOfStringForPriceOrWeightMustBeExactly: "Length {{length}} of string for price or weight sum must be exactly {{exactLength}}";
|
|
56
|
+
readonly priceOrWeightComponent: "price or weight";
|
|
57
|
+
readonly lengthOfStringForCheckCharacterPairMustBeLessThanOrEqualTo: "Length {{length}} of string for check character pair must be less than or equal to {{maximumLength}}";
|
|
58
|
+
};
|
|
59
|
+
readonly IdentificationKey: {
|
|
60
|
+
readonly identificationKeyTypeLength: "{{identificationKeyType}} must be {{length}} digits long";
|
|
61
|
+
readonly invalidCheckDigit: "Invalid check digit";
|
|
62
|
+
readonly invalidGTINLength: "GTIN must be 13, 12, 8, or 14 digits long";
|
|
63
|
+
readonly invalidGTIN14Length: "GTIN must be 14 digits long";
|
|
64
|
+
readonly invalidZeroSuppressedGTIN12: "Invalid zero-suppressed GTIN-12";
|
|
65
|
+
readonly invalidZeroSuppressibleGTIN12: "GTIN-12 not zero-suppressible";
|
|
66
|
+
readonly invalidZeroSuppressedGTIN12AsGTIN13: "Invalid zero-suppressed GTIN-12 as GTIN-13";
|
|
67
|
+
readonly invalidZeroSuppressedGTIN12AsGTIN14: "Invalid zero-suppressed GTIN-12 as GTIN-14";
|
|
68
|
+
readonly invalidGTIN13AtRetail: "GTIN-13 at retail consumer trade item level can't start with zero";
|
|
69
|
+
readonly invalidGTINAtRetail: "GTIN not supported at retail consumer trade item level";
|
|
70
|
+
readonly invalidGTINAtOtherThanRetail: "GTIN not supported at other than retail consumer trade item level";
|
|
71
|
+
readonly indicatorDigit: "indicator digit";
|
|
72
|
+
readonly serialComponent: "serial component";
|
|
73
|
+
readonly reference: "reference";
|
|
74
|
+
readonly referenceCantBeAllNumeric: "Reference can't be all-numeric";
|
|
75
|
+
readonly invalidCheckCharacterPair: "Invalid check character pair";
|
|
76
|
+
};
|
|
77
|
+
readonly Prefix: {
|
|
78
|
+
readonly gs1CompanyPrefix: "GS1 Company Prefix";
|
|
79
|
+
readonly upcCompanyPrefix: "U.P.C. Company Prefix";
|
|
80
|
+
readonly gs18Prefix: "GS1-8 Prefix";
|
|
81
|
+
readonly gs1CompanyPrefixCantStartWith0: "GS1 Company Prefix can't start with \"0\"";
|
|
82
|
+
readonly gs1CompanyPrefixCantStartWith00000: "GS1 Company Prefix can't start with \"00000\"";
|
|
83
|
+
readonly gs1CompanyPrefixCantStartWith000000: "GS1 Company Prefix can't start with \"000000\"";
|
|
84
|
+
readonly upcCompanyPrefixCantStartWith0000: "U.P.C. Company Prefix can't start with \"0000\"";
|
|
85
|
+
readonly gs18PrefixCantStartWith0: "GS1-8 Prefix can't start with \"0\"";
|
|
86
|
+
readonly identificationKeyTypeNotSupportedByGS18Prefix: "{{identificationKeyType}} not supported by GS1-8 Prefix";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
fr: {
|
|
91
|
+
aidct_gs1: {
|
|
92
|
+
readonly Check: {
|
|
93
|
+
readonly lengthOfStringForPriceOrWeightMustBeExactly: "La longueur {{longueur}} de la chaîne pour le prix ou la somme du poids doit être exactement {{exactLength}}";
|
|
94
|
+
readonly priceOrWeightComponent: "prix ou poids";
|
|
95
|
+
readonly lengthOfStringForCheckCharacterPairMustBeLessThanOrEqualTo: "La longueur {{length}} de la chaîne pour la paire de caractères de vérification doit être inférieure ou égale à {{maximum Length}}";
|
|
96
|
+
};
|
|
97
|
+
readonly IdentificationKey: {
|
|
98
|
+
readonly identificationKeyTypeLength: "{{identificationKeyType}} doit comporter {{length}} chiffres";
|
|
99
|
+
readonly invalidCheckDigit: "Chiffre de contrôle non valide";
|
|
100
|
+
readonly invalidGTINLength: "Le GTIN doit comporter 13, 12, 8 ou 14 chiffres";
|
|
101
|
+
readonly invalidGTIN14Length: "Le GTIN doit comporter 14 chiffres";
|
|
102
|
+
readonly invalidZeroSuppressedGTIN12: "Code GTIN-12 non valide avec zéro supprimé";
|
|
103
|
+
readonly invalidZeroSuppressibleGTIN12: "Le GTIN-12 ne peut pas être supprimé par zéro";
|
|
104
|
+
readonly invalidZeroSuppressedGTIN12AsGTIN13: "GTIN-12 non valide avec zéro supprimé en tant que GTIN-13";
|
|
105
|
+
readonly invalidZeroSuppressedGTIN12AsGTIN14: "GTIN-12 non valide avec zéro supprimé en tant que GTIN-14";
|
|
106
|
+
readonly invalidGTIN13AtRetail: "Le GTIN-13 au niveau des articles de consommation au détail ne peut pas commencer par zéro";
|
|
107
|
+
readonly invalidGTINAtRetail: "Le GTIN n'est pas pris en charge au niveau des articles de consommation au détail";
|
|
108
|
+
readonly invalidGTINAtOtherThanRetail: "Le GTIN n'est pas pris en charge à d'autres niveaux que ceux des articles de consommation au détail";
|
|
109
|
+
readonly indicatorDigit: "chiffre indicateur";
|
|
110
|
+
readonly serialComponent: "composant série";
|
|
111
|
+
readonly reference: "référence";
|
|
112
|
+
readonly referenceCantBeAllNumeric: "La référence ne peut pas être entièrement numérique";
|
|
113
|
+
readonly invalidCheckCharacterPair: "Paire de caractères de contrôle non valide";
|
|
114
|
+
};
|
|
115
|
+
readonly Prefix: {
|
|
116
|
+
readonly gs1CompanyPrefix: "Préfixe de l'entreprise GS1";
|
|
117
|
+
readonly upcCompanyPrefix: "Préfixe de l'entreprise U.P.C.";
|
|
118
|
+
readonly gs18Prefix: "Préfixe GS1-8";
|
|
119
|
+
readonly gs1CompanyPrefixCantStartWith0: "Le préfixe de l'entreprise GS1 ne peut pas commencer par \"0\"";
|
|
120
|
+
readonly gs1CompanyPrefixCantStartWith00000: "Le préfixe de l'entreprise GS1 ne peut pas commencer par \"00000\"";
|
|
121
|
+
readonly gs1CompanyPrefixCantStartWith000000: "Le préfixe de l'entreprise GS1 ne peut pas commencer par \"000000\"";
|
|
122
|
+
readonly upcCompanyPrefixCantStartWith0000: "Le préfixe de l'entreprise U.P.C. ne peut pas commencer par \"0000\"";
|
|
123
|
+
readonly gs18PrefixCantStartWith0: "Le préfixe GS1-8 ne peut pas commencer par \"0\"";
|
|
124
|
+
readonly identificationKeyTypeNotSupportedByGS18Prefix: "{{identificationKeyType}} non pris en charge par le préfixe GS1-8";
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
declare const i18nextGS1: i18n;
|
|
130
|
+
/**
|
|
131
|
+
* Initialize internationalization.
|
|
132
|
+
*
|
|
133
|
+
* @param environment
|
|
134
|
+
* Environment in which the application is running.
|
|
135
|
+
*
|
|
136
|
+
* @param debug
|
|
137
|
+
* Debug setting.
|
|
138
|
+
*
|
|
139
|
+
* @returns
|
|
140
|
+
* Void promise.
|
|
141
|
+
*/
|
|
142
|
+
declare function i18nGS1Init(environment: I18NEnvironment, debug?: boolean): Promise<void>;
|
|
5
143
|
|
|
6
144
|
/**
|
|
7
145
|
* GS1 AI encodable character set 82 creator as defined in section 7.11 of the {@link https://www.gs1.org/genspecs | GS1
|
|
@@ -761,13 +899,14 @@ interface NumericIdentificationKeyCreator extends NumericIdentificationKeyValida
|
|
|
761
899
|
/**
|
|
762
900
|
* Create all identification keys for the prefix from `0` to `capacity - 1`.
|
|
763
901
|
*
|
|
764
|
-
* The implementation creates the strings as needed using an internal generator function
|
|
765
|
-
*
|
|
902
|
+
* The implementation creates the strings only as needed using an internal generator function. Although the result
|
|
903
|
+
* is equivalent to calling `creator.create(new Sequence(0, creator.capacity))`, this method is significantly
|
|
904
|
+
* faster.
|
|
766
905
|
*
|
|
767
906
|
* @returns
|
|
768
|
-
*
|
|
907
|
+
* All identification keys for the prefix.
|
|
769
908
|
*/
|
|
770
|
-
createAll: () =>
|
|
909
|
+
createAll: () => Iterable<string>;
|
|
771
910
|
}
|
|
772
911
|
/**
|
|
773
912
|
* Abstract numeric identification key creator. Implements common functionality for a numeric identification key creator.
|
|
@@ -845,7 +984,7 @@ declare abstract class AbstractNumericIdentificationKeyCreator extends AbstractI
|
|
|
845
984
|
/**
|
|
846
985
|
* @inheritDoc
|
|
847
986
|
*/
|
|
848
|
-
createAll():
|
|
987
|
+
createAll(): Iterable<string>;
|
|
849
988
|
}
|
|
850
989
|
declare const GTINCreator_base: ts_mixer_dist_types_types_js.Class<any[], GTINValidator & AbstractNumericIdentificationKeyCreator, typeof GTINValidator & typeof AbstractNumericIdentificationKeyCreator>;
|
|
851
990
|
/**
|
|
@@ -1348,4 +1487,4 @@ declare class PrefixManager {
|
|
|
1348
1487
|
get gmnCreator(): NonNumericIdentificationKeyCreator;
|
|
1349
1488
|
}
|
|
1350
1489
|
|
|
1351
|
-
export { AI39_CREATOR, AI82_CREATOR, CPID_VALIDATOR, ContentCharacterSet, GCN_VALIDATOR, GDTI_VALIDATOR, GIAI_VALIDATOR, GINC_VALIDATOR, GLN_VALIDATOR, GMN_VALIDATOR, GRAI_VALIDATOR, GSIN_VALIDATOR, GSRN_VALIDATOR, GTIN12_VALIDATOR, GTIN13_VALIDATOR, GTIN8_VALIDATOR, GTINCreator, GTINLevel, GTINType, GTINValidator, GTIN_VALIDATORS, type IdentificationKeyCreator, IdentificationKeyType, type IdentificationKeyValidation, type IdentificationKeyValidator, LeaderType, NonGTINNumericIdentificationKeyCreator, NonGTINNumericIdentificationKeyValidator, NonNumericIdentificationKeyCreator, type NonNumericIdentificationKeyValidation, NonNumericIdentificationKeyValidator, type NumericIdentificationKeyCreator, type NumericIdentificationKeyValidator, PrefixManager, PrefixType, SSCC_VALIDATOR, SerializableNumericIdentificationKeyCreator, SerializableNumericIdentificationKeyValidator, checkCharacterPair, checkDigit, checkDigitSum, fiveDigitPriceWeightCheckDigit, fourDigitPriceWeightCheckDigit, gs1NS, hasValidCheckCharacterPair, hasValidCheckDigit };
|
|
1490
|
+
export { AI39_CREATOR, AI82_CREATOR, CPID_VALIDATOR, ContentCharacterSet, GCN_VALIDATOR, GDTI_VALIDATOR, GIAI_VALIDATOR, GINC_VALIDATOR, GLN_VALIDATOR, GMN_VALIDATOR, GRAI_VALIDATOR, type GS1LocaleStrings, GSIN_VALIDATOR, GSRN_VALIDATOR, GTIN12_VALIDATOR, GTIN13_VALIDATOR, GTIN8_VALIDATOR, GTINCreator, GTINLevel, GTINType, GTINValidator, GTIN_VALIDATORS, type IdentificationKeyCreator, IdentificationKeyType, type IdentificationKeyValidation, type IdentificationKeyValidator, LeaderType, NonGTINNumericIdentificationKeyCreator, NonGTINNumericIdentificationKeyValidator, NonNumericIdentificationKeyCreator, type NonNumericIdentificationKeyValidation, NonNumericIdentificationKeyValidator, type NumericIdentificationKeyCreator, type NumericIdentificationKeyValidator, PrefixManager, PrefixType, SSCC_VALIDATOR, SerializableNumericIdentificationKeyCreator, SerializableNumericIdentificationKeyValidator, checkCharacterPair, checkDigit, checkDigitSum, fiveDigitPriceWeightCheckDigit, fourDigitPriceWeightCheckDigit, gs1NS, gs1Resources, hasValidCheckCharacterPair, hasValidCheckDigit, i18nGS1Init, i18nextGS1 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,145 @@
|
|
|
1
|
+
import { I18NEnvironment } from '@aidc-toolkit/core';
|
|
2
|
+
import { i18n } from 'i18next';
|
|
1
3
|
import { CharacterSetCreator, StringValidation, StringValidator, CharacterSetValidation, Exclusion, TransformerInput, TransformerOutput } from '@aidc-toolkit/utility';
|
|
2
4
|
import * as ts_mixer_dist_types_types_js from 'ts-mixer/dist/types/types.js';
|
|
3
5
|
|
|
6
|
+
declare const localeStrings: {
|
|
7
|
+
readonly Check: {
|
|
8
|
+
readonly lengthOfStringForPriceOrWeightMustBeExactly: "Length {{length}} of string for price or weight sum must be exactly {{exactLength}}";
|
|
9
|
+
readonly priceOrWeightComponent: "price or weight";
|
|
10
|
+
readonly lengthOfStringForCheckCharacterPairMustBeLessThanOrEqualTo: "Length {{length}} of string for check character pair must be less than or equal to {{maximumLength}}";
|
|
11
|
+
};
|
|
12
|
+
readonly IdentificationKey: {
|
|
13
|
+
readonly identificationKeyTypeLength: "{{identificationKeyType}} must be {{length}} digits long";
|
|
14
|
+
readonly invalidCheckDigit: "Invalid check digit";
|
|
15
|
+
readonly invalidGTINLength: "GTIN must be 13, 12, 8, or 14 digits long";
|
|
16
|
+
readonly invalidGTIN14Length: "GTIN must be 14 digits long";
|
|
17
|
+
readonly invalidZeroSuppressedGTIN12: "Invalid zero-suppressed GTIN-12";
|
|
18
|
+
readonly invalidZeroSuppressibleGTIN12: "GTIN-12 not zero-suppressible";
|
|
19
|
+
readonly invalidZeroSuppressedGTIN12AsGTIN13: "Invalid zero-suppressed GTIN-12 as GTIN-13";
|
|
20
|
+
readonly invalidZeroSuppressedGTIN12AsGTIN14: "Invalid zero-suppressed GTIN-12 as GTIN-14";
|
|
21
|
+
readonly invalidGTIN13AtRetail: "GTIN-13 at retail consumer trade item level can't start with zero";
|
|
22
|
+
readonly invalidGTINAtRetail: "GTIN not supported at retail consumer trade item level";
|
|
23
|
+
readonly invalidGTINAtOtherThanRetail: "GTIN not supported at other than retail consumer trade item level";
|
|
24
|
+
readonly indicatorDigit: "indicator digit";
|
|
25
|
+
readonly serialComponent: "serial component";
|
|
26
|
+
readonly reference: "reference";
|
|
27
|
+
readonly referenceCantBeAllNumeric: "Reference can't be all-numeric";
|
|
28
|
+
readonly invalidCheckCharacterPair: "Invalid check character pair";
|
|
29
|
+
};
|
|
30
|
+
readonly Prefix: {
|
|
31
|
+
readonly gs1CompanyPrefix: "GS1 Company Prefix";
|
|
32
|
+
readonly upcCompanyPrefix: "U.P.C. Company Prefix";
|
|
33
|
+
readonly gs18Prefix: "GS1-8 Prefix";
|
|
34
|
+
readonly gs1CompanyPrefixCantStartWith0: "GS1 Company Prefix can't start with \"0\"";
|
|
35
|
+
readonly gs1CompanyPrefixCantStartWith00000: "GS1 Company Prefix can't start with \"00000\"";
|
|
36
|
+
readonly gs1CompanyPrefixCantStartWith000000: "GS1 Company Prefix can't start with \"000000\"";
|
|
37
|
+
readonly upcCompanyPrefixCantStartWith0000: "U.P.C. Company Prefix can't start with \"0000\"";
|
|
38
|
+
readonly gs18PrefixCantStartWith0: "GS1-8 Prefix can't start with \"0\"";
|
|
39
|
+
readonly identificationKeyTypeNotSupportedByGS18Prefix: "{{identificationKeyType}} not supported by GS1-8 Prefix";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
4
43
|
declare const gs1NS = "aidct_gs1";
|
|
44
|
+
/**
|
|
45
|
+
* Locale strings type is extracted from the English locale strings object.
|
|
46
|
+
*/
|
|
47
|
+
type GS1LocaleStrings = typeof localeStrings;
|
|
48
|
+
/**
|
|
49
|
+
* GS1 resources.
|
|
50
|
+
*/
|
|
51
|
+
declare const gs1Resources: {
|
|
52
|
+
en: {
|
|
53
|
+
aidct_gs1: {
|
|
54
|
+
readonly Check: {
|
|
55
|
+
readonly lengthOfStringForPriceOrWeightMustBeExactly: "Length {{length}} of string for price or weight sum must be exactly {{exactLength}}";
|
|
56
|
+
readonly priceOrWeightComponent: "price or weight";
|
|
57
|
+
readonly lengthOfStringForCheckCharacterPairMustBeLessThanOrEqualTo: "Length {{length}} of string for check character pair must be less than or equal to {{maximumLength}}";
|
|
58
|
+
};
|
|
59
|
+
readonly IdentificationKey: {
|
|
60
|
+
readonly identificationKeyTypeLength: "{{identificationKeyType}} must be {{length}} digits long";
|
|
61
|
+
readonly invalidCheckDigit: "Invalid check digit";
|
|
62
|
+
readonly invalidGTINLength: "GTIN must be 13, 12, 8, or 14 digits long";
|
|
63
|
+
readonly invalidGTIN14Length: "GTIN must be 14 digits long";
|
|
64
|
+
readonly invalidZeroSuppressedGTIN12: "Invalid zero-suppressed GTIN-12";
|
|
65
|
+
readonly invalidZeroSuppressibleGTIN12: "GTIN-12 not zero-suppressible";
|
|
66
|
+
readonly invalidZeroSuppressedGTIN12AsGTIN13: "Invalid zero-suppressed GTIN-12 as GTIN-13";
|
|
67
|
+
readonly invalidZeroSuppressedGTIN12AsGTIN14: "Invalid zero-suppressed GTIN-12 as GTIN-14";
|
|
68
|
+
readonly invalidGTIN13AtRetail: "GTIN-13 at retail consumer trade item level can't start with zero";
|
|
69
|
+
readonly invalidGTINAtRetail: "GTIN not supported at retail consumer trade item level";
|
|
70
|
+
readonly invalidGTINAtOtherThanRetail: "GTIN not supported at other than retail consumer trade item level";
|
|
71
|
+
readonly indicatorDigit: "indicator digit";
|
|
72
|
+
readonly serialComponent: "serial component";
|
|
73
|
+
readonly reference: "reference";
|
|
74
|
+
readonly referenceCantBeAllNumeric: "Reference can't be all-numeric";
|
|
75
|
+
readonly invalidCheckCharacterPair: "Invalid check character pair";
|
|
76
|
+
};
|
|
77
|
+
readonly Prefix: {
|
|
78
|
+
readonly gs1CompanyPrefix: "GS1 Company Prefix";
|
|
79
|
+
readonly upcCompanyPrefix: "U.P.C. Company Prefix";
|
|
80
|
+
readonly gs18Prefix: "GS1-8 Prefix";
|
|
81
|
+
readonly gs1CompanyPrefixCantStartWith0: "GS1 Company Prefix can't start with \"0\"";
|
|
82
|
+
readonly gs1CompanyPrefixCantStartWith00000: "GS1 Company Prefix can't start with \"00000\"";
|
|
83
|
+
readonly gs1CompanyPrefixCantStartWith000000: "GS1 Company Prefix can't start with \"000000\"";
|
|
84
|
+
readonly upcCompanyPrefixCantStartWith0000: "U.P.C. Company Prefix can't start with \"0000\"";
|
|
85
|
+
readonly gs18PrefixCantStartWith0: "GS1-8 Prefix can't start with \"0\"";
|
|
86
|
+
readonly identificationKeyTypeNotSupportedByGS18Prefix: "{{identificationKeyType}} not supported by GS1-8 Prefix";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
fr: {
|
|
91
|
+
aidct_gs1: {
|
|
92
|
+
readonly Check: {
|
|
93
|
+
readonly lengthOfStringForPriceOrWeightMustBeExactly: "La longueur {{longueur}} de la chaîne pour le prix ou la somme du poids doit être exactement {{exactLength}}";
|
|
94
|
+
readonly priceOrWeightComponent: "prix ou poids";
|
|
95
|
+
readonly lengthOfStringForCheckCharacterPairMustBeLessThanOrEqualTo: "La longueur {{length}} de la chaîne pour la paire de caractères de vérification doit être inférieure ou égale à {{maximum Length}}";
|
|
96
|
+
};
|
|
97
|
+
readonly IdentificationKey: {
|
|
98
|
+
readonly identificationKeyTypeLength: "{{identificationKeyType}} doit comporter {{length}} chiffres";
|
|
99
|
+
readonly invalidCheckDigit: "Chiffre de contrôle non valide";
|
|
100
|
+
readonly invalidGTINLength: "Le GTIN doit comporter 13, 12, 8 ou 14 chiffres";
|
|
101
|
+
readonly invalidGTIN14Length: "Le GTIN doit comporter 14 chiffres";
|
|
102
|
+
readonly invalidZeroSuppressedGTIN12: "Code GTIN-12 non valide avec zéro supprimé";
|
|
103
|
+
readonly invalidZeroSuppressibleGTIN12: "Le GTIN-12 ne peut pas être supprimé par zéro";
|
|
104
|
+
readonly invalidZeroSuppressedGTIN12AsGTIN13: "GTIN-12 non valide avec zéro supprimé en tant que GTIN-13";
|
|
105
|
+
readonly invalidZeroSuppressedGTIN12AsGTIN14: "GTIN-12 non valide avec zéro supprimé en tant que GTIN-14";
|
|
106
|
+
readonly invalidGTIN13AtRetail: "Le GTIN-13 au niveau des articles de consommation au détail ne peut pas commencer par zéro";
|
|
107
|
+
readonly invalidGTINAtRetail: "Le GTIN n'est pas pris en charge au niveau des articles de consommation au détail";
|
|
108
|
+
readonly invalidGTINAtOtherThanRetail: "Le GTIN n'est pas pris en charge à d'autres niveaux que ceux des articles de consommation au détail";
|
|
109
|
+
readonly indicatorDigit: "chiffre indicateur";
|
|
110
|
+
readonly serialComponent: "composant série";
|
|
111
|
+
readonly reference: "référence";
|
|
112
|
+
readonly referenceCantBeAllNumeric: "La référence ne peut pas être entièrement numérique";
|
|
113
|
+
readonly invalidCheckCharacterPair: "Paire de caractères de contrôle non valide";
|
|
114
|
+
};
|
|
115
|
+
readonly Prefix: {
|
|
116
|
+
readonly gs1CompanyPrefix: "Préfixe de l'entreprise GS1";
|
|
117
|
+
readonly upcCompanyPrefix: "Préfixe de l'entreprise U.P.C.";
|
|
118
|
+
readonly gs18Prefix: "Préfixe GS1-8";
|
|
119
|
+
readonly gs1CompanyPrefixCantStartWith0: "Le préfixe de l'entreprise GS1 ne peut pas commencer par \"0\"";
|
|
120
|
+
readonly gs1CompanyPrefixCantStartWith00000: "Le préfixe de l'entreprise GS1 ne peut pas commencer par \"00000\"";
|
|
121
|
+
readonly gs1CompanyPrefixCantStartWith000000: "Le préfixe de l'entreprise GS1 ne peut pas commencer par \"000000\"";
|
|
122
|
+
readonly upcCompanyPrefixCantStartWith0000: "Le préfixe de l'entreprise U.P.C. ne peut pas commencer par \"0000\"";
|
|
123
|
+
readonly gs18PrefixCantStartWith0: "Le préfixe GS1-8 ne peut pas commencer par \"0\"";
|
|
124
|
+
readonly identificationKeyTypeNotSupportedByGS18Prefix: "{{identificationKeyType}} non pris en charge par le préfixe GS1-8";
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
declare const i18nextGS1: i18n;
|
|
130
|
+
/**
|
|
131
|
+
* Initialize internationalization.
|
|
132
|
+
*
|
|
133
|
+
* @param environment
|
|
134
|
+
* Environment in which the application is running.
|
|
135
|
+
*
|
|
136
|
+
* @param debug
|
|
137
|
+
* Debug setting.
|
|
138
|
+
*
|
|
139
|
+
* @returns
|
|
140
|
+
* Void promise.
|
|
141
|
+
*/
|
|
142
|
+
declare function i18nGS1Init(environment: I18NEnvironment, debug?: boolean): Promise<void>;
|
|
5
143
|
|
|
6
144
|
/**
|
|
7
145
|
* GS1 AI encodable character set 82 creator as defined in section 7.11 of the {@link https://www.gs1.org/genspecs | GS1
|
|
@@ -761,13 +899,14 @@ interface NumericIdentificationKeyCreator extends NumericIdentificationKeyValida
|
|
|
761
899
|
/**
|
|
762
900
|
* Create all identification keys for the prefix from `0` to `capacity - 1`.
|
|
763
901
|
*
|
|
764
|
-
* The implementation creates the strings as needed using an internal generator function
|
|
765
|
-
*
|
|
902
|
+
* The implementation creates the strings only as needed using an internal generator function. Although the result
|
|
903
|
+
* is equivalent to calling `creator.create(new Sequence(0, creator.capacity))`, this method is significantly
|
|
904
|
+
* faster.
|
|
766
905
|
*
|
|
767
906
|
* @returns
|
|
768
|
-
*
|
|
907
|
+
* All identification keys for the prefix.
|
|
769
908
|
*/
|
|
770
|
-
createAll: () =>
|
|
909
|
+
createAll: () => Iterable<string>;
|
|
771
910
|
}
|
|
772
911
|
/**
|
|
773
912
|
* Abstract numeric identification key creator. Implements common functionality for a numeric identification key creator.
|
|
@@ -845,7 +984,7 @@ declare abstract class AbstractNumericIdentificationKeyCreator extends AbstractI
|
|
|
845
984
|
/**
|
|
846
985
|
* @inheritDoc
|
|
847
986
|
*/
|
|
848
|
-
createAll():
|
|
987
|
+
createAll(): Iterable<string>;
|
|
849
988
|
}
|
|
850
989
|
declare const GTINCreator_base: ts_mixer_dist_types_types_js.Class<any[], GTINValidator & AbstractNumericIdentificationKeyCreator, typeof GTINValidator & typeof AbstractNumericIdentificationKeyCreator>;
|
|
851
990
|
/**
|
|
@@ -1348,4 +1487,4 @@ declare class PrefixManager {
|
|
|
1348
1487
|
get gmnCreator(): NonNumericIdentificationKeyCreator;
|
|
1349
1488
|
}
|
|
1350
1489
|
|
|
1351
|
-
export { AI39_CREATOR, AI82_CREATOR, CPID_VALIDATOR, ContentCharacterSet, GCN_VALIDATOR, GDTI_VALIDATOR, GIAI_VALIDATOR, GINC_VALIDATOR, GLN_VALIDATOR, GMN_VALIDATOR, GRAI_VALIDATOR, GSIN_VALIDATOR, GSRN_VALIDATOR, GTIN12_VALIDATOR, GTIN13_VALIDATOR, GTIN8_VALIDATOR, GTINCreator, GTINLevel, GTINType, GTINValidator, GTIN_VALIDATORS, type IdentificationKeyCreator, IdentificationKeyType, type IdentificationKeyValidation, type IdentificationKeyValidator, LeaderType, NonGTINNumericIdentificationKeyCreator, NonGTINNumericIdentificationKeyValidator, NonNumericIdentificationKeyCreator, type NonNumericIdentificationKeyValidation, NonNumericIdentificationKeyValidator, type NumericIdentificationKeyCreator, type NumericIdentificationKeyValidator, PrefixManager, PrefixType, SSCC_VALIDATOR, SerializableNumericIdentificationKeyCreator, SerializableNumericIdentificationKeyValidator, checkCharacterPair, checkDigit, checkDigitSum, fiveDigitPriceWeightCheckDigit, fourDigitPriceWeightCheckDigit, gs1NS, hasValidCheckCharacterPair, hasValidCheckDigit };
|
|
1490
|
+
export { AI39_CREATOR, AI82_CREATOR, CPID_VALIDATOR, ContentCharacterSet, GCN_VALIDATOR, GDTI_VALIDATOR, GIAI_VALIDATOR, GINC_VALIDATOR, GLN_VALIDATOR, GMN_VALIDATOR, GRAI_VALIDATOR, type GS1LocaleStrings, GSIN_VALIDATOR, GSRN_VALIDATOR, GTIN12_VALIDATOR, GTIN13_VALIDATOR, GTIN8_VALIDATOR, GTINCreator, GTINLevel, GTINType, GTINValidator, GTIN_VALIDATORS, type IdentificationKeyCreator, IdentificationKeyType, type IdentificationKeyValidation, type IdentificationKeyValidator, LeaderType, NonGTINNumericIdentificationKeyCreator, NonGTINNumericIdentificationKeyValidator, NonNumericIdentificationKeyCreator, type NonNumericIdentificationKeyValidation, NonNumericIdentificationKeyValidator, type NumericIdentificationKeyCreator, type NumericIdentificationKeyValidator, PrefixManager, PrefixType, SSCC_VALIDATOR, SerializableNumericIdentificationKeyCreator, SerializableNumericIdentificationKeyValidator, checkCharacterPair, checkDigit, checkDigitSum, fiveDigitPriceWeightCheckDigit, fourDigitPriceWeightCheckDigit, gs1NS, gs1Resources, hasValidCheckCharacterPair, hasValidCheckDigit, i18nGS1Init, i18nextGS1 };
|