dynamic-mui 2.0.0 → 2.0.2
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/LICENSE +21 -0
- package/README.md +40 -20
- package/dist/components/DynamicComponent.d.ts +0 -1
- package/dist/components/FormGenerator.d.ts +1 -2
- package/dist/components/charts/Bar/bar.d.ts +0 -1
- package/dist/components/charts/Line/line.d.ts +0 -1
- package/dist/components/charts/Mixchart/mixChart.d.ts +0 -1
- package/dist/components/charts/Pie/pie.d.ts +0 -1
- package/dist/components/controls/Accordion/accordion.d.ts +0 -1
- package/dist/components/controls/Autocomplete/autocomplete.d.ts +1 -2
- package/dist/components/controls/CheckBox/checkbox.d.ts +1 -2
- package/dist/components/controls/Chip/chip.d.ts +0 -1
- package/dist/components/controls/DataTable/datatable.d.ts +0 -1
- package/dist/components/controls/DateTime/datetime.d.ts +1 -2
- package/dist/components/controls/DateTimePicker/datetimepicker.d.ts +1 -2
- package/dist/components/controls/Divider/divider.d.ts +0 -1
- package/dist/components/controls/Group/group.d.ts +0 -1
- package/dist/components/controls/Hyperlink/hyperlink.d.ts +2 -0
- package/dist/components/controls/ImageList/imagelist.d.ts +0 -1
- package/dist/components/controls/List/list.d.ts +0 -1
- package/dist/components/controls/MultiTextbox/multitextbox.d.ts +1 -2
- package/dist/components/controls/NumberField/numberfield.d.ts +1 -2
- package/dist/components/controls/Radio/radio.d.ts +1 -2
- package/dist/components/controls/Select/select.d.ts +1 -2
- package/dist/components/controls/Signature/signature.d.ts +1 -2
- package/dist/components/controls/Stepper/stepper.d.ts +0 -1
- package/dist/components/controls/Switch/switch.d.ts +1 -2
- package/dist/components/controls/Tabs/tabs.d.ts +0 -1
- package/dist/components/controls/TextField/textfield.d.ts +0 -1
- package/dist/components/controls/TimePicker/timepicker.d.ts +1 -2
- package/dist/components/controls/Typography/typography.d.ts +0 -1
- package/dist/components/controls/index.d.ts +2 -1
- package/dist/dynamic-mui.cjs.js +1 -496
- package/dist/dynamic-mui.es.js +7 -82173
- package/dist/index-B0FG-JGp.js +465 -0
- package/dist/index-BBxdfRTC.js +1 -0
- package/dist/index-BVwk54iw.mjs +101923 -0
- package/dist/index-Cz6j-hVM.mjs +153 -0
- package/dist/loadCognitoIdentity-CjHrMl-Z.mjs +935 -0
- package/dist/loadCognitoIdentity-CpHBN3et.js +1 -0
- package/dist/playground/Canvas.d.ts +0 -1
- package/dist/playground/PropertiesEditor.d.ts +0 -1
- package/dist/playground/templates.d.ts +0 -1
- package/dist/playground/testData.d.ts +0 -1
- package/dist/test/setup.d.ts +0 -1
- package/dist/util/helper.d.ts +4 -1
- package/dist/util/s3Upload.d.ts +14 -0
- package/dist/util/useUpdateEffect.d.ts +0 -1
- package/package.json +33 -36
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { t as z, s as x } from "./index-BVwk54iw.mjs";
|
|
2
|
+
class T {
|
|
3
|
+
marshaller;
|
|
4
|
+
serializer;
|
|
5
|
+
deserializer;
|
|
6
|
+
serdeContext;
|
|
7
|
+
defaultContentType;
|
|
8
|
+
constructor({ marshaller: i, serializer: n, deserializer: o, serdeContext: c, defaultContentType: y }) {
|
|
9
|
+
this.marshaller = i, this.serializer = n, this.deserializer = o, this.serdeContext = c, this.defaultContentType = y;
|
|
10
|
+
}
|
|
11
|
+
async serializeEventStream({ eventStream: i, requestSchema: n, initialRequest: o }) {
|
|
12
|
+
const c = this.marshaller, y = n.getEventStreamMember(), p = n.getMemberSchema(y), d = this.serializer, f = this.defaultContentType, h = /* @__PURE__ */ Symbol("initialRequestMarker"), S = {
|
|
13
|
+
async *[Symbol.asyncIterator]() {
|
|
14
|
+
if (o) {
|
|
15
|
+
const r = {
|
|
16
|
+
":event-type": { type: "string", value: "initial-request" },
|
|
17
|
+
":message-type": { type: "string", value: "event" },
|
|
18
|
+
":content-type": { type: "string", value: f }
|
|
19
|
+
};
|
|
20
|
+
d.write(n, o);
|
|
21
|
+
const t = d.flush();
|
|
22
|
+
yield {
|
|
23
|
+
[h]: !0,
|
|
24
|
+
headers: r,
|
|
25
|
+
body: t
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
for await (const r of i)
|
|
29
|
+
yield r;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return c.serialize(S, (r) => {
|
|
33
|
+
if (r[h])
|
|
34
|
+
return {
|
|
35
|
+
headers: r.headers,
|
|
36
|
+
body: r.body
|
|
37
|
+
};
|
|
38
|
+
const t = Object.keys(r).find((s) => s !== "__type") ?? "", { additionalHeaders: e, body: a, eventType: l, explicitPayloadContentType: m } = this.writeEventBody(t, p, r);
|
|
39
|
+
return {
|
|
40
|
+
headers: {
|
|
41
|
+
":event-type": { type: "string", value: l },
|
|
42
|
+
":message-type": { type: "string", value: "event" },
|
|
43
|
+
":content-type": { type: "string", value: m ?? f },
|
|
44
|
+
...e
|
|
45
|
+
},
|
|
46
|
+
body: a
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
async deserializeEventStream({ response: i, responseSchema: n, initialResponseContainer: o }) {
|
|
51
|
+
const c = this.marshaller, y = n.getEventStreamMember(), d = n.getMemberSchema(y).getMemberSchemas(), f = /* @__PURE__ */ Symbol("initialResponseMarker"), h = c.deserialize(i.body, async (t) => {
|
|
52
|
+
const e = Object.keys(t).find((l) => l !== "__type") ?? "", a = t[e].body;
|
|
53
|
+
if (e === "initial-response") {
|
|
54
|
+
const l = await this.deserializer.read(n, a);
|
|
55
|
+
return delete l[y], {
|
|
56
|
+
[f]: !0,
|
|
57
|
+
...l
|
|
58
|
+
};
|
|
59
|
+
} else if (e in d) {
|
|
60
|
+
const l = d[e];
|
|
61
|
+
if (l.isStructSchema()) {
|
|
62
|
+
const m = {};
|
|
63
|
+
let u = !1;
|
|
64
|
+
for (const [s, g] of l.structIterator()) {
|
|
65
|
+
const { eventHeader: v, eventPayload: w } = g.getMergedTraits();
|
|
66
|
+
if (u = u || !!(v || w), w)
|
|
67
|
+
g.isBlobSchema() ? m[s] = a : g.isStringSchema() ? m[s] = (this.serdeContext?.utf8Encoder ?? z)(a) : g.isStructSchema() && (m[s] = await this.deserializer.read(g, a));
|
|
68
|
+
else if (v) {
|
|
69
|
+
const b = t[e].headers[s]?.value;
|
|
70
|
+
b != null && (g.isNumericSchema() ? b && typeof b == "object" && "bytes" in b ? m[s] = BigInt(b.toString()) : m[s] = Number(b) : m[s] = b);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (u)
|
|
74
|
+
return {
|
|
75
|
+
[e]: m
|
|
76
|
+
};
|
|
77
|
+
if (a.byteLength === 0)
|
|
78
|
+
return {
|
|
79
|
+
[e]: {}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
[e]: await this.deserializer.read(l, a)
|
|
84
|
+
};
|
|
85
|
+
} else
|
|
86
|
+
return {
|
|
87
|
+
$unknown: t
|
|
88
|
+
};
|
|
89
|
+
}), S = h[Symbol.asyncIterator](), r = await S.next();
|
|
90
|
+
if (r.done)
|
|
91
|
+
return h;
|
|
92
|
+
if (r.value?.[f]) {
|
|
93
|
+
if (!n)
|
|
94
|
+
throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
|
|
95
|
+
for (const [t, e] of Object.entries(r.value))
|
|
96
|
+
o[t] = e;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
async *[Symbol.asyncIterator]() {
|
|
100
|
+
for (r?.value?.[f] || (yield r.value); ; ) {
|
|
101
|
+
const { done: t, value: e } = await S.next();
|
|
102
|
+
if (t)
|
|
103
|
+
break;
|
|
104
|
+
yield e;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
writeEventBody(i, n, o) {
|
|
110
|
+
const c = this.serializer;
|
|
111
|
+
let y = i, p = null, d;
|
|
112
|
+
const f = n.getSchema()[4].includes(i), h = {};
|
|
113
|
+
if (f) {
|
|
114
|
+
const t = n.getMemberSchema(i);
|
|
115
|
+
if (t.isStructSchema()) {
|
|
116
|
+
for (const [e, a] of t.structIterator()) {
|
|
117
|
+
const { eventHeader: l, eventPayload: m } = a.getMergedTraits();
|
|
118
|
+
if (m)
|
|
119
|
+
p = e;
|
|
120
|
+
else if (l) {
|
|
121
|
+
const u = o[i][e];
|
|
122
|
+
let s = "binary";
|
|
123
|
+
a.isNumericSchema() ? (-2) ** 31 <= u && u <= 2 ** 31 - 1 ? s = "integer" : s = "long" : a.isTimestampSchema() ? s = "timestamp" : a.isStringSchema() ? s = "string" : a.isBooleanSchema() && (s = "boolean"), u != null && (h[e] = {
|
|
124
|
+
type: s,
|
|
125
|
+
value: u
|
|
126
|
+
}, delete o[i][e]);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (p !== null) {
|
|
130
|
+
const e = t.getMemberSchema(p);
|
|
131
|
+
e.isBlobSchema() ? d = "application/octet-stream" : e.isStringSchema() && (d = "text/plain"), c.write(e, o[i][p]);
|
|
132
|
+
} else
|
|
133
|
+
c.write(t, o[i]);
|
|
134
|
+
} else if (t.isUnitSchema())
|
|
135
|
+
c.write(t, {});
|
|
136
|
+
else
|
|
137
|
+
throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");
|
|
138
|
+
} else {
|
|
139
|
+
const [t, e] = o[i];
|
|
140
|
+
y = t, c.write(15, e);
|
|
141
|
+
}
|
|
142
|
+
const S = c.flush();
|
|
143
|
+
return {
|
|
144
|
+
body: typeof S == "string" ? (this.serdeContext?.utf8Decoder ?? x)(S) : S,
|
|
145
|
+
eventType: y,
|
|
146
|
+
explicitPayloadContentType: d,
|
|
147
|
+
additionalHeaders: h
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export {
|
|
152
|
+
T as EventStreamSerde
|
|
153
|
+
};
|