@aidc-toolkit/app-extension 1.0.24-beta → 1.0.26-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/index.cjs +109 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -37
- package/dist/index.d.ts +59 -37
- package/dist/index.js +111 -65
- package/dist/index.js.map +1 -1
- package/package.json +14 -9
- package/src/app-extension.ts +2 -2
- package/src/app-utility-proxy.ts +4 -4
- package/src/descriptor.ts +9 -4
- package/src/generator/descriptor.ts +1 -1
- package/src/generator/generator.ts +24 -6
- package/src/generator/index.ts +2 -2
- package/src/generator/locale-resources-generator.ts +9 -9
- package/src/gs1/character-set-proxy.ts +18 -8
- package/src/gs1/check-proxy.ts +3 -3
- package/src/gs1/identifier-proxy.ts +70 -66
- package/src/gs1/index.ts +3 -3
- package/src/index.ts +9 -9
- package/src/lib-proxy.ts +3 -3
- package/src/locale/en/locale-resources.ts +9 -0
- package/src/locale/fr/locale-resources.ts +9 -0
- package/src/locale/i18n.ts +3 -3
- package/src/locale/i18next.d.ts +1 -1
- package/src/type.ts +1 -1
- package/src/utility/character-set-descriptor.ts +1 -1
- package/src/utility/character-set-proxy.ts +28 -17
- package/src/utility/index.ts +3 -3
- package/src/utility/reg-exp-proxy.ts +4 -4
- package/src/utility/string-descriptor.ts +1 -1
- package/src/utility/string-proxy.ts +2 -2
- package/src/utility/transformer-descriptor.ts +1 -1
- package/src/utility/transformer-proxy.ts +4 -4
- package/tsconfig-config.json +4 -0
- package/tsconfig-src.json +11 -0
- package/tsconfig.json +9 -4
- package/tsup.config.ts +3 -2
package/dist/index.cjs
CHANGED
|
@@ -43,7 +43,8 @@ __export(index_exports, {
|
|
|
43
43
|
AlphanumericProxy: () => AlphanumericProxy,
|
|
44
44
|
AppExtension: () => AppExtension,
|
|
45
45
|
AppUtilityProxy: () => AppUtilityProxy,
|
|
46
|
-
|
|
46
|
+
CharacterSetCreatorProxy: () => CharacterSetCreatorProxy,
|
|
47
|
+
CharacterSetValidatorProxy: () => CharacterSetValidatorProxy,
|
|
47
48
|
GS1: () => gs1_exports,
|
|
48
49
|
Generator: () => Generator,
|
|
49
50
|
HexadecimalProxy: () => HexadecimalProxy,
|
|
@@ -85,6 +86,7 @@ var locale_resources_default = {
|
|
|
85
86
|
prefixDefinitionMustHaveMaximumThreeElements: "Prefix definition must have a maximum of 3 elements",
|
|
86
87
|
prefixMustBeString: "Prefix must be a string",
|
|
87
88
|
prefixTypeMustBeNumber: "Prefix type must be a number in the range of 0 to {{maximumPrefixType, number}}",
|
|
89
|
+
invalidPrefixType: "Invalid prefix type",
|
|
88
90
|
tweakFactorMustBeNumber: "Tweak factor must be a number"
|
|
89
91
|
},
|
|
90
92
|
Parameters: {
|
|
@@ -427,6 +429,14 @@ var locale_resources_default = {
|
|
|
427
429
|
name: "valueForAI39",
|
|
428
430
|
description: "Get the value for a GS1 AI 39 encodable character set string."
|
|
429
431
|
},
|
|
432
|
+
validateAI64: {
|
|
433
|
+
name: "validateAI64",
|
|
434
|
+
description: "Validate a GS1 AI 64 encodable character set string."
|
|
435
|
+
},
|
|
436
|
+
isValidAI64: {
|
|
437
|
+
name: "isValidAI64",
|
|
438
|
+
description: "Determine if a string is GS1 AI 64 encodable character set."
|
|
439
|
+
},
|
|
430
440
|
checkDigit: {
|
|
431
441
|
name: "checkDigit",
|
|
432
442
|
description: "Calculate the check digit for a numeric string."
|
|
@@ -702,6 +712,7 @@ var locale_resources_default2 = {
|
|
|
702
712
|
prefixDefinitionMustHaveMaximumThreeElements: "La d\xE9finition du pr\xE9fixe doit comporter un maximum de 3 \xE9l\xE9ments",
|
|
703
713
|
prefixMustBeString: "Le pr\xE9fixe doit \xEAtre une cha\xEEne",
|
|
704
714
|
prefixTypeMustBeNumber: "Le type de pr\xE9fixe doit \xEAtre un nombre compris entre 0 et {{maximumPrefixType, number}}",
|
|
715
|
+
invalidPrefixType: "Type de pr\xE9fixe invalide",
|
|
705
716
|
tweakFactorMustBeNumber: "Le facteur de r\xE9glage doit \xEAtre un nombre"
|
|
706
717
|
},
|
|
707
718
|
Parameters: {
|
|
@@ -1044,6 +1055,14 @@ var locale_resources_default2 = {
|
|
|
1044
1055
|
name: "valeurDeAI39",
|
|
1045
1056
|
description: "Obtenez la valeur d'une cha\xEEne de caract\xE8res GS1 AI 39."
|
|
1046
1057
|
},
|
|
1058
|
+
validateAI64: {
|
|
1059
|
+
name: "validerAI64",
|
|
1060
|
+
description: "Valider une cha\xEEne de caract\xE8res GS1 AI 64."
|
|
1061
|
+
},
|
|
1062
|
+
isValidAI64: {
|
|
1063
|
+
name: "estValideAI64",
|
|
1064
|
+
description: "D\xE9terminer si une cha\xEEne est un jeu de caract\xE8res GS1 AI 64."
|
|
1065
|
+
},
|
|
1047
1066
|
checkDigit: {
|
|
1048
1067
|
name: "chiffreDeControle",
|
|
1049
1068
|
description: "Calculer le chiffre de contr\xF4le pour une cha\xEEne num\xE9rique."
|
|
@@ -1916,6 +1935,19 @@ AppUtilityProxy = __decorateClass([
|
|
|
1916
1935
|
ProxyClass()
|
|
1917
1936
|
], AppUtilityProxy);
|
|
1918
1937
|
|
|
1938
|
+
// src/utility/index.ts
|
|
1939
|
+
var utility_exports = {};
|
|
1940
|
+
__export(utility_exports, {
|
|
1941
|
+
AlphabeticProxy: () => AlphabeticProxy,
|
|
1942
|
+
AlphanumericProxy: () => AlphanumericProxy,
|
|
1943
|
+
CharacterSetCreatorProxy: () => CharacterSetCreatorProxy,
|
|
1944
|
+
CharacterSetValidatorProxy: () => CharacterSetValidatorProxy,
|
|
1945
|
+
HexadecimalProxy: () => HexadecimalProxy,
|
|
1946
|
+
NumericProxy: () => NumericProxy,
|
|
1947
|
+
RegExpProxy: () => RegExpProxy,
|
|
1948
|
+
TransformerProxy: () => TransformerProxy
|
|
1949
|
+
});
|
|
1950
|
+
|
|
1919
1951
|
// src/utility/transformer-proxy.ts
|
|
1920
1952
|
var import_utility3 = require("@aidc-toolkit/utility");
|
|
1921
1953
|
|
|
@@ -2120,20 +2152,43 @@ var valueForSParameterDescriptor = {
|
|
|
2120
2152
|
extendsDescriptor: sParameterDescriptor,
|
|
2121
2153
|
name: "valueForS"
|
|
2122
2154
|
};
|
|
2123
|
-
var
|
|
2124
|
-
|
|
2125
|
-
constructor(appExtension,
|
|
2155
|
+
var CharacterSetValidatorProxy = class extends StringProxy {
|
|
2156
|
+
_characterSetValidator;
|
|
2157
|
+
constructor(appExtension, characterSetValidator) {
|
|
2126
2158
|
super(appExtension);
|
|
2127
|
-
this.
|
|
2159
|
+
this._characterSetValidator = characterSetValidator;
|
|
2128
2160
|
}
|
|
2129
2161
|
validate(matrixSs, exclusion) {
|
|
2130
|
-
return this.validateString(this.
|
|
2162
|
+
return this.validateString(this._characterSetValidator, matrixSs, {
|
|
2131
2163
|
exclusion: exclusion ?? void 0
|
|
2132
2164
|
});
|
|
2133
2165
|
}
|
|
2134
2166
|
isValid(matrixSs, exclusion) {
|
|
2135
2167
|
return this.isValidString(this.validate(matrixSs, exclusion));
|
|
2136
2168
|
}
|
|
2169
|
+
};
|
|
2170
|
+
__decorateClass([
|
|
2171
|
+
ProxyMethod({
|
|
2172
|
+
type: Types.String,
|
|
2173
|
+
isMatrix: true
|
|
2174
|
+
}),
|
|
2175
|
+
__decorateParam(0, ProxyParameter(validateSParameterDescriptor)),
|
|
2176
|
+
__decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor))
|
|
2177
|
+
], CharacterSetValidatorProxy.prototype, "validate", 1);
|
|
2178
|
+
__decorateClass([
|
|
2179
|
+
ProxyMethod({
|
|
2180
|
+
type: Types.Boolean,
|
|
2181
|
+
isMatrix: true
|
|
2182
|
+
}),
|
|
2183
|
+
__decorateParam(0, ProxyParameter(validateSParameterDescriptor)),
|
|
2184
|
+
__decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor))
|
|
2185
|
+
], CharacterSetValidatorProxy.prototype, "isValid", 1);
|
|
2186
|
+
var CharacterSetCreatorProxy = class extends CharacterSetValidatorProxy {
|
|
2187
|
+
_characterSetCreator;
|
|
2188
|
+
constructor(appExtension, characterSetCreator) {
|
|
2189
|
+
super(appExtension, characterSetCreator);
|
|
2190
|
+
this._characterSetCreator = characterSetCreator;
|
|
2191
|
+
}
|
|
2137
2192
|
create(length, matrixValues, exclusion, tweak) {
|
|
2138
2193
|
const exclusionOrUndefined = exclusion ?? void 0;
|
|
2139
2194
|
const tweakOrUndefined = tweak ?? void 0;
|
|
@@ -2151,22 +2206,6 @@ var CharacterSetProxy = class extends StringProxy {
|
|
|
2151
2206
|
return this.mapMatrix(matrixSs, (s) => this.mapBigInt(this._characterSetCreator.valueFor(s, exclusionOrUndefined, tweakOrUndefined)));
|
|
2152
2207
|
}
|
|
2153
2208
|
};
|
|
2154
|
-
__decorateClass([
|
|
2155
|
-
ProxyMethod({
|
|
2156
|
-
type: Types.String,
|
|
2157
|
-
isMatrix: true
|
|
2158
|
-
}),
|
|
2159
|
-
__decorateParam(0, ProxyParameter(validateSParameterDescriptor)),
|
|
2160
|
-
__decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor))
|
|
2161
|
-
], CharacterSetProxy.prototype, "validate", 1);
|
|
2162
|
-
__decorateClass([
|
|
2163
|
-
ProxyMethod({
|
|
2164
|
-
type: Types.Boolean,
|
|
2165
|
-
isMatrix: true
|
|
2166
|
-
}),
|
|
2167
|
-
__decorateParam(0, ProxyParameter(validateSParameterDescriptor)),
|
|
2168
|
-
__decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor))
|
|
2169
|
-
], CharacterSetProxy.prototype, "isValid", 1);
|
|
2170
2209
|
__decorateClass([
|
|
2171
2210
|
ProxyMethod({
|
|
2172
2211
|
type: Types.String,
|
|
@@ -2176,7 +2215,7 @@ __decorateClass([
|
|
|
2176
2215
|
__decorateParam(1, ProxyParameter(valueParameterDescriptor)),
|
|
2177
2216
|
__decorateParam(2, ProxyParameter(exclusionNoneParameterDescriptor)),
|
|
2178
2217
|
__decorateParam(3, ProxyParameter(tweakParameterDescriptor))
|
|
2179
|
-
],
|
|
2218
|
+
], CharacterSetCreatorProxy.prototype, "create", 1);
|
|
2180
2219
|
__decorateClass([
|
|
2181
2220
|
ProxyMethod({
|
|
2182
2221
|
infixBefore: "Sequence",
|
|
@@ -2188,7 +2227,7 @@ __decorateClass([
|
|
|
2188
2227
|
__decorateParam(2, ProxyParameter(countParameterDescriptor)),
|
|
2189
2228
|
__decorateParam(3, ProxyParameter(exclusionNoneParameterDescriptor)),
|
|
2190
2229
|
__decorateParam(4, ProxyParameter(tweakParameterDescriptor))
|
|
2191
|
-
],
|
|
2230
|
+
], CharacterSetCreatorProxy.prototype, "createSequence", 1);
|
|
2192
2231
|
__decorateClass([
|
|
2193
2232
|
ProxyMethod({
|
|
2194
2233
|
type: Types.Number,
|
|
@@ -2197,8 +2236,8 @@ __decorateClass([
|
|
|
2197
2236
|
__decorateParam(0, ProxyParameter(valueForSParameterDescriptor)),
|
|
2198
2237
|
__decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor)),
|
|
2199
2238
|
__decorateParam(2, ProxyParameter(tweakParameterDescriptor))
|
|
2200
|
-
],
|
|
2201
|
-
var NumericProxy = class extends
|
|
2239
|
+
], CharacterSetCreatorProxy.prototype, "valueFor", 1);
|
|
2240
|
+
var NumericProxy = class extends CharacterSetCreatorProxy {
|
|
2202
2241
|
constructor(appExtension) {
|
|
2203
2242
|
super(appExtension, import_utility5.NUMERIC_CREATOR);
|
|
2204
2243
|
}
|
|
@@ -2214,7 +2253,7 @@ NumericProxy = __decorateClass([
|
|
|
2214
2253
|
]
|
|
2215
2254
|
})
|
|
2216
2255
|
], NumericProxy);
|
|
2217
|
-
var HexadecimalProxy = class extends
|
|
2256
|
+
var HexadecimalProxy = class extends CharacterSetCreatorProxy {
|
|
2218
2257
|
constructor(appExtension) {
|
|
2219
2258
|
super(appExtension, import_utility5.HEXADECIMAL_CREATOR);
|
|
2220
2259
|
}
|
|
@@ -2230,7 +2269,7 @@ HexadecimalProxy = __decorateClass([
|
|
|
2230
2269
|
]
|
|
2231
2270
|
})
|
|
2232
2271
|
], HexadecimalProxy);
|
|
2233
|
-
var AlphabeticProxy = class extends
|
|
2272
|
+
var AlphabeticProxy = class extends CharacterSetCreatorProxy {
|
|
2234
2273
|
constructor(appExtension) {
|
|
2235
2274
|
super(appExtension, import_utility5.ALPHABETIC_CREATOR);
|
|
2236
2275
|
}
|
|
@@ -2240,7 +2279,7 @@ AlphabeticProxy = __decorateClass([
|
|
|
2240
2279
|
methodInfix: "Alphabetic"
|
|
2241
2280
|
})
|
|
2242
2281
|
], AlphabeticProxy);
|
|
2243
|
-
var AlphanumericProxy = class extends
|
|
2282
|
+
var AlphanumericProxy = class extends CharacterSetCreatorProxy {
|
|
2244
2283
|
constructor(appExtension) {
|
|
2245
2284
|
super(appExtension, import_utility5.ALPHANUMERIC_CREATOR);
|
|
2246
2285
|
}
|
|
@@ -2261,6 +2300,7 @@ AlphanumericProxy = __decorateClass([
|
|
|
2261
2300
|
var gs1_exports = {};
|
|
2262
2301
|
__export(gs1_exports, {
|
|
2263
2302
|
AI39Proxy: () => AI39Proxy,
|
|
2303
|
+
AI64Proxy: () => AI64Proxy,
|
|
2264
2304
|
AI82Proxy: () => AI82Proxy,
|
|
2265
2305
|
CPIDCreatorProxy: () => CPIDCreatorProxy,
|
|
2266
2306
|
CPIDValidatorProxy: () => CPIDValidatorProxy,
|
|
@@ -2295,7 +2335,7 @@ __export(gs1_exports, {
|
|
|
2295
2335
|
|
|
2296
2336
|
// src/gs1/character-set-proxy.ts
|
|
2297
2337
|
var import_gs12 = require("@aidc-toolkit/gs1");
|
|
2298
|
-
var AI82Proxy = class extends
|
|
2338
|
+
var AI82Proxy = class extends CharacterSetCreatorProxy {
|
|
2299
2339
|
constructor(appExtension) {
|
|
2300
2340
|
super(appExtension, import_gs12.AI82_CREATOR);
|
|
2301
2341
|
}
|
|
@@ -2312,7 +2352,7 @@ AI82Proxy = __decorateClass([
|
|
|
2312
2352
|
]
|
|
2313
2353
|
})
|
|
2314
2354
|
], AI82Proxy);
|
|
2315
|
-
var AI39Proxy = class extends
|
|
2355
|
+
var AI39Proxy = class extends CharacterSetCreatorProxy {
|
|
2316
2356
|
constructor(appExtension) {
|
|
2317
2357
|
super(appExtension, import_gs12.AI39_CREATOR);
|
|
2318
2358
|
}
|
|
@@ -2329,6 +2369,17 @@ AI39Proxy = __decorateClass([
|
|
|
2329
2369
|
]
|
|
2330
2370
|
})
|
|
2331
2371
|
], AI39Proxy);
|
|
2372
|
+
var AI64Proxy = class extends CharacterSetValidatorProxy {
|
|
2373
|
+
constructor(appExtension) {
|
|
2374
|
+
super(appExtension, import_gs12.AI64_VALIDATOR);
|
|
2375
|
+
}
|
|
2376
|
+
};
|
|
2377
|
+
AI64Proxy = __decorateClass([
|
|
2378
|
+
ProxyClass({
|
|
2379
|
+
namespace: "GS1",
|
|
2380
|
+
methodInfix: "AI64"
|
|
2381
|
+
})
|
|
2382
|
+
], AI64Proxy);
|
|
2332
2383
|
|
|
2333
2384
|
// src/gs1/check-proxy.ts
|
|
2334
2385
|
var import_gs13 = require("@aidc-toolkit/gs1");
|
|
@@ -2498,7 +2549,7 @@ __decorateClass([
|
|
|
2498
2549
|
], NonNumericIdentifierValidatorProxy.prototype, "validate", 1);
|
|
2499
2550
|
var GTIN13ValidatorProxy = class extends GTINValidatorProxy {
|
|
2500
2551
|
constructor(appExtension) {
|
|
2501
|
-
super(appExtension, import_gs14.
|
|
2552
|
+
super(appExtension, import_gs14.IdentifierValidators.GTIN[import_gs14.GTINTypes.GTIN13]);
|
|
2502
2553
|
}
|
|
2503
2554
|
};
|
|
2504
2555
|
GTIN13ValidatorProxy = __decorateClass([
|
|
@@ -2509,7 +2560,7 @@ GTIN13ValidatorProxy = __decorateClass([
|
|
|
2509
2560
|
], GTIN13ValidatorProxy);
|
|
2510
2561
|
var GTIN12ValidatorProxy = class extends GTINValidatorProxy {
|
|
2511
2562
|
constructor(appExtension) {
|
|
2512
|
-
super(appExtension, import_gs14.
|
|
2563
|
+
super(appExtension, import_gs14.IdentifierValidators.GTIN[import_gs14.GTINTypes.GTIN12]);
|
|
2513
2564
|
}
|
|
2514
2565
|
};
|
|
2515
2566
|
GTIN12ValidatorProxy = __decorateClass([
|
|
@@ -2520,7 +2571,7 @@ GTIN12ValidatorProxy = __decorateClass([
|
|
|
2520
2571
|
], GTIN12ValidatorProxy);
|
|
2521
2572
|
var GTIN8ValidatorProxy = class extends GTINValidatorProxy {
|
|
2522
2573
|
constructor(appExtension) {
|
|
2523
|
-
super(appExtension, import_gs14.
|
|
2574
|
+
super(appExtension, import_gs14.IdentifierValidators.GTIN[import_gs14.GTINTypes.GTIN8]);
|
|
2524
2575
|
}
|
|
2525
2576
|
};
|
|
2526
2577
|
GTIN8ValidatorProxy = __decorateClass([
|
|
@@ -2679,7 +2730,7 @@ GTINValidatorStaticProxy = __decorateClass([
|
|
|
2679
2730
|
], GTINValidatorStaticProxy);
|
|
2680
2731
|
var GLNValidatorProxy = class extends NonGTINNumericIdentifierValidatorProxy {
|
|
2681
2732
|
constructor(appExtension) {
|
|
2682
|
-
super(appExtension, import_gs14.
|
|
2733
|
+
super(appExtension, import_gs14.IdentifierValidators.GLN);
|
|
2683
2734
|
}
|
|
2684
2735
|
};
|
|
2685
2736
|
GLNValidatorProxy = __decorateClass([
|
|
@@ -2690,7 +2741,7 @@ GLNValidatorProxy = __decorateClass([
|
|
|
2690
2741
|
], GLNValidatorProxy);
|
|
2691
2742
|
var SSCCValidatorProxy = class extends NonGTINNumericIdentifierValidatorProxy {
|
|
2692
2743
|
constructor(appExtension) {
|
|
2693
|
-
super(appExtension, import_gs14.
|
|
2744
|
+
super(appExtension, import_gs14.IdentifierValidators.SSCC);
|
|
2694
2745
|
}
|
|
2695
2746
|
};
|
|
2696
2747
|
SSCCValidatorProxy = __decorateClass([
|
|
@@ -2701,7 +2752,7 @@ SSCCValidatorProxy = __decorateClass([
|
|
|
2701
2752
|
], SSCCValidatorProxy);
|
|
2702
2753
|
var GRAIValidatorProxy = class extends SerializableNumericIdentifierValidatorProxy {
|
|
2703
2754
|
constructor(appExtension) {
|
|
2704
|
-
super(appExtension, import_gs14.
|
|
2755
|
+
super(appExtension, import_gs14.IdentifierValidators.GRAI);
|
|
2705
2756
|
}
|
|
2706
2757
|
};
|
|
2707
2758
|
GRAIValidatorProxy = __decorateClass([
|
|
@@ -2712,7 +2763,7 @@ GRAIValidatorProxy = __decorateClass([
|
|
|
2712
2763
|
], GRAIValidatorProxy);
|
|
2713
2764
|
var GIAIValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
|
|
2714
2765
|
constructor(appExtension) {
|
|
2715
|
-
super(appExtension, import_gs14.
|
|
2766
|
+
super(appExtension, import_gs14.IdentifierValidators.GIAI);
|
|
2716
2767
|
}
|
|
2717
2768
|
};
|
|
2718
2769
|
GIAIValidatorProxy = __decorateClass([
|
|
@@ -2723,7 +2774,7 @@ GIAIValidatorProxy = __decorateClass([
|
|
|
2723
2774
|
], GIAIValidatorProxy);
|
|
2724
2775
|
var GSRNValidatorProxy = class extends NonGTINNumericIdentifierValidatorProxy {
|
|
2725
2776
|
constructor(appExtension) {
|
|
2726
|
-
super(appExtension, import_gs14.
|
|
2777
|
+
super(appExtension, import_gs14.IdentifierValidators.GSRN);
|
|
2727
2778
|
}
|
|
2728
2779
|
};
|
|
2729
2780
|
GSRNValidatorProxy = __decorateClass([
|
|
@@ -2734,7 +2785,7 @@ GSRNValidatorProxy = __decorateClass([
|
|
|
2734
2785
|
], GSRNValidatorProxy);
|
|
2735
2786
|
var GDTIValidatorProxy = class extends SerializableNumericIdentifierValidatorProxy {
|
|
2736
2787
|
constructor(appExtension) {
|
|
2737
|
-
super(appExtension, import_gs14.
|
|
2788
|
+
super(appExtension, import_gs14.IdentifierValidators.GDTI);
|
|
2738
2789
|
}
|
|
2739
2790
|
};
|
|
2740
2791
|
GDTIValidatorProxy = __decorateClass([
|
|
@@ -2745,7 +2796,7 @@ GDTIValidatorProxy = __decorateClass([
|
|
|
2745
2796
|
], GDTIValidatorProxy);
|
|
2746
2797
|
var GINCValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
|
|
2747
2798
|
constructor(appExtension) {
|
|
2748
|
-
super(appExtension, import_gs14.
|
|
2799
|
+
super(appExtension, import_gs14.IdentifierValidators.GINC);
|
|
2749
2800
|
}
|
|
2750
2801
|
};
|
|
2751
2802
|
GINCValidatorProxy = __decorateClass([
|
|
@@ -2756,7 +2807,7 @@ GINCValidatorProxy = __decorateClass([
|
|
|
2756
2807
|
], GINCValidatorProxy);
|
|
2757
2808
|
var GSINValidatorProxy = class extends NonGTINNumericIdentifierValidatorProxy {
|
|
2758
2809
|
constructor(appExtension) {
|
|
2759
|
-
super(appExtension, import_gs14.
|
|
2810
|
+
super(appExtension, import_gs14.IdentifierValidators.GSIN);
|
|
2760
2811
|
}
|
|
2761
2812
|
};
|
|
2762
2813
|
GSINValidatorProxy = __decorateClass([
|
|
@@ -2767,7 +2818,7 @@ GSINValidatorProxy = __decorateClass([
|
|
|
2767
2818
|
], GSINValidatorProxy);
|
|
2768
2819
|
var GCNValidatorProxy = class extends SerializableNumericIdentifierValidatorProxy {
|
|
2769
2820
|
constructor(appExtension) {
|
|
2770
|
-
super(appExtension, import_gs14.
|
|
2821
|
+
super(appExtension, import_gs14.IdentifierValidators.GCN);
|
|
2771
2822
|
}
|
|
2772
2823
|
};
|
|
2773
2824
|
GCNValidatorProxy = __decorateClass([
|
|
@@ -2778,7 +2829,7 @@ GCNValidatorProxy = __decorateClass([
|
|
|
2778
2829
|
], GCNValidatorProxy);
|
|
2779
2830
|
var CPIDValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
|
|
2780
2831
|
constructor(appExtension) {
|
|
2781
|
-
super(appExtension, import_gs14.
|
|
2832
|
+
super(appExtension, import_gs14.IdentifierValidators.CPID);
|
|
2782
2833
|
}
|
|
2783
2834
|
};
|
|
2784
2835
|
CPIDValidatorProxy = __decorateClass([
|
|
@@ -2789,7 +2840,7 @@ CPIDValidatorProxy = __decorateClass([
|
|
|
2789
2840
|
], CPIDValidatorProxy);
|
|
2790
2841
|
var GMNValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
|
|
2791
2842
|
constructor(appExtension) {
|
|
2792
|
-
super(appExtension, import_gs14.
|
|
2843
|
+
super(appExtension, import_gs14.IdentifierValidators.GMN);
|
|
2793
2844
|
}
|
|
2794
2845
|
};
|
|
2795
2846
|
GMNValidatorProxy = __decorateClass([
|
|
@@ -2882,7 +2933,11 @@ var IdentifierCreatorProxy = class _IdentifierCreatorProxy extends LibProxy {
|
|
|
2882
2933
|
maximumPrefixType: _IdentifierCreatorProxy.PREFIX_TYPES.length - 1
|
|
2883
2934
|
}));
|
|
2884
2935
|
}
|
|
2885
|
-
const
|
|
2936
|
+
const prefixType = _IdentifierCreatorProxy.PREFIX_TYPES[prefixTypeIndex];
|
|
2937
|
+
if (prefixType === void 0) {
|
|
2938
|
+
throw new RangeError(i18nextAppExtension.t("IdentifierCreatorProxy.invalidPrefixType"));
|
|
2939
|
+
}
|
|
2940
|
+
const prefixManager = import_gs14.PrefixManager.get(prefixType, prefix);
|
|
2886
2941
|
const tweakFactor = reducedPrefixDefinition[2];
|
|
2887
2942
|
if (!(0, import_core3.isNullish)(tweakFactor)) {
|
|
2888
2943
|
if (typeof tweakFactor !== "number") {
|
|
@@ -3180,6 +3235,9 @@ GMNCreatorProxy = __decorateClass([
|
|
|
3180
3235
|
|
|
3181
3236
|
// src/generator/generator.ts
|
|
3182
3237
|
var import_core4 = require("@aidc-toolkit/core");
|
|
3238
|
+
function registerProxies(..._proxies) {
|
|
3239
|
+
}
|
|
3240
|
+
registerProxies(AppUtilityProxy, utility_exports, gs1_exports);
|
|
3183
3241
|
var Generator = class _Generator {
|
|
3184
3242
|
/**
|
|
3185
3243
|
* Documentation base URL.
|
|
@@ -3245,7 +3303,7 @@ var Generator = class _Generator {
|
|
|
3245
3303
|
getFunctionLocalization(namespaceFunctionName, locale) {
|
|
3246
3304
|
const functionLocalization = this._functionLocalizationsMapsMap.get(namespaceFunctionName)?.get(locale);
|
|
3247
3305
|
if (functionLocalization === void 0) {
|
|
3248
|
-
throw new Error(
|
|
3306
|
+
throw new Error(`${locale} localization for function ${namespaceFunctionName} not found`);
|
|
3249
3307
|
}
|
|
3250
3308
|
return functionLocalization;
|
|
3251
3309
|
}
|
|
@@ -3267,7 +3325,7 @@ var Generator = class _Generator {
|
|
|
3267
3325
|
getParameterLocalization(namespaceFunctionName, parameterName, locale) {
|
|
3268
3326
|
const parameterLocalization = this._parameterLocalizationsMapsMap.get(`${namespaceFunctionName}.${parameterName}`)?.get(locale);
|
|
3269
3327
|
if (parameterLocalization === void 0) {
|
|
3270
|
-
throw new Error(
|
|
3328
|
+
throw new Error(`${locale} localization for function ${namespaceFunctionName} parameter ${parameterName} not found`);
|
|
3271
3329
|
}
|
|
3272
3330
|
return parameterLocalization;
|
|
3273
3331
|
}
|
|
@@ -3333,7 +3391,7 @@ var Generator = class _Generator {
|
|
|
3333
3391
|
} else {
|
|
3334
3392
|
const insertIndex = methodName.indexOf(infixBefore);
|
|
3335
3393
|
if (insertIndex === -1) {
|
|
3336
|
-
throw new Error(`Cannot find "${infixBefore}" in method
|
|
3394
|
+
throw new Error(`Cannot find "${infixBefore}" in method ${methodName}`);
|
|
3337
3395
|
}
|
|
3338
3396
|
functionName = `${methodName.substring(0, insertIndex)}${methodInfix}${methodName.substring(insertIndex)}`;
|
|
3339
3397
|
}
|
|
@@ -3376,7 +3434,8 @@ var Generator = class _Generator {
|
|
|
3376
3434
|
AlphanumericProxy,
|
|
3377
3435
|
AppExtension,
|
|
3378
3436
|
AppUtilityProxy,
|
|
3379
|
-
|
|
3437
|
+
CharacterSetCreatorProxy,
|
|
3438
|
+
CharacterSetValidatorProxy,
|
|
3380
3439
|
GS1,
|
|
3381
3440
|
Generator,
|
|
3382
3441
|
HexadecimalProxy,
|