@praxisui/list 10.0.0-rc.46 → 10.0.0-rc.47
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 +72 -3
- package/ai/component-registry.json +937 -58
- package/fesm2022/praxisui-list.mjs +2186 -135
- package/package.json +6 -6
- package/src/lib/praxis-organogram.json-api.md +354 -0
- package/types/praxisui-list.d.ts +345 -6
package/README.md
CHANGED
|
@@ -188,6 +188,7 @@ In the visual editor (`Data` tab), the data source summary displays the active r
|
|
|
188
188
|
import { Component, signal } from '@angular/core';
|
|
189
189
|
import {
|
|
190
190
|
PraxisOrganogramComponent,
|
|
191
|
+
type PraxisOrganogramActionEvent,
|
|
191
192
|
type PraxisOrganogramConfig,
|
|
192
193
|
type PraxisOrganogramSubtreeFilterEvent,
|
|
193
194
|
} from '@praxisui/list';
|
|
@@ -197,9 +198,14 @@ import {
|
|
|
197
198
|
imports: [PraxisOrganogramComponent],
|
|
198
199
|
template: `
|
|
199
200
|
<praxis-organogram
|
|
201
|
+
organogramId="org-corporate-explorer"
|
|
202
|
+
configPersistenceStrategy="input-first"
|
|
203
|
+
[enableCustomization]="true"
|
|
200
204
|
[config]="organogramConfig()"
|
|
201
205
|
(subtreeFilterChange)="onSubtreeFilter($event)"
|
|
202
206
|
(inspect360)="openUnitDetail($event.node)"
|
|
207
|
+
(actionClick)="onNodeAction($event)"
|
|
208
|
+
(configPatchChange)="onConfigPatch($event)"
|
|
203
209
|
(collapsedChange)="onCollapsedChange($event)"
|
|
204
210
|
>
|
|
205
211
|
<ng-template #unitActions let-node>
|
|
@@ -236,14 +242,77 @@ export class OrgExplorerHostComponent {
|
|
|
236
242
|
dataSource: {
|
|
237
243
|
resourcePath: 'administracao-pessoal/organograma-unidades',
|
|
238
244
|
},
|
|
245
|
+
appearance: {
|
|
246
|
+
skin: 'elevated',
|
|
247
|
+
cardShape: 'rounded',
|
|
248
|
+
accentPosition: 'top',
|
|
249
|
+
connectorStyle: 'solid',
|
|
250
|
+
},
|
|
251
|
+
icons: {
|
|
252
|
+
unit: 'corporate_fare',
|
|
253
|
+
leader: 'verified_user',
|
|
254
|
+
vacantLeader: 'person_off',
|
|
255
|
+
},
|
|
256
|
+
rules: {
|
|
257
|
+
nodeStyles: [
|
|
258
|
+
{
|
|
259
|
+
id: 'highlight-vacant',
|
|
260
|
+
label: 'Destacar vacância',
|
|
261
|
+
condition: { '==': [{ var: 'commandStatus' }, 'VACANT_LEADER'] },
|
|
262
|
+
tone: 'danger',
|
|
263
|
+
badge: 'Sem titular',
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
},
|
|
267
|
+
actions: [
|
|
268
|
+
{
|
|
269
|
+
id: 'view-team',
|
|
270
|
+
label: 'Equipe',
|
|
271
|
+
icon: 'groups',
|
|
272
|
+
kind: 'mini',
|
|
273
|
+
action: 'view-team',
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
quickView: {
|
|
277
|
+
recordOpen: {
|
|
278
|
+
sourceIdentityField: 'id',
|
|
279
|
+
target: {
|
|
280
|
+
resourceKey: 'setores',
|
|
281
|
+
surfaceId: 'detail',
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
previewSurfaceId: 'summary',
|
|
285
|
+
detailPresentation: 'drawer',
|
|
286
|
+
},
|
|
239
287
|
});
|
|
240
288
|
|
|
241
289
|
onSubtreeFilter(event: PraxisOrganogramSubtreeFilterEvent): void {
|
|
242
290
|
// event.filters carries { departmentCode, hierarchyPathPrefix, ... } when selected
|
|
243
291
|
}
|
|
292
|
+
|
|
293
|
+
onNodeAction(_event: PraxisOrganogramActionEvent): void {}
|
|
294
|
+
|
|
295
|
+
onConfigPatch(_patch: Partial<PraxisOrganogramConfig>): void {}
|
|
244
296
|
}
|
|
245
297
|
```
|
|
246
298
|
|
|
299
|
+
### Host Theme Tokens (`--prx-org-*`) & Declarative JSON Governance
|
|
300
|
+
|
|
301
|
+
For host-wide branding, `<praxis-organogram>` exposes CSS Custom Properties `--prx-org-*` alongside declarative JSON overrides in `config.appearance` (`config.skin`), `config.icons`, `config.rules.nodeStyles` (evaluated via `PraxisJsonLogicService`), `config.actions` and `config.quickView`, persisted under `organogramId` (`configPersistenceStrategy`: `'local-first' | 'input-first' | 'volatile'`) and editable at runtime via `PraxisOrganogramWidgetConfigEditor`:
|
|
302
|
+
|
|
303
|
+
| CSS Custom Property | Fallback Default | Purpose |
|
|
304
|
+
| --- | --- | --- |
|
|
305
|
+
| `--prx-org-surface` / `--prx-org-surface-muted` | `--card` (`#ffffff`) / `--secondary` (`#f8fafc`) | Card, toolbar and secondary panel backgrounds |
|
|
306
|
+
| `--prx-org-border-color` / `--prx-org-card-border` | `--border` (`#dbe3ec`) / `1px solid var(--_org-border-color)` | Base border token and card stroke |
|
|
307
|
+
| `--prx-org-canvas-bg` / `--prx-org-grid-dot-color` | Mixed surface tint / subtle dot tint | Viewport background and dotted grid color |
|
|
308
|
+
| `--prx-org-card-width` / `--prx-org-pill-width` | `300px` / `248px` | Standard widths for `unit` cards and polymorphic pills |
|
|
309
|
+
| `--prx-org-card-radius` / `--prx-org-pill-radius` | `0.9rem` / `999px` | Card and pill border radii (`cardShape` presets map here) |
|
|
310
|
+
| `--prx-org-line-color` / `--prx-org-line-width` / `--prx-org-line-style` / `--prx-org-line-radius` | Theme tint / `2px` / `solid` / `8px` | Connector color, stroke weight, dash style and elbow corner radius |
|
|
311
|
+
| `--prx-org-node-dot-size` / `--prx-org-pillars-gap` | `10px` / `1.25rem` | Pillar bus junction dot size and pillar column gap |
|
|
312
|
+
| `--prx-org-tone-{primary,success,warning,danger,info,violet,neutral}` | Praxis theme palette | Semantic status accents for cards, badges and alerts |
|
|
313
|
+
|
|
314
|
+
Refer to the canonical JSON & runtime specification in [praxis-organogram.json-api.md](./src/lib/praxis-organogram.json-api.md).
|
|
315
|
+
|
|
247
316
|
### Topology Decision Matrix
|
|
248
317
|
|
|
249
318
|
| Topology (`layout.topology`) | Best Corporate Use Case | Polymorphic Pills & Subtree Expansion |
|
|
@@ -256,13 +325,13 @@ export class OrgExplorerHostComponent {
|
|
|
256
325
|
### Organogram Runtime Boundaries & Enterprise Sizing
|
|
257
326
|
|
|
258
327
|
- **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 &
|
|
260
|
-
- **Depth Control & Legend:** Set `layout.initialExpandDepth` (`1..10`) to keep large trees readable on first paint
|
|
328
|
+
- **Leadership, Vacancy & Over-Quota Semantics:** Incumbent leaders (`chefeTitularNome`/`chefiaTitularNome`) take precedence over acting substitutes (`chefeEmExercicioNome`/`substitutoAtivoNome`) without duplicating names. Units flagged as `'SEM_COMANDO'`, `'VACANTE'` or `'VACANT_LEADER'` highlight as `danger` alerts and suppress synthetic `'person'` pill cards; `'TITULAR_AFASTADO_SEM_SUBSTITUTO'` renders an explicit `danger` alert pill (`icons.vacantLeader`); units with `occupiedCount > authorizedCount` or `'OVER_QUOTA'` highlight with `danger` tone and `+N excedente(s)` indicators in both quota pills and inline micro-visualizations.
|
|
329
|
+
- **Viewport Navigation, Depth Control & Legend:** Set `layout.initialExpandDepth` (`1..10`) to keep large trees readable on first paint (collections above 80 units automatically collapse from depth 2 when unset). Users can pan via **drag-to-pan** on empty viewport canvas areas, jump to matches via search auto-centering, use one-click **Expand all** / **Collapse 1st tier** toolbar actions, or trigger **`centerViewport()`** (`[data-testid="organograma-center-view"]`).
|
|
261
330
|
- **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
331
|
|
|
263
332
|
## Public API Snapshot
|
|
264
333
|
|
|
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.
|
|
334
|
+
The root `@praxisui/list` entrypoint exports `PraxisList`, `PraxisListConfig`, `PraxisOrganogramComponent` (`PraxisOrganogram`), `PraxisOrganogramConfig`, `PraxisOrganogramAppearanceConfig`, `PraxisOrganogramIconsConfig`, `PraxisOrganogramNodeStyleRule`, `PraxisOrganogramRulesConfig`, `PraxisOrganogramNodeAction`, `PraxisOrganogramActionEvent`, `PraxisOrganogramSkin`, `PraxisOrganogramCardShape`, `PraxisOrganogramAccentPosition`, `PraxisOrganogramConnectorStyle`, `PraxisOrganogramWidgetConfigEditor`, `PraxisOrganogramWidgetEditorInputs`, `PraxisOrganogramWidgetEditorValue`, `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.
|
|
266
335
|
|
|
267
336
|
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.
|
|
268
337
|
|