@aidc-toolkit/gs1 0.9.15-beta → 0.9.16-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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,38 @@
1
+ export const localeStrings = {
2
+ Check: {
3
+ lengthOfStringForPriceOrWeightMustBeExactly: "Length {{length}} of string for price or weight sum must be exactly {{exactLength}}",
4
+ priceOrWeightComponent: "price or weight",
5
+ lengthOfStringForCheckCharacterPairMustBeLessThanOrEqualTo: "Length {{length}} of string for check character pair must be less than or equal to {{maximumLength}}"
6
+ },
7
+ IdentificationKey: {
8
+ identificationKeyTypeLength: "{{identificationKeyType}} must be {{length}} digits long",
9
+ invalidCheckDigit: "Invalid check digit",
10
+ invalidGTINLength: "GTIN must be 13, 12, 8, or 14 digits long",
11
+ invalidGTIN14Length: "GTIN must be 14 digits long",
12
+ invalidZeroSuppressedGTIN12: "Invalid zero-suppressed GTIN-12",
13
+ invalidZeroSuppressibleGTIN12: "GTIN-12 not zero-suppressible",
14
+ invalidZeroSuppressedGTIN12AsGTIN13: "Invalid zero-suppressed GTIN-12 as GTIN-13",
15
+ invalidZeroSuppressedGTIN12AsGTIN14: "Invalid zero-suppressed GTIN-12 as GTIN-14",
16
+ invalidGTIN13AtRetail: "GTIN-13 at retail consumer trade item level can't start with zero",
17
+ invalidGTINAtRetail: "GTIN not supported at retail consumer trade item level",
18
+ invalidGTINAtOtherThanRetail: "GTIN not supported at other than retail consumer trade item level",
19
+ indicatorDigit: "indicator digit",
20
+ serialComponent: "serial component",
21
+ reference: "reference",
22
+ referenceCantBeAllNumeric: "Reference can't be all-numeric",
23
+ invalidCheckCharacterPair: "Invalid check character pair"
24
+ },
25
+ Prefix: {
26
+ gs1CompanyPrefix: "GS1 Company Prefix",
27
+ upcCompanyPrefix: "U.P.C. Company Prefix",
28
+ gs18Prefix: "GS1-8 Prefix",
29
+ invalidPrefixType: "Invalid prefix type",
30
+ gs1CompanyPrefixCantStartWith0: "GS1 Company Prefix can't start with \"0\"",
31
+ gs1CompanyPrefixCantStartWith00000: "GS1 Company Prefix can't start with \"00000\"",
32
+ gs1CompanyPrefixCantStartWith000000: "GS1 Company Prefix can't start with \"000000\"",
33
+ upcCompanyPrefixCantStartWith0000: "U.P.C. Company Prefix can't start with \"0000\"",
34
+ gs18PrefixCantStartWith0: "GS1-8 Prefix can't start with \"0\"",
35
+ identificationKeyTypeNotSupportedByGS18Prefix: "{{identificationKeyType}} not supported by GS1-8 Prefix"
36
+ }
37
+ };
38
+ //# sourceMappingURL=locale-strings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale-strings.js","sourceRoot":"","sources":["../../../src/locale/en/locale-strings.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,KAAK,EAAE;QACH,2CAA2C,EAAE,qFAAqF;QAClI,sBAAsB,EAAE,iBAAiB;QACzC,0DAA0D,EAAE,sGAAsG;KACrK;IACD,iBAAiB,EAAE;QACf,2BAA2B,EAAE,0DAA0D;QACvF,iBAAiB,EAAE,qBAAqB;QACxC,iBAAiB,EAAE,2CAA2C;QAC9D,mBAAmB,EAAE,6BAA6B;QAClD,2BAA2B,EAAE,iCAAiC;QAC9D,6BAA6B,EAAE,+BAA+B;QAC9D,mCAAmC,EAAE,4CAA4C;QACjF,mCAAmC,EAAE,4CAA4C;QACjF,qBAAqB,EAAE,mEAAmE;QAC1F,mBAAmB,EAAE,wDAAwD;QAC7E,4BAA4B,EAAE,mEAAmE;QACjG,cAAc,EAAE,iBAAiB;QACjC,eAAe,EAAE,kBAAkB;QACnC,SAAS,EAAE,WAAW;QACtB,yBAAyB,EAAE,gCAAgC;QAC3D,yBAAyB,EAAE,8BAA8B;KAC5D;IACD,MAAM,EAAE;QACJ,gBAAgB,EAAE,oBAAoB;QACtC,gBAAgB,EAAE,uBAAuB;QACzC,UAAU,EAAE,cAAc;QAC1B,iBAAiB,EAAE,qBAAqB;QACxC,8BAA8B,EAAE,2CAA2C;QAC3E,kCAAkC,EAAE,+CAA+C;QACnF,mCAAmC,EAAE,gDAAgD;QACrF,iCAAiC,EAAE,iDAAiD;QACpF,wBAAwB,EAAE,qCAAqC;QAC/D,6CAA6C,EAAE,yDAAyD;KAC3G;CACK,CAAC"}
@@ -0,0 +1,38 @@
1
+ export const localeStrings = {
2
+ Check: {
3
+ lengthOfStringForPriceOrWeightMustBeExactly: "La longueur {{longueur}} de la chaîne pour le prix ou la somme du poids doit être exactement {{exactLength}}",
4
+ priceOrWeightComponent: "prix ou poids",
5
+ 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}}"
6
+ },
7
+ IdentificationKey: {
8
+ identificationKeyTypeLength: "{{identificationKeyType}} doit comporter {{length}} chiffres",
9
+ invalidCheckDigit: "Chiffre de contrôle non valide",
10
+ invalidGTINLength: "Le GTIN doit comporter 13, 12, 8 ou 14 chiffres",
11
+ invalidGTIN14Length: "Le GTIN doit comporter 14 chiffres",
12
+ invalidZeroSuppressedGTIN12: "Code GTIN-12 non valide avec zéro supprimé",
13
+ invalidZeroSuppressibleGTIN12: "Le GTIN-12 ne peut pas être supprimé par zéro",
14
+ invalidZeroSuppressedGTIN12AsGTIN13: "GTIN-12 non valide avec zéro supprimé en tant que GTIN-13",
15
+ invalidZeroSuppressedGTIN12AsGTIN14: "GTIN-12 non valide avec zéro supprimé en tant que GTIN-14",
16
+ invalidGTIN13AtRetail: "Le GTIN-13 au niveau des articles de consommation au détail ne peut pas commencer par zéro",
17
+ invalidGTINAtRetail: "Le GTIN n'est pas pris en charge au niveau des articles de consommation au détail",
18
+ invalidGTINAtOtherThanRetail: "Le GTIN n'est pas pris en charge à d'autres niveaux que ceux des articles de consommation au détail",
19
+ indicatorDigit: "chiffre indicateur",
20
+ serialComponent: "composant série",
21
+ reference: "référence",
22
+ referenceCantBeAllNumeric: "La référence ne peut pas être entièrement numérique",
23
+ invalidCheckCharacterPair: "Paire de caractères de contrôle non valide"
24
+ },
25
+ Prefix: {
26
+ gs1CompanyPrefix: "Préfixe de l'entreprise GS1",
27
+ upcCompanyPrefix: "Préfixe de l'entreprise U.P.C.",
28
+ gs18Prefix: "Préfixe GS1-8",
29
+ invalidPrefixType: "Type de préfixe invalide",
30
+ gs1CompanyPrefixCantStartWith0: "Le préfixe de l'entreprise GS1 ne peut pas commencer par \"0\"",
31
+ gs1CompanyPrefixCantStartWith00000: "Le préfixe de l'entreprise GS1 ne peut pas commencer par \"00000\"",
32
+ gs1CompanyPrefixCantStartWith000000: "Le préfixe de l'entreprise GS1 ne peut pas commencer par \"000000\"",
33
+ upcCompanyPrefixCantStartWith0000: "Le préfixe de l'entreprise U.P.C. ne peut pas commencer par \"0000\"",
34
+ gs18PrefixCantStartWith0: "Le préfixe GS1-8 ne peut pas commencer par \"0\"",
35
+ identificationKeyTypeNotSupportedByGS18Prefix: "{{identificationKeyType}} non pris en charge par le préfixe GS1-8"
36
+ }
37
+ };
38
+ //# sourceMappingURL=locale-strings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale-strings.js","sourceRoot":"","sources":["../../../src/locale/fr/locale-strings.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,KAAK,EAAE;QACH,2CAA2C,EAAE,8GAA8G;QAC3J,sBAAsB,EAAE,eAAe;QACvC,0DAA0D,EAAE,oIAAoI;KACnM;IACD,iBAAiB,EAAE;QACf,2BAA2B,EAAE,8DAA8D;QAC3F,iBAAiB,EAAE,gCAAgC;QACnD,iBAAiB,EAAE,iDAAiD;QACpE,mBAAmB,EAAE,oCAAoC;QACzD,2BAA2B,EAAE,4CAA4C;QACzE,6BAA6B,EAAE,+CAA+C;QAC9E,mCAAmC,EAAE,2DAA2D;QAChG,mCAAmC,EAAE,2DAA2D;QAChG,qBAAqB,EAAE,4FAA4F;QACnH,mBAAmB,EAAE,mFAAmF;QACxG,4BAA4B,EAAE,qGAAqG;QACnI,cAAc,EAAE,oBAAoB;QACpC,eAAe,EAAE,iBAAiB;QAClC,SAAS,EAAE,WAAW;QACtB,yBAAyB,EAAE,qDAAqD;QAChF,yBAAyB,EAAE,4CAA4C;KAC1E;IACD,MAAM,EAAE;QACJ,gBAAgB,EAAE,6BAA6B;QAC/C,gBAAgB,EAAE,gCAAgC;QAClD,UAAU,EAAE,eAAe;QAC3B,iBAAiB,EAAE,0BAA0B;QAC7C,8BAA8B,EAAE,gEAAgE;QAChG,kCAAkC,EAAE,oEAAoE;QACxG,mCAAmC,EAAE,qEAAqE;QAC1G,iCAAiC,EAAE,sEAAsE;QACzG,wBAAwB,EAAE,kDAAkD;QAC5E,6CAA6C,EAAE,mEAAmE;KACrH;CACK,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { i18nAssertValidResources, i18nCoreInit } from "@aidc-toolkit/core";
2
+ import { i18nUtilityInit, utilityResources } from "@aidc-toolkit/utility";
3
+ import i18next from "i18next";
4
+ import { localeStrings as enLocaleStrings } from "./en/locale-strings.js";
5
+ import { localeStrings as frLocaleStrings } from "./fr/locale-strings.js";
6
+ export const gs1NS = "aidct_gs1";
7
+ i18nAssertValidResources(enLocaleStrings, "fr", frLocaleStrings);
8
+ /**
9
+ * GS1 resources.
10
+ */
11
+ export const gs1Resources = {
12
+ en: {
13
+ aidct_gs1: enLocaleStrings
14
+ },
15
+ fr: {
16
+ aidct_gs1: frLocaleStrings
17
+ }
18
+ };
19
+ // Explicit type is necessary to work around bug in type discovery with linked packages.
20
+ export const i18nextGS1 = i18next.createInstance();
21
+ /**
22
+ * Initialize internationalization.
23
+ *
24
+ * @param environment
25
+ * Environment in which the application is running.
26
+ *
27
+ * @param debug
28
+ * Debug setting.
29
+ *
30
+ * @returns
31
+ * Void promise.
32
+ */
33
+ export async function i18nGS1Init(environment, debug = false) {
34
+ await i18nUtilityInit(environment, debug);
35
+ await i18nCoreInit(i18nextGS1, environment, debug, gs1NS, utilityResources, gs1Resources);
36
+ }
37
+ //# sourceMappingURL=i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/locale/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAwB,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,OAAsB,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,aAAa,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,aAAa,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE1E,MAAM,CAAC,MAAM,KAAK,GAAG,WAAW,CAAC;AAOjC,wBAAwB,CAAC,eAAe,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,EAAE,EAAE;QACA,SAAS,EAAE,eAAe;KAC7B;IACD,EAAE,EAAE;QACA,SAAS,EAAE,eAAe;KAC7B;CACJ,CAAC;AAEF,wFAAwF;AACxF,MAAM,CAAC,MAAM,UAAU,GAAS,OAAO,CAAC,cAAc,EAAE,CAAC;AAEzD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,WAA4B,EAAE,KAAK,GAAG,KAAK;IACzE,MAAM,eAAe,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAC1C,MAAM,YAAY,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;AAC9F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aidc-toolkit/gs1",
3
- "version": "0.9.15-beta",
3
+ "version": "0.9.16-beta",
4
4
  "description": "GS1 AIDC Toolkit",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,20 +21,20 @@
21
21
  "scripts": {
22
22
  "update-aidc-toolkit": "npm update @aidc-toolkit/dev @aidc-toolkit/core @aidc-toolkit/utility",
23
23
  "lint": "eslint",
24
- "build:core": "tsup --config node_modules/@aidc-toolkit/dev/tsup.config.ts",
25
- "build:dev": "npm run build:core && tsc --project node_modules/@aidc-toolkit/dev/tsconfig-declaration.json",
26
- "build:release": "npm run build:core -- --minify",
24
+ "build:core": "rimraf dist && tsc --project",
25
+ "build:dev": "npm run build:core -- node_modules/@aidc-toolkit/dev/tsconfig-build-dev.json",
26
+ "build:release": "npm run build:core -- node_modules/@aidc-toolkit/dev/tsconfig-build.json",
27
27
  "build:doc": "npm run build:dev",
28
28
  "publish-dev": "publish-dev",
29
29
  "test": "vitest run"
30
30
  },
31
31
  "devDependencies": {
32
- "@aidc-toolkit/dev": "^0.9.15-beta",
33
- "vitest": "^3.0.6"
32
+ "@aidc-toolkit/dev": "^0.9.16-beta",
33
+ "vitest": "^3.0.7"
34
34
  },
35
35
  "dependencies": {
36
- "@aidc-toolkit/core": "^0.9.15-beta",
37
- "@aidc-toolkit/utility": "^0.9.15-beta",
36
+ "@aidc-toolkit/core": "^0.9.16-beta",
37
+ "@aidc-toolkit/utility": "^0.9.16-beta",
38
38
  "i18next": "^24.2.2",
39
39
  "ts-mixer": "^6.0.4"
40
40
  }