react-formio-engine 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,65 +1,65 @@
1
- import Ne, { createContext as gr, forwardRef as yr, useRef as N, useContext as Rr, useImperativeHandle as Er, useEffect as ve } from "react";
2
- import { Form as _r, FormBuilder as br, Components as pe, Formio as Le } from "@formio/js";
3
- import { createRoot as Cr } from "react-dom/client";
4
- var H = { exports: {} }, B = {};
5
- var Ie;
6
- function Tr() {
7
- if (Ie) return B;
8
- Ie = 1;
9
- var c = Ne, f = /* @__PURE__ */ Symbol.for("react.element"), g = /* @__PURE__ */ Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, P = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, F = { key: !0, ref: !0, __self: !0, __source: !0 };
10
- function T(E, d, S) {
11
- var a, l = {}, _ = null, k = null;
12
- S !== void 0 && (_ = "" + S), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (k = d.ref);
13
- for (a in d) m.call(d, a) && !F.hasOwnProperty(a) && (l[a] = d[a]);
14
- if (E && E.defaultProps) for (a in d = E.defaultProps, d) l[a] === void 0 && (l[a] = d[a]);
15
- return { $$typeof: f, type: E, key: _, ref: k, props: l, _owner: P.current };
1
+ import Ue, { createContext as Rr, forwardRef as Er, useRef as N, useContext as _r, useImperativeHandle as br, useEffect as he } from "react";
2
+ import { Form as Cr, FormBuilder as wr, Components as q, Formio as Be } from "@formio/js";
3
+ import { createRoot as Tr } from "react-dom/client";
4
+ var Z = { exports: {} }, M = {};
5
+ var Ye;
6
+ function Or() {
7
+ if (Ye) return M;
8
+ Ye = 1;
9
+ var u = Ue, c = /* @__PURE__ */ Symbol.for("react.element"), m = /* @__PURE__ */ Symbol.for("react.fragment"), h = Object.prototype.hasOwnProperty, P = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 };
10
+ function w(E, d, T) {
11
+ var a, f = {}, _ = null, k = null;
12
+ T !== void 0 && (_ = "" + T), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (k = d.ref);
13
+ for (a in d) h.call(d, a) && !S.hasOwnProperty(a) && (f[a] = d[a]);
14
+ if (E && E.defaultProps) for (a in d = E.defaultProps, d) f[a] === void 0 && (f[a] = d[a]);
15
+ return { $$typeof: c, type: E, key: _, ref: k, props: f, _owner: P.current };
16
16
  }
17
- return B.Fragment = g, B.jsx = T, B.jsxs = T, B;
17
+ return M.Fragment = m, M.jsx = w, M.jsxs = w, M;
18
18
  }
19
19
  var J = {};
20
- var We;
21
- function Sr() {
22
- return We || (We = 1, process.env.NODE_ENV !== "production" && (function() {
23
- var c = Ne, f = /* @__PURE__ */ Symbol.for("react.element"), g = /* @__PURE__ */ Symbol.for("react.portal"), m = /* @__PURE__ */ Symbol.for("react.fragment"), P = /* @__PURE__ */ Symbol.for("react.strict_mode"), F = /* @__PURE__ */ Symbol.for("react.profiler"), T = /* @__PURE__ */ Symbol.for("react.provider"), E = /* @__PURE__ */ Symbol.for("react.context"), d = /* @__PURE__ */ Symbol.for("react.forward_ref"), S = /* @__PURE__ */ Symbol.for("react.suspense"), a = /* @__PURE__ */ Symbol.for("react.suspense_list"), l = /* @__PURE__ */ Symbol.for("react.memo"), _ = /* @__PURE__ */ Symbol.for("react.lazy"), k = /* @__PURE__ */ Symbol.for("react.offscreen"), h = Symbol.iterator, w = "@@iterator";
24
- function Q(e) {
20
+ var Ne;
21
+ function Pr() {
22
+ return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && (function() {
23
+ var u = Ue, c = /* @__PURE__ */ Symbol.for("react.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), h = /* @__PURE__ */ Symbol.for("react.fragment"), P = /* @__PURE__ */ Symbol.for("react.strict_mode"), S = /* @__PURE__ */ Symbol.for("react.profiler"), w = /* @__PURE__ */ Symbol.for("react.provider"), E = /* @__PURE__ */ Symbol.for("react.context"), d = /* @__PURE__ */ Symbol.for("react.forward_ref"), T = /* @__PURE__ */ Symbol.for("react.suspense"), a = /* @__PURE__ */ Symbol.for("react.suspense_list"), f = /* @__PURE__ */ Symbol.for("react.memo"), _ = /* @__PURE__ */ Symbol.for("react.lazy"), k = /* @__PURE__ */ Symbol.for("react.offscreen"), g = Symbol.iterator, F = "@@iterator";
24
+ function ee(e) {
25
25
  if (e === null || typeof e != "object")
26
26
  return null;
27
- var r = h && e[h] || e[w];
27
+ var r = g && e[g] || e[F];
28
28
  return typeof r == "function" ? r : null;
29
29
  }
30
- var A = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
30
+ var D = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
31
31
  function y(e) {
32
32
  {
33
33
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
34
34
  t[n - 1] = arguments[n];
35
- ee("error", e, t);
35
+ re("error", e, t);
36
36
  }
37
37
  }
38
- function ee(e, r, t) {
38
+ function re(e, r, t) {
39
39
  {
40
- var n = A.ReactDebugCurrentFrame, u = n.getStackAddendum();
41
- u !== "" && (r += "%s", t = t.concat([u]));
42
- var s = t.map(function(i) {
40
+ var n = D.ReactDebugCurrentFrame, s = n.getStackAddendum();
41
+ s !== "" && (r += "%s", t = t.concat([s]));
42
+ var l = t.map(function(i) {
43
43
  return String(i);
44
44
  });
45
- s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
45
+ l.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, l);
46
46
  }
47
47
  }
48
- var L = !1, x = !1, re = !1, q = !1, te = !1, V;
48
+ var L = !1, x = !1, te = !1, K = !1, ne = !1, V;
49
49
  V = /* @__PURE__ */ Symbol.for("react.module.reference");
50
- function ne(e) {
51
- return !!(typeof e == "string" || typeof e == "function" || e === m || e === F || te || e === P || e === S || e === a || q || e === k || L || x || re || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === l || e.$$typeof === T || e.$$typeof === E || e.$$typeof === d || // This needs to include all possible module reference object
50
+ function ae(e) {
51
+ return !!(typeof e == "string" || typeof e == "function" || e === h || e === S || ne || e === P || e === T || e === a || K || e === k || L || x || te || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === f || e.$$typeof === w || e.$$typeof === E || e.$$typeof === d || // This needs to include all possible module reference object
52
52
  // types supported by any Flight configuration anywhere since
53
53
  // we don't know which Flight build this will end up being used
54
54
  // with.
55
55
  e.$$typeof === V || e.getModuleId !== void 0));
56
56
  }
57
- function ae(e, r, t) {
57
+ function oe(e, r, t) {
58
58
  var n = e.displayName;
59
59
  if (n)
60
60
  return n;
61
- var u = r.displayName || r.name || "";
62
- return u !== "" ? t + "(" + u + ")" : t;
61
+ var s = r.displayName || r.name || "";
62
+ return s !== "" ? t + "(" + s + ")" : t;
63
63
  }
64
64
  function I(e) {
65
65
  return e.displayName || "Context";
@@ -72,15 +72,15 @@ function Sr() {
72
72
  if (typeof e == "string")
73
73
  return e;
74
74
  switch (e) {
75
- case m:
75
+ case h:
76
76
  return "Fragment";
77
- case g:
77
+ case m:
78
78
  return "Portal";
79
- case F:
79
+ case S:
80
80
  return "Profiler";
81
81
  case P:
82
82
  return "StrictMode";
83
- case S:
83
+ case T:
84
84
  return "Suspense";
85
85
  case a:
86
86
  return "SuspenseList";
@@ -90,18 +90,18 @@ function Sr() {
90
90
  case E:
91
91
  var r = e;
92
92
  return I(r) + ".Consumer";
93
- case T:
93
+ case w:
94
94
  var t = e;
95
95
  return I(t._context) + ".Provider";
96
96
  case d:
97
- return ae(e, e.render, "ForwardRef");
98
- case l:
97
+ return oe(e, e.render, "ForwardRef");
98
+ case f:
99
99
  var n = e.displayName || null;
100
100
  return n !== null ? n : R(e.type) || "Memo";
101
101
  case _: {
102
- var u = e, s = u._payload, i = u._init;
102
+ var s = e, l = s._payload, i = s._init;
103
103
  try {
104
- return R(i(s));
104
+ return R(i(l));
105
105
  } catch {
106
106
  return null;
107
107
  }
@@ -109,18 +109,18 @@ function Sr() {
109
109
  }
110
110
  return null;
111
111
  }
112
- var j = Object.assign, D = 0, U, me, he, ge, ye, Re, Ee;
113
- function _e() {
112
+ var j = Object.assign, A = 0, U, ge, ye, Re, Ee, _e, be;
113
+ function Ce() {
114
114
  }
115
- _e.__reactDisabledLog = !0;
116
- function Be() {
115
+ Ce.__reactDisabledLog = !0;
116
+ function qe() {
117
117
  {
118
- if (D === 0) {
119
- U = console.log, me = console.info, he = console.warn, ge = console.error, ye = console.group, Re = console.groupCollapsed, Ee = console.groupEnd;
118
+ if (A === 0) {
119
+ U = console.log, ge = console.info, ye = console.warn, Re = console.error, Ee = console.group, _e = console.groupCollapsed, be = console.groupEnd;
120
120
  var e = {
121
121
  configurable: !0,
122
122
  enumerable: !0,
123
- value: _e,
123
+ value: Ce,
124
124
  writable: !0
125
125
  };
126
126
  Object.defineProperties(console, {
@@ -133,12 +133,12 @@ function Sr() {
133
133
  groupEnd: e
134
134
  });
135
135
  }
136
- D++;
136
+ A++;
137
137
  }
138
138
  }
139
- function Je() {
139
+ function Ke() {
140
140
  {
141
- if (D--, D === 0) {
141
+ if (A--, A === 0) {
142
142
  var e = {
143
143
  configurable: !0,
144
144
  enumerable: !0,
@@ -149,61 +149,61 @@ function Sr() {
149
149
  value: U
150
150
  }),
151
151
  info: j({}, e, {
152
- value: me
152
+ value: ge
153
153
  }),
154
154
  warn: j({}, e, {
155
- value: he
155
+ value: ye
156
156
  }),
157
157
  error: j({}, e, {
158
- value: ge
158
+ value: Re
159
159
  }),
160
160
  group: j({}, e, {
161
- value: ye
161
+ value: Ee
162
162
  }),
163
163
  groupCollapsed: j({}, e, {
164
- value: Re
164
+ value: _e
165
165
  }),
166
166
  groupEnd: j({}, e, {
167
- value: Ee
167
+ value: be
168
168
  })
169
169
  });
170
170
  }
171
- D < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
171
+ A < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
172
172
  }
173
173
  }
174
- var oe = A.ReactCurrentDispatcher, ie;
175
- function K(e, r, t) {
174
+ var ie = D.ReactCurrentDispatcher, se;
175
+ function G(e, r, t) {
176
176
  {
177
- if (ie === void 0)
177
+ if (se === void 0)
178
178
  try {
179
179
  throw Error();
180
- } catch (u) {
181
- var n = u.stack.trim().match(/\n( *(at )?)/);
182
- ie = n && n[1] || "";
180
+ } catch (s) {
181
+ var n = s.stack.trim().match(/\n( *(at )?)/);
182
+ se = n && n[1] || "";
183
183
  }
184
184
  return `
185
- ` + ie + e;
185
+ ` + se + e;
186
186
  }
187
187
  }
188
- var ue = !1, G;
188
+ var ue = !1, z;
189
189
  {
190
- var qe = typeof WeakMap == "function" ? WeakMap : Map;
191
- G = new qe();
190
+ var Ge = typeof WeakMap == "function" ? WeakMap : Map;
191
+ z = new Ge();
192
192
  }
193
- function be(e, r) {
193
+ function we(e, r) {
194
194
  if (!e || ue)
195
195
  return "";
196
196
  {
197
- var t = G.get(e);
197
+ var t = z.get(e);
198
198
  if (t !== void 0)
199
199
  return t;
200
200
  }
201
201
  var n;
202
202
  ue = !0;
203
- var u = Error.prepareStackTrace;
203
+ var s = Error.prepareStackTrace;
204
204
  Error.prepareStackTrace = void 0;
205
- var s;
206
- s = oe.current, oe.current = null, Be();
205
+ var l;
206
+ l = ie.current, ie.current = null, qe();
207
207
  try {
208
208
  if (r) {
209
209
  var i = function() {
@@ -240,76 +240,76 @@ function Sr() {
240
240
  if (C && n && typeof C.stack == "string") {
241
241
  for (var o = C.stack.split(`
242
242
  `), b = n.stack.split(`
243
- `), v = o.length - 1, p = b.length - 1; v >= 1 && p >= 0 && o[v] !== b[p]; )
244
- p--;
245
- for (; v >= 1 && p >= 0; v--, p--)
246
- if (o[v] !== b[p]) {
247
- if (v !== 1 || p !== 1)
243
+ `), p = o.length - 1, v = b.length - 1; p >= 1 && v >= 0 && o[p] !== b[v]; )
244
+ v--;
245
+ for (; p >= 1 && v >= 0; p--, v--)
246
+ if (o[p] !== b[v]) {
247
+ if (p !== 1 || v !== 1)
248
248
  do
249
- if (v--, p--, p < 0 || o[v] !== b[p]) {
249
+ if (p--, v--, v < 0 || o[p] !== b[v]) {
250
250
  var O = `
251
- ` + o[v].replace(" at new ", " at ");
252
- return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, O), O;
251
+ ` + o[p].replace(" at new ", " at ");
252
+ return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && z.set(e, O), O;
253
253
  }
254
- while (v >= 1 && p >= 0);
254
+ while (p >= 1 && v >= 0);
255
255
  break;
256
256
  }
257
257
  }
258
258
  } finally {
259
- ue = !1, oe.current = s, Je(), Error.prepareStackTrace = u;
259
+ ue = !1, ie.current = l, Ke(), Error.prepareStackTrace = s;
260
260
  }
261
- var Y = e ? e.displayName || e.name : "", $ = Y ? K(Y) : "";
262
- return typeof e == "function" && G.set(e, $), $;
261
+ var Y = e ? e.displayName || e.name : "", $ = Y ? G(Y) : "";
262
+ return typeof e == "function" && z.set(e, $), $;
263
263
  }
264
- function Ke(e, r, t) {
265
- return be(e, !1);
264
+ function ze(e, r, t) {
265
+ return we(e, !1);
266
266
  }
267
- function Ge(e) {
267
+ function Xe(e) {
268
268
  var r = e.prototype;
269
269
  return !!(r && r.isReactComponent);
270
270
  }
271
- function z(e, r, t) {
271
+ function X(e, r, t) {
272
272
  if (e == null)
273
273
  return "";
274
274
  if (typeof e == "function")
275
- return be(e, Ge(e));
275
+ return we(e, Xe(e));
276
276
  if (typeof e == "string")
277
- return K(e);
277
+ return G(e);
278
278
  switch (e) {
279
- case S:
280
- return K("Suspense");
279
+ case T:
280
+ return G("Suspense");
281
281
  case a:
282
- return K("SuspenseList");
282
+ return G("SuspenseList");
283
283
  }
284
284
  if (typeof e == "object")
285
285
  switch (e.$$typeof) {
286
286
  case d:
287
- return Ke(e.render);
288
- case l:
289
- return z(e.type, r, t);
287
+ return ze(e.render);
288
+ case f:
289
+ return X(e.type, r, t);
290
290
  case _: {
291
- var n = e, u = n._payload, s = n._init;
291
+ var n = e, s = n._payload, l = n._init;
292
292
  try {
293
- return z(s(u), r, t);
293
+ return X(l(s), r, t);
294
294
  } catch {
295
295
  }
296
296
  }
297
297
  }
298
298
  return "";
299
299
  }
300
- var M = Object.prototype.hasOwnProperty, Ce = {}, Te = A.ReactDebugCurrentFrame;
301
- function X(e) {
300
+ var B = Object.prototype.hasOwnProperty, Te = {}, Oe = D.ReactDebugCurrentFrame;
301
+ function H(e) {
302
302
  if (e) {
303
- var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
304
- Te.setExtraStackFrame(t);
303
+ var r = e._owner, t = X(e.type, e._source, r ? r.type : null);
304
+ Oe.setExtraStackFrame(t);
305
305
  } else
306
- Te.setExtraStackFrame(null);
306
+ Oe.setExtraStackFrame(null);
307
307
  }
308
- function ze(e, r, t, n, u) {
308
+ function He(e, r, t, n, s) {
309
309
  {
310
- var s = Function.call.bind(M);
310
+ var l = Function.call.bind(B);
311
311
  for (var i in e)
312
- if (s(e, i)) {
312
+ if (l(e, i)) {
313
313
  var o = void 0;
314
314
  try {
315
315
  if (typeof e[i] != "function") {
@@ -317,66 +317,66 @@ function Sr() {
317
317
  throw b.name = "Invariant Violation", b;
318
318
  }
319
319
  o = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
320
- } catch (v) {
321
- o = v;
320
+ } catch (p) {
321
+ o = p;
322
322
  }
323
- o && !(o instanceof Error) && (X(u), y("%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 o), X(null)), o instanceof Error && !(o.message in Ce) && (Ce[o.message] = !0, X(u), y("Failed %s type: %s", t, o.message), X(null));
323
+ o && !(o instanceof Error) && (H(s), y("%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 o), H(null)), o instanceof Error && !(o.message in Te) && (Te[o.message] = !0, H(s), y("Failed %s type: %s", t, o.message), H(null));
324
324
  }
325
325
  }
326
326
  }
327
- var Xe = Array.isArray;
328
- function se(e) {
329
- return Xe(e);
327
+ var Ze = Array.isArray;
328
+ function ce(e) {
329
+ return Ze(e);
330
330
  }
331
- function He(e) {
331
+ function Qe(e) {
332
332
  {
333
333
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
334
334
  return t;
335
335
  }
336
336
  }
337
- function Ze(e) {
337
+ function er(e) {
338
338
  try {
339
- return Se(e), !1;
339
+ return Pe(e), !1;
340
340
  } catch {
341
341
  return !0;
342
342
  }
343
343
  }
344
- function Se(e) {
344
+ function Pe(e) {
345
345
  return "" + e;
346
346
  }
347
- function Oe(e) {
348
- if (Ze(e))
349
- return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), Se(e);
347
+ function Se(e) {
348
+ if (er(e))
349
+ return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Qe(e)), Pe(e);
350
350
  }
351
- var Pe = A.ReactCurrentOwner, Qe = {
351
+ var Fe = D.ReactCurrentOwner, rr = {
352
352
  key: !0,
353
353
  ref: !0,
354
354
  __self: !0,
355
355
  __source: !0
356
- }, Fe, we;
357
- function er(e) {
358
- if (M.call(e, "ref")) {
356
+ }, xe, je;
357
+ function tr(e) {
358
+ if (B.call(e, "ref")) {
359
359
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
360
360
  if (r && r.isReactWarning)
361
361
  return !1;
362
362
  }
363
363
  return e.ref !== void 0;
364
364
  }
365
- function rr(e) {
366
- if (M.call(e, "key")) {
365
+ function nr(e) {
366
+ if (B.call(e, "key")) {
367
367
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
368
368
  if (r && r.isReactWarning)
369
369
  return !1;
370
370
  }
371
371
  return e.key !== void 0;
372
372
  }
373
- function tr(e, r) {
374
- typeof e.ref == "string" && Pe.current;
373
+ function ar(e, r) {
374
+ typeof e.ref == "string" && Fe.current;
375
375
  }
376
- function nr(e, r) {
376
+ function or(e, r) {
377
377
  {
378
378
  var t = function() {
379
- Fe || (Fe = !0, y("%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));
379
+ xe || (xe = !0, y("%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));
380
380
  };
381
381
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
382
382
  get: t,
@@ -384,10 +384,10 @@ function Sr() {
384
384
  });
385
385
  }
386
386
  }
387
- function ar(e, r) {
387
+ function ir(e, r) {
388
388
  {
389
389
  var t = function() {
390
- we || (we = !0, y("%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));
390
+ je || (je = !0, y("%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));
391
391
  };
392
392
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
393
393
  get: t,
@@ -395,17 +395,17 @@ function Sr() {
395
395
  });
396
396
  }
397
397
  }
398
- var or = function(e, r, t, n, u, s, i) {
398
+ var sr = function(e, r, t, n, s, l, i) {
399
399
  var o = {
400
400
  // This tag allows us to uniquely identify this as a React Element
401
- $$typeof: f,
401
+ $$typeof: c,
402
402
  // Built-in properties that belong on the element
403
403
  type: e,
404
404
  key: r,
405
405
  ref: t,
406
406
  props: i,
407
407
  // Record the component responsible for creating this element.
408
- _owner: s
408
+ _owner: l
409
409
  };
410
410
  return o._store = {}, Object.defineProperty(o._store, "validated", {
411
411
  configurable: !1,
@@ -421,44 +421,44 @@ function Sr() {
421
421
  configurable: !1,
422
422
  enumerable: !1,
423
423
  writable: !1,
424
- value: u
424
+ value: s
425
425
  }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
426
426
  };
427
- function ir(e, r, t, n, u) {
427
+ function ur(e, r, t, n, s) {
428
428
  {
429
- var s, i = {}, o = null, b = null;
430
- t !== void 0 && (Oe(t), o = "" + t), rr(r) && (Oe(r.key), o = "" + r.key), er(r) && (b = r.ref, tr(r, u));
431
- for (s in r)
432
- M.call(r, s) && !Qe.hasOwnProperty(s) && (i[s] = r[s]);
429
+ var l, i = {}, o = null, b = null;
430
+ t !== void 0 && (Se(t), o = "" + t), nr(r) && (Se(r.key), o = "" + r.key), tr(r) && (b = r.ref, ar(r, s));
431
+ for (l in r)
432
+ B.call(r, l) && !rr.hasOwnProperty(l) && (i[l] = r[l]);
433
433
  if (e && e.defaultProps) {
434
- var v = e.defaultProps;
435
- for (s in v)
436
- i[s] === void 0 && (i[s] = v[s]);
434
+ var p = e.defaultProps;
435
+ for (l in p)
436
+ i[l] === void 0 && (i[l] = p[l]);
437
437
  }
438
438
  if (o || b) {
439
- var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
440
- o && nr(i, p), b && ar(i, p);
439
+ var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
440
+ o && or(i, v), b && ir(i, v);
441
441
  }
442
- return or(e, o, b, u, n, Pe.current, i);
442
+ return sr(e, o, b, s, n, Fe.current, i);
443
443
  }
444
444
  }
445
- var ce = A.ReactCurrentOwner, xe = A.ReactDebugCurrentFrame;
445
+ var le = D.ReactCurrentOwner, ke = D.ReactDebugCurrentFrame;
446
446
  function W(e) {
447
447
  if (e) {
448
- var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
449
- xe.setExtraStackFrame(t);
448
+ var r = e._owner, t = X(e.type, e._source, r ? r.type : null);
449
+ ke.setExtraStackFrame(t);
450
450
  } else
451
- xe.setExtraStackFrame(null);
451
+ ke.setExtraStackFrame(null);
452
452
  }
453
- var le;
454
- le = !1;
455
- function fe(e) {
456
- return typeof e == "object" && e !== null && e.$$typeof === f;
453
+ var fe;
454
+ fe = !1;
455
+ function de(e) {
456
+ return typeof e == "object" && e !== null && e.$$typeof === c;
457
457
  }
458
- function je() {
458
+ function De() {
459
459
  {
460
- if (ce.current) {
461
- var e = R(ce.current.type);
460
+ if (le.current) {
461
+ var e = R(le.current.type);
462
462
  if (e)
463
463
  return `
464
464
 
@@ -467,13 +467,13 @@ Check the render method of \`` + e + "`.";
467
467
  return "";
468
468
  }
469
469
  }
470
- function ur(e) {
470
+ function cr(e) {
471
471
  return "";
472
472
  }
473
- var ke = {};
474
- function sr(e) {
473
+ var Ae = {};
474
+ function lr(e) {
475
475
  {
476
- var r = je();
476
+ var r = De();
477
477
  if (!r) {
478
478
  var t = typeof e == "string" ? e : e.displayName || e.name;
479
479
  t && (r = `
@@ -483,39 +483,39 @@ Check the top-level render call using <` + t + ">.");
483
483
  return r;
484
484
  }
485
485
  }
486
- function Ae(e, r) {
486
+ function Ve(e, r) {
487
487
  {
488
488
  if (!e._store || e._store.validated || e.key != null)
489
489
  return;
490
490
  e._store.validated = !0;
491
- var t = sr(r);
492
- if (ke[t])
491
+ var t = lr(r);
492
+ if (Ae[t])
493
493
  return;
494
- ke[t] = !0;
494
+ Ae[t] = !0;
495
495
  var n = "";
496
- e && e._owner && e._owner !== ce.current && (n = " It was passed a child from " + R(e._owner.type) + "."), W(e), y('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), W(null);
496
+ e && e._owner && e._owner !== le.current && (n = " It was passed a child from " + R(e._owner.type) + "."), W(e), y('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), W(null);
497
497
  }
498
498
  }
499
- function De(e, r) {
499
+ function $e(e, r) {
500
500
  {
501
501
  if (typeof e != "object")
502
502
  return;
503
- if (se(e))
503
+ if (ce(e))
504
504
  for (var t = 0; t < e.length; t++) {
505
505
  var n = e[t];
506
- fe(n) && Ae(n, r);
506
+ de(n) && Ve(n, r);
507
507
  }
508
- else if (fe(e))
508
+ else if (de(e))
509
509
  e._store && (e._store.validated = !0);
510
510
  else if (e) {
511
- var u = Q(e);
512
- if (typeof u == "function" && u !== e.entries)
513
- for (var s = u.call(e), i; !(i = s.next()).done; )
514
- fe(i.value) && Ae(i.value, r);
511
+ var s = ee(e);
512
+ if (typeof s == "function" && s !== e.entries)
513
+ for (var l = s.call(e), i; !(i = l.next()).done; )
514
+ de(i.value) && Ve(i.value, r);
515
515
  }
516
516
  }
517
517
  }
518
- function cr(e) {
518
+ function fr(e) {
519
519
  {
520
520
  var r = e.type;
521
521
  if (r == null || typeof r == "string")
@@ -525,22 +525,22 @@ Check the top-level render call using <` + t + ">.");
525
525
  t = r.propTypes;
526
526
  else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
527
527
  // Inner props are checked in the reconciler.
528
- r.$$typeof === l))
528
+ r.$$typeof === f))
529
529
  t = r.propTypes;
530
530
  else
531
531
  return;
532
532
  if (t) {
533
533
  var n = R(r);
534
- ze(t, e.props, "prop", n, e);
535
- } else if (r.PropTypes !== void 0 && !le) {
536
- le = !0;
537
- var u = R(r);
538
- y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
534
+ He(t, e.props, "prop", n, e);
535
+ } else if (r.PropTypes !== void 0 && !fe) {
536
+ fe = !0;
537
+ var s = R(r);
538
+ y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
539
539
  }
540
540
  typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
541
541
  }
542
542
  }
543
- function lr(e) {
543
+ function dr(e) {
544
544
  {
545
545
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
546
546
  var n = r[t];
@@ -552,205 +552,205 @@ Check the top-level render call using <` + t + ">.");
552
552
  e.ref !== null && (W(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
553
553
  }
554
554
  }
555
- var Ve = {};
556
- function $e(e, r, t, n, u, s) {
555
+ var Ie = {};
556
+ function We(e, r, t, n, s, l) {
557
557
  {
558
- var i = ne(e);
558
+ var i = ae(e);
559
559
  if (!i) {
560
560
  var o = "";
561
561
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
562
- var b = ur();
563
- b ? o += b : o += je();
564
- var v;
565
- e === null ? v = "null" : se(e) ? v = "array" : e !== void 0 && e.$$typeof === f ? (v = "<" + (R(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : v = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", v, o);
562
+ var b = cr();
563
+ b ? o += b : o += De();
564
+ var p;
565
+ e === null ? p = "null" : ce(e) ? p = "array" : e !== void 0 && e.$$typeof === c ? (p = "<" + (R(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : p = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", p, o);
566
566
  }
567
- var p = ir(e, r, t, u, s);
568
- if (p == null)
569
- return p;
567
+ var v = ur(e, r, t, s, l);
568
+ if (v == null)
569
+ return v;
570
570
  if (i) {
571
571
  var O = r.children;
572
572
  if (O !== void 0)
573
573
  if (n)
574
- if (se(O)) {
574
+ if (ce(O)) {
575
575
  for (var Y = 0; Y < O.length; Y++)
576
- De(O[Y], e);
576
+ $e(O[Y], e);
577
577
  Object.freeze && Object.freeze(O);
578
578
  } else
579
579
  y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
580
580
  else
581
- De(O, e);
581
+ $e(O, e);
582
582
  }
583
- if (M.call(r, "key")) {
584
- var $ = R(e), C = Object.keys(r).filter(function(hr) {
585
- return hr !== "key";
586
- }), de = C.length > 0 ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}";
587
- if (!Ve[$ + de]) {
588
- var mr = C.length > 0 ? "{" + C.join(": ..., ") + ": ...}" : "{}";
583
+ if (B.call(r, "key")) {
584
+ var $ = R(e), C = Object.keys(r).filter(function(yr) {
585
+ return yr !== "key";
586
+ }), pe = C.length > 0 ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}";
587
+ if (!Ie[$ + pe]) {
588
+ var gr = C.length > 0 ? "{" + C.join(": ..., ") + ": ...}" : "{}";
589
589
  y(`A props object containing a "key" prop is being spread into JSX:
590
590
  let props = %s;
591
591
  <%s {...props} />
592
592
  React keys must be passed directly to JSX without using spread:
593
593
  let props = %s;
594
- <%s key={someKey} {...props} />`, de, $, mr, $), Ve[$ + de] = !0;
594
+ <%s key={someKey} {...props} />`, pe, $, gr, $), Ie[$ + pe] = !0;
595
595
  }
596
596
  }
597
- return e === m ? lr(p) : cr(p), p;
597
+ return e === h ? dr(v) : fr(v), v;
598
598
  }
599
599
  }
600
- function fr(e, r, t) {
601
- return $e(e, r, t, !0);
600
+ function pr(e, r, t) {
601
+ return We(e, r, t, !0);
602
602
  }
603
- function dr(e, r, t) {
604
- return $e(e, r, t, !1);
603
+ function vr(e, r, t) {
604
+ return We(e, r, t, !1);
605
605
  }
606
- var vr = dr, pr = fr;
607
- J.Fragment = m, J.jsx = vr, J.jsxs = pr;
606
+ var mr = vr, hr = pr;
607
+ J.Fragment = h, J.jsx = mr, J.jsxs = hr;
608
608
  })()), J;
609
609
  }
610
- var Ye;
611
- function Or() {
612
- return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? H.exports = Tr() : H.exports = Sr()), H.exports;
610
+ var Le;
611
+ function Sr() {
612
+ return Le || (Le = 1, process.env.NODE_ENV === "production" ? Z.exports = Or() : Z.exports = Pr()), Z.exports;
613
613
  }
614
- var Z = Or();
615
- const Ue = gr({ theme: "default" }), Pr = ({ theme: c = "default", children: f }) => {
616
- const g = {
617
- theme: c,
618
- className: `form-engine-theme-${c}`
614
+ var Q = Sr();
615
+ const Me = Rr({ theme: "default" }), Fr = ({ theme: u = "default", children: c }) => {
616
+ const m = {
617
+ theme: u,
618
+ className: `form-engine-theme-${u}`
619
619
  };
620
- return /* @__PURE__ */ Z.jsx(Ue.Provider, { value: g, children: f });
620
+ return /* @__PURE__ */ Q.jsx(Me.Provider, { value: m, children: c });
621
621
  };
622
- Pr.displayName = "FormEngineProvider";
623
- const Fr = yr(function({
624
- src: f,
625
- form: g,
626
- submission: m,
622
+ Fr.displayName = "FormEngineProvider";
623
+ const xr = Er(function({
624
+ src: c,
625
+ form: m,
626
+ submission: h,
627
627
  options: P = {},
628
- onSubmit: F,
629
- onChange: T,
628
+ onSubmit: S,
629
+ onChange: w,
630
630
  onError: E,
631
631
  onRender: d,
632
- onCustomEvent: S,
632
+ onCustomEvent: T,
633
633
  onSubmitDone: a,
634
- onFormLoad: l,
634
+ onFormLoad: f,
635
635
  onAttach: _,
636
636
  onBuild: k,
637
- onFocus: h,
638
- onBlur: w,
639
- onInitialized: Q,
640
- formioform: A,
637
+ onFocus: g,
638
+ onBlur: F,
639
+ onInitialized: ee,
640
+ formioform: D,
641
641
  ...y
642
- }, ee) {
643
- const L = N(null), x = N(null), re = N(null), q = N(null), te = Rr(Ue);
644
- return Er(ee, () => ({
642
+ }, re) {
643
+ const L = N(null), x = N(null), te = N(null), K = N(null), ne = _r(Me);
644
+ return br(re, () => ({
645
645
  get formio() {
646
646
  return x.current;
647
647
  }
648
- })), ve(() => {
649
- const V = f || g;
648
+ })), he(() => {
649
+ const V = c || m;
650
650
  if (!V || !L.current) return;
651
- const ne = { ...P }, ae = A || _r, I = new ae(L.current, V, ne);
652
- return re.current = I, q.current = I.ready.then((R) => (x.current = R, f ? R.src = V : R.form = V, R)), I.onAny(function(R, ...j) {
651
+ const ae = { ...P }, oe = D || Cr, I = new oe(L.current, V, ae);
652
+ return te.current = I, K.current = I.ready.then((R) => (x.current = R, c ? R.src = V : R.form = V, R)), I.onAny(function(R, ...j) {
653
653
  if (R.startsWith("formio.")) {
654
- const D = "on" + R.charAt(7).toUpperCase() + R.slice(8), U = {
655
- onSubmit: F,
656
- onChange: T,
654
+ const A = "on" + R.charAt(7).toUpperCase() + R.slice(8), U = {
655
+ onSubmit: S,
656
+ onChange: w,
657
657
  onError: E,
658
658
  onRender: d,
659
- onCustomEvent: S,
659
+ onCustomEvent: T,
660
660
  onSubmitDone: a,
661
- onFormLoad: l,
661
+ onFormLoad: f,
662
662
  onAttach: _,
663
663
  onBuild: k,
664
- onFocus: h,
665
- onBlur: w,
666
- onInitialized: Q,
664
+ onFocus: g,
665
+ onBlur: F,
666
+ onInitialized: ee,
667
667
  ...y
668
668
  };
669
- typeof U[D] == "function" && U[D](...j);
669
+ typeof U[A] == "function" && U[A](...j);
670
670
  }
671
- }), q.current.then(() => {
672
- m && x.current && (x.current.submission = m);
671
+ }), K.current.then(() => {
672
+ h && x.current && (x.current.submission = h);
673
673
  }), () => {
674
674
  x.current && (x.current.destroy(!0), x.current = null);
675
675
  };
676
- }, [f, g]), ve(() => {
677
- m && x.current && (x.current.submission = m);
678
- }, [m]), /* @__PURE__ */ Z.jsx("div", { ref: L, className: te?.className || "" });
676
+ }, [c, m]), he(() => {
677
+ h && x.current && (x.current.submission = h);
678
+ }, [h]), /* @__PURE__ */ Q.jsx("div", { ref: L, className: ne?.className || "" });
679
679
  });
680
- Fr.displayName = "FormRenderer";
681
- const wr = ({
682
- form: c,
683
- options: f = {},
684
- onChange: g,
685
- onSaveComponent: m,
680
+ xr.displayName = "FormRenderer";
681
+ const jr = ({
682
+ form: u,
683
+ options: c = {},
684
+ onChange: m,
685
+ onSaveComponent: h,
686
686
  onUpdateComponent: P,
687
- onDeleteComponent: F,
688
- onCancelComponent: T,
687
+ onDeleteComponent: S,
688
+ onCancelComponent: w,
689
689
  onEditComponent: E,
690
690
  Builder: d
691
691
  }) => {
692
- const S = N(null), a = N(null);
693
- return ve(() => {
694
- if (!S.current) return;
695
- const l = d || br, _ = { ...c }, k = { ...f };
692
+ const T = N(null), a = N(null);
693
+ return he(() => {
694
+ if (!T.current) return;
695
+ const f = d || wr, _ = { ...u }, k = { ...c };
696
696
  a.current && a.current.instance?.destroy(!0);
697
- const h = new l(S.current.firstChild, _, k);
698
- a.current = h, h.ready.then(() => {
699
- w(), m && h.instance.on("saveComponent", m), P && h.instance.on("updateComponent", P), F && h.instance.on("removeComponent", F), T && h.instance.on("cancelComponent", T), E && h.instance.on("editComponent", E), h.instance.on("addComponent", w), h.instance.on("saveComponent", w), h.instance.on("updateComponent", w), h.instance.on("removeComponent", w), h.instance.on("deleteComponent", w), h.instance.on("pdfUploaded", w);
697
+ const g = new f(T.current.firstChild, _, k);
698
+ a.current = g, g.ready.then(() => {
699
+ F(), h && g.instance.on("saveComponent", h), P && g.instance.on("updateComponent", P), S && g.instance.on("removeComponent", S), w && g.instance.on("cancelComponent", w), E && g.instance.on("editComponent", E), g.instance.on("addComponent", F), g.instance.on("saveComponent", F), g.instance.on("updateComponent", F), g.instance.on("removeComponent", F), g.instance.on("deleteComponent", F), g.instance.on("pdfUploaded", F);
700
700
  });
701
- function w() {
702
- typeof g == "function" && a.current?.instance && g(a.current.instance.form);
701
+ function F() {
702
+ typeof m == "function" && a.current?.instance && m(a.current.instance.form);
703
703
  }
704
704
  return () => {
705
705
  a.current?.instance && (a.current.instance.destroy(!0), a.current = null);
706
706
  };
707
- }, [c?.display]), /* @__PURE__ */ Z.jsx("div", { ref: S, children: /* @__PURE__ */ Z.jsx("div", {}) });
707
+ }, [u?.display]), /* @__PURE__ */ Q.jsx("div", { ref: T, children: /* @__PURE__ */ Q.jsx("div", {}) });
708
708
  };
709
- wr.displayName = "FormBuilder";
710
- function Ar({
711
- type: c,
712
- label: f,
713
- icon: g,
714
- group: m = "basic",
709
+ jr.displayName = "FormBuilder";
710
+ function Vr({
711
+ type: u,
712
+ label: c,
713
+ icon: m,
714
+ group: h = "basic",
715
715
  weight: P = 10,
716
- defaultValue: F = "",
717
- settingsForm: T,
716
+ defaultValue: S = "",
717
+ settingsForm: w,
718
718
  render: E
719
719
  }) {
720
- const d = pe.components.field;
721
- return class Me extends d {
720
+ const d = q.components.field;
721
+ return class Je extends d {
722
722
  static get builderInfo() {
723
723
  return {
724
- title: f,
725
- icon: g || "cog",
726
- group: m,
724
+ title: c,
725
+ icon: m || "cog",
726
+ group: h,
727
727
  documentation: "",
728
728
  weight: P,
729
- schema: Me.schema()
729
+ schema: Je.schema()
730
730
  };
731
731
  }
732
732
  static schema() {
733
733
  return d.schema({
734
- type: c,
735
- label: f,
736
- defaultValue: F ?? ""
734
+ type: u,
735
+ label: c,
736
+ defaultValue: S ?? ""
737
737
  });
738
738
  }
739
- static editForm = T;
740
- constructor(a, l, _) {
741
- super(a, l, _), this._root = null;
739
+ static editForm = w;
740
+ constructor(a, f, _) {
741
+ super(a, f, _), this._root = null;
742
742
  }
743
743
  updateValue = (a) => {
744
- const l = a ?? this.getValue(), _ = l !== void 0 ? this.hasChanged(l, this.dataValue) : !1;
745
- return this.dataValue = Array.isArray(l) ? [...l] : l, this.updateOnChange({}, _), !0;
744
+ const f = a ?? this.getValue(), _ = f !== void 0 ? this.hasChanged(f, this.dataValue) : !1;
745
+ return this.dataValue = Array.isArray(f) ? [...f] : f, this.updateOnChange({}, _), !0;
746
746
  };
747
747
  render() {
748
748
  return super.render(`<div ref="react-${this.id}"></div>`);
749
749
  }
750
750
  attach(a) {
751
751
  super.attach(a), this.loadRefs(a, { [`react-${this.id}`]: "single" });
752
- const l = this.refs[`react-${this.id}`];
753
- return l && (this._root = Cr(l), this._root.render(
752
+ const f = this.refs[`react-${this.id}`];
753
+ return f && (this._root = Tr(f), this._root.render(
754
754
  E({
755
755
  component: this.component,
756
756
  value: this.dataValue,
@@ -777,39 +777,56 @@ function Ar({
777
777
  }
778
778
  };
779
779
  }
780
- function Dr(c, f) {
781
- Le.registerComponent(c, f);
780
+ function $r(u, c) {
781
+ Be.registerComponent(u, c);
782
782
  }
783
- const Vr = (c) => {
784
- if (c && c.components) {
785
- const f = c.components.filter(
786
- (g) => g.action !== "submit"
783
+ const Ir = (u) => {
784
+ if (u && u.components) {
785
+ const c = u.components.filter(
786
+ (m) => m.action !== "submit"
787
787
  );
788
- return { display: c.display, components: f };
788
+ return { display: u.display, components: c };
789
789
  }
790
- return c;
791
- }, $r = (c) => {
792
- const f = c?.components;
793
- if (f) {
794
- const g = f.map((m) => ({
795
- ...m,
790
+ return u;
791
+ }, Wr = (u) => {
792
+ const c = u?.components;
793
+ if (c) {
794
+ const m = c.map((h) => ({
795
+ ...h,
796
796
  autofocus: !1
797
797
  }));
798
- return { ...c, components: g };
798
+ return { ...u, components: m };
799
799
  }
800
- return c;
801
- }, Ir = pe.components.field, Wr = pe.baseEditForm, Yr = Le;
800
+ return u;
801
+ }, ve = q.components?.component;
802
+ if (ve?.prototype) {
803
+ const u = Object.getOwnPropertyDescriptor(ve.prototype, "wysiwygDefault");
804
+ u?.get && Object.defineProperty(ve.prototype, "wysiwygDefault", {
805
+ get() {
806
+ const c = u.get.call(this);
807
+ return c?.ace && delete c.ace.theme, c;
808
+ }
809
+ });
810
+ }
811
+ const me = q.components?.editgrid;
812
+ if (me?.prototype?.saveRow) {
813
+ const u = me.prototype.saveRow;
814
+ me.prototype.saveRow = function(c, m) {
815
+ return this.root || (this.root = {}), u.call(this, c, m);
816
+ };
817
+ }
818
+ const Yr = q.components.field, Nr = q.baseEditForm, Lr = Be;
802
819
  export {
803
- Fr as Form,
804
- wr as FormBuilder,
805
- Ue as FormEngineContext,
806
- Pr as FormEngineProvider,
807
- Fr as FormRenderer,
808
- Yr as Formio,
809
- Ir as ReactComponent,
810
- Wr as baseEditForm,
811
- Ar as createFormComponent,
812
- Dr as registerComponent,
813
- $r as removeAutoFocusFormio,
814
- Vr as removeSubmitFormio
820
+ xr as Form,
821
+ jr as FormBuilder,
822
+ Me as FormEngineContext,
823
+ Fr as FormEngineProvider,
824
+ xr as FormRenderer,
825
+ Lr as Formio,
826
+ Yr as ReactComponent,
827
+ Nr as baseEditForm,
828
+ Vr as createFormComponent,
829
+ $r as registerComponent,
830
+ Wr as removeAutoFocusFormio,
831
+ Ir as removeSubmitFormio
815
832
  };
@@ -1,14 +1,14 @@
1
- (function(p,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react"),require("@formio/js"),require("react-dom/client")):typeof define=="function"&&define.amd?define(["exports","react","@formio/js","react-dom/client"],h):(p=typeof globalThis<"u"?globalThis:p||self,h(p.FormEngine={},p.React,p.Formio,p.ReactDOMClient))})(this,(function(p,h,W,Ke){"use strict";var X={exports:{}},B={};var ge;function Ge(){if(ge)return B;ge=1;var c=h,l=Symbol.for("react.element"),y=Symbol.for("react.fragment"),g=Object.prototype.hasOwnProperty,w=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function S(b,d,O){var a,f={},C=null,D=null;O!==void 0&&(C=""+O),d.key!==void 0&&(C=""+d.key),d.ref!==void 0&&(D=d.ref);for(a in d)g.call(d,a)&&!j.hasOwnProperty(a)&&(f[a]=d[a]);if(b&&b.defaultProps)for(a in d=b.defaultProps,d)f[a]===void 0&&(f[a]=d[a]);return{$$typeof:l,type:b,key:C,ref:D,props:f,_owner:w.current}}return B.Fragment=y,B.jsx=S,B.jsxs=S,B}var J={};var Re;function ze(){return Re||(Re=1,process.env.NODE_ENV!=="production"&&(function(){var c=h,l=Symbol.for("react.element"),y=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),b=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),a=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),R=Symbol.iterator,x="@@iterator";function ne(e){if(e===null||typeof e!="object")return null;var r=R&&e[R]||e[x];return typeof r=="function"?r:null}var V=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];ae("error",e,t)}}function ae(e,r,t){{var n=V.ReactDebugCurrentFrame,u=n.getStackAddendum();u!==""&&(r+="%s",t=t.concat([u]));var s=t.map(function(i){return String(i)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var K=!1,k=!1,oe=!1,Z=!1,ie=!1,Y;Y=Symbol.for("react.module.reference");function ue(e){return!!(typeof e=="string"||typeof e=="function"||e===g||e===j||ie||e===w||e===O||e===a||Z||e===D||K||k||oe||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===f||e.$$typeof===S||e.$$typeof===b||e.$$typeof===d||e.$$typeof===Y||e.getModuleId!==void 0))}function se(e,r,t){var n=e.displayName;if(n)return n;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":t}function M(e){return e.displayName||"Context"}function _(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g:return"Fragment";case y:return"Portal";case j:return"Profiler";case w:return"StrictMode";case O:return"Suspense";case a:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b:var r=e;return M(r)+".Consumer";case S:var t=e;return M(t._context)+".Provider";case d:return se(e,e.render,"ForwardRef");case f:var n=e.displayName||null;return n!==null?n:_(e.type)||"Memo";case C:{var u=e,s=u._payload,i=u._init;try{return _(i(s))}catch{return null}}}return null}var A=Object.assign,I=0,G,be,Ce,Fe,Te,Se,Oe;function Pe(){}Pe.__reactDisabledLog=!0;function tr(){{if(I===0){G=console.log,be=console.info,Ce=console.warn,Fe=console.error,Te=console.group,Se=console.groupCollapsed,Oe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}}function nr(){{if(I--,I===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:G}),info:A({},e,{value:be}),warn:A({},e,{value:Ce}),error:A({},e,{value:Fe}),group:A({},e,{value:Te}),groupCollapsed:A({},e,{value:Se}),groupEnd:A({},e,{value:Oe})})}I<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=V.ReactCurrentDispatcher,fe;function Q(e,r,t){{if(fe===void 0)try{throw Error()}catch(u){var n=u.stack.trim().match(/\n( *(at )?)/);fe=n&&n[1]||""}return`
2
- `+fe+e}}var le=!1,$;{var ar=typeof WeakMap=="function"?WeakMap:Map;$=new ar}function we(e,r){if(!e||le)return"";{var t=$.get(e);if(t!==void 0)return t}var n;le=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=ce.current,ce.current=null,tr();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(T){n=T}Reflect.construct(e,[],i)}else{try{i.call()}catch(T){n=T}e.call(i.prototype)}}else{try{throw Error()}catch(T){n=T}e()}}catch(T){if(T&&n&&typeof T.stack=="string"){for(var o=T.stack.split(`
1
+ (function(p,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react"),require("@formio/js"),require("react-dom/client")):typeof define=="function"&&define.amd?define(["exports","react","@formio/js","react-dom/client"],h):(p=typeof globalThis<"u"?globalThis:p||self,h(p.FormEngine={},p.React,p.Formio,p.ReactDOMClient))})(this,(function(p,h,D,ze){"use strict";var X={exports:{}},B={};var Re;function Xe(){if(Re)return B;Re=1;var u=h,c=Symbol.for("react.element"),g=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,P=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function w(_,d,O){var o,l={},C=null,V=null;O!==void 0&&(C=""+O),d.key!==void 0&&(C=""+d.key),d.ref!==void 0&&(V=d.ref);for(o in d)y.call(d,o)&&!j.hasOwnProperty(o)&&(l[o]=d[o]);if(_&&_.defaultProps)for(o in d=_.defaultProps,d)l[o]===void 0&&(l[o]=d[o]);return{$$typeof:c,type:_,key:C,ref:V,props:l,_owner:P.current}}return B.Fragment=g,B.jsx=w,B.jsxs=w,B}var J={};var Ee;function He(){return Ee||(Ee=1,process.env.NODE_ENV!=="production"&&(function(){var u=h,c=Symbol.for("react.element"),g=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),_=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),o=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),R=Symbol.iterator,x="@@iterator";function ae(e){if(e===null||typeof e!="object")return null;var r=R&&e[R]||e[x];return typeof r=="function"?r:null}var I=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];ie("error",e,t)}}function ie(e,r,t){{var n=I.ReactDebugCurrentFrame,s=n.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var f=t.map(function(i){return String(i)});f.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,f)}}var K=!1,k=!1,se=!1,Z=!1,ue=!1,Y;Y=Symbol.for("react.module.reference");function ce(e){return!!(typeof e=="string"||typeof e=="function"||e===y||e===j||ue||e===P||e===O||e===o||Z||e===V||K||k||se||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===l||e.$$typeof===w||e.$$typeof===_||e.$$typeof===d||e.$$typeof===Y||e.getModuleId!==void 0))}function fe(e,r,t){var n=e.displayName;if(n)return n;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function M(e){return e.displayName||"Context"}function b(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case y:return"Fragment";case g:return"Portal";case j:return"Profiler";case P:return"StrictMode";case O:return"Suspense";case o:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:var r=e;return M(r)+".Consumer";case w:var t=e;return M(t._context)+".Provider";case d:return fe(e,e.render,"ForwardRef");case l:var n=e.displayName||null;return n!==null?n:b(e.type)||"Memo";case C:{var s=e,f=s._payload,i=s._init;try{return b(i(f))}catch{return null}}}return null}var A=Object.assign,W=0,G,Fe,Te,we,Oe,Se,Pe;function je(){}je.__reactDisabledLog=!0;function or(){{if(W===0){G=console.log,Fe=console.info,Te=console.warn,we=console.error,Oe=console.group,Se=console.groupCollapsed,Pe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:je,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}W++}}function ar(){{if(W--,W===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:G}),info:A({},e,{value:Fe}),warn:A({},e,{value:Te}),error:A({},e,{value:we}),group:A({},e,{value:Oe}),groupCollapsed:A({},e,{value:Se}),groupEnd:A({},e,{value:Pe})})}W<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var le=I.ReactCurrentDispatcher,de;function Q(e,r,t){{if(de===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);de=n&&n[1]||""}return`
2
+ `+de+e}}var ve=!1,$;{var ir=typeof WeakMap=="function"?WeakMap:Map;$=new ir}function xe(e,r){if(!e||ve)return"";{var t=$.get(e);if(t!==void 0)return t}var n;ve=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var f;f=le.current,le.current=null,or();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(T){n=T}Reflect.construct(e,[],i)}else{try{i.call()}catch(T){n=T}e.call(i.prototype)}}else{try{throw Error()}catch(T){n=T}e()}}catch(T){if(T&&n&&typeof T.stack=="string"){for(var a=T.stack.split(`
3
3
  `),F=n.stack.split(`
4
- `),v=o.length-1,m=F.length-1;v>=1&&m>=0&&o[v]!==F[m];)m--;for(;v>=1&&m>=0;v--,m--)if(o[v]!==F[m]){if(v!==1||m!==1)do if(v--,m--,m<0||o[v]!==F[m]){var P=`
5
- `+o[v].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&$.set(e,P),P}while(v>=1&&m>=0);break}}}finally{le=!1,ce.current=s,nr(),Error.prepareStackTrace=u}var U=e?e.displayName||e.name:"",N=U?Q(U):"";return typeof e=="function"&&$.set(e,N),N}function or(e,r,t){return we(e,!1)}function ir(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function q(e,r,t){if(e==null)return"";if(typeof e=="function")return we(e,ir(e));if(typeof e=="string")return Q(e);switch(e){case O:return Q("Suspense");case a:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return or(e.render);case f:return q(e.type,r,t);case C:{var n=e,u=n._payload,s=n._init;try{return q(s(u),r,t)}catch{}}}return""}var z=Object.prototype.hasOwnProperty,je={},xe=V.ReactDebugCurrentFrame;function ee(e){if(e){var r=e._owner,t=q(e.type,e._source,r?r.type:null);xe.setExtraStackFrame(t)}else xe.setExtraStackFrame(null)}function ur(e,r,t,n,u){{var s=Function.call.bind(z);for(var i in e)if(s(e,i)){var o=void 0;try{if(typeof e[i]!="function"){var F=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`.");throw F.name="Invariant Violation",F}o=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){o=v}o&&!(o instanceof Error)&&(ee(u),E("%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 o),ee(null)),o instanceof Error&&!(o.message in je)&&(je[o.message]=!0,ee(u),E("Failed %s type: %s",t,o.message),ee(null))}}}var sr=Array.isArray;function de(e){return sr(e)}function cr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function fr(e){try{return ke(e),!1}catch{return!0}}function ke(e){return""+e}function Ae(e){if(fr(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",cr(e)),ke(e)}var De=V.ReactCurrentOwner,lr={key:!0,ref:!0,__self:!0,__source:!0},Ve,Ie;function dr(e){if(z.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function vr(e){if(z.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function pr(e,r){typeof e.ref=="string"&&De.current}function mr(e,r){{var t=function(){Ve||(Ve=!0,E("%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))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function hr(e,r){{var t=function(){Ie||(Ie=!0,E("%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))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var gr=function(e,r,t,n,u,s,i){var o={$$typeof:l,type:e,key:r,ref:t,props:i,_owner:s};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function Rr(e,r,t,n,u){{var s,i={},o=null,F=null;t!==void 0&&(Ae(t),o=""+t),vr(r)&&(Ae(r.key),o=""+r.key),dr(r)&&(F=r.ref,pr(r,u));for(s in r)z.call(r,s)&&!lr.hasOwnProperty(s)&&(i[s]=r[s]);if(e&&e.defaultProps){var v=e.defaultProps;for(s in v)i[s]===void 0&&(i[s]=v[s])}if(o||F){var m=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&mr(i,m),F&&hr(i,m)}return gr(e,o,F,u,n,De.current,i)}}var ve=V.ReactCurrentOwner,We=V.ReactDebugCurrentFrame;function L(e){if(e){var r=e._owner,t=q(e.type,e._source,r?r.type:null);We.setExtraStackFrame(t)}else We.setExtraStackFrame(null)}var pe;pe=!1;function me(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function Ye(){{if(ve.current){var e=_(ve.current.type);if(e)return`
4
+ `),v=a.length-1,m=F.length-1;v>=1&&m>=0&&a[v]!==F[m];)m--;for(;v>=1&&m>=0;v--,m--)if(a[v]!==F[m]){if(v!==1||m!==1)do if(v--,m--,m<0||a[v]!==F[m]){var S=`
5
+ `+a[v].replace(" at new "," at ");return e.displayName&&S.includes("<anonymous>")&&(S=S.replace("<anonymous>",e.displayName)),typeof e=="function"&&$.set(e,S),S}while(v>=1&&m>=0);break}}}finally{ve=!1,le.current=f,ar(),Error.prepareStackTrace=s}var U=e?e.displayName||e.name:"",N=U?Q(U):"";return typeof e=="function"&&$.set(e,N),N}function sr(e,r,t){return xe(e,!1)}function ur(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function q(e,r,t){if(e==null)return"";if(typeof e=="function")return xe(e,ur(e));if(typeof e=="string")return Q(e);switch(e){case O:return Q("Suspense");case o:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return sr(e.render);case l:return q(e.type,r,t);case C:{var n=e,s=n._payload,f=n._init;try{return q(f(s),r,t)}catch{}}}return""}var z=Object.prototype.hasOwnProperty,ke={},De=I.ReactDebugCurrentFrame;function ee(e){if(e){var r=e._owner,t=q(e.type,e._source,r?r.type:null);De.setExtraStackFrame(t)}else De.setExtraStackFrame(null)}function cr(e,r,t,n,s){{var f=Function.call.bind(z);for(var i in e)if(f(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var F=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`.");throw F.name="Invariant Violation",F}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){a=v}a&&!(a instanceof Error)&&(ee(s),E("%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),ee(null)),a instanceof Error&&!(a.message in ke)&&(ke[a.message]=!0,ee(s),E("Failed %s type: %s",t,a.message),ee(null))}}}var fr=Array.isArray;function pe(e){return fr(e)}function lr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function dr(e){try{return Ae(e),!1}catch{return!0}}function Ae(e){return""+e}function Ve(e){if(dr(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",lr(e)),Ae(e)}var Ie=I.ReactCurrentOwner,vr={key:!0,ref:!0,__self:!0,__source:!0},We,Ye;function pr(e){if(z.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function mr(e){if(z.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function hr(e,r){typeof e.ref=="string"&&Ie.current}function gr(e,r){{var t=function(){We||(We=!0,E("%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))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function yr(e,r){{var t=function(){Ye||(Ye=!0,E("%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))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var Rr=function(e,r,t,n,s,f,i){var a={$$typeof:c,type:e,key:r,ref:t,props:i,_owner:f};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function Er(e,r,t,n,s){{var f,i={},a=null,F=null;t!==void 0&&(Ve(t),a=""+t),mr(r)&&(Ve(r.key),a=""+r.key),pr(r)&&(F=r.ref,hr(r,s));for(f in r)z.call(r,f)&&!vr.hasOwnProperty(f)&&(i[f]=r[f]);if(e&&e.defaultProps){var v=e.defaultProps;for(f in v)i[f]===void 0&&(i[f]=v[f])}if(a||F){var m=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&gr(i,m),F&&yr(i,m)}return Rr(e,a,F,s,n,Ie.current,i)}}var me=I.ReactCurrentOwner,Ne=I.ReactDebugCurrentFrame;function L(e){if(e){var r=e._owner,t=q(e.type,e._source,r?r.type:null);Ne.setExtraStackFrame(t)}else Ne.setExtraStackFrame(null)}var he;he=!1;function ge(e){return typeof e=="object"&&e!==null&&e.$$typeof===c}function Me(){{if(me.current){var e=b(me.current.type);if(e)return`
6
6
 
7
- Check the render method of \``+e+"`."}return""}}function yr(e){return""}var Ne={};function Er(e){{var r=Ye();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
7
+ Check the render method of \``+e+"`."}return""}}function br(e){return""}var Le={};function _r(e){{var r=Me();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
8
8
 
9
- Check the top-level render call using <`+t+">.")}return r}}function Me(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Er(r);if(Ne[t])return;Ne[t]=!0;var n="";e&&e._owner&&e._owner!==ve.current&&(n=" It was passed a child from "+_(e._owner.type)+"."),L(e),E('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),L(null)}}function Le(e,r){{if(typeof e!="object")return;if(de(e))for(var t=0;t<e.length;t++){var n=e[t];me(n)&&Me(n,r)}else if(me(e))e._store&&(e._store.validated=!0);else if(e){var u=ne(e);if(typeof u=="function"&&u!==e.entries)for(var s=u.call(e),i;!(i=s.next()).done;)me(i.value)&&Me(i.value,r)}}}function _r(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===f))t=r.propTypes;else return;if(t){var n=_(r);ur(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!pe){pe=!0;var u=_(r);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function br(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){L(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),L(null);break}}e.ref!==null&&(L(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}var Ue={};function Be(e,r,t,n,u,s){{var i=ue(e);if(!i){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var F=yr();F?o+=F:o+=Ye();var v;e===null?v="null":de(e)?v="array":e!==void 0&&e.$$typeof===l?(v="<"+(_(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,o)}var m=Rr(e,r,t,u,s);if(m==null)return m;if(i){var P=r.children;if(P!==void 0)if(n)if(de(P)){for(var U=0;U<P.length;U++)Le(P[U],e);Object.freeze&&Object.freeze(P)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Le(P,e)}if(z.call(r,"key")){var N=_(e),T=Object.keys(r).filter(function(Pr){return Pr!=="key"}),he=T.length>0?"{key: someKey, "+T.join(": ..., ")+": ...}":"{key: someKey}";if(!Ue[N+he]){var Or=T.length>0?"{"+T.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
9
+ Check the top-level render call using <`+t+">.")}return r}}function Ue(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=_r(r);if(Le[t])return;Le[t]=!0;var n="";e&&e._owner&&e._owner!==me.current&&(n=" It was passed a child from "+b(e._owner.type)+"."),L(e),E('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),L(null)}}function Be(e,r){{if(typeof e!="object")return;if(pe(e))for(var t=0;t<e.length;t++){var n=e[t];ge(n)&&Ue(n,r)}else if(ge(e))e._store&&(e._store.validated=!0);else if(e){var s=ae(e);if(typeof s=="function"&&s!==e.entries)for(var f=s.call(e),i;!(i=f.next()).done;)ge(i.value)&&Ue(i.value,r)}}}function Cr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===l))t=r.propTypes;else return;if(t){var n=b(r);cr(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!he){he=!0;var s=b(r);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Fr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){L(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),L(null);break}}e.ref!==null&&(L(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}var Je={};function Ke(e,r,t,n,s,f){{var i=ce(e);if(!i){var a="";(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.");var F=br();F?a+=F:a+=Me();var v;e===null?v="null":pe(e)?v="array":e!==void 0&&e.$$typeof===c?(v="<"+(b(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,a)}var m=Er(e,r,t,s,f);if(m==null)return m;if(i){var S=r.children;if(S!==void 0)if(n)if(pe(S)){for(var U=0;U<S.length;U++)Be(S[U],e);Object.freeze&&Object.freeze(S)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Be(S,e)}if(z.call(r,"key")){var N=b(e),T=Object.keys(r).filter(function(jr){return jr!=="key"}),ye=T.length>0?"{key: someKey, "+T.join(": ..., ")+": ...}":"{key: someKey}";if(!Je[N+ye]){var Pr=T.length>0?"{"+T.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
10
10
  let props = %s;
11
11
  <%s {...props} />
12
12
  React keys must be passed directly to JSX without using spread:
13
13
  let props = %s;
14
- <%s key={someKey} {...props} />`,he,N,Or,N),Ue[N+he]=!0}}return e===g?br(m):_r(m),m}}function Cr(e,r,t){return Be(e,r,t,!0)}function Fr(e,r,t){return Be(e,r,t,!1)}var Tr=Fr,Sr=Cr;J.Fragment=g,J.jsx=Tr,J.jsxs=Sr})()),J}var ye;function Xe(){return ye||(ye=1,process.env.NODE_ENV==="production"?X.exports=Ge():X.exports=ze()),X.exports}var H=Xe();const re=h.createContext({theme:"default"}),Ee=({theme:c="default",children:l})=>{const y={theme:c,className:`form-engine-theme-${c}`};return H.jsx(re.Provider,{value:y,children:l})};Ee.displayName="FormEngineProvider";const te=h.forwardRef(function({src:l,form:y,submission:g,options:w={},onSubmit:j,onChange:S,onError:b,onRender:d,onCustomEvent:O,onSubmitDone:a,onFormLoad:f,onAttach:C,onBuild:D,onFocus:R,onBlur:x,onInitialized:ne,formioform:V,...E},ae){const K=h.useRef(null),k=h.useRef(null),oe=h.useRef(null),Z=h.useRef(null),ie=h.useContext(re);return h.useImperativeHandle(ae,()=>({get formio(){return k.current}})),h.useEffect(()=>{const Y=l||y;if(!Y||!K.current)return;const ue={...w},se=V||W.Form,M=new se(K.current,Y,ue);return oe.current=M,Z.current=M.ready.then(_=>(k.current=_,l?_.src=Y:_.form=Y,_)),M.onAny(function(_,...A){if(_.startsWith("formio.")){const I="on"+_.charAt(7).toUpperCase()+_.slice(8),G={onSubmit:j,onChange:S,onError:b,onRender:d,onCustomEvent:O,onSubmitDone:a,onFormLoad:f,onAttach:C,onBuild:D,onFocus:R,onBlur:x,onInitialized:ne,...E};typeof G[I]=="function"&&G[I](...A)}}),Z.current.then(()=>{g&&k.current&&(k.current.submission=g)}),()=>{k.current&&(k.current.destroy(!0),k.current=null)}},[l,y]),h.useEffect(()=>{g&&k.current&&(k.current.submission=g)},[g]),H.jsx("div",{ref:K,className:ie?.className||""})});te.displayName="FormRenderer";const _e=({form:c,options:l={},onChange:y,onSaveComponent:g,onUpdateComponent:w,onDeleteComponent:j,onCancelComponent:S,onEditComponent:b,Builder:d})=>{const O=h.useRef(null),a=h.useRef(null);return h.useEffect(()=>{if(!O.current)return;const f=d||W.FormBuilder,C={...c},D={...l};a.current&&a.current.instance?.destroy(!0);const R=new f(O.current.firstChild,C,D);a.current=R,R.ready.then(()=>{x(),g&&R.instance.on("saveComponent",g),w&&R.instance.on("updateComponent",w),j&&R.instance.on("removeComponent",j),S&&R.instance.on("cancelComponent",S),b&&R.instance.on("editComponent",b),R.instance.on("addComponent",x),R.instance.on("saveComponent",x),R.instance.on("updateComponent",x),R.instance.on("removeComponent",x),R.instance.on("deleteComponent",x),R.instance.on("pdfUploaded",x)});function x(){typeof y=="function"&&a.current?.instance&&y(a.current.instance.form)}return()=>{a.current?.instance&&(a.current.instance.destroy(!0),a.current=null)}},[c?.display]),H.jsx("div",{ref:O,children:H.jsx("div",{})})};_e.displayName="FormBuilder";function He({type:c,label:l,icon:y,group:g="basic",weight:w=10,defaultValue:j="",settingsForm:S,render:b}){const d=W.Components.components.field;return class Je extends d{static get builderInfo(){return{title:l,icon:y||"cog",group:g,documentation:"",weight:w,schema:Je.schema()}}static schema(){return d.schema({type:c,label:l,defaultValue:j??""})}static editForm=S;constructor(a,f,C){super(a,f,C),this._root=null}updateValue=a=>{const f=a??this.getValue(),C=f!==void 0?this.hasChanged(f,this.dataValue):!1;return this.dataValue=Array.isArray(f)?[...f]:f,this.updateOnChange({},C),!0};render(){return super.render(`<div ref="react-${this.id}"></div>`)}attach(a){super.attach(a),this.loadRefs(a,{[`react-${this.id}`]:"single"});const f=this.refs[`react-${this.id}`];return f&&(this._root=Ke.createRoot(f),this._root.render(b({component:this.component,value:this.dataValue,onChange:this.updateValue,data:this.data})),this.shouldSetValue&&(this.setValue(this.dataForSetting),this.updateValue(this.dataForSetting))),Promise.resolve()}detach(){this.refs[`react-${this.id}`]&&this._root&&(this._root.unmount(),this._root=null),super.detach()}setValue(a){this._root?(this._root.render(b({component:this.component,value:a,onChange:this.updateValue,data:this.data})),this.shouldSetValue=!1):(this.shouldSetValue=!0,this.dataForSetting=a)}getValue(){return this.dataValue}}}function Ze(c,l){W.Formio.registerComponent(c,l)}const Qe=c=>{if(c&&c.components){const l=c.components.filter(y=>y.action!=="submit");return{display:c.display,components:l}}return c},$e=c=>{const l=c?.components;if(l){const y=l.map(g=>({...g,autofocus:!1}));return{...c,components:y}}return c},qe=W.Components.components.field,er=W.Components.baseEditForm,rr=W.Formio;p.Form=te,p.FormBuilder=_e,p.FormEngineContext=re,p.FormEngineProvider=Ee,p.FormRenderer=te,p.Formio=rr,p.ReactComponent=qe,p.baseEditForm=er,p.createFormComponent=He,p.registerComponent=Ze,p.removeAutoFocusFormio=$e,p.removeSubmitFormio=Qe,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
14
+ <%s key={someKey} {...props} />`,ye,N,Pr,N),Je[N+ye]=!0}}return e===y?Fr(m):Cr(m),m}}function Tr(e,r,t){return Ke(e,r,t,!0)}function wr(e,r,t){return Ke(e,r,t,!1)}var Or=wr,Sr=Tr;J.Fragment=y,J.jsx=Or,J.jsxs=Sr})()),J}var be;function Ze(){return be||(be=1,process.env.NODE_ENV==="production"?X.exports=Xe():X.exports=He()),X.exports}var H=Ze();const re=h.createContext({theme:"default"}),_e=({theme:u="default",children:c})=>{const g={theme:u,className:`form-engine-theme-${u}`};return H.jsx(re.Provider,{value:g,children:c})};_e.displayName="FormEngineProvider";const te=h.forwardRef(function({src:c,form:g,submission:y,options:P={},onSubmit:j,onChange:w,onError:_,onRender:d,onCustomEvent:O,onSubmitDone:o,onFormLoad:l,onAttach:C,onBuild:V,onFocus:R,onBlur:x,onInitialized:ae,formioform:I,...E},ie){const K=h.useRef(null),k=h.useRef(null),se=h.useRef(null),Z=h.useRef(null),ue=h.useContext(re);return h.useImperativeHandle(ie,()=>({get formio(){return k.current}})),h.useEffect(()=>{const Y=c||g;if(!Y||!K.current)return;const ce={...P},fe=I||D.Form,M=new fe(K.current,Y,ce);return se.current=M,Z.current=M.ready.then(b=>(k.current=b,c?b.src=Y:b.form=Y,b)),M.onAny(function(b,...A){if(b.startsWith("formio.")){const W="on"+b.charAt(7).toUpperCase()+b.slice(8),G={onSubmit:j,onChange:w,onError:_,onRender:d,onCustomEvent:O,onSubmitDone:o,onFormLoad:l,onAttach:C,onBuild:V,onFocus:R,onBlur:x,onInitialized:ae,...E};typeof G[W]=="function"&&G[W](...A)}}),Z.current.then(()=>{y&&k.current&&(k.current.submission=y)}),()=>{k.current&&(k.current.destroy(!0),k.current=null)}},[c,g]),h.useEffect(()=>{y&&k.current&&(k.current.submission=y)},[y]),H.jsx("div",{ref:K,className:ue?.className||""})});te.displayName="FormRenderer";const Ce=({form:u,options:c={},onChange:g,onSaveComponent:y,onUpdateComponent:P,onDeleteComponent:j,onCancelComponent:w,onEditComponent:_,Builder:d})=>{const O=h.useRef(null),o=h.useRef(null);return h.useEffect(()=>{if(!O.current)return;const l=d||D.FormBuilder,C={...u},V={...c};o.current&&o.current.instance?.destroy(!0);const R=new l(O.current.firstChild,C,V);o.current=R,R.ready.then(()=>{x(),y&&R.instance.on("saveComponent",y),P&&R.instance.on("updateComponent",P),j&&R.instance.on("removeComponent",j),w&&R.instance.on("cancelComponent",w),_&&R.instance.on("editComponent",_),R.instance.on("addComponent",x),R.instance.on("saveComponent",x),R.instance.on("updateComponent",x),R.instance.on("removeComponent",x),R.instance.on("deleteComponent",x),R.instance.on("pdfUploaded",x)});function x(){typeof g=="function"&&o.current?.instance&&g(o.current.instance.form)}return()=>{o.current?.instance&&(o.current.instance.destroy(!0),o.current=null)}},[u?.display]),H.jsx("div",{ref:O,children:H.jsx("div",{})})};Ce.displayName="FormBuilder";function Qe({type:u,label:c,icon:g,group:y="basic",weight:P=10,defaultValue:j="",settingsForm:w,render:_}){const d=D.Components.components.field;return class Ge extends d{static get builderInfo(){return{title:c,icon:g||"cog",group:y,documentation:"",weight:P,schema:Ge.schema()}}static schema(){return d.schema({type:u,label:c,defaultValue:j??""})}static editForm=w;constructor(o,l,C){super(o,l,C),this._root=null}updateValue=o=>{const l=o??this.getValue(),C=l!==void 0?this.hasChanged(l,this.dataValue):!1;return this.dataValue=Array.isArray(l)?[...l]:l,this.updateOnChange({},C),!0};render(){return super.render(`<div ref="react-${this.id}"></div>`)}attach(o){super.attach(o),this.loadRefs(o,{[`react-${this.id}`]:"single"});const l=this.refs[`react-${this.id}`];return l&&(this._root=ze.createRoot(l),this._root.render(_({component:this.component,value:this.dataValue,onChange:this.updateValue,data:this.data})),this.shouldSetValue&&(this.setValue(this.dataForSetting),this.updateValue(this.dataForSetting))),Promise.resolve()}detach(){this.refs[`react-${this.id}`]&&this._root&&(this._root.unmount(),this._root=null),super.detach()}setValue(o){this._root?(this._root.render(_({component:this.component,value:o,onChange:this.updateValue,data:this.data})),this.shouldSetValue=!1):(this.shouldSetValue=!0,this.dataForSetting=o)}getValue(){return this.dataValue}}}function $e(u,c){D.Formio.registerComponent(u,c)}const qe=u=>{if(u&&u.components){const c=u.components.filter(g=>g.action!=="submit");return{display:u.display,components:c}}return u},er=u=>{const c=u?.components;if(c){const g=c.map(y=>({...y,autofocus:!1}));return{...u,components:g}}return u},ne=D.Components.components?.component;if(ne?.prototype){const u=Object.getOwnPropertyDescriptor(ne.prototype,"wysiwygDefault");u?.get&&Object.defineProperty(ne.prototype,"wysiwygDefault",{get(){const c=u.get.call(this);return c?.ace&&delete c.ace.theme,c}})}const oe=D.Components.components?.editgrid;if(oe?.prototype?.saveRow){const u=oe.prototype.saveRow;oe.prototype.saveRow=function(c,g){return this.root||(this.root={}),u.call(this,c,g)}}const rr=D.Components.components.field,tr=D.Components.baseEditForm,nr=D.Formio;p.Form=te,p.FormBuilder=Ce,p.FormEngineContext=re,p.FormEngineProvider=_e,p.FormRenderer=te,p.Formio=nr,p.ReactComponent=rr,p.baseEditForm=tr,p.createFormComponent=Qe,p.registerComponent=$e,p.removeAutoFocusFormio=er,p.removeSubmitFormio=qe,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-formio-engine",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Form engine with builder and renderer - formiojs-powered with React functional components",
5
5
  "type": "module",
6
6
  "main": "dist/form-engine.umd.js",
@@ -10,9 +10,10 @@
10
10
  */
11
11
  @import '@formio/js/dist/formio.full.css';
12
12
 
13
- /* Make builder sidebar component buttons uniform width */
13
+ /* Make builder sidebar component buttons uniform width with spacing */
14
14
  .formcomponents .btn.formcomponent {
15
15
  display: block;
16
16
  width: 100%;
17
17
  text-align: left;
18
+ margin: 4px 0 !important;
18
19
  }