@praxisui/core 10.0.0-rc.4 → 10.0.0-rc.6
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/ai/component-registry.json +4 -3
- package/fesm2022/praxisui-core-schema.mjs +2946 -0
- package/fesm2022/praxisui-core.mjs +3188 -106
- package/package.json +5 -1
- package/theming/_theming.scss +79 -1
- package/types/praxisui-core-schema.d.ts +4418 -0
- package/types/praxisui-core.d.ts +5920 -4834
|
@@ -0,0 +1,4418 @@
|
|
|
1
|
+
type OptionSourceType = 'RESOURCE_ENTITY' | 'DISTINCT_DIMENSION' | 'CATEGORICAL_BUCKET' | 'LIGHT_LOOKUP' | 'STATIC_CANONICAL';
|
|
2
|
+
type OptionSourceSearchMode = 'none' | 'starts-with' | 'contains' | 'exact';
|
|
3
|
+
type OptionSourceCachePolicy = 'none' | 'request-scope' | 'session-scope' | 'etag-aware';
|
|
4
|
+
type OptionSourceSelectedReloadPolicy = 'required' | 'supported' | 'unsupported-with-waiver' | 'not-applicable';
|
|
5
|
+
type OptionSourceInvalidSortPolicy = 'reject' | 'ignore' | 'unsupported';
|
|
6
|
+
type LookupOpenDetailMode = 'samePage' | 'newTab' | 'drawer' | 'modal' | 'route';
|
|
7
|
+
type LookupStatusTone = 'success' | 'warning' | 'danger' | 'neutral';
|
|
8
|
+
type LookupFilterFieldType = 'text' | 'enum' | 'date' | 'number' | 'reference';
|
|
9
|
+
type LookupFilterOperator = 'contains' | 'startsWith' | 'equals' | 'in' | 'before' | 'after' | 'between' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
10
|
+
type EntityLookupSelectedLayout = 'card' | 'inline' | 'compact' | 'token';
|
|
11
|
+
type EntityLookupResultLayout = 'list' | 'denseList' | 'table' | 'card';
|
|
12
|
+
type EntityLookupDisplayPreset = 'compact' | 'rich' | 'directory' | 'status' | 'reference' | 'hierarchical';
|
|
13
|
+
type EntityLookupUsage = 'form' | 'filter' | 'table-cell' | 'dashboard' | 'wizard' | 'review';
|
|
14
|
+
type EntityLookupDensity = 'compact' | 'comfortable' | 'rich';
|
|
15
|
+
type EntityLookupDisplayFieldPresentation = 'text' | 'chip' | 'badge' | 'date' | 'currency' | 'metric';
|
|
16
|
+
interface EntityLookupDisplayFieldMetadata {
|
|
17
|
+
key?: string;
|
|
18
|
+
propertyPath?: string;
|
|
19
|
+
label?: string;
|
|
20
|
+
icon?: string;
|
|
21
|
+
presentation?: EntityLookupDisplayFieldPresentation | string;
|
|
22
|
+
tone?: LookupStatusTone | 'info' | string;
|
|
23
|
+
format?: string;
|
|
24
|
+
}
|
|
25
|
+
interface LookupSelectionPolicyMetadata {
|
|
26
|
+
selectablePropertyPath?: string;
|
|
27
|
+
statusPropertyPath?: string;
|
|
28
|
+
allowedStatuses?: string[];
|
|
29
|
+
blockedStatuses?: string[];
|
|
30
|
+
allowRetainInvalidExistingValue?: boolean;
|
|
31
|
+
disabledReasonTemplate?: string;
|
|
32
|
+
validationMessageTemplate?: string;
|
|
33
|
+
}
|
|
34
|
+
interface LookupCapabilitiesMetadata {
|
|
35
|
+
filter?: boolean;
|
|
36
|
+
byIds?: boolean;
|
|
37
|
+
detail?: boolean;
|
|
38
|
+
create?: boolean;
|
|
39
|
+
edit?: boolean;
|
|
40
|
+
navigateToDetail?: boolean;
|
|
41
|
+
multiSelect?: boolean;
|
|
42
|
+
recent?: boolean;
|
|
43
|
+
favorites?: boolean;
|
|
44
|
+
auditSnapshot?: boolean;
|
|
45
|
+
}
|
|
46
|
+
interface LookupDetailMetadata {
|
|
47
|
+
hrefTemplate?: string;
|
|
48
|
+
routeTemplate?: string;
|
|
49
|
+
openDetailMode?: LookupOpenDetailMode;
|
|
50
|
+
kind?: 'surface' | 'route' | 'href' | string;
|
|
51
|
+
surfaceId?: string;
|
|
52
|
+
presentation?: 'modal' | 'drawer' | string;
|
|
53
|
+
preferredWidget?: string;
|
|
54
|
+
mode?: 'view' | 'edit' | 'create' | string;
|
|
55
|
+
}
|
|
56
|
+
interface LookupCreateMetadata {
|
|
57
|
+
hrefTemplate?: string;
|
|
58
|
+
routeTemplate?: string;
|
|
59
|
+
openMode?: LookupOpenDetailMode;
|
|
60
|
+
}
|
|
61
|
+
interface LookupFilterDefinitionMetadata {
|
|
62
|
+
field: string;
|
|
63
|
+
label?: string;
|
|
64
|
+
type: LookupFilterFieldType;
|
|
65
|
+
operators: LookupFilterOperator[];
|
|
66
|
+
defaultOperator?: LookupFilterOperator;
|
|
67
|
+
optionsSource?: string;
|
|
68
|
+
required?: boolean;
|
|
69
|
+
hidden?: boolean;
|
|
70
|
+
}
|
|
71
|
+
interface LookupSortOptionMetadata {
|
|
72
|
+
key: string;
|
|
73
|
+
field: string;
|
|
74
|
+
direction: 'asc' | 'desc';
|
|
75
|
+
label?: string;
|
|
76
|
+
}
|
|
77
|
+
type LookupSearchStrategyKind = 'business-code' | 'descriptive-text' | 'normalized-document';
|
|
78
|
+
type LookupSearchInputFormat = 'text' | 'digits';
|
|
79
|
+
/** A server-governed interpretation for a lookup search term. */
|
|
80
|
+
interface LookupSearchStrategyMetadata {
|
|
81
|
+
key: string;
|
|
82
|
+
kind: LookupSearchStrategyKind;
|
|
83
|
+
minSearchChars: number;
|
|
84
|
+
inputFormat?: LookupSearchInputFormat;
|
|
85
|
+
}
|
|
86
|
+
interface LookupFilteringMetadata {
|
|
87
|
+
availableFilters?: LookupFilterDefinitionMetadata[];
|
|
88
|
+
defaultFilters?: Record<string, unknown[]>;
|
|
89
|
+
sortOptions?: LookupSortOptionMetadata[];
|
|
90
|
+
defaultSort?: string;
|
|
91
|
+
quickFilterFields?: string[];
|
|
92
|
+
searchPlaceholder?: string;
|
|
93
|
+
searchStrategies?: LookupSearchStrategyMetadata[];
|
|
94
|
+
}
|
|
95
|
+
interface EntityLookupActionsMetadata {
|
|
96
|
+
showDetail?: boolean;
|
|
97
|
+
showChange?: boolean;
|
|
98
|
+
showCopyCode?: boolean;
|
|
99
|
+
showCopyId?: boolean;
|
|
100
|
+
showCreate?: boolean;
|
|
101
|
+
showClear?: boolean;
|
|
102
|
+
}
|
|
103
|
+
interface EntityLookupDisplayMetadata {
|
|
104
|
+
preset?: EntityLookupDisplayPreset | string;
|
|
105
|
+
usage?: EntityLookupUsage | string;
|
|
106
|
+
density?: EntityLookupDensity | string;
|
|
107
|
+
selectedLayout?: EntityLookupSelectedLayout;
|
|
108
|
+
resultLayout?: EntityLookupResultLayout;
|
|
109
|
+
primaryPropertyPath?: string;
|
|
110
|
+
fields?: EntityLookupDisplayFieldMetadata[];
|
|
111
|
+
secondaryPropertyPaths?: string[];
|
|
112
|
+
badgePropertyPaths?: string[];
|
|
113
|
+
avatarPropertyPath?: string;
|
|
114
|
+
showCode?: boolean;
|
|
115
|
+
showDescription?: boolean;
|
|
116
|
+
showStatus?: boolean;
|
|
117
|
+
showAvatar?: boolean;
|
|
118
|
+
showBadges?: boolean;
|
|
119
|
+
showDisabledReason?: boolean;
|
|
120
|
+
showResultCount?: boolean;
|
|
121
|
+
statusLabelMap?: Record<string, string>;
|
|
122
|
+
statusToneMap?: Record<string, LookupStatusTone>;
|
|
123
|
+
badgeKeys?: string[];
|
|
124
|
+
maxVisibleBadges?: number;
|
|
125
|
+
detailActionLabel?: string;
|
|
126
|
+
changeActionLabel?: string;
|
|
127
|
+
copyCodeActionLabel?: string;
|
|
128
|
+
copyIdActionLabel?: string;
|
|
129
|
+
createActionLabel?: string;
|
|
130
|
+
clearActionLabel?: string;
|
|
131
|
+
actions?: EntityLookupActionsMetadata;
|
|
132
|
+
}
|
|
133
|
+
interface OptionSourceMetadata {
|
|
134
|
+
key: string;
|
|
135
|
+
type?: OptionSourceType;
|
|
136
|
+
resourcePath?: string;
|
|
137
|
+
filterField?: string;
|
|
138
|
+
propertyPath?: string;
|
|
139
|
+
labelPropertyPath?: string;
|
|
140
|
+
valuePropertyPath?: string;
|
|
141
|
+
dependsOn?: string[];
|
|
142
|
+
entityKey?: string;
|
|
143
|
+
codePropertyPath?: string;
|
|
144
|
+
descriptionPropertyPaths?: string[];
|
|
145
|
+
statusPropertyPath?: string;
|
|
146
|
+
disabledPropertyPath?: string;
|
|
147
|
+
disabledReasonPropertyPath?: string;
|
|
148
|
+
searchPropertyPaths?: string[];
|
|
149
|
+
dependencyFilterMap?: Record<string, string>;
|
|
150
|
+
selectionPolicy?: LookupSelectionPolicyMetadata;
|
|
151
|
+
capabilities?: LookupCapabilitiesMetadata;
|
|
152
|
+
detail?: LookupDetailMetadata;
|
|
153
|
+
create?: LookupCreateMetadata;
|
|
154
|
+
display?: EntityLookupDisplayMetadata;
|
|
155
|
+
filtering?: LookupFilteringMetadata;
|
|
156
|
+
excludeSelfField?: boolean;
|
|
157
|
+
searchMode?: OptionSourceSearchMode;
|
|
158
|
+
pageSize?: number;
|
|
159
|
+
includeIds?: boolean;
|
|
160
|
+
cachePolicy?: OptionSourceCachePolicy;
|
|
161
|
+
selectedReloadPolicy?: OptionSourceSelectedReloadPolicy;
|
|
162
|
+
invalidSortPolicy?: OptionSourceInvalidSortPolicy;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
type JsonLogicPrimitive = string | number | boolean | null;
|
|
166
|
+
interface JsonLogicArray extends Array<JsonLogicValue> {
|
|
167
|
+
}
|
|
168
|
+
interface JsonLogicRecord {
|
|
169
|
+
[key: string]: JsonLogicValue | undefined;
|
|
170
|
+
}
|
|
171
|
+
type JsonLogicVarReference = string | [path: string] | [path: string, defaultValue: JsonLogicValue];
|
|
172
|
+
interface JsonLogicVarExpression {
|
|
173
|
+
var: JsonLogicVarReference;
|
|
174
|
+
}
|
|
175
|
+
type JsonLogicArguments = JsonLogicValue | JsonLogicArray;
|
|
176
|
+
interface JsonLogicOperationExpression {
|
|
177
|
+
[operator: string]: JsonLogicArguments;
|
|
178
|
+
}
|
|
179
|
+
type JsonLogicExpression = JsonLogicPrimitive | JsonLogicVarExpression | JsonLogicOperationExpression;
|
|
180
|
+
type JsonLogicDerivedValueExpression = Exclude<JsonLogicExpression, string>;
|
|
181
|
+
type JsonLogicValue = JsonLogicPrimitive | JsonLogicExpression | JsonLogicArray | JsonLogicRecord;
|
|
182
|
+
|
|
183
|
+
type PraxisPresentationVisualizationKind = 'line' | 'area' | 'column' | 'comparison' | 'stackedBar' | 'radial' | 'harveyBall' | 'bullet' | 'delta' | 'processFlow';
|
|
184
|
+
type PraxisPresentationVisualizationSurface = 'table-cell' | 'list-item' | 'object-header' | 'card-summary' | 'form-presentation';
|
|
185
|
+
type PraxisPresentationVisualizationSize = 'xs' | 'sm' | 'md' | 'lg' | 'responsive';
|
|
186
|
+
type PraxisPresentationVisualizationTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'critical';
|
|
187
|
+
interface PraxisPresentationVisualizationPoint {
|
|
188
|
+
label?: string;
|
|
189
|
+
value: number;
|
|
190
|
+
tone?: PraxisPresentationVisualizationTone;
|
|
191
|
+
}
|
|
192
|
+
interface PraxisPresentationVisualizationSegment {
|
|
193
|
+
label?: string;
|
|
194
|
+
value: number;
|
|
195
|
+
tone?: PraxisPresentationVisualizationTone;
|
|
196
|
+
}
|
|
197
|
+
interface PraxisPresentationVisualizationThreshold {
|
|
198
|
+
label?: string;
|
|
199
|
+
value?: number;
|
|
200
|
+
min?: number;
|
|
201
|
+
max?: number;
|
|
202
|
+
equals?: unknown;
|
|
203
|
+
tone?: PraxisPresentationVisualizationTone;
|
|
204
|
+
}
|
|
205
|
+
interface PraxisPresentationVisualizationItem {
|
|
206
|
+
id?: string;
|
|
207
|
+
label?: string;
|
|
208
|
+
value?: number;
|
|
209
|
+
icon?: string;
|
|
210
|
+
tone?: PraxisPresentationVisualizationTone;
|
|
211
|
+
state?: string;
|
|
212
|
+
}
|
|
213
|
+
interface PraxisPresentationVisualizationConfig {
|
|
214
|
+
kind: PraxisPresentationVisualizationKind;
|
|
215
|
+
surface?: PraxisPresentationVisualizationSurface;
|
|
216
|
+
size?: PraxisPresentationVisualizationSize;
|
|
217
|
+
value?: unknown;
|
|
218
|
+
valueExpr?: JsonLogicExpression | string;
|
|
219
|
+
valueSuffix?: string;
|
|
220
|
+
valueSuffixExpr?: JsonLogicExpression | string;
|
|
221
|
+
compactValue?: boolean;
|
|
222
|
+
total?: number;
|
|
223
|
+
totalExpr?: JsonLogicExpression | string;
|
|
224
|
+
target?: number;
|
|
225
|
+
targetExpr?: JsonLogicExpression | string;
|
|
226
|
+
baseline?: number;
|
|
227
|
+
baselineExpr?: JsonLogicExpression | string;
|
|
228
|
+
points?: PraxisPresentationVisualizationPoint[];
|
|
229
|
+
pointsExpr?: JsonLogicExpression | string;
|
|
230
|
+
segments?: PraxisPresentationVisualizationSegment[];
|
|
231
|
+
segmentsExpr?: JsonLogicExpression | string;
|
|
232
|
+
thresholds?: PraxisPresentationVisualizationThreshold[];
|
|
233
|
+
thresholdsExpr?: JsonLogicExpression | string;
|
|
234
|
+
items?: PraxisPresentationVisualizationItem[];
|
|
235
|
+
itemsExpr?: JsonLogicExpression | string;
|
|
236
|
+
tone?: PraxisPresentationVisualizationTone;
|
|
237
|
+
toneExpr?: JsonLogicExpression | string;
|
|
238
|
+
stepLabelWidth?: number | string;
|
|
239
|
+
stepLabelLineClamp?: number;
|
|
240
|
+
ariaLabel?: string;
|
|
241
|
+
ariaLabelExpr?: JsonLogicExpression | string;
|
|
242
|
+
fallbackText: string;
|
|
243
|
+
fallbackTextExpr?: JsonLogicExpression | string;
|
|
244
|
+
}
|
|
245
|
+
declare function isPraxisPresentationVisualizationTableSafe(value: PraxisPresentationVisualizationConfig | null | undefined): boolean;
|
|
246
|
+
|
|
247
|
+
type RichBlockContextScope = 'row' | 'computed' | 'detail' | 'meta' | 'user' | 'tenant';
|
|
248
|
+
interface RichBlockContextConfig {
|
|
249
|
+
scopes?: RichBlockContextScope[];
|
|
250
|
+
aliases?: Record<string, string>;
|
|
251
|
+
}
|
|
252
|
+
interface RichBlockRuleSet {
|
|
253
|
+
visibleWhen?: JsonLogicExpression | null;
|
|
254
|
+
disabledWhen?: JsonLogicExpression | null;
|
|
255
|
+
loadWhen?: JsonLogicExpression | null;
|
|
256
|
+
classWhen?: Array<{
|
|
257
|
+
className: string;
|
|
258
|
+
expr: JsonLogicExpression;
|
|
259
|
+
}>;
|
|
260
|
+
styleWhen?: Array<{
|
|
261
|
+
style: Record<string, string | number>;
|
|
262
|
+
expr: JsonLogicExpression;
|
|
263
|
+
}>;
|
|
264
|
+
}
|
|
265
|
+
type RichCapabilityMode = 'all' | 'any';
|
|
266
|
+
interface RichBlockBaseNode extends RichBlockRuleSet {
|
|
267
|
+
id?: string;
|
|
268
|
+
testId?: string;
|
|
269
|
+
className?: string;
|
|
270
|
+
style?: Record<string, string | number>;
|
|
271
|
+
bindings?: RichBlockContextConfig;
|
|
272
|
+
requiresCapabilities?: string[];
|
|
273
|
+
capabilityMode?: RichCapabilityMode;
|
|
274
|
+
}
|
|
275
|
+
interface RichTextNode extends RichBlockBaseNode {
|
|
276
|
+
type: 'text';
|
|
277
|
+
text?: string;
|
|
278
|
+
textExpr?: string;
|
|
279
|
+
}
|
|
280
|
+
interface RichIconNode extends RichBlockBaseNode {
|
|
281
|
+
type: 'icon';
|
|
282
|
+
icon: string;
|
|
283
|
+
ariaLabel?: string;
|
|
284
|
+
}
|
|
285
|
+
interface RichImageNode extends RichBlockBaseNode {
|
|
286
|
+
type: 'image';
|
|
287
|
+
src?: string;
|
|
288
|
+
srcExpr?: string;
|
|
289
|
+
alt?: string;
|
|
290
|
+
altExpr?: string;
|
|
291
|
+
aspectRatio?: RichCardMediaAspectRatio;
|
|
292
|
+
objectFit?: RichCardMediaObjectFit;
|
|
293
|
+
width?: string;
|
|
294
|
+
height?: string;
|
|
295
|
+
}
|
|
296
|
+
interface RichLinkNode extends RichBlockBaseNode {
|
|
297
|
+
type: 'link';
|
|
298
|
+
label?: string;
|
|
299
|
+
labelExpr?: string;
|
|
300
|
+
href: string;
|
|
301
|
+
target?: '_blank' | '_self';
|
|
302
|
+
rel?: string;
|
|
303
|
+
}
|
|
304
|
+
type RichSemanticTone = 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'danger' | 'error' | 'neutral';
|
|
305
|
+
interface RichBadgeNode extends RichBlockBaseNode {
|
|
306
|
+
type: 'badge';
|
|
307
|
+
label?: string;
|
|
308
|
+
labelExpr?: string;
|
|
309
|
+
icon?: string;
|
|
310
|
+
tone?: RichSemanticTone;
|
|
311
|
+
}
|
|
312
|
+
interface RichAvatarNode extends RichBlockBaseNode {
|
|
313
|
+
type: 'avatar';
|
|
314
|
+
name?: string;
|
|
315
|
+
nameExpr?: string;
|
|
316
|
+
imageSrc?: string;
|
|
317
|
+
imageSrcExpr?: string;
|
|
318
|
+
initials?: string;
|
|
319
|
+
initialsExpr?: string;
|
|
320
|
+
}
|
|
321
|
+
interface RichMetricNode extends RichBlockBaseNode {
|
|
322
|
+
type: 'metric';
|
|
323
|
+
label: string;
|
|
324
|
+
valueExpr: string;
|
|
325
|
+
captionExpr?: string;
|
|
326
|
+
icon?: string;
|
|
327
|
+
format?: string;
|
|
328
|
+
}
|
|
329
|
+
interface RichProgressNode extends RichBlockBaseNode {
|
|
330
|
+
type: 'progress';
|
|
331
|
+
value?: number;
|
|
332
|
+
valueExpr?: string;
|
|
333
|
+
max?: number;
|
|
334
|
+
label?: string;
|
|
335
|
+
labelExpr?: string;
|
|
336
|
+
showPercent?: boolean;
|
|
337
|
+
}
|
|
338
|
+
interface RichActionRef {
|
|
339
|
+
actionId: string;
|
|
340
|
+
payload?: unknown;
|
|
341
|
+
payloadExpr?: string;
|
|
342
|
+
availabilityExpr?: string;
|
|
343
|
+
confirmMessage?: string;
|
|
344
|
+
}
|
|
345
|
+
interface RichActionButtonNode extends RichBlockBaseNode {
|
|
346
|
+
type: 'actionButton';
|
|
347
|
+
label?: string;
|
|
348
|
+
labelExpr?: string;
|
|
349
|
+
icon?: string;
|
|
350
|
+
variant?: 'basic' | 'raised' | 'stroked' | 'flat';
|
|
351
|
+
color?: 'basic' | 'primary' | 'accent' | 'warn';
|
|
352
|
+
action: RichActionRef;
|
|
353
|
+
}
|
|
354
|
+
interface RichMicroVisualizationNode extends RichBlockBaseNode {
|
|
355
|
+
type: 'microVisualization';
|
|
356
|
+
visualization?: PraxisPresentationVisualizationConfig;
|
|
357
|
+
visualizationExpr?: string;
|
|
358
|
+
kind?: string;
|
|
359
|
+
pointsExpr?: string;
|
|
360
|
+
valueExpr?: string;
|
|
361
|
+
targetExpr?: string;
|
|
362
|
+
}
|
|
363
|
+
type RichPresenterNode = RichTextNode | RichIconNode | RichImageNode | RichLinkNode | RichBadgeNode | RichAvatarNode | RichMetricNode | RichProgressNode | RichActionButtonNode | RichMicroVisualizationNode;
|
|
364
|
+
type RichComposeLayout = 'flex' | 'grid';
|
|
365
|
+
type RichComposeAlignItems = 'stretch' | 'start' | 'center' | 'end';
|
|
366
|
+
interface RichComposeNode extends RichBlockBaseNode {
|
|
367
|
+
type: 'compose';
|
|
368
|
+
layout?: RichComposeLayout;
|
|
369
|
+
direction?: 'row' | 'column';
|
|
370
|
+
gap?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
371
|
+
wrap?: boolean;
|
|
372
|
+
columns?: number | 'auto-fit' | 'auto-fill';
|
|
373
|
+
minColumnWidth?: string;
|
|
374
|
+
alignItems?: RichComposeAlignItems;
|
|
375
|
+
items: RichBlockNode[];
|
|
376
|
+
}
|
|
377
|
+
type RichCardVariant = 'plain' | 'outlined' | 'elevated' | 'filled' | 'transparent' | 'unstyled';
|
|
378
|
+
type RichCardTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
379
|
+
type RichCardSize = 'sm' | 'md' | 'lg';
|
|
380
|
+
type RichCardDensity = 'compact' | 'comfortable';
|
|
381
|
+
type RichCardOrientation = 'vertical' | 'horizontal';
|
|
382
|
+
type RichCardMediaKind = 'image' | 'video' | 'icon' | 'avatar' | 'telemetry' | 'lottie';
|
|
383
|
+
interface RichCardMediaTelemetry {
|
|
384
|
+
variant?: 'radar' | 'pulse' | 'wave' | 'signal';
|
|
385
|
+
speed?: 'slow' | 'normal' | 'fast';
|
|
386
|
+
color?: string;
|
|
387
|
+
interactive?: boolean;
|
|
388
|
+
}
|
|
389
|
+
type RichCardMediaPlacement = 'top' | 'leading' | 'trailing' | 'background';
|
|
390
|
+
type RichCardMediaObjectFit = 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
391
|
+
type RichCardMediaAspectRatio = '16:9' | '4:3' | '1:1' | '21:9' | 'auto' | string;
|
|
392
|
+
interface RichCardMedia {
|
|
393
|
+
kind: RichCardMediaKind;
|
|
394
|
+
src?: string;
|
|
395
|
+
srcExpr?: string;
|
|
396
|
+
alt?: string;
|
|
397
|
+
altExpr?: string;
|
|
398
|
+
icon?: string;
|
|
399
|
+
label?: string;
|
|
400
|
+
labelExpr?: string;
|
|
401
|
+
placement?: RichCardMediaPlacement;
|
|
402
|
+
aspectRatio?: RichCardMediaAspectRatio;
|
|
403
|
+
objectFit?: RichCardMediaObjectFit;
|
|
404
|
+
telemetry?: RichCardMediaTelemetry;
|
|
405
|
+
animationSrc?: string;
|
|
406
|
+
verticalAlign?: 'center' | 'top' | 'bottom' | 'stretch';
|
|
407
|
+
}
|
|
408
|
+
type RichCardInteractionMode = 'none' | 'action' | 'selectable';
|
|
409
|
+
interface RichCardInteraction {
|
|
410
|
+
mode: RichCardInteractionMode;
|
|
411
|
+
action?: RichActionRef;
|
|
412
|
+
selected?: boolean;
|
|
413
|
+
selectedExpr?: string;
|
|
414
|
+
}
|
|
415
|
+
interface RichCardAccessibility {
|
|
416
|
+
role?: 'article' | 'group' | 'button';
|
|
417
|
+
ariaLabel?: string;
|
|
418
|
+
ariaLabelExpr?: string;
|
|
419
|
+
ariaLabelledBy?: string;
|
|
420
|
+
ariaDescribedBy?: string;
|
|
421
|
+
}
|
|
422
|
+
/** Semantic page opening. Navigation remains links; commands remain host-mediated actions. */
|
|
423
|
+
interface RichPageHeaderNode extends RichBlockBaseNode {
|
|
424
|
+
type: 'pageHeader';
|
|
425
|
+
title?: string;
|
|
426
|
+
titleExpr?: string;
|
|
427
|
+
subtitle?: string;
|
|
428
|
+
subtitleExpr?: string;
|
|
429
|
+
/** Document outline level, independent of visual size. Defaults to 1. */
|
|
430
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
431
|
+
size?: 'sm' | 'md' | 'lg';
|
|
432
|
+
identity?: RichIconNode | RichAvatarNode | RichImageNode;
|
|
433
|
+
/** Ancestors only. The resolved title is the non-link current item. */
|
|
434
|
+
breadcrumbs?: RichLinkNode[];
|
|
435
|
+
primaryAction?: RichActionButtonNode;
|
|
436
|
+
secondaryActions?: RichActionButtonNode[];
|
|
437
|
+
overflowActions?: RichActionButtonNode[];
|
|
438
|
+
relatedLinks?: RichLinkNode[];
|
|
439
|
+
}
|
|
440
|
+
interface RichCardNode extends RichBlockBaseNode {
|
|
441
|
+
type: 'card';
|
|
442
|
+
title?: string;
|
|
443
|
+
titleExpr?: string;
|
|
444
|
+
subtitle?: string;
|
|
445
|
+
subtitleExpr?: string;
|
|
446
|
+
content: Array<RichPresenterNode | RichComposeNode>;
|
|
447
|
+
media?: RichCardMedia;
|
|
448
|
+
headerAction?: RichActionButtonNode;
|
|
449
|
+
header?: RichBlockNode[];
|
|
450
|
+
body?: RichBlockNode[];
|
|
451
|
+
footer?: RichBlockNode[];
|
|
452
|
+
actions?: RichActionButtonNode[];
|
|
453
|
+
aside?: RichBlockNode[];
|
|
454
|
+
variant?: RichCardVariant;
|
|
455
|
+
tone?: RichCardTone;
|
|
456
|
+
size?: RichCardSize;
|
|
457
|
+
density?: RichCardDensity;
|
|
458
|
+
orientation?: RichCardOrientation;
|
|
459
|
+
loading?: boolean;
|
|
460
|
+
loadingExpr?: string;
|
|
461
|
+
active?: boolean;
|
|
462
|
+
activeExpr?: string;
|
|
463
|
+
interaction?: RichCardInteraction;
|
|
464
|
+
accessibility?: RichCardAccessibility;
|
|
465
|
+
}
|
|
466
|
+
interface RichCalloutNode extends RichBlockBaseNode {
|
|
467
|
+
type: 'callout';
|
|
468
|
+
tone?: 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
469
|
+
icon?: string;
|
|
470
|
+
title?: string;
|
|
471
|
+
titleExpr?: string;
|
|
472
|
+
message?: string;
|
|
473
|
+
messageExpr?: string;
|
|
474
|
+
actions?: RichActionButtonNode[];
|
|
475
|
+
}
|
|
476
|
+
type RichCtaGroupLayout = 'stacked' | 'split';
|
|
477
|
+
interface RichCtaGroupNode extends RichBlockBaseNode {
|
|
478
|
+
type: 'ctaGroup';
|
|
479
|
+
title?: string;
|
|
480
|
+
titleExpr?: string;
|
|
481
|
+
subtitle?: string;
|
|
482
|
+
subtitleExpr?: string;
|
|
483
|
+
message?: string;
|
|
484
|
+
messageExpr?: string;
|
|
485
|
+
layout?: RichCtaGroupLayout;
|
|
486
|
+
actions: RichActionButtonNode[];
|
|
487
|
+
}
|
|
488
|
+
interface RichKeyValueItem {
|
|
489
|
+
id?: string;
|
|
490
|
+
label?: string;
|
|
491
|
+
labelExpr?: string;
|
|
492
|
+
value?: string;
|
|
493
|
+
valueExpr?: string;
|
|
494
|
+
badge?: string;
|
|
495
|
+
badgeExpr?: string;
|
|
496
|
+
icon?: string;
|
|
497
|
+
}
|
|
498
|
+
interface RichKeyValueListNode extends RichBlockBaseNode {
|
|
499
|
+
type: 'keyValueList';
|
|
500
|
+
title?: string;
|
|
501
|
+
titleExpr?: string;
|
|
502
|
+
layout?: 'stacked' | 'inline';
|
|
503
|
+
items: RichKeyValueItem[];
|
|
504
|
+
}
|
|
505
|
+
type RichPropertySheetColumns = 1 | 2;
|
|
506
|
+
type RichPropertySheetTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
507
|
+
interface RichPropertySheetItem {
|
|
508
|
+
id?: string;
|
|
509
|
+
label?: string;
|
|
510
|
+
labelExpr?: string;
|
|
511
|
+
value?: string;
|
|
512
|
+
valueExpr?: string;
|
|
513
|
+
hint?: string;
|
|
514
|
+
hintExpr?: string;
|
|
515
|
+
icon?: string;
|
|
516
|
+
tone?: RichPropertySheetTone;
|
|
517
|
+
}
|
|
518
|
+
interface RichPropertySheetNode extends RichBlockBaseNode {
|
|
519
|
+
type: 'propertySheet';
|
|
520
|
+
title?: string;
|
|
521
|
+
titleExpr?: string;
|
|
522
|
+
columns?: RichPropertySheetColumns;
|
|
523
|
+
/**
|
|
524
|
+
* Caminho canônico do recurso para resolução de schema via /schemas/filtered.
|
|
525
|
+
* Ex: 'human-resources/funcionarios'
|
|
526
|
+
*/
|
|
527
|
+
resourcePath?: string;
|
|
528
|
+
/**
|
|
529
|
+
* Referência OpenAPI ao schema de componentes.
|
|
530
|
+
* Ex: '#/components/schemas/FuncionarioDTO'
|
|
531
|
+
*/
|
|
532
|
+
schemaRef?: string;
|
|
533
|
+
/**
|
|
534
|
+
* Filtro opcional por grupo canônico (x-ui group).
|
|
535
|
+
* Ex: 'Identificação', 'Profissional'
|
|
536
|
+
*/
|
|
537
|
+
group?: string;
|
|
538
|
+
/**
|
|
539
|
+
* Caminho para resolução dos dados no contexto (ex: 'hero', 'funcionario').
|
|
540
|
+
* Se omitido, utiliza a raiz do contexto de avaliação.
|
|
541
|
+
*/
|
|
542
|
+
dataContextPath?: string;
|
|
543
|
+
/**
|
|
544
|
+
* Itens estáticos ou overrides de campos do schema.
|
|
545
|
+
* Opcional quando resourcePath, schemaRef ou dataContextPath for informado.
|
|
546
|
+
*/
|
|
547
|
+
items?: RichPropertySheetItem[];
|
|
548
|
+
}
|
|
549
|
+
type RichStatGroupLayout = 'stacked' | 'inline' | 'grid';
|
|
550
|
+
type RichStatTone = RichSemanticTone;
|
|
551
|
+
type RichStatGroupHeaderSpacing = 'tight' | 'normal' | 'relaxed';
|
|
552
|
+
type RichStatGroupTileLayout = 'classic' | 'tile' | 'split';
|
|
553
|
+
interface RichStatItemProgress {
|
|
554
|
+
value?: number;
|
|
555
|
+
valueExpr?: string;
|
|
556
|
+
max?: number;
|
|
557
|
+
showPercent?: boolean;
|
|
558
|
+
variant?: 'bar' | 'ring';
|
|
559
|
+
tone?: RichStatTone;
|
|
560
|
+
}
|
|
561
|
+
interface RichStatItem {
|
|
562
|
+
id?: string;
|
|
563
|
+
label?: string;
|
|
564
|
+
labelExpr?: string;
|
|
565
|
+
value?: string;
|
|
566
|
+
valueExpr?: string;
|
|
567
|
+
caption?: string;
|
|
568
|
+
captionExpr?: string;
|
|
569
|
+
icon?: string;
|
|
570
|
+
tone?: RichStatTone;
|
|
571
|
+
progress?: RichStatItemProgress;
|
|
572
|
+
action?: RichActionRef;
|
|
573
|
+
tileLayout?: RichStatGroupTileLayout;
|
|
574
|
+
}
|
|
575
|
+
interface RichStatGroupNode extends RichBlockBaseNode {
|
|
576
|
+
type: 'statGroup';
|
|
577
|
+
title?: string;
|
|
578
|
+
titleExpr?: string;
|
|
579
|
+
subtitle?: string;
|
|
580
|
+
subtitleExpr?: string;
|
|
581
|
+
headerSpacing?: RichStatGroupHeaderSpacing;
|
|
582
|
+
tileLayout?: RichStatGroupTileLayout;
|
|
583
|
+
layout?: RichStatGroupLayout;
|
|
584
|
+
items: RichStatItem[];
|
|
585
|
+
}
|
|
586
|
+
type RichTabsAppearance = 'underline' | 'pills';
|
|
587
|
+
interface RichTabsItem extends RichBlockRuleSet {
|
|
588
|
+
id?: string;
|
|
589
|
+
label?: string;
|
|
590
|
+
labelExpr?: string;
|
|
591
|
+
icon?: string;
|
|
592
|
+
badge?: string;
|
|
593
|
+
badgeExpr?: string;
|
|
594
|
+
requiresCapabilities?: string[];
|
|
595
|
+
capabilityMode?: RichCapabilityMode;
|
|
596
|
+
content: RichBlockNode[];
|
|
597
|
+
}
|
|
598
|
+
interface RichTabsNode extends RichBlockBaseNode {
|
|
599
|
+
type: 'tabs';
|
|
600
|
+
title?: string;
|
|
601
|
+
titleExpr?: string;
|
|
602
|
+
subtitle?: string;
|
|
603
|
+
subtitleExpr?: string;
|
|
604
|
+
appearance?: RichTabsAppearance;
|
|
605
|
+
defaultTabId?: string;
|
|
606
|
+
wrap?: boolean;
|
|
607
|
+
scrollable?: boolean;
|
|
608
|
+
items: RichTabsItem[];
|
|
609
|
+
}
|
|
610
|
+
interface RichEmptyStateNode extends RichBlockBaseNode {
|
|
611
|
+
type: 'emptyState';
|
|
612
|
+
icon?: string;
|
|
613
|
+
title?: string;
|
|
614
|
+
titleExpr?: string;
|
|
615
|
+
message?: string;
|
|
616
|
+
messageExpr?: string;
|
|
617
|
+
actions?: RichActionButtonNode[];
|
|
618
|
+
}
|
|
619
|
+
interface RichRecordSummaryField {
|
|
620
|
+
id?: string;
|
|
621
|
+
label?: string;
|
|
622
|
+
labelExpr?: string;
|
|
623
|
+
value?: string;
|
|
624
|
+
valueExpr?: string;
|
|
625
|
+
}
|
|
626
|
+
interface RichRecordSummaryNode extends RichBlockBaseNode {
|
|
627
|
+
type: 'recordSummary';
|
|
628
|
+
title?: string;
|
|
629
|
+
titleExpr?: string;
|
|
630
|
+
subtitle?: string;
|
|
631
|
+
subtitleExpr?: string;
|
|
632
|
+
meta?: string;
|
|
633
|
+
metaExpr?: string;
|
|
634
|
+
fields: RichRecordSummaryField[];
|
|
635
|
+
actions?: RichActionButtonNode[];
|
|
636
|
+
}
|
|
637
|
+
type RichLookupResultStatus = 'idle' | 'resolved' | 'empty' | 'error';
|
|
638
|
+
interface RichLookupResultField {
|
|
639
|
+
id?: string;
|
|
640
|
+
label?: string;
|
|
641
|
+
labelExpr?: string;
|
|
642
|
+
value?: string;
|
|
643
|
+
valueExpr?: string;
|
|
644
|
+
hint?: string;
|
|
645
|
+
hintExpr?: string;
|
|
646
|
+
}
|
|
647
|
+
interface RichLookupResultNode extends RichBlockBaseNode {
|
|
648
|
+
type: 'lookupResult';
|
|
649
|
+
title?: string;
|
|
650
|
+
titleExpr?: string;
|
|
651
|
+
subtitle?: string;
|
|
652
|
+
subtitleExpr?: string;
|
|
653
|
+
status?: RichLookupResultStatus;
|
|
654
|
+
statusExpr?: string;
|
|
655
|
+
emptyText?: string;
|
|
656
|
+
emptyTextExpr?: string;
|
|
657
|
+
errorText?: string;
|
|
658
|
+
errorTextExpr?: string;
|
|
659
|
+
meta?: string;
|
|
660
|
+
metaExpr?: string;
|
|
661
|
+
fields: RichLookupResultField[];
|
|
662
|
+
actions?: RichActionButtonNode[];
|
|
663
|
+
}
|
|
664
|
+
interface RichLookupCardNode extends RichBlockBaseNode {
|
|
665
|
+
type: 'lookupCard';
|
|
666
|
+
title?: string;
|
|
667
|
+
titleExpr?: string;
|
|
668
|
+
subtitle?: string;
|
|
669
|
+
subtitleExpr?: string;
|
|
670
|
+
icon?: string;
|
|
671
|
+
status?: RichLookupResultStatus;
|
|
672
|
+
statusExpr?: string;
|
|
673
|
+
emptyText?: string;
|
|
674
|
+
emptyTextExpr?: string;
|
|
675
|
+
errorText?: string;
|
|
676
|
+
errorTextExpr?: string;
|
|
677
|
+
meta?: string;
|
|
678
|
+
metaExpr?: string;
|
|
679
|
+
ctaLabel?: string;
|
|
680
|
+
ctaLabelExpr?: string;
|
|
681
|
+
ctaIcon?: string;
|
|
682
|
+
variant?: 'basic' | 'raised' | 'stroked' | 'flat';
|
|
683
|
+
color?: 'basic' | 'primary' | 'accent' | 'warn';
|
|
684
|
+
action: RichActionRef;
|
|
685
|
+
fields: RichLookupResultField[];
|
|
686
|
+
secondaryActions?: RichActionButtonNode[];
|
|
687
|
+
}
|
|
688
|
+
interface RichRelatedRecordNode extends RichBlockBaseNode {
|
|
689
|
+
type: 'relatedRecord';
|
|
690
|
+
title?: string;
|
|
691
|
+
titleExpr?: string;
|
|
692
|
+
subtitle?: string;
|
|
693
|
+
subtitleExpr?: string;
|
|
694
|
+
relationLabel?: string;
|
|
695
|
+
relationLabelExpr?: string;
|
|
696
|
+
icon?: string;
|
|
697
|
+
meta?: string;
|
|
698
|
+
metaExpr?: string;
|
|
699
|
+
ctaLabel?: string;
|
|
700
|
+
ctaLabelExpr?: string;
|
|
701
|
+
ctaIcon?: string;
|
|
702
|
+
variant?: 'basic' | 'raised' | 'stroked' | 'flat';
|
|
703
|
+
color?: 'basic' | 'primary' | 'accent' | 'warn';
|
|
704
|
+
action?: RichActionRef;
|
|
705
|
+
fields: RichLookupResultField[];
|
|
706
|
+
secondaryActions?: RichActionButtonNode[];
|
|
707
|
+
}
|
|
708
|
+
type RichActionCardCtaPlacement = 'bottom' | 'inline' | 'trailing';
|
|
709
|
+
type RichActionCardCtaVariant = 'elevated' | 'stroked' | 'flat' | 'tonal' | 'raised';
|
|
710
|
+
interface RichActionCardNode extends RichBlockBaseNode {
|
|
711
|
+
type: 'actionCard';
|
|
712
|
+
title?: string;
|
|
713
|
+
titleExpr?: string;
|
|
714
|
+
subtitle?: string;
|
|
715
|
+
subtitleExpr?: string;
|
|
716
|
+
message?: string;
|
|
717
|
+
messageExpr?: string;
|
|
718
|
+
icon?: string;
|
|
719
|
+
meta?: string;
|
|
720
|
+
metaExpr?: string;
|
|
721
|
+
ctaLabel?: string;
|
|
722
|
+
ctaLabelExpr?: string;
|
|
723
|
+
ctaIcon?: string;
|
|
724
|
+
ctaPlacement?: RichActionCardCtaPlacement;
|
|
725
|
+
ctaVariant?: RichActionCardCtaVariant;
|
|
726
|
+
variant?: 'basic' | 'raised' | 'stroked' | 'flat' | 'unstyled';
|
|
727
|
+
color?: 'basic' | 'primary' | 'accent' | 'warn';
|
|
728
|
+
action: RichActionRef;
|
|
729
|
+
secondaryActions?: RichActionButtonNode[];
|
|
730
|
+
}
|
|
731
|
+
type RichDecisionGovernanceStatus = 'draft' | 'simulated' | 'approved' | 'published' | 'superseded' | 'reverted';
|
|
732
|
+
type RichDecisionRisk = 'low' | 'medium' | 'high' | 'critical';
|
|
733
|
+
interface RichDecisionPackageEvidence {
|
|
734
|
+
id?: string;
|
|
735
|
+
label?: string;
|
|
736
|
+
labelExpr?: string;
|
|
737
|
+
source?: string;
|
|
738
|
+
sourceExpr?: string;
|
|
739
|
+
}
|
|
740
|
+
interface RichDecisionPackageNode extends RichBlockBaseNode {
|
|
741
|
+
type: 'decisionPackage';
|
|
742
|
+
title?: string;
|
|
743
|
+
titleExpr?: string;
|
|
744
|
+
subtitle?: string;
|
|
745
|
+
subtitleExpr?: string;
|
|
746
|
+
summary?: string;
|
|
747
|
+
summaryExpr?: string;
|
|
748
|
+
status?: RichDecisionGovernanceStatus;
|
|
749
|
+
statusExpr?: string;
|
|
750
|
+
owner?: string;
|
|
751
|
+
ownerExpr?: string;
|
|
752
|
+
policySource?: string;
|
|
753
|
+
policySourceExpr?: string;
|
|
754
|
+
version?: string;
|
|
755
|
+
versionExpr?: string;
|
|
756
|
+
confidence?: number;
|
|
757
|
+
confidenceExpr?: string;
|
|
758
|
+
risk?: RichDecisionRisk;
|
|
759
|
+
riskExpr?: string;
|
|
760
|
+
lastReviewed?: string;
|
|
761
|
+
lastReviewedExpr?: string;
|
|
762
|
+
supersedes?: string;
|
|
763
|
+
supersedesExpr?: string;
|
|
764
|
+
evidence?: RichDecisionPackageEvidence[];
|
|
765
|
+
primaryAction?: RichActionButtonNode;
|
|
766
|
+
secondaryActions?: RichActionButtonNode[];
|
|
767
|
+
}
|
|
768
|
+
interface RichFormLauncherNode extends RichBlockBaseNode {
|
|
769
|
+
type: 'formLauncher';
|
|
770
|
+
title?: string;
|
|
771
|
+
titleExpr?: string;
|
|
772
|
+
subtitle?: string;
|
|
773
|
+
subtitleExpr?: string;
|
|
774
|
+
description?: string;
|
|
775
|
+
descriptionExpr?: string;
|
|
776
|
+
icon?: string;
|
|
777
|
+
formId?: string;
|
|
778
|
+
ctaLabel?: string;
|
|
779
|
+
ctaLabelExpr?: string;
|
|
780
|
+
ctaIcon?: string;
|
|
781
|
+
variant?: 'basic' | 'raised' | 'stroked' | 'flat';
|
|
782
|
+
color?: 'basic' | 'primary' | 'accent' | 'warn';
|
|
783
|
+
action: RichActionRef;
|
|
784
|
+
secondaryActions?: RichActionButtonNode[];
|
|
785
|
+
}
|
|
786
|
+
interface RichDynamicFormNode extends RichBlockBaseNode {
|
|
787
|
+
type: 'dynamicForm';
|
|
788
|
+
/** Caminho do recurso canônico. Ex: 'human-resources/funcionarios' */
|
|
789
|
+
resourcePath: string;
|
|
790
|
+
/** Modo do formulário: visualização/apresentação ('view') ou edição ('edit'). Padrão: 'view'. */
|
|
791
|
+
mode?: 'view' | 'edit';
|
|
792
|
+
/** Apresentação governada para dossiês e painéis editoriais sem caixas de input. Padrão: true em view mode. */
|
|
793
|
+
presentationMode?: boolean;
|
|
794
|
+
/** Filtro de grupos canônicos a serem renderizados. */
|
|
795
|
+
groupFilter?: string[];
|
|
796
|
+
/** Caminho de vinculação dos dados no contexto do documento (ex: 'hero'). */
|
|
797
|
+
dataBinding?: string;
|
|
798
|
+
/** Identificador opcional do formulário. */
|
|
799
|
+
formId?: string;
|
|
800
|
+
}
|
|
801
|
+
interface RichCollapsibleCardNode extends RichBlockBaseNode {
|
|
802
|
+
type: 'collapsibleCard';
|
|
803
|
+
title?: string;
|
|
804
|
+
titleExpr?: string;
|
|
805
|
+
subtitle?: string;
|
|
806
|
+
subtitleExpr?: string;
|
|
807
|
+
icon?: string;
|
|
808
|
+
defaultExpanded?: boolean;
|
|
809
|
+
actions?: RichActionButtonNode[];
|
|
810
|
+
content: RichBlockNode[];
|
|
811
|
+
}
|
|
812
|
+
interface RichDisclosureNode extends RichBlockBaseNode {
|
|
813
|
+
type: 'disclosure';
|
|
814
|
+
title?: string;
|
|
815
|
+
titleExpr?: string;
|
|
816
|
+
subtitle?: string;
|
|
817
|
+
subtitleExpr?: string;
|
|
818
|
+
icon?: string;
|
|
819
|
+
appearance?: 'plain' | 'card';
|
|
820
|
+
defaultExpanded?: boolean;
|
|
821
|
+
actions?: RichActionButtonNode[];
|
|
822
|
+
content: RichBlockNode[];
|
|
823
|
+
}
|
|
824
|
+
interface RichAccordionItem {
|
|
825
|
+
id?: string;
|
|
826
|
+
title?: string;
|
|
827
|
+
titleExpr?: string;
|
|
828
|
+
subtitle?: string;
|
|
829
|
+
subtitleExpr?: string;
|
|
830
|
+
icon?: string;
|
|
831
|
+
defaultExpanded?: boolean;
|
|
832
|
+
actions?: RichActionButtonNode[];
|
|
833
|
+
content: RichBlockNode[];
|
|
834
|
+
}
|
|
835
|
+
interface RichAccordionNode extends RichBlockBaseNode {
|
|
836
|
+
type: 'accordion';
|
|
837
|
+
title?: string;
|
|
838
|
+
titleExpr?: string;
|
|
839
|
+
multi?: boolean;
|
|
840
|
+
items: RichAccordionItem[];
|
|
841
|
+
}
|
|
842
|
+
interface RichMediaBlockNode extends RichBlockBaseNode {
|
|
843
|
+
type: 'mediaBlock';
|
|
844
|
+
avatar?: RichAvatarNode;
|
|
845
|
+
title?: RichTextNode;
|
|
846
|
+
subtitle?: RichTextNode;
|
|
847
|
+
meta?: RichComposeNode;
|
|
848
|
+
trailing?: RichBlockNode[];
|
|
849
|
+
}
|
|
850
|
+
interface RichTimelineItem {
|
|
851
|
+
id?: string;
|
|
852
|
+
title?: string;
|
|
853
|
+
titleExpr?: string;
|
|
854
|
+
subtitle?: string;
|
|
855
|
+
subtitleExpr?: string;
|
|
856
|
+
meta?: string;
|
|
857
|
+
metaExpr?: string;
|
|
858
|
+
opposite?: string;
|
|
859
|
+
oppositeExpr?: string;
|
|
860
|
+
icon?: string;
|
|
861
|
+
iconExpr?: string;
|
|
862
|
+
badge?: string;
|
|
863
|
+
badgeExpr?: string;
|
|
864
|
+
markerColor?: RichTimelineColor;
|
|
865
|
+
markerStyle?: RichTimelineMarkerStyle;
|
|
866
|
+
connectorColor?: RichTimelineColor;
|
|
867
|
+
connectorVariant?: RichTimelineConnectorVariant;
|
|
868
|
+
action?: RichActionRef;
|
|
869
|
+
}
|
|
870
|
+
type RichTimelinePosition = 'left' | 'right' | 'alternate' | 'alternate-reverse';
|
|
871
|
+
type RichTimelineOrientation = 'vertical' | 'horizontal';
|
|
872
|
+
type RichTimelineOrder = 'normal' | 'reverse';
|
|
873
|
+
type RichTimelineConnectorVariant = 'solid' | 'dashed' | 'none';
|
|
874
|
+
type RichTimelineMarkerVariant = 'dot' | 'icon' | 'number';
|
|
875
|
+
type RichTimelineMarkerStyle = 'filled' | 'outlined';
|
|
876
|
+
type RichTimelineColor = RichSemanticTone;
|
|
877
|
+
type RichTimelineEmphasis = 'subtle' | 'standard' | 'strong' | 'hero';
|
|
878
|
+
type RichTimelineDensity = 'compact' | 'comfortable' | 'spacious';
|
|
879
|
+
type RichTimelineTextAppearance = 'default' | 'prominent' | 'eyebrow' | 'label';
|
|
880
|
+
interface RichTimelineNode extends RichBlockBaseNode {
|
|
881
|
+
type: 'timeline';
|
|
882
|
+
title?: string;
|
|
883
|
+
titleExpr?: string;
|
|
884
|
+
emptyText?: string;
|
|
885
|
+
orientation?: RichTimelineOrientation;
|
|
886
|
+
order?: RichTimelineOrder;
|
|
887
|
+
position?: RichTimelinePosition;
|
|
888
|
+
connectorVariant?: RichTimelineConnectorVariant;
|
|
889
|
+
connectorColor?: RichTimelineColor;
|
|
890
|
+
markerVariant?: RichTimelineMarkerVariant;
|
|
891
|
+
markerColor?: RichTimelineColor;
|
|
892
|
+
markerStyle?: RichTimelineMarkerStyle;
|
|
893
|
+
emphasis?: RichTimelineEmphasis;
|
|
894
|
+
density?: RichTimelineDensity;
|
|
895
|
+
textAppearance?: RichTimelineTextAppearance;
|
|
896
|
+
items: RichTimelineItem[];
|
|
897
|
+
}
|
|
898
|
+
type CorePresetKind = 'surface-open' | 'widget-page-layout' | 'widget-page-theme' | 'editorial-theme' | 'editorial-compliance' | 'editorial-solution' | 'rich-block';
|
|
899
|
+
interface CorePresetRef {
|
|
900
|
+
kind: CorePresetKind;
|
|
901
|
+
namespace: string;
|
|
902
|
+
presetId: string;
|
|
903
|
+
version?: string;
|
|
904
|
+
}
|
|
905
|
+
interface RichPresetReferenceNode extends RichBlockBaseNode {
|
|
906
|
+
type: 'preset';
|
|
907
|
+
ref: CorePresetRef & {
|
|
908
|
+
kind: 'rich-block';
|
|
909
|
+
};
|
|
910
|
+
inputs?: Record<string, unknown>;
|
|
911
|
+
}
|
|
912
|
+
type RichPrimitiveNode = RichPresenterNode | RichComposeNode | RichCardNode | RichPageHeaderNode | RichCalloutNode | RichCtaGroupNode | RichKeyValueListNode | RichPropertySheetNode | RichDynamicFormNode | RichStatGroupNode | RichTabsNode | RichEmptyStateNode | RichRecordSummaryNode | RichLookupResultNode | RichLookupCardNode | RichRelatedRecordNode | RichActionCardNode | RichDecisionPackageNode | RichFormLauncherNode | RichCollapsibleCardNode | RichDisclosureNode | RichAccordionNode | RichMediaBlockNode | RichTimelineNode;
|
|
913
|
+
type RichBlockNode = RichPrimitiveNode | RichPresetReferenceNode;
|
|
914
|
+
interface RichContentDocument {
|
|
915
|
+
kind: 'praxis.rich-content';
|
|
916
|
+
version: '1.0.0';
|
|
917
|
+
context?: RichBlockContextConfig;
|
|
918
|
+
nodes: RichBlockNode[];
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
interface GlobalActionRef {
|
|
922
|
+
actionId: string;
|
|
923
|
+
payload?: any;
|
|
924
|
+
payloadExpr?: string;
|
|
925
|
+
meta?: {
|
|
926
|
+
label?: string;
|
|
927
|
+
icon?: string;
|
|
928
|
+
emitLocal?: boolean;
|
|
929
|
+
confirmation?: any;
|
|
930
|
+
[key: string]: any;
|
|
931
|
+
};
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
type PraxisExportFormat = 'excel' | 'pdf' | 'csv' | 'json' | 'print';
|
|
935
|
+
type PraxisExportScope = 'auto' | 'selected' | 'filtered' | 'currentPage' | 'all';
|
|
936
|
+
|
|
937
|
+
interface PraxisRuntimeGlobalActionEffect {
|
|
938
|
+
id?: string;
|
|
939
|
+
kind: 'global-action';
|
|
940
|
+
globalAction: GlobalActionRef;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* Contratos compartilhados de discovery semantico consumidos pelo runtime Angular.
|
|
945
|
+
*
|
|
946
|
+
* `resourcePath` continua sendo o endereco operacional do recurso.
|
|
947
|
+
* `resourceKey` representa a identidade semantica estavel devolvida pelo backend para
|
|
948
|
+
* surfaces, actions e capabilities.
|
|
949
|
+
*
|
|
950
|
+
* O runtime usa `resourceKey` para preservar contexto semantico e gerar ids estaveis de
|
|
951
|
+
* abertura, enquanto `resourcePath`, `path`, `method` e `schemaUrl` seguem responsaveis pelo
|
|
952
|
+
* comportamento operacional.
|
|
953
|
+
*/
|
|
954
|
+
|
|
955
|
+
interface ResourceAvailabilityDecision {
|
|
956
|
+
allowed: boolean;
|
|
957
|
+
reason?: string | null;
|
|
958
|
+
metadata?: Record<string, any>;
|
|
959
|
+
}
|
|
960
|
+
type ResourceSurfaceKind = 'FORM' | 'PARTIAL_FORM' | 'VIEW' | 'READ_PROJECTION';
|
|
961
|
+
type ResourceSurfaceScope = 'COLLECTION' | 'ITEM';
|
|
962
|
+
type ResourceSurfaceResponseCardinality = 'OBJECT' | 'COLLECTION' | 'PAGE' | 'VOID' | 'UNKNOWN';
|
|
963
|
+
type RelatedResourceChildOperation = 'FILTER' | 'LIST' | 'CREATE' | 'UPDATE' | 'DELETE' | 'DUPLICATE_DRAFT';
|
|
964
|
+
interface RelatedResourceSurface {
|
|
965
|
+
parentResourceKey: string;
|
|
966
|
+
parentIdPathVariable: string;
|
|
967
|
+
childResourceKey: string;
|
|
968
|
+
childResourcePath: string;
|
|
969
|
+
childParentField: string;
|
|
970
|
+
selectable: boolean;
|
|
971
|
+
selectionKeyField: string;
|
|
972
|
+
childOperations: RelatedResourceChildOperation[];
|
|
973
|
+
}
|
|
974
|
+
interface ResourceSurfaceCatalogItem {
|
|
975
|
+
id: string;
|
|
976
|
+
resourceKey: string;
|
|
977
|
+
kind: ResourceSurfaceKind;
|
|
978
|
+
scope: ResourceSurfaceScope;
|
|
979
|
+
title: string;
|
|
980
|
+
description?: string | null;
|
|
981
|
+
intent?: string | null;
|
|
982
|
+
operationId: string;
|
|
983
|
+
path: string;
|
|
984
|
+
method: string;
|
|
985
|
+
schemaId: string;
|
|
986
|
+
schemaUrl: string;
|
|
987
|
+
responseCardinality?: ResourceSurfaceResponseCardinality | null;
|
|
988
|
+
availability: ResourceAvailabilityDecision;
|
|
989
|
+
order: number;
|
|
990
|
+
tags: string[];
|
|
991
|
+
relatedResource?: RelatedResourceSurface | null;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
type FieldPresentationTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
995
|
+
type FieldPresentationAppearance = 'plain' | 'soft' | 'outlined' | 'filled';
|
|
996
|
+
type FieldPresenterKind = 'text' | 'badge' | 'chip' | 'status' | 'iconValue' | 'progress' | 'rating' | 'microVisualization';
|
|
997
|
+
interface FieldPresentationInteractions {
|
|
998
|
+
/** Allows readonly surfaces to expose a copy affordance without changing the field value. */
|
|
999
|
+
copy?: boolean;
|
|
1000
|
+
/** Allows readonly surfaces to expose contextual detail expansion. */
|
|
1001
|
+
details?: boolean;
|
|
1002
|
+
/** Allows readonly surfaces to expose inline expansion for long values. */
|
|
1003
|
+
expand?: boolean;
|
|
1004
|
+
/** Allows readonly surfaces to expose a link affordance when the value is navigable. */
|
|
1005
|
+
link?: boolean;
|
|
1006
|
+
}
|
|
1007
|
+
interface FieldPresentationConfig {
|
|
1008
|
+
/** Semantic display strategy for readonly/presentation surfaces. */
|
|
1009
|
+
presenter?: FieldPresenterKind;
|
|
1010
|
+
/** Alias accepted for schema authors that describe the semantic display as a variant. */
|
|
1011
|
+
variant?: FieldPresenterKind;
|
|
1012
|
+
/** Semantic tone mapped by consumers to theme tokens. */
|
|
1013
|
+
tone?: FieldPresentationTone;
|
|
1014
|
+
/** Material Symbols icon name, without arbitrary HTML. */
|
|
1015
|
+
icon?: string;
|
|
1016
|
+
/** Optional semantic label for status/chip/badge presentations. */
|
|
1017
|
+
label?: string;
|
|
1018
|
+
/** Optional secondary marker rendered by presentation-capable consumers. */
|
|
1019
|
+
badge?: string;
|
|
1020
|
+
/** Optional tooltip text for the presentation wrapper. */
|
|
1021
|
+
tooltip?: string;
|
|
1022
|
+
/** Optional readonly prefix rendered next to the displayed value without changing the raw value. */
|
|
1023
|
+
prefix?: string;
|
|
1024
|
+
/** Optional readonly suffix rendered next to the displayed value without changing the raw value. */
|
|
1025
|
+
suffix?: string;
|
|
1026
|
+
/** Optional icon override when the field resolves to a truthy boolean state. */
|
|
1027
|
+
iconTrue?: string;
|
|
1028
|
+
/** Optional icon override when the field resolves to a falsy boolean state. */
|
|
1029
|
+
iconFalse?: string;
|
|
1030
|
+
/** Optional semantic tone when the field resolves to a truthy boolean state. */
|
|
1031
|
+
toneTrue?: FieldPresentationTone;
|
|
1032
|
+
/** Optional semantic tone when the field resolves to a falsy boolean state. */
|
|
1033
|
+
toneFalse?: FieldPresentationTone;
|
|
1034
|
+
/** Optional display label when the field resolves to a truthy boolean state. */
|
|
1035
|
+
labelTrue?: string;
|
|
1036
|
+
/** Optional display label when the field resolves to a falsy boolean state. */
|
|
1037
|
+
labelFalse?: string;
|
|
1038
|
+
/** Visual density/emphasis strategy mapped by consumers to theme tokens. */
|
|
1039
|
+
appearance?: FieldPresentationAppearance;
|
|
1040
|
+
/** Optional formatter override for the presentation surface only. */
|
|
1041
|
+
valuePresentation?: ValuePresentationConfig;
|
|
1042
|
+
/** Renderer-neutral micro visualization metadata for compact presentation surfaces. */
|
|
1043
|
+
visualization?: PraxisPresentationVisualizationConfig;
|
|
1044
|
+
/** Safe readonly affordances. No commands or mutations are executed from this contract. */
|
|
1045
|
+
interactions?: FieldPresentationInteractions;
|
|
1046
|
+
}
|
|
1047
|
+
interface FieldPresentationRule {
|
|
1048
|
+
/** Json Logic guard evaluated against the presentation context. */
|
|
1049
|
+
when: JsonLogicExpression;
|
|
1050
|
+
/** Semantic presentation state merged when the guard is truthy. */
|
|
1051
|
+
set?: FieldPresentationConfig;
|
|
1052
|
+
/** Alias for `set`, useful for rule-builder terminology. */
|
|
1053
|
+
effect?: FieldPresentationConfig;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
interface TableTooltipConfig {
|
|
1057
|
+
text?: string;
|
|
1058
|
+
position?: 'top' | 'right' | 'bottom' | 'left' | 'above' | 'below' | 'before' | 'after';
|
|
1059
|
+
bgColor?: string;
|
|
1060
|
+
delayMs?: number;
|
|
1061
|
+
}
|
|
1062
|
+
/**
|
|
1063
|
+
* Nova arquitetura modular do TableConfig v2.0
|
|
1064
|
+
* Preparada para crescimento exponencial e alinhada com as 5 abas do editor
|
|
1065
|
+
*/
|
|
1066
|
+
interface ColumnDefinition {
|
|
1067
|
+
/** Campo da fonte de dados */
|
|
1068
|
+
field: string;
|
|
1069
|
+
/** Cabeçalho da coluna */
|
|
1070
|
+
header: string;
|
|
1071
|
+
/** Tipo de dados para formatação */
|
|
1072
|
+
type?: 'string' | 'number' | 'date' | 'boolean' | 'currency' | 'percentage' | 'custom';
|
|
1073
|
+
/** Largura da coluna */
|
|
1074
|
+
width?: string;
|
|
1075
|
+
/** Visibilidade da coluna */
|
|
1076
|
+
visible?: boolean;
|
|
1077
|
+
/** Permitir ordenação */
|
|
1078
|
+
sortable?: boolean;
|
|
1079
|
+
/** Permitir filtragem */
|
|
1080
|
+
filterable?: boolean;
|
|
1081
|
+
/** Permitir redimensionamento */
|
|
1082
|
+
resizable?: boolean;
|
|
1083
|
+
/** Coluna fixa (sticky). true/"start" fixa no início; "end" fixa no fim */
|
|
1084
|
+
sticky?: boolean | 'start' | 'end';
|
|
1085
|
+
/** Alinhamento do conteúdo */
|
|
1086
|
+
align?: 'left' | 'center' | 'right';
|
|
1087
|
+
/** Ordem de exibição */
|
|
1088
|
+
order?: number;
|
|
1089
|
+
/** Campo do backend usado para ordenação (quando diferente de field) */
|
|
1090
|
+
sortField?: string;
|
|
1091
|
+
/** Estilo CSS personalizado */
|
|
1092
|
+
style?: string;
|
|
1093
|
+
/** Estilo CSS do cabeçalho */
|
|
1094
|
+
headerStyle?: string;
|
|
1095
|
+
/** Classe CSS personalizada */
|
|
1096
|
+
cssClass?: string;
|
|
1097
|
+
/** Classe CSS do cabeçalho */
|
|
1098
|
+
headerCssClass?: string;
|
|
1099
|
+
/** Formato de exibição dos dados */
|
|
1100
|
+
format?: any;
|
|
1101
|
+
/** Coluna calculada baseada em expressão */
|
|
1102
|
+
computed?: {
|
|
1103
|
+
/** Expressão segura baseada em campos da linha */
|
|
1104
|
+
expression: JsonLogicDerivedValueExpression;
|
|
1105
|
+
/** Tipo do valor calculado para formatação */
|
|
1106
|
+
outputType?: ColumnDefinition['type'];
|
|
1107
|
+
/** Formato opcional do valor calculado */
|
|
1108
|
+
format?: string;
|
|
1109
|
+
/** Campos usados na expressão (opcional) */
|
|
1110
|
+
dependencies?: string[];
|
|
1111
|
+
};
|
|
1112
|
+
/** Mapeamento de valores para exibição */
|
|
1113
|
+
valueMapping?: {
|
|
1114
|
+
[key: string | number]: string;
|
|
1115
|
+
};
|
|
1116
|
+
/**
|
|
1117
|
+
* Renderizador de célula (Fase 1): opções básicas para ícone, imagem ou badge.
|
|
1118
|
+
* Fase 2: expandido com tipos interativos/ricos (link, button, chip, progress, avatar, toggle, menu, html).
|
|
1119
|
+
* Mantém compatibilidade com type/format/valueMapping; quando definido, tem precedência na exibição.
|
|
1120
|
+
*/
|
|
1121
|
+
renderer?: {
|
|
1122
|
+
/** Tipo calculado por expressão (tem precedência sobre o tipo estático) */
|
|
1123
|
+
typeExpr?: string | {
|
|
1124
|
+
expr: string;
|
|
1125
|
+
};
|
|
1126
|
+
/** Tipo do renderizador */
|
|
1127
|
+
type: 'icon' | 'image' | 'badge' | 'link' | 'button' | 'chip' | 'progress' | 'avatar' | 'toggle' | 'menu' | 'rating' | 'microVisualization' | 'html' | 'compose';
|
|
1128
|
+
/** Tooltip associado ao renderer efetivo da célula. */
|
|
1129
|
+
tooltip?: TableTooltipConfig;
|
|
1130
|
+
/** Configuração de ícone (Material/SVG por nome) */
|
|
1131
|
+
icon?: {
|
|
1132
|
+
/** Nome fixo do ícone (ex.: 'check_circle') */
|
|
1133
|
+
name?: string;
|
|
1134
|
+
/** Campo do row que contém o nome do ícone */
|
|
1135
|
+
nameField?: string;
|
|
1136
|
+
/** Texto fixo exibido ao lado do icone */
|
|
1137
|
+
text?: string;
|
|
1138
|
+
/** Campo usado como texto exibido ao lado do icone */
|
|
1139
|
+
textField?: string;
|
|
1140
|
+
/** Cor do ícone (primary/accent/warn ou CSS color) */
|
|
1141
|
+
color?: string;
|
|
1142
|
+
/** Tamanho em px (opcional) */
|
|
1143
|
+
size?: number;
|
|
1144
|
+
/** Label acessível (fixo) */
|
|
1145
|
+
ariaLabel?: string;
|
|
1146
|
+
/** Prefixo visual aplicado ao texto do renderer sem alterar o valor bruto. */
|
|
1147
|
+
prefix?: string;
|
|
1148
|
+
/** Sufixo visual aplicado ao texto do renderer sem alterar o valor bruto. */
|
|
1149
|
+
suffix?: string;
|
|
1150
|
+
};
|
|
1151
|
+
/** Configuração de imagem */
|
|
1152
|
+
image?: {
|
|
1153
|
+
/** URL fixa da imagem */
|
|
1154
|
+
src?: string;
|
|
1155
|
+
/** Campo do row com a URL da imagem */
|
|
1156
|
+
srcField?: string;
|
|
1157
|
+
/** Texto alternativo fixo */
|
|
1158
|
+
alt?: string;
|
|
1159
|
+
/** Campo do row com ALT */
|
|
1160
|
+
altField?: string;
|
|
1161
|
+
/** Dimensões */
|
|
1162
|
+
width?: number;
|
|
1163
|
+
height?: number;
|
|
1164
|
+
/** Forma de recorte */
|
|
1165
|
+
shape?: 'square' | 'rounded' | 'circle';
|
|
1166
|
+
/** Ajuste do objeto */
|
|
1167
|
+
fit?: 'cover' | 'contain';
|
|
1168
|
+
/** Lazy loading */
|
|
1169
|
+
lazy?: boolean;
|
|
1170
|
+
};
|
|
1171
|
+
/** Configuração de badge */
|
|
1172
|
+
badge?: {
|
|
1173
|
+
/** Texto fixo */
|
|
1174
|
+
text?: string;
|
|
1175
|
+
/** Campo do row com texto */
|
|
1176
|
+
textField?: string;
|
|
1177
|
+
/** Cor do badge (primary/accent/warn ou CSS) */
|
|
1178
|
+
color?: string;
|
|
1179
|
+
/** Variante visual */
|
|
1180
|
+
variant?: 'filled' | 'outlined' | 'soft' | 'plain';
|
|
1181
|
+
/** Ícone opcional dentro do badge */
|
|
1182
|
+
icon?: string;
|
|
1183
|
+
/** Tooltip opcional associado ao indicador visual */
|
|
1184
|
+
tooltip?: TableTooltipConfig;
|
|
1185
|
+
};
|
|
1186
|
+
/** Link (sanitizado) */
|
|
1187
|
+
link?: {
|
|
1188
|
+
text?: string;
|
|
1189
|
+
textField?: string;
|
|
1190
|
+
href?: string;
|
|
1191
|
+
hrefField?: string;
|
|
1192
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
1193
|
+
rel?: string;
|
|
1194
|
+
};
|
|
1195
|
+
/** Botão (ação por linha) */
|
|
1196
|
+
button?: {
|
|
1197
|
+
label?: string;
|
|
1198
|
+
labelField?: string;
|
|
1199
|
+
icon?: string;
|
|
1200
|
+
color?: 'primary' | 'accent' | 'warn' | string;
|
|
1201
|
+
variant?: 'filled' | 'outlined' | 'text';
|
|
1202
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1203
|
+
ariaLabel?: string;
|
|
1204
|
+
disabledCondition?: JsonLogicExpression | null;
|
|
1205
|
+
action?: {
|
|
1206
|
+
id: string;
|
|
1207
|
+
payloadExpr?: string;
|
|
1208
|
+
};
|
|
1209
|
+
};
|
|
1210
|
+
/** Chip (etiqueta leve) */
|
|
1211
|
+
chip?: {
|
|
1212
|
+
text?: string;
|
|
1213
|
+
textField?: string;
|
|
1214
|
+
color?: string;
|
|
1215
|
+
icon?: string;
|
|
1216
|
+
variant?: 'filled' | 'outlined' | 'soft' | 'plain';
|
|
1217
|
+
/** Tooltip opcional associado ao chip */
|
|
1218
|
+
tooltip?: TableTooltipConfig;
|
|
1219
|
+
};
|
|
1220
|
+
/** Barra de progresso leve */
|
|
1221
|
+
progress?: {
|
|
1222
|
+
valueExpr: string;
|
|
1223
|
+
color?: string;
|
|
1224
|
+
showLabel?: boolean;
|
|
1225
|
+
};
|
|
1226
|
+
/** Avaliação por estrelas padronizada para leitura em tabelas. */
|
|
1227
|
+
rating?: {
|
|
1228
|
+
valueExpr?: string;
|
|
1229
|
+
max?: number;
|
|
1230
|
+
color?: string;
|
|
1231
|
+
outlineColor?: string;
|
|
1232
|
+
size?: 'small' | 'medium' | 'large';
|
|
1233
|
+
ariaLabel?: string;
|
|
1234
|
+
};
|
|
1235
|
+
microVisualization?: {
|
|
1236
|
+
visualization: PraxisPresentationVisualizationConfig;
|
|
1237
|
+
};
|
|
1238
|
+
/** Avatar (imagem ou iniciais) */
|
|
1239
|
+
avatar?: {
|
|
1240
|
+
src?: string;
|
|
1241
|
+
srcField?: string;
|
|
1242
|
+
alt?: string;
|
|
1243
|
+
altField?: string;
|
|
1244
|
+
initialsField?: string;
|
|
1245
|
+
initialsExpr?: string;
|
|
1246
|
+
shape?: 'square' | 'rounded' | 'circle';
|
|
1247
|
+
size?: number;
|
|
1248
|
+
backgroundColor?: string;
|
|
1249
|
+
textColor?: string;
|
|
1250
|
+
};
|
|
1251
|
+
/** Alternância (toggle) com ação */
|
|
1252
|
+
toggle?: {
|
|
1253
|
+
stateExpr: string;
|
|
1254
|
+
disabledCondition?: JsonLogicExpression | null;
|
|
1255
|
+
action?: {
|
|
1256
|
+
id: string;
|
|
1257
|
+
payloadExpr?: string;
|
|
1258
|
+
};
|
|
1259
|
+
ariaLabel?: string;
|
|
1260
|
+
};
|
|
1261
|
+
/** Menu de ações
|
|
1262
|
+
* itemsExpr → Array<{ label: string; icon?: string; id: string; payloadExpr?: string; visibleCondition?: JsonLogicExpression | null }> */
|
|
1263
|
+
menu?: {
|
|
1264
|
+
itemsExpr: string;
|
|
1265
|
+
ariaLabel?: string;
|
|
1266
|
+
};
|
|
1267
|
+
/** HTML (sanitizado) com tokens [[field]] */
|
|
1268
|
+
html?: {
|
|
1269
|
+
template: string;
|
|
1270
|
+
sanitize?: 'strict' | 'basic';
|
|
1271
|
+
emptyFallback?: string;
|
|
1272
|
+
};
|
|
1273
|
+
/** Compose (multi-itens) */
|
|
1274
|
+
compose?: {
|
|
1275
|
+
items: Array<{
|
|
1276
|
+
type: 'value';
|
|
1277
|
+
field?: string;
|
|
1278
|
+
textField?: string;
|
|
1279
|
+
valueField?: string;
|
|
1280
|
+
text?: string;
|
|
1281
|
+
emphasis?: 'strong' | 'subtle';
|
|
1282
|
+
} | {
|
|
1283
|
+
type: 'icon';
|
|
1284
|
+
icon?: {
|
|
1285
|
+
name?: string;
|
|
1286
|
+
nameField?: string;
|
|
1287
|
+
text?: string;
|
|
1288
|
+
textField?: string;
|
|
1289
|
+
color?: string;
|
|
1290
|
+
size?: number;
|
|
1291
|
+
ariaLabel?: string;
|
|
1292
|
+
prefix?: string;
|
|
1293
|
+
suffix?: string;
|
|
1294
|
+
};
|
|
1295
|
+
} | {
|
|
1296
|
+
type: 'image';
|
|
1297
|
+
image?: {
|
|
1298
|
+
src?: string;
|
|
1299
|
+
srcField?: string;
|
|
1300
|
+
alt?: string;
|
|
1301
|
+
altField?: string;
|
|
1302
|
+
width?: number;
|
|
1303
|
+
height?: number;
|
|
1304
|
+
shape?: 'square' | 'rounded' | 'circle';
|
|
1305
|
+
fit?: 'cover' | 'contain';
|
|
1306
|
+
lazy?: boolean;
|
|
1307
|
+
};
|
|
1308
|
+
} | {
|
|
1309
|
+
type: 'badge';
|
|
1310
|
+
badge?: {
|
|
1311
|
+
text?: string;
|
|
1312
|
+
textField?: string;
|
|
1313
|
+
color?: string;
|
|
1314
|
+
variant?: 'filled' | 'outlined' | 'soft' | 'plain';
|
|
1315
|
+
icon?: string;
|
|
1316
|
+
tooltip?: TableTooltipConfig;
|
|
1317
|
+
};
|
|
1318
|
+
} | {
|
|
1319
|
+
type: 'link';
|
|
1320
|
+
link?: {
|
|
1321
|
+
text?: string;
|
|
1322
|
+
textField?: string;
|
|
1323
|
+
href?: string;
|
|
1324
|
+
hrefField?: string;
|
|
1325
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
1326
|
+
rel?: string;
|
|
1327
|
+
};
|
|
1328
|
+
} | {
|
|
1329
|
+
type: 'button';
|
|
1330
|
+
button?: {
|
|
1331
|
+
label?: string;
|
|
1332
|
+
labelField?: string;
|
|
1333
|
+
icon?: string;
|
|
1334
|
+
color?: string;
|
|
1335
|
+
variant?: 'filled' | 'outlined' | 'text';
|
|
1336
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1337
|
+
disabledCondition?: JsonLogicExpression | null;
|
|
1338
|
+
action?: {
|
|
1339
|
+
id: string;
|
|
1340
|
+
payloadExpr?: string;
|
|
1341
|
+
};
|
|
1342
|
+
};
|
|
1343
|
+
} | {
|
|
1344
|
+
type: 'chip';
|
|
1345
|
+
chip?: {
|
|
1346
|
+
text?: string;
|
|
1347
|
+
textField?: string;
|
|
1348
|
+
color?: string;
|
|
1349
|
+
icon?: string;
|
|
1350
|
+
variant?: 'filled' | 'outlined' | 'soft' | 'plain';
|
|
1351
|
+
tooltip?: TableTooltipConfig;
|
|
1352
|
+
};
|
|
1353
|
+
} | {
|
|
1354
|
+
type: 'progress';
|
|
1355
|
+
progress?: {
|
|
1356
|
+
valueExpr: string;
|
|
1357
|
+
color?: string;
|
|
1358
|
+
showLabel?: boolean;
|
|
1359
|
+
};
|
|
1360
|
+
} | {
|
|
1361
|
+
type: 'avatar';
|
|
1362
|
+
avatar?: {
|
|
1363
|
+
src?: string;
|
|
1364
|
+
srcField?: string;
|
|
1365
|
+
alt?: string;
|
|
1366
|
+
altField?: string;
|
|
1367
|
+
initialsField?: string;
|
|
1368
|
+
initialsExpr?: string;
|
|
1369
|
+
shape?: 'square' | 'rounded' | 'circle';
|
|
1370
|
+
size?: number;
|
|
1371
|
+
backgroundColor?: string;
|
|
1372
|
+
textColor?: string;
|
|
1373
|
+
};
|
|
1374
|
+
} | {
|
|
1375
|
+
type: 'toggle';
|
|
1376
|
+
toggle?: {
|
|
1377
|
+
stateExpr: string;
|
|
1378
|
+
disabledCondition?: JsonLogicExpression | null;
|
|
1379
|
+
action?: {
|
|
1380
|
+
id: string;
|
|
1381
|
+
payloadExpr?: string;
|
|
1382
|
+
};
|
|
1383
|
+
};
|
|
1384
|
+
} | {
|
|
1385
|
+
type: 'menu';
|
|
1386
|
+
menu?: {
|
|
1387
|
+
itemsExpr: string;
|
|
1388
|
+
ariaLabel?: string;
|
|
1389
|
+
};
|
|
1390
|
+
} | {
|
|
1391
|
+
type: 'rating';
|
|
1392
|
+
rating?: {
|
|
1393
|
+
valueExpr?: string;
|
|
1394
|
+
max?: number;
|
|
1395
|
+
color?: string;
|
|
1396
|
+
outlineColor?: string;
|
|
1397
|
+
size?: 'small' | 'medium' | 'large';
|
|
1398
|
+
ariaLabel?: string;
|
|
1399
|
+
};
|
|
1400
|
+
} | {
|
|
1401
|
+
type: 'microVisualization';
|
|
1402
|
+
microVisualization?: {
|
|
1403
|
+
visualization: PraxisPresentationVisualizationConfig;
|
|
1404
|
+
};
|
|
1405
|
+
} | {
|
|
1406
|
+
type: 'html';
|
|
1407
|
+
html?: {
|
|
1408
|
+
template: string;
|
|
1409
|
+
sanitize?: 'strict' | 'basic';
|
|
1410
|
+
emptyFallback?: string;
|
|
1411
|
+
};
|
|
1412
|
+
}>;
|
|
1413
|
+
layout?: {
|
|
1414
|
+
direction?: 'row' | 'column';
|
|
1415
|
+
gap?: number;
|
|
1416
|
+
align?: 'start' | 'center' | 'end';
|
|
1417
|
+
wrap?: boolean;
|
|
1418
|
+
ellipsis?: boolean;
|
|
1419
|
+
};
|
|
1420
|
+
};
|
|
1421
|
+
};
|
|
1422
|
+
/** Overrides condicionais do renderer por linha (first‑match wins) */
|
|
1423
|
+
conditionalRenderers?: Array<{
|
|
1424
|
+
/** Identificador estável usado para reconciliação e deduplicação de regras authoradas. */
|
|
1425
|
+
id?: string;
|
|
1426
|
+
condition: JsonLogicExpression | null;
|
|
1427
|
+
/** Referencia semantica versionada; a classe CSS correspondente e privada do runtime. */
|
|
1428
|
+
surfacePresetRef?: {
|
|
1429
|
+
id: string;
|
|
1430
|
+
catalogVersion: string;
|
|
1431
|
+
};
|
|
1432
|
+
renderer?: Partial<ColumnDefinition['renderer']>;
|
|
1433
|
+
/** Tooltip condicional aplicado quando a regra vencer. */
|
|
1434
|
+
tooltip?: TableTooltipConfig;
|
|
1435
|
+
/** Efeitos visuais canonicos que podem produzir renderer, tooltip ou animacao. */
|
|
1436
|
+
effects?: Array<Record<string, unknown>>;
|
|
1437
|
+
description?: string;
|
|
1438
|
+
enabled?: boolean;
|
|
1439
|
+
}>;
|
|
1440
|
+
/**
|
|
1441
|
+
* Regras de estilo condicionais por coluna (experimental)
|
|
1442
|
+
* Cada regra contém uma expressão canônica em `condition` e o efeito visual a aplicar.
|
|
1443
|
+
*/
|
|
1444
|
+
conditionalStyles?: Array<{
|
|
1445
|
+
/** Identificador estável usado para reconciliação e deduplicação de regras authoradas. */
|
|
1446
|
+
id?: string;
|
|
1447
|
+
condition: JsonLogicExpression | null;
|
|
1448
|
+
/** Efeitos visuais canonicos produzidos pelo editor de regras da Table. */
|
|
1449
|
+
effects?: Array<Record<string, unknown>>;
|
|
1450
|
+
cssClass?: string;
|
|
1451
|
+
style?: {
|
|
1452
|
+
[key: string]: string;
|
|
1453
|
+
};
|
|
1454
|
+
tooltip?: Record<string, unknown>;
|
|
1455
|
+
description?: string;
|
|
1456
|
+
}>;
|
|
1457
|
+
/** Estado serializado do construtor visual de regras (round‑trip) */
|
|
1458
|
+
_styleRulesState?: any;
|
|
1459
|
+
/** Getter personalizado para valor calculado */
|
|
1460
|
+
_generatedValueGetter?: string;
|
|
1461
|
+
/** Tipo original da API */
|
|
1462
|
+
_originalApiType?: string;
|
|
1463
|
+
/** Flag indicando se veio da API */
|
|
1464
|
+
_isApiField?: boolean;
|
|
1465
|
+
}
|
|
1466
|
+
/**
|
|
1467
|
+
* Projeta as colunas publicadas pelo schema remoto e registra somente as
|
|
1468
|
+
* diferenças editoriais da experiência. A chave de cada override é o nome
|
|
1469
|
+
* canônico do campo; `field` permanece sob governança do schema.
|
|
1470
|
+
*/
|
|
1471
|
+
interface TableSchemaColumnProjectionConfig {
|
|
1472
|
+
source: 'schema';
|
|
1473
|
+
/** Allowlist ordenada. Quando omitida, usa todos os campos visíveis do schema. */
|
|
1474
|
+
include?: string[];
|
|
1475
|
+
/**
|
|
1476
|
+
* Prioridade de apresentação por nome canônico, independente da allowlist.
|
|
1477
|
+
* Campos elegíveis não listados seguem na ordem do schema, após os priorizados.
|
|
1478
|
+
* Quando omitida, a ordem vem de include ou do schema. Remover order herda essa ordem.
|
|
1479
|
+
*/
|
|
1480
|
+
order?: string[];
|
|
1481
|
+
overrides?: Record<string, Partial<Omit<ColumnDefinition, 'field'>>>;
|
|
1482
|
+
/**
|
|
1483
|
+
* Colunas editoriais sem correspondente no schema, como colunas computadas.
|
|
1484
|
+
* O runtime ignora uma adição cujo `field` colida com um campo canônico.
|
|
1485
|
+
*/
|
|
1486
|
+
additions?: ColumnDefinition[];
|
|
1487
|
+
}
|
|
1488
|
+
interface ConfigMetadata {
|
|
1489
|
+
/** Versão da configuração para migração automática */
|
|
1490
|
+
version?: string;
|
|
1491
|
+
/** Identificador único da configuração */
|
|
1492
|
+
id?: string;
|
|
1493
|
+
/** Nome amigável da configuração */
|
|
1494
|
+
name?: string;
|
|
1495
|
+
/** Descrição da configuração */
|
|
1496
|
+
description?: string;
|
|
1497
|
+
/** Tags para categorização e busca */
|
|
1498
|
+
tags?: string[];
|
|
1499
|
+
/** Data de criação */
|
|
1500
|
+
createdAt?: string;
|
|
1501
|
+
/** Data de última modificação */
|
|
1502
|
+
updatedAt?: string;
|
|
1503
|
+
/** Autor da configuração */
|
|
1504
|
+
author?: string;
|
|
1505
|
+
/** Ambiente de execução esperado para política de runtime (ex.: dev, hml, prod) */
|
|
1506
|
+
environment?: 'dev' | 'hml' | 'prod' | 'qa' | 'staging' | string;
|
|
1507
|
+
/** Se é um template ou configuração específica */
|
|
1508
|
+
isTemplate?: boolean;
|
|
1509
|
+
/** Configuração derivada de outra (parent ID) */
|
|
1510
|
+
derivedFrom?: string;
|
|
1511
|
+
/** Identidade estrutural do schema de origem (path|operation|schemaType|internal:<bool>|idField|readOnly|origin) */
|
|
1512
|
+
schemaId?: string;
|
|
1513
|
+
/** ETag/hash do schema do servidor usado para a última reconciliação */
|
|
1514
|
+
serverHash?: string;
|
|
1515
|
+
/** Campo identificador preferido pelo usuário para o recurso (ex.: 'id', 'codigo') */
|
|
1516
|
+
idField?: string;
|
|
1517
|
+
/** Contexto de schema associado (útil para auditoria/telemetria) */
|
|
1518
|
+
schemaContext?: {
|
|
1519
|
+
path: string;
|
|
1520
|
+
operation: string;
|
|
1521
|
+
schemaType: 'response' | 'request';
|
|
1522
|
+
internal?: boolean;
|
|
1523
|
+
tenant?: string;
|
|
1524
|
+
locale?: string;
|
|
1525
|
+
};
|
|
1526
|
+
}
|
|
1527
|
+
interface TableBehaviorConfig {
|
|
1528
|
+
/** Configurações de paginação */
|
|
1529
|
+
pagination?: PaginationConfig;
|
|
1530
|
+
/** Configurações de ordenação */
|
|
1531
|
+
sorting?: SortingConfig;
|
|
1532
|
+
/** Configurações de filtragem */
|
|
1533
|
+
filtering?: FilteringConfig;
|
|
1534
|
+
/** Configurações de agrupamento de linhas */
|
|
1535
|
+
grouping?: GroupingConfig;
|
|
1536
|
+
/** Configurações de seleção de linhas */
|
|
1537
|
+
selection?: SelectionConfig;
|
|
1538
|
+
/** Configurações de interação do usuário */
|
|
1539
|
+
interaction?: InteractionConfig;
|
|
1540
|
+
/** Configurações de carregamento e estados */
|
|
1541
|
+
loading?: LoadingConfig;
|
|
1542
|
+
/** Configurações para estado vazio */
|
|
1543
|
+
emptyState?: EmptyStateConfig;
|
|
1544
|
+
/** Configurações de virtualização para performance */
|
|
1545
|
+
virtualization?: VirtualizationConfig;
|
|
1546
|
+
/** Configurações de redimensionamento */
|
|
1547
|
+
resizing?: ResizingConfig;
|
|
1548
|
+
/** Configurações de reorganização por drag & drop */
|
|
1549
|
+
dragging?: DraggingConfig;
|
|
1550
|
+
/** Configurações do modo local via input `[data]` */
|
|
1551
|
+
localDataMode?: TableLocalDataModeConfig;
|
|
1552
|
+
/** Configurações de linhas expansíveis (detail rows) */
|
|
1553
|
+
expansion?: TableExpansionConfig;
|
|
1554
|
+
detail?: TableDetailConfig;
|
|
1555
|
+
/** Configurações de gaveta lateral / dossiê analítico (Issues #30 e #32) */
|
|
1556
|
+
drawer?: TableDrawerConfig;
|
|
1557
|
+
/** Configurações de faixa declarativa de KPIs / resumo executivo (Issue #33) */
|
|
1558
|
+
kpiBand?: PraxisKpiBandConfig;
|
|
1559
|
+
/** Configurações de campos computados / propriedades virtuais na ingestão (Issue #34) */
|
|
1560
|
+
computedFields?: PraxisComputedFieldsConfig;
|
|
1561
|
+
}
|
|
1562
|
+
interface TableLocalDataModeConfig {
|
|
1563
|
+
/** Habilita a trilha de modo local via input `[data]` */
|
|
1564
|
+
enabled?: boolean;
|
|
1565
|
+
}
|
|
1566
|
+
/** Shared detail document, independently presented by row or current selection. */
|
|
1567
|
+
interface TableDetailConfig {
|
|
1568
|
+
enabled?: boolean;
|
|
1569
|
+
presentation?: {
|
|
1570
|
+
placement?: 'row' | 'bottom';
|
|
1571
|
+
initiallyCollapsed?: boolean;
|
|
1572
|
+
/** Position of the contextual panel relative to collection-owned footer controls. */
|
|
1573
|
+
bottomStackPosition?: 'beforeControls' | 'afterControls';
|
|
1574
|
+
/** Whether the bottom panel keeps an instructional state when no record is selected. */
|
|
1575
|
+
emptyBehavior?: 'message' | 'hide';
|
|
1576
|
+
};
|
|
1577
|
+
schemaContract?: {
|
|
1578
|
+
kind?: 'praxis.detail.schema';
|
|
1579
|
+
version?: string;
|
|
1580
|
+
compat?: 'semver' | 'strict';
|
|
1581
|
+
allowedNodes?: TableDetailAllowedNode[];
|
|
1582
|
+
sanitization?: 'strict';
|
|
1583
|
+
};
|
|
1584
|
+
source?: {
|
|
1585
|
+
mode?: 'inline' | 'resource' | 'resourcePath' | 'hypermedia' | 'schema';
|
|
1586
|
+
inlineSchema?: TableDetailSchemaNode | TableDetailInlineSchemaDocument | RichContentDocument;
|
|
1587
|
+
resource?: {
|
|
1588
|
+
kind?: 'ui-composition' | 'form-schema' | 'table-schema' | 'dashboard-schema';
|
|
1589
|
+
id?: string;
|
|
1590
|
+
version?: string;
|
|
1591
|
+
};
|
|
1592
|
+
resourcePath?: {
|
|
1593
|
+
path?: string;
|
|
1594
|
+
paramsMap?: Record<string, string>;
|
|
1595
|
+
method?: 'GET' | 'POST';
|
|
1596
|
+
};
|
|
1597
|
+
contextMap?: Record<string, string>;
|
|
1598
|
+
resourceAllowList?: string[];
|
|
1599
|
+
fallbackMode?: 'none' | 'inline' | 'resource';
|
|
1600
|
+
};
|
|
1601
|
+
rendering?: {
|
|
1602
|
+
strategy?: 'registry';
|
|
1603
|
+
registryId?: string;
|
|
1604
|
+
hostLayout?: 'auto' | 'stack' | 'tabs';
|
|
1605
|
+
fallbackNodePolicy?: 'failClosed' | 'renderPlaceholder';
|
|
1606
|
+
};
|
|
1607
|
+
height?: {
|
|
1608
|
+
mode?: 'fixed' | 'dynamic';
|
|
1609
|
+
px?: number;
|
|
1610
|
+
};
|
|
1611
|
+
lazyLoad?: {
|
|
1612
|
+
/** @deprecated Reserved compatibility field; source.mode controls whether detail resolution is remote. */
|
|
1613
|
+
enabled?: boolean;
|
|
1614
|
+
/** @deprecated Reserved compatibility field; detail sources resolve through their declared provider/transport. */
|
|
1615
|
+
actionId?: string;
|
|
1616
|
+
cache?: {
|
|
1617
|
+
enabled?: boolean;
|
|
1618
|
+
/** @deprecated TTL is preserved during round-trip but is not enforced by the current runtime. */
|
|
1619
|
+
ttlMs?: number;
|
|
1620
|
+
};
|
|
1621
|
+
/** @deprecated Retry settings are preserved during round-trip but are not executed by the current runtime. */
|
|
1622
|
+
retry?: {
|
|
1623
|
+
maxAttempts?: number;
|
|
1624
|
+
};
|
|
1625
|
+
cancelOnCollapse?: boolean;
|
|
1626
|
+
/** @deprecated Requests are always deduplicated by the current row state; this override is not executed. */
|
|
1627
|
+
dedupeByRowKey?: boolean;
|
|
1628
|
+
};
|
|
1629
|
+
}
|
|
1630
|
+
interface TableExpansionConfig {
|
|
1631
|
+
/** Habilita o recurso de expansão de linhas */
|
|
1632
|
+
enabled?: boolean;
|
|
1633
|
+
/** Origem de resolução do detalhe: 'schema' para auto-derivação por Bento Grid, ou modo customizado */
|
|
1634
|
+
source?: 'schema' | 'custom' | string;
|
|
1635
|
+
/** Modo de resolução do detalhe */
|
|
1636
|
+
mode?: 'schema' | 'inline' | 'resource' | 'resourcePath' | 'hypermedia';
|
|
1637
|
+
/** Versão local do contrato de expansão */
|
|
1638
|
+
contractVersion?: '1.0.0' | string;
|
|
1639
|
+
/** Identidade e rastreabilidade de linha expandível */
|
|
1640
|
+
identity?: {
|
|
1641
|
+
rowKeySource?: 'table.idField';
|
|
1642
|
+
requireStableIdField?: boolean;
|
|
1643
|
+
};
|
|
1644
|
+
/** Governança de estado (controlado vs não-controlado) */
|
|
1645
|
+
state?: {
|
|
1646
|
+
mode?: 'controlled' | 'uncontrolled';
|
|
1647
|
+
expandedRowKeys?: string[];
|
|
1648
|
+
emitChanges?: boolean;
|
|
1649
|
+
sourceOfTruth?: 'input' | 'runtime';
|
|
1650
|
+
onSetExpandedKeys?: 'emitOnly' | 'mutateInternal';
|
|
1651
|
+
};
|
|
1652
|
+
/** Regras de interação para abrir/fechar detalhes */
|
|
1653
|
+
interaction?: {
|
|
1654
|
+
trigger?: 'icon' | 'row' | 'both';
|
|
1655
|
+
toggleOnRowClick?: boolean;
|
|
1656
|
+
keyboard?: {
|
|
1657
|
+
profile?: 'disclosure' | 'grid';
|
|
1658
|
+
enterSpace?: boolean;
|
|
1659
|
+
arrowLeftRight?: boolean;
|
|
1660
|
+
};
|
|
1661
|
+
};
|
|
1662
|
+
/** Limites de expansão simultânea */
|
|
1663
|
+
limits?: {
|
|
1664
|
+
allowMultiple?: boolean;
|
|
1665
|
+
maxExpandedRows?: number;
|
|
1666
|
+
onOverflow?: 'collapseOldest' | 'denyNew' | 'collapseAll';
|
|
1667
|
+
};
|
|
1668
|
+
/** Eventos estruturais que colapsam os detalhes */
|
|
1669
|
+
collapseOn?: {
|
|
1670
|
+
sortChange?: boolean;
|
|
1671
|
+
pageChange?: boolean;
|
|
1672
|
+
filterChange?: boolean;
|
|
1673
|
+
dataRefresh?: boolean;
|
|
1674
|
+
};
|
|
1675
|
+
/** Condição para permitir expansão por linha */
|
|
1676
|
+
rowExpandableWhen?: {
|
|
1677
|
+
expr?: JsonLogicExpression | null;
|
|
1678
|
+
onError?: 'deny' | 'allow';
|
|
1679
|
+
context?: Array<'row' | 'computed' | 'user' | 'env'>;
|
|
1680
|
+
};
|
|
1681
|
+
/** Política extra para coexistência com virtualização */
|
|
1682
|
+
virtualization?: {
|
|
1683
|
+
policy?: 'fixed-height-only' | 'allow-dynamic-under-flag';
|
|
1684
|
+
};
|
|
1685
|
+
/** Persistência de estado expandido */
|
|
1686
|
+
persistence?: {
|
|
1687
|
+
enabled?: boolean;
|
|
1688
|
+
storageKey?: string;
|
|
1689
|
+
storageKeyStrategy?: {
|
|
1690
|
+
namespace?: string;
|
|
1691
|
+
version?: string;
|
|
1692
|
+
hashScope?: boolean;
|
|
1693
|
+
};
|
|
1694
|
+
scope?: Array<'tableId' | 'componentInstance' | 'user' | 'tenant'>;
|
|
1695
|
+
clearOn?: Array<'resetPreferences' | 'logout' | 'tenantChange'>;
|
|
1696
|
+
};
|
|
1697
|
+
/** Segurança de payload/evento */
|
|
1698
|
+
security?: {
|
|
1699
|
+
eventExposureDefault?: {
|
|
1700
|
+
rowId?: 'redacted' | 'hashed' | 'raw';
|
|
1701
|
+
expandedKeys?: 'none' | 'hashed' | 'raw';
|
|
1702
|
+
};
|
|
1703
|
+
allowRawExposure?: boolean;
|
|
1704
|
+
};
|
|
1705
|
+
/** Deep-link de expansão (P1+) */
|
|
1706
|
+
deepLink?: {
|
|
1707
|
+
enabled?: boolean;
|
|
1708
|
+
queryParam?: string;
|
|
1709
|
+
encoding?: 'csv';
|
|
1710
|
+
keyFormat?: string;
|
|
1711
|
+
maxKeys?: number;
|
|
1712
|
+
maxLength?: number;
|
|
1713
|
+
parsing?: {
|
|
1714
|
+
duplicateParams?: 'firstWins' | 'reject';
|
|
1715
|
+
decodePasses?: 1;
|
|
1716
|
+
trimWhitespace?: boolean;
|
|
1717
|
+
sortKeysBeforeApply?: boolean;
|
|
1718
|
+
};
|
|
1719
|
+
integrity?: {
|
|
1720
|
+
mode?: 'opaqueToken';
|
|
1721
|
+
exchange?: {
|
|
1722
|
+
endpointId?: string;
|
|
1723
|
+
ttlMs?: number;
|
|
1724
|
+
errors?: Array<'expired' | 'invalid' | 'rate_limited'>;
|
|
1725
|
+
};
|
|
1726
|
+
};
|
|
1727
|
+
privacy?: {
|
|
1728
|
+
mode?: 'denyByDefault' | 'allowByDefault';
|
|
1729
|
+
allowListTables?: string[];
|
|
1730
|
+
};
|
|
1731
|
+
};
|
|
1732
|
+
}
|
|
1733
|
+
interface PaginationConfig {
|
|
1734
|
+
/** Habilitar paginação */
|
|
1735
|
+
enabled: boolean;
|
|
1736
|
+
/** Tamanho inicial da página */
|
|
1737
|
+
pageSize: number;
|
|
1738
|
+
/** Opções de tamanho de página disponíveis */
|
|
1739
|
+
pageSizeOptions: number[];
|
|
1740
|
+
/** Mostrar botões primeira/última página */
|
|
1741
|
+
showFirstLastButtons: boolean;
|
|
1742
|
+
/** Mostrar números das páginas */
|
|
1743
|
+
showPageNumbers: boolean;
|
|
1744
|
+
/** Mostrar info de página (ex: "1-10 de 100") */
|
|
1745
|
+
showPageInfo: boolean;
|
|
1746
|
+
/** Posição da paginação */
|
|
1747
|
+
position: 'top' | 'bottom' | 'both';
|
|
1748
|
+
/** Estilo da paginação */
|
|
1749
|
+
style: 'default' | 'simple' | 'advanced' | 'compact';
|
|
1750
|
+
/** Total de itens (para paginação server-side) */
|
|
1751
|
+
totalItems?: number;
|
|
1752
|
+
/** Estratégia de paginação */
|
|
1753
|
+
strategy: 'client' | 'server';
|
|
1754
|
+
/** Configurações avançadas */
|
|
1755
|
+
advanced?: {
|
|
1756
|
+
/** Jump to page input */
|
|
1757
|
+
showJumpToPage?: boolean;
|
|
1758
|
+
/** Page size customization */
|
|
1759
|
+
allowCustomPageSize?: boolean;
|
|
1760
|
+
/** Maximum page size allowed */
|
|
1761
|
+
maxPageSize?: number;
|
|
1762
|
+
};
|
|
1763
|
+
}
|
|
1764
|
+
interface SortingConfig {
|
|
1765
|
+
/** Habilitar ordenação */
|
|
1766
|
+
enabled: boolean;
|
|
1767
|
+
/** Ordenação padrão inicial (suporta múltiplas entradas) */
|
|
1768
|
+
defaultSort?: {
|
|
1769
|
+
column: string;
|
|
1770
|
+
direction: 'asc' | 'desc';
|
|
1771
|
+
} | Array<{
|
|
1772
|
+
column: string;
|
|
1773
|
+
direction: 'asc' | 'desc';
|
|
1774
|
+
}>;
|
|
1775
|
+
/** Permitir ordenação múltipla */
|
|
1776
|
+
multiSort: boolean;
|
|
1777
|
+
/** Estratégia de ordenação */
|
|
1778
|
+
strategy: 'client' | 'server';
|
|
1779
|
+
/** Mostrar indicadores visuais de ordenação */
|
|
1780
|
+
showSortIndicators: boolean;
|
|
1781
|
+
/** Posição dos indicadores */
|
|
1782
|
+
indicatorPosition: 'start' | 'end';
|
|
1783
|
+
/** Permitir remover ordenação (terceiro clique) */
|
|
1784
|
+
allowClearSort: boolean;
|
|
1785
|
+
/** Configurações avançadas */
|
|
1786
|
+
advanced?: {
|
|
1787
|
+
/** Função de comparação customizada para ordenação client-side */
|
|
1788
|
+
customComparators?: {
|
|
1789
|
+
[column: string]: (a: any, b: any) => number;
|
|
1790
|
+
};
|
|
1791
|
+
/** Preservar ordenação entre atualizações de dados */
|
|
1792
|
+
preserveSort?: boolean;
|
|
1793
|
+
};
|
|
1794
|
+
}
|
|
1795
|
+
interface GroupingConfig {
|
|
1796
|
+
/** Habilitar agrupamento */
|
|
1797
|
+
enabled: boolean;
|
|
1798
|
+
/** Campos usados para agrupamento */
|
|
1799
|
+
fields: string[];
|
|
1800
|
+
/** Se os grupos iniciam expandidos */
|
|
1801
|
+
expanded?: boolean;
|
|
1802
|
+
}
|
|
1803
|
+
/** Presentation of a filter region; never part of the backend filter DTO. */
|
|
1804
|
+
interface FilterPresentationConfig {
|
|
1805
|
+
header?: {
|
|
1806
|
+
visible?: boolean;
|
|
1807
|
+
text?: string;
|
|
1808
|
+
/** Empty string hides the icon. */
|
|
1809
|
+
icon?: string;
|
|
1810
|
+
position?: 'above' | 'inline';
|
|
1811
|
+
size?: 'small' | 'medium' | 'large';
|
|
1812
|
+
};
|
|
1813
|
+
advancedAction?: {
|
|
1814
|
+
display?: 'icon' | 'text' | 'icon-text';
|
|
1815
|
+
/** Overrides i18n.advanced; omitted uses the localized label. */
|
|
1816
|
+
text?: string;
|
|
1817
|
+
/** Empty string hides the icon. */
|
|
1818
|
+
icon?: string;
|
|
1819
|
+
size?: 'compact' | 'standard';
|
|
1820
|
+
/** Position within the auxiliary controls, not within the page. */
|
|
1821
|
+
position?: 'start' | 'end';
|
|
1822
|
+
};
|
|
1823
|
+
tokens?: {
|
|
1824
|
+
gap?: string;
|
|
1825
|
+
headerGap?: string;
|
|
1826
|
+
headerColor?: string;
|
|
1827
|
+
headerFontSize?: string;
|
|
1828
|
+
headerFontWeight?: string;
|
|
1829
|
+
iconSize?: string;
|
|
1830
|
+
actionGap?: string;
|
|
1831
|
+
actionFontSize?: string;
|
|
1832
|
+
actionFontWeight?: string;
|
|
1833
|
+
};
|
|
1834
|
+
}
|
|
1835
|
+
interface FilteringConfig {
|
|
1836
|
+
/** Habilitar filtragem */
|
|
1837
|
+
enabled: boolean;
|
|
1838
|
+
/** Filtros por coluna */
|
|
1839
|
+
columnFilters?: {
|
|
1840
|
+
enabled: boolean;
|
|
1841
|
+
/** Tipo de filtro padrão */
|
|
1842
|
+
defaultType: 'text' | 'select' | 'date' | 'number' | 'boolean';
|
|
1843
|
+
/** Posição dos filtros */
|
|
1844
|
+
position: 'header' | 'subheader' | 'sidebar';
|
|
1845
|
+
};
|
|
1846
|
+
/** Filtros avançados */
|
|
1847
|
+
advancedFilters?: {
|
|
1848
|
+
enabled: boolean;
|
|
1849
|
+
/** Interface de query builder */
|
|
1850
|
+
queryBuilder?: boolean;
|
|
1851
|
+
/** Salvar filtros como presets */
|
|
1852
|
+
savePresets?: boolean;
|
|
1853
|
+
/** Configurações específicas do componente praxis-filter */
|
|
1854
|
+
settings?: {
|
|
1855
|
+
presentation?: FilterPresentationConfig;
|
|
1856
|
+
/** Campos sempre visíveis */
|
|
1857
|
+
alwaysVisibleFields?: string[];
|
|
1858
|
+
/** Overrides de metadata por campo sempre visível (merge sobre o DTO de filtro) */
|
|
1859
|
+
alwaysVisibleFieldMetadataOverrides?: Record<string, Record<string, any>>;
|
|
1860
|
+
/** Campos extras selecionados pelo usuário */
|
|
1861
|
+
selectedFieldIds?: string[];
|
|
1862
|
+
/** Exibir opções avançadas por padrão */
|
|
1863
|
+
showAdvanced?: boolean;
|
|
1864
|
+
/** Permitir salvar tags/atalhos de filtro */
|
|
1865
|
+
allowSaveTags?: boolean;
|
|
1866
|
+
/** Atalhos governados, somente leitura, aplicados como patch do DTO de filtro */
|
|
1867
|
+
tags?: Array<{
|
|
1868
|
+
id: string;
|
|
1869
|
+
label: string;
|
|
1870
|
+
patch: Record<string, any>;
|
|
1871
|
+
}>;
|
|
1872
|
+
/** Debounce de alterações para auto-aplicar filtros (ms) */
|
|
1873
|
+
changeDebounceMs?: number;
|
|
1874
|
+
/** Modo de exibição do componente de filtro (modo único) */
|
|
1875
|
+
mode?: 'filter';
|
|
1876
|
+
/** UX: move booleans para ações */
|
|
1877
|
+
placeBooleansInActions?: boolean;
|
|
1878
|
+
/** UX: mostrar labels dos toggles */
|
|
1879
|
+
showToggleLabels?: boolean;
|
|
1880
|
+
/** Largura mínima para campos sempre visíveis */
|
|
1881
|
+
alwaysMinWidth?: number;
|
|
1882
|
+
/** Colunas md para campos sempre visíveis */
|
|
1883
|
+
alwaysColsMd?: number;
|
|
1884
|
+
/** Colunas lg para campos sempre visíveis */
|
|
1885
|
+
alwaysColsLg?: number;
|
|
1886
|
+
/** Confirma remoção de tags */
|
|
1887
|
+
confirmTagDelete?: boolean;
|
|
1888
|
+
/** Tema das tags */
|
|
1889
|
+
tagColor?: 'primary' | 'accent' | 'warn' | 'basic';
|
|
1890
|
+
/** Variante das tags */
|
|
1891
|
+
tagVariant?: 'filled' | 'outlined';
|
|
1892
|
+
/** Cor do botão das tags */
|
|
1893
|
+
tagButtonColor?: 'primary' | 'accent' | 'warn' | 'basic';
|
|
1894
|
+
/** Cor dos botões de ação */
|
|
1895
|
+
actionsButtonColor?: 'primary' | 'accent' | 'warn' | 'basic';
|
|
1896
|
+
/** Variante dos botões de ação */
|
|
1897
|
+
actionsVariant?: 'standard' | 'outlined';
|
|
1898
|
+
/** Aparência do overlay */
|
|
1899
|
+
overlayVariant?: 'card' | 'frosted';
|
|
1900
|
+
/** Backdrop do overlay */
|
|
1901
|
+
overlayBackdrop?: boolean;
|
|
1902
|
+
/** Modo de abertura do painel avançado */
|
|
1903
|
+
advancedOpenMode?: 'overlay' | 'modal' | 'drawer';
|
|
1904
|
+
/** Botão de limpar nos campos do formulário avançado */
|
|
1905
|
+
advancedClearButtonsEnabled?: boolean;
|
|
1906
|
+
/** Nível de log */
|
|
1907
|
+
logLevel?: 'none' | 'error' | 'warn' | 'info' | 'debug';
|
|
1908
|
+
/** Métricas de performance */
|
|
1909
|
+
enablePerformanceMetrics?: boolean;
|
|
1910
|
+
};
|
|
1911
|
+
};
|
|
1912
|
+
/** Estratégia de filtragem */
|
|
1913
|
+
strategy: 'client' | 'server';
|
|
1914
|
+
/** Debounce para filtros em tempo real (ms) */
|
|
1915
|
+
debounceTime: number;
|
|
1916
|
+
}
|
|
1917
|
+
interface SelectionConfig {
|
|
1918
|
+
/** Habilitar seleção de linhas */
|
|
1919
|
+
enabled: boolean;
|
|
1920
|
+
/** Tipo de seleção */
|
|
1921
|
+
type: 'single' | 'multiple';
|
|
1922
|
+
/** Modo de seleção */
|
|
1923
|
+
mode: 'checkbox' | 'row' | 'both';
|
|
1924
|
+
/** Permitir selecionar todas as linhas */
|
|
1925
|
+
allowSelectAll: boolean;
|
|
1926
|
+
/** Posição do checkbox de seleção */
|
|
1927
|
+
checkboxPosition: 'start' | 'end';
|
|
1928
|
+
/** Manter seleção entre páginas */
|
|
1929
|
+
persistSelection: boolean;
|
|
1930
|
+
/** Manter seleção entre atualizações de dados */
|
|
1931
|
+
persistOnDataUpdate: boolean;
|
|
1932
|
+
/** Máximo de itens selecionáveis */
|
|
1933
|
+
maxSelections?: number;
|
|
1934
|
+
/** Configurações visuais */
|
|
1935
|
+
visual?: {
|
|
1936
|
+
/** Highlight da linha selecionada */
|
|
1937
|
+
highlightSelected: boolean;
|
|
1938
|
+
/** Cor do highlight */
|
|
1939
|
+
highlightColor?: string;
|
|
1940
|
+
/** Mostrar contador de selecionados */
|
|
1941
|
+
showSelectionCount: boolean;
|
|
1942
|
+
};
|
|
1943
|
+
}
|
|
1944
|
+
interface InteractionConfig {
|
|
1945
|
+
/** Ação ao clicar na linha */
|
|
1946
|
+
rowClick?: {
|
|
1947
|
+
enabled: boolean;
|
|
1948
|
+
action: 'select' | 'edit' | 'view' | 'custom';
|
|
1949
|
+
/** Função customizada para row click */
|
|
1950
|
+
customAction?: string;
|
|
1951
|
+
};
|
|
1952
|
+
/** Ação ao dar duplo clique na linha */
|
|
1953
|
+
rowDoubleClick?: {
|
|
1954
|
+
enabled: boolean;
|
|
1955
|
+
action: 'edit' | 'view' | 'custom';
|
|
1956
|
+
customAction?: string;
|
|
1957
|
+
};
|
|
1958
|
+
/** Hover effects */
|
|
1959
|
+
hover?: {
|
|
1960
|
+
enabled: boolean;
|
|
1961
|
+
/** Highlight na linha */
|
|
1962
|
+
highlightRow: boolean;
|
|
1963
|
+
/** Mostrar ações no hover */
|
|
1964
|
+
showActionsOnHover: boolean;
|
|
1965
|
+
};
|
|
1966
|
+
/** Configurações de teclado */
|
|
1967
|
+
keyboard?: {
|
|
1968
|
+
enabled: boolean;
|
|
1969
|
+
/** Navegação com setas */
|
|
1970
|
+
arrowNavigation: boolean;
|
|
1971
|
+
/** Seleção com espaço */
|
|
1972
|
+
spaceSelection: boolean;
|
|
1973
|
+
/** Atalhos personalizados */
|
|
1974
|
+
customShortcuts?: {
|
|
1975
|
+
[key: string]: string;
|
|
1976
|
+
};
|
|
1977
|
+
};
|
|
1978
|
+
}
|
|
1979
|
+
interface LoadingConfig {
|
|
1980
|
+
/** Tipo de loading indicator */
|
|
1981
|
+
type: 'spinner' | 'skeleton' | 'progress';
|
|
1982
|
+
/** Posição do loading */
|
|
1983
|
+
position: 'overlay' | 'inline' | 'replace';
|
|
1984
|
+
/** Texto durante carregamento */
|
|
1985
|
+
text?: string;
|
|
1986
|
+
/** Mostrar loading para operações rápidas */
|
|
1987
|
+
showForQuickOperations: boolean;
|
|
1988
|
+
/** Delay antes de mostrar loading (ms) */
|
|
1989
|
+
delay: number;
|
|
1990
|
+
/**
|
|
1991
|
+
* Limite para requests remotos de schema e dados. Use `0` somente quando o
|
|
1992
|
+
* host possuir outra política de timeout governada.
|
|
1993
|
+
*/
|
|
1994
|
+
requestTimeoutMs?: number;
|
|
1995
|
+
/** Permite ao usuário cancelar requests remotos de schema e dados em andamento. */
|
|
1996
|
+
allowCancel?: boolean;
|
|
1997
|
+
/** Configurações de skeleton loading */
|
|
1998
|
+
skeleton?: {
|
|
1999
|
+
rows: number;
|
|
2000
|
+
/** Animar skeleton */
|
|
2001
|
+
animated: boolean;
|
|
2002
|
+
/** Cor base do skeleton */
|
|
2003
|
+
baseColor?: string;
|
|
2004
|
+
/** Cor do highlight */
|
|
2005
|
+
highlightColor?: string;
|
|
2006
|
+
};
|
|
2007
|
+
}
|
|
2008
|
+
interface EmptyStateConfig {
|
|
2009
|
+
/** Mensagem para estado vazio */
|
|
2010
|
+
title?: string;
|
|
2011
|
+
message: string;
|
|
2012
|
+
description?: string;
|
|
2013
|
+
/** Ícone para estado vazio */
|
|
2014
|
+
icon?: string;
|
|
2015
|
+
tone?: 'neutral' | 'primary' | 'secondary';
|
|
2016
|
+
variant?: 'card' | 'inline' | 'panel' | 'transparent';
|
|
2017
|
+
alignment?: 'start' | 'center';
|
|
2018
|
+
density?: 'compact' | 'comfortable';
|
|
2019
|
+
iconContainer?: 'none' | 'circle' | 'soft';
|
|
2020
|
+
/** Imagem para estado vazio */
|
|
2021
|
+
image?: string;
|
|
2022
|
+
/** Ações disponíveis no estado vazio */
|
|
2023
|
+
actions?: Array<{
|
|
2024
|
+
label: string;
|
|
2025
|
+
action: string;
|
|
2026
|
+
icon?: string;
|
|
2027
|
+
primary?: boolean;
|
|
2028
|
+
}>;
|
|
2029
|
+
/** Template customizado */
|
|
2030
|
+
customTemplate?: string;
|
|
2031
|
+
/** Configurações específicas por contexto */
|
|
2032
|
+
contexts?: {
|
|
2033
|
+
/** Estado inicial (sem dados carregados) */
|
|
2034
|
+
initial?: Partial<EmptyStateConfig>;
|
|
2035
|
+
/** Após filtros aplicados */
|
|
2036
|
+
filtered?: Partial<EmptyStateConfig>;
|
|
2037
|
+
/** Após busca sem resultados */
|
|
2038
|
+
searched?: Partial<EmptyStateConfig>;
|
|
2039
|
+
};
|
|
2040
|
+
}
|
|
2041
|
+
interface VirtualizationConfig {
|
|
2042
|
+
/** Habilitar virtualização */
|
|
2043
|
+
enabled?: boolean;
|
|
2044
|
+
/** Altura de cada linha (px) */
|
|
2045
|
+
itemHeight?: number;
|
|
2046
|
+
/** Número de itens para buffer */
|
|
2047
|
+
bufferSize?: number;
|
|
2048
|
+
/** Altura mínima do container (px ou CSS) */
|
|
2049
|
+
minContainerHeight?: number | string;
|
|
2050
|
+
/** Estratégia de virtualização */
|
|
2051
|
+
strategy?: 'fixed' | 'dynamic';
|
|
2052
|
+
}
|
|
2053
|
+
interface ResizingConfig {
|
|
2054
|
+
/** Habilitar redimensionamento de colunas */
|
|
2055
|
+
enabled: boolean;
|
|
2056
|
+
/** Largura mínima das colunas */
|
|
2057
|
+
minColumnWidth: number;
|
|
2058
|
+
/** Largura máxima das colunas */
|
|
2059
|
+
maxColumnWidth?: number;
|
|
2060
|
+
/** Auto-fit ao conteúdo */
|
|
2061
|
+
autoFit: boolean;
|
|
2062
|
+
/** Preservar larguras entre sessões */
|
|
2063
|
+
persistWidths: boolean;
|
|
2064
|
+
}
|
|
2065
|
+
interface DraggingConfig {
|
|
2066
|
+
/** Habilitar reorganização de colunas */
|
|
2067
|
+
columns: boolean;
|
|
2068
|
+
/** Habilitar reorganização de linhas */
|
|
2069
|
+
rows: boolean;
|
|
2070
|
+
/** Indicador visual durante drag */
|
|
2071
|
+
showDragIndicator: boolean;
|
|
2072
|
+
/** Zona de drop para colunas */
|
|
2073
|
+
columnDropZones?: string[];
|
|
2074
|
+
}
|
|
2075
|
+
interface TableAppearanceConfig {
|
|
2076
|
+
/** Densidade da tabela */
|
|
2077
|
+
density: 'compact' | 'comfortable' | 'spacious';
|
|
2078
|
+
/** Configurações de bordas */
|
|
2079
|
+
borders?: BorderConfig;
|
|
2080
|
+
/** Configurações de cores */
|
|
2081
|
+
colors?: ColorConfig;
|
|
2082
|
+
/** Configurações de fonte */
|
|
2083
|
+
typography?: TypographyConfig;
|
|
2084
|
+
/** Configurações de espaçamento */
|
|
2085
|
+
spacing?: SpacingConfig;
|
|
2086
|
+
/** Configurações de animações */
|
|
2087
|
+
animations?: AnimationConfig;
|
|
2088
|
+
/** Configurações de responsividade */
|
|
2089
|
+
responsive?: ResponsiveConfig;
|
|
2090
|
+
/** Configurações de elevação/sombra */
|
|
2091
|
+
elevation?: ElevationConfig;
|
|
2092
|
+
}
|
|
2093
|
+
interface BorderConfig {
|
|
2094
|
+
/** Mostrar bordas entre linhas */
|
|
2095
|
+
showRowBorders: boolean;
|
|
2096
|
+
/** Mostrar bordas entre colunas */
|
|
2097
|
+
showColumnBorders: boolean;
|
|
2098
|
+
/** Mostrar borda externa */
|
|
2099
|
+
showOuterBorder: boolean;
|
|
2100
|
+
/** Estilo da borda */
|
|
2101
|
+
style: 'solid' | 'dashed' | 'dotted';
|
|
2102
|
+
/** Largura da borda */
|
|
2103
|
+
width: number;
|
|
2104
|
+
/** Cor da borda */
|
|
2105
|
+
color?: string;
|
|
2106
|
+
/** Bordas específicas */
|
|
2107
|
+
specific?: {
|
|
2108
|
+
header?: Partial<BorderConfig>;
|
|
2109
|
+
footer?: Partial<BorderConfig>;
|
|
2110
|
+
sticky?: Partial<BorderConfig>;
|
|
2111
|
+
};
|
|
2112
|
+
}
|
|
2113
|
+
interface ColorConfig {
|
|
2114
|
+
/** Cor de fundo da tabela */
|
|
2115
|
+
background?: string;
|
|
2116
|
+
/** Cor de fundo do cabeçalho */
|
|
2117
|
+
headerBackground?: string;
|
|
2118
|
+
/** Cor de fundo de linhas alternadas */
|
|
2119
|
+
alternateRowBackground?: string;
|
|
2120
|
+
/** Cor de fundo no hover */
|
|
2121
|
+
hoverBackground?: string;
|
|
2122
|
+
/** Cor de fundo para linhas selecionadas */
|
|
2123
|
+
selectedBackground?: string;
|
|
2124
|
+
/** Cor do texto */
|
|
2125
|
+
textColor?: string;
|
|
2126
|
+
/** Cor do texto do cabeçalho */
|
|
2127
|
+
headerTextColor?: string;
|
|
2128
|
+
/** Paleta de cores para estados */
|
|
2129
|
+
states?: {
|
|
2130
|
+
error?: string;
|
|
2131
|
+
warning?: string;
|
|
2132
|
+
success?: string;
|
|
2133
|
+
info?: string;
|
|
2134
|
+
};
|
|
2135
|
+
}
|
|
2136
|
+
interface TypographyConfig {
|
|
2137
|
+
/** Família da fonte */
|
|
2138
|
+
fontFamily?: string;
|
|
2139
|
+
/** Tamanho da fonte do conteúdo */
|
|
2140
|
+
fontSize?: string;
|
|
2141
|
+
/** Tamanho da fonte do cabeçalho */
|
|
2142
|
+
headerFontSize?: string;
|
|
2143
|
+
/** Peso da fonte */
|
|
2144
|
+
fontWeight?: number | string;
|
|
2145
|
+
/** Peso da fonte do cabeçalho */
|
|
2146
|
+
headerFontWeight?: number | string;
|
|
2147
|
+
/** Altura da linha */
|
|
2148
|
+
lineHeight?: string;
|
|
2149
|
+
/** Espaçamento entre letras */
|
|
2150
|
+
letterSpacing?: string;
|
|
2151
|
+
/** Transformação do texto do cabeçalho */
|
|
2152
|
+
headerCase?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';
|
|
2153
|
+
}
|
|
2154
|
+
interface SpacingConfig {
|
|
2155
|
+
/** Padding das células */
|
|
2156
|
+
cellPadding?: string;
|
|
2157
|
+
/** Padding do cabeçalho */
|
|
2158
|
+
headerPadding?: string;
|
|
2159
|
+
/** Altura das linhas */
|
|
2160
|
+
rowHeight?: number;
|
|
2161
|
+
/** Altura do cabeçalho */
|
|
2162
|
+
headerHeight?: number;
|
|
2163
|
+
/** Espaçamento entre tabela e container */
|
|
2164
|
+
containerSpacing?: string;
|
|
2165
|
+
}
|
|
2166
|
+
interface AnimationConfig {
|
|
2167
|
+
/** Habilitar animações */
|
|
2168
|
+
enabled: boolean;
|
|
2169
|
+
/** Duração das animações (ms) */
|
|
2170
|
+
duration: number;
|
|
2171
|
+
/** Função de easing */
|
|
2172
|
+
easing: string;
|
|
2173
|
+
/** Animações específicas */
|
|
2174
|
+
specific?: {
|
|
2175
|
+
/** Animação ao carregar */
|
|
2176
|
+
loading?: boolean;
|
|
2177
|
+
/** Animação de hover */
|
|
2178
|
+
hover?: boolean;
|
|
2179
|
+
/** Animação de seleção */
|
|
2180
|
+
selection?: boolean;
|
|
2181
|
+
/** Animação de ordenação */
|
|
2182
|
+
sorting?: boolean;
|
|
2183
|
+
};
|
|
2184
|
+
}
|
|
2185
|
+
interface ResponsiveConfig {
|
|
2186
|
+
/** Pontos de quebra */
|
|
2187
|
+
breakpoints?: {
|
|
2188
|
+
mobile?: number;
|
|
2189
|
+
tablet?: number;
|
|
2190
|
+
desktop?: number;
|
|
2191
|
+
};
|
|
2192
|
+
/** Comportamento em dispositivos móveis */
|
|
2193
|
+
mobile?: {
|
|
2194
|
+
/** Scroll horizontal */
|
|
2195
|
+
horizontalScroll?: boolean;
|
|
2196
|
+
/** Colapsar colunas */
|
|
2197
|
+
collapseColumns?: boolean;
|
|
2198
|
+
/** Colunas prioritárias */
|
|
2199
|
+
priorityColumns?: string[];
|
|
2200
|
+
/** Modo de cards em mobile */
|
|
2201
|
+
cardMode?: boolean;
|
|
2202
|
+
};
|
|
2203
|
+
/** Ajustes automáticos */
|
|
2204
|
+
autoAdjust?: {
|
|
2205
|
+
/** Ocultar colunas automaticamente */
|
|
2206
|
+
hideColumns?: boolean;
|
|
2207
|
+
/** Reduzir font size */
|
|
2208
|
+
scaleFontSize?: boolean;
|
|
2209
|
+
/** Ajustar padding */
|
|
2210
|
+
adjustPadding?: boolean;
|
|
2211
|
+
};
|
|
2212
|
+
}
|
|
2213
|
+
interface ElevationConfig {
|
|
2214
|
+
/** Nível de elevação */
|
|
2215
|
+
level: number;
|
|
2216
|
+
/** Cor da sombra */
|
|
2217
|
+
shadowColor?: string;
|
|
2218
|
+
/** Elevação no hover */
|
|
2219
|
+
hoverElevation?: number;
|
|
2220
|
+
}
|
|
2221
|
+
interface ToolbarConfig {
|
|
2222
|
+
/** Visibilidade da toolbar */
|
|
2223
|
+
visible: boolean;
|
|
2224
|
+
/** Posição da toolbar */
|
|
2225
|
+
position: 'top' | 'bottom' | 'both';
|
|
2226
|
+
/** Posição das ações da toolbar */
|
|
2227
|
+
actionsPosition?: 'top' | 'bottom' | 'both';
|
|
2228
|
+
/** Cor de fundo da barra de ações */
|
|
2229
|
+
actionsBackgroundColor?: string;
|
|
2230
|
+
/** Aparência governada da barra de ferramentas */
|
|
2231
|
+
appearance?: TableToolbarAppearanceConfig;
|
|
2232
|
+
/**
|
|
2233
|
+
* Se true, preserva ações de coleção descobertas que não são suportadas pelo recurso
|
|
2234
|
+
* (ex: criação em views read-only) sintetizando-as em estado desabilitado.
|
|
2235
|
+
* Se false (padrão canônico da plataforma), ações não suportadas são omitidas da toolbar.
|
|
2236
|
+
*/
|
|
2237
|
+
preserveUnsupportedActions?: boolean;
|
|
2238
|
+
/** Configurações de layout */
|
|
2239
|
+
layout?: ToolbarLayoutConfig;
|
|
2240
|
+
/** Título da tabela */
|
|
2241
|
+
title?: string;
|
|
2242
|
+
/** Subtítulo da tabela */
|
|
2243
|
+
subtitle?: string;
|
|
2244
|
+
/** Ícone semântico exibido junto ao título da toolbar */
|
|
2245
|
+
icon?: string;
|
|
2246
|
+
/** Alinhamento textual da identidade da toolbar */
|
|
2247
|
+
textAlign?: 'start' | 'center' | 'end';
|
|
2248
|
+
/** Ações da toolbar */
|
|
2249
|
+
actions?: ToolbarAction[];
|
|
2250
|
+
/** Configurações de filtros na toolbar */
|
|
2251
|
+
filters?: ToolbarFilterConfig;
|
|
2252
|
+
/** Menu de configurações */
|
|
2253
|
+
settingsMenu?: ToolbarSettingsConfig;
|
|
2254
|
+
/** Controle rápido de visibilidade de colunas */
|
|
2255
|
+
columnsVisibility?: {
|
|
2256
|
+
enabled?: boolean;
|
|
2257
|
+
};
|
|
2258
|
+
/** Controle governado para alternar a densidade visual da tabela em runtime. */
|
|
2259
|
+
densityToggle?: {
|
|
2260
|
+
enabled?: boolean;
|
|
2261
|
+
values?: TableToolbarAppearanceDensity[];
|
|
2262
|
+
};
|
|
2263
|
+
}
|
|
2264
|
+
type TableToolbarAppearanceVariant = 'flat' | 'outlined' | 'elevated' | 'integrated';
|
|
2265
|
+
type TableToolbarAppearanceDensity = 'compact' | 'comfortable' | 'spacious';
|
|
2266
|
+
type TableToolbarAppearanceShape = 'square' | 'rounded' | 'pill';
|
|
2267
|
+
type TableToolbarAppearanceDivider = 'none' | 'start' | 'between-groups';
|
|
2268
|
+
type TableToolbarTokenName = 'bg' | 'fg' | 'borderColor' | 'borderWidth' | 'radius' | 'shadow' | 'paddingBlock' | 'paddingInline' | 'minHeight' | 'gap' | 'actionsGap' | 'dividerColor' | 'actionSize' | 'actionRadius' | 'actionBg' | 'actionFg' | 'actionHoverBg' | 'actionActiveBg' | 'actionFocusRing' | 'aiAccentColor' | 'statusFg' | 'titleFg' | 'subtitleFg' | 'iconFg' | 'titleFontSize' | 'subtitleFontSize' | 'titleFontWeight' | 'identityGap' | 'identityFilterGap' | 'identityMinHeight' | 'identityMarginBottom' | 'identityIconSize' | 'identityIconRadius';
|
|
2269
|
+
interface TableToolbarAppearanceConfig {
|
|
2270
|
+
/** Preset registrado pelo host via @praxisui/table */
|
|
2271
|
+
preset?: string;
|
|
2272
|
+
/** Variante visual canônica da toolbar */
|
|
2273
|
+
variant?: TableToolbarAppearanceVariant;
|
|
2274
|
+
/** Densidade visual da toolbar */
|
|
2275
|
+
density?: TableToolbarAppearanceDensity;
|
|
2276
|
+
/** Forma dos containers e botões */
|
|
2277
|
+
shape?: TableToolbarAppearanceShape;
|
|
2278
|
+
/** Política de divisores entre regiões */
|
|
2279
|
+
divider?: TableToolbarAppearanceDivider;
|
|
2280
|
+
/** Tokens CSS públicos materializados pelo runtime */
|
|
2281
|
+
tokens?: Partial<Record<TableToolbarTokenName, string>>;
|
|
2282
|
+
}
|
|
2283
|
+
interface ToolbarLayoutConfig {
|
|
2284
|
+
/** Alinhamento do conteúdo */
|
|
2285
|
+
alignment: 'start' | 'center' | 'end' | 'space-between';
|
|
2286
|
+
/** Altura da toolbar */
|
|
2287
|
+
height?: number;
|
|
2288
|
+
/** Padding da toolbar */
|
|
2289
|
+
padding?: string;
|
|
2290
|
+
/** Cor de fundo */
|
|
2291
|
+
backgroundColor?: string;
|
|
2292
|
+
/** Mostrar separador */
|
|
2293
|
+
showSeparator: boolean;
|
|
2294
|
+
}
|
|
2295
|
+
type ToolbarActionTargetScope = 'collection' | 'selection';
|
|
2296
|
+
interface ToolbarActionTargetCardinality {
|
|
2297
|
+
/** Minimum number of records required to execute the action. */
|
|
2298
|
+
min: number;
|
|
2299
|
+
/** Maximum number accepted; omitted means no upper limit. */
|
|
2300
|
+
max?: number;
|
|
2301
|
+
}
|
|
2302
|
+
interface ToolbarActionTarget {
|
|
2303
|
+
/** Semantic action target, independent from its visual placement. */
|
|
2304
|
+
scope: ToolbarActionTargetScope;
|
|
2305
|
+
/** Selection constraint when the action targets selected records. */
|
|
2306
|
+
cardinality?: ToolbarActionTargetCardinality;
|
|
2307
|
+
}
|
|
2308
|
+
interface ToolbarAction {
|
|
2309
|
+
/** ID único da ação */
|
|
2310
|
+
id: string;
|
|
2311
|
+
/** Label da ação */
|
|
2312
|
+
label: string;
|
|
2313
|
+
/** Ícone da ação */
|
|
2314
|
+
icon?: string;
|
|
2315
|
+
/** Tipo do botão */
|
|
2316
|
+
type: 'button' | 'icon' | 'fab' | 'menu';
|
|
2317
|
+
/** Cor do Material */
|
|
2318
|
+
color?: 'primary' | 'accent' | 'warn';
|
|
2319
|
+
/** Aparência do botão Material: filled (flat), outlined (stroked), elevated (raised), text, tonal (custom) */
|
|
2320
|
+
appearance?: 'filled' | 'outlined' | 'elevated' | 'text' | 'tonal';
|
|
2321
|
+
/** Ação desabilitada */
|
|
2322
|
+
disabled?: boolean;
|
|
2323
|
+
/** Função a executar */
|
|
2324
|
+
action: string;
|
|
2325
|
+
/** Semantic target; toolbar placement does not imply a bulk operation. */
|
|
2326
|
+
target?: ToolbarActionTarget;
|
|
2327
|
+
/** Acao global estruturada executada pelo host via GlobalActionService */
|
|
2328
|
+
globalAction?: GlobalActionRef;
|
|
2329
|
+
/** Efeitos runtime canonicos executados quando a acao da toolbar e acionada */
|
|
2330
|
+
effects?: PraxisRuntimeGlobalActionEffect[];
|
|
2331
|
+
/** Tooltip */
|
|
2332
|
+
tooltip?: string;
|
|
2333
|
+
/** Tecla de atalho */
|
|
2334
|
+
shortcut?: string;
|
|
2335
|
+
/** Escopo do atalho: somente toolbar ativa ou global */
|
|
2336
|
+
shortcutScope?: 'toolbar' | 'global';
|
|
2337
|
+
/** Posição na toolbar */
|
|
2338
|
+
position: 'start' | 'end';
|
|
2339
|
+
/** Ordem de exibição */
|
|
2340
|
+
order?: number;
|
|
2341
|
+
/** Visibilidade condicional */
|
|
2342
|
+
visibleWhen?: JsonLogicExpression | null;
|
|
2343
|
+
/** Desabilitacao condicional */
|
|
2344
|
+
disabledWhen?: JsonLogicExpression | null;
|
|
2345
|
+
/** Sub-ações (para menus) */
|
|
2346
|
+
children?: ToolbarAction[];
|
|
2347
|
+
}
|
|
2348
|
+
interface ToolbarFilterConfig {
|
|
2349
|
+
/** Habilitar filtros rápidos na toolbar */
|
|
2350
|
+
enabled: boolean;
|
|
2351
|
+
/** Filtros rápidos disponíveis */
|
|
2352
|
+
quickFilters?: Array<{
|
|
2353
|
+
id: string;
|
|
2354
|
+
label: string;
|
|
2355
|
+
filter: any;
|
|
2356
|
+
icon?: string;
|
|
2357
|
+
}>;
|
|
2358
|
+
/** Mostrar botões de filtros rápidos na toolbar (default: true) */
|
|
2359
|
+
showQuickFilters?: boolean;
|
|
2360
|
+
/** Mostrar botão de filtros avançados */
|
|
2361
|
+
showAdvancedButton: boolean;
|
|
2362
|
+
}
|
|
2363
|
+
interface ToolbarSettingsConfig {
|
|
2364
|
+
/** Habilitar menu de configurações */
|
|
2365
|
+
enabled: boolean;
|
|
2366
|
+
/** Configurações disponíveis */
|
|
2367
|
+
options?: Array<{
|
|
2368
|
+
id: string;
|
|
2369
|
+
label: string;
|
|
2370
|
+
type: 'toggle' | 'select' | 'action';
|
|
2371
|
+
value?: any;
|
|
2372
|
+
options?: any[];
|
|
2373
|
+
}>;
|
|
2374
|
+
}
|
|
2375
|
+
interface TableAiAssistantConfig {
|
|
2376
|
+
/** Exibe e permite acionar o assistente de IA da tabela. Ausente equivale a true. */
|
|
2377
|
+
enabled?: boolean;
|
|
2378
|
+
}
|
|
2379
|
+
interface TableAiConfig {
|
|
2380
|
+
/** Configuracoes do assistente de IA embarcado na tabela. */
|
|
2381
|
+
assistant?: TableAiAssistantConfig;
|
|
2382
|
+
}
|
|
2383
|
+
interface TableActionsConfig {
|
|
2384
|
+
/** Políticas para ações no escopo da coleção */
|
|
2385
|
+
collection?: CollectionActionsConfig;
|
|
2386
|
+
/** Ações por linha */
|
|
2387
|
+
row?: RowActionsConfig;
|
|
2388
|
+
/** Ações em lote */
|
|
2389
|
+
bulk?: BulkActionsConfig;
|
|
2390
|
+
/** Ações de contexto (menu com botão direito) */
|
|
2391
|
+
context?: ContextActionsConfig;
|
|
2392
|
+
/** Configurações de confirmação */
|
|
2393
|
+
confirmations?: ConfirmationConfig;
|
|
2394
|
+
}
|
|
2395
|
+
interface CollectionActionsConfig {
|
|
2396
|
+
/** Descoberta HATEOAS/capabilities para materializar ações da coleção */
|
|
2397
|
+
discovery?: {
|
|
2398
|
+
/**
|
|
2399
|
+
* Habilita a materialização de ações de coleção descobertas, como create e workflows.
|
|
2400
|
+
* Ausente equivale a true.
|
|
2401
|
+
*/
|
|
2402
|
+
enabled?: boolean;
|
|
2403
|
+
};
|
|
2404
|
+
}
|
|
2405
|
+
interface RowActionsConfig {
|
|
2406
|
+
/** Habilitar ações por linha */
|
|
2407
|
+
enabled: boolean;
|
|
2408
|
+
/** Posição das ações */
|
|
2409
|
+
position: 'start' | 'end';
|
|
2410
|
+
/** Largura da coluna de ações */
|
|
2411
|
+
width?: string;
|
|
2412
|
+
/** Fixar a coluna de ações */
|
|
2413
|
+
sticky?: boolean | 'start' | 'end';
|
|
2414
|
+
/** Ações disponíveis */
|
|
2415
|
+
actions: RowAction[];
|
|
2416
|
+
/** Formato de exibição */
|
|
2417
|
+
display: 'menu' | 'buttons' | 'icons';
|
|
2418
|
+
/** Trigger para mostrar ações */
|
|
2419
|
+
trigger: 'hover' | 'always' | 'click';
|
|
2420
|
+
/** Ícone do menu de ações */
|
|
2421
|
+
menuIcon?: string;
|
|
2422
|
+
/** Cor do botão do menu de ações (overflow) */
|
|
2423
|
+
menuButtonColor?: 'basic' | 'primary' | 'accent' | 'warn';
|
|
2424
|
+
/** Descoberta HATEOAS/capabilities para enriquecer ações de linha */
|
|
2425
|
+
discovery?: {
|
|
2426
|
+
/** Habilitar descoberta contextual de actions/capabilities para a linha */
|
|
2427
|
+
enabled?: boolean;
|
|
2428
|
+
};
|
|
2429
|
+
/** Configurações do cabeçalho da coluna de ações */
|
|
2430
|
+
header?: {
|
|
2431
|
+
/** Texto exibido no cabeçalho (ex.: "Ações") */
|
|
2432
|
+
label?: string;
|
|
2433
|
+
/** Ícone exibido ao lado do texto */
|
|
2434
|
+
icon?: string;
|
|
2435
|
+
/** Tooltip do cabeçalho */
|
|
2436
|
+
tooltip?: string;
|
|
2437
|
+
/** Alinhamento do conteúdo no cabeçalho */
|
|
2438
|
+
align?: 'start' | 'center' | 'end';
|
|
2439
|
+
};
|
|
2440
|
+
/** Número máximo de ações visíveis */
|
|
2441
|
+
maxVisibleActions?: number;
|
|
2442
|
+
/** Comportamento de overflow de ações */
|
|
2443
|
+
behavior?: {
|
|
2444
|
+
/** Habilitar comportamento de overflow */
|
|
2445
|
+
enabled?: boolean;
|
|
2446
|
+
/** Número máximo de ações inline */
|
|
2447
|
+
maxInline?: number | 'auto' | {
|
|
2448
|
+
xs?: number;
|
|
2449
|
+
sm?: number;
|
|
2450
|
+
md?: number;
|
|
2451
|
+
lg?: number;
|
|
2452
|
+
};
|
|
2453
|
+
/** Estratégia para auto determinar número de ações inline */
|
|
2454
|
+
autoStrategy?: 'measure' | 'breakpoints';
|
|
2455
|
+
};
|
|
2456
|
+
}
|
|
2457
|
+
interface RowAction {
|
|
2458
|
+
/** ID único da ação */
|
|
2459
|
+
id: string;
|
|
2460
|
+
/** Label da ação */
|
|
2461
|
+
label: string;
|
|
2462
|
+
/** Ícone da ação */
|
|
2463
|
+
icon?: string;
|
|
2464
|
+
/** Cor da ação */
|
|
2465
|
+
color?: string;
|
|
2466
|
+
/** Ação desabilitada */
|
|
2467
|
+
disabled?: boolean;
|
|
2468
|
+
/** Função a executar */
|
|
2469
|
+
action: string;
|
|
2470
|
+
/** Acao global estruturada executada pelo host via GlobalActionService */
|
|
2471
|
+
globalAction?: GlobalActionRef;
|
|
2472
|
+
/** Efeitos runtime canonicos executados quando a acao por linha e acionada */
|
|
2473
|
+
effects?: PraxisRuntimeGlobalActionEffect[];
|
|
2474
|
+
/** Surface de registro canonica aberta por esta acao de linha */
|
|
2475
|
+
recordSurface?: ResourceSurfaceCatalogItem;
|
|
2476
|
+
/** Tooltip */
|
|
2477
|
+
tooltip?: string;
|
|
2478
|
+
/** Requer confirmação */
|
|
2479
|
+
requiresConfirmation?: boolean;
|
|
2480
|
+
/** Visibilidade condicional */
|
|
2481
|
+
visibleWhen?: JsonLogicExpression | null;
|
|
2482
|
+
/** Separador após esta ação */
|
|
2483
|
+
separator?: boolean;
|
|
2484
|
+
/** Habilita exclusão automática ao acionar */
|
|
2485
|
+
autoDelete?: boolean;
|
|
2486
|
+
/** Endpoint personalizado para exclusão */
|
|
2487
|
+
deleteEndpoint?: string;
|
|
2488
|
+
}
|
|
2489
|
+
interface BulkActionsConfig {
|
|
2490
|
+
/** Habilitar ações em lote */
|
|
2491
|
+
enabled: boolean;
|
|
2492
|
+
/** Posição das ações em lote */
|
|
2493
|
+
position: 'toolbar' | 'floating' | 'both';
|
|
2494
|
+
/** Ações disponíveis */
|
|
2495
|
+
actions: BulkAction[];
|
|
2496
|
+
/** Configurações do floating action button */
|
|
2497
|
+
floating?: {
|
|
2498
|
+
position: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
2499
|
+
/** Ocultar quando nada selecionado */
|
|
2500
|
+
hideWhenEmpty: boolean;
|
|
2501
|
+
};
|
|
2502
|
+
}
|
|
2503
|
+
interface BulkAction {
|
|
2504
|
+
/** ID único da ação */
|
|
2505
|
+
id: string;
|
|
2506
|
+
/** Label da ação */
|
|
2507
|
+
label: string;
|
|
2508
|
+
/** Ícone da ação */
|
|
2509
|
+
icon?: string;
|
|
2510
|
+
/** Cor da ação */
|
|
2511
|
+
color?: string;
|
|
2512
|
+
/** Função a executar */
|
|
2513
|
+
action: string;
|
|
2514
|
+
/** Acao global estruturada executada pelo host via GlobalActionService */
|
|
2515
|
+
globalAction?: GlobalActionRef;
|
|
2516
|
+
/** Efeitos runtime canonicos executados quando a acao em lote e acionada */
|
|
2517
|
+
effects?: PraxisRuntimeGlobalActionEffect[];
|
|
2518
|
+
/** Requer confirmação */
|
|
2519
|
+
requiresConfirmation?: boolean;
|
|
2520
|
+
/** Mínimo de itens selecionados */
|
|
2521
|
+
minSelections?: number;
|
|
2522
|
+
/** Máximo de itens selecionados */
|
|
2523
|
+
maxSelections?: number;
|
|
2524
|
+
/** Habilita exclusão automática ao acionar */
|
|
2525
|
+
autoDelete?: boolean;
|
|
2526
|
+
/** Endpoint personalizado para exclusão */
|
|
2527
|
+
deleteEndpoint?: string;
|
|
2528
|
+
}
|
|
2529
|
+
interface ContextActionsConfig {
|
|
2530
|
+
/** Habilitar menu de contexto */
|
|
2531
|
+
enabled: boolean;
|
|
2532
|
+
/** Ações do menu de contexto */
|
|
2533
|
+
actions: ContextAction[];
|
|
2534
|
+
/** Trigger para menu de contexto */
|
|
2535
|
+
trigger: 'right-click' | 'long-press' | 'both';
|
|
2536
|
+
}
|
|
2537
|
+
interface ContextAction {
|
|
2538
|
+
/** ID único da ação */
|
|
2539
|
+
id: string;
|
|
2540
|
+
/** Label da ação */
|
|
2541
|
+
label: string;
|
|
2542
|
+
/** Ícone da ação */
|
|
2543
|
+
icon?: string;
|
|
2544
|
+
/** Função a executar */
|
|
2545
|
+
action: string;
|
|
2546
|
+
/** Separador após esta ação */
|
|
2547
|
+
separator?: boolean;
|
|
2548
|
+
/** Visibilidade condicional */
|
|
2549
|
+
visibleWhen?: JsonLogicExpression | null;
|
|
2550
|
+
}
|
|
2551
|
+
interface ConfirmationConfig {
|
|
2552
|
+
/** Configurações padrão de confirmação */
|
|
2553
|
+
default?: {
|
|
2554
|
+
title: string;
|
|
2555
|
+
message: string;
|
|
2556
|
+
confirmText: string;
|
|
2557
|
+
cancelText: string;
|
|
2558
|
+
};
|
|
2559
|
+
/** Configurações específicas por ação */
|
|
2560
|
+
specific?: {
|
|
2561
|
+
[actionId: string]: Partial<ConfirmationConfig['default']>;
|
|
2562
|
+
};
|
|
2563
|
+
}
|
|
2564
|
+
type TableDetailAllowedNode = 'layout' | 'stack' | 'tabs' | 'tab' | 'text' | 'icon' | 'image' | 'badge' | 'avatar' | 'metric' | 'progress' | 'compose' | 'card' | 'mediaBlock' | 'cardGrid' | 'timeline' | 'value' | 'action' | 'actionBar' | 'list' | 'detailList' | 'formRef' | 'tableRef' | 'chartRef' | 'diagramEmbed' | 'richText' | 'richContent' | 'templateRef';
|
|
2565
|
+
interface TableDetailBaseNode {
|
|
2566
|
+
type: TableDetailAllowedNode;
|
|
2567
|
+
id?: string;
|
|
2568
|
+
title?: string;
|
|
2569
|
+
subtitle?: string;
|
|
2570
|
+
visibleWhen?: JsonLogicExpression | null;
|
|
2571
|
+
[key: string]: unknown;
|
|
2572
|
+
}
|
|
2573
|
+
interface TableDetailLayoutNode extends TableDetailBaseNode {
|
|
2574
|
+
type: 'layout' | 'stack';
|
|
2575
|
+
items?: TableDetailSchemaNode[];
|
|
2576
|
+
content?: TableDetailSchemaNode[];
|
|
2577
|
+
}
|
|
2578
|
+
interface TableDetailTabsNode extends TableDetailBaseNode {
|
|
2579
|
+
type: 'tabs';
|
|
2580
|
+
items?: TableDetailTabNode[];
|
|
2581
|
+
content?: TableDetailTabNode[];
|
|
2582
|
+
}
|
|
2583
|
+
interface TableDetailTabNode extends TableDetailBaseNode {
|
|
2584
|
+
type: 'tab';
|
|
2585
|
+
badge?: string | number;
|
|
2586
|
+
icon?: string;
|
|
2587
|
+
items?: TableDetailSchemaNode[];
|
|
2588
|
+
content?: TableDetailSchemaNode[];
|
|
2589
|
+
}
|
|
2590
|
+
interface TableDetailCardNode extends TableDetailBaseNode {
|
|
2591
|
+
type: 'card';
|
|
2592
|
+
items?: TableDetailSchemaNode[];
|
|
2593
|
+
content?: TableDetailSchemaNode[];
|
|
2594
|
+
}
|
|
2595
|
+
interface TableDetailCardGridCardNode {
|
|
2596
|
+
id?: string;
|
|
2597
|
+
title?: string;
|
|
2598
|
+
subtitle?: string;
|
|
2599
|
+
content: Array<RichPresenterNode | RichComposeNode>;
|
|
2600
|
+
}
|
|
2601
|
+
interface TableDetailCardGridNode extends TableDetailBaseNode {
|
|
2602
|
+
type: 'cardGrid';
|
|
2603
|
+
title?: string;
|
|
2604
|
+
subtitle?: string;
|
|
2605
|
+
columns?: 1 | 2 | 3 | 4 | 'auto';
|
|
2606
|
+
minCardWidth?: number;
|
|
2607
|
+
cards: TableDetailCardGridCardNode[];
|
|
2608
|
+
}
|
|
2609
|
+
interface TableDetailMediaBlockNode extends RichMediaBlockNode {
|
|
2610
|
+
type: 'mediaBlock';
|
|
2611
|
+
}
|
|
2612
|
+
interface TableDetailTimelineItemSchema {
|
|
2613
|
+
titleField?: string;
|
|
2614
|
+
subtitleField?: string;
|
|
2615
|
+
metaField?: string;
|
|
2616
|
+
iconField?: string;
|
|
2617
|
+
badgeField?: string;
|
|
2618
|
+
}
|
|
2619
|
+
interface TableDetailTimelineStaticItem {
|
|
2620
|
+
id?: string;
|
|
2621
|
+
title?: string;
|
|
2622
|
+
titleExpr?: string;
|
|
2623
|
+
subtitle?: string;
|
|
2624
|
+
subtitleExpr?: string;
|
|
2625
|
+
meta?: string;
|
|
2626
|
+
metaExpr?: string;
|
|
2627
|
+
icon?: string;
|
|
2628
|
+
iconExpr?: string;
|
|
2629
|
+
badge?: string;
|
|
2630
|
+
badgeExpr?: string;
|
|
2631
|
+
[key: string]: unknown;
|
|
2632
|
+
}
|
|
2633
|
+
interface TableDetailTimelineNode extends TableDetailBaseNode {
|
|
2634
|
+
type: 'timeline';
|
|
2635
|
+
field?: string;
|
|
2636
|
+
items?: Array<TableDetailTimelineStaticItem | string | number | boolean | bigint | unknown[]>;
|
|
2637
|
+
emptyText?: string;
|
|
2638
|
+
itemSchema?: TableDetailTimelineItemSchema;
|
|
2639
|
+
}
|
|
2640
|
+
interface TableDetailValueNode extends TableDetailBaseNode {
|
|
2641
|
+
type: 'value';
|
|
2642
|
+
field?: string;
|
|
2643
|
+
valueField?: string;
|
|
2644
|
+
value?: unknown;
|
|
2645
|
+
}
|
|
2646
|
+
interface TableDetailActionNode extends TableDetailBaseNode {
|
|
2647
|
+
type: 'action';
|
|
2648
|
+
actionId?: string;
|
|
2649
|
+
icon?: string;
|
|
2650
|
+
payloadExpr?: string;
|
|
2651
|
+
disabled?: boolean;
|
|
2652
|
+
statusText?: string;
|
|
2653
|
+
}
|
|
2654
|
+
interface TableDetailActionBarAction {
|
|
2655
|
+
actionId: string;
|
|
2656
|
+
label: string;
|
|
2657
|
+
icon?: string;
|
|
2658
|
+
payloadExpr?: string;
|
|
2659
|
+
visibleWhen?: JsonLogicExpression | null;
|
|
2660
|
+
disabledWhen?: JsonLogicExpression | null;
|
|
2661
|
+
}
|
|
2662
|
+
interface TableDetailActionBarNode extends TableDetailBaseNode {
|
|
2663
|
+
type: 'actionBar';
|
|
2664
|
+
emptyText?: string;
|
|
2665
|
+
actions: TableDetailActionBarAction[];
|
|
2666
|
+
}
|
|
2667
|
+
interface TableDetailListNode extends TableDetailBaseNode {
|
|
2668
|
+
type: 'list';
|
|
2669
|
+
field?: string;
|
|
2670
|
+
items?: unknown[];
|
|
2671
|
+
emptyText?: string;
|
|
2672
|
+
}
|
|
2673
|
+
interface TableDetailListItemContextConfig {
|
|
2674
|
+
itemAlias?: string;
|
|
2675
|
+
indexAlias?: string;
|
|
2676
|
+
}
|
|
2677
|
+
interface TableDetailListItemSchema {
|
|
2678
|
+
layout?: 'stack' | 'row' | 'card-list';
|
|
2679
|
+
nodes: RichBlockNode[];
|
|
2680
|
+
}
|
|
2681
|
+
interface TableDetailListItemAction {
|
|
2682
|
+
actionId: string;
|
|
2683
|
+
label: string;
|
|
2684
|
+
icon?: string;
|
|
2685
|
+
payloadExpr?: string;
|
|
2686
|
+
visibleWhen?: JsonLogicExpression | null;
|
|
2687
|
+
disabledWhen?: JsonLogicExpression | null;
|
|
2688
|
+
}
|
|
2689
|
+
interface TableDetailRichListNode extends TableDetailBaseNode {
|
|
2690
|
+
type: 'detailList';
|
|
2691
|
+
field?: string;
|
|
2692
|
+
items?: unknown[];
|
|
2693
|
+
emptyText?: string;
|
|
2694
|
+
itemKeyField?: string;
|
|
2695
|
+
itemSchema: TableDetailListItemSchema;
|
|
2696
|
+
itemContext?: TableDetailListItemContextConfig;
|
|
2697
|
+
itemActions?: TableDetailListItemAction[];
|
|
2698
|
+
}
|
|
2699
|
+
type TableDetailEmbedAction = TableDetailActionBarAction;
|
|
2700
|
+
interface TableDetailEmbedBaseNode extends TableDetailBaseNode {
|
|
2701
|
+
/**
|
|
2702
|
+
* Governs whether the detail row should keep this embed as a host-mediated reference
|
|
2703
|
+
* or ask an owning runtime/provider to materialize it inline. Omitted means `reference`.
|
|
2704
|
+
*/
|
|
2705
|
+
renderMode?: 'reference' | 'inline';
|
|
2706
|
+
description?: string;
|
|
2707
|
+
caption?: string;
|
|
2708
|
+
emptyText?: string;
|
|
2709
|
+
inputs?: Record<string, unknown>;
|
|
2710
|
+
presetRef?: CorePresetRef;
|
|
2711
|
+
action?: TableDetailEmbedAction;
|
|
2712
|
+
}
|
|
2713
|
+
interface TableDetailRefNode extends TableDetailEmbedBaseNode {
|
|
2714
|
+
type: 'formRef' | 'tableRef' | 'chartRef';
|
|
2715
|
+
schemaId?: string;
|
|
2716
|
+
chartDocumentRef?: string;
|
|
2717
|
+
chartDocument?: unknown;
|
|
2718
|
+
}
|
|
2719
|
+
interface TableDetailDiagramEmbedNode extends TableDetailEmbedBaseNode {
|
|
2720
|
+
type: 'diagramEmbed';
|
|
2721
|
+
provider: 'mermaid' | 'bpmn' | 'custom';
|
|
2722
|
+
source?: string;
|
|
2723
|
+
sourceField?: string;
|
|
2724
|
+
}
|
|
2725
|
+
interface TableDetailRichTextNode extends TableDetailBaseNode {
|
|
2726
|
+
type: 'richText';
|
|
2727
|
+
html?: string;
|
|
2728
|
+
text?: string;
|
|
2729
|
+
}
|
|
2730
|
+
/**
|
|
2731
|
+
* Host-mediated node embedding a canonical Praxis Rich Content document inside a table row expansion
|
|
2732
|
+
* or bottom detail panel. Live Expressions within the document automatically resolve against the current
|
|
2733
|
+
* row, metadata, and variables declared in `contextMap`.
|
|
2734
|
+
*/
|
|
2735
|
+
interface TableDetailRichContentNode extends TableDetailBaseNode {
|
|
2736
|
+
type: 'richContent';
|
|
2737
|
+
/** Canonical Rich Content Document structure to render. */
|
|
2738
|
+
document: RichContentDocument;
|
|
2739
|
+
/** Layout presentation mode: 'block' fills available width, 'inline' respects content flow. */
|
|
2740
|
+
layout?: 'block' | 'inline';
|
|
2741
|
+
/** Optional CSS class applied to the root container of the rich content document. */
|
|
2742
|
+
rootClassName?: string;
|
|
2743
|
+
/**
|
|
2744
|
+
* Expression mapping injecting row properties into the Rich Content context for Live Expressions.
|
|
2745
|
+
* Supports `$row.<property>`, `row.<property>`, or direct `<property>` names from the active row record.
|
|
2746
|
+
*
|
|
2747
|
+
* Example:
|
|
2748
|
+
* ```json
|
|
2749
|
+
* { "missionCode": "$row.codigo", "riskLevel": "nivelRisco" }
|
|
2750
|
+
* ```
|
|
2751
|
+
*/
|
|
2752
|
+
contextMap?: Record<string, string>;
|
|
2753
|
+
/** Static or predefined values injected directly into the document context. */
|
|
2754
|
+
context?: Record<string, unknown>;
|
|
2755
|
+
}
|
|
2756
|
+
interface TableDetailTemplateRefNode extends TableDetailEmbedBaseNode {
|
|
2757
|
+
type: 'templateRef';
|
|
2758
|
+
templateId?: string;
|
|
2759
|
+
}
|
|
2760
|
+
type TableDetailSchemaNode = TableDetailLayoutNode | TableDetailTabsNode | TableDetailTabNode | TableDetailCardNode | TableDetailMediaBlockNode | TableDetailCardGridNode | TableDetailTimelineNode | TableDetailValueNode | TableDetailActionNode | TableDetailActionBarNode | TableDetailListNode | TableDetailRichListNode | TableDetailRefNode | TableDetailDiagramEmbedNode | TableDetailRichTextNode | TableDetailRichContentNode | TableDetailTemplateRefNode;
|
|
2761
|
+
/**
|
|
2762
|
+
* Composite inline schema document container for table row expansion and bottom detail panels.
|
|
2763
|
+
*/
|
|
2764
|
+
interface TableDetailInlineSchemaDocument {
|
|
2765
|
+
/** Structural arrangement of root items: stacked list or tabbed multi-dossier view. */
|
|
2766
|
+
layout?: 'stack' | 'tabs';
|
|
2767
|
+
/** Child detail nodes to render. Also supports direct `RichContentDocument` entries. */
|
|
2768
|
+
items?: TableDetailSchemaNode[];
|
|
2769
|
+
/**
|
|
2770
|
+
* Document-level expression mapping injecting row attributes into the detail evaluation context.
|
|
2771
|
+
* Keys mapped here are available across all child nodes and Live Expressions.
|
|
2772
|
+
*/
|
|
2773
|
+
contextMap?: Record<string, string>;
|
|
2774
|
+
}
|
|
2775
|
+
/**
|
|
2776
|
+
* Configuração canônica de gaveta lateral (Drawer) / dossiê analítico na tabela.
|
|
2777
|
+
* Suporta modo analítico com abas, bento cards e sub-recursos/relações declarativas.
|
|
2778
|
+
* (Issues #30 e #32)
|
|
2779
|
+
*/
|
|
2780
|
+
interface TableDrawerConfig {
|
|
2781
|
+
/** Habilita a gaveta lateral de detalhe analítico */
|
|
2782
|
+
enabled?: boolean;
|
|
2783
|
+
/** Modo de abertura: 'analytical' (dossiê com abas/cards) ou 'form' */
|
|
2784
|
+
mode?: 'analytical' | 'form' | string;
|
|
2785
|
+
type?: 'analytical' | 'form' | string;
|
|
2786
|
+
/** Título estático ou expressão dinâmica (SafeExpressionEvaluator) */
|
|
2787
|
+
title?: string;
|
|
2788
|
+
titleExpr?: string;
|
|
2789
|
+
/** Subtítulo estático ou expressão dinâmica */
|
|
2790
|
+
subtitle?: string;
|
|
2791
|
+
subtitleExpr?: string;
|
|
2792
|
+
/** Ícone no cabeçalho da gaveta */
|
|
2793
|
+
icon?: string;
|
|
2794
|
+
/** Pílula de classificação corporativa no topo (ex.: "DOSSIÊ DE INVESTIGAÇÃO · PRAXIS GOVERNED") */
|
|
2795
|
+
classificationPill?: string;
|
|
2796
|
+
/** Largura customizada da gaveta (ex.: 'min(780px, 60vw)', '680px') */
|
|
2797
|
+
width?: string;
|
|
2798
|
+
/** Se verdadeiro, o clique na linha da tabela abre a gaveta automaticamente. Padrão: true quando drawer habilitado. */
|
|
2799
|
+
openOnRowClick?: boolean;
|
|
2800
|
+
/** Esquema analítico do dossiê (com abas e nós de apresentação) */
|
|
2801
|
+
schema?: PraxisAnalyticalDrawerSchema | TableDetailInlineSchemaDocument | RichContentDocument;
|
|
2802
|
+
/** Lista direta de abas analíticas (atalho equivalente a schema.tabs) */
|
|
2803
|
+
tabs?: PraxisAnalyticalDrawerTab[];
|
|
2804
|
+
/** Orquestração declarativa de sub-recursos e relações vinculadas (Issue #32) */
|
|
2805
|
+
relations?: PraxisAnalyticalDrawerRelation[];
|
|
2806
|
+
}
|
|
2807
|
+
/**
|
|
2808
|
+
* Esquema estrutural canônico para gavetas analíticas e dossiês multi-aba (`kind: 'praxis.analytical-drawer.schema'`).
|
|
2809
|
+
*/
|
|
2810
|
+
interface PraxisAnalyticalDrawerSchema {
|
|
2811
|
+
kind?: 'praxis.analytical-drawer.schema';
|
|
2812
|
+
version?: '1.0.0' | string;
|
|
2813
|
+
titleExpr?: string;
|
|
2814
|
+
subtitleExpr?: string;
|
|
2815
|
+
icon?: string;
|
|
2816
|
+
classificationPill?: string;
|
|
2817
|
+
tabs: PraxisAnalyticalDrawerTab[];
|
|
2818
|
+
relations?: PraxisAnalyticalDrawerRelation[];
|
|
2819
|
+
}
|
|
2820
|
+
/**
|
|
2821
|
+
* Definição de aba temática dentro de uma gaveta analítica.
|
|
2822
|
+
*/
|
|
2823
|
+
interface PraxisAnalyticalDrawerTab {
|
|
2824
|
+
id: string;
|
|
2825
|
+
label: string;
|
|
2826
|
+
icon?: string;
|
|
2827
|
+
badge?: string;
|
|
2828
|
+
count?: number;
|
|
2829
|
+
content?: TableDetailSchemaNode | TableDetailInlineSchemaDocument | RichContentDocument | Record<string, unknown>;
|
|
2830
|
+
}
|
|
2831
|
+
/**
|
|
2832
|
+
* Contrato declarativo de sub-recurso / relação vinculada para injeção automática no contexto reativo (`context.relations`).
|
|
2833
|
+
* (Issue #32)
|
|
2834
|
+
*/
|
|
2835
|
+
interface PraxisAnalyticalDrawerRelation {
|
|
2836
|
+
/** Chave injetada no contexto do template (ex.: 'indicadoresRisco' -> relations.indicadoresRisco) */
|
|
2837
|
+
key: string;
|
|
2838
|
+
/** URL ou endpoint com suporte a tokens de interpolação da linha (ex.: '/api/operations/incidentes/{id}/risk-indicators') */
|
|
2839
|
+
endpoint: string;
|
|
2840
|
+
/** Método HTTP. Padrão: 'GET' */
|
|
2841
|
+
method?: 'GET' | 'POST';
|
|
2842
|
+
/** Cardinalidade esperada: 'single' (primeiro objeto) ou 'collection' (array). Padrão: 'single' */
|
|
2843
|
+
cardinality?: 'single' | 'collection';
|
|
2844
|
+
/** Se deve armazenar resposta em cache por URL para a sessão. Padrão: true */
|
|
2845
|
+
cache?: boolean;
|
|
2846
|
+
/** Se o fetch deve ser postergado até a aba que consome a relação ficar visível */
|
|
2847
|
+
lazy?: boolean;
|
|
2848
|
+
/** Mapeamento adicional de parâmetros */
|
|
2849
|
+
paramsMap?: Record<string, string>;
|
|
2850
|
+
}
|
|
2851
|
+
interface PraxisKpiBandCard {
|
|
2852
|
+
/** Identificador único do card de métrica */
|
|
2853
|
+
id?: string;
|
|
2854
|
+
/** Rótulo principal da métrica (ex.: 'Total de Missões', 'Heróis Ativos') */
|
|
2855
|
+
label: string;
|
|
2856
|
+
/** Expressão segura para derivar o valor a partir do contexto `{ data, stats, ...data }` */
|
|
2857
|
+
valueExpr?: string;
|
|
2858
|
+
/** Valor estático ou pré-calculado (se valueExpr não for utilizado) */
|
|
2859
|
+
value?: string | number | null;
|
|
2860
|
+
/**
|
|
2861
|
+
* Formato semântico do valor:
|
|
2862
|
+
* - 'currency:BRL' | 'currency:compactBRL' (ex: R$ 3,1M)
|
|
2863
|
+
* - 'number' | 'number:compact' (ex: 125K)
|
|
2864
|
+
* - 'percent' | 'percentage'
|
|
2865
|
+
* - string customizada
|
|
2866
|
+
*/
|
|
2867
|
+
format?: string;
|
|
2868
|
+
/** Subtítulo / legenda estática */
|
|
2869
|
+
caption?: string;
|
|
2870
|
+
/** Expressão segura para derivar a legenda dinamicamente */
|
|
2871
|
+
captionExpr?: string;
|
|
2872
|
+
/** Nota de rodapé ou metadado contextual (ex.: 'Atualizado há 5 min', 'Mês corrente') */
|
|
2873
|
+
footnote?: string;
|
|
2874
|
+
/** Ícone Angular Material / Praxis a ser renderizado */
|
|
2875
|
+
icon?: string;
|
|
2876
|
+
/** Tom visual semântico do card */
|
|
2877
|
+
tone?: 'info' | 'success' | 'warning' | 'error' | 'neutral' | string;
|
|
2878
|
+
/** Ação ou evento emitido ao clicar no card */
|
|
2879
|
+
action?: string;
|
|
2880
|
+
/** Se o card é explicitamente clicável / interativo (quando omitido, derivado da presença de action, filter ou ouvintes) */
|
|
2881
|
+
interactive?: boolean;
|
|
2882
|
+
/** Filtro ou critérios de filtragem a serem aplicados diretamente à tabela ao clicar no card */
|
|
2883
|
+
filter?: Record<string, unknown>;
|
|
2884
|
+
/** Rota ou link para navegação opcional ao clicar no card */
|
|
2885
|
+
route?: string;
|
|
2886
|
+
/** Classes CSS adicionais */
|
|
2887
|
+
className?: string;
|
|
2888
|
+
/** Tooltip explicativo ao pairar o mouse */
|
|
2889
|
+
tooltip?: string;
|
|
2890
|
+
}
|
|
2891
|
+
interface PraxisKpiBandConfig {
|
|
2892
|
+
/** Se a faixa de KPIs está habilitada (padrão: true quando configurada) */
|
|
2893
|
+
enabled?: boolean;
|
|
2894
|
+
/** Endpoint URL para auto-fetch das estatísticas agregadas (ex.: '/operations/vw-resumo-missoes/stats/summary') */
|
|
2895
|
+
source?: string;
|
|
2896
|
+
/** Método HTTP para a requisição de auto-fetch (padrão: 'GET') */
|
|
2897
|
+
method?: 'GET' | 'POST';
|
|
2898
|
+
/** Payload enviado em requisições POST para a source */
|
|
2899
|
+
payload?: Record<string, unknown>;
|
|
2900
|
+
/** Layout dos cards: 'grid' (Bento / CSS Grid) ou 'flex' (padrão: 'grid') */
|
|
2901
|
+
layout?: 'grid' | 'flex';
|
|
2902
|
+
/** Número de colunas no layout grid (padrão: auto-fit com minmax) */
|
|
2903
|
+
columns?: number;
|
|
2904
|
+
/** Espaçamento entre os cards ('sm' | 'md' | 'lg' | customizado) */
|
|
2905
|
+
gap?: 'sm' | 'md' | 'lg' | string;
|
|
2906
|
+
/** Lista de cards de métricas declarados */
|
|
2907
|
+
cards?: PraxisKpiBandCard[];
|
|
2908
|
+
/** Documento Rich Content alternativo quando a faixa é definida via layout Rich Content */
|
|
2909
|
+
document?: RichContentDocument;
|
|
2910
|
+
/** Se deve exibir botão de recarregar / refresh na faixa */
|
|
2911
|
+
showRefresh?: boolean;
|
|
2912
|
+
/** Título opcional da seção executiva */
|
|
2913
|
+
title?: string;
|
|
2914
|
+
/** Subtítulo opcional da seção executiva */
|
|
2915
|
+
subtitle?: string;
|
|
2916
|
+
/** Classes CSS adicionais para o container da faixa */
|
|
2917
|
+
className?: string;
|
|
2918
|
+
}
|
|
2919
|
+
interface PraxisComputedFieldDefinition {
|
|
2920
|
+
/** Tipo semântico da propriedade calculada */
|
|
2921
|
+
type?: 'string' | 'number' | 'boolean' | 'date' | 'currency' | 'percentage';
|
|
2922
|
+
/** Expressão segura para cálculo (ex.: 'salarioBase * 0.89', 'danosCivis > 50000 ? "ALTO" : "NORMAL"') */
|
|
2923
|
+
expr: string;
|
|
2924
|
+
/** Formato semântico opcional (ex.: 'currency:BRL', 'date:pt-BR', 'number:0.2-2') */
|
|
2925
|
+
format?: string;
|
|
2926
|
+
/** Valor padrão / fallback em caso de erro de avaliação */
|
|
2927
|
+
fallback?: unknown;
|
|
2928
|
+
}
|
|
2929
|
+
/**
|
|
2930
|
+
* Mapeamento de propriedades computadas injetadas na ingestão de dados da tabela.
|
|
2931
|
+
* Pode ser um mapa de chave para `PraxisComputedFieldDefinition` ou string simples (expressão).
|
|
2932
|
+
*/
|
|
2933
|
+
type PraxisComputedFieldsConfig = Record<string, PraxisComputedFieldDefinition | string>;
|
|
2934
|
+
interface ExportConfig {
|
|
2935
|
+
/** Habilitar exportação */
|
|
2936
|
+
enabled: boolean;
|
|
2937
|
+
/** Formatos disponíveis */
|
|
2938
|
+
formats: ExportFormat[];
|
|
2939
|
+
/** Configurações por formato */
|
|
2940
|
+
excel?: ExcelExportConfig;
|
|
2941
|
+
pdf?: PdfExportConfig;
|
|
2942
|
+
csv?: CsvExportConfig;
|
|
2943
|
+
json?: JsonExportConfig;
|
|
2944
|
+
/** Configurações gerais */
|
|
2945
|
+
general?: GeneralExportConfig;
|
|
2946
|
+
/** Templates personalizados */
|
|
2947
|
+
templates?: ExportTemplate[];
|
|
2948
|
+
}
|
|
2949
|
+
type ExportFormat = PraxisExportFormat;
|
|
2950
|
+
interface GeneralExportConfig {
|
|
2951
|
+
/** Incluir cabeçalhos */
|
|
2952
|
+
includeHeaders: boolean;
|
|
2953
|
+
/** Escopo canônico dos dados exportados */
|
|
2954
|
+
scope: PraxisExportScope;
|
|
2955
|
+
/** Máximo de linhas para exportar */
|
|
2956
|
+
maxRows?: number;
|
|
2957
|
+
/** Nome do arquivo padrão */
|
|
2958
|
+
defaultFileName?: string;
|
|
2959
|
+
/** Colunas a incluir na exportação */
|
|
2960
|
+
includeColumns?: string[] | 'all' | 'visible';
|
|
2961
|
+
/** Aplicar formatações das colunas */
|
|
2962
|
+
applyFormatting: boolean;
|
|
2963
|
+
}
|
|
2964
|
+
interface ExcelExportConfig {
|
|
2965
|
+
/** Nome da planilha */
|
|
2966
|
+
sheetName: string;
|
|
2967
|
+
/** Exibir ação local para exportar a página atual com colunas visíveis */
|
|
2968
|
+
visibleCurrentPage?: boolean;
|
|
2969
|
+
/** Incluir fórmulas nas células */
|
|
2970
|
+
includeFormulas: boolean;
|
|
2971
|
+
/** Congelar linha de cabeçalho */
|
|
2972
|
+
freezeHeaders: boolean;
|
|
2973
|
+
/** Auto-ajustar largura das colunas */
|
|
2974
|
+
autoFitColumns: boolean;
|
|
2975
|
+
/** Configurações de estilo */
|
|
2976
|
+
styling?: ExcelStylingConfig;
|
|
2977
|
+
/** Múltiplas planilhas */
|
|
2978
|
+
multipleSheets?: boolean;
|
|
2979
|
+
}
|
|
2980
|
+
interface ExcelStylingConfig {
|
|
2981
|
+
/** Estilo do cabeçalho */
|
|
2982
|
+
headerStyle?: {
|
|
2983
|
+
backgroundColor?: string;
|
|
2984
|
+
fontColor?: string;
|
|
2985
|
+
fontWeight?: 'bold' | 'normal';
|
|
2986
|
+
fontSize?: number;
|
|
2987
|
+
};
|
|
2988
|
+
/** Estilo das células */
|
|
2989
|
+
cellStyle?: {
|
|
2990
|
+
fontSize?: number;
|
|
2991
|
+
borderStyle?: 'thin' | 'medium' | 'thick';
|
|
2992
|
+
};
|
|
2993
|
+
/** Linhas alternadas */
|
|
2994
|
+
alternateRows?: {
|
|
2995
|
+
enabled: boolean;
|
|
2996
|
+
color?: string;
|
|
2997
|
+
};
|
|
2998
|
+
}
|
|
2999
|
+
interface PdfExportConfig {
|
|
3000
|
+
/** Orientação da página */
|
|
3001
|
+
orientation: 'portrait' | 'landscape';
|
|
3002
|
+
/** Tamanho da página */
|
|
3003
|
+
pageSize: 'A4' | 'A3' | 'Letter' | 'Legal';
|
|
3004
|
+
/** Margens da página */
|
|
3005
|
+
margins: MarginConfig;
|
|
3006
|
+
/** Cabeçalho do documento */
|
|
3007
|
+
header?: string;
|
|
3008
|
+
/** Rodapé do documento */
|
|
3009
|
+
footer?: string;
|
|
3010
|
+
/** Marca d'água */
|
|
3011
|
+
watermark?: string;
|
|
3012
|
+
/** Configurações de fonte */
|
|
3013
|
+
font?: {
|
|
3014
|
+
family?: string;
|
|
3015
|
+
size?: number;
|
|
3016
|
+
};
|
|
3017
|
+
/** Quebra de página automática */
|
|
3018
|
+
autoPageBreak: boolean;
|
|
3019
|
+
}
|
|
3020
|
+
interface MarginConfig {
|
|
3021
|
+
top: number;
|
|
3022
|
+
right: number;
|
|
3023
|
+
bottom: number;
|
|
3024
|
+
left: number;
|
|
3025
|
+
}
|
|
3026
|
+
interface CsvExportConfig {
|
|
3027
|
+
/** Separador de campos */
|
|
3028
|
+
delimiter: ',' | ';' | '|' | '\t';
|
|
3029
|
+
/** Caractere de escape */
|
|
3030
|
+
escapeChar: string;
|
|
3031
|
+
/** Encoding do arquivo */
|
|
3032
|
+
encoding: 'utf-8' | 'utf-16' | 'iso-8859-1';
|
|
3033
|
+
/** Incluir BOM */
|
|
3034
|
+
includeBOM: boolean;
|
|
3035
|
+
}
|
|
3036
|
+
interface JsonExportConfig {
|
|
3037
|
+
/** Formato do JSON */
|
|
3038
|
+
format: 'pretty' | 'compact';
|
|
3039
|
+
/** Incluir metadados */
|
|
3040
|
+
includeMetadata: boolean;
|
|
3041
|
+
/** Estrutura dos dados */
|
|
3042
|
+
structure: 'array' | 'object';
|
|
3043
|
+
}
|
|
3044
|
+
interface ExportTemplate {
|
|
3045
|
+
/** ID único do template */
|
|
3046
|
+
id: string;
|
|
3047
|
+
/** Nome do template */
|
|
3048
|
+
name: string;
|
|
3049
|
+
/** Descrição */
|
|
3050
|
+
description?: string;
|
|
3051
|
+
/** Formato do template */
|
|
3052
|
+
format: ExportFormat;
|
|
3053
|
+
/** Configurações específicas */
|
|
3054
|
+
config: any;
|
|
3055
|
+
/** Template padrão do sistema */
|
|
3056
|
+
isDefault?: boolean;
|
|
3057
|
+
}
|
|
3058
|
+
interface MessagesConfig {
|
|
3059
|
+
/** Mensagens de estado */
|
|
3060
|
+
states?: StateMessagesConfig;
|
|
3061
|
+
/** Mensagens de ações */
|
|
3062
|
+
actions?: ActionMessagesConfig;
|
|
3063
|
+
/** Mensagens de validação */
|
|
3064
|
+
validation?: ValidationMessagesConfig;
|
|
3065
|
+
/** Mensagens de exportação */
|
|
3066
|
+
export?: ExportMessagesConfig;
|
|
3067
|
+
/** Mensagens customizadas */
|
|
3068
|
+
custom?: {
|
|
3069
|
+
[key: string]: string;
|
|
3070
|
+
};
|
|
3071
|
+
/** Templates de mensagem com interpolação */
|
|
3072
|
+
templates?: MessageTemplate[];
|
|
3073
|
+
}
|
|
3074
|
+
interface StateMessagesConfig {
|
|
3075
|
+
/** Carregando dados */
|
|
3076
|
+
loading: string;
|
|
3077
|
+
/** Nenhum dado disponível */
|
|
3078
|
+
empty: string;
|
|
3079
|
+
/** Erro ao carregar */
|
|
3080
|
+
error: string;
|
|
3081
|
+
/** Nenhum resultado encontrado */
|
|
3082
|
+
noResults: string;
|
|
3083
|
+
/** Carregando mais dados */
|
|
3084
|
+
loadingMore: string;
|
|
3085
|
+
/** Mensagens dinâmicas com contador */
|
|
3086
|
+
dynamic?: {
|
|
3087
|
+
/** Função para mensagem de loading com contagem */
|
|
3088
|
+
loadingWithCount?: (count: number) => string;
|
|
3089
|
+
/** Função para estado vazio com filtros */
|
|
3090
|
+
emptyWithFilter?: (filterCount: number) => string;
|
|
3091
|
+
/** Função para resultado de busca */
|
|
3092
|
+
searchResults?: (resultCount: number, searchTerm: string) => string;
|
|
3093
|
+
};
|
|
3094
|
+
}
|
|
3095
|
+
interface ActionMessagesConfig {
|
|
3096
|
+
/** Mensagens de confirmação */
|
|
3097
|
+
confirmations?: {
|
|
3098
|
+
delete: string;
|
|
3099
|
+
deleteMultiple: string;
|
|
3100
|
+
save: string;
|
|
3101
|
+
cancel: string;
|
|
3102
|
+
export: string;
|
|
3103
|
+
};
|
|
3104
|
+
/** Mensagens de sucesso */
|
|
3105
|
+
success?: {
|
|
3106
|
+
save: string;
|
|
3107
|
+
delete: string;
|
|
3108
|
+
export: string;
|
|
3109
|
+
import: string;
|
|
3110
|
+
};
|
|
3111
|
+
/** Mensagens de progresso */
|
|
3112
|
+
progress?: {
|
|
3113
|
+
delete: string;
|
|
3114
|
+
deleteMultiple: string;
|
|
3115
|
+
};
|
|
3116
|
+
/** Mensagens de cancelamento */
|
|
3117
|
+
canceled?: {
|
|
3118
|
+
delete: string;
|
|
3119
|
+
deleteMultiple: string;
|
|
3120
|
+
};
|
|
3121
|
+
/** Mensagens de erro */
|
|
3122
|
+
errors?: {
|
|
3123
|
+
save: string;
|
|
3124
|
+
delete: string;
|
|
3125
|
+
export: string;
|
|
3126
|
+
network: string;
|
|
3127
|
+
permission: string;
|
|
3128
|
+
};
|
|
3129
|
+
}
|
|
3130
|
+
interface ValidationMessagesConfig {
|
|
3131
|
+
/** Mensagens de validação de dados */
|
|
3132
|
+
required: string;
|
|
3133
|
+
invalid: string;
|
|
3134
|
+
tooLong: string;
|
|
3135
|
+
tooShort: string;
|
|
3136
|
+
/** Mensagens específicas por tipo */
|
|
3137
|
+
types?: {
|
|
3138
|
+
email: string;
|
|
3139
|
+
url: string;
|
|
3140
|
+
number: string;
|
|
3141
|
+
date: string;
|
|
3142
|
+
};
|
|
3143
|
+
}
|
|
3144
|
+
interface ExportMessagesConfig {
|
|
3145
|
+
/** Iniciando exportação */
|
|
3146
|
+
starting: string;
|
|
3147
|
+
/** Processando dados */
|
|
3148
|
+
processing: string;
|
|
3149
|
+
/** Download pronto */
|
|
3150
|
+
ready: string;
|
|
3151
|
+
/** Erro na exportação */
|
|
3152
|
+
error: string;
|
|
3153
|
+
/** Mensagens por formato */
|
|
3154
|
+
formats?: {
|
|
3155
|
+
excel: string;
|
|
3156
|
+
pdf: string;
|
|
3157
|
+
csv: string;
|
|
3158
|
+
json: string;
|
|
3159
|
+
};
|
|
3160
|
+
}
|
|
3161
|
+
interface MessageTemplate {
|
|
3162
|
+
/** ID único do template */
|
|
3163
|
+
id: string;
|
|
3164
|
+
/** Template da mensagem com placeholders */
|
|
3165
|
+
template: string;
|
|
3166
|
+
/** Variáveis disponíveis */
|
|
3167
|
+
variables?: string[];
|
|
3168
|
+
/** Função de interpolação customizada */
|
|
3169
|
+
interpolate?: (template: string, data: any) => string;
|
|
3170
|
+
}
|
|
3171
|
+
interface LocalizationConfig {
|
|
3172
|
+
/** Idioma principal */
|
|
3173
|
+
locale: string;
|
|
3174
|
+
/** Idiomas disponíveis */
|
|
3175
|
+
availableLocales?: string[];
|
|
3176
|
+
/** Direção do texto */
|
|
3177
|
+
direction: 'ltr' | 'rtl';
|
|
3178
|
+
/** Configurações de data/hora */
|
|
3179
|
+
dateTime?: DateTimeLocaleConfig;
|
|
3180
|
+
/** Configurações de números */
|
|
3181
|
+
number?: NumberLocaleConfig;
|
|
3182
|
+
/** Configurações de moeda */
|
|
3183
|
+
currency?: CurrencyLocaleConfig;
|
|
3184
|
+
/** Dicionário de traduções */
|
|
3185
|
+
translations?: {
|
|
3186
|
+
[locale: string]: {
|
|
3187
|
+
[key: string]: string;
|
|
3188
|
+
};
|
|
3189
|
+
};
|
|
3190
|
+
/** Configurações de formatação */
|
|
3191
|
+
formatting?: FormattingLocaleConfig;
|
|
3192
|
+
}
|
|
3193
|
+
interface DateTimeLocaleConfig {
|
|
3194
|
+
/** Formato de data padrão */
|
|
3195
|
+
dateFormat: string;
|
|
3196
|
+
/** Formato de hora padrão */
|
|
3197
|
+
timeFormat: string;
|
|
3198
|
+
/** Formato de data e hora */
|
|
3199
|
+
dateTimeFormat: string;
|
|
3200
|
+
/** Primeiro dia da semana (0 = domingo) */
|
|
3201
|
+
firstDayOfWeek: number;
|
|
3202
|
+
/** Nomes dos meses */
|
|
3203
|
+
monthNames?: string[];
|
|
3204
|
+
/** Nomes dos dias da semana */
|
|
3205
|
+
dayNames?: string[];
|
|
3206
|
+
/** Formato relativo (há 2 dias) */
|
|
3207
|
+
relativeTime?: boolean;
|
|
3208
|
+
}
|
|
3209
|
+
interface NumberLocaleConfig {
|
|
3210
|
+
/** Separador decimal */
|
|
3211
|
+
decimalSeparator: string;
|
|
3212
|
+
/** Separador de milhares */
|
|
3213
|
+
thousandsSeparator: string;
|
|
3214
|
+
/** Número de casas decimais padrão */
|
|
3215
|
+
defaultPrecision: number;
|
|
3216
|
+
/** Símbolo de negativo */
|
|
3217
|
+
negativeSign: string;
|
|
3218
|
+
/** Posição do símbolo de negativo */
|
|
3219
|
+
negativeSignPosition: 'before' | 'after';
|
|
3220
|
+
}
|
|
3221
|
+
interface CurrencyLocaleConfig {
|
|
3222
|
+
/** Código da moeda (ISO 4217) */
|
|
3223
|
+
code: string;
|
|
3224
|
+
/** Símbolo da moeda */
|
|
3225
|
+
symbol: string;
|
|
3226
|
+
/** Posição do símbolo */
|
|
3227
|
+
position: 'before' | 'after';
|
|
3228
|
+
/** Espaço entre símbolo e valor */
|
|
3229
|
+
spacing: boolean;
|
|
3230
|
+
/** Precisão padrão */
|
|
3231
|
+
precision: number;
|
|
3232
|
+
}
|
|
3233
|
+
interface FormattingLocaleConfig {
|
|
3234
|
+
/** Formato de porcentagem */
|
|
3235
|
+
percentageFormat: string;
|
|
3236
|
+
/** Formato de arquivos/tamanhos */
|
|
3237
|
+
fileSizeFormat: 'binary' | 'decimal';
|
|
3238
|
+
/** Unidades de medida */
|
|
3239
|
+
units?: {
|
|
3240
|
+
[type: string]: {
|
|
3241
|
+
[unit: string]: string;
|
|
3242
|
+
};
|
|
3243
|
+
};
|
|
3244
|
+
}
|
|
3245
|
+
interface DataConfig {
|
|
3246
|
+
/** Estratégia de carregamento */
|
|
3247
|
+
loadingStrategy: 'eager' | 'lazy' | 'on-demand';
|
|
3248
|
+
/** Configurações de cache */
|
|
3249
|
+
cache?: CacheConfig;
|
|
3250
|
+
/** Configurações de sincronização */
|
|
3251
|
+
sync?: SyncConfig;
|
|
3252
|
+
/** Configurações de validação */
|
|
3253
|
+
validation?: DataValidationConfig;
|
|
3254
|
+
/** Transformações de dados */
|
|
3255
|
+
transformations?: DataTransformation[];
|
|
3256
|
+
/** Configurações de polling */
|
|
3257
|
+
polling?: PollingConfig;
|
|
3258
|
+
}
|
|
3259
|
+
interface CacheConfig {
|
|
3260
|
+
/** Habilitar cache */
|
|
3261
|
+
enabled: boolean;
|
|
3262
|
+
/** Tempo de vida do cache (ms) */
|
|
3263
|
+
ttl: number;
|
|
3264
|
+
/** Tamanho máximo do cache */
|
|
3265
|
+
maxSize: number;
|
|
3266
|
+
/** Estratégia de invalidação */
|
|
3267
|
+
invalidationStrategy: 'ttl' | 'manual' | 'on-update';
|
|
3268
|
+
}
|
|
3269
|
+
interface SyncConfig {
|
|
3270
|
+
/** Sincronização automática */
|
|
3271
|
+
autoSync: boolean;
|
|
3272
|
+
/** Intervalo de sincronização (ms) */
|
|
3273
|
+
interval: number;
|
|
3274
|
+
/** Sincronizar apenas mudanças */
|
|
3275
|
+
deltaSync: boolean;
|
|
3276
|
+
/** Resolver conflitos */
|
|
3277
|
+
conflictResolution: 'client' | 'server' | 'manual';
|
|
3278
|
+
}
|
|
3279
|
+
interface DataValidationConfig {
|
|
3280
|
+
/** Validação no cliente */
|
|
3281
|
+
clientSide: boolean;
|
|
3282
|
+
/** Validação no servidor */
|
|
3283
|
+
serverSide: boolean;
|
|
3284
|
+
/** Regras de validação */
|
|
3285
|
+
rules?: ValidationRule[];
|
|
3286
|
+
/** Mostrar erros inline */
|
|
3287
|
+
showInlineErrors: boolean;
|
|
3288
|
+
}
|
|
3289
|
+
interface ValidationRule {
|
|
3290
|
+
/** Campo a validar */
|
|
3291
|
+
field: string;
|
|
3292
|
+
/** Tipo de validação */
|
|
3293
|
+
type: 'required' | 'format' | 'range' | 'custom';
|
|
3294
|
+
/** Parâmetros da validação */
|
|
3295
|
+
params?: any;
|
|
3296
|
+
/** Mensagem de erro */
|
|
3297
|
+
message: string;
|
|
3298
|
+
}
|
|
3299
|
+
interface DataTransformation {
|
|
3300
|
+
/** ID da transformação */
|
|
3301
|
+
id: string;
|
|
3302
|
+
/** Campo a transformar */
|
|
3303
|
+
field: string;
|
|
3304
|
+
/** Tipo de transformação */
|
|
3305
|
+
type: 'format' | 'calculate' | 'aggregate' | 'custom';
|
|
3306
|
+
/** Função de transformação */
|
|
3307
|
+
transform: string;
|
|
3308
|
+
/** Aplicar na exibição ou nos dados */
|
|
3309
|
+
applyTo: 'display' | 'data' | 'both';
|
|
3310
|
+
}
|
|
3311
|
+
interface PollingConfig {
|
|
3312
|
+
/** Habilitar polling */
|
|
3313
|
+
enabled: boolean;
|
|
3314
|
+
/** Intervalo de polling (ms) */
|
|
3315
|
+
interval: number;
|
|
3316
|
+
/** Polling apenas quando ativo */
|
|
3317
|
+
onlyWhenActive: boolean;
|
|
3318
|
+
/** Backoff exponencial em caso de erro */
|
|
3319
|
+
exponentialBackoff: boolean;
|
|
3320
|
+
}
|
|
3321
|
+
interface ThemeConfig {
|
|
3322
|
+
/** Tema principal */
|
|
3323
|
+
primary?: string;
|
|
3324
|
+
/** Tema secundário */
|
|
3325
|
+
secondary?: string;
|
|
3326
|
+
/** Modo escuro */
|
|
3327
|
+
darkMode?: boolean;
|
|
3328
|
+
/** Tema customizado */
|
|
3329
|
+
custom?: {
|
|
3330
|
+
[property: string]: string;
|
|
3331
|
+
};
|
|
3332
|
+
/** Variáveis CSS personalizadas */
|
|
3333
|
+
cssVariables?: {
|
|
3334
|
+
[variable: string]: string;
|
|
3335
|
+
};
|
|
3336
|
+
}
|
|
3337
|
+
interface PerformanceConfig {
|
|
3338
|
+
/** Configurações de virtualização */
|
|
3339
|
+
virtualization?: VirtualizationConfig;
|
|
3340
|
+
/** Configurações de debounce */
|
|
3341
|
+
debounce?: DebounceConfig;
|
|
3342
|
+
/** Configurações de memória */
|
|
3343
|
+
memory?: MemoryConfig;
|
|
3344
|
+
/** Otimizações de renderização */
|
|
3345
|
+
rendering?: RenderingConfig;
|
|
3346
|
+
/** Lazy loading de recursos */
|
|
3347
|
+
lazyLoading?: LazyLoadingConfig;
|
|
3348
|
+
}
|
|
3349
|
+
interface DebounceConfig {
|
|
3350
|
+
/** Debounce para busca (ms) */
|
|
3351
|
+
search: number;
|
|
3352
|
+
/** Debounce para filtros (ms) */
|
|
3353
|
+
filter: number;
|
|
3354
|
+
/** Debounce para redimensionamento (ms) */
|
|
3355
|
+
resize: number;
|
|
3356
|
+
/** Debounce para scroll (ms) */
|
|
3357
|
+
scroll: number;
|
|
3358
|
+
}
|
|
3359
|
+
interface MemoryConfig {
|
|
3360
|
+
/** Máximo de linhas em memória */
|
|
3361
|
+
maxRows: number;
|
|
3362
|
+
/** Limpeza automática */
|
|
3363
|
+
autoCleanup: boolean;
|
|
3364
|
+
/** Intervalo de limpeza (ms) */
|
|
3365
|
+
cleanupInterval: number;
|
|
3366
|
+
}
|
|
3367
|
+
interface RenderingConfig {
|
|
3368
|
+
/** Usar requestAnimationFrame */
|
|
3369
|
+
useRAF: boolean;
|
|
3370
|
+
/** Batch de updates */
|
|
3371
|
+
batchUpdates: boolean;
|
|
3372
|
+
/** Tamanho do batch */
|
|
3373
|
+
batchSize: number;
|
|
3374
|
+
/** Otimizar re-renders */
|
|
3375
|
+
optimizeReRenders: boolean;
|
|
3376
|
+
}
|
|
3377
|
+
interface LazyLoadingConfig {
|
|
3378
|
+
/** Lazy loading de imagens */
|
|
3379
|
+
images: boolean;
|
|
3380
|
+
/** Lazy loading de componentes */
|
|
3381
|
+
components: boolean;
|
|
3382
|
+
/** Distância para carregar (px) */
|
|
3383
|
+
threshold: number;
|
|
3384
|
+
}
|
|
3385
|
+
interface PluginConfig {
|
|
3386
|
+
/** ID único do plugin */
|
|
3387
|
+
id: string;
|
|
3388
|
+
/** Nome do plugin */
|
|
3389
|
+
name: string;
|
|
3390
|
+
/** Versão do plugin */
|
|
3391
|
+
version: string;
|
|
3392
|
+
/** Plugin habilitado */
|
|
3393
|
+
enabled: boolean;
|
|
3394
|
+
/** Configurações específicas do plugin */
|
|
3395
|
+
settings?: any;
|
|
3396
|
+
/** Hooks do plugin */
|
|
3397
|
+
hooks?: {
|
|
3398
|
+
[eventName: string]: string;
|
|
3399
|
+
};
|
|
3400
|
+
}
|
|
3401
|
+
interface AccessibilityConfig {
|
|
3402
|
+
/** Habilitar recursos de acessibilidade */
|
|
3403
|
+
enabled: boolean;
|
|
3404
|
+
/** Anúncios para screen readers */
|
|
3405
|
+
announcements?: AnnouncementConfig;
|
|
3406
|
+
/** Navegação por teclado */
|
|
3407
|
+
keyboard?: KeyboardAccessibilityConfig;
|
|
3408
|
+
/** Contraste alto */
|
|
3409
|
+
highContrast?: boolean;
|
|
3410
|
+
/** Reduzir movimento */
|
|
3411
|
+
reduceMotion?: boolean;
|
|
3412
|
+
/** Labels ARIA personalizados */
|
|
3413
|
+
ariaLabels?: {
|
|
3414
|
+
[key: string]: string;
|
|
3415
|
+
};
|
|
3416
|
+
}
|
|
3417
|
+
interface AnnouncementConfig {
|
|
3418
|
+
/** Anunciar mudanças de dados */
|
|
3419
|
+
dataChanges: boolean;
|
|
3420
|
+
/** Anunciar ações do usuário */
|
|
3421
|
+
userActions: boolean;
|
|
3422
|
+
/** Anunciar estados de carregamento */
|
|
3423
|
+
loadingStates: boolean;
|
|
3424
|
+
/** Região live para anúncios */
|
|
3425
|
+
liveRegion: 'polite' | 'assertive';
|
|
3426
|
+
}
|
|
3427
|
+
interface KeyboardAccessibilityConfig {
|
|
3428
|
+
/** Navegação com Tab */
|
|
3429
|
+
tabNavigation: boolean;
|
|
3430
|
+
/** Navegação com setas */
|
|
3431
|
+
arrowNavigation: boolean;
|
|
3432
|
+
/** Atalhos de teclado */
|
|
3433
|
+
shortcuts: boolean;
|
|
3434
|
+
/** Skip links */
|
|
3435
|
+
skipLinks: boolean;
|
|
3436
|
+
/** Focus trap em modais */
|
|
3437
|
+
focusTrap: boolean;
|
|
3438
|
+
}
|
|
3439
|
+
/**
|
|
3440
|
+
* Configuração principal da tabela - Nova arquitetura v2.0
|
|
3441
|
+
* Estrutura modular alinhada com as 5 abas do editor
|
|
3442
|
+
* Preparada para crescimento exponencial
|
|
3443
|
+
*/
|
|
3444
|
+
interface TableConfigV2 {
|
|
3445
|
+
/** Metadados da configuração */
|
|
3446
|
+
meta?: ConfigMetadata;
|
|
3447
|
+
/** Definições de colunas */
|
|
3448
|
+
columns: ColumnDefinition[];
|
|
3449
|
+
/**
|
|
3450
|
+
* Projeção opcional das colunas a partir de `/schemas/filtered`.
|
|
3451
|
+
* Quando habilitada, `columns` é materializado pelo runtime e os overrides
|
|
3452
|
+
* são reaplicados a cada atualização do schema.
|
|
3453
|
+
*/
|
|
3454
|
+
columnProjection?: TableSchemaColumnProjectionConfig;
|
|
3455
|
+
/** Comportamento geral da tabela (Aba: Visão Geral & Comportamento) */
|
|
3456
|
+
behavior?: TableBehaviorConfig;
|
|
3457
|
+
/** Configurações de faixa declarativa de KPIs / resumo executivo (Issue #33) */
|
|
3458
|
+
kpiBand?: PraxisKpiBandConfig;
|
|
3459
|
+
/** Configurações de campos computados / propriedades virtuais na ingestão (Issue #34) */
|
|
3460
|
+
computedFields?: PraxisComputedFieldsConfig;
|
|
3461
|
+
/** Configurações de aparência e layout (Aba: Visão Geral & Comportamento) */
|
|
3462
|
+
appearance?: TableAppearanceConfig;
|
|
3463
|
+
/** Barra de ferramentas (Aba: Barra de Ferramentas & Ações) */
|
|
3464
|
+
toolbar?: ToolbarConfig;
|
|
3465
|
+
/** Ações por linha e em lote (Aba: Barra de Ferramentas & Ações) */
|
|
3466
|
+
actions?: TableActionsConfig;
|
|
3467
|
+
/** Configuracoes de IA do runtime da tabela */
|
|
3468
|
+
ai?: TableAiConfig;
|
|
3469
|
+
/** Configurações de exportação (Aba: Barra de Ferramentas & Ações) */
|
|
3470
|
+
export?: ExportConfig;
|
|
3471
|
+
/** Mensagens personalizadas (Aba: Mensagens & Localização) */
|
|
3472
|
+
messages?: MessagesConfig;
|
|
3473
|
+
/** Localização e i18n (Aba: Mensagens & Localização) */
|
|
3474
|
+
localization?: LocalizationConfig;
|
|
3475
|
+
/** Configurações avançadas de dados */
|
|
3476
|
+
data?: DataConfig;
|
|
3477
|
+
/** Temas e customização visual */
|
|
3478
|
+
theme?: ThemeConfig;
|
|
3479
|
+
/** Configurações de performance */
|
|
3480
|
+
performance?: PerformanceConfig;
|
|
3481
|
+
/** Plugins e extensões */
|
|
3482
|
+
plugins?: PluginConfig[];
|
|
3483
|
+
/** Configurações de acessibilidade */
|
|
3484
|
+
accessibility?: AccessibilityConfig;
|
|
3485
|
+
/**
|
|
3486
|
+
* Regras de estilo condicionais aplicadas à linha inteira (escopo global)
|
|
3487
|
+
*/
|
|
3488
|
+
rowConditionalStyles?: Array<{
|
|
3489
|
+
condition: JsonLogicExpression | null;
|
|
3490
|
+
/** Referencia semantica versionada; a classe CSS correspondente e privada do runtime. */
|
|
3491
|
+
surfacePresetRef?: {
|
|
3492
|
+
id: string;
|
|
3493
|
+
catalogVersion: string;
|
|
3494
|
+
};
|
|
3495
|
+
/** Efeitos visuais canonicos produzidos pelo editor de regras da Table. */
|
|
3496
|
+
effects?: Array<Record<string, unknown>>;
|
|
3497
|
+
cssClass?: string;
|
|
3498
|
+
style?: {
|
|
3499
|
+
[key: string]: string;
|
|
3500
|
+
};
|
|
3501
|
+
description?: string;
|
|
3502
|
+
}>;
|
|
3503
|
+
/** Regras condicionais de linha para tooltip e animacao derivados de efeitos visuais. */
|
|
3504
|
+
rowConditionalRenderers?: Array<{
|
|
3505
|
+
/** Identificador estável usado para reconciliação e deduplicação de regras authoradas. */
|
|
3506
|
+
id?: string;
|
|
3507
|
+
condition: JsonLogicExpression | null;
|
|
3508
|
+
tooltip?: Record<string, unknown>;
|
|
3509
|
+
animation?: Record<string, unknown>;
|
|
3510
|
+
/** Efeitos visuais canonicos que podem produzir tooltip ou animacao de linha. */
|
|
3511
|
+
effects?: Array<Record<string, unknown>>;
|
|
3512
|
+
description?: string;
|
|
3513
|
+
enabled?: boolean;
|
|
3514
|
+
}>;
|
|
3515
|
+
/** Estado serializado do construtor para regras de linha (round‑trip) */
|
|
3516
|
+
_rowStyleRulesState?: any;
|
|
3517
|
+
}
|
|
3518
|
+
|
|
3519
|
+
type ValuePresentationType = 'string' | 'number' | 'currency' | 'percentage' | 'date' | 'datetime' | 'time' | 'boolean';
|
|
3520
|
+
type ValuePresentationStyle = 'default' | 'short' | 'medium' | 'long' | 'full' | 'compact';
|
|
3521
|
+
interface ValuePresentationConfig {
|
|
3522
|
+
type: ValuePresentationType;
|
|
3523
|
+
style?: ValuePresentationStyle;
|
|
3524
|
+
format?: string;
|
|
3525
|
+
currency?: Partial<CurrencyLocaleConfig>;
|
|
3526
|
+
number?: Partial<NumberLocaleConfig>;
|
|
3527
|
+
}
|
|
3528
|
+
|
|
3529
|
+
/**
|
|
3530
|
+
* Enum que define os tipos de dados (`TYPE`) disponíveis para configuração dos campos de formulário.
|
|
3531
|
+
*/
|
|
3532
|
+
declare const FieldDataType: {
|
|
3533
|
+
readonly TEXT: "text";
|
|
3534
|
+
readonly NUMBER: "number";
|
|
3535
|
+
readonly EMAIL: "email";
|
|
3536
|
+
readonly DATE: "date";
|
|
3537
|
+
readonly PASSWORD: "password";
|
|
3538
|
+
readonly FILE: "file";
|
|
3539
|
+
readonly URL: "url";
|
|
3540
|
+
readonly BOOLEAN: "boolean";
|
|
3541
|
+
readonly ARRAY: "array";
|
|
3542
|
+
readonly JSON: "json";
|
|
3543
|
+
};
|
|
3544
|
+
type FieldDataType = typeof FieldDataType[keyof typeof FieldDataType];
|
|
3545
|
+
|
|
3546
|
+
/**
|
|
3547
|
+
* Enum que define os tipos de controle (`CONTROL_TYPE`) disponíveis para a apresentação dos campos de formulário.
|
|
3548
|
+
*
|
|
3549
|
+
* O `CONTROL_TYPE` especifica o tipo de elemento de UI (User Interface) que será usado para capturar ou exibir dados do campo.
|
|
3550
|
+
* Essa configuração permite que a camada de apresentação saiba como renderizar o campo e oferecer a interação adequada ao usuário.
|
|
3551
|
+
* Em casos onde o `CONTROL_TYPE` não é especificado, a camada de apresentação pode usar o valor de `TYPE` (definido em `FieldDataType`)
|
|
3552
|
+
* para decidir o controle mais adequado de forma automática.
|
|
3553
|
+
*/
|
|
3554
|
+
declare const FieldControlType: {
|
|
3555
|
+
readonly AI_PROMPT: "aiPrompt";
|
|
3556
|
+
readonly APP_BAR: "appBar";
|
|
3557
|
+
readonly ARC_GAUGE: "arcGauge";
|
|
3558
|
+
readonly ARRAY_INPUT: "array";
|
|
3559
|
+
readonly ASYNC_SELECT: "async-select";
|
|
3560
|
+
readonly AUTO_COMPLETE: "autoComplete";
|
|
3561
|
+
readonly AVATAR: "avatar";
|
|
3562
|
+
readonly BARCODE_GENERATOR: "barcodeGenerator";
|
|
3563
|
+
readonly BOTTOM_NAVIGATION: "bottomNavigation";
|
|
3564
|
+
readonly BREADCRUMB: "breadcrumb";
|
|
3565
|
+
readonly BUTTON: "button";
|
|
3566
|
+
readonly BUTTON_TOGGLE: "buttonToggle";
|
|
3567
|
+
readonly CALENDAR: "calendar";
|
|
3568
|
+
readonly CARD: "card";
|
|
3569
|
+
readonly CHECKBOX: "checkbox";
|
|
3570
|
+
readonly CHIP_INPUT: "chipInput";
|
|
3571
|
+
readonly CHIP_LIST: "chipList";
|
|
3572
|
+
readonly CIRCULAR_GAUGE: "circularGauge";
|
|
3573
|
+
readonly COLOR_GRADIENT: "colorGradient";
|
|
3574
|
+
readonly CPF_CNPJ_INPUT: "cpfCnpjInput";
|
|
3575
|
+
readonly COLOR_PALETTE: "colorPalette";
|
|
3576
|
+
readonly COLOR_PICKER: "colorPicker";
|
|
3577
|
+
readonly COLOR_INPUT: "color";
|
|
3578
|
+
readonly CRON_BUILDER: "cronBuilder";
|
|
3579
|
+
readonly CONTEXT_MENU: "contextMenu";
|
|
3580
|
+
readonly CONVERSATIONAL_UI: "conversationalUI";
|
|
3581
|
+
readonly CURRENCY_INPUT: "currency";
|
|
3582
|
+
readonly DATE_INPUT: "dateInput";
|
|
3583
|
+
readonly DATE_PICKER: "date";
|
|
3584
|
+
readonly DATE_RANGE: "dateRange";
|
|
3585
|
+
readonly DATE_TIME_PICKER: "dateTime";
|
|
3586
|
+
readonly DATE_TIME_RANGE: "dateTimeRange";
|
|
3587
|
+
readonly DATETIME_LOCAL_INPUT: "dateTimeLocal";
|
|
3588
|
+
readonly DIALOG: "dialog";
|
|
3589
|
+
readonly DRAWER: "drawer";
|
|
3590
|
+
readonly DROP_DOWN_TREE: "dropDownTree";
|
|
3591
|
+
readonly EMAIL_INPUT: "email";
|
|
3592
|
+
readonly ENTITY_LOOKUP: "entityLookup";
|
|
3593
|
+
readonly EXPANSION_PANEL: "expansionPanel";
|
|
3594
|
+
readonly FILE_SAVER: "fileSaver";
|
|
3595
|
+
readonly FILE_SELECT: "fileSelect";
|
|
3596
|
+
readonly FILE_UPLOAD: "upload";
|
|
3597
|
+
readonly FILTER: "filter";
|
|
3598
|
+
readonly FLOATING_LABEL: "floatingLabel";
|
|
3599
|
+
readonly FLOATING_ACTION_BUTTON: "floatingActionButton";
|
|
3600
|
+
readonly GRID: "grid";
|
|
3601
|
+
readonly GRID_LAYOUT: "gridLayout";
|
|
3602
|
+
readonly INPUT: "input";
|
|
3603
|
+
readonly INLINE_SELECT: "inlineSelect";
|
|
3604
|
+
readonly INLINE_SEARCHABLE_SELECT: "inlineSearchableSelect";
|
|
3605
|
+
readonly INLINE_ASYNC_SELECT: "inlineAsyncSelect";
|
|
3606
|
+
readonly INLINE_ENTITY_LOOKUP: "inlineEntityLookup";
|
|
3607
|
+
readonly INLINE_AUTOCOMPLETE: "inlineAutocomplete";
|
|
3608
|
+
readonly INLINE_INPUT: "inlineInput";
|
|
3609
|
+
readonly INLINE_PHONE: "inlinePhone";
|
|
3610
|
+
readonly INLINE_NUMBER: "inlineNumber";
|
|
3611
|
+
readonly INLINE_CURRENCY: "inlineCurrency";
|
|
3612
|
+
readonly INLINE_CURRENCY_RANGE: "inlineCurrencyRange";
|
|
3613
|
+
readonly INLINE_MULTISELECT: "inlineMultiSelect";
|
|
3614
|
+
readonly INLINE_TOGGLE: "inlineToggle";
|
|
3615
|
+
readonly INLINE_RANGE: "inlineRange";
|
|
3616
|
+
readonly INLINE_PERIOD_RANGE: "inlinePeriodRange";
|
|
3617
|
+
readonly INLINE_YEAR_RANGE: "inlineYearRange";
|
|
3618
|
+
readonly INLINE_MONTH_RANGE: "inlineMonthRange";
|
|
3619
|
+
readonly INLINE_DATE: "inlineDate";
|
|
3620
|
+
readonly INLINE_DATE_RANGE: "inlineDateRange";
|
|
3621
|
+
readonly INLINE_TIME: "inlineTime";
|
|
3622
|
+
readonly INLINE_TIME_RANGE: "inlineTimeRange";
|
|
3623
|
+
readonly INLINE_TREE_SELECT: "inlineTreeSelect";
|
|
3624
|
+
readonly INLINE_RATING: "inlineRating";
|
|
3625
|
+
readonly INLINE_DISTANCE_RADIUS: "inlineDistanceRadius";
|
|
3626
|
+
readonly INLINE_PIPELINE_STATUS: "inlinePipelineStatus";
|
|
3627
|
+
readonly INLINE_SCORE_PRIORITY: "inlineScorePriority";
|
|
3628
|
+
readonly INLINE_RELATIVE_PERIOD: "inlineRelativePeriod";
|
|
3629
|
+
readonly INLINE_SENTIMENT: "inlineSentiment";
|
|
3630
|
+
readonly INLINE_COLOR_LABEL: "inlineColorLabel";
|
|
3631
|
+
readonly LINEAR_GAUGE: "linearGauge";
|
|
3632
|
+
readonly LIST_VIEW: "listView";
|
|
3633
|
+
readonly MAP: "map";
|
|
3634
|
+
readonly MASKED_TEXT_BOX: "maskedTextBox";
|
|
3635
|
+
readonly MONTH_INPUT: "month";
|
|
3636
|
+
readonly MULTI_COLUMN_COMBO_BOX: "multiColumnComboBox";
|
|
3637
|
+
readonly MULTI_SELECT: "multiSelect";
|
|
3638
|
+
readonly MULTI_SELECT_TREE: "multiSelectTree";
|
|
3639
|
+
readonly TRANSFER_LIST: "transferList";
|
|
3640
|
+
readonly NOTIFICATION: "notification";
|
|
3641
|
+
readonly NUMERIC_TEXT_BOX: "numericTextBox";
|
|
3642
|
+
readonly PAGER: "pager";
|
|
3643
|
+
readonly PAGINATOR: "paginator";
|
|
3644
|
+
readonly PASSWORD: "password";
|
|
3645
|
+
readonly PDF_VIEWER: "pdfViewer";
|
|
3646
|
+
readonly PHONE: "phone";
|
|
3647
|
+
readonly PIVOT_GRID: "pivotGrid";
|
|
3648
|
+
readonly POPUP: "popup";
|
|
3649
|
+
readonly PROGRESS_BAR: "progressBar";
|
|
3650
|
+
readonly PROGRESS_SPINNER: "progressSpinner";
|
|
3651
|
+
readonly QR_CODE: "qrCode";
|
|
3652
|
+
readonly RADIO: "radio";
|
|
3653
|
+
readonly RADIAL_GAUGE: "radialGauge";
|
|
3654
|
+
readonly RANGE_SLIDER: "rangeSlider";
|
|
3655
|
+
readonly PRICE_RANGE: "priceRange";
|
|
3656
|
+
readonly RATING: "rating";
|
|
3657
|
+
readonly RICH_TEXT_EDITOR: "richTextEditor";
|
|
3658
|
+
readonly RIPPLE: "ripple";
|
|
3659
|
+
readonly SCROLL_VIEW: "scrollView";
|
|
3660
|
+
readonly SEARCH_INPUT: "search";
|
|
3661
|
+
readonly SEARCHABLE_SELECT: "searchable-select";
|
|
3662
|
+
readonly SELECTION_LIST: "selectionList";
|
|
3663
|
+
readonly SELECT: "select";
|
|
3664
|
+
readonly SIGNATURE: "signature";
|
|
3665
|
+
readonly SLIDER: "slider";
|
|
3666
|
+
readonly SORTABLE: "sortable";
|
|
3667
|
+
readonly SORTABLE_TABLE: "sortableTable";
|
|
3668
|
+
readonly SPLITTER: "splitter";
|
|
3669
|
+
readonly SPREADSHEET: "spreadsheet";
|
|
3670
|
+
readonly STACK_LAYOUT: "stackLayout";
|
|
3671
|
+
readonly STEP_BAR: "stepBar";
|
|
3672
|
+
readonly STEPPER: "stepper";
|
|
3673
|
+
readonly SVG_ICON: "svgIcon";
|
|
3674
|
+
readonly TABS: "tabs";
|
|
3675
|
+
readonly TEXTAREA: "textarea";
|
|
3676
|
+
readonly TIME_INPUT: "time";
|
|
3677
|
+
readonly TIME_PICKER: "timePicker";
|
|
3678
|
+
readonly TIME_RANGE: "timeRange";
|
|
3679
|
+
readonly TIMELINE: "timeline";
|
|
3680
|
+
readonly TOGGLE: "toggle";
|
|
3681
|
+
readonly TOOLBAR: "toolbar";
|
|
3682
|
+
readonly TOOLTIP: "tooltip";
|
|
3683
|
+
readonly TREE_VIEW: "treeView";
|
|
3684
|
+
readonly TREE_SELECT: "treeSelect";
|
|
3685
|
+
readonly TYPOGRAPHY: "typography";
|
|
3686
|
+
readonly URL_INPUT: "url";
|
|
3687
|
+
readonly WEEK_INPUT: "week";
|
|
3688
|
+
readonly WINDOW: "window";
|
|
3689
|
+
readonly YEAR_INPUT: "year";
|
|
3690
|
+
};
|
|
3691
|
+
type FieldControlType = (typeof FieldControlType)[keyof typeof FieldControlType];
|
|
3692
|
+
|
|
3693
|
+
type FormFieldHelpDisplay = 'auto' | 'inline' | 'popover' | 'hidden';
|
|
3694
|
+
|
|
3695
|
+
/**
|
|
3696
|
+
* @fileoverview Base metadata interfaces for dynamic Angular Material components
|
|
3697
|
+
*
|
|
3698
|
+
* This file implements a hierarchical system of metadata interfaces designed for
|
|
3699
|
+
* maximum flexibility, type safety, and Angular Material integration.
|
|
3700
|
+
*
|
|
3701
|
+
* Architecture:
|
|
3702
|
+
* - ComponentMetadata (universal base)
|
|
3703
|
+
* - FieldMetadata (form fields)
|
|
3704
|
+
* - Specialized interfaces (MaterialInput, MaterialSelect, etc.)
|
|
3705
|
+
*
|
|
3706
|
+
* Design Principles:
|
|
3707
|
+
* - Configuration over Code
|
|
3708
|
+
* - JSON serializable
|
|
3709
|
+
* - Type-safe with strict TypeScript
|
|
3710
|
+
* - Backward compatible
|
|
3711
|
+
* - Angular Material 3 native support
|
|
3712
|
+
*/
|
|
3713
|
+
|
|
3714
|
+
/**
|
|
3715
|
+
* Universal base interface for all dynamic components.
|
|
3716
|
+
*
|
|
3717
|
+
* Provides maximum extensibility through index signature while maintaining
|
|
3718
|
+
* essential metadata properties for component lifecycle management.
|
|
3719
|
+
*
|
|
3720
|
+
* @example
|
|
3721
|
+
* ```typescript
|
|
3722
|
+
* const buttonMetadata: ComponentMetadata = {
|
|
3723
|
+
* id: 'submit-btn',
|
|
3724
|
+
* version: '1.0.0',
|
|
3725
|
+
* context: 'form',
|
|
3726
|
+
* customProperty: 'any value'
|
|
3727
|
+
* };
|
|
3728
|
+
* ```
|
|
3729
|
+
*/
|
|
3730
|
+
interface ComponentMetadata {
|
|
3731
|
+
/** Unique identifier for the component instance */
|
|
3732
|
+
id?: string;
|
|
3733
|
+
/** Metadata schema version for migration support */
|
|
3734
|
+
version?: string;
|
|
3735
|
+
/** Application context where component is used */
|
|
3736
|
+
context?: 'form' | 'filter' | 'table' | 'dialog' | 'standalone';
|
|
3737
|
+
/** Timestamp when metadata was created */
|
|
3738
|
+
createdAt?: string;
|
|
3739
|
+
/** Timestamp when metadata was last updated */
|
|
3740
|
+
updatedAt?: string;
|
|
3741
|
+
/** Tags for categorization and filtering */
|
|
3742
|
+
tags?: string[];
|
|
3743
|
+
/** Custom CSS classes to apply to the component */
|
|
3744
|
+
cssClass?: string;
|
|
3745
|
+
/** Inline styles as CSS properties object */
|
|
3746
|
+
style?: Record<string, string>;
|
|
3747
|
+
/** Data attributes for testing or analytics */
|
|
3748
|
+
dataAttributes?: Record<string, string>;
|
|
3749
|
+
/** Extensibility: allow any additional properties */
|
|
3750
|
+
[key: string]: any;
|
|
3751
|
+
}
|
|
3752
|
+
/**
|
|
3753
|
+
* Enhanced validation configuration for comprehensive field validation.
|
|
3754
|
+
*
|
|
3755
|
+
* Supports both built-in Angular validators and custom validation logic
|
|
3756
|
+
* with internationalization support for error messages.
|
|
3757
|
+
*/
|
|
3758
|
+
interface ValidatorOptions {
|
|
3759
|
+
/** Field is required */
|
|
3760
|
+
required?: boolean;
|
|
3761
|
+
/** Custom message for required validation */
|
|
3762
|
+
requiredMessage?: string;
|
|
3763
|
+
/** Minimum text length */
|
|
3764
|
+
minLength?: number;
|
|
3765
|
+
/** Custom message for minLength validation */
|
|
3766
|
+
minLengthMessage?: string;
|
|
3767
|
+
/** Maximum text length */
|
|
3768
|
+
maxLength?: number;
|
|
3769
|
+
/** Custom message for maxLength validation */
|
|
3770
|
+
maxLengthMessage?: string;
|
|
3771
|
+
/** Minimum numeric value */
|
|
3772
|
+
min?: number;
|
|
3773
|
+
/** Custom message for min validation */
|
|
3774
|
+
minMessage?: string;
|
|
3775
|
+
/** Maximum numeric value */
|
|
3776
|
+
max?: number;
|
|
3777
|
+
/** Custom message for max validation */
|
|
3778
|
+
maxMessage?: string;
|
|
3779
|
+
/** RegExp pattern for validation */
|
|
3780
|
+
pattern?: string | RegExp;
|
|
3781
|
+
/** Custom message for pattern validation */
|
|
3782
|
+
patternMessage?: string;
|
|
3783
|
+
/** Custom message for legacy CPF validation */
|
|
3784
|
+
cpfMessage?: string;
|
|
3785
|
+
/** Custom message for legacy CNPJ validation */
|
|
3786
|
+
cnpjMessage?: string;
|
|
3787
|
+
/** Custom message for alphanumeric CNPJ validation */
|
|
3788
|
+
cnpjAlphaMessage?: string;
|
|
3789
|
+
/** Built-in legacy CPF validation */
|
|
3790
|
+
cpf?: boolean;
|
|
3791
|
+
/** Built-in legacy CNPJ validation */
|
|
3792
|
+
cnpj?: boolean;
|
|
3793
|
+
/** Built-in auto-detect CPF/CNPJ validation */
|
|
3794
|
+
cpfCnpj?: boolean;
|
|
3795
|
+
/** Built-in alphanumeric CNPJ validation */
|
|
3796
|
+
cnpjAlpha?: boolean;
|
|
3797
|
+
/** Built-in email validation */
|
|
3798
|
+
email?: boolean;
|
|
3799
|
+
/** Custom message for email validation */
|
|
3800
|
+
emailMessage?: string;
|
|
3801
|
+
/** Built-in URL validation */
|
|
3802
|
+
url?: boolean;
|
|
3803
|
+
/** Custom message for URL validation */
|
|
3804
|
+
urlMessage?: string;
|
|
3805
|
+
/** Minimum number of words for text content */
|
|
3806
|
+
minWords?: number;
|
|
3807
|
+
/** Require checkbox to be checked (for checkbox fields) */
|
|
3808
|
+
requiredChecked?: boolean;
|
|
3809
|
+
/** Custom synchronous validator function */
|
|
3810
|
+
customValidator?: (value: any, context?: any) => boolean | string | null;
|
|
3811
|
+
/** Custom asynchronous validator function */
|
|
3812
|
+
asyncValidator?: (value: any, context?: any) => Promise<boolean | string | null>;
|
|
3813
|
+
/** Cross-field validation - must match another field */
|
|
3814
|
+
matchField?: string;
|
|
3815
|
+
/** Custom message for field matching validation */
|
|
3816
|
+
matchFieldMessage?: string;
|
|
3817
|
+
/** Unique value validation via API call */
|
|
3818
|
+
uniqueValidator?: (value: any) => Promise<boolean>;
|
|
3819
|
+
/** Custom message for unique validation */
|
|
3820
|
+
uniqueMessage?: string;
|
|
3821
|
+
/** Conditional validation rules driven by canonical Json Logic. */
|
|
3822
|
+
conditionalValidation?: ConditionalValidationRule[];
|
|
3823
|
+
/** When to trigger validation */
|
|
3824
|
+
validationTrigger?: 'change' | 'blur' | 'submit' | 'immediate';
|
|
3825
|
+
/** Debounce time for validation in milliseconds */
|
|
3826
|
+
validationDebounce?: number;
|
|
3827
|
+
/** Show validation errors inline */
|
|
3828
|
+
showInlineErrors?: boolean;
|
|
3829
|
+
/** Custom error display position */
|
|
3830
|
+
errorPosition?: 'bottom' | 'top' | 'tooltip';
|
|
3831
|
+
}
|
|
3832
|
+
interface ConditionalValidationRule {
|
|
3833
|
+
/** Canonical Json Logic guard evaluated against the `form` root. */
|
|
3834
|
+
condition: JsonLogicExpression | null;
|
|
3835
|
+
/** Validators applied when the guard resolves to true. */
|
|
3836
|
+
validators: Omit<ValidatorOptions, 'conditionalValidation'>;
|
|
3837
|
+
}
|
|
3838
|
+
interface FieldArrayOperations {
|
|
3839
|
+
add?: boolean;
|
|
3840
|
+
edit?: boolean;
|
|
3841
|
+
remove?: boolean;
|
|
3842
|
+
[key: string]: any;
|
|
3843
|
+
}
|
|
3844
|
+
interface FieldArrayCollectionValidation {
|
|
3845
|
+
uniqueBy?: string[];
|
|
3846
|
+
exactlyOne?: {
|
|
3847
|
+
field: string;
|
|
3848
|
+
value?: any;
|
|
3849
|
+
message?: string;
|
|
3850
|
+
};
|
|
3851
|
+
atLeastOne?: {
|
|
3852
|
+
field: string;
|
|
3853
|
+
value?: any;
|
|
3854
|
+
message?: string;
|
|
3855
|
+
};
|
|
3856
|
+
sumEquals?: {
|
|
3857
|
+
field: string;
|
|
3858
|
+
targetField?: string;
|
|
3859
|
+
value?: number;
|
|
3860
|
+
message?: string;
|
|
3861
|
+
};
|
|
3862
|
+
[key: string]: any;
|
|
3863
|
+
}
|
|
3864
|
+
interface FieldArrayConfig {
|
|
3865
|
+
itemType?: 'object';
|
|
3866
|
+
mode?: 'cards';
|
|
3867
|
+
itemSchemaRef?: string;
|
|
3868
|
+
itemIdentityField?: string;
|
|
3869
|
+
minItems?: number;
|
|
3870
|
+
maxItems?: number;
|
|
3871
|
+
addLabel?: string;
|
|
3872
|
+
emptyState?: string;
|
|
3873
|
+
itemTitleTemplate?: string;
|
|
3874
|
+
operations?: FieldArrayOperations;
|
|
3875
|
+
deleteMode?: 'removeFromPayload';
|
|
3876
|
+
itemSchema?: {
|
|
3877
|
+
fields?: FieldMetadata[];
|
|
3878
|
+
properties?: Record<string, any>;
|
|
3879
|
+
[key: string]: any;
|
|
3880
|
+
};
|
|
3881
|
+
collectionValidation?: FieldArrayCollectionValidation;
|
|
3882
|
+
[key: string]: any;
|
|
3883
|
+
}
|
|
3884
|
+
/**
|
|
3885
|
+
* Configuration for field options in selection components.
|
|
3886
|
+
*
|
|
3887
|
+
* Supports both static arrays and dynamic loading from APIs
|
|
3888
|
+
* with flexible data transformation capabilities.
|
|
3889
|
+
*/
|
|
3890
|
+
interface FieldOption {
|
|
3891
|
+
/** The actual value to be stored */
|
|
3892
|
+
value: any;
|
|
3893
|
+
/** Display text shown to user */
|
|
3894
|
+
text: string;
|
|
3895
|
+
/** Optional grouping for organized display */
|
|
3896
|
+
group?: string;
|
|
3897
|
+
/** Whether this option is disabled */
|
|
3898
|
+
disabled?: boolean;
|
|
3899
|
+
/** Additional data associated with option */
|
|
3900
|
+
data?: any;
|
|
3901
|
+
/** CSS class for styling */
|
|
3902
|
+
cssClass?: string;
|
|
3903
|
+
/** Alternative CSS class property name */
|
|
3904
|
+
class?: string;
|
|
3905
|
+
/** Icon to display with option */
|
|
3906
|
+
icon?: string;
|
|
3907
|
+
/** Tooltip text for option */
|
|
3908
|
+
tooltip?: string;
|
|
3909
|
+
/** Detailed description for the option */
|
|
3910
|
+
description?: string;
|
|
3911
|
+
}
|
|
3912
|
+
/**
|
|
3913
|
+
* Angular Material specific styling and behavior options.
|
|
3914
|
+
*
|
|
3915
|
+
* Covers appearance, theming, density, and interaction patterns
|
|
3916
|
+
* specific to Material Design 3 components.
|
|
3917
|
+
*/
|
|
3918
|
+
interface MaterialDesignConfig {
|
|
3919
|
+
/** Material appearance variant */
|
|
3920
|
+
appearance?: 'fill' | 'outline';
|
|
3921
|
+
/** Material color theme */
|
|
3922
|
+
color?: 'primary' | 'accent' | 'warn';
|
|
3923
|
+
/** Label floating behavior */
|
|
3924
|
+
floatLabel?: 'auto' | 'always';
|
|
3925
|
+
/** Subscript sizing strategy */
|
|
3926
|
+
subscriptSizing?: 'fixed' | 'dynamic';
|
|
3927
|
+
/** Hide required marker asterisk */
|
|
3928
|
+
hideRequiredMarker?: boolean;
|
|
3929
|
+
/** Component density */
|
|
3930
|
+
density?: 'comfortable' | 'compact' | 'dense';
|
|
3931
|
+
/** Disable ripple effects */
|
|
3932
|
+
disableRipple?: boolean;
|
|
3933
|
+
/** Custom theme palette override */
|
|
3934
|
+
customPalette?: {
|
|
3935
|
+
primary?: string;
|
|
3936
|
+
accent?: string;
|
|
3937
|
+
warn?: string;
|
|
3938
|
+
};
|
|
3939
|
+
/** Animation configuration */
|
|
3940
|
+
animations?: {
|
|
3941
|
+
disabled?: boolean;
|
|
3942
|
+
duration?: number;
|
|
3943
|
+
easing?: string;
|
|
3944
|
+
};
|
|
3945
|
+
}
|
|
3946
|
+
type InlineOverlayApplyMode = 'auto' | 'explicit';
|
|
3947
|
+
type InlineOverlayActionAppearance = 'text' | 'filled' | 'outlined' | 'tonal';
|
|
3948
|
+
type InlineOverlayActionColorRole = 'primary' | 'secondary' | 'neutral' | 'danger';
|
|
3949
|
+
interface InlineOverlayActionMetadata {
|
|
3950
|
+
/** Visible action label. Falls back to component i18n when omitted. */
|
|
3951
|
+
label?: string;
|
|
3952
|
+
/** Accessible label for context-rich action buttons. */
|
|
3953
|
+
ariaLabel?: string;
|
|
3954
|
+
/** Theme-driven visual style. */
|
|
3955
|
+
appearance?: InlineOverlayActionAppearance;
|
|
3956
|
+
/** Semantic color role resolved through theme tokens. */
|
|
3957
|
+
colorRole?: InlineOverlayActionColorRole;
|
|
3958
|
+
/** Optional Material Symbols icon name. */
|
|
3959
|
+
icon?: string;
|
|
3960
|
+
/** Allows authoring surfaces to hide an action without deleting its config. */
|
|
3961
|
+
visible?: boolean;
|
|
3962
|
+
}
|
|
3963
|
+
interface InlineOverlayActionsMetadata {
|
|
3964
|
+
apply?: InlineOverlayActionMetadata;
|
|
3965
|
+
cancel?: InlineOverlayActionMetadata;
|
|
3966
|
+
clear?: InlineOverlayActionMetadata;
|
|
3967
|
+
}
|
|
3968
|
+
interface InlineOverlayMetadata {
|
|
3969
|
+
/**
|
|
3970
|
+
* Commit mode for editable inline overlays:
|
|
3971
|
+
* - `auto`: changes commit immediately.
|
|
3972
|
+
* - `explicit`: edits stay as draft until the apply action.
|
|
3973
|
+
*/
|
|
3974
|
+
applyMode?: InlineOverlayApplyMode;
|
|
3975
|
+
/** Theme-aware metadata for footer actions. */
|
|
3976
|
+
actions?: InlineOverlayActionsMetadata;
|
|
3977
|
+
}
|
|
3978
|
+
/**
|
|
3979
|
+
* Comprehensive metadata interface for form fields.
|
|
3980
|
+
*
|
|
3981
|
+
* This is the main interface that extends ComponentMetadata with field-specific
|
|
3982
|
+
* properties covering behavior, validation, data binding, and UI configuration.
|
|
3983
|
+
*
|
|
3984
|
+
* @example
|
|
3985
|
+
* ```typescript
|
|
3986
|
+
* const emailField: FieldMetadata = {
|
|
3987
|
+
* name: 'email',
|
|
3988
|
+
* label: 'Email Address',
|
|
3989
|
+
* controlType: 'input',
|
|
3990
|
+
* required: true,
|
|
3991
|
+
* validators: {
|
|
3992
|
+
* required: true,
|
|
3993
|
+
* email: true,
|
|
3994
|
+
* requiredMessage: 'Email is required',
|
|
3995
|
+
* emailMessage: 'Please enter a valid email'
|
|
3996
|
+
* },
|
|
3997
|
+
* materialDesign: {
|
|
3998
|
+
* appearance: 'outline',
|
|
3999
|
+
* color: 'primary'
|
|
4000
|
+
* }
|
|
4001
|
+
* };
|
|
4002
|
+
* ```
|
|
4003
|
+
*/
|
|
4004
|
+
type FieldSource = 'schema' | 'local';
|
|
4005
|
+
type FieldSubmitPolicy = 'include' | 'omit' | 'includeWhenDirty';
|
|
4006
|
+
interface FieldMetadata extends ComponentMetadata {
|
|
4007
|
+
/** Unique field identifier (required) */
|
|
4008
|
+
name: string;
|
|
4009
|
+
/** Display label for the field */
|
|
4010
|
+
label: string;
|
|
4011
|
+
/**
|
|
4012
|
+
* Indicates that `label` was generated automatically by infrastructure code
|
|
4013
|
+
* such as schema mappers, instead of being authored explicitly by metadata.
|
|
4014
|
+
*
|
|
4015
|
+
* This flag is optional and defaults to `false` when omitted, preserving
|
|
4016
|
+
* backward compatibility for existing serialized metadata and host contracts.
|
|
4017
|
+
*
|
|
4018
|
+
* Intended use:
|
|
4019
|
+
* - allow authoring/runtime layers to distinguish domain text from fallback UI
|
|
4020
|
+
* - support governance checks that require explicit labels in enterprise flows
|
|
4021
|
+
* - avoid relying on implicit casts such as `(fieldMetadata as any)`
|
|
4022
|
+
*/
|
|
4023
|
+
labelAutoGenerated?: boolean;
|
|
4024
|
+
/** Field control type for component resolution */
|
|
4025
|
+
controlType: FieldControlType;
|
|
4026
|
+
/** Data type for processing and validation */
|
|
4027
|
+
dataType?: FieldDataType;
|
|
4028
|
+
/** Canonical metadata for editable collection fields (`controlType: "array"`). */
|
|
4029
|
+
array?: FieldArrayConfig;
|
|
4030
|
+
/** Optional top-level alias for collection validators mirrored into `array.collectionValidation`. */
|
|
4031
|
+
collectionValidation?: FieldArrayCollectionValidation;
|
|
4032
|
+
/** Display order in form */
|
|
4033
|
+
order?: number;
|
|
4034
|
+
/** Logical grouping of related fields */
|
|
4035
|
+
group?: string;
|
|
4036
|
+
/** Detailed description for tooltips */
|
|
4037
|
+
description?: string;
|
|
4038
|
+
/**
|
|
4039
|
+
* Field origin for metadata-driven forms.
|
|
4040
|
+
*
|
|
4041
|
+
* Defaults to `schema` when omitted. Use `local` for host-authored fields that
|
|
4042
|
+
* support the form UX but do not belong to the backend DTO/schema.
|
|
4043
|
+
*/
|
|
4044
|
+
source?: FieldSource;
|
|
4045
|
+
/**
|
|
4046
|
+
* Marks a field as form-local/transient.
|
|
4047
|
+
*
|
|
4048
|
+
* Transient fields participate in validation, rules, visibility, and value
|
|
4049
|
+
* changes, but are omitted from submit payloads unless `submitPolicy` is
|
|
4050
|
+
* explicitly set to `include`.
|
|
4051
|
+
*/
|
|
4052
|
+
transient?: boolean;
|
|
4053
|
+
/**
|
|
4054
|
+
* Submit behavior for the field.
|
|
4055
|
+
*
|
|
4056
|
+
* Defaults to `omit` for local/transient fields and `include` for schema
|
|
4057
|
+
* fields. When provided, this value has priority over `source` and
|
|
4058
|
+
* `transient`.
|
|
4059
|
+
*/
|
|
4060
|
+
submitPolicy?: FieldSubmitPolicy;
|
|
4061
|
+
/** Field is required */
|
|
4062
|
+
required?: boolean;
|
|
4063
|
+
/** Field is disabled */
|
|
4064
|
+
disabled?: boolean;
|
|
4065
|
+
/** Field is read-only */
|
|
4066
|
+
readOnly?: boolean;
|
|
4067
|
+
/**
|
|
4068
|
+
* Canonical backend-authored access metadata for field-level UX materialization.
|
|
4069
|
+
*
|
|
4070
|
+
* The frontend may use this contract to hide or lock controls for usability,
|
|
4071
|
+
* but it is not a security boundary. Backend filtering and validation remain
|
|
4072
|
+
* the final authority for sensitive data.
|
|
4073
|
+
*/
|
|
4074
|
+
fieldAccess?: FieldAccessMetadata;
|
|
4075
|
+
/** Field is hidden from display */
|
|
4076
|
+
hidden?: boolean;
|
|
4077
|
+
/** Canonical conditional visibility guard for metadata-driven forms. */
|
|
4078
|
+
hiddenCondition?: JsonLogicExpression | null;
|
|
4079
|
+
/** Default value when form initializes */
|
|
4080
|
+
defaultValue?: any;
|
|
4081
|
+
/** Placeholder text for empty fields */
|
|
4082
|
+
placeholder?: string;
|
|
4083
|
+
/** Help text displayed below field */
|
|
4084
|
+
hint?: string;
|
|
4085
|
+
/** Domain help text emitted by backend schema metadata. */
|
|
4086
|
+
helpText?: string;
|
|
4087
|
+
/** Effective help presentation resolved by the form host. */
|
|
4088
|
+
helpDisplay?: FormFieldHelpDisplay;
|
|
4089
|
+
/** Field-level inline threshold used when `helpDisplay` is `auto`. */
|
|
4090
|
+
helpInlineMaxLength?: number;
|
|
4091
|
+
/** Tooltip text on hover */
|
|
4092
|
+
tooltip?: string;
|
|
4093
|
+
/** Enables hover tooltip presentation when supported by the field renderer. */
|
|
4094
|
+
tooltipOnHover?: boolean;
|
|
4095
|
+
/** Semantic selection mode for boolean/single/multiple choice controls */
|
|
4096
|
+
selectionMode?: 'boolean' | 'single' | 'multiple';
|
|
4097
|
+
/** Visual variant used by controls with more than one supported presentation */
|
|
4098
|
+
variant?: string;
|
|
4099
|
+
/** Comprehensive validation rules */
|
|
4100
|
+
validators?: ValidatorOptions;
|
|
4101
|
+
/** When to validate field changes */
|
|
4102
|
+
validationMode?: 'immediate' | 'blur' | 'submit';
|
|
4103
|
+
/** Debounce time for validation (ms) */
|
|
4104
|
+
debounceTime?: number;
|
|
4105
|
+
/** Validate uniqueness via API */
|
|
4106
|
+
unique?: boolean;
|
|
4107
|
+
/** Static options for selection fields */
|
|
4108
|
+
options?: FieldOption[];
|
|
4109
|
+
/** API endpoint for dynamic data loading */
|
|
4110
|
+
endpoint?: string;
|
|
4111
|
+
/** Canonical backend resource path for metadata-driven requests */
|
|
4112
|
+
resourcePath?: string;
|
|
4113
|
+
/** Canonical metadata-driven source for derived options */
|
|
4114
|
+
optionSource?: OptionSourceMetadata;
|
|
4115
|
+
/** Field name for option values */
|
|
4116
|
+
valueField?: string;
|
|
4117
|
+
/** Field name for option display text */
|
|
4118
|
+
displayField?: string;
|
|
4119
|
+
/** Field name for option filtering */
|
|
4120
|
+
filterField?: string;
|
|
4121
|
+
/** Additional query parameters for API calls */
|
|
4122
|
+
queryParams?: Record<string, any>;
|
|
4123
|
+
/** Cache duration for remote data (ms) */
|
|
4124
|
+
cacheDuration?: number;
|
|
4125
|
+
/** Field width specification */
|
|
4126
|
+
width?: string | number;
|
|
4127
|
+
/** Use flexbox sizing */
|
|
4128
|
+
isFlex?: boolean;
|
|
4129
|
+
/** Icons configuration */
|
|
4130
|
+
prefixIcon?: string;
|
|
4131
|
+
suffixIcon?: string;
|
|
4132
|
+
iconPosition?: 'start' | 'end';
|
|
4133
|
+
iconSize?: 'small' | 'medium' | 'large';
|
|
4134
|
+
iconColor?: string;
|
|
4135
|
+
iconClass?: string;
|
|
4136
|
+
iconStyle?: string;
|
|
4137
|
+
iconFontSize?: string | number;
|
|
4138
|
+
/** Tooltip for suffix icon (used for help actions) */
|
|
4139
|
+
suffixIconTooltip?: string;
|
|
4140
|
+
/** ARIA label for suffix icon when used as help */
|
|
4141
|
+
suffixIconAriaLabel?: string;
|
|
4142
|
+
/** Input masking pattern */
|
|
4143
|
+
mask?: string;
|
|
4144
|
+
/** Format for display values */
|
|
4145
|
+
format?: string;
|
|
4146
|
+
/**
|
|
4147
|
+
* Canonical value-presentation semantics used by read-only/display surfaces.
|
|
4148
|
+
*
|
|
4149
|
+
* When provided, this metadata should be preferred over legacy formatting
|
|
4150
|
+
* hints such as `format`, `currency`, `locale`, or control-specific
|
|
4151
|
+
* heuristics.
|
|
4152
|
+
*/
|
|
4153
|
+
valuePresentation?: ValuePresentationConfig;
|
|
4154
|
+
/**
|
|
4155
|
+
* Semantic presentation metadata for read-only/display surfaces.
|
|
4156
|
+
*
|
|
4157
|
+
* Consumers map this contract to their own theme tokens and primitives. It
|
|
4158
|
+
* intentionally avoids arbitrary CSS, HTML, or mutation commands.
|
|
4159
|
+
*/
|
|
4160
|
+
presentation?: FieldPresentationConfig;
|
|
4161
|
+
/**
|
|
4162
|
+
* Ordered Json Logic rules that conditionally override `presentation` in
|
|
4163
|
+
* readonly/display surfaces. Later matching rules win.
|
|
4164
|
+
*/
|
|
4165
|
+
presentationRules?: FieldPresentationRule[];
|
|
4166
|
+
/** Material Design specific configuration */
|
|
4167
|
+
materialDesign?: MaterialDesignConfig;
|
|
4168
|
+
/**
|
|
4169
|
+
* Shared contract for editable inline overlays.
|
|
4170
|
+
*
|
|
4171
|
+
* Use when the component opens a panel/popover with draftable edits and
|
|
4172
|
+
* needs platform-governed Apply/Cancel/Clear actions.
|
|
4173
|
+
*/
|
|
4174
|
+
inlineOverlay?: InlineOverlayMetadata;
|
|
4175
|
+
/** Fields this field depends on */
|
|
4176
|
+
dependencyFields?: string[];
|
|
4177
|
+
/** Canonical conditional required guard for metadata-driven forms. */
|
|
4178
|
+
conditionalRequired?: JsonLogicExpression | null;
|
|
4179
|
+
/** Canonical conditional visibility guard for metadata-driven forms. */
|
|
4180
|
+
conditionalDisplay?: JsonLogicExpression | null;
|
|
4181
|
+
/** Reset value when dependency changes */
|
|
4182
|
+
resetOnDependentChange?: boolean;
|
|
4183
|
+
/** Enable native field-to-field dependency cascade inside the same form */
|
|
4184
|
+
enableDependencyCascade?: boolean;
|
|
4185
|
+
/**
|
|
4186
|
+
* Map dependent field name -> backend filter key or { key, valuePath }
|
|
4187
|
+
* Supports dot-path in 'key' to build nested filter objects
|
|
4188
|
+
*/
|
|
4189
|
+
dependencyFilterMap?: Record<string, string | {
|
|
4190
|
+
key: string;
|
|
4191
|
+
valuePath?: string;
|
|
4192
|
+
}>;
|
|
4193
|
+
/** Value path for extracting the dependent value (string or per-field map) */
|
|
4194
|
+
dependencyValuePath?: string | Record<string, string>;
|
|
4195
|
+
/** Debounce (ms) applied to combined dependencies */
|
|
4196
|
+
dependencyDebounceMs?: number;
|
|
4197
|
+
/** How to merge calculated fragment: 'replace' | 'merge' */
|
|
4198
|
+
dependencyMergeStrategy?: 'replace' | 'merge';
|
|
4199
|
+
/** When to reload on dependency change */
|
|
4200
|
+
dependencyLoadOnChange?: 'respectLoadOn' | 'immediate' | 'manual';
|
|
4201
|
+
/** Optional: suppress inline errors briefly when cascade resets value */
|
|
4202
|
+
suppressInlineErrorsOnCascade?: boolean;
|
|
4203
|
+
/** Allow inline editing in tables */
|
|
4204
|
+
inlineEditing?: boolean;
|
|
4205
|
+
/** Transform value before display */
|
|
4206
|
+
transformDisplayValue?: (value: any) => any;
|
|
4207
|
+
/** Transform value before saving */
|
|
4208
|
+
transformSaveValue?: (value: any) => any;
|
|
4209
|
+
/** Where to apply optional text transformation (editor setting) */
|
|
4210
|
+
textTransformApply?: 'displayOnly' | 'saveOnly' | 'both';
|
|
4211
|
+
/** Contexts where field should be visible */
|
|
4212
|
+
visibleIn?: Array<'form' | 'filter' | 'table' | 'dialog'>;
|
|
4213
|
+
/** Hide in specific form contexts */
|
|
4214
|
+
formHidden?: boolean;
|
|
4215
|
+
/** Hide in table contexts */
|
|
4216
|
+
tableHidden?: boolean;
|
|
4217
|
+
/** Hide in filter contexts */
|
|
4218
|
+
filterHidden?: boolean;
|
|
4219
|
+
/** ARIA label for screen readers */
|
|
4220
|
+
ariaLabel?: string;
|
|
4221
|
+
/** ARIA described by element IDs */
|
|
4222
|
+
ariaDescribedBy?: string;
|
|
4223
|
+
/** Tab index for keyboard navigation */
|
|
4224
|
+
tabIndex?: number;
|
|
4225
|
+
/** Keyboard shortcuts */
|
|
4226
|
+
accessKey?: string;
|
|
4227
|
+
}
|
|
4228
|
+
|
|
4229
|
+
interface FieldAccessMetadata {
|
|
4230
|
+
visibleForAuthorities?: string[];
|
|
4231
|
+
editableForAuthorities?: string[];
|
|
4232
|
+
reason?: string;
|
|
4233
|
+
}
|
|
4234
|
+
|
|
4235
|
+
/**
|
|
4236
|
+
* Contrato de saída do normalizador de esquema (SchemaNormalizerService):
|
|
4237
|
+
* - Converte metadados `x-ui` em FieldDefinition tipado.
|
|
4238
|
+
* - Condições booleanas declarativas serializáveis usam Json Logic canônico:
|
|
4239
|
+
* - conditionalDisplay: JsonLogicExpression | null
|
|
4240
|
+
* - conditionalRequired: JsonLogicExpression | null
|
|
4241
|
+
* - transformValueFunction: (val: any) => any
|
|
4242
|
+
* - Suporte completo a ValidatorOptions (sincronos e assíncronos),
|
|
4243
|
+
* incluindo mensagens e comportamento de validação (gatilhos, debounce, exibição de erros).
|
|
4244
|
+
*/
|
|
4245
|
+
interface FieldDefinition {
|
|
4246
|
+
name: string;
|
|
4247
|
+
label?: string;
|
|
4248
|
+
description?: string;
|
|
4249
|
+
type?: string;
|
|
4250
|
+
controlType?: string;
|
|
4251
|
+
mode?: string;
|
|
4252
|
+
placeholder?: string;
|
|
4253
|
+
defaultValue?: any;
|
|
4254
|
+
group?: string;
|
|
4255
|
+
order?: number;
|
|
4256
|
+
width?: number | string;
|
|
4257
|
+
isFlex?: boolean;
|
|
4258
|
+
displayOrientation?: string;
|
|
4259
|
+
selectionMode?: 'boolean' | 'single' | 'multiple';
|
|
4260
|
+
variant?: string;
|
|
4261
|
+
density?: 'compact' | 'comfortable' | 'spacious';
|
|
4262
|
+
layout?: 'horizontal' | 'vertical';
|
|
4263
|
+
disabled?: boolean;
|
|
4264
|
+
readOnly?: boolean;
|
|
4265
|
+
fieldAccess?: FieldAccessMetadata;
|
|
4266
|
+
array?: FieldArrayConfig;
|
|
4267
|
+
collectionValidation?: FieldArrayCollectionValidation;
|
|
4268
|
+
multiple?: boolean;
|
|
4269
|
+
editable?: boolean;
|
|
4270
|
+
validationMode?: string;
|
|
4271
|
+
unique?: boolean;
|
|
4272
|
+
mask?: string;
|
|
4273
|
+
sortable?: boolean;
|
|
4274
|
+
/** Json Logic canônico que define obrigatoriedade condicional. */
|
|
4275
|
+
conditionalRequired?: JsonLogicExpression | null;
|
|
4276
|
+
viewOnlyStyle?: string;
|
|
4277
|
+
/** Lista de gatilhos de validação, ex.: ["blur", "change"]. */
|
|
4278
|
+
validationTriggers?: string[];
|
|
4279
|
+
hidden?: boolean;
|
|
4280
|
+
tableHidden?: boolean;
|
|
4281
|
+
formHidden?: boolean;
|
|
4282
|
+
filterable?: boolean;
|
|
4283
|
+
/** Json Logic canônico que controla se o campo é exibido. */
|
|
4284
|
+
conditionalDisplay?: JsonLogicExpression | null;
|
|
4285
|
+
dependentField?: string;
|
|
4286
|
+
resetOnDependentChange?: boolean;
|
|
4287
|
+
inlineEditing?: boolean;
|
|
4288
|
+
/** Função de transformação de valor antes de salvar/exibir. */
|
|
4289
|
+
transformValueFunction?: (val: any) => any;
|
|
4290
|
+
debounceTime?: number;
|
|
4291
|
+
helpText?: string;
|
|
4292
|
+
hint?: string;
|
|
4293
|
+
hiddenCondition?: JsonLogicExpression | null;
|
|
4294
|
+
tooltip?: string;
|
|
4295
|
+
tooltipOnHover?: boolean;
|
|
4296
|
+
icon?: string;
|
|
4297
|
+
iconPosition?: string;
|
|
4298
|
+
iconSize?: string | number;
|
|
4299
|
+
iconColor?: string;
|
|
4300
|
+
iconClass?: string;
|
|
4301
|
+
iconStyle?: string;
|
|
4302
|
+
iconFontSize?: string | number;
|
|
4303
|
+
valueField?: string;
|
|
4304
|
+
displayField?: string;
|
|
4305
|
+
filterField?: string;
|
|
4306
|
+
endpoint?: string;
|
|
4307
|
+
resourcePath?: string;
|
|
4308
|
+
optionSource?: OptionSourceMetadata;
|
|
4309
|
+
emptyOptionText?: string;
|
|
4310
|
+
options?: {
|
|
4311
|
+
key: string;
|
|
4312
|
+
value: string;
|
|
4313
|
+
label?: string;
|
|
4314
|
+
[key: string]: any;
|
|
4315
|
+
}[];
|
|
4316
|
+
filter?: any;
|
|
4317
|
+
filterCriteria?: any;
|
|
4318
|
+
searchable?: boolean;
|
|
4319
|
+
selectAll?: boolean;
|
|
4320
|
+
maxSelections?: number;
|
|
4321
|
+
optionLabelKey?: string;
|
|
4322
|
+
optionValueKey?: string;
|
|
4323
|
+
filterOptions?: any[];
|
|
4324
|
+
numericFormat?: string;
|
|
4325
|
+
valuePresentation?: ValuePresentationConfig;
|
|
4326
|
+
/** Semantic read-only/list presentation metadata from canonical x-ui.presentation. */
|
|
4327
|
+
presentation?: FieldPresentationConfig;
|
|
4328
|
+
/** Conditional presentation overrides for read-only/list consumers. */
|
|
4329
|
+
presentationRules?: FieldPresentationRule[];
|
|
4330
|
+
numericStep?: number;
|
|
4331
|
+
numericMin?: number;
|
|
4332
|
+
numericMax?: number;
|
|
4333
|
+
numericMaxLength?: number;
|
|
4334
|
+
optionGroups?: {
|
|
4335
|
+
key: string;
|
|
4336
|
+
value: string;
|
|
4337
|
+
label?: string;
|
|
4338
|
+
[key: string]: any;
|
|
4339
|
+
}[];
|
|
4340
|
+
disabledOptions?: string[];
|
|
4341
|
+
buttons?: any[];
|
|
4342
|
+
/** Obrigatório. */
|
|
4343
|
+
required?: boolean;
|
|
4344
|
+
requiredMessage?: string;
|
|
4345
|
+
/** Tamanho mínimo/máximo (strings). */
|
|
4346
|
+
minLength?: number;
|
|
4347
|
+
minLengthMessage?: string;
|
|
4348
|
+
maxLength?: number;
|
|
4349
|
+
maxLengthMessage?: string;
|
|
4350
|
+
/** Limites numéricos. */
|
|
4351
|
+
min?: number;
|
|
4352
|
+
max?: number;
|
|
4353
|
+
/** Mensagens dedicadas para min/max numéricos. */
|
|
4354
|
+
minMessage?: string;
|
|
4355
|
+
maxMessage?: string;
|
|
4356
|
+
/** Mensagem quando ambos limites (range) são aplicados. */
|
|
4357
|
+
rangeMessage?: string;
|
|
4358
|
+
/** Padrão (regex). Aceita pattern/regex. */
|
|
4359
|
+
pattern?: string;
|
|
4360
|
+
patternMessage?: string;
|
|
4361
|
+
/** Validação de e-mail. */
|
|
4362
|
+
email?: boolean;
|
|
4363
|
+
emailMessage?: string;
|
|
4364
|
+
/** Validação de URL. */
|
|
4365
|
+
url?: boolean;
|
|
4366
|
+
urlMessage?: string;
|
|
4367
|
+
/** Requer que valor combine com outro campo. */
|
|
4368
|
+
matchField?: string;
|
|
4369
|
+
matchFieldMessage?: string;
|
|
4370
|
+
/** Requer que o checkbox esteja marcado. */
|
|
4371
|
+
requiredChecked?: boolean;
|
|
4372
|
+
/** Tipos de arquivo permitidos e tamanho máximo. */
|
|
4373
|
+
allowedFileTypes?: string[];
|
|
4374
|
+
fileTypeMessage?: string;
|
|
4375
|
+
maxFileSize?: number;
|
|
4376
|
+
/** Validador customizado síncrono. */
|
|
4377
|
+
customValidator?: (value: any, model?: any) => any;
|
|
4378
|
+
/** Validador customizado assíncrono. */
|
|
4379
|
+
asyncValidator?: (value: any, model?: any) => Promise<any>;
|
|
4380
|
+
/** Validador de unicidade (ex.: consulta ao backend). */
|
|
4381
|
+
uniqueValidator?: (value: any, model?: any) => boolean | Promise<boolean>;
|
|
4382
|
+
uniqueMessage?: string;
|
|
4383
|
+
/** Regras declarativas de validação condicional baseadas no root `form`. */
|
|
4384
|
+
conditionalValidation?: ConditionalValidationRule[];
|
|
4385
|
+
/** Mínimo de palavras (para textos longos). */
|
|
4386
|
+
minWords?: number;
|
|
4387
|
+
/** Gatilho(s) de validação (alias de validationTriggers). */
|
|
4388
|
+
/** Tempo de debounce (ms) para executar validação. */
|
|
4389
|
+
validationDebounce?: number;
|
|
4390
|
+
/** Exibir erros inline no campo. */
|
|
4391
|
+
showInlineErrors?: boolean;
|
|
4392
|
+
/** Posição preferida da mensagem de erro (ex.: below, right). */
|
|
4393
|
+
errorPosition?: string;
|
|
4394
|
+
[key: string]: any;
|
|
4395
|
+
}
|
|
4396
|
+
|
|
4397
|
+
/** Normalizes the exact schema/root object using the canonical Core calculation.
|
|
4398
|
+
* The caller must admit source, content and execution before invoking this function:
|
|
4399
|
+
* declared function expressions may execute during field construction.
|
|
4400
|
+
* This performs neither strict JSON parsing nor provenance/schema admission.
|
|
4401
|
+
*/
|
|
4402
|
+
declare function normalizeSchemaFields(schema: unknown): FieldDefinition[];
|
|
4403
|
+
|
|
4404
|
+
/**
|
|
4405
|
+
* Deep merge that prefers values from `right` when defined.
|
|
4406
|
+
* - Objects are merged recursively
|
|
4407
|
+
* - Arrays are replaced by `right` when defined
|
|
4408
|
+
* - Primitive `undefined` on right keeps left's value
|
|
4409
|
+
*/
|
|
4410
|
+
declare function deepMerge<T>(left: T, right: Partial<T> | undefined): T;
|
|
4411
|
+
|
|
4412
|
+
declare function resolveColumnTypeFromFieldDefinition(def: FieldDefinition, fallback?: ColumnDefinition['type']): ColumnDefinition['type'] | undefined;
|
|
4413
|
+
declare function resolveTextMaskFormatFromFieldDefinition(def: FieldDefinition): string | undefined;
|
|
4414
|
+
|
|
4415
|
+
type TableConfig = TableConfigV2;
|
|
4416
|
+
|
|
4417
|
+
export { deepMerge, isPraxisPresentationVisualizationTableSafe, normalizeSchemaFields, resolveColumnTypeFromFieldDefinition, resolveTextMaskFormatFromFieldDefinition };
|
|
4418
|
+
export type { ColumnDefinition, FieldDefinition, TableConfig };
|