rapida-partner 1.9.0 → 1.10.1

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 (27) hide show
  1. package/package.json +1 -1
  2. package/rapidaObject.json +882 -635
  3. package/src/examples/components/forms/character.form.ts +2 -2
  4. package/src/examples/components/forms/movie.form.ts +51 -27
  5. package/src/examples/components/forms/movieEpisode.form.ts +37 -38
  6. package/src/examples/components/forms/movieGenre.form.ts +18 -18
  7. package/src/examples/components/forms/test.form.ts +125 -0
  8. package/src/examples/components/lists/character.list.ts +23 -3
  9. package/src/examples/components/lists/movie.list.ts +34 -6
  10. package/src/examples/components/lists/movieEpisode.list.ts +31 -3
  11. package/src/examples/components/lists/movieGenre.list.ts +29 -3
  12. package/src/examples/modules/movie.ts +2 -3
  13. package/src/examples/projects/movieBackoffice.ts +2 -2
  14. package/src/interfaces/form-array.interface.ts +1 -1
  15. package/src/interfaces/form-flowchart.interface.ts +22 -0
  16. package/src/interfaces/form.interface.ts +6 -0
  17. package/src/interfaces/list.interface.ts +2 -0
  18. package/src/schemas/form-array.ref.json +2 -2
  19. package/src/schemas/form-flowchart-action-with-element.ref.json +29 -0
  20. package/src/schemas/form-flowchart-actor.ref.json +20 -0
  21. package/src/schemas/form-flowchart-element.ref.json +14 -0
  22. package/src/schemas/form-flowchart.ref.json +14 -0
  23. package/src/schemas/form.ref.json +3 -0
  24. package/src/schemas/list.ref.json +6 -0
  25. package/src/examples/components/lists/company.list.ts +0 -49
  26. package/src/examples/components/lists/customer.list.ts +0 -50
  27. package/src/examples/components/lists/person.list.ts +0 -50
@@ -25,6 +25,8 @@ export interface IList {
25
25
  };
26
26
  dataType: EDataType;
27
27
  conditions?: IFormCondition[];
28
+ businessRules?: IBusinessRule[];
29
+ todo?: string;
28
30
  }[]; // properties taken from dataSource
29
31
  cardAsALink?: {
30
32
  link: string; // e.g.: "/user"
@@ -20,7 +20,7 @@
20
20
  "name": {
21
21
  "type": "string"
22
22
  },
23
- "title": {
23
+ "label": {
24
24
  "type": "string"
25
25
  },
26
26
  "elements": {
@@ -32,6 +32,6 @@
32
32
  },
33
33
  "required": [
34
34
  "type",
35
- "title"
35
+ "label"
36
36
  ]
37
37
  }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$id": "form-flowchart-action-with-element.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "verb": {
7
+ "type": "string",
8
+ "enum": [
9
+ "create",
10
+ "get",
11
+ "getById",
12
+ "update",
13
+ "delete",
14
+ "clone",
15
+ "sendEmail"
16
+ ]
17
+ },
18
+ "elements": {
19
+ "type": "array",
20
+ "items": {
21
+ "$ref": "form-flowchart-element.ref.json"
22
+ }
23
+ },
24
+ "businessRules": {
25
+ "$ref": "business-rules.ref.json"
26
+ }
27
+ },
28
+ "required": ["verb"]
29
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$id": "form-flowchart-actor.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "name": {
7
+ "type": "string"
8
+ },
9
+ "actionsWithElements": {
10
+ "type": "array",
11
+ "items": {
12
+ "$ref": "form-flowchart-action-with-element.ref.json"
13
+ }
14
+ },
15
+ "businessRules": {
16
+ "$ref": "business-rules.ref.json"
17
+ }
18
+ },
19
+ "required": ["name", "actionsWithElements"]
20
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$id": "form-flowchart-element.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "name": {
7
+ "type": "string"
8
+ },
9
+ "businessRules": {
10
+ "$ref": "business-rules.ref.json"
11
+ }
12
+ },
13
+ "required": ["name", "businessRules"]
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$id": "form-flowchart.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "actors": {
7
+ "type": "array",
8
+ "items": {
9
+ "$ref": "form-flowchart-actor.ref.json"
10
+ }
11
+ }
12
+ },
13
+ "required": ["actors"]
14
+ }
@@ -234,6 +234,9 @@
234
234
  "required": ["id", "endpoint", "actions"]
235
235
  }
236
236
  },
237
+ "flowChart": {
238
+ "$ref": "form-flowchart.ref.json"
239
+ },
237
240
  "kanban": {
238
241
  "type": "object",
239
242
  "properties": {
@@ -82,6 +82,12 @@
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
92
  },
87
93
  "required": ["property"]
@@ -1,49 +0,0 @@
1
- import type { IList } from "../../../interfaces/list.interface";
2
-
3
- export const companyList: IList = {
4
- componentType: "list",
5
- id: "companyList",
6
- title: "Lista de empresas",
7
- guards: ["isAuthorized"],
8
- dataSource: {
9
- endpoint: "/companies",
10
- paramType: "query",
11
- hasAuthentication: true,
12
- },
13
- properties: [
14
- { label: "CNPJ", property: "companyCnpj", type: "title" },
15
- { label: "Nome", property: "companyName", type: "title" },
16
- { label: "Telefone", property: "companyPhoneOne", type: "subtitle" },
17
- { label: "E-mail", property: "companyEmailOne", type: "subtitle" },
18
- ],
19
- callsToActionMenu: [
20
- {
21
- label: "Editar",
22
- icon: "pencil",
23
- action: {
24
- link: {
25
- endpoint: "/company-form",
26
- propertiesAsQueryParam: ["_id"],
27
- },
28
- },
29
- },
30
- {
31
- label: "Excluir",
32
- icon: "delete",
33
- action: {
34
- link: {
35
- endpoint: "/company-list",
36
- },
37
- request: {
38
- endpoint: "/companies",
39
- verb: "delete",
40
- propertiesAsPathParam: ["_id"],
41
- dialog: {
42
- title: "Excluir empresa",
43
- message: "Deseja realmente excluir essa empresa?",
44
- }
45
- }
46
- },
47
- }
48
- ]
49
- };
@@ -1,50 +0,0 @@
1
- import type { IList } from "../../../interfaces/list.interface";
2
-
3
- export const customerList: IList = {
4
- title: "Lista de clientes",
5
- id: "customerList",
6
- componentType: "list",
7
- dataSource: {
8
- endpoint: "/customers",
9
- paramType: "query",
10
- },
11
- properties: [
12
- { label: "Tipo", property: "entityRelated", type: "title", },
13
- { label: "Nome", property: "People.name", type: "subtitle", conditions: [{ type: "property", elements: [{ key: "entityRelated", comparisonOperator: "===", value: "People" }] }] },
14
- { label: "Telefone", property: "People.phoneOne", type: "subtitle", conditions: [{ type: "property", elements: [{ key: "entityRelated", comparisonOperator: "===", value: "People" }] }] },
15
- { label: "E-mail", property: "People.emailOne", type: "subtitle", conditions: [{ type: "property", elements: [{ key: "entityRelated", comparisonOperator: "===", value: "People" }] }] },
16
- { label: "Nome", property: "Companies.companyName", type: "subtitle", conditions: [{ type: "property", elements: [{ key: "entityRelated", comparisonOperator: "===", value: "Companies" }] }] },
17
- { label: "Telefone", property: "Companies.phoneOne", type: "subtitle", conditions: [{ type: "property", elements: [{ key: "entityRelated", comparisonOperator: "===", value: "Companies" }] }] },
18
- { label: "E-mail", property: "Companies.emailOne", type: "subtitle", conditions: [{ type: "property", elements: [{ key: "entityRelated", comparisonOperator: "===", value: "Companies" }] }] },
19
- ],
20
- callsToActionMenu: [
21
- {
22
- label: "Editar",
23
- icon: "pencil",
24
- action: {
25
- link: {
26
- endpoint: "/customer-form",
27
- propertiesAsQueryParam: ["_id"],
28
- },
29
- },
30
- },
31
- {
32
- label: "Excluir",
33
- icon: "delete",
34
- action: {
35
- link: {
36
- endpoint: "/customer-list",
37
- },
38
- request: {
39
- endpoint: "/customers",
40
- verb: "delete",
41
- propertiesAsPathParam: ["_id"],
42
- dialog: {
43
- title: "Excluir conteúdo",
44
- message: "Deseja realmente excluir esse conteúdo?",
45
- }
46
- }
47
- },
48
- }
49
- ]
50
- }
@@ -1,50 +0,0 @@
1
- import type { IList } from "../../../interfaces/list.interface";
2
-
3
- export const personList: IList = {
4
- componentType: "list",
5
- id: "personList",
6
- title: "Lista de pessoas",
7
- guards: ["isAuthorized"],
8
- dataSource: {
9
- endpoint: "/people",
10
- paramType: "query",
11
- hasAuthentication: true,
12
- },
13
- properties: [
14
- { label: "Foto", property: "personPicture", type: "image" },
15
- { label: "CPF", property: "personCpf", type: "title" },
16
- { label: "Nome", property: "personName", type: "title" },
17
- { label: "Telefone", property: "personPhoneOne", type: "subtitle" },
18
- { label: "E-mail", property: "personEmailOne", type: "subtitle" },
19
- ],
20
- callsToActionMenu: [
21
- {
22
- label: "Editar",
23
- icon: "pencil",
24
- action: {
25
- link: {
26
- endpoint: "/person-form",
27
- propertiesAsQueryParam: ["_id"],
28
- },
29
- },
30
- },
31
- {
32
- label: "Excluir",
33
- icon: "delete",
34
- action: {
35
- link: {
36
- endpoint: "/person-list",
37
- },
38
- request: {
39
- endpoint: "/people",
40
- verb: "delete",
41
- propertiesAsPathParam: ["_id"],
42
- dialog: {
43
- title: "Excluir pessoa",
44
- message: "Deseja realmente excluir essa pessoa?",
45
- }
46
- }
47
- },
48
- }
49
- ]
50
- };