@headless-adminapp/app 0.0.17-alpha.17 → 0.0.17-alpha.18
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headless-adminapp/app",
|
|
3
|
-
"version": "0.0.17-alpha.
|
|
3
|
+
"version": "0.0.17-alpha.18",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"react-hook-form": "7.52.2",
|
|
40
40
|
"yup": "^1.4.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "d49e654cade6f418c799a34fa0dcadb05b663d88"
|
|
43
43
|
}
|
|
@@ -2,5 +2,5 @@ import { IComponentStore } from '@headless-adminapp/core/store';
|
|
|
2
2
|
export declare class ComponentStore implements IComponentStore {
|
|
3
3
|
private components;
|
|
4
4
|
registerComponent<T>(name: string, component: T): void;
|
|
5
|
-
|
|
5
|
+
getComponent<T>(name: string): T | null;
|
|
6
6
|
}
|
package/store/ComponentStore.js
CHANGED
|
@@ -9,11 +9,11 @@ class ComponentStore {
|
|
|
9
9
|
registerComponent(name, component) {
|
|
10
10
|
this.components[name] = component;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
getComponent(name) {
|
|
13
13
|
const self = this;
|
|
14
14
|
return function (props) {
|
|
15
15
|
if (!self.components[name]) {
|
|
16
|
-
|
|
16
|
+
return null;
|
|
17
17
|
}
|
|
18
18
|
const Component = self.components[name];
|
|
19
19
|
return (0, jsx_runtime_1.jsx)(Component, Object.assign({}, props));
|