@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,17 +1,19 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import "../httpRequestCommon-BFntjNdS.js";
|
|
3
|
+
import "../lodash-CYNxjS-I.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "../dnd-kit-sortable-tree.esm-Cz1RJyIg.js";
|
|
6
|
+
import { a as d } from "../index-OhHUX6nj.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";
|
|
12
|
+
import "../TemplateSystem-kQJEKjik.js";
|
|
8
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 "../lodash-CYNxjS-I.js";
|
|
13
|
-
import "react";
|
|
14
|
-
import "../VariablesDebug-pv5GGWel.js";
|
|
15
17
|
export {
|
|
16
|
-
|
|
18
|
+
d as ReactiveJsonRoot
|
|
17
19
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "./GlobalDataContext.js";
|
|
3
3
|
import "./TemplateContext.js";
|
|
4
|
-
import {
|
|
4
|
+
import { d as s, T as o, e as i, a as m, b as p, c as r, u as T } from "../TemplateSystem-kQJEKjik.js";
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as dataLocationToPath,
|
|
7
7
|
o as default,
|
|
8
8
|
i as evaluateAttributes,
|
|
9
9
|
m as evaluateTemplateValue,
|
|
10
10
|
p as evaluateTemplateValueCollection,
|
|
11
11
|
r as isTemplateValue,
|
|
12
|
-
|
|
12
|
+
T as useEvaluatedAttributes
|
|
13
13
|
};
|
package/dist/engine/View.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "
|
|
3
|
+
import { V as e } from "../TemplateSystem-kQJEKjik.js";
|
|
4
4
|
import "./GlobalDataContext.js";
|
|
5
5
|
import "./TemplateContext.js";
|
|
6
|
-
import { a6 as x } from "../HashChangeListener-D6HwdXBJ.js";
|
|
7
|
-
import "../lodash-CYNxjS-I.js";
|
|
8
|
-
import "../js-yaml-Bw0KO4XO.js";
|
|
9
|
-
import "../VariablesDebug-pv5GGWel.js";
|
|
10
|
-
import "../component/element/special/PageControls.js";
|
|
11
6
|
export {
|
|
12
|
-
|
|
7
|
+
e as View
|
|
13
8
|
};
|
package/dist/engine/index.js
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mergeComponentCollections as
|
|
3
|
-
import { EventDispatcherContext as
|
|
4
|
-
import { EventDispatcherProvider as
|
|
5
|
-
import { GlobalDataContext as
|
|
6
|
-
import { GlobalDataContextProvider as
|
|
1
|
+
import { A as a, V as o, d as r, e as n, a as p, b as i, c as l, i as m, u as s } from "../TemplateSystem-kQJEKjik.js";
|
|
2
|
+
import { mergeComponentCollections as f } from "./ComponentCollector.js";
|
|
3
|
+
import { EventDispatcherContext as u } from "./EventDispatcherContext.js";
|
|
4
|
+
import { EventDispatcherProvider as c, addEventListener as C, removeEventListener as D } from "./EventDispatcherProvider.js";
|
|
5
|
+
import { GlobalDataContext as g } from "./GlobalDataContext.js";
|
|
6
|
+
import { GlobalDataContextProvider as V } from "./GlobalDataContextProvider.js";
|
|
7
7
|
import { PaginationContext as A } from "./PaginationContext.js";
|
|
8
|
-
import {
|
|
9
|
-
import { TemplateContext as
|
|
10
|
-
import { alterData as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import { a as R } from "../index-OhHUX6nj.js";
|
|
9
|
+
import { TemplateContext as y } from "./TemplateContext.js";
|
|
10
|
+
import { alterData as B } from "./utility/alterData.js";
|
|
11
|
+
import { analyzeDataOverrideReferences as S } from "./utility/analyzeDataOverrideReferences.js";
|
|
12
|
+
import { applyDataMapping as w } from "./utility/dataMappingSystem.js";
|
|
13
|
+
import { formatString as F, maybeFormatString as J } from "./utility/formatString.js";
|
|
14
|
+
import { parseRjBuild as O } from "./utility/parseRjBuild.js";
|
|
15
|
+
import { stringToBoolean as q } from "./utility/stringToBoolean.js";
|
|
14
16
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
a as ActionDependant,
|
|
18
|
+
u as EventDispatcherContext,
|
|
19
|
+
c as EventDispatcherProvider,
|
|
20
|
+
g as GlobalDataContext,
|
|
21
|
+
V as GlobalDataContextProvider,
|
|
20
22
|
A as PaginationContext,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
s as evaluateAttributes,
|
|
23
|
+
R as ReactiveJsonRoot,
|
|
24
|
+
y as TemplateContext,
|
|
25
|
+
o as View,
|
|
26
|
+
C as addEventListener,
|
|
27
|
+
B as alterData,
|
|
28
|
+
S as analyzeDataOverrideReferences,
|
|
29
|
+
w as applyDataMapping,
|
|
30
|
+
r as dataLocationToPath,
|
|
31
|
+
n as evaluateAttributes,
|
|
31
32
|
p as evaluateTemplateValue,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
i as evaluateTemplateValueCollection,
|
|
34
|
+
F as formatString,
|
|
35
|
+
l as isTemplateValue,
|
|
36
|
+
m as isValid,
|
|
37
|
+
J as maybeFormatString,
|
|
38
|
+
f as mergeComponentCollections,
|
|
39
|
+
O as parseRjBuild,
|
|
40
|
+
D as removeEventListener,
|
|
41
|
+
q as stringToBoolean,
|
|
42
|
+
s as useEvaluatedAttributes
|
|
42
43
|
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { l as n } from "../../lodash-CYNxjS-I.js";
|
|
2
|
-
const D = ({
|
|
2
|
+
const D = ({
|
|
3
|
+
requestContext: l,
|
|
4
|
+
responseContext: f,
|
|
5
|
+
responseBody: e,
|
|
6
|
+
isRjBuild: t = !1,
|
|
7
|
+
dataProcessors: a = {}
|
|
8
|
+
}) => {
|
|
3
9
|
if (Object.keys(a).length === 0)
|
|
4
10
|
return e;
|
|
5
11
|
const o = n.cloneDeep(e), c = t ? o.data : o;
|
|
@@ -1,4 +1,43 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as l } from "../../TemplateSystem-kQJEKjik.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((a, i) => {
|
|
28
|
+
const o = t ? `${t}.${i}` : i.toString();
|
|
29
|
+
c(a, o, s, f + 1);
|
|
30
|
+
});
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
Object.entries(e).forEach(([a, i]) => {
|
|
34
|
+
const o = t ? `${t}.${a}` : a;
|
|
35
|
+
c(i, 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 { a as v, d as h } from "../../TemplateSystem-kQJEKjik.js";
|
|
2
|
+
const u = ({
|
|
3
|
+
currentPath: m,
|
|
4
|
+
datafield: D,
|
|
5
|
+
dataLocation: o,
|
|
6
|
+
defaultValue: f,
|
|
7
|
+
globalDataContext: s,
|
|
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 = v({
|
|
17
|
+
globalDataContext: s,
|
|
18
|
+
templateContext: a,
|
|
19
|
+
valueToEvaluate: o
|
|
20
|
+
}) ?? f, r.formDataPath = h({
|
|
21
|
+
dataLocation: o,
|
|
22
|
+
currentPath: m,
|
|
23
|
+
globalDataContext: s,
|
|
24
|
+
templateContext: a
|
|
25
|
+
})) : ((a.templateData[D] ?? void 0) === void 0 && (a.templateData = typeof a.templateData == "object" ? a.templateData : {}, a.templateData[D] = f), r.formData = a.templateData[D], r.formDataPath = h({
|
|
26
|
+
dataLocation: "~." + D,
|
|
27
|
+
currentPath: a.templatePath,
|
|
28
|
+
globalDataContext: s,
|
|
29
|
+
templateContext: a
|
|
30
|
+
})), r;
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
u as propsDataLocationToPathAndValue
|
|
34
|
+
};
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as l } from "../../TemplateSystem-kQJEKjik.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
|
+
}, s = (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
|
+
s as maybeFormatString
|
|
5
21
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { alterData as
|
|
2
|
-
import {
|
|
3
|
-
import { applyDataMapping as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { alterData as o } from "./alterData.js";
|
|
2
|
+
import { analyzeDataOverrideReferences as t } from "./analyzeDataOverrideReferences.js";
|
|
3
|
+
import { applyDataMapping as m } from "./dataMappingSystem.js";
|
|
4
|
+
import { formatString as n, maybeFormatString as i } from "./formatString.js";
|
|
5
|
+
import { parseRjBuild as l } from "./parseRjBuild.js";
|
|
6
|
+
import { stringToBoolean as s } from "./stringToBoolean.js";
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
o as alterData,
|
|
8
9
|
t as analyzeDataOverrideReferences,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
m as applyDataMapping,
|
|
11
|
+
n as formatString,
|
|
12
|
+
i as maybeFormatString,
|
|
13
|
+
l as parseRjBuild,
|
|
14
|
+
s as stringToBoolean
|
|
14
15
|
};
|