@praxisui/list 5.0.0-beta.0 → 7.0.0-beta.0

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/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { OnInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, ChangeDetect
5
5
  import { MatSelectionListChange } from '@angular/material/list';
6
6
  import { FormGroup, FormControl } from '@angular/forms';
7
7
  import * as _praxisui_core from '@praxisui/core';
8
- import { JsonLogicExpression, LocalizationConfig, AiCapability, GlobalActionCatalogEntry, SurfaceOpenPayload, ComponentDocMeta, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog } from '@praxisui/core';
8
+ import { JsonLogicExpression, LocalizationConfig, AiCapability, RichBlockNode, GlobalActionCatalogEntry, SurfaceOpenPayload, RichPresenterNode, RichComposeNode, ComponentDocMeta, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog } from '@praxisui/core';
9
9
  import { BaseAiAdapter, PatchResult } from '@praxisui/ai';
10
10
  import { SettingsValueProvider } from '@praxisui/settings-panel';
11
11
 
@@ -505,6 +505,10 @@ declare class PraxisList implements OnInit, OnChanges, OnDestroy {
505
505
  rowLayoutSlot(item: any, slot: string): Record<string, any> | null;
506
506
  rowLayoutHasSlot(slot: ListRowLayoutSlot): boolean;
507
507
  rowLayoutImageAlt(slot: string): string;
508
+ simpleRichContentNodes(node: Record<string, any> | null | undefined, options?: {
509
+ imageAlt?: string;
510
+ slot?: string;
511
+ }): RichBlockNode[] | null;
508
512
  rowLayoutAlignItems(): 'start' | 'center' | 'end' | 'stretch';
509
513
  private rowLayoutTemplateColumns;
510
514
  private rowLayoutColumnWidth;
@@ -518,6 +522,12 @@ declare class PraxisList implements OnInit, OnChanges, OnDestroy {
518
522
  private slotAriaLabel;
519
523
  private nodeAriaLabel;
520
524
  featureLabelLines(item: any, expr?: string): string[];
525
+ featureRichContentNodes(item: any, feature: {
526
+ icon?: string;
527
+ expr?: string;
528
+ class?: string;
529
+ style?: string;
530
+ } | null | undefined): RichBlockNode[] | null;
521
531
  featureSemanticClass(item: any, expr?: string, featureClass?: string): string | null;
522
532
  featureProgressPercent(item: any, expr?: string, featureClass?: string): number | null;
523
533
  private metricText;
@@ -535,6 +545,8 @@ declare class PraxisList implements OnInit, OnChanges, OnDestroy {
535
545
  private resolveMetricColor;
536
546
  private joinStyles;
537
547
  private joinClasses;
548
+ private parseInlineStyle;
549
+ private mergeStyleRecords;
538
550
  featuresVisible(): boolean;
539
551
  featuresMode(): 'icons+labels' | 'icons-only' | 'labels-only';
540
552
  hasSkeleton(): boolean;
@@ -688,8 +700,7 @@ declare class PraxisList implements OnInit, OnChanges, OnDestroy {
688
700
  *
689
701
  * @example Basic usage
690
702
  * ```html
691
- * <praxis-executive-badge variant="enterprise">
692
- * Enterprise
703
+ * <praxis-executive-badge variant="enterprise" label="Enterprise">
693
704
  * </praxis-executive-badge>
694
705
  * ```
695
706
  *
@@ -697,8 +708,8 @@ declare class PraxisList implements OnInit, OnChanges, OnDestroy {
697
708
  * ```html
698
709
  * <praxis-executive-badge
699
710
  * [variant]="account.segmentType"
711
+ * [label]="account.segmentLabel"
700
712
  * [ariaLabel]="'Account segment: ' + account.segmentLabel">
701
- * {{ account.segmentLabel }}
702
713
  * </praxis-executive-badge>
703
714
  * ```
704
715
  *
@@ -713,6 +724,7 @@ declare class ExecutiveBadgeComponent {
713
724
  * If not provided, defaults to "Segment badge: {variant}"
714
725
  */
715
726
  ariaLabel?: string;
727
+ label?: string;
716
728
  private _variant;
717
729
  /**
718
730
  * Badge variant type with runtime validation.
@@ -727,8 +739,10 @@ declare class ExecutiveBadgeComponent {
727
739
  * Uses custom ariaLabel if provided, otherwise generates default.
728
740
  */
729
741
  get computedAriaLabel(): string;
742
+ get contentNodes(): RichBlockNode[];
743
+ private get displayLabel();
730
744
  static ɵfac: i0.ɵɵFactoryDeclaration<ExecutiveBadgeComponent, never>;
731
- static ɵcmp: i0.ɵɵComponentDeclaration<ExecutiveBadgeComponent, "praxis-executive-badge", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, {}, never, ["*"], true, never>;
745
+ static ɵcmp: i0.ɵɵComponentDeclaration<ExecutiveBadgeComponent, "praxis-executive-badge", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "label": { "alias": "label"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, {}, never, never, true, never>;
732
746
  }
733
747
 
734
748
  /**
@@ -804,6 +818,7 @@ declare class ExecutiveAlertsComponent implements OnChanges {
804
818
  * Provides full context including severity and actionability.
805
819
  */
806
820
  getAlertDescription(alert: ExecutiveAlert): string;
821
+ alertContentNodes(alert: ExecutiveAlert): RichBlockNode[];
807
822
  static ɵfac: i0.ɵɵFactoryDeclaration<ExecutiveAlertsComponent, never>;
808
823
  static ɵcmp: i0.ɵɵComponentDeclaration<ExecutiveAlertsComponent, "praxis-executive-alerts", never, { "alerts": { "alias": "alerts"; "required": false; }; }, {}, never, never, true, never>;
809
824
  }
@@ -812,19 +827,18 @@ declare class ExecutiveAlertsComponent implements OnChanges {
812
827
  * Executive owner component displaying account owner with accessible avatar.
813
828
  *
814
829
  * This component replaces legacy HTML string-based owner displays with a
815
- * fully accessible, WCAG 2.1 AA compliant solution featuring an inline SVG avatar.
830
+ * fully accessible, WCAG 2.1 AA compliant solution backed by shared rich content primitives.
816
831
  *
817
832
  * @remarks
818
833
  * **Accessibility Features:**
819
- * - WCAG 1.1.1: Non-text content has text alternative (SVG with role and aria-label)
820
- * - SVG includes <title> element for tooltips
834
+ * - WCAG 1.1.1: Non-text content has text alternative through avatar labeling
821
835
  * - Handles empty/undefined names gracefully
822
836
  * - Screen reader announces owner information clearly
823
837
  *
824
838
  * **Performance:**
825
839
  * - OnPush change detection strategy
826
840
  * - Input validation for name
827
- * - Lightweight inline SVG (no external dependencies)
841
+ * - Shared avatar/text rendering through `PraxisRichContent`
828
842
  *
829
843
  * @example Basic usage
830
844
  * ```html
@@ -855,16 +869,7 @@ declare class ExecutiveOwnerComponent {
855
869
  * Returns "Unassigned" if name is empty.
856
870
  */
857
871
  get displayName(): string;
858
- /**
859
- * ARIA label for SVG avatar.
860
- * Provides context for screen readers.
861
- */
862
- get avatarAriaLabel(): string;
863
- /**
864
- * SVG title element content for tooltip.
865
- * Shows on hover in most browsers.
866
- */
867
- get avatarTitle(): string;
872
+ get ownerNodes(): RichBlockNode[];
868
873
  static ɵfac: i0.ɵɵFactoryDeclaration<ExecutiveOwnerComponent, never>;
869
874
  static ɵcmp: i0.ɵɵComponentDeclaration<ExecutiveOwnerComponent, "praxis-executive-owner", never, { "name": { "alias": "name"; "required": false; }; }, {}, never, never, true, never>;
870
875
  }
@@ -1436,6 +1441,10 @@ declare function evaluateTemplate(def: TemplateDef | undefined, item: any, optio
1436
1441
  };
1437
1442
  } | null;
1438
1443
 
1444
+ type ListRichContentP0Node = RichPresenterNode | RichComposeNode;
1445
+ declare function isListTemplateSupportedByRichContentP0(template?: TemplateDef | null): boolean;
1446
+ declare function mapListTemplateToRichContentP0(template?: TemplateDef | null): ListRichContentP0Node | null;
1447
+
1439
1448
  declare function adaptSelection(config: PraxisListConfig | undefined, items: any[]): ListSelectionEvent;
1440
1449
 
1441
1450
  declare const PRAXIS_LIST_COMPONENT_METADATA: ComponentDocMeta;
@@ -2251,5 +2260,5 @@ declare const PRAXIS_LIST_PT_BR: {
2251
2260
  readonly 'CSS class example (add this to your global styles):': "Exemplo de classe CSS (adicione isto aos seus estilos globais):";
2252
2261
  };
2253
2262
 
2254
- export { ExecutiveAlertsComponent, ExecutiveBadgeComponent, ExecutiveOwnerComponent, LIST_AI_CAPABILITIES, ListDataService, ListSkinService, PRAXIS_LIST_COMPONENT_METADATA, PRAXIS_LIST_EN_US, PRAXIS_LIST_I18N_NAMESPACE, PRAXIS_LIST_PT_BR, PraxisList, PraxisListConfigEditor, PraxisListDocPageComponent, PraxisListJsonConfigEditorComponent, adaptSelection, buildListApplyPlan, createListAuthoringDocument, evalExpr, evaluateTemplate, inferListAuthoringDocument, inferTemplatingFromSchema, normalizeListActionPayloads, normalizeListAuthoringDocument, normalizeListConfig, parseLegacyOrListDocument, projectListAuthoringDocument, providePraxisListI18n, providePraxisListMetadata, serializeListAuthoringDocument, toCanonicalListConfig, validateListAuthoringDocument };
2255
- export type { Capability, CapabilityCatalog, CapabilityCategory, EditorDiagnostic, EditorDocument, ExecutiveAlert, JsonEditorEvent, JsonValidationResult, ListActionEvent, ListApplyPlan, ListAuthoringDocument, ListExpansionSectionDef, ListExpansionSectionType, ListFeatureDef, ListItemEvent, ListProjectionContext, ListRowLayoutSlot, ListRuntimeContext, ListSchemaInferencePlan, ListSection, ListSelectionEvent, ListTemplatingSlot, ListValidationContext, PraxisListConfig, PraxisListI18nConfig, TemplateDef, TemplateEvaluatorOptions, TemplateFeatureDef, TemplateType, TemplatingFeatureDef, ValueKind };
2263
+ export { ExecutiveAlertsComponent, ExecutiveBadgeComponent, ExecutiveOwnerComponent, LIST_AI_CAPABILITIES, ListDataService, ListSkinService, PRAXIS_LIST_COMPONENT_METADATA, PRAXIS_LIST_EN_US, PRAXIS_LIST_I18N_NAMESPACE, PRAXIS_LIST_PT_BR, PraxisList, PraxisListConfigEditor, PraxisListDocPageComponent, PraxisListJsonConfigEditorComponent, adaptSelection, buildListApplyPlan, createListAuthoringDocument, evalExpr, evaluateTemplate, inferListAuthoringDocument, inferTemplatingFromSchema, isListTemplateSupportedByRichContentP0, mapListTemplateToRichContentP0, normalizeListActionPayloads, normalizeListAuthoringDocument, normalizeListConfig, parseLegacyOrListDocument, projectListAuthoringDocument, providePraxisListI18n, providePraxisListMetadata, serializeListAuthoringDocument, toCanonicalListConfig, validateListAuthoringDocument };
2264
+ export type { Capability, CapabilityCatalog, CapabilityCategory, EditorDiagnostic, EditorDocument, ExecutiveAlert, JsonEditorEvent, JsonValidationResult, ListActionEvent, ListApplyPlan, ListAuthoringDocument, ListExpansionSectionDef, ListExpansionSectionType, ListFeatureDef, ListItemEvent, ListProjectionContext, ListRichContentP0Node, ListRowLayoutSlot, ListRuntimeContext, ListSchemaInferencePlan, ListSection, ListSelectionEvent, ListTemplatingSlot, ListValidationContext, PraxisListConfig, PraxisListI18nConfig, TemplateDef, TemplateEvaluatorOptions, TemplateFeatureDef, TemplateType, TemplatingFeatureDef, ValueKind };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@praxisui/list",
3
- "version": "5.0.0-beta.0",
3
+ "version": "7.0.0-beta.0",
4
4
  "description": "List components and helpers for Praxis UI.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=16 <21",
7
7
  "@angular/core": ">=16 <21",
8
8
  "@angular/material": ">=16 <21",
9
- "@praxisui/dynamic-fields": "^5.0.0-beta.0",
9
+ "@praxisui/dynamic-fields": "^7.0.0-beta.0",
10
10
  "rxjs": ">=7 <9"
11
11
  },
12
12
  "dependencies": {