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