cabloy 5.1.103 → 5.1.105
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/.cabloy-version +1 -1
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -1
- package/CHANGELOG.md +27 -0
- package/CLAUDE.md +1 -0
- package/cabloy-docs/backend/controller-aop-guide.md +2 -2
- package/cabloy-docs/backend/field-indexes.md +10 -1
- package/cabloy-docs/backend/menu-guide.md +30 -0
- package/cabloy-docs/frontend/a-model-under-the-hood.md +26 -4
- package/cabloy-docs/frontend/model-architecture.md +1 -1
- package/cabloy-docs/frontend/model-state-guide.md +122 -16
- package/cabloy-docs/frontend/ssr-init-data.md +12 -1
- package/cabloy-docs/frontend/use-state-data-best-practices.md +23 -0
- package/package.json +1 -1
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/pnpm-lock.yaml +31 -31
- package/vona/src/suite/a-home/modules/home-user/src/bean/eventListener.activate.ts +5 -4
- package/vona/src/suite/a-home/modules/home-user/src/bean/meta.version.ts +10 -6
- package/vona/src/suite/a-home/modules/home-user/src/config/config.ts +1 -1
- package/vona/src/suite/a-home/modules/home-user/src/controller/passport.ts +7 -7
- package/vona/src/suite/a-home/modules/home-user/src/entity/role.ts +4 -0
- package/vona/src/suite/a-home/modules/home-user/src/service/passportAdapter.ts +2 -2
- package/vona/src/suite/a-home/modules/home-user/src/service/roleAdapter.ts +5 -5
- package/vona/src/suite/a-training/modules/training-record/src/bean/ssrMenu.record.ts +1 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/ssrMenu.student.ts +1 -0
- package/vona/src/suite/cabloy-basic/modules/basic-siteadmin/src/bean/ssrMenu.home.ts +1 -0
- package/vona/src/suite/cabloy-basic/modules/basic-siteadmin/src/bean/ssrSite.admin.ts +5 -1
- package/vona/src/suite/cabloy-basic/modules/basic-siteweb/src/bean/ssrSite.web.ts +5 -1
- package/vona/src/suite-vendor/a-auth/modules/a-auth/package.json +1 -1
- package/vona/src/suite-vendor/a-auth/modules/a-auth/src/service/auth.ts +5 -1
- package/vona/src/suite-vendor/a-auth/package.json +1 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/cli/ssrSite/boilerplate/{{sceneName}}.{{beanName}}.ts_ +5 -3
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/package.json +1 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/bean/event.retrieveMenusSite.ts +2 -2
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/lib/beanSsrSiteBase.ts +33 -8
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/service/ssr.ts +46 -16
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/service/ssrHandler.ts +2 -4
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/types/env.ts +1 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/types/ssrMenu.ts +10 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/types/ssrSite.ts +3 -1
- package/vona/src/suite-vendor/a-cabloy/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/.metadata/index.ts +18 -2
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/bean.permission.ts +6 -1
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/event.retrievePermissionAction.ts +16 -0
- package/vona/src/suite-vendor/a-vona/modules/a-user/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/bean/bean.passport.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/lib/passport.ts +7 -4
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/types/passport.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/types/role.ts +3 -1
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/env/.env.cabloyBasicAdmin +2 -0
- package/zova/env/.env.cabloyBasicWeb +2 -0
- package/zova/packages-utils/zova-jsx/package.json +2 -2
- package/zova/packages-zova/zova/package.json +3 -3
- package/zova/packages-zova/zova-core/package.json +1 -1
- package/zova/packages-zova/zova-core/src/core/sys/sys.ts +3 -0
- package/zova/packages-zova/zova-core/src/types/utils/env.ts +1 -0
- package/zova/src/suite/a-home/modules/home-api/src/api/homeUserPassport.ts +19 -19
- package/zova/src/suite/a-home/modules/home-api/src/api/openapi/types.ts +11 -10
- package/zova/src/suite/a-home/modules/home-api/src/apiSchema/homeUserPassport.ts +5 -5
- package/zova/src/suite/a-home/modules/home-base/src/.metadata/page/errorAccessDenied.ts +9 -0
- package/zova/src/suite/a-home/modules/home-base/src/page/errorAccessDenied/controller.tsx +40 -0
- package/zova/src/suite/a-home/modules/home-base/src/routes.ts +9 -0
- package/zova/src/suite/a-home/modules/home-base/src/service/routerGuards.ts +21 -12
- package/zova/src/suite/a-home/modules/home-passport/src/model/passport.ts +7 -1
- package/zova/src/suite/a-home/modules/home-passport/src/monkey.ts +17 -3
- package/zova/src/suite-vendor/a-zova/modules/a-model/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.useState.ts +6 -6
- package/zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.useStateGeneral.ts +5 -5
- package/zova/src/suite-vendor/a-zova/modules/a-model/src/monkey.ts +11 -2
- package/zova/src/suite-vendor/a-zova/modules/a-model/src/types/query.ts +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-router/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-router/src/monkeySys.ts +10 -1
- package/zova/src/suite-vendor/a-zova/modules/a-router/src/types/router.ts +1 -0
- package/zova/src/suite-vendor/a-zova/modules/a-routertabs/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-routertabs/src/model/tabs.ts +4 -4
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +5 -5
|
@@ -63,7 +63,7 @@ export type QueryMetaPersisterCookieType =
|
|
|
63
63
|
| 'string'
|
|
64
64
|
| undefined;
|
|
65
65
|
|
|
66
|
-
export type StateType = '
|
|
66
|
+
export type StateType = 'localAsync' | 'local' | 'cookie' | 'mem' | 'data';
|
|
67
67
|
|
|
68
68
|
export type StaleTime = number;
|
|
69
69
|
export type StaleTimeFunction<
|
|
@@ -85,8 +85,12 @@ export class MonkeySys
|
|
|
85
85
|
return app.$gotoPage(pagePath, { ...options, params: undefined });
|
|
86
86
|
};
|
|
87
87
|
app.$gotoLogin = (returnTo?: string, cause?: string) => {
|
|
88
|
-
if (
|
|
88
|
+
if (
|
|
89
|
+
!returnTo &&
|
|
90
|
+
cast(app.meta.$router.currentRoute)?.path === app.sys.env.ROUTER_PAGE_LOGIN
|
|
91
|
+
) {
|
|
89
92
|
return;
|
|
93
|
+
}
|
|
90
94
|
const query: any = {};
|
|
91
95
|
if (cause) {
|
|
92
96
|
query.cause = cause;
|
|
@@ -94,6 +98,11 @@ export class MonkeySys
|
|
|
94
98
|
const returnTo2 = returnTo === app.sys.env.ROUTER_PAGE_LOGIN ? undefined : (returnTo ?? true);
|
|
95
99
|
return app.$gotoPage(app.sys.env.ROUTER_PAGE_LOGIN, { query, returnTo: returnTo2 });
|
|
96
100
|
};
|
|
101
|
+
app.$gotoAccessDenied = () => {
|
|
102
|
+
const pagePath = '/home/base/errorAccessDenied';
|
|
103
|
+
if (cast(app.meta.$router.currentRoute)?.path === pagePath) return;
|
|
104
|
+
return app.$gotoPage(pagePath, { replace: true });
|
|
105
|
+
};
|
|
97
106
|
app.$gotoReturnTo = (returnTo?: string) => {
|
|
98
107
|
const pagePath = app.$getReturnTo(returnTo);
|
|
99
108
|
return app.$gotoPage(pagePath, { replace: true });
|
|
@@ -52,6 +52,7 @@ declare module 'zova' {
|
|
|
52
52
|
$gotoPage(pagePath: string, options?: IGotoPageOptions): TypeGotoPageResult;
|
|
53
53
|
$gotoHome(options?: IGotoPageOptions): TypeGotoPageResult;
|
|
54
54
|
$gotoLogin(returnTo?: string, cause?: string): TypeGotoPageResult;
|
|
55
|
+
$gotoAccessDenied(): TypeGotoPageResult;
|
|
55
56
|
$gotoReturnTo(returnTo?: string): TypeGotoPageResult;
|
|
56
57
|
$getReturnTo(returnTo?: string): string;
|
|
57
58
|
$getCurrentPagePath(): string | undefined;
|
|
@@ -63,7 +63,7 @@ export class ModelTabs extends BeanModelBase {
|
|
|
63
63
|
};
|
|
64
64
|
this.tabKeyCurrent = this.$useStateMem(queryOptionsTabKeyCurrent);
|
|
65
65
|
// if (this.tabsOptions.cache) {
|
|
66
|
-
// this.tabKeyCurrent = this.$
|
|
66
|
+
// this.tabKeyCurrent = this.$useStateLocalAsync(queryOptionsTabKeyCurrent);
|
|
67
67
|
// } else {
|
|
68
68
|
// this.tabKeyCurrent = this.$useStateMem(queryOptionsTabKeyCurrent);
|
|
69
69
|
// }
|
|
@@ -75,14 +75,14 @@ export class ModelTabs extends BeanModelBase {
|
|
|
75
75
|
},
|
|
76
76
|
};
|
|
77
77
|
if (this.tabsOptions.cache) {
|
|
78
|
-
this.tabs = this.$
|
|
78
|
+
this.tabs = this.$useStateLocalAsync(queryOptionsTabs);
|
|
79
79
|
} else {
|
|
80
80
|
this.tabs = this.$useStateMem(queryOptionsTabs);
|
|
81
81
|
}
|
|
82
82
|
// load cache
|
|
83
83
|
if (this.tabsOptions.cache) {
|
|
84
|
-
// await this.$
|
|
85
|
-
await this.$
|
|
84
|
+
// await this.$ensureStateLocalAsync(this.tabKeyCurrent);
|
|
85
|
+
await this.$ensureStateLocalAsync(this.tabs);
|
|
86
86
|
}
|
|
87
87
|
// reset pageDirty
|
|
88
88
|
this._resetAllPageDirty();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-zova",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.93",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "zova",
|
|
6
6
|
"keywords": [
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@cabloy/word-utils": "^2.1.14",
|
|
44
44
|
"defu": "^6.1.7",
|
|
45
45
|
"luxon": "^3.7.2",
|
|
46
|
-
"zova-jsx": "^1.1.
|
|
46
|
+
"zova-jsx": "^1.1.78"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@cabloy/cli": "^3.1.28",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-suite-a-zova",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.134",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "zova",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
"zova-module-a-interceptor": "^5.1.29",
|
|
22
22
|
"zova-module-a-logger": "^5.1.26",
|
|
23
23
|
"zova-module-a-meta": "^5.1.21",
|
|
24
|
-
"zova-module-a-model": "^5.1.
|
|
24
|
+
"zova-module-a-model": "^5.1.33",
|
|
25
25
|
"zova-module-a-openapi": "^5.1.43",
|
|
26
|
-
"zova-module-a-router": "^5.1.
|
|
26
|
+
"zova-module-a-router": "^5.1.30",
|
|
27
27
|
"zova-module-a-routerstack": "^5.1.26",
|
|
28
|
-
"zova-module-a-routertabs": "^5.1.
|
|
28
|
+
"zova-module-a-routertabs": "^5.1.33",
|
|
29
29
|
"zova-module-a-ssr": "^5.1.29",
|
|
30
30
|
"zova-module-a-ssrhmr": "^5.1.22",
|
|
31
31
|
"zova-module-a-ssrserver": "^5.1.22",
|
|
32
32
|
"zova-module-a-style": "^5.1.32",
|
|
33
33
|
"zova-module-a-table": "^5.1.37",
|
|
34
34
|
"zova-module-a-zod": "^5.1.36",
|
|
35
|
-
"zova-module-a-zova": "^5.1.
|
|
35
|
+
"zova-module-a-zova": "^5.1.93"
|
|
36
36
|
},
|
|
37
37
|
"title": "a-zova"
|
|
38
38
|
}
|