@ea-lab/reactive-json 1.0.0-alpha.1 → 1.0.0-alpha.3
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/dist/assets/VariablesDebug.css +4 -1
- package/dist/component/element/debug/VariablesDebug/VariablesDebug.js +15 -16
- package/dist/component/element/html/FolderSortableTree.js +7 -7
- package/dist/component/element/html/Html.js +57 -9
- package/dist/component/element/html/LabelFromValue.js +4 -4
- package/dist/component/element/html/index.js +1 -1
- package/dist/component/element/index.js +37 -31
- package/dist/component/element/special/DataFilter.js +1 -1
- package/dist/component/element/special/DelayedActions.js +3 -3
- package/dist/component/element/special/Phantom.js +1 -1
- package/dist/component/element/special/ReactiveJsonBasicComponentWrapper.js +11 -24
- package/dist/component/element/special/ReactiveJsonSubroot.js +53 -12
- package/dist/component/element/special/Switch.js +16 -16
- package/dist/component/element/special/index.js +6 -6
- package/dist/component/index.js +69 -68
- package/dist/coreComponentsPlugin.js +13 -6
- package/dist/engine/ReactiveJsonRoot.js +373 -18
- package/dist/engine/View.js +74 -7
- package/dist/engine/index.js +5 -5
- package/dist/{index-B3RKTGQ2.js → index-BNvY8PkY.js} +1 -1
- package/dist/index-Ya6_R5yr.js +23 -0
- package/dist/main.js +90 -87
- package/package.json +1 -1
- package/dist/View-D8TN1L2h.js +0 -126
- package/dist/assets/reset.css +0 -4
- package/dist/index-BYLJtf9L.js +0 -462
|
@@ -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}}
|
|
@@ -12,12 +12,11 @@ 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
|
|
15
|
+
import { DebugMode as c } 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 */
|
|
19
18
|
import { flattenObject as J } from "./utils.js";
|
|
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 = {
|
|
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 = {
|
|
21
20
|
debugRoot: O,
|
|
22
21
|
container: j,
|
|
23
22
|
expanded: k,
|
|
@@ -31,8 +30,8 @@ const O = "_debugRoot_1ny7q_1", j = "_container_1ny7q_16", k = "_expanded_1ny7q_
|
|
|
31
30
|
copyBtnSuccess: V,
|
|
32
31
|
copyBtnError: F,
|
|
33
32
|
info: W
|
|
34
|
-
},
|
|
35
|
-
const [
|
|
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);
|
|
36
35
|
q(() => {
|
|
37
36
|
if (typeof document > "u") return;
|
|
38
37
|
let t = document.getElementById("rj-debug-root");
|
|
@@ -42,7 +41,7 @@ const O = "_debugRoot_1ny7q_1", j = "_container_1ny7q_16", k = "_expanded_1ny7q_
|
|
|
42
41
|
const t = d.current;
|
|
43
42
|
try {
|
|
44
43
|
if (await navigator.clipboard.writeText(
|
|
45
|
-
i ===
|
|
44
|
+
i === c.JSON ? b : h.map((s) => `${s.path}: ${JSON.stringify(s.value)}`).join(`
|
|
46
45
|
`)
|
|
47
46
|
), !t) return;
|
|
48
47
|
t.classList.add(n.copyBtnSuccess), t.textContent = "Copied!", setTimeout(() => {
|
|
@@ -57,7 +56,7 @@ const O = "_debugRoot_1ny7q_1", j = "_container_1ny7q_16", k = "_expanded_1ny7q_
|
|
|
57
56
|
}, N = /* @__PURE__ */ e(L, { ...v, attributesHolderRef: f, children: /* @__PURE__ */ a(
|
|
58
57
|
"div",
|
|
59
58
|
{
|
|
60
|
-
className: `${n.container} ${
|
|
59
|
+
className: `${n.container} ${r ? n.expanded : ""}`,
|
|
61
60
|
onClick: () => u((t) => !t),
|
|
62
61
|
role: "button",
|
|
63
62
|
ref: f,
|
|
@@ -68,20 +67,20 @@ const O = "_debugRoot_1ny7q_1", j = "_container_1ny7q_16", k = "_expanded_1ny7q_
|
|
|
68
67
|
/* @__PURE__ */ e("code", { children: o.templatePath })
|
|
69
68
|
] }),
|
|
70
69
|
/* @__PURE__ */ a("div", { className: n.actions, onClick: (t) => t.stopPropagation(), children: [
|
|
71
|
-
|
|
70
|
+
r && /* @__PURE__ */ a(x, { children: [
|
|
72
71
|
/* @__PURE__ */ e(
|
|
73
72
|
"button",
|
|
74
73
|
{
|
|
75
|
-
className: `${n.btn} ${i ===
|
|
76
|
-
onClick: () => _(
|
|
74
|
+
className: `${n.btn} ${i === c.LIST ? n.active : ""}`,
|
|
75
|
+
onClick: () => _(c.LIST),
|
|
77
76
|
children: "List"
|
|
78
77
|
}
|
|
79
78
|
),
|
|
80
79
|
/* @__PURE__ */ e(
|
|
81
80
|
"button",
|
|
82
81
|
{
|
|
83
|
-
className: `${n.btn} ${i ===
|
|
84
|
-
onClick: () => _(
|
|
82
|
+
className: `${n.btn} ${i === c.JSON ? n.active : ""}`,
|
|
83
|
+
onClick: () => _(c.JSON),
|
|
85
84
|
children: "JSON"
|
|
86
85
|
}
|
|
87
86
|
)
|
|
@@ -91,10 +90,10 @@ const O = "_debugRoot_1ny7q_1", j = "_container_1ny7q_16", k = "_expanded_1ny7q_
|
|
|
91
90
|
{
|
|
92
91
|
className: n.btn,
|
|
93
92
|
onClick: () => u((t) => !t),
|
|
94
|
-
children:
|
|
93
|
+
children: r ? "Collapse" : "Expand"
|
|
95
94
|
}
|
|
96
95
|
),
|
|
97
|
-
|
|
96
|
+
r && /* @__PURE__ */ e(
|
|
98
97
|
"button",
|
|
99
98
|
{
|
|
100
99
|
className: `${n.btn} ${n.copyBtn}`,
|
|
@@ -105,12 +104,12 @@ const O = "_debugRoot_1ny7q_1", j = "_container_1ny7q_16", k = "_expanded_1ny7q_
|
|
|
105
104
|
)
|
|
106
105
|
] })
|
|
107
106
|
] }),
|
|
108
|
-
|
|
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 }) })
|
|
109
108
|
]
|
|
110
109
|
}
|
|
111
110
|
) });
|
|
112
111
|
return y ? E.createPortal(N, y) : null;
|
|
113
112
|
};
|
|
114
113
|
export {
|
|
115
|
-
|
|
114
|
+
dt as VariablesDebug
|
|
116
115
|
};
|
|
@@ -4,26 +4,26 @@ import { l as _ } from "../../../lodash-CYNxjS-I.js";
|
|
|
4
4
|
import { useContext as A, forwardRef as R } from "react";
|
|
5
5
|
import { ActionDependant as G } from "../../../engine/Actions.js";
|
|
6
6
|
import { GlobalDataContext as H } from "../../../engine/GlobalDataContext.js";
|
|
7
|
-
import { TemplateContext as
|
|
7
|
+
import { TemplateContext as y } from "../../../engine/TemplateContext.js";
|
|
8
8
|
import { evaluateTemplateValue as O } from "../../../engine/TemplateSystem.js";
|
|
9
|
-
import {
|
|
9
|
+
import { View as W } from "../../../engine/View.js";
|
|
10
10
|
import { propsDataLocationToPathAndValue as q } from "../../../engine/utility/formElementsCommon.js";
|
|
11
|
-
function
|
|
11
|
+
function V(t) {
|
|
12
12
|
var r, n, a = "";
|
|
13
13
|
if (typeof t == "string" || typeof t == "number") a += t;
|
|
14
14
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
15
15
|
var s = t.length;
|
|
16
|
-
for (r = 0; r < s; r++) t[r] && (n =
|
|
16
|
+
for (r = 0; r < s; r++) t[r] && (n = V(t[r])) && (a && (a += " "), a += n);
|
|
17
17
|
} else for (n in t) t[n] && (a && (a += " "), a += n);
|
|
18
18
|
return a;
|
|
19
19
|
}
|
|
20
20
|
function z() {
|
|
21
|
-
for (var t, r, n = 0, a = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (r =
|
|
21
|
+
for (var t, r, n = 0, a = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (r = V(t)) && (a && (a += " "), a += r);
|
|
22
22
|
return a;
|
|
23
23
|
}
|
|
24
24
|
const ae = ({ props: t, path: r, datafield: n }) => {
|
|
25
25
|
var P, T;
|
|
26
|
-
const a = A(H), s = A(
|
|
26
|
+
const a = A(H), s = A(y);
|
|
27
27
|
let { formData: i, formDataPath: u } = q({
|
|
28
28
|
currentPath: r,
|
|
29
29
|
datafield: n,
|
|
@@ -100,7 +100,7 @@ const ae = ({ props: t, path: r, datafield: n }) => {
|
|
|
100
100
|
"data-htmlbuilder-tree-item-is-last": e.isLast,
|
|
101
101
|
ref: m,
|
|
102
102
|
children: /* @__PURE__ */ h(
|
|
103
|
-
|
|
103
|
+
y.Provider,
|
|
104
104
|
{
|
|
105
105
|
value: {
|
|
106
106
|
templateData: o,
|
|
@@ -1,11 +1,59 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "../../../engine/Actions.js";
|
|
4
|
-
import "../../../engine/GlobalDataContext.js";
|
|
5
|
-
import "../../../engine/utility/reactJsxHelpers.js";
|
|
6
|
-
import "../../../engine/TemplateContext.js";
|
|
7
|
-
import "../../../engine/TemplateSystem.js";
|
|
8
|
-
import {
|
|
1
|
+
import { jsx as o, jsxs as d, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as b, useRef as A } from "react";
|
|
3
|
+
import { ActionDependant as C } from "../../../engine/Actions.js";
|
|
4
|
+
import { GlobalDataContext as T } from "../../../engine/GlobalDataContext.js";
|
|
5
|
+
import { normalizeAttributesForReactJsx as g } from "../../../engine/utility/reactJsxHelpers.js";
|
|
6
|
+
import { TemplateContext as j } from "../../../engine/TemplateContext.js";
|
|
7
|
+
import { evaluateAttributes as k } from "../../../engine/TemplateSystem.js";
|
|
8
|
+
import { View as c } from "../../../engine/View.js";
|
|
9
|
+
const N = ({ props: e, currentData: m, datafield: v, path: x }) => {
|
|
10
|
+
const h = b(T), p = b(j), i = A(null), l = `${e.tag}`, r = e.extra ?? {}, n = g(e.attributes), a = g(m.attributes);
|
|
11
|
+
for (const t of Object.keys(a)) {
|
|
12
|
+
if (t.charAt(0) === "+") {
|
|
13
|
+
const s = t.substring(1);
|
|
14
|
+
n[s] = (n[s] ?? "").length > 0 ? (
|
|
15
|
+
// Append using a space.
|
|
16
|
+
" " + a[t]
|
|
17
|
+
) : (
|
|
18
|
+
// Set directly.
|
|
19
|
+
a[t]
|
|
20
|
+
);
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
n[t] = a[t];
|
|
24
|
+
}
|
|
25
|
+
const f = k({ attrs: n, globalDataContext: h, templateContext: p });
|
|
26
|
+
return /* @__PURE__ */ o(C, { ...e, attributesHolderRef: i, children: ((t) => t && [
|
|
27
|
+
"area",
|
|
28
|
+
"base",
|
|
29
|
+
"br",
|
|
30
|
+
"col",
|
|
31
|
+
"embed",
|
|
32
|
+
"hr",
|
|
33
|
+
"img",
|
|
34
|
+
"input",
|
|
35
|
+
"link",
|
|
36
|
+
"meta",
|
|
37
|
+
"param",
|
|
38
|
+
"source",
|
|
39
|
+
"track",
|
|
40
|
+
"wbr"
|
|
41
|
+
].indexOf(t) !== -1)(e.tag) ? /* @__PURE__ */ d(u, { children: [
|
|
42
|
+
/* @__PURE__ */ o(l, { ref: i, ...f }),
|
|
43
|
+
Object.keys(r).length ? /* @__PURE__ */ o(c, { props: r }) : ""
|
|
44
|
+
] }) : /* @__PURE__ */ d(u, { children: [
|
|
45
|
+
/* @__PURE__ */ o(l, { ref: i, ...f, children: e.content && /* @__PURE__ */ o(
|
|
46
|
+
c,
|
|
47
|
+
{
|
|
48
|
+
currentData: m.content ?? void 0,
|
|
49
|
+
datafield: "content",
|
|
50
|
+
path: x + ".content",
|
|
51
|
+
props: e.content
|
|
52
|
+
}
|
|
53
|
+
) }),
|
|
54
|
+
Object.keys(r).length ? /* @__PURE__ */ o(c, { props: r }) : ""
|
|
55
|
+
] }) });
|
|
56
|
+
};
|
|
9
57
|
export {
|
|
10
|
-
|
|
58
|
+
N as Html
|
|
11
59
|
};
|
|
@@ -2,11 +2,11 @@ import { jsx as u } from "react/jsx-runtime";
|
|
|
2
2
|
import { useContext as f } from "react";
|
|
3
3
|
import { ActionDependant as D } from "../../../engine/Actions.js";
|
|
4
4
|
import { GlobalDataContext as x } from "../../../engine/GlobalDataContext.js";
|
|
5
|
-
import { TemplateContext as
|
|
5
|
+
import { TemplateContext as b } from "../../../engine/TemplateContext.js";
|
|
6
6
|
import { evaluateTemplateValue as c } from "../../../engine/TemplateSystem.js";
|
|
7
|
-
import {
|
|
7
|
+
import { View as V } from "../../../engine/View.js";
|
|
8
8
|
const O = ({ currentData: s, datafield: o, path: v, props: e }) => {
|
|
9
|
-
const n = f(x), t = f(
|
|
9
|
+
const n = f(x), t = f(b), m = e.dynamicOptions ?? void 0;
|
|
10
10
|
let i;
|
|
11
11
|
m ? i = c({ valueToEvaluate: m, globalDataContext: n, templateContext: t }) ?? [] : i = e.options ?? [];
|
|
12
12
|
let a;
|
|
@@ -22,7 +22,7 @@ const O = ({ currentData: s, datafield: o, path: v, props: e }) => {
|
|
|
22
22
|
return null;
|
|
23
23
|
l = a;
|
|
24
24
|
}
|
|
25
|
-
return /* @__PURE__ */ u(D, { ...e, children: /* @__PURE__ */ u(
|
|
25
|
+
return /* @__PURE__ */ u(D, { ...e, children: /* @__PURE__ */ u(V, { currentData: s, datafield: o, path: v, props: l.label }) });
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
28
|
O as LabelFromValue
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FolderSortableTree as o } from "./FolderSortableTree.js";
|
|
2
2
|
import { FormatNumeral as m } from "./FormatNumeral.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Html as l } from "./Html.js";
|
|
4
4
|
import { LabelFromValue as f } from "./LabelFromValue.js";
|
|
5
5
|
import { PreformattedMarkup as u } from "./PreformattedMarkup.js";
|
|
6
6
|
import { SortableTreeItemCollapseButton as F } from "./SortableTreeItemCollapseButton.js";
|
|
@@ -1,36 +1,42 @@
|
|
|
1
|
-
import "../../index-CACLSxWi.js";
|
|
2
|
-
import "../../index-
|
|
3
|
-
import {
|
|
4
|
-
import { VariablesDebug as
|
|
5
|
-
import { FolderSortableTree as
|
|
6
|
-
import { FormatNumeral as
|
|
7
|
-
import {
|
|
8
|
-
import { LabelFromValue as
|
|
9
|
-
import { PreformattedMarkup as
|
|
1
|
+
import { d as o } from "../../index-CACLSxWi.js";
|
|
2
|
+
import { h as e } from "../../index-BNvY8PkY.js";
|
|
3
|
+
import { s as r } from "../../index-Ya6_R5yr.js";
|
|
4
|
+
import { VariablesDebug as s } from "./debug/VariablesDebug/VariablesDebug.js";
|
|
5
|
+
import { FolderSortableTree as l } from "./html/FolderSortableTree.js";
|
|
6
|
+
import { FormatNumeral as c } from "./html/FormatNumeral.js";
|
|
7
|
+
import { Html as C } from "./html/Html.js";
|
|
8
|
+
import { LabelFromValue as d } from "./html/LabelFromValue.js";
|
|
9
|
+
import { PreformattedMarkup as g } from "./html/PreformattedMarkup.js";
|
|
10
10
|
import { SortableTreeItemCollapseButton as S } from "./html/SortableTreeItemCollapseButton.js";
|
|
11
|
-
import { Count as
|
|
12
|
-
import { DataFilter as
|
|
13
|
-
import { DelayedActions as
|
|
14
|
-
import { PageControls as
|
|
15
|
-
import { Phantom as
|
|
16
|
-
import { ReactiveJsonBasicComponentWrapper as
|
|
17
|
-
import {
|
|
11
|
+
import { Count as P } from "./special/Count.js";
|
|
12
|
+
import { DataFilter as T } from "./special/DataFilter.js";
|
|
13
|
+
import { DelayedActions as B, getReactionFunctionsToExecute as E } from "./special/DelayedActions.js";
|
|
14
|
+
import { PageControls as V } from "./special/PageControls.js";
|
|
15
|
+
import { Phantom as w } from "./special/Phantom.js";
|
|
16
|
+
import { ReactiveJsonBasicComponentWrapper as A } from "./special/ReactiveJsonBasicComponentWrapper.js";
|
|
17
|
+
import { ReactiveJsonSubroot as I } from "./special/ReactiveJsonSubroot.js";
|
|
18
|
+
import { Switch as M } from "./special/Switch.js";
|
|
19
|
+
const a = {
|
|
20
|
+
...o,
|
|
21
|
+
...e,
|
|
22
|
+
...r
|
|
23
|
+
};
|
|
18
24
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
P as Count,
|
|
26
|
+
T as DataFilter,
|
|
27
|
+
B as DelayedActions,
|
|
28
|
+
l as FolderSortableTree,
|
|
29
|
+
c as FormatNumeral,
|
|
30
|
+
C as Html,
|
|
31
|
+
d as LabelFromValue,
|
|
32
|
+
V as PageControls,
|
|
33
|
+
w as Phantom,
|
|
34
|
+
g as PreformattedMarkup,
|
|
35
|
+
A as ReactiveJsonBasicComponentWrapper,
|
|
36
|
+
I as ReactiveJsonSubroot,
|
|
31
37
|
S as SortableTreeItemCollapseButton,
|
|
32
|
-
|
|
33
|
-
|
|
38
|
+
M as Switch,
|
|
39
|
+
s as VariablesDebug,
|
|
34
40
|
a as coreElementComponents,
|
|
35
|
-
|
|
41
|
+
E as getReactionFunctionsToExecute
|
|
36
42
|
};
|
|
@@ -3,7 +3,7 @@ import { useContext as b } from "react";
|
|
|
3
3
|
import { isValid as P } from "../../../engine/Actions.js";
|
|
4
4
|
import { GlobalDataContext as D } from "../../../engine/GlobalDataContext.js";
|
|
5
5
|
import { TemplateContext as x } from "../../../engine/TemplateContext.js";
|
|
6
|
-
import {
|
|
6
|
+
import { View as v } from "../../../engine/View.js";
|
|
7
7
|
const W = (t) => {
|
|
8
8
|
var u, f;
|
|
9
9
|
const o = b(D), e = b(x), n = { globalDataContext: o, templateContext: e }, { contextToFilter: l = "global", filters: y = [] } = t.props, s = (p) => {
|
|
@@ -3,8 +3,8 @@ import { useContext as m, useEffect as x } from "react";
|
|
|
3
3
|
import { ActionDependant as v, isValid as A } from "../../../engine/Actions.js";
|
|
4
4
|
import { GlobalDataContext as F } from "../../../engine/GlobalDataContext.js";
|
|
5
5
|
import { TemplateContext as h } from "../../../engine/TemplateContext.js";
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
6
|
+
import { View as y } from "../../../engine/View.js";
|
|
7
|
+
const p = ({ props: t, currentData: e, path: i }) => {
|
|
8
8
|
const c = m(F), n = m(h), a = Array.isArray(t.delayedActions) ? t.delayedActions : [], o = { globalDataContext: c, templateContext: n };
|
|
9
9
|
return x(() => {
|
|
10
10
|
if (!t.interval)
|
|
@@ -44,6 +44,6 @@ const V = ({ props: t, currentData: e, path: i }) => {
|
|
|
44
44
|
return i;
|
|
45
45
|
};
|
|
46
46
|
export {
|
|
47
|
-
|
|
47
|
+
p as DelayedActions,
|
|
48
48
|
g as getReactionFunctionsToExecute
|
|
49
49
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { ActionDependant as i } from "../../../engine/Actions.js";
|
|
3
|
-
import {
|
|
3
|
+
import { View as m } from "../../../engine/View.js";
|
|
4
4
|
const p = ({ props: o, currentData: t, path: e }) => /* @__PURE__ */ n(i, { ...o, children: o.content && /* @__PURE__ */ n(
|
|
5
5
|
m,
|
|
6
6
|
{
|
|
@@ -1,32 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ActionDependant as
|
|
3
|
-
import "../../../engine/
|
|
4
|
-
import "../../../engine/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import "../../../dnd-kit-sortable-tree.esm-Cz1RJyIg.js";
|
|
10
|
-
import "../../../engine/TemplateContext.js";
|
|
11
|
-
import { useEvaluatedAttributes as p } from "../../../engine/TemplateSystem.js";
|
|
12
|
-
import '../../../assets/reset.css';/* empty css */
|
|
13
|
-
import { V as a } from "../../../View-D8TN1L2h.js";
|
|
14
|
-
import "../../../index-NNBvIV0S.js";
|
|
15
|
-
import "../../../jsonpath-B9kE9k9e.js";
|
|
16
|
-
import "../../../js-yaml-Bw0KO4XO.js";
|
|
17
|
-
import "../../../engine/ParsingDebugDisplay/ParsingDebugDisplay.js";
|
|
18
|
-
function R({ props: t, currentData: i, path: e, reactComponent: o }) {
|
|
19
|
-
const n = p(t.attributes);
|
|
20
|
-
return o ? /* @__PURE__ */ r(m, { ...t, children: /* @__PURE__ */ r(o, { ...n, children: t.content && /* @__PURE__ */ r(
|
|
21
|
-
a,
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ActionDependant as c } from "../../../engine/Actions.js";
|
|
3
|
+
import { useEvaluatedAttributes as a } from "../../../engine/TemplateSystem.js";
|
|
4
|
+
import { View as m } from "../../../engine/View.js";
|
|
5
|
+
function p({ props: t, currentData: r, path: o, reactComponent: n }) {
|
|
6
|
+
const i = a(t.attributes);
|
|
7
|
+
return n ? /* @__PURE__ */ e(c, { ...t, children: /* @__PURE__ */ e(n, { ...i, children: t.content && /* @__PURE__ */ e(
|
|
8
|
+
m,
|
|
22
9
|
{
|
|
23
|
-
currentData:
|
|
10
|
+
currentData: r.content ?? void 0,
|
|
24
11
|
datafield: "content",
|
|
25
|
-
path:
|
|
12
|
+
path: o + ".content",
|
|
26
13
|
props: t.content
|
|
27
14
|
}
|
|
28
15
|
) }) }) : null;
|
|
29
16
|
}
|
|
30
17
|
export {
|
|
31
|
-
|
|
18
|
+
p as ReactiveJsonBasicComponentWrapper
|
|
32
19
|
};
|
|
@@ -1,16 +1,57 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import "../../../engine/
|
|
4
|
-
import "../../../engine/
|
|
5
|
-
import "../../../engine/
|
|
6
|
-
import "../../../engine/
|
|
7
|
-
import { R as u } from "../../../index-BYLJtf9L.js";
|
|
8
|
-
import "../../../engine/TemplateContext.js";
|
|
9
|
-
import "../../../engine/TemplateSystem.js";
|
|
1
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as f } from "react";
|
|
3
|
+
import { ActionDependant as g } from "../../../engine/Actions.js";
|
|
4
|
+
import { GlobalDataContext as x } from "../../../engine/GlobalDataContext.js";
|
|
5
|
+
import { TemplateContext as I } from "../../../engine/TemplateContext.js";
|
|
6
|
+
import { evaluateTemplateValueCollection as h, dataLocationToPath as T } from "../../../engine/TemplateSystem.js";
|
|
10
7
|
import "../../../lodash-CYNxjS-I.js";
|
|
11
|
-
import "../../../engine/utility/analyzeDataOverrideReferences.js";
|
|
8
|
+
import { analyzeDataOverrideReferences as E } from "../../../engine/utility/analyzeDataOverrideReferences.js";
|
|
12
9
|
import "../../../js-yaml-Bw0KO4XO.js";
|
|
13
|
-
|
|
10
|
+
const L = ({ props: t }) => {
|
|
11
|
+
var d;
|
|
12
|
+
const a = f(x), n = f(I), l = a.ReactiveJsonRoot;
|
|
13
|
+
if (!l)
|
|
14
|
+
return null;
|
|
15
|
+
const e = h({
|
|
16
|
+
valueToEvaluate: t == null ? void 0 : t.rjOptions,
|
|
17
|
+
globalDataContext: a,
|
|
18
|
+
templateContext: n
|
|
19
|
+
}) || {};
|
|
20
|
+
if (typeof e != "object")
|
|
21
|
+
return;
|
|
22
|
+
let o;
|
|
23
|
+
if ((t == null ? void 0 : t.sharedUpdates) === !0 && ((d = t == null ? void 0 : t.rjOptions) != null && d.dataOverride)) {
|
|
24
|
+
const c = E(t.rjOptions.dataOverride);
|
|
25
|
+
if (c.size > 0) {
|
|
26
|
+
o = /* @__PURE__ */ new Map();
|
|
27
|
+
for (const [s, u] of c) {
|
|
28
|
+
const D = (b, m, C) => {
|
|
29
|
+
try {
|
|
30
|
+
const r = T({
|
|
31
|
+
dataLocation: u,
|
|
32
|
+
currentPath: n.templatePath,
|
|
33
|
+
globalDataContext: a,
|
|
34
|
+
templateContext: n
|
|
35
|
+
}), R = m ? `${r}.${m}` : r;
|
|
36
|
+
a.updateData(b, R, C);
|
|
37
|
+
} catch (r) {
|
|
38
|
+
console.warn(`Error during upstream propagation for ${u}:`, r);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
o.set(s, D);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const i = Number.isInteger(parseInt(t == null ? void 0 : t.dataOverrideEvaluationDepth)) ? parseInt(t == null ? void 0 : t.dataOverrideEvaluationDepth) : 10;
|
|
46
|
+
e != null && e.dataOverride && Number.isInteger(i) && i !== 0 && (e.dataOverride = h({
|
|
47
|
+
valueToEvaluate: e == null ? void 0 : e.dataOverride,
|
|
48
|
+
globalDataContext: a,
|
|
49
|
+
templateContext: n,
|
|
50
|
+
evaluationDepth: i
|
|
51
|
+
}) || {});
|
|
52
|
+
const O = a.plugins ?? {};
|
|
53
|
+
return /* @__PURE__ */ v(g, { ...t, children: /* @__PURE__ */ v(l, { ...e, plugins: O, upstreamUpdateCallbacks: o }) });
|
|
54
|
+
};
|
|
14
55
|
export {
|
|
15
|
-
|
|
56
|
+
L as ReactiveJsonSubroot
|
|
16
57
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i, jsxs as y, Fragment as W } from "react/jsx-runtime";
|
|
2
2
|
import { useContext as T, createElement as A } from "react";
|
|
3
3
|
import { ActionDependant as L } from "../../../engine/Actions.js";
|
|
4
4
|
import { GlobalDataContext as k } from "../../../engine/GlobalDataContext.js";
|
|
5
5
|
import { PaginationContext as z } from "../../../engine/PaginationContext.js";
|
|
6
6
|
import { TemplateContext as B } from "../../../engine/TemplateContext.js";
|
|
7
7
|
import { evaluateTemplateValue as F, isTemplateValue as G, dataLocationToPath as K, evaluateAttributes as R } from "../../../engine/TemplateSystem.js";
|
|
8
|
-
import {
|
|
8
|
+
import { View as x } from "../../../engine/View.js";
|
|
9
9
|
import { usePagination as q } from "../../hook/usePagination.js";
|
|
10
10
|
const _ = ({ props: t, currentData: e, path: f }) => {
|
|
11
|
-
const m = T(k),
|
|
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
12
|
globalDataContext: m,
|
|
13
|
-
templateContext:
|
|
13
|
+
templateContext: a,
|
|
14
14
|
valueToEvaluate: l
|
|
15
|
-
}), u = Object.entries(typeof P == "object" ? P : e).map(([
|
|
16
|
-
const o =
|
|
15
|
+
}), u = Object.entries(typeof P == "object" ? P : e).map(([V, n]) => {
|
|
16
|
+
const o = V;
|
|
17
17
|
if (g >= 1 && o >= g || !n || typeof n != "object")
|
|
18
18
|
return null;
|
|
19
19
|
let c, b, d;
|
|
@@ -22,17 +22,17 @@ const _ = ({ props: t, currentData: e, path: f }) => {
|
|
|
22
22
|
else {
|
|
23
23
|
if (c = Object.keys(n)[0] ?? void 0, c === void 0)
|
|
24
24
|
return null;
|
|
25
|
-
b = Object.values(n)[0] ?? void 0, d =
|
|
25
|
+
b = Object.values(n)[0] ?? void 0, d = w[c] ?? void 0;
|
|
26
26
|
}
|
|
27
27
|
if (d === void 0)
|
|
28
28
|
return null;
|
|
29
29
|
let S = (G(l) && K({
|
|
30
30
|
dataLocation: l,
|
|
31
|
-
currentPath:
|
|
31
|
+
currentPath: a.templatePath,
|
|
32
32
|
globalDataContext: m,
|
|
33
|
-
templateContext:
|
|
33
|
+
templateContext: a
|
|
34
34
|
}) || f) + "." + o;
|
|
35
|
-
return C || (S += "." + c), /* @__PURE__ */
|
|
35
|
+
return C || (S += "." + c), /* @__PURE__ */ i(
|
|
36
36
|
x,
|
|
37
37
|
{
|
|
38
38
|
currentData: b,
|
|
@@ -45,17 +45,17 @@ const _ = ({ props: t, currentData: e, path: f }) => {
|
|
|
45
45
|
}), v = q({
|
|
46
46
|
dataToPaginate: u,
|
|
47
47
|
...(t == null ? void 0 : t.paginationProps) ?? {}
|
|
48
|
-
}), j = t != null && t.paginated ? u.slice(v.firstShownItemIndex, v.maxShownItemIndexExcluded) : u,
|
|
48
|
+
}), j = t != null && t.paginated ? u.slice(v.firstShownItemIndex, v.maxShownItemIndexExcluded) : u, I = t != null && t.contentWrapper ? A(
|
|
49
49
|
t.contentWrapper.tag ?? "div",
|
|
50
50
|
R({
|
|
51
51
|
attrs: t.contentWrapper.attributes ?? {},
|
|
52
52
|
globalDataContext: m,
|
|
53
53
|
options: { normalizeBeforeEvaluation: !0 },
|
|
54
|
-
templateContext:
|
|
54
|
+
templateContext: a
|
|
55
55
|
}),
|
|
56
56
|
j
|
|
57
57
|
) : j, O = /* @__PURE__ */ y(W, { children: [
|
|
58
|
-
(t == null ? void 0 : t.before) && /* @__PURE__ */
|
|
58
|
+
(t == null ? void 0 : t.before) && /* @__PURE__ */ i(
|
|
59
59
|
x,
|
|
60
60
|
{
|
|
61
61
|
currentData: (e == null ? void 0 : e.before) ?? void 0,
|
|
@@ -64,8 +64,8 @@ const _ = ({ props: t, currentData: e, path: f }) => {
|
|
|
64
64
|
props: t == null ? void 0 : t.before
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
|
-
|
|
68
|
-
(t == null ? void 0 : t.after) && /* @__PURE__ */
|
|
67
|
+
I,
|
|
68
|
+
(t == null ? void 0 : t.after) && /* @__PURE__ */ i(
|
|
69
69
|
x,
|
|
70
70
|
{
|
|
71
71
|
currentData: (e == null ? void 0 : e.after) ?? void 0,
|
|
@@ -75,7 +75,7 @@ const _ = ({ props: t, currentData: e, path: f }) => {
|
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
] });
|
|
78
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ i(L, { ...t, children: t != null && t.paginated ? /* @__PURE__ */ i(z.Provider, { value: { pagination: v }, children: O }) : O });
|
|
79
79
|
};
|
|
80
80
|
export {
|
|
81
81
|
_ as Switch
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Count as e } from "./Count.js";
|
|
2
|
-
import { DataFilter as
|
|
3
|
-
import { DelayedActions as
|
|
2
|
+
import { DataFilter as n } from "./DataFilter.js";
|
|
3
|
+
import { DelayedActions as a, getReactionFunctionsToExecute as m } from "./DelayedActions.js";
|
|
4
4
|
import { PageControls as c } from "./PageControls.js";
|
|
5
5
|
import { Phantom as i } from "./Phantom.js";
|
|
6
6
|
import { ReactiveJsonBasicComponentWrapper as u } from "./ReactiveJsonBasicComponentWrapper.js";
|
|
7
|
-
import {
|
|
7
|
+
import { ReactiveJsonSubroot as C } from "./ReactiveJsonSubroot.js";
|
|
8
8
|
import { Switch as g } from "./Switch.js";
|
|
9
9
|
export {
|
|
10
10
|
e as Count,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
n as DataFilter,
|
|
12
|
+
a as DelayedActions,
|
|
13
13
|
c as PageControls,
|
|
14
14
|
i as Phantom,
|
|
15
15
|
u as ReactiveJsonBasicComponentWrapper,
|
|
16
|
-
|
|
16
|
+
C as ReactiveJsonSubroot,
|
|
17
17
|
g as Switch,
|
|
18
18
|
m as getReactionFunctionsToExecute
|
|
19
19
|
};
|