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,84 @@
|
|
|
1
|
+
import type { IApiRequest } from "./form-input.interface";
|
|
2
|
+
import type { IBusinessRule } from "./project.interface";
|
|
3
|
+
|
|
4
|
+
export interface IDataTable {
|
|
5
|
+
componentType: "dataTable";
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
userStory?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
guards?: "isAuthenticated" | "isAuthorized";
|
|
11
|
+
businessRules?: IBusinessRule[];
|
|
12
|
+
dataSource: IApiRequest;
|
|
13
|
+
columns: IDataTableColumn[];
|
|
14
|
+
pagination?: IDataTablePagination;
|
|
15
|
+
filters?: IDataTableFilter[];
|
|
16
|
+
actions?: IDataTableAction[];
|
|
17
|
+
styling?: {
|
|
18
|
+
variant?: "default" | "bordered" | "striped";
|
|
19
|
+
rowClickable?: boolean;
|
|
20
|
+
highlightHoveredRow?: boolean;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface IDataTableColumn {
|
|
25
|
+
property: string;
|
|
26
|
+
label: string;
|
|
27
|
+
sortable?: boolean;
|
|
28
|
+
filterable?: boolean;
|
|
29
|
+
hidden?: boolean;
|
|
30
|
+
width?: string;
|
|
31
|
+
align?: "left" | "center" | "right";
|
|
32
|
+
formatter?: {
|
|
33
|
+
type: "date" | "currency" | "number" | "boolean" | "custom";
|
|
34
|
+
format?: string;
|
|
35
|
+
customFunction?: string;
|
|
36
|
+
};
|
|
37
|
+
renderAs?: "text" | "link" | "badge" | "image" | "icon";
|
|
38
|
+
linkConfig?: {
|
|
39
|
+
route: string;
|
|
40
|
+
paramProperty?: string;
|
|
41
|
+
target?: "_blank" | "_self";
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface IDataTablePagination {
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
pageSize: number;
|
|
48
|
+
pageSizeOptions?: number[];
|
|
49
|
+
position?: "top" | "bottom" | "both";
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface IDataTableFilter {
|
|
53
|
+
property: string;
|
|
54
|
+
label: string;
|
|
55
|
+
type: "text" | "select" | "date" | "dateRange" | "number";
|
|
56
|
+
defaultValue?: any;
|
|
57
|
+
options?: { label: string; value: any }[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface IDataTableAction {
|
|
61
|
+
icon?: string;
|
|
62
|
+
label: string;
|
|
63
|
+
action: {
|
|
64
|
+
type: "link" | "request" | "event";
|
|
65
|
+
link?: {
|
|
66
|
+
route: string;
|
|
67
|
+
paramProperty?: string;
|
|
68
|
+
};
|
|
69
|
+
request?: {
|
|
70
|
+
endpoint: string;
|
|
71
|
+
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
72
|
+
confirmMessage?: string;
|
|
73
|
+
};
|
|
74
|
+
event?: {
|
|
75
|
+
name: string;
|
|
76
|
+
data?: any;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
visibilityCondition?: {
|
|
80
|
+
property: string;
|
|
81
|
+
operator: "===" | "!==" | ">" | "<" | ">=" | "<=" | "contains";
|
|
82
|
+
value: any;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
2
|
+
import type { IFormElement } from "./form.interface";
|
|
3
|
+
import type { IBusinessRule } from "./project.interface";
|
|
4
|
+
|
|
5
|
+
export interface IFormArray {
|
|
6
|
+
type: "array";
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
title: string;
|
|
10
|
+
elements: IFormElement[];
|
|
11
|
+
conditions?: IFormCondition[];
|
|
12
|
+
todo?: string;
|
|
13
|
+
businessRules?: IBusinessRule[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
2
|
+
import type { IBusinessRule } from "./project.interface";
|
|
3
|
+
|
|
4
|
+
export interface IFormAutocomplete {
|
|
5
|
+
type: "autocomplete";
|
|
6
|
+
name: string;
|
|
7
|
+
dataType:
|
|
8
|
+
| "text"
|
|
9
|
+
| "number"
|
|
10
|
+
| "password"
|
|
11
|
+
| "email"
|
|
12
|
+
| "color"
|
|
13
|
+
| "date"
|
|
14
|
+
| "wysiwyg"
|
|
15
|
+
| "time"
|
|
16
|
+
| "file"
|
|
17
|
+
| "array"
|
|
18
|
+
| "char"
|
|
19
|
+
| "nchar"
|
|
20
|
+
| "varchar"
|
|
21
|
+
| "varchar2"
|
|
22
|
+
| "nvarchar"
|
|
23
|
+
| "longtext"
|
|
24
|
+
| "clob"
|
|
25
|
+
| "nclob"
|
|
26
|
+
| "decimal"
|
|
27
|
+
| "numeric"
|
|
28
|
+
| "integer"
|
|
29
|
+
| "float"
|
|
30
|
+
| "double"
|
|
31
|
+
| "real"
|
|
32
|
+
| "timestamp"
|
|
33
|
+
| "datetime"
|
|
34
|
+
| "datetime2"
|
|
35
|
+
| "uniqueidentifier"
|
|
36
|
+
| "boolean";
|
|
37
|
+
label: string;
|
|
38
|
+
placeholder?: string;
|
|
39
|
+
tooltip?: string;
|
|
40
|
+
isAutofocus?: boolean;
|
|
41
|
+
isDisabled?: boolean;
|
|
42
|
+
isDisabledOnUpdate?: boolean;
|
|
43
|
+
isRequired?: boolean;
|
|
44
|
+
isUnique?: boolean;
|
|
45
|
+
conditions?: IFormCondition[];
|
|
46
|
+
validators?: ("cpf" | "cnpj")[];
|
|
47
|
+
todo?: string;
|
|
48
|
+
optionsApi?: IOptionsApi;
|
|
49
|
+
optionsApiWithConditions?: IOptionsApi[];
|
|
50
|
+
isMultiple?: boolean;
|
|
51
|
+
businessRules?: IBusinessRule[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IOptionsApi {
|
|
55
|
+
endpoint: string;
|
|
56
|
+
labelField: string[];
|
|
57
|
+
valueField: string;
|
|
58
|
+
paramsToFilter: string[];
|
|
59
|
+
paramType: "query" | "path";
|
|
60
|
+
relatedEntity?: string;
|
|
61
|
+
populate?: string[];
|
|
62
|
+
formFieldsFilledByApiResponse?: IApiResponseField[];
|
|
63
|
+
filtersFromOtherFormFields?: IApiResponseFieldFilter[];
|
|
64
|
+
isNotKunlatekResponse?: boolean;
|
|
65
|
+
rawQuery?: string;
|
|
66
|
+
conditions?: IFormCondition[];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface IApiResponseField {
|
|
70
|
+
formFieldName: string;
|
|
71
|
+
propertiesFromApiToFillFormField: string[];
|
|
72
|
+
arrayParents?: string[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface IApiResponseFieldFilter {
|
|
76
|
+
formFieldName: string;
|
|
77
|
+
filterPropertyName: string;
|
|
78
|
+
conditions?: IFormCondition[];
|
|
79
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
2
|
+
import type { IApiRequest } from "./form-input.interface";
|
|
3
|
+
import type { IForm } from "./form.interface";
|
|
4
|
+
import type { IBusinessRule } from "./project.interface";
|
|
5
|
+
|
|
6
|
+
export interface IFormButton {
|
|
7
|
+
type: "button";
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
actionType: "submit" | "reset" | "link" | "apiRequest" | "modal";
|
|
11
|
+
todo?: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
tooltip?: string;
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
isDisabledOnUpdate?: boolean;
|
|
16
|
+
conditions?: IFormCondition[];
|
|
17
|
+
apiRequest?: IApiRequest;
|
|
18
|
+
modal?: {
|
|
19
|
+
id: string;
|
|
20
|
+
title: string;
|
|
21
|
+
modal: IForm;
|
|
22
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl";
|
|
23
|
+
closeButtonLabel?: string;
|
|
24
|
+
actionButtonLabel?: string;
|
|
25
|
+
actionButtonType?: "submit" | "reset" | "link" | "apiRequest" | "modal";
|
|
26
|
+
actionButtonApiRequest?: IApiRequest;
|
|
27
|
+
actionButtonBusinessRules?: IBusinessRule[];
|
|
28
|
+
},
|
|
29
|
+
link?: {
|
|
30
|
+
url: string;
|
|
31
|
+
openInNewTab?: boolean;
|
|
32
|
+
};
|
|
33
|
+
businessRules?: IBusinessRule[];
|
|
34
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IBusinessRule } from "./project.interface";
|
|
2
|
+
|
|
3
|
+
export interface IFormCondition {
|
|
4
|
+
type: "form" | "code" | "array";
|
|
5
|
+
elements?: IConditionElement[];
|
|
6
|
+
code?: IConditionCode;
|
|
7
|
+
businessRules?: IBusinessRule[];
|
|
8
|
+
conditionResponse?: "show" | "hide" | "enable" | "disable" | "fillFields";
|
|
9
|
+
fillFields?: {
|
|
10
|
+
fieldKey: string;
|
|
11
|
+
value: any;
|
|
12
|
+
}[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface IConditionElement {
|
|
16
|
+
key: string;
|
|
17
|
+
value?: any;
|
|
18
|
+
array?: string;
|
|
19
|
+
comparisonOperator: "===" | ">" | ">=" | "in" | "<" | "<=" | "!==" | "nin";
|
|
20
|
+
logicalOperator?: "&&" | "!" | "nor" | "||";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface IConditionCode {
|
|
24
|
+
triggerField: string;
|
|
25
|
+
code: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
2
|
+
import type { IBusinessRule } from "./project.interface";
|
|
3
|
+
|
|
4
|
+
export interface IFormDatePicker {
|
|
5
|
+
type: "datepicker";
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
minDate?: string;
|
|
11
|
+
maxDate?: string;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
isDisabledOnUpdate?: boolean;
|
|
14
|
+
isRequired?: boolean;
|
|
15
|
+
conditions?: IFormCondition[];
|
|
16
|
+
todo?: string;
|
|
17
|
+
businessRules?: IBusinessRule[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
2
|
+
import type { IFormElement } from "./form.interface";
|
|
3
|
+
import type { IBusinessRule } from "./project.interface";
|
|
4
|
+
|
|
5
|
+
export interface IFormFieldset {
|
|
6
|
+
type: "fieldset";
|
|
7
|
+
conditions?: IFormCondition[];
|
|
8
|
+
todo?: string;
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
elements: IFormElement[];
|
|
12
|
+
businessRules?: IBusinessRule[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
2
|
+
import type { IBusinessRule } from "./project.interface";
|
|
3
|
+
|
|
4
|
+
interface IStorageConfig {
|
|
5
|
+
path: string;
|
|
6
|
+
fileNameStrategy: "uuid" | "original" | "timestamp";
|
|
7
|
+
visibility: "public" | "private";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IFormFile {
|
|
11
|
+
type: "file";
|
|
12
|
+
name: string;
|
|
13
|
+
dataType:
|
|
14
|
+
| "text"
|
|
15
|
+
| "number"
|
|
16
|
+
| "password"
|
|
17
|
+
| "email"
|
|
18
|
+
| "color"
|
|
19
|
+
| "date"
|
|
20
|
+
| "wysiwyg"
|
|
21
|
+
| "time"
|
|
22
|
+
| "file"
|
|
23
|
+
| "array"
|
|
24
|
+
| "char"
|
|
25
|
+
| "nchar"
|
|
26
|
+
| "varchar"
|
|
27
|
+
| "varchar2"
|
|
28
|
+
| "nvarchar"
|
|
29
|
+
| "longtext"
|
|
30
|
+
| "clob"
|
|
31
|
+
| "nclob"
|
|
32
|
+
| "decimal"
|
|
33
|
+
| "numeric"
|
|
34
|
+
| "integer"
|
|
35
|
+
| "float"
|
|
36
|
+
| "double"
|
|
37
|
+
| "real"
|
|
38
|
+
| "timestamp"
|
|
39
|
+
| "datetime"
|
|
40
|
+
| "datetime2"
|
|
41
|
+
| "uniqueidentifier"
|
|
42
|
+
| "boolean";
|
|
43
|
+
label: string;
|
|
44
|
+
placeholder?: string;
|
|
45
|
+
tooltip?: string;
|
|
46
|
+
accept?: Record<string, string[]>;
|
|
47
|
+
isMultiple?: boolean;
|
|
48
|
+
maxSize?: number;
|
|
49
|
+
isDisabled?: boolean;
|
|
50
|
+
isDisabledOnUpdate?: boolean;
|
|
51
|
+
isRequired?: boolean;
|
|
52
|
+
conditions?: IFormCondition[];
|
|
53
|
+
todo?: string;
|
|
54
|
+
validators?: ("onlyImages" | "png" | "jpg" | "pdf")[];
|
|
55
|
+
storageConfig: IStorageConfig;
|
|
56
|
+
businessRules?: IBusinessRule[];
|
|
57
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IApiResponseField,
|
|
3
|
+
IApiResponseFieldFilter,
|
|
4
|
+
} from "./form-autocomplete.interface";
|
|
5
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
6
|
+
import type { IBusinessRule } from "./project.interface";
|
|
7
|
+
|
|
8
|
+
export interface IFormInput {
|
|
9
|
+
type: "input";
|
|
10
|
+
name: string;
|
|
11
|
+
dataType:
|
|
12
|
+
| "text"
|
|
13
|
+
| "number"
|
|
14
|
+
| "password"
|
|
15
|
+
| "email"
|
|
16
|
+
| "color"
|
|
17
|
+
| "date"
|
|
18
|
+
| "wysiwyg"
|
|
19
|
+
| "time"
|
|
20
|
+
| "file"
|
|
21
|
+
| "array"
|
|
22
|
+
| "char"
|
|
23
|
+
| "nchar"
|
|
24
|
+
| "varchar"
|
|
25
|
+
| "varchar2"
|
|
26
|
+
| "nvarchar"
|
|
27
|
+
| "longtext"
|
|
28
|
+
| "clob"
|
|
29
|
+
| "nclob"
|
|
30
|
+
| "decimal"
|
|
31
|
+
| "numeric"
|
|
32
|
+
| "integer"
|
|
33
|
+
| "float"
|
|
34
|
+
| "double"
|
|
35
|
+
| "real"
|
|
36
|
+
| "timestamp"
|
|
37
|
+
| "datetime"
|
|
38
|
+
| "datetime2"
|
|
39
|
+
| "uniqueidentifier"
|
|
40
|
+
| "boolean";
|
|
41
|
+
label: string;
|
|
42
|
+
placeholder?: string;
|
|
43
|
+
tooltip?: string;
|
|
44
|
+
isAutofocus?: boolean;
|
|
45
|
+
isDisabled?: boolean;
|
|
46
|
+
isDisabledOnUpdate?: boolean;
|
|
47
|
+
isRequired?: boolean;
|
|
48
|
+
isUnique?: boolean;
|
|
49
|
+
conditions?: IFormCondition[];
|
|
50
|
+
validators?: ("cep" | "cpf" | "cnpj" | "onlyNumbers" | "phone" | "email")[];
|
|
51
|
+
todo?: string;
|
|
52
|
+
maxLength?: number;
|
|
53
|
+
minLength?: number;
|
|
54
|
+
apiRequest?: IApiRequest;
|
|
55
|
+
businessRules?: IBusinessRule[];
|
|
56
|
+
maskRegex?: string;
|
|
57
|
+
suffix?: string;
|
|
58
|
+
prefix?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface IApiRequest {
|
|
62
|
+
endpoint: string;
|
|
63
|
+
paramType: "query" | "path";
|
|
64
|
+
isNotKunlatekResponse?: boolean;
|
|
65
|
+
filtersFromOtherFormFields?: IApiResponseFieldFilter[];
|
|
66
|
+
formFieldsFilledByApiResponse?: IApiResponseField[];
|
|
67
|
+
hasAuthentication?: boolean;
|
|
68
|
+
conditions?: IFormCondition[];
|
|
69
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
2
|
+
import type { IBusinessRule } from "./project.interface";
|
|
3
|
+
|
|
4
|
+
export interface IFormNumericInput {
|
|
5
|
+
type: "numeric";
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
prefix?: string;
|
|
11
|
+
suffix?: string;
|
|
12
|
+
decimalScale?: number;
|
|
13
|
+
fixedDecimalScale?: boolean;
|
|
14
|
+
thousandSeparator?: boolean;
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
isDisabledOnUpdate?: boolean;
|
|
17
|
+
isRequired?: boolean;
|
|
18
|
+
isUnique?: boolean;
|
|
19
|
+
conditions?: IFormCondition[];
|
|
20
|
+
todo?: string;
|
|
21
|
+
businessRules?: IBusinessRule[];
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
2
|
+
import type { IBusinessRule } from "./project.interface";
|
|
3
|
+
|
|
4
|
+
export interface IFormPatternInput {
|
|
5
|
+
type: "pattern";
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
format: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
isRequired?: boolean;
|
|
13
|
+
conditions?: IFormCondition[];
|
|
14
|
+
todo?: string;
|
|
15
|
+
businessRules?: IBusinessRule[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
2
|
+
import type { IBusinessRule } from "./project.interface";
|
|
3
|
+
|
|
4
|
+
interface IRadioOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string | number | boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface IFormRadioGroup {
|
|
10
|
+
type: "radiogroup";
|
|
11
|
+
name: string;
|
|
12
|
+
label: string;
|
|
13
|
+
options: IRadioOption[];
|
|
14
|
+
tooltip?: string;
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
isDisabledOnUpdate?: boolean;
|
|
17
|
+
isRequired?: boolean;
|
|
18
|
+
conditions?: IFormCondition[];
|
|
19
|
+
todo?: string;
|
|
20
|
+
businessRules?: IBusinessRule[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
2
|
+
import type { IOptionsApi } from "./form-autocomplete.interface";
|
|
3
|
+
import type { IBusinessRule } from "./project.interface";
|
|
4
|
+
|
|
5
|
+
export interface IFormSelect {
|
|
6
|
+
type: "select";
|
|
7
|
+
name: string;
|
|
8
|
+
dataType:
|
|
9
|
+
| "text"
|
|
10
|
+
| "number"
|
|
11
|
+
| "password"
|
|
12
|
+
| "email"
|
|
13
|
+
| "color"
|
|
14
|
+
| "date"
|
|
15
|
+
| "wysiwyg"
|
|
16
|
+
| "time"
|
|
17
|
+
| "file"
|
|
18
|
+
| "array"
|
|
19
|
+
| "char"
|
|
20
|
+
| "nchar"
|
|
21
|
+
| "varchar"
|
|
22
|
+
| "varchar2"
|
|
23
|
+
| "nvarchar"
|
|
24
|
+
| "longtext"
|
|
25
|
+
| "clob"
|
|
26
|
+
| "nclob"
|
|
27
|
+
| "decimal"
|
|
28
|
+
| "numeric"
|
|
29
|
+
| "integer"
|
|
30
|
+
| "float"
|
|
31
|
+
| "double"
|
|
32
|
+
| "real"
|
|
33
|
+
| "timestamp"
|
|
34
|
+
| "datetime"
|
|
35
|
+
| "datetime2"
|
|
36
|
+
| "uniqueidentifier"
|
|
37
|
+
| "boolean";
|
|
38
|
+
label: string;
|
|
39
|
+
placeholder?: string;
|
|
40
|
+
tooltip?: string;
|
|
41
|
+
isAutofocus?: boolean;
|
|
42
|
+
isDisabled?: boolean;
|
|
43
|
+
isDisabledOnUpdate?: boolean;
|
|
44
|
+
isRequired?: boolean;
|
|
45
|
+
isUnique?: boolean;
|
|
46
|
+
conditions?: IFormCondition[];
|
|
47
|
+
validators?: ("cpf" | "cnpj")[];
|
|
48
|
+
todo?: string;
|
|
49
|
+
isMultiple?: boolean;
|
|
50
|
+
options?: ISelectOption[];
|
|
51
|
+
optionsApi?: IOptionsApi;
|
|
52
|
+
businessRules?: IBusinessRule[];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface ISelectOption {
|
|
56
|
+
label: string;
|
|
57
|
+
value: string | number | boolean;
|
|
58
|
+
isDisabled?: boolean;
|
|
59
|
+
isSelected?: boolean;
|
|
60
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
2
|
+
import type { IBusinessRule } from "./project.interface";
|
|
3
|
+
|
|
4
|
+
export interface IFormSwitch {
|
|
5
|
+
type: "switch";
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
isDisabledOnUpdate?: boolean;
|
|
11
|
+
isRequired?: boolean;
|
|
12
|
+
conditions?: IFormCondition[];
|
|
13
|
+
todo?: string;
|
|
14
|
+
businessRules?: IBusinessRule[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IFormCondition } from "./form-condition.interface";
|
|
2
|
+
import type { IFormElement } from "./form.interface";
|
|
3
|
+
import type { IBusinessRule } from "./project.interface";
|
|
4
|
+
|
|
5
|
+
export interface IFormTab {
|
|
6
|
+
type: "tab";
|
|
7
|
+
todo?: string;
|
|
8
|
+
id: string;
|
|
9
|
+
tabs: {
|
|
10
|
+
id: string;
|
|
11
|
+
title: string;
|
|
12
|
+
elements: IFormElement[];
|
|
13
|
+
conditions?: IFormCondition[];
|
|
14
|
+
}[];
|
|
15
|
+
conditions?: IFormCondition[];
|
|
16
|
+
businessRules?: IBusinessRule[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { IFormArray } from "./form-array.interface";
|
|
2
|
+
import type { IFormAutocomplete } from "./form-autocomplete.interface";
|
|
3
|
+
import type { IFormButton } from "./form-button.interface";
|
|
4
|
+
import type { IFormDatePicker } from "./form-datepicker.interface";
|
|
5
|
+
import type { IFormFieldset } from "./form-fieldset.interface";
|
|
6
|
+
import type { IFormFile } from "./form-file.interface";
|
|
7
|
+
import type { IFormInput } from "./form-input.interface";
|
|
8
|
+
import type { IFormSelect } from "./form-select.interface";
|
|
9
|
+
import type { IFormTab } from "./form-tab.interface";
|
|
10
|
+
import type { IBusinessRule } from "./project.interface";
|
|
11
|
+
|
|
12
|
+
export interface IForm {
|
|
13
|
+
componentType: "form";
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
elements: IFormElement[];
|
|
17
|
+
icon?: string;
|
|
18
|
+
guards?: "isAuthenticated" | "isAuthorized";
|
|
19
|
+
businessRules?: IBusinessRule[];
|
|
20
|
+
userStory?: string;
|
|
21
|
+
contracts: {
|
|
22
|
+
endpoint: string;
|
|
23
|
+
methods: { verb: "GET" | "POST" | "PUT" | "DELETE" }[];
|
|
24
|
+
request?: IApiRequest;
|
|
25
|
+
}[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface IApiRequest {
|
|
29
|
+
body: {
|
|
30
|
+
name: string;
|
|
31
|
+
dataType:
|
|
32
|
+
| "text"
|
|
33
|
+
| "number"
|
|
34
|
+
| "password"
|
|
35
|
+
| "email"
|
|
36
|
+
| "color"
|
|
37
|
+
| "date"
|
|
38
|
+
| "wysiwyg"
|
|
39
|
+
| "time"
|
|
40
|
+
| "file"
|
|
41
|
+
| "array"
|
|
42
|
+
| "char"
|
|
43
|
+
| "nchar"
|
|
44
|
+
| "varchar"
|
|
45
|
+
| "varchar2"
|
|
46
|
+
| "nvarchar"
|
|
47
|
+
| "longtext"
|
|
48
|
+
| "clob"
|
|
49
|
+
| "nclob"
|
|
50
|
+
| "decimal"
|
|
51
|
+
| "numeric"
|
|
52
|
+
| "integer"
|
|
53
|
+
| "float"
|
|
54
|
+
| "double"
|
|
55
|
+
| "real"
|
|
56
|
+
| "timestamp"
|
|
57
|
+
| "datetime"
|
|
58
|
+
| "datetime2"
|
|
59
|
+
| "uniqueidentifier"
|
|
60
|
+
| "boolean";
|
|
61
|
+
}[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type IFormElement =
|
|
65
|
+
| IFormInput
|
|
66
|
+
| IFormSelect
|
|
67
|
+
| IFormAutocomplete
|
|
68
|
+
| IFormArray
|
|
69
|
+
| IFormTab
|
|
70
|
+
| IFormFieldset
|
|
71
|
+
| IFormButton
|
|
72
|
+
| IFormFile
|
|
73
|
+
| IFormDatePicker;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface IFrontendFrameworkStructure {
|
|
2
|
+
projectFolderCase: "kebab" | "snake" | "pascal" | "camel";
|
|
3
|
+
moduleFolder?: IFolder;
|
|
4
|
+
componentFolder?: IFolder;
|
|
5
|
+
moduleFile?: IFile;
|
|
6
|
+
componentFile: IFile;
|
|
7
|
+
templateFile?: IFile;
|
|
8
|
+
controllerFile?: IFile;
|
|
9
|
+
serviceFile?: IFile;
|
|
10
|
+
styleFile?: IFile;
|
|
11
|
+
dependencies?: IDependencies;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface IFolder {
|
|
15
|
+
case: "kebab" | "snake" | "pascal" | "camel";
|
|
16
|
+
folderBasePath: string;
|
|
17
|
+
hasFolderWithItsName?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface IFile {
|
|
21
|
+
case: "kebab" | "snake" | "pascal" | "camel";
|
|
22
|
+
folderBasePath: string;
|
|
23
|
+
fileExtension: string;
|
|
24
|
+
keyword?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface IDependencies {
|
|
28
|
+
array?: IDependenciesPackages;
|
|
29
|
+
autocomplete?: IDependenciesPackages;
|
|
30
|
+
wysiwyg?: IDependenciesPackages;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface IDependenciesPackages {
|
|
34
|
+
angular?: string[];
|
|
35
|
+
flutter?: string[];
|
|
36
|
+
react?: string[];
|
|
37
|
+
svelte?: string[];
|
|
38
|
+
vue?: string[];
|
|
39
|
+
}
|