@theseam/ui-common 1.0.2-beta.79 → 1.0.2-beta.84

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/ai/index.d.ts CHANGED
@@ -1,36 +1,103 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { AfterViewInit, InjectionToken, Type } from '@angular/core';
3
+ import { TheSeamDatatableColumn, DatatableComponent, ColumnsAlterationState } from '@theseam/ui-common/datatable';
4
+ import { DatatableGraphQLQueryRef } from '@theseam/ui-common/graphql';
3
5
  import { BehaviorSubject, Observable } from 'rxjs';
4
6
  import * as _angular_cdk_testing from '@angular/cdk/testing';
5
7
  import { ComponentHarness } from '@angular/cdk/testing';
6
8
  import { FormGroup, FormControl } from '@angular/forms';
7
- import { DatatableComponent, ColumnsAlterationState } from '@theseam/ui-common/datatable';
8
9
  import { AlterationDisplayItem } from '@theseam/ui-common/datatable-alterations-display';
9
10
 
11
+ /**
12
+ * Implemented by components that contribute "what the user is currently looking at"
13
+ * to the AI chat assistant. Instances are registered with `TheSeamChatContextRegistry`
14
+ * (see chat-context-registry.service.ts) and read at chat-send time.
15
+ *
16
+ * `getContext()` returning null/undefined means "I have nothing useful to contribute
17
+ * right now"; the registry drops that entry from the snapshot.
18
+ */
19
+ interface TheSeamChatContext {
20
+ /** Discriminator — used by the backend formatter table. e.g. 'datatable', 'modal'. */
21
+ readonly type: string;
22
+ /** When true, this context is included even while a 'modal'-typed context is registered. Default false. */
23
+ readonly alwaysVisible?: boolean;
24
+ getContext(): unknown | Promise<unknown>;
25
+ }
26
+ /** Wire-shape of one context entry sent to the backend. */
27
+ interface TheSeamChatContextPayload {
28
+ type: string;
29
+ data: unknown;
30
+ }
31
+
10
32
  interface ChatMessage {
11
- role: 'system' | 'user' | 'assistant';
33
+ role: 'user' | 'assistant';
12
34
  content: string;
13
35
  }
14
36
  interface ChatResponse {
15
37
  content: string;
16
38
  }
17
- interface AiProvider {
18
- chat(messages: ChatMessage[]): Promise<ChatResponse>;
39
+ interface TheSeamAiChatRequest {
40
+ messages: ChatMessage[];
41
+ contexts?: TheSeamChatContextPayload[];
42
+ }
43
+ interface TheSeamAiProvider {
44
+ chat(request: TheSeamAiChatRequest): Promise<ChatResponse>;
19
45
  }
20
46
 
21
- declare class LmStudioAiProvider implements AiProvider {
22
- chat(messages: ChatMessage[]): Promise<ChatResponse>;
47
+ declare class LmStudioAiProvider implements TheSeamAiProvider {
48
+ chat(request: TheSeamAiChatRequest): Promise<ChatResponse>;
23
49
  }
24
50
 
25
- declare class OpenRouterAiProvider implements AiProvider {
26
- chat(messages: ChatMessage[]): Promise<ChatResponse>;
51
+ declare class OpenRouterAiProvider implements TheSeamAiProvider {
52
+ chat(request: TheSeamAiChatRequest): Promise<ChatResponse>;
27
53
  }
28
54
 
29
55
  type MockResponse = string | ((messages: ChatMessage[]) => string);
30
- declare class MockAiProvider implements AiProvider {
56
+ declare class MockAiProvider implements TheSeamAiProvider {
31
57
  private readonly _response;
32
58
  constructor(_response?: MockResponse);
33
- chat(messages: ChatMessage[]): Promise<ChatResponse>;
59
+ chat(request: TheSeamAiChatRequest): Promise<ChatResponse>;
60
+ }
61
+
62
+ declare class TheSeamChatContextRegistry {
63
+ private readonly _contexts;
64
+ /**
65
+ * Register a context. Returns an unregister function — pair it with DestroyRef:
66
+ * inject(DestroyRef).onDestroy(registry.register(ctx))
67
+ */
68
+ register(ctx: TheSeamChatContext): () => void;
69
+ unregister(ctx: TheSeamChatContext): void;
70
+ /**
71
+ * Resolve registered contexts to a wire-ready payload list. Applies the modal-mask
72
+ * rule (a `modal`-typed context hides others unless they set `alwaysVisible`) and
73
+ * drops entries whose `getContext()` returns null/undefined.
74
+ */
75
+ snapshot(): Promise<TheSeamChatContextPayload[]>;
76
+ static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamChatContextRegistry, never>;
77
+ static ɵprov: i0.ɵɵInjectableDeclaration<TheSeamChatContextRegistry>;
78
+ }
79
+
80
+ interface TheSeamDatatableChatContextOptions {
81
+ /** Optional human label, e.g. 'Bales'. Helps the LLM disambiguate when multiple datatables are registered. */
82
+ label?: string;
83
+ }
84
+ interface TheSeamDatatableChatContextData {
85
+ label?: string;
86
+ operationName: string;
87
+ query: string;
88
+ variables: Record<string, unknown>;
89
+ columns: {
90
+ prop: string | number | undefined;
91
+ name: string | undefined;
92
+ }[];
93
+ }
94
+ declare class TheSeamDatatableChatContext implements TheSeamChatContext {
95
+ private readonly _queryRef;
96
+ private readonly _columns;
97
+ private readonly _options;
98
+ readonly type = "datatable";
99
+ constructor(_queryRef: DatatableGraphQLQueryRef<any, any, any>, _columns: readonly TheSeamDatatableColumn[], _options?: TheSeamDatatableChatContextOptions);
100
+ getContext(): TheSeamDatatableChatContextData | null;
34
101
  }
35
102
 
36
103
  type ChatContentSegment = {
@@ -56,9 +123,9 @@ interface ChatMessageDisplayModel {
56
123
 
57
124
  declare class TheSeamChatComponent implements AfterViewInit {
58
125
  private readonly _provider;
126
+ private readonly _chatContextRegistry;
59
127
  private readonly _cdr;
60
128
  private readonly _ngZone;
61
- systemPrompt: string;
62
129
  placeholder: string;
63
130
  private _messageList?;
64
131
  private _messageListScrollbar?;
@@ -74,10 +141,10 @@ declare class TheSeamChatComponent implements AfterViewInit {
74
141
  private _maybeScrollToBottom;
75
142
  private _scrollToBottom;
76
143
  static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamChatComponent, never>;
77
- static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamChatComponent, "seam-chat", never, { "systemPrompt": { "alias": "systemPrompt"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, {}, never, never, true, never>;
144
+ static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamChatComponent, "seam-chat", never, { "placeholder": { "alias": "placeholder"; "required": false; }; }, {}, never, never, true, never>;
78
145
  }
79
146
 
80
- declare const THESEAM_CHAT_PROVIDER: InjectionToken<AiProvider>;
147
+ declare const THESEAM_CHAT_PROVIDER: InjectionToken<TheSeamAiProvider>;
81
148
 
82
149
  type ChatBlockRegistry = Map<string, Type<unknown>>;
83
150
  declare const THESEAM_CHAT_BLOCK_REGISTRY: InjectionToken<ChatBlockRegistry>;
@@ -109,7 +176,7 @@ declare const getUserPrompt: (columns: any[], request: string) => string;
109
176
  declare function parseResponse(responseContent: string, responseFormat: {
110
177
  type: string;
111
178
  } | undefined): any;
112
- declare const THESEAM_DATATABLE_PROMPTER_PROVIDER: InjectionToken<AiProvider>;
179
+ declare const THESEAM_DATATABLE_PROMPTER_PROVIDER: InjectionToken<TheSeamAiProvider>;
113
180
 
114
181
  declare class TheSeamDatatablePrompterComponent {
115
182
  private readonly _prefsAccessor;
@@ -140,5 +207,5 @@ declare class TheSeamDatatablePrompterComponent {
140
207
  static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamDatatablePrompterComponent, "seam-datatable-prompter", never, { "diffMode": { "alias": "diffMode"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "prompt": { "alias": "prompt"; "required": false; }; "datatable": { "alias": "datatable"; "required": false; }; "showAlts": { "alias": "showAlts"; "required": false; }; }, {}, never, never, true, never>;
141
208
  }
142
209
 
143
- export { LmStudioAiProvider, MockAiProvider, OpenRouterAiProvider, THESEAM_CHAT_BLOCK_REGISTRY, THESEAM_CHAT_PROVIDER, THESEAM_DATATABLE_PROMPTER_PROVIDER, TheSeamChatComponent, TheSeamChatHarness, TheSeamDatatablePrompterComponent, assistantPrompt, getUserPrompt, parseChatResponse, parseResponse };
144
- export type { AiProvider, ChatBlockRegistry, ChatContentSegment, ChatMessage, ChatResponse };
210
+ export { LmStudioAiProvider, MockAiProvider, OpenRouterAiProvider, THESEAM_CHAT_BLOCK_REGISTRY, THESEAM_CHAT_PROVIDER, THESEAM_DATATABLE_PROMPTER_PROVIDER, TheSeamChatComponent, TheSeamChatContextRegistry, TheSeamChatHarness, TheSeamDatatableChatContext, TheSeamDatatablePrompterComponent, assistantPrompt, getUserPrompt, parseChatResponse, parseResponse };
211
+ export type { ChatBlockRegistry, ChatContentSegment, ChatMessage, ChatResponse, TheSeamAiChatRequest, TheSeamAiProvider, TheSeamChatContext, TheSeamChatContextPayload, TheSeamDatatableChatContextData, TheSeamDatatableChatContextOptions };
@@ -3,6 +3,8 @@ import { OnInit, OnDestroy, QueryList } from '@angular/core';
3
3
  import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types';
4
4
  import { NumberInput, BooleanInput } from '@angular/cdk/coercion';
5
5
  import { Observable } from 'rxjs';
6
+ import * as _angular_cdk_testing from '@angular/cdk/testing';
7
+ import { ComponentHarness } from '@angular/cdk/testing';
6
8
 
7
9
  declare class TheSeamCarouselSlideDirective {
8
10
  private readonly template;
@@ -97,4 +99,22 @@ declare class TheSeamCarouselModule {
97
99
  static ɵinj: i0.ɵɵInjectorDeclaration<TheSeamCarouselModule>;
98
100
  }
99
101
 
100
- export { TheSeamCarouselComponent, TheSeamCarouselModule, TheSeamCarouselSlideDirective };
102
+ declare class TheSeamCarouselHarness extends ComponentHarness {
103
+ static hostSelector: string;
104
+ _content: () => Promise<_angular_cdk_testing.TestElement>;
105
+ _prevSlideButton: () => Promise<_angular_cdk_testing.TestElement | null>;
106
+ _nextSlideButton: () => Promise<_angular_cdk_testing.TestElement | null>;
107
+ _playButton: () => Promise<_angular_cdk_testing.TestElement | null>;
108
+ _pauseButton: () => Promise<_angular_cdk_testing.TestElement | null>;
109
+ activeTileIndex(): Promise<string | null>;
110
+ goToPreviousSlide(): Promise<void>;
111
+ goToNextSlide(): Promise<void>;
112
+ goToSlide(index: number): Promise<void>;
113
+ hasPreviousSlideButton(): Promise<boolean>;
114
+ hasNextSlideButton(): Promise<boolean>;
115
+ hasSlideButton(index: number): Promise<boolean>;
116
+ hasSlideButtons(): Promise<boolean>;
117
+ hasAutoPlayToggleButton(): Promise<boolean>;
118
+ }
119
+
120
+ export { TheSeamCarouselComponent, TheSeamCarouselHarness, TheSeamCarouselModule, TheSeamCarouselSlideDirective };
@@ -18,7 +18,7 @@ import { Router } from '@angular/router';
18
18
  import * as i38 from '@theseam/ui-common/confirm-dialog';
19
19
  import { SeamConfirmDialogService } from '@theseam/ui-common/confirm-dialog';
20
20
  import * as i32 from '@theseam/ui-common/menu';
21
- import { MenuComponent } from '@theseam/ui-common/menu';
21
+ import { MenuComponent, TheSeamMenuItemHarnessFilters, TheSeamMenuItemHarness } from '@theseam/ui-common/menu';
22
22
  import { ThemeTypes } from '@theseam/ui-common/models';
23
23
  import * as i43 from '@theseam/ui-common/table-cell-type';
24
24
  import { TableCellTypeName, TableCellTypeConfig, TableCellTypeColumn, TableCellTypeExportProps, TheSeamTableCellTypeColumnAlign } from '@theseam/ui-common/table-cell-type';
@@ -45,9 +45,13 @@ import * as i33 from '@theseam/ui-common/buttons';
45
45
  import * as i37 from '@angular/cdk/portal';
46
46
  import * as i39 from '@theseam/ui-common/popover';
47
47
  import * as i40 from '@theseam/ui-common/checkbox';
48
+ import { TheSeamCheckboxHarness } from '@theseam/ui-common/checkbox';
48
49
  import * as i41 from '@theseam/ui-common/form-field';
49
50
  import * as i45 from '@ng-select/ng-select';
50
51
  import * as i46 from '@theseam/ui-common/toggle-group';
52
+ import * as _angular_cdk_testing from '@angular/cdk/testing';
53
+ import { BaseHarnessFilters, ComponentHarness, ComponentHarnessConstructor, HarnessPredicate, ContentContainerComponentHarness } from '@angular/cdk/testing';
54
+ import { TheSeamNgSelectHarness } from '@theseam/ui-common/testing';
51
55
 
52
56
  declare class DatatableActionMenuItemComponent {
53
57
  label: string | undefined | null;
@@ -1391,5 +1395,297 @@ declare class TheSeamDatatableModule {
1391
1395
  static ɵinj: i0.ɵɵInjectorDeclaration<TheSeamDatatableModule>;
1392
1396
  }
1393
1397
 
1394
- export { CURRENT_DATATABLE_PREFERENCES_VERSION, ColumnsAlteration, ColumnsDataFilter, ColumnsFiltersService, DatatableActionMenuComponent, DatatableActionMenuItemComponent, DatatableActionMenuItemDirective, DatatableActionMenuToggleDirective, DatatableCellTplDirective, DatatableColumnChangesService, DatatableColumnComponent, DatatableColumnFilterMenuComponent, DatatableColumnFilterSearchDateComponent, DatatableColumnFilterSearchNumericComponent, DatatableColumnFilterSearchTextComponent, DatatableColumnFilterTplDirective, DatatableColumnPreferencesButtonComponent, DatatableColumnPreferencesComponent, DatatableComponent, DatatableDataSource, DatatableExportButtonComponent, DatatableFilterDirective, DatatableFooterTplDirective, DatatableGqlDataSource, DatatableMenuBarColumnCenterComponent, DatatableMenuBarColumnLeftComponent, DatatableMenuBarColumnRightComponent, DatatableMenuBarComponent, DatatableMenuBarRowComponent, DatatableMenuBarTextComponent, DatatablePreferencesService, DatatableRefreshButtonComponent, DatatableRefreshService, DatatableRowActionItemDirective, DatatableRowDetailTplDirective, EMPTY_DATATABLE_PREFERENCES, SearchDateColumnsDataFilter, SearchNumericColumnsDataFilter, SearchTextColumnsDataFilter, THESEAM_COLUMNS_DATA_FILTER, THESEAM_COLUMNS_DATA_FILTERS_DEFAULT, THESEAM_COLUMNS_DATA_FILTER_DATE_RANGE_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_DATE_SEARCH_NAME, THESEAM_COLUMNS_DATA_FILTER_DATE_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_DATE_SELECT_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_DATE_TEXT_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_NUMERIC_RANGE_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_NUMERIC_SEARCH_NAME, THESEAM_COLUMNS_DATA_FILTER_NUMERIC_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_NUMERIC_SELECT_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_NUMERIC_TEXT_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_TEXT_SEARCH_NAME, THESEAM_COLUMNS_DATA_FILTER_TEXT_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_TEXT_SELECT_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_TEXT_TEXT_SEARCH_TYPES, THESEAM_DATATABLE, THESEAM_DATATABLE_CONFIG, THESEAM_DATATABLE_PREFERENCES_ACCESSOR, THESEAM_MENUBAR_ITEM_DATA, TheSeamDatatableColumnFilterDirective, TheSeamDatatableFooterDirective, TheSeamDatatableModule, TheSeamDatatableRowDetailDirective, TheSeamDatatableScrollbarHelperService, _THESEAM_DATATABLE, _THESEAM_DATATABLE_ACCESSOR, _THESEAM_DATA_FILTER_CONTAINER, getFormattedDateForComparison, isColumnBoundToProp, mapColumnsAlterationsStates, withStoredColumnInfo };
1395
- export type { ColumnsAlterationState, ColumnsDataFilterState, ColumnsDataFilterStateState, ICellContext, IDatatableExportButtonData, MenubarItemData, SortEvent, SortItem, TheSeamColumnsDataFilterDateSearchDateType, TheSeamColumnsDataFilterDateSearchForm, TheSeamColumnsDataFilterDateSearchFormState, TheSeamColumnsDataFilterDateSearchOptions, TheSeamColumnsDataFilterDateSearchType, TheSeamColumnsDataFilterNumericSearchForm, TheSeamColumnsDataFilterNumericSearchFormState, TheSeamColumnsDataFilterNumericSearchType, TheSeamColumnsDataFilterTextSearchForm, TheSeamColumnsDataFilterTextSearchFormState, TheSeamColumnsDataFilterTextSearchType, TheSeamDatatableAccessor, TheSeamDatatableColumn, TheSeamDatatableColumnFilterUpdateMethod, TheSeamDatatableColumnFilterable, TheSeamDatatableColumnFilterableConfig, TheSeamDatatableColumnHidable, TheSeamDatatableConfig, TheSeamDatatableDateColumnFilterableConfig, TheSeamDatatableMessages, TheSeamDatatablePreferences, TheSeamDatatablePreferencesAccessor, TheSeamDatatablePreferencesColumn, TheSeamDatatablePreferences_v1, TheSeamDatatablePreferences_v2, TheSeamDatatableRow, TheSeamPageInfo };
1398
+ declare const SIMPLE_COLUMNS: TheSeamDatatableColumn[];
1399
+ declare const SIMPLE_ROWS: {
1400
+ name: string;
1401
+ age: number;
1402
+ color: string;
1403
+ }[];
1404
+ declare const FILTERABLE_COLUMNS: TheSeamDatatableColumn[];
1405
+ declare const FILTERABLE_ROWS: ({
1406
+ name: string;
1407
+ age: any;
1408
+ color: string;
1409
+ candy: string;
1410
+ candyAttributes: string[];
1411
+ startDate: string;
1412
+ } | {
1413
+ name: string;
1414
+ age: null;
1415
+ color: null;
1416
+ candy: null;
1417
+ candyAttributes: undefined;
1418
+ startDate: null;
1419
+ })[];
1420
+ declare function createRows(count: number): {
1421
+ name: string;
1422
+ age: number;
1423
+ color: string;
1424
+ }[];
1425
+
1426
+ type TheSeamDatatableActionMenuHarnessFilters = BaseHarnessFilters;
1427
+ declare class TheSeamDatatableActionMenuHarness extends ComponentHarness {
1428
+ static hostSelector: string;
1429
+ static with<T extends TheSeamDatatableActionMenuHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamDatatableActionMenuHarnessFilters): HarnessPredicate<T>;
1430
+ private _getMenuHarness;
1431
+ /** Whether the action menu is open. */
1432
+ isOpen(): Promise<boolean>;
1433
+ /** Opens the action menu. */
1434
+ open(): Promise<void>;
1435
+ /** Closes the action menu. */
1436
+ close(): Promise<void>;
1437
+ /**
1438
+ * Gets the menu items in the action menu.
1439
+ * The menu must be opened first (call `open()`) or use `clickItem()` which opens automatically.
1440
+ */
1441
+ getItems(filters?: Omit<TheSeamMenuItemHarnessFilters, 'ancestor'>): Promise<TheSeamMenuItemHarness[]>;
1442
+ /**
1443
+ * Opens the menu and clicks an item by text.
1444
+ * Supports sub-menu navigation via additional filter arguments.
1445
+ */
1446
+ clickItem(itemFilter: Omit<TheSeamMenuItemHarnessFilters, 'ancestor'>, ...subItemFilters: Omit<TheSeamMenuItemHarnessFilters, 'ancestor'>[]): Promise<void>;
1447
+ }
1448
+
1449
+ interface TheSeamDatatableCellHarnessFilters extends BaseHarnessFilters {
1450
+ /** Filters based on the text content of the cell. */
1451
+ text?: string | RegExp;
1452
+ }
1453
+ declare class TheSeamDatatableCellHarness extends ComponentHarness {
1454
+ static hostSelector: string;
1455
+ static with<T extends TheSeamDatatableCellHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamDatatableCellHarnessFilters): HarnessPredicate<T>;
1456
+ /** Gets the text content of the cell. */
1457
+ getText(): Promise<string>;
1458
+ /** Clicks the cell. */
1459
+ click(): Promise<void>;
1460
+ /**
1461
+ * Gets a child harness of the given type from within this cell.
1462
+ * Useful for retrieving cell-type harnesses (e.g., currency, date, icon).
1463
+ *
1464
+ * Returns `null` if no matching harness is found.
1465
+ */
1466
+ getCellTypeHarness<T extends ComponentHarness>(harnessType: ComponentHarnessConstructor<T>): Promise<T | null>;
1467
+ }
1468
+
1469
+ type TheSeamDatatableColumnFilterMenuHarnessFilters = BaseHarnessFilters;
1470
+ declare class TheSeamDatatableColumnFilterMenuHarness extends ComponentHarness {
1471
+ static hostSelector: string;
1472
+ static with<T extends TheSeamDatatableColumnFilterMenuHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamDatatableColumnFilterMenuHarnessFilters): HarnessPredicate<T>;
1473
+ /** Gets the filter type by checking which sub-component is rendered. */
1474
+ getFilterType(): Promise<'search-text' | 'search-numeric' | 'search-date' | 'custom'>;
1475
+ /** Gets the search type ng-select harness. */
1476
+ getSearchTypeSelect(): Promise<TheSeamNgSelectHarness>;
1477
+ /** Gets the current search type value (e.g. "Contains", "Equals", "Between"). */
1478
+ getSearchType(): Promise<string | null>;
1479
+ /**
1480
+ * Selects a search type from the dropdown by its displayed label
1481
+ * (e.g. `'Before'`, `'Contains'`, `'Between'`).
1482
+ *
1483
+ * Note: this matches the visible option text, not the underlying form value
1484
+ * (e.g. pass `'Before'` not `'lt'`).
1485
+ */
1486
+ selectSearchType(label: string | RegExp): Promise<void>;
1487
+ /** Gets the primary search input (formControlName="searchText"). */
1488
+ getSearchInput(): Promise<_angular_cdk_testing.TestElement | null>;
1489
+ /** Gets the range start input (formControlName="fromText"). */
1490
+ getRangeStartInput(): Promise<_angular_cdk_testing.TestElement | null>;
1491
+ /** Gets the range end input (formControlName="toText"). */
1492
+ getRangeEndInput(): Promise<_angular_cdk_testing.TestElement | null>;
1493
+ /**
1494
+ * Sets the primary search value.
1495
+ * Clears any existing value first, then types the new value.
1496
+ */
1497
+ setSearchValue(value: string): Promise<void>;
1498
+ /**
1499
+ * Sets the range values (for "Between" search types on numeric/date filters).
1500
+ */
1501
+ setRangeValues(from: string, to: string): Promise<void>;
1502
+ /** Clicks the "Clear" button to reset the filter. */
1503
+ clear(): Promise<void>;
1504
+ /** Clicks the "Apply" button (only present in submit mode). */
1505
+ apply(): Promise<void>;
1506
+ /** Whether the "Apply" button is present (submit mode). */
1507
+ hasApplyButton(): Promise<boolean>;
1508
+ /** Whether the "Clear" button is disabled (filter is already at default). */
1509
+ isClearDisabled(): Promise<boolean>;
1510
+ }
1511
+
1512
+ type TheSeamDatatableColumnPreferencesButtonHarnessFilters = BaseHarnessFilters;
1513
+ declare class TheSeamDatatableColumnPreferencesButtonHarness extends ComponentHarness {
1514
+ static hostSelector: string;
1515
+ private _documentRootLocator;
1516
+ static with<T extends TheSeamDatatableColumnPreferencesButtonHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamDatatableColumnPreferencesButtonHarnessFilters): HarnessPredicate<T>;
1517
+ private _getMenuHarness;
1518
+ /** Opens the preferences menu by clicking the button. */
1519
+ open(): Promise<void>;
1520
+ /** Closes the preferences menu. */
1521
+ close(): Promise<void>;
1522
+ /** Whether the preferences menu is open. */
1523
+ isOpen(): Promise<boolean>;
1524
+ /**
1525
+ * Opens the "Show/Hide Columns" popover and returns the checkbox harnesses
1526
+ * for each column. The checkboxes are rendered inside a CDK overlay popover.
1527
+ */
1528
+ getColumnCheckboxes(): Promise<TheSeamCheckboxHarness[]>;
1529
+ /**
1530
+ * Toggles a column's visibility by name.
1531
+ * Opens the Show/Hide Columns popover and clicks the matching checkbox.
1532
+ */
1533
+ toggleColumn(name: string | RegExp): Promise<void>;
1534
+ /** Clicks the "Reset Columns" menu item. */
1535
+ resetColumns(): Promise<void>;
1536
+ }
1537
+
1538
+ type TheSeamDatatableExportButtonHarnessFilters = BaseHarnessFilters;
1539
+ declare class TheSeamDatatableExportButtonHarness extends ComponentHarness {
1540
+ static hostSelector: string;
1541
+ static with<T extends TheSeamDatatableExportButtonHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamDatatableExportButtonHarnessFilters): HarnessPredicate<T>;
1542
+ private _getMenuHarness;
1543
+ /** Opens the export menu. */
1544
+ open(): Promise<void>;
1545
+ /** Closes the export menu. */
1546
+ close(): Promise<void>;
1547
+ /** Whether the export menu is open. */
1548
+ isOpen(): Promise<boolean>;
1549
+ /** Whether the export button is disabled. */
1550
+ isDisabled(): Promise<boolean>;
1551
+ /** Gets the exporter menu items. The menu must be opened first or use `clickExporter()`. */
1552
+ getExporters(filters?: Omit<TheSeamMenuItemHarnessFilters, 'ancestor'>): Promise<TheSeamMenuItemHarness[]>;
1553
+ /** Opens the menu and clicks an exporter by label. */
1554
+ clickExporter(label: string | RegExp): Promise<void>;
1555
+ }
1556
+
1557
+ type SortDirection = 'asc' | 'desc' | 'none';
1558
+ interface TheSeamDatatableHeaderCellHarnessFilters extends BaseHarnessFilters {
1559
+ /** Filters based on the column name text. */
1560
+ name?: string | RegExp;
1561
+ /** Filters based on the sort direction. */
1562
+ sortDirection?: SortDirection;
1563
+ }
1564
+ declare class TheSeamDatatableHeaderCellHarness extends ComponentHarness {
1565
+ static hostSelector: string;
1566
+ static with<T extends TheSeamDatatableHeaderCellHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamDatatableHeaderCellHarnessFilters): HarnessPredicate<T>;
1567
+ /** Gets the column name text. */
1568
+ getName(): Promise<string>;
1569
+ /** Gets the current sort direction of this column. */
1570
+ getSortDirection(): Promise<SortDirection>;
1571
+ /** Whether this column is sortable. */
1572
+ isSortable(): Promise<boolean>;
1573
+ /** Clicks the sort button to cycle the sort direction. */
1574
+ sort(): Promise<void>;
1575
+ /** Whether this column has a filter button. */
1576
+ isFilterable(): Promise<boolean>;
1577
+ /** Whether the column filter is currently active. */
1578
+ isFilterActive(): Promise<boolean>;
1579
+ /** Opens the column filter menu by clicking the filter button. */
1580
+ openFilter(): Promise<void>;
1581
+ /**
1582
+ * Opens the filter and returns the filter menu harness.
1583
+ * The filter menu renders in a CDK overlay, so this uses the document root locator.
1584
+ */
1585
+ getFilterMenu(): Promise<TheSeamDatatableColumnFilterMenuHarness>;
1586
+ /** Whether this header cell is a checkbox column (select-all). */
1587
+ isCheckboxColumn(): Promise<boolean>;
1588
+ /** Clicks the select-all checkbox in this header cell. */
1589
+ clickCheckbox(): Promise<void>;
1590
+ }
1591
+
1592
+ type TheSeamDatatableMenuBarHarnessFilters = BaseHarnessFilters;
1593
+ declare class TheSeamDatatableMenuBarHarness extends ContentContainerComponentHarness<string> {
1594
+ static hostSelector: string;
1595
+ static with<T extends TheSeamDatatableMenuBarHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamDatatableMenuBarHarnessFilters): HarnessPredicate<T>;
1596
+ /** Gets the text content of the menu bar. */
1597
+ getTextContent(): Promise<string>;
1598
+ }
1599
+
1600
+ interface TheSeamDatatablePagerButtonHarnessFilters extends BaseHarnessFilters {
1601
+ /** Filters based on the page number of the button. */
1602
+ pageNumber?: number | string | RegExp | null;
1603
+ }
1604
+ declare class TheSeamDatatablePagerButtonHarness extends ComponentHarness {
1605
+ static hostSelector: string;
1606
+ /** Creates a `HarnessPredicate` used to locate a particular `MyMenuHarness`. */
1607
+ static with(options: TheSeamDatatablePagerButtonHarnessFilters): HarnessPredicate<TheSeamDatatablePagerButtonHarness>;
1608
+ getLabel(): Promise<string | null>;
1609
+ getAnchor(): Promise<_angular_cdk_testing.TestElement>;
1610
+ }
1611
+
1612
+ declare class TheSeamDatatablePagerHarness extends ComponentHarness {
1613
+ static hostSelector: string;
1614
+ private readonly _activePageButton;
1615
+ getPageButtonHarness(pageNumber: number): Promise<TheSeamDatatablePagerButtonHarness>;
1616
+ getCurrentPageNumber(): Promise<number>;
1617
+ }
1618
+
1619
+ interface TheSeamDatatableRowHarnessFilters extends BaseHarnessFilters {
1620
+ /** Filters based on whether the row is selected. */
1621
+ selected?: boolean;
1622
+ }
1623
+ declare class TheSeamDatatableRowHarness extends ComponentHarness {
1624
+ static hostSelector: string;
1625
+ static with<T extends TheSeamDatatableRowHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamDatatableRowHarnessFilters): HarnessPredicate<T>;
1626
+ /** Gets all cells in this row, optionally filtered. */
1627
+ getCells(filters?: TheSeamDatatableCellHarnessFilters): Promise<TheSeamDatatableCellHarness[]>;
1628
+ /** Gets a cell by its index in the row. */
1629
+ getCell(index: number): Promise<TheSeamDatatableCellHarness>;
1630
+ /** Convenience method to get the text content of a cell by index. */
1631
+ getCellText(index: number): Promise<string>;
1632
+ /** Whether this row is selected. */
1633
+ isSelected(): Promise<boolean>;
1634
+ /** Clicks the row to activate it. */
1635
+ click(): Promise<void>;
1636
+ /** Gets the action menu harness for this row, or `null` if no action menu exists. */
1637
+ getActionMenu(): Promise<TheSeamDatatableActionMenuHarness | null>;
1638
+ /** Whether this row's detail section is expanded. */
1639
+ isExpanded(): Promise<boolean>;
1640
+ /** Gets the row detail content element, or `null` if not expanded. */
1641
+ getDetailContent(): Promise<_angular_cdk_testing.TestElement | null>;
1642
+ /** Whether this row has a selection checkbox. */
1643
+ hasCheckbox(): Promise<boolean>;
1644
+ /** Clicks the selection checkbox on this row. */
1645
+ clickCheckbox(): Promise<void>;
1646
+ }
1647
+
1648
+ type TheSeamDatatableHarnessFilters = BaseHarnessFilters;
1649
+ declare class TheSeamDatatableHarness extends ComponentHarness {
1650
+ static hostSelector: string;
1651
+ static with<T extends TheSeamDatatableHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamDatatableHarnessFilters): HarnessPredicate<T>;
1652
+ private readonly _pager;
1653
+ getCurrentPage(): Promise<number>;
1654
+ getPager(): Promise<TheSeamDatatablePagerHarness | null>;
1655
+ /** Gets all visible body rows, optionally filtered. */
1656
+ getRows(filters?: TheSeamDatatableRowHarnessFilters): Promise<TheSeamDatatableRowHarness[]>;
1657
+ /** Gets a body row by its index. */
1658
+ getRow(index: number): Promise<TheSeamDatatableRowHarness>;
1659
+ /** Gets the number of visible body rows. */
1660
+ getRowCount(): Promise<number>;
1661
+ /** Gets all header cells, optionally filtered. */
1662
+ getHeaderCells(filters?: TheSeamDatatableHeaderCellHarnessFilters): Promise<TheSeamDatatableHeaderCellHarness[]>;
1663
+ /** Gets a header cell by column name. */
1664
+ getHeaderCell(name: string | RegExp): Promise<TheSeamDatatableHeaderCellHarness>;
1665
+ /** Gets the number of visible columns. */
1666
+ getColumnCount(): Promise<number>;
1667
+ /** Gets all currently selected rows. */
1668
+ getSelectedRows(): Promise<TheSeamDatatableRowHarness[]>;
1669
+ /** Gets the menu bar harness, or `null` if no menu bar is present. */
1670
+ getMenuBar(): Promise<TheSeamDatatableMenuBarHarness | null>;
1671
+ /** Gets the column preferences button harness, or `null` if not present. */
1672
+ getColumnPreferencesButton(): Promise<TheSeamDatatableColumnPreferencesButtonHarness | null>;
1673
+ /** Gets the text content of a cell by row and column index. */
1674
+ getCellText(rowIndex: number, colIndex: number): Promise<string>;
1675
+ /** Whether the table is showing its empty message (no rows). */
1676
+ isEmpty(): Promise<boolean>;
1677
+ }
1678
+
1679
+ type TheSeamDatatableRefreshButtonHarnessFilters = BaseHarnessFilters;
1680
+ declare class TheSeamDatatableRefreshButtonHarness extends ComponentHarness {
1681
+ static hostSelector: string;
1682
+ static with<T extends TheSeamDatatableRefreshButtonHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamDatatableRefreshButtonHarnessFilters): HarnessPredicate<T>;
1683
+ private readonly _button;
1684
+ /** Clicks the refresh button. */
1685
+ click(): Promise<void>;
1686
+ /** Whether the underlying button is disabled. */
1687
+ isDisabled(): Promise<boolean>;
1688
+ }
1689
+
1690
+ export { CURRENT_DATATABLE_PREFERENCES_VERSION, ColumnsAlteration, ColumnsDataFilter, ColumnsFiltersService, DatatableActionMenuComponent, DatatableActionMenuItemComponent, DatatableActionMenuItemDirective, DatatableActionMenuToggleDirective, DatatableCellTplDirective, DatatableColumnChangesService, DatatableColumnComponent, DatatableColumnFilterMenuComponent, DatatableColumnFilterSearchDateComponent, DatatableColumnFilterSearchNumericComponent, DatatableColumnFilterSearchTextComponent, DatatableColumnFilterTplDirective, DatatableColumnPreferencesButtonComponent, DatatableColumnPreferencesComponent, DatatableComponent, DatatableDataSource, DatatableExportButtonComponent, DatatableFilterDirective, DatatableFooterTplDirective, DatatableGqlDataSource, DatatableMenuBarColumnCenterComponent, DatatableMenuBarColumnLeftComponent, DatatableMenuBarColumnRightComponent, DatatableMenuBarComponent, DatatableMenuBarRowComponent, DatatableMenuBarTextComponent, DatatablePreferencesService, DatatableRefreshButtonComponent, DatatableRefreshService, DatatableRowActionItemDirective, DatatableRowDetailTplDirective, EMPTY_DATATABLE_PREFERENCES, FILTERABLE_COLUMNS, FILTERABLE_ROWS, SIMPLE_COLUMNS, SIMPLE_ROWS, SearchDateColumnsDataFilter, SearchNumericColumnsDataFilter, SearchTextColumnsDataFilter, THESEAM_COLUMNS_DATA_FILTER, THESEAM_COLUMNS_DATA_FILTERS_DEFAULT, THESEAM_COLUMNS_DATA_FILTER_DATE_RANGE_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_DATE_SEARCH_NAME, THESEAM_COLUMNS_DATA_FILTER_DATE_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_DATE_SELECT_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_DATE_TEXT_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_NUMERIC_RANGE_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_NUMERIC_SEARCH_NAME, THESEAM_COLUMNS_DATA_FILTER_NUMERIC_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_NUMERIC_SELECT_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_NUMERIC_TEXT_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_TEXT_SEARCH_NAME, THESEAM_COLUMNS_DATA_FILTER_TEXT_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_TEXT_SELECT_SEARCH_TYPES, THESEAM_COLUMNS_DATA_FILTER_TEXT_TEXT_SEARCH_TYPES, THESEAM_DATATABLE, THESEAM_DATATABLE_CONFIG, THESEAM_DATATABLE_PREFERENCES_ACCESSOR, THESEAM_MENUBAR_ITEM_DATA, TheSeamDatatableActionMenuHarness, TheSeamDatatableCellHarness, TheSeamDatatableColumnFilterDirective, TheSeamDatatableColumnFilterMenuHarness, TheSeamDatatableColumnPreferencesButtonHarness, TheSeamDatatableExportButtonHarness, TheSeamDatatableFooterDirective, TheSeamDatatableHarness, TheSeamDatatableHeaderCellHarness, TheSeamDatatableMenuBarHarness, TheSeamDatatableModule, TheSeamDatatablePagerButtonHarness, TheSeamDatatablePagerHarness, TheSeamDatatableRefreshButtonHarness, TheSeamDatatableRowDetailDirective, TheSeamDatatableRowHarness, TheSeamDatatableScrollbarHelperService, _THESEAM_DATATABLE, _THESEAM_DATATABLE_ACCESSOR, _THESEAM_DATA_FILTER_CONTAINER, createRows, getFormattedDateForComparison, isColumnBoundToProp, mapColumnsAlterationsStates, withStoredColumnInfo };
1691
+ export type { ColumnsAlterationState, ColumnsDataFilterState, ColumnsDataFilterStateState, ICellContext, IDatatableExportButtonData, MenubarItemData, SortDirection, SortEvent, SortItem, TheSeamColumnsDataFilterDateSearchDateType, TheSeamColumnsDataFilterDateSearchForm, TheSeamColumnsDataFilterDateSearchFormState, TheSeamColumnsDataFilterDateSearchOptions, TheSeamColumnsDataFilterDateSearchType, TheSeamColumnsDataFilterNumericSearchForm, TheSeamColumnsDataFilterNumericSearchFormState, TheSeamColumnsDataFilterNumericSearchType, TheSeamColumnsDataFilterTextSearchForm, TheSeamColumnsDataFilterTextSearchFormState, TheSeamColumnsDataFilterTextSearchType, TheSeamDatatableAccessor, TheSeamDatatableActionMenuHarnessFilters, TheSeamDatatableCellHarnessFilters, TheSeamDatatableColumn, TheSeamDatatableColumnFilterMenuHarnessFilters, TheSeamDatatableColumnFilterUpdateMethod, TheSeamDatatableColumnFilterable, TheSeamDatatableColumnFilterableConfig, TheSeamDatatableColumnHidable, TheSeamDatatableColumnPreferencesButtonHarnessFilters, TheSeamDatatableConfig, TheSeamDatatableDateColumnFilterableConfig, TheSeamDatatableExportButtonHarnessFilters, TheSeamDatatableHarnessFilters, TheSeamDatatableHeaderCellHarnessFilters, TheSeamDatatableMenuBarHarnessFilters, TheSeamDatatableMessages, TheSeamDatatablePreferences, TheSeamDatatablePreferencesAccessor, TheSeamDatatablePreferencesColumn, TheSeamDatatablePreferences_v1, TheSeamDatatablePreferences_v2, TheSeamDatatableRefreshButtonHarnessFilters, TheSeamDatatableRow, TheSeamDatatableRowHarnessFilters, TheSeamPageInfo };
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { OnInit, OnDestroy } from '@angular/core';
3
3
  import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types';
4
4
  import { TheSeamLayoutService } from '@theseam/ui-common/layout';
5
+ import { ComponentHarness } from '@angular/cdk/testing';
5
6
 
6
7
  interface AlterationDisplayItem {
7
8
  id: string;
@@ -97,5 +98,64 @@ declare class AlterationsDiffComponent implements OnInit, OnDestroy {
97
98
  static ɵcmp: i0.ɵɵComponentDeclaration<AlterationsDiffComponent, "seam-alterations-diff", never, { "currentItems": { "alias": "currentItems"; "required": false; }; "pendingItems": { "alias": "pendingItems"; "required": false; }; "diffMode": { "alias": "diffMode"; "required": false; }; "initialDiffState": { "alias": "initialDiffState"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; }, {}, never, never, true, never>;
98
99
  }
99
100
 
100
- export { AlterationDisplayService, AlterationItemComponent, AlterationsDiffComponent, AlterationsListComponent };
101
+ declare class AlterationItemHarness extends ComponentHarness {
102
+ static hostSelector: string;
103
+ private _getCard;
104
+ private _getTypeBadge;
105
+ private _getIcon;
106
+ private _getSummary;
107
+ private _getDiffState;
108
+ private _getDetails;
109
+ getType(): Promise<string>;
110
+ getTypeDisplayName(): Promise<string>;
111
+ getSummary(): Promise<string>;
112
+ getDiffState(): Promise<string | null>;
113
+ getDetails(): Promise<string[]>;
114
+ hasDetails(): Promise<boolean>;
115
+ hasBorderSuccess(): Promise<boolean>;
116
+ hasBorderDanger(): Promise<boolean>;
117
+ hasBorderWarning(): Promise<boolean>;
118
+ getBadgeClass(): Promise<string>;
119
+ isVisible(): Promise<boolean>;
120
+ }
121
+
122
+ declare class AlterationsListHarness extends ComponentHarness {
123
+ static hostSelector: string;
124
+ private _getTitle;
125
+ private _getCount;
126
+ private _getEmptyState;
127
+ private _getItems;
128
+ getTitle(): Promise<string | null>;
129
+ getCount(): Promise<string | null>;
130
+ hasEmptyState(): Promise<boolean>;
131
+ getEmptyStateText(): Promise<string | null>;
132
+ getItems(): Promise<AlterationItemHarness[]>;
133
+ getItemCount(): Promise<number>;
134
+ getItemByType(type: string): Promise<AlterationItemHarness | null>;
135
+ getItemTypes(): Promise<string[]>;
136
+ hasItems(): Promise<boolean>;
137
+ }
138
+
139
+ declare class AlterationsDiffHarness extends ComponentHarness {
140
+ static hostSelector: string;
141
+ private _getDiffSummary;
142
+ private _getCurrentList;
143
+ private _getPendingList;
144
+ private _getCurrentListMobile;
145
+ private _getPendingListMobile;
146
+ private _getDesktopLayout;
147
+ private _getMobileLayout;
148
+ hasDiffSummary(): Promise<boolean>;
149
+ getDiffSummaryText(): Promise<string | null>;
150
+ isDesktopLayout(): Promise<boolean>;
151
+ isMobileLayout(): Promise<boolean>;
152
+ getCurrentList(): Promise<AlterationsListHarness | null>;
153
+ getPendingList(): Promise<AlterationsListHarness | null>;
154
+ getCurrentItemCount(): Promise<number>;
155
+ getPendingItemCount(): Promise<number>;
156
+ hasCurrentEmptyState(): Promise<boolean>;
157
+ hasPendingEmptyState(): Promise<boolean>;
158
+ }
159
+
160
+ export { AlterationDisplayService, AlterationItemComponent, AlterationItemHarness, AlterationsDiffComponent, AlterationsDiffHarness, AlterationsListComponent, AlterationsListHarness };
101
161
  export type { AlterationDiffMode, AlterationDiffState, AlterationDisplayItem, AlterationVisualState };