@praxisui/list 8.0.0-beta.11 → 8.0.0-beta.13

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
@@ -3,9 +3,10 @@ import { BehaviorSubject, Observable } from 'rxjs';
3
3
  import * as i0 from '@angular/core';
4
4
  import { OnInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, ChangeDetectorRef, DoCheck, Provider } from '@angular/core';
5
5
  import { MatSelectionListChange } from '@angular/material/list';
6
+ import { MatPaginatorSelectConfig, PageEvent } from '@angular/material/paginator';
6
7
  import { FormGroup, FormControl } from '@angular/forms';
7
8
  import * as _praxisui_core from '@praxisui/core';
8
- import { JsonLogicExpression, GlobalActionRef, LocalizationConfig, AiCapability, RichBlockNode, GlobalActionCatalogEntry, SurfaceOpenPayload, RichPresenterNode, RichComposeNode, ComponentDocMeta, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog, ComponentAuthoringManifest } from '@praxisui/core';
9
+ import { PraxisExportFormat, PraxisExportScope, JsonLogicExpression, GlobalActionRef, LocalizationConfig, AiCapability, RichBlockNode, GlobalActionCatalogEntry, SurfaceOpenPayload, RichPresenterNode, RichComposeNode, ComponentDocMeta, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog, ComponentAuthoringManifest } from '@praxisui/core';
9
10
  import { BaseAiAdapter, PatchResult } from '@praxisui/ai';
10
11
  import { SettingsValueProvider } from '@praxisui/settings-panel';
11
12
 
@@ -176,6 +177,7 @@ interface PraxisListConfig {
176
177
  compareBy?: string;
177
178
  return?: 'value' | 'item' | 'id';
178
179
  };
180
+ export?: PraxisListExportConfig;
179
181
  interaction?: {
180
182
  expandable?: boolean;
181
183
  expandTrigger?: 'row' | 'icon' | 'row+icon';
@@ -309,9 +311,22 @@ interface PraxisListConfig {
309
311
  itemClick?: string;
310
312
  actionClick?: string;
311
313
  selectionChange?: string;
314
+ exportAction?: string;
312
315
  loaded?: string;
313
316
  };
314
317
  }
318
+ interface PraxisListExportConfig {
319
+ enabled?: boolean;
320
+ formats?: PraxisExportFormat[];
321
+ general?: {
322
+ scope?: PraxisExportScope;
323
+ includeHeaders?: boolean;
324
+ maxRows?: number;
325
+ defaultFileName?: string;
326
+ includeFields?: string[] | 'all';
327
+ applyFormatting?: boolean;
328
+ };
329
+ }
315
330
  interface ListItemEvent {
316
331
  item: any;
317
332
  index: number;
@@ -364,8 +379,15 @@ declare class ListDataService<T = any> {
364
379
  nextPage(): void;
365
380
  prevPage(): void;
366
381
  setPageSize(size: number): void;
382
+ setPage(pageNumber: number, pageSize: number): void;
367
383
  setSort(sort: string[]): void;
368
384
  setQuery(q: Record<string, any>): void;
385
+ getPageStateSnapshot(): {
386
+ pageNumber: number;
387
+ pageSize: number;
388
+ sort?: string[];
389
+ };
390
+ getQuerySnapshot(): Record<string, any>;
369
391
  groupedStream(): Observable<ListSection<T>[]>;
370
392
  private buildConfigSignature;
371
393
  private buildLocalDataSignature;
@@ -416,6 +438,7 @@ declare class PraxisList implements OnInit, OnChanges, OnDestroy {
416
438
  itemClick: EventEmitter<ListItemEvent>;
417
439
  actionClick: EventEmitter<ListActionEvent>;
418
440
  selectionChange: EventEmitter<ListSelectionEvent>;
441
+ exportAction: EventEmitter<any>;
419
442
  items$: rxjs.Observable<any[]>;
420
443
  sections$: rxjs.Observable<ListSection<any>[]>;
421
444
  loading$: rxjs.Observable<boolean>;
@@ -447,6 +470,10 @@ declare class PraxisList implements OnInit, OnChanges, OnDestroy {
447
470
  private readonly logger;
448
471
  private readonly jsonLogic;
449
472
  private readonly i18n;
473
+ private readonly collectionExport;
474
+ private readonly paginatorIntl;
475
+ private readonly snackBar;
476
+ readonly paginatorSelectConfig: MatPaginatorSelectConfig;
450
477
  private readonly logContext;
451
478
  private readonly route;
452
479
  private readonly globalActions;
@@ -463,6 +490,8 @@ declare class PraxisList implements OnInit, OnChanges, OnDestroy {
463
490
  private readonly destroy$;
464
491
  actionLoadingState: Record<string, boolean>;
465
492
  private expandedItemKeys;
493
+ exportBusy: boolean;
494
+ exportStatusMessage: string;
466
495
  private readonly listRuleContextOptions;
467
496
  ngOnInit(): void;
468
497
  ngOnChanges(changes: SimpleChanges): void;
@@ -586,10 +615,36 @@ declare class PraxisList implements OnInit, OnChanges, OnDestroy {
586
615
  private resolveStringTemplate;
587
616
  private lookup;
588
617
  onSelectionChange(_change: MatSelectionListChange): void;
618
+ listExportFormats(): PraxisExportFormat[];
619
+ exportIcon(format: PraxisExportFormat): string;
620
+ onExportAction(format: PraxisExportFormat): Promise<void>;
621
+ private buildListExportRequest;
622
+ private resolveEffectiveExportScope;
623
+ private buildListExportSelection;
624
+ private resolveListExportLoadedItems;
625
+ private buildListExportFields;
626
+ private collectListExportFieldKeys;
627
+ private normalizeListSelectionValue;
628
+ private resolveListSelectionKey;
629
+ private hasListExportQuery;
630
+ private getListQuerySnapshot;
631
+ private getListPageStateSnapshot;
632
+ private resolveListExportTotal;
633
+ private parseListExportSort;
634
+ private downloadExportResult;
635
+ private triggerExportDownload;
636
+ private showExportFeedback;
637
+ private resolveExportFileName;
638
+ private getExportFileExtension;
639
+ private getExportMimeType;
640
+ private cloneForExportEvent;
589
641
  openConfigEditor(): void;
590
642
  nextPage(): void;
591
643
  prevPage(): void;
592
644
  setPageSize(ps: number): void;
645
+ onPageChange(event: PageEvent): void;
646
+ listPageSizeOptions(): number[];
647
+ remoteTotalLabel(total: number | null | undefined): string;
593
648
  onSortChange(val: string): void;
594
649
  onSearchInput(val: string): void;
595
650
  sortOptionValue(op: any): string;
@@ -602,6 +657,9 @@ declare class PraxisList implements OnInit, OnChanges, OnDestroy {
602
657
  pageNumber: number;
603
658
  pageSize: number;
604
659
  }, total: number): number;
660
+ private syncPaginatorIntl;
661
+ private formatPaginatorRangeLabel;
662
+ private isEnglishLocaleValue;
605
663
  applyConfigFromAdapter(newCfg: PraxisListConfig): void;
606
664
  private applyAuthoringPayload;
607
665
  private buildListEditorRuntimeContext;
@@ -671,14 +729,14 @@ declare class PraxisList implements OnInit, OnChanges, OnDestroy {
671
729
  private toggleExpanded;
672
730
  private syncExpansionState;
673
731
  private itemExpansionKey;
674
- private t;
732
+ t(key: string, fallback: string): string;
675
733
  private ensureExpansionItemObjectId;
676
734
  private sanitizeDomId;
677
735
  private evaluateExpansionExpr;
678
736
  private normalizeExpansionItems;
679
737
  private normalizeKeyValueItems;
680
738
  static ɵfac: i0.ɵɵFactoryDeclaration<PraxisList, never>;
681
- static ɵcmp: i0.ɵɵComponentDeclaration<PraxisList, "praxis-list", never, { "config": { "alias": "config"; "required": false; }; "listId": { "alias": "listId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "form": { "alias": "form"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; }, { "itemClick": "itemClick"; "actionClick": "actionClick"; "selectionChange": "selectionChange"; }, never, never, true, never>;
739
+ static ɵcmp: i0.ɵɵComponentDeclaration<PraxisList, "praxis-list", never, { "config": { "alias": "config"; "required": false; }; "listId": { "alias": "listId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "form": { "alias": "form"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; }, { "itemClick": "itemClick"; "actionClick": "actionClick"; "selectionChange": "selectionChange"; "exportAction": "exportAction"; }, never, never, true, never>;
682
740
  static ngAcceptInputType_enableCustomization: unknown;
683
741
  }
684
742
 
@@ -1466,6 +1524,7 @@ declare function providePraxisListMetadata(): Provider;
1466
1524
  declare module '@praxisui/core' {
1467
1525
  interface AiCapabilityCategoryMap {
1468
1526
  meta: true;
1527
+ export: true;
1469
1528
  skin: true;
1470
1529
  selection: true;
1471
1530
  templating: true;
@@ -1656,6 +1715,7 @@ declare class PraxisListDocPageComponent {
1656
1715
  inlineStyle?: string;
1657
1716
  } | undefined;
1658
1717
  id?: string;
1718
+ export?: PraxisListExportConfig;
1659
1719
  interaction?: {
1660
1720
  expandable?: boolean;
1661
1721
  expandTrigger?: "row" | "icon" | "row+icon";
@@ -1789,6 +1849,7 @@ declare class PraxisListDocPageComponent {
1789
1849
  itemClick?: string;
1790
1850
  actionClick?: string;
1791
1851
  selectionChange?: string;
1852
+ exportAction?: string;
1792
1853
  loaded?: string;
1793
1854
  };
1794
1855
  };
@@ -1825,6 +1886,13 @@ declare const PRAXIS_LIST_EN_US: {
1825
1886
  readonly collapseDetails: "Collapse details";
1826
1887
  readonly itemDetails: "Item details";
1827
1888
  readonly emptyState: "No items available";
1889
+ readonly 'pagination.itemsPerPage': "Items per page:";
1890
+ readonly 'pagination.nextPage': "Next page";
1891
+ readonly 'pagination.previousPage': "Previous page";
1892
+ readonly 'pagination.firstPage': "First page";
1893
+ readonly 'pagination.lastPage': "Last page";
1894
+ readonly 'pagination.total': "Total";
1895
+ readonly 'export.button': "Export";
1828
1896
  readonly Data: "Data";
1829
1897
  readonly Actions: "Actions";
1830
1898
  readonly Layout: "Layout";
@@ -2053,6 +2121,13 @@ declare const PRAXIS_LIST_PT_BR: {
2053
2121
  readonly collapseDetails: "Recolher detalhes";
2054
2122
  readonly itemDetails: "Detalhes do item";
2055
2123
  readonly emptyState: "Nenhum item disponível";
2124
+ readonly 'pagination.itemsPerPage': "Itens por página:";
2125
+ readonly 'pagination.nextPage': "Próxima página";
2126
+ readonly 'pagination.previousPage': "Página anterior";
2127
+ readonly 'pagination.firstPage': "Primeira página";
2128
+ readonly 'pagination.lastPage': "Última página";
2129
+ readonly 'pagination.total': "Total";
2130
+ readonly 'export.button': "Exportar";
2056
2131
  readonly Data: "Dados";
2057
2132
  readonly Actions: "Ações";
2058
2133
  readonly Layout: "Layout";
@@ -2273,4 +2348,4 @@ declare const PRAXIS_LIST_PT_BR: {
2273
2348
  };
2274
2349
 
2275
2350
  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, adaptSelection, buildListApplyPlan, createListAuthoringDocument, evalExpr, evaluateTemplate, inferListAuthoringDocument, inferTemplatingFromSchema, isListTemplateSupportedByRichContentP0, mapListTemplateToRichContentP0, normalizeListActionPayloads, normalizeListAuthoringDocument, normalizeListConfig, parseLegacyOrListDocument, projectListAuthoringDocument, providePraxisListI18n, providePraxisListMetadata, serializeListAuthoringDocument, toCanonicalListConfig, validateListAuthoringDocument };
2276
- 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 };
2351
+ 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, PraxisListExportConfig, PraxisListI18nConfig, TemplateDef, TemplateEvaluatorOptions, TemplateFeatureDef, TemplateType, TemplatingFeatureDef, ValueKind };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@praxisui/list",
3
- "version": "8.0.0-beta.11",
3
+ "version": "8.0.0-beta.13",
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": "^8.0.0-beta.11",
9
+ "@praxisui/dynamic-fields": "^8.0.0-beta.13",
10
10
  "rxjs": ">=7 <9"
11
11
  },
12
12
  "dependencies": {