@praxisui/list 10.0.0-rc.53 → 10.0.0-rc.56

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/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@praxisui/list",
3
- "version": "10.0.0-rc.53",
3
+ "version": "10.0.0-rc.56",
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
8
  "@angular/cdk": "^21.0.0",
9
9
  "@angular/material": "^21.0.0",
10
- "@praxisui/dynamic-fields": "^10.0.0-rc.53",
10
+ "@praxisui/dynamic-fields": "^10.0.0-rc.56",
11
11
  "rxjs": ">=7 <9",
12
12
  "@angular/forms": "^21.0.0",
13
13
  "@angular/router": "^21.0.0",
14
- "@praxisui/ai": "^10.0.0-rc.53",
15
- "@praxisui/core": "^10.0.0-rc.53",
16
- "@praxisui/rich-content": "^10.0.0-rc.53",
17
- "@praxisui/settings-panel": "^10.0.0-rc.53"
14
+ "@praxisui/ai": "^10.0.0-rc.56",
15
+ "@praxisui/core": "^10.0.0-rc.56",
16
+ "@praxisui/rich-content": "^10.0.0-rc.56",
17
+ "@praxisui/settings-panel": "^10.0.0-rc.56"
18
18
  },
19
19
  "dependencies": {
20
20
  "tslib": "^2.3.0",
@@ -93,6 +93,12 @@ A resolução de configuração e customização segue o padrão canônico da pl
93
93
  | `collapsedIds` | `ReadonlySet<string> \| ReadonlyArray<string> \| null` | Derivado de `initialExpandDepth` / colapso local | Códigos dos nós com subárvore recolhida (controlado quando `nodeToggle` está observado). |
94
94
  | `rootScopeLabel` | `string \| null` | `config.hierarchy.rootScopeLabel` | Rótulo opcional do escopo institucional raiz (`scope-badge`). |
95
95
  | `synthesizePolymorphicNodes` | `boolean \| null` | `true` | Quando `false`, suprime pílulas sintéticas de liderança e lotação (`person` / `role-quota`). |
96
+ | `comparisonNodes` | `ReadonlyArray<Record<string, unknown> \| PraxisOrganogramNode> \| null` | `config.diff.comparisonNodes ?? null` | Snapshot comparativo (baseline) para o modo *diff* temporal (`+`, `-`, `⇄`, `Δ`). |
97
+ | `referenceDateLabel` | `string \| null` | `config.diff.referenceDateLabel ?? null` | Rótulo da data de referência atual na barra comparativa. |
98
+ | `comparisonDateLabel` | `string \| null` | `config.diff.comparisonDateLabel ?? null` | Rótulo da data de referência anterior na barra comparativa. |
99
+ | `diffEnabled` | `boolean \| null` | `null` | Habilita explicitamente o modo *diff* quando `comparisonNodes` é fornecido. |
100
+ | `diffConfig` | `PraxisOrganogramDiffConfig \| null` | `config.diff ?? null` | Override declarativo das configurações de diff temporal. |
101
+ | `occupancyColorRule` | `PraxisOrganogramOccupancyColorRule \| null` | `config.rules.occupancyColoring ?? null` | Regra opcional de coloração por taxa de ocupação de vagas ou criticidade de comando. |
96
102
 
97
103
  ### 2.2. Outputs (`@Output()`)
98
104
 
@@ -192,7 +198,22 @@ A resolução de configuração e customização segue o padrão canônico da pl
192
198
  "icon": "person_off",
193
199
  "badge": "Sem comando"
194
200
  }
195
- ]
201
+ ],
202
+ "occupancyColoring": {
203
+ "enabled": true,
204
+ "mode": "criticality",
205
+ "lowThresholdPercent": 50,
206
+ "warningThresholdPercent": 70,
207
+ "highThresholdPercent": 90,
208
+ "overQuotaDanger": true,
209
+ "intensity": "subtle"
210
+ }
211
+ },
212
+ "diff": {
213
+ "enabled": true,
214
+ "referenceDateLabel": "2026-10",
215
+ "comparisonDateLabel": "2026-01",
216
+ "changesOnly": false
196
217
  },
197
218
  "actions": [
198
219
  {
@@ -297,6 +318,20 @@ Cada regra em `config.rules.nodeStyles` recebe um contexto combinando `node.raw`
297
318
  | `background` | `string?` | Atalho para definir fundo inline no card do nó. |
298
319
  | `style` | `Record<string, string>?` | Estilos inline mesclados em `node.customStyle`. |
299
320
 
321
+ ### 3.5.1. `rules.occupancyColoring` (`PraxisOrganogramOccupancyColorRule`)
322
+
323
+ Regra declarativa de heatmap por ocupação de vagas e criticidade de comando:
324
+
325
+ | Campo | Tipo | Padrão | Descrição |
326
+ | --- | --- | --- | --- |
327
+ | `enabled` | `boolean` | `false` | Ativa a coloração automática por ocupação/criticidade nos cards `unit`. |
328
+ | `mode` | `'none' \| 'occupancy' \| 'criticality'` | `'none'` | `'occupancy'` avalia apenas taxa de lotação; `'criticality'` combina vacância/interinidade de comando + ocupação. |
329
+ | `lowThresholdPercent` | `number` | `50` | Limiar crítico inferior (`0 <= lowThresholdPercent < highThresholdPercent`). |
330
+ | `warningThresholdPercent` | `number` | `70` | Limiar intermediário de atenção. |
331
+ | `highThresholdPercent` | `number` | `90` | Limiar saudável/meta. |
332
+ | `overQuotaDanger` | `boolean` | `true` | Marca como `'danger'` unidades acima de 100% ou em excedente com `authorizedCount === 0 && occupiedCount > 0`. |
333
+ | `intensity` | `'subtle' \| 'strong'` | `'subtle'` | Intensidade de preenchimento semântico nos cards. |
334
+
300
335
  ### 3.6. `actions` (`PraxisOrganogramNodeAction[]`) e `quickView`
301
336
 
302
337
  - **Ações declarativas por nó (`actions`):**
@@ -306,6 +341,18 @@ Cada regra em `config.rules.nodeStyles` recebe um contexto combinando `node.raw`
306
341
  - **Quick View 360° (`quickView: ResourceQuickViewBinding`):**
307
342
  - Configura `{ recordOpen: { sourceIdentityField, target: { resourceKey, surfaceId } }, previewSurfaceId?, contentRef?, detailPresentation? }` diretamente no JSON ou herda metadados `x-ui.resourceReference` do `/schemas/filtered` quando `resourcePath` é fornecido.
308
343
 
344
+ ### 3.7. `diff` (`PraxisOrganogramDiffConfig`)
345
+
346
+ Compara a árvore atual (`T1`) contra `comparisonNodes` (`T0`), indexando o baseline inclusive com unidades extintas (`includeExtinct: true`):
347
+
348
+ | Campo | Tipo | Padrão | Descrição |
349
+ | --- | --- | --- | --- |
350
+ | `enabled` | `boolean` | Automático se `comparisonNodes` tiver itens | Habilita cálculo de diff temporal (`created`, `extinct`, `moved`, `modified` inclusive reativação). |
351
+ | `referenceDateLabel` | `string?` | — | Rótulo da data/snapshot atual (`T1`) exibido no resumo de comparação. |
352
+ | `comparisonDateLabel` | `string?` | — | Rótulo da data/snapshot baseline (`T0`) exibido no resumo de comparação. |
353
+ | `comparisonNodes` | `Array<Record<string, unknown> \| PraxisOrganogramNode>?` | — | Lista de nós/unidades do snapshot baseline (`T0`). |
354
+ | `changesOnly` | `boolean` | `false` | Estado inicial do filtro exibindo apenas nós alterados e seus ancestrais. |
355
+
309
356
  ---
310
357
 
311
358
  ## 4. Tabela Completa de Tokens CSS do Host (`--prx-org-*`)
@@ -0,0 +1,96 @@
1
+ ---
2
+ title: "praxis-relationship-graph JSON API (Canonical)"
3
+ slug: "praxis-relationship-graph-json-api"
4
+ doc_type: "api-reference"
5
+ component: "praxis-relationship-graph"
6
+ document_kind: "json-api-canonical"
7
+ reference_mode: "canonical"
8
+ contract_format: "json"
9
+ contract_source: "runtime-and-code"
10
+ description: "Referencia canonica do contrato JSON, x-ui.relationshipGraph, codificacao nao-cromatica de evidencias e manifesto AI de <praxis-relationship-graph>."
11
+ category: "components"
12
+ sub_category: "list"
13
+ audience:
14
+ - "frontend"
15
+ - "architect"
16
+ - "platform-team"
17
+ level: "advanced"
18
+ status: "active"
19
+ owner: "praxis-ui"
20
+ source_of_truth:
21
+ - "projects/praxis-list/src/lib/models/relationship-graph-config.model.ts"
22
+ - "projects/praxis-list/src/lib/components/relationship-graph/praxis-relationship-graph.component.ts"
23
+ - "projects/praxis-list/src/lib/praxis-relationship-graph.metadata.ts"
24
+ - "projects/praxis-list/src/lib/ai/praxis-relationship-graph-authoring-manifest.ts"
25
+ source_of_truth_last_verified: "2026-11-18"
26
+ last_updated: "2026-11-18"
27
+ toc: true
28
+ sidebar: true
29
+ tags:
30
+ - "json-api"
31
+ - "canonical-contract"
32
+ - "praxis-list"
33
+ - "relationship-graph"
34
+ api_stability: "canonical"
35
+ schema_verified: true
36
+ runtime_verified: true
37
+ editor_coverage_verified: true
38
+ runtime_scope: "public"
39
+ legacy_paths_present: false
40
+ has_known_mismatches: false
41
+ related_components: []
42
+ ---
43
+
44
+ ## Summary
45
+
46
+ `<praxis-relationship-graph>` renders heterogeneous relationship graphs (attack paths, identity/access topologies, constitutional accumulation graphs, dependency networks, and clustered subgraphs) from canonical `PraxisRelationshipGraphConfig` and `PraxisRelationshipGraphDataset` contracts in `@praxisui/list`, completely independent of `<praxis-organogram>`.
47
+
48
+ - **Algorithms (`layout.algorithm`):** `'layered-dag'` (`orientation: 'LR' | 'TB'`, Sugiyama cycle breaking + multi-parent layer assignment + barycenter ordering), `'ego-radial'` (`anchorNodeId`, `maxDepth`), `'force-spring'` (deterministic seeded Fruchterman-Reingold).
49
+ - **Evidence Provenance (`edge.evidence`):** `'observed'` (solid line + filled arrow), `'contextual'` (dashed line + hollow outlined arrow + contextual icon), `'inferred'` (dotted line + open chevron arrow + inference icon).
50
+ - **Dataset Compatibility:** Accepts canonical `edges[]` as well as `links[]` (`from`/`to` or `source`/`target`), `groups[]` collapsible clusters, numbered `sources[]`, and narrative `verdict` (`summary` or `PraxisRichContent` document).
51
+ - **Synchronized Accessibility:** Bidirectional selection and filtering between the interactive spatial graph canvas and the semantic `<table>` view (`'graph' | 'split' | 'table'`).
52
+
53
+ ## Source of truth
54
+
55
+ - Data & Configuration Model: `projects/praxis-list/src/lib/models/relationship-graph-config.model.ts` (`PraxisRelationshipGraphConfig`, `PraxisRelationshipGraphDataset`)
56
+ - Normalizer & Rules Evaluator: `projects/praxis-list/src/lib/components/relationship-graph/relationship-graph-normalizer.util.ts` (`normalizeRelationshipGraph`)
57
+ - Deterministic Layout Engine: `projects/praxis-list/src/lib/components/relationship-graph/relationship-graph-layout.util.ts` (`computeRelationshipGraphLayout`)
58
+ - Obstacle-Aware Routing & Label Collision Engine: `projects/praxis-list/src/lib/components/relationship-graph/relationship-graph-routing.util.ts` (`routeRelationshipGraphEdges`)
59
+ - Runtime Component: `projects/praxis-list/src/lib/components/relationship-graph/praxis-relationship-graph.component.ts` (`<praxis-relationship-graph>`)
60
+ - Component Metadata & Ports: `projects/praxis-list/src/lib/praxis-relationship-graph.metadata.ts` (`PRAXIS_RELATIONSHIP_GRAPH_COMPONENT_METADATA`)
61
+ - AI Authoring Manifest: `projects/praxis-list/src/lib/ai/praxis-relationship-graph-authoring-manifest.ts` (`PRAXIS_RELATIONSHIP_GRAPH_AUTHORING_MANIFEST`)
62
+
63
+ ## Contract classification
64
+
65
+ - **Classification:** Governed First-Class Widget (`praxis-relationship-graph`) in `@praxisui/list`.
66
+ - **Canonical Backend Extension:** `x-ui.relationshipGraph` (`PraxisSchemaRelationshipGraphMetadata` on `PraxisSchemaRootUiMetadata` in `@praxisui/core`).
67
+ - **Governance Artifacts:** Published with `ComponentDocMeta`, `PortContract[]`, `AiCapabilityCatalog`, `ComponentContextPack`, `ComponentAuthoringManifest`, `DEFAULT_GOVERNED_PAGE_CHILD_VALIDATORS`, and a 100% frameless `SettingsPanel` editor (`PraxisRelationshipGraphWidgetConfigEditor`).
68
+ - **Persistence Precedence:** Local data inputs (`nodes`/`edges`/`links`/`dataset`/`config.dataSource.data`) take strict precedence over `resourcePath`; stored configuration respects `'local-first' | 'input-first' | 'volatile'` via `AsyncConfigStorage`.
69
+
70
+ ```json
71
+ {
72
+ "id": "identity-access-graph",
73
+ "title": "Identity & Asset Relationship Graph",
74
+ "layout": {
75
+ "algorithm": "layered-dag",
76
+ "orientation": "LR",
77
+ "nodeShape": "circle",
78
+ "defaultViewMode": "split",
79
+ "showToolbar": true,
80
+ "showFilters": true,
81
+ "showLegend": true,
82
+ "showTableToggle": true,
83
+ "showInspector": true
84
+ },
85
+ "dataSource": {
86
+ "resourcePath": "/api/v1/relationships/graph",
87
+ "expandResourcePath": "/api/v1/relationships/expand"
88
+ },
89
+ "mapping": {
90
+ "nodesPath": "nodes",
91
+ "edgesPath": "edges",
92
+ "node": { "idField": "id", "typeField": "type", "labelField": "label", "groupIdField": "groupId" },
93
+ "edge": { "sourceField": "source", "targetField": "target", "relationField": "relation", "evidenceField": "evidence" }
94
+ }
95
+ }
96
+ ```