@ea-lab/reactive-json 1.0.0-alpha.5 → 1.0.0-alpha.7

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 (39) hide show
  1. package/dist/assets/VariablesDebug.css +1 -4
  2. package/dist/assets/reset.css +4 -0
  3. package/dist/component/attributeTransformer/index.js +13 -0
  4. package/dist/component/attributeTransformer/setAttributeValue.js +36 -0
  5. package/dist/component/attributeTransformer/toggleAttributeValue.js +60 -0
  6. package/dist/component/attributeTransformer/unsetAttribute.js +10 -0
  7. package/dist/component/attributeTransformer/unsetAttributeValue.js +61 -0
  8. package/dist/component/element/debug/VariablesDebug/VariablesDebug.js +16 -15
  9. package/dist/component/element/form/ColorField.js +21 -0
  10. package/dist/component/element/form/DateField.js +21 -0
  11. package/dist/component/element/form/DateTimeField.js +21 -0
  12. package/dist/component/element/form/EmailField.js +21 -0
  13. package/dist/component/element/form/FileField.js +21 -0
  14. package/dist/component/element/form/HiddenField.js +21 -0
  15. package/dist/component/element/form/Input.js +59 -0
  16. package/dist/component/element/form/MonthField.js +21 -0
  17. package/dist/component/element/form/NumberField.js +21 -0
  18. package/dist/component/element/form/PasswordField.js +21 -0
  19. package/dist/component/element/form/RangeField.js +21 -0
  20. package/dist/component/element/form/SearchField.js +21 -0
  21. package/dist/component/element/form/TelField.js +21 -0
  22. package/dist/component/element/form/TextField.js +21 -0
  23. package/dist/component/element/form/TimeField.js +21 -0
  24. package/dist/component/element/form/UrlField.js +21 -0
  25. package/dist/component/element/form/WeekField.js +21 -0
  26. package/dist/component/element/form/index.js +36 -0
  27. package/dist/component/element/html/Html.js +39 -24
  28. package/dist/component/element/index.js +72 -36
  29. package/dist/component/element/special/Switch.js +51 -48
  30. package/dist/component/hook/index.js +7 -2
  31. package/dist/component/hook/useTransformedAttributes.js +18 -0
  32. package/dist/component/index.js +113 -79
  33. package/dist/coreComponentsPlugin.js +8 -4
  34. package/dist/engine/index.js +23 -22
  35. package/dist/engine/utility/index.js +11 -10
  36. package/dist/engine/utility/reactJsxHelpers.js +11 -9
  37. package/dist/index-2EvkwDZS.js +40 -0
  38. package/dist/main.js +153 -118
  39. package/package.json +1 -1
@@ -1,4 +1 @@
1
- /*!
2
- https://serp.co/tools/css-reset/
3
- <link rel="stylesheet" href="https://css.serp.co/css-reset/normalize.css/">
4
- */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}._debugRoot_1ny7q_1{position:fixed;bottom:12px;right:12px;display:flex;flex-direction:column;align-items:stretch;gap:8px;width:min(560px,96vw);max-height:70vh;overflow-y:auto;z-index:9998;pointer-events:none}._container_1ny7q_16{position:relative;bottom:auto;right:auto;background-color:#111827;color:#e5e7eb;padding:10px;border-radius:8px;box-shadow:0 2px 12px #0000004d;cursor:pointer;border:1px solid #374151;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;z-index:9999;width:100%;overflow:hidden;pointer-events:auto}._container_1ny7q_16._expanded_1ny7q_34{width:100%;max-height:64vh}._header_1ny7q_39{display:flex;align-items:center;justify-content:space-between}._actions_1ny7q_45{display:flex;gap:8px}._btn_1ny7q_50{background:transparent;color:#e5e7eb;border:1px solid #4b5563;border-radius:6px;padding:2px 8px}._btn_1ny7q_50._active_1ny7q_58{background:#1f2937}._path_1ny7q_62{color:#93c5fd}._value_1ny7q_66{color:#fbbf24}._copyBtn_1ny7q_70{transition:background-color .2s ease-in-out}._copyBtnSuccess_1ny7q_74{background-color:#10b932}._copyBtnError_1ny7q_78{background-color:#ef4444}._info_1ny7q_82{margin-top:8px}@media (max-width: 480px){._debugRoot_1ny7q_1{right:8px;left:8px;width:auto}}
1
+ ._debugRoot_1ny7q_1{position:fixed;bottom:12px;right:12px;display:flex;flex-direction:column;align-items:stretch;gap:8px;width:min(560px,96vw);max-height:70vh;overflow-y:auto;z-index:9998;pointer-events:none}._container_1ny7q_16{position:relative;bottom:auto;right:auto;background-color:#111827;color:#e5e7eb;padding:10px;border-radius:8px;box-shadow:0 2px 12px #0000004d;cursor:pointer;border:1px solid #374151;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;z-index:9999;width:100%;overflow:hidden;pointer-events:auto}._container_1ny7q_16._expanded_1ny7q_34{width:100%;max-height:64vh}._header_1ny7q_39{display:flex;align-items:center;justify-content:space-between}._actions_1ny7q_45{display:flex;gap:8px}._btn_1ny7q_50{background:transparent;color:#e5e7eb;border:1px solid #4b5563;border-radius:6px;padding:2px 8px}._btn_1ny7q_50._active_1ny7q_58{background:#1f2937}._path_1ny7q_62{color:#93c5fd}._value_1ny7q_66{color:#fbbf24}._copyBtn_1ny7q_70{transition:background-color .2s ease-in-out}._copyBtnSuccess_1ny7q_74{background-color:#10b932}._copyBtnError_1ny7q_78{background-color:#ef4444}._info_1ny7q_82{margin-top:8px}@media (max-width: 480px){._debugRoot_1ny7q_1{right:8px;left:8px;width:auto}}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ https://serp.co/tools/css-reset/
3
+ <link rel="stylesheet" href="https://css.serp.co/css-reset/normalize.css/">
4
+ */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}
@@ -0,0 +1,13 @@
1
+ import { setAttributeValue as t } from "./setAttributeValue.js";
2
+ import { unsetAttribute as r } from "./unsetAttribute.js";
3
+ import { unsetAttributeValue as e } from "./unsetAttributeValue.js";
4
+ import { toggleAttributeValue as o } from "./toggleAttributeValue.js";
5
+ const p = {
6
+ setAttributeValue: t,
7
+ toggleAttributeValue: o,
8
+ unsetAttribute: r,
9
+ unsetAttributeValue: e
10
+ };
11
+ export {
12
+ p as coreAttributeTransformerComponents
13
+ };
@@ -0,0 +1,36 @@
1
+ import "react/jsx-runtime";
2
+ import "../../jsonpath-B9kE9k9e.js";
3
+ import "../../lodash-CYNxjS-I.js";
4
+ import "react";
5
+ import "../../engine/GlobalDataContext.js";
6
+ import "../../engine/TemplateContext.js";
7
+ import { evaluateTemplateValue as v } from "../../engine/TemplateSystem.js";
8
+ import "../../engine/EventDispatcherContext.js";
9
+ import "../../engine/EventDispatcherProvider.js";
10
+ import "../../engine/PaginationContext.js";
11
+ import "../../dnd-kit-sortable-tree.esm-Cz1RJyIg.js";
12
+ import { normalizeAttributeNameForReactJsx as d } from "../../engine/utility/reactJsxHelpers.js";
13
+ import '../../assets/reset.css';/* empty css */
14
+ import "../../index-NNBvIV0S.js";
15
+ import "../../js-yaml-Bw0KO4XO.js";
16
+ import "../../engine/ParsingDebugDisplay/ParsingDebugDisplay.js";
17
+ const q = ({ attributes: e, globalDataContext: a, singleTransformProps: i, templateContext: l }) => {
18
+ const { name: n, mode: u = "append", value: c, preventDuplicateValues: s = !0, separator: r = " " } = i, t = v({
19
+ valueToEvaluate: c,
20
+ globalDataContext: a,
21
+ templateContext: l
22
+ }), o = d(n);
23
+ if (u === "replace")
24
+ e[o] = t;
25
+ else {
26
+ const m = e[o] || "", p = m ? m.split(r) : [];
27
+ if (!s || !p.includes(t)) {
28
+ const V = [...p, t];
29
+ e[o] = V.join(r);
30
+ }
31
+ }
32
+ return e;
33
+ };
34
+ export {
35
+ q as setAttributeValue
36
+ };
@@ -0,0 +1,60 @@
1
+ import "react/jsx-runtime";
2
+ import "../../jsonpath-B9kE9k9e.js";
3
+ import "../../lodash-CYNxjS-I.js";
4
+ import "react";
5
+ import "../../engine/GlobalDataContext.js";
6
+ import "../../engine/TemplateContext.js";
7
+ import { evaluateTemplateValue as v } from "../../engine/TemplateSystem.js";
8
+ import "../../engine/EventDispatcherContext.js";
9
+ import "../../engine/EventDispatcherProvider.js";
10
+ import "../../engine/PaginationContext.js";
11
+ import "../../dnd-kit-sortable-tree.esm-Cz1RJyIg.js";
12
+ import { normalizeAttributeNameForReactJsx as A } from "../../engine/utility/reactJsxHelpers.js";
13
+ import '../../assets/reset.css';/* empty css */
14
+ import "../../index-NNBvIV0S.js";
15
+ import "../../js-yaml-Bw0KO4XO.js";
16
+ import "../../engine/ParsingDebugDisplay/ParsingDebugDisplay.js";
17
+ const B = ({ attributes: o, globalDataContext: V, singleTransformProps: x, templateContext: g }) => {
18
+ const { name: p, value: m, separator: u = " ", keepAttributeWhenEmpty: h = !1 } = x || {};
19
+ if (!p || m === void 0)
20
+ return o;
21
+ const s = v({
22
+ valueToEvaluate: m,
23
+ globalDataContext: V,
24
+ templateContext: g
25
+ }), n = A(p), f = o[n] || "";
26
+ let l = [...f ? f.split(u).filter((e) => e.trim() !== "") : []];
27
+ if (Array.isArray(s)) {
28
+ const e = s.map((t) => String(t));
29
+ if (e.length === 0)
30
+ return o;
31
+ if (e.length === 1) {
32
+ const t = e[0], i = l.indexOf(t);
33
+ i > -1 ? l.splice(i, 1) : t !== "" && l.push(t);
34
+ } else {
35
+ let t = -1, i = -1;
36
+ for (let r = 0; r < e.length; r++) {
37
+ const a = e[r], d = l.indexOf(a);
38
+ if (d > -1) {
39
+ t = d, i = r;
40
+ break;
41
+ }
42
+ }
43
+ if (t > -1) {
44
+ const r = (i + 1) % e.length, a = e[r];
45
+ l.splice(t, 1), a !== "" && l.push(a);
46
+ } else {
47
+ const r = e[0];
48
+ r !== "" && l.push(r);
49
+ }
50
+ }
51
+ } else {
52
+ const e = String(s), t = l.indexOf(e);
53
+ t > -1 ? l.splice(t, 1) : l.push(e);
54
+ }
55
+ const c = l.join(u);
56
+ return c.trim() === "" ? h ? o[n] = "" : delete o[n] : o[n] = c, o;
57
+ };
58
+ export {
59
+ B as toggleAttributeValue
60
+ };
@@ -0,0 +1,10 @@
1
+ import { normalizeAttributeNameForReactJsx as z } from "../../engine/utility/reactJsxHelpers.js";
2
+ const N = ({ attributes: c, singleTransformProps: d }) => {
3
+ if (typeof (d == null ? void 0 : d.name) != "string" || d.name === "")
4
+ return c;
5
+ const x = z(d == null ? void 0 : d.name);
6
+ return c != null && c[x] && delete c[x], c;
7
+ };
8
+ export {
9
+ N as unsetAttribute
10
+ };
@@ -0,0 +1,61 @@
1
+ import "react/jsx-runtime";
2
+ import "../../jsonpath-B9kE9k9e.js";
3
+ import "../../lodash-CYNxjS-I.js";
4
+ import "react";
5
+ import "../../engine/GlobalDataContext.js";
6
+ import "../../engine/TemplateContext.js";
7
+ import { evaluateTemplateValue as V } from "../../engine/TemplateSystem.js";
8
+ import "../../engine/EventDispatcherContext.js";
9
+ import "../../engine/EventDispatcherProvider.js";
10
+ import "../../engine/PaginationContext.js";
11
+ import "../../dnd-kit-sortable-tree.esm-Cz1RJyIg.js";
12
+ import { normalizeAttributeNameForReactJsx as w } from "../../engine/utility/reactJsxHelpers.js";
13
+ import '../../assets/reset.css';/* empty css */
14
+ import "../../index-NNBvIV0S.js";
15
+ import "../../js-yaml-Bw0KO4XO.js";
16
+ import "../../engine/ParsingDebugDisplay/ParsingDebugDisplay.js";
17
+ const B = ({ attributes: t, globalDataContext: l, singleTransformProps: A, templateContext: a }) => {
18
+ const { name: s, value: m, separator: p = " ", unsetAllOccurrences: C, unsetCount: c } = A || {};
19
+ if (!s || m === void 0)
20
+ return t;
21
+ const n = String(
22
+ V({
23
+ valueToEvaluate: m,
24
+ globalDataContext: l,
25
+ templateContext: a
26
+ })
27
+ ), u = c !== void 0 ? V({
28
+ valueToEvaluate: c,
29
+ globalDataContext: l,
30
+ templateContext: a
31
+ }) : void 0, i = w(s), f = t[i] || "";
32
+ if (!f)
33
+ return t;
34
+ let e = [...f.split(p)];
35
+ (() => {
36
+ if (C === !0) {
37
+ e = e.filter((r) => r !== n);
38
+ return;
39
+ }
40
+ const o = parseInt(u, 10);
41
+ if (!(!isNaN(o) && u !== void 0 && u !== null)) {
42
+ e = e.filter((r) => r !== n);
43
+ return;
44
+ }
45
+ if (o === 0)
46
+ return;
47
+ if (o > 0) {
48
+ let r = 0;
49
+ e = e.filter((T) => T === n && r < o ? (r++, !1) : !0);
50
+ return;
51
+ }
52
+ const N = Math.abs(o);
53
+ let d = 0;
54
+ e = e.reverse().filter((r) => r === n && d < N ? (d++, !1) : !0).reverse();
55
+ })();
56
+ const v = e.join(p);
57
+ return v.trim() === "" ? delete t[i] : t[i] = v, t;
58
+ };
59
+ export {
60
+ B as unsetAttributeValue
61
+ };
@@ -12,11 +12,12 @@ import "../../../../index-NNBvIV0S.js";
12
12
  import "../../../../jsonpath-B9kE9k9e.js";
13
13
  import "../../../../js-yaml-Bw0KO4XO.js";
14
14
  import "../../../../engine/ParsingDebugDisplay/ParsingDebugDisplay.js";
15
- import { DebugMode as c } from "./DebugMode.enum.js";
15
+ import { DebugMode as r } from "./DebugMode.enum.js";
16
16
  import R from "./ModeDisplay/DebugList/DebugList.js";
17
17
  import D from "./ModeDisplay/DebugJson/DebugJson.js";
18
+ import '../../../../assets/reset.css';import '../../../../assets/VariablesDebug.css';/* empty css */
18
19
  import { flattenObject as J } from "./utils.js";
19
- import '../../../../assets/VariablesDebug.css';const O = "_debugRoot_1ny7q_1", j = "_container_1ny7q_16", k = "_expanded_1ny7q_34", T = "_header_1ny7q_39", I = "_actions_1ny7q_45", P = "_btn_1ny7q_50", M = "_active_1ny7q_58", w = "_path_1ny7q_62", A = "_value_1ny7q_66", H = "_copyBtn_1ny7q_70", V = "_copyBtnSuccess_1ny7q_74", F = "_copyBtnError_1ny7q_78", W = "_info_1ny7q_82", n = {
20
+ const O = "_debugRoot_1ny7q_1", j = "_container_1ny7q_16", k = "_expanded_1ny7q_34", T = "_header_1ny7q_39", I = "_actions_1ny7q_45", P = "_btn_1ny7q_50", M = "_active_1ny7q_58", w = "_path_1ny7q_62", A = "_value_1ny7q_66", H = "_copyBtn_1ny7q_70", V = "_copyBtnSuccess_1ny7q_74", F = "_copyBtnError_1ny7q_78", W = "_info_1ny7q_82", n = {
20
21
  debugRoot: O,
21
22
  container: j,
22
23
  expanded: k,
@@ -30,8 +31,8 @@ import '../../../../assets/VariablesDebug.css';const O = "_debugRoot_1ny7q_1", j
30
31
  copyBtnSuccess: V,
31
32
  copyBtnError: F,
32
33
  info: W
33
- }, dt = ({ props: v }) => {
34
- const [r, u] = p(!1), [i, _] = p(c.LIST), o = B($), d = g(null), [y, S] = p(null), f = g(null);
34
+ }, pt = ({ props: v }) => {
35
+ const [c, u] = p(!1), [i, _] = p(r.LIST), o = B($), d = g(null), [y, S] = p(null), f = g(null);
35
36
  q(() => {
36
37
  if (typeof document > "u") return;
37
38
  let t = document.getElementById("rj-debug-root");
@@ -41,7 +42,7 @@ import '../../../../assets/VariablesDebug.css';const O = "_debugRoot_1ny7q_1", j
41
42
  const t = d.current;
42
43
  try {
43
44
  if (await navigator.clipboard.writeText(
44
- i === c.JSON ? b : h.map((s) => `${s.path}: ${JSON.stringify(s.value)}`).join(`
45
+ i === r.JSON ? b : h.map((s) => `${s.path}: ${JSON.stringify(s.value)}`).join(`
45
46
  `)
46
47
  ), !t) return;
47
48
  t.classList.add(n.copyBtnSuccess), t.textContent = "Copied!", setTimeout(() => {
@@ -56,7 +57,7 @@ import '../../../../assets/VariablesDebug.css';const O = "_debugRoot_1ny7q_1", j
56
57
  }, N = /* @__PURE__ */ e(L, { ...v, attributesHolderRef: f, children: /* @__PURE__ */ a(
57
58
  "div",
58
59
  {
59
- className: `${n.container} ${r ? n.expanded : ""}`,
60
+ className: `${n.container} ${c ? n.expanded : ""}`,
60
61
  onClick: () => u((t) => !t),
61
62
  role: "button",
62
63
  ref: f,
@@ -67,20 +68,20 @@ import '../../../../assets/VariablesDebug.css';const O = "_debugRoot_1ny7q_1", j
67
68
  /* @__PURE__ */ e("code", { children: o.templatePath })
68
69
  ] }),
69
70
  /* @__PURE__ */ a("div", { className: n.actions, onClick: (t) => t.stopPropagation(), children: [
70
- r && /* @__PURE__ */ a(x, { children: [
71
+ c && /* @__PURE__ */ a(x, { children: [
71
72
  /* @__PURE__ */ e(
72
73
  "button",
73
74
  {
74
- className: `${n.btn} ${i === c.LIST ? n.active : ""}`,
75
- onClick: () => _(c.LIST),
75
+ className: `${n.btn} ${i === r.LIST ? n.active : ""}`,
76
+ onClick: () => _(r.LIST),
76
77
  children: "List"
77
78
  }
78
79
  ),
79
80
  /* @__PURE__ */ e(
80
81
  "button",
81
82
  {
82
- className: `${n.btn} ${i === c.JSON ? n.active : ""}`,
83
- onClick: () => _(c.JSON),
83
+ className: `${n.btn} ${i === r.JSON ? n.active : ""}`,
84
+ onClick: () => _(r.JSON),
84
85
  children: "JSON"
85
86
  }
86
87
  )
@@ -90,10 +91,10 @@ import '../../../../assets/VariablesDebug.css';const O = "_debugRoot_1ny7q_1", j
90
91
  {
91
92
  className: n.btn,
92
93
  onClick: () => u((t) => !t),
93
- children: r ? "Collapse" : "Expand"
94
+ children: c ? "Collapse" : "Expand"
94
95
  }
95
96
  ),
96
- r && /* @__PURE__ */ e(
97
+ c && /* @__PURE__ */ e(
97
98
  "button",
98
99
  {
99
100
  className: `${n.btn} ${n.copyBtn}`,
@@ -104,12 +105,12 @@ import '../../../../assets/VariablesDebug.css';const O = "_debugRoot_1ny7q_1", j
104
105
  )
105
106
  ] })
106
107
  ] }),
107
- r && /* @__PURE__ */ e("div", { className: n.info, onClick: (t) => t.stopPropagation(), children: i === c.JSON ? /* @__PURE__ */ e(D, { jsonString: b }) : /* @__PURE__ */ e(R, { flatRows: h }) })
108
+ c && /* @__PURE__ */ e("div", { className: n.info, onClick: (t) => t.stopPropagation(), children: i === r.JSON ? /* @__PURE__ */ e(D, { jsonString: b }) : /* @__PURE__ */ e(R, { flatRows: h }) })
108
109
  ]
109
110
  }
110
111
  ) });
111
112
  return y ? E.createPortal(N, y) : null;
112
113
  };
113
114
  export {
114
- dt as VariablesDebug
115
+ pt as VariablesDebug
115
116
  };
@@ -0,0 +1,21 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { Input as i } from "./Input.js";
3
+ const s = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ p(
6
+ i,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "color"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ s as ColorField
21
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { Input as i } from "./Input.js";
3
+ const s = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ p(
6
+ i,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "date"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ s as DateField
21
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { Input as p } from "./Input.js";
3
+ const s = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ i(
6
+ p,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "datetime-local"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ s as DateTimeField
21
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { Input as p } from "./Input.js";
3
+ const s = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ i(
6
+ p,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "email"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ s as EmailField
21
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { Input as p } from "./Input.js";
3
+ const s = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ i(
6
+ p,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "file"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ s as FileField
21
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { Input as p } from "./Input.js";
3
+ const d = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ i(
6
+ p,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "hidden"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ d as HiddenField
21
+ };
@@ -0,0 +1,59 @@
1
+ import { jsx as l, jsxs as h, Fragment as P } from "react/jsx-runtime";
2
+ import { useContext as v, useRef as j, useMemo as F } from "react";
3
+ import { ActionDependant as R } from "../../../engine/Actions.js";
4
+ import { useEvaluatedAttributes as i, evaluateTemplateValue as A } from "../../../engine/TemplateSystem.js";
5
+ import { GlobalDataContext as W } from "../../../engine/GlobalDataContext.js";
6
+ import { TemplateContext as H } from "../../../engine/TemplateContext.js";
7
+ import { propsDataLocationToPathAndValue as M } from "../../../engine/utility/formElementsCommon.js";
8
+ import { View as w } from "../../../engine/View.js";
9
+ const J = ({ props: t, datafield: x, path: r, currentData: o }) => {
10
+ const a = v(W), n = v(H), u = j(null), s = i(t.attributes), T = i(t.inputAttributes ?? []), g = i(t.labelAttributes ?? []), { formData: C, formDataPath: y } = M({
11
+ currentPath: r,
12
+ datafield: x,
13
+ dataLocation: t.dataLocation,
14
+ defaultValue: t.defaultFieldValue,
15
+ globalDataContext: a,
16
+ templateContext: n
17
+ }), E = (I) => {
18
+ a.updateData(I.currentTarget.value, y);
19
+ }, L = A({
20
+ valueToEvaluate: t.placeholder,
21
+ globalDataContext: a,
22
+ templateContext: n
23
+ }), V = A({
24
+ valueToEvaluate: t.inputType,
25
+ globalDataContext: a,
26
+ templateContext: n
27
+ }), c = !!t.label, m = t.forceWrapper, b = m === !0 || m !== !1 && c, e = {
28
+ onChange: E,
29
+ placeholder: L,
30
+ type: V ?? "text",
31
+ value: C ?? "",
32
+ ...T
33
+ };
34
+ b || Object.assign(e, s);
35
+ const d = F(() => e.id ? e.id : `input-${Math.random().toString(36).substring(2, 9)}`, [e.id]);
36
+ e.id = d;
37
+ const D = {
38
+ htmlFor: d,
39
+ ...g
40
+ }, f = /* @__PURE__ */ l("input", { ref: u, ...e }), p = c && /* @__PURE__ */ l("label", { ...D, children: /* @__PURE__ */ l(
41
+ w,
42
+ {
43
+ currentData: (o == null ? void 0 : o.label) ?? void 0,
44
+ datafield: "label",
45
+ path: r + ".label",
46
+ props: t.label
47
+ }
48
+ ) });
49
+ return /* @__PURE__ */ l(R, { ...t, attributesHolderRef: u, children: b ? /* @__PURE__ */ h("div", { ...s, children: [
50
+ p,
51
+ f
52
+ ] }) : /* @__PURE__ */ h(P, { children: [
53
+ p,
54
+ f
55
+ ] }) });
56
+ };
57
+ export {
58
+ J as Input
59
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { Input as i } from "./Input.js";
3
+ const s = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ p(
6
+ i,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "month"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ s as MonthField
21
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { Input as u } from "./Input.js";
3
+ const s = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ p(
6
+ u,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "number"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ s as NumberField
21
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { Input as s } from "./Input.js";
3
+ const o = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ p(
6
+ s,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "password"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ o as PasswordField
21
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { Input as i } from "./Input.js";
3
+ const s = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ p(
6
+ i,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "range"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ s as RangeField
21
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { Input as i } from "./Input.js";
3
+ const u = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ p(
6
+ i,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "search"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ u as SearchField
21
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { Input as i } from "./Input.js";
3
+ const s = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ p(
6
+ i,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "tel"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ s as TelField
21
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { Input as i } from "./Input.js";
3
+ const s = (t) => {
4
+ var r;
5
+ return /* @__PURE__ */ p(
6
+ i,
7
+ {
8
+ ...t,
9
+ props: {
10
+ ...t.props,
11
+ inputAttributes: {
12
+ ...(r = t.props) == null ? void 0 : r.inputAttributes,
13
+ type: "text"
14
+ }
15
+ }
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ s as TextField
21
+ };