@ea-lab/reactive-json 0.7.1 → 1.0.0-alpha.1
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/View-D8TN1L2h.js +126 -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 -12
- package/dist/component/element/debug/index.js +2 -2
- package/dist/component/element/html/FolderSortableTree.js +133 -7
- package/dist/component/element/html/FormatNumeral.js +58 -6
- package/dist/component/element/html/Html.js +5 -3
- package/dist/component/element/html/LabelFromValue.js +27 -6
- package/dist/component/element/html/PreformattedMarkup.js +51 -6
- package/dist/component/element/html/SortableTreeItemCollapseButton.js +10 -5
- package/dist/component/element/html/index.js +11 -10
- package/dist/component/element/index.js +34 -29
- package/dist/component/element/special/Count.js +23 -12
- package/dist/component/element/special/DataFilter.js +76 -6
- package/dist/component/element/special/DelayedActions.js +47 -7
- package/dist/component/element/special/Phantom.js +13 -3
- package/dist/component/element/special/ReactiveJsonBasicComponentWrapper.js +32 -0
- package/dist/component/element/special/ReactiveJsonSubroot.js +8 -5
- package/dist/component/element/special/Switch.js +80 -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 +84 -62
- 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 +5 -4
- 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 +161 -10
- package/dist/engine/ParsingDebugDisplay/ParsingDebugDisplay.js +692 -3
- package/dist/engine/ReactiveJsonRoot.js +10 -5
- package/dist/engine/TemplateSystem.js +117 -11
- package/dist/engine/View.js +3 -6
- package/dist/engine/index.js +45 -40
- package/dist/engine/utility/alterData.js +27 -2
- 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 +15 -12
- package/dist/engine/utility/parseRjBuild.js +23 -1002
- package/dist/engine/utility/reactJsxHelpers.js +15 -0
- package/dist/httpRequestCommon-DUo2Oxgl.js +1799 -0
- package/dist/index-B3RKTGQ2.js +18 -0
- package/dist/index-BA09SSaJ.js +26 -0
- package/dist/index-BYLJtf9L.js +462 -0
- package/dist/index-CACLSxWi.js +8 -0
- package/dist/index-NNBvIV0S.js +1873 -0
- package/dist/js-yaml-Bw0KO4XO.js +983 -0
- package/dist/jsonpath-B9kE9k9e.js +3168 -0
- package/dist/{alterData-CjaFWyAA.js → lodash-CYNxjS-I.js} +1348 -1368
- package/dist/main.js +127 -101
- package/package.json +4 -4
- package/dist/ParsingDebugDisplay-8f4yL4Jw.js +0 -696
- package/dist/VariablesDebug-1UzZWgD7.js +0 -17782
- 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,15 +1,20 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import "../httpRequestCommon-DUo2Oxgl.js";
|
|
3
|
+
import "../lodash-CYNxjS-I.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "../dnd-kit-sortable-tree.esm-Cz1RJyIg.js";
|
|
6
|
+
import { a as g } from "../index-BYLJtf9L.js";
|
|
3
7
|
import "./ComponentCollector.js";
|
|
4
8
|
import "./EventDispatcherProvider.js";
|
|
5
9
|
import "./GlobalDataContextProvider.js";
|
|
6
|
-
import "
|
|
10
|
+
import "./ParsingDebugDisplay/ParsingDebugDisplay.js";
|
|
7
11
|
import "./TemplateContext.js";
|
|
8
|
-
import "
|
|
12
|
+
import "./TemplateSystem.js";
|
|
13
|
+
import "./utility/alterData.js";
|
|
9
14
|
import "./utility/dataMappingSystem.js";
|
|
10
15
|
import "./utility/parseRjBuild.js";
|
|
11
16
|
import "./utility/stringToBoolean.js";
|
|
12
|
-
import "
|
|
17
|
+
import "../View-D8TN1L2h.js";
|
|
13
18
|
export {
|
|
14
|
-
|
|
19
|
+
g as ReactiveJsonRoot
|
|
15
20
|
};
|
|
@@ -1,13 +1,119 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import "./GlobalDataContext.js";
|
|
3
|
-
import "./TemplateContext.js";
|
|
4
|
-
import {
|
|
1
|
+
import { useContext as c } from "react";
|
|
2
|
+
import { GlobalDataContext as y } from "./GlobalDataContext.js";
|
|
3
|
+
import { TemplateContext as P } from "./TemplateContext.js";
|
|
4
|
+
import { normalizeAttributesForReactJsx as d } from "./utility/reactJsxHelpers.js";
|
|
5
|
+
const A = ({ dataLocation: r, currentPath: t, globalDataContext: e, templateContext: s }) => {
|
|
6
|
+
if (typeof r != "string" || !(r.startsWith("~.") || r.startsWith("~~.") || r.startsWith("~>") || r.startsWith("~~>")))
|
|
7
|
+
return r === "~" ? s.templatePath : r === "~~" ? e.templatePath : r;
|
|
8
|
+
let f;
|
|
9
|
+
if (r.startsWith("~~."))
|
|
10
|
+
f = e.templatePath;
|
|
11
|
+
else if (r.startsWith("~."))
|
|
12
|
+
f = s.templatePath;
|
|
13
|
+
else if (r.startsWith("~>") || r.startsWith("~~>")) {
|
|
14
|
+
const h = r.startsWith("~>") ? "~>" : "~~>", m = r.indexOf("."), n = m === -1 ? r.substring(h.length) : r.substring(h.length, m);
|
|
15
|
+
if (!s.templatePath.includes(n))
|
|
16
|
+
throw new Error(
|
|
17
|
+
n + " not found in the current template path. The current template path is: " + s.templatePath
|
|
18
|
+
);
|
|
19
|
+
let p;
|
|
20
|
+
h === "~>" ? p = s.templatePath.lastIndexOf(n) : p = s.templatePath.indexOf(n), f = s.templatePath.substring(0, p + n.length);
|
|
21
|
+
} else
|
|
22
|
+
f = t;
|
|
23
|
+
const i = r.split(".");
|
|
24
|
+
return i.shift(), i.length ? f + "." + i.join(".") : f;
|
|
25
|
+
}, I = ({ attrs: r, globalDataContext: t, templateContext: e, options: s = {} }) => {
|
|
26
|
+
const f = {};
|
|
27
|
+
if (!r)
|
|
28
|
+
return f;
|
|
29
|
+
const i = s.normalizeBeforeEvaluation ? d(r) : r;
|
|
30
|
+
for (const h of Object.keys(i)) {
|
|
31
|
+
const m = u({
|
|
32
|
+
globalDataContext: t,
|
|
33
|
+
templateContext: e,
|
|
34
|
+
valueToEvaluate: i[h]
|
|
35
|
+
});
|
|
36
|
+
m && (f[h] = m);
|
|
37
|
+
}
|
|
38
|
+
return f;
|
|
39
|
+
}, W = ({ valueToEvaluate: r, globalDataContext: t, templateContext: e }) => {
|
|
40
|
+
if (!j(r))
|
|
41
|
+
return r;
|
|
42
|
+
if (r === "~")
|
|
43
|
+
return e.templateData;
|
|
44
|
+
if (r === "~~")
|
|
45
|
+
return t.templateData;
|
|
46
|
+
let s;
|
|
47
|
+
if (r.startsWith("~~.") ? s = t == null ? void 0 : t.templateData : r.startsWith("~>") || r.startsWith("~~>") ? (r = A({
|
|
48
|
+
dataLocation: r,
|
|
49
|
+
currentPath: e.templatePath,
|
|
50
|
+
globalDataContext: t,
|
|
51
|
+
templateContext: e
|
|
52
|
+
}), s = t == null ? void 0 : t.templateData) : s = e == null ? void 0 : e.templateData, !s)
|
|
53
|
+
return;
|
|
54
|
+
const f = r.split(".");
|
|
55
|
+
for (f.shift(); f.length; )
|
|
56
|
+
if (typeof s != "object" || (s = s[f.shift()], s === void 0))
|
|
57
|
+
return;
|
|
58
|
+
return s;
|
|
59
|
+
}, u = ({
|
|
60
|
+
valueToEvaluate: r,
|
|
61
|
+
globalDataContext: t,
|
|
62
|
+
templateContext: e,
|
|
63
|
+
evaluationDepth: s = 1
|
|
64
|
+
}) => {
|
|
65
|
+
if (s === 0 || s <= -20)
|
|
66
|
+
return r;
|
|
67
|
+
let i;
|
|
68
|
+
if (typeof r == "object") {
|
|
69
|
+
i = Array.isArray(r) ? [] : {};
|
|
70
|
+
for (const [h, m] of Object.entries(r)) {
|
|
71
|
+
const n = W({
|
|
72
|
+
globalDataContext: t,
|
|
73
|
+
templateContext: e,
|
|
74
|
+
valueToEvaluate: m
|
|
75
|
+
});
|
|
76
|
+
(s > 1 || s < 0) && typeof n == "object" && n !== null ? i[h] = u({
|
|
77
|
+
valueToEvaluate: n,
|
|
78
|
+
globalDataContext: t,
|
|
79
|
+
templateContext: e,
|
|
80
|
+
evaluationDepth: s - 1
|
|
81
|
+
}) : i[h] = n;
|
|
82
|
+
}
|
|
83
|
+
} else
|
|
84
|
+
i = W({
|
|
85
|
+
globalDataContext: t,
|
|
86
|
+
templateContext: e,
|
|
87
|
+
valueToEvaluate: r
|
|
88
|
+
}), (s > 1 || s < 0) && typeof i == "object" && i !== null && (i = u({
|
|
89
|
+
valueToEvaluate: i,
|
|
90
|
+
globalDataContext: t,
|
|
91
|
+
templateContext: e,
|
|
92
|
+
evaluationDepth: s - 1
|
|
93
|
+
}));
|
|
94
|
+
return i;
|
|
95
|
+
}, j = (r) => typeof r != "string" || !(r.startsWith("~.") || r.startsWith("~~.") || r.startsWith("~>") || r.startsWith("~~>") || r === "~" || r === "~~") ? !1 : r, B = ({ valueToEvaluate: r }) => {
|
|
96
|
+
const t = c(y), e = c(P);
|
|
97
|
+
return W({
|
|
98
|
+
globalDataContext: t,
|
|
99
|
+
templateContext: e,
|
|
100
|
+
valueToEvaluate: r
|
|
101
|
+
});
|
|
102
|
+
}, w = (r, t = {}) => {
|
|
103
|
+
const e = c(y), s = c(P);
|
|
104
|
+
return I({
|
|
105
|
+
attrs: r,
|
|
106
|
+
globalDataContext: e,
|
|
107
|
+
templateContext: s,
|
|
108
|
+
options: t.normalizeBeforeEvaluation === void 0 ? { ...t, normalizeBeforeEvaluation: !0 } : t
|
|
109
|
+
});
|
|
110
|
+
};
|
|
5
111
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
112
|
+
A as dataLocationToPath,
|
|
113
|
+
B as default,
|
|
114
|
+
I as evaluateAttributes,
|
|
115
|
+
W as evaluateTemplateValue,
|
|
116
|
+
u as evaluateTemplateValueCollection,
|
|
117
|
+
j as isTemplateValue,
|
|
118
|
+
w as useEvaluatedAttributes
|
|
13
119
|
};
|
package/dist/engine/View.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "
|
|
3
|
+
import { V } from "../View-D8TN1L2h.js";
|
|
4
4
|
import "./GlobalDataContext.js";
|
|
5
5
|
import "./TemplateContext.js";
|
|
6
|
-
import
|
|
7
|
-
import "../alterData-CjaFWyAA.js";
|
|
8
|
-
import "./utility/parseRjBuild.js";
|
|
9
|
-
import "../component/element/special/PageControls.js";
|
|
6
|
+
import "./TemplateSystem.js";
|
|
10
7
|
export {
|
|
11
|
-
|
|
8
|
+
V as View
|
|
12
9
|
};
|
package/dist/engine/index.js
CHANGED
|
@@ -1,42 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mergeComponentCollections as
|
|
3
|
-
import { EventDispatcherContext as
|
|
4
|
-
import { EventDispatcherProvider as
|
|
5
|
-
import { GlobalDataContext as
|
|
6
|
-
import { GlobalDataContextProvider as
|
|
7
|
-
import { PaginationContext as
|
|
8
|
-
import {
|
|
9
|
-
import { TemplateContext as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { ActionDependant as o, isValid as r } from "./Actions.js";
|
|
2
|
+
import { mergeComponentCollections as p } from "./ComponentCollector.js";
|
|
3
|
+
import { EventDispatcherContext as m } from "./EventDispatcherContext.js";
|
|
4
|
+
import { EventDispatcherProvider as l, addEventListener as x, removeEventListener as f } from "./EventDispatcherProvider.js";
|
|
5
|
+
import { GlobalDataContext as v } from "./GlobalDataContext.js";
|
|
6
|
+
import { GlobalDataContextProvider as d } from "./GlobalDataContextProvider.js";
|
|
7
|
+
import { PaginationContext as C } from "./PaginationContext.js";
|
|
8
|
+
import { a as b } from "../index-BYLJtf9L.js";
|
|
9
|
+
import { TemplateContext as T } from "./TemplateContext.js";
|
|
10
|
+
import { dataLocationToPath as E, evaluateAttributes as R, evaluateTemplateValue as A, evaluateTemplateValueCollection as P, isTemplateValue as h, useEvaluatedAttributes as y } from "./TemplateSystem.js";
|
|
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";
|
|
14
|
+
import { formatString as j, maybeFormatString as w } from "./utility/formatString.js";
|
|
15
|
+
import { parseRjBuild as O } from "./utility/parseRjBuild.js";
|
|
16
|
+
import { normalizeAttributesForReactJsx as q } from "./utility/reactJsxHelpers.js";
|
|
17
|
+
import { stringToBoolean as I } from "./utility/stringToBoolean.js";
|
|
18
|
+
import { V as N } from "../View-D8TN1L2h.js";
|
|
14
19
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
20
|
+
o as ActionDependant,
|
|
21
|
+
m as EventDispatcherContext,
|
|
22
|
+
l as EventDispatcherProvider,
|
|
23
|
+
v as GlobalDataContext,
|
|
24
|
+
d as GlobalDataContextProvider,
|
|
25
|
+
C as PaginationContext,
|
|
26
|
+
b as ReactiveJsonRoot,
|
|
27
|
+
T as TemplateContext,
|
|
28
|
+
N as View,
|
|
29
|
+
x as addEventListener,
|
|
30
|
+
z as alterData,
|
|
31
|
+
F as analyzeDataOverrideReferences,
|
|
32
|
+
J as applyDataMapping,
|
|
33
|
+
E as dataLocationToPath,
|
|
34
|
+
R as evaluateAttributes,
|
|
35
|
+
A as evaluateTemplateValue,
|
|
36
|
+
P as evaluateTemplateValueCollection,
|
|
37
|
+
j as formatString,
|
|
38
|
+
h as isTemplateValue,
|
|
39
|
+
r as isValid,
|
|
40
|
+
w as maybeFormatString,
|
|
41
|
+
p as mergeComponentCollections,
|
|
42
|
+
q as normalizeAttributesForReactJsx,
|
|
43
|
+
O as parseRjBuild,
|
|
44
|
+
f as removeEventListener,
|
|
45
|
+
I as stringToBoolean,
|
|
46
|
+
y as useEvaluatedAttributes
|
|
42
47
|
};
|
|
@@ -1,4 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as n } from "../../lodash-CYNxjS-I.js";
|
|
2
|
+
const D = ({
|
|
3
|
+
requestContext: l,
|
|
4
|
+
responseContext: f,
|
|
5
|
+
responseBody: e,
|
|
6
|
+
isRjBuild: t = !1,
|
|
7
|
+
dataProcessors: a = {}
|
|
8
|
+
}) => {
|
|
9
|
+
if (Object.keys(a).length === 0)
|
|
10
|
+
return e;
|
|
11
|
+
const o = n.cloneDeep(e), c = t ? o.data : o;
|
|
12
|
+
let r = n.cloneDeep(c);
|
|
13
|
+
for (const [p, s] of Object.entries(a))
|
|
14
|
+
if (typeof s.callback == "function")
|
|
15
|
+
try {
|
|
16
|
+
r = s.callback({
|
|
17
|
+
requestContext: l,
|
|
18
|
+
responseContext: f,
|
|
19
|
+
dataToProcess: r,
|
|
20
|
+
originalDataToProcess: c
|
|
21
|
+
});
|
|
22
|
+
} catch (i) {
|
|
23
|
+
console.error(`Error in dataProcessor "${p}":`, i);
|
|
24
|
+
}
|
|
25
|
+
return t ? (o.data = r, o) : r;
|
|
26
|
+
};
|
|
2
27
|
export {
|
|
3
|
-
|
|
28
|
+
D as alterData
|
|
4
29
|
};
|
|
@@ -1,4 +1,43 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isTemplateValue as l } from "../TemplateSystem.js";
|
|
2
|
+
const w = (n, u = "", y = {}) => {
|
|
3
|
+
const r = /* @__PURE__ */ new Map();
|
|
4
|
+
if (!n)
|
|
5
|
+
return r;
|
|
6
|
+
if (typeof n == "string" && l(n))
|
|
7
|
+
return r.set("", n), r;
|
|
8
|
+
const p = parseInt(y.maxDepth) || 50, c = (e, t, s = /* @__PURE__ */ new Set(), f = 0) => {
|
|
9
|
+
if (f > p) {
|
|
10
|
+
console.warn(
|
|
11
|
+
"Reactive-JSON: Maximum depth reached in dataOverride references analysis (traverseObject). Stopped the analysis."
|
|
12
|
+
);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (s.has(e)) {
|
|
16
|
+
console.warn(
|
|
17
|
+
"Reactive-JSON: Infinite recursion detected in dataOverride references analysis (traverseObject). Stopped the analysis."
|
|
18
|
+
);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (s.add(e), typeof e == "string" && l(e)) {
|
|
22
|
+
r.set(t, e);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (!(!e || typeof e != "object")) {
|
|
26
|
+
if (Array.isArray(e)) {
|
|
27
|
+
e.forEach((i, a) => {
|
|
28
|
+
const o = t ? `${t}.${a}` : a.toString();
|
|
29
|
+
c(i, o, s, f + 1);
|
|
30
|
+
});
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
Object.entries(e).forEach(([i, a]) => {
|
|
34
|
+
const o = t ? `${t}.${i}` : i;
|
|
35
|
+
c(a, o, s, f + 1);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return c(n, u), r;
|
|
40
|
+
};
|
|
2
41
|
export {
|
|
3
|
-
|
|
42
|
+
w as analyzeDataOverrideReferences
|
|
4
43
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { evaluateTemplateValue as P, dataLocationToPath as m } from "../TemplateSystem.js";
|
|
2
|
+
const u = ({
|
|
3
|
+
currentPath: v,
|
|
4
|
+
datafield: D,
|
|
5
|
+
dataLocation: o,
|
|
6
|
+
defaultValue: h,
|
|
7
|
+
globalDataContext: f,
|
|
8
|
+
templateContext: a
|
|
9
|
+
}) => {
|
|
10
|
+
const r = {
|
|
11
|
+
// This is the data that contains the current checked state.
|
|
12
|
+
formData: void 0,
|
|
13
|
+
// This is the path that leads to the data.
|
|
14
|
+
formDataPath: void 0
|
|
15
|
+
};
|
|
16
|
+
return o && typeof o == "string" ? (r.formData = P({
|
|
17
|
+
globalDataContext: f,
|
|
18
|
+
templateContext: a,
|
|
19
|
+
valueToEvaluate: o
|
|
20
|
+
}) ?? h, r.formDataPath = m({
|
|
21
|
+
dataLocation: o,
|
|
22
|
+
currentPath: v,
|
|
23
|
+
globalDataContext: f,
|
|
24
|
+
templateContext: a
|
|
25
|
+
})) : ((a.templateData[D] ?? void 0) === void 0 && (a.templateData = typeof a.templateData == "object" ? a.templateData : {}, a.templateData[D] = h), r.formData = a.templateData[D], r.formDataPath = m({
|
|
26
|
+
dataLocation: "~." + D,
|
|
27
|
+
currentPath: a.templatePath,
|
|
28
|
+
globalDataContext: f,
|
|
29
|
+
templateContext: a
|
|
30
|
+
})), r;
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
u as propsDataLocationToPathAndValue
|
|
34
|
+
};
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { evaluateTemplateValue as l } from "../TemplateSystem.js";
|
|
2
|
+
const r = (e, ...t) => t.length ? r(e = e.replace(r.token || "$token", t.shift()), ...t) : e, u = ({ templateContexts: e }, t, ...a) => {
|
|
3
|
+
const n = a.map((o) => l({
|
|
4
|
+
globalDataContext: e.globalDataContext,
|
|
5
|
+
templateContext: e.templateContext,
|
|
6
|
+
valueToEvaluate: o
|
|
7
|
+
}));
|
|
8
|
+
return r(t, ...n);
|
|
9
|
+
}, p = (e, t) => {
|
|
10
|
+
if (typeof t == "string")
|
|
11
|
+
return t;
|
|
12
|
+
if (Array.isArray(t)) {
|
|
13
|
+
const [a, ...n] = t;
|
|
14
|
+
return u(e, a, ...n);
|
|
15
|
+
}
|
|
16
|
+
return "";
|
|
17
|
+
};
|
|
2
18
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
19
|
+
u as formatString,
|
|
20
|
+
p as maybeFormatString
|
|
5
21
|
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { applyDataMapping as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { alterData as o } from "./alterData.js";
|
|
2
|
+
import { analyzeDataOverrideReferences as a } from "./analyzeDataOverrideReferences.js";
|
|
3
|
+
import { applyDataMapping as m } from "./dataMappingSystem.js";
|
|
4
|
+
import { formatString as i, maybeFormatString as n } from "./formatString.js";
|
|
5
|
+
import { parseRjBuild as l } from "./parseRjBuild.js";
|
|
6
|
+
import { normalizeAttributesForReactJsx as g } from "./reactJsxHelpers.js";
|
|
7
|
+
import { stringToBoolean as D } from "./stringToBoolean.js";
|
|
6
8
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
o as alterData,
|
|
10
|
+
a as analyzeDataOverrideReferences,
|
|
11
|
+
m as applyDataMapping,
|
|
12
|
+
i as formatString,
|
|
13
|
+
n as maybeFormatString,
|
|
14
|
+
g as normalizeAttributesForReactJsx,
|
|
15
|
+
l as parseRjBuild,
|
|
16
|
+
D as stringToBoolean
|
|
14
17
|
};
|