@ea-lab/reactive-json 0.7.0 → 1.0.0-alpha.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.
- package/README.md +1 -3
- package/dist/TemplateSystem-kQJEKjik.js +3568 -0
- package/dist/assets/VariablesDebug.css +1 -4
- package/dist/assets/reset.css +4 -0
- package/dist/assets/usePagination.css +1 -0
- package/dist/component/action/HashChangeListener.js +29 -7
- package/dist/component/action/MessageListener.js +26 -8
- package/dist/component/action/ReactOnEvent.js +64 -8
- package/dist/component/action/Redirect.js +9 -5
- package/dist/component/action/SetAttributeValue.js +37 -5
- package/dist/component/action/ToggleAttributeValue.js +56 -5
- package/dist/component/action/UnsetAttribute.js +20 -5
- package/dist/component/action/UnsetAttributeValue.js +58 -5
- package/dist/component/action/index.js +19 -15
- package/dist/component/dataMapping/index.js +6 -3
- package/dist/component/dataMapping/simpleMapping.js +93 -2
- package/dist/component/element/debug/VariablesDebug/VariablesDebug.js +110 -13
- package/dist/component/element/debug/index.js +2 -2
- package/dist/component/element/html/FolderSortableTree.js +131 -8
- package/dist/component/element/html/FormatNumeral.js +57 -6
- package/dist/component/element/html/Html.js +1 -1
- package/dist/component/element/html/LabelFromValue.js +25 -6
- package/dist/component/element/html/PreformattedMarkup.js +50 -7
- package/dist/component/element/html/SortableTreeItemCollapseButton.js +10 -5
- package/dist/component/element/html/index.js +12 -10
- package/dist/component/element/index.js +35 -30
- package/dist/component/element/special/Count.js +21 -10
- package/dist/component/element/special/DataFilter.js +75 -6
- package/dist/component/element/special/DelayedActions.js +46 -7
- package/dist/component/element/special/Phantom.js +12 -3
- package/dist/component/element/special/ReactiveJsonBasicComponentWrapper.js +29 -0
- package/dist/component/element/special/ReactiveJsonSubroot.js +4 -3
- package/dist/component/element/special/Switch.js +78 -8
- package/dist/component/element/special/index.js +16 -10
- package/dist/component/hook/index.js +1 -1
- package/dist/component/hook/usePagination.js +172 -4
- package/dist/component/index.js +85 -63
- package/dist/component/reaction/addData.js +23 -3
- package/dist/component/reaction/fetchData.js +12 -2
- package/dist/component/reaction/index.js +34 -12
- package/dist/component/reaction/moveData.js +34 -2
- package/dist/component/reaction/postMessage.js +23 -2
- package/dist/component/reaction/redirectNow.js +6 -2
- package/dist/component/reaction/removeData.js +27 -2
- package/dist/component/reaction/setClipboardData.js +16 -2
- package/dist/component/reaction/setData.js +22 -3
- package/dist/component/reaction/submitData.js +25 -2
- package/dist/component/reaction/utility/httpRequestCommon.js +3 -2
- package/dist/component/reaction/utility/index.js +1 -1
- package/dist/coreComponentsPlugin.js +5 -2
- package/dist/dnd-kit-sortable-tree.esm-Cz1RJyIg.js +4135 -0
- package/dist/engine/Actions.js +4 -7
- package/dist/engine/ParsingDebugDisplay/ParsingDebugDisplay.js +692 -3
- package/dist/engine/ReactiveJsonRoot.js +8 -6
- package/dist/engine/TemplateSystem.js +3 -3
- package/dist/engine/View.js +2 -7
- package/dist/engine/index.js +38 -37
- package/dist/engine/utility/alterData.js +7 -1
- package/dist/engine/utility/analyzeDataOverrideReferences.js +41 -2
- package/dist/engine/utility/formElementsCommon.js +34 -0
- package/dist/engine/utility/formatString.js +19 -3
- package/dist/engine/utility/index.js +12 -11
- package/dist/httpRequestCommon-BFntjNdS.js +1799 -0
- package/dist/index-BA09SSaJ.js +26 -0
- package/dist/index-Bzk15m61.js +19 -0
- package/dist/index-CACLSxWi.js +8 -0
- package/dist/index-NNBvIV0S.js +1873 -0
- package/dist/index-OhHUX6nj.js +460 -0
- package/dist/main.js +124 -102
- package/package.json +4 -4
- package/dist/HashChangeListener-D6HwdXBJ.js +0 -8526
- package/dist/ParsingDebugDisplay-8f4yL4Jw.js +0 -696
- package/dist/VariablesDebug-pv5GGWel.js +0 -9262
- package/dist/component/action/Popover.js +0 -6
- package/dist/component/action/Tooltip.js +0 -5
- package/dist/component/element/form/CheckBoxField.js +0 -8
- package/dist/component/element/form/DateField.js +0 -8
- package/dist/component/element/form/NumberField.js +0 -8
- package/dist/component/element/form/SelectField.js +0 -8
- package/dist/component/element/form/TextAreaField.js +0 -8
- package/dist/component/element/form/TextField.js +0 -8
- package/dist/component/element/form/formElementsCommon.js +0 -4
- package/dist/component/element/form/index.js +0 -10
- package/dist/component/element/html/AccordionItem.js +0 -6
- package/dist/component/element/html/Modal.js +0 -8
- package/dist/component/element/html/Tabs.js +0 -8
- package/dist/component/element/special/BootstrapElement.js +0 -5
- package/dist/engine/PaginationProvider.js +0 -30
- package/dist/usePagination-Bb6lefHG.js +0 -353
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../lodash-CYNxjS-I.js";
|
|
1
|
+
import { d as n, b as s } from "../../TemplateSystem-kQJEKjik.js";
|
|
2
|
+
import { l as u } from "../../lodash-CYNxjS-I.js";
|
|
3
|
+
const i = (o) => {
|
|
4
|
+
const { globalDataContext: a, templateContext: t } = o, { path: l, value: d } = o.args;
|
|
5
|
+
if (l === void 0)
|
|
6
|
+
return;
|
|
7
|
+
const c = n({
|
|
8
|
+
currentPath: t.templatePath,
|
|
9
|
+
dataLocation: l,
|
|
10
|
+
globalDataContext: a,
|
|
11
|
+
templateContext: t
|
|
12
|
+
}), e = s({
|
|
13
|
+
valueToEvaluate: d,
|
|
14
|
+
globalDataContext: a,
|
|
15
|
+
templateContext: t
|
|
16
|
+
});
|
|
17
|
+
a == null || a.updateData(
|
|
18
|
+
typeof e != "object" ? e : u.cloneDeep(e),
|
|
19
|
+
c,
|
|
20
|
+
"add"
|
|
21
|
+
);
|
|
22
|
+
};
|
|
3
23
|
export {
|
|
4
|
-
|
|
24
|
+
i as addData
|
|
5
25
|
};
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as a } from "../../httpRequestCommon-BFntjNdS.js";
|
|
2
|
+
const c = (t) => {
|
|
3
|
+
var e;
|
|
4
|
+
a(
|
|
5
|
+
t,
|
|
6
|
+
{
|
|
7
|
+
method: ((e = t == null ? void 0 : t.args) == null ? void 0 : e.httpMethod) ?? "get"
|
|
8
|
+
},
|
|
9
|
+
"fetchData"
|
|
10
|
+
);
|
|
11
|
+
};
|
|
2
12
|
export {
|
|
3
|
-
|
|
13
|
+
c as fetchData
|
|
4
14
|
};
|
|
@@ -1,15 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { addData as t } from "./addData.js";
|
|
2
|
+
import { fetchData as o } from "./fetchData.js";
|
|
3
|
+
import { moveData as r } from "./moveData.js";
|
|
4
|
+
import { postMessage as m } from "./postMessage.js";
|
|
5
|
+
import { redirectNow as e } from "./redirectNow.js";
|
|
6
|
+
import { removeData as a } from "./removeData.js";
|
|
7
|
+
import { setClipboardData as p } from "./setClipboardData.js";
|
|
8
|
+
import { setData as i } from "./setData.js";
|
|
9
|
+
import { submitData as f } from "./submitData.js";
|
|
10
|
+
import { triggerEvent as s } from "./triggerEvent.js";
|
|
11
|
+
import { e as q } from "../../httpRequestCommon-BFntjNdS.js";
|
|
12
|
+
const R = {
|
|
13
|
+
addData: t,
|
|
14
|
+
fetchData: o,
|
|
15
|
+
moveData: r,
|
|
16
|
+
postMessage: m,
|
|
17
|
+
redirectNow: e,
|
|
18
|
+
removeData: a,
|
|
19
|
+
setClipboardData: p,
|
|
20
|
+
setData: i,
|
|
21
|
+
submitData: f,
|
|
22
|
+
triggerEvent: s
|
|
23
|
+
};
|
|
3
24
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
o as
|
|
8
|
-
|
|
9
|
-
m as
|
|
10
|
-
|
|
11
|
-
|
|
25
|
+
t as addData,
|
|
26
|
+
R as coreReactionComponents,
|
|
27
|
+
q as executeHttpRequest,
|
|
28
|
+
o as fetchData,
|
|
29
|
+
r as moveData,
|
|
30
|
+
m as postMessage,
|
|
31
|
+
e as redirectNow,
|
|
32
|
+
a as removeData,
|
|
33
|
+
p as setClipboardData,
|
|
12
34
|
i as setData,
|
|
13
|
-
|
|
14
|
-
|
|
35
|
+
f as submitData,
|
|
36
|
+
s as triggerEvent
|
|
15
37
|
};
|
|
@@ -1,4 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as i } from "../../TemplateSystem-kQJEKjik.js";
|
|
2
|
+
const d = (e) => {
|
|
3
|
+
const { globalDataContext: a, templateContext: n } = e, { path: r, target: l } = e.args;
|
|
4
|
+
if (r === void 0 && l !== "currentTemplateData")
|
|
5
|
+
return;
|
|
6
|
+
let t;
|
|
7
|
+
if (r)
|
|
8
|
+
t = i({
|
|
9
|
+
currentPath: n.templatePath,
|
|
10
|
+
dataLocation: r,
|
|
11
|
+
globalDataContext: a,
|
|
12
|
+
templateContext: n
|
|
13
|
+
});
|
|
14
|
+
else {
|
|
15
|
+
t = n.templatePath;
|
|
16
|
+
let o = e.args.parentLevel ?? 0;
|
|
17
|
+
for (; o > 0; ) {
|
|
18
|
+
--o;
|
|
19
|
+
const s = t.lastIndexOf(".");
|
|
20
|
+
if (s < 1)
|
|
21
|
+
return;
|
|
22
|
+
t = t.substring(0, s);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const { increment: c } = e.args;
|
|
26
|
+
a == null || a.updateData(
|
|
27
|
+
{
|
|
28
|
+
increment: c
|
|
29
|
+
},
|
|
30
|
+
t,
|
|
31
|
+
"move"
|
|
32
|
+
);
|
|
33
|
+
};
|
|
2
34
|
export {
|
|
3
|
-
|
|
35
|
+
d as moveData
|
|
4
36
|
};
|
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as x } from "../../TemplateSystem-kQJEKjik.js";
|
|
2
|
+
const V = (e) => {
|
|
3
|
+
var n, l, c, i, m, d, u, w, T, h, v;
|
|
4
|
+
const t = {
|
|
5
|
+
parent: window.parent,
|
|
6
|
+
self: window
|
|
7
|
+
}[((n = e == null ? void 0 : e.args) == null ? void 0 : n.messageTarget) ?? "parent"] ?? window, g = ((l = e == null ? void 0 : e.args) == null ? void 0 : l.targetOrigin) ?? window.location.origin, a = x({
|
|
8
|
+
globalDataContext: e.globalDataContext,
|
|
9
|
+
templateContext: e.templateContext,
|
|
10
|
+
valueToEvaluate: (c = e == null ? void 0 : e.args) == null ? void 0 : c.message
|
|
11
|
+
});
|
|
12
|
+
if (((i = e == null ? void 0 : e.args) == null ? void 0 : i.on) === "change" && typeof a == "object" && ((m = e == null ? void 0 : e.args) != null && m.includeChangedValue) && ((u = (d = e == null ? void 0 : e.event) == null ? void 0 : d.target) == null ? void 0 : u.nodeName) === "INPUT") {
|
|
13
|
+
let b;
|
|
14
|
+
switch ((T = (w = e == null ? void 0 : e.event) == null ? void 0 : w.target) == null ? void 0 : T.type) {
|
|
15
|
+
case "checkbox":
|
|
16
|
+
b = (v = (h = e == null ? void 0 : e.event) == null ? void 0 : h.target) == null ? void 0 : v.checked;
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
a.changedValue = b;
|
|
20
|
+
}
|
|
21
|
+
t && g && t.postMessage(a, g);
|
|
22
|
+
};
|
|
2
23
|
export {
|
|
3
|
-
|
|
24
|
+
V as postMessage
|
|
4
25
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as l } from "../../TemplateSystem-kQJEKjik.js";
|
|
2
|
+
const r = (e) => {
|
|
3
|
+
const { globalDataContext: a, templateContext: o } = e, { to: t } = e.args;
|
|
4
|
+
!t || typeof t != "string" || (window.location.href = l({ valueToEvaluate: t, globalDataContext: a, templateContext: o }));
|
|
5
|
+
};
|
|
2
6
|
export {
|
|
3
|
-
|
|
7
|
+
r as redirectNow
|
|
4
8
|
};
|
|
@@ -1,4 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as i } from "../../TemplateSystem-kQJEKjik.js";
|
|
2
|
+
const c = (a) => {
|
|
3
|
+
const { globalDataContext: e, templateContext: r } = a, { path: n, target: s } = a.args;
|
|
4
|
+
if (n === void 0 && s !== "currentTemplateData")
|
|
5
|
+
return;
|
|
6
|
+
let t;
|
|
7
|
+
if (n)
|
|
8
|
+
t = i({
|
|
9
|
+
currentPath: r.templatePath,
|
|
10
|
+
dataLocation: n,
|
|
11
|
+
globalDataContext: e,
|
|
12
|
+
templateContext: r
|
|
13
|
+
});
|
|
14
|
+
else {
|
|
15
|
+
t = r.templatePath;
|
|
16
|
+
let o = a.args.parentLevel ?? 0;
|
|
17
|
+
for (; o > 0; ) {
|
|
18
|
+
--o;
|
|
19
|
+
const l = t.lastIndexOf(".");
|
|
20
|
+
if (l < 1)
|
|
21
|
+
return;
|
|
22
|
+
t = t.substring(0, l);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
e == null || e.updateData(void 0, t, "remove");
|
|
26
|
+
};
|
|
2
27
|
export {
|
|
3
|
-
|
|
28
|
+
c as removeData
|
|
4
29
|
};
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as i } from "../../TemplateSystem-kQJEKjik.js";
|
|
2
|
+
const n = async (a) => {
|
|
3
|
+
var e;
|
|
4
|
+
const { globalDataContext: o, templateContext: l } = a, t = i({
|
|
5
|
+
valueToEvaluate: (e = a == null ? void 0 : a.args) == null ? void 0 : e.value,
|
|
6
|
+
globalDataContext: o,
|
|
7
|
+
templateContext: l
|
|
8
|
+
});
|
|
9
|
+
if (typeof t == "string")
|
|
10
|
+
try {
|
|
11
|
+
await navigator.clipboard.writeText(t.toString());
|
|
12
|
+
} catch (r) {
|
|
13
|
+
console.error("Failed to copy data to the clipboard:", r);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
2
16
|
export {
|
|
3
|
-
|
|
17
|
+
n as setClipboardData
|
|
4
18
|
};
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../lodash-CYNxjS-I.js";
|
|
1
|
+
import { d as n, b as u } from "../../TemplateSystem-kQJEKjik.js";
|
|
2
|
+
import { l as r } from "../../lodash-CYNxjS-I.js";
|
|
3
|
+
const i = (o) => {
|
|
4
|
+
const { globalDataContext: t, templateContext: a } = o, { path: l, value: s } = o.args;
|
|
5
|
+
if (l === void 0)
|
|
6
|
+
return;
|
|
7
|
+
const c = n({
|
|
8
|
+
currentPath: a.templatePath,
|
|
9
|
+
dataLocation: l,
|
|
10
|
+
globalDataContext: t,
|
|
11
|
+
templateContext: a
|
|
12
|
+
}), e = u({
|
|
13
|
+
valueToEvaluate: s,
|
|
14
|
+
globalDataContext: t,
|
|
15
|
+
templateContext: a
|
|
16
|
+
});
|
|
17
|
+
t == null || t.updateData(
|
|
18
|
+
typeof e != "object" ? e : r.cloneDeep(e),
|
|
19
|
+
c
|
|
20
|
+
);
|
|
21
|
+
};
|
|
3
22
|
export {
|
|
4
|
-
|
|
23
|
+
i as setData
|
|
5
24
|
};
|
|
@@ -1,4 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as d } from "../../httpRequestCommon-BFntjNdS.js";
|
|
2
|
+
import { a as D } from "../../TemplateSystem-kQJEKjik.js";
|
|
3
|
+
const x = (t) => {
|
|
4
|
+
var m, o, s;
|
|
5
|
+
const { globalDataContext: n, templateContext: _ } = t, l = n.getRootContext ? n.getRootContext() : n;
|
|
6
|
+
let e = {};
|
|
7
|
+
(m = t == null ? void 0 : t.args) != null && m.hasOwnProperty("data") ? (e = t.args.data, e = ((a, i) => {
|
|
8
|
+
if (Array.isArray(a))
|
|
9
|
+
return a.map(i);
|
|
10
|
+
if (typeof a == "object" && a !== null) {
|
|
11
|
+
const r = Object.entries(a).map(([u, b]) => [u, i(b)]);
|
|
12
|
+
return Object.fromEntries(r);
|
|
13
|
+
} else
|
|
14
|
+
return i(a);
|
|
15
|
+
})(e, (a) => D({ valueToEvaluate: a, globalDataContext: l, templateContext: _ })), l.templateData.__state !== void 0 && (e.__state = l.templateData.__state)) : (e.data = l.templateData, l.templateData.__state !== void 0 && (e.data.__state = l.templateData.__state)), d(
|
|
16
|
+
t,
|
|
17
|
+
{
|
|
18
|
+
method: ((o = t == null ? void 0 : t.args) == null ? void 0 : o.httpMethod) ?? "post",
|
|
19
|
+
data: e,
|
|
20
|
+
submitSilently: (s = t == null ? void 0 : t.args) == null ? void 0 : s.submitSilently
|
|
21
|
+
},
|
|
22
|
+
"submitData"
|
|
23
|
+
);
|
|
24
|
+
};
|
|
2
25
|
export {
|
|
3
|
-
|
|
26
|
+
x as submitData
|
|
4
27
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as i } from "../../../httpRequestCommon-BFntjNdS.js";
|
|
2
|
+
import "../../../TemplateSystem-kQJEKjik.js";
|
|
2
3
|
import "../../../engine/utility/alterData.js";
|
|
3
4
|
import "../../../engine/utility/dataMappingSystem.js";
|
|
4
5
|
import "../../../js-yaml-Bw0KO4XO.js";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
i as executeHttpRequest
|
|
7
8
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./index-BA09SSaJ.js";
|
|
2
|
+
import "./component/dataMapping/index.js";
|
|
2
3
|
import "./component/dataProcessor/index.js";
|
|
4
|
+
import { b as e } from "./index-OhHUX6nj.js";
|
|
5
|
+
import "./component/reaction/index.js";
|
|
3
6
|
export {
|
|
4
|
-
|
|
7
|
+
e as coreComponentsPlugin
|
|
5
8
|
};
|