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,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "data-chart.ref.json",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"componentType": { "const": "dataChart" },
|
|
7
|
+
"id": { "type": "string" },
|
|
8
|
+
"title": { "type": "string" },
|
|
9
|
+
"icon": { "type": "string" },
|
|
10
|
+
"guards": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": ["isAuthenticated", "isAuthorized"]
|
|
13
|
+
},
|
|
14
|
+
"businessRules": { "$ref": "business-rules.ref.json" },
|
|
15
|
+
"userStory": { "type": "string" },
|
|
16
|
+
"dataSource": { "$ref": "form-common-api-request.ref.json" },
|
|
17
|
+
"chartType": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"enum": [
|
|
20
|
+
"line",
|
|
21
|
+
"bar",
|
|
22
|
+
"pie",
|
|
23
|
+
"doughnut",
|
|
24
|
+
"radar",
|
|
25
|
+
"scatter",
|
|
26
|
+
"bubble",
|
|
27
|
+
"area",
|
|
28
|
+
"polarArea"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"dimensions": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"width": { "type": "string" },
|
|
35
|
+
"height": { "type": "string" },
|
|
36
|
+
"aspectRatio": { "type": "number" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"data": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"labels": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"property": { "type": "string" },
|
|
46
|
+
"formatter": { "type": "string" }
|
|
47
|
+
},
|
|
48
|
+
"required": ["property"]
|
|
49
|
+
},
|
|
50
|
+
"datasets": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"property": { "type": "string" },
|
|
56
|
+
"label": { "type": "string" },
|
|
57
|
+
"backgroundColor": {
|
|
58
|
+
"oneOf": [
|
|
59
|
+
{ "type": "string" },
|
|
60
|
+
{
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": { "type": "string" }
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"borderColor": {
|
|
67
|
+
"oneOf": [
|
|
68
|
+
{ "type": "string" },
|
|
69
|
+
{
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": { "type": "string" }
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"borderWidth": { "type": "number" },
|
|
76
|
+
"fill": { "type": "boolean" },
|
|
77
|
+
"tension": { "type": "number" },
|
|
78
|
+
"aggregator": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": ["sum", "avg", "min", "max", "count"]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": ["property", "label"]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": ["labels", "datasets"]
|
|
88
|
+
},
|
|
89
|
+
"options": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"properties": {
|
|
92
|
+
"responsive": { "type": "boolean" },
|
|
93
|
+
"maintainAspectRatio": { "type": "boolean" },
|
|
94
|
+
"plugins": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"properties": {
|
|
97
|
+
"title": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"display": { "type": "boolean" },
|
|
101
|
+
"text": { "type": "string" }
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"legend": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"properties": {
|
|
107
|
+
"display": { "type": "boolean" },
|
|
108
|
+
"position": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"enum": ["top", "bottom", "left", "right"]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"tooltip": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"properties": {
|
|
117
|
+
"enabled": { "type": "boolean" }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"scales": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"properties": {
|
|
125
|
+
"x": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"properties": {
|
|
128
|
+
"title": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"properties": {
|
|
131
|
+
"display": { "type": "boolean" },
|
|
132
|
+
"text": { "type": "string" }
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"grid": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"properties": {
|
|
138
|
+
"display": { "type": "boolean" }
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"y": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"properties": {
|
|
146
|
+
"title": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"properties": {
|
|
149
|
+
"display": { "type": "boolean" },
|
|
150
|
+
"text": { "type": "string" }
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"grid": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"properties": {
|
|
156
|
+
"display": { "type": "boolean" }
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"beginAtZero": { "type": "boolean" }
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"required": ["componentType", "id", "dataSource", "chartType", "data"]
|
|
168
|
+
}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "data-detail.ref.json",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"componentType": {
|
|
7
|
+
"const": "dataDetail"
|
|
8
|
+
},
|
|
9
|
+
"id": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"title": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"icon": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"guards": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": ["isAuthenticated", "isAuthorized"]
|
|
21
|
+
},
|
|
22
|
+
"businessRules": {
|
|
23
|
+
"$ref": "business-rules.ref.json"
|
|
24
|
+
},
|
|
25
|
+
"userStory": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"dataSource": {
|
|
29
|
+
"$ref": "form-common-api-request.ref.json"
|
|
30
|
+
},
|
|
31
|
+
"headerConfig": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"title": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"property": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"required": ["property"]
|
|
42
|
+
},
|
|
43
|
+
"subtitle": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"properties": {
|
|
46
|
+
"property": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": ["property"]
|
|
51
|
+
},
|
|
52
|
+
"imageConfig": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"property": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"fallbackUrl": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"isAvatar": {
|
|
62
|
+
"type": "boolean"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": ["property"]
|
|
66
|
+
},
|
|
67
|
+
"statusProperty": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
},
|
|
70
|
+
"statusConfig": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"properties": {
|
|
75
|
+
"label": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"color": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": ["label", "color"]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"required": ["title"]
|
|
87
|
+
},
|
|
88
|
+
"sections": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"properties": {
|
|
93
|
+
"id": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"title": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"icon": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"collapsible": {
|
|
103
|
+
"type": "boolean"
|
|
104
|
+
},
|
|
105
|
+
"collapsed": {
|
|
106
|
+
"type": "boolean"
|
|
107
|
+
},
|
|
108
|
+
"layout": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"enum": ["oneColumn", "twoColumns", "threeColumns", "table"]
|
|
111
|
+
},
|
|
112
|
+
"properties": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"items": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"properties": {
|
|
117
|
+
"property": {
|
|
118
|
+
"type": "string"
|
|
119
|
+
},
|
|
120
|
+
"label": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
"type": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"enum": [
|
|
126
|
+
"text",
|
|
127
|
+
"date",
|
|
128
|
+
"currency",
|
|
129
|
+
"number",
|
|
130
|
+
"boolean",
|
|
131
|
+
"image",
|
|
132
|
+
"file",
|
|
133
|
+
"link",
|
|
134
|
+
"html",
|
|
135
|
+
"char",
|
|
136
|
+
"nchar",
|
|
137
|
+
"varchar",
|
|
138
|
+
"varchar2",
|
|
139
|
+
"nvarchar",
|
|
140
|
+
"longtext",
|
|
141
|
+
"clob",
|
|
142
|
+
"nclob",
|
|
143
|
+
"decimal",
|
|
144
|
+
"numeric",
|
|
145
|
+
"integer",
|
|
146
|
+
"float",
|
|
147
|
+
"double",
|
|
148
|
+
"real",
|
|
149
|
+
"timestamp",
|
|
150
|
+
"datetime",
|
|
151
|
+
"datetime2",
|
|
152
|
+
"uniqueidentifier"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
"format": {
|
|
156
|
+
"type": "string"
|
|
157
|
+
},
|
|
158
|
+
"linkConfig": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"properties": {
|
|
161
|
+
"route": {
|
|
162
|
+
"type": "string"
|
|
163
|
+
},
|
|
164
|
+
"external": {
|
|
165
|
+
"type": "boolean"
|
|
166
|
+
},
|
|
167
|
+
"target": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"enum": ["_blank", "_self"]
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"required": ["property", "label"]
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"required": ["id", "title", "layout", "properties"]
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"relatedData": {
|
|
182
|
+
"type": "array",
|
|
183
|
+
"items": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"properties": {
|
|
186
|
+
"id": {
|
|
187
|
+
"type": "string"
|
|
188
|
+
},
|
|
189
|
+
"title": {
|
|
190
|
+
"type": "string"
|
|
191
|
+
},
|
|
192
|
+
"componentType": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"enum": ["dataTable", "dataGrid", "dataList"]
|
|
195
|
+
},
|
|
196
|
+
"componentConfig": {},
|
|
197
|
+
"dataSource": {
|
|
198
|
+
"type": "object",
|
|
199
|
+
"properties": {
|
|
200
|
+
"endpoint": {
|
|
201
|
+
"type": "string"
|
|
202
|
+
},
|
|
203
|
+
"paramProperty": {
|
|
204
|
+
"type": "string"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"required": ["endpoint", "paramProperty"]
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"required": [
|
|
211
|
+
"id",
|
|
212
|
+
"title",
|
|
213
|
+
"componentType",
|
|
214
|
+
"componentConfig",
|
|
215
|
+
"dataSource"
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"actions": {
|
|
220
|
+
"type": "array",
|
|
221
|
+
"items": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"properties": {
|
|
224
|
+
"icon": {
|
|
225
|
+
"type": "string"
|
|
226
|
+
},
|
|
227
|
+
"label": {
|
|
228
|
+
"type": "string"
|
|
229
|
+
},
|
|
230
|
+
"action": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"properties": {
|
|
233
|
+
"type": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"enum": ["link", "request", "event"]
|
|
236
|
+
},
|
|
237
|
+
"link": {
|
|
238
|
+
"type": "object",
|
|
239
|
+
"properties": {
|
|
240
|
+
"route": {
|
|
241
|
+
"type": "string"
|
|
242
|
+
},
|
|
243
|
+
"paramProperty": {
|
|
244
|
+
"type": "string"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"required": ["route"]
|
|
248
|
+
},
|
|
249
|
+
"request": {
|
|
250
|
+
"type": "object",
|
|
251
|
+
"properties": {
|
|
252
|
+
"endpoint": {
|
|
253
|
+
"type": "string"
|
|
254
|
+
},
|
|
255
|
+
"method": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"enum": ["GET", "POST", "PUT", "DELETE"]
|
|
258
|
+
},
|
|
259
|
+
"confirmMessage": {
|
|
260
|
+
"type": "string"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"required": ["endpoint", "method"]
|
|
264
|
+
},
|
|
265
|
+
"event": {
|
|
266
|
+
"type": "object",
|
|
267
|
+
"properties": {
|
|
268
|
+
"name": {
|
|
269
|
+
"type": "string"
|
|
270
|
+
},
|
|
271
|
+
"data": {}
|
|
272
|
+
},
|
|
273
|
+
"required": ["name"]
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"required": ["type"]
|
|
277
|
+
},
|
|
278
|
+
"styling": {
|
|
279
|
+
"type": "object",
|
|
280
|
+
"properties": {
|
|
281
|
+
"variant": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"enum": ["primary", "secondary", "text", "outlined"]
|
|
284
|
+
},
|
|
285
|
+
"size": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"enum": ["sm", "md", "lg"]
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"required": ["label", "action"]
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"required": ["componentType", "id", "dataSource", "sections"]
|
|
297
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "data-grid.ref.json",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"componentType": { "const": "dataGrid" },
|
|
7
|
+
"id": { "type": "string" },
|
|
8
|
+
"title": { "type": "string" },
|
|
9
|
+
"icon": { "type": "string" },
|
|
10
|
+
"guards": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": ["isAuthenticated", "isAuthorized"]
|
|
13
|
+
},
|
|
14
|
+
"businessRules": { "$ref": "business-rules.ref.json" },
|
|
15
|
+
"userStory": { "type": "string" },
|
|
16
|
+
"dataSource": { "$ref": "form-common-api-request.ref.json" },
|
|
17
|
+
"cardTemplate": { "$ref": "data-card.ref.json" },
|
|
18
|
+
"gridConfig": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"columns": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"sm": { "type": "number" },
|
|
25
|
+
"md": { "type": "number" },
|
|
26
|
+
"lg": { "type": "number" },
|
|
27
|
+
"xl": { "type": "number" }
|
|
28
|
+
},
|
|
29
|
+
"required": ["sm", "md", "lg", "xl"]
|
|
30
|
+
},
|
|
31
|
+
"gap": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"x": { "type": "number" },
|
|
35
|
+
"y": { "type": "number" }
|
|
36
|
+
},
|
|
37
|
+
"required": ["x", "y"]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"required": ["columns", "gap"]
|
|
41
|
+
},
|
|
42
|
+
"pagination": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"enabled": { "type": "boolean" },
|
|
46
|
+
"pageSize": { "type": "number" },
|
|
47
|
+
"pageSizeOptions": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": { "type": "number" }
|
|
50
|
+
},
|
|
51
|
+
"position": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"enum": ["top", "bottom", "both"]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"required": ["enabled", "pageSize"]
|
|
57
|
+
},
|
|
58
|
+
"filters": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"property": { "type": "string" },
|
|
64
|
+
"label": { "type": "string" },
|
|
65
|
+
"type": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"enum": ["text", "select", "date", "dateRange", "number"]
|
|
68
|
+
},
|
|
69
|
+
"defaultValue": {},
|
|
70
|
+
"options": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"items": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"properties": {
|
|
75
|
+
"label": { "type": "string" },
|
|
76
|
+
"value": {}
|
|
77
|
+
},
|
|
78
|
+
"required": ["label", "value"]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": ["property", "label", "type"]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"emptyState": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"message": { "type": "string" },
|
|
89
|
+
"icon": { "type": "string" }
|
|
90
|
+
},
|
|
91
|
+
"required": ["message"]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"required": [
|
|
95
|
+
"componentType",
|
|
96
|
+
"id",
|
|
97
|
+
"dataSource",
|
|
98
|
+
"cardTemplate",
|
|
99
|
+
"gridConfig"
|
|
100
|
+
]
|
|
101
|
+
}
|