vona-module-a-openapi 5.0.68 → 5.0.70
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/dist/types/actions.d.ts +2 -1
- package/dist/types/formProvider.d.ts +18 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/openapi.d.ts +6 -0
- package/dist/types/resource.d.ts +2 -0
- package/dist/types/resourceMeta.d.ts +33 -0
- package/dist/types/rest.d.ts +6 -6
- package/dist/types/tableProvider.d.ts +8 -0
- package/package.json +1 -1
package/dist/types/actions.d.ts
CHANGED
|
@@ -4,12 +4,13 @@ export interface IResourceActionRowOptions {
|
|
|
4
4
|
}
|
|
5
5
|
export interface TypeResourceActionTableRecord {
|
|
6
6
|
create: IResourceActionTableOptions;
|
|
7
|
+
operationsTable: IResourceActionTableOptions;
|
|
7
8
|
}
|
|
8
9
|
export interface TypeResourceActionRowRecord {
|
|
9
10
|
view: IResourceActionRowOptions;
|
|
10
11
|
update: IResourceActionRowOptions;
|
|
11
12
|
delete: IResourceActionRowOptions;
|
|
12
|
-
|
|
13
|
+
operationsRow: IResourceActionRowOptions;
|
|
13
14
|
}
|
|
14
15
|
export type TypeResourceActionRowRecordRender = {
|
|
15
16
|
[key in keyof TypeResourceActionRowRecord as `action${Capitalize<key>}`]: TypeResourceActionRowRecord[key];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TypeBehaviorRecordSelectorKeys, TypeBehaviorRecordSelectorKeysStrict } from './behavior.ts';
|
|
2
|
+
import type { TypeComponentRecordSelectorKeysStrict } from './component.ts';
|
|
3
|
+
import type { TypeFormFieldRenderComponentProvider } from './rest.ts';
|
|
4
|
+
export interface IFormProviderBehaviors {
|
|
5
|
+
formField?: TypeBehaviorRecordSelectorKeysStrict<'formField'>;
|
|
6
|
+
formFieldModel?: TypeBehaviorRecordSelectorKeys<'formFieldModel'>;
|
|
7
|
+
formFieldLayout?: TypeBehaviorRecordSelectorKeys<'formFieldLayout'>;
|
|
8
|
+
}
|
|
9
|
+
export interface IFormProviderComponents {
|
|
10
|
+
formField?: TypeComponentRecordSelectorKeysStrict<'formField'>;
|
|
11
|
+
text?: TypeFormFieldRenderComponentProvider;
|
|
12
|
+
password?: TypeFormFieldRenderComponentProvider;
|
|
13
|
+
currency?: TypeFormFieldRenderComponentProvider;
|
|
14
|
+
}
|
|
15
|
+
export interface IFormProvider {
|
|
16
|
+
components?: IFormProviderComponents;
|
|
17
|
+
behaviors?: IFormProviderBehaviors;
|
|
18
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,4 +5,9 @@ export * from './captcha.ts';
|
|
|
5
5
|
export * from './component.ts';
|
|
6
6
|
export * from './date.ts';
|
|
7
7
|
export * from './decorator.ts';
|
|
8
|
+
export * from './formProvider.ts';
|
|
9
|
+
export * from './openapi.ts';
|
|
10
|
+
export * from './resource.ts';
|
|
11
|
+
export * from './resourceMeta.ts';
|
|
8
12
|
export * from './rest.ts';
|
|
13
|
+
export * from './tableProvider.ts';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TypeComponentRecordSelectorKeysStrict, TypeResourceActionRowRecord, TypeResourceActionTableRecord } from 'vona-module-a-openapi';
|
|
2
|
+
import type { IFormProvider } from './formProvider.ts';
|
|
3
|
+
import type { ITableProvider } from './tableProvider.ts';
|
|
4
|
+
export interface IOpenapiOptionsResourceMeta {
|
|
5
|
+
permissions?: IOpenapiOptionsResourceMetaPermissions;
|
|
6
|
+
provider?: IOpenapiOptionsResourceMetaProvider;
|
|
7
|
+
form?: IOpenapiOptionsResourceMetaForm;
|
|
8
|
+
table?: IOpenapiOptionsResourceMetaTable;
|
|
9
|
+
}
|
|
10
|
+
export interface IOpenapiOptionsResourceMetaForm {
|
|
11
|
+
provider?: IFormProvider;
|
|
12
|
+
}
|
|
13
|
+
export interface IOpenapiOptionsResourceMetaTable {
|
|
14
|
+
provider?: ITableProvider;
|
|
15
|
+
}
|
|
16
|
+
export interface IOpenapiOptionsResourceMetaPermissions {
|
|
17
|
+
table?: TypeOpenApiOptionsRestResourcePermissionsTable;
|
|
18
|
+
row?: TypeOpenApiOptionsRestResourcePermissionsRow;
|
|
19
|
+
}
|
|
20
|
+
export type TypeOpenApiOptionsRestResourcePermissionsTable = {
|
|
21
|
+
[key in keyof TypeResourceActionTableRecord]?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type TypeOpenApiOptionsRestResourcePermissionsRow = {
|
|
24
|
+
[key in keyof TypeResourceActionRowRecord]?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export interface IOpenapiOptionsResourceMetaProvider {
|
|
27
|
+
components?: IOpenapiOptionsResourceMetaProviderComponents;
|
|
28
|
+
}
|
|
29
|
+
export interface IOpenapiOptionsResourceMetaProviderComponents {
|
|
30
|
+
restPage?: TypeComponentRecordSelectorKeysStrict<'restPage'>;
|
|
31
|
+
table?: TypeComponentRecordSelectorKeysStrict<'table'>;
|
|
32
|
+
form?: TypeComponentRecordSelectorKeysStrict<'form'>;
|
|
33
|
+
}
|
package/dist/types/rest.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ZodOpenAPIMetadata } from '@cabloy/zod-to-openapi';
|
|
2
2
|
import type { CurrencyOptions } from '@zhennann/currency';
|
|
3
3
|
import type { ILocaleMagic } from 'vona';
|
|
4
|
-
import type {
|
|
4
|
+
import type { IOpenapiOptions } from 'vona-module-a-openapiutils';
|
|
5
5
|
import type { z } from 'zod';
|
|
6
6
|
import type { TypeResourceActionRowRecordRender } from './actions.ts';
|
|
7
7
|
import type { ISchemaObjectExtensionFieldCaptcha } from './captcha.ts';
|
|
@@ -10,8 +10,8 @@ import type { TypeDateFormat } from './date.ts';
|
|
|
10
10
|
import 'openapi3-ts/oas30';
|
|
11
11
|
import 'openapi3-ts/oas31';
|
|
12
12
|
export type HTMLInputElementType = 'text' | 'password' | 'number' | 'file' | 'hidden' | 'tel' | 'email';
|
|
13
|
-
export type
|
|
14
|
-
export type
|
|
13
|
+
export type TypeFormFieldOnSetDisplayValue = (value: any) => any;
|
|
14
|
+
export type TypeFormFieldDisplayValueUpdateTiming = 'input' | 'change';
|
|
15
15
|
export interface ISchemaObjectExtensionFieldRestProps {
|
|
16
16
|
visible?: boolean;
|
|
17
17
|
order?: number;
|
|
@@ -25,8 +25,8 @@ export interface ISchemaObjectExtensionFieldRestProps {
|
|
|
25
25
|
header?: TypeRenderComponentJsx | string;
|
|
26
26
|
footer?: TypeRenderComponentJsx | string;
|
|
27
27
|
displayValue?: any;
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
displayValueUpdateTiming?: TypeFormFieldDisplayValueUpdateTiming;
|
|
29
|
+
onSetDisplayValue?: TypeFormFieldOnSetDisplayValue;
|
|
30
30
|
class?: any;
|
|
31
31
|
placeholder?: string;
|
|
32
32
|
readonly?: boolean;
|
|
@@ -81,5 +81,5 @@ export type TypeEntityOptionsFields<T extends {}, More extends string | undefine
|
|
|
81
81
|
[key in ((keyof T) | (More extends string ? More : never))]?: TypeOpenapiMetadata | z.ZodType;
|
|
82
82
|
};
|
|
83
83
|
export type TypeControllerOptionsActions<T extends {}> = {
|
|
84
|
-
[key in (keyof T)]?:
|
|
84
|
+
[key in (keyof T)]?: IOpenapiOptions;
|
|
85
85
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TypeTableCellRenderComponentProvider } from './rest.ts';
|
|
2
|
+
export interface ITableProviderComponents {
|
|
3
|
+
actionView?: TypeTableCellRenderComponentProvider;
|
|
4
|
+
currency?: TypeTableCellRenderComponentProvider;
|
|
5
|
+
}
|
|
6
|
+
export interface ITableProvider {
|
|
7
|
+
components?: ITableProviderComponents;
|
|
8
|
+
}
|