@ea-lab/reactive-json 1.0.0-alpha.6 → 1.0.0

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,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
  };
@@ -1,41 +1,44 @@
1
- import { jsx as n, jsxs as g, Fragment as b } from "react/jsx-runtime";
2
- import { useContext as v, useRef as k } from "react";
3
- import { ActionDependant as T } from "../../../engine/Actions.js";
1
+ import { jsx as n, jsxs as g, Fragment as v } from "react/jsx-runtime";
2
+ import { useContext as x, useRef as A } from "react";
3
+ import { ActionDependant as k } from "../../../engine/Actions.js";
4
4
  import { GlobalDataContext as y } from "../../../engine/GlobalDataContext.js";
5
- import { normalizeAttributesForReactJsx as x } from "../../../engine/utility/reactJsxHelpers.js";
6
- import { TemplateContext as A } from "../../../engine/TemplateContext.js";
7
- import { evaluateAttributes as C, evaluateTemplateValue as j } from "../../../engine/TemplateSystem.js";
8
- import { View as u } from "../../../engine/View.js";
9
- const z = ({ props: t, currentData: s, datafield: O, path: h }) => {
10
- const f = v(y), m = v(A), c = k(null), d = `${t.tag}`, o = t.extra ?? {}, i = x(t.attributes), r = x(s.attributes);
11
- for (const e of Object.keys(r)) {
5
+ import { normalizeAttributesForReactJsx as h } from "../../../engine/utility/reactJsxHelpers.js";
6
+ import { TemplateContext as C } from "../../../engine/TemplateContext.js";
7
+ import { evaluateAttributes as j, evaluateTemplateValue as O } from "../../../engine/TemplateSystem.js";
8
+ import { View as s } from "../../../engine/View.js";
9
+ import { useTransformedAttributes as V } from "../../hook/useTransformedAttributes.js";
10
+ const J = ({ props: t, currentData: u, datafield: D, path: T }) => {
11
+ const m = x(y), f = x(C), c = A(null), d = `${t.tag}`, o = t.extra ?? {}, r = h(t.attributes), i = h(u.attributes);
12
+ for (const e of Object.keys(i)) {
12
13
  if (e.charAt(0) === "+") {
13
14
  const l = e.substring(1);
14
- i[l] = (i[l] ?? "").length > 0 ? (
15
+ r[l] = (r[l] ?? "").length > 0 ? (
15
16
  // Append using a space.
16
- " " + r[e]
17
+ " " + i[e]
17
18
  ) : (
18
19
  // Set directly.
19
- r[e]
20
+ i[e]
20
21
  );
21
22
  continue;
22
23
  }
23
- i[e] = r[e];
24
+ r[e] = i[e];
24
25
  }
25
- const a = C({ attrs: i, globalDataContext: f, templateContext: m });
26
+ const a = j({ attrs: r, globalDataContext: m, templateContext: f });
26
27
  if (t.tag === "option" && t.content && a.value === void 0) {
27
28
  if (typeof t.content != "string")
28
29
  return null;
29
- const e = j({
30
+ const e = O({
30
31
  valueToEvaluate: t.content,
31
- globalDataContext: f,
32
- templateContext: m
32
+ globalDataContext: m,
33
+ templateContext: f
33
34
  });
34
35
  if (typeof e != "string")
35
36
  return null;
36
37
  a.value = e;
37
38
  }
38
- return (t.tag === "input" || t.tag === "textarea" || t.tag === "select") && (a.value === void 0 && (a.value = ""), t.tag === "input" && (a.type === "checkbox" || a.type === "radio") && a.checked === void 0 && (a.checked = !1)), /* @__PURE__ */ n(T, { ...t, attributesHolderRef: c, children: ((e) => e && [
39
+ (t.tag === "input" || t.tag === "textarea" || t.tag === "select") && (a.value === void 0 && (a.value = ""), t.tag === "input" && (a.type === "checkbox" || a.type === "radio") && a.checked === void 0 && (a.checked = !1));
40
+ const b = V(a, t.attributeTransforms ?? []);
41
+ return /* @__PURE__ */ n(k, { ...t, attributesHolderRef: c, children: ((e) => e && [
39
42
  "area",
40
43
  "base",
41
44
  "br",
@@ -50,22 +53,22 @@ const z = ({ props: t, currentData: s, datafield: O, path: h }) => {
50
53
  "source",
51
54
  "track",
52
55
  "wbr"
53
- ].indexOf(e) !== -1)(t.tag) ? /* @__PURE__ */ g(b, { children: [
54
- /* @__PURE__ */ n(d, { ref: c, ...a }),
55
- Object.keys(o).length ? /* @__PURE__ */ n(u, { props: o }) : ""
56
- ] }) : /* @__PURE__ */ g(b, { children: [
57
- /* @__PURE__ */ n(d, { ref: c, ...a, children: t.content && /* @__PURE__ */ n(
58
- u,
56
+ ].indexOf(e) !== -1)(t.tag) ? /* @__PURE__ */ g(v, { children: [
57
+ /* @__PURE__ */ n(d, { ref: c, ...b }),
58
+ Object.keys(o).length ? /* @__PURE__ */ n(s, { props: o }) : ""
59
+ ] }) : /* @__PURE__ */ g(v, { children: [
60
+ /* @__PURE__ */ n(d, { ref: c, ...b, children: t.content && /* @__PURE__ */ n(
61
+ s,
59
62
  {
60
- currentData: s.content ?? void 0,
63
+ currentData: u.content ?? void 0,
61
64
  datafield: "content",
62
- path: h + ".content",
65
+ path: T + ".content",
63
66
  props: t.content
64
67
  }
65
68
  ) }),
66
- Object.keys(o).length ? /* @__PURE__ */ n(u, { props: o }) : ""
69
+ Object.keys(o).length ? /* @__PURE__ */ n(s, { props: o }) : ""
67
70
  ] }) });
68
71
  };
69
72
  export {
70
- z as Html
73
+ J as Html
71
74
  };
@@ -1,81 +1,84 @@
1
- import { jsx as i, jsxs as y, Fragment as W } from "react/jsx-runtime";
2
- import { useContext as T, createElement as A } from "react";
3
- import { ActionDependant as L } from "../../../engine/Actions.js";
4
- import { GlobalDataContext as k } from "../../../engine/GlobalDataContext.js";
5
- import { PaginationContext as z } from "../../../engine/PaginationContext.js";
6
- import { TemplateContext as B } from "../../../engine/TemplateContext.js";
7
- import { evaluateTemplateValue as F, isTemplateValue as G, dataLocationToPath as K, evaluateAttributes as R } from "../../../engine/TemplateSystem.js";
8
- import { View as x } from "../../../engine/View.js";
9
- import { usePagination as q } from "../../hook/usePagination.js";
10
- const _ = ({ props: t, currentData: e, path: f }) => {
11
- const m = T(k), a = T(B), g = (t == null ? void 0 : t.cardinality) ?? -1, w = (t == null ? void 0 : t.options) ?? [], h = (t == null ? void 0 : t.singleOption) ?? void 0, C = !!h, l = (t == null ? void 0 : t.content) ?? null, P = l && F({
12
- globalDataContext: m,
13
- templateContext: a,
14
- valueToEvaluate: l
15
- }), u = Object.entries(typeof P == "object" ? P : e).map(([V, n]) => {
16
- const o = V;
17
- if (g >= 1 && o >= g || !n || typeof n != "object")
1
+ import { jsx as i, jsxs as A, Fragment as k } from "react/jsx-runtime";
2
+ import { useContext as I, createElement as L } from "react";
3
+ import { ActionDependant as z } from "../../../engine/Actions.js";
4
+ import { GlobalDataContext as B } from "../../../engine/GlobalDataContext.js";
5
+ import { PaginationContext as F } from "../../../engine/PaginationContext.js";
6
+ import { TemplateContext as G } from "../../../engine/TemplateContext.js";
7
+ import { evaluateTemplateValue as K, isTemplateValue as R, dataLocationToPath as q, evaluateAttributes as E } from "../../../engine/TemplateSystem.js";
8
+ import { View as g } from "../../../engine/View.js";
9
+ const _ = ({ props: t, currentData: e, path: m }) => {
10
+ var T;
11
+ const a = I(B), l = I(G), { usePagination: x } = ((T = a.plugins) == null ? void 0 : T.hook) ?? {};
12
+ if (!x)
13
+ return null;
14
+ const h = (t == null ? void 0 : t.cardinality) ?? -1, V = (t == null ? void 0 : t.options) ?? [], C = (t == null ? void 0 : t.singleOption) ?? void 0, P = !!C, o = (t == null ? void 0 : t.content) ?? null, j = o && K({
15
+ globalDataContext: a,
16
+ templateContext: l,
17
+ valueToEvaluate: o
18
+ }), u = Object.entries(typeof j == "object" ? j : e).map(([W, n]) => {
19
+ const c = W;
20
+ if (h >= 1 && c >= h || !n || typeof n != "object")
18
21
  return null;
19
- let c, b, d;
20
- if (C)
21
- b = n, d = h;
22
+ let d, b, f;
23
+ if (P)
24
+ b = n, f = C;
22
25
  else {
23
- if (c = Object.keys(n)[0] ?? void 0, c === void 0)
26
+ if (d = Object.keys(n)[0] ?? void 0, d === void 0)
24
27
  return null;
25
- b = Object.values(n)[0] ?? void 0, d = w[c] ?? void 0;
28
+ b = Object.values(n)[0] ?? void 0, f = V[d] ?? void 0;
26
29
  }
27
- if (d === void 0)
30
+ if (f === void 0)
28
31
  return null;
29
- let S = (G(l) && K({
30
- dataLocation: l,
31
- currentPath: a.templatePath,
32
- globalDataContext: m,
33
- templateContext: a
34
- }) || f) + "." + o;
35
- return C || (S += "." + c), /* @__PURE__ */ i(
36
- x,
32
+ let w = (R(o) && q({
33
+ dataLocation: o,
34
+ currentPath: l.templatePath,
35
+ globalDataContext: a,
36
+ templateContext: l
37
+ }) || m) + "." + c;
38
+ return P || (w += "." + d), /* @__PURE__ */ i(
39
+ g,
37
40
  {
38
41
  currentData: b,
39
- datafield: o,
40
- path: S,
41
- props: d
42
+ datafield: c,
43
+ path: w,
44
+ props: f
42
45
  },
43
- o
46
+ c
44
47
  );
45
- }), v = q({
48
+ }), v = x({
46
49
  dataToPaginate: u,
47
50
  ...(t == null ? void 0 : t.paginationProps) ?? {}
48
- }), j = t != null && t.paginated ? u.slice(v.firstShownItemIndex, v.maxShownItemIndexExcluded) : u, I = t != null && t.contentWrapper ? A(
51
+ }), O = t != null && t.paginated ? u.slice(v.firstShownItemIndex, v.maxShownItemIndexExcluded) : u, y = t != null && t.contentWrapper ? L(
49
52
  t.contentWrapper.tag ?? "div",
50
- R({
53
+ E({
51
54
  attrs: t.contentWrapper.attributes ?? {},
52
- globalDataContext: m,
55
+ globalDataContext: a,
53
56
  options: { normalizeBeforeEvaluation: !0 },
54
- templateContext: a
57
+ templateContext: l
55
58
  }),
56
- j
57
- ) : j, O = /* @__PURE__ */ y(W, { children: [
59
+ O
60
+ ) : O, S = /* @__PURE__ */ A(k, { children: [
58
61
  (t == null ? void 0 : t.before) && /* @__PURE__ */ i(
59
- x,
62
+ g,
60
63
  {
61
64
  currentData: (e == null ? void 0 : e.before) ?? void 0,
62
- path: f + ".before",
65
+ path: m + ".before",
63
66
  datafield: "before",
64
67
  props: t == null ? void 0 : t.before
65
68
  }
66
69
  ),
67
- I,
70
+ y,
68
71
  (t == null ? void 0 : t.after) && /* @__PURE__ */ i(
69
- x,
72
+ g,
70
73
  {
71
74
  currentData: (e == null ? void 0 : e.after) ?? void 0,
72
- path: f + ".after",
75
+ path: m + ".after",
73
76
  datafield: "after",
74
77
  props: t == null ? void 0 : t.after
75
78
  }
76
79
  )
77
80
  ] });
78
- return /* @__PURE__ */ i(L, { ...t, children: t != null && t.paginated ? /* @__PURE__ */ i(z.Provider, { value: { pagination: v }, children: O }) : O });
81
+ return /* @__PURE__ */ i(z, { ...t, children: t != null && t.paginated ? /* @__PURE__ */ i(F.Provider, { value: { pagination: v }, children: S }) : S });
79
82
  };
80
83
  export {
81
84
  _ as Switch
@@ -1,4 +1,9 @@
1
- import { usePagination as e } from "./usePagination.js";
1
+ import { usePagination as o } from "./usePagination.js";
2
+ import { useTransformedAttributes as r } from "./useTransformedAttributes.js";
3
+ const m = {
4
+ usePagination: o,
5
+ useTransformedAttributes: r
6
+ };
2
7
  export {
3
- e as usePagination
8
+ m as coreHookComponents
4
9
  };
@@ -0,0 +1,18 @@
1
+ import { useContext as f } from "react";
2
+ import { isValid as l } from "../../engine/Actions.js";
3
+ import { GlobalDataContext as x } from "../../engine/GlobalDataContext.js";
4
+ import { TemplateContext as b } from "../../engine/TemplateContext.js";
5
+ const c = (t, n) => {
6
+ var m;
7
+ const e = f(x), u = f(b);
8
+ if (!n)
9
+ return t;
10
+ const i = ((m = e.plugins) == null ? void 0 : m.attributeTransformer) ?? [];
11
+ return i ? n.reduce((r, o) => {
12
+ const a = i[o.what];
13
+ return !a || !l(o, { globalDataContext: e, templateContext: u }) ? r : a({ attributes: r, globalDataContext: e, singleTransformProps: o, templateContext: u });
14
+ }, t) : t;
15
+ };
16
+ export {
17
+ c as useTransformedAttributes
18
+ };
@@ -1,21 +1,21 @@
1
1
  import { HashChangeListener as r } from "./action/HashChangeListener.js";
2
2
  import { Hide as m } from "./action/Hide.js";
3
- import { MessageListener as a } from "./action/MessageListener.js";
4
- import { ReactOnEvent as f } from "./action/ReactOnEvent.js";
3
+ import { MessageListener as x } from "./action/MessageListener.js";
4
+ import { ReactOnEvent as a } from "./action/ReactOnEvent.js";
5
5
  import { Redirect as l } from "./action/Redirect.js";
6
6
  import { SetAttributeValue as s } from "./action/SetAttributeValue.js";
7
7
  import { ToggleAttributeValue as u } from "./action/ToggleAttributeValue.js";
8
8
  import { UnsetAttribute as c } from "./action/UnsetAttribute.js";
9
- import { UnsetAttributeValue as D } from "./action/UnsetAttributeValue.js";
9
+ import { UnsetAttributeValue as b } from "./action/UnsetAttributeValue.js";
10
10
  import { VisuallyHide as C } from "./action/VisuallyHide.js";
11
11
  import { coreDataMappingComponents as T } from "./dataMapping/index.js";
12
- import { coreDataProcessorComponents as v } from "./dataProcessor/index.js";
12
+ import { coreDataProcessorComponents as H } from "./dataProcessor/index.js";
13
13
  import { coreElementComponents as M } from "./element/index.js";
14
- import { usePagination as S } from "./hook/usePagination.js";
15
- import { coreReactionComponents as A } from "./reaction/index.js";
16
- import { simpleMapping as w } from "./dataMapping/simpleMapping.js";
17
- import { VariablesDebug as N } from "./element/debug/VariablesDebug/VariablesDebug.js";
18
- import { Input as k } from "./element/form/Input.js";
14
+ import { coreHookComponents as V } from "./hook/index.js";
15
+ import { coreReactionComponents as E } from "./reaction/index.js";
16
+ import { simpleMapping as k } from "./dataMapping/simpleMapping.js";
17
+ import { VariablesDebug as L } from "./element/debug/VariablesDebug/VariablesDebug.js";
18
+ import { Input as U } from "./element/form/Input.js";
19
19
  import { ColorField as B } from "./element/form/ColorField.js";
20
20
  import { DateField as J } from "./element/form/DateField.js";
21
21
  import { DateTimeField as q } from "./element/form/DateTimeField.js";
@@ -27,21 +27,21 @@ import { NumberField as _ } from "./element/form/NumberField.js";
27
27
  import { PasswordField as ee } from "./element/form/PasswordField.js";
28
28
  import { RangeField as re } from "./element/form/RangeField.js";
29
29
  import { SearchField as me } from "./element/form/SearchField.js";
30
- import { TelField as ae } from "./element/form/TelField.js";
31
- import { TextField as fe } from "./element/form/TextField.js";
30
+ import { TelField as xe } from "./element/form/TelField.js";
31
+ import { TextField as ae } from "./element/form/TextField.js";
32
32
  import { TimeField as le } from "./element/form/TimeField.js";
33
33
  import { UrlField as se } from "./element/form/UrlField.js";
34
34
  import { WeekField as ue } from "./element/form/WeekField.js";
35
35
  import { FolderSortableTree as ce } from "./element/html/FolderSortableTree.js";
36
- import { FormatNumeral as De } from "./element/html/FormatNumeral.js";
36
+ import { FormatNumeral as be } from "./element/html/FormatNumeral.js";
37
37
  import { Html as Ce } from "./element/html/Html.js";
38
38
  import { LabelFromValue as Te } from "./element/html/LabelFromValue.js";
39
- import { PreformattedMarkup as ve } from "./element/html/PreformattedMarkup.js";
39
+ import { PreformattedMarkup as He } from "./element/html/PreformattedMarkup.js";
40
40
  import { SortableTreeItemCollapseButton as Me } from "./element/html/SortableTreeItemCollapseButton.js";
41
- import { Count as Se } from "./element/special/Count.js";
42
- import { DataFilter as Ae } from "./element/special/DataFilter.js";
43
- import { DelayedActions as we, getReactionFunctionsToExecute as Le } from "./element/special/DelayedActions.js";
44
- import { PageControls as Ue } from "./element/special/PageControls.js";
41
+ import { Count as Ve } from "./element/special/Count.js";
42
+ import { DataFilter as Ee } from "./element/special/DataFilter.js";
43
+ import { DelayedActions as ke, getReactionFunctionsToExecute as we } from "./element/special/DelayedActions.js";
44
+ import { PageControls as Ne } from "./element/special/PageControls.js";
45
45
  import { Phantom as ye } from "./element/special/Phantom.js";
46
46
  import { ReactiveJsonBasicComponentWrapper as Ie } from "./element/special/ReactiveJsonBasicComponentWrapper.js";
47
47
  import { ReactiveJsonSubroot as We } from "./element/special/ReactiveJsonSubroot.js";
@@ -54,35 +54,35 @@ import { postMessage as $e } from "./reaction/postMessage.js";
54
54
  import { redirectNow as oo } from "./reaction/redirectNow.js";
55
55
  import { removeData as to } from "./reaction/removeData.js";
56
56
  import { setClipboardData as po } from "./reaction/setClipboardData.js";
57
- import { setData as xo } from "./reaction/setData.js";
57
+ import { setData as fo } from "./reaction/setData.js";
58
58
  import { submitData as io } from "./reaction/submitData.js";
59
59
  import { triggerEvent as no } from "./reaction/triggerEvent.js";
60
60
  export {
61
61
  B as ColorField,
62
- Se as Count,
63
- Ae as DataFilter,
62
+ Ve as Count,
63
+ Ee as DataFilter,
64
64
  J as DateField,
65
65
  q as DateTimeField,
66
- we as DelayedActions,
66
+ ke as DelayedActions,
67
67
  j as EmailField,
68
68
  G as FileField,
69
69
  ce as FolderSortableTree,
70
- De as FormatNumeral,
70
+ be as FormatNumeral,
71
71
  r as HashChangeListener,
72
72
  Q as HiddenField,
73
73
  m as Hide,
74
74
  Ce as Html,
75
- k as Input,
75
+ U as Input,
76
76
  Te as LabelFromValue,
77
- a as MessageListener,
77
+ x as MessageListener,
78
78
  Y as MonthField,
79
79
  _ as NumberField,
80
- Ue as PageControls,
80
+ Ne as PageControls,
81
81
  ee as PasswordField,
82
82
  ye as Phantom,
83
- ve as PreformattedMarkup,
83
+ He as PreformattedMarkup,
84
84
  re as RangeField,
85
- f as ReactOnEvent,
85
+ a as ReactOnEvent,
86
86
  Ie as ReactiveJsonBasicComponentWrapper,
87
87
  We as ReactiveJsonSubroot,
88
88
  l as Redirect,
@@ -90,32 +90,32 @@ export {
90
90
  s as SetAttributeValue,
91
91
  Me as SortableTreeItemCollapseButton,
92
92
  Oe as Switch,
93
- ae as TelField,
94
- fe as TextField,
93
+ xe as TelField,
94
+ ae as TextField,
95
95
  le as TimeField,
96
96
  u as ToggleAttributeValue,
97
97
  c as UnsetAttribute,
98
- D as UnsetAttributeValue,
98
+ b as UnsetAttributeValue,
99
99
  se as UrlField,
100
- N as VariablesDebug,
100
+ L as VariablesDebug,
101
101
  C as VisuallyHide,
102
102
  ue as WeekField,
103
103
  ze as addData,
104
104
  T as coreDataMappingComponents,
105
- v as coreDataProcessorComponents,
105
+ H as coreDataProcessorComponents,
106
106
  M as coreElementComponents,
107
- A as coreReactionComponents,
107
+ V as coreHookComponents,
108
+ E as coreReactionComponents,
108
109
  Xe as executeHttpRequest,
109
110
  Ke as fetchData,
110
- Le as getReactionFunctionsToExecute,
111
+ we as getReactionFunctionsToExecute,
111
112
  Ze as moveData,
112
113
  $e as postMessage,
113
114
  oo as redirectNow,
114
115
  to as removeData,
115
116
  po as setClipboardData,
116
- xo as setData,
117
- w as simpleMapping,
117
+ fo as setData,
118
+ k as simpleMapping,
118
119
  io as submitData,
119
- no as triggerEvent,
120
- S as usePagination
120
+ no as triggerEvent
121
121
  };
@@ -1,15 +1,19 @@
1
1
  import { c as o } from "./index-BA09SSaJ.js";
2
+ import { coreAttributeTransformerComponents as r } from "./component/attributeTransformer/index.js";
2
3
  import { coreDataMappingComponents as t } from "./component/dataMapping/index.js";
3
4
  import { coreDataProcessorComponents as e } from "./component/dataProcessor/index.js";
4
5
  import { coreElementComponents as n } from "./component/element/index.js";
5
- import { coreReactionComponents as r } from "./component/reaction/index.js";
6
- const s = {
6
+ import { coreHookComponents as m } from "./component/hook/index.js";
7
+ import { coreReactionComponents as p } from "./component/reaction/index.js";
8
+ const l = {
7
9
  action: o,
10
+ attributeTransformer: r,
8
11
  dataMapping: t,
9
12
  dataProcessor: e,
10
13
  element: n,
11
- reaction: r
14
+ hook: m,
15
+ reaction: p
12
16
  };
13
17
  export {
14
- s as coreComponentsPlugin
18
+ l as coreComponentsPlugin
15
19
  };
@@ -3,47 +3,48 @@ import { mergeComponentCollections as p } from "./ComponentCollector.js";
3
3
  import { EventDispatcherContext as m } from "./EventDispatcherContext.js";
4
4
  import { EventDispatcherProvider as l, addEventListener as x, removeEventListener as f } from "./EventDispatcherProvider.js";
5
5
  import { GlobalDataContext as u } from "./GlobalDataContext.js";
6
- import { GlobalDataContextProvider as d } from "./GlobalDataContextProvider.js";
6
+ import { GlobalDataContextProvider as c } from "./GlobalDataContextProvider.js";
7
7
  import { PaginationContext as D } from "./PaginationContext.js";
8
- import { ReactiveJsonRoot as T } from "./ReactiveJsonRoot.js";
8
+ import { ReactiveJsonRoot as b } from "./ReactiveJsonRoot.js";
9
9
  import { TemplateContext as g } from "./TemplateContext.js";
10
- import { dataLocationToPath as A, evaluateAttributes as E, evaluateTemplateValue as P, evaluateTemplateValueCollection as R, isTemplateValue as h, useEvaluatedAttributes as L } from "./TemplateSystem.js";
10
+ import { dataLocationToPath as R, evaluateAttributes as V, evaluateTemplateValue as E, evaluateTemplateValueCollection as P, isTemplateValue as h, useEvaluatedAttributes as L } from "./TemplateSystem.js";
11
11
  import { alterData as z } from "./utility/alterData.js";
12
- import { analyzeDataOverrideReferences as F } from "./utility/analyzeDataOverrideReferences.js";
13
- import { applyDataMapping as J } from "./utility/dataMappingSystem.js";
12
+ import { analyzeDataOverrideReferences as J } from "./utility/analyzeDataOverrideReferences.js";
13
+ import { applyDataMapping as G } from "./utility/dataMappingSystem.js";
14
14
  import { formatString as j, maybeFormatString as w } from "./utility/formatString.js";
15
- import { propsDataLocationToPathAndValue as O } from "./utility/formElementsCommon.js";
16
- import { parseRjBuild as q } from "./utility/parseRjBuild.js";
17
- import { normalizeAttributesForReactJsx as I } from "./utility/reactJsxHelpers.js";
18
- import { stringToBoolean as N } from "./utility/stringToBoolean.js";
19
- import { View as U } from "./View.js";
15
+ import { propsDataLocationToPathAndValue as N } from "./utility/formElementsCommon.js";
16
+ import { parseRjBuild as k } from "./utility/parseRjBuild.js";
17
+ import { normalizeAttributeNameForReactJsx as H, normalizeAttributesForReactJsx as I } from "./utility/reactJsxHelpers.js";
18
+ import { stringToBoolean as Q } from "./utility/stringToBoolean.js";
19
+ import { View as W } from "./View.js";
20
20
  export {
21
21
  o as ActionDependant,
22
22
  m as EventDispatcherContext,
23
23
  l as EventDispatcherProvider,
24
24
  u as GlobalDataContext,
25
- d as GlobalDataContextProvider,
25
+ c as GlobalDataContextProvider,
26
26
  D as PaginationContext,
27
- T as ReactiveJsonRoot,
27
+ b as ReactiveJsonRoot,
28
28
  g as TemplateContext,
29
- U as View,
29
+ W as View,
30
30
  x as addEventListener,
31
31
  z as alterData,
32
- F as analyzeDataOverrideReferences,
33
- J as applyDataMapping,
34
- A as dataLocationToPath,
35
- E as evaluateAttributes,
36
- P as evaluateTemplateValue,
37
- R as evaluateTemplateValueCollection,
32
+ J as analyzeDataOverrideReferences,
33
+ G as applyDataMapping,
34
+ R as dataLocationToPath,
35
+ V as evaluateAttributes,
36
+ E as evaluateTemplateValue,
37
+ P as evaluateTemplateValueCollection,
38
38
  j as formatString,
39
39
  h as isTemplateValue,
40
40
  r as isValid,
41
41
  w as maybeFormatString,
42
42
  p as mergeComponentCollections,
43
+ H as normalizeAttributeNameForReactJsx,
43
44
  I as normalizeAttributesForReactJsx,
44
- q as parseRjBuild,
45
- O as propsDataLocationToPathAndValue,
45
+ k as parseRjBuild,
46
+ N as propsDataLocationToPathAndValue,
46
47
  f as removeEventListener,
47
- N as stringToBoolean,
48
+ Q as stringToBoolean,
48
49
  L as useEvaluatedAttributes
49
50
  };
@@ -1,19 +1,20 @@
1
1
  import { alterData as t } from "./alterData.js";
2
- import { analyzeDataOverrideReferences as e } from "./analyzeDataOverrideReferences.js";
2
+ import { analyzeDataOverrideReferences as a } from "./analyzeDataOverrideReferences.js";
3
3
  import { applyDataMapping as m } from "./dataMappingSystem.js";
4
- import { formatString as n, maybeFormatString as i } from "./formatString.js";
4
+ import { formatString as n, maybeFormatString as f } from "./formatString.js";
5
5
  import { propsDataLocationToPathAndValue as l } from "./formElementsCommon.js";
6
- import { parseRjBuild as g } from "./parseRjBuild.js";
7
- import { normalizeAttributesForReactJsx as c } from "./reactJsxHelpers.js";
8
- import { stringToBoolean as u } from "./stringToBoolean.js";
6
+ import { parseRjBuild as c } from "./parseRjBuild.js";
7
+ import { normalizeAttributeNameForReactJsx as u, normalizeAttributesForReactJsx as D } from "./reactJsxHelpers.js";
8
+ import { stringToBoolean as b } from "./stringToBoolean.js";
9
9
  export {
10
10
  t as alterData,
11
- e as analyzeDataOverrideReferences,
11
+ a as analyzeDataOverrideReferences,
12
12
  m as applyDataMapping,
13
13
  n as formatString,
14
- i as maybeFormatString,
15
- c as normalizeAttributesForReactJsx,
16
- g as parseRjBuild,
14
+ f as maybeFormatString,
15
+ u as normalizeAttributeNameForReactJsx,
16
+ D as normalizeAttributesForReactJsx,
17
+ c as parseRjBuild,
17
18
  l as propsDataLocationToPathAndValue,
18
- u as stringToBoolean
19
+ b as stringToBoolean
19
20
  };
@@ -1,16 +1,17 @@
1
- const a = (t) => {
1
+ const r = {
2
+ class: "className",
3
+ for: "htmlFor"
4
+ }, a = (t) => {
2
5
  if (typeof t != "object" || Object.keys(t).length === 0)
3
6
  return {};
4
- const r = {
5
- class: "className",
6
- for: "htmlFor"
7
- }, o = {};
8
- for (const [e, n] of Object.entries(t)) {
9
- const s = r.hasOwnProperty(e) ? r[e] : e;
10
- o[s] = n;
7
+ const e = {};
8
+ for (const [o, n] of Object.entries(t)) {
9
+ const s = c(o);
10
+ e[s] = n;
11
11
  }
12
- return o;
13
- };
12
+ return e;
13
+ }, c = (t) => r.hasOwnProperty(t) ? r[t] : t;
14
14
  export {
15
+ c as normalizeAttributeNameForReactJsx,
15
16
  a as normalizeAttributesForReactJsx
16
17
  };
package/dist/main.js CHANGED
@@ -1,168 +1,169 @@
1
1
  import { HashChangeListener as r } from "./component/action/HashChangeListener.js";
2
2
  import { Hide as a } from "./component/action/Hide.js";
3
- import { MessageListener as m } from "./component/action/MessageListener.js";
3
+ import { MessageListener as p } from "./component/action/MessageListener.js";
4
4
  import { ReactOnEvent as f } from "./component/action/ReactOnEvent.js";
5
5
  import { Redirect as l } from "./component/action/Redirect.js";
6
6
  import { SetAttributeValue as s } from "./component/action/SetAttributeValue.js";
7
7
  import { ToggleAttributeValue as u } from "./component/action/ToggleAttributeValue.js";
8
8
  import { UnsetAttribute as F } from "./component/action/UnsetAttribute.js";
9
- import { UnsetAttributeValue as g } from "./component/action/UnsetAttributeValue.js";
10
- import { VisuallyHide as v } from "./component/action/VisuallyHide.js";
9
+ import { UnsetAttributeValue as b } from "./component/action/UnsetAttributeValue.js";
10
+ import { VisuallyHide as g } from "./component/action/VisuallyHide.js";
11
11
  import { coreDataMappingComponents as T } from "./component/dataMapping/index.js";
12
12
  import { coreDataProcessorComponents as V } from "./component/dataProcessor/index.js";
13
- import { coreElementComponents as P } from "./component/element/index.js";
14
- import { usePagination as E } from "./component/hook/usePagination.js";
15
- import { coreReactionComponents as L } from "./component/reaction/index.js";
16
- import { ActionDependant as H, isValid as y } from "./engine/Actions.js";
17
- import { mergeComponentCollections as B } from "./engine/ComponentCollector.js";
13
+ import { coreElementComponents as A } from "./component/element/index.js";
14
+ import { coreHookComponents as P } from "./component/hook/index.js";
15
+ import { coreReactionComponents as H } from "./component/reaction/index.js";
16
+ import { ActionDependant as M, isValid as y } from "./engine/Actions.js";
17
+ import { mergeComponentCollections as w } from "./engine/ComponentCollector.js";
18
18
  import { EventDispatcherContext as N } from "./engine/EventDispatcherContext.js";
19
- import { EventDispatcherProvider as k, addEventListener as z, removeEventListener as G } from "./engine/EventDispatcherProvider.js";
19
+ import { EventDispatcherProvider as z, addEventListener as U, removeEventListener as G } from "./engine/EventDispatcherProvider.js";
20
20
  import { GlobalDataContext as O } from "./engine/GlobalDataContext.js";
21
21
  import { GlobalDataContextProvider as j } from "./engine/GlobalDataContextProvider.js";
22
22
  import { PaginationContext as K } from "./engine/PaginationContext.js";
23
23
  import { ReactiveJsonRoot as X } from "./engine/ReactiveJsonRoot.js";
24
24
  import { TemplateContext as Z } from "./engine/TemplateContext.js";
25
25
  import { dataLocationToPath as $, evaluateAttributes as ee, evaluateTemplateValue as oe, evaluateTemplateValueCollection as re, isTemplateValue as te, useEvaluatedAttributes as ae } from "./engine/TemplateSystem.js";
26
- import { alterData as me } from "./engine/utility/alterData.js";
26
+ import { alterData as pe } from "./engine/utility/alterData.js";
27
27
  import { analyzeDataOverrideReferences as fe } from "./engine/utility/analyzeDataOverrideReferences.js";
28
28
  import { applyDataMapping as le } from "./engine/utility/dataMappingSystem.js";
29
29
  import { formatString as se, maybeFormatString as de } from "./engine/utility/formatString.js";
30
30
  import { propsDataLocationToPathAndValue as ce } from "./engine/utility/formElementsCommon.js";
31
31
  import { parseRjBuild as De } from "./engine/utility/parseRjBuild.js";
32
- import { normalizeAttributesForReactJsx as be } from "./engine/utility/reactJsxHelpers.js";
33
- import { stringToBoolean as Ce } from "./engine/utility/stringToBoolean.js";
34
- import { View as Re } from "./engine/View.js";
35
- import { simpleMapping as he } from "./component/dataMapping/simpleMapping.js";
36
- import { VariablesDebug as Ae } from "./component/element/debug/VariablesDebug/VariablesDebug.js";
37
- import { Input as Se } from "./component/element/form/Input.js";
32
+ import { normalizeAttributeNameForReactJsx as Ce, normalizeAttributesForReactJsx as ge } from "./engine/utility/reactJsxHelpers.js";
33
+ import { stringToBoolean as Te } from "./engine/utility/stringToBoolean.js";
34
+ import { View as Ve } from "./engine/View.js";
35
+ import { simpleMapping as Ae } from "./component/dataMapping/simpleMapping.js";
36
+ import { VariablesDebug as Pe } from "./component/element/debug/VariablesDebug/VariablesDebug.js";
37
+ import { Input as He } from "./component/element/form/Input.js";
38
38
  import { ColorField as Me } from "./component/element/form/ColorField.js";
39
- import { DateField as ye } from "./component/element/form/DateField.js";
39
+ import { DateField as Je } from "./component/element/form/DateField.js";
40
40
  import { DateTimeField as Be } from "./component/element/form/DateTimeField.js";
41
- import { EmailField as Ne } from "./component/element/form/EmailField.js";
42
- import { FileField as ke } from "./component/element/form/FileField.js";
43
- import { HiddenField as Ge } from "./component/element/form/HiddenField.js";
44
- import { MonthField as Oe } from "./component/element/form/MonthField.js";
45
- import { NumberField as je } from "./component/element/form/NumberField.js";
46
- import { PasswordField as Ke } from "./component/element/form/PasswordField.js";
47
- import { RangeField as Xe } from "./component/element/form/RangeField.js";
48
- import { SearchField as Ze } from "./component/element/form/SearchField.js";
49
- import { TelField as $e } from "./component/element/form/TelField.js";
50
- import { TextField as oo } from "./component/element/form/TextField.js";
51
- import { TimeField as to } from "./component/element/form/TimeField.js";
41
+ import { EmailField as ke } from "./component/element/form/EmailField.js";
42
+ import { FileField as Ue } from "./component/element/form/FileField.js";
43
+ import { HiddenField as Ie } from "./component/element/form/HiddenField.js";
44
+ import { MonthField as We } from "./component/element/form/MonthField.js";
45
+ import { NumberField as qe } from "./component/element/form/NumberField.js";
46
+ import { PasswordField as Qe } from "./component/element/form/PasswordField.js";
47
+ import { RangeField as Ye } from "./component/element/form/RangeField.js";
48
+ import { SearchField as _e } from "./component/element/form/SearchField.js";
49
+ import { TelField as eo } from "./component/element/form/TelField.js";
50
+ import { TextField as ro } from "./component/element/form/TextField.js";
51
+ import { TimeField as ao } from "./component/element/form/TimeField.js";
52
52
  import { UrlField as po } from "./component/element/form/UrlField.js";
53
- import { WeekField as xo } from "./component/element/form/WeekField.js";
54
- import { FolderSortableTree as io } from "./component/element/html/FolderSortableTree.js";
55
- import { FormatNumeral as no } from "./component/element/html/FormatNumeral.js";
56
- import { Html as uo } from "./component/element/html/Html.js";
57
- import { LabelFromValue as Fo } from "./component/element/html/LabelFromValue.js";
58
- import { PreformattedMarkup as go } from "./component/element/html/PreformattedMarkup.js";
53
+ import { WeekField as fo } from "./component/element/form/WeekField.js";
54
+ import { FolderSortableTree as lo } from "./component/element/html/FolderSortableTree.js";
55
+ import { FormatNumeral as so } from "./component/element/html/FormatNumeral.js";
56
+ import { Html as co } from "./component/element/html/Html.js";
57
+ import { LabelFromValue as Do } from "./component/element/html/LabelFromValue.js";
58
+ import { PreformattedMarkup as Co } from "./component/element/html/PreformattedMarkup.js";
59
59
  import { SortableTreeItemCollapseButton as vo } from "./component/element/html/SortableTreeItemCollapseButton.js";
60
- import { Count as To } from "./component/element/special/Count.js";
61
- import { DataFilter as Vo } from "./component/element/special/DataFilter.js";
62
- import { DelayedActions as Po, getReactionFunctionsToExecute as Ao } from "./component/element/special/DelayedActions.js";
63
- import { PageControls as So } from "./component/element/special/PageControls.js";
60
+ import { Count as Ro } from "./component/element/special/Count.js";
61
+ import { DataFilter as ho } from "./component/element/special/DataFilter.js";
62
+ import { DelayedActions as Eo, getReactionFunctionsToExecute as Po } from "./component/element/special/DelayedActions.js";
63
+ import { PageControls as Ho } from "./component/element/special/PageControls.js";
64
64
  import { Phantom as Mo } from "./component/element/special/Phantom.js";
65
- import { ReactiveJsonBasicComponentWrapper as yo } from "./component/element/special/ReactiveJsonBasicComponentWrapper.js";
65
+ import { ReactiveJsonBasicComponentWrapper as Jo } from "./component/element/special/ReactiveJsonBasicComponentWrapper.js";
66
66
  import { ReactiveJsonSubroot as Bo } from "./component/element/special/ReactiveJsonSubroot.js";
67
- import { Switch as No } from "./component/element/special/Switch.js";
68
- import { addData as ko } from "./component/reaction/addData.js";
69
- import { fetchData as Go } from "./component/reaction/fetchData.js";
70
- import { e as Oo } from "./httpRequestCommon-DUo2Oxgl.js";
71
- import { moveData as jo } from "./component/reaction/moveData.js";
72
- import { postMessage as Ko } from "./component/reaction/postMessage.js";
73
- import { redirectNow as Xo } from "./component/reaction/redirectNow.js";
74
- import { removeData as Zo } from "./component/reaction/removeData.js";
75
- import { setClipboardData as $o } from "./component/reaction/setClipboardData.js";
76
- import { setData as or } from "./component/reaction/setData.js";
77
- import { submitData as tr } from "./component/reaction/submitData.js";
67
+ import { Switch as ko } from "./component/element/special/Switch.js";
68
+ import { addData as Uo } from "./component/reaction/addData.js";
69
+ import { fetchData as Io } from "./component/reaction/fetchData.js";
70
+ import { e as Wo } from "./httpRequestCommon-DUo2Oxgl.js";
71
+ import { moveData as qo } from "./component/reaction/moveData.js";
72
+ import { postMessage as Qo } from "./component/reaction/postMessage.js";
73
+ import { redirectNow as Yo } from "./component/reaction/redirectNow.js";
74
+ import { removeData as _o } from "./component/reaction/removeData.js";
75
+ import { setClipboardData as er } from "./component/reaction/setClipboardData.js";
76
+ import { setData as rr } from "./component/reaction/setData.js";
77
+ import { submitData as ar } from "./component/reaction/submitData.js";
78
78
  import { triggerEvent as pr } from "./component/reaction/triggerEvent.js";
79
79
  export {
80
- H as ActionDependant,
80
+ M as ActionDependant,
81
81
  Me as ColorField,
82
- To as Count,
83
- Vo as DataFilter,
84
- ye as DateField,
82
+ Ro as Count,
83
+ ho as DataFilter,
84
+ Je as DateField,
85
85
  Be as DateTimeField,
86
- Po as DelayedActions,
87
- Ne as EmailField,
86
+ Eo as DelayedActions,
87
+ ke as EmailField,
88
88
  N as EventDispatcherContext,
89
- k as EventDispatcherProvider,
90
- ke as FileField,
91
- io as FolderSortableTree,
92
- no as FormatNumeral,
89
+ z as EventDispatcherProvider,
90
+ Ue as FileField,
91
+ lo as FolderSortableTree,
92
+ so as FormatNumeral,
93
93
  O as GlobalDataContext,
94
94
  j as GlobalDataContextProvider,
95
95
  r as HashChangeListener,
96
- Ge as HiddenField,
96
+ Ie as HiddenField,
97
97
  a as Hide,
98
- uo as Html,
99
- Se as Input,
100
- Fo as LabelFromValue,
101
- m as MessageListener,
102
- Oe as MonthField,
103
- je as NumberField,
104
- So as PageControls,
98
+ co as Html,
99
+ He as Input,
100
+ Do as LabelFromValue,
101
+ p as MessageListener,
102
+ We as MonthField,
103
+ qe as NumberField,
104
+ Ho as PageControls,
105
105
  K as PaginationContext,
106
- Ke as PasswordField,
106
+ Qe as PasswordField,
107
107
  Mo as Phantom,
108
- go as PreformattedMarkup,
109
- Xe as RangeField,
108
+ Co as PreformattedMarkup,
109
+ Ye as RangeField,
110
110
  f as ReactOnEvent,
111
- yo as ReactiveJsonBasicComponentWrapper,
111
+ Jo as ReactiveJsonBasicComponentWrapper,
112
112
  X as ReactiveJsonRoot,
113
113
  Bo as ReactiveJsonSubroot,
114
114
  l as Redirect,
115
- Ze as SearchField,
115
+ _e as SearchField,
116
116
  s as SetAttributeValue,
117
117
  vo as SortableTreeItemCollapseButton,
118
- No as Switch,
119
- $e as TelField,
118
+ ko as Switch,
119
+ eo as TelField,
120
120
  Z as TemplateContext,
121
- oo as TextField,
122
- to as TimeField,
121
+ ro as TextField,
122
+ ao as TimeField,
123
123
  u as ToggleAttributeValue,
124
124
  F as UnsetAttribute,
125
- g as UnsetAttributeValue,
125
+ b as UnsetAttributeValue,
126
126
  po as UrlField,
127
- Ae as VariablesDebug,
128
- Re as View,
129
- v as VisuallyHide,
130
- xo as WeekField,
131
- ko as addData,
132
- z as addEventListener,
133
- me as alterData,
127
+ Pe as VariablesDebug,
128
+ Ve as View,
129
+ g as VisuallyHide,
130
+ fo as WeekField,
131
+ Uo as addData,
132
+ U as addEventListener,
133
+ pe as alterData,
134
134
  fe as analyzeDataOverrideReferences,
135
135
  le as applyDataMapping,
136
136
  T as coreDataMappingComponents,
137
137
  V as coreDataProcessorComponents,
138
- P as coreElementComponents,
139
- L as coreReactionComponents,
138
+ A as coreElementComponents,
139
+ P as coreHookComponents,
140
+ H as coreReactionComponents,
140
141
  $ as dataLocationToPath,
141
142
  ee as evaluateAttributes,
142
143
  oe as evaluateTemplateValue,
143
144
  re as evaluateTemplateValueCollection,
144
- Oo as executeHttpRequest,
145
- Go as fetchData,
145
+ Wo as executeHttpRequest,
146
+ Io as fetchData,
146
147
  se as formatString,
147
- Ao as getReactionFunctionsToExecute,
148
+ Po as getReactionFunctionsToExecute,
148
149
  te as isTemplateValue,
149
150
  y as isValid,
150
151
  de as maybeFormatString,
151
- B as mergeComponentCollections,
152
- jo as moveData,
153
- be as normalizeAttributesForReactJsx,
152
+ w as mergeComponentCollections,
153
+ qo as moveData,
154
+ Ce as normalizeAttributeNameForReactJsx,
155
+ ge as normalizeAttributesForReactJsx,
154
156
  De as parseRjBuild,
155
- Ko as postMessage,
157
+ Qo as postMessage,
156
158
  ce as propsDataLocationToPathAndValue,
157
- Xo as redirectNow,
158
- Zo as removeData,
159
+ Yo as redirectNow,
160
+ _o as removeData,
159
161
  G as removeEventListener,
160
- $o as setClipboardData,
161
- or as setData,
162
- he as simpleMapping,
163
- Ce as stringToBoolean,
164
- tr as submitData,
162
+ er as setClipboardData,
163
+ rr as setData,
164
+ Ae as simpleMapping,
165
+ Te as stringToBoolean,
166
+ ar as submitData,
165
167
  pr as triggerEvent,
166
- ae as useEvaluatedAttributes,
167
- E as usePagination
168
+ ae as useEvaluatedAttributes
168
169
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ea-lab/reactive-json",
3
3
  "private": false,
4
- "version": "1.0.0-alpha.6",
4
+ "version": "1.0.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",