zova-core 5.0.157 → 5.0.158
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/bean/scope/beanScopeBase.d.ts +0 -2
- package/dist/bean/scope/beanScopeBase.d.ts.map +1 -1
- package/dist/bean/scope/beanScopeBase.js +0 -10
- package/dist/bean/scope/beanScopeBase.js.map +1 -1
- package/dist/bean/scope/type.d.ts +1 -3
- package/dist/bean/scope/type.d.ts.map +1 -1
- package/dist/components/component.d.ts +4 -0
- package/dist/components/component.d.ts.map +1 -0
- package/dist/components/component.js +13 -0
- package/dist/components/component.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/package.json +4 -4
- package/src/bean/scope/beanScopeBase.ts +0 -10
- package/src/bean/scope/type.ts +0 -3
- package/src/components/component.ts +13 -0
- package/src/components/index.ts +1 -0
|
@@ -5,14 +5,12 @@ declare const BeanModuleError: unique symbol;
|
|
|
5
5
|
declare const BeanModuleLocale: unique symbol;
|
|
6
6
|
declare const BeanModuleConfig: unique symbol;
|
|
7
7
|
declare const BeanModuleConstant: unique symbol;
|
|
8
|
-
declare const BeanModuleComponent: unique symbol;
|
|
9
8
|
declare const BeanModuleService: unique symbol;
|
|
10
9
|
export declare class BeanScopeBase extends BeanBaseSimple {
|
|
11
10
|
private [BeanModuleError];
|
|
12
11
|
private [BeanModuleLocale];
|
|
13
12
|
private [BeanModuleConfig];
|
|
14
13
|
private [BeanModuleConstant];
|
|
15
|
-
private [BeanModuleComponent];
|
|
16
14
|
private [BeanModuleService];
|
|
17
15
|
get module(): IModule;
|
|
18
16
|
protected __get__(prop: any): unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beanScopeBase.d.ts","sourceRoot":"","sources":["../../../src/bean/scope/beanScopeBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAsB,MAAM,sBAAsB,CAAC;AAI1E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,QAAA,MAAM,eAAe,eAA0C,CAAC;AAChE,QAAA,MAAM,gBAAgB,eAA2C,CAAC;AAClE,QAAA,MAAM,gBAAgB,eAA2C,CAAC;AAClE,QAAA,MAAM,kBAAkB,eAA6C,CAAC;AACtE,QAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"beanScopeBase.d.ts","sourceRoot":"","sources":["../../../src/bean/scope/beanScopeBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAsB,MAAM,sBAAsB,CAAC;AAI1E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,QAAA,MAAM,eAAe,eAA0C,CAAC;AAChE,QAAA,MAAM,gBAAgB,eAA2C,CAAC;AAClE,QAAA,MAAM,gBAAgB,eAA2C,CAAC;AAClE,QAAA,MAAM,kBAAkB,eAA6C,CAAC;AACtE,QAAA,MAAM,iBAAiB,eAA4C,CAAC;AAEpE,qBAAa,aAAc,SAAQ,cAAc;IAC/C,OAAO,CAAC,CAAC,eAAe,CAAC,CAAiB;IAC1C,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAAkB;IAC5C,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAAU;IACpC,OAAO,CAAC,CAAC,kBAAkB,CAAC,CAAU;IACtC,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAAU;IAErC,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,SAAS,CAAC,OAAO,CAAC,IAAI,KAAA;CAsCvB"}
|
|
@@ -6,14 +6,12 @@ const BeanModuleError = Symbol('BeanScopeBase#BeanModuleError');
|
|
|
6
6
|
const BeanModuleLocale = Symbol('BeanScopeBase#BeanModuleLocale');
|
|
7
7
|
const BeanModuleConfig = Symbol('BeanScopeBase#BeanModuleConfig');
|
|
8
8
|
const BeanModuleConstant = Symbol('BeanScopeBase#BeanModuleConstant');
|
|
9
|
-
const BeanModuleComponent = Symbol('BeanScopeBase#BeanModuleComponent');
|
|
10
9
|
const BeanModuleService = Symbol('BeanScopeBase#BeanModuleService');
|
|
11
10
|
export class BeanScopeBase extends BeanBaseSimple {
|
|
12
11
|
[BeanModuleError];
|
|
13
12
|
[BeanModuleLocale];
|
|
14
13
|
[BeanModuleConfig];
|
|
15
14
|
[BeanModuleConstant];
|
|
16
|
-
[BeanModuleComponent];
|
|
17
15
|
[BeanModuleService];
|
|
18
16
|
get module() {
|
|
19
17
|
return this.app.meta.module.get(this[SymbolModuleBelong]);
|
|
@@ -48,14 +46,6 @@ export class BeanScopeBase extends BeanBaseSimple {
|
|
|
48
46
|
}
|
|
49
47
|
return this[BeanModuleConstant];
|
|
50
48
|
}
|
|
51
|
-
// component
|
|
52
|
-
if (prop === 'component') {
|
|
53
|
-
if (!this[BeanModuleComponent]) {
|
|
54
|
-
const module = this.app.meta.module.get(moduleBelong);
|
|
55
|
-
this[BeanModuleComponent] = module.resource.components;
|
|
56
|
-
}
|
|
57
|
-
return this[BeanModuleComponent];
|
|
58
|
-
}
|
|
59
49
|
// service
|
|
60
50
|
if (prop === 'service') {
|
|
61
51
|
if (!this[BeanModuleService]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beanScopeBase.js","sourceRoot":"","sources":["../../../src/bean/scope/beanScopeBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAKxE,MAAM,eAAe,GAAG,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ACvB,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC;gBAC7B,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,gBAAgB,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;YAC5F,CAAC;YACD,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;CACF"}
|
|
@@ -3,10 +3,8 @@ import { TypeModuleErrors } from '../resource/error/type.js';
|
|
|
3
3
|
import { TypeModuleLocales } from '../resource/locale/type.js';
|
|
4
4
|
import { TypeModuleConstants } from '../resource/constant/type.js';
|
|
5
5
|
import { ZovaApplication } from '../../core/app/application.js';
|
|
6
|
-
import { TypeModuleComponents } from '../resource/component/type.js';
|
|
7
6
|
import { TypeModuleServices } from '../resource/index.js';
|
|
8
|
-
export type TypeModuleResource<
|
|
9
|
-
component: TypeModuleComponents<COMPONENTS>;
|
|
7
|
+
export type TypeModuleResource<CONFIG extends (app: ZovaApplication) => object, ERRORS, LOCALES, CONSTANTS = object, SERVICES = undefined> = {
|
|
10
8
|
config: TypeModuleConfig<CONFIG>;
|
|
11
9
|
error: TypeModuleErrors<ERRORS>;
|
|
12
10
|
locale: TypeModuleLocales<LOCALES>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/bean/scope/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/bean/scope/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,MAAM,kBAAkB,CAC5B,MAAM,SAAS,CAAC,GAAG,EAAE,eAAe,KAAK,MAAM,EAC/C,MAAM,EACN,OAAO,EACP,SAAS,GAAG,MAAM,EAClB,QAAQ,GAAG,SAAS,IAClB;IACF,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAChC,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACnC,QAAQ,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACzC,OAAO,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;CACvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/components/component.ts"],"names":[],"mappings":"AAGA,wBAAgB,mBAAmB,CAAC,MAAM,KAAA,EAAE,IAAI,KAAA;;EAS/C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAsyncComponent } from 'vue';
|
|
2
|
+
import { useApp } from '../composables/useApp.js';
|
|
3
|
+
export function createZovaComponent(module, name) {
|
|
4
|
+
return defineAsyncComponent(() => {
|
|
5
|
+
return new Promise(resolve => {
|
|
6
|
+
const app = useApp();
|
|
7
|
+
app.meta.module.use(module).then(_module => {
|
|
8
|
+
resolve(_module.resource.components[name]);
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/components/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,MAAM,UAAU,mBAAmB,CAAC,MAAM,EAAE,IAAI;IAC9C,OAAO,oBAAoB,CAAC,GAAG,EAAE;QAC/B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;YAC3B,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;YACrB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;gBACzC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAQ,CAAC,CAAC;YACpD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.158",
|
|
4
4
|
"description": "A vue3 framework with ioc",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"@cabloy/last-word": "^1.0.13",
|
|
45
45
|
"@cabloy/localeutil": "^1.0.4",
|
|
46
46
|
"@cabloy/module-info": "^1.0.22",
|
|
47
|
-
"@cabloy/vue-reactivity": "^3.5.
|
|
47
|
+
"@cabloy/vue-reactivity": "^3.5.10",
|
|
48
48
|
"@cabloy/vue-router": "^4.4.8",
|
|
49
|
-
"@cabloy/vue-runtime-core": "^3.5.
|
|
49
|
+
"@cabloy/vue-runtime-core": "^3.5.10",
|
|
50
50
|
"@types/js-cookie": "^3.0.6",
|
|
51
51
|
"@vue/reactivity": "^3.5.6",
|
|
52
52
|
"@vue/shared": "^3.5.6",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"zod": "^3.23.8",
|
|
58
58
|
"zova-shared": "^1.0.4"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "1aade8046f4e35d238fe490542d128a64e969ea4"
|
|
61
61
|
}
|
|
@@ -10,7 +10,6 @@ const BeanModuleError = Symbol('BeanScopeBase#BeanModuleError');
|
|
|
10
10
|
const BeanModuleLocale = Symbol('BeanScopeBase#BeanModuleLocale');
|
|
11
11
|
const BeanModuleConfig = Symbol('BeanScopeBase#BeanModuleConfig');
|
|
12
12
|
const BeanModuleConstant = Symbol('BeanScopeBase#BeanModuleConstant');
|
|
13
|
-
const BeanModuleComponent = Symbol('BeanScopeBase#BeanModuleComponent');
|
|
14
13
|
const BeanModuleService = Symbol('BeanScopeBase#BeanModuleService');
|
|
15
14
|
|
|
16
15
|
export class BeanScopeBase extends BeanBaseSimple {
|
|
@@ -18,7 +17,6 @@ export class BeanScopeBase extends BeanBaseSimple {
|
|
|
18
17
|
private [BeanModuleLocale]: BeanScopeLocale;
|
|
19
18
|
private [BeanModuleConfig]: unknown;
|
|
20
19
|
private [BeanModuleConstant]: unknown;
|
|
21
|
-
private [BeanModuleComponent]: unknown;
|
|
22
20
|
private [BeanModuleService]: unknown;
|
|
23
21
|
|
|
24
22
|
get module(): IModule {
|
|
@@ -55,14 +53,6 @@ export class BeanScopeBase extends BeanBaseSimple {
|
|
|
55
53
|
}
|
|
56
54
|
return this[BeanModuleConstant];
|
|
57
55
|
}
|
|
58
|
-
// component
|
|
59
|
-
if (prop === 'component') {
|
|
60
|
-
if (!this[BeanModuleComponent]) {
|
|
61
|
-
const module = this.app.meta.module.get(moduleBelong);
|
|
62
|
-
this[BeanModuleComponent] = module!.resource.components;
|
|
63
|
-
}
|
|
64
|
-
return this[BeanModuleComponent];
|
|
65
|
-
}
|
|
66
56
|
// service
|
|
67
57
|
if (prop === 'service') {
|
|
68
58
|
if (!this[BeanModuleService]) {
|
package/src/bean/scope/type.ts
CHANGED
|
@@ -3,18 +3,15 @@ import { TypeModuleErrors } from '../resource/error/type.js';
|
|
|
3
3
|
import { TypeModuleLocales } from '../resource/locale/type.js';
|
|
4
4
|
import { TypeModuleConstants } from '../resource/constant/type.js';
|
|
5
5
|
import { ZovaApplication } from '../../core/app/application.js';
|
|
6
|
-
import { TypeModuleComponents } from '../resource/component/type.js';
|
|
7
6
|
import { TypeModuleServices } from '../resource/index.js';
|
|
8
7
|
|
|
9
8
|
export type TypeModuleResource<
|
|
10
|
-
COMPONENTS,
|
|
11
9
|
CONFIG extends (app: ZovaApplication) => object,
|
|
12
10
|
ERRORS,
|
|
13
11
|
LOCALES,
|
|
14
12
|
CONSTANTS = object,
|
|
15
13
|
SERVICES = undefined,
|
|
16
14
|
> = {
|
|
17
|
-
component: TypeModuleComponents<COMPONENTS>;
|
|
18
15
|
config: TypeModuleConfig<CONFIG>;
|
|
19
16
|
error: TypeModuleErrors<ERRORS>;
|
|
20
17
|
locale: TypeModuleLocales<LOCALES>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAsyncComponent } from 'vue';
|
|
2
|
+
import { useApp } from '../composables/useApp.js';
|
|
3
|
+
|
|
4
|
+
export function createZovaComponent(module, name) {
|
|
5
|
+
return defineAsyncComponent(() => {
|
|
6
|
+
return new Promise(resolve => {
|
|
7
|
+
const app = useApp();
|
|
8
|
+
app.meta.module.use(module).then(_module => {
|
|
9
|
+
resolve(_module.resource.components[name] as any);
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
}
|
package/src/components/index.ts
CHANGED