zova-cli-set-front 1.2.78 → 1.2.79
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/cli/templates/create/component/boilerplateBlockPage/controller.tsx_ +6 -2
- package/cli/templates/create/component/boilerplateBlockPageEntry/controller.tsx_ +6 -2
- package/cli/templates/create/component/boilerplateFormActionRow/controller.tsx_ +6 -2
- package/cli/templates/create/component/boilerplateFormField/controller.tsx_ +2 -1
- package/cli/templates/create/component/boilerplateTableActionBulk/controller.tsx_ +6 -2
- package/cli/templates/rest/component.ts +22 -0
- package/cli/templates/rest/render.ts +4 -0
- package/package.json +2 -2
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IComponentOptions } from 'zova';
|
|
2
|
+
import type {
|
|
3
|
+
IResourceBlockOptionsBase,
|
|
4
|
+
IJsxRenderContextPage,
|
|
5
|
+
} from 'zova-module-a-openapi';
|
|
2
6
|
|
|
3
|
-
import { BeanControllerBase,
|
|
7
|
+
import { BeanControllerBase, Use } from 'zova';
|
|
4
8
|
import { Controller } from 'zova-module-a-bean';
|
|
5
9
|
|
|
6
10
|
declare module 'zova-module-a-openapi' {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IComponentOptions } from 'zova';
|
|
2
|
+
import type {
|
|
3
|
+
IResourceBlockOptionsBase,
|
|
4
|
+
IJsxRenderContextPageEntry,
|
|
5
|
+
} from 'zova-module-a-openapi';
|
|
2
6
|
|
|
3
|
-
import { BeanControllerBase,
|
|
7
|
+
import { BeanControllerBase, Use } from 'zova';
|
|
4
8
|
import { Controller } from 'zova-module-a-bean';
|
|
5
9
|
|
|
6
10
|
declare module 'zova-module-a-openapi' {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IComponentOptions } from 'zova';
|
|
2
|
+
import type {
|
|
3
|
+
IJsxRenderContextPageEntry,
|
|
4
|
+
IResourceFormActionRowOptionsBase,
|
|
5
|
+
} from 'zova-module-a-openapi';
|
|
2
6
|
|
|
3
|
-
import { BeanControllerBase,
|
|
7
|
+
import { BeanControllerBase, Use } from 'zova';
|
|
4
8
|
import { Controller } from 'zova-module-a-bean';
|
|
5
9
|
|
|
6
10
|
declare module 'zova-module-a-openapi' {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { IComponentOptions } from 'zova';
|
|
2
|
+
import type { IFormFieldComponentOptions } from 'zova-module-a-form';
|
|
2
3
|
import type { IResourceFormFieldOptionsBase } from 'zova-module-a-openapi';
|
|
3
4
|
|
|
4
5
|
import { BeanControllerBase } from 'zova';
|
|
5
6
|
import { Controller } from 'zova-module-a-bean';
|
|
6
|
-
import { ZFormField
|
|
7
|
+
import { ZFormField } from 'zova-module-a-form';
|
|
7
8
|
|
|
8
9
|
declare module 'zova-module-a-openapi' {
|
|
9
10
|
export interface IResourceFormFieldRecord {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IComponentOptions } from 'zova';
|
|
2
|
+
import type {
|
|
3
|
+
IJsxRenderContextPage,
|
|
4
|
+
IResourceTableActionBulkOptionsBase,
|
|
5
|
+
} from 'zova-module-a-openapi';
|
|
2
6
|
|
|
3
|
-
import { BeanControllerBase,
|
|
7
|
+
import { BeanControllerBase, Use } from 'zova';
|
|
4
8
|
import { Controller } from 'zova-module-a-bean';
|
|
5
9
|
|
|
6
10
|
declare module 'zova-module-a-openapi' {
|
|
@@ -6,15 +6,18 @@ import type {
|
|
|
6
6
|
IResourceTableActionRowRecord,
|
|
7
7
|
IResourceFormActionRowRecord,
|
|
8
8
|
IResourceTableActionBulkRecord,
|
|
9
|
+
IResourceDetailsActionBulkRecord,
|
|
9
10
|
IResourceBlockRecord,
|
|
10
11
|
TypeFormSchemaScene,
|
|
11
12
|
IResourceRenderTableActionRowOptionsAction,
|
|
12
13
|
IResourceRenderFormActionRowOptionsAction,
|
|
13
14
|
IResourceRenderTableActionBulkOptionsAction,
|
|
15
|
+
IResourceRenderDetailsActionBulkOptionsAction,
|
|
14
16
|
IResourceRenderBlockOptionsBlock,
|
|
15
17
|
IResourceTableActionRowOptionsBase,
|
|
16
18
|
IResourceFormActionRowOptionsBase,
|
|
17
19
|
IResourceTableActionBulkOptionsBase,
|
|
20
|
+
IResourceDetailsActionBulkOptionsBase,
|
|
18
21
|
} from 'zova-module-a-openapi';
|
|
19
22
|
|
|
20
23
|
import { _generalSchemaRest, _toLowerCaseFirstChar } from './inner.ts';
|
|
@@ -120,6 +123,25 @@ export function schemaRenderTableActionBulkJsx(
|
|
|
120
123
|
return { render: renderComponentJsx, options };
|
|
121
124
|
}
|
|
122
125
|
|
|
126
|
+
export function schemaRenderDetailsActionBulk<K extends keyof IResourceDetailsActionBulkRecord>(
|
|
127
|
+
render: K,
|
|
128
|
+
options?: IResourceDetailsActionBulkRecord[K],
|
|
129
|
+
): IResourceRenderDetailsActionBulkOptionsAction {
|
|
130
|
+
const pos = render.toString().indexOf(':action');
|
|
131
|
+
const name =
|
|
132
|
+
pos > -1
|
|
133
|
+
? _toLowerCaseFirstChar(render.toString().substring(pos + ':action'.length))
|
|
134
|
+
: undefined;
|
|
135
|
+
return { $$typeof: 'zova-jsx:actionBulk', name, render, options };
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function schemaRenderDetailsActionBulkJsx(
|
|
139
|
+
renderComponentJsx: TypeRenderComponentJsx,
|
|
140
|
+
options?: Pick<IResourceDetailsActionBulkOptionsBase, 'permission'>,
|
|
141
|
+
) {
|
|
142
|
+
return { render: renderComponentJsx, options };
|
|
143
|
+
}
|
|
144
|
+
|
|
123
145
|
export function schemaRenderBlock<K extends keyof IResourceBlockRecord>(
|
|
124
146
|
render: K,
|
|
125
147
|
options?: IResourceBlockRecord[K],
|
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
schemaRenderBlockJsx,
|
|
4
4
|
schemaRenderCell,
|
|
5
5
|
schemaRenderCellJsx,
|
|
6
|
+
schemaRenderDetailsActionBulk,
|
|
7
|
+
schemaRenderDetailsActionBulkJsx,
|
|
6
8
|
schemaRenderField,
|
|
7
9
|
schemaRenderFieldJsx,
|
|
8
10
|
schemaRenderFormActionRow,
|
|
@@ -40,6 +42,8 @@ export const ZovaRender = {
|
|
|
40
42
|
formActionRowJsx: schemaRenderFormActionRowJsx,
|
|
41
43
|
tableActionBulk: schemaRenderTableActionBulk,
|
|
42
44
|
tableActionBulkJsx: schemaRenderTableActionBulkJsx,
|
|
45
|
+
detailsActionBulk: schemaRenderDetailsActionBulk,
|
|
46
|
+
detailsActionBulkJsx: schemaRenderDetailsActionBulkJsx,
|
|
43
47
|
block: schemaRenderBlock,
|
|
44
48
|
blockJsx: schemaRenderBlockJsx,
|
|
45
49
|
};
|
package/package.json
CHANGED