zova-cli-set-front 1.2.78 → 1.2.80

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.
@@ -1,6 +1,10 @@
1
- import type { IResourceBlockOptionsBase, IJsxRenderContextPage } from 'zova-module-a-openapi';
1
+ import type { IComponentOptions } from 'zova';
2
+ import type {
3
+ IResourceBlockOptionsBase,
4
+ IJsxRenderContextPage,
5
+ } from 'zova-module-a-openapi';
2
6
 
3
- import { BeanControllerBase, type IComponentOptions, Use } from 'zova';
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 { IResourceBlockOptionsBase, IJsxRenderContextPageEntry } from 'zova-module-a-openapi';
1
+ import type { IComponentOptions } from 'zova';
2
+ import type {
3
+ IResourceBlockOptionsBase,
4
+ IJsxRenderContextPageEntry,
5
+ } from 'zova-module-a-openapi';
2
6
 
3
- import { BeanControllerBase, type IComponentOptions, Use } from 'zova';
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 { IJsxRenderContextPageEntry, IResourceFormActionRowOptionsBase } from 'zova-module-a-openapi';
1
+ import type { IComponentOptions } from 'zova';
2
+ import type {
3
+ IJsxRenderContextPageEntry,
4
+ IResourceFormActionRowOptionsBase,
5
+ } from 'zova-module-a-openapi';
2
6
 
3
- import { BeanControllerBase, type IComponentOptions, Use } from 'zova';
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, type IFormFieldComponentOptions } from 'zova-module-a-form';
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 { IJsxRenderContextPage, IResourceTableActionBulkOptionsBase } from 'zova-module-a-openapi';
1
+ import type { IComponentOptions } from 'zova';
2
+ import type {
3
+ IJsxRenderContextPage,
4
+ IResourceTableActionBulkOptionsBase,
5
+ } from 'zova-module-a-openapi';
2
6
 
3
- import { BeanControllerBase, type IComponentOptions, Use } from 'zova';
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' {
@@ -4,17 +4,21 @@ import type {
4
4
  IResourceFormFieldRecord,
5
5
  IResourceTableCellRecord,
6
6
  IResourceTableActionRowRecord,
7
+ IResourceDetailsActionRowRecord,
7
8
  IResourceFormActionRowRecord,
8
9
  IResourceTableActionBulkRecord,
10
+ IResourceDetailsActionBulkRecord,
9
11
  IResourceBlockRecord,
10
12
  TypeFormSchemaScene,
11
13
  IResourceRenderTableActionRowOptionsAction,
12
14
  IResourceRenderFormActionRowOptionsAction,
13
15
  IResourceRenderTableActionBulkOptionsAction,
16
+ IResourceRenderDetailsActionBulkOptionsAction,
14
17
  IResourceRenderBlockOptionsBlock,
15
18
  IResourceTableActionRowOptionsBase,
16
19
  IResourceFormActionRowOptionsBase,
17
20
  IResourceTableActionBulkOptionsBase,
21
+ IResourceDetailsActionBulkOptionsBase,
18
22
  } from 'zova-module-a-openapi';
19
23
 
20
24
  import { _generalSchemaRest, _toLowerCaseFirstChar } from './inner.ts';
@@ -41,9 +45,9 @@ export function schemaRenderFieldJsx<T extends z.ZodType>(
41
45
  }
42
46
 
43
47
  export function schemaRenderCell<
44
- K extends keyof (IResourceTableCellRecord & IResourceTableActionRowRecord),
48
+ K extends keyof (IResourceTableCellRecord & IResourceTableActionRowRecord & IResourceDetailsActionRowRecord),
45
49
  T extends z.ZodType,
46
- >(render: K, options?: (IResourceTableCellRecord & IResourceTableActionRowRecord)[K]) {
50
+ >(render: K, options?: (IResourceTableCellRecord & IResourceTableActionRowRecord & IResourceDetailsActionRowRecord)[K]) {
47
51
  return function (schema: T): T {
48
52
  const options2 = options !== undefined ? { render, columnProps: options } : { render };
49
53
  return _generalSchemaRest(schema, options2, 'table');
@@ -120,6 +124,25 @@ export function schemaRenderTableActionBulkJsx(
120
124
  return { render: renderComponentJsx, options };
121
125
  }
122
126
 
127
+ export function schemaRenderDetailsActionBulk<K extends keyof IResourceDetailsActionBulkRecord>(
128
+ render: K,
129
+ options?: IResourceDetailsActionBulkRecord[K],
130
+ ): IResourceRenderDetailsActionBulkOptionsAction {
131
+ const pos = render.toString().indexOf(':action');
132
+ const name =
133
+ pos > -1
134
+ ? _toLowerCaseFirstChar(render.toString().substring(pos + ':action'.length))
135
+ : undefined;
136
+ return { $$typeof: 'zova-jsx:actionBulk', name, render, options };
137
+ }
138
+
139
+ export function schemaRenderDetailsActionBulkJsx(
140
+ renderComponentJsx: TypeRenderComponentJsx,
141
+ options?: Pick<IResourceDetailsActionBulkOptionsBase, 'permission'>,
142
+ ) {
143
+ return { render: renderComponentJsx, options };
144
+ }
145
+
123
146
  export function schemaRenderBlock<K extends keyof IResourceBlockRecord>(
124
147
  render: K,
125
148
  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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zova-cli-set-front",
3
- "version": "1.2.78",
4
- "gitHead": "69a9c7e1a934ea08b8c8b1dbb3066e47dbaf270f",
3
+ "version": "1.2.80",
4
+ "gitHead": "8a5eaa9acbe309605e0843db38fc1942fdc1f3d5",
5
5
  "description": "zova cli-set-front",
6
6
  "keywords": [
7
7
  "framework",