@kithinji/orca 1.0.1 → 1.0.3
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/browser/index.iife.js +9 -8
- package/dist/browser/index.iife.js.map +2 -2
- package/dist/browser/index.mjs +9 -8
- package/dist/browser/index.mjs.map +2 -2
- package/dist/node/index.cjs +6 -1
- package/dist/node/index.cjs.map +2 -2
- package/dist/node/index.mjs +6 -1
- package/dist/node/index.mjs.map +2 -2
- package/dist/types/browser/dom/dom.d.ts.map +1 -1
- package/dist/types/shared/dom/osc.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.mjs
CHANGED
|
@@ -2874,7 +2874,12 @@ var OSC = class {
|
|
|
2874
2874
|
if (!ComponentClass) {
|
|
2875
2875
|
throw new Error(`Component ${name} not found in ${path}`);
|
|
2876
2876
|
}
|
|
2877
|
-
|
|
2877
|
+
injector.addProvider({
|
|
2878
|
+
provide: ComponentClass,
|
|
2879
|
+
useClass: ComponentClass,
|
|
2880
|
+
scope: "transient"
|
|
2881
|
+
});
|
|
2882
|
+
[...params].forEach((p) => injector.addProvider(p));
|
|
2878
2883
|
const cleanProps = { ...props };
|
|
2879
2884
|
delete cleanProps.__clientComponent;
|
|
2880
2885
|
const componentInstance = injector.resolve(ComponentClass);
|
|
@@ -3065,7 +3070,7 @@ function autoCleanup(element, callback) {
|
|
|
3065
3070
|
}, 0);
|
|
3066
3071
|
}
|
|
3067
3072
|
function createComponent(ComponentClass, props = {}, parentComponent) {
|
|
3068
|
-
let injector =
|
|
3073
|
+
let injector = getCurrentInjector();
|
|
3069
3074
|
if (!injector) {
|
|
3070
3075
|
throw new Error(`Cannot create component ${ComponentClass.name} outside injection context. No injector available from current context or parent component.`);
|
|
3071
3076
|
}
|
|
@@ -3077,12 +3082,8 @@ function createComponent(ComponentClass, props = {}, parentComponent) {
|
|
|
3077
3082
|
try {
|
|
3078
3083
|
instance = injector.resolve(ComponentClass);
|
|
3079
3084
|
} catch (e) {
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
useClass: ComponentClass,
|
|
3083
|
-
scope: "transient"
|
|
3084
|
-
});
|
|
3085
|
-
instance = injector.resolve(ComponentClass);
|
|
3085
|
+
console.log(e);
|
|
3086
|
+
throw new Error(e.message);
|
|
3086
3087
|
}
|
|
3087
3088
|
const localProviders = Reflect.getMetadata(COMPONENT_PROVIDERS, ComponentClass) || [];
|
|
3088
3089
|
if (localProviders.length > 0) {
|