@mieweb/forms-renderer 0.1.7 → 0.1.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/dist/react.js +242 -247
- package/dist/react.js.map +1 -1
- package/dist/standalone.js +2698 -2712
- package/dist/standalone.js.map +1 -1
- package/dist/standalone.umd.cjs +55 -55
- package/dist/standalone.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useUIApi as
|
|
1
|
+
import C, { useMemo as br } from "react";
|
|
2
|
+
import { useUIApi as ke, useFormStore as ee, getFieldComponent as mr, useVisibleFields as yr, useFieldsArray as gr } from "@mieweb/forms-engine";
|
|
3
3
|
var q = { exports: {} }, Y = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
@@ -10,21 +10,21 @@ var q = { exports: {} }, Y = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
O !== void 0 && (
|
|
21
|
-
for (
|
|
22
|
-
if (
|
|
23
|
-
return { $$typeof:
|
|
13
|
+
var Oe;
|
|
14
|
+
function hr() {
|
|
15
|
+
if (Oe) return Y;
|
|
16
|
+
Oe = 1;
|
|
17
|
+
var o = C, s = Symbol.for("react.element"), f = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, p = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function w(x, b, O) {
|
|
19
|
+
var h, E = {}, S = null, F = null;
|
|
20
|
+
O !== void 0 && (S = "" + O), b.key !== void 0 && (S = "" + b.key), b.ref !== void 0 && (F = b.ref);
|
|
21
|
+
for (h in b) l.call(b, h) && !g.hasOwnProperty(h) && (E[h] = b[h]);
|
|
22
|
+
if (x && x.defaultProps) for (h in b = x.defaultProps, b) E[h] === void 0 && (E[h] = b[h]);
|
|
23
|
+
return { $$typeof: s, type: x, key: S, ref: F, props: E, _owner: p.current };
|
|
24
24
|
}
|
|
25
|
-
return Y.Fragment = f, Y.jsx =
|
|
25
|
+
return Y.Fragment = f, Y.jsx = w, Y.jsxs = w, Y;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
27
|
+
var N = {};
|
|
28
28
|
/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-jsx-runtime.development.js
|
|
@@ -34,18 +34,18 @@ var V = {};
|
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
var
|
|
37
|
+
var je;
|
|
38
38
|
function Rr() {
|
|
39
|
-
return
|
|
40
|
-
var
|
|
41
|
-
function
|
|
39
|
+
return je || (je = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
40
|
+
var o = C, s = Symbol.for("react.element"), f = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), w = Symbol.for("react.provider"), x = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), re = Symbol.iterator, Fe = "@@iterator";
|
|
41
|
+
function Ae(e) {
|
|
42
42
|
if (e === null || typeof e != "object")
|
|
43
43
|
return null;
|
|
44
|
-
var r =
|
|
44
|
+
var r = re && e[re] || e[Fe];
|
|
45
45
|
return typeof r == "function" ? r : null;
|
|
46
46
|
}
|
|
47
|
-
var A =
|
|
48
|
-
function
|
|
47
|
+
var A = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
+
function m(e) {
|
|
49
49
|
{
|
|
50
50
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
51
51
|
t[n - 1] = arguments[n];
|
|
@@ -56,20 +56,20 @@ function Rr() {
|
|
|
56
56
|
{
|
|
57
57
|
var n = A.ReactDebugCurrentFrame, u = n.getStackAddendum();
|
|
58
58
|
u !== "" && (r += "%s", t = t.concat([u]));
|
|
59
|
-
var
|
|
60
|
-
return String(
|
|
59
|
+
var c = t.map(function(i) {
|
|
60
|
+
return String(i);
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
var Ie = !1, $e = !1, We = !1, Ye = !1,
|
|
66
|
-
|
|
67
|
-
function
|
|
68
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
65
|
+
var Ie = !1, $e = !1, We = !1, Ye = !1, Ne = !1, te;
|
|
66
|
+
te = Symbol.for("react.module.reference");
|
|
67
|
+
function Ve(e) {
|
|
68
|
+
return !!(typeof e == "string" || typeof e == "function" || e === l || e === g || Ne || e === p || e === O || e === h || Ye || e === F || Ie || $e || We || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === E || e.$$typeof === w || e.$$typeof === x || e.$$typeof === b || // This needs to include all possible module reference object
|
|
69
69
|
// types supported by any Flight configuration anywhere since
|
|
70
70
|
// we don't know which Flight build this will end up being used
|
|
71
71
|
// with.
|
|
72
|
-
e.$$typeof ===
|
|
72
|
+
e.$$typeof === te || e.getModuleId !== void 0));
|
|
73
73
|
}
|
|
74
74
|
function Le(e, r, t) {
|
|
75
75
|
var n = e.displayName;
|
|
@@ -78,47 +78,47 @@ function Rr() {
|
|
|
78
78
|
var u = r.displayName || r.name || "";
|
|
79
79
|
return u !== "" ? t + "(" + u + ")" : t;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function ne(e) {
|
|
82
82
|
return e.displayName || "Context";
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function j(e) {
|
|
85
85
|
if (e == null)
|
|
86
86
|
return null;
|
|
87
|
-
if (typeof e.tag == "number" &&
|
|
87
|
+
if (typeof e.tag == "number" && m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
88
88
|
return e.displayName || e.name || null;
|
|
89
89
|
if (typeof e == "string")
|
|
90
90
|
return e;
|
|
91
91
|
switch (e) {
|
|
92
|
-
case
|
|
92
|
+
case l:
|
|
93
93
|
return "Fragment";
|
|
94
94
|
case f:
|
|
95
95
|
return "Portal";
|
|
96
|
-
case
|
|
96
|
+
case g:
|
|
97
97
|
return "Profiler";
|
|
98
98
|
case p:
|
|
99
99
|
return "StrictMode";
|
|
100
100
|
case O:
|
|
101
101
|
return "Suspense";
|
|
102
|
-
case
|
|
102
|
+
case h:
|
|
103
103
|
return "SuspenseList";
|
|
104
104
|
}
|
|
105
105
|
if (typeof e == "object")
|
|
106
106
|
switch (e.$$typeof) {
|
|
107
|
-
case
|
|
107
|
+
case x:
|
|
108
108
|
var r = e;
|
|
109
|
-
return
|
|
110
|
-
case
|
|
109
|
+
return ne(r) + ".Consumer";
|
|
110
|
+
case w:
|
|
111
111
|
var t = e;
|
|
112
|
-
return
|
|
112
|
+
return ne(t._context) + ".Provider";
|
|
113
113
|
case b:
|
|
114
114
|
return Le(e, e.render, "ForwardRef");
|
|
115
115
|
case E:
|
|
116
116
|
var n = e.displayName || null;
|
|
117
|
-
return n !== null ? n :
|
|
118
|
-
case
|
|
119
|
-
var u = e,
|
|
117
|
+
return n !== null ? n : j(e.type) || "Memo";
|
|
118
|
+
case S: {
|
|
119
|
+
var u = e, c = u._payload, i = u._init;
|
|
120
120
|
try {
|
|
121
|
-
return
|
|
121
|
+
return j(i(c));
|
|
122
122
|
} catch {
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
@@ -126,18 +126,18 @@ function Rr() {
|
|
|
126
126
|
}
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
var
|
|
130
|
-
function
|
|
129
|
+
var P = Object.assign, $ = 0, ae, ie, oe, ue, se, le, ce;
|
|
130
|
+
function fe() {
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
function
|
|
132
|
+
fe.__reactDisabledLog = !0;
|
|
133
|
+
function Me() {
|
|
134
134
|
{
|
|
135
135
|
if ($ === 0) {
|
|
136
|
-
|
|
136
|
+
ae = console.log, ie = console.info, oe = console.warn, ue = console.error, se = console.group, le = console.groupCollapsed, ce = console.groupEnd;
|
|
137
137
|
var e = {
|
|
138
138
|
configurable: !0,
|
|
139
139
|
enumerable: !0,
|
|
140
|
-
value:
|
|
140
|
+
value: fe,
|
|
141
141
|
writable: !0
|
|
142
142
|
};
|
|
143
143
|
Object.defineProperties(console, {
|
|
@@ -153,7 +153,7 @@ function Rr() {
|
|
|
153
153
|
$++;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function Ue() {
|
|
157
157
|
{
|
|
158
158
|
if ($--, $ === 0) {
|
|
159
159
|
var e = {
|
|
@@ -162,34 +162,34 @@ function Rr() {
|
|
|
162
162
|
writable: !0
|
|
163
163
|
};
|
|
164
164
|
Object.defineProperties(console, {
|
|
165
|
-
log:
|
|
166
|
-
value: ne
|
|
167
|
-
}),
|
|
168
|
-
info: j({}, e, {
|
|
165
|
+
log: P({}, e, {
|
|
169
166
|
value: ae
|
|
170
167
|
}),
|
|
171
|
-
|
|
168
|
+
info: P({}, e, {
|
|
172
169
|
value: ie
|
|
173
170
|
}),
|
|
174
|
-
|
|
171
|
+
warn: P({}, e, {
|
|
175
172
|
value: oe
|
|
176
173
|
}),
|
|
177
|
-
|
|
174
|
+
error: P({}, e, {
|
|
178
175
|
value: ue
|
|
179
176
|
}),
|
|
180
|
-
|
|
177
|
+
group: P({}, e, {
|
|
181
178
|
value: se
|
|
182
179
|
}),
|
|
183
|
-
|
|
180
|
+
groupCollapsed: P({}, e, {
|
|
184
181
|
value: le
|
|
182
|
+
}),
|
|
183
|
+
groupEnd: P({}, e, {
|
|
184
|
+
value: ce
|
|
185
185
|
})
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
$ < 0 &&
|
|
188
|
+
$ < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
var B = A.ReactCurrentDispatcher, J;
|
|
192
|
-
function
|
|
192
|
+
function V(e, r, t) {
|
|
193
193
|
{
|
|
194
194
|
if (J === void 0)
|
|
195
195
|
try {
|
|
@@ -207,7 +207,7 @@ function Rr() {
|
|
|
207
207
|
var qe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
208
|
L = new qe();
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function de(e, r) {
|
|
211
211
|
if (!e || K)
|
|
212
212
|
return "";
|
|
213
213
|
{
|
|
@@ -219,31 +219,31 @@ function Rr() {
|
|
|
219
219
|
K = !0;
|
|
220
220
|
var u = Error.prepareStackTrace;
|
|
221
221
|
Error.prepareStackTrace = void 0;
|
|
222
|
-
var
|
|
223
|
-
|
|
222
|
+
var c;
|
|
223
|
+
c = B.current, B.current = null, Me();
|
|
224
224
|
try {
|
|
225
225
|
if (r) {
|
|
226
|
-
var
|
|
226
|
+
var i = function() {
|
|
227
227
|
throw Error();
|
|
228
228
|
};
|
|
229
|
-
if (Object.defineProperty(
|
|
229
|
+
if (Object.defineProperty(i.prototype, "props", {
|
|
230
230
|
set: function() {
|
|
231
231
|
throw Error();
|
|
232
232
|
}
|
|
233
233
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
234
|
try {
|
|
235
|
-
Reflect.construct(
|
|
235
|
+
Reflect.construct(i, []);
|
|
236
236
|
} catch (R) {
|
|
237
237
|
n = R;
|
|
238
238
|
}
|
|
239
|
-
Reflect.construct(e, [],
|
|
239
|
+
Reflect.construct(e, [], i);
|
|
240
240
|
} else {
|
|
241
241
|
try {
|
|
242
|
-
|
|
242
|
+
i.call();
|
|
243
243
|
} catch (R) {
|
|
244
244
|
n = R;
|
|
245
245
|
}
|
|
246
|
-
e.call(
|
|
246
|
+
e.call(i.prototype);
|
|
247
247
|
}
|
|
248
248
|
} else {
|
|
249
249
|
try {
|
|
@@ -255,17 +255,17 @@ function Rr() {
|
|
|
255
255
|
}
|
|
256
256
|
} catch (R) {
|
|
257
257
|
if (R && n && typeof R.stack == "string") {
|
|
258
|
-
for (var
|
|
259
|
-
`),
|
|
260
|
-
`), d =
|
|
258
|
+
for (var a = R.stack.split(`
|
|
259
|
+
`), y = n.stack.split(`
|
|
260
|
+
`), d = a.length - 1, v = y.length - 1; d >= 1 && v >= 0 && a[d] !== y[v]; )
|
|
261
261
|
v--;
|
|
262
262
|
for (; d >= 1 && v >= 0; d--, v--)
|
|
263
|
-
if (
|
|
263
|
+
if (a[d] !== y[v]) {
|
|
264
264
|
if (d !== 1 || v !== 1)
|
|
265
265
|
do
|
|
266
|
-
if (d--, v--, v < 0 ||
|
|
266
|
+
if (d--, v--, v < 0 || a[d] !== y[v]) {
|
|
267
267
|
var _ = `
|
|
268
|
-
` +
|
|
268
|
+
` + a[d].replace(" at new ", " at ");
|
|
269
269
|
return e.displayName && _.includes("<anonymous>") && (_ = _.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, _), _;
|
|
270
270
|
}
|
|
271
271
|
while (d >= 1 && v >= 0);
|
|
@@ -273,71 +273,71 @@ function Rr() {
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
} finally {
|
|
276
|
-
K = !1, B.current =
|
|
276
|
+
K = !1, B.current = c, Ue(), Error.prepareStackTrace = u;
|
|
277
277
|
}
|
|
278
|
-
var
|
|
279
|
-
return typeof e == "function" && L.set(e,
|
|
278
|
+
var I = e ? e.displayName || e.name : "", k = I ? V(I) : "";
|
|
279
|
+
return typeof e == "function" && L.set(e, k), k;
|
|
280
280
|
}
|
|
281
281
|
function Be(e, r, t) {
|
|
282
|
-
return
|
|
282
|
+
return de(e, !1);
|
|
283
283
|
}
|
|
284
284
|
function Je(e) {
|
|
285
285
|
var r = e.prototype;
|
|
286
286
|
return !!(r && r.isReactComponent);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function M(e, r, t) {
|
|
289
289
|
if (e == null)
|
|
290
290
|
return "";
|
|
291
291
|
if (typeof e == "function")
|
|
292
|
-
return
|
|
292
|
+
return de(e, Je(e));
|
|
293
293
|
if (typeof e == "string")
|
|
294
|
-
return
|
|
294
|
+
return V(e);
|
|
295
295
|
switch (e) {
|
|
296
296
|
case O:
|
|
297
|
-
return
|
|
298
|
-
case
|
|
299
|
-
return
|
|
297
|
+
return V("Suspense");
|
|
298
|
+
case h:
|
|
299
|
+
return V("SuspenseList");
|
|
300
300
|
}
|
|
301
301
|
if (typeof e == "object")
|
|
302
302
|
switch (e.$$typeof) {
|
|
303
303
|
case b:
|
|
304
304
|
return Be(e.render);
|
|
305
305
|
case E:
|
|
306
|
-
return
|
|
307
|
-
case
|
|
308
|
-
var n = e, u = n._payload,
|
|
306
|
+
return M(e.type, r, t);
|
|
307
|
+
case S: {
|
|
308
|
+
var n = e, u = n._payload, c = n._init;
|
|
309
309
|
try {
|
|
310
|
-
return
|
|
310
|
+
return M(c(u), r, t);
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
return "";
|
|
316
316
|
}
|
|
317
|
-
var W = Object.prototype.hasOwnProperty,
|
|
318
|
-
function
|
|
317
|
+
var W = Object.prototype.hasOwnProperty, ve = {}, pe = A.ReactDebugCurrentFrame;
|
|
318
|
+
function U(e) {
|
|
319
319
|
if (e) {
|
|
320
|
-
var r = e._owner, t =
|
|
321
|
-
|
|
320
|
+
var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
|
|
321
|
+
pe.setExtraStackFrame(t);
|
|
322
322
|
} else
|
|
323
|
-
|
|
323
|
+
pe.setExtraStackFrame(null);
|
|
324
324
|
}
|
|
325
325
|
function Ke(e, r, t, n, u) {
|
|
326
326
|
{
|
|
327
|
-
var
|
|
328
|
-
for (var
|
|
329
|
-
if (
|
|
330
|
-
var
|
|
327
|
+
var c = Function.call.bind(W);
|
|
328
|
+
for (var i in e)
|
|
329
|
+
if (c(e, i)) {
|
|
330
|
+
var a = void 0;
|
|
331
331
|
try {
|
|
332
|
-
if (typeof e[
|
|
333
|
-
var
|
|
334
|
-
throw
|
|
332
|
+
if (typeof e[i] != "function") {
|
|
333
|
+
var y = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
|
+
throw y.name = "Invariant Violation", y;
|
|
335
335
|
}
|
|
336
|
-
|
|
336
|
+
a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
337
|
} catch (d) {
|
|
338
|
-
|
|
338
|
+
a = d;
|
|
339
339
|
}
|
|
340
|
-
|
|
340
|
+
a && !(a instanceof Error) && (U(u), m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), U(null)), a instanceof Error && !(a.message in ve) && (ve[a.message] = !0, U(u), m("Failed %s type: %s", t, a.message), U(null));
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
@@ -353,17 +353,17 @@ function Rr() {
|
|
|
353
353
|
}
|
|
354
354
|
function Qe(e) {
|
|
355
355
|
try {
|
|
356
|
-
return
|
|
356
|
+
return be(e), !1;
|
|
357
357
|
} catch {
|
|
358
358
|
return !0;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function be(e) {
|
|
362
362
|
return "" + e;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function me(e) {
|
|
365
365
|
if (Qe(e))
|
|
366
|
-
return
|
|
366
|
+
return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), be(e);
|
|
367
367
|
}
|
|
368
368
|
var ye = A.ReactCurrentOwner, Xe = {
|
|
369
369
|
key: !0,
|
|
@@ -393,7 +393,7 @@ function Rr() {
|
|
|
393
393
|
function rr(e, r) {
|
|
394
394
|
{
|
|
395
395
|
var t = function() {
|
|
396
|
-
ge || (ge = !0,
|
|
396
|
+
ge || (ge = !0, m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
397
397
|
};
|
|
398
398
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
399
399
|
get: t,
|
|
@@ -404,7 +404,7 @@ function Rr() {
|
|
|
404
404
|
function tr(e, r) {
|
|
405
405
|
{
|
|
406
406
|
var t = function() {
|
|
407
|
-
he || (he = !0,
|
|
407
|
+
he || (he = !0, m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
408
408
|
};
|
|
409
409
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
410
410
|
get: t,
|
|
@@ -412,70 +412,70 @@ function Rr() {
|
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var nr = function(e, r, t, n, u,
|
|
416
|
-
var
|
|
415
|
+
var nr = function(e, r, t, n, u, c, i) {
|
|
416
|
+
var a = {
|
|
417
417
|
// This tag allows us to uniquely identify this as a React Element
|
|
418
|
-
$$typeof:
|
|
418
|
+
$$typeof: s,
|
|
419
419
|
// Built-in properties that belong on the element
|
|
420
420
|
type: e,
|
|
421
421
|
key: r,
|
|
422
422
|
ref: t,
|
|
423
|
-
props:
|
|
423
|
+
props: i,
|
|
424
424
|
// Record the component responsible for creating this element.
|
|
425
|
-
_owner:
|
|
425
|
+
_owner: c
|
|
426
426
|
};
|
|
427
|
-
return
|
|
427
|
+
return a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
428
428
|
configurable: !1,
|
|
429
429
|
enumerable: !1,
|
|
430
430
|
writable: !0,
|
|
431
431
|
value: !1
|
|
432
|
-
}), Object.defineProperty(
|
|
432
|
+
}), Object.defineProperty(a, "_self", {
|
|
433
433
|
configurable: !1,
|
|
434
434
|
enumerable: !1,
|
|
435
435
|
writable: !1,
|
|
436
436
|
value: n
|
|
437
|
-
}), Object.defineProperty(
|
|
437
|
+
}), Object.defineProperty(a, "_source", {
|
|
438
438
|
configurable: !1,
|
|
439
439
|
enumerable: !1,
|
|
440
440
|
writable: !1,
|
|
441
441
|
value: u
|
|
442
|
-
}), Object.freeze && (Object.freeze(
|
|
442
|
+
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
443
443
|
};
|
|
444
444
|
function ar(e, r, t, n, u) {
|
|
445
445
|
{
|
|
446
|
-
var
|
|
447
|
-
t !== void 0 && (
|
|
448
|
-
for (
|
|
449
|
-
W.call(r,
|
|
446
|
+
var c, i = {}, a = null, y = null;
|
|
447
|
+
t !== void 0 && (me(t), a = "" + t), Ze(r) && (me(r.key), a = "" + r.key), He(r) && (y = r.ref, er(r, u));
|
|
448
|
+
for (c in r)
|
|
449
|
+
W.call(r, c) && !Xe.hasOwnProperty(c) && (i[c] = r[c]);
|
|
450
450
|
if (e && e.defaultProps) {
|
|
451
451
|
var d = e.defaultProps;
|
|
452
|
-
for (
|
|
453
|
-
|
|
452
|
+
for (c in d)
|
|
453
|
+
i[c] === void 0 && (i[c] = d[c]);
|
|
454
454
|
}
|
|
455
|
-
if (
|
|
455
|
+
if (a || y) {
|
|
456
456
|
var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
457
|
-
|
|
457
|
+
a && rr(i, v), y && tr(i, v);
|
|
458
458
|
}
|
|
459
|
-
return nr(e,
|
|
459
|
+
return nr(e, a, y, u, n, ye.current, i);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
var G = A.ReactCurrentOwner,
|
|
463
|
-
function
|
|
462
|
+
var G = A.ReactCurrentOwner, Re = A.ReactDebugCurrentFrame;
|
|
463
|
+
function D(e) {
|
|
464
464
|
if (e) {
|
|
465
|
-
var r = e._owner, t =
|
|
466
|
-
|
|
465
|
+
var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
|
|
466
|
+
Re.setExtraStackFrame(t);
|
|
467
467
|
} else
|
|
468
|
-
|
|
468
|
+
Re.setExtraStackFrame(null);
|
|
469
469
|
}
|
|
470
470
|
var Q;
|
|
471
471
|
Q = !1;
|
|
472
472
|
function X(e) {
|
|
473
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
473
|
+
return typeof e == "object" && e !== null && e.$$typeof === s;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Ee() {
|
|
476
476
|
{
|
|
477
477
|
if (G.current) {
|
|
478
|
-
var e =
|
|
478
|
+
var e = j(G.current.type);
|
|
479
479
|
if (e)
|
|
480
480
|
return `
|
|
481
481
|
|
|
@@ -487,10 +487,10 @@ Check the render method of \`` + e + "`.";
|
|
|
487
487
|
function ir(e) {
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
490
|
-
var
|
|
490
|
+
var _e = {};
|
|
491
491
|
function or(e) {
|
|
492
492
|
{
|
|
493
|
-
var r =
|
|
493
|
+
var r = Ee();
|
|
494
494
|
if (!r) {
|
|
495
495
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
496
496
|
t && (r = `
|
|
@@ -500,35 +500,35 @@ Check the top-level render call using <` + t + ">.");
|
|
|
500
500
|
return r;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Te(e, r) {
|
|
504
504
|
{
|
|
505
505
|
if (!e._store || e._store.validated || e.key != null)
|
|
506
506
|
return;
|
|
507
507
|
e._store.validated = !0;
|
|
508
508
|
var t = or(r);
|
|
509
|
-
if (
|
|
509
|
+
if (_e[t])
|
|
510
510
|
return;
|
|
511
|
-
|
|
511
|
+
_e[t] = !0;
|
|
512
512
|
var n = "";
|
|
513
|
-
e && e._owner && e._owner !== G.current && (n = " It was passed a child from " +
|
|
513
|
+
e && e._owner && e._owner !== G.current && (n = " It was passed a child from " + j(e._owner.type) + "."), D(e), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), D(null);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function we(e, r) {
|
|
517
517
|
{
|
|
518
518
|
if (typeof e != "object")
|
|
519
519
|
return;
|
|
520
520
|
if (z(e))
|
|
521
521
|
for (var t = 0; t < e.length; t++) {
|
|
522
522
|
var n = e[t];
|
|
523
|
-
X(n) &&
|
|
523
|
+
X(n) && Te(n, r);
|
|
524
524
|
}
|
|
525
525
|
else if (X(e))
|
|
526
526
|
e._store && (e._store.validated = !0);
|
|
527
527
|
else if (e) {
|
|
528
|
-
var u =
|
|
528
|
+
var u = Ae(e);
|
|
529
529
|
if (typeof u == "function" && u !== e.entries)
|
|
530
|
-
for (var
|
|
531
|
-
X(
|
|
530
|
+
for (var c = u.call(e), i; !(i = c.next()).done; )
|
|
531
|
+
X(i.value) && Te(i.value, r);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
}
|
|
@@ -547,14 +547,14 @@ Check the top-level render call using <` + t + ">.");
|
|
|
547
547
|
else
|
|
548
548
|
return;
|
|
549
549
|
if (t) {
|
|
550
|
-
var n =
|
|
550
|
+
var n = j(r);
|
|
551
551
|
Ke(t, e.props, "prop", n, e);
|
|
552
552
|
} else if (r.PropTypes !== void 0 && !Q) {
|
|
553
553
|
Q = !0;
|
|
554
|
-
var u =
|
|
555
|
-
|
|
554
|
+
var u = j(r);
|
|
555
|
+
m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
556
556
|
}
|
|
557
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
557
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
function sr(e) {
|
|
@@ -562,56 +562,56 @@ Check the top-level render call using <` + t + ">.");
|
|
|
562
562
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
563
563
|
var n = r[t];
|
|
564
564
|
if (n !== "children" && n !== "key") {
|
|
565
|
-
|
|
565
|
+
D(e), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), D(null);
|
|
566
566
|
break;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
e.ref !== null && (
|
|
569
|
+
e.ref !== null && (D(e), m("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
var
|
|
573
|
-
function Se(e, r, t, n, u,
|
|
572
|
+
var xe = {};
|
|
573
|
+
function Se(e, r, t, n, u, c) {
|
|
574
574
|
{
|
|
575
|
-
var
|
|
576
|
-
if (!
|
|
577
|
-
var
|
|
578
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
579
|
-
var
|
|
580
|
-
|
|
575
|
+
var i = Ve(e);
|
|
576
|
+
if (!i) {
|
|
577
|
+
var a = "";
|
|
578
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
+
var y = ir();
|
|
580
|
+
y ? a += y : a += Ee();
|
|
581
581
|
var d;
|
|
582
|
-
e === null ? d = "null" : z(e) ? d = "array" : e !== void 0 && e.$$typeof ===
|
|
582
|
+
e === null ? d = "null" : z(e) ? d = "array" : e !== void 0 && e.$$typeof === s ? (d = "<" + (j(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, a);
|
|
583
583
|
}
|
|
584
|
-
var v = ar(e, r, t, u,
|
|
584
|
+
var v = ar(e, r, t, u, c);
|
|
585
585
|
if (v == null)
|
|
586
586
|
return v;
|
|
587
|
-
if (
|
|
587
|
+
if (i) {
|
|
588
588
|
var _ = r.children;
|
|
589
589
|
if (_ !== void 0)
|
|
590
590
|
if (n)
|
|
591
591
|
if (z(_)) {
|
|
592
|
-
for (var
|
|
593
|
-
|
|
592
|
+
for (var I = 0; I < _.length; I++)
|
|
593
|
+
we(_[I], e);
|
|
594
594
|
Object.freeze && Object.freeze(_);
|
|
595
595
|
} else
|
|
596
|
-
|
|
596
|
+
m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
597
|
else
|
|
598
|
-
|
|
598
|
+
we(_, e);
|
|
599
599
|
}
|
|
600
600
|
if (W.call(r, "key")) {
|
|
601
|
-
var
|
|
601
|
+
var k = j(e), R = Object.keys(r).filter(function(pr) {
|
|
602
602
|
return pr !== "key";
|
|
603
603
|
}), H = R.length > 0 ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
-
if (!
|
|
604
|
+
if (!xe[k + H]) {
|
|
605
605
|
var vr = R.length > 0 ? "{" + R.join(": ..., ") + ": ...}" : "{}";
|
|
606
|
-
|
|
606
|
+
m(`A props object containing a "key" prop is being spread into JSX:
|
|
607
607
|
let props = %s;
|
|
608
608
|
<%s {...props} />
|
|
609
609
|
React keys must be passed directly to JSX without using spread:
|
|
610
610
|
let props = %s;
|
|
611
|
-
<%s key={someKey} {...props} />`, H,
|
|
611
|
+
<%s key={someKey} {...props} />`, H, k, vr, k), xe[k + H] = !0;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
return e ===
|
|
614
|
+
return e === l ? sr(v) : ur(v), v;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
function lr(e, r, t) {
|
|
@@ -621,94 +621,89 @@ React keys must be passed directly to JSX without using spread:
|
|
|
621
621
|
return Se(e, r, t, !1);
|
|
622
622
|
}
|
|
623
623
|
var fr = cr, dr = lr;
|
|
624
|
-
|
|
625
|
-
})()),
|
|
624
|
+
N.Fragment = l, N.jsx = fr, N.jsxs = dr;
|
|
625
|
+
})()), N;
|
|
626
626
|
}
|
|
627
|
-
var
|
|
627
|
+
var Ce;
|
|
628
628
|
function Er() {
|
|
629
|
-
return
|
|
629
|
+
return Ce || (Ce = 1, process.env.NODE_ENV === "production" ? q.exports = hr() : q.exports = Rr()), q.exports;
|
|
630
630
|
}
|
|
631
|
-
var
|
|
632
|
-
function _r(
|
|
633
|
-
const
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
}, [
|
|
631
|
+
var T = Er();
|
|
632
|
+
function _r(o) {
|
|
633
|
+
const s = C.useRef(!1), f = ke();
|
|
634
|
+
C.useEffect(() => {
|
|
635
|
+
s.current || !Array.isArray(o) || (ee.getState().replaceAll(o), f.preview.set(!0), s.current = !0);
|
|
636
|
+
}, [o, f.preview]);
|
|
637
637
|
}
|
|
638
|
-
function
|
|
639
|
-
switch (
|
|
638
|
+
function Pe(o) {
|
|
639
|
+
switch (o.fieldType) {
|
|
640
640
|
case "input":
|
|
641
|
-
return
|
|
641
|
+
return o.answer ? [{ valueString: String(o.answer) }] : [];
|
|
642
642
|
case "radio":
|
|
643
|
-
return
|
|
643
|
+
return o.selected ? [{ valueString: Z(o, o.selected) }] : [];
|
|
644
644
|
case "check":
|
|
645
|
-
return (
|
|
645
|
+
return (o.selected || []).map((s) => ({ valueString: Z(o, s) }));
|
|
646
646
|
case "selection":
|
|
647
|
-
return
|
|
647
|
+
return o.selected ? [{ valueString: Z(o, o.selected) }] : [];
|
|
648
648
|
default:
|
|
649
649
|
return [];
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
function Z(
|
|
653
|
-
const f = (
|
|
652
|
+
function Z(o, s) {
|
|
653
|
+
const f = (o.options || []).find((l) => l.id === s || l.value === s);
|
|
654
654
|
return f ? f.value : "";
|
|
655
655
|
}
|
|
656
|
-
function Tr(
|
|
657
|
-
const
|
|
658
|
-
return (
|
|
656
|
+
function Tr(o, s, f) {
|
|
657
|
+
const l = [];
|
|
658
|
+
return (o || []).forEach((p) => {
|
|
659
659
|
if (p.fieldType === "section" && Array.isArray(p.fields)) {
|
|
660
|
-
p.fields.forEach((
|
|
661
|
-
|
|
662
|
-
linkId:
|
|
663
|
-
text:
|
|
664
|
-
answer:
|
|
660
|
+
p.fields.forEach((g) => {
|
|
661
|
+
g && l.push({
|
|
662
|
+
linkId: g.id,
|
|
663
|
+
text: g.question || g.title || "",
|
|
664
|
+
answer: Pe(g)
|
|
665
665
|
});
|
|
666
666
|
});
|
|
667
667
|
return;
|
|
668
668
|
}
|
|
669
|
-
p.fieldType !== "section" &&
|
|
669
|
+
p.fieldType !== "section" && l.push({
|
|
670
670
|
linkId: p.id,
|
|
671
671
|
text: p.question || p.title || "",
|
|
672
|
-
answer:
|
|
672
|
+
answer: Pe(p)
|
|
673
673
|
});
|
|
674
674
|
}), {
|
|
675
675
|
resourceType: "QuestionnaireResponse",
|
|
676
|
-
questionnaire:
|
|
676
|
+
questionnaire: s,
|
|
677
677
|
status: "in-progress",
|
|
678
678
|
subject: f ? { reference: `Patient/${f}` } : void 0,
|
|
679
|
-
item:
|
|
679
|
+
item: l
|
|
680
680
|
};
|
|
681
681
|
}
|
|
682
|
-
function wr(
|
|
683
|
-
return
|
|
684
|
-
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
}, [
|
|
688
|
-
}
|
|
689
|
-
function Sr({ field: a, allFlat: c, isPreview: f }) {
|
|
690
|
-
const s = br(a.fieldType);
|
|
691
|
-
if (!s) return null;
|
|
692
|
-
if (a.fieldType === "section" && f && Array.isArray(a.fields)) {
|
|
693
|
-
const p = a.fields.filter((T) => yr(T, c)), y = { ...a, fields: p };
|
|
694
|
-
return /* @__PURE__ */ w.jsx(s, { field: y });
|
|
695
|
-
}
|
|
696
|
-
return /* @__PURE__ */ w.jsx(s, { field: a });
|
|
682
|
+
function wr(o, s, f, l) {
|
|
683
|
+
return C.useCallback((g) => {
|
|
684
|
+
g.preventDefault();
|
|
685
|
+
const w = Tr(o, s, f);
|
|
686
|
+
l == null || l(w);
|
|
687
|
+
}, [o, s, f, l]);
|
|
697
688
|
}
|
|
698
|
-
|
|
699
|
-
const
|
|
700
|
-
|
|
701
|
-
|
|
689
|
+
const xr = C.memo(function({ id: s }) {
|
|
690
|
+
const f = ee(C.useCallback((p) => p.byId[s], [s]));
|
|
691
|
+
if (!f) return null;
|
|
692
|
+
const l = mr(f.fieldType);
|
|
693
|
+
return l ? /* @__PURE__ */ T.jsx("div", { className: "mb-1.5", "data-field-type": f.fieldType, "data-field-id": f.id, children: /* @__PURE__ */ T.jsx(l, { field: f }) }) : null;
|
|
694
|
+
});
|
|
695
|
+
function Sr() {
|
|
696
|
+
const o = ke(), { fields: s } = yr(o.state.isPreview), f = br(() => s.map((l) => l.id), [s]);
|
|
697
|
+
return /* @__PURE__ */ T.jsx("div", { children: f.map((l) => /* @__PURE__ */ T.jsx(
|
|
698
|
+
xr,
|
|
702
699
|
{
|
|
703
|
-
|
|
704
|
-
allFlat: f,
|
|
705
|
-
isPreview: a.state.isPreview
|
|
700
|
+
id: l
|
|
706
701
|
},
|
|
707
|
-
|
|
702
|
+
l
|
|
708
703
|
)) });
|
|
709
704
|
}
|
|
710
|
-
function Or({ className:
|
|
711
|
-
return /* @__PURE__ */
|
|
705
|
+
function Or({ className: o = "" }) {
|
|
706
|
+
return /* @__PURE__ */ T.jsx("div", { className: `pt-2 ${o}`, children: /* @__PURE__ */ T.jsx(
|
|
712
707
|
"button",
|
|
713
708
|
{
|
|
714
709
|
type: "submit",
|
|
@@ -717,32 +712,32 @@ function Or({ className: a = "" }) {
|
|
|
717
712
|
}
|
|
718
713
|
) });
|
|
719
714
|
}
|
|
720
|
-
function
|
|
721
|
-
fields:
|
|
722
|
-
onChange:
|
|
715
|
+
function Pr({
|
|
716
|
+
fields: o,
|
|
717
|
+
onChange: s,
|
|
723
718
|
onSubmit: f,
|
|
724
|
-
questionnaireId:
|
|
719
|
+
questionnaireId: l = "questionnaire-1",
|
|
725
720
|
subjectId: p,
|
|
726
|
-
className:
|
|
727
|
-
fullHeight:
|
|
721
|
+
className: g = "",
|
|
722
|
+
fullHeight: w = !1
|
|
728
723
|
}) {
|
|
729
|
-
_r(
|
|
730
|
-
const
|
|
731
|
-
|
|
732
|
-
}) : void 0, [
|
|
733
|
-
const
|
|
724
|
+
_r(o), C.useEffect(() => s ? ee.subscribe((E) => {
|
|
725
|
+
const S = E.order.map((F) => E.byId[F]);
|
|
726
|
+
s(S);
|
|
727
|
+
}) : void 0, [s]);
|
|
728
|
+
const x = gr(), b = wr(x, l, p, f), O = [
|
|
734
729
|
"qb-render-root",
|
|
735
730
|
"bg-gray-100",
|
|
736
731
|
"font-titillium",
|
|
737
|
-
|
|
738
|
-
|
|
732
|
+
w ? "min-h-screen" : "",
|
|
733
|
+
g
|
|
739
734
|
].filter(Boolean).join(" ");
|
|
740
|
-
return /* @__PURE__ */
|
|
741
|
-
/* @__PURE__ */
|
|
742
|
-
/* @__PURE__ */
|
|
735
|
+
return /* @__PURE__ */ T.jsx("div", { className: O, children: /* @__PURE__ */ T.jsxs("form", { onSubmit: b, className: "max-w-4xl mx-auto px-2 pb-8 pt-4", children: [
|
|
736
|
+
/* @__PURE__ */ T.jsx(Sr, {}),
|
|
737
|
+
/* @__PURE__ */ T.jsx(Or, {})
|
|
743
738
|
] }) });
|
|
744
739
|
}
|
|
745
740
|
export {
|
|
746
|
-
|
|
741
|
+
Pr as QuestionnaireRenderer
|
|
747
742
|
};
|
|
748
743
|
//# sourceMappingURL=react.js.map
|