@ea-lab/reactive-json 0.0.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 (66) hide show
  1. package/README.md +83 -0
  2. package/dist/reactive-json.css +5 -0
  3. package/dist/reactive-json.js +56303 -0
  4. package/dist/reactive-json.umd.cjs +382 -0
  5. package/lib/component/action/HashChangeListener.jsx +66 -0
  6. package/lib/component/action/Hide.jsx +14 -0
  7. package/lib/component/action/MessageListener.jsx +62 -0
  8. package/lib/component/action/Popover.jsx +53 -0
  9. package/lib/component/action/ReactOnEvent.jsx +118 -0
  10. package/lib/component/action/Redirect.jsx +26 -0
  11. package/lib/component/action/Tooltip.jsx +27 -0
  12. package/lib/component/action/VisuallyHide.jsx +15 -0
  13. package/lib/component/element/chart/BarChart.jsx +40 -0
  14. package/lib/component/element/chart/DoughnutChart.jsx +32 -0
  15. package/lib/component/element/chart/LineChart.jsx +40 -0
  16. package/lib/component/element/chart/PolarAreaChart.jsx +32 -0
  17. package/lib/component/element/form/CheckBoxField.jsx +215 -0
  18. package/lib/component/element/form/DateField.jsx +42 -0
  19. package/lib/component/element/form/NumberField.jsx +29 -0
  20. package/lib/component/element/form/SelectField.jsx +130 -0
  21. package/lib/component/element/form/TextAreaField.jsx +48 -0
  22. package/lib/component/element/form/TextField.jsx +65 -0
  23. package/lib/component/element/form/formElementsCommon.jsx +54 -0
  24. package/lib/component/element/html/AccordionItem.jsx +42 -0
  25. package/lib/component/element/html/FolderSortableTree.jsx +307 -0
  26. package/lib/component/element/html/FormatNumeral.jsx +118 -0
  27. package/lib/component/element/html/Html.jsx +107 -0
  28. package/lib/component/element/html/LabelFromValue.jsx +89 -0
  29. package/lib/component/element/html/Modal.jsx +77 -0
  30. package/lib/component/element/html/ModalForm.jsx +30 -0
  31. package/lib/component/element/html/Paragraph.jsx +10 -0
  32. package/lib/component/element/html/PreformattedMarkup.jsx +54 -0
  33. package/lib/component/element/html/SortableTreeItemCollapseButton.jsx +20 -0
  34. package/lib/component/element/html/Tabs.jsx +55 -0
  35. package/lib/component/element/special/BootstrapElement.jsx +32 -0
  36. package/lib/component/element/special/Count.jsx +46 -0
  37. package/lib/component/element/special/DataFilter.jsx +156 -0
  38. package/lib/component/element/special/DelayedActions.jsx +119 -0
  39. package/lib/component/element/special/PageControls.jsx +19 -0
  40. package/lib/component/element/special/Phantom.jsx +25 -0
  41. package/lib/component/element/special/Switch.jsx +131 -0
  42. package/lib/component/hook/usePagination.jsx +184 -0
  43. package/lib/component/reaction/addData.jsx +23 -0
  44. package/lib/component/reaction/fetchData.jsx +83 -0
  45. package/lib/component/reaction/moveData.jsx +52 -0
  46. package/lib/component/reaction/postMessage.jsx +43 -0
  47. package/lib/component/reaction/redirectNow.jsx +17 -0
  48. package/lib/component/reaction/removeData.jsx +48 -0
  49. package/lib/component/reaction/setClipboardData.jsx +20 -0
  50. package/lib/component/reaction/setData.jsx +23 -0
  51. package/lib/component/reaction/submitData.jsx +136 -0
  52. package/lib/component/reaction/triggerEvent.jsx +62 -0
  53. package/lib/component/utility/formatString.jsx +59 -0
  54. package/lib/engine/Actions.jsx +392 -0
  55. package/lib/engine/EventDispatcherContext.jsx +16 -0
  56. package/lib/engine/EventDispatcherProvider.jsx +80 -0
  57. package/lib/engine/GlobalDataContext.jsx +13 -0
  58. package/lib/engine/GlobalDataContextProvider.jsx +33 -0
  59. package/lib/engine/PaginationContext.jsx +10 -0
  60. package/lib/engine/PaginationProvider.jsx +61 -0
  61. package/lib/engine/ReactiveJsonRoot.jsx +315 -0
  62. package/lib/engine/TemplateContext.jsx +13 -0
  63. package/lib/engine/TemplateSystem.jsx +302 -0
  64. package/lib/engine/View.jsx +240 -0
  65. package/lib/main.jsx +41 -0
  66. package/package.json +72 -0
package/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # Reactive-JSON
2
+
3
+ A REACT-based lib that transforms JSON (or YAML) into HTML markup.
4
+
5
+ This lib lessens the need to write JS code for building frontend apps.
6
+
7
+ With *reactive-json*, build your apps and forms frontend, embed them into your websites,
8
+ and make them interactive with your backend.
9
+
10
+ ## Content
11
+
12
+ Lbrary and demo app for *reactive-json*.
13
+
14
+ The library can be:
15
+
16
+ - included in your React project: use the provided `<ReactiveJsonRoot>` component
17
+ in your React app. This is the way to go if you want to use reactive-json plugins.
18
+ - used as a standalone lib: simply load the dist files in your web page
19
+ and it will work on the `<reactive-json>` HTML tags.
20
+
21
+ The app shows how to use *reactive-json*.
22
+
23
+ ## Project structure
24
+
25
+ This project was bootstrapped with [Vite](https://vite.dev/).
26
+
27
+ The following is the specific documentation for the *reactive-json* project.
28
+
29
+ ### Components `/lib/component`
30
+
31
+ This is where the extensible code is located.
32
+
33
+ We provided a basic set of components that people will mostly need.
34
+ Those components usually wrap around famous third-party libs such as
35
+ *React-Bootstrap* and *Chart.js*.
36
+
37
+ Of course, you can add your own components, by following the same pattern.
38
+
39
+ #### Actions `/lib/component/action`
40
+
41
+ Action components are special components that may be
42
+ used within the `actions:` section of an **element** component.
43
+
44
+ Actions **do** something **when** conditions are met.
45
+
46
+ #### Elements `/lib/component/element`
47
+
48
+ Element components are the main structural components that will display anything.
49
+
50
+ They may be HTML markup (`html`), interactive (`form`), graphic charts (`chart`),
51
+ and anything that displays or not (`special`).
52
+
53
+ When adding your own elements, you must register them in the `View` component.
54
+
55
+ #### Hooks `/lib/component/hook`
56
+
57
+ Contains reusable hooks, in the React sense.
58
+
59
+ #### Reaction functions `/lib/component/reaction`
60
+
61
+ Reaction components are functions that are like the `action` components,
62
+ but they **do** something **in response** to an **event**.
63
+
64
+ The reaction components must be registered in the `ReactOnEvent` component.
65
+
66
+ ### Utilities `/lib/component/utility`
67
+
68
+ Generic reusable code.
69
+
70
+ ### Engine `/lib/engine`
71
+
72
+ Contains the core functionality of *reactive-json*.
73
+
74
+ This is where `ReactiveJsonRoot.jsx`* is.
75
+
76
+ (* the main entrypoint component of *reactive-json*.)
77
+
78
+ Usually, you won't need to edit its content. (But feel free to inspect it if you
79
+ want to contribute!)
80
+
81
+ ### Demo app `src`
82
+
83
+ All the demo app related code is here. This code is not included in the build.