xml-model 0.2.6 → 0.2.8
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/build/main/defaults/index.js +6 -6
- package/build/main/defaults/models.js +1 -1
- package/build/main/helper/merge-maps.d.ts +1 -0
- package/build/main/helper/merge-maps.js +42 -0
- package/build/main/model/index.js +27 -27
- package/build/main/model/types.js +22 -22
- package/build/main/model.spec.js +12 -12
- package/build/module/defaults/index.js +6 -6
- package/build/module/defaults/models.js +1 -1
- package/build/module/helper/merge-maps.d.ts +1 -0
- package/build/module/helper/merge-maps.js +39 -0
- package/build/module/model/index.js +27 -27
- package/build/module/model/types.js +22 -22
- package/build/module/model.spec.js +12 -12
- package/package.json +1 -1
|
@@ -40,13 +40,13 @@ exports.defaults = {
|
|
|
40
40
|
// TODO: handle inline
|
|
41
41
|
const prop = context.property;
|
|
42
42
|
const elements = context.elements;
|
|
43
|
+
if (prop.reflected.isOptional && elements.length === 0) {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
43
46
|
if (prop.model) {
|
|
44
47
|
return prop.model.fromXML({ elements });
|
|
45
48
|
}
|
|
46
49
|
const type = context.property.reflected.type;
|
|
47
|
-
if (prop.reflected.isOptional && elements.length === 0) {
|
|
48
|
-
return undefined;
|
|
49
|
-
}
|
|
50
50
|
if (type.is("class")) {
|
|
51
51
|
const model = (0, model_1.getModel)(type.class);
|
|
52
52
|
return model.fromXML({ elements: context.elements });
|
|
@@ -123,14 +123,14 @@ exports.defaults = {
|
|
|
123
123
|
},
|
|
124
124
|
propertyToXML(context) {
|
|
125
125
|
const property = context.property;
|
|
126
|
-
if (property.model) {
|
|
127
|
-
return property.model.toXML(context.value);
|
|
128
|
-
}
|
|
129
126
|
const type = property.reflected.type;
|
|
130
127
|
const value = context.value;
|
|
131
128
|
if (property.reflected.isOptional && typeof value === "undefined") {
|
|
132
129
|
return { elements: [] }; // FIXME should return unefined ???
|
|
133
130
|
}
|
|
131
|
+
if (property.model) {
|
|
132
|
+
return property.model.toXML(value);
|
|
133
|
+
}
|
|
134
134
|
const getXML = () => {
|
|
135
135
|
if (type.is("class")) {
|
|
136
136
|
const model = (0, model_1.getModel)(type.class);
|
|
@@ -15,7 +15,7 @@ const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metada
|
|
|
15
15
|
__RΦ.t[id] = t = l;
|
|
16
16
|
}
|
|
17
17
|
return t;
|
|
18
|
-
}, t: { [4]: { RΦ: t => ({ TΦ: "~" }) }, [111]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(107) }] }) }, [107]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(105) }) }, [105]: { LΦ: t => require("../types").IΦXMLElement }, [13]: { LΦ: t => String }, [14]: { LΦ: t => Number }, [1698]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(
|
|
18
|
+
}, t: { [4]: { RΦ: t => ({ TΦ: "~" }) }, [111]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(107) }] }) }, [107]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(105) }) }, [105]: { LΦ: t => require("../types").IΦXMLElement }, [13]: { LΦ: t => String }, [14]: { LΦ: t => Number }, [1698]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(3179) }] }) }, [3179]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(3177) }) }, [3177]: { RΦ: t => ({ TΦ: "O", m: [{ n: "type", f: "", t: __RΦ.a(13) }, { n: "name", f: "", t: __RΦ.a(13) }] }) }, [20]: { LΦ: t => Boolean } } };
|
|
19
19
|
const model_1 = require("../model");
|
|
20
20
|
const xml_1 = require("../xml");
|
|
21
21
|
// string is <string>value</string>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function mergeMaps<K, V>(...sources: Map<K, V>[]): Map<K, V>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metadata(k, v)(t, ...a) : void 0, f: (f, d, n) => (d.forEach(d => d(f)), Object.defineProperty(f, "name", { value: n, writable: false }), f), c: (c, d, dp, dsp, n) => (d.forEach(d => d(c)), dp.forEach(([p, d]) => d(c.prototype, p)), dsp.forEach(([p, d]) => d(c, p)), n ? Object.defineProperty(c, "name", { value: n, writable: false }) : undefined, c), r: (o, a) => (Object.assign(o, a)), a: id => {
|
|
4
|
+
let t = __RΦ.t[id];
|
|
5
|
+
if (t === void 0)
|
|
6
|
+
return void 0;
|
|
7
|
+
if (t.RΦ) {
|
|
8
|
+
let r = t.RΦ;
|
|
9
|
+
delete t.RΦ;
|
|
10
|
+
__RΦ.r(t, r(t));
|
|
11
|
+
}
|
|
12
|
+
else if (t.LΦ) {
|
|
13
|
+
let l = t.LΦ();
|
|
14
|
+
delete t.LΦ;
|
|
15
|
+
__RΦ.t[id] = t = l;
|
|
16
|
+
}
|
|
17
|
+
return t;
|
|
18
|
+
}, t: { [1719]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(1718) }) }, [1718]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1055), p: [__RΦ.a(1716), __RΦ.a(1717)] }) }, [1055]: { LΦ: t => Map }, [1716]: { LΦ: t => Object }, [1717]: { LΦ: t => Object }, [4]: { RΦ: t => ({ TΦ: "~" }) }, [22]: { RΦ: t => ({ TΦ: "V" }) } } };
|
|
19
|
+
function mergeMaps(...sources) {
|
|
20
|
+
const res = new Map();
|
|
21
|
+
sources.forEach(__RΦ.f((source) => {
|
|
22
|
+
const overrides = new Map();
|
|
23
|
+
const additions = new Map();
|
|
24
|
+
source.forEach(__RΦ.f((val, key) => (res.has(key) ? overrides : additions).set(key, val), [__RΦ.m("rt:p", [{ n: "val", t: () => __RΦ.a(4), v: null }, { n: "key", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(1718))], ""));
|
|
25
|
+
if (overrides.size) {
|
|
26
|
+
const entries = Array.from(res.entries());
|
|
27
|
+
entries.forEach(__RΦ.f((entry) => {
|
|
28
|
+
const key = entry[0];
|
|
29
|
+
if (overrides.has(key))
|
|
30
|
+
entry[1] = overrides.get(key);
|
|
31
|
+
}, [__RΦ.m("rt:p", [{ n: "entry", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(22))], ""));
|
|
32
|
+
res.clear();
|
|
33
|
+
entries.forEach(__RΦ.f(([key, val]) => res.set(key, val), [__RΦ.m("rt:p", [{ n: "[key, val]", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(1718))], ""));
|
|
34
|
+
}
|
|
35
|
+
additions.forEach(__RΦ.f((val, key) => res.set(key, val), [__RΦ.m("rt:p", [{ n: "val", t: () => __RΦ.a(4), v: null }, { n: "key", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(1718))], ""));
|
|
36
|
+
}, [__RΦ.m("rt:p", [{ n: "source", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(22))], ""));
|
|
37
|
+
return res;
|
|
38
|
+
}
|
|
39
|
+
exports.default = mergeMaps;
|
|
40
|
+
__RΦ.m("rt:p", [{ n: "sources", t: () => __RΦ.a(1719), v: null, f: "3" }])(mergeMaps);
|
|
41
|
+
__RΦ.m("rt:f", "F")(mergeMaps);
|
|
42
|
+
__RΦ.m("rt:t", () => __RΦ.a(1718))(mergeMaps);
|
|
@@ -19,7 +19,7 @@ const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metada
|
|
|
19
19
|
__RΦ.t[id] = t = l;
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
|
-
}, t: { [532]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(503)] }) }, [202]: { LΦ: t => require("typescript-rtti/dist").IΦConstructor }, [503]: { LΦ: t => Object }, [
|
|
22
|
+
}, t: { [532]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(503)] }) }, [202]: { LΦ: t => require("typescript-rtti/dist").IΦConstructor }, [503]: { LΦ: t => Object }, [1814]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(8)] }) }, [8]: { RΦ: t => ({ TΦ: "U" }) }, [1817]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(140), p: [__RΦ.a(1814), __RΦ.a(22), __RΦ.a(8)] }) }, [140]: { LΦ: t => Object }, [22]: { RΦ: t => ({ TΦ: "V" }) }, [505]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(1)] }) }, [502]: { TΦ: "5", name: "XMLModel" }, [1]: { RΦ: t => ({ TΦ: "~" }) }, [1837]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(505)] }) }, [12]: { RΦ: t => ({ TΦ: "n" }) }, [1846]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1622), p: [__RΦ.a(503)] }) }, [1622]: { LΦ: t => require("./types").IΦCreateXMLModelOptions }, [525]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(522), p: [__RΦ.a(503)] }) }, [522]: { LΦ: t => require("./types").IΦXMLModelOptions }, [1870]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(1321)] }) }, [1321]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(422), __RΦ.a(1319)] }) }, [602]: { LΦ: t => require("./types").IΦConversionOptions }, [422]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(423), p: [__RΦ.a(421), __RΦ.a(384)] }) }, [423]: { LΦ: t => Object }, [421]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(380), p: [__RΦ.a(1)] }) }, [380]: { LΦ: t => require("./types").IΦfromXMLContext }, [384]: { LΦ: t => "properties" }, [1319]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1320), p: [__RΦ.a(1)] }) }, [1320]: { LΦ: t => Object }, [4]: { RΦ: t => ({ TΦ: "~" }) }, [658]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(659), p: [__RΦ.a(503)] }) }, [659]: { LΦ: t => Object }, [1880]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(1878)] }) }, [1878]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(1353), __RΦ.a(1876)] }) }, [1353]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1354), p: [__RΦ.a(1352), __RΦ.a(384)] }) }, [1354]: { LΦ: t => Object }, [1352]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(860), p: [__RΦ.a(1)] }) }, [860]: { LΦ: t => require("./types").IΦtoXMLContext }, [1876]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1877), p: [__RΦ.a(1)] }) }, [1877]: { LΦ: t => Object }, [890]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(891), p: [__RΦ.a(503)] }) }, [891]: { LΦ: t => Object }, [20]: { LΦ: t => Boolean }, [661]: { RΦ: t => ({ TΦ: "O", m: [{ n: "fromXML", f: "", t: __RΦ.a(667) }, { n: "toXML", f: "", t: __RΦ.a(898) }, { n: "options", f: "", t: __RΦ.a(1067) }] }) }, [667]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(663), __RΦ.a(665)] }) }, [663]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(664), p: [__RΦ.a(606), __RΦ.a(384)] }) }, [664]: { LΦ: t => Object }, [606]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(380), p: [__RΦ.a(523)] }) }, [523]: { LΦ: t => Object }, [665]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(666), p: [__RΦ.a(523)] }) }, [666]: { LΦ: t => Object }, [898]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(894), __RΦ.a(896)] }) }, [894]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(895), p: [__RΦ.a(863), __RΦ.a(384)] }) }, [895]: { LΦ: t => Object }, [863]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(860), p: [__RΦ.a(523)] }) }, [896]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(897), p: [__RΦ.a(523)] }) }, [897]: { LΦ: t => Object }, [1067]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1055), p: [__RΦ.a(1065), __RΦ.a(1066)] }) }, [1055]: { LΦ: t => Map }, [1065]: { LΦ: t => Object }, [1066]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(214), p: [__RΦ.a(523)] }) }, [214]: { LΦ: t => require("./types").IΦXMLModelPropertyOptions }, [1896]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(1894)] }) }, [1894]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(421), __RΦ.a(1)] }) }, [1901]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(1899)] }) }, [1899]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(1352), __RΦ.a(111)] }) }, [111]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(107) }] }) }, [107]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(105) }) }, [105]: { LΦ: t => require("../types").IΦXMLElement }, [13]: { LΦ: t => String }, [541]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(13), __RΦ.a(111)] }) }, [28]: { LΦ: t => Object }, [948]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(944), p: [__RΦ.a(532)] }) }, [944]: { LΦ: t => require("typescript-rtti/dist").ReflectedClass }, [1062]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1055), p: [__RΦ.a(13), __RΦ.a(1061)] }) }, [1061]: { RΦ: t => ({ TΦ: "&", t: [__RΦ.a(1059), __RΦ.a(1060)] }) }, [1059]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(214), p: [__RΦ.a(1)] }) }, [1060]: { RΦ: t => ({ TΦ: "O", m: [{ n: "model", f: "", t: __RΦ.a(1) }] }) }, [1626]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(1621)] }) }, [1621]: { LΦ: t => Object }, [1625]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1622), p: [__RΦ.a(1621)] }) }, [1659]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(1621)] }) }, [1822]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(1819)] }) }, [1819]: { LΦ: t => Object }, [1832]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(1831)] }) }, [10]: { RΦ: t => ({ TΦ: "u" }) }, [1831]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(1819)] }) }, [1978]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(1977)] }) }, [1977]: { LΦ: t => Object }, [1981]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(1977)] }) }, [1984]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1622), p: [__RΦ.a(1983)] }) }, [1983]: { LΦ: t => Object }, [1986]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(22), p: [{ n: "constructor", t: () => __RΦ.a(1987), v: null }], f: "" }) }, [1987]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(1983)] }) } } };
|
|
23
23
|
const typescript_rtti_1 = require("typescript-rtti");
|
|
24
24
|
const middleware_1 = require("../middleware");
|
|
25
25
|
const property_1 = require("./property");
|
|
@@ -40,9 +40,9 @@ function* ParentChain(constructor) {
|
|
|
40
40
|
}
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(
|
|
43
|
+
__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(1814), v: null }])(ParentChain);
|
|
44
44
|
__RΦ.m("rt:f", "F")(ParentChain);
|
|
45
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
45
|
+
__RΦ.m("rt:t", () => __RΦ.a(1817))(ParentChain);
|
|
46
46
|
function getParentModel(model) {
|
|
47
47
|
if (model.options.parent)
|
|
48
48
|
return model.options.parent;
|
|
@@ -56,7 +56,7 @@ function getParentModel(model) {
|
|
|
56
56
|
}
|
|
57
57
|
__RΦ.m("rt:p", [{ n: "model", t: () => __RΦ.a(505), v: null }])(getParentModel);
|
|
58
58
|
__RΦ.m("rt:f", "F")(getParentModel);
|
|
59
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
59
|
+
__RΦ.m("rt:t", () => __RΦ.a(1837))(getParentModel);
|
|
60
60
|
class XMLModel {
|
|
61
61
|
constructor(type, options) {
|
|
62
62
|
this.type = type;
|
|
@@ -67,7 +67,7 @@ class XMLModel {
|
|
|
67
67
|
if (typeof parent === "undefined")
|
|
68
68
|
parent = getParentModel(this);
|
|
69
69
|
return parent;
|
|
70
|
-
}, [__RΦ.m("rt:p", []), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(
|
|
70
|
+
}, [__RΦ.m("rt:p", []), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(1837))], "getParent");
|
|
71
71
|
let propertiesLoaded = false;
|
|
72
72
|
const properties = {
|
|
73
73
|
options: new Map(),
|
|
@@ -218,24 +218,23 @@ class XMLModel {
|
|
|
218
218
|
return (0, typescript_rtti_1.reflect)(this.type, { TΦ: "c", t: void 0, p: [__RΦ.a(532)], r: void 0, tp: [] });
|
|
219
219
|
}
|
|
220
220
|
resolveAllProperties() {
|
|
221
|
-
const
|
|
221
|
+
const ownProperties = new Map();
|
|
222
222
|
const parent = getParentModel(this);
|
|
223
|
-
if (parent)
|
|
224
|
-
parent.resolveAllProperties().forEach(__RΦ.f((prop, key) => {
|
|
225
|
-
properties.set(key, prop);
|
|
226
|
-
}, [__RΦ.m("rt:p", [{ n: "prop", t: () => __RΦ.a(4), v: null }, { n: "key", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(22))], ""));
|
|
227
223
|
this.options.properties.options.forEach(__RΦ.f((options, key) => {
|
|
228
|
-
|
|
229
|
-
properties.set(key, new Proxy(options, {
|
|
224
|
+
ownProperties.set(key, new Proxy(options, {
|
|
230
225
|
get: __RΦ.f((target, p, reciever) => {
|
|
231
226
|
if (p === "model")
|
|
232
227
|
return this;
|
|
233
228
|
else
|
|
234
229
|
return Reflect.get(target, p, reciever);
|
|
235
230
|
}, [__RΦ.m("rt:p", [{ n: "target", t: () => __RΦ.a(4), v: null }, { n: "p", t: () => __RΦ.a(4), v: null }, { n: "reciever", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(1))], "get"),
|
|
236
|
-
})
|
|
231
|
+
}) // FIXME: is typing ok ?
|
|
232
|
+
);
|
|
237
233
|
}, [__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(4), v: null }, { n: "key", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(22))], ""));
|
|
238
|
-
|
|
234
|
+
const res = parent
|
|
235
|
+
? (0, merge_maps_1.default)(parent.resolveAllProperties(), ownProperties)
|
|
236
|
+
: ownProperties;
|
|
237
|
+
return res;
|
|
239
238
|
}
|
|
240
239
|
}
|
|
241
240
|
exports.XMLModel = XMLModel;
|
|
@@ -244,19 +243,19 @@ __RΦ.m("rt:SP", [])(XMLModel);
|
|
|
244
243
|
__RΦ.m("rt:P", ["options", "type", "reflectedClass"])(XMLModel);
|
|
245
244
|
__RΦ.m("rt:Sm", [])(XMLModel);
|
|
246
245
|
__RΦ.m("rt:m", ["fromXML", "toXML", "resolveAllProperties"])(XMLModel);
|
|
247
|
-
__RΦ.m("rt:p", [{ n: "type", t: () => __RΦ.a(532), v: null, f: "R" }, { n: "options", t: () => __RΦ.a(
|
|
246
|
+
__RΦ.m("rt:p", [{ n: "type", t: () => __RΦ.a(532), v: null, f: "R" }, { n: "options", t: () => __RΦ.a(1846), v: null }])(XMLModel);
|
|
248
247
|
__RΦ.m("rt:f", "Ce")(XMLModel);
|
|
249
248
|
__RΦ.m("rt:t", () => __RΦ.a(525))(XMLModel.prototype, "options");
|
|
250
249
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "options");
|
|
251
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
250
|
+
__RΦ.m("rt:t", () => __RΦ.a(1870))(XMLModel.prototype, "parent");
|
|
252
251
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "parent");
|
|
253
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
252
|
+
__RΦ.m("rt:t", () => __RΦ.a(1880))(XMLModel.prototype, "parent");
|
|
254
253
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "parent");
|
|
255
254
|
__RΦ.m("rt:t", () => __RΦ.a(661))(XMLModel.prototype, "properties");
|
|
256
255
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "properties");
|
|
257
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
256
|
+
__RΦ.m("rt:t", () => __RΦ.a(1896))(XMLModel.prototype, "parent");
|
|
258
257
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "parent");
|
|
259
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
258
|
+
__RΦ.m("rt:t", () => __RΦ.a(1901))(XMLModel.prototype, "parent");
|
|
260
259
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "parent");
|
|
261
260
|
__RΦ.m("rt:t", () => __RΦ.a(13))(XMLModel.prototype, "tagname");
|
|
262
261
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "tagname");
|
|
@@ -280,7 +279,7 @@ __RΦ.m("rt:f", "M.")(XMLModel.prototype["resolveAllProperties"]);
|
|
|
280
279
|
((t, p) => __RΦ.m("rt:h", () => typeof t === "object" ? t.constructor : t)(t[p]))(XMLModel.prototype, "resolveAllProperties");
|
|
281
280
|
__RΦ.m("rt:p", [])(XMLModel.prototype, "resolveAllProperties");
|
|
282
281
|
__RΦ.m("rt:f", "M.")(XMLModel.prototype, "resolveAllProperties");
|
|
283
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
282
|
+
__RΦ.m("rt:t", () => __RΦ.a(1062))(XMLModel.prototype, "resolveAllProperties");
|
|
284
283
|
function createModel(type, options) {
|
|
285
284
|
if (findModel(type)) {
|
|
286
285
|
throw new TypeError(`a model for type ${type.name} already exists`);
|
|
@@ -298,9 +297,9 @@ function findModel(id) {
|
|
|
298
297
|
return exports.Models.get(id);
|
|
299
298
|
}
|
|
300
299
|
exports.findModel = findModel;
|
|
301
|
-
__RΦ.m("rt:p", [{ n: "id", t: () => __RΦ.a(
|
|
300
|
+
__RΦ.m("rt:p", [{ n: "id", t: () => __RΦ.a(1822), v: null }])(findModel);
|
|
302
301
|
__RΦ.m("rt:f", "F")(findModel);
|
|
303
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
302
|
+
__RΦ.m("rt:t", () => __RΦ.a(1832))(findModel);
|
|
304
303
|
function getModel(id) {
|
|
305
304
|
const model = findModel(id);
|
|
306
305
|
if (model)
|
|
@@ -309,20 +308,21 @@ function getModel(id) {
|
|
|
309
308
|
throw new TypeError(`couln't find model for type ${id.name}`);
|
|
310
309
|
}
|
|
311
310
|
exports.getModel = getModel;
|
|
312
|
-
__RΦ.m("rt:p", [{ n: "id", t: () => __RΦ.a(
|
|
311
|
+
__RΦ.m("rt:p", [{ n: "id", t: () => __RΦ.a(1978), v: null }])(getModel);
|
|
313
312
|
__RΦ.m("rt:f", "F")(getModel);
|
|
314
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
313
|
+
__RΦ.m("rt:t", () => __RΦ.a(1981))(getModel);
|
|
315
314
|
// Model decorator
|
|
316
315
|
function ModelDecoratorFactory(options) {
|
|
317
316
|
return __RΦ.f(function (constructor) {
|
|
318
317
|
findModel(constructor) || createModel(constructor, options || {});
|
|
319
|
-
}, [__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(
|
|
318
|
+
}, [__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(1987), v: null }]), __RΦ.m("rt:f", "M"), __RΦ.m("rt:t", () => __RΦ.a(22))], "");
|
|
320
319
|
}
|
|
321
320
|
exports.Model = ModelDecoratorFactory;
|
|
322
|
-
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(
|
|
321
|
+
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(1984), v: null, f: "?" }])(ModelDecoratorFactory);
|
|
323
322
|
__RΦ.m("rt:f", "F")(ModelDecoratorFactory);
|
|
324
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
323
|
+
__RΦ.m("rt:t", () => __RΦ.a(1986))(ModelDecoratorFactory);
|
|
325
324
|
var property_2 = require("./property");
|
|
326
325
|
Object.defineProperty(exports, "Prop", { enumerable: true, get: function () { return property_2.Prop; } });
|
|
327
326
|
require("../defaults/models");
|
|
328
327
|
const errors_1 = require("../errors");
|
|
328
|
+
const merge_maps_1 = __importDefault(require("../helper/merge-maps"));
|
|
@@ -16,21 +16,21 @@ const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metada
|
|
|
16
16
|
__RΦ.t[id] = t = l;
|
|
17
17
|
}
|
|
18
18
|
return t;
|
|
19
|
-
}, t: { [
|
|
19
|
+
}, t: { [1363]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(214), p: [__RΦ.a(1334)] }) }, [214]: { TΦ: "5", name: "XMLModelPropertyOptions" }, [1334]: { LΦ: t => Object }, [1367]: { LΦ: t => Object }, [493]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(214), p: [__RΦ.a(375)] }) }, [375]: { LΦ: t => Object }, [107]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(105) }) }, [105]: { LΦ: t => require("../types").IΦXMLElement }, [496]: { LΦ: t => Object }, [497]: { LΦ: t => require("typescript-rtti").ReflectedProperty }, [13]: { LΦ: t => String }, [20]: { LΦ: t => Boolean }, [505]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(1)] }) }, [502]: { LΦ: t => require("../model").XMLModel }, [1]: { RΦ: t => ({ TΦ: "~" }) }, [357]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(20), p: [{ n: "element", t: () => __RΦ.a(105), v: null }, { n: "context", t: () => __RΦ.a(399), v: null }], f: "" }) }, [399]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(400), p: [__RΦ.a(377), __RΦ.a(378)] }) }, [400]: { LΦ: t => Object }, [377]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(374), p: [__RΦ.a(215)] }) }, [374]: { TΦ: "5", name: "PropertyFromXMLContext" }, [215]: { LΦ: t => Object }, [378]: { LΦ: t => "elements" }, [1214]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(107), p: [{ n: "context", t: () => __RΦ.a(399), v: null }], f: "" }) }, [1216]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(1329), p: [{ n: "context", t: () => __RΦ.a(377), v: null }], f: "" }) }, [1329]: { LΦ: t => Object }, [1218]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(111), p: [{ n: "context", t: () => __RΦ.a(1336), v: null }], f: "" }) }, [111]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(107) }] }) }, [1336]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1333), p: [__RΦ.a(215)] }) }, [1333]: { TΦ: "5", name: "PropertyToXMLContext" }, [1379]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(13), __RΦ.a(74), __RΦ.a(1378)] }) }, [74]: { LΦ: t => RegExp }, [1378]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [4]: { RΦ: t => ({ TΦ: "~" }) }, [1270]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [1339]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [1292]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [506]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(505)] }) }, [10]: { RΦ: t => ({ TΦ: "u" }) }, [610]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(602)] }) }, [12]: { RΦ: t => ({ TΦ: "n" }) }, [602]: { TΦ: "5", name: "ConversionOptions" }, [613]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(612) }) }, [612]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [656]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(657), p: [__RΦ.a(381)] }) }, [657]: { LΦ: t => Object }, [381]: { LΦ: t => Object }, [519]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(381)] }) }, [861]: { LΦ: t => Object }, [888]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(889), p: [__RΦ.a(861)] }) }, [889]: { LΦ: t => Object }, [926]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(861)] }) }, [528]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(523)] }) }, [523]: { LΦ: t => Object }, [660]: { RΦ: t => ({ TΦ: "O", m: [{ n: "fromXML", f: "", t: __RΦ.a(667) }, { n: "toXML", f: "", t: __RΦ.a(898) }, { n: "options", f: "", t: __RΦ.a(1067) }] }) }, [667]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(663), __RΦ.a(665)] }) }, [663]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(664), p: [__RΦ.a(606), __RΦ.a(384)] }) }, [664]: { LΦ: t => Object }, [606]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(380), p: [__RΦ.a(523)] }) }, [380]: { TΦ: "5", name: "fromXMLContext" }, [384]: { LΦ: t => "properties" }, [665]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(666), p: [__RΦ.a(523)] }) }, [666]: { LΦ: t => Object }, [898]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(894), __RΦ.a(896)] }) }, [894]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(895), p: [__RΦ.a(863), __RΦ.a(384)] }) }, [895]: { LΦ: t => Object }, [863]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(860), p: [__RΦ.a(523)] }) }, [860]: { TΦ: "5", name: "toXMLContext" }, [896]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(897), p: [__RΦ.a(523)] }) }, [897]: { LΦ: t => Object }, [1067]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1055), p: [__RΦ.a(1065), __RΦ.a(1066)] }) }, [1055]: { LΦ: t => Map }, [1065]: { LΦ: t => Object }, [1066]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(214), p: [__RΦ.a(523)] }) }, [607]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(606), __RΦ.a(523)] }) }, [864]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(863), __RΦ.a(111)] }) }, [1912]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(1911)] }) }, [1911]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(1623)] }) }, [1623]: { LΦ: t => Object }, [1644]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [1634]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) } } };
|
|
20
20
|
var IΦPropertyToXMLContext = { name: "PropertyToXMLContext", prototype: {}, identity: Symbol("PropertyToXMLContext (interface)") };
|
|
21
21
|
exports.IΦPropertyToXMLContext = IΦPropertyToXMLContext;
|
|
22
|
-
(t => __RΦ.t[
|
|
22
|
+
(t => __RΦ.t[1333] = t)(IΦPropertyToXMLContext);
|
|
23
23
|
__RΦ.m("rt:P", ["property", "value"])(IΦPropertyToXMLContext);
|
|
24
24
|
__RΦ.m("rt:m", [])(IΦPropertyToXMLContext);
|
|
25
25
|
__RΦ.m("rt:i", [() => IΦOmit])(IΦPropertyToXMLContext);
|
|
26
26
|
__RΦ.m("rt:f", "Ie")(IΦPropertyToXMLContext);
|
|
27
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
27
|
+
__RΦ.m("rt:t", () => __RΦ.a(1363))(IΦPropertyToXMLContext.prototype, "property");
|
|
28
28
|
__RΦ.m("rt:f", "P")(IΦPropertyToXMLContext.prototype, "property");
|
|
29
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
29
|
+
__RΦ.m("rt:t", () => __RΦ.a(1367))(IΦPropertyToXMLContext.prototype, "value");
|
|
30
30
|
__RΦ.m("rt:f", "P")(IΦPropertyToXMLContext.prototype, "value");
|
|
31
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
31
|
+
__RΦ.m("rt:t", () => __RΦ.a(1363))(IΦPropertyToXMLContext.prototype, "property");
|
|
32
32
|
__RΦ.m("rt:f", "P")(IΦPropertyToXMLContext.prototype, "property");
|
|
33
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
33
|
+
__RΦ.m("rt:t", () => __RΦ.a(1367))(IΦPropertyToXMLContext.prototype, "value");
|
|
34
34
|
__RΦ.m("rt:f", "P")(IΦPropertyToXMLContext.prototype, "value");
|
|
35
35
|
var IΦPropertyFromXMLContext = { name: "PropertyFromXMLContext", prototype: {}, identity: Symbol("PropertyFromXMLContext (interface)") };
|
|
36
36
|
exports.IΦPropertyFromXMLContext = IΦPropertyFromXMLContext;
|
|
@@ -67,11 +67,11 @@ __RΦ.m("rt:t", () => __RΦ.a(505))(IΦXMLModelPropertyOptions.prototype, "model
|
|
|
67
67
|
__RΦ.m("rt:f", "P?")(IΦXMLModelPropertyOptions.prototype, "model");
|
|
68
68
|
__RΦ.m("rt:t", () => __RΦ.a(357))(IΦXMLModelPropertyOptions.prototype, "isSourceElement");
|
|
69
69
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "isSourceElement");
|
|
70
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
70
|
+
__RΦ.m("rt:t", () => __RΦ.a(1214))(IΦXMLModelPropertyOptions.prototype, "resolveElements");
|
|
71
71
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "resolveElements");
|
|
72
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
72
|
+
__RΦ.m("rt:t", () => __RΦ.a(1216))(IΦXMLModelPropertyOptions.prototype, "fromXML");
|
|
73
73
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "fromXML");
|
|
74
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
74
|
+
__RΦ.m("rt:t", () => __RΦ.a(1218))(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
75
75
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
76
76
|
__RΦ.m("rt:t", () => __RΦ.a(496))(IΦXMLModelPropertyOptions.prototype, "name");
|
|
77
77
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "name");
|
|
@@ -87,11 +87,11 @@ __RΦ.m("rt:t", () => __RΦ.a(505))(IΦXMLModelPropertyOptions.prototype, "model
|
|
|
87
87
|
__RΦ.m("rt:f", "P?")(IΦXMLModelPropertyOptions.prototype, "model");
|
|
88
88
|
__RΦ.m("rt:t", () => __RΦ.a(357))(IΦXMLModelPropertyOptions.prototype, "isSourceElement");
|
|
89
89
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "isSourceElement");
|
|
90
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
90
|
+
__RΦ.m("rt:t", () => __RΦ.a(1214))(IΦXMLModelPropertyOptions.prototype, "resolveElements");
|
|
91
91
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "resolveElements");
|
|
92
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
92
|
+
__RΦ.m("rt:t", () => __RΦ.a(1216))(IΦXMLModelPropertyOptions.prototype, "fromXML");
|
|
93
93
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "fromXML");
|
|
94
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
94
|
+
__RΦ.m("rt:t", () => __RΦ.a(1218))(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
95
95
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
96
96
|
var IΦCreateXMLModelPropertyOptions = { name: "CreateXMLModelPropertyOptions", prototype: {}, identity: Symbol("CreateXMLModelPropertyOptions (interface)") };
|
|
97
97
|
exports.IΦCreateXMLModelPropertyOptions = IΦCreateXMLModelPropertyOptions;
|
|
@@ -101,13 +101,13 @@ __RΦ.m("rt:m", [])(IΦCreateXMLModelPropertyOptions);
|
|
|
101
101
|
__RΦ.m("rt:f", "Ie")(IΦCreateXMLModelPropertyOptions);
|
|
102
102
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
103
103
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
104
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
104
|
+
__RΦ.m("rt:t", () => __RΦ.a(1379))(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
105
105
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
106
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
106
|
+
__RΦ.m("rt:t", () => __RΦ.a(1270))(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
107
107
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
108
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
108
|
+
__RΦ.m("rt:t", () => __RΦ.a(1339))(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
109
109
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
110
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
110
|
+
__RΦ.m("rt:t", () => __RΦ.a(1292))(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
111
111
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
112
112
|
__RΦ.m("rt:t", () => __RΦ.a(20))(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
113
113
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
@@ -117,13 +117,13 @@ __RΦ.m("rt:t", () => __RΦ.a(506))(IΦCreateXMLModelPropertyOptions.prototype,
|
|
|
117
117
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "model");
|
|
118
118
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
119
119
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
120
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
120
|
+
__RΦ.m("rt:t", () => __RΦ.a(1379))(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
121
121
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
122
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
122
|
+
__RΦ.m("rt:t", () => __RΦ.a(1270))(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
123
123
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
124
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
124
|
+
__RΦ.m("rt:t", () => __RΦ.a(1339))(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
125
125
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
126
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
126
|
+
__RΦ.m("rt:t", () => __RΦ.a(1292))(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
127
127
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
128
128
|
__RΦ.m("rt:t", () => __RΦ.a(20))(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
129
129
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
@@ -212,7 +212,7 @@ exports.IΦCreateXMLModelOptions = IΦCreateXMLModelOptions;
|
|
|
212
212
|
__RΦ.m("rt:P", ["parent", "fromXML", "toXML", "tagname"])(IΦCreateXMLModelOptions);
|
|
213
213
|
__RΦ.m("rt:m", [])(IΦCreateXMLModelOptions);
|
|
214
214
|
__RΦ.m("rt:f", "Ie")(IΦCreateXMLModelOptions);
|
|
215
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
215
|
+
__RΦ.m("rt:t", () => __RΦ.a(1912))(IΦCreateXMLModelOptions.prototype, "parent");
|
|
216
216
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "parent");
|
|
217
217
|
__RΦ.m("rt:t", () => __RΦ.a(1644))(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
218
218
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
@@ -220,7 +220,7 @@ __RΦ.m("rt:t", () => __RΦ.a(1634))(IΦCreateXMLModelOptions.prototype, "toXML"
|
|
|
220
220
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "toXML");
|
|
221
221
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦCreateXMLModelOptions.prototype, "tagname");
|
|
222
222
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "tagname");
|
|
223
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
223
|
+
__RΦ.m("rt:t", () => __RΦ.a(1912))(IΦCreateXMLModelOptions.prototype, "parent");
|
|
224
224
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "parent");
|
|
225
225
|
__RΦ.m("rt:t", () => __RΦ.a(1644))(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
226
226
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "fromXML");
|
package/build/main/model.spec.js
CHANGED
|
@@ -24,7 +24,7 @@ const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metada
|
|
|
24
24
|
__RΦ.t[id] = t = l;
|
|
25
25
|
}
|
|
26
26
|
return t;
|
|
27
|
-
}, t: { [
|
|
27
|
+
}, t: { [2761]: { RΦ: t => ({ TΦ: "O", m: [{ n: "propA", f: "", t: __RΦ.a(13) }, { n: "propB", f: "", t: __RΦ.a(20) }, { n: "propC", f: "", t: __RΦ.a(2777) }, { n: "propD", f: "", t: __RΦ.a(705) }, { n: "__constructor", f: "", t: __RΦ.a(4) }] }) }, [13]: { LΦ: t => String }, [20]: { LΦ: t => Boolean }, [2777]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(2775) }) }, [2775]: { TΦ: "5", name: "B" }, [705]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(47), __RΦ.a(135)] }) }, [47]: { LΦ: t => 0 }, [135]: { LΦ: t => 1 }, [4]: { RΦ: t => ({ TΦ: "~" }) }, [2713]: { RΦ: t => ({ TΦ: "O", m: [{ n: "name", f: "", t: __RΦ.a(13) }, { n: "nbPages", f: "", t: __RΦ.a(14) }] }) }, [14]: { LΦ: t => Number }, [2732]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(2676) }) }, [2676]: { TΦ: "5", name: "Book" }, [22]: { RΦ: t => ({ TΦ: "V" }) }, [101]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(102), p: [] }) }, [102]: { LΦ: t => Object } } };
|
|
28
28
|
require("mocha");
|
|
29
29
|
const chai_1 = require("chai");
|
|
30
30
|
require("reflect-metadata");
|
|
@@ -44,12 +44,12 @@ Book = __decorate([
|
|
|
44
44
|
},
|
|
45
45
|
})
|
|
46
46
|
], Book);
|
|
47
|
-
(t => __RΦ.t[
|
|
47
|
+
(t => __RΦ.t[2676] = t)(Book);
|
|
48
48
|
__RΦ.m("rt:SP", [])(Book);
|
|
49
49
|
__RΦ.m("rt:P", ["name", "nbPages"])(Book);
|
|
50
50
|
__RΦ.m("rt:Sm", [])(Book);
|
|
51
51
|
__RΦ.m("rt:m", ["fromXML"])(Book);
|
|
52
|
-
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(
|
|
52
|
+
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(2713), v: null }])(Book);
|
|
53
53
|
__RΦ.m("rt:f", "C")(Book);
|
|
54
54
|
__RΦ.m("rt:t", () => __RΦ.a(13))(Book.prototype, "name");
|
|
55
55
|
__RΦ.m("rt:f", "P")(Book.prototype, "name");
|
|
@@ -69,16 +69,16 @@ Library = __decorate([
|
|
|
69
69
|
},
|
|
70
70
|
})
|
|
71
71
|
], Library);
|
|
72
|
-
(t => __RΦ.t[
|
|
72
|
+
(t => __RΦ.t[2716] = t)(Library);
|
|
73
73
|
__RΦ.m("rt:SP", [])(Library);
|
|
74
74
|
__RΦ.m("rt:P", ["name", "books"])(Library);
|
|
75
75
|
__RΦ.m("rt:Sm", [])(Library);
|
|
76
76
|
__RΦ.m("rt:m", ["fromXML"])(Library);
|
|
77
|
-
__RΦ.m("rt:p", [{ n: "name", t: () => __RΦ.a(13), v: null }, { n: "books", t: () => __RΦ.a(
|
|
77
|
+
__RΦ.m("rt:p", [{ n: "name", t: () => __RΦ.a(13), v: null }, { n: "books", t: () => __RΦ.a(2732), v: null, f: "3" }])(Library);
|
|
78
78
|
__RΦ.m("rt:f", "C")(Library);
|
|
79
79
|
__RΦ.m("rt:t", () => __RΦ.a(13))(Library.prototype, "name");
|
|
80
80
|
__RΦ.m("rt:f", "P")(Library.prototype, "name");
|
|
81
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
81
|
+
__RΦ.m("rt:t", () => __RΦ.a(2732))(Library.prototype, "books");
|
|
82
82
|
__RΦ.m("rt:f", "P")(Library.prototype, "books");
|
|
83
83
|
describe("Library Example", __RΦ.f(() => {
|
|
84
84
|
const library = new Library("test");
|
|
@@ -132,7 +132,7 @@ A = __decorate([
|
|
|
132
132
|
},
|
|
133
133
|
})
|
|
134
134
|
], A);
|
|
135
|
-
(t => __RΦ.t[
|
|
135
|
+
(t => __RΦ.t[2762] = t)(A);
|
|
136
136
|
__RΦ.m("rt:SP", [])(A);
|
|
137
137
|
__RΦ.m("rt:P", ["propA", "propB", "propC", "propD"])(A);
|
|
138
138
|
__RΦ.m("rt:Sm", [])(A);
|
|
@@ -143,7 +143,7 @@ __RΦ.m("rt:t", () => __RΦ.a(13))(A.prototype, "propA");
|
|
|
143
143
|
__RΦ.m("rt:f", "P")(A.prototype, "propA");
|
|
144
144
|
__RΦ.m("rt:t", () => __RΦ.a(20))(A.prototype, "propB");
|
|
145
145
|
__RΦ.m("rt:f", "P")(A.prototype, "propB");
|
|
146
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
146
|
+
__RΦ.m("rt:t", () => __RΦ.a(2777))(A.prototype, "propC");
|
|
147
147
|
__RΦ.m("rt:f", "P")(A.prototype, "propC");
|
|
148
148
|
__RΦ.m("rt:t", () => __RΦ.a(705))(A.prototype, "propD");
|
|
149
149
|
__RΦ.m("rt:f", "P")(A.prototype, "propD");
|
|
@@ -163,7 +163,7 @@ B = __decorate([
|
|
|
163
163
|
},
|
|
164
164
|
})
|
|
165
165
|
], B);
|
|
166
|
-
(t => __RΦ.t[
|
|
166
|
+
(t => __RΦ.t[2775] = t)(B);
|
|
167
167
|
__RΦ.m("rt:SP", [])(B);
|
|
168
168
|
__RΦ.m("rt:P", ["propA"])(B);
|
|
169
169
|
__RΦ.m("rt:Sm", [])(B);
|
|
@@ -186,8 +186,8 @@ describe("Edgy Cases", __RΦ.f(() => {
|
|
|
186
186
|
<propd>${instance.propD}</propd>
|
|
187
187
|
</a>`));
|
|
188
188
|
it("should give right type infos", __RΦ.f(() => {
|
|
189
|
-
const reflectedA = (0, typescript_rtti_1.reflect)(A, { TΦ: "c", t: void 0, p: [__RΦ.a(
|
|
190
|
-
(0, chai_1.assert)(reflectedA === (0, typescript_rtti_1.reflect)(A, { TΦ: "c", t: void 0, p: [__RΦ.a(
|
|
189
|
+
const reflectedA = (0, typescript_rtti_1.reflect)(A, { TΦ: "c", t: void 0, p: [__RΦ.a(2761)], r: void 0, tp: [] });
|
|
190
|
+
(0, chai_1.assert)(reflectedA === (0, typescript_rtti_1.reflect)(A, { TΦ: "c", t: void 0, p: [__RΦ.a(2761)], r: void 0, tp: [] }));
|
|
191
191
|
(0, chai_1.expect)(reflectedA.getProperty("propA").type.isClass(String)).to.be.true;
|
|
192
192
|
(0, chai_1.expect)(reflectedA.getProperty("propB").type.isClass(Boolean)).to.be.true;
|
|
193
193
|
const ModelAPropCType = reflectedA.getProperty("propC").type;
|
|
@@ -214,7 +214,7 @@ let C = class C extends B {
|
|
|
214
214
|
C = __decorate([
|
|
215
215
|
(0, model_1.Model)()
|
|
216
216
|
], C);
|
|
217
|
-
(t => __RΦ.t[
|
|
217
|
+
(t => __RΦ.t[2820] = t)(C);
|
|
218
218
|
__RΦ.m("rt:SP", [])(C);
|
|
219
219
|
__RΦ.m("rt:P", ["propB"])(C);
|
|
220
220
|
__RΦ.m("rt:Sm", [])(C);
|
|
@@ -34,13 +34,13 @@ export const defaults = {
|
|
|
34
34
|
// TODO: handle inline
|
|
35
35
|
const prop = context.property;
|
|
36
36
|
const elements = context.elements;
|
|
37
|
+
if (prop.reflected.isOptional && elements.length === 0) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
37
40
|
if (prop.model) {
|
|
38
41
|
return prop.model.fromXML({ elements });
|
|
39
42
|
}
|
|
40
43
|
const type = context.property.reflected.type;
|
|
41
|
-
if (prop.reflected.isOptional && elements.length === 0) {
|
|
42
|
-
return undefined;
|
|
43
|
-
}
|
|
44
44
|
if (type.is("class")) {
|
|
45
45
|
const model = getModel(type.class);
|
|
46
46
|
return model.fromXML({ elements: context.elements });
|
|
@@ -117,14 +117,14 @@ export const defaults = {
|
|
|
117
117
|
},
|
|
118
118
|
propertyToXML(context) {
|
|
119
119
|
const property = context.property;
|
|
120
|
-
if (property.model) {
|
|
121
|
-
return property.model.toXML(context.value);
|
|
122
|
-
}
|
|
123
120
|
const type = property.reflected.type;
|
|
124
121
|
const value = context.value;
|
|
125
122
|
if (property.reflected.isOptional && typeof value === "undefined") {
|
|
126
123
|
return { elements: [] }; // FIXME should return unefined ???
|
|
127
124
|
}
|
|
125
|
+
if (property.model) {
|
|
126
|
+
return property.model.toXML(value);
|
|
127
|
+
}
|
|
128
128
|
const getXML = () => {
|
|
129
129
|
if (type.is("class")) {
|
|
130
130
|
const model = getModel(type.class);
|
|
@@ -13,7 +13,7 @@ const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metada
|
|
|
13
13
|
__RΦ.t[id] = t = l;
|
|
14
14
|
}
|
|
15
15
|
return t;
|
|
16
|
-
}, t: { [4]: { RΦ: t => ({ TΦ: "~" }) }, [111]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(107) }] }) }, [107]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(105) }) }, [105]: { LΦ: t => LΦ_0.IΦXMLElement }, [13]: { LΦ: t => String }, [14]: { LΦ: t => Number }, [1698]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(
|
|
16
|
+
}, t: { [4]: { RΦ: t => ({ TΦ: "~" }) }, [111]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(107) }] }) }, [107]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(105) }) }, [105]: { LΦ: t => LΦ_0.IΦXMLElement }, [13]: { LΦ: t => String }, [14]: { LΦ: t => Number }, [1698]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(3179) }] }) }, [3179]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(3177) }) }, [3177]: { RΦ: t => ({ TΦ: "O", m: [{ n: "type", f: "", t: __RΦ.a(13) }, { n: "name", f: "", t: __RΦ.a(13) }] }) }, [20]: { LΦ: t => Boolean } } };
|
|
17
17
|
import { createModel } from "../model";
|
|
18
18
|
import { getContent, fromContent } from "../xml";
|
|
19
19
|
import * as LΦ_0 from "../types";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function mergeMaps<K, V>(...sources: Map<K, V>[]): Map<K, V>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metadata(k, v)(t, ...a) : void 0, f: (f, d, n) => (d.forEach(d => d(f)), Object.defineProperty(f, "name", { value: n, writable: false }), f), c: (c, d, dp, dsp, n) => (d.forEach(d => d(c)), dp.forEach(([p, d]) => d(c.prototype, p)), dsp.forEach(([p, d]) => d(c, p)), n ? Object.defineProperty(c, "name", { value: n, writable: false }) : undefined, c), r: (o, a) => (Object.assign(o, a)), a: id => {
|
|
2
|
+
let t = __RΦ.t[id];
|
|
3
|
+
if (t === void 0)
|
|
4
|
+
return void 0;
|
|
5
|
+
if (t.RΦ) {
|
|
6
|
+
let r = t.RΦ;
|
|
7
|
+
delete t.RΦ;
|
|
8
|
+
__RΦ.r(t, r(t));
|
|
9
|
+
}
|
|
10
|
+
else if (t.LΦ) {
|
|
11
|
+
let l = t.LΦ();
|
|
12
|
+
delete t.LΦ;
|
|
13
|
+
__RΦ.t[id] = t = l;
|
|
14
|
+
}
|
|
15
|
+
return t;
|
|
16
|
+
}, t: { [1719]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(1718) }) }, [1718]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1055), p: [__RΦ.a(1716), __RΦ.a(1717)] }) }, [1055]: { LΦ: t => Map }, [1716]: { LΦ: t => Object }, [1717]: { LΦ: t => Object }, [4]: { RΦ: t => ({ TΦ: "~" }) }, [22]: { RΦ: t => ({ TΦ: "V" }) } } };
|
|
17
|
+
export default function mergeMaps(...sources) {
|
|
18
|
+
const res = new Map();
|
|
19
|
+
sources.forEach(__RΦ.f((source) => {
|
|
20
|
+
const overrides = new Map();
|
|
21
|
+
const additions = new Map();
|
|
22
|
+
source.forEach(__RΦ.f((val, key) => (res.has(key) ? overrides : additions).set(key, val), [__RΦ.m("rt:p", [{ n: "val", t: () => __RΦ.a(4), v: null }, { n: "key", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(1718))], ""));
|
|
23
|
+
if (overrides.size) {
|
|
24
|
+
const entries = Array.from(res.entries());
|
|
25
|
+
entries.forEach(__RΦ.f((entry) => {
|
|
26
|
+
const key = entry[0];
|
|
27
|
+
if (overrides.has(key))
|
|
28
|
+
entry[1] = overrides.get(key);
|
|
29
|
+
}, [__RΦ.m("rt:p", [{ n: "entry", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(22))], ""));
|
|
30
|
+
res.clear();
|
|
31
|
+
entries.forEach(__RΦ.f(([key, val]) => res.set(key, val), [__RΦ.m("rt:p", [{ n: "[key, val]", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(1718))], ""));
|
|
32
|
+
}
|
|
33
|
+
additions.forEach(__RΦ.f((val, key) => res.set(key, val), [__RΦ.m("rt:p", [{ n: "val", t: () => __RΦ.a(4), v: null }, { n: "key", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(1718))], ""));
|
|
34
|
+
}, [__RΦ.m("rt:p", [{ n: "source", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(22))], ""));
|
|
35
|
+
return res;
|
|
36
|
+
}
|
|
37
|
+
__RΦ.m("rt:p", [{ n: "sources", t: () => __RΦ.a(1719), v: null, f: "3" }])(mergeMaps);
|
|
38
|
+
__RΦ.m("rt:f", "F")(mergeMaps);
|
|
39
|
+
__RΦ.m("rt:t", () => __RΦ.a(1718))(mergeMaps);
|
|
@@ -13,7 +13,7 @@ const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metada
|
|
|
13
13
|
__RΦ.t[id] = t = l;
|
|
14
14
|
}
|
|
15
15
|
return t;
|
|
16
|
-
}, t: { [532]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(503)] }) }, [202]: { LΦ: t => LΦ_0.IΦConstructor }, [503]: { LΦ: t => Object }, [
|
|
16
|
+
}, t: { [532]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(503)] }) }, [202]: { LΦ: t => LΦ_0.IΦConstructor }, [503]: { LΦ: t => Object }, [1814]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(8)] }) }, [8]: { RΦ: t => ({ TΦ: "U" }) }, [1817]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(140), p: [__RΦ.a(1814), __RΦ.a(22), __RΦ.a(8)] }) }, [140]: { LΦ: t => Object }, [22]: { RΦ: t => ({ TΦ: "V" }) }, [505]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(1)] }) }, [502]: { TΦ: "5", name: "XMLModel" }, [1]: { RΦ: t => ({ TΦ: "~" }) }, [1837]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(505)] }) }, [12]: { RΦ: t => ({ TΦ: "n" }) }, [1846]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1622), p: [__RΦ.a(503)] }) }, [1622]: { LΦ: t => LΦ_1.IΦCreateXMLModelOptions }, [525]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(522), p: [__RΦ.a(503)] }) }, [522]: { LΦ: t => LΦ_1.IΦXMLModelOptions }, [1870]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(1321)] }) }, [1321]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(422), __RΦ.a(1319)] }) }, [602]: { LΦ: t => LΦ_1.IΦConversionOptions }, [422]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(423), p: [__RΦ.a(421), __RΦ.a(384)] }) }, [423]: { LΦ: t => Object }, [421]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(380), p: [__RΦ.a(1)] }) }, [380]: { LΦ: t => LΦ_1.IΦfromXMLContext }, [384]: { LΦ: t => "properties" }, [1319]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1320), p: [__RΦ.a(1)] }) }, [1320]: { LΦ: t => Object }, [4]: { RΦ: t => ({ TΦ: "~" }) }, [658]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(659), p: [__RΦ.a(503)] }) }, [659]: { LΦ: t => Object }, [1880]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(1878)] }) }, [1878]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(1353), __RΦ.a(1876)] }) }, [1353]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1354), p: [__RΦ.a(1352), __RΦ.a(384)] }) }, [1354]: { LΦ: t => Object }, [1352]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(860), p: [__RΦ.a(1)] }) }, [860]: { LΦ: t => LΦ_1.IΦtoXMLContext }, [1876]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1877), p: [__RΦ.a(1)] }) }, [1877]: { LΦ: t => Object }, [890]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(891), p: [__RΦ.a(503)] }) }, [891]: { LΦ: t => Object }, [20]: { LΦ: t => Boolean }, [661]: { RΦ: t => ({ TΦ: "O", m: [{ n: "fromXML", f: "", t: __RΦ.a(667) }, { n: "toXML", f: "", t: __RΦ.a(898) }, { n: "options", f: "", t: __RΦ.a(1067) }] }) }, [667]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(663), __RΦ.a(665)] }) }, [663]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(664), p: [__RΦ.a(606), __RΦ.a(384)] }) }, [664]: { LΦ: t => Object }, [606]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(380), p: [__RΦ.a(523)] }) }, [523]: { LΦ: t => Object }, [665]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(666), p: [__RΦ.a(523)] }) }, [666]: { LΦ: t => Object }, [898]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(894), __RΦ.a(896)] }) }, [894]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(895), p: [__RΦ.a(863), __RΦ.a(384)] }) }, [895]: { LΦ: t => Object }, [863]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(860), p: [__RΦ.a(523)] }) }, [896]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(897), p: [__RΦ.a(523)] }) }, [897]: { LΦ: t => Object }, [1067]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1055), p: [__RΦ.a(1065), __RΦ.a(1066)] }) }, [1055]: { LΦ: t => Map }, [1065]: { LΦ: t => Object }, [1066]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(214), p: [__RΦ.a(523)] }) }, [214]: { LΦ: t => LΦ_1.IΦXMLModelPropertyOptions }, [1896]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(1894)] }) }, [1894]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(421), __RΦ.a(1)] }) }, [1901]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(1899)] }) }, [1899]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(1352), __RΦ.a(111)] }) }, [111]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(107) }] }) }, [107]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(105) }) }, [105]: { LΦ: t => LΦ_2.IΦXMLElement }, [13]: { LΦ: t => String }, [541]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(13), __RΦ.a(111)] }) }, [28]: { LΦ: t => Object }, [948]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(944), p: [__RΦ.a(532)] }) }, [944]: { LΦ: t => LΦ_0.ReflectedClass }, [1062]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1055), p: [__RΦ.a(13), __RΦ.a(1061)] }) }, [1061]: { RΦ: t => ({ TΦ: "&", t: [__RΦ.a(1059), __RΦ.a(1060)] }) }, [1059]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(214), p: [__RΦ.a(1)] }) }, [1060]: { RΦ: t => ({ TΦ: "O", m: [{ n: "model", f: "", t: __RΦ.a(1) }] }) }, [1626]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(1621)] }) }, [1621]: { LΦ: t => Object }, [1625]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1622), p: [__RΦ.a(1621)] }) }, [1659]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(1621)] }) }, [1822]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(1819)] }) }, [1819]: { LΦ: t => Object }, [1832]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(1831)] }) }, [10]: { RΦ: t => ({ TΦ: "u" }) }, [1831]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(1819)] }) }, [1978]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(1977)] }) }, [1977]: { LΦ: t => Object }, [1981]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(1977)] }) }, [1984]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1622), p: [__RΦ.a(1983)] }) }, [1983]: { LΦ: t => Object }, [1986]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(22), p: [{ n: "constructor", t: () => __RΦ.a(1987), v: null }], f: "" }) }, [1987]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(202), p: [__RΦ.a(1983)] }) } } };
|
|
17
17
|
import { reflect } from "typescript-rtti";
|
|
18
18
|
import { MiddlewareChain, resolve } from "../middleware";
|
|
19
19
|
import { getPropertyConversionOptions } from "./property";
|
|
@@ -34,9 +34,9 @@ function* ParentChain(constructor) {
|
|
|
34
34
|
}
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(
|
|
37
|
+
__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(1814), v: null }])(ParentChain);
|
|
38
38
|
__RΦ.m("rt:f", "F")(ParentChain);
|
|
39
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
39
|
+
__RΦ.m("rt:t", () => __RΦ.a(1817))(ParentChain);
|
|
40
40
|
import * as LΦ_1 from "./types";
|
|
41
41
|
import * as LΦ_2 from "../types";
|
|
42
42
|
function getParentModel(model) {
|
|
@@ -52,7 +52,7 @@ function getParentModel(model) {
|
|
|
52
52
|
}
|
|
53
53
|
__RΦ.m("rt:p", [{ n: "model", t: () => __RΦ.a(505), v: null }])(getParentModel);
|
|
54
54
|
__RΦ.m("rt:f", "F")(getParentModel);
|
|
55
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
55
|
+
__RΦ.m("rt:t", () => __RΦ.a(1837))(getParentModel);
|
|
56
56
|
import * as LΦ_0 from "typescript-rtti/dist";
|
|
57
57
|
export class XMLModel {
|
|
58
58
|
constructor(type, options) {
|
|
@@ -64,7 +64,7 @@ export class XMLModel {
|
|
|
64
64
|
if (typeof parent === "undefined")
|
|
65
65
|
parent = getParentModel(this);
|
|
66
66
|
return parent;
|
|
67
|
-
}, [__RΦ.m("rt:p", []), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(
|
|
67
|
+
}, [__RΦ.m("rt:p", []), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(1837))], "getParent");
|
|
68
68
|
let propertiesLoaded = false;
|
|
69
69
|
const properties = {
|
|
70
70
|
options: new Map(),
|
|
@@ -215,24 +215,23 @@ export class XMLModel {
|
|
|
215
215
|
return reflect(this.type, { TΦ: "c", t: void 0, p: [__RΦ.a(532)], r: void 0, tp: [] });
|
|
216
216
|
}
|
|
217
217
|
resolveAllProperties() {
|
|
218
|
-
const
|
|
218
|
+
const ownProperties = new Map();
|
|
219
219
|
const parent = getParentModel(this);
|
|
220
|
-
if (parent)
|
|
221
|
-
parent.resolveAllProperties().forEach(__RΦ.f((prop, key) => {
|
|
222
|
-
properties.set(key, prop);
|
|
223
|
-
}, [__RΦ.m("rt:p", [{ n: "prop", t: () => __RΦ.a(4), v: null }, { n: "key", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(22))], ""));
|
|
224
220
|
this.options.properties.options.forEach(__RΦ.f((options, key) => {
|
|
225
|
-
|
|
226
|
-
properties.set(key, new Proxy(options, {
|
|
221
|
+
ownProperties.set(key, new Proxy(options, {
|
|
227
222
|
get: __RΦ.f((target, p, reciever) => {
|
|
228
223
|
if (p === "model")
|
|
229
224
|
return this;
|
|
230
225
|
else
|
|
231
226
|
return Reflect.get(target, p, reciever);
|
|
232
227
|
}, [__RΦ.m("rt:p", [{ n: "target", t: () => __RΦ.a(4), v: null }, { n: "p", t: () => __RΦ.a(4), v: null }, { n: "reciever", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(1))], "get"),
|
|
233
|
-
})
|
|
228
|
+
}) // FIXME: is typing ok ?
|
|
229
|
+
);
|
|
234
230
|
}, [__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(4), v: null }, { n: "key", t: () => __RΦ.a(4), v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(22))], ""));
|
|
235
|
-
|
|
231
|
+
const res = parent
|
|
232
|
+
? mergeMaps(parent.resolveAllProperties(), ownProperties)
|
|
233
|
+
: ownProperties;
|
|
234
|
+
return res;
|
|
236
235
|
}
|
|
237
236
|
}
|
|
238
237
|
(t => __RΦ.t[502] = t)(XMLModel);
|
|
@@ -240,19 +239,19 @@ __RΦ.m("rt:SP", [])(XMLModel);
|
|
|
240
239
|
__RΦ.m("rt:P", ["options", "type", "reflectedClass"])(XMLModel);
|
|
241
240
|
__RΦ.m("rt:Sm", [])(XMLModel);
|
|
242
241
|
__RΦ.m("rt:m", ["fromXML", "toXML", "resolveAllProperties"])(XMLModel);
|
|
243
|
-
__RΦ.m("rt:p", [{ n: "type", t: () => __RΦ.a(532), v: null, f: "R" }, { n: "options", t: () => __RΦ.a(
|
|
242
|
+
__RΦ.m("rt:p", [{ n: "type", t: () => __RΦ.a(532), v: null, f: "R" }, { n: "options", t: () => __RΦ.a(1846), v: null }])(XMLModel);
|
|
244
243
|
__RΦ.m("rt:f", "Ce")(XMLModel);
|
|
245
244
|
__RΦ.m("rt:t", () => __RΦ.a(525))(XMLModel.prototype, "options");
|
|
246
245
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "options");
|
|
247
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
246
|
+
__RΦ.m("rt:t", () => __RΦ.a(1870))(XMLModel.prototype, "parent");
|
|
248
247
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "parent");
|
|
249
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
248
|
+
__RΦ.m("rt:t", () => __RΦ.a(1880))(XMLModel.prototype, "parent");
|
|
250
249
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "parent");
|
|
251
250
|
__RΦ.m("rt:t", () => __RΦ.a(661))(XMLModel.prototype, "properties");
|
|
252
251
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "properties");
|
|
253
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
252
|
+
__RΦ.m("rt:t", () => __RΦ.a(1896))(XMLModel.prototype, "parent");
|
|
254
253
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "parent");
|
|
255
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
254
|
+
__RΦ.m("rt:t", () => __RΦ.a(1901))(XMLModel.prototype, "parent");
|
|
256
255
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "parent");
|
|
257
256
|
__RΦ.m("rt:t", () => __RΦ.a(13))(XMLModel.prototype, "tagname");
|
|
258
257
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "tagname");
|
|
@@ -276,7 +275,7 @@ __RΦ.m("rt:f", "M.")(XMLModel.prototype["resolveAllProperties"]);
|
|
|
276
275
|
((t, p) => __RΦ.m("rt:h", () => typeof t === "object" ? t.constructor : t)(t[p]))(XMLModel.prototype, "resolveAllProperties");
|
|
277
276
|
__RΦ.m("rt:p", [])(XMLModel.prototype, "resolveAllProperties");
|
|
278
277
|
__RΦ.m("rt:f", "M.")(XMLModel.prototype, "resolveAllProperties");
|
|
279
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
278
|
+
__RΦ.m("rt:t", () => __RΦ.a(1062))(XMLModel.prototype, "resolveAllProperties");
|
|
280
279
|
export function createModel(type, options) {
|
|
281
280
|
if (findModel(type)) {
|
|
282
281
|
throw new TypeError(`a model for type ${type.name} already exists`);
|
|
@@ -292,9 +291,9 @@ export const Models = new Map();
|
|
|
292
291
|
export function findModel(id) {
|
|
293
292
|
return Models.get(id);
|
|
294
293
|
}
|
|
295
|
-
__RΦ.m("rt:p", [{ n: "id", t: () => __RΦ.a(
|
|
294
|
+
__RΦ.m("rt:p", [{ n: "id", t: () => __RΦ.a(1822), v: null }])(findModel);
|
|
296
295
|
__RΦ.m("rt:f", "F")(findModel);
|
|
297
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
296
|
+
__RΦ.m("rt:t", () => __RΦ.a(1832))(findModel);
|
|
298
297
|
export function getModel(id) {
|
|
299
298
|
const model = findModel(id);
|
|
300
299
|
if (model)
|
|
@@ -302,19 +301,20 @@ export function getModel(id) {
|
|
|
302
301
|
else
|
|
303
302
|
throw new TypeError(`couln't find model for type ${id.name}`);
|
|
304
303
|
}
|
|
305
|
-
__RΦ.m("rt:p", [{ n: "id", t: () => __RΦ.a(
|
|
304
|
+
__RΦ.m("rt:p", [{ n: "id", t: () => __RΦ.a(1978), v: null }])(getModel);
|
|
306
305
|
__RΦ.m("rt:f", "F")(getModel);
|
|
307
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
306
|
+
__RΦ.m("rt:t", () => __RΦ.a(1981))(getModel);
|
|
308
307
|
// Model decorator
|
|
309
308
|
function ModelDecoratorFactory(options) {
|
|
310
309
|
return __RΦ.f(function (constructor) {
|
|
311
310
|
findModel(constructor) || createModel(constructor, options || {});
|
|
312
|
-
}, [__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(
|
|
311
|
+
}, [__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(1987), v: null }]), __RΦ.m("rt:f", "M"), __RΦ.m("rt:t", () => __RΦ.a(22))], "");
|
|
313
312
|
}
|
|
314
|
-
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(
|
|
313
|
+
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(1984), v: null, f: "?" }])(ModelDecoratorFactory);
|
|
315
314
|
__RΦ.m("rt:f", "F")(ModelDecoratorFactory);
|
|
316
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
315
|
+
__RΦ.m("rt:t", () => __RΦ.a(1986))(ModelDecoratorFactory);
|
|
317
316
|
export { ModelDecoratorFactory as Model };
|
|
318
317
|
export { Prop } from "./property";
|
|
319
318
|
import "../defaults/models";
|
|
320
319
|
import { XMLConversionError } from "../errors";
|
|
320
|
+
import mergeMaps from "../helper/merge-maps";
|
|
@@ -13,21 +13,21 @@ const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metada
|
|
|
13
13
|
__RΦ.t[id] = t = l;
|
|
14
14
|
}
|
|
15
15
|
return t;
|
|
16
|
-
}, t: { [
|
|
16
|
+
}, t: { [1363]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(214), p: [__RΦ.a(1334)] }) }, [214]: { TΦ: "5", name: "XMLModelPropertyOptions" }, [1334]: { LΦ: t => Object }, [1367]: { LΦ: t => Object }, [493]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(214), p: [__RΦ.a(375)] }) }, [375]: { LΦ: t => Object }, [107]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(105) }) }, [105]: { LΦ: t => LΦ_0.IΦXMLElement }, [496]: { LΦ: t => Object }, [497]: { LΦ: t => LΦ_1.ReflectedProperty }, [13]: { LΦ: t => String }, [20]: { LΦ: t => Boolean }, [505]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(1)] }) }, [502]: { LΦ: t => LΦ_2.XMLModel }, [1]: { RΦ: t => ({ TΦ: "~" }) }, [357]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(20), p: [{ n: "element", t: () => __RΦ.a(105), v: null }, { n: "context", t: () => __RΦ.a(399), v: null }], f: "" }) }, [399]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(400), p: [__RΦ.a(377), __RΦ.a(378)] }) }, [400]: { LΦ: t => Object }, [377]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(374), p: [__RΦ.a(215)] }) }, [374]: { TΦ: "5", name: "PropertyFromXMLContext" }, [215]: { LΦ: t => Object }, [378]: { LΦ: t => "elements" }, [1214]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(107), p: [{ n: "context", t: () => __RΦ.a(399), v: null }], f: "" }) }, [1216]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(1329), p: [{ n: "context", t: () => __RΦ.a(377), v: null }], f: "" }) }, [1329]: { LΦ: t => Object }, [1218]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(111), p: [{ n: "context", t: () => __RΦ.a(1336), v: null }], f: "" }) }, [111]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(107) }] }) }, [1336]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1333), p: [__RΦ.a(215)] }) }, [1333]: { TΦ: "5", name: "PropertyToXMLContext" }, [1379]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(13), __RΦ.a(74), __RΦ.a(1378)] }) }, [74]: { LΦ: t => RegExp }, [1378]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [4]: { RΦ: t => ({ TΦ: "~" }) }, [1270]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [1339]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [1292]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [506]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(505)] }) }, [10]: { RΦ: t => ({ TΦ: "u" }) }, [610]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(602)] }) }, [12]: { RΦ: t => ({ TΦ: "n" }) }, [602]: { TΦ: "5", name: "ConversionOptions" }, [613]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(612) }) }, [612]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [656]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(657), p: [__RΦ.a(381)] }) }, [657]: { LΦ: t => Object }, [381]: { LΦ: t => Object }, [519]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(381)] }) }, [861]: { LΦ: t => Object }, [888]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(889), p: [__RΦ.a(861)] }) }, [889]: { LΦ: t => Object }, [926]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(861)] }) }, [528]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(523)] }) }, [523]: { LΦ: t => Object }, [660]: { RΦ: t => ({ TΦ: "O", m: [{ n: "fromXML", f: "", t: __RΦ.a(667) }, { n: "toXML", f: "", t: __RΦ.a(898) }, { n: "options", f: "", t: __RΦ.a(1067) }] }) }, [667]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(663), __RΦ.a(665)] }) }, [663]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(664), p: [__RΦ.a(606), __RΦ.a(384)] }) }, [664]: { LΦ: t => Object }, [606]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(380), p: [__RΦ.a(523)] }) }, [380]: { TΦ: "5", name: "fromXMLContext" }, [384]: { LΦ: t => "properties" }, [665]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(666), p: [__RΦ.a(523)] }) }, [666]: { LΦ: t => Object }, [898]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(894), __RΦ.a(896)] }) }, [894]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(895), p: [__RΦ.a(863), __RΦ.a(384)] }) }, [895]: { LΦ: t => Object }, [863]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(860), p: [__RΦ.a(523)] }) }, [860]: { TΦ: "5", name: "toXMLContext" }, [896]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(897), p: [__RΦ.a(523)] }) }, [897]: { LΦ: t => Object }, [1067]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1055), p: [__RΦ.a(1065), __RΦ.a(1066)] }) }, [1055]: { LΦ: t => Map }, [1065]: { LΦ: t => Object }, [1066]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(214), p: [__RΦ.a(523)] }) }, [607]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(606), __RΦ.a(523)] }) }, [864]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(602), p: [__RΦ.a(863), __RΦ.a(111)] }) }, [1912]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(1911)] }) }, [1911]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(502), p: [__RΦ.a(1623)] }) }, [1623]: { LΦ: t => Object }, [1644]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [1634]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) } } };
|
|
17
17
|
var IΦPropertyToXMLContext = { name: "PropertyToXMLContext", prototype: {}, identity: Symbol("PropertyToXMLContext (interface)") };
|
|
18
18
|
export { IΦPropertyToXMLContext };
|
|
19
|
-
(t => __RΦ.t[
|
|
19
|
+
(t => __RΦ.t[1333] = t)(IΦPropertyToXMLContext);
|
|
20
20
|
__RΦ.m("rt:P", ["property", "value"])(IΦPropertyToXMLContext);
|
|
21
21
|
__RΦ.m("rt:m", [])(IΦPropertyToXMLContext);
|
|
22
22
|
__RΦ.m("rt:i", [() => IΦOmit])(IΦPropertyToXMLContext);
|
|
23
23
|
__RΦ.m("rt:f", "Ie")(IΦPropertyToXMLContext);
|
|
24
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
24
|
+
__RΦ.m("rt:t", () => __RΦ.a(1363))(IΦPropertyToXMLContext.prototype, "property");
|
|
25
25
|
__RΦ.m("rt:f", "P")(IΦPropertyToXMLContext.prototype, "property");
|
|
26
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
26
|
+
__RΦ.m("rt:t", () => __RΦ.a(1367))(IΦPropertyToXMLContext.prototype, "value");
|
|
27
27
|
__RΦ.m("rt:f", "P")(IΦPropertyToXMLContext.prototype, "value");
|
|
28
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
28
|
+
__RΦ.m("rt:t", () => __RΦ.a(1363))(IΦPropertyToXMLContext.prototype, "property");
|
|
29
29
|
__RΦ.m("rt:f", "P")(IΦPropertyToXMLContext.prototype, "property");
|
|
30
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
30
|
+
__RΦ.m("rt:t", () => __RΦ.a(1367))(IΦPropertyToXMLContext.prototype, "value");
|
|
31
31
|
__RΦ.m("rt:f", "P")(IΦPropertyToXMLContext.prototype, "value");
|
|
32
32
|
import * as LΦ_0 from "../types";
|
|
33
33
|
var IΦPropertyFromXMLContext = { name: "PropertyFromXMLContext", prototype: {}, identity: Symbol("PropertyFromXMLContext (interface)") };
|
|
@@ -67,11 +67,11 @@ __RΦ.m("rt:t", () => __RΦ.a(505))(IΦXMLModelPropertyOptions.prototype, "model
|
|
|
67
67
|
__RΦ.m("rt:f", "P?")(IΦXMLModelPropertyOptions.prototype, "model");
|
|
68
68
|
__RΦ.m("rt:t", () => __RΦ.a(357))(IΦXMLModelPropertyOptions.prototype, "isSourceElement");
|
|
69
69
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "isSourceElement");
|
|
70
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
70
|
+
__RΦ.m("rt:t", () => __RΦ.a(1214))(IΦXMLModelPropertyOptions.prototype, "resolveElements");
|
|
71
71
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "resolveElements");
|
|
72
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
72
|
+
__RΦ.m("rt:t", () => __RΦ.a(1216))(IΦXMLModelPropertyOptions.prototype, "fromXML");
|
|
73
73
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "fromXML");
|
|
74
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
74
|
+
__RΦ.m("rt:t", () => __RΦ.a(1218))(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
75
75
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
76
76
|
__RΦ.m("rt:t", () => __RΦ.a(496))(IΦXMLModelPropertyOptions.prototype, "name");
|
|
77
77
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "name");
|
|
@@ -87,11 +87,11 @@ __RΦ.m("rt:t", () => __RΦ.a(505))(IΦXMLModelPropertyOptions.prototype, "model
|
|
|
87
87
|
__RΦ.m("rt:f", "P?")(IΦXMLModelPropertyOptions.prototype, "model");
|
|
88
88
|
__RΦ.m("rt:t", () => __RΦ.a(357))(IΦXMLModelPropertyOptions.prototype, "isSourceElement");
|
|
89
89
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "isSourceElement");
|
|
90
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
90
|
+
__RΦ.m("rt:t", () => __RΦ.a(1214))(IΦXMLModelPropertyOptions.prototype, "resolveElements");
|
|
91
91
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "resolveElements");
|
|
92
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
92
|
+
__RΦ.m("rt:t", () => __RΦ.a(1216))(IΦXMLModelPropertyOptions.prototype, "fromXML");
|
|
93
93
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "fromXML");
|
|
94
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
94
|
+
__RΦ.m("rt:t", () => __RΦ.a(1218))(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
95
95
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
96
96
|
var IΦCreateXMLModelPropertyOptions = { name: "CreateXMLModelPropertyOptions", prototype: {}, identity: Symbol("CreateXMLModelPropertyOptions (interface)") };
|
|
97
97
|
export { IΦCreateXMLModelPropertyOptions };
|
|
@@ -101,13 +101,13 @@ __RΦ.m("rt:m", [])(IΦCreateXMLModelPropertyOptions);
|
|
|
101
101
|
__RΦ.m("rt:f", "Ie")(IΦCreateXMLModelPropertyOptions);
|
|
102
102
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
103
103
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
104
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
104
|
+
__RΦ.m("rt:t", () => __RΦ.a(1379))(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
105
105
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
106
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
106
|
+
__RΦ.m("rt:t", () => __RΦ.a(1270))(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
107
107
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
108
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
108
|
+
__RΦ.m("rt:t", () => __RΦ.a(1339))(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
109
109
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
110
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
110
|
+
__RΦ.m("rt:t", () => __RΦ.a(1292))(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
111
111
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
112
112
|
__RΦ.m("rt:t", () => __RΦ.a(20))(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
113
113
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
@@ -117,13 +117,13 @@ __RΦ.m("rt:t", () => __RΦ.a(506))(IΦCreateXMLModelPropertyOptions.prototype,
|
|
|
117
117
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "model");
|
|
118
118
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
119
119
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
120
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
120
|
+
__RΦ.m("rt:t", () => __RΦ.a(1379))(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
121
121
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
122
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
122
|
+
__RΦ.m("rt:t", () => __RΦ.a(1270))(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
123
123
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
124
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
124
|
+
__RΦ.m("rt:t", () => __RΦ.a(1339))(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
125
125
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
126
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
126
|
+
__RΦ.m("rt:t", () => __RΦ.a(1292))(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
127
127
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
128
128
|
__RΦ.m("rt:t", () => __RΦ.a(20))(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
129
129
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
@@ -212,7 +212,7 @@ export { IΦCreateXMLModelOptions };
|
|
|
212
212
|
__RΦ.m("rt:P", ["parent", "fromXML", "toXML", "tagname"])(IΦCreateXMLModelOptions);
|
|
213
213
|
__RΦ.m("rt:m", [])(IΦCreateXMLModelOptions);
|
|
214
214
|
__RΦ.m("rt:f", "Ie")(IΦCreateXMLModelOptions);
|
|
215
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
215
|
+
__RΦ.m("rt:t", () => __RΦ.a(1912))(IΦCreateXMLModelOptions.prototype, "parent");
|
|
216
216
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "parent");
|
|
217
217
|
__RΦ.m("rt:t", () => __RΦ.a(1644))(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
218
218
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
@@ -220,7 +220,7 @@ __RΦ.m("rt:t", () => __RΦ.a(1634))(IΦCreateXMLModelOptions.prototype, "toXML"
|
|
|
220
220
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "toXML");
|
|
221
221
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦCreateXMLModelOptions.prototype, "tagname");
|
|
222
222
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "tagname");
|
|
223
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
223
|
+
__RΦ.m("rt:t", () => __RΦ.a(1912))(IΦCreateXMLModelOptions.prototype, "parent");
|
|
224
224
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "parent");
|
|
225
225
|
__RΦ.m("rt:t", () => __RΦ.a(1644))(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
226
226
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
@@ -19,7 +19,7 @@ const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metada
|
|
|
19
19
|
__RΦ.t[id] = t = l;
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
|
-
}, t: { [
|
|
22
|
+
}, t: { [2761]: { RΦ: t => ({ TΦ: "O", m: [{ n: "propA", f: "", t: __RΦ.a(13) }, { n: "propB", f: "", t: __RΦ.a(20) }, { n: "propC", f: "", t: __RΦ.a(2777) }, { n: "propD", f: "", t: __RΦ.a(705) }, { n: "__constructor", f: "", t: __RΦ.a(4) }] }) }, [13]: { LΦ: t => String }, [20]: { LΦ: t => Boolean }, [2777]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(2775) }) }, [2775]: { TΦ: "5", name: "B" }, [705]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(47), __RΦ.a(135)] }) }, [47]: { LΦ: t => 0 }, [135]: { LΦ: t => 1 }, [4]: { RΦ: t => ({ TΦ: "~" }) }, [2713]: { RΦ: t => ({ TΦ: "O", m: [{ n: "name", f: "", t: __RΦ.a(13) }, { n: "nbPages", f: "", t: __RΦ.a(14) }] }) }, [14]: { LΦ: t => Number }, [2732]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(2676) }) }, [2676]: { TΦ: "5", name: "Book" }, [22]: { RΦ: t => ({ TΦ: "V" }) }, [101]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(102), p: [] }) }, [102]: { LΦ: t => Object } } };
|
|
23
23
|
import "mocha";
|
|
24
24
|
import { expect, assert } from "chai";
|
|
25
25
|
import "reflect-metadata";
|
|
@@ -39,12 +39,12 @@ Book = __decorate([
|
|
|
39
39
|
},
|
|
40
40
|
})
|
|
41
41
|
], Book);
|
|
42
|
-
(t => __RΦ.t[
|
|
42
|
+
(t => __RΦ.t[2676] = t)(Book);
|
|
43
43
|
__RΦ.m("rt:SP", [])(Book);
|
|
44
44
|
__RΦ.m("rt:P", ["name", "nbPages"])(Book);
|
|
45
45
|
__RΦ.m("rt:Sm", [])(Book);
|
|
46
46
|
__RΦ.m("rt:m", ["fromXML"])(Book);
|
|
47
|
-
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(
|
|
47
|
+
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(2713), v: null }])(Book);
|
|
48
48
|
__RΦ.m("rt:f", "C")(Book);
|
|
49
49
|
__RΦ.m("rt:t", () => __RΦ.a(13))(Book.prototype, "name");
|
|
50
50
|
__RΦ.m("rt:f", "P")(Book.prototype, "name");
|
|
@@ -64,16 +64,16 @@ Library = __decorate([
|
|
|
64
64
|
},
|
|
65
65
|
})
|
|
66
66
|
], Library);
|
|
67
|
-
(t => __RΦ.t[
|
|
67
|
+
(t => __RΦ.t[2716] = t)(Library);
|
|
68
68
|
__RΦ.m("rt:SP", [])(Library);
|
|
69
69
|
__RΦ.m("rt:P", ["name", "books"])(Library);
|
|
70
70
|
__RΦ.m("rt:Sm", [])(Library);
|
|
71
71
|
__RΦ.m("rt:m", ["fromXML"])(Library);
|
|
72
|
-
__RΦ.m("rt:p", [{ n: "name", t: () => __RΦ.a(13), v: null }, { n: "books", t: () => __RΦ.a(
|
|
72
|
+
__RΦ.m("rt:p", [{ n: "name", t: () => __RΦ.a(13), v: null }, { n: "books", t: () => __RΦ.a(2732), v: null, f: "3" }])(Library);
|
|
73
73
|
__RΦ.m("rt:f", "C")(Library);
|
|
74
74
|
__RΦ.m("rt:t", () => __RΦ.a(13))(Library.prototype, "name");
|
|
75
75
|
__RΦ.m("rt:f", "P")(Library.prototype, "name");
|
|
76
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
76
|
+
__RΦ.m("rt:t", () => __RΦ.a(2732))(Library.prototype, "books");
|
|
77
77
|
__RΦ.m("rt:f", "P")(Library.prototype, "books");
|
|
78
78
|
describe("Library Example", __RΦ.f(() => {
|
|
79
79
|
const library = new Library("test");
|
|
@@ -127,7 +127,7 @@ A = __decorate([
|
|
|
127
127
|
},
|
|
128
128
|
})
|
|
129
129
|
], A);
|
|
130
|
-
(t => __RΦ.t[
|
|
130
|
+
(t => __RΦ.t[2762] = t)(A);
|
|
131
131
|
__RΦ.m("rt:SP", [])(A);
|
|
132
132
|
__RΦ.m("rt:P", ["propA", "propB", "propC", "propD"])(A);
|
|
133
133
|
__RΦ.m("rt:Sm", [])(A);
|
|
@@ -138,7 +138,7 @@ __RΦ.m("rt:t", () => __RΦ.a(13))(A.prototype, "propA");
|
|
|
138
138
|
__RΦ.m("rt:f", "P")(A.prototype, "propA");
|
|
139
139
|
__RΦ.m("rt:t", () => __RΦ.a(20))(A.prototype, "propB");
|
|
140
140
|
__RΦ.m("rt:f", "P")(A.prototype, "propB");
|
|
141
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
141
|
+
__RΦ.m("rt:t", () => __RΦ.a(2777))(A.prototype, "propC");
|
|
142
142
|
__RΦ.m("rt:f", "P")(A.prototype, "propC");
|
|
143
143
|
__RΦ.m("rt:t", () => __RΦ.a(705))(A.prototype, "propD");
|
|
144
144
|
__RΦ.m("rt:f", "P")(A.prototype, "propD");
|
|
@@ -158,7 +158,7 @@ B = __decorate([
|
|
|
158
158
|
},
|
|
159
159
|
})
|
|
160
160
|
], B);
|
|
161
|
-
(t => __RΦ.t[
|
|
161
|
+
(t => __RΦ.t[2775] = t)(B);
|
|
162
162
|
__RΦ.m("rt:SP", [])(B);
|
|
163
163
|
__RΦ.m("rt:P", ["propA"])(B);
|
|
164
164
|
__RΦ.m("rt:Sm", [])(B);
|
|
@@ -181,8 +181,8 @@ describe("Edgy Cases", __RΦ.f(() => {
|
|
|
181
181
|
<propd>${instance.propD}</propd>
|
|
182
182
|
</a>`));
|
|
183
183
|
it("should give right type infos", __RΦ.f(() => {
|
|
184
|
-
const reflectedA = reflect(A, { TΦ: "c", t: void 0, p: [__RΦ.a(
|
|
185
|
-
assert(reflectedA === reflect(A, { TΦ: "c", t: void 0, p: [__RΦ.a(
|
|
184
|
+
const reflectedA = reflect(A, { TΦ: "c", t: void 0, p: [__RΦ.a(2761)], r: void 0, tp: [] });
|
|
185
|
+
assert(reflectedA === reflect(A, { TΦ: "c", t: void 0, p: [__RΦ.a(2761)], r: void 0, tp: [] }));
|
|
186
186
|
expect(reflectedA.getProperty("propA").type.isClass(String)).to.be.true;
|
|
187
187
|
expect(reflectedA.getProperty("propB").type.isClass(Boolean)).to.be.true;
|
|
188
188
|
const ModelAPropCType = reflectedA.getProperty("propC").type;
|
|
@@ -209,7 +209,7 @@ let C = class C extends B {
|
|
|
209
209
|
C = __decorate([
|
|
210
210
|
Model()
|
|
211
211
|
], C);
|
|
212
|
-
(t => __RΦ.t[
|
|
212
|
+
(t => __RΦ.t[2820] = t)(C);
|
|
213
213
|
__RΦ.m("rt:SP", [])(C);
|
|
214
214
|
__RΦ.m("rt:P", ["propB"])(C);
|
|
215
215
|
__RΦ.m("rt:Sm", [])(C);
|