export-table-plugin-typescript 1.0.20 → 1.0.21
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/ExportTS.d.ts.map +1 -1
- package/dist/ExportTS.js +21 -1
- package/package.json +1 -1
- package/src/ExportTS.ts +21 -1
package/dist/ExportTS.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportTS.d.ts","sourceRoot":"","sources":["../src/ExportTS.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAAmF,MAAM,kBAAkB,CAAA;AAGnL,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"ExportTS.d.ts","sourceRoot":"","sources":["../src/ExportTS.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAAmF,MAAM,kBAAkB,CAAA;AAGnL,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAkQpE;AAED,qBAAa,cAAe,SAAQ,UAAU;IAC7C,IAAI,SAAe;IACnB,IAAI,EAAE,MAAM,EAAE,CAAS;IAEvB,WAAW,CAAC,KAAK,EAAE,iBAAiB;CAQpC"}
|
package/dist/ExportTS.js
CHANGED
|
@@ -168,7 +168,7 @@ ${(0, export_table_lib_1.foreach)(fields, f => `
|
|
|
168
168
|
]
|
|
169
169
|
|
|
170
170
|
export class ${RowClass}{
|
|
171
|
-
|
|
171
|
+
|
|
172
172
|
${(0, export_table_lib_1.foreach)(fields, f => `
|
|
173
173
|
/**
|
|
174
174
|
* ${f.describe}
|
|
@@ -231,6 +231,26 @@ export class ${ClassName} {
|
|
|
231
231
|
return this.Configs[0]
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
+
${(0, export_table_lib_1.foreach)(fields, f => `
|
|
235
|
+
private _findBy${getFieldName(f.name)}CacheMap: Map<${f.type}, ${RowClass}> = new Map()
|
|
236
|
+
FindConfigBy${getFieldName(f.name)}(${f.name}: ${f.type}): ${RowClass} | undefined {
|
|
237
|
+
let cacheMap = this._findBy${getFieldName(f.name)}CacheMap
|
|
238
|
+
if (cacheMap.has(${f.name})) {
|
|
239
|
+
return cacheMap.get(${f.name})
|
|
240
|
+
} else {
|
|
241
|
+
let configs = this.Configs
|
|
242
|
+
let index = configs.findIndex(c => c.${f.name} == ${f.name})
|
|
243
|
+
if (index != -1) {
|
|
244
|
+
let config = configs[index]
|
|
245
|
+
cacheMap.set(${f.name}, config)
|
|
246
|
+
return config
|
|
247
|
+
} else {
|
|
248
|
+
cacheMap.set(${f.name}, undefined)
|
|
249
|
+
return undefined
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
`)}
|
|
234
254
|
protected LoadDefaultConfigs() {
|
|
235
255
|
|
|
236
256
|
let configs = this.Configs
|
package/package.json
CHANGED
package/src/ExportTS.ts
CHANGED
|
@@ -132,7 +132,7 @@ ${foreach(fields, f => `
|
|
|
132
132
|
]
|
|
133
133
|
|
|
134
134
|
export class ${RowClass}{
|
|
135
|
-
|
|
135
|
+
|
|
136
136
|
${foreach(fields, f => `
|
|
137
137
|
/**
|
|
138
138
|
* ${f.describe}
|
|
@@ -195,6 +195,26 @@ export class ${ClassName} {
|
|
|
195
195
|
return this.Configs[0]
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
+
${foreach(fields, f => `
|
|
199
|
+
private _findBy${getFieldName(f.name)}CacheMap: Map<${f.type}, ${RowClass}> = new Map()
|
|
200
|
+
FindConfigBy${getFieldName(f.name)}(${f.name}: ${f.type}): ${RowClass} | undefined {
|
|
201
|
+
let cacheMap = this._findBy${getFieldName(f.name)}CacheMap
|
|
202
|
+
if (cacheMap.has(${f.name})) {
|
|
203
|
+
return cacheMap.get(${f.name})
|
|
204
|
+
} else {
|
|
205
|
+
let configs = this.Configs
|
|
206
|
+
let index = configs.findIndex(c => c.${f.name} == ${f.name})
|
|
207
|
+
if (index != -1) {
|
|
208
|
+
let config = configs[index]
|
|
209
|
+
cacheMap.set(${f.name}, config)
|
|
210
|
+
return config
|
|
211
|
+
} else {
|
|
212
|
+
cacheMap.set(${f.name}, undefined)
|
|
213
|
+
return undefined
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
`)}
|
|
198
218
|
protected LoadDefaultConfigs() {
|
|
199
219
|
|
|
200
220
|
let configs = this.Configs
|