rapida-partner 1.0.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/README.md +85 -0
- package/index.ts +13 -0
- package/package.json +27 -0
- package/rapidaObject.json +3024 -0
- package/src/constants/options/agendaStatus.ts +3 -0
- package/src/constants/options/citiesFromBrazil.ts +27852 -0
- package/src/constants/options/countriesFromEarth.ts +1761 -0
- package/src/constants/options/currencies.ts +142 -0
- package/src/constants/options/eventJobs.ts +94 -0
- package/src/constants/options/events.ts +22 -0
- package/src/constants/options/hours.ts +26 -0
- package/src/constants/options/languages.ts +34 -0
- package/src/constants/options/statesFromBrazil.ts +29 -0
- package/src/controllers/ts_project_to_json_project.ts +17 -0
- package/src/controllers/validate-project-json-schema.ts +11 -0
- package/src/examples/components/forms/character.form.ts +92 -0
- package/src/examples/components/forms/company.form.ts +648 -0
- package/src/examples/components/forms/movie.form.ts +205 -0
- package/src/examples/components/forms/movieGenre.form.ts +43 -0
- package/src/examples/components/forms/person.form.ts +474 -0
- package/src/examples/components/lists/character.list.ts +47 -0
- package/src/examples/components/lists/company.list.ts +49 -0
- package/src/examples/components/lists/movie.list.ts +60 -0
- package/src/examples/components/lists/movieGenre.list.ts +51 -0
- package/src/examples/components/lists/person.list.ts +50 -0
- package/src/examples/modules/character.ts +13 -0
- package/src/examples/modules/company.ts +13 -0
- package/src/examples/modules/movie.ts +17 -0
- package/src/examples/modules/person.ts +13 -0
- package/src/examples/projects/movieBackoffice.ts +110 -0
- package/src/interfaces/backend-framework-structure.interface.ts +44 -0
- package/src/interfaces/data-card.interface.ts +102 -0
- package/src/interfaces/data-chart.interface.ts +84 -0
- package/src/interfaces/data-detail.interface.ts +123 -0
- package/src/interfaces/data-grid.interface.ts +48 -0
- package/src/interfaces/data-table.interface.ts +84 -0
- package/src/interfaces/form-array.interface.ts +14 -0
- package/src/interfaces/form-autocomplete.interface.ts +79 -0
- package/src/interfaces/form-button.interface.ts +34 -0
- package/src/interfaces/form-condition.interface.ts +26 -0
- package/src/interfaces/form-datepicker.interface.ts +18 -0
- package/src/interfaces/form-fieldset.interface.ts +13 -0
- package/src/interfaces/form-file.interface.ts +57 -0
- package/src/interfaces/form-input.interface.ts +69 -0
- package/src/interfaces/form-numeric.interface.ts +22 -0
- package/src/interfaces/form-pattern.interface.ts +16 -0
- package/src/interfaces/form-radiogroup.interface.ts +21 -0
- package/src/interfaces/form-select.interface.ts +60 -0
- package/src/interfaces/form-switch.interface.ts +15 -0
- package/src/interfaces/form-tab.interface.ts +17 -0
- package/src/interfaces/form.interface.ts +73 -0
- package/src/interfaces/frontend-framework-structure.interface.ts +39 -0
- package/src/interfaces/layout-dashboard.interface.ts +52 -0
- package/src/interfaces/layout-panel.interface.ts +45 -0
- package/src/interfaces/list.interface.ts +50 -0
- package/src/interfaces/project-backend.interface.ts +48 -0
- package/src/interfaces/project-style.interface.ts +129 -0
- package/src/interfaces/project.interface.ts +79 -0
- package/src/interfaces/yaml-template-skeleton.interface.ts +35 -0
- package/src/schemas/backend-framework-structure.schema.json +194 -0
- package/src/schemas/backend.ref.json +77 -0
- package/src/schemas/bdd-and-e2e-narratives.ref.json +57 -0
- package/src/schemas/bdd-and-e2e.json +36 -0
- package/src/schemas/business-plan.ref.json +25 -0
- package/src/schemas/business-rules.ref.json +34 -0
- package/src/schemas/component-one-of.ref.json +15 -0
- package/src/schemas/dashboard.ref.json +111 -0
- package/src/schemas/data-card.ref.json +245 -0
- package/src/schemas/data-chart.ref.json +168 -0
- package/src/schemas/data-detail.ref.json +297 -0
- package/src/schemas/data-grid.ref.json +101 -0
- package/src/schemas/data-table.ref.json +181 -0
- package/src/schemas/external-application.ref.json +97 -0
- package/src/schemas/form-array.ref.json +35 -0
- package/src/schemas/form-autocomplete-options-api.ref.json +53 -0
- package/src/schemas/form-autocomplete.ref.json +204 -0
- package/src/schemas/form-button.ref.json +88 -0
- package/src/schemas/form-common-api-request.ref.json +29 -0
- package/src/schemas/form-common-filters-from-other-form-fields.ref.json +22 -0
- package/src/schemas/form-common-form-fields-filled-by-api-response.ref.json +28 -0
- package/src/schemas/form-condition.ref.json +70 -0
- package/src/schemas/form-datepicker.ref.json +50 -0
- package/src/schemas/form-fieldset.ref.json +28 -0
- package/src/schemas/form-file.ref.json +115 -0
- package/src/schemas/form-input.ref.json +105 -0
- package/src/schemas/form-numeric.ref.json +60 -0
- package/src/schemas/form-one-of.ref.json +22 -0
- package/src/schemas/form-pattern.ref.json +42 -0
- package/src/schemas/form-radiogroup.ref.json +64 -0
- package/src/schemas/form-select.ref.json +123 -0
- package/src/schemas/form-switch.ref.json +39 -0
- package/src/schemas/form-tab.ref.json +50 -0
- package/src/schemas/form.ref.json +107 -0
- package/src/schemas/frontend-framework-structure.schema.json +178 -0
- package/src/schemas/frontend.ref.json +30 -0
- package/src/schemas/list.ref.json +196 -0
- package/src/schemas/module.ref.json +39 -0
- package/src/schemas/panel.ref.json +127 -0
- package/src/schemas/project.schema.json +39 -0
- package/src/schemas/todo.ref.json +10 -0
- package/src/utils/email.ts +56 -0
- package/src/utils/env.ts +9 -0
- package/src/utils/file.ts +139 -0
- package/src/utils/json.ts +100 -0
- package/src/utils/path.ts +51 -0
- package/src/utils/rapida-project.ts +17 -0
- package/tsconfig.json +27 -0
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IModule } from "../../interfaces/project.interface";
|
|
2
|
+
import { characterForm } from "../components/forms/character.form";
|
|
3
|
+
import { characterList } from "../components/lists/character.list";
|
|
4
|
+
|
|
5
|
+
export const characterModule: IModule = {
|
|
6
|
+
id: "characterModule",
|
|
7
|
+
title: "Peronsagem",
|
|
8
|
+
icon: "character",
|
|
9
|
+
components: [
|
|
10
|
+
characterForm,
|
|
11
|
+
characterList,
|
|
12
|
+
]
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IModule } from "../../interfaces/project.interface";
|
|
2
|
+
import { companyForm } from "../components/forms/company.form";
|
|
3
|
+
import { companyList } from "../components/lists/company.list";
|
|
4
|
+
|
|
5
|
+
export const companyModule: IModule = {
|
|
6
|
+
title: "Empresa",
|
|
7
|
+
id: "companyModule",
|
|
8
|
+
icon: "store",
|
|
9
|
+
components: [
|
|
10
|
+
companyForm,
|
|
11
|
+
companyList,
|
|
12
|
+
]
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IModule } from "../../interfaces/project.interface";
|
|
2
|
+
import { movieForm } from "../components/forms/movie.form";
|
|
3
|
+
import { movieGenreForm } from "../components/forms/movieGenre.form";
|
|
4
|
+
import { movieList } from "../components/lists/movie.list";
|
|
5
|
+
import { movieGenreList } from "../components/lists/movieGenre.list";
|
|
6
|
+
|
|
7
|
+
export const movieModule: IModule = {
|
|
8
|
+
id: "movieModule",
|
|
9
|
+
title: "Filme",
|
|
10
|
+
icon: "movie",
|
|
11
|
+
components: [
|
|
12
|
+
movieForm,
|
|
13
|
+
movieList,
|
|
14
|
+
movieGenreForm,
|
|
15
|
+
movieGenreList,
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IModule } from "../../interfaces/project.interface";
|
|
2
|
+
import { personForm } from "../components/forms/person.form";
|
|
3
|
+
import { personList } from "../components/lists/person.list";
|
|
4
|
+
|
|
5
|
+
export const personModule: IModule = {
|
|
6
|
+
title: "Pessoa",
|
|
7
|
+
id: "personModule",
|
|
8
|
+
icon: "person",
|
|
9
|
+
components: [
|
|
10
|
+
personForm,
|
|
11
|
+
personList,
|
|
12
|
+
]
|
|
13
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { IProject } from "../../interfaces/project.interface";
|
|
2
|
+
import { characterModule } from "../modules/character";
|
|
3
|
+
import { companyModule } from "../modules/company";
|
|
4
|
+
import { movieModule } from "../modules/movie";
|
|
5
|
+
import { personModule } from "../modules/person";
|
|
6
|
+
|
|
7
|
+
export const movieBackoffice: IProject = {
|
|
8
|
+
id: "movieBackoffice",
|
|
9
|
+
title: "Movie Backoffice",
|
|
10
|
+
description: "Sistema de gerenciamento para filmes e personagens.",
|
|
11
|
+
flow: "permeson",
|
|
12
|
+
businessPlan: {
|
|
13
|
+
businessValue: "Gerenciar e otimizar as operações do Movie.",
|
|
14
|
+
targetMarket: "Empresas que utilizam o Movie para gerenciar sugestões e feedbacks.",
|
|
15
|
+
benchmarkings: "Análise de sistemas de gerenciamento de feedbacks.",
|
|
16
|
+
legalIssues: "Conformidade com leis de proteção de dados.",
|
|
17
|
+
ethicalIssues: "Garantir a privacidade dos usuários.",
|
|
18
|
+
afterSales: "Suporte contínuo e atualizações regulares.",
|
|
19
|
+
monetization: "Assinaturas mensais para acesso ao sistema.",
|
|
20
|
+
},
|
|
21
|
+
frontend: {
|
|
22
|
+
framework: "svelte",
|
|
23
|
+
uiKit: "flowbite",
|
|
24
|
+
},
|
|
25
|
+
backend: {
|
|
26
|
+
framework: "nest",
|
|
27
|
+
jwtSecret: "Kunl4t3kw1llN3v3rD13",
|
|
28
|
+
database: {
|
|
29
|
+
provider: "mongodb",
|
|
30
|
+
connectionString:
|
|
31
|
+
"mongodb+srv://kunlatek:Kunlatek751@cluster0.b0pfr.mongodb.net/movie-v1",
|
|
32
|
+
credentials: {
|
|
33
|
+
databaseName: "movie-v1",
|
|
34
|
+
username: "kunlatek",
|
|
35
|
+
password: "Kunlatek751",
|
|
36
|
+
host: "cluster0.b0pfr.mongodb.net",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
storage: {
|
|
40
|
+
provider: "gcs",
|
|
41
|
+
credentials: {
|
|
42
|
+
clientEmail:
|
|
43
|
+
"rapida-personal@rapida-personal-projects.iam.gserviceaccount.com",
|
|
44
|
+
privateKey:
|
|
45
|
+
"-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDCDEQRUfKKxYUj\nVorX+aiEHhPRrrcNHVw40qq517wP7IgIp2UlA5uf0rV2cdn1njA9RMQxp6l7Qt+0\nBZg1JZM8l9Uv1SckRlkKST4k2B3MDOEl1riAPxIE/jBCUT9l2DCbir0Nu+CqGhGD\nUXOMpF0XWYL9GIBRo8Paf//yU0b86VBDfQGgnFkMKFq3bVDkPd8hQTBgTFT5F1Rh\nDcoUpAp/n3SYxkAK1V7Je+fnChF1DQPj8Nd5CLm4DsCM1B+HtaegsaE1ulXwhi1J\nlIFFGv49g0f2qOs3hytTPt0d8UpxFd9/Oq0tmcjuzK4bYzJdVZZPf+4xflHz+6R8\n2o7grTeDAgMBAAECggEABHdsz6s/tnMCdARHcN41w0i/8wke/IXK/CHZPSrakNFE\ndlKIEPiKyfx7Ic1QE4e/G4HsNCpkS8qHxKiGTt7dCz2BcjbpTjvyS7rQ298/nFVF\nj23oVEdfXk8NhFFDcNAvmjzwyhKjgrbT5V5oFvonjGSKj9HTDk4DMZHVrdm93g9k\nZ9XJBVeLh14/rkZLMDZ9DVjUMiQ6xElMH3IQD4MwEcul9eqM8bs2APgZlzzfO76m\nAuq20l4JqOcJJl8wzC7z12eNDNJrQNh2sHsT9zV5PabfNoQhnU6fDvKr0PG0PGRR\nS5PTDeiMY47rJVPgwxthSke3abtdgA9SNie8OqZl6QKBgQD+yFT+ndFYKvHg2WNi\ns0jK0QqFQB84LQtOX2YhQ0137mtSv0z7wO90e28dfUqsjax4DxPMp+AW0cC3SBEv\n2T8/rJrgzGucPt4Jzml5HYl2NgCkNAtHIJ1vtXJdX5d3WmYhH7cUTPmV6nMS8OlF\nheSyfudCiOo89phQf0pI6lhQKwKBgQDC+aOU2cxMVA5VH0txX0G9tPQjBvzY09ev\nVLGrxlmdAcQVXYCWdoESEfTv3E4JPklAz5B2/XnALxM5ewJgjoP6buOCJrQcgJNC\nSsG9Ll3zF4c+opFmaYTzcAY9HWHa4Pc+GAxFrrcPGzVBLjSrl7FPdykkPiBNxNJa\nnOzzrL4yCQKBgQC7b/pHjycx6/YiawuY0zjcLMnGmhPdqhXFRJ3IHtFhR/+g0qf6\nFkiTszNdyI0lQNz/PmhciaxsXUegDt7GCtdjKsKOWxVXz1BeeoJR3g8A7l2ub7NU\nUoRAaIaIdwjhf5nfCIwR3UdIqUCbUKzsvsIvJvlPk5Zv3yLTJbIqzmzGHQKBgBiQ\nnUSGwE+pk3i0DaxGBSFiqBO1sKuc3SLQ9+WdgvLeIxdSBX5vhcmCC6sgxZAykcYh\noKDtRKarB7AJSH5j1kr6J53hRHYG2QbUJl6wddPH1hlVIB6YEtEc/xw6FHcgOuZO\n31T0M0oq8mW47Zfk78kESWGwlh9WOe6CsPPugrQJAoGBAP3o8DqH1Pb7vlowsz78\n8fsCuydEJgsPSwHHqBveeUHBQLGSiGIIKRXWR1a13mWXQTqQkROZCwvVCMX6FHZZ\nKv3rzgsTkaaoqM0RVLcQSSDoyu2yP/JJv+VYsvMf2S3dUkDAeYDZFizPeFF42t92\n+MSId41OkBvJ/JvqsBWlWFYK\n-----END PRIVATE KEY-----\n",
|
|
46
|
+
projectId: "rapida-personal-projects",
|
|
47
|
+
},
|
|
48
|
+
publicBucketName: "rapida-public-files",
|
|
49
|
+
privateBucketName: "rapida-private-files",
|
|
50
|
+
},
|
|
51
|
+
logging: {
|
|
52
|
+
discordWebhookUrl:
|
|
53
|
+
"https://discord.com/api/webhooks/1370095507959054429/Ay8pIM-sinbjsLMAAWGrRDFT-oyBD3xu7yB2Ke0Bx6RxpKN882taB4_tkD2xsdk8MirZ",
|
|
54
|
+
},
|
|
55
|
+
email: {
|
|
56
|
+
smtpUser: "noreply.rapida@gmail.com",
|
|
57
|
+
smtpPass: "ekgwxlazvjjllfxf",
|
|
58
|
+
smtpFrom: "noreply@kunlatek.com",
|
|
59
|
+
},
|
|
60
|
+
baseUrl: "http://localhost:5173",
|
|
61
|
+
},
|
|
62
|
+
modules: [
|
|
63
|
+
personModule,
|
|
64
|
+
companyModule,
|
|
65
|
+
movieModule,
|
|
66
|
+
characterModule,
|
|
67
|
+
],
|
|
68
|
+
styles: [
|
|
69
|
+
{
|
|
70
|
+
themeName: "light",
|
|
71
|
+
main: {
|
|
72
|
+
headerHeight: "60px",
|
|
73
|
+
typography: {
|
|
74
|
+
fontFamily: "Arial, sans-serif",
|
|
75
|
+
fontSize: "16px",
|
|
76
|
+
},
|
|
77
|
+
colors: {
|
|
78
|
+
primary: "#4F46E5",
|
|
79
|
+
primaryContrast: "#FFFFFF",
|
|
80
|
+
secondary: "#6B7280",
|
|
81
|
+
secondaryContrast: "#FFFFFF",
|
|
82
|
+
background: "#FFFFFF",
|
|
83
|
+
error: "#DC2626",
|
|
84
|
+
success: "#16A34A",
|
|
85
|
+
warning: "#D97706",
|
|
86
|
+
},
|
|
87
|
+
shadows: {
|
|
88
|
+
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)",
|
|
89
|
+
},
|
|
90
|
+
borders: {
|
|
91
|
+
radius: "4px",
|
|
92
|
+
},
|
|
93
|
+
components: {
|
|
94
|
+
input: {
|
|
95
|
+
text: "#111827",
|
|
96
|
+
background: "#F9FAFB",
|
|
97
|
+
border: "#D1D5DB",
|
|
98
|
+
borderRadius: "4px",
|
|
99
|
+
focusBorder: "#4F46E5",
|
|
100
|
+
placeholder: "#9CA3AF",
|
|
101
|
+
width: "248px",
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
spacing: "8px",
|
|
105
|
+
maxWidth: "1200px",
|
|
106
|
+
footerHeight: "60px",
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface IBackendFrameworkStructure {
|
|
2
|
+
projectFolderCase: "kebab" | "snake" | "pascal" | "camel";
|
|
3
|
+
controllerFileNomenclature: IFileNomenclature;
|
|
4
|
+
modelFileNomenclature: IFileNomenclature;
|
|
5
|
+
moduleFileNomenclature: IFileNomenclature;
|
|
6
|
+
repositoryFileNomenclature: IFileNomenclature;
|
|
7
|
+
componentPath: string;
|
|
8
|
+
controllerPath: string;
|
|
9
|
+
modelPath: string;
|
|
10
|
+
modulePath: string;
|
|
11
|
+
repositoryPath: string;
|
|
12
|
+
controllerFile: IFileDetails;
|
|
13
|
+
modelFile: IFileDetails;
|
|
14
|
+
moduleFile: IFileDetails;
|
|
15
|
+
repositoryFile: IFileDetails;
|
|
16
|
+
uniqueFile: IFileDetails;
|
|
17
|
+
sourcePath: string;
|
|
18
|
+
hasComponentSpecificFolder: boolean;
|
|
19
|
+
dependencies: IDependencies;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface IFileNomenclature {
|
|
23
|
+
case: "kebab" | "snake" | "pascal" | "camel";
|
|
24
|
+
keyword?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface IFileDetails {
|
|
28
|
+
hasControllerFile?: boolean;
|
|
29
|
+
controllerFileExtension?: string;
|
|
30
|
+
hasModelFile?: boolean;
|
|
31
|
+
modelFileExtension?: string;
|
|
32
|
+
hasModuleFile?: boolean;
|
|
33
|
+
moduleFileExtension?: string;
|
|
34
|
+
hasRepositoryFile?: boolean;
|
|
35
|
+
repositoryFileExtension?: string;
|
|
36
|
+
hasUniqueFile?: boolean;
|
|
37
|
+
uniqueFileExtension?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface IDependencies {
|
|
41
|
+
array?: string[];
|
|
42
|
+
autocomplete?: string[];
|
|
43
|
+
wysiwyg?: string[];
|
|
44
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { IApiRequest } from "./form-input.interface";
|
|
2
|
+
import type { IBusinessRule } from "./project.interface";
|
|
3
|
+
|
|
4
|
+
export interface IDataCard {
|
|
5
|
+
componentType: "dataCard";
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
userStory?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
guards?: "isAuthenticated" | "isAuthorized";
|
|
11
|
+
businessRules?: IBusinessRule[];
|
|
12
|
+
dataSource: IApiRequest;
|
|
13
|
+
layout: "horizontal" | "vertical";
|
|
14
|
+
imageConfig?: {
|
|
15
|
+
property: string;
|
|
16
|
+
fallbackUrl?: string;
|
|
17
|
+
position?: "top" | "left" | "right";
|
|
18
|
+
aspectRatio?: "1:1" | "4:3" | "16:9";
|
|
19
|
+
};
|
|
20
|
+
titleConfig: {
|
|
21
|
+
property: string;
|
|
22
|
+
isLink?: boolean;
|
|
23
|
+
linkRoute?: string;
|
|
24
|
+
linkParamProperty?: string;
|
|
25
|
+
};
|
|
26
|
+
subtitleConfig?: {
|
|
27
|
+
property: string;
|
|
28
|
+
};
|
|
29
|
+
descriptionConfig?: {
|
|
30
|
+
property: string;
|
|
31
|
+
maxLength?: number;
|
|
32
|
+
showReadMore?: boolean;
|
|
33
|
+
};
|
|
34
|
+
properties: IDataCardProperty[];
|
|
35
|
+
actions?: IDataCardAction[];
|
|
36
|
+
styling?: {
|
|
37
|
+
variant?: "default" | "elevated" | "flat" | "outlined";
|
|
38
|
+
cardClickable?: boolean;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface IDataCardProperty {
|
|
43
|
+
property: string;
|
|
44
|
+
label: string;
|
|
45
|
+
type?:
|
|
46
|
+
| "text"
|
|
47
|
+
| "number"
|
|
48
|
+
| "password"
|
|
49
|
+
| "email"
|
|
50
|
+
| "color"
|
|
51
|
+
| "date"
|
|
52
|
+
| "wysiwyg"
|
|
53
|
+
| "time"
|
|
54
|
+
| "file"
|
|
55
|
+
| "array"
|
|
56
|
+
| "char"
|
|
57
|
+
| "nchar"
|
|
58
|
+
| "varchar"
|
|
59
|
+
| "varchar2"
|
|
60
|
+
| "nvarchar"
|
|
61
|
+
| "longtext"
|
|
62
|
+
| "clob"
|
|
63
|
+
| "nclob"
|
|
64
|
+
| "decimal"
|
|
65
|
+
| "numeric"
|
|
66
|
+
| "integer"
|
|
67
|
+
| "float"
|
|
68
|
+
| "double"
|
|
69
|
+
| "real"
|
|
70
|
+
| "timestamp"
|
|
71
|
+
| "datetime"
|
|
72
|
+
| "datetime2"
|
|
73
|
+
| "uniqueidentifier"
|
|
74
|
+
| "boolean";
|
|
75
|
+
format?: string;
|
|
76
|
+
isHtml?: boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface IDataCardAction {
|
|
80
|
+
icon?: string;
|
|
81
|
+
label: string;
|
|
82
|
+
action: {
|
|
83
|
+
type: "link" | "request" | "event";
|
|
84
|
+
link?: {
|
|
85
|
+
route: string;
|
|
86
|
+
paramProperty?: string;
|
|
87
|
+
};
|
|
88
|
+
request?: {
|
|
89
|
+
endpoint: string;
|
|
90
|
+
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
91
|
+
confirmMessage?: string;
|
|
92
|
+
};
|
|
93
|
+
event?: {
|
|
94
|
+
name: string;
|
|
95
|
+
data?: any;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
styling?: {
|
|
99
|
+
variant?: "primary" | "secondary" | "text" | "outlined";
|
|
100
|
+
size?: "sm" | "md" | "lg";
|
|
101
|
+
};
|
|
102
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { IApiRequest } from "./form-input.interface";
|
|
2
|
+
import type { IBusinessRule } from "./project.interface";
|
|
3
|
+
|
|
4
|
+
export interface IDataChart {
|
|
5
|
+
componentType: "dataChart";
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
userStory?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
guards?: "isAuthenticated" | "isAuthorized";
|
|
11
|
+
businessRules?: IBusinessRule[];
|
|
12
|
+
dataSource: IApiRequest;
|
|
13
|
+
chartType:
|
|
14
|
+
| "line"
|
|
15
|
+
| "bar"
|
|
16
|
+
| "pie"
|
|
17
|
+
| "doughnut"
|
|
18
|
+
| "radar"
|
|
19
|
+
| "scatter"
|
|
20
|
+
| "bubble"
|
|
21
|
+
| "area"
|
|
22
|
+
| "polarArea";
|
|
23
|
+
dimensions: {
|
|
24
|
+
width?: string;
|
|
25
|
+
height?: string;
|
|
26
|
+
aspectRatio?: number;
|
|
27
|
+
};
|
|
28
|
+
data: {
|
|
29
|
+
labels: {
|
|
30
|
+
property: string;
|
|
31
|
+
formatter?: string;
|
|
32
|
+
};
|
|
33
|
+
datasets: IChartDataset[];
|
|
34
|
+
};
|
|
35
|
+
options?: {
|
|
36
|
+
responsive?: boolean;
|
|
37
|
+
maintainAspectRatio?: boolean;
|
|
38
|
+
plugins?: {
|
|
39
|
+
title?: {
|
|
40
|
+
display?: boolean;
|
|
41
|
+
text?: string;
|
|
42
|
+
};
|
|
43
|
+
legend?: {
|
|
44
|
+
display?: boolean;
|
|
45
|
+
position?: "top" | "bottom" | "left" | "right";
|
|
46
|
+
};
|
|
47
|
+
tooltip?: {
|
|
48
|
+
enabled?: boolean;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
scales?: {
|
|
52
|
+
x?: {
|
|
53
|
+
title?: {
|
|
54
|
+
display?: boolean;
|
|
55
|
+
text?: string;
|
|
56
|
+
};
|
|
57
|
+
grid?: {
|
|
58
|
+
display?: boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
y?: {
|
|
62
|
+
title?: {
|
|
63
|
+
display?: boolean;
|
|
64
|
+
text?: string;
|
|
65
|
+
};
|
|
66
|
+
grid?: {
|
|
67
|
+
display?: boolean;
|
|
68
|
+
};
|
|
69
|
+
beginAtZero?: boolean;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface IChartDataset {
|
|
76
|
+
property: string;
|
|
77
|
+
label: string;
|
|
78
|
+
backgroundColor?: string | string[];
|
|
79
|
+
borderColor?: string | string[];
|
|
80
|
+
borderWidth?: number;
|
|
81
|
+
fill?: boolean;
|
|
82
|
+
tension?: number; // Para linhas curvas
|
|
83
|
+
aggregator?: "sum" | "avg" | "min" | "max" | "count";
|
|
84
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { IApiRequest } from "./form-input.interface";
|
|
2
|
+
import type { IBusinessRule } from "./project.interface";
|
|
3
|
+
|
|
4
|
+
export interface IDataDetail {
|
|
5
|
+
componentType: "dataDetail";
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
userStory?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
guards?: "isAuthenticated" | "isAuthorized";
|
|
11
|
+
businessRules?: IBusinessRule[];
|
|
12
|
+
dataSource: IApiRequest;
|
|
13
|
+
headerConfig?: {
|
|
14
|
+
title: {
|
|
15
|
+
property: string;
|
|
16
|
+
};
|
|
17
|
+
subtitle?: {
|
|
18
|
+
property: string;
|
|
19
|
+
};
|
|
20
|
+
imageConfig?: {
|
|
21
|
+
property: string;
|
|
22
|
+
fallbackUrl?: string;
|
|
23
|
+
isAvatar?: boolean;
|
|
24
|
+
};
|
|
25
|
+
statusProperty?: string;
|
|
26
|
+
statusConfig?: {
|
|
27
|
+
[key: string]: {
|
|
28
|
+
label: string;
|
|
29
|
+
color: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
sections: IDataDetailSection[];
|
|
34
|
+
relatedData?: IDataDetailRelated[];
|
|
35
|
+
actions?: IDataDetailAction[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface IDataDetailSection {
|
|
39
|
+
id: string;
|
|
40
|
+
title: string;
|
|
41
|
+
icon?: string;
|
|
42
|
+
collapsible?: boolean;
|
|
43
|
+
collapsed?: boolean;
|
|
44
|
+
layout: "oneColumn" | "twoColumns" | "threeColumns" | "table";
|
|
45
|
+
properties: IDataDetailProperty[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface IDataDetailProperty {
|
|
49
|
+
property: string;
|
|
50
|
+
label: string;
|
|
51
|
+
type?:
|
|
52
|
+
| "text"
|
|
53
|
+
| "number"
|
|
54
|
+
| "password"
|
|
55
|
+
| "email"
|
|
56
|
+
| "color"
|
|
57
|
+
| "date"
|
|
58
|
+
| "wysiwyg"
|
|
59
|
+
| "time"
|
|
60
|
+
| "file"
|
|
61
|
+
| "array"
|
|
62
|
+
| "char"
|
|
63
|
+
| "nchar"
|
|
64
|
+
| "varchar"
|
|
65
|
+
| "varchar2"
|
|
66
|
+
| "nvarchar"
|
|
67
|
+
| "longtext"
|
|
68
|
+
| "clob"
|
|
69
|
+
| "nclob"
|
|
70
|
+
| "decimal"
|
|
71
|
+
| "numeric"
|
|
72
|
+
| "integer"
|
|
73
|
+
| "float"
|
|
74
|
+
| "double"
|
|
75
|
+
| "real"
|
|
76
|
+
| "timestamp"
|
|
77
|
+
| "datetime"
|
|
78
|
+
| "datetime2"
|
|
79
|
+
| "uniqueidentifier"
|
|
80
|
+
| "boolean";
|
|
81
|
+
format?: string;
|
|
82
|
+
linkConfig?: {
|
|
83
|
+
route?: string;
|
|
84
|
+
external?: boolean;
|
|
85
|
+
target?: "_blank" | "_self";
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface IDataDetailRelated {
|
|
90
|
+
id: string;
|
|
91
|
+
title: string;
|
|
92
|
+
componentType: "dataTable" | "dataGrid" | "dataList";
|
|
93
|
+
componentConfig: any;
|
|
94
|
+
dataSource: {
|
|
95
|
+
endpoint: string;
|
|
96
|
+
paramProperty: string;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface IDataDetailAction {
|
|
101
|
+
icon?: string;
|
|
102
|
+
label: string;
|
|
103
|
+
action: {
|
|
104
|
+
type: "link" | "request" | "event";
|
|
105
|
+
link?: {
|
|
106
|
+
route: string;
|
|
107
|
+
paramProperty?: string;
|
|
108
|
+
};
|
|
109
|
+
request?: {
|
|
110
|
+
endpoint: string;
|
|
111
|
+
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
112
|
+
confirmMessage?: string;
|
|
113
|
+
};
|
|
114
|
+
event?: {
|
|
115
|
+
name: string;
|
|
116
|
+
data?: any;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
styling?: {
|
|
120
|
+
variant?: "primary" | "secondary" | "text" | "outlined";
|
|
121
|
+
size?: "sm" | "md" | "lg";
|
|
122
|
+
};
|
|
123
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { IDataCard } from "./data-card.interface";
|
|
2
|
+
import type { IApiRequest } from "./form-input.interface";
|
|
3
|
+
import type { IBusinessRule } from "./project.interface";
|
|
4
|
+
|
|
5
|
+
export interface IDataGrid {
|
|
6
|
+
componentType: "dataGrid";
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
userStory?: string;
|
|
10
|
+
icon?: string;
|
|
11
|
+
guards?: "isAuthenticated" | "isAuthorized";
|
|
12
|
+
businessRules?: IBusinessRule[];
|
|
13
|
+
dataSource: IApiRequest;
|
|
14
|
+
cardTemplate: IDataCard;
|
|
15
|
+
gridConfig: {
|
|
16
|
+
columns: {
|
|
17
|
+
sm: number;
|
|
18
|
+
md: number;
|
|
19
|
+
lg: number;
|
|
20
|
+
xl: number;
|
|
21
|
+
};
|
|
22
|
+
gap: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
pagination?: IDataGridPagination;
|
|
28
|
+
filters?: IDataGridFilter[];
|
|
29
|
+
emptyState?: {
|
|
30
|
+
message: string;
|
|
31
|
+
icon?: string;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface IDataGridPagination {
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
pageSize: number;
|
|
38
|
+
pageSizeOptions?: number[];
|
|
39
|
+
position?: "top" | "bottom" | "both";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface IDataGridFilter {
|
|
43
|
+
property: string;
|
|
44
|
+
label: string;
|
|
45
|
+
type: "text" | "select" | "date" | "dateRange" | "number";
|
|
46
|
+
defaultValue?: any;
|
|
47
|
+
options?: { label: string; value: any }[];
|
|
48
|
+
}
|