@mxpicture/gcp-functions-common 1.1.65 → 1.1.66
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anno.property.d.ts","sourceRoot":"","sources":["../../src/annotation/anno.property.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"anno.property.d.ts","sourceRoot":"","sources":["../../src/annotation/anno.property.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,eAAe,EAChB,MAAM,iCAAiC,CAAC;AAKzC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,gBAAgB,EAC/D,UAAU,MAAM,EAChB,aAAa,MAAM,EACnB,MAAM,eAAe,CAAC,CAAC,CAAC,KACvB,mBAAmB,CAAC,CAAC,CAqBvB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { castDecoEnum } from "../decorator/deco.cast.js";
|
|
1
2
|
import { buildEnumName, DecoPropertyType } from "../decorator/deco.enum.js";
|
|
2
3
|
import { Decorator } from "../decorator/Decorator.js";
|
|
4
|
+
import { EnumRegistry } from "../helper/EnumRegistry.js";
|
|
3
5
|
const isDecoObjectData = (data) => data.type === DecoPropertyType.object && "deco" in data;
|
|
4
6
|
/**
|
|
5
7
|
* Maps a single raw decorator property into an {@link AnnotationsProperty}.
|
|
@@ -17,10 +19,16 @@ const isDecoObjectData = (data) => data.type === DecoPropertyType.object && "dec
|
|
|
17
19
|
export const mapAnnotationsProperty = (headName, propertyKey, prop) => {
|
|
18
20
|
const decoRef = isDecoObjectData(prop.data) ? prop.data.deco : null;
|
|
19
21
|
const sub = decoRef instanceof Decorator ? decoRef : null;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
let propertyType = sub?.name;
|
|
23
|
+
if (!propertyType && prop.data.type === DecoPropertyType.enum) {
|
|
24
|
+
propertyType = buildEnumName(headName, propertyKey);
|
|
25
|
+
const data = castDecoEnum(prop.data);
|
|
26
|
+
const reg = EnumRegistry.instance().getItem(propertyType);
|
|
27
|
+
if (data && reg)
|
|
28
|
+
data.values = Object.keys(reg.keyTexts);
|
|
29
|
+
}
|
|
30
|
+
if (!propertyType)
|
|
31
|
+
propertyType = prop.data.type;
|
|
24
32
|
return structuredClone({
|
|
25
33
|
...prop,
|
|
26
34
|
propertyKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anno.property.js","sourceRoot":"","sources":["../../src/annotation/anno.property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE5E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"anno.property.js","sourceRoot":"","sources":["../../src/annotation/anno.property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE5E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAOzD,MAAM,gBAAgB,GAAG,CAAC,IAAsB,EAA0B,EAAE,CAC1E,IAAI,CAAC,IAAI,KAAK,gBAAgB,CAAC,MAAM,IAAI,MAAM,IAAI,IAAI,CAAC;AAE1D;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,QAAgB,EAChB,WAAmB,EACnB,IAAwB,EACA,EAAE;IAC1B,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,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