@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
|
@@ -1817,7 +1817,12 @@ var kithinjiorca = (() => {
|
|
|
1817
1817
|
if (!ComponentClass) {
|
|
1818
1818
|
throw new Error(`Component ${name} not found in ${path}`);
|
|
1819
1819
|
}
|
|
1820
|
-
|
|
1820
|
+
injector.addProvider({
|
|
1821
|
+
provide: ComponentClass,
|
|
1822
|
+
useClass: ComponentClass,
|
|
1823
|
+
scope: "transient"
|
|
1824
|
+
});
|
|
1825
|
+
[...params].forEach((p) => injector.addProvider(p));
|
|
1821
1826
|
const cleanProps = { ...props };
|
|
1822
1827
|
delete cleanProps.__clientComponent;
|
|
1823
1828
|
const componentInstance = injector.resolve(ComponentClass);
|
|
@@ -2008,7 +2013,7 @@ var kithinjiorca = (() => {
|
|
|
2008
2013
|
}, 0);
|
|
2009
2014
|
}
|
|
2010
2015
|
function createComponent(ComponentClass, props = {}, parentComponent) {
|
|
2011
|
-
let injector =
|
|
2016
|
+
let injector = getCurrentInjector();
|
|
2012
2017
|
if (!injector) {
|
|
2013
2018
|
throw new Error(`Cannot create component ${ComponentClass.name} outside injection context. No injector available from current context or parent component.`);
|
|
2014
2019
|
}
|
|
@@ -2020,12 +2025,8 @@ var kithinjiorca = (() => {
|
|
|
2020
2025
|
try {
|
|
2021
2026
|
instance = injector.resolve(ComponentClass);
|
|
2022
2027
|
} catch (e) {
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
useClass: ComponentClass,
|
|
2026
|
-
scope: "transient"
|
|
2027
|
-
});
|
|
2028
|
-
instance = injector.resolve(ComponentClass);
|
|
2028
|
+
console.log(e);
|
|
2029
|
+
throw new Error(e.message);
|
|
2029
2030
|
}
|
|
2030
2031
|
const localProviders = Reflect.getMetadata(COMPONENT_PROVIDERS, ComponentClass) || [];
|
|
2031
2032
|
if (localProviders.length > 0) {
|