@ea-lab/reactive-json 0.5.0 → 0.6.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.
Files changed (84) hide show
  1. package/dist/HashChangeListener-CZjn9YZy.js +8550 -0
  2. package/dist/ParsingDebugDisplay-8f4yL4Jw.js +696 -0
  3. package/dist/VariablesDebug-DgS3E2aX.js +9305 -0
  4. package/dist/assets/DebugJson.css +1 -0
  5. package/dist/assets/DebugList.css +1 -0
  6. package/dist/assets/ParsingDebugDisplay.css +1 -0
  7. package/dist/assets/VariablesDebug.css +4 -0
  8. package/dist/component/action/HashChangeListener.js +1 -1
  9. package/dist/component/action/MessageListener.js +2 -2
  10. package/dist/component/action/Popover.js +1 -1
  11. package/dist/component/action/ReactOnEvent.js +1 -1
  12. package/dist/component/action/Redirect.js +1 -1
  13. package/dist/component/action/SetAttributeValue.js +1 -1
  14. package/dist/component/action/ToggleAttributeValue.js +1 -1
  15. package/dist/component/action/Tooltip.js +1 -1
  16. package/dist/component/action/UnsetAttribute.js +1 -1
  17. package/dist/component/action/UnsetAttributeValue.js +1 -1
  18. package/dist/component/action/index.js +1 -1
  19. package/dist/component/dataMapping/index.js +1 -1
  20. package/dist/component/dataMapping/simpleMapping.js +1 -1
  21. package/dist/component/element/debug/VariablesDebug/DebugMode.enum.js +4 -0
  22. package/dist/component/element/debug/VariablesDebug/ModeDisplay/DebugJson/DebugJson.js +7 -0
  23. package/dist/component/element/debug/VariablesDebug/ModeDisplay/DebugList/DebugList.js +14 -0
  24. package/dist/component/element/debug/VariablesDebug/VariablesDebug.js +18 -0
  25. package/dist/component/element/debug/VariablesDebug/utils.js +19 -0
  26. package/dist/component/element/debug/index.js +4 -0
  27. package/dist/component/element/form/CheckBoxField.js +1 -1
  28. package/dist/component/element/form/DateField.js +1 -1
  29. package/dist/component/element/form/NumberField.js +1 -1
  30. package/dist/component/element/form/SelectField.js +1 -1
  31. package/dist/component/element/form/TextAreaField.js +1 -1
  32. package/dist/component/element/form/TextField.js +1 -1
  33. package/dist/component/element/form/formElementsCommon.js +1 -1
  34. package/dist/component/element/form/index.js +1 -1
  35. package/dist/component/element/html/AccordionItem.js +1 -1
  36. package/dist/component/element/html/FolderSortableTree.js +4 -3
  37. package/dist/component/element/html/FormatNumeral.js +1 -1
  38. package/dist/component/element/html/Html.js +1 -1
  39. package/dist/component/element/html/LabelFromValue.js +1 -1
  40. package/dist/component/element/html/Modal.js +1 -1
  41. package/dist/component/element/html/PreformattedMarkup.js +3 -2
  42. package/dist/component/element/html/SortableTreeItemCollapseButton.js +1 -1
  43. package/dist/component/element/html/Tabs.js +1 -1
  44. package/dist/component/element/html/index.js +1 -1
  45. package/dist/component/element/index.js +28 -26
  46. package/dist/component/element/special/BootstrapElement.js +1 -1
  47. package/dist/component/element/special/Count.js +7 -5
  48. package/dist/component/element/special/DataFilter.js +1 -1
  49. package/dist/component/element/special/DelayedActions.js +1 -1
  50. package/dist/component/element/special/Phantom.js +1 -1
  51. package/dist/component/element/special/ReactiveJsonSubroot.js +5 -4
  52. package/dist/component/element/special/Switch.js +1 -1
  53. package/dist/component/element/special/index.js +1 -1
  54. package/dist/component/index.js +20 -18
  55. package/dist/component/reaction/addData.js +2 -2
  56. package/dist/component/reaction/fetchData.js +1 -1
  57. package/dist/component/reaction/index.js +1 -1
  58. package/dist/component/reaction/moveData.js +1 -1
  59. package/dist/component/reaction/postMessage.js +1 -1
  60. package/dist/component/reaction/redirectNow.js +1 -1
  61. package/dist/component/reaction/removeData.js +1 -1
  62. package/dist/component/reaction/setClipboardData.js +1 -1
  63. package/dist/component/reaction/setData.js +2 -2
  64. package/dist/component/reaction/submitData.js +1 -1
  65. package/dist/component/reaction/utility/httpRequestCommon.js +3 -3
  66. package/dist/component/reaction/utility/index.js +1 -1
  67. package/dist/coreComponentsPlugin.js +1 -1
  68. package/dist/engine/Actions.js +5 -4
  69. package/dist/engine/ParsingDebugDisplay/ParsingDebugDisplay.js +6 -0
  70. package/dist/engine/ReactiveJsonRoot.js +6 -3
  71. package/dist/engine/TemplateSystem.js +1 -1
  72. package/dist/engine/View.js +7 -3
  73. package/dist/engine/index.js +2 -2
  74. package/dist/engine/utility/alterData.js +21 -2
  75. package/dist/engine/utility/analyzeDataOverrideReferences.js +1 -1
  76. package/dist/engine/utility/formatString.js +1 -1
  77. package/dist/engine/utility/index.js +4 -4
  78. package/dist/engine/utility/parseRjBuild.js +39 -991
  79. package/dist/js-yaml-Bw0KO4XO.js +983 -0
  80. package/dist/{alterData-CjaFWyAA.js → lodash-CYNxjS-I.js} +1348 -1368
  81. package/dist/main.js +46 -44
  82. package/dist/utils.d.ts +5 -0
  83. package/package.json +4 -2
  84. package/dist/HashChangeListener-BaaJxyFq.js +0 -18247
@@ -1,4 +1,4 @@
1
- import { z as e } from "../../HashChangeListener-BaaJxyFq.js";
1
+ import { z as e } from "../../HashChangeListener-CZjn9YZy.js";
2
2
  export {
3
3
  e as fetchData
4
4
  };
@@ -1,4 +1,4 @@
1
- import { y as e, E as s, z as r, G as o, I as D, J as m, K as p, O as d, Q as i, V as c } from "../../HashChangeListener-BaaJxyFq.js";
1
+ import { y as e, E as s, z as r, G as o, I as D, J as m, K as p, O as d, Q as i, V as c } from "../../HashChangeListener-CZjn9YZy.js";
2
2
  import { triggerEvent as g } from "./triggerEvent.js";
3
3
  export {
4
4
  e as addData,
@@ -1,4 +1,4 @@
1
- import { G as e } from "../../HashChangeListener-BaaJxyFq.js";
1
+ import { G as e } from "../../HashChangeListener-CZjn9YZy.js";
2
2
  export {
3
3
  e as moveData
4
4
  };
@@ -1,4 +1,4 @@
1
- import { I as o } from "../../HashChangeListener-BaaJxyFq.js";
1
+ import { I as o } from "../../HashChangeListener-CZjn9YZy.js";
2
2
  export {
3
3
  o as postMessage
4
4
  };
@@ -1,4 +1,4 @@
1
- import { J as o } from "../../HashChangeListener-BaaJxyFq.js";
1
+ import { J as o } from "../../HashChangeListener-CZjn9YZy.js";
2
2
  export {
3
3
  o as redirectNow
4
4
  };
@@ -1,4 +1,4 @@
1
- import { K as o } from "../../HashChangeListener-BaaJxyFq.js";
1
+ import { K as o } from "../../HashChangeListener-CZjn9YZy.js";
2
2
  export {
3
3
  o as removeData
4
4
  };
@@ -1,4 +1,4 @@
1
- import { O as r } from "../../HashChangeListener-BaaJxyFq.js";
1
+ import { O as r } from "../../HashChangeListener-CZjn9YZy.js";
2
2
  export {
3
3
  r as setClipboardData
4
4
  };
@@ -1,5 +1,5 @@
1
- import { Q as r } from "../../HashChangeListener-BaaJxyFq.js";
2
- import "../../alterData-CjaFWyAA.js";
1
+ import { Q as r } from "../../HashChangeListener-CZjn9YZy.js";
2
+ import "../../lodash-CYNxjS-I.js";
3
3
  export {
4
4
  r as setData
5
5
  };
@@ -1,4 +1,4 @@
1
- import { V as m } from "../../HashChangeListener-BaaJxyFq.js";
1
+ import { V as m } from "../../HashChangeListener-CZjn9YZy.js";
2
2
  export {
3
3
  m as submitData
4
4
  };
@@ -1,7 +1,7 @@
1
- import { E as m } from "../../../HashChangeListener-BaaJxyFq.js";
2
- import "../../../alterData-CjaFWyAA.js";
1
+ import { E as m } from "../../../HashChangeListener-CZjn9YZy.js";
2
+ import "../../../engine/utility/alterData.js";
3
3
  import "../../../engine/utility/dataMappingSystem.js";
4
- import "../../../engine/utility/parseRjBuild.js";
4
+ import "../../../js-yaml-Bw0KO4XO.js";
5
5
  export {
6
6
  m as executeHttpRequest
7
7
  };
@@ -1,4 +1,4 @@
1
- import { E as o } from "../../../HashChangeListener-BaaJxyFq.js";
1
+ import { E as o } from "../../../HashChangeListener-CZjn9YZy.js";
2
2
  export {
3
3
  o as executeHttpRequest
4
4
  };
@@ -1,4 +1,4 @@
1
- import { a7 as m } from "./HashChangeListener-BaaJxyFq.js";
1
+ import { a7 as m } from "./HashChangeListener-CZjn9YZy.js";
2
2
  import "./component/dataProcessor/index.js";
3
3
  export {
4
4
  m as coreComponentsPlugin
@@ -2,11 +2,12 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "./GlobalDataContext.js";
4
4
  import "./TemplateContext.js";
5
- import { X as s, W as d } from "../HashChangeListener-BaaJxyFq.js";
5
+ import { X as d, W as c } from "../HashChangeListener-CZjn9YZy.js";
6
6
  import "../component/action/Hide.js";
7
7
  import "../component/action/VisuallyHide.js";
8
- import "../alterData-CjaFWyAA.js";
8
+ import "../lodash-CYNxjS-I.js";
9
+ import "../VariablesDebug-DgS3E2aX.js";
9
10
  export {
10
- s as ActionDependant,
11
- d as isValid
11
+ d as ActionDependant,
12
+ c as isValid
12
13
  };
@@ -0,0 +1,6 @@
1
+ import "react/jsx-runtime";
2
+ import { a as m } from "../../ParsingDebugDisplay-8f4yL4Jw.js";
3
+ import "react";
4
+ export {
5
+ m as default
6
+ };
@@ -1,14 +1,17 @@
1
1
  import "react/jsx-runtime";
2
- import { Y as n } from "../HashChangeListener-BaaJxyFq.js";
2
+ import { Y as J } from "../HashChangeListener-CZjn9YZy.js";
3
3
  import "./ComponentCollector.js";
4
4
  import "./EventDispatcherProvider.js";
5
5
  import "./GlobalDataContextProvider.js";
6
+ import "../ParsingDebugDisplay-8f4yL4Jw.js";
6
7
  import "./TemplateContext.js";
7
- import "../alterData-CjaFWyAA.js";
8
+ import "./utility/alterData.js";
8
9
  import "./utility/dataMappingSystem.js";
9
10
  import "./utility/parseRjBuild.js";
10
11
  import "./utility/stringToBoolean.js";
12
+ import "../lodash-CYNxjS-I.js";
11
13
  import "react";
14
+ import "../VariablesDebug-DgS3E2aX.js";
12
15
  export {
13
- n as ReactiveJsonRoot
16
+ J as ReactiveJsonRoot
14
17
  };
@@ -1,7 +1,7 @@
1
1
  import "react";
2
2
  import "./GlobalDataContext.js";
3
3
  import "./TemplateContext.js";
4
- import { Z as u, a8 as o, _ as i, $ as m, a0 as p, a1 as r, a2 as v } from "../HashChangeListener-BaaJxyFq.js";
4
+ import { Z as u, a8 as o, _ as i, $ as m, a0 as p, a1 as r, a2 as v } from "../HashChangeListener-CZjn9YZy.js";
5
5
  export {
6
6
  u as dataLocationToPath,
7
7
  o as default,
@@ -1,9 +1,13 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { a6 as e } from "../HashChangeListener-BaaJxyFq.js";
4
- import "../component/element/special/PageControls.js";
5
3
  import "./GlobalDataContext.js";
6
4
  import "./TemplateContext.js";
5
+ import { a6 as x } from "../HashChangeListener-CZjn9YZy.js";
6
+ import "../lodash-CYNxjS-I.js";
7
+ import "../js-yaml-Bw0KO4XO.js";
8
+ import "./EventDispatcherContext.js";
9
+ import "../VariablesDebug-DgS3E2aX.js";
10
+ import "../component/element/special/PageControls.js";
7
11
  export {
8
- e as View
12
+ x as View
9
13
  };
@@ -1,4 +1,4 @@
1
- import { X as t, Y as o, a6 as r, a3 as n, Z as i, _ as s, $ as p, a0 as l, a4 as m, a1 as x, W as f, a5 as v, a2 as d } from "../HashChangeListener-BaaJxyFq.js";
1
+ import { X as t, Y as o, a6 as r, a3 as n, Z as i, _ as s, $ as p, a0 as l, a4 as m, a1 as x, W as f, a5 as v, a2 as d } from "../HashChangeListener-CZjn9YZy.js";
2
2
  import { mergeComponentCollections as c } from "./ComponentCollector.js";
3
3
  import { EventDispatcherContext as D } from "./EventDispatcherContext.js";
4
4
  import { EventDispatcherProvider as P, addEventListener as T, removeEventListener as b } from "./EventDispatcherProvider.js";
@@ -7,7 +7,7 @@ import { GlobalDataContextProvider as h } from "./GlobalDataContextProvider.js";
7
7
  import { PaginationContext as A } from "./PaginationContext.js";
8
8
  import { PaginationProvider as B } from "./PaginationProvider.js";
9
9
  import { TemplateContext as S } from "./TemplateContext.js";
10
- import { a as w } from "../alterData-CjaFWyAA.js";
10
+ import { alterData as w } from "./utility/alterData.js";
11
11
  import { applyDataMapping as F } from "./utility/dataMappingSystem.js";
12
12
  import { parseRjBuild as M } from "./utility/parseRjBuild.js";
13
13
  import { stringToBoolean as W } from "./utility/stringToBoolean.js";
@@ -1,4 +1,23 @@
1
- import { a as t } from "../../alterData-CjaFWyAA.js";
1
+ import { l as n } from "../../lodash-CYNxjS-I.js";
2
+ const D = ({ requestContext: l, responseContext: f, responseBody: e, isRjBuild: t = !1, dataProcessors: a = {} }) => {
3
+ if (Object.keys(a).length === 0)
4
+ return e;
5
+ const o = n.cloneDeep(e), c = t ? o.data : o;
6
+ let r = n.cloneDeep(c);
7
+ for (const [p, s] of Object.entries(a))
8
+ if (typeof s.callback == "function")
9
+ try {
10
+ r = s.callback({
11
+ requestContext: l,
12
+ responseContext: f,
13
+ dataToProcess: r,
14
+ originalDataToProcess: c
15
+ });
16
+ } catch (i) {
17
+ console.error(`Error in dataProcessor "${p}":`, i);
18
+ }
19
+ return t ? (o.data = r, o) : r;
20
+ };
2
21
  export {
3
- t as alterData
22
+ D as alterData
4
23
  };
@@ -1,4 +1,4 @@
1
- import { a3 as r } from "../../HashChangeListener-BaaJxyFq.js";
1
+ import { a3 as r } from "../../HashChangeListener-CZjn9YZy.js";
2
2
  export {
3
3
  r as analyzeDataOverrideReferences
4
4
  };
@@ -1,4 +1,4 @@
1
- import { a4 as t, a5 as m } from "../../HashChangeListener-BaaJxyFq.js";
1
+ import { a4 as t, a5 as m } from "../../HashChangeListener-CZjn9YZy.js";
2
2
  export {
3
3
  t as formatString,
4
4
  m as maybeFormatString
@@ -1,7 +1,7 @@
1
- import { a as e } from "../../alterData-CjaFWyAA.js";
2
- import { a3 as t, a4 as p, a5 as m } from "../../HashChangeListener-BaaJxyFq.js";
1
+ import { alterData as e } from "./alterData.js";
2
+ import { a3 as t, a4 as p, a5 as m } from "../../HashChangeListener-CZjn9YZy.js";
3
3
  import { applyDataMapping as n } from "./dataMappingSystem.js";
4
- import { parseRjBuild as i } from "./parseRjBuild.js";
4
+ import { parseRjBuild as s } from "./parseRjBuild.js";
5
5
  import { stringToBoolean as x } from "./stringToBoolean.js";
6
6
  export {
7
7
  e as alterData,
@@ -9,6 +9,6 @@ export {
9
9
  n as applyDataMapping,
10
10
  p as formatString,
11
11
  m as maybeFormatString,
12
- i as parseRjBuild,
12
+ s as parseRjBuild,
13
13
  x as stringToBoolean
14
14
  };