@ea-lab/reactive-json 0.0.12 → 0.0.14
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/reactive-json.js +1153 -1152
- package/dist/reactive-json.js.map +1 -1
- package/dist/reactive-json.umd.cjs +53 -53
- package/dist/reactive-json.umd.cjs.map +1 -1
- package/lib/engine/ReactiveJsonRoot.jsx +1 -2
- package/lib/engine/View.jsx +5 -0
- package/package.json +1 -1
|
@@ -284,14 +284,13 @@ function ReactiveJsonRoot({
|
|
|
284
284
|
|
|
285
285
|
const debugMode_bool = stringToBoolean(debugMode);
|
|
286
286
|
|
|
287
|
-
console.log(plugins)
|
|
288
|
-
|
|
289
287
|
const mainBuild = (
|
|
290
288
|
<EventDispatcherProvider>
|
|
291
289
|
<GlobalDataContextProvider
|
|
292
290
|
value={{
|
|
293
291
|
element: templates,
|
|
294
292
|
headersForData,
|
|
293
|
+
plugins,
|
|
295
294
|
setRawAppData,
|
|
296
295
|
templateData: currentData.realCurrentData,
|
|
297
296
|
templatePath: "data",
|
package/lib/engine/View.jsx
CHANGED
|
@@ -36,6 +36,8 @@ function View({props, currentData, datafield, path}) {
|
|
|
36
36
|
const globalDataContext = useContext(GlobalDataContext);
|
|
37
37
|
const templateContext = useContext(TemplateContext);
|
|
38
38
|
|
|
39
|
+
const plugins = globalDataContext.plugins ?? {};
|
|
40
|
+
|
|
39
41
|
const components = {
|
|
40
42
|
AccordionItem,
|
|
41
43
|
CheckBoxField,
|
|
@@ -59,6 +61,8 @@ function View({props, currentData, datafield, path}) {
|
|
|
59
61
|
Tabs,
|
|
60
62
|
TextAreaField,
|
|
61
63
|
TextField,
|
|
64
|
+
...plugins?.element,
|
|
65
|
+
"Ijiji": TextAreaField,
|
|
62
66
|
};
|
|
63
67
|
|
|
64
68
|
/**
|
|
@@ -81,6 +85,7 @@ function View({props, currentData, datafield, path}) {
|
|
|
81
85
|
// A type is specified.
|
|
82
86
|
// First, try to find a component matching the given type by name.
|
|
83
87
|
// When not found, we map to a Html component as fallback.
|
|
88
|
+
// TODO: make this generic by moving bootstrap related code outside View.
|
|
84
89
|
let componentRegistryId = undefined;
|
|
85
90
|
let ComponentToRender = undefined;
|
|
86
91
|
|