@aidc-toolkit/app-extension 1.0.45-beta → 1.0.45
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 +17 -0
- package/dist/index.d.cts +1752 -0
- package/dist/index.d.ts +1752 -26
- package/dist/index.js +1 -8
- package/package.json +5 -5
- package/tsconfig-src.tsbuildinfo +1 -1
- package/dist/app-extension.d.ts +0 -194
- package/dist/app-extension.d.ts.map +0 -1
- package/dist/app-extension.js +0 -133
- package/dist/app-extension.js.map +0 -1
- package/dist/app-helper-proxy.d.ts +0 -61
- package/dist/app-helper-proxy.d.ts.map +0 -1
- package/dist/app-helper-proxy.js +0 -333
- package/dist/app-helper-proxy.js.map +0 -1
- package/dist/descriptor.d.ts +0 -197
- package/dist/descriptor.d.ts.map +0 -1
- package/dist/descriptor.js +0 -44
- package/dist/descriptor.js.map +0 -1
- package/dist/generator/generator.d.ts +0 -124
- package/dist/generator/generator.d.ts.map +0 -1
- package/dist/generator/generator.js +0 -190
- package/dist/generator/generator.js.map +0 -1
- package/dist/generator/index.d.ts +0 -18
- package/dist/generator/index.d.ts.map +0 -1
- package/dist/generator/index.js +0 -18
- package/dist/generator/index.js.map +0 -1
- package/dist/generator/locale-resources-generator.d.ts +0 -2
- package/dist/generator/locale-resources-generator.d.ts.map +0 -1
- package/dist/generator/locale-resources-generator.js +0 -312
- package/dist/generator/locale-resources-generator.js.map +0 -1
- package/dist/gs1/character-set-proxy.d.ts +0 -13
- package/dist/gs1/character-set-proxy.d.ts.map +0 -1
- package/dist/gs1/character-set-proxy.js +0 -126
- package/dist/gs1/character-set-proxy.js.map +0 -1
- package/dist/gs1/check-proxy.d.ts +0 -11
- package/dist/gs1/check-proxy.d.ts.map +0 -1
- package/dist/gs1/check-proxy.js +0 -163
- package/dist/gs1/check-proxy.js.map +0 -1
- package/dist/gs1/gcp-length-proxy.d.ts +0 -11
- package/dist/gs1/gcp-length-proxy.d.ts.map +0 -1
- package/dist/gs1/gcp-length-proxy.js +0 -190
- package/dist/gs1/gcp-length-proxy.js.map +0 -1
- package/dist/gs1/gtin-creator-proxy.d.ts +0 -10
- package/dist/gs1/gtin-creator-proxy.d.ts.map +0 -1
- package/dist/gs1/gtin-creator-proxy.js +0 -85
- package/dist/gs1/gtin-creator-proxy.js.map +0 -1
- package/dist/gs1/gtin-descriptor.d.ts +0 -3
- package/dist/gs1/gtin-descriptor.d.ts.map +0 -1
- package/dist/gs1/gtin-descriptor.js +0 -8
- package/dist/gs1/gtin-descriptor.js.map +0 -1
- package/dist/gs1/gtin-validator-proxy.d.ts +0 -26
- package/dist/gs1/gtin-validator-proxy.d.ts.map +0 -1
- package/dist/gs1/gtin-validator-proxy.js +0 -256
- package/dist/gs1/gtin-validator-proxy.js.map +0 -1
- package/dist/gs1/identifier-creator-proxy.d.ts +0 -30
- package/dist/gs1/identifier-creator-proxy.d.ts.map +0 -1
- package/dist/gs1/identifier-creator-proxy.js +0 -302
- package/dist/gs1/identifier-creator-proxy.js.map +0 -1
- package/dist/gs1/identifier-descriptor.d.ts +0 -4
- package/dist/gs1/identifier-descriptor.d.ts.map +0 -1
- package/dist/gs1/identifier-descriptor.js +0 -14
- package/dist/gs1/identifier-descriptor.js.map +0 -1
- package/dist/gs1/identifier-type.d.ts +0 -22
- package/dist/gs1/identifier-type.d.ts.map +0 -1
- package/dist/gs1/identifier-type.js +0 -34
- package/dist/gs1/identifier-type.js.map +0 -1
- package/dist/gs1/identifier-validator-proxy.d.ts +0 -29
- package/dist/gs1/identifier-validator-proxy.d.ts.map +0 -1
- package/dist/gs1/identifier-validator-proxy.js +0 -212
- package/dist/gs1/identifier-validator-proxy.js.map +0 -1
- package/dist/gs1/index.d.ts +0 -11
- package/dist/gs1/index.d.ts.map +0 -1
- package/dist/gs1/index.js +0 -11
- package/dist/gs1/index.js.map +0 -1
- package/dist/gs1/non-gtin-creator-proxy.d.ts +0 -38
- package/dist/gs1/non-gtin-creator-proxy.d.ts.map +0 -1
- package/dist/gs1/non-gtin-creator-proxy.js +0 -301
- package/dist/gs1/non-gtin-creator-proxy.js.map +0 -1
- package/dist/gs1/non-gtin-validator-proxy.d.ts +0 -37
- package/dist/gs1/non-gtin-validator-proxy.d.ts.map +0 -1
- package/dist/gs1/non-gtin-validator-proxy.js +0 -302
- package/dist/gs1/non-gtin-validator-proxy.js.map +0 -1
- package/dist/gs1/prefix-definition-descriptor.d.ts +0 -4
- package/dist/gs1/prefix-definition-descriptor.d.ts.map +0 -1
- package/dist/gs1/prefix-definition-descriptor.js +0 -16
- package/dist/gs1/prefix-definition-descriptor.js.map +0 -1
- package/dist/gs1/prefix-manager-proxy.d.ts +0 -8
- package/dist/gs1/prefix-manager-proxy.d.ts.map +0 -1
- package/dist/gs1/prefix-manager-proxy.js +0 -94
- package/dist/gs1/prefix-manager-proxy.js.map +0 -1
- package/dist/gs1/variable-measure-proxy.d.ts +0 -7
- package/dist/gs1/variable-measure-proxy.d.ts.map +0 -1
- package/dist/gs1/variable-measure-proxy.js +0 -114
- package/dist/gs1/variable-measure-proxy.js.map +0 -1
- package/dist/gs1/verified-by-gs1-proxy.d.ts +0 -7
- package/dist/gs1/verified-by-gs1-proxy.d.ts.map +0 -1
- package/dist/gs1/verified-by-gs1-proxy.js +0 -106
- package/dist/gs1/verified-by-gs1-proxy.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib-proxy.d.ts +0 -135
- package/dist/lib-proxy.d.ts.map +0 -1
- package/dist/lib-proxy.js +0 -276
- package/dist/lib-proxy.js.map +0 -1
- package/dist/locale/en/locale-resources.d.ts +0 -752
- package/dist/locale/en/locale-resources.d.ts.map +0 -1
- package/dist/locale/en/locale-resources.js +0 -751
- package/dist/locale/en/locale-resources.js.map +0 -1
- package/dist/locale/fr/locale-resources.d.ts +0 -752
- package/dist/locale/fr/locale-resources.d.ts.map +0 -1
- package/dist/locale/fr/locale-resources.js +0 -751
- package/dist/locale/fr/locale-resources.js.map +0 -1
- package/dist/locale/i18n.d.ts +0 -27
- package/dist/locale/i18n.d.ts.map +0 -1
- package/dist/locale/i18n.js +0 -36
- package/dist/locale/i18n.js.map +0 -1
- package/dist/proxy.d.ts +0 -136
- package/dist/proxy.d.ts.map +0 -1
- package/dist/proxy.js +0 -295
- package/dist/proxy.js.map +0 -1
- package/dist/streaming.d.ts +0 -10
- package/dist/streaming.d.ts.map +0 -1
- package/dist/streaming.js +0 -2
- package/dist/streaming.js.map +0 -1
- package/dist/type.d.ts +0 -91
- package/dist/type.d.ts.map +0 -1
- package/dist/type.js +0 -2
- package/dist/type.js.map +0 -1
- package/dist/utility/character-set-descriptor.d.ts +0 -6
- package/dist/utility/character-set-descriptor.d.ts.map +0 -1
- package/dist/utility/character-set-descriptor.js +0 -28
- package/dist/utility/character-set-descriptor.js.map +0 -1
- package/dist/utility/character-set-proxy.d.ts +0 -31
- package/dist/utility/character-set-proxy.d.ts.map +0 -1
- package/dist/utility/character-set-proxy.js +0 -278
- package/dist/utility/character-set-proxy.js.map +0 -1
- package/dist/utility/index.d.ts +0 -4
- package/dist/utility/index.d.ts.map +0 -1
- package/dist/utility/index.js +0 -4
- package/dist/utility/index.js.map +0 -1
- package/dist/utility/reg-exp-proxy.d.ts +0 -8
- package/dist/utility/reg-exp-proxy.d.ts.map +0 -1
- package/dist/utility/reg-exp-proxy.js +0 -103
- package/dist/utility/reg-exp-proxy.js.map +0 -1
- package/dist/utility/string-descriptor.d.ts +0 -4
- package/dist/utility/string-descriptor.d.ts.map +0 -1
- package/dist/utility/string-descriptor.js +0 -12
- package/dist/utility/string-descriptor.js.map +0 -1
- package/dist/utility/string-proxy.d.ts +0 -7
- package/dist/utility/string-proxy.d.ts.map +0 -1
- package/dist/utility/string-proxy.js +0 -63
- package/dist/utility/string-proxy.js.map +0 -1
- package/dist/utility/transformer-descriptor.d.ts +0 -6
- package/dist/utility/transformer-descriptor.d.ts.map +0 -1
- package/dist/utility/transformer-descriptor.js +0 -24
- package/dist/utility/transformer-descriptor.js.map +0 -1
- package/dist/utility/transformer-proxy.d.ts +0 -9
- package/dist/utility/transformer-proxy.d.ts.map +0 -1
- package/dist/utility/transformer-proxy.js +0 -111
- package/dist/utility/transformer-proxy.js.map +0 -1
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
import * as fs from "node:fs";
|
|
2
|
-
import * as path from "node:path";
|
|
3
|
-
import packageConfiguration from "../../package.json" with { type: "json" };
|
|
4
|
-
import { Generator } from "./generator.js";
|
|
5
|
-
/**
|
|
6
|
-
* Locale resources generator.
|
|
7
|
-
*/
|
|
8
|
-
class LocaleResourcesGenerator extends Generator {
|
|
9
|
-
/**
|
|
10
|
-
* Locale resources import path.
|
|
11
|
-
*/
|
|
12
|
-
static #IMPORT_PATH = "../app-extension/src/locale";
|
|
13
|
-
/**
|
|
14
|
-
* Parameters sequencer.
|
|
15
|
-
*/
|
|
16
|
-
#parametersSequencer = {};
|
|
17
|
-
/**
|
|
18
|
-
* Parameters locale resources.
|
|
19
|
-
*/
|
|
20
|
-
#parametersLocaleResources = {};
|
|
21
|
-
/**
|
|
22
|
-
* Functions locale resources.
|
|
23
|
-
*/
|
|
24
|
-
#functionsLocaleResources = {};
|
|
25
|
-
/**
|
|
26
|
-
* Locale resources.
|
|
27
|
-
*/
|
|
28
|
-
#LocaleResources = {
|
|
29
|
-
Parameters: this.#parametersLocaleResources,
|
|
30
|
-
Functions: this.#functionsLocaleResources
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Constructor.
|
|
34
|
-
*/
|
|
35
|
-
constructor() {
|
|
36
|
-
super(packageConfiguration.version, false);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @inheritDoc
|
|
40
|
-
*/
|
|
41
|
-
initialize() {
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @inheritDoc
|
|
45
|
-
*/
|
|
46
|
-
createNamespace() {
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* @inheritDoc
|
|
50
|
-
*/
|
|
51
|
-
createCategory() {
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* @inheritDoc
|
|
55
|
-
*/
|
|
56
|
-
createProxyObject() {
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Save a parameter descriptor in the appropriate spot in the sequence.
|
|
60
|
-
*
|
|
61
|
-
* @param parameterDescriptor
|
|
62
|
-
* Parameter descriptor.
|
|
63
|
-
*
|
|
64
|
-
* @param isUsed
|
|
65
|
-
* True if parameter descriptor is actually used and not just a base.
|
|
66
|
-
*
|
|
67
|
-
* @returns
|
|
68
|
-
* Parameters sequencer entry.
|
|
69
|
-
*/
|
|
70
|
-
#saveParameterSequence(parameterDescriptor, isUsed) {
|
|
71
|
-
let parametersSequencerEntry;
|
|
72
|
-
if (!("extendsDescriptor" in parameterDescriptor)) {
|
|
73
|
-
const parameterName = parameterDescriptor.name;
|
|
74
|
-
// Create entry if it doesn't exist, otherwise pick up where last call left off.
|
|
75
|
-
if (!(parameterName in this.#parametersSequencer)) {
|
|
76
|
-
parametersSequencerEntry = {
|
|
77
|
-
parametersSequencerOrNull: null,
|
|
78
|
-
parameterDescriptor,
|
|
79
|
-
parameterName,
|
|
80
|
-
baseParameterName: parameterName,
|
|
81
|
-
isUsed
|
|
82
|
-
};
|
|
83
|
-
this.#parametersSequencer[parameterName] = parametersSequencerEntry;
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
parametersSequencerEntry = this.#parametersSequencer[parameterName];
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
const baseParametersSequencerEntry = this.#saveParameterSequence(parameterDescriptor.extendsDescriptor, false);
|
|
91
|
-
let parameterName;
|
|
92
|
-
let baseParameterName;
|
|
93
|
-
if (parameterDescriptor.name !== undefined) {
|
|
94
|
-
parameterName = parameterDescriptor.name;
|
|
95
|
-
baseParameterName = baseParametersSequencerEntry.parameterName;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
parameterName = baseParametersSequencerEntry.parameterName;
|
|
99
|
-
baseParameterName = baseParametersSequencerEntry.baseParameterName;
|
|
100
|
-
}
|
|
101
|
-
if (parameterName !== baseParameterName) {
|
|
102
|
-
// Make sure that base parameters sequencer entry refers to a record type.
|
|
103
|
-
baseParametersSequencerEntry.parametersSequencerOrNull ??= {};
|
|
104
|
-
if (!(parameterName in baseParametersSequencerEntry.parametersSequencerOrNull)) {
|
|
105
|
-
parametersSequencerEntry = {
|
|
106
|
-
parametersSequencerOrNull: null,
|
|
107
|
-
parameterDescriptor,
|
|
108
|
-
parameterName,
|
|
109
|
-
baseParameterName,
|
|
110
|
-
isUsed
|
|
111
|
-
};
|
|
112
|
-
baseParametersSequencerEntry.parametersSequencerOrNull[parameterName] = parametersSequencerEntry;
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
parametersSequencerEntry = baseParametersSequencerEntry.parametersSequencerOrNull[parameterName];
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
// If name is the same, which means that parameter descriptor modified type information only.
|
|
120
|
-
parametersSequencerEntry = baseParametersSequencerEntry;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return parametersSequencerEntry;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* @inheritDoc
|
|
127
|
-
*/
|
|
128
|
-
createProxyFunction(classDescriptor, methodDescriptor) {
|
|
129
|
-
// Hidden functions aren't localized.
|
|
130
|
-
if (methodDescriptor.isHidden !== true) {
|
|
131
|
-
// Add any parameters that are not already known.
|
|
132
|
-
for (const parameterDescriptor of methodDescriptor.parameterDescriptors) {
|
|
133
|
-
this.#saveParameterSequence(parameterDescriptor, true);
|
|
134
|
-
}
|
|
135
|
-
let functionsLocaleResources = this.#functionsLocaleResources;
|
|
136
|
-
const namespace = classDescriptor.namespace;
|
|
137
|
-
if (namespace !== undefined) {
|
|
138
|
-
if (!(namespace in functionsLocaleResources)) {
|
|
139
|
-
const namespaceFunctionsLocaleResources = {};
|
|
140
|
-
// Add namespace and navigate to it.
|
|
141
|
-
functionsLocaleResources[namespace] = namespaceFunctionsLocaleResources;
|
|
142
|
-
functionsLocaleResources = namespaceFunctionsLocaleResources;
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
// Navigate to namespace.
|
|
146
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Entry is never a string.
|
|
147
|
-
functionsLocaleResources = functionsLocaleResources[namespace];
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
const functionName = methodDescriptor.functionName;
|
|
151
|
-
if (functionName in functionsLocaleResources) {
|
|
152
|
-
throw new Error(`Duplicate function ${functionName}`);
|
|
153
|
-
}
|
|
154
|
-
// Add function.
|
|
155
|
-
functionsLocaleResources[functionName] = {
|
|
156
|
-
name: functionName,
|
|
157
|
-
description: "*** LOCALIZATION REQUIRED ***"
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Merge source locale resources into existing destination locale resources.
|
|
163
|
-
*
|
|
164
|
-
* @param logChanges
|
|
165
|
-
* If true, changes are logged. Limits output when processing multiple sources.
|
|
166
|
-
*
|
|
167
|
-
* @param parentKey
|
|
168
|
-
* Parent key for logging purposes.
|
|
169
|
-
*
|
|
170
|
-
* @param sourceLocaleResources
|
|
171
|
-
* Source locale resources.
|
|
172
|
-
*
|
|
173
|
-
* @param destinationLocaleResources
|
|
174
|
-
* Destination locale resources.
|
|
175
|
-
*
|
|
176
|
-
* @param addMissing
|
|
177
|
-
* Add missing if true; applies to locale resources that are not regional.
|
|
178
|
-
*
|
|
179
|
-
* @returns
|
|
180
|
-
* Merged locale resources.
|
|
181
|
-
*/
|
|
182
|
-
#merge(logChanges, parentKey, sourceLocaleResources, destinationLocaleResources, addMissing) {
|
|
183
|
-
// Some entries at the top are not part of the generator output.
|
|
184
|
-
const deleteMissing = parentKey.length !== 0;
|
|
185
|
-
const newDestinationLocaleResources = {};
|
|
186
|
-
// Copy over or delete any destination keys that are not in source.
|
|
187
|
-
for (const [key, destinationValue] of Object.entries(destinationLocaleResources)) {
|
|
188
|
-
if (!(key in sourceLocaleResources)) {
|
|
189
|
-
if (!deleteMissing) {
|
|
190
|
-
newDestinationLocaleResources[key] = destinationValue;
|
|
191
|
-
}
|
|
192
|
-
else if (logChanges) {
|
|
193
|
-
this.logger.info(`Deleting ${parentKey}${key}...`);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
for (const [key, sourceValue] of Object.entries(sourceLocaleResources)) {
|
|
198
|
-
if (!(key in destinationLocaleResources)) {
|
|
199
|
-
if (addMissing) {
|
|
200
|
-
if (logChanges) {
|
|
201
|
-
this.logger.info(`Adding ${parentKey}${key}...`);
|
|
202
|
-
}
|
|
203
|
-
newDestinationLocaleResources[key] = sourceValue;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
const destinationValue = destinationLocaleResources[key];
|
|
208
|
-
if (typeof sourceValue === "object" && typeof destinationValue === "object") {
|
|
209
|
-
newDestinationLocaleResources[key] = this.#merge(logChanges, `${parentKey}${key}.`, sourceValue, destinationValue, addMissing);
|
|
210
|
-
}
|
|
211
|
-
else if (typeof sourceValue === "string" && typeof destinationValue === "string") {
|
|
212
|
-
newDestinationLocaleResources[key] = destinationValue;
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
throw new Error(`Mismatched types at ${parentKey}${key}`);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
return newDestinationLocaleResources;
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Build parameters locale resources by going through parameters sequencer.
|
|
223
|
-
*
|
|
224
|
-
* @param parametersSequencer
|
|
225
|
-
* Parameters sequencer.
|
|
226
|
-
*/
|
|
227
|
-
#buildParametersLocaleResources(parametersSequencer) {
|
|
228
|
-
const entries = Object.entries(parametersSequencer);
|
|
229
|
-
// Sort the entries as defined by the descriptors.
|
|
230
|
-
entries.sort((entry1, entry2) => {
|
|
231
|
-
let result;
|
|
232
|
-
const parameterDescriptor1 = entry1[1].parameterDescriptor;
|
|
233
|
-
const parameterDescriptor2 = entry2[1].parameterDescriptor;
|
|
234
|
-
if ("sortOrder" in parameterDescriptor1) {
|
|
235
|
-
if ("sortOrder" in parameterDescriptor2) {
|
|
236
|
-
result = parameterDescriptor1.sortOrder - parameterDescriptor2.sortOrder;
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
// Parameter descriptors with undefined sort order to go the end.
|
|
240
|
-
result = -parameterDescriptor1.sortOrder;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
// eslint-disable-next-line no-lonely-if -- Matches structure in "then" clause.
|
|
245
|
-
if ("sortOrder" in parameterDescriptor2) {
|
|
246
|
-
// Parameter descriptors with undefined sort order to go the end.
|
|
247
|
-
result = parameterDescriptor2.sortOrder;
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
result = 0;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
return result;
|
|
254
|
-
});
|
|
255
|
-
for (const [parameterName, parametersSequencerEntry] of entries) {
|
|
256
|
-
if (parametersSequencerEntry.isUsed) {
|
|
257
|
-
this.#parametersLocaleResources[parameterName] = {
|
|
258
|
-
name: parameterName,
|
|
259
|
-
description: "*** LOCALIZATION REQUIRED ***"
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
if (parametersSequencerEntry.parametersSequencerOrNull !== null) {
|
|
263
|
-
this.#buildParametersLocaleResources(parametersSequencerEntry.parametersSequencerOrNull);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Build output to be written back to source file.
|
|
269
|
-
*
|
|
270
|
-
* @param prefix
|
|
271
|
-
* Line prefix.
|
|
272
|
-
*
|
|
273
|
-
* @param value
|
|
274
|
-
* Line value.
|
|
275
|
-
*
|
|
276
|
-
* @param indentLevel
|
|
277
|
-
* Indent level.
|
|
278
|
-
*
|
|
279
|
-
* @returns
|
|
280
|
-
* Output string.
|
|
281
|
-
*/
|
|
282
|
-
static #buildOutput(prefix, value, indentLevel) {
|
|
283
|
-
return `${" ".repeat(indentLevel)}${prefix} ${typeof value === "object" ?
|
|
284
|
-
`{\n${Object.entries(value).map(entry => LocaleResourcesGenerator.#buildOutput(`${entry[0]}:`, entry[1], indentLevel + 1)).join(",\n")}\n${" ".repeat(indentLevel)}}` :
|
|
285
|
-
// JSON.stringify() will apply quotes as appropriate.
|
|
286
|
-
JSON.stringify(value)}`;
|
|
287
|
-
}
|
|
288
|
-
/**
|
|
289
|
-
* @inheritDoc
|
|
290
|
-
*/
|
|
291
|
-
async finalize(success) {
|
|
292
|
-
if (success) {
|
|
293
|
-
this.#buildParametersLocaleResources(this.#parametersSequencer);
|
|
294
|
-
await Promise.all(fs.readdirSync(LocaleResourcesGenerator.#IMPORT_PATH, {
|
|
295
|
-
withFileTypes: true
|
|
296
|
-
}).filter(entry => entry.isDirectory()).map(async (entry) => {
|
|
297
|
-
const localeResourcesSource = path.resolve(LocaleResourcesGenerator.#IMPORT_PATH, entry.name, "locale-resources.ts");
|
|
298
|
-
return import(localeResourcesSource).then((module) => {
|
|
299
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Module format is known.
|
|
300
|
-
const localeResources = this.#merge(entry.name === "en", "", this.#LocaleResources, module.default, !entry.name.includes("-"));
|
|
301
|
-
fs.writeFileSync(localeResourcesSource, `${LocaleResourcesGenerator.#buildOutput("export default", localeResources, 0)};\n`);
|
|
302
|
-
});
|
|
303
|
-
}));
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
const generator = new LocaleResourcesGenerator();
|
|
308
|
-
generator.generate().catch((e) => {
|
|
309
|
-
generator.logger.error(e);
|
|
310
|
-
process.exit(1);
|
|
311
|
-
});
|
|
312
|
-
//# sourceMappingURL=locale-resources-generator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locale-resources-generator.js","sourceRoot":"","sources":["../../src/generator/locale-resources-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,oBAAoB,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAO5E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AA+C3C;;GAEG;AACH,MAAM,wBAAyB,SAAQ,SAAS;IAC5C;;OAEG;IACH,MAAM,CAAU,YAAY,GAAG,6BAA6B,CAAC;IAE7D;;OAEG;IACM,oBAAoB,GAAwB,EAAE,CAAC;IAExD;;OAEG;IACM,0BAA0B,GAAoB,EAAE,CAAC;IAE1D;;OAEG;IACM,yBAAyB,GAAoB,EAAE,CAAC;IAEzD;;OAEG;IACM,gBAAgB,GAAoB;QACzC,UAAU,EAAE,IAAI,CAAC,0BAA0B;QAC3C,SAAS,EAAE,IAAI,CAAC,yBAAyB;KAC5C,CAAC;IAEF;;OAEG;IACH;QACI,KAAK,CAAC,oBAAoB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACgB,UAAU;IAC7B,CAAC;IAED;;OAEG;IACgB,eAAe;IAClC,CAAC;IAED;;OAEG;IACgB,cAAc;IACjC,CAAC;IAED;;OAEG;IACgB,iBAAiB;IACpC,CAAC;IAED;;;;;;;;;;;OAWG;IACH,sBAAsB,CAAC,mBAAqE,EAAE,MAAe;QACzG,IAAI,wBAAkD,CAAC;QAEvD,IAAI,CAAC,CAAC,mBAAmB,IAAI,mBAAmB,CAAC,EAAE,CAAC;YAChD,MAAM,aAAa,GAAG,mBAAmB,CAAC,IAAI,CAAC;YAE/C,gFAAgF;YAChF,IAAI,CAAC,CAAC,aAAa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OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AppExtension } from "../app-extension.js";
|
|
2
|
-
import type { ErrorExtends } from "../type.js";
|
|
3
|
-
import { CharacterSetCreatorProxy, CharacterSetValidatorProxy } from "../utility/index.js";
|
|
4
|
-
export declare class AI82Proxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
|
|
5
|
-
constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
|
|
6
|
-
}
|
|
7
|
-
export declare class AI39Proxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
|
|
8
|
-
constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
|
|
9
|
-
}
|
|
10
|
-
export declare class AI64Proxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
|
|
11
|
-
constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=character-set-proxy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"character-set-proxy.d.ts","sourceRoot":"","sources":["../../src/gs1/character-set-proxy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAE3F,qBAUa,SAAS,CAAC,UAAU,SAAS,OAAO,EAAE,MAAM,SAAS,YAAY,CAAC,UAAU,CAAC,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAE,SAAQ,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAC;gBACpP,YAAY,EAAE,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAC;CAGvH;AAED,qBAUa,SAAS,CAAC,UAAU,SAAS,OAAO,EAAE,MAAM,SAAS,YAAY,CAAC,UAAU,CAAC,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAE,SAAQ,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAC;gBACpP,YAAY,EAAE,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAC;CAGvH;AAED,qBAIa,SAAS,CAAC,UAAU,SAAS,OAAO,EAAE,MAAM,SAAS,YAAY,CAAC,UAAU,CAAC,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAE,SAAQ,0BAA0B,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAC;gBACtP,YAAY,EAAE,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAC;CAGvH"}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
-
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
-
var _, done = false;
|
|
7
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
-
var context = {};
|
|
9
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
-
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
-
if (kind === "accessor") {
|
|
14
|
-
if (result === void 0) continue;
|
|
15
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
-
}
|
|
20
|
-
else if (_ = accept(result)) {
|
|
21
|
-
if (kind === "field") initializers.unshift(_);
|
|
22
|
-
else descriptor[key] = _;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
-
done = true;
|
|
27
|
-
};
|
|
28
|
-
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
-
var useValue = arguments.length > 2;
|
|
30
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
-
}
|
|
33
|
-
return useValue ? value : void 0;
|
|
34
|
-
};
|
|
35
|
-
import { AI39_CREATOR, AI64_VALIDATOR, AI82_CREATOR } from "@aidc-toolkit/gs1";
|
|
36
|
-
import { expandParameterDescriptor, proxy } from "../proxy.js";
|
|
37
|
-
import { exclusionAllNumericParameterDescriptor, exclusionNoneParameterDescriptor } from "../utility/character-set-descriptor.js";
|
|
38
|
-
import { CharacterSetCreatorProxy, CharacterSetValidatorProxy } from "../utility/index.js";
|
|
39
|
-
let AI82Proxy = (() => {
|
|
40
|
-
let _classDecorators = [proxy.describeClass(false, {
|
|
41
|
-
namespace: "GS1",
|
|
42
|
-
methodInfix: "AI82",
|
|
43
|
-
replacementParameterDescriptors: [
|
|
44
|
-
{
|
|
45
|
-
name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
|
|
46
|
-
replacement: exclusionAllNumericParameterDescriptor
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
})];
|
|
50
|
-
let _classDescriptor;
|
|
51
|
-
let _classExtraInitializers = [];
|
|
52
|
-
let _classThis;
|
|
53
|
-
let _classSuper = CharacterSetCreatorProxy;
|
|
54
|
-
var AI82Proxy = class extends _classSuper {
|
|
55
|
-
static { _classThis = this; }
|
|
56
|
-
static {
|
|
57
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
58
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
59
|
-
AI82Proxy = _classThis = _classDescriptor.value;
|
|
60
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
61
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
62
|
-
}
|
|
63
|
-
constructor(appExtension) {
|
|
64
|
-
super(appExtension, AI82_CREATOR);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
return AI82Proxy = _classThis;
|
|
68
|
-
})();
|
|
69
|
-
export { AI82Proxy };
|
|
70
|
-
let AI39Proxy = (() => {
|
|
71
|
-
let _classDecorators = [proxy.describeClass(false, {
|
|
72
|
-
namespace: "GS1",
|
|
73
|
-
methodInfix: "AI39",
|
|
74
|
-
replacementParameterDescriptors: [
|
|
75
|
-
{
|
|
76
|
-
name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
|
|
77
|
-
replacement: exclusionAllNumericParameterDescriptor
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
})];
|
|
81
|
-
let _classDescriptor;
|
|
82
|
-
let _classExtraInitializers = [];
|
|
83
|
-
let _classThis;
|
|
84
|
-
let _classSuper = CharacterSetCreatorProxy;
|
|
85
|
-
var AI39Proxy = class extends _classSuper {
|
|
86
|
-
static { _classThis = this; }
|
|
87
|
-
static {
|
|
88
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
89
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
90
|
-
AI39Proxy = _classThis = _classDescriptor.value;
|
|
91
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
92
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
93
|
-
}
|
|
94
|
-
constructor(appExtension) {
|
|
95
|
-
super(appExtension, AI39_CREATOR);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
return AI39Proxy = _classThis;
|
|
99
|
-
})();
|
|
100
|
-
export { AI39Proxy };
|
|
101
|
-
let AI64Proxy = (() => {
|
|
102
|
-
let _classDecorators = [proxy.describeClass(false, {
|
|
103
|
-
namespace: "GS1",
|
|
104
|
-
methodInfix: "AI64"
|
|
105
|
-
})];
|
|
106
|
-
let _classDescriptor;
|
|
107
|
-
let _classExtraInitializers = [];
|
|
108
|
-
let _classThis;
|
|
109
|
-
let _classSuper = CharacterSetValidatorProxy;
|
|
110
|
-
var AI64Proxy = class extends _classSuper {
|
|
111
|
-
static { _classThis = this; }
|
|
112
|
-
static {
|
|
113
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
114
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
115
|
-
AI64Proxy = _classThis = _classDescriptor.value;
|
|
116
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
117
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
118
|
-
}
|
|
119
|
-
constructor(appExtension) {
|
|
120
|
-
super(appExtension, AI64_VALIDATOR);
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
return AI64Proxy = _classThis;
|
|
124
|
-
})();
|
|
125
|
-
export { AI64Proxy };
|
|
126
|
-
//# sourceMappingURL=character-set-proxy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"character-set-proxy.js","sourceRoot":"","sources":["../../src/gs1/character-set-proxy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EACH,sCAAsC,EACtC,gCAAgC,EACnC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;IAY9E,SAAS;4BAVrB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE;YACxB,SAAS,EAAE,KAAK;YAChB,WAAW,EAAE,MAAM;YACnB,+BAA+B,EAAE;gBAC7B;oBACI,IAAI,EAAE,yBAAyB,CAAC,gCAAgC,CAAC,CAAC,IAAI;oBACtE,WAAW,EAAE,sCAAsC;iBACtD;aACJ;SACJ,CAAC;;;;sBAC4J,wBAAwB;yBAAhC,SAAQ,WAAsG;;;;YAApQ,6KAIC;;;YAJY,uDAAS;;QAClB,YAAY,YAAwG;YAChH,KAAK,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;QACtC,CAAC;;;;SAHQ,SAAS;IAgBT,SAAS;4BAVrB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE;YACxB,SAAS,EAAE,KAAK;YAChB,WAAW,EAAE,MAAM;YACnB,+BAA+B,EAAE;gBAC7B;oBACI,IAAI,EAAE,yBAAyB,CAAC,gCAAgC,CAAC,CAAC,IAAI;oBACtE,WAAW,EAAE,sCAAsC;iBACtD;aACJ;SACJ,CAAC;;;;sBAC4J,wBAAwB;yBAAhC,SAAQ,WAAsG;;;;YAApQ,6KAIC;;;YAJY,uDAAS;;QAClB,YAAY,YAAwG;YAChH,KAAK,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;QACtC,CAAC;;;;SAHQ,SAAS;IAUT,SAAS;4BAJrB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE;YACxB,SAAS,EAAE,KAAK;YAChB,WAAW,EAAE,MAAM;SACtB,CAAC;;;;sBAC4J,0BAA0B;yBAAlC,SAAQ,WAAwG;;;;YAAtQ,6KAIC;;;YAJY,uDAAS;;QAClB,YAAY,YAAwG;YAChH,KAAK,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACxC,CAAC;;;;SAHQ,SAAS"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { LibProxy } from "../lib-proxy.js";
|
|
2
|
-
import type { ErrorExtends, Matrix, MatrixResult, SingletonResult } from "../type.js";
|
|
3
|
-
export declare class CheckProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
|
|
4
|
-
checkDigit(matrixSs: Matrix<string>): MatrixResult<string, ThrowError, TError>;
|
|
5
|
-
hasValidCheckDigit(matrixSs: Matrix<string>): MatrixResult<boolean, ThrowError, TError>;
|
|
6
|
-
priceOrWeightCheckDigit(matrixSs: Matrix<string>): MatrixResult<string, ThrowError, TError>;
|
|
7
|
-
isValidPriceOrWeightCheckDigit(s: string, checkDigit: string): SingletonResult<boolean, ThrowError, TError>;
|
|
8
|
-
checkCharacterPair(matrixSs: Matrix<string>): MatrixResult<string, ThrowError, TError>;
|
|
9
|
-
hasValidCheckCharacterPair(matrixSs: Matrix<string>): MatrixResult<boolean, ThrowError, TError>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=check-proxy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-proxy.d.ts","sourceRoot":"","sources":["../../src/gs1/check-proxy.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA2CtF,qBAIa,UAAU,CAAC,UAAU,SAAS,OAAO,EAAE,MAAM,SAAS,YAAY,CAAC,UAAU,CAAC,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAE,SAAQ,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAC;IAMjP,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC;IAS9E,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC;IASvF,uBAAuB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC;IAY3F,8BAA8B,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC;IAS3G,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC;IAStF,0BAA0B,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC;CAGlG"}
|
package/dist/gs1/check-proxy.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
2
|
-
var useValue = arguments.length > 2;
|
|
3
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
4
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
5
|
-
}
|
|
6
|
-
return useValue ? value : void 0;
|
|
7
|
-
};
|
|
8
|
-
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
9
|
-
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
10
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
11
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
12
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
13
|
-
var _, done = false;
|
|
14
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
15
|
-
var context = {};
|
|
16
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
17
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
18
|
-
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
19
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
20
|
-
if (kind === "accessor") {
|
|
21
|
-
if (result === void 0) continue;
|
|
22
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
23
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
24
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
25
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
26
|
-
}
|
|
27
|
-
else if (_ = accept(result)) {
|
|
28
|
-
if (kind === "field") initializers.unshift(_);
|
|
29
|
-
else descriptor[key] = _;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
33
|
-
done = true;
|
|
34
|
-
};
|
|
35
|
-
import { checkCharacterPair, checkDigit, hasValidCheckCharacterPair, hasValidCheckDigit, isValidPriceOrWeightCheckDigit, priceOrWeightCheckDigit } from "@aidc-toolkit/gs1";
|
|
36
|
-
import { Multiplicities, Types } from "../descriptor.js";
|
|
37
|
-
import { LibProxy } from "../lib-proxy.js";
|
|
38
|
-
import { proxy } from "../proxy.js";
|
|
39
|
-
const checkSParameterDescriptor = {
|
|
40
|
-
name: "checkS",
|
|
41
|
-
type: Types.String,
|
|
42
|
-
multiplicity: Multiplicities.Matrix,
|
|
43
|
-
isRequired: true
|
|
44
|
-
};
|
|
45
|
-
const numericSParameterDescriptor = {
|
|
46
|
-
extendsDescriptor: checkSParameterDescriptor,
|
|
47
|
-
name: "numericS"
|
|
48
|
-
};
|
|
49
|
-
const numericSFourOrFiveDigitsParameterDescriptor = {
|
|
50
|
-
extendsDescriptor: numericSParameterDescriptor,
|
|
51
|
-
sortOrder: 0,
|
|
52
|
-
name: "numericSFourOrFiveDigits"
|
|
53
|
-
};
|
|
54
|
-
const numericSWithCheckDigitParameterDescriptor = {
|
|
55
|
-
extendsDescriptor: numericSParameterDescriptor,
|
|
56
|
-
sortOrder: 1,
|
|
57
|
-
name: "numericSWithCheckDigit"
|
|
58
|
-
};
|
|
59
|
-
const checkDigitParameterDescriptor = {
|
|
60
|
-
extendsDescriptor: numericSParameterDescriptor,
|
|
61
|
-
sortOrder: 2,
|
|
62
|
-
name: "checkDigit",
|
|
63
|
-
multiplicity: Multiplicities.Singleton
|
|
64
|
-
};
|
|
65
|
-
const ai82SParameterDescriptor = {
|
|
66
|
-
extendsDescriptor: checkSParameterDescriptor,
|
|
67
|
-
name: "ai82S"
|
|
68
|
-
};
|
|
69
|
-
const ai82SWithCheckCharacterPairParameterDescriptor = {
|
|
70
|
-
extendsDescriptor: ai82SParameterDescriptor,
|
|
71
|
-
name: "ai82SWithCheckCharacterPair"
|
|
72
|
-
};
|
|
73
|
-
let CheckProxy = (() => {
|
|
74
|
-
let _classDecorators = [proxy.describeClass(false, {
|
|
75
|
-
namespace: "GS1",
|
|
76
|
-
category: "checkCharacter"
|
|
77
|
-
})];
|
|
78
|
-
let _classDescriptor;
|
|
79
|
-
let _classExtraInitializers = [];
|
|
80
|
-
let _classThis;
|
|
81
|
-
let _classSuper = LibProxy;
|
|
82
|
-
let _instanceExtraInitializers = [];
|
|
83
|
-
let _checkDigit_decorators;
|
|
84
|
-
let _hasValidCheckDigit_decorators;
|
|
85
|
-
let _priceOrWeightCheckDigit_decorators;
|
|
86
|
-
let _isValidPriceOrWeightCheckDigit_decorators;
|
|
87
|
-
let _checkCharacterPair_decorators;
|
|
88
|
-
let _hasValidCheckCharacterPair_decorators;
|
|
89
|
-
var CheckProxy = class extends _classSuper {
|
|
90
|
-
static { _classThis = this; }
|
|
91
|
-
static {
|
|
92
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
93
|
-
_checkDigit_decorators = [proxy.describeMethod({
|
|
94
|
-
type: Types.String,
|
|
95
|
-
multiplicity: Multiplicities.Matrix,
|
|
96
|
-
parameterDescriptors: [numericSParameterDescriptor]
|
|
97
|
-
})];
|
|
98
|
-
_hasValidCheckDigit_decorators = [proxy.describeMethod({
|
|
99
|
-
type: Types.String,
|
|
100
|
-
multiplicity: Multiplicities.Matrix,
|
|
101
|
-
parameterDescriptors: [numericSWithCheckDigitParameterDescriptor]
|
|
102
|
-
})];
|
|
103
|
-
_priceOrWeightCheckDigit_decorators = [proxy.describeMethod({
|
|
104
|
-
type: Types.String,
|
|
105
|
-
multiplicity: Multiplicities.Matrix,
|
|
106
|
-
parameterDescriptors: [numericSFourOrFiveDigitsParameterDescriptor]
|
|
107
|
-
})];
|
|
108
|
-
_isValidPriceOrWeightCheckDigit_decorators = [proxy.describeMethod({
|
|
109
|
-
type: Types.String,
|
|
110
|
-
multiplicity: Multiplicities.Singleton,
|
|
111
|
-
parameterDescriptors: [{
|
|
112
|
-
...numericSFourOrFiveDigitsParameterDescriptor,
|
|
113
|
-
multiplicity: Multiplicities.Singleton
|
|
114
|
-
}, checkDigitParameterDescriptor]
|
|
115
|
-
})];
|
|
116
|
-
_checkCharacterPair_decorators = [proxy.describeMethod({
|
|
117
|
-
type: Types.String,
|
|
118
|
-
multiplicity: Multiplicities.Matrix,
|
|
119
|
-
parameterDescriptors: [ai82SParameterDescriptor]
|
|
120
|
-
})];
|
|
121
|
-
_hasValidCheckCharacterPair_decorators = [proxy.describeMethod({
|
|
122
|
-
type: Types.String,
|
|
123
|
-
multiplicity: Multiplicities.Matrix,
|
|
124
|
-
parameterDescriptors: [ai82SWithCheckCharacterPairParameterDescriptor]
|
|
125
|
-
})];
|
|
126
|
-
__esDecorate(this, null, _checkDigit_decorators, { kind: "method", name: "checkDigit", static: false, private: false, access: { has: obj => "checkDigit" in obj, get: obj => obj.checkDigit }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
127
|
-
__esDecorate(this, null, _hasValidCheckDigit_decorators, { kind: "method", name: "hasValidCheckDigit", static: false, private: false, access: { has: obj => "hasValidCheckDigit" in obj, get: obj => obj.hasValidCheckDigit }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
128
|
-
__esDecorate(this, null, _priceOrWeightCheckDigit_decorators, { kind: "method", name: "priceOrWeightCheckDigit", static: false, private: false, access: { has: obj => "priceOrWeightCheckDigit" in obj, get: obj => obj.priceOrWeightCheckDigit }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
129
|
-
__esDecorate(this, null, _isValidPriceOrWeightCheckDigit_decorators, { kind: "method", name: "isValidPriceOrWeightCheckDigit", static: false, private: false, access: { has: obj => "isValidPriceOrWeightCheckDigit" in obj, get: obj => obj.isValidPriceOrWeightCheckDigit }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
130
|
-
__esDecorate(this, null, _checkCharacterPair_decorators, { kind: "method", name: "checkCharacterPair", static: false, private: false, access: { has: obj => "checkCharacterPair" in obj, get: obj => obj.checkCharacterPair }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
131
|
-
__esDecorate(this, null, _hasValidCheckCharacterPair_decorators, { kind: "method", name: "hasValidCheckCharacterPair", static: false, private: false, access: { has: obj => "hasValidCheckCharacterPair" in obj, get: obj => obj.hasValidCheckCharacterPair }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
132
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
133
|
-
CheckProxy = _classThis = _classDescriptor.value;
|
|
134
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
135
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
136
|
-
}
|
|
137
|
-
checkDigit(matrixSs) {
|
|
138
|
-
return this.matrixResult(matrixSs, s => checkDigit(s));
|
|
139
|
-
}
|
|
140
|
-
hasValidCheckDigit(matrixSs) {
|
|
141
|
-
return this.matrixResult(matrixSs, s => hasValidCheckDigit(s));
|
|
142
|
-
}
|
|
143
|
-
priceOrWeightCheckDigit(matrixSs) {
|
|
144
|
-
return this.matrixResult(matrixSs, s => priceOrWeightCheckDigit(s));
|
|
145
|
-
}
|
|
146
|
-
isValidPriceOrWeightCheckDigit(s, checkDigit) {
|
|
147
|
-
return this.singletonResult(() => isValidPriceOrWeightCheckDigit(s, checkDigit));
|
|
148
|
-
}
|
|
149
|
-
checkCharacterPair(matrixSs) {
|
|
150
|
-
return this.matrixResult(matrixSs, s => checkCharacterPair(s));
|
|
151
|
-
}
|
|
152
|
-
hasValidCheckCharacterPair(matrixSs) {
|
|
153
|
-
return this.matrixResult(matrixSs, s => hasValidCheckCharacterPair(s));
|
|
154
|
-
}
|
|
155
|
-
constructor() {
|
|
156
|
-
super(...arguments);
|
|
157
|
-
__runInitializers(this, _instanceExtraInitializers);
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
return CheckProxy = _classThis;
|
|
161
|
-
})();
|
|
162
|
-
export { CheckProxy };
|
|
163
|
-
//# sourceMappingURL=check-proxy.js.map
|