@praxisui/list 10.0.0-rc.44 → 10.0.0-rc.46
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 +88 -1
- package/ai/component-registry.json +2469 -82
- package/fesm2022/praxisui-list.mjs +7148 -3479
- package/package.json +6 -6
- package/types/praxisui-list.d.ts +536 -47
package/README.md
CHANGED
|
@@ -173,9 +173,96 @@ Each preset preconfigures `configPersistenceStrategy: 'input-first'` and `enable
|
|
|
173
173
|
|
|
174
174
|
In the visual editor (`Data` tab), the data source summary displays the active resolution mode (**Local / sample data**, **Remote resource (API)**, or **No data source configured**). When a preset or authored list includes `dataSource.data`, those local rows take precedence over `dataSource.resourcePath`. Clicking **Use remote resource (remove local data)** clears `dataSource.data` so the configured `resourcePath` becomes active and loads its schema fields; during the same editing session, **Restore local data** can recover the stashed sample rows before saving, while **Reset** reverts the editor to its initial configuration snapshot.
|
|
175
175
|
|
|
176
|
+
## Hierarchical Organogram (`<praxis-organogram>`)
|
|
177
|
+
|
|
178
|
+
`@praxisui/list` also provides `PraxisOrganogramComponent` (`<praxis-organogram>`), registered alongside `PraxisList` by `providePraxisListMetadata()` (or standalone via `providePraxisOrganogramMetadata()`).
|
|
179
|
+
|
|
180
|
+
- **Four switchable topologies (`PraxisOrganogramTopology`):** `orthogonal-compact` (TB/LR orthogonal tree with vertical compact stacking for leaf siblings), `pillars` (top hub + numbered columns `01..0N`), `curved-hub` (bilateral cubic Bézier S-curves), and `radial-360` (orbital ring + lateral satellite pills).
|
|
181
|
+
- **Polymorphic node variants (`PraxisOrganogramNodeVariant`):** `scope-badge`, `unit` (including inline `<praxis-rich-content>` bullet telemetry), `person`, and `role-quota`.
|
|
182
|
+
- **Extensible host actions (`#unitActions`):** Hosts can project domain-specific per-unit actions cleanly via `<ng-template #unitActions let-node>` inside `<praxis-organogram>`.
|
|
183
|
+
- **Data precedence & Page Builder authoring:** Explicit `[nodes]` / `dataSource.data` takes precedence over remote `resourcePath` loading (`GenericCrudService`), with four Page Builder presets (`PRAXIS_ORGANOGRAM_INSERTION_PRESETS`), Settings Panel editor `PraxisOrganogramWidgetConfigEditor`, and AI authoring contract `PRAXIS_ORGANOGRAM_AUTHORING_MANIFEST`.
|
|
184
|
+
|
|
185
|
+
### Standalone Usage Example
|
|
186
|
+
|
|
187
|
+
```ts
|
|
188
|
+
import { Component, signal } from '@angular/core';
|
|
189
|
+
import {
|
|
190
|
+
PraxisOrganogramComponent,
|
|
191
|
+
type PraxisOrganogramConfig,
|
|
192
|
+
type PraxisOrganogramSubtreeFilterEvent,
|
|
193
|
+
} from '@praxisui/list';
|
|
194
|
+
|
|
195
|
+
@Component({
|
|
196
|
+
standalone: true,
|
|
197
|
+
imports: [PraxisOrganogramComponent],
|
|
198
|
+
template: `
|
|
199
|
+
<praxis-organogram
|
|
200
|
+
[config]="organogramConfig()"
|
|
201
|
+
(subtreeFilterChange)="onSubtreeFilter($event)"
|
|
202
|
+
(inspect360)="openUnitDetail($event.node)"
|
|
203
|
+
(collapsedChange)="onCollapsedChange($event)"
|
|
204
|
+
>
|
|
205
|
+
<ng-template #unitActions let-node>
|
|
206
|
+
<button type="button" class="org-mini-action" (click)="openHistory(node); $event.stopPropagation()">
|
|
207
|
+
Histórico
|
|
208
|
+
</button>
|
|
209
|
+
</ng-template>
|
|
210
|
+
</praxis-organogram>
|
|
211
|
+
`,
|
|
212
|
+
})
|
|
213
|
+
export class OrgExplorerHostComponent {
|
|
214
|
+
readonly organogramConfig = signal<PraxisOrganogramConfig>({
|
|
215
|
+
id: 'org-corporate-explorer',
|
|
216
|
+
title: 'Estrutura Organizacional',
|
|
217
|
+
layout: {
|
|
218
|
+
topology: 'orthogonal-compact',
|
|
219
|
+
direction: 'TB',
|
|
220
|
+
compactLeafStackThreshold: 3,
|
|
221
|
+
initialExpandDepth: 2,
|
|
222
|
+
showLegend: true,
|
|
223
|
+
},
|
|
224
|
+
hierarchy: {
|
|
225
|
+
hierarchyType: 0,
|
|
226
|
+
rootScopeLabel: 'GOV-PE · Administração Direta',
|
|
227
|
+
},
|
|
228
|
+
mapping: {
|
|
229
|
+
codeField: 'departmentCode',
|
|
230
|
+
pathField: 'hierarchyPath',
|
|
231
|
+
parentFieldByHierarchyType: {
|
|
232
|
+
0: 'parentDepartmentCode',
|
|
233
|
+
1: 'financialParentCode',
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
dataSource: {
|
|
237
|
+
resourcePath: 'administracao-pessoal/organograma-unidades',
|
|
238
|
+
},
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
onSubtreeFilter(event: PraxisOrganogramSubtreeFilterEvent): void {
|
|
242
|
+
// event.filters carries { departmentCode, hierarchyPathPrefix, ... } when selected
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Topology Decision Matrix
|
|
248
|
+
|
|
249
|
+
| Topology (`layout.topology`) | Best Corporate Use Case | Polymorphic Pills & Subtree Expansion |
|
|
250
|
+
| --- | --- | --- |
|
|
251
|
+
| `'orthogonal-compact'` | Deep multi-level structures (3–6+ tiers), legal reporting lines, searchable HR trees. | Full multi-level expand/collapse (`initialExpandDepth`, toolbar Expand/Collapse, `ArrowLeft`/`ArrowRight`), stacks leaf siblings >= `compactLeafStackThreshold`. |
|
|
252
|
+
| `'pillars'` | Executive C-level / directorate overviews (`01..0N` numbered vertical pillars). | Renders top hub + column pillars with unit subordinates and inline `person` / `role-quota` pills. |
|
|
253
|
+
| `'curved-hub'` | Mid-size bilateral division maps radiating cleanly left and right from a root node. | Renders central hub + balanced left/right branches with branch polymorphic pills and nested units. |
|
|
254
|
+
| `'radial-360'` | High-level 360° governance radar around a focal entity and its first-ring satellites. | Focal center + up to 8 primary orbital discs and 4 satellites per orbit, keyboard-selectable (`Enter`/`Space`), displaying `+N` overflow counters beyond ring capacity. |
|
|
255
|
+
|
|
256
|
+
### Organogram Runtime Boundaries & Enterprise Sizing
|
|
257
|
+
|
|
258
|
+
- **Flat & Nested Hierarchy Inputs:** `buildOrganogramTree` accepts flat arrays (with parent references via `parentId` or `mapping.parentFieldByHierarchyType[hierarchyType]`) as well as nested `children[]` trees; cycle detection prevents infinite recursion.
|
|
259
|
+
- **Leadership & Vacancy Semantics:** Incumbent leaders (`chefeTitularNome`/`chefiaTitularNome`) take precedence over acting substitutes (`chefeEmExercicioNome`/`substitutoAtivoNome`) without duplicating names. Units flagged as `'SEM_COMANDO'` or `'VACANTE'` automatically highlight as `danger` governance alerts and omit synthetic `'person'` pill cards.
|
|
260
|
+
- **Depth Control & Legend:** Set `layout.initialExpandDepth` (`1..10`) to keep large trees readable on first paint while allowing one-click **Expand all** / **Collapse 1st tier** toolbar actions and optional footer governance legend (`layout.showLegend`).
|
|
261
|
+
- **Radial Ring Budget:** `radial-360` intentionally caps primary orbital nodes at 8 and lateral satellites per orbit at 4 to preserve circular geometry without collisions, surfacing explicit `+N` badges when additional units exist (switch to `orthogonal-compact` or `pillars` for exhaustive leaf inspection).
|
|
262
|
+
|
|
176
263
|
## Public API Snapshot
|
|
177
264
|
|
|
178
|
-
The root `@praxisui/list` entrypoint exports `PraxisList`, `PraxisListConfig`, list data services, templating/rich-content/selection adapters, metadata provider, list i18n helpers, AI capabilities, `PRAXIS_LIST_AUTHORING_MANIFEST` and `PraxisListDocPageComponent`. It also preserves the public editor classes `PraxisListConfigEditor` and `PraxisListWidgetConfigEditor`, and the types `PraxisListWidgetEditorInputs` and `PraxisListWidgetEditorValue`. Hosts can import these names directly from `@praxisui/list`; generic authoring hosts should resolve the configured editor through component metadata.
|
|
265
|
+
The root `@praxisui/list` entrypoint exports `PraxisList`, `PraxisListConfig`, `PraxisOrganogramComponent` (`PraxisOrganogram`), `PraxisOrganogramConfig`, `PraxisOrganogramWidgetConfigEditor`, `PRAXIS_ORGANOGRAM_AUTHORING_MANIFEST`, `PRAXIS_ORGANOGRAM_COMPONENT_METADATA`, `providePraxisOrganogramMetadata`, list data services, templating/rich-content/selection adapters, metadata provider, list i18n helpers, AI capabilities, `PRAXIS_LIST_AUTHORING_MANIFEST` and `PraxisListDocPageComponent`. It also preserves the public editor classes `PraxisListConfigEditor` and `PraxisListWidgetConfigEditor`, and the types `PraxisListWidgetEditorInputs` and `PraxisListWidgetEditorValue`. Hosts can import these names directly from `@praxisui/list`; generic authoring hosts should resolve the configured editor through component metadata.
|
|
179
266
|
|
|
180
267
|
Compact list, card and tile presenters delegated to `PraxisRichContent` use its existing `layout="inline"`: row slots, leading/primary/secondary content, metadata, trailing/status badges and features retain their intrinsic content width. Empty-state regions, section headers and rich-content expansion documents keep block rendering. Keep this distinction in the canonical List renderer; do not compensate with consumer CSS or remove Rich Content document containment. A rendered badge label needs a nonzero visible box: DOM text alone does not prove that a compact presenter is readable. Validate these compositions in their real desktop and narrow Dialog/list hosts.
|
|
181
268
|
|