@mieweb/forms-renderer 0.1.9 → 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 +58 -36
- 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 +330 -262
- package/dist/react.js.map +1 -1
- package/dist/standalone.js +9327 -8915
- package/dist/standalone.js.map +1 -1
- package/dist/standalone.umd.cjs +77 -78
- package/dist/standalone.umd.cjs.map +1 -1
- package/package.json +52 -48
- 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
|
|
@@ -10,19 +11,19 @@ var B = { exports: {} }, W = {};
|
|
|
10
11
|
* This source code is licensed under the MIT license found in the
|
|
11
12
|
* LICENSE file in the root directory of this source tree.
|
|
12
13
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
var y,
|
|
20
|
-
|
|
21
|
-
for (y in
|
|
22
|
-
if (
|
|
23
|
-
return { $$typeof: f, type:
|
|
14
|
+
var Oe;
|
|
15
|
+
function Rr() {
|
|
16
|
+
if (Oe) return W;
|
|
17
|
+
Oe = 1;
|
|
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 W.Fragment =
|
|
26
|
+
return W.Fragment = c, W.jsx = w, W.jsxs = w, W;
|
|
26
27
|
}
|
|
27
28
|
var Y = {};
|
|
28
29
|
/**
|
|
@@ -34,91 +35,91 @@ var Y = {};
|
|
|
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
|
|
41
|
-
function
|
|
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";
|
|
42
|
+
function Ae(e) {
|
|
42
43
|
if (e === null || typeof e != "object")
|
|
43
44
|
return null;
|
|
44
|
-
var r =
|
|
45
|
+
var r = re && e[re] || e[ke];
|
|
45
46
|
return typeof r == "function" ? r : null;
|
|
46
47
|
}
|
|
47
|
-
var k =
|
|
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];
|
|
52
|
-
|
|
53
|
+
De("error", e, t);
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function De(e, r, t) {
|
|
56
57
|
{
|
|
57
58
|
var n = k.ReactDebugCurrentFrame, o = n.getStackAddendum();
|
|
58
59
|
o !== "" && (r += "%s", t = t.concat([o]));
|
|
59
|
-
var
|
|
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
|
|
66
|
-
|
|
67
|
-
function
|
|
68
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
66
|
+
var Ie = !1, $e = !1, We = !1, Ye = !1, Me = !1, te;
|
|
67
|
+
te = Symbol.for("react.module.reference");
|
|
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
|
-
e.$$typeof ===
|
|
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
79
|
var o = r.displayName || r.name || "";
|
|
79
80
|
return o !== "" ? t + "(" + o + ")" : t;
|
|
80
81
|
}
|
|
81
|
-
function
|
|
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 v:
|
|
93
|
-
return "Fragment";
|
|
94
93
|
case d:
|
|
94
|
+
return "Fragment";
|
|
95
|
+
case c:
|
|
95
96
|
return "Portal";
|
|
96
|
-
case
|
|
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
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
|
-
return
|
|
110
|
-
case
|
|
110
|
+
return ne(r) + ".Consumer";
|
|
111
|
+
case w:
|
|
111
112
|
var t = e;
|
|
112
|
-
return
|
|
113
|
-
case
|
|
114
|
-
return
|
|
115
|
-
case
|
|
113
|
+
return ne(t._context) + ".Provider";
|
|
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 o = e,
|
|
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 yr() {
|
|
|
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
136
|
if (I === 0) {
|
|
136
|
-
|
|
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,
|
|
@@ -153,7 +154,7 @@ function yr() {
|
|
|
153
154
|
I++;
|
|
154
155
|
}
|
|
155
156
|
}
|
|
156
|
-
function
|
|
157
|
+
function Ne() {
|
|
157
158
|
{
|
|
158
159
|
if (I--, I === 0) {
|
|
159
160
|
var e = {
|
|
@@ -162,56 +163,56 @@ function yr() {
|
|
|
162
163
|
writable: !0
|
|
163
164
|
};
|
|
164
165
|
Object.defineProperties(console, {
|
|
165
|
-
log:
|
|
166
|
-
value: ne
|
|
167
|
-
}),
|
|
168
|
-
info: S({}, e, {
|
|
166
|
+
log: C({}, e, {
|
|
169
167
|
value: ae
|
|
170
168
|
}),
|
|
171
|
-
|
|
169
|
+
info: C({}, e, {
|
|
172
170
|
value: ie
|
|
173
171
|
}),
|
|
174
|
-
|
|
172
|
+
warn: C({}, e, {
|
|
175
173
|
value: oe
|
|
176
174
|
}),
|
|
177
|
-
|
|
178
|
-
value: ue
|
|
179
|
-
}),
|
|
180
|
-
groupCollapsed: S({}, e, {
|
|
175
|
+
error: C({}, e, {
|
|
181
176
|
value: se
|
|
182
177
|
}),
|
|
183
|
-
|
|
178
|
+
group: C({}, e, {
|
|
179
|
+
value: ue
|
|
180
|
+
}),
|
|
181
|
+
groupCollapsed: C({}, e, {
|
|
184
182
|
value: le
|
|
183
|
+
}),
|
|
184
|
+
groupEnd: C({}, e, {
|
|
185
|
+
value: ce
|
|
185
186
|
})
|
|
186
187
|
});
|
|
187
188
|
}
|
|
188
|
-
I < 0 &&
|
|
189
|
+
I < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
190
|
}
|
|
190
191
|
}
|
|
191
|
-
var
|
|
192
|
-
function
|
|
192
|
+
var B = k.ReactCurrentDispatcher, J;
|
|
193
|
+
function U(e, r, t) {
|
|
193
194
|
{
|
|
194
|
-
if (
|
|
195
|
+
if (J === void 0)
|
|
195
196
|
try {
|
|
196
197
|
throw Error();
|
|
197
198
|
} catch (o) {
|
|
198
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
|
-
var
|
|
208
|
-
|
|
208
|
+
var qe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
209
|
+
V = new qe();
|
|
209
210
|
}
|
|
210
|
-
function
|
|
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
|
}
|
|
@@ -219,8 +220,8 @@ function yr() {
|
|
|
219
220
|
K = !0;
|
|
220
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,144 +234,144 @@ function yr() {
|
|
|
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,
|
|
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
|
-
function
|
|
282
|
-
return
|
|
282
|
+
function Be(e, r, t) {
|
|
283
|
+
return de(e, !1);
|
|
283
284
|
}
|
|
284
|
-
function
|
|
285
|
+
function Je(e) {
|
|
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
|
-
return
|
|
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
|
|
297
|
+
case _:
|
|
298
|
+
return U("Suspense");
|
|
298
299
|
case y:
|
|
299
|
-
return
|
|
300
|
+
return U("SuspenseList");
|
|
300
301
|
}
|
|
301
302
|
if (typeof e == "object")
|
|
302
303
|
switch (e.$$typeof) {
|
|
303
|
-
case
|
|
304
|
-
return
|
|
305
|
-
case
|
|
306
|
-
return
|
|
307
|
-
case
|
|
308
|
-
var n = e, o = n._payload,
|
|
304
|
+
case v:
|
|
305
|
+
return Be(e.render);
|
|
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 $ = Object.prototype.hasOwnProperty,
|
|
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
|
-
|
|
321
|
+
var r = e._owner, t = L(e.type, e._source, r ? r.type : null);
|
|
322
|
+
pe.setExtraStackFrame(t);
|
|
322
323
|
} else
|
|
323
|
-
|
|
324
|
+
pe.setExtraStackFrame(null);
|
|
324
325
|
}
|
|
325
|
-
function
|
|
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
|
-
function
|
|
365
|
-
if (
|
|
366
|
-
return
|
|
365
|
+
function me(e) {
|
|
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
|
-
}, ye,
|
|
374
|
+
}, ye, be;
|
|
374
375
|
function Xe(e) {
|
|
375
376
|
if ($.call(e, "ref")) {
|
|
376
377
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
@@ -379,7 +380,7 @@ function yr() {
|
|
|
379
380
|
}
|
|
380
381
|
return e.ref !== void 0;
|
|
381
382
|
}
|
|
382
|
-
function
|
|
383
|
+
function Ze(e) {
|
|
383
384
|
if ($.call(e, "key")) {
|
|
384
385
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
385
386
|
if (r && r.isReactWarning)
|
|
@@ -387,13 +388,13 @@ function yr() {
|
|
|
387
388
|
}
|
|
388
389
|
return e.key !== void 0;
|
|
389
390
|
}
|
|
390
|
-
function
|
|
391
|
-
typeof e.ref == "string" &&
|
|
391
|
+
function er(e, r) {
|
|
392
|
+
typeof e.ref == "string" && he.current;
|
|
392
393
|
}
|
|
393
|
-
function
|
|
394
|
+
function rr(e, r) {
|
|
394
395
|
{
|
|
395
396
|
var t = function() {
|
|
396
|
-
ye || (ye = !0,
|
|
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,
|
|
@@ -401,10 +402,10 @@ function yr() {
|
|
|
401
402
|
});
|
|
402
403
|
}
|
|
403
404
|
}
|
|
404
|
-
function
|
|
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,7 +413,7 @@ function yr() {
|
|
|
412
413
|
});
|
|
413
414
|
}
|
|
414
415
|
}
|
|
415
|
-
var
|
|
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
419
|
$$typeof: f,
|
|
@@ -422,7 +423,7 @@ function yr() {
|
|
|
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,
|
|
@@ -441,41 +442,41 @@ function yr() {
|
|
|
441
442
|
value: o
|
|
442
443
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
443
444
|
};
|
|
444
|
-
function
|
|
445
|
+
function ar(e, r, t, n, o) {
|
|
445
446
|
{
|
|
446
|
-
var
|
|
447
|
-
t !== void 0 && (
|
|
448
|
-
for (
|
|
449
|
-
$.call(r,
|
|
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 &&
|
|
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
|
|
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
|
|
471
|
+
var H;
|
|
472
|
+
H = !1;
|
|
473
|
+
function Q(e) {
|
|
473
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
|
|
|
@@ -484,11 +485,11 @@ Check the render method of \`` + e + "`.";
|
|
|
484
485
|
return "";
|
|
485
486
|
}
|
|
486
487
|
}
|
|
487
|
-
function
|
|
488
|
+
function ir(e) {
|
|
488
489
|
return "";
|
|
489
490
|
}
|
|
490
|
-
var
|
|
491
|
-
function
|
|
491
|
+
var _e = {};
|
|
492
|
+
function or(e) {
|
|
492
493
|
{
|
|
493
494
|
var r = Ee();
|
|
494
495
|
if (!r) {
|
|
@@ -500,39 +501,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
500
501
|
return r;
|
|
501
502
|
}
|
|
502
503
|
}
|
|
503
|
-
function
|
|
504
|
+
function Te(e, r) {
|
|
504
505
|
{
|
|
505
506
|
if (!e._store || e._store.validated || e.key != null)
|
|
506
507
|
return;
|
|
507
508
|
e._store.validated = !0;
|
|
508
|
-
var t =
|
|
509
|
-
if (
|
|
509
|
+
var t = or(r);
|
|
510
|
+
if (_e[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
|
-
function
|
|
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 o =
|
|
529
|
+
var o = Ae(e);
|
|
529
530
|
if (typeof o == "function" && o !== e.entries)
|
|
530
|
-
for (var
|
|
531
|
-
|
|
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,137 +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
|
-
|
|
552
|
-
} else if (r.PropTypes !== void 0 && !
|
|
553
|
-
|
|
554
|
-
var o =
|
|
555
|
-
|
|
551
|
+
var n = x(r);
|
|
552
|
+
Ke(t, e.props, "prop", n, e);
|
|
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 xe(e, r, t, n, o,
|
|
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
|
-
|
|
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
|
-
|
|
599
|
+
we(T, e);
|
|
599
600
|
}
|
|
600
601
|
if ($.call(r, "key")) {
|
|
601
|
-
var
|
|
602
|
-
return
|
|
603
|
-
}),
|
|
604
|
-
if (!
|
|
605
|
-
var
|
|
606
|
-
|
|
602
|
+
var j = x(e), E = Object.keys(r).filter(function(pr) {
|
|
603
|
+
return pr !== "key";
|
|
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
|
-
function
|
|
618
|
+
function lr(e, r, t) {
|
|
618
619
|
return xe(e, r, t, !0);
|
|
619
620
|
}
|
|
620
|
-
function
|
|
621
|
+
function cr(e, r, t) {
|
|
621
622
|
return xe(e, r, t, !1);
|
|
622
623
|
}
|
|
623
|
-
var
|
|
624
|
-
Y.Fragment =
|
|
624
|
+
var fr = cr, dr = lr;
|
|
625
|
+
Y.Fragment = d, Y.jsx = fr, Y.jsxs = dr;
|
|
625
626
|
})()), Y;
|
|
626
627
|
}
|
|
627
628
|
var Ce;
|
|
628
|
-
function
|
|
629
|
-
return Ce || (Ce = 1, process.env.NODE_ENV === "production" ?
|
|
629
|
+
function _r() {
|
|
630
|
+
return Ce || (Ce = 1, process.env.NODE_ENV === "production" ? q.exports = Rr() : q.exports = Er()), q.exports;
|
|
630
631
|
}
|
|
631
|
-
var
|
|
632
|
-
function
|
|
633
|
-
const
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
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]);
|
|
637
655
|
}
|
|
638
|
-
const
|
|
639
|
-
const
|
|
640
|
-
if (!
|
|
641
|
-
const
|
|
642
|
-
return
|
|
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;
|
|
643
661
|
});
|
|
644
|
-
function
|
|
645
|
-
const
|
|
646
|
-
return /* @__PURE__ */
|
|
647
|
-
|
|
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,
|
|
648
666
|
{
|
|
649
|
-
id:
|
|
667
|
+
id: s
|
|
650
668
|
},
|
|
651
|
-
|
|
669
|
+
s
|
|
652
670
|
)) });
|
|
653
671
|
}
|
|
654
|
-
function
|
|
655
|
-
fields:
|
|
656
|
-
|
|
672
|
+
function Pr({
|
|
673
|
+
fields: u,
|
|
674
|
+
schemaType: f = "inhouse",
|
|
675
|
+
onChange: c,
|
|
657
676
|
className: d = "",
|
|
658
|
-
fullHeight:
|
|
677
|
+
fullHeight: s = !1,
|
|
678
|
+
hideUnsupportedFields: g = !1
|
|
659
679
|
}) {
|
|
660
|
-
|
|
661
|
-
const
|
|
662
|
-
|
|
663
|
-
}) : void 0, [
|
|
664
|
-
const
|
|
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 = [
|
|
665
685
|
"qb-render-root",
|
|
666
686
|
"bg-gray-100",
|
|
667
687
|
"font-titillium",
|
|
668
|
-
|
|
688
|
+
s ? "min-h-screen" : "",
|
|
669
689
|
d
|
|
670
690
|
].filter(Boolean).join(" ");
|
|
671
|
-
return /* @__PURE__ */
|
|
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, {}) }) });
|
|
692
|
+
}
|
|
693
|
+
function je(u) {
|
|
694
|
+
switch (u.fieldType) {
|
|
695
|
+
case "input":
|
|
696
|
+
return u.answer ? [{ valueString: String(u.answer) }] : [];
|
|
697
|
+
case "radio":
|
|
698
|
+
return u.selected ? [{ valueString: Z(u, u.selected) }] : [];
|
|
699
|
+
case "check":
|
|
700
|
+
return (u.selected || []).map((f) => ({ valueString: Z(u, f) }));
|
|
701
|
+
case "selection":
|
|
702
|
+
return u.selected ? [{ valueString: Z(u, u.selected) }] : [];
|
|
703
|
+
default:
|
|
704
|
+
return [];
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
function Z(u, f) {
|
|
708
|
+
const c = (u.options || []).find((d) => d.id === f || d.value === f);
|
|
709
|
+
return c ? c.value : "";
|
|
710
|
+
}
|
|
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({
|
|
717
|
+
linkId: g.id,
|
|
718
|
+
text: g.question || g.title || "",
|
|
719
|
+
answer: je(g)
|
|
720
|
+
});
|
|
721
|
+
});
|
|
722
|
+
return;
|
|
723
|
+
}
|
|
724
|
+
s.fieldType !== "section" && d.push({
|
|
725
|
+
linkId: s.id,
|
|
726
|
+
text: s.question || s.title || "",
|
|
727
|
+
answer: je(s)
|
|
728
|
+
});
|
|
729
|
+
}), {
|
|
730
|
+
resourceType: "QuestionnaireResponse",
|
|
731
|
+
questionnaire: f,
|
|
732
|
+
status: "in-progress",
|
|
733
|
+
subject: c ? { reference: `Patient/${c}` } : void 0,
|
|
734
|
+
item: d
|
|
735
|
+
};
|
|
672
736
|
}
|
|
673
737
|
export {
|
|
674
|
-
|
|
738
|
+
wr as FieldNode,
|
|
739
|
+
Pr as QuestionnaireRenderer,
|
|
740
|
+
Sr as RendererBody,
|
|
741
|
+
Cr as buildQuestionnaireResponse,
|
|
742
|
+
kr as useFieldsArray
|
|
675
743
|
};
|
|
676
744
|
//# sourceMappingURL=react.js.map
|