@wavelengthusaf/web-components 1.18.0 → 1.19.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.
@@ -1388,20 +1388,43 @@ declare class WavelengthNavBar extends HTMLElement {
1388
1388
  private renderTabs;
1389
1389
  }
1390
1390
 
1391
- interface ChildDataTableData {
1392
- id: string;
1393
- [key: string]: any;
1394
- dropdown?: HTMLElement | string | any;
1395
- }
1396
-
1397
1391
  interface ChildDataTableColumn {
1392
+ /** The unique key that maps to a property in the Data object. */
1398
1393
  key: string;
1394
+ /** The human-readable text displayed in the table header. */
1399
1395
  title: string;
1400
- renderCell?: (item: ChildDataTableData) => string;
1401
- cellLocation?: "bottom" | "top" | "relative";
1396
+ /** * Optional custom render function.
1397
+ * Now supports returning strings (rendered as text), HTMLElements, or React Nodes.
1398
+ */
1399
+ renderCell?: (item: any) => string | HTMLElement | any;
1400
+ /** * Controls the layout position of the cell within the row.
1401
+ * @default "relative"
1402
+ */
1403
+ cellLocation?: "top" | "bottom" | "relative";
1404
+ /** * Whether or not the column is sortable.
1405
+ * @default true
1406
+ */
1402
1407
  sort?: boolean;
1403
1408
  }
1404
1409
 
1410
+ interface ChildDataTableData {
1411
+ /** * A required unique identifier for the row.
1412
+ * Used internally for event delegation and tracking dropdown state.
1413
+ */
1414
+ id: number | string;
1415
+ /**
1416
+ * Optional content for an expandable dropdown row.
1417
+ * Can be a plain string, a native DOM element, or a React component.
1418
+ */
1419
+ dropdown?: string | HTMLElement | any;
1420
+ /**
1421
+ * Index signature: Allows the object to contain any number of dynamic
1422
+ * properties (e.g., mission, status, launchDate) that map to your column keys.
1423
+ */
1424
+ [key: string]: any;
1425
+ }
1426
+
1427
+ type DropdownArrowLocation = "left" | "right" | "bottom";
1405
1428
  declare class ChildDataTable extends HTMLElement {
1406
1429
  static get observedAttributes(): string[];
1407
1430
  private _columns;
@@ -1409,23 +1432,37 @@ declare class ChildDataTable extends HTMLElement {
1409
1432
  private _sortOrder;
1410
1433
  private _sortKey;
1411
1434
  private _dropdownArrowLocation;
1435
+ private _expanded;
1412
1436
  private _sortIcon;
1413
1437
  private _dropdownButtonIcon;
1438
+ private _externalSort;
1414
1439
  private shadow;
1415
1440
  constructor();
1416
1441
  connectedCallback(): void;
1417
- attributeChangedCallback(name: string, oldValue: any, newValue: any): void;
1418
- renderColumns(newValue: string | ChildDataTableColumn[]): void;
1419
- renderRows(newValue: any): void;
1442
+ attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
1443
+ private normalizeColumns;
1444
+ private renderHeader;
1445
+ private buildHeaderContent;
1446
+ private createHeaderCell;
1447
+ private shouldRenderSort;
1448
+ private createSortButton;
1449
+ private createSpacerCell;
1450
+ renderRows(newValue: string | ChildDataTableData[]): void;
1451
+ private buildRow;
1452
+ private createDataCell;
1453
+ private createDropdownButtonCell;
1454
+ private createDropdownContentRow;
1420
1455
  handleDropdownClick(): void;
1421
1456
  handleSortClick(): void;
1422
1457
  handleActionClick(): void;
1423
1458
  handleSort(sortKey: keyof ChildDataTableData): void;
1424
- set setColumns(columns: ChildDataTableColumn[]);
1425
- set setData(data: ChildDataTableData[]);
1426
- set setDropdownArrowLocation(location: typeof this._dropdownArrowLocation);
1427
- set setSortIcon(icon: typeof this._sortIcon);
1428
- set setDropdownButtonIcon(icon: typeof this._sortIcon);
1459
+ set setColumns(columns: string | ChildDataTableColumn[]);
1460
+ set setData(data: string | ChildDataTableData[]);
1461
+ set setDropdownArrowLocation(location: DropdownArrowLocation);
1462
+ set setExpanded(value: string | boolean);
1463
+ set setSortIcon(icon: string | HTMLElement);
1464
+ set setDropdownButtonIcon(icon: string | HTMLElement);
1465
+ set setExternalSort(value: string | boolean);
1429
1466
  }
1430
1467
 
1431
1468
  interface CheckboxElements {
@@ -1388,20 +1388,43 @@ declare class WavelengthNavBar extends HTMLElement {
1388
1388
  private renderTabs;
1389
1389
  }
1390
1390
 
1391
- interface ChildDataTableData {
1392
- id: string;
1393
- [key: string]: any;
1394
- dropdown?: HTMLElement | string | any;
1395
- }
1396
-
1397
1391
  interface ChildDataTableColumn {
1392
+ /** The unique key that maps to a property in the Data object. */
1398
1393
  key: string;
1394
+ /** The human-readable text displayed in the table header. */
1399
1395
  title: string;
1400
- renderCell?: (item: ChildDataTableData) => string;
1401
- cellLocation?: "bottom" | "top" | "relative";
1396
+ /** * Optional custom render function.
1397
+ * Now supports returning strings (rendered as text), HTMLElements, or React Nodes.
1398
+ */
1399
+ renderCell?: (item: any) => string | HTMLElement | any;
1400
+ /** * Controls the layout position of the cell within the row.
1401
+ * @default "relative"
1402
+ */
1403
+ cellLocation?: "top" | "bottom" | "relative";
1404
+ /** * Whether or not the column is sortable.
1405
+ * @default true
1406
+ */
1402
1407
  sort?: boolean;
1403
1408
  }
1404
1409
 
1410
+ interface ChildDataTableData {
1411
+ /** * A required unique identifier for the row.
1412
+ * Used internally for event delegation and tracking dropdown state.
1413
+ */
1414
+ id: number | string;
1415
+ /**
1416
+ * Optional content for an expandable dropdown row.
1417
+ * Can be a plain string, a native DOM element, or a React component.
1418
+ */
1419
+ dropdown?: string | HTMLElement | any;
1420
+ /**
1421
+ * Index signature: Allows the object to contain any number of dynamic
1422
+ * properties (e.g., mission, status, launchDate) that map to your column keys.
1423
+ */
1424
+ [key: string]: any;
1425
+ }
1426
+
1427
+ type DropdownArrowLocation = "left" | "right" | "bottom";
1405
1428
  declare class ChildDataTable extends HTMLElement {
1406
1429
  static get observedAttributes(): string[];
1407
1430
  private _columns;
@@ -1409,23 +1432,37 @@ declare class ChildDataTable extends HTMLElement {
1409
1432
  private _sortOrder;
1410
1433
  private _sortKey;
1411
1434
  private _dropdownArrowLocation;
1435
+ private _expanded;
1412
1436
  private _sortIcon;
1413
1437
  private _dropdownButtonIcon;
1438
+ private _externalSort;
1414
1439
  private shadow;
1415
1440
  constructor();
1416
1441
  connectedCallback(): void;
1417
- attributeChangedCallback(name: string, oldValue: any, newValue: any): void;
1418
- renderColumns(newValue: string | ChildDataTableColumn[]): void;
1419
- renderRows(newValue: any): void;
1442
+ attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
1443
+ private normalizeColumns;
1444
+ private renderHeader;
1445
+ private buildHeaderContent;
1446
+ private createHeaderCell;
1447
+ private shouldRenderSort;
1448
+ private createSortButton;
1449
+ private createSpacerCell;
1450
+ renderRows(newValue: string | ChildDataTableData[]): void;
1451
+ private buildRow;
1452
+ private createDataCell;
1453
+ private createDropdownButtonCell;
1454
+ private createDropdownContentRow;
1420
1455
  handleDropdownClick(): void;
1421
1456
  handleSortClick(): void;
1422
1457
  handleActionClick(): void;
1423
1458
  handleSort(sortKey: keyof ChildDataTableData): void;
1424
- set setColumns(columns: ChildDataTableColumn[]);
1425
- set setData(data: ChildDataTableData[]);
1426
- set setDropdownArrowLocation(location: typeof this._dropdownArrowLocation);
1427
- set setSortIcon(icon: typeof this._sortIcon);
1428
- set setDropdownButtonIcon(icon: typeof this._sortIcon);
1459
+ set setColumns(columns: string | ChildDataTableColumn[]);
1460
+ set setData(data: string | ChildDataTableData[]);
1461
+ set setDropdownArrowLocation(location: DropdownArrowLocation);
1462
+ set setExpanded(value: string | boolean);
1463
+ set setSortIcon(icon: string | HTMLElement);
1464
+ set setDropdownButtonIcon(icon: string | HTMLElement);
1465
+ set setExternalSort(value: string | boolean);
1429
1466
  }
1430
1467
 
1431
1468
  interface CheckboxElements {