rapida-partner 1.10.0 → 1.11.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 +973 -1
- package/src/examples/components/forms/test.form.ts +30 -31
- package/src/examples/components/lists/character.list.ts +1 -1
- package/src/examples/components/lists/movie.list.ts +1 -1
- package/src/examples/components/lists/movieEpisode.list.ts +1 -1
- package/src/examples/components/lists/movieGenre.list.ts +1 -1
- package/src/examples/modules/movie.ts +2 -3
- package/src/examples/projects/movieBackoffice.ts +2 -2
- package/src/interfaces/list.interface.ts +72 -53
- package/src/interfaces/project.interface.ts +8 -0
- package/src/schemas/business-rules.ref.json +27 -1
- package/src/schemas/list.ref.json +8 -3
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { EDataType } from "../../../enums/form.enum";
|
|
2
2
|
import type { IForm } from "../../../interfaces/form.interface";
|
|
3
3
|
|
|
4
|
-
export const
|
|
5
|
-
title: "
|
|
4
|
+
export const testForm: IForm = {
|
|
5
|
+
title: "Formulário teste",
|
|
6
6
|
componentType: "form",
|
|
7
|
-
id: "
|
|
7
|
+
id: "testFormForm",
|
|
8
8
|
guards: "isAuthorized",
|
|
9
9
|
elements: [
|
|
10
10
|
{
|
|
11
|
-
id: "
|
|
11
|
+
id: "testFormTab",
|
|
12
12
|
type: "tab",
|
|
13
13
|
tabs: [
|
|
14
14
|
{
|
|
15
|
-
title: "
|
|
16
|
-
id: "
|
|
15
|
+
title: "Dados principais",
|
|
16
|
+
id: "mainDataTab",
|
|
17
17
|
elements: [
|
|
18
18
|
{
|
|
19
|
-
label: "
|
|
20
|
-
name: "
|
|
19
|
+
label: "Nome",
|
|
20
|
+
name: "name",
|
|
21
21
|
type: "input",
|
|
22
22
|
dataType: EDataType.TEXT,
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
title: "
|
|
26
|
-
id: "
|
|
25
|
+
title: "Coisa aleatória",
|
|
26
|
+
id: "randomThingFieldset",
|
|
27
27
|
type: "fieldset",
|
|
28
28
|
elements: [
|
|
29
29
|
{
|
|
30
|
-
label: "
|
|
31
|
-
name: "
|
|
30
|
+
label: "Qualquer coisa*",
|
|
31
|
+
name: "anything",
|
|
32
32
|
type: "select",
|
|
33
33
|
dataType: EDataType.TEXT,
|
|
34
|
-
isRequired: true,
|
|
34
|
+
isRequired: true,
|
|
35
35
|
options: [
|
|
36
36
|
{ label: "Rótulo para a opção 1", value: "optionOneLabel" },
|
|
37
37
|
{ label: "Rótulo para a opção 2", value: "optionTwoLabel" },
|
|
@@ -39,8 +39,8 @@ export const characterForm: IForm = {
|
|
|
39
39
|
],
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
label: "
|
|
43
|
-
name: "
|
|
42
|
+
label: "Outras coisas para escolher*",
|
|
43
|
+
name: "otherThingsToChoose",
|
|
44
44
|
type: "select",
|
|
45
45
|
dataType: EDataType.TEXT,
|
|
46
46
|
isRequired: true,
|
|
@@ -52,8 +52,8 @@ export const characterForm: IForm = {
|
|
|
52
52
|
],
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
label: "
|
|
56
|
-
name: "
|
|
55
|
+
label: "Uma terceira coisa*",
|
|
56
|
+
name: "aThirdThingId",
|
|
57
57
|
type: "autocomplete",
|
|
58
58
|
dataType: EDataType.TEXT,
|
|
59
59
|
isRequired: true,
|
|
@@ -62,11 +62,11 @@ export const characterForm: IForm = {
|
|
|
62
62
|
// leave it blank so documenter will be forced to check it
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
|
-
]
|
|
65
|
+
],
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
label: "
|
|
69
|
-
name: "
|
|
68
|
+
label: "Hobbies",
|
|
69
|
+
name: "hobbiesId",
|
|
70
70
|
type: "autocomplete",
|
|
71
71
|
dataType: EDataType.TEXT,
|
|
72
72
|
isMultiple: true,
|
|
@@ -78,25 +78,25 @@ export const characterForm: IForm = {
|
|
|
78
78
|
],
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
|
-
title: "
|
|
82
|
-
id: "
|
|
81
|
+
title: "Dados secundários",
|
|
82
|
+
id: "secondaryDataTab",
|
|
83
83
|
elements: [
|
|
84
84
|
{
|
|
85
|
-
label: "
|
|
86
|
-
name: "
|
|
85
|
+
label: "Data de nascimento*",
|
|
86
|
+
name: "dateOfBirth",
|
|
87
87
|
type: "input",
|
|
88
88
|
dataType: EDataType.DATE,
|
|
89
89
|
isRequired: true,
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
|
-
|
|
93
|
-
name: "
|
|
94
|
-
type:
|
|
92
|
+
label: "Adicionar mais coisas",
|
|
93
|
+
name: "addMoreThingsArray",
|
|
94
|
+
type: "array",
|
|
95
95
|
elements: [
|
|
96
96
|
{
|
|
97
97
|
label: "Rótulo de input de arquivo",
|
|
98
98
|
name: "fileInputLabelUrl",
|
|
99
|
-
type: "file",
|
|
99
|
+
type: "file",
|
|
100
100
|
dataType: EDataType.TEXT,
|
|
101
101
|
storageConfig: {
|
|
102
102
|
fileNameStrategy: "uuid",
|
|
@@ -109,18 +109,17 @@ export const characterForm: IForm = {
|
|
|
109
109
|
type: "input",
|
|
110
110
|
dataType: EDataType.PASSWORD,
|
|
111
111
|
},
|
|
112
|
-
|
|
113
112
|
{
|
|
114
113
|
label: "Rótulo de input de número",
|
|
115
114
|
name: "numberInputLabel",
|
|
116
115
|
type: "input",
|
|
117
116
|
dataType: EDataType.NUMBER,
|
|
118
117
|
},
|
|
119
|
-
]
|
|
118
|
+
],
|
|
120
119
|
},
|
|
121
120
|
],
|
|
122
121
|
},
|
|
123
|
-
]
|
|
122
|
+
],
|
|
124
123
|
},
|
|
125
124
|
],
|
|
126
125
|
};
|
|
@@ -11,7 +11,7 @@ export const characterList: IList = {
|
|
|
11
11
|
paramType: "query",
|
|
12
12
|
hasAuthentication: true,
|
|
13
13
|
},
|
|
14
|
-
|
|
14
|
+
listItems: [
|
|
15
15
|
{ label: "Nome", property: "characterName", type: "title", dataType: EDataType.NVARCHAR },
|
|
16
16
|
{ label: "Descrição", property: "characterDescription", type: "description", isHtml: true, dataType: EDataType.LONGTEXT },
|
|
17
17
|
],
|
|
@@ -8,7 +8,7 @@ import { movieGenreList } from "../components/lists/movieGenre.list";
|
|
|
8
8
|
|
|
9
9
|
export const movieModule: IModule = {
|
|
10
10
|
id: "movieModule",
|
|
11
|
-
title: "
|
|
11
|
+
title: "Filme",
|
|
12
12
|
icon: "movie",
|
|
13
13
|
components: [
|
|
14
14
|
movieForm,
|
|
@@ -18,5 +18,4 @@ export const movieModule: IModule = {
|
|
|
18
18
|
movieEpisodeForm,
|
|
19
19
|
movieEpisodeList
|
|
20
20
|
]
|
|
21
|
-
}
|
|
22
|
-
|
|
21
|
+
}
|
|
@@ -9,7 +9,7 @@ export const movieBackoffice: IProject = {
|
|
|
9
9
|
id: "movieBackoffice",
|
|
10
10
|
title: "Movie Backoffice",
|
|
11
11
|
description: "Sistema de gerenciamento para filmes e personagens.",
|
|
12
|
-
flow: "
|
|
12
|
+
flow: "backofficeOpenedWithoutPermissions",
|
|
13
13
|
businessPlan: {
|
|
14
14
|
businessValue: "Gerenciar e otimizar as operações do Movie.",
|
|
15
15
|
targetMarket: "Empresas que utilizam o Movie para gerenciar sugestões e feedbacks.",
|
|
@@ -20,7 +20,7 @@ export const movieBackoffice: IProject = {
|
|
|
20
20
|
monetization: "Assinaturas mensais para acesso ao sistema.",
|
|
21
21
|
},
|
|
22
22
|
frontend: {
|
|
23
|
-
framework: "
|
|
23
|
+
framework: "react",
|
|
24
24
|
uiKit: "flowbite",
|
|
25
25
|
},
|
|
26
26
|
backend: {
|
|
@@ -5,60 +5,79 @@ import type { IContractRequest } from "./form.interface";
|
|
|
5
5
|
import type { IBusinessRule } from "./project.interface";
|
|
6
6
|
|
|
7
7
|
export interface IList {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
componentType: "list";
|
|
9
|
+
id: string; // named according to component file name (<id>.<componentType>.ts)
|
|
10
|
+
title: string;
|
|
11
|
+
userStory?: string;
|
|
12
|
+
guards?: string[];
|
|
13
|
+
dataSource: IApiRequest;
|
|
14
|
+
businessRules?: IBusinessRule[];
|
|
15
|
+
listItems: {
|
|
16
|
+
property?: string; // property taken from dataSource response. e.g.: "email"
|
|
17
|
+
label?: string; // label to property. e.g.: "E-mail"
|
|
18
|
+
type?:
|
|
19
|
+
| "title"
|
|
20
|
+
| "subtitle"
|
|
21
|
+
| "description"
|
|
22
|
+
| "video"
|
|
23
|
+
| "image"
|
|
24
|
+
| "images"
|
|
25
|
+
| "icon";
|
|
26
|
+
isHtml?: boolean;
|
|
27
|
+
isLink?: boolean;
|
|
28
|
+
isTimestamp?: boolean;
|
|
29
|
+
callToAction?: {
|
|
30
|
+
link: string; // e.g.: "/user"
|
|
31
|
+
usePropertyAsQuery?: boolean; // if true then "/user/<email>"
|
|
32
|
+
};
|
|
33
|
+
dataType: EDataType;
|
|
34
|
+
conditions?: IFormCondition[];
|
|
14
35
|
businessRules?: IBusinessRule[];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
cardAsALink?: {
|
|
30
|
-
link: string; // e.g.: "/user"
|
|
36
|
+
todo?: string;
|
|
37
|
+
}[]; // properties taken from dataSource
|
|
38
|
+
cardAsALink?: {
|
|
39
|
+
link: string; // e.g.: "/user"
|
|
40
|
+
propertiesAsQueryParam?: string[]; // if, for example, ["_id", "email"], then "/user?_id=value&email=value"
|
|
41
|
+
propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
|
|
42
|
+
};
|
|
43
|
+
callsToActionMenu?: {
|
|
44
|
+
icon: string; // Material icons e.g: "pencil"
|
|
45
|
+
label: string; // e.g: "Editar"
|
|
46
|
+
action: {
|
|
47
|
+
link: {
|
|
48
|
+
// frontend url to be redirected on action completition
|
|
49
|
+
endpoint: string; // e.g.: "/user"
|
|
31
50
|
propertiesAsQueryParam?: string[]; // if, for example, ["_id", "email"], then "/user?_id=value&email=value"
|
|
32
51
|
propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
request?: { // backend request endpoint that must be processed before link redirection
|
|
44
|
-
endpoint: string; // e.g.: "/user"
|
|
45
|
-
propertiesAsQueryParam?: string[]; // if, for example, ["_id", "email"], then "/user?_id=value&email=value"
|
|
46
|
-
propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
|
|
47
|
-
verb: "get" | "post" | "put" | "delete";
|
|
48
|
-
dialog?: {
|
|
49
|
-
title: string;
|
|
50
|
-
message: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
52
|
+
};
|
|
53
|
+
request?: {
|
|
54
|
+
// backend request endpoint that must be processed before link redirection
|
|
55
|
+
endpoint: string; // e.g.: "/user"
|
|
56
|
+
propertiesAsQueryParam?: string[]; // if, for example, ["_id", "email"], then "/user?_id=value&email=value"
|
|
57
|
+
propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
|
|
58
|
+
verb: "get" | "post" | "put" | "delete";
|
|
59
|
+
dialog?: {
|
|
60
|
+
title: string;
|
|
61
|
+
message: string;
|
|
53
62
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}[];
|
|
66
|
+
contracts: {
|
|
67
|
+
id: string;
|
|
68
|
+
endpoint: string;
|
|
69
|
+
actions: (
|
|
70
|
+
| "create"
|
|
71
|
+
| "get"
|
|
72
|
+
| "getById"
|
|
73
|
+
| "update"
|
|
74
|
+
| "delete"
|
|
75
|
+
| "clone"
|
|
76
|
+
| "sendEmail"
|
|
77
|
+
)[];
|
|
78
|
+
request?: IContractRequest;
|
|
79
|
+
conditions?: IFormCondition[];
|
|
80
|
+
businessRules?: IBusinessRule[];
|
|
81
|
+
userStory?: string;
|
|
82
|
+
}[];
|
|
83
|
+
}
|
|
@@ -50,7 +50,15 @@ export interface IBusinessRule {
|
|
|
50
50
|
description: string;
|
|
51
51
|
subrules?: {
|
|
52
52
|
description: string;
|
|
53
|
+
implementation?: {
|
|
54
|
+
type: "frontend" | "backend" | "both";
|
|
55
|
+
details: string;
|
|
56
|
+
};
|
|
53
57
|
}[];
|
|
58
|
+
implementation?: {
|
|
59
|
+
type: "frontend" | "backend" | "both";
|
|
60
|
+
details: string;
|
|
61
|
+
};
|
|
54
62
|
};
|
|
55
63
|
}
|
|
56
64
|
|
|
@@ -11,6 +11,19 @@
|
|
|
11
11
|
"description": {
|
|
12
12
|
"type": "string"
|
|
13
13
|
},
|
|
14
|
+
"implementation": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"type": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"enum": ["frontend", "backend", "both"]
|
|
20
|
+
},
|
|
21
|
+
"details": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["type", "details"]
|
|
26
|
+
},
|
|
14
27
|
"subrules": {
|
|
15
28
|
"type": "array",
|
|
16
29
|
"items": {
|
|
@@ -21,6 +34,19 @@
|
|
|
21
34
|
"properties": {
|
|
22
35
|
"description": {
|
|
23
36
|
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"implementation": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"properties": {
|
|
41
|
+
"type": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": ["frontend", "backend", "both"]
|
|
44
|
+
},
|
|
45
|
+
"details": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": ["type", "details"]
|
|
24
50
|
}
|
|
25
51
|
}
|
|
26
52
|
}
|
|
@@ -31,4 +57,4 @@
|
|
|
31
57
|
}
|
|
32
58
|
}
|
|
33
59
|
}
|
|
34
|
-
}
|
|
60
|
+
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"businessRules": {
|
|
29
29
|
"$ref": "business-rules.ref.json"
|
|
30
30
|
},
|
|
31
|
-
"
|
|
31
|
+
"listItems": {
|
|
32
32
|
"type": "array",
|
|
33
33
|
"items": {
|
|
34
34
|
"type": "object",
|
|
@@ -82,9 +82,14 @@
|
|
|
82
82
|
},
|
|
83
83
|
"conditions": {
|
|
84
84
|
"$ref": "condition.ref.json"
|
|
85
|
+
},
|
|
86
|
+
"businessRules": {
|
|
87
|
+
"$ref": "business-rules.ref.json"
|
|
88
|
+
},
|
|
89
|
+
"todo": {
|
|
90
|
+
"type": "string"
|
|
85
91
|
}
|
|
86
|
-
}
|
|
87
|
-
"required": ["property"]
|
|
92
|
+
}
|
|
88
93
|
}
|
|
89
94
|
},
|
|
90
95
|
"cardAsALink": {
|