@ea-lab/reactive-json 0.0.31 → 0.0.33

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.
Files changed (61) hide show
  1. package/dist/HashChangeListener--8zTyUoR.js +21284 -0
  2. package/dist/component/action/HashChangeListener.js +1 -1
  3. package/dist/component/action/MessageListener.js +1 -1
  4. package/dist/component/action/Popover.js +1 -1
  5. package/dist/component/action/ReactOnEvent.js +1 -1
  6. package/dist/component/action/Redirect.js +1 -1
  7. package/dist/component/action/Tooltip.js +1 -1
  8. package/dist/component/action/index.js +1 -1
  9. package/dist/component/element/form/CheckBoxField.js +2 -3
  10. package/dist/component/element/form/DateField.js +2 -3
  11. package/dist/component/element/form/NumberField.js +3 -2
  12. package/dist/component/element/form/SelectField.js +2 -3
  13. package/dist/component/element/form/TextAreaField.js +2 -3
  14. package/dist/component/element/form/TextField.js +2 -3
  15. package/dist/component/element/form/formElementsCommon.js +1 -1
  16. package/dist/component/element/form/index.js +8 -9
  17. package/dist/component/element/html/AccordionItem.js +1 -1
  18. package/dist/component/element/html/FolderSortableTree.js +1 -1
  19. package/dist/component/element/html/FormatNumeral.js +1 -1
  20. package/dist/component/element/html/Html.js +1 -1
  21. package/dist/component/element/html/LabelFromValue.js +1 -1
  22. package/dist/component/element/html/Modal.js +1 -1
  23. package/dist/component/element/html/PreformattedMarkup.js +1 -1
  24. package/dist/component/element/html/SortableTreeItemCollapseButton.js +1 -1
  25. package/dist/component/element/html/Tabs.js +1 -1
  26. package/dist/component/element/html/index.js +1 -1
  27. package/dist/component/element/index.js +17 -18
  28. package/dist/component/element/special/BootstrapElement.js +1 -1
  29. package/dist/component/element/special/Count.js +1 -1
  30. package/dist/component/element/special/DataFilter.js +1 -1
  31. package/dist/component/element/special/DelayedActions.js +1 -1
  32. package/dist/component/element/special/Phantom.js +1 -1
  33. package/dist/component/element/special/ReactiveJsonSubroot.js +1 -1
  34. package/dist/component/element/special/Switch.js +2 -2
  35. package/dist/component/element/special/index.js +1 -1
  36. package/dist/component/hook/index.js +1 -1
  37. package/dist/component/hook/usePagination.js +1 -1
  38. package/dist/component/index.js +40 -41
  39. package/dist/component/reaction/addData.js +1 -1
  40. package/dist/component/reaction/fetchData.js +1 -1
  41. package/dist/component/reaction/index.js +1 -1
  42. package/dist/component/reaction/moveData.js +1 -1
  43. package/dist/component/reaction/postMessage.js +1 -1
  44. package/dist/component/reaction/redirectNow.js +1 -1
  45. package/dist/component/reaction/removeData.js +1 -1
  46. package/dist/component/reaction/setClipboardData.js +1 -1
  47. package/dist/component/reaction/setData.js +1 -1
  48. package/dist/component/reaction/submitData.js +1 -1
  49. package/dist/engine/Actions.js +1 -1
  50. package/dist/engine/ReactiveJsonRoot.js +1 -1
  51. package/dist/engine/TemplateSystem.js +1 -1
  52. package/dist/engine/View.js +2 -3
  53. package/dist/engine/index.js +1 -1
  54. package/dist/engine/utility/formatString.js +1 -1
  55. package/dist/main.js +65 -66
  56. package/dist/usePagination-D5Fkvhsw.js +358 -0
  57. package/package.json +1 -1
  58. package/dist/HashChangeListener-DQyOQdFl.js +0 -20151
  59. package/dist/NumberField-BCFUb50M.js +0 -1129
  60. package/dist/ThemeProvider-BTKQI5kV.js +0 -88
  61. package/dist/usePagination-B0yFkBzE.js +0 -276
@@ -1,1129 +0,0 @@
1
- import { jsx as I, jsxs as be, Fragment as Ke } from "react/jsx-runtime";
2
- import * as A from "react";
3
- import { useContext as B, useMemo as Me, useState as Ze } from "react";
4
- import { GlobalDataContext as Qe } from "./engine/GlobalDataContext.js";
5
- import { g as ke, c as q, u as D, a as er, b as rr } from "./ThemeProvider-BTKQI5kV.js";
6
- var Q = { exports: {} }, ee = { exports: {} }, C = {};
7
- /** @license React v16.13.1
8
- * react-is.production.min.js
9
- *
10
- * Copyright (c) Facebook, Inc. and its affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- */
15
- var Se;
16
- function tr() {
17
- if (Se) return C;
18
- Se = 1;
19
- var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, a = e ? Symbol.for("react.portal") : 60106, t = e ? Symbol.for("react.fragment") : 60107, c = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, f = e ? Symbol.for("react.context") : 60110, y = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, b = e ? Symbol.for("react.suspense") : 60113, $ = e ? Symbol.for("react.suspense_list") : 60120, O = e ? Symbol.for("react.memo") : 60115, N = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, F = e ? Symbol.for("react.fundamental") : 60117, M = e ? Symbol.for("react.responder") : 60118, U = e ? Symbol.for("react.scope") : 60119;
20
- function j(s) {
21
- if (typeof s == "object" && s !== null) {
22
- var L = s.$$typeof;
23
- switch (L) {
24
- case n:
25
- switch (s = s.type, s) {
26
- case y:
27
- case d:
28
- case t:
29
- case o:
30
- case c:
31
- case b:
32
- return s;
33
- default:
34
- switch (s = s && s.$$typeof, s) {
35
- case f:
36
- case p:
37
- case N:
38
- case O:
39
- case l:
40
- return s;
41
- default:
42
- return L;
43
- }
44
- }
45
- case a:
46
- return L;
47
- }
48
- }
49
- }
50
- function P(s) {
51
- return j(s) === d;
52
- }
53
- return C.AsyncMode = y, C.ConcurrentMode = d, C.ContextConsumer = f, C.ContextProvider = l, C.Element = n, C.ForwardRef = p, C.Fragment = t, C.Lazy = N, C.Memo = O, C.Portal = a, C.Profiler = o, C.StrictMode = c, C.Suspense = b, C.isAsyncMode = function(s) {
54
- return P(s) || j(s) === y;
55
- }, C.isConcurrentMode = P, C.isContextConsumer = function(s) {
56
- return j(s) === f;
57
- }, C.isContextProvider = function(s) {
58
- return j(s) === l;
59
- }, C.isElement = function(s) {
60
- return typeof s == "object" && s !== null && s.$$typeof === n;
61
- }, C.isForwardRef = function(s) {
62
- return j(s) === p;
63
- }, C.isFragment = function(s) {
64
- return j(s) === t;
65
- }, C.isLazy = function(s) {
66
- return j(s) === N;
67
- }, C.isMemo = function(s) {
68
- return j(s) === O;
69
- }, C.isPortal = function(s) {
70
- return j(s) === a;
71
- }, C.isProfiler = function(s) {
72
- return j(s) === o;
73
- }, C.isStrictMode = function(s) {
74
- return j(s) === c;
75
- }, C.isSuspense = function(s) {
76
- return j(s) === b;
77
- }, C.isValidElementType = function(s) {
78
- return typeof s == "string" || typeof s == "function" || s === t || s === d || s === o || s === c || s === b || s === $ || typeof s == "object" && s !== null && (s.$$typeof === N || s.$$typeof === O || s.$$typeof === l || s.$$typeof === f || s.$$typeof === p || s.$$typeof === F || s.$$typeof === M || s.$$typeof === U || s.$$typeof === x);
79
- }, C.typeOf = j, C;
80
- }
81
- var S = {};
82
- /** @license React v16.13.1
83
- * react-is.development.js
84
- *
85
- * Copyright (c) Facebook, Inc. and its affiliates.
86
- *
87
- * This source code is licensed under the MIT license found in the
88
- * LICENSE file in the root directory of this source tree.
89
- */
90
- var _e;
91
- function nr() {
92
- return _e || (_e = 1, process.env.NODE_ENV !== "production" && function() {
93
- var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, a = e ? Symbol.for("react.portal") : 60106, t = e ? Symbol.for("react.fragment") : 60107, c = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, f = e ? Symbol.for("react.context") : 60110, y = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, b = e ? Symbol.for("react.suspense") : 60113, $ = e ? Symbol.for("react.suspense_list") : 60120, O = e ? Symbol.for("react.memo") : 60115, N = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, F = e ? Symbol.for("react.fundamental") : 60117, M = e ? Symbol.for("react.responder") : 60118, U = e ? Symbol.for("react.scope") : 60119;
94
- function j(i) {
95
- return typeof i == "string" || typeof i == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
96
- i === t || i === d || i === o || i === c || i === b || i === $ || typeof i == "object" && i !== null && (i.$$typeof === N || i.$$typeof === O || i.$$typeof === l || i.$$typeof === f || i.$$typeof === p || i.$$typeof === F || i.$$typeof === M || i.$$typeof === U || i.$$typeof === x);
97
- }
98
- function P(i) {
99
- if (typeof i == "object" && i !== null) {
100
- var W = i.$$typeof;
101
- switch (W) {
102
- case n:
103
- var Z = i.type;
104
- switch (Z) {
105
- case y:
106
- case d:
107
- case t:
108
- case o:
109
- case c:
110
- case b:
111
- return Z;
112
- default:
113
- var Ce = Z && Z.$$typeof;
114
- switch (Ce) {
115
- case f:
116
- case p:
117
- case N:
118
- case O:
119
- case l:
120
- return Ce;
121
- default:
122
- return W;
123
- }
124
- }
125
- case a:
126
- return W;
127
- }
128
- }
129
- }
130
- var s = y, L = d, J = f, oe = l, ae = n, ie = p, X = t, se = N, ce = O, G = a, ue = o, Y = c, z = b, K = !1;
131
- function fe(i) {
132
- return K || (K = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), r(i) || P(i) === y;
133
- }
134
- function r(i) {
135
- return P(i) === d;
136
- }
137
- function u(i) {
138
- return P(i) === f;
139
- }
140
- function E(i) {
141
- return P(i) === l;
142
- }
143
- function h(i) {
144
- return typeof i == "object" && i !== null && i.$$typeof === n;
145
- }
146
- function v(i) {
147
- return P(i) === p;
148
- }
149
- function T(i) {
150
- return P(i) === t;
151
- }
152
- function m(i) {
153
- return P(i) === N;
154
- }
155
- function g(i) {
156
- return P(i) === O;
157
- }
158
- function R(i) {
159
- return P(i) === a;
160
- }
161
- function _(i) {
162
- return P(i) === o;
163
- }
164
- function w(i) {
165
- return P(i) === c;
166
- }
167
- function k(i) {
168
- return P(i) === b;
169
- }
170
- S.AsyncMode = s, S.ConcurrentMode = L, S.ContextConsumer = J, S.ContextProvider = oe, S.Element = ae, S.ForwardRef = ie, S.Fragment = X, S.Lazy = se, S.Memo = ce, S.Portal = G, S.Profiler = ue, S.StrictMode = Y, S.Suspense = z, S.isAsyncMode = fe, S.isConcurrentMode = r, S.isContextConsumer = u, S.isContextProvider = E, S.isElement = h, S.isForwardRef = v, S.isFragment = T, S.isLazy = m, S.isMemo = g, S.isPortal = R, S.isProfiler = _, S.isStrictMode = w, S.isSuspense = k, S.isValidElementType = j, S.typeOf = P;
171
- }()), S;
172
- }
173
- var Oe;
174
- function qe() {
175
- return Oe || (Oe = 1, process.env.NODE_ENV === "production" ? ee.exports = tr() : ee.exports = nr()), ee.exports;
176
- }
177
- /*
178
- object-assign
179
- (c) Sindre Sorhus
180
- @license MIT
181
- */
182
- var le, $e;
183
- function or() {
184
- if ($e) return le;
185
- $e = 1;
186
- var e = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable;
187
- function t(o) {
188
- if (o == null)
189
- throw new TypeError("Object.assign cannot be called with null or undefined");
190
- return Object(o);
191
- }
192
- function c() {
193
- try {
194
- if (!Object.assign)
195
- return !1;
196
- var o = new String("abc");
197
- if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
198
- return !1;
199
- for (var l = {}, f = 0; f < 10; f++)
200
- l["_" + String.fromCharCode(f)] = f;
201
- var y = Object.getOwnPropertyNames(l).map(function(p) {
202
- return l[p];
203
- });
204
- if (y.join("") !== "0123456789")
205
- return !1;
206
- var d = {};
207
- return "abcdefghijklmnopqrst".split("").forEach(function(p) {
208
- d[p] = p;
209
- }), Object.keys(Object.assign({}, d)).join("") === "abcdefghijklmnopqrst";
210
- } catch {
211
- return !1;
212
- }
213
- }
214
- return le = c() ? Object.assign : function(o, l) {
215
- for (var f, y = t(o), d, p = 1; p < arguments.length; p++) {
216
- f = Object(arguments[p]);
217
- for (var b in f)
218
- n.call(f, b) && (y[b] = f[b]);
219
- if (e) {
220
- d = e(f);
221
- for (var $ = 0; $ < d.length; $++)
222
- a.call(f, d[$]) && (y[d[$]] = f[d[$]]);
223
- }
224
- }
225
- return y;
226
- }, le;
227
- }
228
- var de, xe;
229
- function Ee() {
230
- if (xe) return de;
231
- xe = 1;
232
- var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
233
- return de = e, de;
234
- }
235
- var pe, Ie;
236
- function De() {
237
- return Ie || (Ie = 1, pe = Function.call.bind(Object.prototype.hasOwnProperty)), pe;
238
- }
239
- var ye, Ae;
240
- function ar() {
241
- if (Ae) return ye;
242
- Ae = 1;
243
- var e = function() {
244
- };
245
- if (process.env.NODE_ENV !== "production") {
246
- var n = /* @__PURE__ */ Ee(), a = {}, t = /* @__PURE__ */ De();
247
- e = function(o) {
248
- var l = "Warning: " + o;
249
- typeof console < "u" && console.error(l);
250
- try {
251
- throw new Error(l);
252
- } catch {
253
- }
254
- };
255
- }
256
- function c(o, l, f, y, d) {
257
- if (process.env.NODE_ENV !== "production") {
258
- for (var p in o)
259
- if (t(o, p)) {
260
- var b;
261
- try {
262
- if (typeof o[p] != "function") {
263
- var $ = Error(
264
- (y || "React class") + ": " + f + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
265
- );
266
- throw $.name = "Invariant Violation", $;
267
- }
268
- b = o[p](l, p, y, f, null, n);
269
- } catch (N) {
270
- b = N;
271
- }
272
- if (b && !(b instanceof Error) && e(
273
- (y || "React class") + ": type specification of " + f + " `" + p + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof b + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
274
- ), b instanceof Error && !(b.message in a)) {
275
- a[b.message] = !0;
276
- var O = d ? d() : "";
277
- e(
278
- "Failed " + f + " type: " + b.message + (O ?? "")
279
- );
280
- }
281
- }
282
- }
283
- }
284
- return c.resetWarningCache = function() {
285
- process.env.NODE_ENV !== "production" && (a = {});
286
- }, ye = c, ye;
287
- }
288
- var ve, Pe;
289
- function ir() {
290
- if (Pe) return ve;
291
- Pe = 1;
292
- var e = qe(), n = or(), a = /* @__PURE__ */ Ee(), t = /* @__PURE__ */ De(), c = /* @__PURE__ */ ar(), o = function() {
293
- };
294
- process.env.NODE_ENV !== "production" && (o = function(f) {
295
- var y = "Warning: " + f;
296
- typeof console < "u" && console.error(y);
297
- try {
298
- throw new Error(y);
299
- } catch {
300
- }
301
- });
302
- function l() {
303
- return null;
304
- }
305
- return ve = function(f, y) {
306
- var d = typeof Symbol == "function" && Symbol.iterator, p = "@@iterator";
307
- function b(r) {
308
- var u = r && (d && r[d] || r[p]);
309
- if (typeof u == "function")
310
- return u;
311
- }
312
- var $ = "<<anonymous>>", O = {
313
- array: M("array"),
314
- bigint: M("bigint"),
315
- bool: M("boolean"),
316
- func: M("function"),
317
- number: M("number"),
318
- object: M("object"),
319
- string: M("string"),
320
- symbol: M("symbol"),
321
- any: U(),
322
- arrayOf: j,
323
- element: P(),
324
- elementType: s(),
325
- instanceOf: L,
326
- node: ie(),
327
- objectOf: oe,
328
- oneOf: J,
329
- oneOfType: ae,
330
- shape: se,
331
- exact: ce
332
- };
333
- function N(r, u) {
334
- return r === u ? r !== 0 || 1 / r === 1 / u : r !== r && u !== u;
335
- }
336
- function x(r, u) {
337
- this.message = r, this.data = u && typeof u == "object" ? u : {}, this.stack = "";
338
- }
339
- x.prototype = Error.prototype;
340
- function F(r) {
341
- if (process.env.NODE_ENV !== "production")
342
- var u = {}, E = 0;
343
- function h(T, m, g, R, _, w, k) {
344
- if (R = R || $, w = w || g, k !== a) {
345
- if (y) {
346
- var i = new Error(
347
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
348
- );
349
- throw i.name = "Invariant Violation", i;
350
- } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
351
- var W = R + ":" + g;
352
- !u[W] && // Avoid spamming the console because they are often not actionable except for lib authors
353
- E < 3 && (o(
354
- "You are manually calling a React.PropTypes validation function for the `" + w + "` prop on `" + R + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
355
- ), u[W] = !0, E++);
356
- }
357
- }
358
- return m[g] == null ? T ? m[g] === null ? new x("The " + _ + " `" + w + "` is marked as required " + ("in `" + R + "`, but its value is `null`.")) : new x("The " + _ + " `" + w + "` is marked as required in " + ("`" + R + "`, but its value is `undefined`.")) : null : r(m, g, R, _, w);
359
- }
360
- var v = h.bind(null, !1);
361
- return v.isRequired = h.bind(null, !0), v;
362
- }
363
- function M(r) {
364
- function u(E, h, v, T, m, g) {
365
- var R = E[h], _ = Y(R);
366
- if (_ !== r) {
367
- var w = z(R);
368
- return new x(
369
- "Invalid " + T + " `" + m + "` of type " + ("`" + w + "` supplied to `" + v + "`, expected ") + ("`" + r + "`."),
370
- { expectedType: r }
371
- );
372
- }
373
- return null;
374
- }
375
- return F(u);
376
- }
377
- function U() {
378
- return F(l);
379
- }
380
- function j(r) {
381
- function u(E, h, v, T, m) {
382
- if (typeof r != "function")
383
- return new x("Property `" + m + "` of component `" + v + "` has invalid PropType notation inside arrayOf.");
384
- var g = E[h];
385
- if (!Array.isArray(g)) {
386
- var R = Y(g);
387
- return new x("Invalid " + T + " `" + m + "` of type " + ("`" + R + "` supplied to `" + v + "`, expected an array."));
388
- }
389
- for (var _ = 0; _ < g.length; _++) {
390
- var w = r(g, _, v, T, m + "[" + _ + "]", a);
391
- if (w instanceof Error)
392
- return w;
393
- }
394
- return null;
395
- }
396
- return F(u);
397
- }
398
- function P() {
399
- function r(u, E, h, v, T) {
400
- var m = u[E];
401
- if (!f(m)) {
402
- var g = Y(m);
403
- return new x("Invalid " + v + " `" + T + "` of type " + ("`" + g + "` supplied to `" + h + "`, expected a single ReactElement."));
404
- }
405
- return null;
406
- }
407
- return F(r);
408
- }
409
- function s() {
410
- function r(u, E, h, v, T) {
411
- var m = u[E];
412
- if (!e.isValidElementType(m)) {
413
- var g = Y(m);
414
- return new x("Invalid " + v + " `" + T + "` of type " + ("`" + g + "` supplied to `" + h + "`, expected a single ReactElement type."));
415
- }
416
- return null;
417
- }
418
- return F(r);
419
- }
420
- function L(r) {
421
- function u(E, h, v, T, m) {
422
- if (!(E[h] instanceof r)) {
423
- var g = r.name || $, R = fe(E[h]);
424
- return new x("Invalid " + T + " `" + m + "` of type " + ("`" + R + "` supplied to `" + v + "`, expected ") + ("instance of `" + g + "`."));
425
- }
426
- return null;
427
- }
428
- return F(u);
429
- }
430
- function J(r) {
431
- if (!Array.isArray(r))
432
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
433
- "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
434
- ) : o("Invalid argument supplied to oneOf, expected an array.")), l;
435
- function u(E, h, v, T, m) {
436
- for (var g = E[h], R = 0; R < r.length; R++)
437
- if (N(g, r[R]))
438
- return null;
439
- var _ = JSON.stringify(r, function(k, i) {
440
- var W = z(i);
441
- return W === "symbol" ? String(i) : i;
442
- });
443
- return new x("Invalid " + T + " `" + m + "` of value `" + String(g) + "` " + ("supplied to `" + v + "`, expected one of " + _ + "."));
444
- }
445
- return F(u);
446
- }
447
- function oe(r) {
448
- function u(E, h, v, T, m) {
449
- if (typeof r != "function")
450
- return new x("Property `" + m + "` of component `" + v + "` has invalid PropType notation inside objectOf.");
451
- var g = E[h], R = Y(g);
452
- if (R !== "object")
453
- return new x("Invalid " + T + " `" + m + "` of type " + ("`" + R + "` supplied to `" + v + "`, expected an object."));
454
- for (var _ in g)
455
- if (t(g, _)) {
456
- var w = r(g, _, v, T, m + "." + _, a);
457
- if (w instanceof Error)
458
- return w;
459
- }
460
- return null;
461
- }
462
- return F(u);
463
- }
464
- function ae(r) {
465
- if (!Array.isArray(r))
466
- return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), l;
467
- for (var u = 0; u < r.length; u++) {
468
- var E = r[u];
469
- if (typeof E != "function")
470
- return o(
471
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + K(E) + " at index " + u + "."
472
- ), l;
473
- }
474
- function h(v, T, m, g, R) {
475
- for (var _ = [], w = 0; w < r.length; w++) {
476
- var k = r[w], i = k(v, T, m, g, R, a);
477
- if (i == null)
478
- return null;
479
- i.data && t(i.data, "expectedType") && _.push(i.data.expectedType);
480
- }
481
- var W = _.length > 0 ? ", expected one of type [" + _.join(", ") + "]" : "";
482
- return new x("Invalid " + g + " `" + R + "` supplied to " + ("`" + m + "`" + W + "."));
483
- }
484
- return F(h);
485
- }
486
- function ie() {
487
- function r(u, E, h, v, T) {
488
- return G(u[E]) ? null : new x("Invalid " + v + " `" + T + "` supplied to " + ("`" + h + "`, expected a ReactNode."));
489
- }
490
- return F(r);
491
- }
492
- function X(r, u, E, h, v) {
493
- return new x(
494
- (r || "React class") + ": " + u + " type `" + E + "." + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + v + "`."
495
- );
496
- }
497
- function se(r) {
498
- function u(E, h, v, T, m) {
499
- var g = E[h], R = Y(g);
500
- if (R !== "object")
501
- return new x("Invalid " + T + " `" + m + "` of type `" + R + "` " + ("supplied to `" + v + "`, expected `object`."));
502
- for (var _ in r) {
503
- var w = r[_];
504
- if (typeof w != "function")
505
- return X(v, T, m, _, z(w));
506
- var k = w(g, _, v, T, m + "." + _, a);
507
- if (k)
508
- return k;
509
- }
510
- return null;
511
- }
512
- return F(u);
513
- }
514
- function ce(r) {
515
- function u(E, h, v, T, m) {
516
- var g = E[h], R = Y(g);
517
- if (R !== "object")
518
- return new x("Invalid " + T + " `" + m + "` of type `" + R + "` " + ("supplied to `" + v + "`, expected `object`."));
519
- var _ = n({}, E[h], r);
520
- for (var w in _) {
521
- var k = r[w];
522
- if (t(r, w) && typeof k != "function")
523
- return X(v, T, m, w, z(k));
524
- if (!k)
525
- return new x(
526
- "Invalid " + T + " `" + m + "` key `" + w + "` supplied to `" + v + "`.\nBad object: " + JSON.stringify(E[h], null, " ") + `
527
- Valid keys: ` + JSON.stringify(Object.keys(r), null, " ")
528
- );
529
- var i = k(g, w, v, T, m + "." + w, a);
530
- if (i)
531
- return i;
532
- }
533
- return null;
534
- }
535
- return F(u);
536
- }
537
- function G(r) {
538
- switch (typeof r) {
539
- case "number":
540
- case "string":
541
- case "undefined":
542
- return !0;
543
- case "boolean":
544
- return !r;
545
- case "object":
546
- if (Array.isArray(r))
547
- return r.every(G);
548
- if (r === null || f(r))
549
- return !0;
550
- var u = b(r);
551
- if (u) {
552
- var E = u.call(r), h;
553
- if (u !== r.entries) {
554
- for (; !(h = E.next()).done; )
555
- if (!G(h.value))
556
- return !1;
557
- } else
558
- for (; !(h = E.next()).done; ) {
559
- var v = h.value;
560
- if (v && !G(v[1]))
561
- return !1;
562
- }
563
- } else
564
- return !1;
565
- return !0;
566
- default:
567
- return !1;
568
- }
569
- }
570
- function ue(r, u) {
571
- return r === "symbol" ? !0 : u ? u["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && u instanceof Symbol : !1;
572
- }
573
- function Y(r) {
574
- var u = typeof r;
575
- return Array.isArray(r) ? "array" : r instanceof RegExp ? "object" : ue(u, r) ? "symbol" : u;
576
- }
577
- function z(r) {
578
- if (typeof r > "u" || r === null)
579
- return "" + r;
580
- var u = Y(r);
581
- if (u === "object") {
582
- if (r instanceof Date)
583
- return "date";
584
- if (r instanceof RegExp)
585
- return "regexp";
586
- }
587
- return u;
588
- }
589
- function K(r) {
590
- var u = z(r);
591
- switch (u) {
592
- case "array":
593
- case "object":
594
- return "an " + u;
595
- case "boolean":
596
- case "date":
597
- case "regexp":
598
- return "a " + u;
599
- default:
600
- return u;
601
- }
602
- }
603
- function fe(r) {
604
- return !r.constructor || !r.constructor.name ? $ : r.constructor.name;
605
- }
606
- return O.checkPropTypes = c, O.resetWarningCache = c.resetWarningCache, O.PropTypes = O, O;
607
- }, ve;
608
- }
609
- var me, Fe;
610
- function sr() {
611
- if (Fe) return me;
612
- Fe = 1;
613
- var e = /* @__PURE__ */ Ee();
614
- function n() {
615
- }
616
- function a() {
617
- }
618
- return a.resetWarningCache = n, me = function() {
619
- function t(l, f, y, d, p, b) {
620
- if (b !== e) {
621
- var $ = new Error(
622
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
623
- );
624
- throw $.name = "Invariant Violation", $;
625
- }
626
- }
627
- t.isRequired = t;
628
- function c() {
629
- return t;
630
- }
631
- var o = {
632
- array: t,
633
- bigint: t,
634
- bool: t,
635
- func: t,
636
- number: t,
637
- object: t,
638
- string: t,
639
- symbol: t,
640
- any: t,
641
- arrayOf: c,
642
- element: t,
643
- elementType: t,
644
- instanceOf: c,
645
- node: t,
646
- objectOf: c,
647
- oneOf: c,
648
- oneOfType: c,
649
- shape: c,
650
- exact: c,
651
- checkPropTypes: a,
652
- resetWarningCache: n
653
- };
654
- return o.PropTypes = o, o;
655
- }, me;
656
- }
657
- var je;
658
- function cr() {
659
- if (je) return Q.exports;
660
- if (je = 1, process.env.NODE_ENV !== "production") {
661
- var e = qe(), n = !0;
662
- Q.exports = /* @__PURE__ */ ir()(e.isElement, n);
663
- } else
664
- Q.exports = /* @__PURE__ */ sr()();
665
- return Q.exports;
666
- }
667
- var ur = /* @__PURE__ */ cr();
668
- const H = /* @__PURE__ */ ke(ur), fr = {
669
- /**
670
- * Specify whether the feedback is for valid or invalid fields
671
- *
672
- * @type {('valid'|'invalid')}
673
- */
674
- type: H.string,
675
- /** Display feedback as a tooltip. */
676
- tooltip: H.bool,
677
- as: H.elementType
678
- }, ne = /* @__PURE__ */ A.forwardRef(
679
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
680
- ({
681
- as: e = "div",
682
- className: n,
683
- type: a = "valid",
684
- tooltip: t = !1,
685
- ...c
686
- }, o) => /* @__PURE__ */ I(e, {
687
- ...c,
688
- ref: o,
689
- className: q(n, `${a}-${t ? "tooltip" : "feedback"}`)
690
- })
691
- );
692
- ne.displayName = "Feedback";
693
- ne.propTypes = fr;
694
- const V = /* @__PURE__ */ A.createContext({}), Te = /* @__PURE__ */ A.forwardRef(({
695
- id: e,
696
- bsPrefix: n,
697
- className: a,
698
- type: t = "checkbox",
699
- isValid: c = !1,
700
- isInvalid: o = !1,
701
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
702
- as: l = "input",
703
- ...f
704
- }, y) => {
705
- const {
706
- controlId: d
707
- } = B(V);
708
- return n = D(n, "form-check-input"), /* @__PURE__ */ I(l, {
709
- ...f,
710
- ref: y,
711
- type: t,
712
- id: e || d,
713
- className: q(a, n, c && "is-valid", o && "is-invalid")
714
- });
715
- });
716
- Te.displayName = "FormCheckInput";
717
- const re = /* @__PURE__ */ A.forwardRef(({
718
- bsPrefix: e,
719
- className: n,
720
- htmlFor: a,
721
- ...t
722
- }, c) => {
723
- const {
724
- controlId: o
725
- } = B(V);
726
- return e = D(e, "form-check-label"), /* @__PURE__ */ I("label", {
727
- ...t,
728
- ref: c,
729
- htmlFor: a || o,
730
- className: q(n, e)
731
- });
732
- });
733
- re.displayName = "FormCheckLabel";
734
- function Rr(e, n) {
735
- let a = 0;
736
- return A.Children.map(e, (t) => /* @__PURE__ */ A.isValidElement(t) ? n(t, a++) : t);
737
- }
738
- function wr(e, n) {
739
- let a = 0;
740
- A.Children.forEach(e, (t) => {
741
- /* @__PURE__ */ A.isValidElement(t) && n(t, a++);
742
- });
743
- }
744
- function lr(e, n) {
745
- return A.Children.toArray(e).some((a) => /* @__PURE__ */ A.isValidElement(a) && a.type === n);
746
- }
747
- const Le = /* @__PURE__ */ A.forwardRef(({
748
- id: e,
749
- bsPrefix: n,
750
- bsSwitchPrefix: a,
751
- inline: t = !1,
752
- reverse: c = !1,
753
- disabled: o = !1,
754
- isValid: l = !1,
755
- isInvalid: f = !1,
756
- feedbackTooltip: y = !1,
757
- feedback: d,
758
- feedbackType: p,
759
- className: b,
760
- style: $,
761
- title: O = "",
762
- type: N = "checkbox",
763
- label: x,
764
- children: F,
765
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
766
- as: M = "input",
767
- ...U
768
- }, j) => {
769
- n = D(n, "form-check"), a = D(a, "form-switch");
770
- const {
771
- controlId: P
772
- } = B(V), s = Me(() => ({
773
- controlId: e || P
774
- }), [P, e]), L = !F && x != null && x !== !1 || lr(F, re), J = /* @__PURE__ */ I(Te, {
775
- ...U,
776
- type: N === "switch" ? "checkbox" : N,
777
- ref: j,
778
- isValid: l,
779
- isInvalid: f,
780
- disabled: o,
781
- as: M
782
- });
783
- return /* @__PURE__ */ I(V.Provider, {
784
- value: s,
785
- children: /* @__PURE__ */ I("div", {
786
- style: $,
787
- className: q(b, L && n, t && `${n}-inline`, c && `${n}-reverse`, N === "switch" && a),
788
- children: F || /* @__PURE__ */ be(Ke, {
789
- children: [J, L && /* @__PURE__ */ I(re, {
790
- title: O,
791
- children: x
792
- }), d && /* @__PURE__ */ I(ne, {
793
- type: p,
794
- tooltip: y,
795
- children: d
796
- })]
797
- })
798
- })
799
- });
800
- });
801
- Le.displayName = "FormCheck";
802
- const te = Object.assign(Le, {
803
- Input: Te,
804
- Label: re
805
- });
806
- var he, Ne;
807
- function dr() {
808
- if (Ne) return he;
809
- Ne = 1;
810
- var e = process.env.NODE_ENV !== "production", n = function() {
811
- };
812
- if (e) {
813
- var a = function(c, o) {
814
- var l = arguments.length;
815
- o = new Array(l > 1 ? l - 1 : 0);
816
- for (var f = 1; f < l; f++)
817
- o[f - 1] = arguments[f];
818
- var y = 0, d = "Warning: " + c.replace(/%s/g, function() {
819
- return o[y++];
820
- });
821
- typeof console < "u" && console.error(d);
822
- try {
823
- throw new Error(d);
824
- } catch {
825
- }
826
- };
827
- n = function(t, c, o) {
828
- var l = arguments.length;
829
- o = new Array(l > 2 ? l - 2 : 0);
830
- for (var f = 2; f < l; f++)
831
- o[f - 2] = arguments[f];
832
- if (c === void 0)
833
- throw new Error(
834
- "`warning(condition, format, ...args)` requires a warning message argument"
835
- );
836
- t || a.apply(null, [c].concat(o));
837
- };
838
- }
839
- return he = n, he;
840
- }
841
- var pr = dr();
842
- const Ye = /* @__PURE__ */ ke(pr), We = /* @__PURE__ */ A.forwardRef(({
843
- bsPrefix: e,
844
- type: n,
845
- size: a,
846
- htmlSize: t,
847
- id: c,
848
- className: o,
849
- isValid: l = !1,
850
- isInvalid: f = !1,
851
- plaintext: y,
852
- readOnly: d,
853
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
854
- as: p = "input",
855
- ...b
856
- }, $) => {
857
- const {
858
- controlId: O
859
- } = B(V);
860
- return e = D(e, "form-control"), process.env.NODE_ENV !== "production" && Ye(O == null || !c, "`controlId` is ignored on `<FormControl>` when `id` is specified."), /* @__PURE__ */ I(p, {
861
- ...b,
862
- type: n,
863
- size: t,
864
- ref: $,
865
- readOnly: d,
866
- id: c || O,
867
- className: q(o, y ? `${e}-plaintext` : e, a && `${e}-${a}`, n === "color" && `${e}-color`, l && "is-valid", f && "is-invalid")
868
- });
869
- });
870
- We.displayName = "FormControl";
871
- const yr = Object.assign(We, {
872
- Feedback: ne
873
- }), Ve = /* @__PURE__ */ A.forwardRef(({
874
- className: e,
875
- bsPrefix: n,
876
- as: a = "div",
877
- ...t
878
- }, c) => (n = D(n, "form-floating"), /* @__PURE__ */ I(a, {
879
- ref: c,
880
- className: q(e, n),
881
- ...t
882
- })));
883
- Ve.displayName = "FormFloating";
884
- const Re = /* @__PURE__ */ A.forwardRef(({
885
- controlId: e,
886
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
887
- as: n = "div",
888
- ...a
889
- }, t) => {
890
- const c = Me(() => ({
891
- controlId: e
892
- }), [e]);
893
- return /* @__PURE__ */ I(V.Provider, {
894
- value: c,
895
- children: /* @__PURE__ */ I(n, {
896
- ...a,
897
- ref: t
898
- })
899
- });
900
- });
901
- Re.displayName = "FormGroup";
902
- function vr({
903
- as: e,
904
- bsPrefix: n,
905
- className: a,
906
- ...t
907
- }) {
908
- n = D(n, "col");
909
- const c = er(), o = rr(), l = [], f = [];
910
- return c.forEach((y) => {
911
- const d = t[y];
912
- delete t[y];
913
- let p, b, $;
914
- typeof d == "object" && d != null ? {
915
- span: p,
916
- offset: b,
917
- order: $
918
- } = d : p = d;
919
- const O = y !== o ? `-${y}` : "";
920
- p && l.push(p === !0 ? `${n}${O}` : `${n}${O}-${p}`), $ != null && f.push(`order${O}-${$}`), b != null && f.push(`offset${O}-${b}`);
921
- }), [{
922
- ...t,
923
- className: q(a, ...l, ...f)
924
- }, {
925
- as: e,
926
- bsPrefix: n,
927
- spans: l
928
- }];
929
- }
930
- const Be = /* @__PURE__ */ A.forwardRef(
931
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
932
- (e, n) => {
933
- const [{
934
- className: a,
935
- ...t
936
- }, {
937
- as: c = "div",
938
- bsPrefix: o,
939
- spans: l
940
- }] = vr(e);
941
- return /* @__PURE__ */ I(c, {
942
- ...t,
943
- ref: n,
944
- className: q(a, !l.length && o)
945
- });
946
- }
947
- );
948
- Be.displayName = "Col";
949
- const Ue = /* @__PURE__ */ A.forwardRef(({
950
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
951
- as: e = "label",
952
- bsPrefix: n,
953
- column: a = !1,
954
- visuallyHidden: t = !1,
955
- className: c,
956
- htmlFor: o,
957
- ...l
958
- }, f) => {
959
- const {
960
- controlId: y
961
- } = B(V);
962
- n = D(n, "form-label");
963
- let d = "col-form-label";
964
- typeof a == "string" && (d = `${d} ${d}-${a}`);
965
- const p = q(c, n, t && "visually-hidden", a && d);
966
- return process.env.NODE_ENV !== "production" && Ye(y == null || !o, "`controlId` is ignored on `<FormLabel>` when `htmlFor` is specified."), o = o || y, a ? /* @__PURE__ */ I(Be, {
967
- ref: f,
968
- as: "label",
969
- className: p,
970
- htmlFor: o,
971
- ...l
972
- }) : /* @__PURE__ */ I(e, {
973
- ref: f,
974
- className: p,
975
- htmlFor: o,
976
- ...l
977
- });
978
- });
979
- Ue.displayName = "FormLabel";
980
- const ze = /* @__PURE__ */ A.forwardRef(({
981
- bsPrefix: e,
982
- className: n,
983
- id: a,
984
- ...t
985
- }, c) => {
986
- const {
987
- controlId: o
988
- } = B(V);
989
- return e = D(e, "form-range"), /* @__PURE__ */ I("input", {
990
- ...t,
991
- type: "range",
992
- ref: c,
993
- className: q(n, e),
994
- id: a || o
995
- });
996
- });
997
- ze.displayName = "FormRange";
998
- const Ge = /* @__PURE__ */ A.forwardRef(({
999
- bsPrefix: e,
1000
- size: n,
1001
- htmlSize: a,
1002
- className: t,
1003
- isValid: c = !1,
1004
- isInvalid: o = !1,
1005
- id: l,
1006
- ...f
1007
- }, y) => {
1008
- const {
1009
- controlId: d
1010
- } = B(V);
1011
- return e = D(e, "form-select"), /* @__PURE__ */ I("select", {
1012
- ...f,
1013
- size: a,
1014
- ref: y,
1015
- className: q(t, e, n && `${e}-${n}`, c && "is-valid", o && "is-invalid"),
1016
- id: l || d
1017
- });
1018
- });
1019
- Ge.displayName = "FormSelect";
1020
- const He = /* @__PURE__ */ A.forwardRef(
1021
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
1022
- ({
1023
- bsPrefix: e,
1024
- className: n,
1025
- as: a = "small",
1026
- muted: t,
1027
- ...c
1028
- }, o) => (e = D(e, "form-text"), /* @__PURE__ */ I(a, {
1029
- ...c,
1030
- ref: o,
1031
- className: q(n, e, t && "text-muted")
1032
- }))
1033
- );
1034
- He.displayName = "FormText";
1035
- const Je = /* @__PURE__ */ A.forwardRef((e, n) => /* @__PURE__ */ I(te, {
1036
- ...e,
1037
- ref: n,
1038
- type: "switch"
1039
- }));
1040
- Je.displayName = "Switch";
1041
- const mr = Object.assign(Je, {
1042
- Input: te.Input,
1043
- Label: te.Label
1044
- }), Xe = /* @__PURE__ */ A.forwardRef(({
1045
- bsPrefix: e,
1046
- className: n,
1047
- children: a,
1048
- controlId: t,
1049
- label: c,
1050
- ...o
1051
- }, l) => (e = D(e, "form-floating"), /* @__PURE__ */ be(Re, {
1052
- ref: l,
1053
- className: q(n, e),
1054
- controlId: t,
1055
- ...o,
1056
- children: [a, /* @__PURE__ */ I("label", {
1057
- htmlFor: t,
1058
- children: c
1059
- })]
1060
- })));
1061
- Xe.displayName = "FloatingLabel";
1062
- const hr = {
1063
- /**
1064
- * The Form `ref` will be forwarded to the underlying element,
1065
- * which means, unless it's rendered `as` a composite component,
1066
- * it will be a DOM node, when resolved.
1067
- *
1068
- * @type {ReactRef}
1069
- * @alias ref
1070
- */
1071
- _ref: H.any,
1072
- /**
1073
- * Mark a form as having been validated. Setting it to `true` will
1074
- * toggle any validation styles on the forms elements.
1075
- */
1076
- validated: H.bool,
1077
- as: H.elementType
1078
- }, we = /* @__PURE__ */ A.forwardRef(({
1079
- className: e,
1080
- validated: n,
1081
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
1082
- as: a = "form",
1083
- ...t
1084
- }, c) => /* @__PURE__ */ I(a, {
1085
- ...t,
1086
- ref: c,
1087
- className: q(e, n && "was-validated")
1088
- }));
1089
- we.displayName = "Form";
1090
- we.propTypes = hr;
1091
- const ge = Object.assign(we, {
1092
- Group: Re,
1093
- Control: yr,
1094
- Floating: Ve,
1095
- Check: te,
1096
- Switch: mr,
1097
- Label: Ue,
1098
- Text: He,
1099
- Range: ze,
1100
- Select: Ge,
1101
- FloatingLabel: Xe
1102
- }), Cr = ({ props: e, currentData: n, datafield: a, path: t }) => {
1103
- const c = B(Qe);
1104
- let [o] = Ze(n), l = e.attributes ?? {};
1105
- const { updateData: f } = c, y = (d) => {
1106
- f(d.currentTarget.value, t);
1107
- };
1108
- return /* @__PURE__ */ be(ge.Group, { className: "mb-3", controlId: Math.random().toString(), children: [
1109
- /* @__PURE__ */ I(ge.Label, { children: e.label }),
1110
- /* @__PURE__ */ I(
1111
- ge.Control,
1112
- {
1113
- onBlur: y,
1114
- type: "number",
1115
- ...l,
1116
- defaultValue: o !== "" ? o : e.default_value ?? "",
1117
- placeholder: e.label
1118
- }
1119
- )
1120
- ] });
1121
- };
1122
- export {
1123
- ge as F,
1124
- Cr as N,
1125
- H as P,
1126
- wr as f,
1127
- Rr as m,
1128
- Ye as w
1129
- };