@acontplus/ng-components 1.3.0 → 1.3.1

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
@@ -544,6 +544,17 @@ type ButtonType = 'button' | 'submit' | 'reset';
544
544
  type ButtonVariant = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark';
545
545
  type MaterialButtonStyle = 'text' | 'elevated' | 'outlined' | 'filled' | 'tonal' | 'icon' | 'fab' | 'mini-fab' | 'extended-fab';
546
546
 
547
+ declare enum REPORT_FORMAT {
548
+ PDF = "pdf",
549
+ EXCEL = "excel",
550
+ WORD = "word",
551
+ IMAGE = "image",
552
+ XML = "xml",
553
+ CSV = "csv",
554
+ MHTML = "mhtml",
555
+ HTML = "html"
556
+ }
557
+
547
558
  declare class Button {
548
559
  variant: _angular_core.InputSignal<ButtonVariant>;
549
560
  text: _angular_core.InputSignal<string>;
@@ -552,6 +563,7 @@ declare class Button {
552
563
  type: _angular_core.InputSignal<ButtonType>;
553
564
  matStyle: _angular_core.InputSignal<MaterialButtonStyle>;
554
565
  customClass: _angular_core.InputSignal<string | undefined>;
566
+ reportFormat: _angular_core.InputSignal<REPORT_FORMAT | undefined>;
555
567
  extended: _angular_core.InputSignal<boolean>;
556
568
  title: _angular_core.InputSignal<string>;
557
569
  ariaLabel: _angular_core.InputSignal<string>;
@@ -561,10 +573,37 @@ declare class Button {
561
573
  tabIndex: _angular_core.InputSignal<number>;
562
574
  testId: _angular_core.InputSignal<string>;
563
575
  handleClick: _angular_core.OutputEmitterRef<unknown>;
576
+ /**
577
+ * Gets the icon to display. If reportFormat is provided and no explicit icon is set,
578
+ * returns the appropriate icon for the report format.
579
+ */
580
+ getIcon(): string;
581
+ /**
582
+ * Gets the variant to use. If reportFormat is provided and variant is still 'primary' (default),
583
+ * returns the appropriate variant for the report format.
584
+ */
585
+ getVariant(): ButtonVariant;
586
+ /**
587
+ * Gets the title to display. If reportFormat is provided, automatically appends
588
+ * the format name to the title (e.g., "Export PDF", "Download Excel").
589
+ */
590
+ getTitle(): string;
591
+ /**
592
+ * Maps report format to appropriate icon
593
+ */
594
+ private getReportIcon;
595
+ /**
596
+ * Maps report format to appropriate button variant/color
597
+ */
598
+ private getReportVariant;
599
+ /**
600
+ * Maps report format to human-readable name
601
+ */
602
+ private getReportFormatName;
564
603
  getButtonClasses(): Record<string, boolean>;
565
604
  getDisplayText(): string;
566
605
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Button, never>;
567
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<Button, "acp-button", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "matStyle": { "alias": "matStyle"; "required": false; "isSignal": true; }; "customClass": { "alias": "customClass"; "required": false; "isSignal": true; }; "extended": { "alias": "extended"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; }, { "handleClick": "handleClick"; }, never, ["*"], true, never>;
606
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Button, "acp-button", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "matStyle": { "alias": "matStyle"; "required": false; "isSignal": true; }; "customClass": { "alias": "customClass"; "required": false; "isSignal": true; }; "reportFormat": { "alias": "reportFormat"; "required": false; "isSignal": true; }; "extended": { "alias": "extended"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; }, { "handleClick": "handleClick"; }, never, ["*"], true, never>;
568
607
  }
569
608
 
570
609
  declare class Spinner {
@@ -648,34 +687,35 @@ interface TableRow {
648
687
  }
649
688
 
650
689
  declare class Pagination {
651
- pageIndex: number;
652
- pageSize: number;
653
- maxSize: number;
654
690
  totalRecords: number;
691
+ pageSize: number;
692
+ pageIndex: number;
655
693
  pageSizeOptions: number[];
694
+ hidePageSize: boolean;
695
+ showPageSizeOptions: boolean;
696
+ showFirstLastButtons: boolean;
697
+ disabled: boolean;
656
698
  /**
657
- * @param pageIndex Current page index (0-based for MatPagination compatibility)
699
+ * @param pageIndex Current page index (0-based for MatPaginator compatibility)
658
700
  * @param pageSize Number of records per page
659
- * @param maxSize Maximum number of pages displayed in the pagination control
660
701
  * @param totalRecords Total number of records
661
702
  * @param pageSizeOptions Available page size options
703
+ * @param hidePageSize Whether to hide the page size selector
704
+ * @param showPageSizeOptions Whether to show page size options
705
+ * @param showFirstLastButtons Whether to show first/last buttons
706
+ * @param disabled Whether the paginator is disabled
662
707
  */
663
- constructor(pageIndex?: number, // MatPagination starts at 0
664
- pageSize?: number, maxSize?: number, totalRecords?: number, pageSizeOptions?: number[]);
708
+ constructor(pageIndex?: number, // MatPaginator starts at 0
709
+ pageSize?: number, totalRecords?: number, pageSizeOptions?: number[], hidePageSize?: boolean, showPageSizeOptions?: boolean, showFirstLastButtons?: boolean, disabled?: boolean);
665
710
  /**
666
711
  * Calculates the total number of pages.
667
712
  */
668
713
  getTotalPages(): number;
669
714
  /**
670
- * Updates the page size and resets the page index to the first page.
671
- * @param newPageSize The new page size
672
- */
673
- updatePageSize(newPageSize: number): void;
674
- /**
675
- * Updates pagination data based on paginator event.
676
- * @param event MatPaginator event
715
+ * Handles page event similar to Angular Material example.
716
+ * @param event MatPaginator PageEvent
677
717
  */
678
- updateFromPaginatorEvent(event: any): void;
718
+ handlePageEvent(event: PageEvent): void;
679
719
  }
680
720
 
681
721
  declare class DynamicTable<T extends TableRow> implements AfterContentInit, OnChanges, OnInit, OnDestroy {
@@ -993,5 +1033,5 @@ declare class StatusDisplayPipe implements PipeTransform {
993
1033
  static ɵpipe: _angular_core.ɵɵPipeDeclaration<StatusDisplayPipe, "statusDisplay", true>;
994
1034
  }
995
1035
 
996
- export { AUTOCOMPLETE_WRAPPER_CUSTOMER_CONFIG, AUTOCOMPLETE_WRAPPER_DEFAULT_CONFIG, AUTOCOMPLETE_WRAPPER_LOCAL_CONFIG, AUTOCOMPLETE_WRAPPER_PAGINATED_CONFIG, AUTOCOMPLETE_WRAPPER_PRODUCT_CONFIG, AUTOCOMPLETE_WRAPPER_SIMPLE_CONFIG, AdvancedDialogService, AutocompleteWrapperService, Button, ColumnDefinition, DialogWrapper, DynamicCard, DynamicTable, FieldDefinition, GetTotalPipe, InputChip, OverlayService, Pagination, ReusableAutocompleteComponent, Spinner, StatusDisplayPipe, SvgIcon, TableCellIndex, TabulatorTable, ThemeSwitcher, ThemeToggle, ToUpperCase, UserIcon, createAutocompleteWrapperConfig };
1036
+ export { AUTOCOMPLETE_WRAPPER_CUSTOMER_CONFIG, AUTOCOMPLETE_WRAPPER_DEFAULT_CONFIG, AUTOCOMPLETE_WRAPPER_LOCAL_CONFIG, AUTOCOMPLETE_WRAPPER_PAGINATED_CONFIG, AUTOCOMPLETE_WRAPPER_PRODUCT_CONFIG, AUTOCOMPLETE_WRAPPER_SIMPLE_CONFIG, AdvancedDialogService, AutocompleteWrapperService, Button, ColumnDefinition, DialogWrapper, DynamicCard, DynamicTable, FieldDefinition, GetTotalPipe, InputChip, OverlayService, Pagination, REPORT_FORMAT, ReusableAutocompleteComponent, Spinner, StatusDisplayPipe, SvgIcon, TableCellIndex, TabulatorTable, ThemeSwitcher, ThemeToggle, ToUpperCase, UserIcon, createAutocompleteWrapperConfig };
997
1037
  export type { AutocompleteWrapperActions, AutocompleteWrapperConfig, AutocompleteWrapperEventHandler, AutocompleteWrapperEvents, AutocompleteWrapperFilters, AutocompleteWrapperItem, AutocompleteWrapperItemProperty, AutocompleteWrapperPaginationInfo, AutocompleteWrapperSearchField, AutocompleteWrapperSearchFunction, AutocompleteWrapperSearchMode, AutocompleteWrapperSearchResult, AutocompleteWrapperState, AutocompleteWrapperStockOption, ButtonType, ButtonVariant, ColumnType, ControlType, DateRangeConfig, DialogSize, DialogWrapperConfig, FieldType, MatCustomDialogConfig, MaterialButtonStyle, OptionSearchConfig, ReusableAutocompleteWrapperComponent, TableContext, TableRow, TabulatorColumn, TabulatorConfig, TabulatorEventHandlers, TabulatorTheme };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@acontplus/ng-components",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Comprehensive Angular Material UI component library featuring dynamic Tabulator tables, theme toggle with dark mode, dialog wrappers, autocomplete components, cards, buttons, icons, input chips, spinners, directives, pipes, and SCSS styling utilities.",
5
5
  "peerDependencies": {
6
- "@angular/cdk": "^20.2.5",
7
- "@angular/common": "^20.3.2",
8
- "@angular/core": "^20.3.2",
9
- "@angular/material": "^20.2.5",
6
+ "@angular/cdk": "^20.2.12",
7
+ "@angular/common": "^20.3.9",
8
+ "@angular/core": "^20.3.9",
9
+ "@angular/material": "^20.2.12",
10
10
  "tabulator-tables": "^6.3.1"
11
11
  },
12
12
  "sideEffects": true,