cabloy 5.1.98 → 5.1.100
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/hooks/contract-loop-gate.ts +151 -44
- package/CHANGELOG.md +28 -0
- package/CLAUDE.md +2 -0
- package/cabloy-docs/.vitepress/config.mjs +4 -0
- package/cabloy-docs/backend/controller-aop-guide.md +0 -1
- package/cabloy-docs/frontend/a-openapi-under-the-hood.md +1 -1
- package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +1 -1
- package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +1 -1
- package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +1 -1
- package/cabloy-docs/frontend/model-resource-owner-pattern.md +1 -1
- package/cabloy-docs/frontend/model-state-guide.md +3 -1
- package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +2 -2
- package/cabloy-docs/frontend/resource-list-page-deep-dive.md +1 -1
- package/cabloy-docs/frontend/rest-resource-source-reading-map.md +2 -2
- package/cabloy-docs/frontend/rest-resource-under-the-hood.md +4 -4
- package/cabloy-docs/frontend/use-state-data-best-practices.md +384 -0
- package/package.json +1 -1
- package/scripts/upgrade.ts +2 -0
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/package.json +1 -1
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/packages-vona/vona-core/package.json +1 -1
- package/vona/packages-vona/vona-core/src/lib/bean/beanBase.ts +9 -9
- package/vona/packages-vona/vona-mock/package.json +1 -1
- package/vona/pnpm-lock.yaml +56 -56
- package/vona/pnpm-workspace.yaml +1 -1
- package/vona/src/suite/a-training/modules/training-record/src/bean/fileScene.dossierFile.ts +22 -0
- package/vona/src/suite/a-training/modules/training-record/src/bean/meta.version.ts +1 -0
- package/vona/src/suite/a-training/modules/training-record/src/config/locale/en-us.ts +1 -0
- package/vona/src/suite/a-training/modules/training-record/src/config/locale/zh-cn.ts +1 -0
- package/vona/src/suite/a-training/modules/training-record/src/dto/recordDossierFileView.ts +47 -0
- package/vona/src/suite/a-training/modules/training-record/src/dto/recordSelectResItem.tsx +13 -0
- package/vona/src/suite/a-training/modules/training-record/src/dto/recordView.tsx +13 -0
- package/vona/src/suite/a-training/modules/training-record/src/entity/record.tsx +16 -5
- package/vona/src/suite/a-training/modules/training-record/src/index.ts +2 -0
- package/vona/src/suite/a-training/modules/training-record/src/lib/index.ts +1 -0
- package/vona/src/suite/a-training/modules/training-record/src/lib/resolveDossierFiles.ts +34 -0
- package/vona/src/suite/a-training/modules/training-record/test/record.test.ts +209 -123
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +1 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +1 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/detailRecordBase.tsx +18 -1
- package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +0 -2
- package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +1 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/package.json +5 -3
- package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/bean.fileUploadPolicy.ts +28 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/controller/file.ts +8 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadPolicyRequest.ts +15 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadPolicyResponse.ts +30 -0
- package/vona/src/suite-vendor/a-file/package.json +2 -2
- package/vona/src/suite-vendor/a-image/modules/a-image/package.json +1 -1
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.imageUploadPolicy.ts +27 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/controller/image.ts +8 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadPolicyRequest.ts +15 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadPolicyResponse.ts +27 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/package.json +1 -1
- package/vona/src/suite-vendor/a-image/modules/image-native/src/controller/image.ts +1 -1
- package/vona/src/suite-vendor/a-image/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-core/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 +24 -9
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/bean.permission.ts +87 -73
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permissionActionByRoles.ts +27 -0
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permissionUser.ts +20 -0
- package/vona/src/suite-vendor/a-vona/modules/a-startup/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-startup/src/service/startup.ts +4 -3
- package/vona/src/suite-vendor/a-vona/modules/a-upload/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-upload/src/bean/interceptor.upload.ts +5 -1
- 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/.metadata/index.ts +0 -13
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/lib/passport.ts +0 -7
- package/vona/src/suite-vendor/a-vona/modules/a-version/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-version/src/bean/meta.version.ts +2 -24
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- 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/bean/beanBase.ts +9 -13
- package/zova/pnpm-lock.yaml +24 -9
- package/zova/src/suite/a-demo/modules/demo-basic/src/page/toolOne/controller.tsx +2 -2
- package/zova/src/suite/a-demo/modules/demo-todo/src/page/todo/controller.tsx +2 -2
- package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/controller.tsx +2 -2
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/controller.tsx +2 -2
- package/zova/src/suite/a-home/modules/home-login/src/page/login/controller.tsx +2 -2
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockDetails/controller.tsx +5 -1
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockTable/controller.tsx +20 -15
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/service/detail.tsx +6 -1
- package/zova/src/suite/cabloy-basic/modules/basic-file/cli/openapi.config.ts +9 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/package.json +58 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/component/formFieldFile.ts +31 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/index.ts +222 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/this.ts +2 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/file.ts +121 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/baseURL.ts +5 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/index.ts +3 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/schemas.ts +306 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/types.ts +5718 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/apiSchema/file.ts +40 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/bean/tableCell.file.tsx +187 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/component/formFieldFile/controller.tsx +534 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/config/locale/en-us.ts +15 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/config/locale/zh-cn.ts +15 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/index.ts +4 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/lib/file.ts +74 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/lib/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/model/file.ts +23 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/types/file.ts +12 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/types/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/tsconfig.build.json +13 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/tsconfig.json +5 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/.metadata/index.ts +61 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/image.ts +38 -1
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/imageNativeImage.ts +31 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/schemas.ts +52 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/types.ts +614 -1
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/apiSchema/image.ts +10 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/apiSchema/imageNativeImage.ts +13 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/component/formFieldImage/controller.tsx +126 -53
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/model/image.ts +23 -0
- package/zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockPage/controller.tsx +44 -4
- package/zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockTable/controller.tsx +17 -12
- package/zova/src/suite/cabloy-basic/modules/basic-pageentry/src/component/blockPageEntry/controller.tsx +2 -2
- package/zova/src/suite/cabloy-basic/modules/basic-resource/src/component/formFieldResourcePicker/controller.tsx +2 -2
- package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/table/controller.tsx +7 -2
- package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/table/render.tsx +34 -33
- package/zova/src/suite/cabloy-basic/package.json +1 -0
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/package.json +1 -1
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts +5 -3
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/entry/controller.tsx +2 -2
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/resource/controller.tsx +2 -2
- package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
- 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/lib/utils.ts +17 -17
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/model/sdk.ts +8 -3
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +4 -4
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permission.ts +0 -17
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/bean/guard.userName.ts +0 -35
- /package/vona/patches/{zova-core@5.1.76.patch → zova-core@5.1.77.patch} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.132",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "A vue3 framework with ioc",
|
|
6
6
|
"keywords": [
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"postpack": "clean-package restore"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"zova-core": "^5.1.
|
|
49
|
-
"zova-suite-a-zova": "^5.1.
|
|
48
|
+
"zova-core": "^5.1.77",
|
|
49
|
+
"zova-suite-a-zova": "^5.1.131"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"clean-package": "^2.2.0",
|
|
@@ -28,22 +28,18 @@ import type { AppEvent } from '../core/component/event.ts';
|
|
|
28
28
|
import type { ILoggerChildRecord, ILoggerClientRecord } from '../core/logger/types.ts';
|
|
29
29
|
import type { FunctionAsync } from '../decorator/type/functionable.ts';
|
|
30
30
|
import type { MapSources, MaybeUndefined } from '../vueExtra/watch.ts';
|
|
31
|
-
import type {
|
|
32
|
-
IErrorHandlerEventResult,
|
|
33
|
-
IModuleLocaleText,
|
|
34
|
-
IZovaComponentRecord,
|
|
35
|
-
} from './resource/index.ts';
|
|
31
|
+
import type { IErrorHandlerEventResult, IZovaComponentRecord } from './resource/index.ts';
|
|
36
32
|
|
|
37
33
|
import { cast } from '../types/utils/cast.ts';
|
|
38
34
|
import { BeanBaseSimple, SymbolModuleBelong } from './beanBaseSimple.ts';
|
|
39
35
|
import { SymbolErrorInstanceInfo } from './resource/index.ts';
|
|
40
36
|
|
|
41
|
-
const SymbolText = Symbol('SymbolText');
|
|
37
|
+
// const SymbolText = Symbol('SymbolText');
|
|
42
38
|
const SymbolLogger = Symbol('SymbolLogger');
|
|
43
39
|
const SymbolLoggerChildren = Symbol('SymbolLoggerChildren');
|
|
44
40
|
|
|
45
41
|
export class BeanBase extends BeanBaseSimple {
|
|
46
|
-
private [SymbolText]: IModuleLocaleText;
|
|
42
|
+
// private [SymbolText]: IModuleLocaleText;
|
|
47
43
|
private [SymbolLogger]: Record<keyof ILoggerClientRecord, Logger> = {} as any;
|
|
48
44
|
private [SymbolLoggerChildren]: Record<keyof ILoggerClientRecord, Record<string, Logger>> =
|
|
49
45
|
{} as any;
|
|
@@ -55,12 +51,12 @@ export class BeanBase extends BeanBaseSimple {
|
|
|
55
51
|
return this.ctx.meta.el;
|
|
56
52
|
}
|
|
57
53
|
|
|
58
|
-
protected get $text(): IModuleLocaleText {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
54
|
+
// protected get $text(): IModuleLocaleText {
|
|
55
|
+
// if (!this[SymbolText]) {
|
|
56
|
+
// this[SymbolText] = this.app.meta.locale.createLocaleText(this[SymbolModuleBelong]);
|
|
57
|
+
// }
|
|
58
|
+
// return this[SymbolText];
|
|
59
|
+
// }
|
|
64
60
|
|
|
65
61
|
protected get $logger() {
|
|
66
62
|
return this.$loggerClient('default');
|
package/zova/pnpm-lock.yaml
CHANGED
|
@@ -133,7 +133,7 @@ importers:
|
|
|
133
133
|
specifier: workspace:^
|
|
134
134
|
version: link:packages-zova/zova
|
|
135
135
|
zova-jsx:
|
|
136
|
-
specifier: ^1.1.
|
|
136
|
+
specifier: ^1.1.77
|
|
137
137
|
version: link:packages-utils/zova-jsx
|
|
138
138
|
zova-module-a-api:
|
|
139
139
|
specifier: workspace:^
|
|
@@ -234,6 +234,9 @@ importers:
|
|
|
234
234
|
zova-module-basic-details:
|
|
235
235
|
specifier: workspace:^
|
|
236
236
|
version: link:src/suite/cabloy-basic/modules/basic-details
|
|
237
|
+
zova-module-basic-file:
|
|
238
|
+
specifier: workspace:^
|
|
239
|
+
version: link:src/suite/cabloy-basic/modules/basic-file
|
|
237
240
|
zova-module-basic-form:
|
|
238
241
|
specifier: workspace:^
|
|
239
242
|
version: link:src/suite/cabloy-basic/modules/basic-form
|
|
@@ -675,7 +678,7 @@ importers:
|
|
|
675
678
|
specifier: ^3.5.38
|
|
676
679
|
version: 3.5.38(typescript@5.9.3)
|
|
677
680
|
zova-core:
|
|
678
|
-
specifier: ^5.1.
|
|
681
|
+
specifier: ^5.1.77
|
|
679
682
|
version: link:../../packages-zova/zova-core
|
|
680
683
|
devDependencies:
|
|
681
684
|
clean-package:
|
|
@@ -816,10 +819,10 @@ importers:
|
|
|
816
819
|
packages-zova/zova:
|
|
817
820
|
dependencies:
|
|
818
821
|
zova-core:
|
|
819
|
-
specifier: ^5.1.
|
|
822
|
+
specifier: ^5.1.77
|
|
820
823
|
version: link:../zova-core
|
|
821
824
|
zova-suite-a-zova:
|
|
822
|
-
specifier: ^5.1.
|
|
825
|
+
specifier: ^5.1.131
|
|
823
826
|
version: link:../../src/suite-vendor/a-zova
|
|
824
827
|
devDependencies:
|
|
825
828
|
clean-package:
|
|
@@ -917,7 +920,7 @@ importers:
|
|
|
917
920
|
src/suite-vendor/a-cabloy:
|
|
918
921
|
dependencies:
|
|
919
922
|
zova-module-rest-resource:
|
|
920
|
-
specifier: ^5.1.
|
|
923
|
+
specifier: ^5.1.41
|
|
921
924
|
version: link:modules/rest-resource
|
|
922
925
|
|
|
923
926
|
src/suite-vendor/a-cabloy/modules/rest-resource:
|
|
@@ -971,10 +974,10 @@ importers:
|
|
|
971
974
|
specifier: ^5.1.21
|
|
972
975
|
version: link:modules/a-meta
|
|
973
976
|
zova-module-a-model:
|
|
974
|
-
specifier: ^5.1.
|
|
977
|
+
specifier: ^5.1.31
|
|
975
978
|
version: link:modules/a-model
|
|
976
979
|
zova-module-a-openapi:
|
|
977
|
-
specifier: ^5.1.
|
|
980
|
+
specifier: ^5.1.43
|
|
978
981
|
version: link:modules/a-openapi
|
|
979
982
|
zova-module-a-router:
|
|
980
983
|
specifier: ^5.1.29
|
|
@@ -1004,7 +1007,7 @@ importers:
|
|
|
1004
1007
|
specifier: ^5.1.36
|
|
1005
1008
|
version: link:modules/a-zod
|
|
1006
1009
|
zova-module-a-zova:
|
|
1007
|
-
specifier: ^5.1.
|
|
1010
|
+
specifier: ^5.1.92
|
|
1008
1011
|
version: link:modules/a-zova
|
|
1009
1012
|
|
|
1010
1013
|
src/suite-vendor/a-zova/modules/a-api:
|
|
@@ -1343,7 +1346,7 @@ importers:
|
|
|
1343
1346
|
specifier: ^3.7.2
|
|
1344
1347
|
version: 3.7.2
|
|
1345
1348
|
zova-jsx:
|
|
1346
|
-
specifier: ^1.1.
|
|
1349
|
+
specifier: ^1.1.77
|
|
1347
1350
|
version: link:../../../../../packages-utils/zova-jsx
|
|
1348
1351
|
devDependencies:
|
|
1349
1352
|
'@cabloy/cli':
|
|
@@ -1583,6 +1586,9 @@ importers:
|
|
|
1583
1586
|
zova-module-basic-details:
|
|
1584
1587
|
specifier: ^5.0.0
|
|
1585
1588
|
version: link:modules/basic-details
|
|
1589
|
+
zova-module-basic-file:
|
|
1590
|
+
specifier: ^5.0.0
|
|
1591
|
+
version: link:modules/basic-file
|
|
1586
1592
|
zova-module-basic-form:
|
|
1587
1593
|
specifier: ^5.0.7
|
|
1588
1594
|
version: link:modules/basic-form
|
|
@@ -1690,6 +1696,15 @@ importers:
|
|
|
1690
1696
|
specifier: ^6.1.3
|
|
1691
1697
|
version: 6.1.3
|
|
1692
1698
|
|
|
1699
|
+
src/suite/cabloy-basic/modules/basic-file:
|
|
1700
|
+
devDependencies:
|
|
1701
|
+
clean-package:
|
|
1702
|
+
specifier: ^2.2.0
|
|
1703
|
+
version: 2.2.0
|
|
1704
|
+
rimraf:
|
|
1705
|
+
specifier: ^6.1.3
|
|
1706
|
+
version: 6.1.3
|
|
1707
|
+
|
|
1693
1708
|
src/suite/cabloy-basic/modules/basic-form:
|
|
1694
1709
|
devDependencies:
|
|
1695
1710
|
clean-package:
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
ControllerForm,
|
|
8
8
|
TypeFormOnSubmitData,
|
|
9
9
|
} from 'zova-module-a-form';
|
|
10
|
-
import { $
|
|
10
|
+
import { $QueryEnsureLoaded } from 'zova-module-a-model';
|
|
11
11
|
import { IFormMeta } from 'zova-module-a-openapi';
|
|
12
12
|
import { ApiSchemaTestSsrDtoTestBodyPartial } from 'zova-module-home-api';
|
|
13
13
|
|
|
@@ -36,7 +36,7 @@ export class ControllerPageToolOne extends BeanControllerPageFormBase {
|
|
|
36
36
|
|
|
37
37
|
protected async __init__() {
|
|
38
38
|
const apiSchemas = this.$apiSchema.testSsrToolOne.test();
|
|
39
|
-
const querySdk = await $
|
|
39
|
+
const querySdk = await $QueryEnsureLoaded(() => apiSchemas.sdk);
|
|
40
40
|
this.schemaUpdate = this.$computed(() => {
|
|
41
41
|
const schema = apiSchemas.requestBody;
|
|
42
42
|
// eslint-disable-next-line
|
|
@@ -2,7 +2,7 @@ import { RouterLink } from '@cabloy/vue-router';
|
|
|
2
2
|
import { withModifiers } from 'vue';
|
|
3
3
|
import { BeanControllerPageBase, Use, uuid } from 'zova';
|
|
4
4
|
import { Controller } from 'zova-module-a-bean';
|
|
5
|
-
import { $
|
|
5
|
+
import { $QueryEnsureLoaded } from 'zova-module-a-model';
|
|
6
6
|
import { ZPage } from 'zova-module-home-base';
|
|
7
7
|
|
|
8
8
|
import type { ApiTodoEntity } from '../../api/todo.js';
|
|
@@ -18,7 +18,7 @@ export class ControllerPageTodo extends BeanControllerPageBase {
|
|
|
18
18
|
currentTodoId?: string;
|
|
19
19
|
|
|
20
20
|
protected async __init__() {
|
|
21
|
-
await $
|
|
21
|
+
await $QueryEnsureLoaded(() => this.queryTodos);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
get queryTodos() {
|
package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/controller.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import type { ModelTabs, ModelTabsOptions } from 'zova-module-a-routertabs';
|
|
|
2
2
|
|
|
3
3
|
import { BeanControllerBase, Use } from 'zova';
|
|
4
4
|
import { Controller } from 'zova-module-a-bean';
|
|
5
|
-
import { $
|
|
5
|
+
import { $QueryEnsureLoaded } from 'zova-module-a-model';
|
|
6
6
|
import { IServiceSsrLayoutOptions, ServiceLocale, ServiceSsrLayout } from 'zova-module-home-base';
|
|
7
7
|
|
|
8
8
|
import { ModelLayout } from '../../model/layout.js';
|
|
@@ -67,7 +67,7 @@ export class ControllerLayoutAdmin extends BeanControllerBase {
|
|
|
67
67
|
await this.$passport.ensurePassport();
|
|
68
68
|
}
|
|
69
69
|
// menu
|
|
70
|
-
await $
|
|
70
|
+
await $QueryEnsureLoaded(() => this.$$modelMenu.retrieveMenus());
|
|
71
71
|
// tabs
|
|
72
72
|
await this._initTabs();
|
|
73
73
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BeanControllerBase, Use, UseScope } from 'zova';
|
|
2
2
|
import { Controller } from 'zova-module-a-bean';
|
|
3
|
-
import { $
|
|
3
|
+
import { $QueryEnsureLoaded } from 'zova-module-a-model';
|
|
4
4
|
import { ModelTabs, ModelTabsOptions, RouteTabInitial } from 'zova-module-a-routertabs';
|
|
5
5
|
import { ScopeModuleASsr } from 'zova-module-a-ssr';
|
|
6
6
|
import { IServiceSsrLayoutOptions, ServiceLocale, ServiceSsrLayout } from 'zova-module-home-base';
|
|
@@ -65,7 +65,7 @@ export class ControllerLayoutWeb extends BeanControllerBase {
|
|
|
65
65
|
};
|
|
66
66
|
});
|
|
67
67
|
// menu
|
|
68
|
-
await $
|
|
68
|
+
await $QueryEnsureLoaded(() => this.$$modelMenu.retrieveMenus());
|
|
69
69
|
// tabs
|
|
70
70
|
await this._initTabs();
|
|
71
71
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BeanControllerPageBase } from 'zova';
|
|
2
2
|
import { Controller } from 'zova-module-a-bean';
|
|
3
3
|
import { TypeFormOnSubmitData } from 'zova-module-a-form';
|
|
4
|
-
import { $
|
|
4
|
+
import { $QueryEnsureLoaded } from 'zova-module-a-model';
|
|
5
5
|
import { ApiApiHomeUserPassportloginRequestBody } from 'zova-module-home-api';
|
|
6
6
|
|
|
7
7
|
@Controller()
|
|
@@ -20,7 +20,7 @@ export class ControllerPageLogin extends BeanControllerPageBase {
|
|
|
20
20
|
this.user.username = 'admin';
|
|
21
21
|
this.user.password = '123456';
|
|
22
22
|
}
|
|
23
|
-
await $
|
|
23
|
+
await $QueryEnsureLoaded(() => this.$passport.apiSchemasLogin.sdk);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
get schema() {
|
package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockDetails/controller.tsx
CHANGED
|
@@ -35,7 +35,7 @@ export class ControllerBlockDetails<TData extends {} = {}> extends BeanControlle
|
|
|
35
35
|
static $propsDefault = {};
|
|
36
36
|
static $componentOptions: IComponentOptions = { inheritAttrs: false, deepExtendDefault: true };
|
|
37
37
|
|
|
38
|
-
tableRef: BeanControllerTableBase<TData
|
|
38
|
+
tableRef: BeanControllerTableBase<TData> | undefined;
|
|
39
39
|
|
|
40
40
|
jsxZova: ZovaJsx;
|
|
41
41
|
jsxCelScope: IDetailsScope;
|
|
@@ -70,6 +70,10 @@ export class ControllerBlockDetails<TData extends {} = {}> extends BeanControlle
|
|
|
70
70
|
return this.$props.schemaForm!;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
public async setTableRef(tableRef: BeanControllerTableBase<TData> | undefined) {
|
|
74
|
+
this.tableRef = tableRef;
|
|
75
|
+
}
|
|
76
|
+
|
|
73
77
|
private _prepareJsx() {
|
|
74
78
|
const jsxCelEnv = celEnvBase.clone();
|
|
75
79
|
this.jsxZova = this.bean._newBeanSimple(ZovaJsx, false, undefined, jsxCelEnv);
|
package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockTable/controller.tsx
CHANGED
|
@@ -3,7 +3,8 @@ import type { IResourceBlockOptionsBase, IJsxRenderContextDetails } from 'zova-m
|
|
|
3
3
|
|
|
4
4
|
import { BeanControllerBase, Use } from 'zova';
|
|
5
5
|
import { Controller } from 'zova-module-a-bean';
|
|
6
|
-
import { BeanControllerTableBase
|
|
6
|
+
import { BeanControllerTableBase } from 'zova-module-a-table';
|
|
7
|
+
import { ZTable } from 'zova-module-basic-table';
|
|
7
8
|
|
|
8
9
|
declare module 'zova-module-a-openapi' {
|
|
9
10
|
export interface IResourceBlockRecord {
|
|
@@ -15,7 +16,10 @@ export interface ControllerBlockTableProps extends IResourceBlockOptionsBase {}
|
|
|
15
16
|
|
|
16
17
|
@Controller()
|
|
17
18
|
export class ControllerBlockTable<TData extends {} = {}> extends BeanControllerBase {
|
|
18
|
-
static $propsDefault = {
|
|
19
|
+
static $propsDefault = {
|
|
20
|
+
class: 'overflow-x-auto rounded-box border border-base-content/15 bg-base-100',
|
|
21
|
+
};
|
|
22
|
+
|
|
19
23
|
static $componentOptions: IComponentOptions = { inheritAttrs: false, deepExtendDefault: true };
|
|
20
24
|
|
|
21
25
|
tableRef: BeanControllerTableBase<TData>;
|
|
@@ -31,19 +35,20 @@ export class ControllerBlockTable<TData extends {} = {}> extends BeanControllerB
|
|
|
31
35
|
item => (item as Record<string, any>).deleted !== true,
|
|
32
36
|
);
|
|
33
37
|
return (
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
<div class={this.$props.class}>
|
|
39
|
+
<ZTable<TData>
|
|
40
|
+
tableRef={ref => {
|
|
41
|
+
this.tableRef = ref;
|
|
42
|
+
$$details.setTableRef(ref as unknown as BeanControllerTableBase<{}>);
|
|
43
|
+
}}
|
|
44
|
+
data={data}
|
|
45
|
+
schema={$$details.schemaRow}
|
|
46
|
+
tableScope={$$details.jsxCelScope}
|
|
47
|
+
getRowId={(_originalRow: TData, index: number) => {
|
|
48
|
+
return String(index);
|
|
49
|
+
}}
|
|
50
|
+
></ZTable>
|
|
51
|
+
</div>
|
|
47
52
|
);
|
|
48
53
|
}
|
|
49
54
|
}
|
|
@@ -143,7 +143,12 @@ export class ServiceDetail<TData extends {} = {}> extends BeanBase {
|
|
|
143
143
|
data: TypeFormOnSubmitData<TData>,
|
|
144
144
|
) {
|
|
145
145
|
const renderProvider = property.rest?.render;
|
|
146
|
-
if (
|
|
146
|
+
if (
|
|
147
|
+
renderProvider !== 'basic-image:formFieldImage' &&
|
|
148
|
+
renderProvider !== 'basic-file:formFieldFile'
|
|
149
|
+
) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
147
152
|
const relationName = this._getRelationNameOfField(property, property.rest);
|
|
148
153
|
if (!relationName) return;
|
|
149
154
|
const relationValue = data.formApi.getFieldValue(relationName as never);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "zova-module-basic-file",
|
|
3
|
+
"version": "5.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Zova Module"
|
|
7
|
+
],
|
|
8
|
+
"author": "",
|
|
9
|
+
"files": [
|
|
10
|
+
"mock",
|
|
11
|
+
"dist",
|
|
12
|
+
"src",
|
|
13
|
+
"icons",
|
|
14
|
+
"assets",
|
|
15
|
+
"cli"
|
|
16
|
+
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": [
|
|
21
|
+
"./src/index.ts",
|
|
22
|
+
"./dist/index.d.ts"
|
|
23
|
+
],
|
|
24
|
+
"import": "./src/index.ts",
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./*": "./*"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"clean": "rimraf dist tsconfig.build.tsbuildinfo",
|
|
31
|
+
"tsc:publish": "npm run clean && node ../../../../../packages-cli/cli/src/bin/zova.ts :bin:buildModule --sourcemap && tsc -p tsconfig.build.json",
|
|
32
|
+
"prepublishOnly": "npm run tsc:publish",
|
|
33
|
+
"prepack": "clean-package",
|
|
34
|
+
"postpack": "clean-package restore"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"clean-package": "^2.2.0",
|
|
39
|
+
"rimraf": "^6.1.3"
|
|
40
|
+
},
|
|
41
|
+
"clean-package": {
|
|
42
|
+
"indent": 2,
|
|
43
|
+
"replace": {
|
|
44
|
+
"exports.\\..types": "./dist/index.d.ts"
|
|
45
|
+
},
|
|
46
|
+
"remove": [
|
|
47
|
+
"clean-package",
|
|
48
|
+
"devDependencies",
|
|
49
|
+
"exports.\\..import"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"title": "basic-file",
|
|
53
|
+
"zovaModule": {
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"basic-app": "5.0.0"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/component/formFieldFile.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TypeControllerInnerProps } from 'zova';
|
|
2
|
+
|
|
3
|
+
import { defineComponent } from 'vue';
|
|
4
|
+
import { prepareComponentOptions, useController } from 'zova';
|
|
5
|
+
|
|
6
|
+
import type { ControllerFormFieldFileProps } from '../../component/formFieldFile/controller.jsx';
|
|
7
|
+
|
|
8
|
+
import { ControllerFormFieldFile } from '../../component/formFieldFile/controller.jsx';
|
|
9
|
+
export type ZFormFieldFileProps = {
|
|
10
|
+
controllerRef?: (ref: ControllerFormFieldFile) => void;
|
|
11
|
+
} & ControllerFormFieldFileProps;
|
|
12
|
+
|
|
13
|
+
type ControllerInnerProps = TypeControllerInnerProps<
|
|
14
|
+
ControllerFormFieldFileProps,
|
|
15
|
+
keyof typeof ControllerFormFieldFile.$propsDefault
|
|
16
|
+
>;
|
|
17
|
+
declare module 'zova-module-basic-file' {
|
|
18
|
+
export interface ControllerFormFieldFile {
|
|
19
|
+
$props: ControllerInnerProps;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const ZFormFieldFile = defineComponent((_props: ZFormFieldFileProps) => {
|
|
24
|
+
useController(ControllerFormFieldFile, undefined, undefined);
|
|
25
|
+
return () => {};
|
|
26
|
+
}, prepareComponentOptions(ControllerFormFieldFile.$componentOptions));
|
|
27
|
+
declare module 'zova-module-a-bean' {
|
|
28
|
+
export interface IVonaComponentRecord {
|
|
29
|
+
'basic-file:formFieldFile': ControllerFormFieldFileProps;
|
|
30
|
+
}
|
|
31
|
+
}
|