@mozaic-ds/angular 2.0.67 → 2.1.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": "@mozaic-ds/angular",
3
- "version": "2.0.67",
3
+ "version": "2.1.3",
4
4
  "type": "module",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=20.3.15",
@@ -12,6 +12,10 @@
12
12
  "@mozaic-ds/icons-angular": "^0.17.0"
13
13
  },
14
14
  "sideEffects": false,
15
+ "publishConfig": {
16
+ "registry": "https://registry.npmjs.org/",
17
+ "access": "public"
18
+ },
15
19
  "repository": {
16
20
  "type": "git",
17
21
  "url": "https://github.com/adeo/mozaic-angular.git"
@@ -3,7 +3,7 @@ import { TemplateRef, OnInit, ElementRef, InjectionToken, Type, AfterViewInit, O
3
3
  import { ControlValueAccessor } from '@angular/forms';
4
4
  import { CheckCircle32, Uploading32, WarningCircle32 } from '@mozaic-ds/icons-angular';
5
5
  import { RouterLink } from '@angular/router';
6
- import { OverlayRef, ConnectedPosition } from '@angular/cdk/overlay';
6
+ import { OverlayRef, ScrollStrategy, ConnectedPosition } from '@angular/cdk/overlay';
7
7
  import * as rxjs from 'rxjs';
8
8
  import { Observable } from 'rxjs';
9
9
  import { CdkPortalOutlet } from '@angular/cdk/portal';
@@ -2315,6 +2315,19 @@ declare function isFlatOption<T>(item: FlatItem<T>): item is FlatOption<T>;
2315
2315
 
2316
2316
  declare class MozComboboxComponent<T = string> implements ControlValueAccessor {
2317
2317
  private readonly _doc;
2318
+ private readonly _overlay;
2319
+ private readonly _appRef;
2320
+ /** rAF handle for the scroll-driven change-detection loop (see _kickViewportTick). */
2321
+ private _viewportTickRaf;
2322
+ /** Timestamp of the last viewport scroll event, used to stop the tick loop when idle. */
2323
+ private _lastViewportScrollTs;
2324
+ /**
2325
+ * No-op scroll strategy: the dropdown embeds a CDK virtual-scroll viewport,
2326
+ * which is a global `CdkScrollable`. With the default `reposition` strategy,
2327
+ * every internal scroll event repositions the overlay, making the panel
2328
+ * "bounce" and preventing the user from reaching the bottom of long lists.
2329
+ */
2330
+ readonly scrollStrategy: ScrollStrategy;
2318
2331
  /** Items to display (flat options or sections) */
2319
2332
  readonly items: _angular_core.InputSignal<MozComboboxItem<T>[]>;
2320
2333
  /** Currently selected value(s) — two-way binding with model() */
@@ -2344,6 +2357,16 @@ declare class MozComboboxComponent<T = string> implements ControlValueAccessor {
2344
2357
  * so users can search for multi-word labels like "Item 1".
2345
2358
  */
2346
2359
  readonly multiSearch: _angular_core.InputSignal<boolean>;
2360
+ /**
2361
+ * Server-side search mode. When `true`, the dropdown no longer filters
2362
+ * `items` locally on the label — it renders exactly what the parent provides.
2363
+ * Use it for async autocomplete: subscribe to `(searched)`, fetch matching
2364
+ * items from the backend and feed them back through `items`. This lets the
2365
+ * search match fields that are not part of the visible label (e.g. an id
2366
+ * shown only as secondary `content`). Has no effect when `searchable` is
2367
+ * `false`.
2368
+ */
2369
+ readonly serverSide: _angular_core.InputSignal<boolean>;
2347
2370
  /** Show "Select all / Clear" action buttons (multiple only) */
2348
2371
  readonly showActions: _angular_core.InputSignal<boolean>;
2349
2372
  /** Whether the component is in a loading state (e.g. async data) */
@@ -2446,6 +2469,15 @@ declare class MozComboboxComponent<T = string> implements ControlValueAccessor {
2446
2469
  onSearchKeydown(event: KeyboardEvent): void;
2447
2470
  onOverlayOutsideClick(): void;
2448
2471
  onOverlayAttached(): void;
2472
+ /**
2473
+ * Drive change detection for a short window after a viewport scroll so the
2474
+ * CDK virtual-scroll viewport (inside the overlay portal) applies its content
2475
+ * transform in zoneless mode. Runs at most one rAF loop at a time; each new
2476
+ * scroll event extends the window, and the loop stops ~200ms after the last
2477
+ * scroll. `tick()` is guarded because it throws if called during an ongoing
2478
+ * change-detection pass (it never is here — rAF callbacks run outside CD).
2479
+ */
2480
+ private _kickViewportTick;
2449
2481
  /** Coerce the current value into an array (safe for .some/.filter/.every). */
2450
2482
  private _currentValueAsArray;
2451
2483
  writeValue(val: T | T[] | null): void;
@@ -2462,7 +2494,7 @@ declare class MozComboboxComponent<T = string> implements ControlValueAccessor {
2462
2494
  isOptionSelected(optionValue: T): boolean;
2463
2495
  private _updateTriggerWidth;
2464
2496
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MozComboboxComponent<any>, never>;
2465
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MozComboboxComponent<any>, "moz-combobox", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "multiSearch": { "alias": "multiSearch"; "required": false; "isSignal": true; }; "showActions": { "alias": "showActions"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "canSelectAll": { "alias": "canSelectAll"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "noResultsText": { "alias": "noResultsText"; "required": false; "isSignal": true; }; "selectAllText": { "alias": "selectAllText"; "required": false; "isSignal": true; }; "clearText": { "alias": "clearText"; "required": false; "isSignal": true; }; "selectedSuffix": { "alias": "selectedSuffix"; "required": false; "isSignal": true; }; "clearAriaLabel": { "alias": "clearAriaLabel"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "showNoResultText": { "alias": "showNoResultText"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "opened": "opened"; "closed": "closed"; "searched": "searched"; }, never, never, true, never>;
2497
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MozComboboxComponent<any>, "moz-combobox", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "multiSearch": { "alias": "multiSearch"; "required": false; "isSignal": true; }; "serverSide": { "alias": "serverSide"; "required": false; "isSignal": true; }; "showActions": { "alias": "showActions"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "canSelectAll": { "alias": "canSelectAll"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "noResultsText": { "alias": "noResultsText"; "required": false; "isSignal": true; }; "selectAllText": { "alias": "selectAllText"; "required": false; "isSignal": true; }; "clearText": { "alias": "clearText"; "required": false; "isSignal": true; }; "selectedSuffix": { "alias": "selectedSuffix"; "required": false; "isSignal": true; }; "clearAriaLabel": { "alias": "clearAriaLabel"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "showNoResultText": { "alias": "showNoResultText"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "opened": "opened"; "closed": "closed"; "searched": "searched"; }, never, never, true, never>;
2466
2498
  }
2467
2499
 
2468
2500
  /**