cabloy 5.1.63 → 5.1.65
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 +12 -0
- package/package.json +1 -1
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/pnpm-lock.yaml +88 -3
- package/vona/src/suite/a-training/modules/training-record/package.json +53 -0
- package/vona/src/suite/a-training/modules/training-record/src/.metadata/index.ts +198 -0
- package/vona/src/suite/a-training/modules/training-record/src/.metadata/locales.ts +18 -0
- package/vona/src/suite/a-training/modules/training-record/src/.metadata/this.ts +2 -0
- package/vona/src/suite/a-training/modules/training-record/src/bean/meta.index.ts +12 -0
- package/vona/src/suite/a-training/modules/training-record/src/bean/meta.version.ts +21 -0
- package/vona/src/suite/a-training/modules/training-record/src/config/locale/en-us.ts +7 -0
- package/vona/src/suite/a-training/modules/training-record/src/config/locale/zh-cn.ts +7 -0
- package/vona/src/suite/a-training/modules/training-record/src/entity/record.tsx +42 -0
- package/vona/src/suite/a-training/modules/training-record/src/index.ts +2 -0
- package/vona/src/suite/a-training/modules/training-record/src/model/record.ts +10 -0
- package/vona/src/suite/a-training/modules/training-record/tsconfig.build.json +11 -0
- package/vona/src/suite/a-training/modules/training-record/tsconfig.json +7 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +39 -3
- 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 +12 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/detailRecordMutate.tsx +31 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/detailRecordResItem.tsx +40 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/detailRecordView.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +16 -1
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +4 -1
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +4 -1
- package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +9 -2
- package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +1 -1
- package/vona/src/suite/a-training/package.json +1 -0
- package/vona/src/suite/a-training/tsconfig.json +3 -0
- 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/dto.ts +2 -0
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoGet.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoMutate.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoGet.ts +3 -0
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoMutate.ts +2 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelGeneral.ts +3 -0
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/packages-cli/cli/package.json +2 -2
- package/zova/packages-cli/cli-set-front/cli/templates/create/component/boilerplateBlockPage/controller.tsx_ +6 -2
- package/zova/packages-cli/cli-set-front/cli/templates/create/component/boilerplateBlockPageEntry/controller.tsx_ +6 -2
- package/zova/packages-cli/cli-set-front/cli/templates/create/component/boilerplateFormActionRow/controller.tsx_ +6 -2
- package/zova/packages-cli/cli-set-front/cli/templates/create/component/boilerplateFormField/controller.tsx_ +2 -1
- package/zova/packages-cli/cli-set-front/cli/templates/create/component/boilerplateTableActionBulk/controller.tsx_ +6 -2
- package/zova/packages-cli/cli-set-front/cli/templates/rest/component.ts +25 -2
- package/zova/packages-cli/cli-set-front/cli/templates/rest/render.ts +4 -0
- package/zova/packages-cli/cli-set-front/package.json +1 -1
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +18 -3
- package/zova/src/suite/cabloy-basic/modules/basic-details/package.json +52 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/component/actionCreate.ts +31 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/component/blockDetails.ts +34 -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/component/formFieldDetails.ts +31 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/index.ts +164 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/this.ts +2 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/bean/tableCell.actionOperationsRow.tsx +34 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/actionCreate/controller.tsx +42 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockDetails/controller.tsx +114 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockTable/controller.tsx +44 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockToolbarBulk/controller.tsx +61 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/formFieldDetails/controller.tsx +105 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/config/locale/en-us.ts +3 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/config/locale/zh-cn.ts +3 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/index.ts +3 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/types/details.ts +8 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/types/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/tsconfig.build.json +13 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/tsconfig.json +5 -0
- package/zova/src/suite/cabloy-basic/package.json +1 -0
- 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/types/action.ts +2 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/detail/details.ts +7 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/detail/detailsActionBulk.ts +24 -0
- 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 +3 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/index.ts +1 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/permissions.ts +10 -0
- package/zova/src/suite-vendor/a-zova/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.106",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "A vue3 framework with ioc",
|
|
6
6
|
"keywords": [
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"zova-core": "^5.1.57",
|
|
49
|
-
"zova-suite-a-zova": "^5.1.
|
|
49
|
+
"zova-suite-a-zova": "^5.1.105"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"clean-package": "^2.2.0",
|
package/zova/pnpm-lock.yaml
CHANGED
|
@@ -231,6 +231,9 @@ importers:
|
|
|
231
231
|
zova-module-basic-date:
|
|
232
232
|
specifier: workspace:^
|
|
233
233
|
version: link:src/suite/cabloy-basic/modules/basic-date
|
|
234
|
+
zova-module-basic-details:
|
|
235
|
+
specifier: workspace:^
|
|
236
|
+
version: link:src/suite/cabloy-basic/modules/basic-details
|
|
234
237
|
zova-module-basic-form:
|
|
235
238
|
specifier: workspace:^
|
|
236
239
|
version: link:src/suite/cabloy-basic/modules/basic-form
|
|
@@ -389,7 +392,7 @@ importers:
|
|
|
389
392
|
specifier: ^7.6.2
|
|
390
393
|
version: 7.8.4
|
|
391
394
|
zova-cli-set-front:
|
|
392
|
-
specifier: ^1.2.
|
|
395
|
+
specifier: ^1.2.79
|
|
393
396
|
version: link:../cli-set-front
|
|
394
397
|
devDependencies:
|
|
395
398
|
clean-package:
|
|
@@ -810,7 +813,7 @@ importers:
|
|
|
810
813
|
specifier: ^5.1.57
|
|
811
814
|
version: link:../zova-core
|
|
812
815
|
zova-suite-a-zova:
|
|
813
|
-
specifier: ^5.1.
|
|
816
|
+
specifier: ^5.1.104
|
|
814
817
|
version: link:../../src/suite-vendor/a-zova
|
|
815
818
|
devDependencies:
|
|
816
819
|
clean-package:
|
|
@@ -965,7 +968,7 @@ importers:
|
|
|
965
968
|
specifier: ^5.1.27
|
|
966
969
|
version: link:modules/a-model
|
|
967
970
|
zova-module-a-openapi:
|
|
968
|
-
specifier: ^5.1.
|
|
971
|
+
specifier: ^5.1.35
|
|
969
972
|
version: link:modules/a-openapi
|
|
970
973
|
zova-module-a-router:
|
|
971
974
|
specifier: ^5.1.26
|
|
@@ -1571,6 +1574,9 @@ importers:
|
|
|
1571
1574
|
zova-module-basic-date:
|
|
1572
1575
|
specifier: ^5.0.6
|
|
1573
1576
|
version: link:modules/basic-date
|
|
1577
|
+
zova-module-basic-details:
|
|
1578
|
+
specifier: ^5.0.0
|
|
1579
|
+
version: link:modules/basic-details
|
|
1574
1580
|
zova-module-basic-form:
|
|
1575
1581
|
specifier: ^5.0.7
|
|
1576
1582
|
version: link:modules/basic-form
|
|
@@ -1663,6 +1669,15 @@ importers:
|
|
|
1663
1669
|
specifier: ^6.1.3
|
|
1664
1670
|
version: 6.1.3
|
|
1665
1671
|
|
|
1672
|
+
src/suite/cabloy-basic/modules/basic-details:
|
|
1673
|
+
devDependencies:
|
|
1674
|
+
clean-package:
|
|
1675
|
+
specifier: ^2.2.0
|
|
1676
|
+
version: 2.2.0
|
|
1677
|
+
rimraf:
|
|
1678
|
+
specifier: ^6.1.3
|
|
1679
|
+
version: 6.1.3
|
|
1680
|
+
|
|
1666
1681
|
src/suite/cabloy-basic/modules/basic-form:
|
|
1667
1682
|
devDependencies:
|
|
1668
1683
|
clean-package:
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "zova-module-basic-details",
|
|
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
|
+
],
|
|
16
|
+
"type": "module",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": [
|
|
20
|
+
"./src/index.ts",
|
|
21
|
+
"./dist/index.d.ts"
|
|
22
|
+
],
|
|
23
|
+
"import": "./src/index.ts",
|
|
24
|
+
"default": "./dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./*": "./*"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"clean": "rimraf dist tsconfig.build.tsbuildinfo",
|
|
30
|
+
"tsc:publish": "npm run clean && node ../../../../../packages-cli/cli/src/bin/zova.ts :bin:buildModule --sourcemap && tsc -p tsconfig.build.json",
|
|
31
|
+
"prepublishOnly": "npm run tsc:publish",
|
|
32
|
+
"prepack": "clean-package",
|
|
33
|
+
"postpack": "clean-package restore && npm run clean"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"clean-package": "^2.2.0",
|
|
38
|
+
"rimraf": "^6.1.3"
|
|
39
|
+
},
|
|
40
|
+
"clean-package": {
|
|
41
|
+
"indent": 2,
|
|
42
|
+
"replace": {
|
|
43
|
+
"exports.\\..types": "./dist/index.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"remove": [
|
|
46
|
+
"clean-package",
|
|
47
|
+
"devDependencies",
|
|
48
|
+
"exports.\\..import"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"title": "basic-details"
|
|
52
|
+
}
|
package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/component/actionCreate.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 { ControllerActionCreateProps } from '../../component/actionCreate/controller.jsx';
|
|
7
|
+
|
|
8
|
+
import { ControllerActionCreate } from '../../component/actionCreate/controller.jsx';
|
|
9
|
+
export type ZActionCreateProps = {
|
|
10
|
+
controllerRef?: (ref: ControllerActionCreate) => void;
|
|
11
|
+
} & ControllerActionCreateProps;
|
|
12
|
+
|
|
13
|
+
type ControllerInnerProps = TypeControllerInnerProps<
|
|
14
|
+
ControllerActionCreateProps,
|
|
15
|
+
keyof typeof ControllerActionCreate.$propsDefault
|
|
16
|
+
>;
|
|
17
|
+
declare module 'zova-module-basic-details' {
|
|
18
|
+
export interface ControllerActionCreate {
|
|
19
|
+
$props: ControllerInnerProps;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const ZActionCreate = defineComponent((_props: ZActionCreateProps) => {
|
|
24
|
+
useController(ControllerActionCreate, undefined, undefined);
|
|
25
|
+
return () => {};
|
|
26
|
+
}, prepareComponentOptions(ControllerActionCreate.$componentOptions));
|
|
27
|
+
declare module 'zova-module-a-bean' {
|
|
28
|
+
export interface IVonaComponentRecord {
|
|
29
|
+
'basic-details:actionCreate': ControllerActionCreateProps;
|
|
30
|
+
}
|
|
31
|
+
}
|
package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/component/blockDetails.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { TypeControllerInnerProps } from 'zova';
|
|
2
|
+
|
|
3
|
+
import { defineComponent } from 'vue';
|
|
4
|
+
import { prepareComponentOptions, useController } from 'zova';
|
|
5
|
+
|
|
6
|
+
import type { ControllerBlockDetailsProps } from '../../component/blockDetails/controller.jsx';
|
|
7
|
+
|
|
8
|
+
import { ControllerBlockDetails } from '../../component/blockDetails/controller.jsx';
|
|
9
|
+
export type ZBlockDetailsProps<TData extends {} = {}> = {
|
|
10
|
+
controllerRef?: (ref: ControllerBlockDetails<TData>) => void;
|
|
11
|
+
} & ControllerBlockDetailsProps<TData>;
|
|
12
|
+
|
|
13
|
+
type ControllerInnerProps<TData extends {} = {}> = TypeControllerInnerProps<
|
|
14
|
+
ControllerBlockDetailsProps<TData>,
|
|
15
|
+
keyof typeof ControllerBlockDetails.$propsDefault
|
|
16
|
+
>;
|
|
17
|
+
declare module 'zova-module-basic-details' {
|
|
18
|
+
export interface ControllerBlockDetails<TData extends {} = {}> {
|
|
19
|
+
$props: ControllerInnerProps<TData>;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const ZBlockDetails = defineComponent(
|
|
24
|
+
<TData extends {} = {}>(_props: ZBlockDetailsProps<TData>) => {
|
|
25
|
+
useController(ControllerBlockDetails, undefined, undefined);
|
|
26
|
+
return () => {};
|
|
27
|
+
},
|
|
28
|
+
prepareComponentOptions(ControllerBlockDetails.$componentOptions),
|
|
29
|
+
);
|
|
30
|
+
declare module 'zova-module-a-bean' {
|
|
31
|
+
export interface IVonaComponentRecord {
|
|
32
|
+
'basic-details:blockDetails': ControllerBlockDetailsProps;
|
|
33
|
+
}
|
|
34
|
+
}
|
package/zova/src/suite/cabloy-basic/modules/basic-details/src/.metadata/component/blockTable.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 { ControllerBlockTableProps } from '../../component/blockTable/controller.jsx';
|
|
7
|
+
|
|
8
|
+
import { ControllerBlockTable } from '../../component/blockTable/controller.jsx';
|
|
9
|
+
export type ZBlockTableProps = {
|
|
10
|
+
controllerRef?: (ref: ControllerBlockTable) => void;
|
|
11
|
+
} & ControllerBlockTableProps;
|
|
12
|
+
|
|
13
|
+
type ControllerInnerProps = TypeControllerInnerProps<
|
|
14
|
+
ControllerBlockTableProps,
|
|
15
|
+
keyof typeof ControllerBlockTable.$propsDefault
|
|
16
|
+
>;
|
|
17
|
+
declare module 'zova-module-basic-details' {
|
|
18
|
+
export interface ControllerBlockTable {
|
|
19
|
+
$props: ControllerInnerProps;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const ZBlockTable = defineComponent((_props: ZBlockTableProps) => {
|
|
24
|
+
useController(ControllerBlockTable, undefined, undefined);
|
|
25
|
+
return () => {};
|
|
26
|
+
}, prepareComponentOptions(ControllerBlockTable.$componentOptions));
|
|
27
|
+
declare module 'zova-module-a-bean' {
|
|
28
|
+
export interface IVonaComponentRecord {
|
|
29
|
+
'basic-details:blockTable': ControllerBlockTableProps;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -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 { ControllerBlockToolbarBulkProps } from '../../component/blockToolbarBulk/controller.jsx';
|
|
7
|
+
|
|
8
|
+
import { ControllerBlockToolbarBulk } from '../../component/blockToolbarBulk/controller.jsx';
|
|
9
|
+
export type ZBlockToolbarBulkProps = {
|
|
10
|
+
controllerRef?: (ref: ControllerBlockToolbarBulk) => void;
|
|
11
|
+
} & ControllerBlockToolbarBulkProps;
|
|
12
|
+
|
|
13
|
+
type ControllerInnerProps = TypeControllerInnerProps<
|
|
14
|
+
ControllerBlockToolbarBulkProps,
|
|
15
|
+
keyof typeof ControllerBlockToolbarBulk.$propsDefault
|
|
16
|
+
>;
|
|
17
|
+
declare module 'zova-module-basic-details' {
|
|
18
|
+
export interface ControllerBlockToolbarBulk {
|
|
19
|
+
$props: ControllerInnerProps;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const ZBlockToolbarBulk = defineComponent((_props: ZBlockToolbarBulkProps) => {
|
|
24
|
+
useController(ControllerBlockToolbarBulk, undefined, undefined);
|
|
25
|
+
return () => {};
|
|
26
|
+
}, prepareComponentOptions(ControllerBlockToolbarBulk.$componentOptions));
|
|
27
|
+
declare module 'zova-module-a-bean' {
|
|
28
|
+
export interface IVonaComponentRecord {
|
|
29
|
+
'basic-details:blockToolbarBulk': ControllerBlockToolbarBulkProps;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -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 { ControllerFormFieldDetailsProps } from '../../component/formFieldDetails/controller.jsx';
|
|
7
|
+
|
|
8
|
+
import { ControllerFormFieldDetails } from '../../component/formFieldDetails/controller.jsx';
|
|
9
|
+
export type ZFormFieldDetailsProps = {
|
|
10
|
+
controllerRef?: (ref: ControllerFormFieldDetails) => void;
|
|
11
|
+
} & ControllerFormFieldDetailsProps;
|
|
12
|
+
|
|
13
|
+
type ControllerInnerProps = TypeControllerInnerProps<
|
|
14
|
+
ControllerFormFieldDetailsProps,
|
|
15
|
+
keyof typeof ControllerFormFieldDetails.$propsDefault
|
|
16
|
+
>;
|
|
17
|
+
declare module 'zova-module-basic-details' {
|
|
18
|
+
export interface ControllerFormFieldDetails {
|
|
19
|
+
$props: ControllerInnerProps;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const ZFormFieldDetails = defineComponent((_props: ZFormFieldDetailsProps) => {
|
|
24
|
+
useController(ControllerFormFieldDetails, undefined, undefined);
|
|
25
|
+
return () => {};
|
|
26
|
+
}, prepareComponentOptions(ControllerFormFieldDetails.$componentOptions));
|
|
27
|
+
declare module 'zova-module-a-bean' {
|
|
28
|
+
export interface IVonaComponentRecord {
|
|
29
|
+
'basic-details:formFieldDetails': ControllerFormFieldDetailsProps;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
// eslint-disable
|
|
2
|
+
/** controller: begin */
|
|
3
|
+
export * from '../component/actionCreate/controller.jsx';
|
|
4
|
+
export * from '../component/blockDetails/controller.jsx';
|
|
5
|
+
export * from '../component/blockTable/controller.jsx';
|
|
6
|
+
export * from '../component/blockToolbarBulk/controller.jsx';
|
|
7
|
+
export * from '../component/formFieldDetails/controller.jsx';
|
|
8
|
+
|
|
9
|
+
import 'zova';
|
|
10
|
+
declare module 'zova' {
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
declare module 'zova-module-basic-details' {
|
|
15
|
+
|
|
16
|
+
export interface ControllerActionCreate {
|
|
17
|
+
/** @internal */
|
|
18
|
+
get scope(): ScopeModuleBasicDetails;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ControllerBlockDetails {
|
|
22
|
+
/** @internal */
|
|
23
|
+
get scope(): ScopeModuleBasicDetails;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ControllerBlockTable {
|
|
27
|
+
/** @internal */
|
|
28
|
+
get scope(): ScopeModuleBasicDetails;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ControllerBlockToolbarBulk {
|
|
32
|
+
/** @internal */
|
|
33
|
+
get scope(): ScopeModuleBasicDetails;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ControllerFormFieldDetails {
|
|
37
|
+
/** @internal */
|
|
38
|
+
get scope(): ScopeModuleBasicDetails;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** controller: end */
|
|
42
|
+
/** controller: begin */
|
|
43
|
+
import { ControllerActionCreate } from '../component/actionCreate/controller.jsx';
|
|
44
|
+
import { ControllerBlockDetails } from '../component/blockDetails/controller.jsx';
|
|
45
|
+
import { ControllerBlockTable } from '../component/blockTable/controller.jsx';
|
|
46
|
+
import { ControllerBlockToolbarBulk } from '../component/blockToolbarBulk/controller.jsx';
|
|
47
|
+
import { ControllerFormFieldDetails } from '../component/formFieldDetails/controller.jsx';
|
|
48
|
+
import 'zova';
|
|
49
|
+
declare module 'zova' {
|
|
50
|
+
export interface IBeanRecordLocal {
|
|
51
|
+
'basic-details.controller.actionCreate': ControllerActionCreate;
|
|
52
|
+
'basic-details.controller.blockDetails': ControllerBlockDetails;
|
|
53
|
+
'basic-details.controller.blockTable': ControllerBlockTable;
|
|
54
|
+
'basic-details.controller.blockToolbarBulk': ControllerBlockToolbarBulk;
|
|
55
|
+
'basic-details.controller.formFieldDetails': ControllerFormFieldDetails;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** controller: end */
|
|
59
|
+
|
|
60
|
+
/** components: begin */
|
|
61
|
+
export * from './component/actionCreate.js';
|
|
62
|
+
import { ZActionCreate } from './component/actionCreate.js';
|
|
63
|
+
export * from './component/blockDetails.js';
|
|
64
|
+
import { ZBlockDetails } from './component/blockDetails.js';
|
|
65
|
+
export * from './component/blockTable.js';
|
|
66
|
+
import { ZBlockTable } from './component/blockTable.js';
|
|
67
|
+
export * from './component/blockToolbarBulk.js';
|
|
68
|
+
import { ZBlockToolbarBulk } from './component/blockToolbarBulk.js';
|
|
69
|
+
export * from './component/formFieldDetails.js';
|
|
70
|
+
import { ZFormFieldDetails } from './component/formFieldDetails.js';
|
|
71
|
+
export const components = {
|
|
72
|
+
'actionCreate': ZActionCreate,
|
|
73
|
+
'blockDetails': ZBlockDetails,
|
|
74
|
+
'blockTable': ZBlockTable,
|
|
75
|
+
'blockToolbarBulk': ZBlockToolbarBulk,
|
|
76
|
+
'formFieldDetails': ZFormFieldDetails,
|
|
77
|
+
};
|
|
78
|
+
import 'zova';
|
|
79
|
+
declare module 'zova' {
|
|
80
|
+
export interface IComponentRecord {
|
|
81
|
+
'basic-details:actionCreate': ControllerActionCreate;
|
|
82
|
+
'basic-details:blockDetails': ControllerBlockDetails;
|
|
83
|
+
'basic-details:blockTable': ControllerBlockTable;
|
|
84
|
+
'basic-details:blockToolbarBulk': ControllerBlockToolbarBulk;
|
|
85
|
+
'basic-details:formFieldDetails': ControllerFormFieldDetails;
|
|
86
|
+
}
|
|
87
|
+
export interface IZovaComponentRecord {
|
|
88
|
+
'basic-details:actionCreate': typeof ZActionCreate;
|
|
89
|
+
'basic-details:blockDetails': typeof ZBlockDetails;
|
|
90
|
+
'basic-details:blockTable': typeof ZBlockTable;
|
|
91
|
+
'basic-details:blockToolbarBulk': typeof ZBlockToolbarBulk;
|
|
92
|
+
'basic-details:formFieldDetails': typeof ZFormFieldDetails;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/** components: end */
|
|
96
|
+
/** tableCell: begin */
|
|
97
|
+
export * from '../bean/tableCell.actionOperationsRow.jsx';
|
|
98
|
+
import { ITableCellOptionsActionOperationsRow } from '../bean/tableCell.actionOperationsRow.jsx';
|
|
99
|
+
import 'zova-module-a-table';
|
|
100
|
+
declare module 'zova-module-a-table' {
|
|
101
|
+
|
|
102
|
+
export interface ITableCellRecord {
|
|
103
|
+
'basic-details:actionOperationsRow': ITableCellOptionsActionOperationsRow;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
}
|
|
108
|
+
declare module 'zova-module-basic-details' {
|
|
109
|
+
|
|
110
|
+
export interface TableCellActionOperationsRow {
|
|
111
|
+
/** @internal */
|
|
112
|
+
get scope(): ScopeModuleBasicDetails;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface TableCellActionOperationsRow {
|
|
116
|
+
get $beanFullName(): 'basic-details.tableCell.actionOperationsRow';
|
|
117
|
+
get $onionName(): 'basic-details:actionOperationsRow';
|
|
118
|
+
get $onionOptions(): ITableCellOptionsActionOperationsRow;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/** tableCell: end */
|
|
122
|
+
/** tableCell: begin */
|
|
123
|
+
import { TableCellActionOperationsRow } from '../bean/tableCell.actionOperationsRow.jsx';
|
|
124
|
+
import 'zova';
|
|
125
|
+
declare module 'zova' {
|
|
126
|
+
export interface IBeanRecordGeneral {
|
|
127
|
+
'basic-details.tableCell.actionOperationsRow': TableCellActionOperationsRow;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/** tableCell: end */
|
|
131
|
+
/** locale: begin */
|
|
132
|
+
import { locales } from './locales.js';
|
|
133
|
+
/** locale: end */
|
|
134
|
+
/** scope: begin */
|
|
135
|
+
import { BeanScopeBase, type BeanScopeUtil, TypeModuleLocales, TypeLocaleBase } from 'zova';
|
|
136
|
+
import { Scope } from 'zova-module-a-bean';
|
|
137
|
+
|
|
138
|
+
@Scope()
|
|
139
|
+
export class ScopeModuleBasicDetails extends BeanScopeBase {}
|
|
140
|
+
|
|
141
|
+
export interface ScopeModuleBasicDetails {
|
|
142
|
+
util: BeanScopeUtil;
|
|
143
|
+
locale: TypeModuleLocales<(typeof locales)[TypeLocaleBase]>;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
import 'zova';
|
|
147
|
+
declare module 'zova' {
|
|
148
|
+
export interface IBeanScopeRecord {
|
|
149
|
+
'basic-details': ScopeModuleBasicDetails;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
export interface IBeanScopeLocale {
|
|
155
|
+
'basic-details': (typeof locales)[TypeLocaleBase];
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): `basic-details::${K}` {
|
|
162
|
+
return `basic-details::${key}`;
|
|
163
|
+
}
|
|
164
|
+
/** scope: end */
|
package/zova/src/suite/cabloy-basic/modules/basic-details/src/bean/tableCell.actionOperationsRow.tsx
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IResourceDetailsActionRowOptionsBase,
|
|
3
|
+
IResourceRenderDetailsActionRowOptionsAction,
|
|
4
|
+
} from 'zova-module-a-openapi';
|
|
5
|
+
import type {
|
|
6
|
+
IJsxRenderContextTableCell,
|
|
7
|
+
ITableCellRender,
|
|
8
|
+
NextTableCellRender,
|
|
9
|
+
} from 'zova-module-a-table';
|
|
10
|
+
|
|
11
|
+
import { BeanBase } from 'zova';
|
|
12
|
+
import { TableCell } from 'zova-module-a-table';
|
|
13
|
+
|
|
14
|
+
declare module 'zova-module-a-openapi' {
|
|
15
|
+
export interface IResourceDetailsActionRowRecord {
|
|
16
|
+
'basic-details:actionOperationsRow'?: ITableCellOptionsActionOperationsRow;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ITableCellOptionsActionOperationsRow extends IResourceDetailsActionRowOptionsBase {
|
|
21
|
+
actions?: IResourceRenderDetailsActionRowOptionsAction[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@TableCell<ITableCellOptionsActionOperationsRow>()
|
|
25
|
+
export class TableCellActionOperationsRow extends BeanBase implements ITableCellRender {
|
|
26
|
+
render(
|
|
27
|
+
_options: ITableCellOptionsActionOperationsRow,
|
|
28
|
+
_renderContext: IJsxRenderContextTableCell,
|
|
29
|
+
next: NextTableCellRender,
|
|
30
|
+
) {
|
|
31
|
+
return <div>sssss</div>;
|
|
32
|
+
return next();
|
|
33
|
+
}
|
|
34
|
+
}
|
package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/actionCreate/controller.tsx
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { IComponentOptions } from 'zova';
|
|
2
|
+
import type {
|
|
3
|
+
IJsxRenderContextDetails,
|
|
4
|
+
IResourceDetailsActionBulkOptionsBase,
|
|
5
|
+
} from 'zova-module-a-openapi';
|
|
6
|
+
|
|
7
|
+
import { BeanControllerBase, Use } from 'zova';
|
|
8
|
+
import { Controller } from 'zova-module-a-bean';
|
|
9
|
+
|
|
10
|
+
declare module 'zova-module-a-openapi' {
|
|
11
|
+
export interface IResourceDetailsActionBulkRecord {
|
|
12
|
+
'basic-details:actionCreate'?: ControllerActionCreateProps;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ControllerActionCreateProps extends IResourceDetailsActionBulkOptionsBase {}
|
|
17
|
+
|
|
18
|
+
@Controller()
|
|
19
|
+
export class ControllerActionCreate extends BeanControllerBase {
|
|
20
|
+
static $propsDefault = { class: 'btn btn-info join-item' };
|
|
21
|
+
static $componentOptions: IComponentOptions = { inheritAttrs: false, deepExtendDefault: true };
|
|
22
|
+
|
|
23
|
+
@Use({ injectionScope: 'host' })
|
|
24
|
+
$$renderContext: IJsxRenderContextDetails;
|
|
25
|
+
|
|
26
|
+
protected async __init__() {}
|
|
27
|
+
|
|
28
|
+
protected render() {
|
|
29
|
+
return (
|
|
30
|
+
<button
|
|
31
|
+
class={this.$props.class}
|
|
32
|
+
type="button"
|
|
33
|
+
onClick={async () => {
|
|
34
|
+
console.log('create');
|
|
35
|
+
// await this.$performCommand('basic-commands:create', this.$props, this.$$renderContext);
|
|
36
|
+
}}
|
|
37
|
+
>
|
|
38
|
+
{this.scope.locale.AddDetail()}
|
|
39
|
+
</button>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockDetails/controller.tsx
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { celEnvBase } from '@cabloy/utils';
|
|
2
|
+
import { VNode } from 'vue';
|
|
3
|
+
import { BeanControllerBase, IComponentOptions } from 'zova';
|
|
4
|
+
import { ZovaJsx } from 'zova-jsx';
|
|
5
|
+
import { Controller } from 'zova-module-a-bean';
|
|
6
|
+
import {
|
|
7
|
+
IDetailsScope,
|
|
8
|
+
IJsxRenderContextDetails,
|
|
9
|
+
IPermissionHintDetailsActionBulk,
|
|
10
|
+
IResourceBlockOptionsBase,
|
|
11
|
+
IResourceRenderBlockOptionsBlock,
|
|
12
|
+
ISchemaObjectExtensionField,
|
|
13
|
+
TypeFormScene,
|
|
14
|
+
} from 'zova-module-a-openapi';
|
|
15
|
+
import { BeanControllerTableBase } from 'zova-module-a-table';
|
|
16
|
+
|
|
17
|
+
declare module 'zova-module-a-openapi' {
|
|
18
|
+
export interface IResourceBlockRecord {
|
|
19
|
+
'basic-details:blockDetails'?: ControllerBlockDetailsProps;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ControllerBlockDetailsProps<
|
|
24
|
+
TData extends {} = {},
|
|
25
|
+
> extends IResourceBlockOptionsBase {
|
|
26
|
+
blocks?: IResourceRenderBlockOptionsBlock[];
|
|
27
|
+
formScene?: TypeFormScene;
|
|
28
|
+
schemaRow?: ISchemaObjectExtensionField;
|
|
29
|
+
getDetailItems?: () => TData[] | undefined;
|
|
30
|
+
setDetailItems?: (detailItems: TData[]) => void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@Controller()
|
|
34
|
+
export class ControllerBlockDetails<TData extends {} = {}> extends BeanControllerBase {
|
|
35
|
+
static $propsDefault = {};
|
|
36
|
+
static $componentOptions: IComponentOptions = { inheritAttrs: false, deepExtendDefault: true };
|
|
37
|
+
|
|
38
|
+
tableRef: BeanControllerTableBase<TData>;
|
|
39
|
+
|
|
40
|
+
jsxZova: ZovaJsx;
|
|
41
|
+
jsxCelScope: IDetailsScope;
|
|
42
|
+
jsxRenderContext: IJsxRenderContextDetails<TData>;
|
|
43
|
+
|
|
44
|
+
protected async __init__() {
|
|
45
|
+
// jsx
|
|
46
|
+
this._prepareJsx();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
get data() {
|
|
50
|
+
return this.$props.getDetailItems?.() ?? [];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
get formScene() {
|
|
54
|
+
return this.$props.formScene!;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
get schemaRow() {
|
|
58
|
+
return this.$props.schemaRow!;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public checkPermission(permissionHint?: IPermissionHintDetailsActionBulk): boolean {
|
|
62
|
+
const formScene = this.formScene;
|
|
63
|
+
const formSceneHint = permissionHint?.formScene;
|
|
64
|
+
if (!formSceneHint) return true;
|
|
65
|
+
if (Array.isArray(formSceneHint) && formSceneHint.includes(formScene!)) return true;
|
|
66
|
+
if (formSceneHint === formScene) return true;
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private _prepareJsx() {
|
|
71
|
+
const jsxCelEnv = celEnvBase.clone();
|
|
72
|
+
this.jsxZova = this.bean._newBeanSimple(ZovaJsx, false, undefined, jsxCelEnv);
|
|
73
|
+
this.jsxCelScope = this._prepareJsxCelScope();
|
|
74
|
+
this.jsxRenderContext = {
|
|
75
|
+
app: this.app,
|
|
76
|
+
ctx: this.ctx,
|
|
77
|
+
$scene: 'details',
|
|
78
|
+
$host: this,
|
|
79
|
+
$celScope: this.jsxCelScope,
|
|
80
|
+
$jsx: this.jsxZova,
|
|
81
|
+
$$details: this,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
private _prepareJsxCelScope(): IDetailsScope {
|
|
86
|
+
return {};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
protected render() {
|
|
90
|
+
return <div class={this.$props.class}>{this._renderBlocks()}</div>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
private _renderBlocks() {
|
|
94
|
+
const blocks = this.$props.blocks;
|
|
95
|
+
if (!blocks || blocks.length === 0) return;
|
|
96
|
+
const domBlocks: VNode[] = [];
|
|
97
|
+
blocks.forEach((block, index) => {
|
|
98
|
+
const options = Object.assign({ key: index }, block.options);
|
|
99
|
+
const domBlock = this.jsxZova.render(
|
|
100
|
+
block.render!,
|
|
101
|
+
options,
|
|
102
|
+
this.jsxCelScope,
|
|
103
|
+
this.jsxRenderContext,
|
|
104
|
+
);
|
|
105
|
+
if (!domBlock) return;
|
|
106
|
+
if (Array.isArray(domBlock)) {
|
|
107
|
+
domBlocks.push(...domBlock);
|
|
108
|
+
} else {
|
|
109
|
+
domBlocks.push(domBlock);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
return domBlocks;
|
|
113
|
+
}
|
|
114
|
+
}
|