zova-module-a-openapi 5.1.10 → 5.1.12

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.
Files changed (87) hide show
  1. package/dist/.metadata/index.d.ts +23 -0
  2. package/dist/.metadata/index.d.ts.map +1 -1
  3. package/dist/bean/bean.resourceProviders.d.ts +8 -0
  4. package/dist/bean/bean.resourceProviders.d.ts.map +1 -0
  5. package/dist/bean/sys.sdk.d.ts.map +1 -1
  6. package/dist/config/config.d.ts +2 -3
  7. package/dist/config/config.d.ts.map +1 -1
  8. package/dist/index.js +53 -47
  9. package/dist/index.js.map +1 -1
  10. package/dist/lib/schema.d.ts +1 -1
  11. package/dist/lib/schema.d.ts.map +1 -1
  12. package/dist/model/sdk.d.ts +2 -2
  13. package/dist/model/sdk.d.ts.map +1 -1
  14. package/dist/monkey.d.ts.map +1 -1
  15. package/dist/types/action.d.ts +17 -4
  16. package/dist/types/action.d.ts.map +1 -1
  17. package/dist/types/actions.d.ts +49 -13
  18. package/dist/types/actions.d.ts.map +1 -1
  19. package/dist/types/blocks.d.ts +13 -0
  20. package/dist/types/blocks.d.ts.map +1 -0
  21. package/dist/types/fieldLayout.d.ts +3 -0
  22. package/dist/types/fieldLayout.d.ts.map +1 -0
  23. package/dist/types/formField.d.ts +9 -0
  24. package/dist/types/formField.d.ts.map +1 -0
  25. package/dist/types/formMeta.d.ts +9 -0
  26. package/dist/types/formMeta.d.ts.map +1 -0
  27. package/dist/types/index.d.ts +8 -8
  28. package/dist/types/index.d.ts.map +1 -1
  29. package/dist/types/jsx.d.ts +3 -3
  30. package/dist/types/jsx.d.ts.map +1 -1
  31. package/dist/types/performAction.d.ts +14 -0
  32. package/dist/types/performAction.d.ts.map +1 -0
  33. package/dist/types/permissions.d.ts +3 -7
  34. package/dist/types/permissions.d.ts.map +1 -1
  35. package/dist/types/resourceProviders.d.ts +54 -0
  36. package/dist/types/resourceProviders.d.ts.map +1 -0
  37. package/dist/types/rest.d.ts +33 -29
  38. package/dist/types/rest.d.ts.map +1 -1
  39. package/dist/types/schema.d.ts.map +1 -1
  40. package/dist/types/sdk.d.ts +0 -2
  41. package/dist/types/sdk.d.ts.map +1 -1
  42. package/dist/types/tableCell.d.ts +13 -0
  43. package/dist/types/tableCell.d.ts.map +1 -0
  44. package/package.json +6 -5
  45. package/src/.metadata/index.ts +31 -0
  46. package/src/bean/bean.resourceProviders.ts +34 -0
  47. package/src/bean/sys.sdk.ts +11 -2
  48. package/src/config/config.ts +2 -33
  49. package/src/lib/schema.ts +11 -6
  50. package/src/model/sdk.ts +5 -8
  51. package/src/monkey.ts +5 -1
  52. package/src/types/action.ts +24 -4
  53. package/src/types/actions.ts +60 -13
  54. package/src/types/blocks.ts +14 -0
  55. package/src/types/fieldLayout.ts +1 -0
  56. package/src/types/formField.ts +9 -0
  57. package/src/types/formMeta.ts +9 -0
  58. package/src/types/index.ts +8 -8
  59. package/src/types/jsx.ts +4 -4
  60. package/src/types/performAction.ts +15 -0
  61. package/src/types/permissions.ts +4 -7
  62. package/src/types/resourceProviders.ts +65 -0
  63. package/src/types/rest.ts +64 -53
  64. package/src/types/schema.ts +3 -1
  65. package/src/types/sdk.ts +0 -2
  66. package/src/types/tableCell.ts +14 -0
  67. package/dist/types/captcha.d.ts +0 -15
  68. package/dist/types/captcha.d.ts.map +0 -1
  69. package/dist/types/date.d.ts +0 -5
  70. package/dist/types/date.d.ts.map +0 -1
  71. package/dist/types/resourceMeta.d.ts +0 -32
  72. package/dist/types/resourceMeta.d.ts.map +0 -1
  73. package/dist/types/resourcePicker.d.ts +0 -10
  74. package/dist/types/resourcePicker.d.ts.map +0 -1
  75. package/dist/types/select.d.ts +0 -16
  76. package/dist/types/select.d.ts.map +0 -1
  77. package/dist/types/textarea.d.ts +0 -11
  78. package/dist/types/textarea.d.ts.map +0 -1
  79. package/dist/types/toggle.d.ts +0 -4
  80. package/dist/types/toggle.d.ts.map +0 -1
  81. package/src/types/captcha.ts +0 -16
  82. package/src/types/date.ts +0 -25
  83. package/src/types/resourceMeta.ts +0 -37
  84. package/src/types/resourcePicker.ts +0 -10
  85. package/src/types/select.ts +0 -16
  86. package/src/types/textarea.ts +0 -10
  87. package/src/types/toggle.ts +0 -3
@@ -1,18 +1,54 @@
1
- export interface IResourceActionTableOptions {
1
+ import { TableIdentity } from 'table-identity';
2
+ import { types } from 'typestyle';
3
+ import { TypeRenderComponentJsx } from 'zova-jsx';
4
+ import type { TypeFormScene } from './formMeta.ts';
5
+ export type IResourceActionBulkRecord = {
6
+ [KEY in keyof IResourceComponentActionBulkRecord as KEY extends `Action${infer Rest}` ? Uncapitalize<Rest> : KEY]: IResourceComponentActionBulkRecord[KEY];
7
+ };
8
+ export type IResourceActionRowRecord = {
9
+ [KEY in keyof IResourceComponentActionRowRecord as KEY extends `Action${infer Rest}` ? Uncapitalize<Rest> : KEY]: IResourceComponentActionRowRecord[KEY];
10
+ };
11
+ export interface IResourceActionTableRecord extends IResourceActionBulkRecord, IResourceActionRowRecord {
2
12
  }
3
- export interface IResourceActionRowOptions {
13
+ export interface IResourceComponentActionBulkRecord {
4
14
  }
5
- export interface TypeResourceActionTableRecord {
6
- create: IResourceActionTableOptions;
7
- operationsTable: IResourceActionTableOptions;
15
+ export interface IResourceComponentActionRowRecord {
8
16
  }
9
- export interface TypeResourceActionRowRecord {
10
- view: IResourceActionRowOptions;
11
- update: IResourceActionRowOptions;
12
- delete: IResourceActionRowOptions;
13
- operationsRow: IResourceActionRowOptions;
17
+ export interface IResourceComponentActionTableRecord extends IResourceComponentActionBulkRecord, IResourceComponentActionRowRecord {
18
+ }
19
+ export interface IPermissionHint {
20
+ action?: string;
21
+ public?: boolean;
22
+ formScene?: TypeFormScene | TypeFormScene[];
23
+ }
24
+ export interface IResourceActionBulkOptionsBase {
25
+ class?: any;
26
+ style?: types.NestedCSSProperties;
27
+ resource?: string;
28
+ permission?: {
29
+ action?: keyof IResourceActionBulkRecord;
30
+ public?: boolean;
31
+ };
32
+ }
33
+ export interface IResourceActionRowOptionsBase {
34
+ class?: any;
35
+ style?: types.NestedCSSProperties;
36
+ resource?: string;
37
+ id?: TableIdentity;
38
+ permission?: {
39
+ action?: keyof IResourceActionRowRecord;
40
+ public?: boolean;
41
+ formScene?: TypeFormScene | TypeFormScene[];
42
+ };
43
+ }
44
+ export interface IResourceComponentActionBulkOptionsAction {
45
+ name: keyof IResourceActionBulkRecord;
46
+ render?: keyof IResourceComponentActionBulkRecord | TypeRenderComponentJsx;
47
+ options?: IResourceActionBulkOptionsBase;
48
+ }
49
+ export interface IResourceComponentActionRowOptionsAction {
50
+ name: keyof IResourceActionRowRecord;
51
+ render?: keyof IResourceComponentActionRowRecord | TypeRenderComponentJsx;
52
+ options?: IResourceActionRowOptionsBase;
14
53
  }
15
- export type TypeResourceActionRowRecordRender = {
16
- [key in keyof TypeResourceActionRowRecord as `action${Capitalize<key>}`]: TypeResourceActionRowRecord[key];
17
- };
18
54
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/types/actions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,2BAA2B;CAAG;AAC/C,MAAM,WAAW,yBAAyB;CAAG;AAE7C,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,2BAA2B,CAAC;IACpC,eAAe,EAAE,2BAA2B,CAAC;CAC9C;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,yBAAyB,CAAC;IAChC,MAAM,EAAE,yBAAyB,CAAC;IAClC,MAAM,EAAE,yBAAyB,CAAC;IAClC,aAAa,EAAE,yBAAyB,CAAC;CAC1C;AAED,MAAM,MAAM,iCAAiC,GAAG;KAC7C,GAAG,IAAI,MAAM,2BAA2B,IAAI,SAAS,UAAU,CAAC,GAAG,CAAC,EAAE,GAAG,2BAA2B,CAAC,GAAG,CAAC;CAC3G,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/types/actions.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;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,aAAa,CAAC;IACnB,UAAU,CAAC,EAAE;QACX,MAAM,CAAC,EAAE,MAAM,wBAAwB,CAAC;QACxC,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,aAAa,GAAG,aAAa,EAAE,CAAC;KAC7C,CAAC;CACH;AAED,MAAM,WAAW,yCAAyC;IACxD,IAAI,EAAE,MAAM,yBAAyB,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,kCAAkC,GAAG,sBAAsB,CAAC;IAC3E,OAAO,CAAC,EAAE,8BAA8B,CAAC;CAC1C;AAED,MAAM,WAAW,wCAAwC;IACvD,IAAI,EAAE,MAAM,wBAAwB,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,iCAAiC,GAAG,sBAAsB,CAAC;IAC1E,OAAO,CAAC,EAAE,6BAA6B,CAAC;CACzC"}
@@ -0,0 +1,13 @@
1
+ import { types } from 'typestyle';
2
+ import { TypeRenderComponentJsx } from 'zova-jsx';
3
+ export interface IResourceComponentBlockRecord {
4
+ }
5
+ export interface IResourceBlockOptionsBase {
6
+ class?: any;
7
+ style?: types.NestedCSSProperties;
8
+ }
9
+ export interface IResourceComponentBlockOptionsBlock {
10
+ render?: keyof IResourceComponentBlockRecord | TypeRenderComponentJsx;
11
+ options?: IResourceBlockOptionsBase;
12
+ }
13
+ //# sourceMappingURL=blocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../src/types/blocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,WAAW,6BAA6B;CAAG;AAEjD,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC;CACnC;AAED,MAAM,WAAW,mCAAmC;IAClD,MAAM,CAAC,EAAE,MAAM,6BAA6B,GAAG,sBAAsB,CAAC;IACtE,OAAO,CAAC,EAAE,yBAAyB,CAAC;CACrC"}
@@ -0,0 +1,3 @@
1
+ export interface ISchemaRenderComponentLayoutOptions {
2
+ }
3
+ //# sourceMappingURL=fieldLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldLayout.d.ts","sourceRoot":"","sources":["../../src/types/fieldLayout.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mCAAmC;CAAG"}
@@ -0,0 +1,9 @@
1
+ import { types } from 'typestyle';
2
+ export interface IResourceComponentFormFieldRecord {
3
+ }
4
+ export interface IResourceFormFieldOptionsBase {
5
+ class?: any;
6
+ style?: types.NestedCSSProperties;
7
+ readonly?: boolean;
8
+ }
9
+ //# sourceMappingURL=formField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formField.d.ts","sourceRoot":"","sources":["../../src/types/formField.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,MAAM,WAAW,iCAAiC;CAAG;AAErD,MAAM,WAAW,6BAA6B;IAC5C,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -0,0 +1,9 @@
1
+ export type TypeFormMode = 'view' | 'edit';
2
+ export type TypeEditMode = 'create' | 'update';
3
+ export type TypeFormScene = 'view' | 'create' | 'edit';
4
+ export interface IFormMeta {
5
+ formMode: TypeFormMode;
6
+ editMode?: TypeEditMode;
7
+ formScene?: TypeFormScene;
8
+ }
9
+ //# sourceMappingURL=formMeta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formMeta.d.ts","sourceRoot":"","sources":["../../src/types/formMeta.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAC3C,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC/C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEvD,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B"}
@@ -1,17 +1,17 @@
1
1
  export * from './action.js';
2
- export * from './actions.js';
3
- export * from './captcha.js';
4
2
  export * from './database.js';
5
- export * from './date.js';
6
3
  export * from './jsx.js';
7
4
  export * from './permissions.js';
8
- export * from './resourceMeta.js';
9
- export * from './resourcePicker.js';
10
5
  export * from './rest.js';
11
6
  export * from './schema.js';
12
7
  export * from './sdk.js';
13
- export * from './select.js';
14
8
  export * from './table.js';
15
- export * from './textarea.js';
16
- export * from './toggle.js';
9
+ export * from './actions.js';
10
+ export * from './fieldLayout.js';
11
+ export * from './formMeta.js';
12
+ export * from './blocks.js';
13
+ export * from './tableCell.js';
14
+ export * from './formField.js';
15
+ export * from './performAction.js';
16
+ export * from './resourceProviders.js';
17
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
@@ -1,9 +1,9 @@
1
- import type { IActionsRecord } from 'zova-module-a-action';
2
- import type { TypeActionProvider } from './action.js';
3
1
  import 'zova-jsx';
2
+ import { IActionRecord } from 'zova-module-a-action';
3
+ import { IPerformActionRecord } from './performAction.js';
4
4
  declare module 'zova-jsx' {
5
5
  interface ZovaJsx {
6
- normalizeAction(type: keyof IActionsRecord): TypeActionProvider;
6
+ normalizeAction(type: keyof IPerformActionRecord): keyof IActionRecord;
7
7
  }
8
8
  }
9
9
  //# sourceMappingURL=jsx.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx.d.ts","sourceRoot":"","sources":["../../src/types/jsx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,UAAU,CAAC;AAElB,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAiB,OAAO;QACtB,eAAe,CAAC,IAAI,EAAE,MAAM,cAAc,GAAG,kBAAkB,CAAC;KACjE;CACF"}
1
+ {"version":3,"file":"jsx.d.ts","sourceRoot":"","sources":["../../src/types/jsx.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAiB,OAAO;QACtB,eAAe,CAAC,IAAI,EAAE,MAAM,oBAAoB,GAAG,MAAM,aAAa,CAAC;KACxE;CACF"}
@@ -0,0 +1,14 @@
1
+ import { TableIdentity } from 'table-identity';
2
+ import { IDecoratorActionOptions } from 'zova-module-a-action';
3
+ export interface IPerformActionRecord {
4
+ }
5
+ export interface IPerformActionOptionsBase<Result = any> extends IDecoratorActionOptions<Result> {
6
+ }
7
+ export interface IPerformActionRowOptionsBase<Result = any> extends IDecoratorActionOptions<Result> {
8
+ resource?: string;
9
+ id?: TableIdentity;
10
+ }
11
+ export interface IPerformActionBulkOptionsBase<Result = any> extends IDecoratorActionOptions<Result> {
12
+ resource?: string;
13
+ }
14
+ //# sourceMappingURL=performAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performAction.d.ts","sourceRoot":"","sources":["../../src/types/performAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,WAAW,oBAAoB;CAAG;AAExC,MAAM,WAAW,yBAAyB,CAAC,MAAM,GAAG,GAAG,CAAE,SAAQ,uBAAuB,CAAC,MAAM,CAAC;CAAG;AAEnG,MAAM,WAAW,4BAA4B,CAAC,MAAM,GAAG,GAAG,CAAE,SAAQ,uBAAuB,CAAC,MAAM,CAAC;IACjG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,aAAa,CAAC;CACpB;AAED,MAAM,WAAW,6BAA6B,CAAC,MAAM,GAAG,GAAG,CAAE,SAAQ,uBAAuB,CAAC,MAAM,CAAC;IAClG,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1,16 +1,12 @@
1
1
  import type { TableIdentity } from 'table-identity';
2
- export interface IOpenapiActionRecord {
3
- create: boolean;
4
- view: boolean;
5
- update: boolean;
6
- delete: boolean;
7
- }
2
+ import { IResourceActionTableRecord } from './actions.js';
8
3
  export type IOpenapiPermissionModeActionActions = {
9
- [K in keyof IOpenapiActionRecord]?: IOpenapiActionRecord[K];
4
+ [K in keyof IResourceActionTableRecord]?: IResourceActionTableRecord[K];
10
5
  };
11
6
  export interface IOpenapiPermissions {
12
7
  roleIds?: TableIdentity[];
13
8
  roleNames?: string[];
14
9
  actions?: IOpenapiPermissionModeActionActions;
15
10
  }
11
+ export type TypeOpenapiPermissions = IOpenapiPermissions | boolean;
16
12
  //# sourceMappingURL=permissions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/types/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,MAAM,mCAAmC,GAAG;KAC/C,CAAC,IAAI,MAAM,oBAAoB,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC;CAC5D,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,mCAAmC,CAAC;CAC/C"}
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/types/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE1D,MAAM,MAAM,mCAAmC,GAAG;KAC/C,CAAC,IAAI,MAAM,0BAA0B,CAAC,CAAC,EAAE,0BAA0B,CAAC,CAAC,CAAC;CACxE,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,mCAAmC,CAAC;CAC/C;AAED,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,GAAG,OAAO,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { TypeBeanRecordGeneralSelector, TypeComponentRecordSelectorKeys } from 'zova';
2
+ import { IActionRecord } from 'zova-module-a-action';
3
+ import { IFormProviderBehaviors } from 'zova-module-a-form';
4
+ import { IResourceComponentActionBulkRecord, IResourceComponentActionRowRecord } from './actions.js';
5
+ import { IResourceComponentBlockRecord } from './blocks.js';
6
+ import { IResourceComponentFormFieldRecord } from './formField.js';
7
+ import { IPerformActionRecord } from './performAction.js';
8
+ import { IResourceComponentTableCellRecord } from './tableCell.js';
9
+ export type IResourceProvidersBlocks = {
10
+ [KEY in keyof IResourceComponentBlockRecord]?: TypeComponentRecordSelectorKeys<'block'>;
11
+ };
12
+ export type IResourceProvidersFormFields = {
13
+ [KEY in keyof IResourceComponentFormFieldRecord]?: TypeComponentRecordSelectorKeys<'formField'>;
14
+ };
15
+ export type IResourceProvidersTableCells = {
16
+ [KEY in keyof IResourceComponentTableCellRecord]?: keyof TypeBeanRecordGeneralSelector<'tableCell'>;
17
+ };
18
+ export type IResourceProvidersPerformActions = {
19
+ [KEY in keyof IPerformActionRecord]?: keyof IActionRecord;
20
+ };
21
+ export type IResourceProvidersTableActionsBulk = {
22
+ [KEY in keyof IResourceComponentActionBulkRecord]?: TypeComponentRecordSelectorKeys<'action'>;
23
+ };
24
+ export type IResourceProvidersTableActionsRow = {
25
+ [KEY in keyof IResourceComponentActionRowRecord]?: keyof TypeBeanRecordGeneralSelector<'tableCell'>;
26
+ };
27
+ export type IResourceProvidersFormActionsRow = {
28
+ [KEY in keyof IResourceComponentActionRowRecord]?: TypeComponentRecordSelectorKeys<'action'>;
29
+ };
30
+ export type IResourceProvidersBehaviors = IFormProviderBehaviors;
31
+ export interface IResourceProviders {
32
+ blocks?: IResourceProvidersBlocks;
33
+ formFields?: IResourceProvidersFormFields;
34
+ tableCells?: IResourceProvidersTableCells;
35
+ performActions?: IResourceProvidersPerformActions;
36
+ behaviors?: IResourceProvidersBehaviors;
37
+ table?: {
38
+ actionsBulk?: IResourceProvidersTableActionsBulk;
39
+ actionsRow?: IResourceProvidersTableActionsRow;
40
+ };
41
+ form?: {
42
+ actionsRow?: IResourceProvidersFormActionsRow;
43
+ };
44
+ }
45
+ export interface IFormProvider {
46
+ components?: IResourceProvidersFormFields & IResourceProvidersFormActionsRow;
47
+ actions?: IResourceProvidersPerformActions;
48
+ behaviors?: IResourceProvidersBehaviors;
49
+ }
50
+ export interface ITableProvider {
51
+ components?: IResourceProvidersTableCells & IResourceProvidersTableActionsRow;
52
+ actions?: IResourceProvidersPerformActions;
53
+ }
54
+ //# sourceMappingURL=resourceProviders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceProviders.d.ts","sourceRoot":"","sources":["../../src/types/resourceProviders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,MAAM,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,kCA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C,UAAU,CAAC,EAAE,4BAA4B,CAAC;IAC1C,UAAU,CAAC,EAAE,4BAA4B,CAAC;IAC1C,cAAc,CAAC,EAAE,gCAAgC,CAAC;IAClD,SAAS,CAAC,EAAE,2BAA2B,CAAC;IACxC,KAAK,CAAC,EAAE;QACN,WAAW,CAAC,EAAE,kCAAkC,CAAC;QACjD,UAAU,CAAC,EAAE,iCAAiC,CAAC;KAChD,CAAC;IACF,IAAI,CAAC,EAAE;QACL,UAAU,CAAC,EAAE,gCAAgC,CAAC;KAC/C,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,4BAA4B,GAAG,gCAAgC,CAAC;IAC7E,OAAO,CAAC,EAAE,gCAAgC,CAAC;IAC3C,SAAS,CAAC,EAAE,2BAA2B,CAAC;CACzC;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,4BAA4B,GAAG,iCAAiC,CAAC;IAC9E,OAAO,CAAC,EAAE,gCAAgC,CAAC;CAC5C"}
@@ -1,32 +1,36 @@
1
- import type { CurrencyOptions } from '@zhennann/currency';
2
1
  import type { ComponentPublicInstance } from 'vue';
3
2
  import type { Constructable, IComponentRecord, TypeBeanRecordGeneralSelector } from 'zova';
4
3
  import type { TypeRenderComponentJsx } from 'zova-jsx';
5
- import type { TypeResourceActionRowRecordRender } from './actions.js';
6
- import type { ICaptchaOptions } from './captcha.js';
7
- import type { TypeDateFormat } from './date.js';
8
- import type { IResourcePickerOptions } from './resourcePicker.js';
9
- import type { ISelectOptions } from './select.js';
10
- import type { ITextareaOptions } from './textarea.js';
11
- import type { IToggleOptions } from './toggle.js';
12
4
  import 'openapi3-ts/oas30';
13
5
  import 'openapi3-ts/oas31';
14
- export interface ISchemaObjectExtensionFieldRest {
15
- render?: TypeFormFieldRenderComponentNormal | TypeTableCellRenderComponentNormal;
16
- captcha?: ICaptchaOptions;
17
- currency?: CurrencyOptions;
18
- dateFormat?: TypeDateFormat;
19
- toggle?: IToggleOptions;
20
- select?: ISelectOptions;
21
- textarea?: ITextareaOptions;
22
- resourcePicker?: IResourcePickerOptions;
23
- customKey?: string;
6
+ import { IResourceComponentBlockOptionsBlock } from './blocks.js';
7
+ import { IResourceComponentFormFieldRecord } from './formField.js';
8
+ import { IResourceProvidersTableActionsRow, IResourceProvidersTableCells } from './resourceProviders.js';
9
+ export interface ISchemaRenderComponentPresetRecord extends IResourceComponentFormFieldRecord {
10
+ }
11
+ export interface ISchemaObjectExtensionFieldRestTable {
12
+ preset?: ISchemaRenderComponentPresetRecord;
13
+ fieldSource?: string;
24
14
  visible?: boolean;
25
- displayValue?: any;
26
15
  order?: number;
27
- table?: Omit<ISchemaObjectExtensionFieldRest, TypeSchemaScene>;
28
- form?: Omit<ISchemaObjectExtensionFieldRest, TypeSchemaScene>;
29
- filter?: Omit<ISchemaObjectExtensionFieldRest, TypeSchemaScene>;
16
+ disableNotifyChanged?: boolean;
17
+ readonly?: boolean;
18
+ render?: TypeTableCellRenderComponentNormal;
19
+ }
20
+ export interface ISchemaObjectExtensionFieldRest {
21
+ 'preset'?: ISchemaRenderComponentPresetRecord;
22
+ 'blocks'?: IResourceComponentBlockOptionsBlock[];
23
+ 'fieldSource'?: string;
24
+ 'visible'?: boolean;
25
+ 'order'?: number;
26
+ 'disableNotifyChanged'?: boolean;
27
+ 'readonly'?: boolean;
28
+ 'render'?: TypeFormFieldRenderComponentNormal | TypeTableCellRenderComponentNormal;
29
+ 'table'?: Omit<ISchemaObjectExtensionFieldRest, TypeSchemaScene>;
30
+ 'form'?: Omit<ISchemaObjectExtensionFieldRest, TypeSchemaScene>;
31
+ 'form-view'?: Omit<ISchemaObjectExtensionFieldRest, TypeSchemaScene>;
32
+ 'form-create'?: Omit<ISchemaObjectExtensionFieldRest, TypeSchemaScene>;
33
+ 'filter'?: Omit<ISchemaObjectExtensionFieldRest, TypeSchemaScene>;
30
34
  }
31
35
  export interface ISchemaObjectExtensionFieldFilterCapabilities {
32
36
  where?: boolean;
@@ -48,16 +52,16 @@ declare module 'openapi3-ts/oas31' {
48
52
  interface SchemaObject extends ISchemaObjectExtensionField {
49
53
  }
50
54
  }
51
- export type TypeSchemaScene = 'table' | 'form' | 'filter';
52
- export type TypeFormSchemaScene = 'form' | 'filter';
55
+ export type TypeSchemaScene = 'table' | TypeFormSchemaScene;
56
+ export type TypeFormSchemaScene = 'form' | 'form-view' | 'form-create' | 'filter';
53
57
  export declare const renderFormFieldTopPropsSystem: string[];
54
58
  export declare const renderTableColumnTopPropsSystem: string[];
55
- export type TypeRenderComponentPreset = keyof TypeResourceActionRowRecordRender | 'text' | 'captcha' | 'currency' | 'date' | 'dateRange' | 'textarea' | 'select' | 'checkbox' | 'radio' | 'switch' | 'image' | 'file' | 'color' | 'password' | 'email' | 'url';
59
+ export type TypeRenderComponentPreset = keyof ISchemaRenderComponentPresetRecord;
56
60
  export type TypeFormFieldRenderComponentNormal = Constructable<ComponentPublicInstance> | keyof IComponentRecord | TypeRenderComponentPreset;
57
61
  export type TypeFormFieldRenderComponent = TypeFormFieldRenderComponentNormal | TypeRenderComponentJsx;
58
- export type TypeFormFieldRenderComponentProvider = Constructable | Constructable<ComponentPublicInstance> | keyof IComponentRecord | 'input' | 'textarea' | 'select';
62
+ export type TypeFormFieldRenderComponentProvider = Constructable | Constructable<ComponentPublicInstance> | keyof IComponentRecord | 'input';
59
63
  export type TypeTableCellRenderComponentNormal = Constructable<ComponentPublicInstance> | keyof IComponentRecord | keyof TypeBeanRecordGeneralSelector<'tableCell'> | TypeRenderComponentPreset;
60
- export type TypeTableCellRenderComponent = TypeTableCellRenderComponentNormal | TypeRenderComponentJsx;
61
- export type TypeTableCellRenderComponentProvider = Constructable<ComponentPublicInstance> | keyof IComponentRecord | keyof TypeBeanRecordGeneralSelector<'tableCell'> | 'text';
62
- export type TypeTableRenderComponentProvider = Constructable<ComponentPublicInstance> | keyof IComponentRecord | TypeRenderComponentJsx;
64
+ export type TypeTableCellRenderComponent = keyof (IResourceProvidersTableCells & IResourceProvidersTableActionsRow) | TypeRenderComponentJsx;
65
+ export type TypeTableCellRenderComponentProvider = Constructable<ComponentPublicInstance> | TypeRenderComponentJsx | keyof IComponentRecord | keyof TypeBeanRecordGeneralSelector<'tableCell'> | 'text';
66
+ export type TypeTableBulkRenderComponentProvider = Constructable<ComponentPublicInstance> | keyof IComponentRecord | TypeRenderComponentJsx;
63
67
  //# sourceMappingURL=rest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rest.d.ts","sourceRoot":"","sources":["../../src/types/rest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,MAAM,CAAC;AAC3F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,mBAAmB,CAAC;AAE3B,MAAM,WAAW,+BAA+B;IAC9C,MAAM,CAAC,EAAE,kCAAkC,GAAG,kCAAkC,CAAC;IACjF,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,UAAU,CAAC,EAAE,cAAc,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CAAC,4BAA4B,GAAG,iCAAiC,CAAC,GAAG,sBAAsB,CAAC;AAC7I,MAAM,MAAM,oCAAoC,GAC5C,aAAa,CAAC,uBAAuB,CAAC,GACtC,sBAAsB,GACtB,MAAM,gBAAgB,GACtB,MAAM,6BAA6B,CAAC,WAAW,CAAC,GAChD,MAAM,CAAC;AACX,MAAM,MAAM,oCAAoC,GAAG,aAAa,CAAC,uBAAuB,CAAC,GAAG,MAAM,gBAAgB,GAAG,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/types/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,aAAa,CAAC;IACnB,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;CAAG;AAEtC,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,kBAAkB,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC,CAAC;AAExG,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,qBAAqB,CAAC;IAC3B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,GAAG,CAAC,EAAE,YAAY,CAAC;CACpB"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/types/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,aAAa,CAAC;IACnB,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;CAAG;AAEtC,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAClD,kBAAkB,CAAC,eAAe,EAAE,YAAY,CAAC,CAClD,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,qBAAqB,CAAC;IAC3B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,GAAG,CAAC,EAAE,YAAY,CAAC;CACpB"}
@@ -1,11 +1,9 @@
1
1
  import type { OperationObject } from 'openapi3-ts/oas31';
2
2
  import type { ModelSdk } from '../model/sdk.js';
3
- import type { IOpenapiOptionsResourceMeta } from './resourceMeta.js';
4
3
  import type { IOpenapiSchemaMeta } from './schema.js';
5
4
  export declare const SymbolOpenapiSchemaName = "__schemaName__";
6
5
  export interface IOpenapiSdkBootstrap {
7
6
  apiPath: string;
8
- resourceMeta: IOpenapiOptionsResourceMeta;
9
7
  }
10
8
  export interface IOpenapiSdkItem {
11
9
  schemas: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/types/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,M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AG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEjG,OAAO,QAAQ,MAAM,CAAC;IACpB,UAAiB,QAAQ;QACvB,IAAI,EAAE,QAAQ,CAAC;KAChB;CACF"}
@@ -0,0 +1,13 @@
1
+ import { types } from 'typestyle';
2
+ import { TypeRenderComponentJsx } from 'zova-jsx';
3
+ export interface IResourceComponentTableCellRecord {
4
+ }
5
+ export interface IResourceTableCellOptionsBase {
6
+ class?: any;
7
+ style?: types.NestedCSSProperties;
8
+ }
9
+ export interface IResourceComponentTableCellOptionsCell {
10
+ render?: keyof IResourceComponentTableCellRecord | TypeRenderComponentJsx;
11
+ options?: IResourceTableCellOptionsBase;
12
+ }
13
+ //# sourceMappingURL=tableCell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tableCell.d.ts","sourceRoot":"","sources":["../../src/types/tableCell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,WAAW,iCAAiC;CAAG;AAErD,MAAM,WAAW,6BAA6B;IAC5C,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC;CACnC;AAED,MAAM,WAAW,sCAAsC;IACrD,MAAM,CAAC,EAAE,MAAM,iCAAiC,GAAG,sBAAsB,CAAC;IAC1E,OAAO,CAAC,EAAE,6BAA6B,CAAC;CACzC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zova-module-a-openapi",
3
- "version": "5.1.10",
4
- "gitHead": "105e4dce1e85740f1f8a7ba9add2029beeaf9316",
3
+ "version": "5.1.12",
4
+ "gitHead": "a247f88a55c663d313296039f874560ee5a13e01",
5
5
  "description": "",
6
6
  "keywords": [
7
7
  "Zova Module"
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@cabloy/json-schema-to-zod": "^2.6.4",
35
- "@zhennann/currency": "^2.0.4",
36
- "openapi3-ts": "^4.5.0"
35
+ "openapi3-ts": "^4.5.0",
36
+ "typestyle": "^2.4.0"
37
37
  },
38
38
  "title": "a-openapi",
39
39
  "zovaModule": {
@@ -44,7 +44,8 @@
44
44
  "a-model": "5.0.0"
45
45
  },
46
46
  "globalDependencies": {
47
- "openapi3-ts": true
47
+ "openapi3-ts": true,
48
+ "typestyle": true
48
49
  },
49
50
  "bundle": {
50
51
  "vendors": [
@@ -65,6 +65,37 @@ declare module 'zova' {
65
65
  }
66
66
  }
67
67
  /** sys: end */
68
+ /** bean: begin */
69
+ export * from '../bean/bean.resourceProviders.js';
70
+
71
+ import 'zova';
72
+ declare module 'zova' {
73
+
74
+
75
+ }
76
+ declare module 'zova-module-a-openapi' {
77
+
78
+ export interface BeanResourceProviders {
79
+ /** @internal */
80
+ get scope(): ScopeModuleAOpenapi;
81
+ }
82
+
83
+ export interface BeanResourceProviders {
84
+ get $beanFullName(): 'a-openapi.bean.resourceProviders';
85
+ get $onionName(): 'a-openapi:resourceProviders';
86
+
87
+ }
88
+ }
89
+ /** bean: end */
90
+ /** bean: begin */
91
+ import { BeanResourceProviders } from '../bean/bean.resourceProviders.js';
92
+ import 'zova';
93
+ declare module 'zova' {
94
+ export interface IBeanRecordGeneral {
95
+ 'a-openapi.bean.resourceProviders': BeanResourceProviders;
96
+ }
97
+ }
98
+ /** bean: end */
68
99
  /** config: begin */
69
100
  export * from '../config/config.js';
70
101
  import { config } from '../config/config.js';
@@ -0,0 +1,34 @@
1
+ import { BeanBase } from 'zova';
2
+ import { Bean } from 'zova-module-a-bean';
3
+
4
+ import { IFormProvider, ITableProvider } from '../types/resourceProviders.js';
5
+
6
+ @Bean()
7
+ export class BeanResourceProviders extends BeanBase {
8
+ public formProvider: IFormProvider;
9
+ public tableProvider: ITableProvider;
10
+
11
+ protected async __init__() {
12
+ this.formProvider = this.$useComputed(() => {
13
+ const resourceProviders = this.scope.config.resourceProviders;
14
+ return {
15
+ components: Object.assign({}, resourceProviders.blocks, resourceProviders.formFields, resourceProviders.form?.actionsRow),
16
+ actions: resourceProviders.performActions,
17
+ behaviors: resourceProviders.behaviors,
18
+ };
19
+ });
20
+ this.tableProvider = this.$useComputed(() => {
21
+ const resourceProviders = this.scope.config.resourceProviders;
22
+ return {
23
+ components: Object.assign(
24
+ {},
25
+ resourceProviders.blocks,
26
+ resourceProviders.tableCells,
27
+ resourceProviders.table?.actionsBulk,
28
+ resourceProviders.table?.actionsRow,
29
+ ),
30
+ actions: resourceProviders.performActions,
31
+ };
32
+ });
33
+ }
34
+ }
@@ -7,7 +7,12 @@ import { Sys } from 'zova-module-a-bean';
7
7
  import { BeanFetch } from 'zova-module-a-fetch';
8
8
 
9
9
  import { IOpenapiSchema } from '../types/schema.js';
10
- import { IOpenapiSdkBootstrap, IOpenapiSdkItem, SymbolOpenapiSchemaName, TypeRequestMethod } from '../types/sdk.js';
10
+ import {
11
+ IOpenapiSdkBootstrap,
12
+ IOpenapiSdkItem,
13
+ SymbolOpenapiSchemaName,
14
+ TypeRequestMethod,
15
+ } from '../types/sdk.js';
11
16
 
12
17
  // const PATH_PARAM_RE = /\{([^{}/]+)\}/g;
13
18
 
@@ -111,7 +116,11 @@ export class SysSdk extends BeanBase {
111
116
  params.push(undefined);
112
117
  }
113
118
  // options
114
- const options: IApiActionConfigPrepareOptions = { authToken: apiOptions?.authToken, openapiSchema: true, headers: {} };
119
+ const options: IApiActionConfigPrepareOptions = {
120
+ authToken: apiOptions?.authToken,
121
+ openapiSchema: true,
122
+ headers: {},
123
+ };
115
124
  const localeKey = this.sys.env.APP_LOCALE_HEADER_KEY;
116
125
  if (localeKey) {
117
126
  options.headers![localeKey] = this.locale;
@@ -1,41 +1,10 @@
1
1
  import type { ZovaSys } from 'zova';
2
2
 
3
- import type { IOpenapiOptionsResourceMeta } from '../types/resourceMeta.js';
3
+ import { IResourceProviders } from '../types/resourceProviders.js';
4
4
 
5
5
  export const config = (_sys: ZovaSys) => {
6
6
  return {
7
- base: {
8
- provider: {
9
- components: {
10
- form: 'a-form:form',
11
- table: 'a-table:table',
12
- },
13
- actions: {
14
- actionLog: 'a-actions:log',
15
- },
16
- },
17
- form: {
18
- provider: {
19
- components: {
20
- formField: 'a-form:formField',
21
- text: 'input',
22
- password: 'input',
23
- currency: 'a-currency:formFieldCurrency',
24
- },
25
- behaviors: {},
26
- },
27
- },
28
- table: {
29
- provider: {
30
- components: {
31
- currency: 'a-currency.tableCell.currency',
32
- date: 'a-date.tableCell.date',
33
- },
34
- actions: {},
35
- },
36
- },
37
- } as IOpenapiOptionsResourceMeta,
38
- resourceMeta: {} as IOpenapiOptionsResourceMeta,
7
+ resourceProviders: {} as IResourceProviders,
39
8
  api: {
40
9
  bootstrap: '/api/openapischema/resource/bootstrap/:resource',
41
10
  permissions: '/api/home/base/permission/:resource',