@sdcorejs/angular 19.2.3 → 19.2.5

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.
Files changed (44) hide show
  1. package/README.md +11 -9
  2. package/components/card/index.d.ts +2 -0
  3. package/components/card/src/card-group.component.d.ts +28 -0
  4. package/components/card/src/card.component.d.ts +27 -0
  5. package/components/card/src/card.constants.d.ts +2 -0
  6. package/components/index.d.ts +1 -0
  7. package/components/modal/src/modal.component.d.ts +1 -0
  8. package/components/quick-action/src/quick-action.component.d.ts +3 -1
  9. package/components/table/index.d.ts +1 -0
  10. package/components/table/src/components/command/pipes/filter.pipe.d.ts +4 -5
  11. package/components/table/src/components/mobile-cards/mobile-action.model.d.ts +17 -0
  12. package/components/table/src/components/mobile-cards/mobile-actions.component.d.ts +30 -0
  13. package/components/table/src/components/mobile-cards/mobile-cards.component.d.ts +52 -0
  14. package/components/table/src/directives/index.d.ts +1 -0
  15. package/components/table/src/directives/sd-table-row-mobile-def.directive.d.ts +20 -0
  16. package/components/table/src/models/table-item.model.d.ts +3 -0
  17. package/components/table/src/models/table-option.model.d.ts +5 -0
  18. package/components/table/src/services/table-local/table-local-sort.util.d.ts +3 -0
  19. package/components/table/src/services/table-selection/selection-action.util.d.ts +6 -0
  20. package/components/table/src/table.component.d.ts +27 -4
  21. package/fesm2022/sdcorejs-angular-components-card.mjs +178 -0
  22. package/fesm2022/sdcorejs-angular-components-card.mjs.map +1 -0
  23. package/fesm2022/sdcorejs-angular-components-modal.mjs +16 -3
  24. package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
  25. package/fesm2022/sdcorejs-angular-components-quick-action.mjs +4 -2
  26. package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
  27. package/fesm2022/sdcorejs-angular-components-table.mjs +1442 -912
  28. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  29. package/fesm2022/sdcorejs-angular-components-tree.mjs +1 -1
  30. package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
  31. package/fesm2022/sdcorejs-angular-components.mjs +1 -0
  32. package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
  33. package/fesm2022/sdcorejs-angular-forms-date-range.mjs +2 -2
  34. package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
  35. package/fesm2022/sdcorejs-angular-forms-input-number.mjs +57 -7
  36. package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
  37. package/fesm2022/sdcorejs-angular-i18n.mjs +85 -0
  38. package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
  39. package/fesm2022/sdcorejs-angular-services-api.mjs +5 -0
  40. package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
  41. package/i18n/src/en.d.ts +17 -0
  42. package/package.json +11 -7
  43. package/components/table/src/pipes/selection-disabled.pipe.d.ts +0 -9
  44. package/components/table/src/pipes/selection-visible.pipe.d.ts +0 -9
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # @sdcorejs/angular
2
2
 
3
- Angular Material-based UI building blocks for data-heavy business applications. The package combines standalone components, consistent form controls, workflow primitives, application services, theming, and localization for Angular 19, 20, and 21.
3
+ Angular Material-based UI building blocks for data-heavy business applications. The package combines standalone components, consistent form controls, workflow primitives, application services, theming, and localization for Angular 19, 20, 21, and 22.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@sdcorejs/angular.svg)](https://www.npmjs.com/package/@sdcorejs/angular)
6
6
  [![monthly npm downloads](https://img.shields.io/npm/dm/@sdcorejs/angular.svg)](https://www.npmjs.com/package/@sdcorejs/angular)
7
- [![Angular 19, 20, and 21](https://img.shields.io/badge/Angular-19%20%7C%2020%20%7C%2021-DD0031?logo=angular&logoColor=white)](#compatibility)
7
+ [![Angular 19, 20, 21, and 22](https://img.shields.io/badge/Angular-19%20%7C%2020%20%7C%2021%20%7C%2022-DD0031?logo=angular&logoColor=white)](#compatibility)
8
8
  [![MIT license](https://img.shields.io/github/license/sdcorejs/sdcorejs-angular.svg)](https://github.com/sdcorejs/sdcorejs-angular/blob/main/LICENSE)
9
9
 
10
10
  [Showcase](https://sdcorejs.github.io/sdcorejs-angular/) · [Quick start](#quick-start) · [API manifest](https://sdcorejs.github.io/sdcorejs-angular/docs/latest/index.json) · [Source](https://github.com/sdcorejs/sdcorejs-angular) · [Changelog](https://github.com/sdcorejs/sdcorejs-angular/blob/main/CHANGELOG.md) · [Issues](https://github.com/sdcorejs/sdcorejs-angular/issues)
@@ -18,18 +18,20 @@ Install the package major that matches your Angular application.
18
18
  | 19.x | `@sdcorejs/angular@^19` | `npm install @sdcorejs/angular@^19 @angular/material@^19 @angular/material-date-fns-adapter@^19` |
19
19
  | 20.x | `@sdcorejs/angular@^20` | `npm install @sdcorejs/angular@^20 @angular/material@^20 @angular/material-date-fns-adapter@^20` |
20
20
  | 21.x | `@sdcorejs/angular@^21` | `npm install @sdcorejs/angular@^21 @angular/material@^21 @angular/material-date-fns-adapter@^21` |
21
+ | 22.x | `@sdcorejs/angular@^22` | `npm install @sdcorejs/angular@^22 @angular/material@^22 @angular/material-date-fns-adapter@^22` |
21
22
 
22
- The package manifests accept Angular 19–21 peers, while releases provide an Angular-aligned package line for each major. The first version number is reserved for Angular compatibility, so read the [changelog](https://github.com/sdcorejs/sdcorejs-angular/blob/main/CHANGELOG.md) for explicitly labeled breaking changes before upgrading.
23
+ The Angular 19–21 packages share one peer range, while the Angular 22 package accepts Angular 22 peers only. The first version number is reserved for Angular compatibility, so read the [changelog](https://github.com/sdcorejs/sdcorejs-angular/blob/main/CHANGELOG.md) for explicitly labeled breaking changes before upgrading. Angular 22 begins at `@sdcorejs/angular@22.2.5`; no earlier Angular 22 package version is implied.
23
24
 
24
25
  ### Peer dependencies
25
26
 
26
27
  The package declares these peers. A standard Angular CLI application already provides all of them except `@angular/material` and `@angular/material-date-fns-adapter`, which is why only those two appear in the install commands above.
27
28
 
28
- | Peer | Range |
29
- | --- | --- |
30
- | `@angular/animations` · `@angular/cdk` · `@angular/common` · `@angular/core` · `@angular/forms` · `@angular/platform-browser` · `@angular/router` | `^19.0.0 \|\| ^20.0.0 \|\| ^21.0.0` |
31
- | `@angular/material` · `@angular/material-date-fns-adapter` | `^19.0.0 \|\| ^20.0.0 \|\| ^21.0.0` |
32
- | `rxjs` | `^7.8.0` |
29
+ | Package line | Peer | Range |
30
+ | --- | --- | --- |
31
+ | `@sdcorejs/angular@^19`, `@sdcorejs/angular@^20`, `@sdcorejs/angular@^21` | `@angular/animations` · `@angular/cdk` · `@angular/common` · `@angular/core` · `@angular/forms` · `@angular/platform-browser` · `@angular/router` | `^19.0.0 \|\| ^20.0.0 \|\| ^21.0.0` |
32
+ | `@sdcorejs/angular@^19`, `@sdcorejs/angular@^20`, `@sdcorejs/angular@^21` | `@angular/material` · `@angular/material-date-fns-adapter` | `^19.0.0 \|\| ^20.0.0 \|\| ^21.0.0` |
33
+ | `@sdcorejs/angular@^22` | All Angular/CDK/Material peers listed above | `^22.0.0` |
34
+ | All maintained lines | `rxjs` | `^7.8.0` |
33
35
 
34
36
  ## Installation and setup
35
37
 
@@ -190,7 +192,7 @@ export const appConfig: ApplicationConfig = {
190
192
 
191
193
  ## Versioning
192
194
 
193
- - Use `@sdcorejs/angular@^19`, `@^20`, or `@^21` to match the application's Angular major.
195
+ - Use `@sdcorejs/angular@^19`, `@sdcorejs/angular@^20`, `@sdcorejs/angular@^21`, or `@sdcorejs/angular@^22` to match the application's Angular major.
194
196
  - Maintained package lines are released from the same feature surface with required Angular-major adaptations.
195
197
  - Consumer-breaking changes and migration notes are recorded in the [changelog](https://github.com/sdcorejs/sdcorejs-angular/blob/main/CHANGELOG.md).
196
198
  - Version-pinned reference docs remain available under `https://sdcorejs.github.io/sdcorejs-angular/docs/<package-version>/`.
@@ -0,0 +1,2 @@
1
+ export * from './src/card.component';
2
+ export * from './src/card-group.component';
@@ -0,0 +1,28 @@
1
+ import type { Color as SdColor } from '@sdcorejs/utils/models';
2
+ import * as i0 from "@angular/core";
3
+ /** Compares a model item with a card value for selection. */
4
+ export type SdCardCompareWith<T> = (modelValue: T, cardValue: T) => boolean;
5
+ /** Owns single or multiple selection state for descendant `SdCard` instances. */
6
+ export declare class SdCardGroup<T = unknown> {
7
+ /** Selected value, selected values, or `null` when there is no selection. */
8
+ readonly model: import("@angular/core").ModelSignal<T | T[] | null>;
9
+ /** Whether more than one card can be selected. Bare attributes coerce to `true`. */
10
+ readonly multiple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
11
+ /** Whether every descendant card is effectively disabled. */
12
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
13
+ /** Stable suffix used by the Core UI inspector and end-to-end selectors. */
14
+ readonly autoId: import("@angular/core").InputSignal<string | null | undefined>;
15
+ /** Default semantic color inherited by descendant cards. */
16
+ readonly color: import("@angular/core").InputSignalWithTransform<SdColor, SdColor | null | undefined>;
17
+ /** Equality used for both selection lookup and immutable removal. */
18
+ readonly compareWith: import("@angular/core").InputSignal<SdCardCompareWith<T>>;
19
+ /** Emits only after an accepted user activation changes `model`. */
20
+ readonly sdChange: import("@angular/core").OutputEmitterRef<T | T[] | null>;
21
+ protected readonly resolvedAutoId: import("@angular/core").Signal<string | undefined>;
22
+ /** Returns whether `value` is selected under the current mode and comparator. */
23
+ isSelected(value: T): boolean;
24
+ /** Applies one accepted card activation and emits the resulting model when it changes. */
25
+ toggle(value: T): void;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdCardGroup<any>, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<SdCardGroup<any>, "sd-card-group", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "sdChange": "sdChange"; }, never, ["*"], true, never>;
28
+ }
@@ -0,0 +1,27 @@
1
+ import { OnDestroy, OnInit, Signal } from '@angular/core';
2
+ import type { Color as SdColor } from '@sdcorejs/utils/models';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SdCard<T = unknown> implements OnInit, OnDestroy {
5
+ #private;
6
+ /** Required non-null value used by the nearest group selection model. */
7
+ readonly value: import("@angular/core").InputSignal<NonNullable<T>>;
8
+ /** Whether this card is disabled independently of its group. */
9
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
10
+ /** Stable suffix used by the Core UI inspector and end-to-end selectors. */
11
+ readonly autoId: import("@angular/core").InputSignal<string | null | undefined>;
12
+ /** Optional semantic color override; otherwise the nearest group or Core UI default is used. */
13
+ readonly color: import("@angular/core").InputSignalWithTransform<SdColor | undefined, SdColor | null | undefined>;
14
+ /** Emits the accepted native `Event` after selection state has been updated. */
15
+ readonly click: import("@angular/core").OutputEmitterRef<Event>;
16
+ /** Read-only reactive selection state; grouped cards derive it exclusively from the group model. */
17
+ readonly selected: Signal<boolean>;
18
+ protected readonly effectiveDisabled: Signal<boolean>;
19
+ protected readonly effectiveColor: Signal<SdColor>;
20
+ protected readonly resolvedAutoId: Signal<string | undefined>;
21
+ constructor();
22
+ ngOnInit(): void;
23
+ protected onKeydown(event: KeyboardEvent): void;
24
+ ngOnDestroy(): void;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdCard<any>, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<SdCard<any>, "sd-card", ["sdCard"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, { "click": "click"; }, never, ["*"], true, never>;
27
+ }
@@ -0,0 +1,2 @@
1
+ import type { Color as SdColor } from '@sdcorejs/utils/models';
2
+ export declare const SD_CARD_DEFAULT_COLOR: SdColor;
@@ -1,5 +1,6 @@
1
1
  export * from '@sdcorejs/angular/components/avatar';
2
2
  export * from '@sdcorejs/angular/components/button';
3
+ export * from '@sdcorejs/angular/components/card';
3
4
  export * from '@sdcorejs/angular/components/badge';
4
5
  export * from '@sdcorejs/angular/components/tab-router';
5
6
  export * from '@sdcorejs/angular/components/side-drawer';
@@ -5,6 +5,7 @@ export type SdModalBeforeClose = () => boolean | Promise<boolean>;
5
5
  export declare class SdModal implements OnDestroy {
6
6
  #private;
7
7
  static index: import("@angular/core").WritableSignal<number>;
8
+ protected readonly titleId: string;
8
9
  templateRef: import("@angular/core").Signal<TemplateRef<any>>;
9
10
  modal: import("@angular/core").Signal<ElementRef<any> | undefined>;
10
11
  readonly autoIdInput: import("@angular/core").InputSignal<string | null | undefined>;
@@ -4,6 +4,8 @@ export declare class SdQuickAction {
4
4
  * Toggle visibility of the floating toolbar. Bare attribute = true.
5
5
  */
6
6
  readonly opened: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
7
+ /** Keep the toolbar in its owner's layout (for a sticky table footer or a drawer). */
8
+ readonly contained: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
7
9
  static ɵfac: i0.ɵɵFactoryDeclaration<SdQuickAction, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<SdQuickAction, "sd-quick-action", never, { "opened": { "alias": "opened"; "required": false; "isSignal": true; }; }, {}, never, ["[sdMessage]", "[sdAction]"], true, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<SdQuickAction, "sd-quick-action", never, { "opened": { "alias": "opened"; "required": false; "isSignal": true; }; "contained": { "alias": "contained"; "required": false; "isSignal": true; }; }, {}, never, ["[sdMessage]", "[sdAction]"], true, never>;
9
11
  }
@@ -1,4 +1,5 @@
1
1
  export * from './src/directives/sd-table-cell-def.directive';
2
+ export * from './src/directives/sd-table-row-mobile-def.directive';
2
3
  export * from './src/directives/sd-table-command-header-def.directive';
3
4
  export * from './src/directives/sd-table-expand-def.directive';
4
5
  export * from './src/directives/sd-table-filter-def.directive';
@@ -6,23 +6,22 @@ import * as i0 from "@angular/core";
6
6
  * Filters visible commands and pre-resolves icon, title, and stable key for the current row.
7
7
  */
8
8
  export declare class CommandFilterPipe implements PipeTransform {
9
- #private;
10
9
  transform(item: SdTableItem, commands: SdTableCommand[]): Promise<Command[]>;
11
10
  static ɵfac: i0.ɵɵFactoryDeclaration<CommandFilterPipe, never>;
12
11
  static ɵpipe: i0.ɵɵPipeDeclaration<CommandFilterPipe, "filter", true>;
13
12
  }
14
- type Command<T = any> = CommandNormal<T> | CommandChildren<T>;
15
- interface CommandNormal<T = any> extends SdTableCommandNormal<T> {
13
+ export declare function sdResolveTableCommands<T>(item: SdTableItem<T>, commands: SdTableCommand<T>[]): Promise<Command<T>[]>;
14
+ export type Command<T = any> = CommandNormal<T> | CommandChildren<T>;
15
+ export interface CommandNormal<T = any> extends SdTableCommandNormal<T> {
16
16
  type: 'normal';
17
17
  key: string;
18
18
  title: string;
19
19
  icon: string;
20
20
  }
21
- interface CommandChildren<T = any> extends SdTableCommandChildren<T> {
21
+ export interface CommandChildren<T = any> extends SdTableCommandChildren<T> {
22
22
  type: 'children';
23
23
  key: string;
24
24
  title: string;
25
25
  icon: string;
26
26
  children: CommandNormal<T>[];
27
27
  }
28
- export {};
@@ -0,0 +1,17 @@
1
+ import type { SdIconSet } from '@sdcorejs/angular/modules/icon';
2
+ import type { SdButton, SdButtonColor } from '@sdcorejs/angular/components/button';
3
+ import type { SdUnwrapSignal } from '@sdcorejs/angular/utilities/models';
4
+ /** Internal presentation only; closures keep row and selection callbacks distinct. */
5
+ export interface SdTableMobileAction {
6
+ key: string;
7
+ title: string;
8
+ icon?: string;
9
+ fontSet?: SdIconSet;
10
+ color?: SdButtonColor;
11
+ type?: SdUnwrapSignal<SdButton['type']>;
12
+ disabled?: boolean;
13
+ htmlTemplate?: string;
14
+ children?: SdTableMobileAction[];
15
+ closeBeforeRun?: boolean;
16
+ run?: () => unknown;
17
+ }
@@ -0,0 +1,30 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { SdModal } from '@sdcorejs/angular/components/modal';
3
+ import { SdTableMobileAction } from './mobile-action.model';
4
+ import * as i0 from "@angular/core";
5
+ export declare class SdTableMobileActionsComponent implements OnDestroy {
6
+ #private;
7
+ readonly actions: import("@angular/core").InputSignal<SdTableMobileAction[]>;
8
+ readonly title: import("@angular/core").InputSignal<string>;
9
+ readonly selection: import("@angular/core").InputSignal<boolean>;
10
+ readonly count: import("@angular/core").InputSignal<number>;
11
+ readonly autoOpen: import("@angular/core").InputSignal<boolean>;
12
+ readonly autoId: import("@angular/core").InputSignal<string | undefined>;
13
+ readonly end: import("@angular/core").OutputEmitterRef<void>;
14
+ readonly busy: import("@angular/core").WritableSignal<boolean>;
15
+ readonly error: import("@angular/core").WritableSignal<string>;
16
+ readonly sheet: import("@angular/core").Signal<SdModal | undefined>;
17
+ readonly sheetOpen: import("@angular/core").Signal<boolean>;
18
+ readonly direct: import("@angular/core").Signal<SdTableMobileAction[]>;
19
+ readonly overflow: import("@angular/core").Signal<SdTableMobileAction[]>;
20
+ readonly sheetActions: import("@angular/core").Signal<SdTableMobileAction[]>;
21
+ constructor();
22
+ openMore(): void;
23
+ closeSheet(): void;
24
+ onSheetClosed(): void;
25
+ runSheet(action: SdTableMobileAction): Promise<void>;
26
+ run(action: SdTableMobileAction): Promise<void>;
27
+ ngOnDestroy(): void;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdTableMobileActionsComponent, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<SdTableMobileActionsComponent, "sd-table-mobile-actions", never, { "actions": { "alias": "actions"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; "autoOpen": { "alias": "autoOpen"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; }, { "end": "end"; }, never, never, true, never>;
30
+ }
@@ -0,0 +1,52 @@
1
+ import { OnDestroy, TemplateRef } from '@angular/core';
2
+ import type { SdTable } from '../../table.component';
3
+ import type { SdTableItem } from '../../models/table-item.model';
4
+ import type { SdTableRowMobileDefContext } from '../../directives/sd-table-row-mobile-def.directive';
5
+ import { Command } from '../command/pipes/filter.pipe';
6
+ import { SdTableMobileAction } from './mobile-action.model';
7
+ import * as i0 from "@angular/core";
8
+ interface Card<T> {
9
+ row: SdTableItem<T>;
10
+ context: SdTableRowMobileDefContext<T>;
11
+ label: string;
12
+ selectLabel: string;
13
+ commandLabel: string;
14
+ expandLabel: string;
15
+ treeLabel: string;
16
+ reorderDisabled: boolean;
17
+ expandDisabled: boolean;
18
+ }
19
+ export declare class SdTableMobileCardsComponent<T = unknown> implements OnDestroy {
20
+ #private;
21
+ readonly table: import("@angular/core").InputSignal<SdTable<T>>;
22
+ readonly rows: import("@angular/core").InputSignal<SdTableItem<T>[]>;
23
+ readonly groupTemplate: import("@angular/core").InputSignal<TemplateRef<{
24
+ item: SdTableItem<T>;
25
+ }>>;
26
+ readonly containerOpen: import("@angular/core").Signal<boolean>;
27
+ readonly option: import("@angular/core").Signal<import("@sdcorejs/angular/components/table").SdTableOption<T>>;
28
+ readonly selected: import("@angular/core").Signal<SdTableItem<T>[]>;
29
+ readonly selectionMode: import("@angular/core").Signal<boolean>;
30
+ readonly active: import("@angular/core").WritableSignal<Card<T> | undefined>;
31
+ readonly resolvedCommands: import("@angular/core").WritableSignal<Map<SdTableItem<T>, Command<T>[]>>;
32
+ readonly cards: import("@angular/core").Signal<Card<T>[]>;
33
+ readonly selectionSummary: import("@angular/core").Signal<string>;
34
+ readonly activeCommands: import("@angular/core").Signal<Command<T>[] | undefined>;
35
+ readonly actions: import("@angular/core").Signal<SdTableMobileAction[]>;
36
+ readonly actionTitle: import("@angular/core").Signal<string>;
37
+ constructor();
38
+ select(card: Card<T>): void;
39
+ openCommand(card: Card<T>, event: Event): void;
40
+ closeCommand(restoreFocus?: boolean): void;
41
+ endActions(): void;
42
+ onCardClick(card: Card<T>, event: MouseEvent): void;
43
+ onCardKey(card: Card<T>, event: KeyboardEvent): void;
44
+ pointerStart(event: PointerEvent): void;
45
+ pointerMove(event: PointerEvent): void;
46
+ cancelPointer(): void;
47
+ dragStart(): void;
48
+ ngOnDestroy(): void;
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdTableMobileCardsComponent<any>, never>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<SdTableMobileCardsComponent<any>, "sd-table-mobile-cards", never, { "table": { "alias": "table"; "required": true; "isSignal": true; }; "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "groupTemplate": { "alias": "groupTemplate"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
51
+ }
52
+ export {};
@@ -2,6 +2,7 @@ export * from './sd-table-column-filter-def.directive';
2
2
  export * from './sticky-shadow.directive';
3
3
  export * from './sd-table-title-def.directive';
4
4
  export * from './sd-table-cell-def.directive';
5
+ export * from './sd-table-row-mobile-def.directive';
5
6
  export * from './sd-table-command-header-def.directive';
6
7
  export * from './sd-table-group-def.directive';
7
8
  export * from './sd-column-resize.directive';
@@ -0,0 +1,20 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import type { SdTableOption } from '../models/table-option.model';
3
+ import * as i0 from "@angular/core";
4
+ /** Named context for the consumer-owned body of a mobile card. */
5
+ export interface SdTableRowMobileDefContext<T = any> {
6
+ item: T;
7
+ /** Zero-based data-row position on the current page, excluding group/expand rows. */
8
+ index: number;
9
+ selected: boolean;
10
+ selectionDisabled: boolean;
11
+ autoId: string | undefined;
12
+ }
13
+ export declare class SdTableRowMobileDefDirective<T = any> {
14
+ /** Optional type witness: bind the typed table option for strict row inference. */
15
+ readonly sdTableRowMobileDef: import("@angular/core").InputSignal<"" | SdTableOption<T>>;
16
+ readonly templateRef: TemplateRef<SdTableRowMobileDefContext<T>>;
17
+ static ngTemplateContextGuard<T>(_directive: SdTableRowMobileDefDirective<T>, context: unknown): context is SdTableRowMobileDefContext<T>;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdTableRowMobileDefDirective<any>, never>;
19
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SdTableRowMobileDefDirective<any>, "ng-template[sdTableRowMobileDef]", never, { "sdTableRowMobileDef": { "alias": "sdTableRowMobileDef"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
20
+ }
@@ -3,6 +3,9 @@ import { SdUnwrapSignal } from '@sdcorejs/angular/utilities/models';
3
3
  import type { SdTableGroupDefContext } from '../directives/sd-table-group-def.directive';
4
4
  export interface SdTableMetaSelector {
5
5
  selectable?: boolean;
6
+ /** Prepared by the shared selection pipeline, before either row renderer runs. */
7
+ visible?: boolean;
8
+ disabled?: boolean;
6
9
  isSelected?: boolean;
7
10
  actions?: string[];
8
11
  }
@@ -32,6 +32,11 @@ interface SdTableBaseOption<T = any> {
32
32
  * cần autoId theo dòng ổn định cho E2E.
33
33
  */
34
34
  rowKey?: string;
35
+ /** Mobile cards activate automatically when sdTableRowMobileDef is projected. */
36
+ mobile?: {
37
+ /** Row command title and accessible labels; falls back to rowKey, then row number. */
38
+ rowLabel?: (row: T) => string;
39
+ };
35
40
  /**
36
41
  * Cấu hình hiển thị/phục hồi config của table.
37
42
  * Xem thêm kiểu chi tiết tại `TableOptionConfig`.
@@ -0,0 +1,3 @@
1
+ import type { SdTableColumn } from '../../models/table-column.model';
2
+ /** Internal local-sort comparison; intentionally not exported from the table entry point. */
3
+ export declare const compareLocalValues: (a: unknown, b: unknown, type: SdTableColumn["type"], direction: "ASC" | "DESC") => number;
@@ -22,3 +22,9 @@ export declare const collectRowActionKeys: <T>(rowData: SdTableItem<T>, selectio
22
22
  * pipe nào chạy trước → quyết định được ngay trong pass hiện tại, không cần timer.
23
23
  */
24
24
  export declare const resolveSelectAllVisible: <T>(items: SdTableItem<T>[], selection: SdTableOptionSelector | undefined) => boolean;
25
+ /** Same grouped-action visibility contract for both renderers and the legacy pipe. */
26
+ export declare function prepareRowSelectionVisibility<T>(row: SdTableItem<T>, selection?: SdTableOptionSelector<T>): boolean;
27
+ /** A selected row remains removable even if its eligibility changed after a reload. */
28
+ export declare function resolveRowSelectionDisabled<T>(selected: SdTableItem<T>[], row: SdTableItem<T>, selection?: SdTableOptionSelector<T>): boolean;
29
+ /** Prepare ALL action keys first so no row depends on another cell's rendering order. */
30
+ export declare function prepareTableSelection<T>(rows: SdTableItem<T>[], selected: SdTableItem<T>[], selection?: SdTableOptionSelector<T>): void;
@@ -1,6 +1,6 @@
1
1
  import { AfterViewInit, OnDestroy } from '@angular/core';
2
2
  import { MatPaginator, MatPaginatorIntl } from '@angular/material/paginator';
3
- import { MatSort } from '@angular/material/sort';
3
+ import { MatSort, SortDirection } from '@angular/material/sort';
4
4
  import { MatTable } from '@angular/material/table';
5
5
  import { SdExcelColumn } from '@sdcorejs/angular/services';
6
6
  import { SdTableCellDefDirective } from './directives/sd-table-cell-def.directive';
@@ -10,6 +10,8 @@ import { SdTableFilterDefDirective } from './directives/sd-table-filter-def.dire
10
10
  import { SdMaterialFooterDefDirective } from './directives/sd-table-footer-def.directive';
11
11
  import { SdTableTitleDefDirective } from './directives/sd-table-title-def.directive';
12
12
  import { SdTableCommandHeaderDefDirective } from './directives/sd-table-command-header-def.directive';
13
+ import { SdTableRowMobileDefDirective } from './directives/sd-table-row-mobile-def.directive';
14
+ import { SdTableMobileAction } from './components/mobile-cards/mobile-action.model';
13
15
  import { SdTableColumn } from './models/table-column.model';
14
16
  import { SdTableCommand } from './models/table-command.model';
15
17
  import { SdTableOption } from './models/table-option.model';
@@ -59,9 +61,14 @@ export declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
59
61
  sdFooterDefs: import("@angular/core").Signal<readonly SdMaterialFooterDefDirective<any>[]>;
60
62
  sdFilterDefs: import("@angular/core").Signal<readonly SdTableFilterDefDirective[]>;
61
63
  sdTitleDefs: import("@angular/core").Signal<readonly SdTableTitleDefDirective<any>[]>;
64
+ readonly sdRowMobileDef: import("@angular/core").Signal<SdTableRowMobileDefDirective<T> | undefined>;
65
+ readonly isMobile: import("@angular/core").Signal<boolean>;
66
+ readonly mobileCards: import("@angular/core").Signal<boolean>;
62
67
  cellDef: import("@angular/core").Signal<Record<string, SdTableCellDefDirective<any>>>;
63
68
  footerDef: import("@angular/core").Signal<Record<string, SdMaterialFooterDefDirective<any>>>;
64
69
  hasFooter: import("@angular/core").Signal<boolean>;
70
+ readonly mobileColumns: import("@angular/core").Signal<SdTableColumn[]>;
71
+ readonly mobileFooterColumns: import("@angular/core").Signal<SdTableColumn[]>;
65
72
  titleDef: import("@angular/core").Signal<Record<string, SdTableTitleDefDirective<any>>>;
66
73
  tableOption: import("@angular/core").WritableSignal<SdTableOption<T> | undefined>;
67
74
  configuration: import("@angular/core").WritableSignal<ConfiguredTableResult | undefined>;
@@ -69,7 +76,21 @@ export declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
69
76
  selectedTableItems: import("@angular/core").WritableSignal<SdTableItem<T>[]>;
70
77
  total: import("@angular/core").WritableSignal<number | undefined>;
71
78
  loading: import("@angular/core").WritableSignal<boolean>;
79
+ loadError: import("@angular/core").WritableSignal<boolean>;
72
80
  isSelectAll: import("@angular/core").WritableSignal<boolean>;
81
+ isSelectIndeterminate: import("@angular/core").WritableSignal<boolean>;
82
+ readonly sortState: import("@angular/core").WritableSignal<{
83
+ active: string;
84
+ direction: SortDirection;
85
+ }>;
86
+ readonly mobileSortColumns: import("@angular/core").Signal<{
87
+ field: string;
88
+ title: string;
89
+ direction: SortDirection;
90
+ }[]>;
91
+ readonly mobileToolsActions: import("@angular/core").Signal<SdTableMobileAction[]>;
92
+ readonly pageRevision: import("@angular/core").WritableSignal<number>;
93
+ readonly dataRevision: import("@angular/core").WritableSignal<number>;
73
94
  /**
74
95
  * Checkbox "chọn tất cả" ở header có hiển thị không.
75
96
  *
@@ -97,6 +118,7 @@ export declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
97
118
  columnFilter?: NonNullable<TableFilterValue['columnFilter']>;
98
119
  cacheValues: Record<string, unknown[]>;
99
120
  treeRevision: import("@angular/core").WritableSignal<number>;
121
+ readonly expandRevision: import("@angular/core").WritableSignal<number>;
100
122
  exporting: import("@angular/core").WritableSignal<boolean>;
101
123
  exportTitle: import("@angular/core").Signal<string>;
102
124
  tableConfiguration: ISdTableConfiguration | null;
@@ -111,10 +133,10 @@ export declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
111
133
  onTreeToggle: (row: SdTableItem<T>) => Promise<void>;
112
134
  onFilterChange: () => void;
113
135
  onFilterCommit: () => void;
114
- onExpand: (rowData: SdTableItem<T>) => Promise<void>;
136
+ onExpand: (row: SdTableItem<T>) => Promise<void>;
115
137
  onSelect: (rowData: SdTableItem<T>) => void;
116
138
  onSelectAll: () => void;
117
- onClearSelection: (items?: SdTableItem<T>[]) => void;
139
+ onClearSelection: (_items?: SdTableItem<T>[]) => void;
118
140
  /** true nếu MỌI selectable child trong group đều selected. Group rỗng (không child) → false. */
119
141
  isGroupAllSelected: (header: SdTableItem<T>) => boolean;
120
142
  /** true nếu CÓ MỘT VÀI selectable child selected nhưng KHÔNG phải tất cả. */
@@ -167,6 +189,7 @@ export declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
167
189
  get selectedItems(): T[];
168
190
  detectChanges: () => void;
169
191
  onColumnResize: (field: string, width: string) => void;
192
+ getSortAria: (field: string) => "none" | "ascending" | "descending";
170
193
  onOperatorChange: (column: SdTableColumn, operator: Operator | undefined) => void;
171
194
  trackBy: (index: number, item: SdTableItem) => string;
172
195
  pageOffset: import("@angular/core").Signal<number>;
@@ -174,5 +197,5 @@ export declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
174
197
  reorderSortPredicate: (index: number, drag: CdkDrag<SdTableItem<T>>, drop: CdkDropList<SdTableItem<T>[]>) => boolean;
175
198
  onReorderDrop(event: CdkDragDrop<SdTableItem<T>[]>): void;
176
199
  static ɵfac: i0.ɵɵFactoryDeclaration<SdTable<any>, never>;
177
- static ɵcmp: i0.ɵɵComponentDeclaration<SdTable<any>, "sd-table", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "option": { "alias": "option"; "required": true; "isSignal": true; }; }, {}, ["sdSubInformation", "sdGroupDef", "sdCellDefs", "sdCommandHeaderDef", "sdFooterDefs", "sdFilterDefs", "sdTitleDefs"], ["[sdTableTop]"], true, never>;
200
+ static ɵcmp: i0.ɵɵComponentDeclaration<SdTable<any>, "sd-table", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "option": { "alias": "option"; "required": true; "isSignal": true; }; }, {}, ["sdSubInformation", "sdGroupDef", "sdCellDefs", "sdCommandHeaderDef", "sdFooterDefs", "sdFilterDefs", "sdTitleDefs", "sdRowMobileDef"], ["[sdTableTop]"], true, never>;
178
201
  }