@aidc-toolkit/app-extension 1.0.31-beta → 1.0.33-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.
Files changed (45) hide show
  1. package/dist/index.cjs +1 -3709
  2. package/dist/index.d.cts +607 -333
  3. package/dist/index.d.ts +607 -333
  4. package/dist/index.js +1 -3683
  5. package/package.json +12 -13
  6. package/src/app-extension.ts +141 -93
  7. package/src/app-helper-proxy.ts +326 -0
  8. package/src/descriptor.ts +75 -7
  9. package/src/generator/generator.ts +118 -96
  10. package/src/generator/locale-resources-generator.ts +56 -42
  11. package/src/gs1/character-set-proxy.ts +8 -8
  12. package/src/gs1/check-proxy.ts +26 -25
  13. package/src/gs1/gtin-creator-proxy.ts +14 -28
  14. package/src/gs1/gtin-descriptor.ts +2 -23
  15. package/src/gs1/gtin-validator-proxy.ts +45 -48
  16. package/src/gs1/identifier-creator-proxy.ts +63 -53
  17. package/src/gs1/identifier-descriptor.ts +15 -0
  18. package/src/gs1/identifier-type.ts +37 -0
  19. package/src/gs1/identifier-validator-proxy.ts +59 -27
  20. package/src/gs1/index.ts +8 -0
  21. package/src/gs1/non-gtin-creator-proxy.ts +22 -33
  22. package/src/gs1/non-gtin-validator-proxy.ts +22 -33
  23. package/src/gs1/prefix-definition-descriptor.ts +2 -2
  24. package/src/gs1/prefix-manager-proxy.ts +164 -9
  25. package/src/gs1/service-proxy.ts +57 -0
  26. package/src/gs1/variable-measure-proxy.ts +62 -0
  27. package/src/index.ts +6 -1
  28. package/src/lib-proxy.ts +112 -70
  29. package/src/locale/en/locale-resources.ts +173 -47
  30. package/src/locale/fr/locale-resources.ts +173 -47
  31. package/src/locale/i18n.ts +8 -10
  32. package/src/locale/i18next.d.ts +2 -0
  33. package/src/proxy.ts +140 -140
  34. package/src/streaming.ts +13 -0
  35. package/src/type.ts +8 -7
  36. package/src/utility/character-set-descriptor.ts +2 -2
  37. package/src/utility/character-set-proxy.ts +39 -38
  38. package/src/utility/reg-exp-proxy.ts +12 -11
  39. package/src/utility/string-descriptor.ts +2 -2
  40. package/src/utility/string-proxy.ts +7 -7
  41. package/src/utility/transformer-descriptor.ts +5 -5
  42. package/src/utility/transformer-proxy.ts +25 -18
  43. package/dist/index.cjs.map +0 -1
  44. package/dist/index.js.map +0 -1
  45. package/src/app-utility-proxy.ts +0 -273
@@ -3,9 +3,20 @@ export default {
3
3
  sequenceCountMustBeLessThanOrEqualTo: "Sequence count {{sequenceCount, number}} must be less than or equal to {{maximumSequenceCount, number}}"
4
4
  },
5
5
  Proxy: {
6
- vSpillMustBeHorizontalArray: "Input must be a horizontal array",
7
- hSpillMustBeVerticalArray: "Input must be a vertical array",
8
- matrixMustBeArray: "Input must be a one-dimensional array"
6
+ matrixMustBeArray: "Input matrix must be one-dimensional"
7
+ },
8
+ Categories: {
9
+ helper: "Helper",
10
+ transformation: "Transformation",
11
+ string: "String",
12
+ GS1: {
13
+ checkCharacter: "Check character",
14
+ identifierValidation: "Identifier validation",
15
+ identifierCreation: "Identifier creation",
16
+ variableMeasure: "Variable measure",
17
+ prefix: "Prefix",
18
+ service: "Service"
19
+ }
9
20
  },
10
21
  IdentifierCreatorProxy: {
11
22
  prefixDefinitionMustBeOneDimensional: "Prefix definition must be a one-dimensional matrix",
@@ -15,22 +26,25 @@ export default {
15
26
  invalidPrefixType: "Invalid prefix type",
16
27
  tweakFactorMustBeNumber: "Tweak factor must be a number"
17
28
  },
29
+ ServiceProxy: {
30
+ invalidIdentifierType: "Invalid identifier type \"{{identifierType}}\""
31
+ },
18
32
  Parameters: {
19
- spillMatrix: {
20
- name: "matrix",
21
- description: "One-dimensional matrix to spill."
33
+ spillArray: {
34
+ name: "array",
35
+ description: "Array to spill."
22
36
  },
23
37
  spillMaximumWidth: {
24
38
  name: "maximumWidth",
25
- description: "Maximum width into which to spill the matrix. If not provided, the remaining width is used."
39
+ description: "Maximum width into which to spill the array. If not provided, the remaining sheet width is used."
26
40
  },
27
41
  spillMaximumHeight: {
28
42
  name: "maximumHeight",
29
- description: "Maximum height into which to spill the matrix. If not provided, the remaining height is used."
43
+ description: "Maximum height into which to spill the array. If not provided, the remaining sheet height is used."
30
44
  },
31
45
  domain: {
32
46
  name: "domain",
33
- description: "Transformation domain. Valid input values are from zero to domain-1."
47
+ description: "Transformation domain. Valid input values are from *0* to *domain-1*."
34
48
  },
35
49
  value: {
36
50
  name: "value",
@@ -42,7 +56,7 @@ export default {
42
56
  },
43
57
  count: {
44
58
  name: "count",
45
- description: "Count of values to transform. If positive, values transformed are startValue to startValue+count-1. If negative, values transformed are startValue down to startValue+count+1."
59
+ description: "Count of values to transform. If positive, values transformed are *startValue* to *startValue+count-1*. If negative, values transformed are *startValue* down to *startValue+count+1*."
46
60
  },
47
61
  transformedValue: {
48
62
  name: "transformedValue",
@@ -70,19 +84,19 @@ export default {
70
84
  },
71
85
  exclusionNone: {
72
86
  name: "exclusion",
73
- description: "String values to exclude. The only valid value is 0 (no exclusions)."
87
+ description: "String values to exclude. The only valid value is *0* (no exclusions)."
74
88
  },
75
89
  exclusionFirstZero: {
76
90
  name: "exclusion",
77
- description: "String values to exclude. Valid values are 0 (no exclusions) and 1 (strings starting with 0 excluded)."
91
+ description: "String values to exclude. Valid values are *0* (no exclusions) and *1* (strings starting with 0 excluded)."
78
92
  },
79
93
  exclusionAllNumeric: {
80
94
  name: "exclusion",
81
- description: "String values to exclude. Valid values are 0 (no exclusions) and 2 (strings that are all numeric excluded)."
95
+ description: "String values to exclude. Valid values are *0* (no exclusions) and *2* (strings that are all numeric excluded)."
82
96
  },
83
97
  exclusionAny: {
84
98
  name: "exclusion",
85
- description: "String values to exclude. Valid values are 0 (no exclusions), 1 (strings starting with 0 excluded), and 2 (strings that are all numeric excluded)."
99
+ description: "String values to exclude. Valid values are *0* (no exclusions), *1* (strings starting with 0 excluded), and *2* (strings that are all numeric excluded)."
86
100
  },
87
101
  length: {
88
102
  name: "length",
@@ -116,6 +130,10 @@ export default {
116
130
  name: "identifier",
117
131
  description: "Identifier to validate."
118
132
  },
133
+ splitIdentifier: {
134
+ name: "splitIdentifier",
135
+ description: "Identifier to split."
136
+ },
119
137
  zeroSuppressibleGTIN12: {
120
138
  name: "gtin12",
121
139
  description: "GTIN-12 for which to suppress zeros."
@@ -140,25 +158,25 @@ export default {
140
158
  name: "gtin14",
141
159
  description: "GTIN-14 to validate."
142
160
  },
161
+ gcpLengthIdentifier: {
162
+ name: "identifier",
163
+ description: "Identifier for which to get the GS1 Company Prefix length."
164
+ },
143
165
  baseIdentifier: {
144
166
  name: "baseIdentifier",
145
167
  description: "Base identifier."
146
168
  },
169
+ hyperlinkIdentifier: {
170
+ name: "identifier",
171
+ description: "Identifier for which to create hyperlink."
172
+ },
147
173
  indicatorDigit: {
148
174
  name: "indicatorDigit",
149
175
  description: "Indicator digit."
150
176
  },
151
177
  gtinLevel: {
152
178
  name: "level",
153
- description: "Level at which to validate the GTIN. Valid values are 0 (any), 1 (retail consumer trade item), and 2 (other than retail consumer trade item level)."
154
- },
155
- rcnFormat: {
156
- name: "format",
157
- description: "Restricted Circulation Number format."
158
- },
159
- rcn: {
160
- name: "rcn",
161
- description: "Restricted Circulation Number to parse."
179
+ description: "Level at which to validate the GTIN. Valid values are *0* (any), *1* (retail consumer trade item), and *2* (other than retail consumer trade item level)."
162
180
  },
163
181
  prefix: {
164
182
  name: "prefix",
@@ -166,24 +184,44 @@ export default {
166
184
  },
167
185
  prefixType: {
168
186
  name: "prefixType",
169
- description: "Prefix type. Valid values are 0 (GS1 Company Prefix), 1 (U.P.C. Company Prefix), and 2 (GS1 Prefix)."
187
+ description: "Prefix type. Valid values are *0* (GS1 Company Prefix), *1* (U.P.C. Company Prefix), and *2* (GS1 Prefix)."
170
188
  },
171
189
  tweakFactor: {
172
190
  name: "tweakFactor",
173
191
  description: "Tweak factor, used to support the creation of sparse identifiers. The default tweak factor is based on the GS1 Company Prefix, and is usually sufficient for obfuscation. This allows more control over the encryption when higher security is required."
174
192
  },
193
+ identifierType: {
194
+ name: "identifierType",
195
+ description: "Identifier type (GTIN, GLN, SSCC, ...)."
196
+ },
175
197
  prefixDefinitionAny: {
176
198
  name: "prefixDefinition",
177
- description: "Prefix definition, either a simple GS1 Company Prefix (as a string) or the result of a call to definePrefix. Any prefix type is supported."
199
+ description: "Prefix definition, either a simple GS1 Company Prefix (as a string) or the result of a call to *definePrefix*. Any prefix type is supported."
178
200
  },
179
201
  prefixDefinitionGS1UPC: {
180
202
  name: "prefixDefinition",
181
- description: "Prefix definition, either a simple GS1 Company Prefix (as a string) or the result of a call to definePrefix. Only prefix types 0 (GS1 Company Prefix) and 1 (U.P.C. Company Prefix) are supported."
203
+ description: "Prefix definition, either a simple GS1 Company Prefix (as a string) or the result of a call to *definePrefix*. Only prefix types *0* (GS1 Company Prefix) and *1* (U.P.C. Company Prefix) are supported."
182
204
  },
183
205
  sparse: {
184
206
  name: "sparse",
185
207
  description: "If true, value is mapped to a sparse sequence resistant to discovery. Default is false."
186
208
  },
209
+ serialComponent: {
210
+ name: "serialComponent",
211
+ description: "Serial component."
212
+ },
213
+ reference: {
214
+ name: "reference",
215
+ description: "Reference portion of identifier."
216
+ },
217
+ rcnFormat: {
218
+ name: "format",
219
+ description: "Restricted Circulation Number format."
220
+ },
221
+ rcn: {
222
+ name: "rcn",
223
+ description: "Restricted Circulation Number to parse."
224
+ },
187
225
  rcnItemReference: {
188
226
  name: "itemReference",
189
227
  description: "Item reference."
@@ -192,13 +230,13 @@ export default {
192
230
  name: "priceOrWeight",
193
231
  description: "Price or weight (whole number only)."
194
232
  },
195
- serialComponent: {
196
- name: "serialComponent",
197
- description: "Serial component."
233
+ hyperlinkText: {
234
+ name: "text",
235
+ description: "Text for hyperlink. If not provided, the identifier is used."
198
236
  },
199
- reference: {
200
- name: "reference",
201
- description: "Reference portion of identifier."
237
+ hyperlinkDetails: {
238
+ name: "details",
239
+ description: "Details to display when hovering over hyperlink."
202
240
  }
203
241
  },
204
242
  Functions: {
@@ -206,13 +244,9 @@ export default {
206
244
  name: "version",
207
245
  description: "Get the version of the AIDC Toolkit."
208
246
  },
209
- vSpill: {
210
- name: "vSpill",
211
- description: "Spill a horizontal array vertically to fit within a given maximum width and height."
212
- },
213
- hSpill: {
214
- name: "hSpill",
215
- description: "Spill a vertical array horizontally to fit within a given maximum height and width."
247
+ spill: {
248
+ name: "spill",
249
+ description: "Spill a one-dimensional matrix to fit a rectangle within a given maximum height and width."
216
250
  },
217
251
  forwardTransform: {
218
252
  name: "forwardTransform",
@@ -391,14 +425,26 @@ export default {
391
425
  name: "validateGTIN13",
392
426
  description: "Validate a GTIN-13."
393
427
  },
428
+ isValidGTIN13: {
429
+ name: "isValidGTIN13",
430
+ description: "Determine if a GTIN-13 is valid."
431
+ },
394
432
  validateGTIN12: {
395
433
  name: "validateGTIN12",
396
434
  description: "Validate a GTIN-12."
397
435
  },
436
+ isValidGTIN12: {
437
+ name: "isValidGTIN12",
438
+ description: "Determine if a GTIN-12 is valid."
439
+ },
398
440
  validateGTIN8: {
399
441
  name: "validateGTIN8",
400
442
  description: "Validate a GTIN-8."
401
443
  },
444
+ isValidGTIN8: {
445
+ name: "isValidGTIN8",
446
+ description: "Determine if a GTIN-8 is valid."
447
+ },
402
448
  zeroSuppressGTIN12: {
403
449
  name: "zeroSuppressGTIN12",
404
450
  description: "Zero-suppress a GTIN-12."
@@ -417,64 +463,136 @@ export default {
417
463
  },
418
464
  validateGTIN: {
419
465
  name: "validateGTIN",
420
- description: "Validate any GTIN."
466
+ description: "Validate a GTIN of any length."
467
+ },
468
+ isValidGTIN: {
469
+ name: "isValidGTIN",
470
+ description: "Determine if a GTIN of any length is valid."
421
471
  },
422
472
  validateGTIN14: {
423
473
  name: "validateGTIN14",
424
474
  description: "Validate a GTIN-14."
425
475
  },
426
- parseVariableMeasureRCN: {
427
- name: "parseVariableMeasureRCN",
428
- description: "Parse a Restricted Circulation Number (RCN) using a variable measure trade item format."
476
+ isValidGTIN14: {
477
+ name: "isValidGTIN14",
478
+ description: "Determine if a GTIN-14 is valid."
429
479
  },
430
480
  validateGLN: {
431
481
  name: "validateGLN",
432
482
  description: "Validate a GLN."
433
483
  },
484
+ isValidGLN: {
485
+ name: "isValidGLN",
486
+ description: "Determine if a GLN is valid."
487
+ },
434
488
  validateSSCC: {
435
489
  name: "validateSSCC",
436
490
  description: "Validate an SSCC."
437
491
  },
492
+ isValidSSCC: {
493
+ name: "isValidSSCC",
494
+ description: "Determine if an SSCC is valid."
495
+ },
438
496
  validateGRAI: {
439
497
  name: "validateGRAI",
440
498
  description: "Validate a GRAI."
441
499
  },
500
+ isValidGRAI: {
501
+ name: "isValidGRAI",
502
+ description: "Determine if a GRAI is valid."
503
+ },
504
+ splitGRAI: {
505
+ name: "splitGRAI",
506
+ description: "Split a GRAI into its base identifier and serial component."
507
+ },
442
508
  validateGIAI: {
443
509
  name: "validateGIAI",
444
510
  description: "Validate a GIAI."
445
511
  },
512
+ isValidGIAI: {
513
+ name: "isValidGIAI",
514
+ description: "Determine if a GIAI is valid."
515
+ },
446
516
  validateGSRN: {
447
517
  name: "validateGSRN",
448
518
  description: "Validate a GSRN."
449
519
  },
520
+ isValidGSRN: {
521
+ name: "isValidGSRN",
522
+ description: "Determine if a GSRN is valid."
523
+ },
450
524
  validateGDTI: {
451
525
  name: "validateGDTI",
452
526
  description: "Validate a GDTI."
453
527
  },
528
+ isValidGDTI: {
529
+ name: "isValidGDTI",
530
+ description: "Determine if a GDTI is valid."
531
+ },
532
+ splitGDTI: {
533
+ name: "splitGDTI",
534
+ description: "Split a GDTI into its base identifier and serial component."
535
+ },
454
536
  validateGINC: {
455
537
  name: "validateGINC",
456
538
  description: "Validate a GINC."
457
539
  },
540
+ isValidGINC: {
541
+ name: "isValidGINC",
542
+ description: "Determine if a GINC is valid."
543
+ },
458
544
  validateGSIN: {
459
545
  name: "validateGSIN",
460
546
  description: "Validate a GSIN."
461
547
  },
548
+ isValidGSIN: {
549
+ name: "isValidGSIN",
550
+ description: "Determine if a GSIN is valid."
551
+ },
462
552
  validateGCN: {
463
553
  name: "validateGCN",
464
554
  description: "Validate a GCN."
465
555
  },
556
+ isValidGCN: {
557
+ name: "isValidGCN",
558
+ description: "Determine if a GCN is valid."
559
+ },
560
+ splitGCN: {
561
+ name: "splitGCN",
562
+ description: "Split a GCN into its base identifier and serial component."
563
+ },
466
564
  validateCPID: {
467
565
  name: "validateCPID",
468
566
  description: "Validate a CPID."
469
567
  },
568
+ isValidCPID: {
569
+ name: "isValidCPID",
570
+ description: "Determine if a CPID is valid."
571
+ },
470
572
  validateGMN: {
471
573
  name: "validateGMN",
472
574
  description: "Validate a GMN."
473
575
  },
576
+ isValidGMN: {
577
+ name: "isValidGMN",
578
+ description: "Determine if a GMN is valid."
579
+ },
474
580
  definePrefix: {
475
581
  name: "definePrefix",
476
582
  description: "Define a prefix for use in GS1 identifier creation functions."
477
583
  },
584
+ gcpLength: {
585
+ name: "gcpLength",
586
+ description: "Get the length of a GS1 Company Prefix for an identifier."
587
+ },
588
+ gcpLengthDateTime: {
589
+ name: "gcpLengthDateTime",
590
+ description: "Get the date and time the GS1 Company Prefix length data was last updated."
591
+ },
592
+ gcpLengthDisclaimer: {
593
+ name: "gcpLengthDisclaimer",
594
+ description: "Get the disclaimer for the GS1 Company Prefix length data."
595
+ },
478
596
  createGTIN: {
479
597
  name: "createGTIN",
480
598
  description: "Create a GTIN."
@@ -491,10 +609,6 @@ export default {
491
609
  name: "createGTIN14",
492
610
  description: "Create a GTIN-14."
493
611
  },
494
- createVariableMeasureRCN: {
495
- name: "createVariableMeasureRCN",
496
- description: "Create a variable measure Restricted Circulation Number (RCN)."
497
- },
498
612
  createGLN: {
499
613
  name: "createGLN",
500
614
  description: "Create a GLN."
@@ -618,6 +732,18 @@ export default {
618
732
  createGMN: {
619
733
  name: "createGMN",
620
734
  description: "Create a GMN."
735
+ },
736
+ parseVariableMeasureRCN: {
737
+ name: "parseVariableMeasureRCN",
738
+ description: "Parse a Restricted Circulation Number (RCN) using a variable measure trade item format."
739
+ },
740
+ createVariableMeasureRCN: {
741
+ name: "createVariableMeasureRCN",
742
+ description: "Create a variable measure Restricted Circulation Number (RCN)."
743
+ },
744
+ verifiedByGS1: {
745
+ name: "verifiedByGS1",
746
+ description: "Create a Verified by GS1 hyperlink."
621
747
  }
622
748
  }
623
749
  }