zova-core 5.0.64 → 5.0.65
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/LICENSE +0 -0
- package/README.md +0 -0
- package/package.json +10 -9
- package/dist/bean/beanMotherBase.d.ts +0 -10
- package/dist/bean/beanMotherBase.d.ts.map +0 -1
- package/dist/bean/beanMotherBase.js +0 -40
- package/dist/bean/beanMotherBase.js.map +0 -1
- package/dist/bean/beanMotherPageBase.d.ts +0 -6
- package/dist/bean/beanMotherPageBase.d.ts.map +0 -1
- package/dist/bean/beanMotherPageBase.js +0 -23
- package/dist/bean/beanMotherPageBase.js.map +0 -1
- package/dist/bean/beanRenderBase.jsx +0 -43
- package/dist/bean/beanRenderBase.jsx.map +0 -1
- package/dist/bean/resource/error/beanScopeErrorImpl.d.ts +0 -14
- package/dist/bean/resource/error/beanScopeErrorImpl.d.ts.map +0 -1
- package/dist/bean/resource/error/beanScopeErrorImpl.js +0 -34
- package/dist/bean/resource/error/beanScopeErrorImpl.js.map +0 -1
- package/dist/bean/resource/icon/cabloyIcon.d.ts +0 -16
- package/dist/bean/resource/icon/cabloyIcon.d.ts.map +0 -1
- package/dist/bean/resource/icon/cabloyIcon.js +0 -45
- package/dist/bean/resource/icon/cabloyIcon.js.map +0 -1
- package/dist/bean/resource/icon/useCabloyIcon.d.ts +0 -7
- package/dist/bean/resource/icon/useCabloyIcon.d.ts.map +0 -1
- package/dist/bean/resource/icon/useCabloyIcon.js +0 -16
- package/dist/bean/resource/icon/useCabloyIcon.js.map +0 -1
- package/dist/bean/resource/locale/beanScopeLocaleImpl.d.ts +0 -4
- package/dist/bean/resource/locale/beanScopeLocaleImpl.d.ts.map +0 -1
- package/dist/bean/resource/locale/beanScopeLocaleImpl.js +0 -13
- package/dist/bean/resource/locale/beanScopeLocaleImpl.js.map +0 -1
- package/dist/bean/resource/page/page.d.ts +0 -3
- package/dist/bean/resource/page/page.d.ts.map +0 -1
- package/dist/bean/resource/page/page.js +0 -6
- package/dist/bean/resource/page/page.js.map +0 -1
- package/dist/bean/resource/route/index.d.ts +0 -2
- package/dist/bean/resource/route/index.d.ts.map +0 -1
- package/dist/bean/resource/route/index.js +0 -2
- package/dist/bean/resource/route/index.js.map +0 -1
- package/dist/bean/resource/route/type.d.ts +0 -13
- package/dist/bean/resource/route/type.d.ts.map +0 -1
- package/dist/bean/resource/route/type.js +0 -2
- package/dist/bean/resource/route/type.js.map +0 -1
- package/dist/core/app/module.d.ts +0 -22
- package/dist/core/app/module.d.ts.map +0 -1
- package/dist/core/app/module.js +0 -151
- package/dist/core/app/module.js.map +0 -1
- package/dist/core/app/view.d.ts +0 -6
- package/dist/core/app/view.d.ts.map +0 -1
- package/dist/core/app/view.js +0 -17
- package/dist/core/app/view.js.map +0 -1
- package/dist/core/component/cabloyIcon.d.ts +0 -36
- package/dist/core/component/cabloyIcon.d.ts.map +0 -1
- package/dist/core/component/cabloyIcon.js +0 -52
- package/dist/core/component/cabloyIcon.js.map +0 -1
- package/dist/core/component/router.d.ts +0 -13
- package/dist/core/component/router.d.ts.map +0 -1
- package/dist/core/component/router.js +0 -49
- package/dist/core/component/router.js.map +0 -1
- package/dist/core/component/view.d.ts +0 -7
- package/dist/core/component/view.d.ts.map +0 -1
- package/dist/core/component/view.js +0 -21
- package/dist/core/component/view.js.map +0 -1
- package/dist/decorator/class/useHook.d.ts +0 -3
- package/dist/decorator/class/useHook.d.ts.map +0 -1
- package/dist/decorator/class/useHook.js +0 -14
- package/dist/decorator/class/useHook.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -5
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js +0 -5
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/onControllerMounted.d.ts +0 -2
- package/dist/hooks/onControllerMounted.d.ts.map +0 -1
- package/dist/hooks/onControllerMounted.js +0 -9
- package/dist/hooks/onControllerMounted.js.map +0 -1
- package/dist/hooks/onMotherMounted.d.ts +0 -2
- package/dist/hooks/onMotherMounted.d.ts.map +0 -1
- package/dist/hooks/onMotherMounted.js +0 -9
- package/dist/hooks/onMotherMounted.js.map +0 -1
- package/dist/hooks/useApp.d.ts +0 -3
- package/dist/hooks/useApp.d.ts.map +0 -1
- package/dist/hooks/useApp.js +0 -6
- package/dist/hooks/useApp.js.map +0 -1
- package/dist/hooks/useCabloyIcon.d.ts +0 -7
- package/dist/hooks/useCabloyIcon.d.ts.map +0 -1
- package/dist/hooks/useCabloyIcon.js +0 -29
- package/dist/hooks/useCabloyIcon.js.map +0 -1
- package/dist/hooks/useContext.d.ts +0 -3
- package/dist/hooks/useContext.d.ts.map +0 -1
- package/dist/hooks/useContext.js +0 -6
- package/dist/hooks/useContext.js.map +0 -1
- package/dist/hooks/useController.d.ts +0 -7
- package/dist/hooks/useController.d.ts.map +0 -1
- package/dist/hooks/useController.js +0 -58
- package/dist/hooks/useController.js.map +0 -1
- package/dist/hooks/useCtx.d.ts +0 -3
- package/dist/hooks/useCtx.d.ts.map +0 -1
- package/dist/hooks/useCtx.js +0 -6
- package/dist/hooks/useCtx.js.map +0 -1
- package/dist/hooks/useMother.d.ts +0 -7
- package/dist/hooks/useMother.d.ts.map +0 -1
- package/dist/hooks/useMother.js +0 -58
- package/dist/hooks/useMother.js.map +0 -1
- package/dist/plugins/cabloy.d.ts +0 -6
- package/dist/plugins/cabloy.d.ts.map +0 -1
- package/dist/plugins/cabloy.js +0 -9
- package/dist/plugins/cabloy.js.map +0 -1
- package/dist/types/interface/icon.d.ts +0 -3
- package/dist/types/interface/icon.d.ts.map +0 -1
- package/dist/types/interface/icon.js +0 -2
- package/dist/types/interface/icon.js.map +0 -1
- package/dist/types/interface/pluginCabloy.d.ts +0 -16
- package/dist/types/interface/pluginCabloy.d.ts.map +0 -1
- package/dist/types/interface/pluginCabloy.js +0 -2
- package/dist/types/interface/pluginCabloy.js.map +0 -1
- package/dist/types/utils/inject.d.ts +0 -3
- package/dist/types/utils/inject.d.ts.map +0 -1
- package/dist/types/utils/inject.js +0 -2
- package/dist/types/utils/inject.js.map +0 -1
- package/dist/types/utils/jsx.d.ts +0 -10
- package/dist/types/utils/jsx.d.ts.map +0 -1
- package/dist/types/utils/jsx.js +0 -2
- package/dist/types/utils/jsx.js.map +0 -1
- package/dist/types/utils/symbol.d.ts +0 -2
- package/dist/types/utils/symbol.d.ts.map +0 -1
- package/dist/types/utils/symbol.js +0 -2
- package/dist/types/utils/symbol.js.map +0 -1
- package/dist/vue/hook.d.ts +0 -8
- package/dist/vue/hook.d.ts.map +0 -1
- package/dist/vue/hook.js +0 -4
- package/dist/vue/hook.js.map +0 -1
- package/dist/zod/patch.d.ts +0 -71
- package/dist/zod/patch.d.ts.map +0 -1
- package/dist/zod/patch.js +0 -33
- package/dist/zod/patch.js.map +0 -1
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.65",
|
|
4
4
|
"description": "A vue3 framework with ioc",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -31,10 +31,16 @@
|
|
|
31
31
|
"bugs": {
|
|
32
32
|
"url": "https://github.com/cabloy/zova/issues"
|
|
33
33
|
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"lint": "eslint .",
|
|
36
|
+
"clean": "tsc -b --clean",
|
|
37
|
+
"tsc:publish": "npm run clean && tsc -b",
|
|
38
|
+
"prepublishOnly": "npm run tsc:publish"
|
|
39
|
+
},
|
|
34
40
|
"dependencies": {
|
|
35
41
|
"@cabloy/compose": "^1.0.2",
|
|
36
42
|
"@cabloy/extend": "^3.0.5",
|
|
37
|
-
"@cabloy/last-word": "^1.0.
|
|
43
|
+
"@cabloy/last-word": "^1.0.13",
|
|
38
44
|
"@cabloy/localeutil": "^1.0.4",
|
|
39
45
|
"@cabloy/module-info": "^1.0.13",
|
|
40
46
|
"@cabloy/vue-runtime-core": "^3.4.31",
|
|
@@ -43,10 +49,5 @@
|
|
|
43
49
|
"vue": "^3.4.27",
|
|
44
50
|
"zod": "^3.23.8"
|
|
45
51
|
},
|
|
46
|
-
"gitHead": "
|
|
47
|
-
|
|
48
|
-
"lint": "eslint .",
|
|
49
|
-
"clean": "tsc -b --clean",
|
|
50
|
-
"tsc:publish": "npm run clean && tsc -b"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
52
|
+
"gitHead": "e452293f92ba46b87ab8d1bb19d4e507cb8a4654"
|
|
53
|
+
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BeanBase } from './beanBase.js';
|
|
2
|
-
type Data = Record<string, unknown>;
|
|
3
|
-
export declare class BeanMotherBase<TScopeModule = unknown, Props = unknown, Emits = unknown, Slots = unknown> extends BeanBase<TScopeModule> {
|
|
4
|
-
$props: Props;
|
|
5
|
-
$emit: Emits;
|
|
6
|
-
$slots: Slots;
|
|
7
|
-
$attrs: Data;
|
|
8
|
-
}
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=beanMotherBase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beanMotherBase.d.ts","sourceRoot":"","sources":["../../src/bean/beanMotherBase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEpC,qBAAa,cAAc,CACzB,YAAY,GAAG,OAAO,EACtB,KAAK,GAAG,OAAO,EACf,KAAK,GAAG,OAAO,EACf,KAAK,GAAG,OAAO,CACf,SAAQ,QAAQ,CAAC,YAAY,CAAC;IACvB,MAAM,EAAE,KAAK,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,IAAI,CAAC;CAUrB"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { markRaw } from 'vue';
|
|
2
|
-
import { BeanBase } from './beanBase.js';
|
|
3
|
-
export class BeanMotherBase extends BeanBase {
|
|
4
|
-
constructor() {
|
|
5
|
-
super(...arguments);
|
|
6
|
-
Object.defineProperty(this, "$props", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
configurable: true,
|
|
9
|
-
writable: true,
|
|
10
|
-
value: void 0
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(this, "$emit", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
configurable: true,
|
|
15
|
-
writable: true,
|
|
16
|
-
value: void 0
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(this, "$slots", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: void 0
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(this, "$attrs", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value: void 0
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
/** @internal */
|
|
32
|
-
__initMotherData(motherData) {
|
|
33
|
-
this.$props = motherData.props;
|
|
34
|
-
this.$emit = motherData.context.emit;
|
|
35
|
-
this.$slots = (motherData.context.slots ? markRaw(motherData.context.slots) : undefined);
|
|
36
|
-
this.$attrs = (motherData.context.attrs ? markRaw(motherData.context.attrs) : undefined);
|
|
37
|
-
this.app.meta.module._monkeyModuleSync('motherDataInit', undefined, motherData, this);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=beanMotherBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beanMotherBase.js","sourceRoot":"","sources":["../../src/bean/beanMotherBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAKzC,MAAM,OAAO,cAKX,SAAQ,QAAsB;IALhC;;QAMS;;;;;WAAc;QACd;;;;;WAAa;QACb;;;;;WAAc;QACd;;;;;WAAa;IAUtB,CAAC;IARC,gBAAgB;IACT,gBAAgB,CAAC,UAAuB;QAC7C,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,KAAc,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,IAAa,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAU,CAAC;QAClG,IAAI,CAAC,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAS,CAAC;QACjG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,gBAAgB,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IACxF,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beanMotherPageBase.d.ts","sourceRoot":"","sources":["../../src/bean/beanMotherPageBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,qBAAa,kBAAkB,CAC7B,YAAY,GAAG,OAAO,EACtB,KAAK,GAAG,OAAO,EACf,MAAM,GAAG,OAAO,CAChB,SAAQ,QAAQ,CAAC,YAAY,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,KAAK,CAAC;CAMtB"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BeanBase } from './beanBase.js';
|
|
2
|
-
export class BeanMotherPageBase extends BeanBase {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(...arguments);
|
|
5
|
-
Object.defineProperty(this, "$params", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true,
|
|
9
|
-
value: void 0
|
|
10
|
-
});
|
|
11
|
-
Object.defineProperty(this, "$query", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
writable: true,
|
|
15
|
-
value: void 0
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
/** @internal */
|
|
19
|
-
__initMotherData(motherData) {
|
|
20
|
-
this.app.meta.module._monkeyModuleSync('motherDataInit', undefined, motherData, this);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=beanMotherPageBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beanMotherPageBase.js","sourceRoot":"","sources":["../../src/bean/beanMotherPageBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,MAAM,OAAO,kBAIX,SAAQ,QAAsB;IAJhC;;QAKS;;;;;WAAgB;QAChB;;;;;WAAc;IAMvB,CAAC;IAJC,gBAAgB;IACT,gBAAgB,CAAC,UAAuB;QAC7C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,gBAAgB,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IACxF,CAAC;CACF"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
var __decorate =
|
|
2
|
-
(this && this.__decorate) ||
|
|
3
|
-
function (decorators, target, key, desc) {
|
|
4
|
-
var c = arguments.length,
|
|
5
|
-
r = c < 3 ? target : desc === null ? (desc = Object.getOwnPropertyDescriptor(target, key)) : desc,
|
|
6
|
-
d;
|
|
7
|
-
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function')
|
|
8
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
-
else
|
|
10
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
11
|
-
if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
13
|
-
};
|
|
14
|
-
var __metadata =
|
|
15
|
-
(this && this.__metadata) ||
|
|
16
|
-
function (k, v) {
|
|
17
|
-
if (typeof Reflect === 'object' && typeof Reflect.metadata === 'function') return Reflect.metadata(k, v);
|
|
18
|
-
};
|
|
19
|
-
import { Use } from '../decorator/class/use.js';
|
|
20
|
-
import { Cast } from '../types/utils/cast.js';
|
|
21
|
-
import { BeanBase } from './beanBase.js';
|
|
22
|
-
export class BeanRenderBase extends BeanBase {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
Object.defineProperty(this, '$$mother', {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
configurable: true,
|
|
28
|
-
writable: true,
|
|
29
|
-
value: void 0,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
render() {
|
|
33
|
-
return <template></template>;
|
|
34
|
-
}
|
|
35
|
-
__get__(prop) {
|
|
36
|
-
return Cast(this).$$mother[prop];
|
|
37
|
-
}
|
|
38
|
-
__set__(prop, value) {
|
|
39
|
-
Cast(this).$$mother[prop] = value;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
__decorate([Use(), __metadata('design:type', Object)], BeanRenderBase.prototype, '$$mother', void 0);
|
|
43
|
-
//# sourceMappingURL=beanRenderBase.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beanRenderBase.jsx","sourceRoot":"","sources":["../../src/bean/beanRenderBase.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,MAAM,OAAO,cAAuC,SAAQ,QAAsB;IAAlF;;QAEE;;;;;WAAkB;IAapB,CAAC;IAXC,MAAM;QACJ,OAAO,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAES,OAAO,CAAC,IAAI;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAES,OAAO,CAAC,IAAI,EAAE,KAAK;QAC3B,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IACpC,CAAC;CACF;AAbC;IADC,GAAG,EAAE;;gDACY"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BeanSimple } from '../../beanSimple.js';
|
|
2
|
-
import { IErrorObject } from './errorObject.js';
|
|
3
|
-
import { IModuleError } from './type.js';
|
|
4
|
-
declare const BeanModuleScope: unique symbol;
|
|
5
|
-
declare const BeanErrorCode: unique symbol;
|
|
6
|
-
export declare class BeanScopeErrorImpl extends BeanSimple implements IModuleError {
|
|
7
|
-
private [BeanModuleScope];
|
|
8
|
-
private [BeanErrorCode];
|
|
9
|
-
constructor(moduleScope: any, errorCode: any);
|
|
10
|
-
throw(...args: any[]): never;
|
|
11
|
-
parseFail(...args: any[]): IErrorObject;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=beanScopeErrorImpl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beanScopeErrorImpl.d.ts","sourceRoot":"","sources":["../../../../src/bean/resource/error/beanScopeErrorImpl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,QAAA,MAAM,eAAe,eAAuC,CAAC;AAC7D,QAAA,MAAM,aAAa,eAAyC,CAAC;AAE7D,qBAAa,kBAAmB,SAAQ,UAAW,YAAW,YAAY;IACxE,OAAO,CAAC,CAAC,eAAe,CAAC,CAAS;IAClC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAkB;gBAE7B,WAAW,KAAA,EAAE,SAAS,KAAA;IAMlC,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,KAAK;IAM5B,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,YAAY;CAGxC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var _a, _b;
|
|
2
|
-
import { Cast } from '../../../types/utils/cast.js';
|
|
3
|
-
import { BeanSimple } from '../../beanSimple.js';
|
|
4
|
-
const BeanModuleScope = Symbol('BeanScopeError#ModuleScope');
|
|
5
|
-
const BeanErrorCode = Symbol('BeanScopeError#BeanErrorCode');
|
|
6
|
-
export class BeanScopeErrorImpl extends BeanSimple {
|
|
7
|
-
constructor(moduleScope, errorCode) {
|
|
8
|
-
super();
|
|
9
|
-
Object.defineProperty(this, _a, {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: void 0,
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(this, _b, {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
configurable: true,
|
|
18
|
-
writable: true,
|
|
19
|
-
value: void 0,
|
|
20
|
-
});
|
|
21
|
-
this[BeanModuleScope] = moduleScope;
|
|
22
|
-
this[BeanErrorCode] = errorCode;
|
|
23
|
-
}
|
|
24
|
-
throw(...args) {
|
|
25
|
-
// todo:
|
|
26
|
-
Cast(this.ctx).throw.module(this[BeanModuleScope], this[BeanErrorCode], ...args);
|
|
27
|
-
throw new Error('403');
|
|
28
|
-
}
|
|
29
|
-
parseFail(...args) {
|
|
30
|
-
return Cast(this.ctx).parseFail.module(this[BeanModuleScope], this[BeanErrorCode], ...args);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
(_a = BeanModuleScope), (_b = BeanErrorCode);
|
|
34
|
-
//# sourceMappingURL=beanScopeErrorImpl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beanScopeErrorImpl.js","sourceRoot":"","sources":["../../../../src/bean/resource/error/beanScopeErrorImpl.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIjD,MAAM,eAAe,GAAG,MAAM,CAAC,4BAA4B,CAAC,CAAC;AAC7D,MAAM,aAAa,GAAG,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAE7D,MAAM,OAAO,kBAAmB,SAAQ,UAAU;IAIhD,YAAY,WAAW,EAAE,SAAS;QAChC,KAAK,EAAE,CAAC;QAJF;;;;;WAA0B;QAC1B;;;;;WAAiC;QAIvC,IAAI,CAAC,eAAe,CAAC,GAAG,WAAW,CAAC;QACpC,IAAI,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,GAAG,IAAW;QAClB,QAAQ;QACR,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;QACjF,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAED,SAAS,CAAC,GAAG,IAAW;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IAC9F,CAAC;CACF;KAlBU,eAAe,OACf,aAAa"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const CabloyIcon: import("vue").DefineComponent<{
|
|
2
|
-
name: StringConstructor;
|
|
3
|
-
href: StringConstructor;
|
|
4
|
-
width: (StringConstructor | NumberConstructor)[];
|
|
5
|
-
height: (StringConstructor | NumberConstructor)[];
|
|
6
|
-
color: StringConstructor;
|
|
7
|
-
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
-
name: StringConstructor;
|
|
11
|
-
href: StringConstructor;
|
|
12
|
-
width: (StringConstructor | NumberConstructor)[];
|
|
13
|
-
height: (StringConstructor | NumberConstructor)[];
|
|
14
|
-
color: StringConstructor;
|
|
15
|
-
}>>, {}, {}>;
|
|
16
|
-
//# sourceMappingURL=cabloyIcon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cabloyIcon.d.ts","sourceRoot":"","sources":["../../../../src/bean/resource/icon/cabloyIcon.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;YA+CrB,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { defineComponent } from 'vue';
|
|
2
|
-
import { mergeProps, createVNode } from 'vue';
|
|
3
|
-
import { useCabloyIcon } from './useCabloyIcon.js';
|
|
4
|
-
export const CabloyIcon = defineComponent({
|
|
5
|
-
name: 'CabloyIcon',
|
|
6
|
-
inheritAttrs: true,
|
|
7
|
-
props: {
|
|
8
|
-
name: String,
|
|
9
|
-
href: String,
|
|
10
|
-
width: [String, Number],
|
|
11
|
-
height: [String, Number],
|
|
12
|
-
color: String,
|
|
13
|
-
},
|
|
14
|
-
setup(props, _ref2) {
|
|
15
|
-
const { iconInfo } = useCabloyIcon(() => props.name);
|
|
16
|
-
return () => {
|
|
17
|
-
// href
|
|
18
|
-
let href = props.href;
|
|
19
|
-
if (!href) {
|
|
20
|
-
href = `#${iconInfo.value?.symbolId || ''}`;
|
|
21
|
-
}
|
|
22
|
-
// svgProps
|
|
23
|
-
const svgProps = mergeProps({
|
|
24
|
-
class: 'cabloy-icon__svg',
|
|
25
|
-
xmlns: 'http://www.w3.org/2000/svg',
|
|
26
|
-
viewBox: '0 0 24 24',
|
|
27
|
-
fill: 'currentColor',
|
|
28
|
-
role: 'img',
|
|
29
|
-
'aria-hidden': 'true',
|
|
30
|
-
}, {
|
|
31
|
-
width: props.width,
|
|
32
|
-
height: props.height,
|
|
33
|
-
style: {
|
|
34
|
-
color: props.color,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
return createVNode('svg', svgProps, [
|
|
38
|
-
createVNode('use', {
|
|
39
|
-
'xlink:href': href,
|
|
40
|
-
}, null),
|
|
41
|
-
]);
|
|
42
|
-
};
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
//# sourceMappingURL=cabloyIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cabloyIcon.js","sourceRoot":"","sources":["../../../../src/bean/resource/icon/cabloyIcon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,IAAI,EAAE,YAAY;IAClB,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;QACvB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,KAAK,EAAE,MAAM;KACd;IACD,KAAK,CAAC,KAAK,EAAE,KAAK;QAChB,MAAM,EAAE,QAAQ,EAAE,GAAG,aAAa,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrD,OAAO,GAAG,EAAE;YACV,OAAO;YACP,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACtB,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,EAAE,QAAQ,IAAI,EAAE,EAAE,CAAC;YAC9C,CAAC;YACD,WAAW;YACX,MAAM,QAAQ,GAAG,UAAU,CACzB;gBACE,KAAK,EAAE,kBAAkB;gBACzB,KAAK,EAAE,4BAA4B;gBACnC,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,KAAK;gBACX,aAAa,EAAE,MAAM;aACtB,EACD;gBACE,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,KAAK,EAAE;oBACL,KAAK,EAAE,KAAK,CAAC,KAAK;iBACnB;aACF,CACF,CAAC;YACF,OAAO,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE;gBAClC,WAAW,CACT,KAAK,EACL;oBACE,YAAY,EAAE,IAAI;iBACnB,EACD,IAAI,CACL;aACF,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CabloyApplication } from '../../../core/index.js';
|
|
2
|
-
import { IIconInfo } from './types.js';
|
|
3
|
-
export declare function getCabloyIcon(iconName?: string, app?: CabloyApplication): IIconInfo | undefined;
|
|
4
|
-
export declare function useCabloyIcon(iconGetter: () => string | undefined): {
|
|
5
|
-
iconInfo: import("vue").Ref<IIconInfo | undefined>;
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=useCabloyIcon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCabloyIcon.d.ts","sourceRoot":"","sources":["../../../../src/bean/resource/icon/useCabloyIcon.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,wBAAgB,aAAa,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,iBAAiB,GAAG,SAAS,GAAG,SAAS,CAG/F;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,MAAM,GAAG,SAAS;;EASjE"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ref, watchEffect } from 'vue';
|
|
2
|
-
import { useApp } from '../../../composables/useApp.js';
|
|
3
|
-
export function getCabloyIcon(iconName, app) {
|
|
4
|
-
if (!app)
|
|
5
|
-
app = useApp();
|
|
6
|
-
return app.meta.icon.parseIconInfoSync(iconName);
|
|
7
|
-
}
|
|
8
|
-
export function useCabloyIcon(iconGetter) {
|
|
9
|
-
const iconInfo = ref();
|
|
10
|
-
const app = useApp();
|
|
11
|
-
watchEffect(() => {
|
|
12
|
-
iconInfo.value = getCabloyIcon(iconGetter(), app);
|
|
13
|
-
});
|
|
14
|
-
return { iconInfo };
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=useCabloyIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCabloyIcon.js","sourceRoot":"","sources":["../../../../src/bean/resource/icon/useCabloyIcon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAIxD,MAAM,UAAU,aAAa,CAAC,QAAiB,EAAE,GAAuB;IACtE,IAAI,CAAC,GAAG;QAAE,GAAG,GAAG,MAAM,EAAE,CAAC;IACzB,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,UAAoC;IAChE,MAAM,QAAQ,GAAG,GAAG,EAAa,CAAC;IAClC,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IAErB,WAAW,CAAC,GAAG,EAAE;QACf,QAAQ,CAAC,KAAK,GAAG,aAAa,CAAC,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,QAAQ,EAAE,CAAC;AACtB,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { CabloyContext } from '../../../core/context/context.js';
|
|
2
|
-
import { IModuleLocale } from '../../../index.js';
|
|
3
|
-
export declare function BeanScopeLocaleImpl(ctx: CabloyContext, _moduleScope: string, text: string): IModuleLocale;
|
|
4
|
-
//# sourceMappingURL=beanScopeLocaleImpl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beanScopeLocaleImpl.d.ts","sourceRoot":"","sources":["../../../../src/bean/resource/locale/beanScopeLocaleImpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAQ,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAExD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,CAUzG"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Cast } from '../../../index.js';
|
|
2
|
-
export function BeanScopeLocaleImpl(ctx, _moduleScope, text) {
|
|
3
|
-
const getText = function (...args) {
|
|
4
|
-
// todo:
|
|
5
|
-
return Cast(ctx).text(text, ...args);
|
|
6
|
-
};
|
|
7
|
-
getText.locale = function (locale, ...args) {
|
|
8
|
-
// todo:
|
|
9
|
-
return Cast(ctx).text.locale(locale, text, ...args);
|
|
10
|
-
};
|
|
11
|
-
return getText;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=beanScopeLocaleImpl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beanScopeLocaleImpl.js","sourceRoot":"","sources":["../../../../src/bean/resource/locale/beanScopeLocaleImpl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAiB,MAAM,mBAAmB,CAAC;AAExD,MAAM,UAAU,mBAAmB,CAAC,GAAkB,EAAE,YAAoB,EAAE,IAAY;IACxF,MAAM,OAAO,GAAG,UAAU,GAAG,IAAW;QACtC,QAAQ;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;IACvC,CAAC,CAAC;IACF,OAAO,CAAC,MAAM,GAAG,UAAU,MAAM,EAAE,GAAG,IAAW;QAC/C,QAAQ;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;IACtD,CAAC,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../src/bean/resource/page/page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,qBAAa,OAAQ,SAAQ,UAAU;CAGtC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../../src/bean/resource/page/page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,OAAO,OAAQ,SAAQ,UAAU;IACrC,gBAAgB;IACT,KAAK,CAAC,UAAU,KAAI,CAAC;CAC7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bean/resource/route/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/bean/resource/route/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import 'vue-router';
|
|
2
|
-
import { RouteComponent, RouteRecordRaw } from 'vue-router';
|
|
3
|
-
export type Lazy<T> = () => Promise<T>;
|
|
4
|
-
export type IModuleRouteComponent = RouteComponent | Lazy<RouteComponent>;
|
|
5
|
-
export type IModuleRoute = RouteRecordRaw;
|
|
6
|
-
declare module 'vue-router' {
|
|
7
|
-
interface RouteMeta {
|
|
8
|
-
absolute?: boolean;
|
|
9
|
-
layout?: 'empty' | 'default' | false | string | IModuleRouteComponent;
|
|
10
|
-
requiresAuth?: boolean;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../src/bean/resource/route/type.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5D,MAAM,MAAM,IAAI,CAAC,CAAC,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC;AACvC,MAAM,MAAM,qBAAqB,GAAG,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC;AAC1E,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC;AAE1C,OAAO,QAAQ,YAAY,CAAC;IAC1B,UAAU,SAAS;QACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,qBAAqB,CAAC;QACtE,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../../src/bean/resource/route/type.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IModule } from '@cabloy/module-info';
|
|
2
|
-
import { BeanSimple } from '../../bean/beanSimple.js';
|
|
3
|
-
export declare class AppModule extends BeanSimple {
|
|
4
|
-
private modulesMeta;
|
|
5
|
-
private modules;
|
|
6
|
-
get(moduleName: string): IModule;
|
|
7
|
-
use(_moduleName: any): Promise<void>;
|
|
8
|
-
private _requireAllMonkeys;
|
|
9
|
-
private _requireAllSyncs;
|
|
10
|
-
private _install;
|
|
11
|
-
private _registerResources;
|
|
12
|
-
private _registerErrors;
|
|
13
|
-
private _registerLocales;
|
|
14
|
-
private _registerConstants;
|
|
15
|
-
private _registerConfig;
|
|
16
|
-
private _registerComponents;
|
|
17
|
-
private _setComponentGlobal;
|
|
18
|
-
private _registerRoutes;
|
|
19
|
-
private _registerRoute;
|
|
20
|
-
private _monkeyModule;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/core/app/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAMtD,qBAAa,SAAU,SAAQ,UAAU;IACvC,OAAO,CAAC,WAAW,CAA0B;IAC7C,OAAO,CAAC,OAAO,CAA+B;IAS9C,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAI1B,GAAG,CAAC,WAAW,KAAA;YAEP,kBAAkB;YAMlB,gBAAgB;YAMhB,QAAQ;YAoBR,kBAAkB;IAQhC,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,kBAAkB;YAUZ,eAAe;IAe7B,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,cAAc;YAMR,aAAa;CAqB5B"}
|
package/dist/core/app/module.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { BeanSimple } from '../../bean/beanSimple.js';
|
|
2
|
-
export class AppModule extends BeanSimple {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(...arguments);
|
|
5
|
-
Object.defineProperty(this, 'modulesMeta', {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true,
|
|
9
|
-
value: void 0,
|
|
10
|
-
});
|
|
11
|
-
Object.defineProperty(this, 'modules', {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
writable: true,
|
|
15
|
-
value: {},
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
/** @internal */
|
|
19
|
-
async initialize(modulesMeta) {
|
|
20
|
-
this.modulesMeta = modulesMeta;
|
|
21
|
-
await this._requireAllMonkeys();
|
|
22
|
-
await this._requireAllSyncs();
|
|
23
|
-
}
|
|
24
|
-
get(moduleName) {
|
|
25
|
-
return this.modules[moduleName];
|
|
26
|
-
}
|
|
27
|
-
async use(_moduleName) {}
|
|
28
|
-
async _requireAllMonkeys() {
|
|
29
|
-
for (const relativeName in this.modulesMeta.monkey) {
|
|
30
|
-
await this._install(relativeName, this.modulesMeta.monkey[relativeName]);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
async _requireAllSyncs() {
|
|
34
|
-
for (const relativeName in this.modulesMeta.sync) {
|
|
35
|
-
await this._install(relativeName, this.modulesMeta.sync[relativeName]);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
async _install(moduleName, module) {
|
|
39
|
-
// record
|
|
40
|
-
this.modules[moduleName] = module;
|
|
41
|
-
// main / monkey
|
|
42
|
-
if (module.resource.Main) {
|
|
43
|
-
module.mainInstance = await this.app.bean._newBean(module.resource.Main);
|
|
44
|
-
}
|
|
45
|
-
if (module.resource.Monkey) {
|
|
46
|
-
module.monkeyInstance = await this.app.bean._newBean(module.resource.Monkey);
|
|
47
|
-
}
|
|
48
|
-
// monkey: moduleLoading
|
|
49
|
-
await this._monkeyModule('moduleLoading', module);
|
|
50
|
-
// register routes
|
|
51
|
-
this._registerRoutes(module);
|
|
52
|
-
// register resources
|
|
53
|
-
await this._registerResources(module);
|
|
54
|
-
// monkey: moduleLoaded
|
|
55
|
-
await this._monkeyModule('moduleLoaded', module);
|
|
56
|
-
}
|
|
57
|
-
async _registerResources(module) {
|
|
58
|
-
this._registerComponents(module);
|
|
59
|
-
this._registerLocales(module);
|
|
60
|
-
this._registerErrors(module);
|
|
61
|
-
this._registerConstants(module);
|
|
62
|
-
await this._registerConfig(module);
|
|
63
|
-
}
|
|
64
|
-
_registerErrors(module) {
|
|
65
|
-
if (!module.resource.Errors) return;
|
|
66
|
-
this.app.meta.errors[module.info.relativeName] = module.resource.Errors;
|
|
67
|
-
}
|
|
68
|
-
_registerLocales(module) {
|
|
69
|
-
if (!module.resource.locales) return;
|
|
70
|
-
for (const key in module.resource.locales) {
|
|
71
|
-
this.app.meta.locales[key] = this.app.meta.util.extend(
|
|
72
|
-
{},
|
|
73
|
-
module.resource.locales[key],
|
|
74
|
-
this.app.meta.locales[key],
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
_registerConstants(module) {
|
|
79
|
-
if (!module.resource.constants) return;
|
|
80
|
-
const relativeName = module.info.relativeName;
|
|
81
|
-
this.app.constant.modules[relativeName] = this.app.meta.util.extend(
|
|
82
|
-
{},
|
|
83
|
-
module.resource.constants,
|
|
84
|
-
this.app.constant.modules[relativeName],
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
async _registerConfig(module) {
|
|
88
|
-
if (!module.resource.config) return;
|
|
89
|
-
// config
|
|
90
|
-
const config = await module.resource.config(this.app);
|
|
91
|
-
// monkey
|
|
92
|
-
await this._monkeyModule('configLoaded', module, config);
|
|
93
|
-
// extend
|
|
94
|
-
const relativeName = module.info.relativeName;
|
|
95
|
-
this.app.config.modules[relativeName] = this.app.meta.util.extend(
|
|
96
|
-
{},
|
|
97
|
-
config,
|
|
98
|
-
this.app.config.modules[relativeName],
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
_registerComponents(module) {
|
|
102
|
-
if (!module.resource.components) return;
|
|
103
|
-
for (const key in module.resource.components) {
|
|
104
|
-
const component = module.resource.components[key];
|
|
105
|
-
this._setComponentGlobal(component);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
_setComponentGlobal(component) {
|
|
109
|
-
// register
|
|
110
|
-
const options = component;
|
|
111
|
-
if (component.name && options.meta?.global === true) {
|
|
112
|
-
if (!this.app.vue.component(component.name)) {
|
|
113
|
-
this.app.vue.component(component.name, component);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return component;
|
|
117
|
-
}
|
|
118
|
-
_registerRoutes(module) {
|
|
119
|
-
if (!module.resource.routes) return null;
|
|
120
|
-
for (const route of module.resource.routes) {
|
|
121
|
-
this._registerRoute(module, route);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
_registerRoute(module, route) {
|
|
125
|
-
const path = `/${module.info.pid}/${module.info.name}/${route.path}`;
|
|
126
|
-
const component = route.component;
|
|
127
|
-
this.app.view.router.addRoute({ path, component });
|
|
128
|
-
}
|
|
129
|
-
async _monkeyModule(monkeyName, moduleTarget, ...monkeyData) {
|
|
130
|
-
// self: main
|
|
131
|
-
if (moduleTarget.mainInstance && moduleTarget.mainInstance[monkeyName]) {
|
|
132
|
-
// @ts-ignore ignore
|
|
133
|
-
await moduleTarget.mainInstance[monkeyName](moduleTarget, ...monkeyData);
|
|
134
|
-
}
|
|
135
|
-
// module monkey
|
|
136
|
-
for (const key in this.modulesMeta.monkey) {
|
|
137
|
-
const moduleMonkey = this.modulesMeta.monkey[key];
|
|
138
|
-
if (moduleMonkey.monkeyInstance && moduleMonkey.monkeyInstance[monkeyName]) {
|
|
139
|
-
// @ts-ignore ignore
|
|
140
|
-
await moduleMonkey.monkeyInstance[monkeyName](moduleMonkey, moduleTarget, ...monkeyData);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
// app monkey
|
|
144
|
-
const appMonkey = this.app.meta.appMonkey;
|
|
145
|
-
if (appMonkey && appMonkey[monkeyName]) {
|
|
146
|
-
// @ts-ignore ignore
|
|
147
|
-
await appMonkey[monkeyName](moduleTarget, ...monkeyData);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
//# sourceMappingURL=module.js.map
|