@lesterarte/sefin-ui 0.0.20-dev.14 → 0.0.20-dev.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lesterarte/sefin-ui",
3
- "version": "0.0.20-dev.14",
3
+ "version": "0.0.20-dev.16",
4
4
  "description": "Sefin Design System - A comprehensive Angular UI library based on Atomic Design and design tokens",
5
5
  "keywords": [
6
6
  "angular",
@@ -950,10 +950,9 @@ declare class TypographyComponent {
950
950
  color: TypographyColor;
951
951
  lineHeight?: TypographyLineHeight;
952
952
  class: string;
953
- text?: string;
954
953
  get typographyClasses(): string;
955
954
  static ɵfac: i0.ɵɵFactoryDeclaration<TypographyComponent, never>;
956
- static ɵcmp: i0.ɵɵComponentDeclaration<TypographyComponent, "sefin-typography", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "weight": { "alias": "weight"; "required": false; }; "color": { "alias": "color"; "required": false; }; "lineHeight": { "alias": "lineHeight"; "required": false; }; "class": { "alias": "class"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, {}, never, ["*", "*", "*", "*", "*", "*", "*", "*"], true, never>;
955
+ static ɵcmp: i0.ɵɵComponentDeclaration<TypographyComponent, "sefin-typography", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "weight": { "alias": "weight"; "required": false; }; "color": { "alias": "color"; "required": false; }; "lineHeight": { "alias": "lineHeight"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*", "*", "*", "*", "*", "*", "*", "*"], true, never>;
957
956
  }
958
957
 
959
958
  type DividerOrientation = 'horizontal' | 'vertical';
@@ -1918,25 +1917,127 @@ declare class TableComponent implements OnInit, OnChanges {
1918
1917
  readonly totalColspan: i0.Signal<number>;
1919
1918
  readonly isAllSelected: i0.Signal<boolean>;
1920
1919
  readonly isIndeterminate: i0.Signal<boolean>;
1920
+ readonly sortIcons: {
1921
+ readonly unsorted: "M3 4.5L6 1.5L9 4.5M3 7.5L6 10.5L9 7.5";
1922
+ readonly ascending: "M3 7.5L6 4.5L9 7.5";
1923
+ readonly descending: "M3 4.5L6 7.5L9 4.5";
1924
+ };
1921
1925
  constructor(cdr: ChangeDetectorRef);
1922
1926
  ngOnInit(): void;
1923
1927
  ngOnChanges(changes: SimpleChanges): void;
1928
+ /**
1929
+ * Validates component inputs and logs warnings for invalid configurations
1930
+ * @private
1931
+ */
1932
+ private validateInputs;
1924
1933
  trackByFn(index: number, item: any): any;
1934
+ /**
1935
+ * Gets the cell value from a row, supporting nested property paths (e.g., 'user.name')
1936
+ * @param row - The row data object
1937
+ * @param column - The column definition
1938
+ * @returns The cell value or undefined if not found
1939
+ */
1925
1940
  getCellValue(row: any, column: TableColumn): any;
1926
- formatCellValue(value: any, type?: TableColumnType): string;
1941
+ /**
1942
+ * Formats a cell value based on its type
1943
+ * @param value - The value to format
1944
+ * @param type - The column type
1945
+ * @param column - Optional column definition for additional formatting options
1946
+ * @returns Formatted string representation
1947
+ */
1948
+ formatCellValue(value: any, type?: TableColumnType, column?: TableColumn): string;
1949
+ /**
1950
+ * Parses a value into a Date object
1951
+ * @param value - The value to parse (Date, string, or number timestamp)
1952
+ * @returns A Date object
1953
+ */
1927
1954
  private parseDate;
1928
1955
  onRowClick(row: any): void;
1929
- onSort(column: TableColumn): void;
1956
+ /**
1957
+ * Handles column sorting when header is clicked
1958
+ * @param column - The column to sort by
1959
+ * @param event - Optional keyboard event for accessibility
1960
+ */
1961
+ onSort(column: TableColumn, event?: KeyboardEvent): void;
1930
1962
  onPageChange(page: number): void;
1931
1963
  isSelected(row: any): boolean;
1964
+ /**
1965
+ * Toggles the selection state of a row
1966
+ * @param checked - Whether the row should be selected
1967
+ * @param row - The row to toggle selection for
1968
+ */
1932
1969
  toggleRowSelection(checked: boolean, row?: any): void;
1970
+ /**
1971
+ * Toggles selection for all rows on the current page
1972
+ * @param checked - Whether all rows should be selected
1973
+ */
1933
1974
  toggleSelectAll(checked: boolean): void;
1975
+ /**
1976
+ * Gets the unique identifier for an item using the trackByKey
1977
+ * @param item - The item to get the ID for
1978
+ * @returns The item's ID or the item itself if no ID property exists
1979
+ * @private
1980
+ */
1934
1981
  private getItemId;
1982
+ /**
1983
+ * Gets CSS classes for a column cell
1984
+ * @param column - The column definition
1985
+ * @returns Space-separated string of CSS classes
1986
+ */
1935
1987
  getColumnClass(column: TableColumn): string;
1988
+ /**
1989
+ * Gets CSS classes for the table element
1990
+ * @returns Space-separated string of CSS classes
1991
+ */
1936
1992
  getTableClasses(): string;
1993
+ /**
1994
+ * Gets the width CSS value for a column
1995
+ * @param column - The column definition
1996
+ * @returns The width value or undefined
1997
+ */
1937
1998
  getColumnWidth(column: TableColumn): string | undefined;
1999
+ /**
2000
+ * Gets the appropriate sort icon path for a column
2001
+ * @param column - The column to get the icon for
2002
+ * @returns The SVG path string for the sort icon
2003
+ */
2004
+ getSortIconPath(column: TableColumn): string;
2005
+ /**
2006
+ * Determines if a column should show the unsorted icon
2007
+ * @param column - The column to check
2008
+ * @returns True if unsorted icon should be shown
2009
+ */
2010
+ showUnsortedIcon(column: TableColumn): boolean;
2011
+ /**
2012
+ * Determines if a column should show the ascending icon
2013
+ * @param column - The column to check
2014
+ * @returns True if ascending icon should be shown
2015
+ */
2016
+ showAscendingIcon(column: TableColumn): boolean;
2017
+ /**
2018
+ * Determines if a column should show the descending icon
2019
+ * @param column - The column to check
2020
+ * @returns True if descending icon should be shown
2021
+ */
2022
+ showDescendingIcon(column: TableColumn): boolean;
2023
+ /**
2024
+ * Gets the ARIA sort state for a column
2025
+ * @param column - The column to get the sort state for
2026
+ * @returns The ARIA sort value ('ascending', 'descending', or 'none')
2027
+ */
2028
+ getAriaSort(column: TableColumn): string;
2029
+ /**
2030
+ * Gets the ARIA label for a sortable column header
2031
+ * @param column - The column to get the label for
2032
+ * @returns The ARIA label string or null if not sortable
2033
+ */
2034
+ getSortAriaLabel(column: TableColumn): string | null;
2035
+ /**
2036
+ * Generates page numbers array for pagination display
2037
+ * This method is currently not used in the template but kept for potential future use
2038
+ * @returns Array of page numbers and ellipsis strings
2039
+ */
1938
2040
  getPageNumbers(): (number | string)[];
1939
- Math: Math;
1940
2041
  static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
1941
2042
  static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "sefin-table", never, { "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "trackByKey": { "alias": "trackByKey"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "emptyText": { "alias": "emptyText"; "required": false; }; "density": { "alias": "density"; "required": false; }; "striped": { "alias": "striped"; "required": false; }; "hover": { "alias": "hover"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "pagination": { "alias": "pagination"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "total": { "alias": "total"; "required": false; }; "sort": { "alias": "sort"; "required": false; }; "serverSide": { "alias": "serverSide"; "required": false; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; }; "headerActionsTemplate": { "alias": "headerActionsTemplate"; "required": false; }; "emptyIconTemplate": { "alias": "emptyIconTemplate"; "required": false; }; }, { "rowClicked": "rowClicked"; "selectionChanged": "selectionChanged"; "pageChanged": "pageChanged"; "sortChanged": "sortChanged"; }, never, ["[actions]", "[actions]"], true, never>;
1942
2043
  }