@aidc-toolkit/app-extension 1.0.31-beta → 1.0.32-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 (40) hide show
  1. package/dist/index.cjs +3446 -627
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +575 -300
  4. package/dist/index.d.ts +575 -300
  5. package/dist/index.js +3435 -610
  6. package/dist/index.js.map +1 -1
  7. package/package.json +8 -9
  8. package/src/app-data.ts +94 -0
  9. package/src/app-extension.ts +162 -93
  10. package/src/app-utility-proxy.ts +154 -103
  11. package/src/descriptor.ts +33 -6
  12. package/src/generator/generator.ts +3 -6
  13. package/src/generator/locale-resources-generator.ts +30 -28
  14. package/src/gs1/character-set-proxy.ts +8 -8
  15. package/src/gs1/check-proxy.ts +14 -14
  16. package/src/gs1/gtin-creator-proxy.ts +12 -25
  17. package/src/gs1/gtin-descriptor.ts +0 -21
  18. package/src/gs1/gtin-validator-proxy.ts +34 -35
  19. package/src/gs1/identifier-creator-proxy.ts +44 -32
  20. package/src/gs1/identifier-descriptor.ts +15 -0
  21. package/src/gs1/identifier-type.ts +37 -0
  22. package/src/gs1/identifier-validator-proxy.ts +52 -19
  23. package/src/gs1/index.ts +8 -0
  24. package/src/gs1/non-gtin-creator-proxy.ts +22 -22
  25. package/src/gs1/non-gtin-validator-proxy.ts +22 -22
  26. package/src/gs1/prefix-manager-proxy.ts +199 -4
  27. package/src/gs1/service-proxy.ts +56 -0
  28. package/src/gs1/variable-measure-proxy.ts +61 -0
  29. package/src/index.ts +6 -0
  30. package/src/lib-proxy.ts +112 -70
  31. package/src/locale/en/locale-resources.ts +147 -34
  32. package/src/locale/fr/locale-resources.ts +147 -34
  33. package/src/locale/i18n.ts +2 -5
  34. package/src/proxy.ts +82 -106
  35. package/src/streaming.ts +13 -0
  36. package/src/type.ts +8 -7
  37. package/src/utility/character-set-proxy.ts +33 -32
  38. package/src/utility/reg-exp-proxy.ts +7 -6
  39. package/src/utility/string-proxy.ts +3 -7
  40. package/src/utility/transformer-proxy.ts +19 -13
@@ -3,9 +3,7 @@ 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"
9
7
  },
10
8
  IdentifierCreatorProxy: {
11
9
  prefixDefinitionMustBeOneDimensional: "Prefix definition must be a one-dimensional matrix",
@@ -15,6 +13,9 @@ export default {
15
13
  invalidPrefixType: "Invalid prefix type",
16
14
  tweakFactorMustBeNumber: "Tweak factor must be a number"
17
15
  },
16
+ ServiceProxy: {
17
+ invalidIdentifierType: "Invalid identifier type \"{{identifierType}}\""
18
+ },
18
19
  Parameters: {
19
20
  spillMatrix: {
20
21
  name: "matrix",
@@ -22,11 +23,11 @@ export default {
22
23
  },
23
24
  spillMaximumWidth: {
24
25
  name: "maximumWidth",
25
- description: "Maximum width into which to spill the matrix. If not provided, the remaining width is used."
26
+ description: "Maximum width into which to spill the matrix. If not provided, the remaining sheet width is used."
26
27
  },
27
28
  spillMaximumHeight: {
28
29
  name: "maximumHeight",
29
- description: "Maximum height into which to spill the matrix. If not provided, the remaining height is used."
30
+ description: "Maximum height into which to spill the matrix. If not provided, the remaining sheet height is used."
30
31
  },
31
32
  domain: {
32
33
  name: "domain",
@@ -116,6 +117,10 @@ export default {
116
117
  name: "identifier",
117
118
  description: "Identifier to validate."
118
119
  },
120
+ splitIdentifier: {
121
+ name: "splitIdentifier",
122
+ description: "Identifier to split."
123
+ },
119
124
  zeroSuppressibleGTIN12: {
120
125
  name: "gtin12",
121
126
  description: "GTIN-12 for which to suppress zeros."
@@ -140,10 +145,18 @@ export default {
140
145
  name: "gtin14",
141
146
  description: "GTIN-14 to validate."
142
147
  },
148
+ gcpLengthIdentifier: {
149
+ name: "identifier",
150
+ description: "Identifier for which to get the GS1 Company Prefix length."
151
+ },
143
152
  baseIdentifier: {
144
153
  name: "baseIdentifier",
145
154
  description: "Base identifier."
146
155
  },
156
+ hyperlinkIdentifier: {
157
+ name: "identifier",
158
+ description: "Identifier for which to create hyperlink."
159
+ },
147
160
  indicatorDigit: {
148
161
  name: "indicatorDigit",
149
162
  description: "Indicator digit."
@@ -152,14 +165,6 @@ export default {
152
165
  name: "level",
153
166
  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
167
  },
155
- rcnFormat: {
156
- name: "format",
157
- description: "Restricted Circulation Number format."
158
- },
159
- rcn: {
160
- name: "rcn",
161
- description: "Restricted Circulation Number to parse."
162
- },
163
168
  prefix: {
164
169
  name: "prefix",
165
170
  description: "Prefix."
@@ -172,6 +177,10 @@ export default {
172
177
  name: "tweakFactor",
173
178
  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
179
  },
180
+ identifierType: {
181
+ name: "identifierType",
182
+ description: "Identifier type (GTIN, GLN, SSCC, ...)."
183
+ },
175
184
  prefixDefinitionAny: {
176
185
  name: "prefixDefinition",
177
186
  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."
@@ -184,6 +193,22 @@ export default {
184
193
  name: "sparse",
185
194
  description: "If true, value is mapped to a sparse sequence resistant to discovery. Default is false."
186
195
  },
196
+ serialComponent: {
197
+ name: "serialComponent",
198
+ description: "Serial component."
199
+ },
200
+ reference: {
201
+ name: "reference",
202
+ description: "Reference portion of identifier."
203
+ },
204
+ rcnFormat: {
205
+ name: "format",
206
+ description: "Restricted Circulation Number format."
207
+ },
208
+ rcn: {
209
+ name: "rcn",
210
+ description: "Restricted Circulation Number to parse."
211
+ },
187
212
  rcnItemReference: {
188
213
  name: "itemReference",
189
214
  description: "Item reference."
@@ -192,13 +217,13 @@ export default {
192
217
  name: "priceOrWeight",
193
218
  description: "Price or weight (whole number only)."
194
219
  },
195
- serialComponent: {
196
- name: "serialComponent",
197
- description: "Serial component."
220
+ hyperlinkText: {
221
+ name: "text",
222
+ description: "Text for hyperlink. If not provided, the identifier is used."
198
223
  },
199
- reference: {
200
- name: "reference",
201
- description: "Reference portion of identifier."
224
+ hyperlinkDetails: {
225
+ name: "details",
226
+ description: "Details to display when hovering over hyperlink."
202
227
  }
203
228
  },
204
229
  Functions: {
@@ -206,13 +231,9 @@ export default {
206
231
  name: "version",
207
232
  description: "Get the version of the AIDC Toolkit."
208
233
  },
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."
234
+ spill: {
235
+ name: "spill",
236
+ description: "Spill a one-dimensional matrix to fit a rectangle within a given maximum height and width."
216
237
  },
217
238
  forwardTransform: {
218
239
  name: "forwardTransform",
@@ -391,14 +412,26 @@ export default {
391
412
  name: "validateGTIN13",
392
413
  description: "Validate a GTIN-13."
393
414
  },
415
+ isValidGTIN13: {
416
+ name: "isValidGTIN13",
417
+ description: "Determine if a GTIN-13 is valid."
418
+ },
394
419
  validateGTIN12: {
395
420
  name: "validateGTIN12",
396
421
  description: "Validate a GTIN-12."
397
422
  },
423
+ isValidGTIN12: {
424
+ name: "isValidGTIN12",
425
+ description: "Determine if a GTIN-12 is valid."
426
+ },
398
427
  validateGTIN8: {
399
428
  name: "validateGTIN8",
400
429
  description: "Validate a GTIN-8."
401
430
  },
431
+ isValidGTIN8: {
432
+ name: "isValidGTIN8",
433
+ description: "Determine if a GTIN-8 is valid."
434
+ },
402
435
  zeroSuppressGTIN12: {
403
436
  name: "zeroSuppressGTIN12",
404
437
  description: "Zero-suppress a GTIN-12."
@@ -417,64 +450,136 @@ export default {
417
450
  },
418
451
  validateGTIN: {
419
452
  name: "validateGTIN",
420
- description: "Validate any GTIN."
453
+ description: "Validate a GTIN of any length."
454
+ },
455
+ isValidGTIN: {
456
+ name: "isValidGTIN",
457
+ description: "Determine if a GTIN of any length is valid."
421
458
  },
422
459
  validateGTIN14: {
423
460
  name: "validateGTIN14",
424
461
  description: "Validate a GTIN-14."
425
462
  },
426
- parseVariableMeasureRCN: {
427
- name: "parseVariableMeasureRCN",
428
- description: "Parse a Restricted Circulation Number (RCN) using a variable measure trade item format."
463
+ isValidGTIN14: {
464
+ name: "isValidGTIN14",
465
+ description: "Determine if a GTIN-14 is valid."
429
466
  },
430
467
  validateGLN: {
431
468
  name: "validateGLN",
432
469
  description: "Validate a GLN."
433
470
  },
471
+ isValidGLN: {
472
+ name: "isValidGLN",
473
+ description: "Determine if a GLN is valid."
474
+ },
434
475
  validateSSCC: {
435
476
  name: "validateSSCC",
436
477
  description: "Validate an SSCC."
437
478
  },
479
+ isValidSSCC: {
480
+ name: "isValidSSCC",
481
+ description: "Determine if an SSCC is valid."
482
+ },
438
483
  validateGRAI: {
439
484
  name: "validateGRAI",
440
485
  description: "Validate a GRAI."
441
486
  },
487
+ isValidGRAI: {
488
+ name: "isValidGRAI",
489
+ description: "Determine if a GRAI is valid."
490
+ },
491
+ splitGRAI: {
492
+ name: "splitGRAI",
493
+ description: "Split a GRAI into its base identifier and serial component."
494
+ },
442
495
  validateGIAI: {
443
496
  name: "validateGIAI",
444
497
  description: "Validate a GIAI."
445
498
  },
499
+ isValidGIAI: {
500
+ name: "isValidGIAI",
501
+ description: "Determine if a GIAI is valid."
502
+ },
446
503
  validateGSRN: {
447
504
  name: "validateGSRN",
448
505
  description: "Validate a GSRN."
449
506
  },
507
+ isValidGSRN: {
508
+ name: "isValidGSRN",
509
+ description: "Determine if a GSRN is valid."
510
+ },
450
511
  validateGDTI: {
451
512
  name: "validateGDTI",
452
513
  description: "Validate a GDTI."
453
514
  },
515
+ isValidGDTI: {
516
+ name: "isValidGDTI",
517
+ description: "Determine if a GDTI is valid."
518
+ },
519
+ splitGDTI: {
520
+ name: "splitGDTI",
521
+ description: "Split a GDTI into its base identifier and serial component."
522
+ },
454
523
  validateGINC: {
455
524
  name: "validateGINC",
456
525
  description: "Validate a GINC."
457
526
  },
527
+ isValidGINC: {
528
+ name: "isValidGINC",
529
+ description: "Determine if a GINC is valid."
530
+ },
458
531
  validateGSIN: {
459
532
  name: "validateGSIN",
460
533
  description: "Validate a GSIN."
461
534
  },
535
+ isValidGSIN: {
536
+ name: "isValidGSIN",
537
+ description: "Determine if a GSIN is valid."
538
+ },
462
539
  validateGCN: {
463
540
  name: "validateGCN",
464
541
  description: "Validate a GCN."
465
542
  },
543
+ isValidGCN: {
544
+ name: "isValidGCN",
545
+ description: "Determine if a GCN is valid."
546
+ },
547
+ splitGCN: {
548
+ name: "splitGCN",
549
+ description: "Split a GCN into its base identifier and serial component."
550
+ },
466
551
  validateCPID: {
467
552
  name: "validateCPID",
468
553
  description: "Validate a CPID."
469
554
  },
555
+ isValidCPID: {
556
+ name: "isValidCPID",
557
+ description: "Determine if a CPID is valid."
558
+ },
470
559
  validateGMN: {
471
560
  name: "validateGMN",
472
561
  description: "Validate a GMN."
473
562
  },
563
+ isValidGMN: {
564
+ name: "isValidGMN",
565
+ description: "Determine if a GMN is valid."
566
+ },
474
567
  definePrefix: {
475
568
  name: "definePrefix",
476
569
  description: "Define a prefix for use in GS1 identifier creation functions."
477
570
  },
571
+ gcpLength: {
572
+ name: "gcpLength",
573
+ description: "Get the length of a GS1 Company Prefix for an identifier."
574
+ },
575
+ gcpLengthDateTime: {
576
+ name: "gcpLengthDateTime",
577
+ description: "Get the date and time the GS1 Company Prefix length data was last updated."
578
+ },
579
+ gcpLengthDisclaimer: {
580
+ name: "gcpLengthDisclaimer",
581
+ description: "Get the disclaimer for the GS1 Company Prefix length data."
582
+ },
478
583
  createGTIN: {
479
584
  name: "createGTIN",
480
585
  description: "Create a GTIN."
@@ -491,10 +596,6 @@ export default {
491
596
  name: "createGTIN14",
492
597
  description: "Create a GTIN-14."
493
598
  },
494
- createVariableMeasureRCN: {
495
- name: "createVariableMeasureRCN",
496
- description: "Create a variable measure Restricted Circulation Number (RCN)."
497
- },
498
599
  createGLN: {
499
600
  name: "createGLN",
500
601
  description: "Create a GLN."
@@ -618,6 +719,18 @@ export default {
618
719
  createGMN: {
619
720
  name: "createGMN",
620
721
  description: "Create a GMN."
722
+ },
723
+ parseVariableMeasureRCN: {
724
+ name: "parseVariableMeasureRCN",
725
+ description: "Parse a Restricted Circulation Number (RCN) using a variable measure trade item format."
726
+ },
727
+ createVariableMeasureRCN: {
728
+ name: "createVariableMeasureRCN",
729
+ description: "Create a variable measure Restricted Circulation Number (RCN)."
730
+ },
731
+ verifiedByGS1: {
732
+ name: "verifiedByGS1",
733
+ description: "Create a Verified by GS1 hyperlink."
621
734
  }
622
735
  }
623
736
  }