@thalassic/ui 22.17.1 → 22.17.3

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": "@thalassic/ui",
3
- "version": "22.17.1",
3
+ "version": "22.17.3",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
6
  "@angular/aria": "^22.0.0",
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { ModelSignal, InputSignal, WritableSignal, Signal, InputSignalWithTransform, InjectionToken, TemplateRef, TrackByFunction, OutputEmitterRef, Type, EnvironmentProviders, ElementRef, OnInit, ComponentRef, OnDestroy, Renderer2 } from '@angular/core';
3
3
  import { FormUiControl, WithOptionalFieldTree, ValidationError, FormValueControl, FormCheckboxControl, ReadonlyFieldTree } from '@angular/forms/signals';
4
4
  import { Day, Locale } from 'date-fns';
5
- import { Point } from '@thalassic/core';
5
+ import { Point, breakpoint } from '@thalassic/core';
6
6
  import { FlexibleConnectedPositionStrategyOrigin, ConnectedPosition } from '@angular/cdk/overlay';
7
7
  import * as _thalassic_ui from '@thalassic/ui';
8
8
  import { CdkDialogContainer, DialogRef as DialogRef$1, DialogRole } from '@angular/cdk/dialog';
@@ -2455,7 +2455,6 @@ declare class Textarea extends ValueFormControl<string> {
2455
2455
  readonly autosize: InputSignalWithTransform<boolean, unknown>;
2456
2456
  readonly maxRows: InputSignalWithTransform<number, unknown>;
2457
2457
  protected readonly classes: Signal<string[]>;
2458
- protected readonly effectiveResize: Signal<textareaResize>;
2459
2458
  protected onInput(event: Event): void;
2460
2459
  static ɵfac: i0.ɵɵFactoryDeclaration<Textarea, never>;
2461
2460
  static ɵcmp: i0.ɵɵComponentDeclaration<Textarea, "tls-textarea", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "resize": { "alias": "resize"; "required": false; "isSignal": true; }; "autosize": { "alias": "autosize"; "required": false; "isSignal": true; }; "maxRows": { "alias": "maxRows"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
@@ -3415,6 +3414,15 @@ declare class TabLinkDirective {
3415
3414
  }
3416
3415
 
3417
3416
  type tableColumnAlignment = 'start' | 'center' | 'end';
3417
+ /**
3418
+ * What becomes of a column once the table is narrower than its collapse width.
3419
+ *
3420
+ * - `keep` — stays a column; the row still reads left to right.
3421
+ * - `fold` — leaves the column grid and reappears as a labelled line beneath
3422
+ * the kept cells, so its value survives the loss of horizontal room.
3423
+ * - `hide` — drops out entirely, for values that are not worth vertical space.
3424
+ */
3425
+ type tableColumnCollapse = 'keep' | 'fold' | 'hide';
3418
3426
  type TableData = Record<string, unknown>;
3419
3427
  type TableTrackBy = TrackBy<TableData>;
3420
3428
  interface TableColumnDefinition {
@@ -3424,6 +3432,11 @@ interface TableColumnDefinition {
3424
3432
  alignment?: tableColumnAlignment;
3425
3433
  width?: number;
3426
3434
  template?: TemplateRef<unknown>;
3435
+ /**
3436
+ * How this column behaves below the table's `collapseAt` width. Defaults to
3437
+ * `keep`, so a table that declares no collapse width is unaffected.
3438
+ */
3439
+ collapse?: tableColumnCollapse;
3427
3440
  }
3428
3441
 
3429
3442
  declare class TableColumn {
@@ -3432,14 +3445,20 @@ declare class TableColumn {
3432
3445
  readonly hidden: InputSignalWithTransform<boolean, unknown>;
3433
3446
  readonly alignment: i0.InputSignal<tableColumnAlignment | undefined>;
3434
3447
  readonly width: i0.InputSignal<number | undefined>;
3448
+ readonly collapse: i0.InputSignal<tableColumnCollapse | undefined>;
3435
3449
  readonly template: i0.Signal<TemplateRef<any> | undefined>;
3436
3450
  static ɵfac: i0.ɵɵFactoryDeclaration<TableColumn, never>;
3437
- static ɵcmp: i0.ɵɵComponentDeclaration<TableColumn, "tls-table-column", never, { "key": { "alias": "key"; "required": true; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, {}, ["template"], never, true, never>;
3451
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableColumn, "tls-table-column", never, { "key": { "alias": "key"; "required": true; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "collapse": { "alias": "collapse"; "required": false; "isSignal": true; }; }, {}, ["template"], never, true, never>;
3438
3452
  }
3439
3453
 
3440
- declare class Table {
3454
+ declare class Table<TRow = TableData> {
3441
3455
  private readonly _config;
3442
- readonly data: InputSignal<TableData[]>;
3456
+ /**
3457
+ * Rows to render. The row type flows through from whatever array is bound, so
3458
+ * a caller keeps its own model type here rather than widening to an index
3459
+ * signature.
3460
+ */
3461
+ readonly data: InputSignal<TRow[]>;
3443
3462
  readonly columnDefinitions: InputSignal<TableColumnDefinition[]>;
3444
3463
  readonly hideHeader: InputSignalWithTransform<boolean, unknown>;
3445
3464
  readonly striped: InputSignalWithTransform<boolean, unknown>;
@@ -3450,20 +3469,39 @@ declare class Table {
3450
3469
  * scroll. Left unset the table grows with its content and nothing scrolls.
3451
3470
  */
3452
3471
  readonly maxHeight: InputSignalWithTransform<number | undefined, unknown>;
3472
+ /**
3473
+ * Width below which the table stops being a column grid: `fold` columns move
3474
+ * under the kept cells as labelled lines and `hide` columns drop out, so a
3475
+ * record stays readable when there is no room to lay it out sideways.
3476
+ *
3477
+ * Measured against the table's own width, not the viewport — a table inside a
3478
+ * sidebar or split pane collapses on its real width. Left unset the table
3479
+ * never collapses.
3480
+ */
3481
+ readonly collapseAt: InputSignal<breakpoint | undefined>;
3453
3482
  /** Accessible name for the table, forwarded to the inner `<table>` element. */
3454
3483
  readonly ariaLabel: InputSignal<string | undefined>;
3455
3484
  readonly ariaLabelledby: InputSignal<string | undefined>;
3456
3485
  protected readonly tableColumns: Signal<readonly TableColumn[]>;
3457
3486
  protected readonly effectiveColumnDefinitions: Signal<TableColumnDefinition[]>;
3458
3487
  protected readonly columns: Signal<string[]>;
3459
- protected readonly resolvedTrackBy: Signal<TrackByFunction<TableData>>;
3488
+ protected readonly resolvedTrackBy: Signal<TrackByFunction<TRow>>;
3489
+ protected readonly hostClasses: Signal<string>;
3460
3490
  protected readonly scrollable: Signal<boolean>;
3461
3491
  protected readonly classes: Signal<string[]>;
3462
- protected readonly dataSource: DataSource<TableData>;
3492
+ protected readonly dataSource: DataSource<TRow>;
3493
+ /**
3494
+ * Reads a column's value off a row by key.
3495
+ *
3496
+ * Columns address their data by string key while the row type stays the
3497
+ * caller's own, so the index has to be widened here — confined to this one
3498
+ * place rather than pushed onto every consumer's cell template.
3499
+ */
3500
+ protected cellValue(row: TRow, key: string): unknown;
3463
3501
  private _mapContentColumns;
3464
3502
  private _mapContentColumn;
3465
- static ɵfac: i0.ɵɵFactoryDeclaration<Table, never>;
3466
- static ɵcmp: i0.ɵɵComponentDeclaration<Table, "tls-table", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "columnDefinitions": { "alias": "columnDefinitions"; "required": false; "isSignal": true; }; "hideHeader": { "alias": "hideHeader"; "required": false; "isSignal": true; }; "striped": { "alias": "striped"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; "isSignal": true; }; }, {}, ["tableColumns"], never, true, never>;
3503
+ static ɵfac: i0.ɵɵFactoryDeclaration<Table<any>, never>;
3504
+ static ɵcmp: i0.ɵɵComponentDeclaration<Table<any>, "tls-table", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "columnDefinitions": { "alias": "columnDefinitions"; "required": false; "isSignal": true; }; "hideHeader": { "alias": "hideHeader"; "required": false; "isSignal": true; }; "striped": { "alias": "striped"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "collapseAt": { "alias": "collapseAt"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; "isSignal": true; }; }, {}, ["tableColumns"], never, true, never>;
3467
3505
  }
3468
3506
 
3469
3507
  interface TableConfig {
@@ -4239,4 +4277,4 @@ declare abstract class QuerySyncDirective {
4239
4277
  declare const provideThalassicUIConfig: (config?: tlsUiConfigProvider) => EnvironmentProviders;
4240
4278
 
4241
4279
  export { ACTIVITY_HEATMAP_CONFIG, ALERT_CONFIG, AUTOCOMPLETE_CONFIG, ActivityHeatmap, Alert, Autocomplete, BADGE_CONFIG, BREADCRUMBS_CONFIG, BUTTON_CONFIG, Badge, Breadcrumbs, Button, ButtonDirective, CALENDAR_CONFIG, CHECKBOX_CONFIG, CHIP_CONFIG, CHIP_CONTROL_CONFIG, CHIP_GROUP_CONFIG, CHIP_INPUT_CONFIG, CONFIRM_CONFIG, Calendar, CalendarAgendaView, CalendarEventItem, CalendarMonthView, CalendarTimeGrid, Checkbox, CheckboxFormControl, Chip, ChipControl, ChipGroup, ChipInput, Confirm, ConfirmPanel, ConfirmService, ContextMenuDirective, DATE_TIME_PICKER_CONFIG, DEFAULT_ACTIVITY_HEATMAP_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_AUTOCOMPLETE_CONFIG, DEFAULT_BADGE_CONFIG, DEFAULT_BREADCRUMBS_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CALENDAR_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_CHIP_CONFIG, DEFAULT_CHIP_CONTROL_CONFIG, DEFAULT_CHIP_GROUP_CONFIG, DEFAULT_CHIP_INPUT_CONFIG, DEFAULT_CONFIRM_CONFIG, DEFAULT_DATE_TIME_PICKER_CONFIG, DEFAULT_DIALOG_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_DRAWER_CONFIG, DEFAULT_FILE_INPUT_CONFIG, DEFAULT_FORM_CONTROL_CONFIG, DEFAULT_FORM_CONTROL_GROUP_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_HIGHLIGHT_CONFIG, DEFAULT_ICONS, DEFAULT_ICON_CONFIG, DEFAULT_IMAGE_COMPARE_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_INPUT_NUMBER_CONFIG, DEFAULT_KBD_CONFIG, DEFAULT_LOADER_CONFIG, DEFAULT_MARK_CONFIG, DEFAULT_MENU_CONFIG, DEFAULT_MULTI_SELECT_CONFIG, DEFAULT_ODOMETER_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_PAGINATION_QUERY_SYNC_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_PIN_INPUT_CONFIG, DEFAULT_POPOVER_CONFIG, DEFAULT_PROGRESS_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_RATING_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_SLIDER_CONFIG, DEFAULT_SPLITTER_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEPPER_LABELS, DEFAULT_STEP_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TABS_QUERY_SYNC_CONFIG, DEFAULT_TAB_NAV_CONFIG, DEFAULT_TEXTAREA_CONFIG, DEFAULT_TOAST_CONFIG, DEFAULT_TOGGLE_BUTTON_CONFIG, DEFAULT_TOGGLE_GROUP_CONFIG, DEFAULT_TOOLTIP_CONFIG, DEFAULT_TOOLTIP_CONTENT_ATTRIBUTE, DEFAULT_VIRTUAL_SCROLL_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DRAWER_CONFIG, DateTimePicker, Dialog, DialogBody, DialogFooter, DialogHeader, DialogRef, DialogService, DialogTitleDirective, Divider, Drawer, DrawerRef, DrawerService, FILE_INPUT_CONFIG, FORM_CONTROL, FORM_CONTROL_CONFIG, FORM_CONTROL_GROUP_CONFIG, FORM_ITEM_CONFIG, FileInput, FormControl, FormControlAddon, FormControlGroup, FormItem, HIGHLIGHT_CONFIG, Highlight, ICON_CONFIG, ICON_REGISTRY, IMAGE_COMPARE_CONFIG, INPUT_CONFIG, INPUT_NUMBER_CONFIG, Icon, IconRegistry, IconService, ImageCompare, Input, InputDirective, InputNumber, KBD_CONFIG, Kbd, LOADER_CONFIG, Loader, MARK_CONFIG, MASK_TOKENS, MENU_CONFIG, MULTI_SELECT_CONFIG, Mark, MaskDirective, Menu, MenuItemComponent, MenuTriggerDirective, MultiSelect, ODOMETER_CONFIG, Odometer, PAGINATION_CONFIG, PAGINATION_QUERY_SYNC_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, PROGRESS_CONFIG, Pagination, PaginationQuerySyncDirective, Password, PinInput, Popover, Progress, RADIO_BUTTON_CONFIG, RATING_CONFIG, RadioButton, Rating, SELECT_CONFIG, SKELETON_CONFIG, SLIDER_CONFIG, SPLITTER_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, Select, Skeleton, Slider, Splitter, SplitterPanel, Step, Stepper, Switch, TABLE_CONFIG, TABS_CONFIG, TABS_QUERY_SYNC_CONFIG, TAB_NAV_CONFIG, TEXTAREA_CONFIG, TOAST_CONFIG, TOGGLE_BUTTON_CONFIG, TOGGLE_GROUP_CONFIG, TOOLTIP_CONFIG, Tab, TabLinkDirective, TabNavDirective, Table, TableColumn, Tabs, TabsQuerySyncDirective, Textarea, Toast, ToastOutlet, ToastService, ToggleButton, ToggleGroup, TooltipDelegateDirective, TooltipDirective, TooltipTrigger, VIRTUAL_SCROLL_CONFIG, ValueFormControl, VirtualScroll, aggregateActivityEntries, applyMask, buildActivityMonthSegments, buildActivityThresholds, provideThalassicIcons, provideThalassicUIConfig, resolveActivityLevel };
4242
- export type { ActivityHeatmapConfig, ActivityHeatmapDay, ActivityHeatmapEntry, ActivityHeatmapLabels, ActivityHeatmapMonth, ActivityHeatmapRow, ActivityHeatmapTotal, AlertConfig, AutocompleteConfig, BadgeConfig, BreadcrumbItem, BreadcrumbItemContext, BreadcrumbsConfig, ButtonConfig, CalendarConfig, CalendarDayContext, CalendarEvent, CalendarEventContext, CalendarLabels, CalendarRange, CheckboxConfig, ChipConfig, ChipContext, ChipControlConfig, ChipGroupConfig, ChipInputConfig, ConfirmConfig, ConfirmOptions, DateTimePickerConfig, DialogConfig, DialogOpenConfig, DividerConfig, DrawerConfig, DrawerOpenConfig, FileInputConfig, FileInputDropZoneContext, FileInputFileContext, FormControlConfig, FormControlGroupConfig, FormItemConfig, HighlightConfig, HighlightSegment, IconConfig, ImageCompareConfig, InputConfig, InputNumberConfig, KbdConfig, LoaderConfig, MarkConfig, MaskResult, MenuActionItem, MenuConfig, MenuCustomItem, MenuDivider, MenuItemDefinition, MenuLabel, MultiSelectConfig, OdometerConfig, OdometerToken, OverlayArrowPosition, PaginationConfig, PaginationLabels, PaginationQuerySyncConfig, PasswordConfig, PinInputConfig, PopoverConfig, ProgressConfig, RadioButtonConfig, RatingConfig, RatingLabels, RatingStarContext, SelectConfig, SkeletonConfig, SliderConfig, SplitterConfig, StepConfig, StepperConfig, StepperLabels, StepperSelectEvent, SwitchConfig, TabNavConfig, TableColumnDefinition, TableConfig, TableData, TableTrackBy, TabsConfig, TabsQuerySyncConfig, TextareaConfig, ToastConfig, ToastOptions, ToastRef, ToastState, ToggleButtonConfig, ToggleGroupConfig, TooltipConfig, TrackBy, VirtualScrollConfig, VirtualScrollContext, acceptInput, alertColor, autocompleteFilterMode, badgeColor, badgePosition, badgeVariant, buttonColor, buttonType, buttonVariant, calendarCompact, calendarView, chipColor, chipSize, chipTemplateContext, chipVariant, color, confirmActionsAlign, confirmButton, confirmSize, controlSize, dateTimePickerMode, dialogFooterAlign, dialogSize, dividerContentPosition, dividerOrientation, dividerVariant, drawerSide, drawerSize, errorTrigger, fileInputDragState, fileInputVariant, iconRegistry, iconRenderer, imageCompareOrientation, labelPosition, loaderSize, menuItemType, menuPosition, orientation, overlayArrowAlignment, overlayArrowSide, overlayPosition, paginationItem, pinInputType, progressActiveSegment, progressColor, radius, radiusValue, ratingColor, resolvedConfirmButton, size, sliderColor, splitterOrientation, stepperColor, stepperLabelPosition, stepperOrientation, stepperValue, switchColor, systemIcon, tabValue, tableColumnAlignment, tabsHeaderAlign, tabsHeaderPosition, tabsItemsAlign, tabsOrientation, tabsVariant, textareaResize, tlsUiConfigProvider, toastAction, toastColor, toastPosition, toastSeverity, toastStacking, toggleButtonColor, toggleButtonVariant, toggleGroupVariant, tooltipColor, tooltipOrigin, tooltipPosition };
4280
+ export type { ActivityHeatmapConfig, ActivityHeatmapDay, ActivityHeatmapEntry, ActivityHeatmapLabels, ActivityHeatmapMonth, ActivityHeatmapRow, ActivityHeatmapTotal, AlertConfig, AutocompleteConfig, BadgeConfig, BreadcrumbItem, BreadcrumbItemContext, BreadcrumbsConfig, ButtonConfig, CalendarConfig, CalendarDayContext, CalendarEvent, CalendarEventContext, CalendarLabels, CalendarRange, CheckboxConfig, ChipConfig, ChipContext, ChipControlConfig, ChipGroupConfig, ChipInputConfig, ConfirmConfig, ConfirmOptions, DateTimePickerConfig, DialogConfig, DialogOpenConfig, DividerConfig, DrawerConfig, DrawerOpenConfig, FileInputConfig, FileInputDropZoneContext, FileInputFileContext, FormControlConfig, FormControlGroupConfig, FormItemConfig, HighlightConfig, HighlightSegment, IconConfig, ImageCompareConfig, InputConfig, InputNumberConfig, KbdConfig, LoaderConfig, MarkConfig, MaskResult, MenuActionItem, MenuConfig, MenuCustomItem, MenuDivider, MenuItemDefinition, MenuLabel, MultiSelectConfig, OdometerConfig, OdometerToken, OverlayArrowPosition, PaginationConfig, PaginationLabels, PaginationQuerySyncConfig, PasswordConfig, PinInputConfig, PopoverConfig, ProgressConfig, RadioButtonConfig, RatingConfig, RatingLabels, RatingStarContext, SelectConfig, SkeletonConfig, SliderConfig, SplitterConfig, StepConfig, StepperConfig, StepperLabels, StepperSelectEvent, SwitchConfig, TabNavConfig, TableColumnDefinition, TableConfig, TableData, TableTrackBy, TabsConfig, TabsQuerySyncConfig, TextareaConfig, ToastConfig, ToastOptions, ToastRef, ToastState, ToggleButtonConfig, ToggleGroupConfig, TooltipConfig, TrackBy, VirtualScrollConfig, VirtualScrollContext, acceptInput, alertColor, autocompleteFilterMode, badgeColor, badgePosition, badgeVariant, buttonColor, buttonType, buttonVariant, calendarCompact, calendarView, chipColor, chipSize, chipTemplateContext, chipVariant, color, confirmActionsAlign, confirmButton, confirmSize, controlSize, dateTimePickerMode, dialogFooterAlign, dialogSize, dividerContentPosition, dividerOrientation, dividerVariant, drawerSide, drawerSize, errorTrigger, fileInputDragState, fileInputVariant, iconRegistry, iconRenderer, imageCompareOrientation, labelPosition, loaderSize, menuItemType, menuPosition, orientation, overlayArrowAlignment, overlayArrowSide, overlayPosition, paginationItem, pinInputType, progressActiveSegment, progressColor, radius, radiusValue, ratingColor, resolvedConfirmButton, size, sliderColor, splitterOrientation, stepperColor, stepperLabelPosition, stepperOrientation, stepperValue, switchColor, systemIcon, tabValue, tableColumnAlignment, tableColumnCollapse, tabsHeaderAlign, tabsHeaderPosition, tabsItemsAlign, tabsOrientation, tabsVariant, textareaResize, tlsUiConfigProvider, toastAction, toastColor, toastPosition, toastSeverity, toastStacking, toggleButtonColor, toggleButtonVariant, toggleGroupVariant, tooltipColor, tooltipOrigin, tooltipPosition };