@aidc-toolkit/app-extension 1.0.51 → 1.0.52-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/app-extension-options.d.ts +52 -0
- package/dist/app-extension-options.d.ts.map +1 -0
- package/dist/app-extension-options.js +2 -0
- package/dist/app-extension-options.js.map +1 -0
- package/dist/app-extension.d.ts +194 -0
- package/dist/app-extension.d.ts.map +1 -0
- package/dist/app-extension.js +141 -0
- package/dist/app-extension.js.map +1 -0
- package/dist/app-helper-proxy.d.ts +57 -0
- package/dist/app-helper-proxy.d.ts.map +1 -0
- package/dist/app-helper-proxy.js +354 -0
- package/dist/app-helper-proxy.js.map +1 -0
- package/dist/{descriptor-Df-lif4q.d.cts → descriptor.d.ts} +13 -13
- package/dist/descriptor.d.ts.map +1 -0
- package/dist/descriptor.js +44 -0
- package/dist/descriptor.js.map +1 -0
- package/dist/generator/functions-generator.d.ts +103 -0
- package/dist/generator/functions-generator.d.ts.map +1 -0
- package/dist/generator/functions-generator.js +179 -0
- package/dist/generator/functions-generator.js.map +1 -0
- package/dist/generator/generator.d.ts +121 -0
- package/dist/generator/generator.d.ts.map +1 -0
- package/dist/generator/generator.js +186 -0
- package/dist/generator/generator.js.map +1 -0
- package/dist/generator/index.d.ts +18 -223
- package/dist/generator/index.d.ts.map +1 -0
- package/dist/generator/index.js +3 -1
- package/dist/generator/index.js.map +1 -0
- package/dist/generator/locale-resources-generator.d.ts +2 -0
- package/dist/generator/locale-resources-generator.d.ts.map +1 -0
- package/dist/generator/locale-resources-generator.js +333 -0
- package/dist/generator/locale-resources-generator.js.map +1 -0
- package/dist/gs1/character-set-proxy.d.ts +12 -0
- package/dist/gs1/character-set-proxy.d.ts.map +1 -0
- package/dist/gs1/character-set-proxy.js +126 -0
- package/dist/gs1/character-set-proxy.js.map +1 -0
- package/dist/gs1/check-proxy.d.ts +11 -0
- package/dist/gs1/check-proxy.d.ts.map +1 -0
- package/dist/gs1/check-proxy.js +163 -0
- package/dist/gs1/check-proxy.js.map +1 -0
- package/dist/gs1/gcp-length-proxy.d.ts +11 -0
- package/dist/gs1/gcp-length-proxy.d.ts.map +1 -0
- package/dist/gs1/gcp-length-proxy.js +187 -0
- package/dist/gs1/gcp-length-proxy.js.map +1 -0
- package/dist/gs1/gtin-creator-proxy.d.ts +10 -0
- package/dist/gs1/gtin-creator-proxy.d.ts.map +1 -0
- package/dist/gs1/gtin-creator-proxy.js +85 -0
- package/dist/gs1/gtin-creator-proxy.js.map +1 -0
- package/dist/gs1/gtin-descriptor.d.ts +3 -0
- package/dist/gs1/gtin-descriptor.d.ts.map +1 -0
- package/dist/gs1/gtin-descriptor.js +8 -0
- package/dist/gs1/gtin-descriptor.js.map +1 -0
- package/dist/gs1/gtin-validator-proxy.d.ts +26 -0
- package/dist/gs1/gtin-validator-proxy.d.ts.map +1 -0
- package/dist/gs1/gtin-validator-proxy.js +256 -0
- package/dist/gs1/gtin-validator-proxy.js.map +1 -0
- package/dist/gs1/identifier-creator-proxy.d.ts +30 -0
- package/dist/gs1/identifier-creator-proxy.d.ts.map +1 -0
- package/dist/gs1/identifier-creator-proxy.js +318 -0
- package/dist/gs1/identifier-creator-proxy.js.map +1 -0
- package/dist/gs1/identifier-descriptor.d.ts +4 -0
- package/dist/gs1/identifier-descriptor.d.ts.map +1 -0
- package/dist/gs1/identifier-descriptor.js +14 -0
- package/dist/gs1/identifier-descriptor.js.map +1 -0
- package/dist/gs1/identifier-type.d.ts +22 -0
- package/dist/gs1/identifier-type.d.ts.map +1 -0
- package/dist/gs1/identifier-type.js +34 -0
- package/dist/gs1/identifier-type.js.map +1 -0
- package/dist/gs1/identifier-validator-proxy.d.ts +29 -0
- package/dist/gs1/identifier-validator-proxy.d.ts.map +1 -0
- package/dist/gs1/identifier-validator-proxy.js +212 -0
- package/dist/gs1/identifier-validator-proxy.js.map +1 -0
- package/dist/gs1/index.d.ts +11 -185
- package/dist/gs1/index.d.ts.map +1 -0
- package/dist/gs1/index.js +11 -1
- package/dist/gs1/index.js.map +1 -0
- package/dist/gs1/non-gtin-creator-proxy.d.ts +37 -0
- package/dist/gs1/non-gtin-creator-proxy.d.ts.map +1 -0
- package/dist/gs1/non-gtin-creator-proxy.js +301 -0
- package/dist/gs1/non-gtin-creator-proxy.js.map +1 -0
- package/dist/gs1/non-gtin-validator-proxy.d.ts +36 -0
- package/dist/gs1/non-gtin-validator-proxy.d.ts.map +1 -0
- package/dist/gs1/non-gtin-validator-proxy.js +302 -0
- package/dist/gs1/non-gtin-validator-proxy.js.map +1 -0
- package/dist/gs1/prefix-definition-descriptor.d.ts +4 -0
- package/dist/gs1/prefix-definition-descriptor.d.ts.map +1 -0
- package/dist/gs1/prefix-definition-descriptor.js +16 -0
- package/dist/gs1/prefix-definition-descriptor.js.map +1 -0
- package/dist/gs1/prefix-manager-proxy.d.ts +8 -0
- package/dist/gs1/prefix-manager-proxy.d.ts.map +1 -0
- package/dist/gs1/prefix-manager-proxy.js +94 -0
- package/dist/gs1/prefix-manager-proxy.js.map +1 -0
- package/dist/gs1/variable-measure-proxy.d.ts +7 -0
- package/dist/gs1/variable-measure-proxy.d.ts.map +1 -0
- package/dist/gs1/variable-measure-proxy.js +114 -0
- package/dist/gs1/variable-measure-proxy.js.map +1 -0
- package/dist/gs1/verified-by-gs1-proxy.d.ts +7 -0
- package/dist/gs1/verified-by-gs1-proxy.d.ts.map +1 -0
- package/dist/gs1/verified-by-gs1-proxy.js +100 -0
- package/dist/gs1/verified-by-gs1-proxy.js.map +1 -0
- package/dist/index.d.ts +22 -847
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -0
- package/dist/lib-proxy.d.ts +121 -0
- package/dist/lib-proxy.d.ts.map +1 -0
- package/dist/lib-proxy.js +259 -0
- package/dist/lib-proxy.js.map +1 -0
- package/dist/{index.d.cts → locale/en/locale-resources.d.ts} +2 -98
- package/dist/locale/en/locale-resources.d.ts.map +1 -0
- package/dist/locale/en/locale-resources.js +754 -0
- package/dist/locale/en/locale-resources.js.map +1 -0
- package/dist/locale/fr/locale-resources.d.ts +755 -0
- package/dist/locale/fr/locale-resources.d.ts.map +1 -0
- package/dist/locale/fr/locale-resources.js +754 -0
- package/dist/locale/fr/locale-resources.js.map +1 -0
- package/dist/locale/i18n.d.ts +27 -0
- package/dist/locale/i18n.d.ts.map +1 -0
- package/dist/locale/i18n.js +36 -0
- package/dist/locale/i18n.js.map +1 -0
- package/dist/proxy.d.ts +135 -0
- package/dist/proxy.d.ts.map +1 -0
- package/dist/proxy.js +291 -0
- package/dist/proxy.js.map +1 -0
- package/dist/streaming.d.ts +10 -0
- package/dist/streaming.d.ts.map +1 -0
- package/dist/streaming.js +2 -0
- package/dist/streaming.js.map +1 -0
- package/dist/type.d.ts +72 -0
- package/dist/type.d.ts.map +1 -0
- package/dist/type.js +2 -0
- package/dist/type.js.map +1 -0
- package/dist/utility/character-set-descriptor.d.ts +6 -0
- package/dist/utility/character-set-descriptor.d.ts.map +1 -0
- package/dist/utility/character-set-descriptor.js +28 -0
- package/dist/utility/character-set-descriptor.js.map +1 -0
- package/dist/utility/character-set-proxy.d.ts +32 -0
- package/dist/utility/character-set-proxy.d.ts.map +1 -0
- package/dist/utility/character-set-proxy.js +278 -0
- package/dist/utility/character-set-proxy.js.map +1 -0
- package/dist/utility/index.d.ts +4 -0
- package/dist/utility/index.d.ts.map +1 -0
- package/dist/utility/index.js +4 -0
- package/dist/utility/index.js.map +1 -0
- package/dist/utility/reg-exp-proxy.d.ts +8 -0
- package/dist/utility/reg-exp-proxy.d.ts.map +1 -0
- package/dist/utility/reg-exp-proxy.js +103 -0
- package/dist/utility/reg-exp-proxy.js.map +1 -0
- package/dist/utility/string-descriptor.d.ts +4 -0
- package/dist/utility/string-descriptor.d.ts.map +1 -0
- package/dist/utility/string-descriptor.js +12 -0
- package/dist/utility/string-descriptor.js.map +1 -0
- package/dist/utility/string-proxy.d.ts +7 -0
- package/dist/utility/string-proxy.d.ts.map +1 -0
- package/dist/utility/string-proxy.js +63 -0
- package/dist/utility/string-proxy.js.map +1 -0
- package/dist/utility/transformer-descriptor.d.ts +6 -0
- package/dist/utility/transformer-descriptor.d.ts.map +1 -0
- package/dist/utility/transformer-descriptor.js +24 -0
- package/dist/utility/transformer-descriptor.js.map +1 -0
- package/dist/utility/transformer-proxy.d.ts +10 -0
- package/dist/utility/transformer-proxy.d.ts.map +1 -0
- package/dist/utility/transformer-proxy.js +111 -0
- package/dist/utility/transformer-proxy.js.map +1 -0
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/package.json +1 -1
- package/src/app-helper-proxy.ts +3 -4
- package/src/version.ts +1 -1
- package/tsconfig-src.tsbuildinfo +1 -1
- package/dist/character-set-proxy-CQCOcqR3.d.cts +0 -473
- package/dist/character-set-proxy-CQCOcqR3.d.ts +0 -473
- package/dist/chunk-46ONQV2V.js +0 -1
- package/dist/chunk-4BTJEN4N.js +0 -1
- package/dist/chunk-WLXID4YR.js +0 -1
- package/dist/descriptor-Df-lif4q.d.ts +0 -185
- package/dist/generator/index.cjs +0 -17
- package/dist/generator/index.d.cts +0 -224
- package/dist/gs1/index.cjs +0 -1
- package/dist/gs1/index.d.cts +0 -185
- package/dist/index.cjs +0 -17
|
@@ -1,224 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright © 2024-2026 Dolphin Data Development Ltd. and AIDC Toolkit
|
|
3
|
+
* contributors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
7
16
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
readonly name: string;
|
|
13
|
-
/**
|
|
14
|
-
* Description.
|
|
15
|
-
*/
|
|
16
|
-
readonly description: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Function localization.
|
|
20
|
-
*/
|
|
21
|
-
interface FunctionLocalization extends Localization {
|
|
22
|
-
/**
|
|
23
|
-
* Name in title case.
|
|
24
|
-
*/
|
|
25
|
-
readonly titleCaseName: string;
|
|
26
|
-
/**
|
|
27
|
-
* Documentation URL.
|
|
28
|
-
*/
|
|
29
|
-
readonly documentationURL: string;
|
|
30
|
-
/**
|
|
31
|
-
* Parameters map.
|
|
32
|
-
*/
|
|
33
|
-
readonly parametersMap: ReadonlyMap<string, Localization>;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Abstract generator.
|
|
37
|
-
*/
|
|
38
|
-
declare abstract class Generator {
|
|
39
|
-
#private;
|
|
40
|
-
/**
|
|
41
|
-
* Constructor.
|
|
42
|
-
*
|
|
43
|
-
* @param version
|
|
44
|
-
* Package version.
|
|
45
|
-
*
|
|
46
|
-
* @param includeLocalizations
|
|
47
|
-
* Include localizations if true.
|
|
48
|
-
*/
|
|
49
|
-
constructor(version: string, includeLocalizations?: boolean);
|
|
50
|
-
/**
|
|
51
|
-
* Get the logger.
|
|
52
|
-
*/
|
|
53
|
-
get logger(): Logger<object>;
|
|
54
|
-
/**
|
|
55
|
-
* Get the package version.
|
|
56
|
-
*/
|
|
57
|
-
get version(): string;
|
|
58
|
-
/**
|
|
59
|
-
* Get the locales.
|
|
60
|
-
*/
|
|
61
|
-
protected get locales(): readonly string[];
|
|
62
|
-
/**
|
|
63
|
-
* Get the default locale.
|
|
64
|
-
*/
|
|
65
|
-
protected get defaultLocale(): string;
|
|
66
|
-
/**
|
|
67
|
-
* Initialize the generation of the output.
|
|
68
|
-
*/
|
|
69
|
-
protected abstract initialize(): Promisable<void>;
|
|
70
|
-
/**
|
|
71
|
-
* Create a namespace.
|
|
72
|
-
*
|
|
73
|
-
* @param namespace
|
|
74
|
-
* Namespace.
|
|
75
|
-
*/
|
|
76
|
-
protected abstract createNamespace(namespace: string | undefined): void;
|
|
77
|
-
/**
|
|
78
|
-
* Create a category.
|
|
79
|
-
*
|
|
80
|
-
* @param namespace
|
|
81
|
-
* Namespace.
|
|
82
|
-
*
|
|
83
|
-
* @param category
|
|
84
|
-
* Category.
|
|
85
|
-
*
|
|
86
|
-
* @param categoryLocalizationsMap
|
|
87
|
-
* Category localizations map.
|
|
88
|
-
*/
|
|
89
|
-
protected abstract createCategory(namespace: string | undefined, category: string, categoryLocalizationsMap: ReadonlyMap<string, string>): void;
|
|
90
|
-
/**
|
|
91
|
-
* Create a proxy for a class.
|
|
92
|
-
*
|
|
93
|
-
* @param classDescriptor
|
|
94
|
-
* Class descriptor.
|
|
95
|
-
*/
|
|
96
|
-
protected abstract createClassProxy(classDescriptor: ClassDescriptor): void;
|
|
97
|
-
/**
|
|
98
|
-
* Create a proxy for a method.
|
|
99
|
-
*
|
|
100
|
-
* @param classDescriptor
|
|
101
|
-
* Class descriptor.
|
|
102
|
-
*
|
|
103
|
-
* @param methodDescriptor
|
|
104
|
-
* Method descriptor.
|
|
105
|
-
*
|
|
106
|
-
* @param functionLocalizationsMap
|
|
107
|
-
* Function localizations map.
|
|
108
|
-
*/
|
|
109
|
-
protected abstract createMethodProxy(classDescriptor: ClassDescriptor, methodDescriptor: MethodDescriptor, functionLocalizationsMap: ReadonlyMap<string, FunctionLocalization>): void;
|
|
110
|
-
/**
|
|
111
|
-
* Finalize the generation of the output.
|
|
112
|
-
*
|
|
113
|
-
* @param success
|
|
114
|
-
* True if successful.
|
|
115
|
-
*/
|
|
116
|
-
protected abstract finalize(success: boolean): Promisable<void>;
|
|
117
|
-
/**
|
|
118
|
-
* Generate by processing individual imports.
|
|
119
|
-
*/
|
|
120
|
-
generate(): Promise<void>;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Class type alias.
|
|
125
|
-
*/
|
|
126
|
-
interface ClassTypeAlias {
|
|
127
|
-
/**
|
|
128
|
-
* Name.
|
|
129
|
-
*/
|
|
130
|
-
readonly name: string;
|
|
131
|
-
/**
|
|
132
|
-
* Getter function.
|
|
133
|
-
*/
|
|
134
|
-
readonly getter: string;
|
|
135
|
-
/**
|
|
136
|
-
* Declaration associating name with implementation type and creating getter function.
|
|
137
|
-
*/
|
|
138
|
-
readonly declaration: string[];
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Function implementation.
|
|
142
|
-
*/
|
|
143
|
-
interface FunctionImplementation {
|
|
144
|
-
/**
|
|
145
|
-
* Function name.
|
|
146
|
-
*/
|
|
147
|
-
readonly functionName: string;
|
|
148
|
-
/**
|
|
149
|
-
* Parameter localizations with JavaScript type and parameter descriptor.
|
|
150
|
-
*/
|
|
151
|
-
readonly parameterLocalizations: ReadonlyArray<Localization & {
|
|
152
|
-
/**
|
|
153
|
-
* JavaScript type.
|
|
154
|
-
*/
|
|
155
|
-
javaScriptType: string;
|
|
156
|
-
/**
|
|
157
|
-
* Parameter descriptor.
|
|
158
|
-
*/
|
|
159
|
-
parameterDescriptor?: ParameterDescriptor;
|
|
160
|
-
}>;
|
|
161
|
-
/**
|
|
162
|
-
* Declaration.
|
|
163
|
-
*/
|
|
164
|
-
readonly declaration: string[];
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Generator with helpers for writing TypeScript functions file.
|
|
168
|
-
*/
|
|
169
|
-
declare abstract class FunctionsGenerator extends Generator {
|
|
170
|
-
#private;
|
|
171
|
-
protected static readonly BASE_IMPORTS: string[];
|
|
172
|
-
/**
|
|
173
|
-
* Constructor.
|
|
174
|
-
*
|
|
175
|
-
* @param version
|
|
176
|
-
* Package version.
|
|
177
|
-
*
|
|
178
|
-
* @param inline
|
|
179
|
-
* If true, functions are declared inline rather than using `function`.
|
|
180
|
-
*
|
|
181
|
-
* @param supportsContext
|
|
182
|
-
* If true, application extension supports context.
|
|
183
|
-
*/
|
|
184
|
-
constructor(version: string, inline: boolean, supportsContext: boolean);
|
|
185
|
-
/**
|
|
186
|
-
* Get the class type alias.
|
|
187
|
-
*/
|
|
188
|
-
get classTypeAlias(): ClassTypeAlias;
|
|
189
|
-
/**
|
|
190
|
-
* Get the import statement for a namespace.
|
|
191
|
-
*
|
|
192
|
-
* @param namespace
|
|
193
|
-
* Namespace.
|
|
194
|
-
*
|
|
195
|
-
* @returns
|
|
196
|
-
* Import statement.
|
|
197
|
-
*/
|
|
198
|
-
protected getNamespaceImport(namespace: string): string;
|
|
199
|
-
/**
|
|
200
|
-
* @inheritDoc
|
|
201
|
-
*/
|
|
202
|
-
protected createClassProxy(classDescriptor: ClassDescriptor): void;
|
|
203
|
-
/**
|
|
204
|
-
* Get a function implementation.
|
|
205
|
-
*
|
|
206
|
-
* @param methodDescriptor
|
|
207
|
-
* Method descriptor.
|
|
208
|
-
*
|
|
209
|
-
* @param functionNamePrefix
|
|
210
|
-
* Function name prefix.
|
|
211
|
-
*
|
|
212
|
-
* @param functionLocalization
|
|
213
|
-
* Function localization. May be undefined for hidden functions, in which case generated
|
|
214
|
-
*
|
|
215
|
-
* @param parameterCallback
|
|
216
|
-
* Callback to modify parameter in implementation function call.
|
|
217
|
-
*
|
|
218
|
-
* @returns
|
|
219
|
-
* Function implementation.
|
|
220
|
-
*/
|
|
221
|
-
protected getFunctionImplementation(methodDescriptor: MethodDescriptor, functionNamePrefix: string, functionLocalization: FunctionLocalization | undefined, parameterCallback?: (name: string, parameterDescriptor: ParameterDescriptor) => string): FunctionImplementation;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export { type ClassTypeAlias, type FunctionImplementation, type FunctionLocalization, FunctionsGenerator, Generator, type Localization };
|
|
17
|
+
export * from "./generator.js";
|
|
18
|
+
export * from "./functions-generator.js";
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC"}
|
package/dist/generator/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import{a as D}from"../chunk-46ONQV2V.js";import{J as w}from"../chunk-4BTJEN4N.js";import{F as v,j as P,k as g,l as A,n as y,q as b}from"../chunk-WLXID4YR.js";import{ALPHA_URL as S,getLogger as E,I18nLanguageDetectors as j,isI18nParseKey as z,websiteURL as O}from"@aidc-toolkit/core";function U(...p){}U(D,v,w);var L=class p{static#r="app-extension/";#n=E();#e;#t;#a;constructor(e,n=!0){this.#e=e,this.#t=n?Object.keys(P):[],this.#a=this.#t[0]??""}get logger(){return this.#n}get version(){return this.#e}get locales(){return this.#t}get defaultLocale(){return this.#a}static#o(e,n,a){let t={lng:e,returnObjects:!0};if(!z(g,n,t))throw new Error(`Missing localization for ${n} in ${e}`);return a(e,g.t(n,t))}async generate(){let e=!1;await A(j.CLI);let n=O(this.version,!0,await S);await this.initialize();let a=new Map;for(let t of b.classDescriptors){let i=t.namespace,m=t.category,o=a.get(i);o===void 0&&(o=new Map,a.set(i,o));let s=o.get(m);s===void 0&&(s=[],o.set(m,s)),s.push(t)}try{for(let[t,i]of a){let m=t===void 0?"":`${t}.`,o=t===void 0?"":`${t}/`;this.createNamespace(t);for(let[s,u]of i){let f=`Categories.${s}`,r=`Categories.${m}${s}`,$=new Map(this.locales.map(l=>{let d={lng:l},c=r;if(!z(g,c)&&(c=f,!z(g,c,d)))throw new Error(`Missing localization for ${c} in ${l}`);return[l,g.t(c,d)]}));this.createCategory(t,s,$);let T=new Set;for(let l of u){let d=`${m}${l.name}`;if(T.has(d))throw new Error(`Duplicate class ${d}`);T.add(d),this.createClassProxy(l);for(let c of l.methodDescriptors){let R=new Map(c.isHidden!==!0?this.locales.map(M=>[M,p.#o(M,`Functions.${m}${c.functionName}`,(C,h)=>({...h,titleCaseName:h.titleCaseName??h.name.replace(/^[a-z]/u,x=>x.toUpperCase()),documentationURL:`${n}/${C===this.defaultLocale?"":`${C}/`}${p.#r}${o}${h.name}.html`,parametersMap:new Map(c.parameterDescriptors.map(x=>[x.name,p.#o(C,`Parameters.${x.name}`,(F,I)=>I)]))}))]):[]);this.createMethodProxy(l,c,R)}}}}e=!0}finally{await this.finalize(e)}}};var N=class p extends L{static#r={[y.String]:"string",[y.Number]:"number",[y.Boolean]:"boolean",[y.Any]:"any"};static#n="0";static BASE_IMPORTS=['import * as AppExtension from "@aidc-toolkit/app-extension";','import { appExtension } from "./app-extension.js";'];#e;#t;#a;constructor(e,n,a){super(e,!0),this.#e=n,this.#t=a}get classTypeAlias(){return this.#a}getNamespaceImport(e){return`import * as AppExtension${e} from "@aidc-toolkit/app-extension/${e.toLowerCase()}";`}createClassProxy(e){let n=e.namespace??"",a=`${n}${e.name}`,t=`get${a}()`,i=`AppExtension${n}.${e.name}`;this.#a={name:a,getter:t,declaration:["","/**"," * Class type alias name."," */",`type ${a} = ${i};`,"","/**"," * Getter function to get an instance of the class."," *"," * @returns"," * Class instance."," */",`function ${t}: ${a} {`,` return appExtension.getProxy(${i});`,"}"]}}getFunctionImplementation(e,n,a,t){let i=`${this.classTypeAlias.name}["${e.name}"]`,o=e.parameterDescriptors.map(r=>({...a?.parametersMap.get(r.name)??{name:r.name,description:"*** NO LOCALIZATION ***"},javaScriptType:p.#r[r.type],parameterDescriptor:r})),s=[];this.#t?(e.requiresContext===!0&&o.push({name:"invocationContext",description:"Invocation context.",javaScriptType:"InvocationContext"}),e.isStream===!0&&o.push({name:"streamingContext",description:"Streaming context.",javaScriptType:"StreamingContext"})):(e.requiresContext===!0&&s.push(p.#n),e.isStream===!0&&s.push(p.#n));let u=e.isAsync===!0?"async ":"",f=n===""?a?.name??e.name:`${n}${a?.titleCaseName??e.name.replace(/^[a-z]/u,r=>r.toUpperCase())}`;return{functionName:f,parameterLocalizations:o,declaration:[`${this.#e?u:`export ${u}function ${f}`}(${o.map((r,$)=>`${r.name}: Parameters<${i}>[${$}]`).join(", ")}): ReturnType<${i}> ${this.#e?"=>":"{"}`,` ${this.#e?"":"return "}${this.classTypeAlias.getter}.${e.name}(${[...o.map(r=>t===void 0||r.parameterDescriptor===void 0?r.name:t(r.name,r.parameterDescriptor)),...s].join(", ")})${this.#e?"":";"}`,...this.#e?[]:["}"]]}}};export{N as FunctionsGenerator,L as Generator};
|
|
2
1
|
/*!
|
|
3
2
|
* Copyright © 2024-2026 Dolphin Data Development Ltd. and AIDC Toolkit
|
|
4
3
|
* contributors
|
|
@@ -15,3 +14,6 @@ import{a as D}from"../chunk-46ONQV2V.js";import{J as w}from"../chunk-4BTJEN4N.js
|
|
|
15
14
|
* See the License for the specific language governing permissions and
|
|
16
15
|
* limitations under the License.
|
|
17
16
|
*/
|
|
17
|
+
export * from "./generator.js";
|
|
18
|
+
export * from "./functions-generator.js";
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-resources-generator.d.ts","sourceRoot":"","sources":["../../src/generator/locale-resources-generator.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import { VERSION } from "../version.js";
|
|
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
|
+
* Template parameters locale resources.
|
|
19
|
+
*/
|
|
20
|
+
#templateParametersLocaleResources = {};
|
|
21
|
+
/**
|
|
22
|
+
* Template functions locale resources.
|
|
23
|
+
*/
|
|
24
|
+
#templateFunctionsLocaleResources = {};
|
|
25
|
+
/**
|
|
26
|
+
* Template locale resources.
|
|
27
|
+
*/
|
|
28
|
+
#templateLocaleResources = {
|
|
29
|
+
Parameters: this.#templateParametersLocaleResources,
|
|
30
|
+
Functions: this.#templateFunctionsLocaleResources
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Constructor.
|
|
34
|
+
*/
|
|
35
|
+
constructor() {
|
|
36
|
+
super(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
|
+
createClassProxy() {
|
|
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
|
+
createMethodProxy(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.#templateFunctionsLocaleResources;
|
|
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 template locale resources into existing import locale resources.
|
|
163
|
+
*
|
|
164
|
+
* @param mergedLocaleResources
|
|
165
|
+
* Merged locale resources.
|
|
166
|
+
*
|
|
167
|
+
* @param isDefaultLocale
|
|
168
|
+
* If true, locale being merged is the default.
|
|
169
|
+
*
|
|
170
|
+
* @param parentKey
|
|
171
|
+
* Parent key for logging purposes.
|
|
172
|
+
*
|
|
173
|
+
* @param templateLocaleResources
|
|
174
|
+
* Template locale resources.
|
|
175
|
+
*
|
|
176
|
+
* @param importLocaleResources
|
|
177
|
+
* Import locale resources.
|
|
178
|
+
*
|
|
179
|
+
* @param addMissing
|
|
180
|
+
* Add missing if true; applies to locale resources that are not regional.
|
|
181
|
+
*
|
|
182
|
+
* @returns
|
|
183
|
+
* True if any changes.
|
|
184
|
+
*/
|
|
185
|
+
#merge(mergedLocaleResources, isDefaultLocale, parentKey, templateLocaleResources, importLocaleResources, addMissing) {
|
|
186
|
+
let anyChanges = false;
|
|
187
|
+
// Some entries at the root are not part of the generator output.
|
|
188
|
+
const atRoot = parentKey === "";
|
|
189
|
+
if (parentKey.startsWith("Functions.") && "titleCaseName" in importLocaleResources && !("titleCaseName" in templateLocaleResources)) {
|
|
190
|
+
const description = templateLocaleResources["description"];
|
|
191
|
+
const patchTemplateLocaleResources = templateLocaleResources;
|
|
192
|
+
// Patch template locale resources to preserve required position of titleCaseName.
|
|
193
|
+
delete patchTemplateLocaleResources["description"];
|
|
194
|
+
patchTemplateLocaleResources["titleCaseName"] = undefined;
|
|
195
|
+
patchTemplateLocaleResources["description"] = description;
|
|
196
|
+
}
|
|
197
|
+
const patchMergedLocaleResources = mergedLocaleResources;
|
|
198
|
+
// Copy over or delete any import keys that are not in template.
|
|
199
|
+
for (const [key, importValue] of Object.entries(importLocaleResources)) {
|
|
200
|
+
if (!(key in templateLocaleResources)) {
|
|
201
|
+
if (atRoot) {
|
|
202
|
+
patchMergedLocaleResources[key] = importValue;
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
if (isDefaultLocale) {
|
|
206
|
+
this.logger.info(`Deleting ${parentKey}${key}...`);
|
|
207
|
+
}
|
|
208
|
+
anyChanges = true;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
for (const [key, templateValue] of Object.entries(templateLocaleResources)) {
|
|
213
|
+
if (!(key in importLocaleResources)) {
|
|
214
|
+
if (addMissing) {
|
|
215
|
+
if (isDefaultLocale) {
|
|
216
|
+
this.logger.info(`Adding ${parentKey}${key}...`);
|
|
217
|
+
}
|
|
218
|
+
patchMergedLocaleResources[key] = templateValue;
|
|
219
|
+
anyChanges = true;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
const importValue = importLocaleResources[key];
|
|
224
|
+
if (typeof templateValue === "object" && typeof importValue === "object") {
|
|
225
|
+
patchMergedLocaleResources[key] = {};
|
|
226
|
+
if (this.#merge(patchMergedLocaleResources[key], isDefaultLocale, `${parentKey}${key}.`, templateValue, importValue, addMissing)) {
|
|
227
|
+
anyChanges = true;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
else if ((typeof templateValue === "string" || typeof templateValue === "undefined") && (typeof importValue === "string" || typeof importValue === "undefined" || typeof importValue === "object")) {
|
|
231
|
+
patchMergedLocaleResources[key] = importValue;
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
throw new Error(`Mismatched types at ${parentKey}${key}`);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return anyChanges;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Build parameters locale resources by going through parameters sequencer.
|
|
242
|
+
*
|
|
243
|
+
* @param parametersSequencer
|
|
244
|
+
* Parameters sequencer.
|
|
245
|
+
*/
|
|
246
|
+
#buildParametersLocaleResources(parametersSequencer) {
|
|
247
|
+
const entries = Object.entries(parametersSequencer);
|
|
248
|
+
// Sort the entries as defined by the descriptors.
|
|
249
|
+
entries.sort((entry1, entry2) => {
|
|
250
|
+
let result;
|
|
251
|
+
const parameterDescriptor1 = entry1[1].parameterDescriptor;
|
|
252
|
+
const parameterDescriptor2 = entry2[1].parameterDescriptor;
|
|
253
|
+
if ("sortOrder" in parameterDescriptor1) {
|
|
254
|
+
if ("sortOrder" in parameterDescriptor2) {
|
|
255
|
+
result = parameterDescriptor1.sortOrder - parameterDescriptor2.sortOrder;
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
// Parameter descriptors with undefined sort order to go the end.
|
|
259
|
+
result = -parameterDescriptor1.sortOrder;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
// eslint-disable-next-line no-lonely-if -- Matches structure in "then" clause.
|
|
264
|
+
if ("sortOrder" in parameterDescriptor2) {
|
|
265
|
+
// Parameter descriptors with undefined sort order to go the end.
|
|
266
|
+
result = parameterDescriptor2.sortOrder;
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
result = 0;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return result;
|
|
273
|
+
});
|
|
274
|
+
for (const [parameterName, parametersSequencerEntry] of entries) {
|
|
275
|
+
if (parametersSequencerEntry.isUsed) {
|
|
276
|
+
this.#templateParametersLocaleResources[parameterName] = {
|
|
277
|
+
name: parameterName,
|
|
278
|
+
description: "*** LOCALIZATION REQUIRED ***"
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
if (parametersSequencerEntry.parametersSequencerOrNull !== null) {
|
|
282
|
+
this.#buildParametersLocaleResources(parametersSequencerEntry.parametersSequencerOrNull);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Build output to be written back to source file.
|
|
288
|
+
*
|
|
289
|
+
* @param prefix
|
|
290
|
+
* Line prefix.
|
|
291
|
+
*
|
|
292
|
+
* @param value
|
|
293
|
+
* Line value.
|
|
294
|
+
*
|
|
295
|
+
* @param indentLevel
|
|
296
|
+
* Indent level.
|
|
297
|
+
*
|
|
298
|
+
* @returns
|
|
299
|
+
* Output string.
|
|
300
|
+
*/
|
|
301
|
+
static #buildOutput(prefix, value, indentLevel) {
|
|
302
|
+
return `${" ".repeat(indentLevel)}${prefix} ${typeof value === "object" ?
|
|
303
|
+
`{\n${Object.entries(value).map(entry => LocaleResourcesGenerator.#buildOutput(`${entry[0]}:`, entry[1], indentLevel + 1)).join(",\n")}\n${" ".repeat(indentLevel)}}` :
|
|
304
|
+
// JSON.stringify() will apply quotes as appropriate.
|
|
305
|
+
JSON.stringify(value)}`;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* @inheritDoc
|
|
309
|
+
*/
|
|
310
|
+
async finalize(success) {
|
|
311
|
+
if (success) {
|
|
312
|
+
this.#buildParametersLocaleResources(this.#parametersSequencer);
|
|
313
|
+
await Promise.all(await fs.promises.readdir(LocaleResourcesGenerator.#IMPORT_PATH, {
|
|
314
|
+
withFileTypes: true
|
|
315
|
+
}).then(entries => entries.filter(entry => entry.isDirectory()).map(async (entry) => {
|
|
316
|
+
const localeResourcesSource = path.resolve(LocaleResourcesGenerator.#IMPORT_PATH, entry.name, "locale-resources.ts");
|
|
317
|
+
return import(localeResourcesSource).then(async (module) => {
|
|
318
|
+
const mergedLocaleResources = {};
|
|
319
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Module format is known.
|
|
320
|
+
return this.#merge(mergedLocaleResources, entry.name === "en", "", this.#templateLocaleResources, module.default, !entry.name.includes("-")) ?
|
|
321
|
+
fs.promises.writeFile(localeResourcesSource, `${LocaleResourcesGenerator.#buildOutput("export default", mergedLocaleResources, 0)};\n`) :
|
|
322
|
+
undefined;
|
|
323
|
+
});
|
|
324
|
+
})));
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
const generator = new LocaleResourcesGenerator();
|
|
329
|
+
generator.generate().catch((e) => {
|
|
330
|
+
generator.logger.error(e);
|
|
331
|
+
process.exit(1);
|
|
332
|
+
});
|
|
333
|
+
//# sourceMappingURL=locale-resources-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AAOlC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,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,kCAAkC,GAAoB,EAAE,CAAC;IAElE;;OAEG;IACM,iCAAiC,GAAoB,EAAE,CAAC;IAEjE;;OAEG;IACM,wBAAwB,GAAoB;QACjD,UAAU,EAAE,IAAI,CAAC,kCAAkC;QACnD,SAAS,EAAE,IAAI,CAAC,iCAAiC;KACpD,CAAC;IAEF;;OAEG;IACH;QACI,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED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C,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AppExtension } from "../app-extension.js";
|
|
2
|
+
import { CharacterSetCreatorProxy, CharacterSetValidatorProxy } from "../utility/index.js";
|
|
3
|
+
export declare class AI82Proxy extends CharacterSetCreatorProxy {
|
|
4
|
+
constructor(appExtension: AppExtension);
|
|
5
|
+
}
|
|
6
|
+
export declare class AI39Proxy extends CharacterSetCreatorProxy {
|
|
7
|
+
constructor(appExtension: AppExtension);
|
|
8
|
+
}
|
|
9
|
+
export declare class AI64Proxy extends CharacterSetValidatorProxy {
|
|
10
|
+
constructor(appExtension: AppExtension);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=character-set-proxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AAMxD,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAE3F,qBAUa,SAAU,SAAQ,wBAAwB;gBACvC,YAAY,EAAE,YAAY;CAGzC;AAED,qBAUa,SAAU,SAAQ,wBAAwB;gBACvC,YAAY,EAAE,YAAY;CAGzC;AAED,qBAIa,SAAU,SAAQ,0BAA0B;gBACzC,YAAY,EAAE,YAAY;CAGzC"}
|