@angular/cdk 20.0.4 → 20.1.0-next.1
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/_adev_assets/cdk_drag_drop.json +100 -8
- package/_adev_assets/cdk_testing.json +634 -61
- package/dialog/index.d.ts +16 -12
- package/drag-drop/index.d.ts +30 -2
- package/fesm2022/a11y-module-DHa4AVFz.mjs.map +1 -1
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/activedescendant-key-manager-CZAE5aFC.mjs.map +1 -1
- package/fesm2022/array-I1yfCXUO.mjs.map +1 -1
- package/fesm2022/bidi.mjs.map +1 -1
- package/fesm2022/breakpoints-observer-QutrMj4x.mjs.map +1 -1
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.mjs.map +1 -1
- package/fesm2022/coercion/private.mjs.map +1 -1
- package/fesm2022/coercion.mjs.map +1 -1
- package/fesm2022/css-pixel-value-C_HEqLhI.mjs.map +1 -1
- package/fesm2022/data-source-D34wiQZj.mjs.map +1 -1
- package/fesm2022/dialog.mjs +21 -9
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/directionality-CChdj3az.mjs.map +1 -1
- package/fesm2022/dispose-view-repeater-strategy-Cvpav0PR.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +98 -24
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/element-x4z00URv.mjs.map +1 -1
- package/fesm2022/fake-event-detection-DWOdFTFz.mjs.map +1 -1
- package/fesm2022/focus-key-manager-CPmlyB_c.mjs.map +1 -1
- package/fesm2022/focus-monitor-DLjkiju1.mjs.map +1 -1
- package/fesm2022/id-generator-LuoRZSid.mjs.map +1 -1
- package/fesm2022/keycodes-CpHkExLC.mjs.map +1 -1
- package/fesm2022/keycodes.mjs.map +1 -1
- package/fesm2022/layout.mjs.map +1 -1
- package/fesm2022/list-key-manager-C7tp3RbG.mjs.map +1 -1
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +24 -30
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/observers/private.mjs.map +1 -1
- package/fesm2022/observers.mjs.map +1 -1
- package/fesm2022/overlay-module-Bd2UplUU.mjs.map +1 -1
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/passive-listeners-esHZRgIN.mjs.map +1 -1
- package/fesm2022/platform-DNDzkVcI.mjs.map +1 -1
- package/fesm2022/platform.mjs.map +1 -1
- package/fesm2022/portal.mjs.map +1 -1
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/recycle-view-repeater-strategy-SfuyU210.mjs.map +1 -1
- package/fesm2022/scrolling-BkvA05C8.mjs.map +1 -1
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/selection-model-BCgC8uEN.mjs.map +1 -1
- package/fesm2022/shadow-dom-B0oHn41l.mjs.map +1 -1
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/style-loader-B2sGQXxD.mjs.map +1 -1
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/test-environment-CT0XxPyp.mjs.map +1 -1
- package/fesm2022/testing/selenium-webdriver.mjs.map +1 -1
- package/fesm2022/testing/testbed.mjs.map +1 -1
- package/fesm2022/testing.mjs +50 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/text-field.mjs.map +1 -1
- package/fesm2022/tree-key-manager-KnCoIkIC.mjs.map +1 -1
- package/fesm2022/tree.mjs.map +1 -1
- package/fesm2022/typeahead-9ZW4Dtsf.mjs.map +1 -1
- package/fesm2022/unique-selection-dispatcher-Cewa_Eg3.mjs.map +1 -1
- package/{harness-environment.d-BbFzIFDE.d.ts → harness-environment.d-C-TBj7IN.d.ts} +52 -1
- package/menu/index.d.ts +14 -19
- package/package.json +3 -3
- package/schematics/ng-add/index.js +1 -1
- package/testing/index.d.ts +1 -1
- package/testing/selenium-webdriver/index.d.ts +1 -1
- package/testing/testbed/index.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeahead-9ZW4Dtsf.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"typeahead-9ZW4Dtsf.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/a11y/key-manager/typeahead.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {A, NINE, Z, ZERO} from '../../keycodes';\nimport {Subject, Observable} from 'rxjs';\nimport {debounceTime, filter, map, tap} from 'rxjs/operators';\n\nconst DEFAULT_TYPEAHEAD_DEBOUNCE_INTERVAL_MS = 200;\n\ninterface TypeaheadItem {\n getLabel?(): string;\n}\n\ninterface TypeaheadConfig<T> {\n debounceInterval?: number;\n skipPredicate?: (item: T) => boolean | undefined;\n}\n\n/**\n * Selects items based on keyboard inputs. Implements the typeahead functionality of\n * `role=\"listbox\"` or `role=\"tree\"` and other related roles.\n */\nexport class Typeahead<T extends TypeaheadItem> {\n private readonly _letterKeyStream = new Subject<string>();\n private _items: readonly T[] = [];\n private _selectedItemIndex = -1;\n\n /** Buffer for the letters that the user has pressed */\n private _pressedLetters: string[] = [];\n\n private _skipPredicateFn?: (item: T) => boolean | undefined;\n\n private readonly _selectedItem = new Subject<T>();\n readonly selectedItem: Observable<T> = this._selectedItem;\n\n constructor(initialItems: readonly T[], config?: TypeaheadConfig<T>) {\n const typeAheadInterval =\n typeof config?.debounceInterval === 'number'\n ? config.debounceInterval\n : DEFAULT_TYPEAHEAD_DEBOUNCE_INTERVAL_MS;\n\n if (config?.skipPredicate) {\n this._skipPredicateFn = config.skipPredicate;\n }\n\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n initialItems.length &&\n initialItems.some(item => typeof item.getLabel !== 'function')\n ) {\n throw new Error('KeyManager items in typeahead mode must implement the `getLabel` method.');\n }\n\n this.setItems(initialItems);\n this._setupKeyHandler(typeAheadInterval);\n }\n\n destroy() {\n this._pressedLetters = [];\n this._letterKeyStream.complete();\n this._selectedItem.complete();\n }\n\n setCurrentSelectedItemIndex(index: number) {\n this._selectedItemIndex = index;\n }\n\n setItems(items: readonly T[]) {\n this._items = items;\n }\n\n handleKey(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n\n // Attempt to use the `event.key` which also maps it to the user's keyboard language,\n // otherwise fall back to resolving alphanumeric characters via the keyCode.\n if (event.key && event.key.length === 1) {\n this._letterKeyStream.next(event.key.toLocaleUpperCase());\n } else if ((keyCode >= A && keyCode <= Z) || (keyCode >= ZERO && keyCode <= NINE)) {\n this._letterKeyStream.next(String.fromCharCode(keyCode));\n }\n }\n\n /** Gets whether the user is currently typing into the manager using the typeahead feature. */\n isTyping(): boolean {\n return this._pressedLetters.length > 0;\n }\n\n /** Resets the currently stored sequence of typed letters. */\n reset(): void {\n this._pressedLetters = [];\n }\n\n private _setupKeyHandler(typeAheadInterval: number) {\n // Debounce the presses of non-navigational keys, collect the ones that correspond to letters\n // and convert those letters back into a string. Afterwards find the first item that starts\n // with that string and select it.\n this._letterKeyStream\n .pipe(\n tap(letter => this._pressedLetters.push(letter)),\n debounceTime(typeAheadInterval),\n filter(() => this._pressedLetters.length > 0),\n map(() => this._pressedLetters.join('').toLocaleUpperCase()),\n )\n .subscribe(inputString => {\n // Start at 1 because we want to start searching at the item immediately\n // following the current active item.\n for (let i = 1; i < this._items.length + 1; i++) {\n const index = (this._selectedItemIndex + i) % this._items.length;\n const item = this._items[index];\n\n if (\n !this._skipPredicateFn?.(item) &&\n item.getLabel?.().toLocaleUpperCase().trim().indexOf(inputString) === 0\n ) {\n this._selectedItem.next(item);\n break;\n }\n }\n\n this._pressedLetters = [];\n });\n }\n}\n"],"names":[],"mappings":";;;;AAYA,MAAM,sCAAsC,GAAG,GAAG;AAWlD;;;AAGG;MACU,SAAS,CAAA;AACH,IAA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AM,CAAC,KAAK,CAAC;AAE/B,gBAAA,IACE,CAAC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;AAC9B,oBAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,EACvE;AACA,oBAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;oBAC7B;;;AAIJ,YAAA,IAAI,CAAC,eAAe,GAAG,EAAE;AAC3B,SAAC,CAAC;;AAEP;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unique-selection-dispatcher-Cewa_Eg3.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"unique-selection-dispatcher-Cewa_Eg3.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/collections/unique-selection-dispatcher.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injectable, OnDestroy} from '@angular/core';\n\n// Users of the Dispatcher never need to see this type, but TypeScript requires it to be exported.\nexport type UniqueSelectionDispatcherListener = (id: string, name: string) => void;\n\n/**\n * Class to coordinate unique selection based on name.\n * Intended to be consumed as an Angular service.\n * This service is needed because native radio change events are only fired on the item currently\n * being selected, and we still need to uncheck the previous selection.\n *\n * This service does not *store* any IDs and names because they may change at any time, so it is\n * less error-prone if they are simply passed through when the events occur.\n */\n@Injectable({providedIn: 'root'})\nexport class UniqueSelectionDispatcher implements OnDestroy {\n private _listeners: UniqueSelectionDispatcherListener[] = [];\n\n /**\n * Notify other items that selection for the given name has been set.\n * @param id ID of the item.\n * @param name Name of the item.\n */\n notify(id: string, name: string) {\n for (let listener of this._listeners) {\n listener(id, name);\n }\n }\n\n /**\n * Listen for future changes to item selection.\n * @return Function used to deregister listener\n */\n listen(listener: UniqueSelectionDispatcherListener): () => void {\n this._listeners.push(listener);\n return () => {\n this._listeners = this._listeners.filter((registered: UniqueSelectionDispatcherListener) => {\n return listener !== registered;\n });\n };\n }\n\n ngOnDestroy() {\n this._listeners = [];\n }\n}\n"],"names":[],"mappings":";;;AAaA;;;;;;;;AAQG;MAEU,yBAAyB,CAAA;IAC5B,UAAU,GAAwC,EAAE;AAE5D;;;;AAIG;IACH,MAAM,CAAC,EAAU,EAAE,IAAY,EAAA;AAC7B,QAAA,KAAK,IAAI,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;AACpC,YAAA,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;;;AAItB;;;AAGG;AACH,IAAA,MAAM,CAAC,QAA2C,EAAA;AAChD,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC;AAC9B,QAAA,OAAO,MAAK;AACV,YAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,UAA6C,KAAI;gBACzF,OAAO,QAAQ,KAAK,UAAU;AAChC,aAAC,CAAC;AACJ,SAAC;;IAGH,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,UAAU,GAAG,EAAE;;uGA5BX,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cADb,MAAM,EAAA,CAAA;;2FAClB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;;;"}
|
|
@@ -242,6 +242,16 @@ interface HarnessLoader {
|
|
|
242
242
|
* @return An instance of the given harness type (or null if not found).
|
|
243
243
|
*/
|
|
244
244
|
getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null>;
|
|
245
|
+
/**
|
|
246
|
+
* Searches for an instance of the component corresponding to the given harness type under the
|
|
247
|
+
* `HarnessLoader`'s root element, and returns a `ComponentHarness` for the instance on the page
|
|
248
|
+
* at the given index. If no matching component exists at that index, an error is thrown.
|
|
249
|
+
* @param query A query for a harness to create
|
|
250
|
+
* @param index The zero-indexed offset of the matching component instance to return
|
|
251
|
+
* @return An instance of the given harness type.
|
|
252
|
+
* @throws If a matching component instance can't be found at the given index.
|
|
253
|
+
*/
|
|
254
|
+
getHarnessAtIndex<T extends ComponentHarness>(query: HarnessQuery<T>, index: number): Promise<T>;
|
|
245
255
|
/**
|
|
246
256
|
* Searches for all instances of the component corresponding to the given harness type under the
|
|
247
257
|
* `HarnessLoader`'s root element, and returns a list `ComponentHarness` for each instance.
|
|
@@ -249,6 +259,13 @@ interface HarnessLoader {
|
|
|
249
259
|
* @return A list instances of the given harness type.
|
|
250
260
|
*/
|
|
251
261
|
getAllHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T[]>;
|
|
262
|
+
/**
|
|
263
|
+
* Searches for all instances of the component corresponding to the given harness type under the
|
|
264
|
+
* `HarnessLoader`'s root element, and returns the total count of all matching components.
|
|
265
|
+
* @param query A query for a harness to create
|
|
266
|
+
* @return An integer indicating the number of instances that were found.
|
|
267
|
+
*/
|
|
268
|
+
countHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<number>;
|
|
252
269
|
/**
|
|
253
270
|
* Searches for an instance of the component corresponding to the given harness type under the
|
|
254
271
|
* `HarnessLoader`'s root element, and returns a boolean indicating if any were found.
|
|
@@ -562,18 +579,34 @@ declare abstract class ContentContainerComponentHarness<S extends string = strin
|
|
|
562
579
|
* @returns The first harness matching the given query, or null if none is found.
|
|
563
580
|
*/
|
|
564
581
|
getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null>;
|
|
582
|
+
/**
|
|
583
|
+
* Gets a matching harness for the given query and index within the current harness's content.
|
|
584
|
+
* @param query The harness query to search for.
|
|
585
|
+
* @param index The zero-indexed offset of the component to find.
|
|
586
|
+
* @returns The first harness matching the given query.
|
|
587
|
+
* @throws If no matching harness is found.
|
|
588
|
+
*/
|
|
589
|
+
getHarnessAtIndex<T extends ComponentHarness>(query: HarnessQuery<T>, index: number): Promise<T>;
|
|
565
590
|
/**
|
|
566
591
|
* Gets all matching harnesses for the given query within the current harness's content.
|
|
567
592
|
* @param query The harness query to search for.
|
|
568
593
|
* @returns The list of harness matching the given query.
|
|
569
594
|
*/
|
|
570
595
|
getAllHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T[]>;
|
|
596
|
+
/**
|
|
597
|
+
* Returns the number of matching harnesses for the given query within the current harness's
|
|
598
|
+
* content.
|
|
599
|
+
*
|
|
600
|
+
* @param query The harness query to search for.
|
|
601
|
+
* @returns The number of matching harnesses for the given query.
|
|
602
|
+
*/
|
|
603
|
+
countHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<number>;
|
|
571
604
|
/**
|
|
572
605
|
* Checks whether there is a matching harnesses for the given query within the current harness's
|
|
573
606
|
* content.
|
|
574
607
|
*
|
|
575
608
|
* @param query The harness query to search for.
|
|
576
|
-
* @returns
|
|
609
|
+
* @returns Whether there is matching harnesses for the given query.
|
|
577
610
|
*/
|
|
578
611
|
hasHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<boolean>;
|
|
579
612
|
/**
|
|
@@ -819,6 +852,17 @@ declare abstract class HarnessEnvironment<E> implements HarnessLoader, LocatorFa
|
|
|
819
852
|
* @return An instance of the given harness type (or null if not found).
|
|
820
853
|
*/
|
|
821
854
|
getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null>;
|
|
855
|
+
/**
|
|
856
|
+
* Searches for an instance of the component corresponding to the given harness type and index
|
|
857
|
+
* under the `HarnessEnvironment`'s root element, and returns a `ComponentHarness` for that
|
|
858
|
+
* instance. The index specifies the offset of the component to find. If no matching
|
|
859
|
+
* component is found at that index, an error is thrown.
|
|
860
|
+
* @param query A query for a harness to create
|
|
861
|
+
* @param index The zero-indexed offset of the component to find
|
|
862
|
+
* @return An instance of the given harness type
|
|
863
|
+
* @throws If a matching component instance can't be found.
|
|
864
|
+
*/
|
|
865
|
+
getHarnessAtIndex<T extends ComponentHarness>(query: HarnessQuery<T>, offset: number): Promise<T>;
|
|
822
866
|
/**
|
|
823
867
|
* Searches for all instances of the component corresponding to the given harness type under the
|
|
824
868
|
* `HarnessEnvironment`'s root element, and returns a list `ComponentHarness` for each instance.
|
|
@@ -826,6 +870,13 @@ declare abstract class HarnessEnvironment<E> implements HarnessLoader, LocatorFa
|
|
|
826
870
|
* @return A list instances of the given harness type.
|
|
827
871
|
*/
|
|
828
872
|
getAllHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T[]>;
|
|
873
|
+
/**
|
|
874
|
+
* Searches for all instance of the component corresponding to the given harness type under the
|
|
875
|
+
* `HarnessEnvironment`'s root element, and returns the number that were found.
|
|
876
|
+
* @param query A query for a harness to create
|
|
877
|
+
* @return The number of instances that were found.
|
|
878
|
+
*/
|
|
879
|
+
countHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<number>;
|
|
829
880
|
/**
|
|
830
881
|
* Searches for an instance of the component corresponding to the given harness type under the
|
|
831
882
|
* `HarnessEnvironment`'s root element, and returns a boolean indicating if any were found.
|
package/menu/index.d.ts
CHANGED
|
@@ -283,18 +283,6 @@ declare class CdkMenuGroup {
|
|
|
283
283
|
declare const MENU_TRIGGER: InjectionToken<CdkMenuTriggerBase>;
|
|
284
284
|
/** Injection token used to configure the behavior of the menu when the page is scrolled. */
|
|
285
285
|
declare const MENU_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
|
|
286
|
-
/** Tracks the last open menu trigger across the entire application. */
|
|
287
|
-
declare class MenuTracker {
|
|
288
|
-
/** The last open menu trigger. */
|
|
289
|
-
private static _openMenuTrigger?;
|
|
290
|
-
/**
|
|
291
|
-
* Close the previous open menu and set the given one as being open.
|
|
292
|
-
* @param trigger The trigger for the currently open Menu.
|
|
293
|
-
*/
|
|
294
|
-
update(trigger: CdkMenuTriggerBase): void;
|
|
295
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MenuTracker, never>;
|
|
296
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<MenuTracker>;
|
|
297
|
-
}
|
|
298
286
|
/**
|
|
299
287
|
* Abstract directive that implements shared logic common to all menu triggers.
|
|
300
288
|
* This class can be extended to create custom menu trigger types.
|
|
@@ -321,8 +309,6 @@ declare abstract class CdkMenuTriggerBase implements OnDestroy {
|
|
|
321
309
|
menuTemplateRef: TemplateRef<unknown> | null;
|
|
322
310
|
/** Context data to be passed along to the menu template */
|
|
323
311
|
menuData: unknown;
|
|
324
|
-
/** Close the opened menu. */
|
|
325
|
-
abstract close(): void;
|
|
326
312
|
/** A reference to the overlay which manages the triggered menu */
|
|
327
313
|
protected overlayRef: OverlayRef | null;
|
|
328
314
|
/** Emits when this trigger is destroyed. */
|
|
@@ -375,8 +361,6 @@ declare class CdkMenuTrigger extends CdkMenuTriggerBase implements OnChanges, On
|
|
|
375
361
|
private readonly _renderer;
|
|
376
362
|
private readonly _injector;
|
|
377
363
|
private _cleanupMouseenter;
|
|
378
|
-
/** The app's menu tracking registry */
|
|
379
|
-
private readonly _menuTracker;
|
|
380
364
|
/** The parent menu this trigger belongs to. */
|
|
381
365
|
private readonly _parentMenu;
|
|
382
366
|
/** The menu aim service used by this menu. */
|
|
@@ -753,6 +737,18 @@ declare class CdkMenuItemCheckbox extends CdkMenuItemSelectable {
|
|
|
753
737
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemCheckbox, "[cdkMenuItemCheckbox]", ["cdkMenuItemCheckbox"], {}, {}, never, never, true, never>;
|
|
754
738
|
}
|
|
755
739
|
|
|
740
|
+
/** Tracks the last open context menu trigger across the entire application. */
|
|
741
|
+
declare class ContextMenuTracker {
|
|
742
|
+
/** The last open context menu trigger. */
|
|
743
|
+
private static _openContextMenuTrigger?;
|
|
744
|
+
/**
|
|
745
|
+
* Close the previous open context menu and set the given one as being open.
|
|
746
|
+
* @param trigger The trigger for the currently open Context Menu.
|
|
747
|
+
*/
|
|
748
|
+
update(trigger: CdkContextMenuTrigger): void;
|
|
749
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuTracker, never>;
|
|
750
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ContextMenuTracker>;
|
|
751
|
+
}
|
|
756
752
|
/** The coordinates where the context menu should open. */
|
|
757
753
|
type ContextMenuCoordinates = {
|
|
758
754
|
x: number;
|
|
@@ -765,8 +761,7 @@ type ContextMenuCoordinates = {
|
|
|
765
761
|
declare class CdkContextMenuTrigger extends CdkMenuTriggerBase implements OnDestroy {
|
|
766
762
|
private readonly _injector;
|
|
767
763
|
private readonly _directionality;
|
|
768
|
-
|
|
769
|
-
private readonly _menuTracker;
|
|
764
|
+
private readonly _contextMenuTracker;
|
|
770
765
|
private readonly _changeDetectorRef;
|
|
771
766
|
/** Whether the context menu is disabled. */
|
|
772
767
|
disabled: boolean;
|
|
@@ -819,5 +814,5 @@ declare class CdkMenuModule {
|
|
|
819
814
|
static ɵinj: i0.ɵɵInjectorDeclaration<CdkMenuModule>;
|
|
820
815
|
}
|
|
821
816
|
|
|
822
|
-
export { CDK_MENU, CdkContextMenuTrigger, CdkMenu, CdkMenuBar, CdkMenuBase, CdkMenuGroup, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemRadio, CdkMenuItemSelectable, CdkMenuModule, CdkMenuTrigger, CdkMenuTriggerBase, CdkTargetMenuAim,
|
|
817
|
+
export { CDK_MENU, CdkContextMenuTrigger, CdkMenu, CdkMenuBar, CdkMenuBase, CdkMenuGroup, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemRadio, CdkMenuItemSelectable, CdkMenuModule, CdkMenuTrigger, CdkMenuTriggerBase, CdkTargetMenuAim, ContextMenuTracker, FocusNext, MENU_AIM, MENU_SCROLL_STRATEGY, MENU_STACK, MENU_TRIGGER, MenuStack, PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER, PARENT_OR_NEW_MENU_STACK_PROVIDER, PointerFocusTracker, TargetMenuAim };
|
|
823
818
|
export type { CloseOptions, ContextMenuCoordinates, FocusableElement, Menu, MenuAim, MenuStackCloseEvent, MenuStackItem, Toggler };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cdk",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.1.0-next.1",
|
|
4
4
|
"description": "Angular Material Component Development Kit",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -158,8 +158,8 @@
|
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
160
|
"peerDependencies": {
|
|
161
|
-
"@angular/core": "^20.0.0 || ^21.0.0",
|
|
162
|
-
"@angular/common": "^20.0.0 || ^21.0.0",
|
|
161
|
+
"@angular/core": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
|
|
162
|
+
"@angular/common": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
|
|
163
163
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
164
164
|
},
|
|
165
165
|
"dependencies": {
|
|
@@ -26,6 +26,6 @@ function default_1() {
|
|
|
26
26
|
// In order to align the CDK version with other Angular dependencies that are setup by
|
|
27
27
|
// `@schematics/angular`, we use tilde instead of caret. This is default for Angular
|
|
28
28
|
// dependencies in new CLI projects.
|
|
29
|
-
return (0, utility_1.addDependency)('@angular/cdk', `~20.0.
|
|
29
|
+
return (0, utility_1.addDependency)('@angular/cdk', `~20.1.0-next.1`, { existing: utility_1.ExistingBehavior.Skip });
|
|
30
30
|
}
|
|
31
31
|
//# sourceMappingURL=index.js.map
|
package/testing/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AsyncFactoryFn, g as AsyncOptionPredicate, f as AsyncPredicate, B as BaseHarnessFilters, C as ComponentHarness, e as ComponentHarnessConstructor, j as ContentContainerComponentHarness, E as ElementDimensions, c as EventData, H as HarnessEnvironment, d as HarnessLoader, k as HarnessPredicate, h as HarnessQuery, i as LocatorFactory, L as LocatorFnResult, M as ModifierKeys, T as TestElement, a as TestKey, b as TextOptions } from '../harness-environment.d-
|
|
1
|
+
export { A as AsyncFactoryFn, g as AsyncOptionPredicate, f as AsyncPredicate, B as BaseHarnessFilters, C as ComponentHarness, e as ComponentHarnessConstructor, j as ContentContainerComponentHarness, E as ElementDimensions, c as EventData, H as HarnessEnvironment, d as HarnessLoader, k as HarnessPredicate, h as HarnessQuery, i as LocatorFactory, L as LocatorFnResult, M as ModifierKeys, T as TestElement, a as TestKey, b as TextOptions } from '../harness-environment.d-C-TBj7IN.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns an error which reports that no keys have been specified.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as webdriver from 'selenium-webdriver';
|
|
2
|
-
import { T as TestElement, M as ModifierKeys, a as TestKey, b as TextOptions, E as ElementDimensions, c as EventData, H as HarnessEnvironment, d as HarnessLoader } from '../../harness-environment.d-
|
|
2
|
+
import { T as TestElement, M as ModifierKeys, a as TestKey, b as TextOptions, E as ElementDimensions, c as EventData, H as HarnessEnvironment, d as HarnessLoader } from '../../harness-environment.d-C-TBj7IN.js';
|
|
3
3
|
|
|
4
4
|
/** A `TestElement` implementation for WebDriver. */
|
|
5
5
|
declare class SeleniumWebDriverElement implements TestElement {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HarnessEnvironment, d as HarnessLoader, T as TestElement, C as ComponentHarness, e as ComponentHarnessConstructor, M as ModifierKeys, a as TestKey, b as TextOptions, E as ElementDimensions, c as EventData } from '../../harness-environment.d-
|
|
1
|
+
import { H as HarnessEnvironment, d as HarnessLoader, T as TestElement, C as ComponentHarness, e as ComponentHarnessConstructor, M as ModifierKeys, a as TestKey, b as TextOptions, E as ElementDimensions, c as EventData } from '../../harness-environment.d-C-TBj7IN.js';
|
|
2
2
|
import { ComponentFixture } from '@angular/core/testing';
|
|
3
3
|
|
|
4
4
|
/** Options to configure the environment. */
|