rapida-partner 1.2.0 → 1.4.0
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/package.json +1 -1
- package/rapidaObject.json +1 -1
- package/src/enums/form-contract.enum.ts +1 -0
- package/src/examples/components/forms/character.form.ts +7 -7
- package/src/examples/components/forms/company.form.ts +40 -40
- package/src/examples/components/forms/customer.form.ts +120 -0
- package/src/examples/components/forms/movie.form.ts +11 -11
- package/src/examples/components/forms/movieEpisode.form.ts +7 -7
- package/src/examples/components/forms/movieGenre.form.ts +3 -3
- package/src/examples/components/forms/person.form.ts +41 -41
- package/src/examples/components/lists/customer.list.ts +50 -0
- package/src/examples/modules/customer.ts +13 -0
- package/src/examples/projects/movieBackoffice.ts +2 -0
- package/src/interfaces/{form-condition.interface.ts → condition.interface.ts} +1 -1
- package/src/interfaces/form-array.interface.ts +1 -1
- package/src/interfaces/form-autocomplete.interface.ts +1 -1
- package/src/interfaces/form-button.interface.ts +1 -1
- package/src/interfaces/form-datepicker.interface.ts +1 -1
- package/src/interfaces/form-fieldset.interface.ts +1 -1
- package/src/interfaces/form-file.interface.ts +1 -1
- package/src/interfaces/form-inheritance.interface.ts +1 -1
- package/src/interfaces/form-input.interface.ts +1 -1
- package/src/interfaces/form-numeric.interface.ts +1 -1
- package/src/interfaces/form-pattern.interface.ts +1 -1
- package/src/interfaces/form-radiogroup.interface.ts +1 -1
- package/src/interfaces/form-select.interface.ts +1 -1
- package/src/interfaces/form-switch.interface.ts +1 -1
- package/src/interfaces/form-tab.interface.ts +1 -1
- package/src/interfaces/form.interface.ts +23 -15
- package/src/interfaces/list.interface.ts +2 -0
- package/src/schemas/{form-condition.ref.json → condition.ref.json} +2 -2
- package/src/schemas/form-array.ref.json +1 -1
- package/src/schemas/form-autocomplete.ref.json +3 -3
- package/src/schemas/form-button.ref.json +1 -1
- package/src/schemas/form-common-api-request.ref.json +1 -1
- package/src/schemas/form-common-filters-from-other-form-fields.ref.json +1 -1
- package/src/schemas/form-datepicker.ref.json +1 -1
- package/src/schemas/form-fieldset.ref.json +1 -1
- package/src/schemas/form-file.ref.json +1 -1
- package/src/schemas/form-inheritance.ref.json +1 -1
- package/src/schemas/form-input.ref.json +1 -1
- package/src/schemas/form-numeric.ref.json +1 -1
- package/src/schemas/form-one-of.ref.json +3 -2
- package/src/schemas/form-pattern.ref.json +1 -1
- package/src/schemas/form-radiogroup.ref.json +1 -1
- package/src/schemas/form-select.ref.json +1 -1
- package/src/schemas/form-switch.ref.json +1 -1
- package/src/schemas/form-tab.ref.json +2 -2
- package/src/schemas/form.ref.json +32 -2
- package/src/schemas/list.ref.json +3 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IFormCondition } from "./
|
|
1
|
+
import type { IFormCondition } from "./condition.interface";
|
|
2
2
|
import type { IOptionsApi } from "./form-autocomplete.interface";
|
|
3
3
|
import type { IBusinessRule } from "./project.interface";
|
|
4
4
|
import type { EDataType } from "../enums/form.enum";
|
|
@@ -3,7 +3,7 @@ import type { EDataType } from "../enums/form.enum";
|
|
|
3
3
|
import type { IFormArray } from "./form-array.interface";
|
|
4
4
|
import type { IFormAutocomplete } from "./form-autocomplete.interface";
|
|
5
5
|
import type { IFormButton } from "./form-button.interface";
|
|
6
|
-
import type { IFormCondition } from "./
|
|
6
|
+
import type { IFormCondition } from "./condition.interface";
|
|
7
7
|
import type { IFormDatePicker } from "./form-datepicker.interface";
|
|
8
8
|
import type { IFormFieldset } from "./form-fieldset.interface";
|
|
9
9
|
import type { IFormFile } from "./form-file.interface";
|
|
@@ -23,6 +23,7 @@ export interface IForm {
|
|
|
23
23
|
businessRules?: IBusinessRule[];
|
|
24
24
|
userStory?: string;
|
|
25
25
|
contracts: {
|
|
26
|
+
id: string;
|
|
26
27
|
endpoint: string;
|
|
27
28
|
actions: ("create" | "get" | "getById" | "update" | "delete" | "clone")[];
|
|
28
29
|
request?: IContractRequest;
|
|
@@ -39,21 +40,28 @@ export interface IForm {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
interface IFormContractGeneral {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
43
|
+
// interface IFormContractGeneral {
|
|
44
|
+
// name: string;
|
|
45
|
+
// dataType: EFormContractDataType;
|
|
46
|
+
// }
|
|
46
47
|
|
|
47
48
|
interface IContractRequest {
|
|
48
49
|
entity: string,
|
|
49
|
-
relatedEntity?:
|
|
50
|
+
relatedEntity?: {
|
|
51
|
+
entity: string;
|
|
52
|
+
connectionAttribute: string;
|
|
53
|
+
fieldsFromEntity: {
|
|
54
|
+
fields: IForm;
|
|
55
|
+
contractId: string;
|
|
56
|
+
}[]
|
|
57
|
+
},
|
|
50
58
|
description?: string,
|
|
51
59
|
fields: IContractRequestField[]
|
|
52
60
|
}
|
|
53
61
|
|
|
54
62
|
interface IContractRequestField {
|
|
55
63
|
name: string;
|
|
56
|
-
dataType:
|
|
64
|
+
dataType: EDataType;
|
|
57
65
|
isRequired?: boolean;
|
|
58
66
|
foreignKey?: IContractRequestFieldForeignKey;
|
|
59
67
|
isPrimaryKey?: boolean;
|
|
@@ -71,15 +79,15 @@ interface IContractRequestFieldForeignKey {
|
|
|
71
79
|
relationship: "many-to-many" | "one-to-many" | "one-to-one"
|
|
72
80
|
}
|
|
73
81
|
|
|
74
|
-
interface IFormContractArray {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
82
|
+
// interface IFormContractArray {
|
|
83
|
+
// name: string;
|
|
84
|
+
// dataType: "array";
|
|
85
|
+
// elements: (IFormContractGeneral | IFormContractArray)[];
|
|
86
|
+
// }
|
|
79
87
|
|
|
80
|
-
export interface IApiRequest {
|
|
81
|
-
|
|
82
|
-
}
|
|
88
|
+
// export interface IApiRequest {
|
|
89
|
+
// body?: (IFormContractGeneral | IFormContractArray)[];
|
|
90
|
+
// }
|
|
83
91
|
|
|
84
92
|
export type IFormElement =
|
|
85
93
|
| IFormInput
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IFormCondition } from "./condition.interface";
|
|
1
2
|
import type { IApiRequest } from "./form-input.interface";
|
|
2
3
|
import type { IBusinessRule } from "./project.interface";
|
|
3
4
|
|
|
@@ -20,6 +21,7 @@ export interface IList {
|
|
|
20
21
|
link: string; // e.g.: "/user"
|
|
21
22
|
usePropertyAsQuery?: boolean; // if true then "/user/<email>"
|
|
22
23
|
};
|
|
24
|
+
conditions?: IFormCondition[];
|
|
23
25
|
}[]; // properties taken from dataSource
|
|
24
26
|
cardAsALink?: {
|
|
25
27
|
link: string; // e.g.: "/user"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "
|
|
2
|
+
"$id": "condition.ref.json",
|
|
3
3
|
"type": "array",
|
|
4
4
|
"items": {
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"type": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"enum": ["form", "code", "array", "button"]
|
|
9
|
+
"enum": ["property", "enum", "form", "code", "array", "button"]
|
|
10
10
|
},
|
|
11
11
|
"elements": {
|
|
12
12
|
"type": "array",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"type": "boolean"
|
|
41
41
|
},
|
|
42
42
|
"conditions": {
|
|
43
|
-
"$ref": "
|
|
43
|
+
"$ref": "condition.ref.json"
|
|
44
44
|
},
|
|
45
45
|
"validators": {
|
|
46
46
|
"type": "array",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"type": "boolean"
|
|
97
97
|
},
|
|
98
98
|
"conditions": {
|
|
99
|
-
"$ref": "
|
|
99
|
+
"$ref": "condition.ref.json"
|
|
100
100
|
},
|
|
101
101
|
"rawQuery": {
|
|
102
102
|
"type": "string"
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"type": "boolean"
|
|
158
158
|
},
|
|
159
159
|
"conditions": {
|
|
160
|
-
"$ref": "
|
|
160
|
+
"$ref": "condition.ref.json"
|
|
161
161
|
},
|
|
162
162
|
"rawQuery": {
|
|
163
163
|
"type": "string"
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
{ "$ref": "form-pattern.ref.json" },
|
|
17
17
|
{ "$ref": "form-datepicker.ref.json" },
|
|
18
18
|
{ "$ref": "form-radiogroup.ref.json" },
|
|
19
|
-
{ "$ref": "form-switch.ref.json" }
|
|
19
|
+
{ "$ref": "form-switch.ref.json" },
|
|
20
|
+
{ "$ref": "form-inheritance.ref.json" }
|
|
20
21
|
]
|
|
21
22
|
}
|
|
22
|
-
}
|
|
23
|
+
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"$ref": "form-one-of.ref.json"
|
|
30
30
|
},
|
|
31
31
|
"conditions": {
|
|
32
|
-
"$ref": "
|
|
32
|
+
"$ref": "condition.ref.json"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"required": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"conditions": {
|
|
43
|
-
"$ref": "
|
|
43
|
+
"$ref": "condition.ref.json"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"required": [
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
"items": {
|
|
34
34
|
"type": "object",
|
|
35
35
|
"properties": {
|
|
36
|
+
"id": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
36
39
|
"endpoint": {
|
|
37
40
|
"type": "string"
|
|
38
41
|
},
|
|
@@ -120,15 +123,42 @@
|
|
|
120
123
|
},
|
|
121
124
|
"required": ["name", "dataType"]
|
|
122
125
|
}
|
|
126
|
+
},
|
|
127
|
+
"relatedEntity": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"properties": {
|
|
130
|
+
"entity": {
|
|
131
|
+
"type": "string"
|
|
132
|
+
},
|
|
133
|
+
"connectionAttribute": {
|
|
134
|
+
"type": "string"
|
|
135
|
+
},
|
|
136
|
+
"fieldsFromEntity": {
|
|
137
|
+
"type": "array",
|
|
138
|
+
"items": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"properties": {
|
|
141
|
+
"fields": {
|
|
142
|
+
"$ref": "form.ref.json"
|
|
143
|
+
},
|
|
144
|
+
"contractId":{
|
|
145
|
+
"type": "string"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"required": ["fields", "contractId"]
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"required": ["entity", "connectionAttribute", "fieldsFromEntity"]
|
|
123
153
|
}
|
|
124
154
|
},
|
|
125
155
|
"required": ["entity", "fields"]
|
|
126
156
|
},
|
|
127
157
|
"conditions": {
|
|
128
|
-
"$ref": "
|
|
158
|
+
"$ref": "condition.ref.json"
|
|
129
159
|
}
|
|
130
160
|
},
|
|
131
|
-
"required": ["endpoint", "actions"]
|
|
161
|
+
"required": ["id", "endpoint", "actions"]
|
|
132
162
|
}
|
|
133
163
|
},
|
|
134
164
|
"kanban": {
|