@praxisui/list 10.0.0-rc.3 → 10.0.0-rc.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -2
- package/ai/component-registry.json +239 -4
- package/fesm2022/praxisui-list.mjs +1644 -138
- package/package.json +7 -6
- package/src/lib/praxis-list.json-api.md +143 -19
- package/types/praxisui-list.d.ts +175 -71
package/package.json
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/list",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.30",
|
|
4
4
|
"description": "List components and helpers for Praxis UI.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
7
7
|
"@angular/core": "^21.0.0",
|
|
8
|
+
"@angular/cdk": "^21.0.0",
|
|
8
9
|
"@angular/material": "^21.0.0",
|
|
9
|
-
"@praxisui/dynamic-fields": "^10.0.0-rc.
|
|
10
|
+
"@praxisui/dynamic-fields": "^10.0.0-rc.30",
|
|
10
11
|
"rxjs": ">=7 <9",
|
|
11
12
|
"@angular/forms": "^21.0.0",
|
|
12
13
|
"@angular/router": "^21.0.0",
|
|
13
|
-
"@praxisui/ai": "^10.0.0-rc.
|
|
14
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
15
|
-
"@praxisui/rich-content": "^10.0.0-rc.
|
|
16
|
-
"@praxisui/settings-panel": "^10.0.0-rc.
|
|
14
|
+
"@praxisui/ai": "^10.0.0-rc.30",
|
|
15
|
+
"@praxisui/core": "^10.0.0-rc.30",
|
|
16
|
+
"@praxisui/rich-content": "^10.0.0-rc.30",
|
|
17
|
+
"@praxisui/settings-panel": "^10.0.0-rc.30"
|
|
17
18
|
},
|
|
18
19
|
"dependencies": {
|
|
19
20
|
"tslib": "^2.3.0",
|
|
@@ -534,18 +534,19 @@ interface PraxisListConfig {
|
|
|
534
534
|
|
|
535
535
|
#### Layout API
|
|
536
536
|
|
|
537
|
-
| Caminho | Status | Observacao
|
|
538
|
-
| ---------------------------- | ------------- |
|
|
539
|
-
| `layout.variant` | Active | `list/cards/tiles`
|
|
540
|
-
| `layout.density` | Active | classe `density-*`
|
|
541
|
-
| `layout.itemSpacing` | Active | classe `item-spacing-*`
|
|
542
|
-
| `layout.
|
|
543
|
-
| `layout.
|
|
544
|
-
| `layout.
|
|
545
|
-
| `layout.
|
|
546
|
-
| `layout.
|
|
547
|
-
| `layout.
|
|
548
|
-
| `layout.
|
|
537
|
+
| Caminho | Status | Observacao |
|
|
538
|
+
| ---------------------------- | ------------- | ---------------------------------------------------------- |
|
|
539
|
+
| `layout.variant` | Active | `list/cards/tiles` |
|
|
540
|
+
| `layout.density` | Active | classe `density-*` |
|
|
541
|
+
| `layout.itemSpacing` | Active | classe `item-spacing-*` |
|
|
542
|
+
| `layout.itemAppearance` | Active | `flat/card` (isola itens em cartões sob `variant: 'list'`) |
|
|
543
|
+
| `layout.lines` | Active | linhas de texto + classe `lines-*` |
|
|
544
|
+
| `layout.dividers` | Active | divisores no modo `list` |
|
|
545
|
+
| `layout.model` | Active | classe `model-*` |
|
|
546
|
+
| `layout.groupBy` | Active | agrupamento em `sections$` |
|
|
547
|
+
| `layout.pageSize` | Active | page size inicial |
|
|
548
|
+
| `layout.stickySectionHeader` | Declared-only | sem sticky runtime |
|
|
549
|
+
| `layout.virtualScroll` | Declared-only | sem virtual scroll runtime |
|
|
549
550
|
|
|
550
551
|
#### Skin API
|
|
551
552
|
|
|
@@ -634,7 +635,7 @@ Slots suportados:
|
|
|
634
635
|
|
|
635
636
|
Tipos funcionais no runtime:
|
|
636
637
|
|
|
637
|
-
- `text`, `icon`, `image`, `chip`, `rating`, `currency`, `date`, `html`, `metric`, `compose`, `component`.
|
|
638
|
+
- `text`, `icon`, `image`, `chip`, `rating`, `currency`, `date`, `datetime`, `relative`, `html`, `metric`, `compose`, `component`.
|
|
638
639
|
|
|
639
640
|
Inferencia opcional:
|
|
640
641
|
|
|
@@ -765,15 +766,21 @@ Semantica de execucao:
|
|
|
765
766
|
Suporte principal:
|
|
766
767
|
|
|
767
768
|
- placeholders: `${item.campo}`;
|
|
768
|
-
-
|
|
769
|
-
-
|
|
769
|
+
- coalescência em placeholders: `${item.displayName ?? item.name ?? item.id}`;
|
|
770
|
+
- pipes em placeholder: `bool`, `date`, `datetime`, `relative`, `map`, `number`, `currency`;
|
|
771
|
+
- pipes top-level pós-expressão: `|bool:True:False`, `|map:k=v`, `|relative:locale`, `|datetime:locale:style`, `|date:locale:style`.
|
|
770
772
|
|
|
771
773
|
Exemplos validos:
|
|
772
774
|
|
|
773
775
|
- `${item.active|bool:Ativo:Inativo}`
|
|
774
776
|
- `${item.createdAt|date:pt-BR:short}`
|
|
777
|
+
- `${item.occurredAt|datetime:pt-BR:short}`
|
|
778
|
+
- `${item.occurredAt|relative:pt-BR}` (exibe *"há 5 minutos"*)
|
|
775
779
|
- `${item.status|map:done=Concluido;pending=Pendente}`
|
|
776
780
|
- `${item.total|number:pt-BR:compact}`
|
|
781
|
+
- `${item.amount|currency:BRL:pt-BR}`
|
|
782
|
+
- `${item.occurredAt}|relative:pt-BR` (pipe top-level)
|
|
783
|
+
- `${item.createdAt}|datetime:pt-BR:short` (pipe top-level)
|
|
777
784
|
|
|
778
785
|
##### `actions[].showIf`
|
|
779
786
|
|
|
@@ -958,25 +965,142 @@ Recomendacao corporativa:
|
|
|
958
965
|
### Minimal valid
|
|
959
966
|
|
|
960
967
|
```json
|
|
961
|
-
{
|
|
968
|
+
{
|
|
969
|
+
"layout": {
|
|
970
|
+
"variant": "list"
|
|
971
|
+
},
|
|
972
|
+
"templating": {
|
|
973
|
+
"primary": {
|
|
974
|
+
"type": "text",
|
|
975
|
+
"expr": "${item.name}"
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
}
|
|
962
979
|
```
|
|
963
980
|
|
|
964
981
|
### Typical/common
|
|
965
982
|
|
|
966
983
|
```json
|
|
967
|
-
{
|
|
984
|
+
{
|
|
985
|
+
"layout": {
|
|
986
|
+
"variant": "list",
|
|
987
|
+
"density": "comfortable",
|
|
988
|
+
"itemSpacing": "default"
|
|
989
|
+
},
|
|
990
|
+
"templating": {
|
|
991
|
+
"leading": {
|
|
992
|
+
"type": "icon",
|
|
993
|
+
"expr": "person"
|
|
994
|
+
},
|
|
995
|
+
"primary": {
|
|
996
|
+
"type": "text",
|
|
997
|
+
"expr": "${item.nomeCompleto}"
|
|
998
|
+
},
|
|
999
|
+
"secondary": {
|
|
1000
|
+
"type": "text",
|
|
1001
|
+
"expr": "${item.cargo} · ${item.departamento}"
|
|
1002
|
+
},
|
|
1003
|
+
"meta": {
|
|
1004
|
+
"type": "date",
|
|
1005
|
+
"expr": "${item.dataAdmissao}"
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
968
1009
|
```
|
|
969
1010
|
|
|
970
1011
|
### Advanced
|
|
971
1012
|
|
|
972
1013
|
```json
|
|
973
|
-
{
|
|
1014
|
+
{
|
|
1015
|
+
"layout": {
|
|
1016
|
+
"variant": "list",
|
|
1017
|
+
"itemAppearance": "card",
|
|
1018
|
+
"itemSpacing": "compact"
|
|
1019
|
+
},
|
|
1020
|
+
"skin": {
|
|
1021
|
+
"type": "glass"
|
|
1022
|
+
},
|
|
1023
|
+
"templating": {
|
|
1024
|
+
"leading": {
|
|
1025
|
+
"type": "icon",
|
|
1026
|
+
"expr": "${item.severidade|map:CRITICA=warning,ALTA=error_outline,MEDIA=info}",
|
|
1027
|
+
"color": "${item.severidade|map:CRITICA=warn,ALTA=warn,MEDIA=primary}"
|
|
1028
|
+
},
|
|
1029
|
+
"primary": {
|
|
1030
|
+
"type": "text",
|
|
1031
|
+
"expr": "${item.titulo}"
|
|
1032
|
+
},
|
|
1033
|
+
"secondary": {
|
|
1034
|
+
"type": "text",
|
|
1035
|
+
"expr": "${item.localizacao} · Protocolo ${item.protocolo}"
|
|
1036
|
+
},
|
|
1037
|
+
"meta": {
|
|
1038
|
+
"type": "relative",
|
|
1039
|
+
"expr": "${item.abertoEm}"
|
|
1040
|
+
},
|
|
1041
|
+
"metaPlacement": "side"
|
|
1042
|
+
},
|
|
1043
|
+
"actions": [
|
|
1044
|
+
{
|
|
1045
|
+
"id": "dispatch",
|
|
1046
|
+
"label": "Despachar",
|
|
1047
|
+
"icon": "send",
|
|
1048
|
+
"kind": "icon"
|
|
1049
|
+
}
|
|
1050
|
+
]
|
|
1051
|
+
}
|
|
974
1052
|
```
|
|
975
1053
|
|
|
976
1054
|
### Enterprise scenario
|
|
977
1055
|
|
|
978
1056
|
```json
|
|
979
|
-
{
|
|
1057
|
+
{
|
|
1058
|
+
"dataSource": {
|
|
1059
|
+
"resourcePath": "incidentes",
|
|
1060
|
+
"sort": {
|
|
1061
|
+
"field": "abertoEm",
|
|
1062
|
+
"direction": "desc"
|
|
1063
|
+
}
|
|
1064
|
+
},
|
|
1065
|
+
"layout": {
|
|
1066
|
+
"variant": "list",
|
|
1067
|
+
"itemAppearance": "card",
|
|
1068
|
+
"pageSize": 20
|
|
1069
|
+
},
|
|
1070
|
+
"i18n": {
|
|
1071
|
+
"locale": "pt-BR",
|
|
1072
|
+
"currency": "BRL"
|
|
1073
|
+
},
|
|
1074
|
+
"selection": {
|
|
1075
|
+
"mode": "multiple",
|
|
1076
|
+
"compareBy": "id",
|
|
1077
|
+
"return": "id"
|
|
1078
|
+
},
|
|
1079
|
+
"templating": {
|
|
1080
|
+
"leading": {
|
|
1081
|
+
"type": "chip",
|
|
1082
|
+
"expr": "${item.codigo}",
|
|
1083
|
+
"variant": "outlined"
|
|
1084
|
+
},
|
|
1085
|
+
"primary": {
|
|
1086
|
+
"type": "text",
|
|
1087
|
+
"expr": "${item.nome ?? item.titulo}"
|
|
1088
|
+
},
|
|
1089
|
+
"secondary": {
|
|
1090
|
+
"type": "text",
|
|
1091
|
+
"expr": "${item.resumo}"
|
|
1092
|
+
},
|
|
1093
|
+
"meta": {
|
|
1094
|
+
"type": "datetime",
|
|
1095
|
+
"expr": "${item.dataCriacao}|pt-BR:short"
|
|
1096
|
+
}
|
|
1097
|
+
},
|
|
1098
|
+
"ui": {
|
|
1099
|
+
"showSearch": true,
|
|
1100
|
+
"searchField": "titulo",
|
|
1101
|
+
"showSort": true
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
980
1104
|
```
|
|
981
1105
|
|
|
982
1106
|
## Known limitations and mismatches
|
package/types/praxisui-list.d.ts
CHANGED
|
@@ -4,13 +4,12 @@ import * as i0 from '@angular/core';
|
|
|
4
4
|
import { OnInit, OnChanges, AfterViewInit, OnDestroy, EventEmitter, SimpleChanges, ChangeDetectorRef, DoCheck, Provider } from '@angular/core';
|
|
5
5
|
import { MatPaginatorSelectConfig, PageEvent } from '@angular/material/paginator';
|
|
6
6
|
import { FormGroup, FormControl } from '@angular/forms';
|
|
7
|
-
import * as _praxisui_core from '@praxisui/core';
|
|
8
7
|
import { PraxisExportFormat, PraxisExportScope, PraxisRuntimeConditionalEffectRule, JsonLogicExpression, RichContentDocument, ResourceRecordOpenRef, GlobalActionRef, LocalizationConfig, AiCapability, PraxisDataQueryContext, RichBlockNode, RichBlockHostCapabilities, SurfaceOpenActionEditorComponent, GlobalActionCatalogEntry, SurfaceOpenPayload, SettingsValueProvider as SettingsValueProvider$1, RichPresenterNode, RichComposeNode, ComponentDocMeta, AiCapabilityCategory, AiCapabilityCatalog, AiValueKind, ComponentAuthoringManifest } from '@praxisui/core';
|
|
9
8
|
import { BaseAiAdapter, AiResponseCompileResult, PatchResult, PraxisAssistantTurnViewState, PraxisAssistantShellLayout, PraxisAssistantShellLabels, PraxisAssistantSessionSnapshot, PraxisAssistantShellQuickReply, PraxisAssistantShellMessage } from '@praxisui/ai';
|
|
10
9
|
import { SettingsValueProvider } from '@praxisui/settings-panel';
|
|
11
10
|
import * as _praxisui_list from '@praxisui/list';
|
|
12
11
|
|
|
13
|
-
type TemplateType = 'text' | 'icon' | 'image' | 'chip' | 'rating' | 'currency' | 'date' | 'html' | 'slot' | 'metric' | 'compose' | 'component';
|
|
12
|
+
type TemplateType = 'text' | 'icon' | 'image' | 'chip' | 'rating' | 'currency' | 'date' | 'datetime' | 'relative' | 'html' | 'slot' | 'metric' | 'compose' | 'component';
|
|
14
13
|
interface TemplateDef {
|
|
15
14
|
type: TemplateType;
|
|
16
15
|
expr?: string;
|
|
@@ -122,8 +121,11 @@ interface ListExpansionSectionDef {
|
|
|
122
121
|
}
|
|
123
122
|
type ListTemplatingSlot = 'leading' | 'primary' | 'secondary' | 'meta' | 'trailing' | 'identity' | 'balance' | 'limit' | 'risk' | 'alerts' | 'owner';
|
|
124
123
|
type ListRowLayoutSlot = ListTemplatingSlot | 'actions' | 'expand';
|
|
124
|
+
type ListCardColumns = 'auto' | 1 | 2 | 3 | 4;
|
|
125
|
+
type ListItemStateTone = 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'muted';
|
|
125
126
|
interface ListItemStyleEffect {
|
|
126
127
|
kind?: 'item-style';
|
|
128
|
+
tone?: ListItemStateTone;
|
|
127
129
|
class?: string;
|
|
128
130
|
style?: string;
|
|
129
131
|
border?: string;
|
|
@@ -147,6 +149,45 @@ interface ListSlotOverrideRule extends Omit<PraxisRuntimeConditionalEffectRule<L
|
|
|
147
149
|
condition?: JsonLogicExpression | null;
|
|
148
150
|
effects?: ListSlotOverrideEffect[];
|
|
149
151
|
}
|
|
152
|
+
interface PraxisListVirtualScrollConfig {
|
|
153
|
+
enabled: boolean;
|
|
154
|
+
itemSize?: number;
|
|
155
|
+
minBufferPx?: number;
|
|
156
|
+
maxBufferPx?: number;
|
|
157
|
+
viewportHeight?: string;
|
|
158
|
+
}
|
|
159
|
+
interface PraxisListItemAction {
|
|
160
|
+
id: string;
|
|
161
|
+
icon?: string;
|
|
162
|
+
label?: string;
|
|
163
|
+
color?: string;
|
|
164
|
+
tooltip?: string;
|
|
165
|
+
kind?: 'icon' | 'button' | 'menu-item';
|
|
166
|
+
buttonVariant?: 'stroked' | 'raised' | 'flat';
|
|
167
|
+
showIf?: JsonLogicExpression | null;
|
|
168
|
+
visibleWhen?: JsonLogicExpression | null;
|
|
169
|
+
disabledWhen?: JsonLogicExpression | null;
|
|
170
|
+
/**
|
|
171
|
+
* Condição HATEOAS canônica: se especificado, a ação só é exibida
|
|
172
|
+
* se o item possuir o link correspondente em `item._links[hateoasRel]` ou `item.links[hateoasRel]`.
|
|
173
|
+
*/
|
|
174
|
+
hateoasRel?: string;
|
|
175
|
+
emitPayload?: 'item' | 'id' | 'value';
|
|
176
|
+
action?: 'surface.open' | string;
|
|
177
|
+
recordOpen?: ResourceRecordOpenRef;
|
|
178
|
+
globalAction?: GlobalActionRef;
|
|
179
|
+
command?: string;
|
|
180
|
+
params?: Record<string, unknown>;
|
|
181
|
+
emitLocal?: boolean;
|
|
182
|
+
showLoading?: boolean;
|
|
183
|
+
placement?: 'actions' | 'trailing' | 'menu';
|
|
184
|
+
confirmation?: {
|
|
185
|
+
title?: string;
|
|
186
|
+
message?: string;
|
|
187
|
+
type?: 'danger' | 'warning' | 'info';
|
|
188
|
+
};
|
|
189
|
+
requiresConfirmation?: boolean;
|
|
190
|
+
}
|
|
150
191
|
interface PraxisListConfig {
|
|
151
192
|
id?: string;
|
|
152
193
|
dataSource?: {
|
|
@@ -159,12 +200,25 @@ interface PraxisListConfig {
|
|
|
159
200
|
variant?: 'list' | 'cards' | 'tiles';
|
|
160
201
|
density?: 'default' | 'comfortable' | 'compact';
|
|
161
202
|
itemSpacing?: 'none' | 'tight' | 'default' | 'relaxed';
|
|
203
|
+
itemAppearance?: 'flat' | 'card' | 'capsule';
|
|
162
204
|
lines?: 1 | 2 | 3;
|
|
163
205
|
dividers?: 'none' | 'between' | 'all';
|
|
164
206
|
model?: 'standard' | 'media' | 'hotel';
|
|
207
|
+
/**
|
|
208
|
+
* Structured column count for cards/tiles grids without requiring raw CSS.
|
|
209
|
+
*/
|
|
210
|
+
cardColumns?: ListCardColumns;
|
|
211
|
+
/**
|
|
212
|
+
* Minimum card/tile track width when cardColumns is 'auto' (e.g. '240px', '300px', '340px').
|
|
213
|
+
*/
|
|
214
|
+
cardMinWidth?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Minimum card surface height (e.g. 'auto', '148px', '188px', '220px').
|
|
217
|
+
*/
|
|
218
|
+
cardMinHeight?: string;
|
|
165
219
|
groupBy?: string;
|
|
166
220
|
stickySectionHeader?: boolean;
|
|
167
|
-
virtualScroll?: boolean;
|
|
221
|
+
virtualScroll?: boolean | PraxisListVirtualScrollConfig;
|
|
168
222
|
pageSize?: number;
|
|
169
223
|
rowLayout?: {
|
|
170
224
|
type?: 'grid' | 'flex';
|
|
@@ -284,27 +338,10 @@ interface PraxisListConfig {
|
|
|
284
338
|
errorTemplate?: TemplateDef;
|
|
285
339
|
};
|
|
286
340
|
};
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
color?: string;
|
|
292
|
-
kind?: 'icon' | 'button';
|
|
293
|
-
buttonVariant?: 'stroked' | 'raised' | 'flat';
|
|
294
|
-
showIf?: JsonLogicExpression | null;
|
|
295
|
-
emitPayload?: 'item' | 'id' | 'value';
|
|
296
|
-
action?: 'surface.open';
|
|
297
|
-
recordOpen?: ResourceRecordOpenRef;
|
|
298
|
-
globalAction?: GlobalActionRef;
|
|
299
|
-
emitLocal?: boolean;
|
|
300
|
-
showLoading?: boolean;
|
|
301
|
-
placement?: 'actions' | 'trailing';
|
|
302
|
-
confirmation?: {
|
|
303
|
-
title?: string;
|
|
304
|
-
message?: string;
|
|
305
|
-
type?: 'danger' | 'warning' | 'info';
|
|
306
|
-
};
|
|
307
|
-
}>;
|
|
341
|
+
/** Ações declarativas de item governadas (compatível com itemActions) */
|
|
342
|
+
actions?: PraxisListItemAction[];
|
|
343
|
+
/** Ações declarativas de item com HATEOAS e despacho canônico */
|
|
344
|
+
itemActions?: PraxisListItemAction[];
|
|
308
345
|
i18n?: PraxisListI18nConfig;
|
|
309
346
|
ui?: {
|
|
310
347
|
showSearch?: boolean;
|
|
@@ -488,6 +525,8 @@ declare class PraxisList implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|
|
488
525
|
form?: FormGroup | null;
|
|
489
526
|
set enableCustomization(value: boolean);
|
|
490
527
|
get enableCustomization(): boolean;
|
|
528
|
+
itemActions?: PraxisListItemAction[];
|
|
529
|
+
virtualScroll?: boolean | PraxisListVirtualScrollConfig;
|
|
491
530
|
itemClick: EventEmitter<ListItemEvent>;
|
|
492
531
|
actionClick: EventEmitter<ListActionEvent>;
|
|
493
532
|
selectionChange: EventEmitter<ListSelectionEvent>;
|
|
@@ -669,27 +708,17 @@ declare class PraxisList implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|
|
669
708
|
hasSkeleton(): boolean;
|
|
670
709
|
skeletonCount(): number;
|
|
671
710
|
skeletonItems(): any[];
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
globalAction?: GlobalActionRef;
|
|
684
|
-
emitLocal?: boolean;
|
|
685
|
-
showLoading?: boolean;
|
|
686
|
-
placement?: "actions" | "trailing";
|
|
687
|
-
confirmation?: {
|
|
688
|
-
title?: string;
|
|
689
|
-
message?: string;
|
|
690
|
-
type?: "danger" | "warning" | "info";
|
|
691
|
-
};
|
|
692
|
-
}[];
|
|
711
|
+
isVirtualScrollEnabled(): boolean;
|
|
712
|
+
virtualScrollItemSize(): number;
|
|
713
|
+
virtualScrollMinBufferPx(): number;
|
|
714
|
+
virtualScrollMaxBufferPx(): number;
|
|
715
|
+
virtualScrollViewportHeight(): string;
|
|
716
|
+
virtualScrollItems(sections: ListSection<any>[] | null | undefined, items: any[] | null | undefined): any[];
|
|
717
|
+
trackByVirtualItem: (index: number, item: any) => any;
|
|
718
|
+
private warnOnIncompatibleVirtualScroll;
|
|
719
|
+
effectiveActions(): PraxisListItemAction[];
|
|
720
|
+
hasHateoasLink(item: any, rel: string): boolean;
|
|
721
|
+
visibleActions(item: any, placement?: 'actions' | 'trailing' | 'menu'): PraxisListItemAction[];
|
|
693
722
|
onItemClick(item: any, index: number, section?: string): void;
|
|
694
723
|
onRowActivate(item: any, index: number, section?: string): void;
|
|
695
724
|
onExpandToggle(event: Event, item: any, index: number): void;
|
|
@@ -844,6 +873,7 @@ declare class PraxisList implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|
|
844
873
|
private toBoolean;
|
|
845
874
|
private prettyLabel;
|
|
846
875
|
private mapDateStyle;
|
|
876
|
+
private mapDateTimeStyle;
|
|
847
877
|
starIcon(index: number, ratingValue: string | number): string;
|
|
848
878
|
isThemeColor(color?: string): boolean;
|
|
849
879
|
chipStyle(color?: string, variant?: 'filled' | 'outlined'): string;
|
|
@@ -881,7 +911,7 @@ declare class PraxisList implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|
|
881
911
|
private normalizeExpansionItems;
|
|
882
912
|
private normalizeKeyValueItems;
|
|
883
913
|
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisList, never>;
|
|
884
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisList, "praxis-list", never, { "config": { "alias": "config"; "required": false; }; "listId": { "alias": "listId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "configPersistenceStrategy": { "alias": "configPersistenceStrategy"; "required": false; }; "queryContext": { "alias": "queryContext"; "required": false; }; "form": { "alias": "form"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; }, { "itemClick": "itemClick"; "actionClick": "actionClick"; "selectionChange": "selectionChange"; "exportAction": "exportAction"; "configPatchChange": "configPatchChange"; }, never, never, true, never>;
|
|
914
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisList, "praxis-list", never, { "config": { "alias": "config"; "required": false; }; "listId": { "alias": "listId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "configPersistenceStrategy": { "alias": "configPersistenceStrategy"; "required": false; }; "queryContext": { "alias": "queryContext"; "required": false; }; "form": { "alias": "form"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "itemActions": { "alias": "itemActions"; "required": false; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; }; }, { "itemClick": "itemClick"; "actionClick": "actionClick"; "selectionChange": "selectionChange"; "exportAction": "exportAction"; "configPatchChange": "configPatchChange"; }, never, never, true, never>;
|
|
885
915
|
static ngAcceptInputType_enableCustomization: unknown;
|
|
886
916
|
}
|
|
887
917
|
|
|
@@ -1184,9 +1214,12 @@ type NormalizedListConfig = Omit<PraxisListConfig, 'dataSource' | 'layout' | 'se
|
|
|
1184
1214
|
lines: 1 | 2 | 3;
|
|
1185
1215
|
dividers?: 'none' | 'between' | 'all';
|
|
1186
1216
|
model?: 'standard' | 'media' | 'hotel';
|
|
1217
|
+
cardColumns?: ListCardColumns;
|
|
1218
|
+
cardMinWidth?: string;
|
|
1219
|
+
cardMinHeight?: string;
|
|
1187
1220
|
groupBy?: string;
|
|
1188
1221
|
stickySectionHeader?: boolean;
|
|
1189
|
-
virtualScroll?: boolean;
|
|
1222
|
+
virtualScroll?: boolean | PraxisListVirtualScrollConfig;
|
|
1190
1223
|
pageSize?: number;
|
|
1191
1224
|
rowLayout?: NonNullable<PraxisListConfig['layout']>['rowLayout'];
|
|
1192
1225
|
};
|
|
@@ -1413,6 +1446,7 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
|
1413
1446
|
queryJson: string;
|
|
1414
1447
|
queryError: string;
|
|
1415
1448
|
actionShowIfDrafts: Record<number, string>;
|
|
1449
|
+
private stashedLocalData?;
|
|
1416
1450
|
private crud;
|
|
1417
1451
|
private readonly i18n;
|
|
1418
1452
|
private resourcePathChanges;
|
|
@@ -1443,7 +1477,15 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
|
1443
1477
|
private syncSortStateFromWorking;
|
|
1444
1478
|
private resetVisualMappingState;
|
|
1445
1479
|
private setupSchemaWatcher;
|
|
1480
|
+
loadFieldsFromResource(resourcePath: string): void;
|
|
1446
1481
|
onResourcePathChange(value: string): void;
|
|
1482
|
+
hasRemoteResourcePath(): boolean;
|
|
1483
|
+
getActiveDataSourceMode(): 'local' | 'remote' | 'empty';
|
|
1484
|
+
getActiveDataSourceLabel(): string;
|
|
1485
|
+
hasStashedLocalData(): boolean;
|
|
1486
|
+
useRemoteResource(): void;
|
|
1487
|
+
clearLocalData(): void;
|
|
1488
|
+
restoreLocalData(): void;
|
|
1447
1489
|
getLocalDataRows(): any[];
|
|
1448
1490
|
getLocalDataSummary(): string;
|
|
1449
1491
|
getLocalDataPrecedenceWarning(): string;
|
|
@@ -1565,6 +1607,19 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
|
1565
1607
|
ngDoCheck(): void;
|
|
1566
1608
|
reset(): void;
|
|
1567
1609
|
onLayoutChanged(): void;
|
|
1610
|
+
virtualScrollEnabled(): boolean;
|
|
1611
|
+
onVirtualScrollEnabledChange(enabled: boolean): void;
|
|
1612
|
+
getVirtualScrollViewportHeight(): string;
|
|
1613
|
+
onVirtualScrollViewportHeightChange(value: string): void;
|
|
1614
|
+
getVirtualScrollItemSize(): number | undefined;
|
|
1615
|
+
onVirtualScrollItemSizeChange(value: any): void;
|
|
1616
|
+
getVirtualScrollMinBufferPx(): number | undefined;
|
|
1617
|
+
onVirtualScrollMinBufferPxChange(value: any): void;
|
|
1618
|
+
getVirtualScrollMaxBufferPx(): number | undefined;
|
|
1619
|
+
onVirtualScrollMaxBufferPxChange(value: any): void;
|
|
1620
|
+
getVirtualScrollCompatibilityWarning(): string;
|
|
1621
|
+
private ensureVirtualScrollObjectDraft;
|
|
1622
|
+
private collapseVirtualScrollDraftIfDefault;
|
|
1568
1623
|
rowLayoutEnabled(): boolean;
|
|
1569
1624
|
onRowLayoutEnabledChange(enabled: boolean): void;
|
|
1570
1625
|
applyCorporateRowLayoutPreset(): void;
|
|
@@ -1642,6 +1697,49 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
|
1642
1697
|
onRuleConditionChanged(rule: {
|
|
1643
1698
|
condition?: JsonLogicExpression | null;
|
|
1644
1699
|
}, raw: string): void;
|
|
1700
|
+
readonly cardColumnsOptions: readonly ListCardColumns[];
|
|
1701
|
+
readonly ruleConditionOperators: readonly ["==", "!=", ">", ">=", "<", "<="];
|
|
1702
|
+
readonly itemStateToneOptions: ReadonlyArray<{
|
|
1703
|
+
value: ListItemStateTone;
|
|
1704
|
+
label: string;
|
|
1705
|
+
cssClass: string;
|
|
1706
|
+
border: string;
|
|
1707
|
+
background: string;
|
|
1708
|
+
}>;
|
|
1709
|
+
getCardColumnsModel(): ListCardColumns;
|
|
1710
|
+
onCardColumnsChange(value: ListCardColumns): void;
|
|
1711
|
+
applyCardWidthPreset(width: string): void;
|
|
1712
|
+
applyCardHeightPreset(height: string): void;
|
|
1713
|
+
onStatusPositionChange(position: 'inline' | 'top-right' | undefined): void;
|
|
1714
|
+
applyStandardStatusColorMap(): void;
|
|
1715
|
+
getSlotAnatomyItems(): Array<{
|
|
1716
|
+
slot: 'leading' | 'primary' | 'secondary' | 'meta' | 'trailing' | 'features';
|
|
1717
|
+
label: string;
|
|
1718
|
+
role: string;
|
|
1719
|
+
mapped: boolean;
|
|
1720
|
+
summary: string;
|
|
1721
|
+
}>;
|
|
1722
|
+
isSlotMapped(slot: 'leading' | 'primary' | 'secondary' | 'meta' | 'trailing' | 'features'): boolean;
|
|
1723
|
+
getSlotMappingSummary(slot: 'leading' | 'primary' | 'secondary' | 'meta' | 'trailing' | 'features'): string;
|
|
1724
|
+
applyDidacticSlotPreset(preset: 'operational-card' | 'executive-compact-card' | 'dense-list'): void;
|
|
1725
|
+
applyItemStyleTonePreset(rule: ListItemStyleRule, tone: ListItemStateTone): void;
|
|
1726
|
+
private parseSimpleRuleCondition;
|
|
1727
|
+
getGuidedRuleConditionField(rule: {
|
|
1728
|
+
condition?: JsonLogicExpression | null;
|
|
1729
|
+
}): string;
|
|
1730
|
+
getGuidedRuleConditionOperator(rule: {
|
|
1731
|
+
condition?: JsonLogicExpression | null;
|
|
1732
|
+
}): string;
|
|
1733
|
+
getGuidedRuleConditionValue(rule: {
|
|
1734
|
+
condition?: JsonLogicExpression | null;
|
|
1735
|
+
}): string;
|
|
1736
|
+
onGuidedRuleConditionChange(rule: {
|
|
1737
|
+
condition?: JsonLogicExpression | null;
|
|
1738
|
+
}, patch: {
|
|
1739
|
+
field?: string;
|
|
1740
|
+
operator?: string;
|
|
1741
|
+
value?: string;
|
|
1742
|
+
}): void;
|
|
1645
1743
|
getItemStyleEffect(rule: ListItemStyleRule): ListItemStyleEffect | undefined;
|
|
1646
1744
|
ensureItemStyleEffect(rule: ListItemStyleRule): void;
|
|
1647
1745
|
clearItemStyleEffects(rule: ListItemStyleRule): void;
|
|
@@ -1694,6 +1792,7 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
|
1694
1792
|
private insertIntoFeatureExpr;
|
|
1695
1793
|
private updateFeatureExpr;
|
|
1696
1794
|
private hydrateMappingFromTemplating;
|
|
1795
|
+
private syncDirtyStateNow;
|
|
1697
1796
|
markDirty(): void;
|
|
1698
1797
|
private getMappingSnapshot;
|
|
1699
1798
|
private updateMappingDirty;
|
|
@@ -1821,6 +1920,9 @@ declare function evaluateTemplate(def: TemplateDef | undefined, item: any, optio
|
|
|
1821
1920
|
variant?: 'filled' | 'outlined';
|
|
1822
1921
|
};
|
|
1823
1922
|
} | null;
|
|
1923
|
+
declare function safeFormatDate(date: Date, format?: string, locale?: string, style?: string): string;
|
|
1924
|
+
declare function safeFormatDateTime(date: Date, format?: string, locale?: string, style?: string): string;
|
|
1925
|
+
declare function formatRelativeTime(date: Date, locale?: string, baseDate?: Date): string;
|
|
1824
1926
|
|
|
1825
1927
|
type ListRichContentP0Node = RichPresenterNode | RichComposeNode;
|
|
1826
1928
|
declare function isListTemplateSupportedByRichContentP0(template?: TemplateDef | null): boolean;
|
|
@@ -1828,6 +1930,7 @@ declare function mapListTemplateToRichContentP0(template?: TemplateDef | null):
|
|
|
1828
1930
|
|
|
1829
1931
|
declare function adaptSelection(config: PraxisListConfig | undefined, items: any[]): ListSelectionEvent;
|
|
1830
1932
|
|
|
1933
|
+
declare const PRAXIS_LIST_INSERTION_PRESETS: NonNullable<ComponentDocMeta['insertionPresets']>;
|
|
1831
1934
|
declare const PRAXIS_LIST_COMPONENT_METADATA: ComponentDocMeta;
|
|
1832
1935
|
declare function providePraxisListMetadata(): Provider;
|
|
1833
1936
|
|
|
@@ -1986,9 +2089,13 @@ declare class PraxisListDocPageComponent {
|
|
|
1986
2089
|
model: "hotel";
|
|
1987
2090
|
groupBy: undefined;
|
|
1988
2091
|
itemSpacing?: "none" | "tight" | "default" | "relaxed";
|
|
2092
|
+
itemAppearance?: "flat" | "card" | "capsule";
|
|
1989
2093
|
dividers?: "none" | "between" | "all";
|
|
2094
|
+
cardColumns?: _praxisui_list.ListCardColumns;
|
|
2095
|
+
cardMinWidth?: string;
|
|
2096
|
+
cardMinHeight?: string;
|
|
1990
2097
|
stickySectionHeader?: boolean;
|
|
1991
|
-
virtualScroll?: boolean;
|
|
2098
|
+
virtualScroll?: boolean | _praxisui_list.PraxisListVirtualScrollConfig;
|
|
1992
2099
|
pageSize?: number;
|
|
1993
2100
|
rowLayout?: {
|
|
1994
2101
|
type?: "grid" | "flex";
|
|
@@ -2108,27 +2215,8 @@ declare class PraxisListDocPageComponent {
|
|
|
2108
2215
|
errorTemplate?: _praxisui_list.TemplateDef;
|
|
2109
2216
|
};
|
|
2110
2217
|
};
|
|
2111
|
-
actions?:
|
|
2112
|
-
|
|
2113
|
-
icon?: string;
|
|
2114
|
-
label?: string;
|
|
2115
|
-
color?: string;
|
|
2116
|
-
kind?: "icon" | "button";
|
|
2117
|
-
buttonVariant?: "stroked" | "raised" | "flat";
|
|
2118
|
-
showIf?: _praxisui_core.JsonLogicExpression | null;
|
|
2119
|
-
emitPayload?: "item" | "id" | "value";
|
|
2120
|
-
action?: "surface.open";
|
|
2121
|
-
recordOpen?: _praxisui_core.ResourceRecordOpenRef;
|
|
2122
|
-
globalAction?: _praxisui_core.GlobalActionRef;
|
|
2123
|
-
emitLocal?: boolean;
|
|
2124
|
-
showLoading?: boolean;
|
|
2125
|
-
placement?: "actions" | "trailing";
|
|
2126
|
-
confirmation?: {
|
|
2127
|
-
title?: string;
|
|
2128
|
-
message?: string;
|
|
2129
|
-
type?: "danger" | "warning" | "info";
|
|
2130
|
-
};
|
|
2131
|
-
}>;
|
|
2218
|
+
actions?: _praxisui_list.PraxisListItemAction[];
|
|
2219
|
+
itemActions?: _praxisui_list.PraxisListItemAction[];
|
|
2132
2220
|
i18n?: _praxisui_list.PraxisListI18nConfig;
|
|
2133
2221
|
ui?: {
|
|
2134
2222
|
showSearch?: boolean;
|
|
@@ -2224,6 +2312,14 @@ declare const PRAXIS_LIST_EN_US: {
|
|
|
2224
2312
|
readonly Appearance: "Appearance";
|
|
2225
2313
|
readonly 'Assistant-applied adjustments replace the entire configuration object.': "Assistant-applied adjustments replace the entire configuration object.";
|
|
2226
2314
|
readonly 'applyConfigFromAdapter does not perform a deep merge. Make sure the adapter sends the full config.': "applyConfigFromAdapter does not perform a deep merge. Make sure the adapter sends the full config.";
|
|
2315
|
+
readonly 'Configure how the list loads records: connect a remote API resource or keep local/sample items.': "Configure how the list loads records: connect a remote API resource or keep local/sample items.";
|
|
2316
|
+
readonly 'When local/sample items (dataSource.data) are present, they take precedence over the remote API resource (resourcePath). Switch to the remote resource when you are ready to load live data.': "When local/sample items (dataSource.data) are present, they take precedence over the remote API resource (resourcePath). Switch to the remote resource when you are ready to load live data.";
|
|
2317
|
+
readonly 'Active data source': "Active data source";
|
|
2318
|
+
readonly 'Local / sample data': "Local / sample data";
|
|
2319
|
+
readonly 'Remote resource (API)': "Remote resource (API)";
|
|
2320
|
+
readonly 'No data source configured': "No data source configured";
|
|
2321
|
+
readonly 'Use remote resource (remove local data)': "Use remote resource (remove local data)";
|
|
2322
|
+
readonly 'Restore local data': "Restore local data";
|
|
2227
2323
|
readonly 'Resource (API)': "Resource (API)";
|
|
2228
2324
|
readonly 'List resource': "List resource";
|
|
2229
2325
|
readonly 'Select resource': "Select resource";
|
|
@@ -2612,6 +2708,14 @@ declare const PRAXIS_LIST_PT_BR: {
|
|
|
2612
2708
|
readonly Appearance: "Aparência";
|
|
2613
2709
|
readonly 'Assistant-applied adjustments replace the entire configuration object.': "Observação: ajustes aplicados pelo assistente substituem o objeto de configuração inteiro.";
|
|
2614
2710
|
readonly 'applyConfigFromAdapter does not perform a deep merge. Make sure the adapter sends the full config.': "O applyConfigFromAdapter não faz merge profundo. Garanta que o adapter envie a configuração completa.";
|
|
2711
|
+
readonly 'Configure how the list loads records: connect a remote API resource or keep local/sample items.': "Defina como a lista carrega os registros: conecte um recurso remoto (API) ou mantenha itens locais/de exemplo.";
|
|
2712
|
+
readonly 'When local/sample items (dataSource.data) are present, they take precedence over the remote API resource (resourcePath). Switch to the remote resource when you are ready to load live data.': "Quando há itens locais/de exemplo (dataSource.data), eles têm precedência sobre o recurso remoto (resourcePath). Alterne para o recurso remoto quando quiser carregar dados reais da API.";
|
|
2713
|
+
readonly 'Active data source': "Fonte ativa";
|
|
2714
|
+
readonly 'Local / sample data': "Dados locais / de exemplo";
|
|
2715
|
+
readonly 'Remote resource (API)': "Recurso remoto (API)";
|
|
2716
|
+
readonly 'No data source configured': "Nenhuma fonte configurada";
|
|
2717
|
+
readonly 'Use remote resource (remove local data)': "Usar recurso remoto (remover dados locais)";
|
|
2718
|
+
readonly 'Restore local data': "Restaurar dados locais";
|
|
2615
2719
|
readonly 'Resource (API)': "Recurso (API)";
|
|
2616
2720
|
readonly 'List resource': "Recurso da lista";
|
|
2617
2721
|
readonly 'Select resource': "Selecionar recurso";
|
|
@@ -2955,5 +3059,5 @@ declare const PRAXIS_LIST_PT_BR: {
|
|
|
2955
3059
|
readonly 'Advanced row CSS': "CSS avançado da linha";
|
|
2956
3060
|
};
|
|
2957
3061
|
|
|
2958
|
-
export { ExecutiveAlertsComponent, ExecutiveBadgeComponent, ExecutiveOwnerComponent, LIST_AI_CAPABILITIES, ListDataService, ListSkinService, PRAXIS_LIST_AUTHORING_MANIFEST, PRAXIS_LIST_COMPONENT_METADATA, PRAXIS_LIST_EN_US, PRAXIS_LIST_I18N_NAMESPACE, PRAXIS_LIST_PT_BR, PraxisList, PraxisListConfigEditor, PraxisListDocPageComponent, PraxisListJsonConfigEditorComponent, PraxisListWidgetConfigEditor, adaptSelection, buildListApplyPlan, createListAuthoringDocument, evalExpr, evaluateTemplate, inferListAuthoringDocument, inferTemplatingFromSchema, isListTemplateSupportedByRichContentP0, mapListTemplateToRichContentP0, normalizeListActionPayloads, normalizeListAuthoringDocument, normalizeListConfig, parseLegacyOrListDocument, projectListAuthoringDocument, providePraxisListI18n, providePraxisListMetadata, serializeListAuthoringDocument, toCanonicalListConfig, validateListAuthoringDocument };
|
|
2959
|
-
export type { Capability, CapabilityCatalog, CapabilityCategory, EditorDiagnostic, EditorDocument, ExecutiveAlert, JsonEditorEvent, JsonValidationResult, ListActionEvent, ListApplyPlan, ListAuthoringDocument, ListExpansionSectionDef, ListExpansionSectionType, ListFeatureDef, ListItemEvent, ListItemStyleEffect, ListItemStyleRule, ListProjectionContext, ListRemoteLoadError, ListRichContentP0Node, ListRowLayoutSlot, ListRuntimeContext, ListSchemaInferencePlan, ListSection, ListSelectionEvent, ListSlotOverrideEffect, ListSlotOverrideRule, ListTemplatingSlot, ListValidationContext, PraxisListConfig, PraxisListExportConfig, PraxisListI18nConfig, PraxisListWidgetEditorInputs, PraxisListWidgetEditorValue, TemplateDef, TemplateEvaluatorOptions, TemplateFeatureDef, TemplateType, TemplatingFeatureDef, ValueKind };
|
|
3062
|
+
export { ExecutiveAlertsComponent, ExecutiveBadgeComponent, ExecutiveOwnerComponent, LIST_AI_CAPABILITIES, ListDataService, ListSkinService, PRAXIS_LIST_AUTHORING_MANIFEST, PRAXIS_LIST_COMPONENT_METADATA, PRAXIS_LIST_EN_US, PRAXIS_LIST_I18N_NAMESPACE, PRAXIS_LIST_INSERTION_PRESETS, PRAXIS_LIST_PT_BR, PraxisList, PraxisListConfigEditor, PraxisListDocPageComponent, PraxisListJsonConfigEditorComponent, PraxisListWidgetConfigEditor, adaptSelection, buildListApplyPlan, createListAuthoringDocument, evalExpr, evaluateTemplate, formatRelativeTime, inferListAuthoringDocument, inferTemplatingFromSchema, isListTemplateSupportedByRichContentP0, mapListTemplateToRichContentP0, normalizeListActionPayloads, normalizeListAuthoringDocument, normalizeListConfig, parseLegacyOrListDocument, projectListAuthoringDocument, providePraxisListI18n, providePraxisListMetadata, safeFormatDate, safeFormatDateTime, serializeListAuthoringDocument, toCanonicalListConfig, validateListAuthoringDocument };
|
|
3063
|
+
export type { Capability, CapabilityCatalog, CapabilityCategory, EditorDiagnostic, EditorDocument, ExecutiveAlert, JsonEditorEvent, JsonValidationResult, ListActionEvent, ListApplyPlan, ListAuthoringDocument, ListCardColumns, ListExpansionSectionDef, ListExpansionSectionType, ListFeatureDef, ListItemEvent, ListItemStateTone, ListItemStyleEffect, ListItemStyleRule, ListProjectionContext, ListRemoteLoadError, ListRichContentP0Node, ListRowLayoutSlot, ListRuntimeContext, ListSchemaInferencePlan, ListSection, ListSelectionEvent, ListSlotOverrideEffect, ListSlotOverrideRule, ListTemplatingSlot, ListValidationContext, PraxisListConfig, PraxisListExportConfig, PraxisListI18nConfig, PraxisListItemAction, PraxisListVirtualScrollConfig, PraxisListWidgetEditorInputs, PraxisListWidgetEditorValue, TemplateDef, TemplateEvaluatorOptions, TemplateFeatureDef, TemplateType, TemplatingFeatureDef, ValueKind };
|