vona-module-a-openapi 5.0.66 → 5.0.67

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,5 +1,7 @@
1
1
  export interface IComponentRecord {
2
2
  }
3
+ export interface ITableCellComponentRecord {
4
+ }
3
5
  export type TypeComponentRecordSelector<PREFIX extends string> = {
4
6
  [K in keyof IComponentRecord as K extends `${string}:${PREFIX}${string}` ? K : never]: IComponentRecord[K];
5
7
  };
@@ -0,0 +1,4 @@
1
+ export type TypeDateFormatPreset = 'DATE_SHORT' | 'DATE_MED' | 'DATE_MED_WITH_WEEKDAY' | 'DATE_FULL' | 'DATE_HUGE' | 'TIME_SIMPLE' | 'TIME_WITH_SECONDS' | 'TIME_WITH_SHORT_OFFSET' | 'TIME_WITH_LONG_OFFSET' | 'TIME_24_SIMPLE' | 'TIME_24_WITH_SECONDS' | 'TIME_24_WITH_SHORT_OFFSET' | 'TIME_24_WITH_LONG_OFFSET' | 'DATETIME_SHORT' | 'DATETIME_MED' | 'DATETIME_MED_WITH_WEEKDAY' | 'DATETIME_FULL' | 'DATETIME_HUGE' | 'DATETIME_SHORT_WITH_SECONDS' | 'DATETIME_MED_WITH_SECONDS' | 'DATETIME_FULL_WITH_SECONDS' | 'DATETIME_HUGE_WITH_SECONDS';
2
+ export type TypeDateFormat = {
3
+ preset: TypeDateFormatPreset;
4
+ } | string;
@@ -3,5 +3,6 @@ export * from './actions.ts';
3
3
  export * from './behavior.ts';
4
4
  export * from './captcha.ts';
5
5
  export * from './component.ts';
6
+ export * from './date.ts';
6
7
  export * from './decorator.ts';
7
8
  export * from './rest.ts';
@@ -1,13 +1,17 @@
1
1
  import type { ZodOpenAPIMetadata } from '@cabloy/zod-to-openapi';
2
+ import type { CurrencyOptions } from '@zhennann/currency';
2
3
  import type { ILocaleMagic } from 'vona';
3
4
  import type { IOpenApiOptions } from 'vona-module-a-openapiutils';
4
5
  import type { z } from 'zod';
5
6
  import type { TypeResourceActionRowRecordRender } from './actions.ts';
6
7
  import type { ISchemaObjectExtensionFieldCaptcha } from './captcha.ts';
7
- import type { IComponentRecord } from './component.ts';
8
+ import type { IComponentRecord, ITableCellComponentRecord } from './component.ts';
9
+ import type { TypeDateFormat } from './date.ts';
8
10
  import 'openapi3-ts/oas30';
9
11
  import 'openapi3-ts/oas31';
10
12
  export type HTMLInputElementType = 'text' | 'password' | 'number' | 'file' | 'hidden' | 'tel' | 'email';
13
+ export type TypeFormFieldOnDisplayValueUpdate = (value: any) => any;
14
+ export type TypeFormFieldOnhandleDisplayValueUpdateMode = 'input' | 'change';
11
15
  export interface ISchemaObjectExtensionFieldRestProps {
12
16
  visible?: boolean;
13
17
  order?: number;
@@ -21,15 +25,20 @@ export interface ISchemaObjectExtensionFieldRestProps {
21
25
  header?: TypeRenderComponentJsx | string;
22
26
  footer?: TypeRenderComponentJsx | string;
23
27
  displayValue?: any;
28
+ onDisplayValueUpdate?: TypeFormFieldOnDisplayValueUpdate;
29
+ handleDisplayValueUpdateMode?: TypeFormFieldOnhandleDisplayValueUpdateMode;
24
30
  class?: any;
25
31
  placeholder?: string;
26
32
  readonly?: boolean;
27
33
  inputType?: HTMLInputElementType;
34
+ currency?: CurrencyOptions;
35
+ dateFormat?: TypeDateFormat;
28
36
  }
29
37
  export interface ISchemaObjectExtensionFieldRest extends ISchemaObjectExtensionFieldRestProps {
30
38
  render?: TypeRenderComponentPreset;
31
39
  table?: ISchemaObjectExtensionFieldRestScene;
32
40
  form?: ISchemaObjectExtensionFieldRestScene;
41
+ filter?: ISchemaObjectExtensionFieldRestScene;
33
42
  }
34
43
  export interface ISchemaObjectExtensionFieldRestScene extends ISchemaObjectExtensionFieldRestProps {
35
44
  render?: TypeRenderComponent;
@@ -59,10 +68,11 @@ export interface TypeRenderComponentJsx {
59
68
  key?: string | null;
60
69
  props?: TypeRenderComponentJsxProps;
61
70
  }
62
- export type TypeRenderComponentPreset = keyof TypeResourceActionRowRecordRender | 'text' | 'currency' | 'textarea' | 'select' | 'checkbox' | 'radio' | 'switch' | 'image' | 'file' | 'color' | 'password' | 'email' | 'url';
71
+ export type TypeSchemaScene = 'table' | 'form' | 'filter';
72
+ export type TypeRenderComponentPreset = keyof TypeResourceActionRowRecordRender | 'text' | 'currency' | 'date' | 'dateRange' | 'textarea' | 'select' | 'checkbox' | 'radio' | 'switch' | 'image' | 'file' | 'color' | 'password' | 'email' | 'url';
63
73
  export type TypeRenderComponent = TypeRenderComponentPreset | TypeRenderComponentJsx;
64
- export type TypeRenderComponentProvider = (keyof IComponentRecord) | 'input' | 'textarea' | 'select';
65
- export type TypeSchemaScene = 'table' | 'form';
74
+ export type TypeFormFieldRenderComponentProvider = (keyof IComponentRecord) | 'input' | 'textarea' | 'select';
75
+ export type TypeTableCellRenderComponentProvider = (keyof IComponentRecord) | (keyof ITableCellComponentRecord) | 'text';
66
76
  export type TypeOpenapiMetadata<T extends z.ZodType = z.ZodType> = Omit<Partial<ZodOpenAPIMetadata<z.input<T>>>, 'title' | 'description'> & {
67
77
  title?: string | ILocaleMagic;
68
78
  description?: string | ILocaleMagic;
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "vona-module-a-openapi",
3
3
  "type": "module",
4
- "version": "5.0.66",
4
+ "version": "5.0.67",
5
5
  "title": "a-openapi",
6
6
  "vonaModule": {
7
7
  "capabilities": {
8
8
  "preload": true
9
9
  },
10
- "dependencies": {},
10
+ "dependencies": {
11
+ "a-openapiutils": "5.0.0"
12
+ },
11
13
  "globalDependencies": {
12
14
  "@cabloy/zod-openapi": true,
13
15
  "@cabloy/zod-to-openapi": true,