cabloy 5.1.64 → 5.1.66
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/CHANGELOG.md +50 -0
- package/cabloy-docs/.vitepress/config.mjs +1 -1
- package/cabloy-docs/backend/crud-workflow.md +33 -0
- package/cabloy-docs/backend/master-detail-workflow.md +149 -0
- package/cabloy-docs/frontend/bean-scene-authoring.md +1 -1
- package/cabloy-docs/frontend/cli.md +12 -1
- package/cabloy-docs/frontend/command-scene-authoring.md +12 -1
- package/cabloy-docs/frontend/component-guide.md +10 -0
- package/cabloy-docs/frontend/permission-formscene-action-visibility-guide.md +69 -7
- package/cabloy-docs/frontend/table-cell-cookbook.md +10 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +83 -2
- package/cabloy-docs/reference/bean-scene-boilerplates.md +9 -4
- package/package.json +1 -1
- package/vona/packages-cli/cabloy-cli/package.json +1 -1
- package/vona/packages-cli/cabloy-cli/src/lib/local.helper.ts +38 -0
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/cli/templates/tools/masterDetail/boilerplate/dto/<%=argv.detailDtoBaseName%>.tsx_ +18 -0
- package/vona/packages-cli/cli-set-api/cli/templates/tools/masterDetail/boilerplate/dto/<%=argv.detailDtoMutateName%>.tsx_ +17 -0
- package/vona/packages-cli/cli-set-api/cli/templates/tools/masterDetail/boilerplate/dto/<%=argv.detailDtoResItemName%>.tsx_ +60 -0
- package/vona/packages-cli/cli-set-api/cli/templates/tools/masterDetail/boilerplate/dto/<%=argv.detailDtoViewName%>.tsx_ +17 -0
- package/vona/packages-cli/cli-set-api/package.json +1 -1
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.create.bean.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.create.module.ts +3 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.create.suite.ts +1 -1
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.create.test.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.asset.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.config.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.constant.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.error.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.lib.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.locale.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.main.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.monkey.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.static.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.types.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.tools.crud.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.tools.crudBasic.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.tools.crudStart.ts +2 -6
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.tools.masterDetail.ts +699 -0
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.tools.metadata.ts +1 -2
- package/vona/packages-cli/cli-set-api/src/lib/beans.ts +2 -0
- package/vona/packages-cli/cli-set-api/src/lib/command/tools.masterDetail.ts +78 -0
- package/vona/packages-cli/cli-set-api/src/lib/commands.ts +2 -0
- 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/mappedClass/type.ts +1 -0
- package/vona/packages-vona/vona-core/src/lib/mappedClass/utils.ts +36 -14
- package/vona/packages-vona/vona-mock/package.json +1 -1
- package/vona/pnpm-lock.yaml +29 -11
- package/vona/src/suite/a-training/modules/training-record/src/entity/record.tsx +1 -7
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +3 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +3 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/detailRecordBase.tsx +8 -2
- package/vona/src/suite/a-training/modules/training-student/src/dto/detailRecordMutate.tsx +1 -15
- package/vona/src/suite/a-training/modules/training-student/src/dto/detailRecordResItem.tsx +27 -8
- package/vona/src/suite/a-training/modules/training-student/src/dto/detailRecordView.tsx +1 -12
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +6 -4
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectReq.tsx +3 -6
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +1 -1
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +14 -1
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +14 -1
- package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +1 -5
- package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +9 -4
- package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-openapiutils/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-openapiutils/src/lib/const/decorator.ts +3 -1
- package/vona/src/suite-vendor/a-vona/modules/a-openapiutils/src/lib/schema/makeSchemaLikes.ts +21 -17
- package/vona/src/suite-vendor/a-vona/modules/a-openapiutils/src/lib/utils.ts +44 -2
- 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/lib/dto/dtoGet.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoMutate.ts +8 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/relations_.ts +32 -16
- package/vona/src/suite-vendor/a-vona/modules/a-web/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-web/src/lib/decorator/bean.ts +26 -5
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/packages-cli/cli/package.json +3 -3
- package/zova/packages-cli/cli-set-front/cli/templates/create/component/boilerplateDetailsActionBulk/controller.tsx_ +31 -0
- package/zova/packages-cli/cli-set-front/cli/templates/rest/component.ts +24 -2
- package/zova/packages-cli/cli-set-front/cli/templates/rest/render.ts +4 -0
- package/zova/packages-cli/cli-set-front/package.json +2 -2
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.create.bean.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.create.mock.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.create.module.ts +3 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.create.suite.ts +1 -1
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.asset.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.config.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.constant.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.error.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.icon.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.lib.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.locale.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.main.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.mainSys.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.monkey.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.monkeySys.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.types.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.config.ts +1 -4
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.generate.ts +2 -2
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.refactor.anotherRender.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.refactor.anotherStyle.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.refactor.componentEmits.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.refactor.componentGeneric.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.refactor.componentModel.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.refactor.componentProps.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.refactor.componentSlots.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.refactor.firstRender.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.refactor.firstStyle.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.refactor.pageParams.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.refactor.pageQuery.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.refactor.renameComponent.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.tools.metadata.ts +1 -2
- package/zova/packages-cli/cli-set-front/src/lib/common/cliCreateComponent.ts +2 -6
- package/zova/packages-cli/cli-set-front/src/lib/common/cliCreatePage.ts +2 -6
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +744 -884
- package/zova/src/suite/a-training/modules/training-student/package.json +2 -1
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/bean/behavior.appModal.tsx +131 -13
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/config/config.ts +15 -0
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/service/appModal.ts +23 -5
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/types/appModal.ts +30 -4
- package/zova/src/suite/cabloy-basic/modules/basic-details/package.json +6 -1
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/component/blockForm.ts +31 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/component/blockTable.ts +31 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/component/blockToolbarBulk.ts +31 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/index.ts +204 -9
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/bean/command.delete.tsx +47 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/bean/tableCell.actionDelete.tsx +52 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/bean/tableCell.actionOperationsRow.tsx +72 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/bean/tableCell.actionUpdate.tsx +73 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/bean/tableCell.actionView.tsx +64 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/bean/tableCell.lineNumber.tsx +30 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/actionCreate/controller.tsx +31 -7
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockDetails/controller.tsx +28 -12
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockForm/controller.tsx +53 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockTable/controller.tsx +49 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/{blockDetailsToolbarBulk → blockToolbarBulk}/controller.tsx +6 -4
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/formFieldDetails/controller.tsx +24 -12
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/config/locale/en-us.ts +5 -1
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/config/locale/zh-cn.ts +5 -1
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/lib/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/lib/utils.ts +12 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/service/detail.tsx +172 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/types/detail.ts +18 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/types/details.ts +11 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/types/dialogForm.ts +22 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/types/index.ts +2 -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/page/entry/controller.tsx +1 -2
- package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-command/cli/command/boilerplate/{{sceneName}}.{{beanName}}.tsx_ +6 -1
- package/zova/src/suite-vendor/a-zova/modules/a-command/cli/commandBulk/boilerplate/{{sceneName}}.{{beanName}}.tsx_ +6 -1
- package/zova/src/suite-vendor/a-zova/modules/a-command/cli/commandDetailsRow/boilerplate/{{sceneName}}.{{beanName}}.tsx_ +20 -0
- package/zova/src/suite-vendor/a-zova/modules/a-command/cli/commandRow/boilerplate/{{sceneName}}.{{beanName}}.tsx_ +6 -1
- package/zova/src/suite-vendor/a-zova/modules/a-command/package.json +3 -2
- package/zova/src/suite-vendor/a-zova/modules/a-command/src/types/command.ts +2 -0
- package/zova/src/suite-vendor/a-zova/modules/a-form/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-form/src/component/form/controller.tsx +1 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/lib/schema.ts +20 -4
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/action.ts +2 -1
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/detail/detail.ts +10 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/detail/details.ts +4 -1
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/detail/detailsActionRow.ts +24 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/detail/index.ts +2 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/permissions.ts +4 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/rest.ts +2 -0
- package/zova/src/suite-vendor/a-zova/modules/a-table/cli/detailsActionRow/boilerplate/{{sceneName}}.{{beanName}}.tsx_ +24 -0
- package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +3 -2
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +5 -3
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +6 -6
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/component/blockDetailsToolbarBulk.ts +0 -31
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-command",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.30",
|
|
4
4
|
"gitHead": "09d901d17140a80ee0764211b441cda72fd94663",
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -58,7 +58,8 @@
|
|
|
58
58
|
"optionsGlobalInterfaceFrom": "zova-module-a-command",
|
|
59
59
|
"boilerplate": "command/boilerplate",
|
|
60
60
|
"boilerplateCommandBulk": "commandBulk/boilerplate",
|
|
61
|
-
"boilerplateCommandRow": "commandRow/boilerplate"
|
|
61
|
+
"boilerplateCommandRow": "commandRow/boilerplate",
|
|
62
|
+
"boilerplateCommandDetailsRow": "commandDetailsRow/boilerplate"
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
65
|
"capabilities": {
|
|
@@ -40,6 +40,8 @@ export interface ICommandRowOptionsBase<Result = any> extends ICommandOptionsBas
|
|
|
40
40
|
id?: TableIdentity;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
export interface ICommandDetailsRowOptionsBase<Result = any> extends ICommandOptionsBase<Result> {}
|
|
44
|
+
|
|
43
45
|
declare module 'zova-module-a-bean' {
|
|
44
46
|
export interface SysOnion {
|
|
45
47
|
command: ServiceOnion<IDecoratorCommandOptions, keyof ICommandRecord>;
|
|
@@ -127,6 +127,7 @@ export class ControllerForm<
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
public async submit(submitMeta?: TSubmitMeta): Promise<boolean> {
|
|
130
|
+
if (this.formMeta?.formScene === 'view') return false;
|
|
130
131
|
const [_, error] = await catchError(() => {
|
|
131
132
|
return this.form.handleSubmit(submitMeta as any);
|
|
132
133
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-openapi",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.37",
|
|
4
4
|
"gitHead": "09d901d17140a80ee0764211b441cda72fd94663",
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"postpack": "clean-package restore && npm run clean"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@cabloy/json-schema-to-zod": "^2.6.
|
|
37
|
+
"@cabloy/json-schema-to-zod": "^2.6.5",
|
|
38
38
|
"openapi3-ts": "^4.5.0",
|
|
39
39
|
"typestyle": "^2.4.0"
|
|
40
40
|
},
|
|
@@ -76,15 +76,31 @@ function _normalizeSchema(
|
|
|
76
76
|
const schemaNew = Object.assign({}, schema, { properties: {} });
|
|
77
77
|
for (const key in schema.properties) {
|
|
78
78
|
let property = schema.properties[key] as SchemaObject | undefined;
|
|
79
|
-
|
|
80
|
-
property = onGetSchema(property.$ref);
|
|
81
|
-
}
|
|
79
|
+
property = _normalizePropertySchema(property, onGetSchema);
|
|
82
80
|
if (!property) continue;
|
|
83
|
-
|
|
81
|
+
// items.$ref
|
|
82
|
+
if (property.items?.$ref) {
|
|
83
|
+
const propertyItems = _normalizePropertySchema(property.items as any, onGetSchema);
|
|
84
|
+
if (!propertyItems) continue;
|
|
85
|
+
property = { ...property, items: propertyItems };
|
|
86
|
+
}
|
|
87
|
+
// _normalizeSchema
|
|
88
|
+
schemaNew.properties[key] = property;
|
|
84
89
|
}
|
|
85
90
|
return schemaNew;
|
|
86
91
|
}
|
|
87
92
|
|
|
93
|
+
function _normalizePropertySchema(
|
|
94
|
+
property: SchemaObject | undefined,
|
|
95
|
+
onGetSchema: (schemaName: string) => SchemaObject | undefined,
|
|
96
|
+
) {
|
|
97
|
+
if (property?.$ref) {
|
|
98
|
+
property = onGetSchema(property.$ref);
|
|
99
|
+
}
|
|
100
|
+
if (!property) return;
|
|
101
|
+
return _normalizeSchema(property, onGetSchema);
|
|
102
|
+
}
|
|
103
|
+
|
|
88
104
|
export function getSchemaOfRequestBody(
|
|
89
105
|
operationObject?: OperationObject,
|
|
90
106
|
): SchemaObject | undefined {
|
|
@@ -21,7 +21,7 @@ export interface IJsxRenderContextPageEntry extends IJsxRenderContextBase {
|
|
|
21
21
|
|
|
22
22
|
export interface IPageEntryScope {
|
|
23
23
|
resource?: string;
|
|
24
|
-
id
|
|
24
|
+
id?: TableIdentity | null;
|
|
25
25
|
permissions?: TypeOpenapiPermissions;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -35,6 +35,7 @@ export interface IJsxRenderSceneRecord {
|
|
|
35
35
|
formField: never;
|
|
36
36
|
//
|
|
37
37
|
details: never;
|
|
38
|
+
detail: never;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
export interface IPageScope {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IJsxRenderContextBase } from '../action.js';
|
|
2
|
+
import { IFormMeta } from '../formMeta.js';
|
|
3
|
+
|
|
4
|
+
export interface IDetailScope {
|
|
5
|
+
formMeta?: IFormMeta;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface IJsxRenderContextDetail extends IJsxRenderContextBase {
|
|
9
|
+
$celScope: IDetailScope;
|
|
10
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { IJsxRenderContextBase } from '../action.js';
|
|
2
|
+
import { IFormMeta } from '../formMeta.js';
|
|
2
3
|
|
|
3
|
-
export interface IDetailsScope {
|
|
4
|
+
export interface IDetailsScope {
|
|
5
|
+
formMeta?: IFormMeta;
|
|
6
|
+
}
|
|
4
7
|
|
|
5
8
|
export interface IJsxRenderContextDetails extends IJsxRenderContextBase {
|
|
6
9
|
$celScope: IDetailsScope;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { types } from 'typestyle';
|
|
2
|
+
import { TypeRenderComponentJsx } from 'zova-jsx';
|
|
3
|
+
|
|
4
|
+
import type { IPermissionHintDetailsActionRow } from '../permissions.js';
|
|
5
|
+
|
|
6
|
+
export type IResourceDetailsActionRowNameRecord = {
|
|
7
|
+
[KEY in keyof IResourceDetailsActionRowRecord as KEY extends `${string}:action${infer Name}`
|
|
8
|
+
? Uncapitalize<Name>
|
|
9
|
+
: KEY]: IResourceDetailsActionRowRecord[KEY];
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export interface IResourceDetailsActionRowRecord {}
|
|
13
|
+
|
|
14
|
+
export interface IResourceDetailsActionRowOptionsBase {
|
|
15
|
+
class?: any;
|
|
16
|
+
style?: types.NestedCSSProperties;
|
|
17
|
+
permission?: IPermissionHintDetailsActionRow;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface IResourceRenderDetailsActionRowOptionsAction {
|
|
21
|
+
name?: keyof IResourceDetailsActionRowNameRecord; // not omit operationsRow
|
|
22
|
+
render?: keyof IResourceDetailsActionRowRecord | TypeRenderComponentJsx;
|
|
23
|
+
options?: IResourceDetailsActionRowOptionsBase;
|
|
24
|
+
}
|
|
@@ -35,6 +35,10 @@ export interface IPermissionHintTableActionBulk {
|
|
|
35
35
|
public?: boolean;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
export interface IPermissionHintDetailsActionRow {
|
|
39
|
+
formScene?: TypeFormScene | TypeFormScene[];
|
|
40
|
+
}
|
|
41
|
+
|
|
38
42
|
export interface IPermissionHintDetailsActionBulk {
|
|
39
43
|
// actionInherit?: keyof IResourceDetailsActionBulkNameRecord;
|
|
40
44
|
// public?: boolean;
|
|
@@ -6,6 +6,7 @@ import 'openapi3-ts/oas30';
|
|
|
6
6
|
import 'openapi3-ts/oas31';
|
|
7
7
|
import { SchemaObject } from 'openapi3-ts/oas31';
|
|
8
8
|
|
|
9
|
+
import { IResourceDetailsActionRowRecord } from './detail/detailsActionRow.js';
|
|
9
10
|
import { IResourceRenderBlockOptionsBlock } from './resource/block.js';
|
|
10
11
|
import { IResourceFormFieldRecord } from './resource/formField.js';
|
|
11
12
|
import { IResourceTableActionRowRecord } from './resource/tableActionRow.js';
|
|
@@ -112,6 +113,7 @@ export type TypeTableCellRenderComponentNormal =
|
|
|
112
113
|
| TypeRenderComponentPreset;
|
|
113
114
|
export type TypeTableCellRenderComponent =
|
|
114
115
|
| keyof IResourceTableActionRowRecord
|
|
116
|
+
| keyof IResourceDetailsActionRowRecord
|
|
115
117
|
| TypeRenderComponentJsx;
|
|
116
118
|
export type TypeTableCellRenderComponentProvider = TypeRenderComponentJsx | 'text' | string;
|
|
117
119
|
export type TypeTableBulkRenderComponentProvider =
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IResourceDetailsActionRowOptionsBase } from 'zova-module-a-openapi';
|
|
2
|
+
import type {
|
|
3
|
+
IJsxRenderContextTableCell,
|
|
4
|
+
ITableCellRender,
|
|
5
|
+
NextTableCellRender,
|
|
6
|
+
} from 'zova-module-a-table';
|
|
7
|
+
|
|
8
|
+
import { BeanBase } from 'zova';
|
|
9
|
+
import { TableCell } from 'zova-module-a-table';
|
|
10
|
+
|
|
11
|
+
declare module 'zova-module-a-openapi' {
|
|
12
|
+
export interface IResourceDetailsActionRowRecord {
|
|
13
|
+
'<%=argv.module%>:<%=argv.beanName%>'?: ITableCellOptions<%=argv.beanNameCapitalize%>;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ITableCellOptions<%=argv.beanNameCapitalize%> extends IResourceDetailsActionRowOptionsBase {}
|
|
18
|
+
|
|
19
|
+
@TableCell<ITableCellOptions<%=argv.beanNameCapitalize%>>()
|
|
20
|
+
export class TableCell<%=argv.beanNameCapitalize%> extends BeanBase implements ITableCellRender {
|
|
21
|
+
render(_options: ITableCellOptions<%=argv.beanNameCapitalize%>, _renderContext: IJsxRenderContextTableCell, next: NextTableCellRender) {
|
|
22
|
+
return next();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-table",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.33",
|
|
4
4
|
"gitHead": "09d901d17140a80ee0764211b441cda72fd94663",
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -76,7 +76,8 @@
|
|
|
76
76
|
"optionsGlobalInterfaceName": "IDecoratorTableCellOptions",
|
|
77
77
|
"optionsGlobalInterfaceFrom": "zova-module-a-table",
|
|
78
78
|
"boilerplate": "tableCell/boilerplate",
|
|
79
|
-
"boilerplateTableActionRow": "tableActionRow/boilerplate"
|
|
79
|
+
"boilerplateTableActionRow": "tableActionRow/boilerplate",
|
|
80
|
+
"boilerplateDetailsActionRow": "detailsActionRow/boilerplate"
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
}
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
CellContext,
|
|
12
12
|
createColumnHelper,
|
|
13
13
|
getCoreRowModel,
|
|
14
|
+
Row,
|
|
14
15
|
TableOptionsWithReactiveData,
|
|
15
16
|
} from '@tanstack/vue-table';
|
|
16
17
|
import { SchemaObject } from 'openapi3-ts/oas31';
|
|
@@ -50,6 +51,7 @@ export interface ControllerTableProps<TData extends {} = {}> {
|
|
|
50
51
|
tableScope?: ITableScope;
|
|
51
52
|
getColumns?: TypeTableGetColumns<TData>;
|
|
52
53
|
slotDefault?: (table: ControllerTable<TData>) => VNode;
|
|
54
|
+
getRowId?: (originalRow: TData, index: number, parent?: Row<TData>) => string;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
@Controller()
|
|
@@ -85,11 +87,11 @@ export class ControllerTable<TData extends {} = {}> extends BeanControllerTableB
|
|
|
85
87
|
this._createTable();
|
|
86
88
|
}
|
|
87
89
|
|
|
88
|
-
get schema() {
|
|
90
|
+
public get schema() {
|
|
89
91
|
return this.$props.schema;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
get data() {
|
|
94
|
+
public get data() {
|
|
93
95
|
return this.$props.data;
|
|
94
96
|
}
|
|
95
97
|
|
|
@@ -102,7 +104,7 @@ export class ControllerTable<TData extends {} = {}> extends BeanControllerTableB
|
|
|
102
104
|
// eslint-disable-next-line
|
|
103
105
|
const self = this;
|
|
104
106
|
const tableOptions: TableOptionsWithReactiveData<TData> = {
|
|
105
|
-
getRowId: (
|
|
107
|
+
getRowId: this.$props.getRowId ?? ((originalRow: TData) => cast(originalRow).id),
|
|
106
108
|
getCoreRowModel: getCoreRowModel(),
|
|
107
109
|
renderFallbackValue: this.scope.config.renderFallbackValue,
|
|
108
110
|
manualPagination: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-zova",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.74",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "zova",
|
|
6
6
|
"keywords": [
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"zova-jsx": "^1.1.63"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@cabloy/cli": "^3.1.
|
|
49
|
+
"@cabloy/cli": "^3.1.23",
|
|
50
50
|
"@types/luxon": "^3.7.1",
|
|
51
51
|
"clean-package": "^2.2.0",
|
|
52
52
|
"fs-extra": "^11.3.5",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-suite-a-zova",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.109",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "zova",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"zova-module-a-behavior": "^5.1.22",
|
|
15
15
|
"zova-module-a-behaviors": "^5.1.18",
|
|
16
16
|
"zova-module-a-boundary": "^5.1.18",
|
|
17
|
-
"zova-module-a-command": "^5.1.
|
|
17
|
+
"zova-module-a-command": "^5.1.30",
|
|
18
18
|
"zova-module-a-fetch": "^5.1.20",
|
|
19
|
-
"zova-module-a-form": "^5.1.
|
|
19
|
+
"zova-module-a-form": "^5.1.36",
|
|
20
20
|
"zova-module-a-icon": "^5.1.23",
|
|
21
21
|
"zova-module-a-interceptor": "^5.1.26",
|
|
22
22
|
"zova-module-a-logger": "^5.1.23",
|
|
23
23
|
"zova-module-a-meta": "^5.1.18",
|
|
24
24
|
"zova-module-a-model": "^5.1.27",
|
|
25
|
-
"zova-module-a-openapi": "^5.1.
|
|
25
|
+
"zova-module-a-openapi": "^5.1.37",
|
|
26
26
|
"zova-module-a-router": "^5.1.26",
|
|
27
27
|
"zova-module-a-routerstack": "^5.1.23",
|
|
28
28
|
"zova-module-a-routertabs": "^5.1.29",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"zova-module-a-ssrhmr": "^5.1.19",
|
|
31
31
|
"zova-module-a-ssrserver": "^5.1.19",
|
|
32
32
|
"zova-module-a-style": "^5.1.29",
|
|
33
|
-
"zova-module-a-table": "^5.1.
|
|
33
|
+
"zova-module-a-table": "^5.1.33",
|
|
34
34
|
"zova-module-a-zod": "^5.1.30",
|
|
35
|
-
"zova-module-a-zova": "^5.1.
|
|
35
|
+
"zova-module-a-zova": "^5.1.74"
|
|
36
36
|
},
|
|
37
37
|
"title": "a-zova"
|
|
38
38
|
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { TypeControllerInnerProps } from 'zova';
|
|
2
|
-
|
|
3
|
-
import { defineComponent } from 'vue';
|
|
4
|
-
import { prepareComponentOptions, useController } from 'zova';
|
|
5
|
-
|
|
6
|
-
import type { ControllerBlockDetailsToolbarBulkProps } from '../../component/blockDetailsToolbarBulk/controller.jsx';
|
|
7
|
-
|
|
8
|
-
import { ControllerBlockDetailsToolbarBulk } from '../../component/blockDetailsToolbarBulk/controller.jsx';
|
|
9
|
-
export type ZBlockDetailsToolbarBulkProps = {
|
|
10
|
-
controllerRef?: (ref: ControllerBlockDetailsToolbarBulk) => void;
|
|
11
|
-
} & ControllerBlockDetailsToolbarBulkProps;
|
|
12
|
-
|
|
13
|
-
type ControllerInnerProps = TypeControllerInnerProps<
|
|
14
|
-
ControllerBlockDetailsToolbarBulkProps,
|
|
15
|
-
keyof typeof ControllerBlockDetailsToolbarBulk.$propsDefault
|
|
16
|
-
>;
|
|
17
|
-
declare module 'zova-module-basic-details' {
|
|
18
|
-
export interface ControllerBlockDetailsToolbarBulk {
|
|
19
|
-
$props: ControllerInnerProps;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const ZBlockDetailsToolbarBulk = defineComponent((_props: ZBlockDetailsToolbarBulkProps) => {
|
|
24
|
-
useController(ControllerBlockDetailsToolbarBulk, undefined, undefined);
|
|
25
|
-
return () => {};
|
|
26
|
-
}, prepareComponentOptions(ControllerBlockDetailsToolbarBulk.$componentOptions));
|
|
27
|
-
declare module 'zova-module-a-bean' {
|
|
28
|
-
export interface IVonaComponentRecord {
|
|
29
|
-
'basic-details:blockDetailsToolbarBulk': ControllerBlockDetailsToolbarBulkProps;
|
|
30
|
-
}
|
|
31
|
-
}
|