cabloy 5.1.98 → 5.1.99
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 +21 -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 +4 -4
- 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 +29 -14
- 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
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
IMetaVersionInit,
|
|
3
|
-
IMetaVersionInitOptions,
|
|
4
|
-
IMetaVersionUpdate,
|
|
5
|
-
IMetaVersionUpdateOptions,
|
|
6
|
-
} from 'vona-module-a-version';
|
|
1
|
+
import type { IMetaVersionUpdate, IMetaVersionUpdateOptions } from 'vona-module-a-version';
|
|
7
2
|
|
|
8
|
-
import fse from 'fs-extra';
|
|
9
3
|
import { BeanBase } from 'vona';
|
|
10
4
|
import { Meta } from 'vona-module-a-meta';
|
|
11
5
|
|
|
12
6
|
@Meta()
|
|
13
|
-
export class MetaVersion extends BeanBase implements IMetaVersionUpdate
|
|
7
|
+
export class MetaVersion extends BeanBase implements IMetaVersionUpdate {
|
|
14
8
|
async update(options: IMetaVersionUpdateOptions) {
|
|
15
9
|
if (options.version === 1) {
|
|
16
10
|
const entity = this.scope.entity.versionInit;
|
|
@@ -28,20 +22,4 @@ export class MetaVersion extends BeanBase implements IMetaVersionUpdate, IMetaVe
|
|
|
28
22
|
});
|
|
29
23
|
}
|
|
30
24
|
}
|
|
31
|
-
|
|
32
|
-
async init(options: IMetaVersionInitOptions): Promise<void> {
|
|
33
|
-
if (options.version === 1) {
|
|
34
|
-
// remove publicDir
|
|
35
|
-
await this._removePublicDir();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
async _removePublicDir() {
|
|
40
|
-
// only for test/dev env
|
|
41
|
-
if (this.app.meta.isProd) return;
|
|
42
|
-
// path
|
|
43
|
-
const publicPath = await this.app.util.getPublicPathPhysical();
|
|
44
|
-
// remove
|
|
45
|
-
await fse.remove(publicPath);
|
|
46
|
-
}
|
|
47
25
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-jsx",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.77",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "Zova JSX",
|
|
6
6
|
"keywords": [
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@cabloy/word-utils": "^2.1.14",
|
|
51
51
|
"typestyle": "^2.4.0",
|
|
52
52
|
"vue": "^3.5.38",
|
|
53
|
-
"zova-core": "^5.1.
|
|
53
|
+
"zova-core": "^5.1.77"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"clean-package": "^2.2.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
|
@@ -74,7 +74,7 @@ importers:
|
|
|
74
74
|
version: 10.5.2(postcss@8.5.15)
|
|
75
75
|
axios:
|
|
76
76
|
specifier: ^1.16.1
|
|
77
|
-
version: 1.18.1
|
|
77
|
+
version: 1.18.1(supports-color@10.2.2)
|
|
78
78
|
compression:
|
|
79
79
|
specifier: ^1.8.1
|
|
80
80
|
version: 1.8.1
|
|
@@ -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
|
|
@@ -312,7 +315,7 @@ importers:
|
|
|
312
315
|
devDependencies:
|
|
313
316
|
'@cabloy/cli':
|
|
314
317
|
specifier: ^3.1.28
|
|
315
|
-
version: 3.1.28(vue@3.5.38(typescript@5.9.3))
|
|
318
|
+
version: 3.1.28(supports-color@10.2.2)(vue@3.5.38(typescript@5.9.3))
|
|
316
319
|
'@cabloy/lint':
|
|
317
320
|
specifier: ^5.1.27
|
|
318
321
|
version: 5.1.30(@typescript-eslint/eslint-plugin@8.62.1(@typescript-eslint/parser@8.62.1(eslint@10.6.0(jiti@2.7.0))(typescript@5.9.3))(eslint@10.6.0(jiti@2.7.0))(typescript@5.9.3))(@typescript-eslint/rule-tester@8.62.1(eslint@10.6.0(jiti@2.7.0))(typescript@5.9.3))(@typescript-eslint/typescript-estree@8.62.1(typescript@5.9.3))(@typescript-eslint/utils@8.62.1(eslint@10.6.0(jiti@2.7.0))(typescript@5.9.3))(eslint@10.6.0(jiti@2.7.0))(oxfmt@0.45.0)(oxlint@1.72.0)(supports-color@10.2.2)(typescript@5.9.3)(vue-eslint-parser@10.4.1(eslint@10.6.0(jiti@2.7.0)))
|
|
@@ -387,7 +390,7 @@ importers:
|
|
|
387
390
|
dependencies:
|
|
388
391
|
'@cabloy/cli':
|
|
389
392
|
specifier: ^3.1.28
|
|
390
|
-
version: 3.1.28(vue@3.5.38(typescript@5.9.3))
|
|
393
|
+
version: 3.1.28(supports-color@10.2.2)(vue@3.5.38(typescript@5.9.3))
|
|
391
394
|
'@cabloy/process-helper':
|
|
392
395
|
specifier: ^3.1.8
|
|
393
396
|
version: 3.1.8
|
|
@@ -421,7 +424,7 @@ importers:
|
|
|
421
424
|
version: 7.29.7(@babel/core@7.29.7)
|
|
422
425
|
'@cabloy/cli':
|
|
423
426
|
specifier: ^3.1.28
|
|
424
|
-
version: 3.1.28(vue@3.5.38(typescript@5.9.3))
|
|
427
|
+
version: 3.1.28(supports-color@10.2.2)(vue@3.5.38(typescript@5.9.3))
|
|
425
428
|
'@cabloy/extend':
|
|
426
429
|
specifier: ^3.2.8
|
|
427
430
|
version: 3.2.8
|
|
@@ -1078,7 +1081,7 @@ importers:
|
|
|
1078
1081
|
dependencies:
|
|
1079
1082
|
axios:
|
|
1080
1083
|
specifier: ^1.16.1
|
|
1081
|
-
version: 1.18.1
|
|
1084
|
+
version: 1.18.1(supports-color@10.2.2)
|
|
1082
1085
|
devDependencies:
|
|
1083
1086
|
clean-package:
|
|
1084
1087
|
specifier: ^2.2.0
|
|
@@ -1348,7 +1351,7 @@ importers:
|
|
|
1348
1351
|
devDependencies:
|
|
1349
1352
|
'@cabloy/cli':
|
|
1350
1353
|
specifier: ^3.1.28
|
|
1351
|
-
version: 3.1.28(vue@3.5.38(typescript@5.9.3))
|
|
1354
|
+
version: 3.1.28(supports-color@10.2.2)(vue@3.5.38(typescript@5.9.3))
|
|
1352
1355
|
'@types/luxon':
|
|
1353
1356
|
specifier: ^3.7.1
|
|
1354
1357
|
version: 3.7.2
|
|
@@ -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:
|
|
@@ -8222,7 +8237,7 @@ snapshots:
|
|
|
8222
8237
|
|
|
8223
8238
|
'@bufbuild/protobuf@2.12.1': {}
|
|
8224
8239
|
|
|
8225
|
-
'@cabloy/cli@3.1.28(vue@3.5.38(typescript@5.9.3))':
|
|
8240
|
+
'@cabloy/cli@3.1.28(supports-color@10.2.2)(vue@3.5.38(typescript@5.9.3))':
|
|
8226
8241
|
dependencies:
|
|
8227
8242
|
'@babel/parser': 7.29.7
|
|
8228
8243
|
'@cabloy/module-glob': 5.3.17
|
|
@@ -8231,7 +8246,7 @@ snapshots:
|
|
|
8231
8246
|
'@cabloy/utils': 2.1.26
|
|
8232
8247
|
'@cabloy/word-utils': link:packages-utils/word-utils
|
|
8233
8248
|
'@npmcli/config': 10.11.0
|
|
8234
|
-
'@zhennann/common-bin': 4.0.1
|
|
8249
|
+
'@zhennann/common-bin': 4.0.1(supports-color@10.2.2)
|
|
8235
8250
|
'@zhennann/ejs': 3.0.1
|
|
8236
8251
|
boxen: 4.2.0
|
|
8237
8252
|
chalk: 3.0.0
|
|
@@ -10257,7 +10272,7 @@ snapshots:
|
|
|
10257
10272
|
|
|
10258
10273
|
'@vue/shared@3.5.13': {}
|
|
10259
10274
|
|
|
10260
|
-
'@zhennann/common-bin@4.0.1':
|
|
10275
|
+
'@zhennann/common-bin@4.0.1(supports-color@10.2.2)':
|
|
10261
10276
|
dependencies:
|
|
10262
10277
|
chalk: 4.1.2
|
|
10263
10278
|
change-case: 4.1.2
|
|
@@ -10291,7 +10306,7 @@ snapshots:
|
|
|
10291
10306
|
|
|
10292
10307
|
acorn@8.17.0: {}
|
|
10293
10308
|
|
|
10294
|
-
agent-base@6.0.2:
|
|
10309
|
+
agent-base@6.0.2(supports-color@10.2.2):
|
|
10295
10310
|
dependencies:
|
|
10296
10311
|
debug: 4.4.3(supports-color@10.2.2)
|
|
10297
10312
|
transitivePeerDependencies:
|
|
@@ -10403,11 +10418,11 @@ snapshots:
|
|
|
10403
10418
|
dependencies:
|
|
10404
10419
|
possible-typed-array-names: 1.1.0
|
|
10405
10420
|
|
|
10406
|
-
axios@1.18.1:
|
|
10421
|
+
axios@1.18.1(supports-color@10.2.2):
|
|
10407
10422
|
dependencies:
|
|
10408
10423
|
follow-redirects: 1.16.0
|
|
10409
10424
|
form-data: 4.0.6
|
|
10410
|
-
https-proxy-agent: 5.0.1
|
|
10425
|
+
https-proxy-agent: 5.0.1(supports-color@10.2.2)
|
|
10411
10426
|
proxy-from-env: 2.1.0
|
|
10412
10427
|
transitivePeerDependencies:
|
|
10413
10428
|
- debug
|
|
@@ -11829,9 +11844,9 @@ snapshots:
|
|
|
11829
11844
|
statuses: 2.0.2
|
|
11830
11845
|
toidentifier: 1.0.1
|
|
11831
11846
|
|
|
11832
|
-
https-proxy-agent@5.0.1:
|
|
11847
|
+
https-proxy-agent@5.0.1(supports-color@10.2.2):
|
|
11833
11848
|
dependencies:
|
|
11834
|
-
agent-base: 6.0.2
|
|
11849
|
+
agent-base: 6.0.2(supports-color@10.2.2)
|
|
11835
11850
|
debug: 4.4.3(supports-color@10.2.2)
|
|
11836
11851
|
transitivePeerDependencies:
|
|
11837
11852
|
- supports-color
|
|
@@ -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
|
+
}
|