cabloy 5.1.97 → 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 +48 -0
- package/CLAUDE.md +2 -0
- package/cabloy-docs/.vitepress/config.mjs +11 -0
- package/cabloy-docs/backend/controller-aop-guide.md +0 -1
- package/cabloy-docs/backend/image-guide.md +544 -0
- 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/image-guide.md +512 -0
- package/cabloy-docs/frontend/introduction.md +2 -0
- package/cabloy-docs/frontend/ioc-and-beans.md +34 -3
- package/cabloy-docs/frontend/model-architecture.md +2 -0
- package/cabloy-docs/frontend/model-resource-owner-pattern.md +3 -1
- package/cabloy-docs/frontend/model-state-guide.md +5 -1
- package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +10 -8
- 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/server-data.md +2 -0
- package/cabloy-docs/frontend/state-architecture-for-vue-developers.md +218 -0
- package/cabloy-docs/frontend/system-startup-guide.md +2 -0
- package/cabloy-docs/frontend/use-state-data-best-practices.md +384 -0
- package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +11 -10
- package/cabloy-docs/fullstack/image-workflow.md +403 -0
- package/cabloy-docs/fullstack/introduction.md +1 -0
- package/package.json +1 -1
- package/scripts/upgrade.ts +2 -0
- package/vona/package.original.json +0 -1
- 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 +424 -47
- 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/cabloy-basic/modules/basic-siteadmin/src/bean/ssrSite.admin.ts +4 -0
- package/vona/src/suite/cabloy-basic/modules/basic-siteweb/src/bean/ssrSite.web.ts +4 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/cli/ssrSite/boilerplate/{{sceneName}}.{{beanName}}.ts_ +3 -0
- 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/service/ssrHandler.ts +11 -2
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/types/ssrSite.ts +6 -0
- package/vona/src/suite-vendor/a-cabloy/package.json +1 -1
- package/vona/src/suite-vendor/a-file/modules/a-file/cli/fileProvider/boilerplate/{{sceneName}}.{{beanName}}.ts_ +23 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/cli/fileScene/boilerplate/{{sceneName}}.{{beanName}}.ts_ +5 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/package.json +68 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/.metadata/index.ts +425 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/.metadata/locales.ts +18 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/.metadata/this.ts +2 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/bean.file.ts +322 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/bean.fileProvider.ts +62 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/bean.fileUploadPolicy.ts +224 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/meta.redlock.ts +11 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/meta.version.ts +38 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/config/config.ts +16 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/config/locale/en-us.ts +1 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/config/locale/zh-cn.ts +1 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/controller/file.ts +175 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileDirectUploadRequest.ts +33 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileDirectUploadResponse.ts +41 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileDownloadRequest.ts +12 -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/modules/a-file/src/dto/fileUploadResponse.ts +59 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadTokenRequest.ts +24 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadTokenResponse.ts +16 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadUrlRequest.ts +33 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/entity/file.ts +55 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/entity/fileProvider.ts +24 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/index.ts +4 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/lib/fileProvider.ts +7 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/lib/fileScene.ts +7 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/lib/fileUploadValidation.ts +15 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/lib/index.ts +3 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/model/file.ts +10 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/model/fileProvider.ts +10 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/types/file.ts +144 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/types/fileProvider.ts +111 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/types/fileScene.ts +53 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/types/index.ts +3 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/tsconfig.build.json +11 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/tsconfig.json +7 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/package.json +53 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/.metadata/index.ts +104 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/.metadata/this.ts +2 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/bean/fileProvider.cloudflare.ts +123 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/index.ts +1 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/service/fileCloudflare.ts +245 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/tsconfig.build.json +11 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/tsconfig.json +7 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/package.json +50 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/src/.metadata/index.ts +111 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/src/.metadata/this.ts +2 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/src/bean/fileProvider.native.ts +125 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/src/config/config.ts +7 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/src/index.ts +1 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/src/service/fileNative.ts +125 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/tsconfig.build.json +11 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/tsconfig.json +7 -0
- package/vona/src/suite-vendor/a-file/package.json +14 -0
- package/vona/src/suite-vendor/a-file/tsconfig.base.json +4 -0
- package/vona/src/suite-vendor/a-file/tsconfig.json +16 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/package.json +4 -1
- package/vona/src/suite-vendor/a-image/modules/a-image/src/.metadata/index.ts +61 -3
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.image.ts +336 -152
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.imageProvider.ts +21 -14
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.imageUploadPolicy.ts +86 -11
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/meta.index.ts +12 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/meta.redlock.ts +1 -1
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/meta.version.ts +3 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/schedule.imageDraftPrune.ts +29 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/config/config.ts +3 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/controller/image.ts +32 -54
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageDirectUploadFinalizeRequest.ts +13 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageDirectUploadFinalizeResponse.ts +10 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageDirectUploadResponse.ts +10 -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/a-image/src/dto/imageUploadResponse.ts +10 -1
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageView.ts +10 -1
- package/vona/src/suite-vendor/a-image/modules/a-image/src/entity/image.ts +10 -1
- package/vona/src/suite-vendor/a-image/modules/a-image/src/lib/imageUploadValidation.ts +15 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/lib/index.ts +1 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/types/image.ts +18 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/types/imageProvider.ts +28 -2
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/package.json +1 -1
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/src/bean/imageProvider.cloudflare.ts +13 -1
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/src/service/imageCloudflare.ts +26 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/package.json +6 -2
- package/vona/src/suite-vendor/a-image/modules/image-native/src/.metadata/index.ts +37 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/src/bean/imageProvider.native.ts +21 -1
- package/vona/src/suite-vendor/a-image/modules/image-native/src/controller/image.ts +57 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/src/service/imageNative.ts +142 -34
- 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-orm/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/entity.ts +2 -4
- package/vona/src/suite-vendor/a-vona/modules/a-ormutils/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-ormutils/src/lib/columns.ts +7 -3
- 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 +418 -411
- 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 -62
- 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
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
// eslint-disable
|
|
2
|
+
/** model: begin */
|
|
3
|
+
export * from '../model/file.js';
|
|
4
|
+
import { IModelOptionsFile } from '../model/file.js';
|
|
5
|
+
import 'zova-module-a-model';
|
|
6
|
+
declare module 'zova-module-a-model' {
|
|
7
|
+
export interface IModelRecord {
|
|
8
|
+
'basic-file:file': IModelOptionsFile;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
declare module 'zova-module-basic-file' {
|
|
12
|
+
export interface ModelFile {
|
|
13
|
+
/** @internal */
|
|
14
|
+
get scope(): ScopeModuleBasicFile;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ModelFile {
|
|
18
|
+
get $beanFullName(): 'basic-file.model.file';
|
|
19
|
+
get $onionName(): 'basic-file:file';
|
|
20
|
+
get $onionOptions(): IModelOptionsFile;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** model: end */
|
|
24
|
+
/** model: begin */
|
|
25
|
+
import { ModelFile } from '../model/file.js';
|
|
26
|
+
import 'zova';
|
|
27
|
+
declare module 'zova' {
|
|
28
|
+
export interface IBeanRecordGeneral {
|
|
29
|
+
'basic-file.model.file': ModelFile;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** model: end */
|
|
33
|
+
/** api: begin */
|
|
34
|
+
export * from '../api/file.js';
|
|
35
|
+
|
|
36
|
+
import 'zova';
|
|
37
|
+
declare module 'zova' {
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
declare module 'zova-module-basic-file' {
|
|
42
|
+
|
|
43
|
+
export interface ApiFile {
|
|
44
|
+
/** @internal */
|
|
45
|
+
get scope(): ScopeModuleBasicFile;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ApiFile {
|
|
49
|
+
get $beanFullName(): 'basic-file.api.file';
|
|
50
|
+
get $onionName(): 'basic-file:file';
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/** api: end */
|
|
55
|
+
/** api: begin */
|
|
56
|
+
import { ApiFile } from '../api/file.js';
|
|
57
|
+
export interface IModuleApi {
|
|
58
|
+
'file': ApiFile;
|
|
59
|
+
}
|
|
60
|
+
/** api: end */
|
|
61
|
+
/** api: begin */
|
|
62
|
+
|
|
63
|
+
import 'zova';
|
|
64
|
+
declare module 'zova' {
|
|
65
|
+
export interface IBeanRecordGeneral {
|
|
66
|
+
'basic-file.api.file': ApiFile;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/** api: end */
|
|
70
|
+
/** openapi: begin */
|
|
71
|
+
export * from '../api/openapi/index.js';
|
|
72
|
+
/** openapi: end */
|
|
73
|
+
/** apiSchema: begin */
|
|
74
|
+
export * from '../apiSchema/file.js';
|
|
75
|
+
|
|
76
|
+
import 'zova';
|
|
77
|
+
declare module 'zova' {
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
declare module 'zova-module-basic-file' {
|
|
82
|
+
|
|
83
|
+
export interface ApiSchemaFile {
|
|
84
|
+
/** @internal */
|
|
85
|
+
get scope(): ScopeModuleBasicFile;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface ApiSchemaFile {
|
|
89
|
+
get $beanFullName(): 'basic-file.apiSchema.file';
|
|
90
|
+
get $onionName(): 'basic-file:file';
|
|
91
|
+
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/** apiSchema: end */
|
|
95
|
+
/** apiSchema: begin */
|
|
96
|
+
import { ApiSchemaFile } from '../apiSchema/file.js';
|
|
97
|
+
export interface IModuleApiSchema {
|
|
98
|
+
'file': ApiSchemaFile;
|
|
99
|
+
}
|
|
100
|
+
/** apiSchema: end */
|
|
101
|
+
/** apiSchema: begin */
|
|
102
|
+
|
|
103
|
+
import 'zova';
|
|
104
|
+
declare module 'zova' {
|
|
105
|
+
export interface IBeanRecordGeneral {
|
|
106
|
+
'basic-file.apiSchema.file': ApiSchemaFile;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/** apiSchema: end */
|
|
110
|
+
/** controller: begin */
|
|
111
|
+
export * from '../component/formFieldFile/controller.jsx';
|
|
112
|
+
|
|
113
|
+
import 'zova';
|
|
114
|
+
declare module 'zova' {
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
}
|
|
118
|
+
declare module 'zova-module-basic-file' {
|
|
119
|
+
|
|
120
|
+
export interface ControllerFormFieldFile {
|
|
121
|
+
/** @internal */
|
|
122
|
+
get scope(): ScopeModuleBasicFile;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/** controller: end */
|
|
126
|
+
/** controller: begin */
|
|
127
|
+
import { ControllerFormFieldFile } from '../component/formFieldFile/controller.jsx';
|
|
128
|
+
import 'zova';
|
|
129
|
+
declare module 'zova' {
|
|
130
|
+
export interface IBeanRecordLocal {
|
|
131
|
+
'basic-file.controller.formFieldFile': ControllerFormFieldFile;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/** controller: end */
|
|
135
|
+
|
|
136
|
+
/** components: begin */
|
|
137
|
+
export * from './component/formFieldFile.js';
|
|
138
|
+
import { ZFormFieldFile } from './component/formFieldFile.js';
|
|
139
|
+
export const components = {
|
|
140
|
+
'formFieldFile': ZFormFieldFile,
|
|
141
|
+
};
|
|
142
|
+
import 'zova';
|
|
143
|
+
declare module 'zova' {
|
|
144
|
+
export interface IComponentRecord {
|
|
145
|
+
'basic-file:formFieldFile': ControllerFormFieldFile;
|
|
146
|
+
}
|
|
147
|
+
export interface IZovaComponentRecord {
|
|
148
|
+
'basic-file:formFieldFile': typeof ZFormFieldFile;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/** components: end */
|
|
152
|
+
/** tableCell: begin */
|
|
153
|
+
export * from '../bean/tableCell.file.jsx';
|
|
154
|
+
import { ITableCellOptionsFile } from '../bean/tableCell.file.jsx';
|
|
155
|
+
import 'zova-module-a-table';
|
|
156
|
+
declare module 'zova-module-a-table' {
|
|
157
|
+
|
|
158
|
+
export interface ITableCellRecord {
|
|
159
|
+
'basic-file:file': ITableCellOptionsFile;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
}
|
|
164
|
+
declare module 'zova-module-basic-file' {
|
|
165
|
+
|
|
166
|
+
export interface TableCellFile {
|
|
167
|
+
/** @internal */
|
|
168
|
+
get scope(): ScopeModuleBasicFile;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface TableCellFile {
|
|
172
|
+
get $beanFullName(): 'basic-file.tableCell.file';
|
|
173
|
+
get $onionName(): 'basic-file:file';
|
|
174
|
+
get $onionOptions(): ITableCellOptionsFile;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/** tableCell: end */
|
|
178
|
+
/** tableCell: begin */
|
|
179
|
+
import { TableCellFile } from '../bean/tableCell.file.jsx';
|
|
180
|
+
import 'zova';
|
|
181
|
+
declare module 'zova' {
|
|
182
|
+
export interface IBeanRecordGeneral {
|
|
183
|
+
'basic-file.tableCell.file': TableCellFile;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/** tableCell: end */
|
|
187
|
+
/** locale: begin */
|
|
188
|
+
import { locales } from './locales.js';
|
|
189
|
+
/** locale: end */
|
|
190
|
+
/** scope: begin */
|
|
191
|
+
import { BeanScopeBase, type BeanScopeUtil, TypeModuleLocales, TypeLocaleBase } from 'zova';
|
|
192
|
+
import { Scope } from 'zova-module-a-bean';
|
|
193
|
+
|
|
194
|
+
@Scope()
|
|
195
|
+
export class ScopeModuleBasicFile extends BeanScopeBase {}
|
|
196
|
+
|
|
197
|
+
export interface ScopeModuleBasicFile {
|
|
198
|
+
util: BeanScopeUtil;
|
|
199
|
+
locale: TypeModuleLocales<(typeof locales)[TypeLocaleBase]>;
|
|
200
|
+
api: IModuleApi;
|
|
201
|
+
apiSchema: IModuleApiSchema;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
import 'zova';
|
|
205
|
+
declare module 'zova' {
|
|
206
|
+
export interface IBeanScopeRecord {
|
|
207
|
+
'basic-file': ScopeModuleBasicFile;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
export interface IBeanScopeLocale {
|
|
213
|
+
'basic-file': (typeof locales)[TypeLocaleBase];
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): `basic-file::${K}` {
|
|
220
|
+
return `basic-file::${key}`;
|
|
221
|
+
}
|
|
222
|
+
/** scope: end */
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { IApiActionOptions } from 'zova-module-a-api';
|
|
2
|
+
|
|
3
|
+
import { Api, BeanApiBase } from 'zova-module-a-api';
|
|
4
|
+
|
|
5
|
+
import type { components, paths } from './openapi/index.js';
|
|
6
|
+
|
|
7
|
+
import { OpenApiBaseURL } from './openapi/index.js';
|
|
8
|
+
|
|
9
|
+
/** File_getUploadPolicy */
|
|
10
|
+
export const ApiApiFilegetUploadPolicyPath = '/api/file/upload-policy';
|
|
11
|
+
export type ApiApiFilegetUploadPolicyPath = '/api/file/upload-policy';
|
|
12
|
+
export type ApiApiFilegetUploadPolicyMethod = 'post';
|
|
13
|
+
export type ApiApiFilegetUploadPolicyRequestBody =
|
|
14
|
+
components['schemas']['a-file.dto.fileUploadPolicyRequest'];
|
|
15
|
+
export type ApiApiFilegetUploadPolicyResponseBody =
|
|
16
|
+
paths[ApiApiFilegetUploadPolicyPath][ApiApiFilegetUploadPolicyMethod]['responses']['200']['content']['application/json']['data'];
|
|
17
|
+
|
|
18
|
+
/** File_createUploadToken */
|
|
19
|
+
export const ApiApiFilecreateUploadTokenPath = '/api/file/upload-token';
|
|
20
|
+
export type ApiApiFilecreateUploadTokenPath = '/api/file/upload-token';
|
|
21
|
+
export type ApiApiFilecreateUploadTokenMethod = 'post';
|
|
22
|
+
export type ApiApiFilecreateUploadTokenRequestBody =
|
|
23
|
+
components['schemas']['a-file.dto.fileUploadTokenRequest'];
|
|
24
|
+
export type ApiApiFilecreateUploadTokenResponseBody =
|
|
25
|
+
paths[ApiApiFilecreateUploadTokenPath][ApiApiFilecreateUploadTokenMethod]['responses']['200']['content']['application/json']['data'];
|
|
26
|
+
|
|
27
|
+
/** File_upload */
|
|
28
|
+
export const ApiApiFileuploadPath = '/api/file/upload';
|
|
29
|
+
export type ApiApiFileuploadPath = '/api/file/upload';
|
|
30
|
+
export type ApiApiFileuploadMethod = 'post';
|
|
31
|
+
export type ApiApiFileuploadRequestBody = {
|
|
32
|
+
token: string;
|
|
33
|
+
/** Format: binary */
|
|
34
|
+
file: Blob;
|
|
35
|
+
};
|
|
36
|
+
export type ApiApiFileuploadResponseBody =
|
|
37
|
+
paths[ApiApiFileuploadPath][ApiApiFileuploadMethod]['responses']['200']['content']['application/json']['data'];
|
|
38
|
+
|
|
39
|
+
/** File_createDirectUpload */
|
|
40
|
+
export const ApiApiFilecreateDirectUploadPath = '/api/file/direct-upload';
|
|
41
|
+
export type ApiApiFilecreateDirectUploadPath = '/api/file/direct-upload';
|
|
42
|
+
export type ApiApiFilecreateDirectUploadMethod = 'post';
|
|
43
|
+
export type ApiApiFilecreateDirectUploadRequestBody =
|
|
44
|
+
components['schemas']['a-file.dto.fileDirectUploadRequest'];
|
|
45
|
+
export type ApiApiFilecreateDirectUploadResponseBody =
|
|
46
|
+
paths[ApiApiFilecreateDirectUploadPath][ApiApiFilecreateDirectUploadMethod]['responses']['200']['content']['application/json']['data'];
|
|
47
|
+
|
|
48
|
+
/** File_uploadUrl */
|
|
49
|
+
export const ApiApiFileuploadUrlPath = '/api/file/upload-url';
|
|
50
|
+
export type ApiApiFileuploadUrlPath = '/api/file/upload-url';
|
|
51
|
+
export type ApiApiFileuploadUrlMethod = 'post';
|
|
52
|
+
export type ApiApiFileuploadUrlRequestBody =
|
|
53
|
+
components['schemas']['a-file.dto.fileUploadUrlRequest'];
|
|
54
|
+
export type ApiApiFileuploadUrlResponseBody =
|
|
55
|
+
paths[ApiApiFileuploadUrlPath][ApiApiFileuploadUrlMethod]['responses']['200']['content']['application/json']['data'];
|
|
56
|
+
|
|
57
|
+
/** File_download */
|
|
58
|
+
export const ApiApiFiledownloadPath = '/api/file/download/{fileId}';
|
|
59
|
+
export type ApiApiFiledownloadPath = '/api/file/download/{fileId}';
|
|
60
|
+
export type ApiApiFiledownloadMethod = 'get';
|
|
61
|
+
export type ApiApiFiledownloadRequestParams =
|
|
62
|
+
paths[ApiApiFiledownloadPath][ApiApiFiledownloadMethod]['parameters']['path'];
|
|
63
|
+
export type ApiApiFiledownloadRequestQuery =
|
|
64
|
+
paths[ApiApiFiledownloadPath][ApiApiFiledownloadMethod]['parameters']['query'];
|
|
65
|
+
export type ApiApiFiledownloadResponseBody =
|
|
66
|
+
paths[ApiApiFiledownloadPath][ApiApiFiledownloadMethod]['responses']['200']['content']['application/json']['data'];
|
|
67
|
+
|
|
68
|
+
@Api()
|
|
69
|
+
export class ApiFile extends BeanApiBase {
|
|
70
|
+
getUploadPolicy(body: ApiApiFilegetUploadPolicyRequestBody, options?: IApiActionOptions) {
|
|
71
|
+
return this.$fetch.post<any, ApiApiFilegetUploadPolicyResponseBody>(
|
|
72
|
+
ApiApiFilegetUploadPolicyPath,
|
|
73
|
+
body,
|
|
74
|
+
this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
createUploadToken(body: ApiApiFilecreateUploadTokenRequestBody, options?: IApiActionOptions) {
|
|
79
|
+
return this.$fetch.post<any, ApiApiFilecreateUploadTokenResponseBody>(
|
|
80
|
+
ApiApiFilecreateUploadTokenPath,
|
|
81
|
+
body,
|
|
82
|
+
this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
upload(body: ApiApiFileuploadRequestBody, options?: IApiActionOptions) {
|
|
87
|
+
return this.$fetch.post<any, ApiApiFileuploadResponseBody>(
|
|
88
|
+
ApiApiFileuploadPath,
|
|
89
|
+
this.$formData(body),
|
|
90
|
+
this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
createDirectUpload(body: ApiApiFilecreateDirectUploadRequestBody, options?: IApiActionOptions) {
|
|
95
|
+
return this.$fetch.post<any, ApiApiFilecreateDirectUploadResponseBody>(
|
|
96
|
+
ApiApiFilecreateDirectUploadPath,
|
|
97
|
+
body,
|
|
98
|
+
this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
uploadUrl(body: ApiApiFileuploadUrlRequestBody, options?: IApiActionOptions) {
|
|
103
|
+
return this.$fetch.post<any, ApiApiFileuploadUrlResponseBody>(
|
|
104
|
+
ApiApiFileuploadUrlPath,
|
|
105
|
+
body,
|
|
106
|
+
this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
download(
|
|
111
|
+
options: {
|
|
112
|
+
params: ApiApiFiledownloadRequestParams;
|
|
113
|
+
query?: ApiApiFiledownloadRequestQuery;
|
|
114
|
+
} & IApiActionOptions,
|
|
115
|
+
) {
|
|
116
|
+
return this.$fetch.get<any, ApiApiFiledownloadResponseBody>(
|
|
117
|
+
this.$pathTranslate(ApiApiFiledownloadPath, options.params),
|
|
118
|
+
this.$configPrepare(OpenApiBaseURL(this.sys), options),
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
}
|