xml-model 0.2.9 → 0.3.0
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 +4 -5
- package/build/main/defaults/models.js +2 -2
- package/build/main/errors.d.ts +3 -3
- package/build/main/errors.js +14 -14
- package/build/main/helper/merge-maps.js +6 -6
- package/build/main/model/index.js +15 -15
- package/build/main/model/property.js +12 -12
- package/build/main/model/types.js +11 -11
- package/build/module/defaults/index.js +4 -5
- package/build/module/defaults/models.js +2 -2
- package/build/module/errors.d.ts +3 -3
- package/build/module/errors.js +14 -14
- package/build/module/helper/merge-maps.js +6 -6
- package/build/module/model/index.js +15 -15
- package/build/module/model/property.js +12 -12
- package/build/module/model/types.js +11 -11
- package/package.json +1 -1
- package/build/main/model.spec.d.ts +0 -2
- package/build/main/model.spec.js +0 -234
- package/build/module/model.spec.d.ts +0 -2
- package/build/module/model.spec.js +0 -229
|
@@ -72,6 +72,7 @@ exports.defaults = {
|
|
|
72
72
|
}));
|
|
73
73
|
return xmlInstances.map((xml) => model.fromXML(xml));
|
|
74
74
|
}
|
|
75
|
+
// FIXME: other types should be handled
|
|
75
76
|
}
|
|
76
77
|
else if (type.is("union") &&
|
|
77
78
|
type.types.length &&
|
|
@@ -97,10 +98,8 @@ exports.defaults = {
|
|
|
97
98
|
// FIXME: prop.name should never be a symbol anyway
|
|
98
99
|
const _xml = properties[prop.name];
|
|
99
100
|
_xml.elements.forEach((el) => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
el.name = prop.tagname; // TODO: configurable ?
|
|
103
|
-
}
|
|
101
|
+
// overwrite tagnames
|
|
102
|
+
el.name = prop.tagname; // TODO: configurable ?
|
|
104
103
|
elements.push(el);
|
|
105
104
|
});
|
|
106
105
|
}
|
|
@@ -136,7 +135,7 @@ exports.defaults = {
|
|
|
136
135
|
const model = (0, model_1.getModel)(type.class);
|
|
137
136
|
return model.toXML(value);
|
|
138
137
|
}
|
|
139
|
-
else if (type.is("array")
|
|
138
|
+
else if (type.is("array")) {
|
|
140
139
|
const elementType = type.elementType;
|
|
141
140
|
if (elementType.is("class")) {
|
|
142
141
|
const model = (0, model_1.getModel)(elementType.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Φ: "~" }) }, [100]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(96) }] }) }, [96]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(93) }) }, [93]: { LΦ: t => require("../types").IΦXMLElement }, [13]: { LΦ: t => String }, [14]: { LΦ: t => Number }, [
|
|
18
|
+
}, t: { [4]: { RΦ: t => ({ TΦ: "~" }) }, [100]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(96) }] }) }, [96]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(93) }) }, [93]: { LΦ: t => require("../types").IΦXMLElement }, [13]: { LΦ: t => String }, [14]: { LΦ: t => Number }, [2341]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(2340) }] }) }, [2340]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(2339) }) }, [2339]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(2203) }, { n: "type", f: "", t: __RΦ.a(13) }, { n: "name", f: "", t: __RΦ.a(13) }] }) }, [2203]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(173), __RΦ.a(2202)] }) }, [173]: { RΦ: t => ({ TΦ: "O", m: [{ n: "length", f: "", t: __RΦ.a(47) }, { n: "toString", f: "", t: __RΦ.a(626) }, { n: "toLocaleString", f: "", t: __RΦ.a(630) }, { n: "pop", f: "", t: __RΦ.a(634) }, { n: "push", f: "", t: __RΦ.a(638) }, { n: "concat", f: "", t: __RΦ.a(642) }, { n: "join", f: "", t: __RΦ.a(646) }, { n: "reverse", f: "", t: __RΦ.a(650) }, { n: "shift", f: "", t: __RΦ.a(654) }, { n: "slice", f: "", t: __RΦ.a(658) }, { n: "sort", f: "", t: __RΦ.a(662) }, { n: "splice", f: "", t: __RΦ.a(666) }, { n: "unshift", f: "", t: __RΦ.a(670) }, { n: "indexOf", f: "", t: __RΦ.a(674) }, { n: "lastIndexOf", f: "", t: __RΦ.a(678) }, { n: "every", f: "", t: __RΦ.a(682) }, { n: "some", f: "", t: __RΦ.a(686) }, { n: "forEach", f: "", t: __RΦ.a(690) }, { n: "map", f: "", t: __RΦ.a(694) }, { n: "filter", f: "", t: __RΦ.a(697) }, { n: "reduce", f: "", t: __RΦ.a(701) }, { n: "reduceRight", f: "", t: __RΦ.a(705) }, { n: "find", f: "", t: __RΦ.a(709) }, { n: "findIndex", f: "", t: __RΦ.a(713) }, { n: "fill", f: "", t: __RΦ.a(717) }, { n: "copyWithin", f: "", t: __RΦ.a(721) }, { n: "entries", f: "", t: __RΦ.a(725) }, { n: "keys", f: "", t: __RΦ.a(729) }, { n: "values", f: "", t: __RΦ.a(733) }, { n: "includes", f: "", t: __RΦ.a(737) }, { n: "flatMap", f: "", t: __RΦ.a(741) }, { n: "flat", f: "", t: __RΦ.a(745) }, { n: "__@iterator@45", f: "", t: __RΦ.a(749) }, { n: "__@unscopables@47", f: "", t: __RΦ.a(753) }, { n: "at", f: "", t: __RΦ.a(756) }] }) }, [47]: { LΦ: t => 0 }, [626]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [630]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [634]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [638]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [642]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [646]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [650]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [654]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [658]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [662]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [666]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [670]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [674]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [678]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [682]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [686]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [690]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [694]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [697]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [701]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [705]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [709]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [713]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [717]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [721]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [725]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [729]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [733]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [737]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [741]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [745]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [749]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [753]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [756]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [2202]: { RΦ: t => ({ TΦ: "T", e: [{ t: __RΦ.a(2201) }] }) }, [2201]: { RΦ: t => ({ TΦ: "O", m: [{ n: "type", f: "", t: __RΦ.a(2197) }, { n: "text", f: "", t: __RΦ.a(13) }] }) }, [2197]: { LΦ: t => "text" }, [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>
|
|
@@ -48,7 +48,7 @@ const xml_1 = require("../xml");
|
|
|
48
48
|
Object.assign({ type: "element", name: "boolean" }, (0, xml_1.fromContent)(String(ctx.object))),
|
|
49
49
|
],
|
|
50
50
|
};
|
|
51
|
-
}, [__RΦ.m("rt:p", [{ n: "ctx", t: () => __RΦ.a(4), b: void 0, v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(
|
|
51
|
+
}, [__RΦ.m("rt:p", [{ n: "ctx", t: () => __RΦ.a(4), b: void 0, v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(2341))], "toXML"),
|
|
52
52
|
fromXML: __RΦ.f((ctx) => {
|
|
53
53
|
return Boolean((0, xml_1.getContent)(ctx.xml.elements[0]));
|
|
54
54
|
}, [__RΦ.m("rt:p", [{ n: "ctx", t: () => __RΦ.a(4), b: void 0, v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(20))], "fromXML"),
|
package/build/main/errors.d.ts
CHANGED
|
@@ -12,12 +12,12 @@ export declare class PropertyFromXMLConversionError<T> extends FromXMLConversion
|
|
|
12
12
|
}
|
|
13
13
|
export declare class ToXMLConversionError<T> extends Error {
|
|
14
14
|
context: Omit<toXMLContext<T>, "properties">;
|
|
15
|
-
|
|
15
|
+
cause: unknown;
|
|
16
16
|
name: string;
|
|
17
|
-
constructor(context: Omit<toXMLContext<T>, "properties">,
|
|
17
|
+
constructor(context: Omit<toXMLContext<T>, "properties">, cause: unknown);
|
|
18
18
|
}
|
|
19
19
|
export declare class PropertyToXMLConversionError<T> extends ToXMLConversionError<T> {
|
|
20
20
|
propertyContext: PropertyToXMLContext<T>;
|
|
21
21
|
name: string;
|
|
22
|
-
constructor(context: Omit<toXMLContext<T>, "properties">, propertyContext: PropertyToXMLContext<T>,
|
|
22
|
+
constructor(context: Omit<toXMLContext<T>, "properties">, propertyContext: PropertyToXMLContext<T>, cause: unknown);
|
|
23
23
|
}
|
package/build/main/errors.js
CHANGED
|
@@ -16,7 +16,7 @@ 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: { [2698]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(2699), p: [__RΦ.a(2696), __RΦ.a(211)], m: [{ n: "model", f: "", t: __RΦ.a(2700) }, { n: "xml", f: "", t: __RΦ.a(100) }] }) }, [2699]: { LΦ: t => Object }, [2696]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(220), p: [__RΦ.a(2641)] }) }, [220]: { LΦ: t => require("./model/types").IΦfromXMLContext }, [2641]: { LΦ: t => Object }, [211]: { LΦ: t => "properties" }, [2700]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(2641)] }) }, [269]: { LΦ: t => require("./model").XMLModel }, [100]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(96) }] }) }, [96]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(93) }) }, [93]: { LΦ: t => require("./types").IΦXMLElement }, [8]: { RΦ: t => ({ TΦ: "U" }) }, [13]: { LΦ: t => String }, [2650]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(2651), p: [__RΦ.a(2648), __RΦ.a(211)], m: [{ n: "model", f: "", t: __RΦ.a(2654) }, { n: "xml", f: "", t: __RΦ.a(100) }] }) }, [2651]: { LΦ: t => Object }, [2648]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(220), p: [__RΦ.a(2646)] }) }, [2646]: { LΦ: t => Object }, [2654]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(2646)] }) }, [2652]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(298), p: [__RΦ.a(2646)] }) }, [298]: { LΦ: t => require("./model/types").IΦPropertyFromXMLContext }, [2717]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(2718), p: [__RΦ.a(2715), __RΦ.a(211)], m: [{ n: "object", f: "", t: __RΦ.a(2664) }, { n: "model", f: "", t: __RΦ.a(2719) }] }) }, [2718]: { LΦ: t => Object }, [2715]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(258), p: [__RΦ.a(2664)] }) }, [258]: { LΦ: t => require("./model/types").IΦtoXMLContext }, [2664]: { LΦ: t => Object }, [2719]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(2664)] }) }, [2673]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(2674), p: [__RΦ.a(2671), __RΦ.a(211)], m: [{ n: "object", f: "", t: __RΦ.a(2669) }, { n: "model", f: "", t: __RΦ.a(2679) }] }) }, [2674]: { LΦ: t => Object }, [2671]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(258), p: [__RΦ.a(2669)] }) }, [2669]: { LΦ: t => Object }, [2679]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(2669)] }) }, [2675]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1322), p: [__RΦ.a(2669)] }) }, [1322]: { LΦ: t => require("./model/types").IΦPropertyToXMLContext } } };
|
|
20
20
|
class FromXMLConversionError extends Error {
|
|
21
21
|
constructor(context, error) {
|
|
22
22
|
const message = `[Model: ${context.model.type.name}] failed to convert from XML`;
|
|
@@ -27,12 +27,12 @@ class FromXMLConversionError extends Error {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
exports.FromXMLConversionError = FromXMLConversionError;
|
|
30
|
-
(t => __RΦ.t[
|
|
30
|
+
(t => __RΦ.t[2640] = t)(FromXMLConversionError);
|
|
31
31
|
__RΦ.m("rt:SP", [])(FromXMLConversionError);
|
|
32
32
|
__RΦ.m("rt:P", ["name", "context", "error"])(FromXMLConversionError);
|
|
33
33
|
__RΦ.m("rt:Sm", [])(FromXMLConversionError);
|
|
34
34
|
__RΦ.m("rt:m", [])(FromXMLConversionError);
|
|
35
|
-
__RΦ.m("rt:p", [{ n: "context", t: () => __RΦ.a(
|
|
35
|
+
__RΦ.m("rt:p", [{ n: "context", t: () => __RΦ.a(2698), b: void 0, v: null, f: "$" }, { n: "error", t: () => __RΦ.a(8), b: void 0, v: null, f: "$" }])(FromXMLConversionError);
|
|
36
36
|
__RΦ.m("rt:f", "Ce")(FromXMLConversionError);
|
|
37
37
|
__RΦ.m("rt:t", () => __RΦ.a(13))(FromXMLConversionError.prototype, "name");
|
|
38
38
|
__RΦ.m("rt:f", "P")(FromXMLConversionError.prototype, "name");
|
|
@@ -45,49 +45,49 @@ class PropertyFromXMLConversionError extends FromXMLConversionError {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
exports.PropertyFromXMLConversionError = PropertyFromXMLConversionError;
|
|
48
|
-
(t => __RΦ.t[
|
|
48
|
+
(t => __RΦ.t[2645] = t)(PropertyFromXMLConversionError);
|
|
49
49
|
__RΦ.m("rt:SP", [])(PropertyFromXMLConversionError);
|
|
50
50
|
__RΦ.m("rt:P", ["name", "propertyContext"])(PropertyFromXMLConversionError);
|
|
51
51
|
__RΦ.m("rt:Sm", [])(PropertyFromXMLConversionError);
|
|
52
52
|
__RΦ.m("rt:m", [])(PropertyFromXMLConversionError);
|
|
53
|
-
__RΦ.m("rt:p", [{ n: "context", t: () => __RΦ.a(
|
|
53
|
+
__RΦ.m("rt:p", [{ n: "context", t: () => __RΦ.a(2650), b: void 0, v: null }, { n: "propertyContext", t: () => __RΦ.a(2652), b: void 0, v: null, f: "$" }, { n: "error", t: () => __RΦ.a(8), b: void 0, v: null }])(PropertyFromXMLConversionError);
|
|
54
54
|
__RΦ.m("rt:f", "Ce")(PropertyFromXMLConversionError);
|
|
55
55
|
__RΦ.m("rt:t", () => __RΦ.a(13))(PropertyFromXMLConversionError.prototype, "name");
|
|
56
56
|
__RΦ.m("rt:f", "P")(PropertyFromXMLConversionError.prototype, "name");
|
|
57
57
|
class ToXMLConversionError extends Error {
|
|
58
|
-
constructor(context,
|
|
58
|
+
constructor(context, cause) {
|
|
59
59
|
const message = `[Model: ${context.model.type.name}] failed to convert to XML`;
|
|
60
60
|
super(message);
|
|
61
61
|
this.context = context;
|
|
62
|
-
this.
|
|
62
|
+
this.cause = cause;
|
|
63
63
|
this.name = "ToXMLConversionError";
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
exports.ToXMLConversionError = ToXMLConversionError;
|
|
67
|
-
(t => __RΦ.t[
|
|
67
|
+
(t => __RΦ.t[2663] = t)(ToXMLConversionError);
|
|
68
68
|
__RΦ.m("rt:SP", [])(ToXMLConversionError);
|
|
69
|
-
__RΦ.m("rt:P", ["name", "context", "
|
|
69
|
+
__RΦ.m("rt:P", ["name", "context", "cause"])(ToXMLConversionError);
|
|
70
70
|
__RΦ.m("rt:Sm", [])(ToXMLConversionError);
|
|
71
71
|
__RΦ.m("rt:m", [])(ToXMLConversionError);
|
|
72
|
-
__RΦ.m("rt:p", [{ n: "context", t: () => __RΦ.a(
|
|
72
|
+
__RΦ.m("rt:p", [{ n: "context", t: () => __RΦ.a(2717), b: void 0, v: null, f: "$" }, { n: "cause", t: () => __RΦ.a(8), b: void 0, v: null, f: "$" }])(ToXMLConversionError);
|
|
73
73
|
__RΦ.m("rt:f", "Ce")(ToXMLConversionError);
|
|
74
74
|
__RΦ.m("rt:t", () => __RΦ.a(13))(ToXMLConversionError.prototype, "name");
|
|
75
75
|
__RΦ.m("rt:f", "P")(ToXMLConversionError.prototype, "name");
|
|
76
76
|
class PropertyToXMLConversionError extends ToXMLConversionError {
|
|
77
|
-
constructor(context, propertyContext,
|
|
78
|
-
super(context,
|
|
77
|
+
constructor(context, propertyContext, cause) {
|
|
78
|
+
super(context, cause);
|
|
79
79
|
this.propertyContext = propertyContext;
|
|
80
80
|
this.name = "PropertyToXMLConversionError";
|
|
81
81
|
this.message = `[Model: ${context.model.type.name}] failed to convert prop <${String(propertyContext.property.name)}> to XML`;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
exports.PropertyToXMLConversionError = PropertyToXMLConversionError;
|
|
85
|
-
(t => __RΦ.t[
|
|
85
|
+
(t => __RΦ.t[2668] = t)(PropertyToXMLConversionError);
|
|
86
86
|
__RΦ.m("rt:SP", [])(PropertyToXMLConversionError);
|
|
87
87
|
__RΦ.m("rt:P", ["name", "propertyContext"])(PropertyToXMLConversionError);
|
|
88
88
|
__RΦ.m("rt:Sm", [])(PropertyToXMLConversionError);
|
|
89
89
|
__RΦ.m("rt:m", [])(PropertyToXMLConversionError);
|
|
90
|
-
__RΦ.m("rt:p", [{ n: "context", t: () => __RΦ.a(
|
|
90
|
+
__RΦ.m("rt:p", [{ n: "context", t: () => __RΦ.a(2673), b: void 0, v: null }, { n: "propertyContext", t: () => __RΦ.a(2675), b: void 0, v: null, f: "$" }, { n: "cause", t: () => __RΦ.a(8), b: void 0, v: null }])(PropertyToXMLConversionError);
|
|
91
91
|
__RΦ.m("rt:f", "Ce")(PropertyToXMLConversionError);
|
|
92
92
|
__RΦ.m("rt:t", () => __RΦ.a(13))(PropertyToXMLConversionError.prototype, "name");
|
|
93
93
|
__RΦ.m("rt:f", "P")(PropertyToXMLConversionError.prototype, "name");
|
|
@@ -15,13 +15,13 @@ 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: { [
|
|
18
|
+
}, t: { [2362]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(2361) }) }, [2361]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1066), p: [__RΦ.a(2359), __RΦ.a(2360)] }) }, [1066]: { LΦ: t => Map }, [2359]: { LΦ: t => Object }, [2360]: { LΦ: t => Object }, [4]: { RΦ: t => ({ TΦ: "~" }) }, [22]: { RΦ: t => ({ TΦ: "V" }) } } };
|
|
19
19
|
function mergeMaps(...sources) {
|
|
20
20
|
const res = new Map();
|
|
21
21
|
sources.forEach(__RΦ.f((source) => {
|
|
22
22
|
const overrides = new Map();
|
|
23
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), b: void 0, v: null }, { n: "key", t: () => __RΦ.a(4), b: void 0, v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(
|
|
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), b: void 0, v: null }, { n: "key", t: () => __RΦ.a(4), b: void 0, v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(2361))], ""));
|
|
25
25
|
if (overrides.size) {
|
|
26
26
|
const entries = Array.from(res.entries());
|
|
27
27
|
entries.forEach(__RΦ.f((entry) => {
|
|
@@ -30,13 +30,13 @@ function mergeMaps(...sources) {
|
|
|
30
30
|
entry[1] = overrides.get(key);
|
|
31
31
|
}, [__RΦ.m("rt:p", [{ n: "entry", t: () => __RΦ.a(4), b: void 0, v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(22))], ""));
|
|
32
32
|
res.clear();
|
|
33
|
-
entries.forEach(__RΦ.f(([key, val]) => res.set(key, val), [__RΦ.m("rt:p", [{ n: void 0, t: () => __RΦ.a(4), b: [{ n: "key", t: () => __RΦ.a(
|
|
33
|
+
entries.forEach(__RΦ.f(([key, val]) => res.set(key, val), [__RΦ.m("rt:p", [{ n: void 0, t: () => __RΦ.a(4), b: [{ n: "key", t: () => __RΦ.a(2359), b: void 0, v: null }, { n: "val", t: () => __RΦ.a(2360), b: void 0, v: null }], v: null, f: "[" }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(2361))], ""));
|
|
34
34
|
}
|
|
35
|
-
additions.forEach(__RΦ.f((val, key) => res.set(key, val), [__RΦ.m("rt:p", [{ n: "val", t: () => __RΦ.a(4), b: void 0, v: null }, { n: "key", t: () => __RΦ.a(4), b: void 0, v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(
|
|
35
|
+
additions.forEach(__RΦ.f((val, key) => res.set(key, val), [__RΦ.m("rt:p", [{ n: "val", t: () => __RΦ.a(4), b: void 0, v: null }, { n: "key", t: () => __RΦ.a(4), b: void 0, v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(2361))], ""));
|
|
36
36
|
}, [__RΦ.m("rt:p", [{ n: "source", t: () => __RΦ.a(4), b: void 0, v: null }]), __RΦ.m("rt:f", "F>"), __RΦ.m("rt:t", () => __RΦ.a(22))], ""));
|
|
37
37
|
return res;
|
|
38
38
|
}
|
|
39
39
|
exports.default = mergeMaps;
|
|
40
|
-
__RΦ.m("rt:p", [{ n: "sources", t: () => __RΦ.a(
|
|
40
|
+
__RΦ.m("rt:p", [{ n: "sources", t: () => __RΦ.a(2362), b: void 0, v: null, f: "3" }])(mergeMaps);
|
|
41
41
|
__RΦ.m("rt:f", "F")(mergeMaps);
|
|
42
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
42
|
+
__RΦ.m("rt:t", () => __RΦ.a(2361))(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: { [1316]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(777), p: [__RΦ.a(270)] }) }, [777]: { LΦ: t => require("typescript-rtti/dist").IΦConstructor }, [270]: { LΦ: t => Object }, [1076]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(777), p: [__RΦ.a(8)] }) }, [8]: { RΦ: t => ({ TΦ: "U" }) }, [
|
|
22
|
+
}, t: { [1316]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(777), p: [__RΦ.a(270)] }) }, [777]: { LΦ: t => require("typescript-rtti/dist").IΦConstructor }, [270]: { LΦ: t => Object }, [1076]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(777), p: [__RΦ.a(8)] }) }, [8]: { RΦ: t => ({ TΦ: "U" }) }, [2448]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(129), p: [__RΦ.a(1076), __RΦ.a(22), __RΦ.a(8)] }) }, [129]: { LΦ: t => Object }, [22]: { RΦ: t => ({ TΦ: "V" }) }, [272]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(1)] }) }, [269]: { TΦ: "5", name: "XMLModel" }, [1]: { RΦ: t => ({ TΦ: "~" }) }, [2452]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(272)] }) }, [12]: { RΦ: t => ({ TΦ: "n" }) }, [2461]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(2268), p: [__RΦ.a(270)] }) }, [2268]: { LΦ: t => require("./types").IΦCreateXMLModelOptions }, [527]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(198), p: [__RΦ.a(270)] }) }, [198]: { LΦ: t => require("./types").IΦXMLModelOptions }, [2485]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(2043)] }) }, [2043]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(216), p: [__RΦ.a(335), __RΦ.a(2041)] }) }, [216]: { LΦ: t => require("./types").IΦConversionOptions }, [335]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(336), p: [__RΦ.a(279), __RΦ.a(211)], m: [{ n: "model", f: "", t: __RΦ.a(272) }, { n: "xml", f: "", t: __RΦ.a(100) }] }) }, [336]: { LΦ: t => Object }, [279]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(220), p: [__RΦ.a(1)] }) }, [220]: { LΦ: t => require("./types").IΦfromXMLContext }, [211]: { LΦ: t => "properties" }, [100]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(96) }] }) }, [96]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(93) }) }, [93]: { LΦ: t => require("../types").IΦXMLElement }, [2041]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(2042), p: [__RΦ.a(1)], m: [] }) }, [2042]: { LΦ: t => Object }, [4]: { RΦ: t => ({ TΦ: "~" }) }, [576]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(577), p: [__RΦ.a(270)], m: [] }) }, [577]: { LΦ: t => Object }, [2493]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(2491)] }) }, [2491]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(216), p: [__RΦ.a(1333), __RΦ.a(1302)] }) }, [1333]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1334), p: [__RΦ.a(1293), __RΦ.a(211)], m: [{ n: "object", f: "", t: __RΦ.a(1) }, { n: "model", f: "", t: __RΦ.a(272) }] }) }, [1334]: { LΦ: t => Object }, [1293]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(258), p: [__RΦ.a(1)] }) }, [258]: { LΦ: t => require("./types").IΦtoXMLContext }, [1302]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1303), p: [__RΦ.a(1)], m: [] }) }, [1303]: { LΦ: t => Object }, [1359]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1360), p: [__RΦ.a(270)], m: [] }) }, [1360]: { LΦ: t => Object }, [20]: { LΦ: t => Boolean }, [579]: { RΦ: t => ({ TΦ: "O", m: [{ n: "fromXML", f: "", t: __RΦ.a(588) }, { n: "toXML", f: "", t: __RΦ.a(1369) }, { n: "options", f: "", t: __RΦ.a(1577) }] }) }, [588]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(216), p: [__RΦ.a(586), __RΦ.a(576)] }) }, [586]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(587), p: [__RΦ.a(528), __RΦ.a(211)], m: [{ n: "model", f: "", t: __RΦ.a(269) }, { n: "xml", f: "", t: __RΦ.a(100) }] }) }, [587]: { LΦ: t => Object }, [528]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(220), p: [__RΦ.a(270)] }) }, [1369]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(216), p: [__RΦ.a(1367), __RΦ.a(1359)] }) }, [1367]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1368), p: [__RΦ.a(1340), __RΦ.a(211)], m: [{ n: "object", f: "", t: __RΦ.a(270) }, { n: "model", f: "", t: __RΦ.a(269) }] }) }, [1368]: { LΦ: t => Object }, [1340]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(258), p: [__RΦ.a(270)] }) }, [1577]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1066), p: [__RΦ.a(1575), __RΦ.a(1576)] }) }, [1066]: { LΦ: t => Map }, [1575]: { LΦ: t => Object }, [1576]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(235), p: [__RΦ.a(270)] }) }, [235]: { LΦ: t => require("./types").IΦXMLModelPropertyOptions }, [2509]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(2507)] }) }, [2507]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(216), p: [__RΦ.a(279), __RΦ.a(1)] }) }, [2513]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(2511)] }) }, [2511]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(216), p: [__RΦ.a(1293), __RΦ.a(100)] }) }, [13]: { LΦ: t => String }, [352]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(13), __RΦ.a(100)] }) }, [28]: { LΦ: t => Object }, [1768]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1764), p: [__RΦ.a(1316)] }) }, [1764]: { LΦ: t => require("typescript-rtti/dist").ReflectedClass }, [1562]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1066), p: [__RΦ.a(13), __RΦ.a(1561)] }) }, [1561]: { RΦ: t => ({ TΦ: "&", t: [__RΦ.a(338), __RΦ.a(1560)] }) }, [338]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(235), p: [__RΦ.a(1)] }) }, [1560]: { RΦ: t => ({ TΦ: "O", m: [{ n: "model", f: "", t: __RΦ.a(1) }] }) }, [2272]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(777), p: [__RΦ.a(2267)] }) }, [2267]: { LΦ: t => Object }, [2271]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(2268), p: [__RΦ.a(2267)] }) }, [2302]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(2267)] }) }, [1055]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(777), p: [__RΦ.a(1054)] }) }, [1054]: { LΦ: t => Object }, [1080]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(1079)] }) }, [10]: { RΦ: t => ({ TΦ: "u" }) }, [1079]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(1054)] }) }, [782]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(777), p: [__RΦ.a(776)] }) }, [776]: { LΦ: t => Object }, [1081]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(776)] }) }, [2564]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(2268), p: [__RΦ.a(2563)] }) }, [2563]: { LΦ: t => Object }, [2566]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(22), p: [{ n: "constructor", t: () => __RΦ.a(2567), b: void 0, v: null }], f: "" }) }, [2567]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(777), p: [__RΦ.a(2563)] }) } } };
|
|
23
23
|
const typescript_rtti_1 = require("typescript-rtti");
|
|
24
24
|
const middleware_1 = require("../middleware");
|
|
25
25
|
const property_1 = require("./property");
|
|
@@ -42,7 +42,7 @@ function* ParentChain(constructor) {
|
|
|
42
42
|
}
|
|
43
43
|
__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(1076), b: void 0, 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(2448))(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(272), b: void 0, 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(2452))(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(2452))], "getParent");
|
|
71
71
|
let propertiesLoaded = false;
|
|
72
72
|
const properties = {
|
|
73
73
|
options: new Map(),
|
|
@@ -257,19 +257,19 @@ __RΦ.m("rt:SP", [])(XMLModel);
|
|
|
257
257
|
__RΦ.m("rt:P", ["options", "type", "reflectedClass"])(XMLModel);
|
|
258
258
|
__RΦ.m("rt:Sm", [])(XMLModel);
|
|
259
259
|
__RΦ.m("rt:m", ["fromXML", "toXML", "resolveAllProperties"])(XMLModel);
|
|
260
|
-
__RΦ.m("rt:p", [{ n: "type", t: () => __RΦ.a(1316), b: void 0, v: null, f: "R" }, { n: "options", t: () => __RΦ.a(
|
|
260
|
+
__RΦ.m("rt:p", [{ n: "type", t: () => __RΦ.a(1316), b: void 0, v: null, f: "R" }, { n: "options", t: () => __RΦ.a(2461), b: void 0, v: null }])(XMLModel);
|
|
261
261
|
__RΦ.m("rt:f", "Ce")(XMLModel);
|
|
262
262
|
__RΦ.m("rt:t", () => __RΦ.a(527))(XMLModel.prototype, "options");
|
|
263
263
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "options");
|
|
264
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
264
|
+
__RΦ.m("rt:t", () => __RΦ.a(2485))(XMLModel.prototype, "parent");
|
|
265
265
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "parent");
|
|
266
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
266
|
+
__RΦ.m("rt:t", () => __RΦ.a(2493))(XMLModel.prototype, "parent");
|
|
267
267
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "parent");
|
|
268
268
|
__RΦ.m("rt:t", () => __RΦ.a(579))(XMLModel.prototype, "properties");
|
|
269
269
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "properties");
|
|
270
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
270
|
+
__RΦ.m("rt:t", () => __RΦ.a(2509))(XMLModel.prototype, "parent");
|
|
271
271
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "parent");
|
|
272
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
272
|
+
__RΦ.m("rt:t", () => __RΦ.a(2513))(XMLModel.prototype, "parent");
|
|
273
273
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "parent");
|
|
274
274
|
__RΦ.m("rt:t", () => __RΦ.a(13))(XMLModel.prototype, "tagname");
|
|
275
275
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "tagname");
|
|
@@ -287,7 +287,7 @@ __RΦ.m("rt:f", "M.")(XMLModel.prototype, "toXML");
|
|
|
287
287
|
__RΦ.m("rt:t", () => __RΦ.a(100))(XMLModel.prototype, "toXML");
|
|
288
288
|
__RΦ.m("rt:t", () => __RΦ.a(1359))(XMLModel.prototype, "properties");
|
|
289
289
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "properties");
|
|
290
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
290
|
+
__RΦ.m("rt:t", () => __RΦ.a(1768))(XMLModel.prototype, "reflectedClass");
|
|
291
291
|
__RΦ.m("rt:f", "P")(XMLModel.prototype, "reflectedClass");
|
|
292
292
|
__RΦ.m("rt:f", "M.")(XMLModel.prototype["resolveAllProperties"]);
|
|
293
293
|
((t, p) => __RΦ.m("rt:h", () => typeof t === "object" ? t.constructor : t)(t[p]))(XMLModel.prototype, "resolveAllProperties");
|
|
@@ -303,9 +303,9 @@ function createModel(type, options) {
|
|
|
303
303
|
return model;
|
|
304
304
|
}
|
|
305
305
|
exports.createModel = createModel;
|
|
306
|
-
__RΦ.m("rt:p", [{ n: "type", t: () => __RΦ.a(
|
|
306
|
+
__RΦ.m("rt:p", [{ n: "type", t: () => __RΦ.a(2272), b: void 0, v: null }, { n: "options", t: () => __RΦ.a(2271), b: void 0, v: null }])(createModel);
|
|
307
307
|
__RΦ.m("rt:f", "F")(createModel);
|
|
308
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
308
|
+
__RΦ.m("rt:t", () => __RΦ.a(2302))(createModel);
|
|
309
309
|
exports.Models = new Map();
|
|
310
310
|
function findModel(id) {
|
|
311
311
|
return exports.Models.get(id);
|
|
@@ -329,12 +329,12 @@ __RΦ.m("rt:t", () => __RΦ.a(1081))(getModel);
|
|
|
329
329
|
function ModelDecoratorFactory(options) {
|
|
330
330
|
return __RΦ.f(function (constructor) {
|
|
331
331
|
findModel(constructor) || createModel(constructor, options || {});
|
|
332
|
-
}, [__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(
|
|
332
|
+
}, [__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(2567), b: void 0, v: null }]), __RΦ.m("rt:f", "M"), __RΦ.m("rt:t", () => __RΦ.a(22))], "");
|
|
333
333
|
}
|
|
334
334
|
exports.Model = ModelDecoratorFactory;
|
|
335
|
-
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(
|
|
335
|
+
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(2564), b: void 0, v: null, f: "?" }])(ModelDecoratorFactory);
|
|
336
336
|
__RΦ.m("rt:f", "F")(ModelDecoratorFactory);
|
|
337
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
337
|
+
__RΦ.m("rt:t", () => __RΦ.a(2566))(ModelDecoratorFactory);
|
|
338
338
|
var property_2 = require("./property");
|
|
339
339
|
Object.defineProperty(exports, "Prop", { enumerable: true, get: function () { return property_2.Prop; } });
|
|
340
340
|
require("../defaults/models");
|
|
@@ -16,14 +16,14 @@ 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: { [1620]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(777), p: [__RΦ.a(1615)] }) }, [777]: { LΦ: t => require("typescript-rtti/dist").IΦConstructor }, [1615]: { LΦ: t => Object }, [1619]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1616), p: [__RΦ.a(1615)] }) }, [1616]: { LΦ: t => require("./types").IΦCreateXMLModelPropertyOptions }, [1622]: { LΦ: t => Object }, [1623]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(235), p: [__RΦ.a(1615)] }) }, [235]: { LΦ: t => require("./types").IΦXMLModelPropertyOptions }, [783]: { LΦ: t => require("typescript-rtti/dist").ReflectedProperty }, [13]: { LΦ: t => String }, [4]: { RΦ: t => ({ TΦ: "~" }) }, [20]: { LΦ: t => Boolean }, [96]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(93) }) }, [93]: { LΦ: t => require("../types").IΦXMLElement }, [1]: { RΦ: t => ({ TΦ: "~" }) }, [100]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(96) }] }) }, [2102]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(777), p: [__RΦ.a(2101)] }) }, [2101]: { LΦ: t => Object }, [2104]: { LΦ: t => Object }, [2105]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(235), p: [__RΦ.a(2101)] }) }, [22]: { RΦ: t => ({ TΦ: "V" }) }, [2117]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(777), p: [__RΦ.a(2116)] }) }, [2116]: { LΦ: t => Object }, [2119]: { LΦ: t => Object }, [2128]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(2120)] }) }, [10]: { RΦ: t => ({ TΦ: "u" }) }, [2120]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(235), p: [__RΦ.a(2116)] }) }, [2134]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(777), p: [__RΦ.a(2133)] }) }, [2133]: { LΦ: t => Object }, [2136]: { LΦ: t => Object }, [2160]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(235), p: [__RΦ.a(2133)] }) }, [2167]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1616), p: [__RΦ.a(2166)] }) }, [2166]: { LΦ: t => Object }, [2169]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(22), p: [{ n: "prototype", t: () => __RΦ.a(1), b: void 0, v: null }, { n: "property", t: () => __RΦ.a(2171), b: void 0, v: null }], f: "" }) }, [2171]: { LΦ: t => Object } } };
|
|
20
20
|
const typescript_rtti_1 = require("typescript-rtti");
|
|
21
21
|
const defaults_1 = require("../defaults");
|
|
22
22
|
function resolvePropertyConversionOptions(options, constructor, property) {
|
|
23
23
|
const _options = {
|
|
24
24
|
name: property,
|
|
25
25
|
get reflected() {
|
|
26
|
-
const reflectedClass = (0, typescript_rtti_1.reflect)(constructor, { TΦ: "c", t: void 0, p: [__RΦ.a(
|
|
26
|
+
const reflectedClass = (0, typescript_rtti_1.reflect)(constructor, { TΦ: "c", t: void 0, p: [__RΦ.a(1620)], r: void 0, tp: [] });
|
|
27
27
|
return (reflectedClass.getOwnProperty(property) ||
|
|
28
28
|
reflectedClass.getProperty(property)); // patch bug in typescript-rtti
|
|
29
29
|
// TODO: remove when typescript-rtti is patched
|
|
@@ -56,9 +56,9 @@ function resolvePropertyConversionOptions(options, constructor, property) {
|
|
|
56
56
|
}
|
|
57
57
|
return _options;
|
|
58
58
|
}
|
|
59
|
-
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(
|
|
59
|
+
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(1619), b: void 0, v: null }, { n: "constructor", t: () => __RΦ.a(1620), b: void 0, v: null }, { n: "property", t: () => __RΦ.a(1622), b: void 0, v: null }])(resolvePropertyConversionOptions);
|
|
60
60
|
__RΦ.m("rt:f", "F")(resolvePropertyConversionOptions);
|
|
61
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
61
|
+
__RΦ.m("rt:t", () => __RΦ.a(1623))(resolvePropertyConversionOptions);
|
|
62
62
|
const PropertyOptions = new Map();
|
|
63
63
|
function storePropertyConversionOptions(constructor, property, options) {
|
|
64
64
|
let map = PropertyOptions.get(constructor);
|
|
@@ -68,7 +68,7 @@ function storePropertyConversionOptions(constructor, property, options) {
|
|
|
68
68
|
}
|
|
69
69
|
map.set(property, options);
|
|
70
70
|
}
|
|
71
|
-
__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(
|
|
71
|
+
__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(2102), b: void 0, v: null }, { n: "property", t: () => __RΦ.a(2104), b: void 0, v: null }, { n: "options", t: () => __RΦ.a(2105), b: void 0, v: null }])(storePropertyConversionOptions);
|
|
72
72
|
__RΦ.m("rt:f", "F")(storePropertyConversionOptions);
|
|
73
73
|
__RΦ.m("rt:t", () => __RΦ.a(22))(storePropertyConversionOptions);
|
|
74
74
|
function findPropertyConversionOptions(constructor, property) {
|
|
@@ -77,24 +77,24 @@ function findPropertyConversionOptions(constructor, property) {
|
|
|
77
77
|
return options.get(property);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(
|
|
80
|
+
__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(2117), b: void 0, v: null }, { n: "property", t: () => __RΦ.a(2119), b: void 0, v: null }])(findPropertyConversionOptions);
|
|
81
81
|
__RΦ.m("rt:f", "F")(findPropertyConversionOptions);
|
|
82
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
82
|
+
__RΦ.m("rt:t", () => __RΦ.a(2128))(findPropertyConversionOptions);
|
|
83
83
|
function getPropertyConversionOptions(constructor, property) {
|
|
84
84
|
const options = findPropertyConversionOptions(constructor, property);
|
|
85
85
|
return options || resolvePropertyConversionOptions({}, constructor, property);
|
|
86
86
|
}
|
|
87
87
|
exports.getPropertyConversionOptions = getPropertyConversionOptions;
|
|
88
|
-
__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(
|
|
88
|
+
__RΦ.m("rt:p", [{ n: "constructor", t: () => __RΦ.a(2134), b: void 0, v: null }, { n: "property", t: () => __RΦ.a(2136), b: void 0, v: null }])(getPropertyConversionOptions);
|
|
89
89
|
__RΦ.m("rt:f", "F")(getPropertyConversionOptions);
|
|
90
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
90
|
+
__RΦ.m("rt:t", () => __RΦ.a(2160))(getPropertyConversionOptions);
|
|
91
91
|
function PropDecoratorFactory(options) {
|
|
92
92
|
return __RΦ.f(function (prototype, property) {
|
|
93
93
|
const _options = resolvePropertyConversionOptions(options || {}, prototype.constructor, property);
|
|
94
94
|
storePropertyConversionOptions(prototype.constructor, property, _options);
|
|
95
|
-
}, [__RΦ.m("rt:p", [{ n: "prototype", t: () => __RΦ.a(1), b: void 0, v: null }, { n: "property", t: () => __RΦ.a(
|
|
95
|
+
}, [__RΦ.m("rt:p", [{ n: "prototype", t: () => __RΦ.a(1), b: void 0, v: null }, { n: "property", t: () => __RΦ.a(2171), b: void 0, v: null }]), __RΦ.m("rt:f", "M."), __RΦ.m("rt:t", () => __RΦ.a(22))], "");
|
|
96
96
|
}
|
|
97
97
|
exports.Prop = PropDecoratorFactory;
|
|
98
|
-
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(
|
|
98
|
+
__RΦ.m("rt:p", [{ n: "options", t: () => __RΦ.a(2167), b: void 0, v: null, f: "?" }])(PropDecoratorFactory);
|
|
99
99
|
__RΦ.m("rt:f", "F")(PropDecoratorFactory);
|
|
100
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
100
|
+
__RΦ.m("rt:t", () => __RΦ.a(2169))(PropDecoratorFactory);
|
|
@@ -16,7 +16,7 @@ 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: { [1335]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(235), p: [__RΦ.a(1323)] }) }, [235]: { TΦ: "5", name: "XMLModelPropertyOptions" }, [1323]: { LΦ: t => Object }, [1339]: { LΦ: t => Object }, [337]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(235), p: [__RΦ.a(299)] }) }, [299]: { LΦ: t => Object }, [96]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(93) }) }, [93]: { LΦ: t => require("../types").IΦXMLElement }, [1177]: { LΦ: t => Object }, [783]: { LΦ: t => require("typescript-rtti").ReflectedProperty }, [13]: { LΦ: t => String }, [20]: { LΦ: t => Boolean }, [272]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(1)] }) }, [269]: { LΦ: t => require("../model").XMLModel }, [1]: { RΦ: t => ({ TΦ: "~" }) }, [241]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(20), p: [{ n: "element", t: () => __RΦ.a(93), b: void 0, v: null }, { n: "context", t: () => __RΦ.a(318), b: void 0, v: null }], f: "" }) }, [318]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(319), p: [__RΦ.a(301), __RΦ.a(302)], m: [{ n: "model", f: "", t: __RΦ.a(
|
|
19
|
+
}, t: { [1335]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(235), p: [__RΦ.a(1323)] }) }, [235]: { TΦ: "5", name: "XMLModelPropertyOptions" }, [1323]: { LΦ: t => Object }, [1339]: { LΦ: t => Object }, [337]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(235), p: [__RΦ.a(299)] }) }, [299]: { LΦ: t => Object }, [96]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(93) }) }, [93]: { LΦ: t => require("../types").IΦXMLElement }, [1177]: { LΦ: t => Object }, [783]: { LΦ: t => require("typescript-rtti").ReflectedProperty }, [13]: { LΦ: t => String }, [20]: { LΦ: t => Boolean }, [272]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(1)] }) }, [269]: { LΦ: t => require("../model").XMLModel }, [1]: { RΦ: t => ({ TΦ: "~" }) }, [241]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(20), p: [{ n: "element", t: () => __RΦ.a(93), b: void 0, v: null }, { n: "context", t: () => __RΦ.a(318), b: void 0, v: null }], f: "" }) }, [318]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(319), p: [__RΦ.a(301), __RΦ.a(302)], m: [{ n: "model", f: "", t: __RΦ.a(3281) }, { n: "xml", f: "", t: __RΦ.a(100) }, { n: "property", f: "", t: __RΦ.a(235) }] }) }, [319]: { LΦ: t => Object }, [301]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(298), p: [__RΦ.a(236)] }) }, [298]: { TΦ: "5", name: "PropertyFromXMLContext" }, [236]: { LΦ: t => Object }, [302]: { LΦ: t => "elements" }, [3281]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(236)] }) }, [100]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(96) }] }) }, [245]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(96), p: [{ n: "context", t: () => __RΦ.a(318), b: void 0, v: null }], f: "" }) }, [255]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(1178), p: [{ n: "context", t: () => __RΦ.a(301), b: void 0, v: null }], f: "" }) }, [1178]: { LΦ: t => Object }, [275]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(100), p: [{ n: "context", t: () => __RΦ.a(1325), b: void 0, v: null }], f: "" }) }, [1325]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1322), p: [__RΦ.a(236)] }) }, [1322]: { TΦ: "5", name: "PropertyToXMLContext" }, [2080]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(13), __RΦ.a(74), __RΦ.a(2079)] }) }, [74]: { LΦ: t => RegExp }, [2079]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [2011]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [2055]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [2030]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [349]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(272)] }) }, [10]: { RΦ: t => ({ TΦ: "u" }) }, [530]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(216)] }) }, [12]: { RΦ: t => ({ TΦ: "n" }) }, [216]: { TΦ: "5", name: "ConversionOptions" }, [230]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(229) }) }, [229]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [574]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(575), p: [__RΦ.a(221)], m: [] }) }, [575]: { LΦ: t => Object }, [221]: { LΦ: t => Object }, [605]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(221)] }) }, [259]: { LΦ: t => Object }, [1300]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1301), p: [__RΦ.a(259)], m: [] }) }, [1301]: { LΦ: t => Object }, [1304]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(259)] }) }, [1749]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(199)] }) }, [199]: { LΦ: t => Object }, [578]: { RΦ: t => ({ TΦ: "O", m: [{ n: "fromXML", f: "", t: __RΦ.a(585) }, { n: "toXML", f: "", t: __RΦ.a(1366) }, { n: "options", f: "", t: __RΦ.a(1573) }] }) }, [585]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(216), p: [__RΦ.a(581), __RΦ.a(583)] }) }, [581]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(582), p: [__RΦ.a(223), __RΦ.a(211)], m: [{ n: "model", f: "", t: __RΦ.a(1749) }, { n: "xml", f: "", t: __RΦ.a(100) }] }) }, [582]: { LΦ: t => Object }, [223]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(220), p: [__RΦ.a(199)] }) }, [220]: { TΦ: "5", name: "fromXMLContext" }, [211]: { LΦ: t => "properties" }, [583]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(584), p: [__RΦ.a(199)], m: [] }) }, [584]: { LΦ: t => Object }, [1366]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(216), p: [__RΦ.a(1362), __RΦ.a(1364)] }) }, [1362]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1363), p: [__RΦ.a(261), __RΦ.a(211)], m: [{ n: "object", f: "", t: __RΦ.a(199) }, { n: "model", f: "", t: __RΦ.a(1749) }] }) }, [1363]: { LΦ: t => Object }, [261]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(258), p: [__RΦ.a(199)] }) }, [258]: { TΦ: "5", name: "toXMLContext" }, [1364]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(1365), p: [__RΦ.a(199)], m: [] }) }, [1365]: { LΦ: t => Object }, [1573]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1066), p: [__RΦ.a(1571), __RΦ.a(1572)] }) }, [1066]: { LΦ: t => Map }, [1571]: { LΦ: t => Object }, [1572]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(235), p: [__RΦ.a(199)] }) }, [224]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(216), p: [__RΦ.a(223), __RΦ.a(199)] }) }, [262]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(216), p: [__RΦ.a(261), __RΦ.a(100)] }) }, [2521]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(2520)] }) }, [2520]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(269), p: [__RΦ.a(2269)] }) }, [2269]: { LΦ: t => Object }, [2288]: { RΦ: t => ({ TΦ: "O", m: [] }) }, [2278]: { RΦ: t => ({ TΦ: "O", m: [] }) } } };
|
|
20
20
|
var IΦPropertyToXMLContext = { name: "PropertyToXMLContext", prototype: {}, identity: Symbol("PropertyToXMLContext (interface)") };
|
|
21
21
|
exports.IΦPropertyToXMLContext = IΦPropertyToXMLContext;
|
|
22
22
|
(t => __RΦ.t[1322] = t)(IΦPropertyToXMLContext);
|
|
@@ -67,19 +67,19 @@ __RΦ.m("rt:t", () => __RΦ.a(275))(IΦXMLModelPropertyOptions.prototype, "toXML
|
|
|
67
67
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
68
68
|
var IΦCreateXMLModelPropertyOptions = { name: "CreateXMLModelPropertyOptions", prototype: {}, identity: Symbol("CreateXMLModelPropertyOptions (interface)") };
|
|
69
69
|
exports.IΦCreateXMLModelPropertyOptions = IΦCreateXMLModelPropertyOptions;
|
|
70
|
-
(t => __RΦ.t[
|
|
70
|
+
(t => __RΦ.t[1616] = t)(IΦCreateXMLModelPropertyOptions);
|
|
71
71
|
__RΦ.m("rt:P", ["tagname", "sourceElements", "resolveElements", "toXML", "fromXML", "inline", "ignore", "model"])(IΦCreateXMLModelPropertyOptions);
|
|
72
72
|
__RΦ.m("rt:m", [])(IΦCreateXMLModelPropertyOptions);
|
|
73
73
|
__RΦ.m("rt:f", "Ie")(IΦCreateXMLModelPropertyOptions);
|
|
74
74
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
75
75
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
76
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
76
|
+
__RΦ.m("rt:t", () => __RΦ.a(2080))(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
77
77
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
78
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
78
|
+
__RΦ.m("rt:t", () => __RΦ.a(2011))(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
79
79
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
80
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
80
|
+
__RΦ.m("rt:t", () => __RΦ.a(2055))(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
81
81
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
82
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
82
|
+
__RΦ.m("rt:t", () => __RΦ.a(2030))(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
83
83
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
84
84
|
__RΦ.m("rt:t", () => __RΦ.a(20))(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
85
85
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
@@ -126,7 +126,7 @@ exports.IΦXMLModelOptions = IΦXMLModelOptions;
|
|
|
126
126
|
__RΦ.m("rt:P", ["parent", "properties", "fromXML", "toXML", "tagname"])(IΦXMLModelOptions);
|
|
127
127
|
__RΦ.m("rt:m", [])(IΦXMLModelOptions);
|
|
128
128
|
__RΦ.m("rt:f", "Ie")(IΦXMLModelOptions);
|
|
129
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
129
|
+
__RΦ.m("rt:t", () => __RΦ.a(1749))(IΦXMLModelOptions.prototype, "parent");
|
|
130
130
|
__RΦ.m("rt:f", "P?")(IΦXMLModelOptions.prototype, "parent");
|
|
131
131
|
__RΦ.m("rt:t", () => __RΦ.a(578))(IΦXMLModelOptions.prototype, "properties");
|
|
132
132
|
__RΦ.m("rt:f", "P")(IΦXMLModelOptions.prototype, "properties");
|
|
@@ -138,15 +138,15 @@ __RΦ.m("rt:t", () => __RΦ.a(13))(IΦXMLModelOptions.prototype, "tagname");
|
|
|
138
138
|
__RΦ.m("rt:f", "P")(IΦXMLModelOptions.prototype, "tagname");
|
|
139
139
|
var IΦCreateXMLModelOptions = { name: "CreateXMLModelOptions", prototype: {}, identity: Symbol("CreateXMLModelOptions (interface)") };
|
|
140
140
|
exports.IΦCreateXMLModelOptions = IΦCreateXMLModelOptions;
|
|
141
|
-
(t => __RΦ.t[
|
|
141
|
+
(t => __RΦ.t[2268] = t)(IΦCreateXMLModelOptions);
|
|
142
142
|
__RΦ.m("rt:P", ["parent", "fromXML", "toXML", "tagname"])(IΦCreateXMLModelOptions);
|
|
143
143
|
__RΦ.m("rt:m", [])(IΦCreateXMLModelOptions);
|
|
144
144
|
__RΦ.m("rt:f", "Ie")(IΦCreateXMLModelOptions);
|
|
145
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
145
|
+
__RΦ.m("rt:t", () => __RΦ.a(2521))(IΦCreateXMLModelOptions.prototype, "parent");
|
|
146
146
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "parent");
|
|
147
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
147
|
+
__RΦ.m("rt:t", () => __RΦ.a(2288))(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
148
148
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
149
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
149
|
+
__RΦ.m("rt:t", () => __RΦ.a(2278))(IΦCreateXMLModelOptions.prototype, "toXML");
|
|
150
150
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "toXML");
|
|
151
151
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦCreateXMLModelOptions.prototype, "tagname");
|
|
152
152
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "tagname");
|
|
@@ -66,6 +66,7 @@ export const defaults = {
|
|
|
66
66
|
}));
|
|
67
67
|
return xmlInstances.map((xml) => model.fromXML(xml));
|
|
68
68
|
}
|
|
69
|
+
// FIXME: other types should be handled
|
|
69
70
|
}
|
|
70
71
|
else if (type.is("union") &&
|
|
71
72
|
type.types.length &&
|
|
@@ -91,10 +92,8 @@ export const defaults = {
|
|
|
91
92
|
// FIXME: prop.name should never be a symbol anyway
|
|
92
93
|
const _xml = properties[prop.name];
|
|
93
94
|
_xml.elements.forEach((el) => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
el.name = prop.tagname; // TODO: configurable ?
|
|
97
|
-
}
|
|
95
|
+
// overwrite tagnames
|
|
96
|
+
el.name = prop.tagname; // TODO: configurable ?
|
|
98
97
|
elements.push(el);
|
|
99
98
|
});
|
|
100
99
|
}
|
|
@@ -130,7 +129,7 @@ export const defaults = {
|
|
|
130
129
|
const model = getModel(type.class);
|
|
131
130
|
return model.toXML(value);
|
|
132
131
|
}
|
|
133
|
-
else if (type.is("array")
|
|
132
|
+
else if (type.is("array")) {
|
|
134
133
|
const elementType = type.elementType;
|
|
135
134
|
if (elementType.is("class")) {
|
|
136
135
|
const model = getModel(elementType.class);
|