@sdcorejs/angular 20.2.4 → 20.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.
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,58 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnInit, OnDestroy, Signal } from '@angular/core';
3
+ import { Color } from '@sdcorejs/utils/models';
4
+
5
+ declare class SdCard<T = unknown> implements OnInit, OnDestroy {
6
+ #private;
7
+ /** Required non-null value used by the nearest group selection model. */
8
+ readonly value: _angular_core.InputSignal<NonNullable<T>>;
9
+ /** Whether this card is disabled independently of its group. */
10
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
11
+ /** Stable suffix used by the Core UI inspector and end-to-end selectors. */
12
+ readonly autoId: _angular_core.InputSignal<string | null | undefined>;
13
+ /** Optional semantic color override; otherwise the nearest group or Core UI default is used. */
14
+ readonly color: _angular_core.InputSignalWithTransform<Color | undefined, Color | null | undefined>;
15
+ /** Emits the accepted native `Event` after selection state has been updated. */
16
+ readonly click: _angular_core.OutputEmitterRef<Event>;
17
+ /** Read-only reactive selection state; grouped cards derive it exclusively from the group model. */
18
+ readonly selected: Signal<boolean>;
19
+ protected readonly effectiveDisabled: Signal<boolean>;
20
+ protected readonly effectiveColor: Signal<Color>;
21
+ protected readonly resolvedAutoId: Signal<string | undefined>;
22
+ constructor();
23
+ ngOnInit(): void;
24
+ protected onKeydown(event: KeyboardEvent): void;
25
+ ngOnDestroy(): void;
26
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdCard<any>, never>;
27
+ static ɵcmp: _angular_core.ɵɵ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>;
28
+ }
29
+
30
+ /** Compares a model item with a card value for selection. */
31
+ type SdCardCompareWith<T> = (modelValue: T, cardValue: T) => boolean;
32
+ /** Owns single or multiple selection state for descendant `SdCard` instances. */
33
+ declare class SdCardGroup<T = unknown> {
34
+ /** Selected value, selected values, or `null` when there is no selection. */
35
+ readonly model: _angular_core.ModelSignal<T | T[] | null>;
36
+ /** Whether more than one card can be selected. Bare attributes coerce to `true`. */
37
+ readonly multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
38
+ /** Whether every descendant card is effectively disabled. */
39
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
40
+ /** Stable suffix used by the Core UI inspector and end-to-end selectors. */
41
+ readonly autoId: _angular_core.InputSignal<string | null | undefined>;
42
+ /** Default semantic color inherited by descendant cards. */
43
+ readonly color: _angular_core.InputSignalWithTransform<Color, Color | null | undefined>;
44
+ /** Equality used for both selection lookup and immutable removal. */
45
+ readonly compareWith: _angular_core.InputSignal<SdCardCompareWith<T>>;
46
+ /** Emits only after an accepted user activation changes `model`. */
47
+ readonly sdChange: _angular_core.OutputEmitterRef<T | T[] | null>;
48
+ protected readonly resolvedAutoId: _angular_core.Signal<string | undefined>;
49
+ /** Returns whether `value` is selected under the current mode and comparator. */
50
+ isSelected(value: T): boolean;
51
+ /** Applies one accepted card activation and emits the resulting model when it changes. */
52
+ toggle(value: T): void;
53
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdCardGroup<any>, never>;
54
+ static ɵcmp: _angular_core.ɵɵ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>;
55
+ }
56
+
57
+ export { SdCard, SdCardGroup };
58
+ export type { SdCardCompareWith };
@@ -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';
@@ -6,6 +6,7 @@ type SdModalBeforeClose = () => boolean | Promise<boolean>;
6
6
  declare class SdModal implements OnDestroy {
7
7
  #private;
8
8
  static index: _angular_core.WritableSignal<number>;
9
+ protected readonly titleId: string;
9
10
  templateRef: _angular_core.Signal<TemplateRef<any>>;
10
11
  modal: _angular_core.Signal<ElementRef<any> | undefined>;
11
12
  readonly autoIdInput: _angular_core.InputSignal<string | null | undefined>;
@@ -1,12 +1,14 @@
1
- import * as i0 from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
2
2
 
3
3
  declare class SdQuickAction {
4
4
  /**
5
5
  * Toggle visibility of the floating toolbar. Bare attribute = true.
6
6
  */
7
- readonly opened: i0.InputSignalWithTransform<boolean, unknown>;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<SdQuickAction, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<SdQuickAction, "sd-quick-action", never, { "opened": { "alias": "opened"; "required": false; "isSignal": true; }; }, {}, never, ["[sdMessage]", "[sdAction]"], true, never>;
7
+ readonly opened: _angular_core.InputSignalWithTransform<boolean, unknown>;
8
+ /** Keep the toolbar in its owner's layout (for a sticky table footer or a drawer). */
9
+ readonly contained: _angular_core.InputSignalWithTransform<boolean, unknown>;
10
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdQuickAction, never>;
11
+ static ɵcmp: _angular_core.ɵɵ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>;
10
12
  }
11
13
 
12
14
  export { SdQuickAction };