@angular/cdk 9.1.2 → 9.2.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/a11y/focus-monitor/focus-monitor.d.ts +42 -2
- package/a11y/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +107 -75
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +7 -7
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-clipboard.umd.js +1 -1
- package/bundles/cdk-clipboard.umd.js.map +1 -1
- package/bundles/cdk-clipboard.umd.min.js +1 -1
- package/bundles/cdk-clipboard.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +0 -1
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-coercion.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +121 -95
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +15 -8
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +2 -1
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +4 -4
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +11 -0
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +6 -6
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +41 -10
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +8 -8
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +58 -27
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +12 -5
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.js +15 -9
- package/bundles/cdk-testing-protractor.umd.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.min.js +2 -2
- package/bundles/cdk-testing-protractor.umd.min.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.js +15 -9
- package/bundles/cdk-testing-testbed.umd.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.min.js +8 -8
- package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +21 -6
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +3 -3
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +8 -4
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/coercion/array.d.ts +1 -0
- package/drag-drop/client-rect.d.ts +31 -0
- package/drag-drop/directives/config.d.ts +1 -0
- package/drag-drop/directives/drop-list.d.ts +4 -3
- package/drag-drop/drag-ref.d.ts +4 -0
- package/drag-drop/index.metadata.json +1 -1
- package/esm2015/a11y/focus-monitor/focus-monitor.js +163 -76
- package/esm2015/a11y/focus-trap/configurable-focus-trap-factory.js +3 -3
- package/esm2015/a11y/focus-trap/focus-trap.js +1 -1
- package/esm2015/a11y/high-contrast-mode/high-contrast-mode-detector.js +8 -4
- package/esm2015/a11y/live-announcer/live-announcer.js +1 -1
- package/esm2015/a11y/public-api.js +2 -2
- package/esm2015/bidi/directionality.js +1 -1
- package/esm2015/clipboard/pending-copy.js +3 -3
- package/esm2015/coercion/array.js +1 -2
- package/esm2015/drag-drop/client-rect.js +75 -0
- package/esm2015/drag-drop/directives/config.js +3 -1
- package/esm2015/drag-drop/directives/drag.js +3 -2
- package/esm2015/drag-drop/directives/drop-list.js +24 -18
- package/esm2015/drag-drop/drag-drop.js +1 -1
- package/esm2015/drag-drop/drag-ref.js +61 -25
- package/esm2015/drag-drop/drop-list-ref.js +15 -82
- package/esm2015/layout/breakpoints-observer.js +1 -1
- package/esm2015/overlay/position/flexible-connected-position-strategy.js +3 -2
- package/esm2015/overlay/position/overlay-position-builder.js +1 -1
- package/esm2015/platform/features/shadow-dom.js +16 -1
- package/esm2015/platform/public-api.js +2 -2
- package/esm2015/scrolling/scroll-dispatcher.js +38 -5
- package/esm2015/scrolling/viewport-ruler.js +44 -5
- package/esm2015/table/cell.js +18 -8
- package/esm2015/table/public-api.js +3 -2
- package/esm2015/table/row.js +24 -8
- package/esm2015/table/table.js +26 -12
- package/esm2015/table/text-column.js +3 -26
- package/esm2015/table/tokens.js +44 -0
- package/esm2015/testing/protractor/protractor-harness-environment.js +13 -8
- package/esm2015/testing/testbed/testbed-harness-environment.js +16 -10
- package/esm2015/text-field/autosize.js +38 -4
- package/esm2015/tree/padding.js +9 -10
- package/esm2015/version.js +1 -1
- package/esm5/a11y/focus-monitor/focus-monitor.js +87 -56
- package/esm5/a11y/focus-trap/configurable-focus-trap-factory.js +3 -3
- package/esm5/a11y/focus-trap/focus-trap.js +1 -1
- package/esm5/a11y/high-contrast-mode/high-contrast-mode-detector.js +7 -4
- package/esm5/a11y/live-announcer/live-announcer.js +1 -1
- package/esm5/bidi/directionality.js +1 -1
- package/esm5/clipboard/pending-copy.js +2 -2
- package/esm5/coercion/array.js +1 -2
- package/esm5/drag-drop/client-rect.js +60 -0
- package/esm5/drag-drop/directives/config.js +1 -1
- package/esm5/drag-drop/directives/drag.js +3 -2
- package/esm5/drag-drop/directives/drop-list.js +13 -10
- package/esm5/drag-drop/drag-drop.js +1 -1
- package/esm5/drag-drop/drag-ref.js +39 -21
- package/esm5/drag-drop/drop-list-ref.js +13 -67
- package/esm5/layout/breakpoints-observer.js +1 -1
- package/esm5/overlay/position/flexible-connected-position-strategy.js +3 -2
- package/esm5/overlay/position/overlay-position-builder.js +1 -1
- package/esm5/platform/features/shadow-dom.js +11 -1
- package/esm5/scrolling/scroll-dispatcher.js +21 -5
- package/esm5/scrolling/viewport-ruler.js +24 -5
- package/esm5/table/cell.js +13 -8
- package/esm5/table/public-api.js +2 -1
- package/esm5/table/row.js +21 -11
- package/esm5/table/table.js +16 -11
- package/esm5/table/text-column.js +3 -4
- package/esm5/table/tokens.js +16 -0
- package/esm5/testing/protractor/protractor-harness-environment.js +17 -11
- package/esm5/testing/testbed/testbed-harness-environment.js +17 -11
- package/esm5/text-field/autosize.js +20 -4
- package/esm5/tree/padding.js +9 -5
- package/esm5/version.js +1 -1
- package/fesm2015/a11y.js +190 -103
- package/fesm2015/a11y.js.map +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/clipboard.js +2 -2
- package/fesm2015/clipboard.js.map +1 -1
- package/fesm2015/coercion.js +0 -1
- package/fesm2015/coercion.js.map +1 -1
- package/fesm2015/drag-drop.js +174 -123
- package/fesm2015/drag-drop.js.map +1 -1
- package/fesm2015/overlay.js +2 -1
- package/fesm2015/overlay.js.map +1 -1
- package/fesm2015/platform.js +16 -1
- package/fesm2015/platform.js.map +1 -1
- package/fesm2015/scrolling.js +76 -7
- package/fesm2015/scrolling.js.map +1 -1
- package/fesm2015/table.js +98 -49
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/testing/protractor.js +13 -8
- package/fesm2015/testing/protractor.js.map +1 -1
- package/fesm2015/testing/testbed.js +15 -9
- package/fesm2015/testing/testbed.js.map +1 -1
- package/fesm2015/text-field.js +37 -3
- package/fesm2015/text-field.js.map +1 -1
- package/fesm2015/tree.js +8 -9
- package/fesm2015/tree.js.map +1 -1
- package/fesm5/a11y.js +107 -76
- package/fesm5/a11y.js.map +1 -1
- package/fesm5/cdk.js +1 -1
- package/fesm5/cdk.js.map +1 -1
- package/fesm5/clipboard.js +1 -1
- package/fesm5/clipboard.js.map +1 -1
- package/fesm5/coercion.js +0 -1
- package/fesm5/coercion.js.map +1 -1
- package/fesm5/drag-drop.js +122 -96
- package/fesm5/drag-drop.js.map +1 -1
- package/fesm5/overlay.js +2 -1
- package/fesm5/overlay.js.map +1 -1
- package/fesm5/platform.js +11 -1
- package/fesm5/platform.js.map +1 -1
- package/fesm5/scrolling.js +39 -7
- package/fesm5/scrolling.js.map +1 -1
- package/fesm5/table.js +59 -29
- package/fesm5/table.js.map +1 -1
- package/fesm5/testing/protractor.js +17 -11
- package/fesm5/testing/protractor.js.map +1 -1
- package/fesm5/testing/testbed.js +16 -10
- package/fesm5/testing/testbed.js.map +1 -1
- package/fesm5/text-field.js +19 -3
- package/fesm5/text-field.js.map +1 -1
- package/fesm5/tree.js +8 -4
- package/fesm5/tree.js.map +1 -1
- package/package.json +1 -1
- package/platform/features/shadow-dom.d.ts +2 -0
- package/platform/index.metadata.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/upgrade-rules/class-names-rule.js +3 -1
- package/schematics/utils/ast/ng-module-imports.js +3 -2
- package/scrolling/index.metadata.json +1 -1
- package/scrolling/scroll-dispatcher.d.ts +9 -1
- package/scrolling/viewport-ruler.d.ts +9 -1
- package/table/cell.d.ts +2 -0
- package/table/index.metadata.json +1 -1
- package/table/public-api.d.ts +1 -0
- package/table/row.d.ts +6 -3
- package/table/table.d.ts +2 -0
- package/table/text-column.d.ts +2 -13
- package/table/tokens.d.ts +25 -0
- package/testing/protractor/protractor-harness-environment.d.ts +10 -3
- package/testing/testbed/testbed-harness-environment.d.ts +12 -4
- package/text-field/autosize.d.ts +9 -1
- package/text-field/index.metadata.json +1 -1
- package/tree/index.metadata.json +1 -1
- package/tree/padding.d.ts +6 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { Platform } from '@angular/cdk/platform';
|
|
9
|
-
import { ElementRef, EventEmitter, NgZone, OnDestroy } from '@angular/core';
|
|
9
|
+
import { ElementRef, EventEmitter, InjectionToken, NgZone, OnDestroy } from '@angular/core';
|
|
10
10
|
import { Observable } from 'rxjs';
|
|
11
11
|
export declare const TOUCH_BUFFER_MS = 650;
|
|
12
12
|
export declare type FocusOrigin = 'touch' | 'mouse' | 'keyboard' | 'program' | null;
|
|
@@ -18,6 +18,26 @@ export interface FocusOptions {
|
|
|
18
18
|
/** Whether the browser should scroll to the element when it is focused. */
|
|
19
19
|
preventScroll?: boolean;
|
|
20
20
|
}
|
|
21
|
+
/** Detection mode used for attributing the origin of a focus event. */
|
|
22
|
+
export declare const enum FocusMonitorDetectionMode {
|
|
23
|
+
/**
|
|
24
|
+
* Any mousedown, keydown, or touchstart event that happened in the previous
|
|
25
|
+
* tick or the current tick will be used to assign a focus event's origin (to
|
|
26
|
+
* either mouse, keyboard, or touch). This is the default option.
|
|
27
|
+
*/
|
|
28
|
+
IMMEDIATE = 0,
|
|
29
|
+
/**
|
|
30
|
+
* A focus event's origin is always attributed to the last corresponding
|
|
31
|
+
* mousedown, keydown, or touchstart event, no matter how long ago it occured.
|
|
32
|
+
*/
|
|
33
|
+
EVENTUAL = 1
|
|
34
|
+
}
|
|
35
|
+
/** Injectable service-level options for FocusMonitor. */
|
|
36
|
+
export interface FocusMonitorOptions {
|
|
37
|
+
detectionMode?: FocusMonitorDetectionMode;
|
|
38
|
+
}
|
|
39
|
+
/** InjectionToken for FocusMonitorOptions. */
|
|
40
|
+
export declare const FOCUS_MONITOR_DEFAULT_OPTIONS: InjectionToken<FocusMonitorOptions>;
|
|
21
41
|
/** Monitors mouse and keyboard events to determine the cause of focus events. */
|
|
22
42
|
export declare class FocusMonitor implements OnDestroy {
|
|
23
43
|
private _ngZone;
|
|
@@ -40,6 +60,11 @@ export declare class FocusMonitor implements OnDestroy {
|
|
|
40
60
|
private _elementInfo;
|
|
41
61
|
/** The number of elements currently being monitored. */
|
|
42
62
|
private _monitoredElementCount;
|
|
63
|
+
/**
|
|
64
|
+
* The specified detection mode, used for attributing the origin of a focus
|
|
65
|
+
* event.
|
|
66
|
+
*/
|
|
67
|
+
private readonly _detectionMode;
|
|
43
68
|
/**
|
|
44
69
|
* Event listener for `keydown` events on the document.
|
|
45
70
|
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
@@ -60,7 +85,16 @@ export declare class FocusMonitor implements OnDestroy {
|
|
|
60
85
|
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
61
86
|
*/
|
|
62
87
|
private _windowFocusListener;
|
|
63
|
-
|
|
88
|
+
/** Used to reference correct document/window */
|
|
89
|
+
protected _document?: Document;
|
|
90
|
+
constructor(_ngZone: NgZone, _platform: Platform,
|
|
91
|
+
/** @breaking-change 11.0.0 make document required */
|
|
92
|
+
document: any | null, options: FocusMonitorOptions | null);
|
|
93
|
+
/**
|
|
94
|
+
* Event listener for `focus` and 'blur' events on the document.
|
|
95
|
+
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
96
|
+
*/
|
|
97
|
+
private _documentFocusAndBlurListener;
|
|
64
98
|
/**
|
|
65
99
|
* Monitors focus on an element and applies appropriate CSS classes.
|
|
66
100
|
* @param element The element to monitor
|
|
@@ -102,7 +136,12 @@ export declare class FocusMonitor implements OnDestroy {
|
|
|
102
136
|
*/
|
|
103
137
|
focusVia(element: ElementRef<HTMLElement>, origin: FocusOrigin, options?: FocusOptions): void;
|
|
104
138
|
ngOnDestroy(): void;
|
|
139
|
+
/** Access injected document if available or fallback to global document reference */
|
|
140
|
+
private _getDocument;
|
|
141
|
+
/** Use defaultView of injected document if available or fallback to global window reference */
|
|
142
|
+
private _getWindow;
|
|
105
143
|
private _toggleClass;
|
|
144
|
+
private _getFocusOrigin;
|
|
106
145
|
/**
|
|
107
146
|
* Sets the focus classes on the element based on the given focus origin.
|
|
108
147
|
* @param element The element to update the classes on.
|
|
@@ -111,6 +150,7 @@ export declare class FocusMonitor implements OnDestroy {
|
|
|
111
150
|
private _setClasses;
|
|
112
151
|
/**
|
|
113
152
|
* Sets the origin and schedules an async function to clear it at the end of the event queue.
|
|
153
|
+
* If the detection mode is 'eventual', the origin is never cleared.
|
|
114
154
|
* @param origin The origin to set.
|
|
115
155
|
*/
|
|
116
156
|
private _setOriginForCurrentEventQueue;
|
package/a11y/index.metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"RegisteredMessage":{"__symbolic":"interface"},"MESSAGES_CONTAINER_ID":"cdk-describedby-message-container","CDK_DESCRIBEDBY_ID_PREFIX":"cdk-describedby-message","CDK_DESCRIBEDBY_HOST_ATTRIBUTE":"cdk-describedby-host","AriaDescriber":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":48,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":52,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":52,"character":22}]}]],"parameters":[{"__symbolic":"reference","name":"any"}]}],"describe":[{"__symbolic":"method"}],"removeDescription":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_createMessageElement":[{"__symbolic":"method"}],"_setMessageId":[{"__symbolic":"method"}],"_deleteMessageElement":[{"__symbolic":"method"}],"_createMessagesContainer":[{"__symbolic":"method"}],"_deleteMessagesContainer":[{"__symbolic":"method"}],"_removeCdkDescribedByReferenceIds":[{"__symbolic":"method"}],"_addMessageReference":[{"__symbolic":"method"}],"_removeMessageReference":[{"__symbolic":"method"}],"_isElementDescribedByMessage":[{"__symbolic":"method"}],"_canBeDescribed":[{"__symbolic":"method"}],"_isElementNode":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"Highlightable":{"__symbolic":"interface"},"ActiveDescendantKeyManager":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"ListKeyManager"},"members":{"setActiveItem":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}]}},"FocusableOption":{"__symbolic":"interface"},"FocusKeyManager":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"ListKeyManager"},"members":{"setFocusOrigin":[{"__symbolic":"method"}],"setActiveItem":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}]}},"ListKeyManagerOption":{"__symbolic":"interface"},"ListKeyManagerModifierKey":{"__symbolic":"interface"},"ListKeyManager":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"QueryList","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":59,"character":40,"context":{"typeName":"T"},"module":"./key-manager/list-key-manager"}]}]}],"skipPredicate":[{"__symbolic":"method"}],"withWrap":[{"__symbolic":"method"}],"withVerticalOrientation":[{"__symbolic":"method"}],"withHorizontalOrientation":[{"__symbolic":"method"}],"withAllowedModifierKeys":[{"__symbolic":"method"}],"withTypeAhead":[{"__symbolic":"method"}],"setActiveItem":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"onKeydown":[{"__symbolic":"method"}],"isTyping":[{"__symbolic":"method"}],"setFirstItemActive":[{"__symbolic":"method"}],"setLastItemActive":[{"__symbolic":"method"}],"setNextItemActive":[{"__symbolic":"method"}],"setPreviousItemActive":[{"__symbolic":"method"}],"updateActiveItem":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"_setActiveItemByDelta":[{"__symbolic":"method"}],"_setActiveInWrapMode":[{"__symbolic":"method"}],"_setActiveInDefaultMode":[{"__symbolic":"method"}],"_setActiveItemByIndex":[{"__symbolic":"method"}],"_getItemsArray":[{"__symbolic":"method"}]}},"ConfigurableFocusTrap":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"FocusTrap"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":34,"character":14,"context":{"typeName":"HTMLElement"},"module":"./focus-trap/configurable-focus-trap"},{"__symbolic":"reference","name":"InteractivityChecker"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":36,"character":13},{"__symbolic":"error","message":"Could not resolve type","line":37,"character":15,"context":{"typeName":"Document"},"module":"./focus-trap/configurable-focus-trap"},{"__symbolic":"reference","name":"ɵangular_material_src_cdk_a11y_a11y_a"},{"__symbolic":"reference","name":"FocusTrapInertStrategy"},{"__symbolic":"reference","name":"ɵangular_material_src_cdk_a11y_a11y_b"}]}],"destroy":[{"__symbolic":"method"}],"_enable":[{"__symbolic":"method"}],"_disable":[{"__symbolic":"method"}]}},"EventListenerFocusTrapInertStrategy":{"__symbolic":"class","members":{"preventFocus":[{"__symbolic":"method"}],"allowFocus":[{"__symbolic":"method"}],"_trapFocus":[{"__symbolic":"method"}]}},"FocusTrap":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":58,"character":23,"context":{"typeName":"HTMLElement"},"module":"./focus-trap/focus-trap"},{"__symbolic":"reference","name":"InteractivityChecker"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":60,"character":22},{"__symbolic":"error","message":"Could not resolve type","line":61,"character":24,"context":{"typeName":"Document"},"module":"./focus-trap/focus-trap"},null]}],"destroy":[{"__symbolic":"method"}],"attachAnchors":[{"__symbolic":"method"}],"focusInitialElementWhenReady":[{"__symbolic":"method"}],"focusFirstTabbableElementWhenReady":[{"__symbolic":"method"}],"focusLastTabbableElementWhenReady":[{"__symbolic":"method"}],"_getRegionBoundary":[{"__symbolic":"method"}],"focusInitialElement":[{"__symbolic":"method"}],"focusFirstTabbableElement":[{"__symbolic":"method"}],"focusLastTabbableElement":[{"__symbolic":"method"}],"hasAttached":[{"__symbolic":"method"}],"_getFirstTabbableElement":[{"__symbolic":"method"}],"_getLastTabbableElement":[{"__symbolic":"method"}],"_createAnchor":[{"__symbolic":"method"}],"_toggleAnchorTabIndex":[{"__symbolic":"method"}],"toggleAnchors":[{"__symbolic":"method"}],"_executeOnStable":[{"__symbolic":"method"}]}},"FocusTrapFactory":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":350,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":357,"character":7},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":357,"character":14}]}]],"parameters":[{"__symbolic":"reference","name":"InteractivityChecker"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":60,"character":22},{"__symbolic":"reference","name":"any"}]}],"create":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"CdkTrapFocus":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":376,"character":1},"arguments":[{"selector":"[cdkTrapFocus]","exportAs":"cdkTrapFocus"}]}],"members":{"enabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":390,"character":3},"arguments":["cdkTrapFocus"]}]}],"autoCapture":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":398,"character":3},"arguments":["cdkTrapFocusAutoCapture"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":406,"character":7},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":406,"character":14}]}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":404,"character":38,"context":{"typeName":"HTMLElement"},"module":"./focus-trap/focus-trap"}]},{"__symbolic":"reference","name":"FocusTrapFactory"},{"__symbolic":"reference","name":"any"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngAfterContentInit":[{"__symbolic":"method"}],"ngDoCheck":[{"__symbolic":"method"}]}},"ConfigurableFocusTrapFactory":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":23,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":32,"character":7},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":32,"character":14}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":33,"character":7}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":33,"character":19},"arguments":[{"__symbolic":"reference","name":"FOCUS_TRAP_INERT_STRATEGY"}]}]],"parameters":[{"__symbolic":"reference","name":"InteractivityChecker"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":30,"character":23},{"__symbolic":"reference","name":"ɵangular_material_src_cdk_a11y_a11y_a"},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"FocusTrapInertStrategy"}]}],"create":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"FOCUS_TRAP_INERT_STRATEGY":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":14,"character":6},"arguments":["FOCUS_TRAP_INERT_STRATEGY"]},"FocusTrapInertStrategy":{"__symbolic":"interface"},"InteractivityChecker":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":20,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/cdk/platform","name":"Platform","line":23,"character":33}]}],"isDisabled":[{"__symbolic":"method"}],"isVisible":[{"__symbolic":"method"}],"isTabbable":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"LiveAnnouncer":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":29,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":36,"character":7}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":36,"character":19},"arguments":[{"__symbolic":"reference","name":"LIVE_ANNOUNCER_ELEMENT_TOKEN"}]}],null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":38,"character":7},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":38,"character":14}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":39,"character":7}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":39,"character":19},"arguments":[{"__symbolic":"reference","name":"LIVE_ANNOUNCER_DEFAULT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":37,"character":23},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"LiveAnnouncerDefaultOptions"}]}],"announce":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_createLiveElement":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"CdkAriaLive":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":179,"character":1},"arguments":[{"selector":"[cdkAriaLive]","exportAs":"cdkAriaLive"}]}],"members":{"politeness":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":185,"character":3},"arguments":["cdkAriaLive"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":217,"character":35},{"__symbolic":"reference","name":"LiveAnnouncer"},{"__symbolic":"reference","module":"@angular/cdk/observers","name":"ContentObserver","line":218,"character":40},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":37,"character":23}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"AriaLivePoliteness":{"__symbolic":"interface"},"LIVE_ANNOUNCER_ELEMENT_TOKEN":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":17,"character":8},"arguments":["liveAnnouncerElement",{"providedIn":"root","factory":{"__symbolic":"reference","name":"LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY"}}]},"LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY":{"__symbolic":"function","parameters":[],"value":null},"LiveAnnouncerDefaultOptions":{"__symbolic":"interface"},"LIVE_ANNOUNCER_DEFAULT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":38,"character":8},"arguments":["LIVE_ANNOUNCER_DEFAULT_OPTIONS"]},"TOUCH_BUFFER_MS":650,"FocusOrigin":{"__symbolic":"interface"},"FocusOptions":{"__symbolic":"interface"},"FocusMonitor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":55,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":136,"character":31},{"__symbolic":"reference","module":"@angular/cdk/platform","name":"Platform","line":136,"character":58}]}],"monitor":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"stopMonitoring":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"focusVia":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_toggleClass":[{"__symbolic":"method"}],"_setClasses":[{"__symbolic":"method"}],"_setOriginForCurrentEventQueue":[{"__symbolic":"method"}],"_wasCausedByTouch":[{"__symbolic":"method"}],"_onFocus":[{"__symbolic":"method"}],"_onBlur":[{"__symbolic":"method"}],"_emitOrigin":[{"__symbolic":"method"}],"_incrementMonitoredElementCount":[{"__symbolic":"method"}],"_decrementMonitoredElementCount":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"CdkMonitorFocus":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":435,"character":1},"arguments":[{"selector":"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]"}]}],"members":{"cdkFocusChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":440,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":442,"character":46,"context":{"typeName":"HTMLElement"},"module":"./focus-monitor/focus-monitor"}]},{"__symbolic":"reference","name":"FocusMonitor"}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"isFakeMousedownFromScreenReader":{"__symbolic":"function","parameters":["event"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"event"},"member":"buttons"},"right":0}},"A11yModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":17,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/cdk/platform","name":"PlatformModule","line":18,"character":12},{"__symbolic":"reference","module":"@angular/cdk/observers","name":"ObserversModule","line":18,"character":28}],"declarations":[{"__symbolic":"reference","name":"CdkAriaLive"},{"__symbolic":"reference","name":"CdkTrapFocus"},{"__symbolic":"reference","name":"CdkMonitorFocus"}],"exports":[{"__symbolic":"reference","name":"CdkAriaLive"},{"__symbolic":"reference","name":"CdkTrapFocus"},{"__symbolic":"reference","name":"CdkMonitorFocus"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"HighContrastModeDetector"}]}]}},"HighContrastModeDetector":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":40,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":44,"character":44},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":44,"character":51}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/cdk/platform","name":"Platform","line":44,"character":33},{"__symbolic":"reference","name":"any"}]}],"getHighContrastMode":[{"__symbolic":"method"}],"_applyBodyHighContrastModeCssClasses":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"HighContrastMode":{"NONE":0,"BLACK_ON_WHITE":1,"WHITE_ON_BLACK":2},"ɵangular_material_src_cdk_a11y_a11y_a":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":21,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"register":[{"__symbolic":"method"}],"deregister":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ɵangular_material_src_cdk_a11y_a11y_b":{"__symbolic":"class","members":{}}},"origins":{"RegisteredMessage":"./aria-describer/aria-describer","MESSAGES_CONTAINER_ID":"./aria-describer/aria-describer","CDK_DESCRIBEDBY_ID_PREFIX":"./aria-describer/aria-describer","CDK_DESCRIBEDBY_HOST_ATTRIBUTE":"./aria-describer/aria-describer","AriaDescriber":"./aria-describer/aria-describer","Highlightable":"./key-manager/activedescendant-key-manager","ActiveDescendantKeyManager":"./key-manager/activedescendant-key-manager","FocusableOption":"./key-manager/focus-key-manager","FocusKeyManager":"./key-manager/focus-key-manager","ListKeyManagerOption":"./key-manager/list-key-manager","ListKeyManagerModifierKey":"./key-manager/list-key-manager","ListKeyManager":"./key-manager/list-key-manager","ConfigurableFocusTrap":"./focus-trap/configurable-focus-trap","EventListenerFocusTrapInertStrategy":"./focus-trap/event-listener-inert-strategy","FocusTrap":"./focus-trap/focus-trap","FocusTrapFactory":"./focus-trap/focus-trap","CdkTrapFocus":"./focus-trap/focus-trap","ConfigurableFocusTrapFactory":"./focus-trap/configurable-focus-trap-factory","FOCUS_TRAP_INERT_STRATEGY":"./focus-trap/focus-trap-inert-strategy","FocusTrapInertStrategy":"./focus-trap/focus-trap-inert-strategy","InteractivityChecker":"./interactivity-checker/interactivity-checker","LiveAnnouncer":"./live-announcer/live-announcer","CdkAriaLive":"./live-announcer/live-announcer","AriaLivePoliteness":"./live-announcer/live-announcer-tokens","LIVE_ANNOUNCER_ELEMENT_TOKEN":"./live-announcer/live-announcer-tokens","LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY":"./live-announcer/live-announcer-tokens","LiveAnnouncerDefaultOptions":"./live-announcer/live-announcer-tokens","LIVE_ANNOUNCER_DEFAULT_OPTIONS":"./live-announcer/live-announcer-tokens","TOUCH_BUFFER_MS":"./focus-monitor/focus-monitor","FocusOrigin":"./focus-monitor/focus-monitor","FocusOptions":"./focus-monitor/focus-monitor","FocusMonitor":"./focus-monitor/focus-monitor","CdkMonitorFocus":"./focus-monitor/focus-monitor","isFakeMousedownFromScreenReader":"./fake-mousedown","A11yModule":"./a11y-module","HighContrastModeDetector":"./high-contrast-mode/high-contrast-mode-detector","HighContrastMode":"./high-contrast-mode/high-contrast-mode-detector","ɵangular_material_src_cdk_a11y_a11y_a":"./focus-trap/focus-trap-manager","ɵangular_material_src_cdk_a11y_a11y_b":"./focus-trap/configurable-focus-trap-config"},"importAs":"@angular/cdk/a11y"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"RegisteredMessage":{"__symbolic":"interface"},"MESSAGES_CONTAINER_ID":"cdk-describedby-message-container","CDK_DESCRIBEDBY_ID_PREFIX":"cdk-describedby-message","CDK_DESCRIBEDBY_HOST_ATTRIBUTE":"cdk-describedby-host","AriaDescriber":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":48,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":52,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":52,"character":22}]}]],"parameters":[{"__symbolic":"reference","name":"any"}]}],"describe":[{"__symbolic":"method"}],"removeDescription":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_createMessageElement":[{"__symbolic":"method"}],"_setMessageId":[{"__symbolic":"method"}],"_deleteMessageElement":[{"__symbolic":"method"}],"_createMessagesContainer":[{"__symbolic":"method"}],"_deleteMessagesContainer":[{"__symbolic":"method"}],"_removeCdkDescribedByReferenceIds":[{"__symbolic":"method"}],"_addMessageReference":[{"__symbolic":"method"}],"_removeMessageReference":[{"__symbolic":"method"}],"_isElementDescribedByMessage":[{"__symbolic":"method"}],"_canBeDescribed":[{"__symbolic":"method"}],"_isElementNode":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"Highlightable":{"__symbolic":"interface"},"ActiveDescendantKeyManager":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"ListKeyManager"},"members":{"setActiveItem":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}]}},"FocusableOption":{"__symbolic":"interface"},"FocusKeyManager":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"ListKeyManager"},"members":{"setFocusOrigin":[{"__symbolic":"method"}],"setActiveItem":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}]}},"ListKeyManagerOption":{"__symbolic":"interface"},"ListKeyManagerModifierKey":{"__symbolic":"interface"},"ListKeyManager":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"QueryList","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":59,"character":40,"context":{"typeName":"T"},"module":"./key-manager/list-key-manager"}]}]}],"skipPredicate":[{"__symbolic":"method"}],"withWrap":[{"__symbolic":"method"}],"withVerticalOrientation":[{"__symbolic":"method"}],"withHorizontalOrientation":[{"__symbolic":"method"}],"withAllowedModifierKeys":[{"__symbolic":"method"}],"withTypeAhead":[{"__symbolic":"method"}],"setActiveItem":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"onKeydown":[{"__symbolic":"method"}],"isTyping":[{"__symbolic":"method"}],"setFirstItemActive":[{"__symbolic":"method"}],"setLastItemActive":[{"__symbolic":"method"}],"setNextItemActive":[{"__symbolic":"method"}],"setPreviousItemActive":[{"__symbolic":"method"}],"updateActiveItem":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"_setActiveItemByDelta":[{"__symbolic":"method"}],"_setActiveInWrapMode":[{"__symbolic":"method"}],"_setActiveInDefaultMode":[{"__symbolic":"method"}],"_setActiveItemByIndex":[{"__symbolic":"method"}],"_getItemsArray":[{"__symbolic":"method"}]}},"ConfigurableFocusTrap":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"FocusTrap"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":34,"character":14,"context":{"typeName":"HTMLElement"},"module":"./focus-trap/configurable-focus-trap"},{"__symbolic":"reference","name":"InteractivityChecker"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":36,"character":13},{"__symbolic":"error","message":"Could not resolve type","line":37,"character":15,"context":{"typeName":"Document"},"module":"./focus-trap/configurable-focus-trap"},{"__symbolic":"reference","name":"ɵangular_material_src_cdk_a11y_a11y_a"},{"__symbolic":"reference","name":"FocusTrapInertStrategy"},{"__symbolic":"reference","name":"ɵangular_material_src_cdk_a11y_a11y_b"}]}],"destroy":[{"__symbolic":"method"}],"_enable":[{"__symbolic":"method"}],"_disable":[{"__symbolic":"method"}]}},"EventListenerFocusTrapInertStrategy":{"__symbolic":"class","members":{"preventFocus":[{"__symbolic":"method"}],"allowFocus":[{"__symbolic":"method"}],"_trapFocus":[{"__symbolic":"method"}]}},"FocusTrap":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":58,"character":23,"context":{"typeName":"HTMLElement"},"module":"./focus-trap/focus-trap"},{"__symbolic":"reference","name":"InteractivityChecker"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":60,"character":22},{"__symbolic":"error","message":"Could not resolve type","line":61,"character":24,"context":{"typeName":"Document"},"module":"./focus-trap/focus-trap"},null]}],"destroy":[{"__symbolic":"method"}],"attachAnchors":[{"__symbolic":"method"}],"focusInitialElementWhenReady":[{"__symbolic":"method"}],"focusFirstTabbableElementWhenReady":[{"__symbolic":"method"}],"focusLastTabbableElementWhenReady":[{"__symbolic":"method"}],"_getRegionBoundary":[{"__symbolic":"method"}],"focusInitialElement":[{"__symbolic":"method"}],"focusFirstTabbableElement":[{"__symbolic":"method"}],"focusLastTabbableElement":[{"__symbolic":"method"}],"hasAttached":[{"__symbolic":"method"}],"_getFirstTabbableElement":[{"__symbolic":"method"}],"_getLastTabbableElement":[{"__symbolic":"method"}],"_createAnchor":[{"__symbolic":"method"}],"_toggleAnchorTabIndex":[{"__symbolic":"method"}],"toggleAnchors":[{"__symbolic":"method"}],"_executeOnStable":[{"__symbolic":"method"}]}},"FocusTrapFactory":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":350,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":357,"character":7},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":357,"character":14}]}]],"parameters":[{"__symbolic":"reference","name":"InteractivityChecker"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":60,"character":22},{"__symbolic":"reference","name":"any"}]}],"create":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"CdkTrapFocus":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":376,"character":1},"arguments":[{"selector":"[cdkTrapFocus]","exportAs":"cdkTrapFocus"}]}],"members":{"enabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":390,"character":3},"arguments":["cdkTrapFocus"]}]}],"autoCapture":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":398,"character":3},"arguments":["cdkTrapFocusAutoCapture"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":406,"character":7},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":406,"character":14}]}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":404,"character":38,"context":{"typeName":"HTMLElement"},"module":"./focus-trap/focus-trap"}]},{"__symbolic":"reference","name":"FocusTrapFactory"},{"__symbolic":"reference","name":"any"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngAfterContentInit":[{"__symbolic":"method"}],"ngDoCheck":[{"__symbolic":"method"}]}},"ConfigurableFocusTrapFactory":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":23,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":32,"character":7},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":32,"character":14}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":33,"character":7}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":33,"character":19},"arguments":[{"__symbolic":"reference","name":"FOCUS_TRAP_INERT_STRATEGY"}]}]],"parameters":[{"__symbolic":"reference","name":"InteractivityChecker"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":30,"character":23},{"__symbolic":"reference","name":"ɵangular_material_src_cdk_a11y_a11y_a"},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"FocusTrapInertStrategy"}]}],"create":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"FOCUS_TRAP_INERT_STRATEGY":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":14,"character":6},"arguments":["FOCUS_TRAP_INERT_STRATEGY"]},"FocusTrapInertStrategy":{"__symbolic":"interface"},"InteractivityChecker":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":20,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/cdk/platform","name":"Platform","line":23,"character":33}]}],"isDisabled":[{"__symbolic":"method"}],"isVisible":[{"__symbolic":"method"}],"isTabbable":[{"__symbolic":"method"}],"isFocusable":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"LiveAnnouncer":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":29,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":36,"character":7}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":36,"character":19},"arguments":[{"__symbolic":"reference","name":"LIVE_ANNOUNCER_ELEMENT_TOKEN"}]}],null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":38,"character":7},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":38,"character":14}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":39,"character":7}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":39,"character":19},"arguments":[{"__symbolic":"reference","name":"LIVE_ANNOUNCER_DEFAULT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":37,"character":23},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"LiveAnnouncerDefaultOptions"}]}],"announce":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_createLiveElement":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"CdkAriaLive":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":179,"character":1},"arguments":[{"selector":"[cdkAriaLive]","exportAs":"cdkAriaLive"}]}],"members":{"politeness":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":185,"character":3},"arguments":["cdkAriaLive"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":217,"character":35},{"__symbolic":"reference","name":"LiveAnnouncer"},{"__symbolic":"reference","module":"@angular/cdk/observers","name":"ContentObserver","line":218,"character":40},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":37,"character":23}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"AriaLivePoliteness":{"__symbolic":"interface"},"LIVE_ANNOUNCER_ELEMENT_TOKEN":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":17,"character":8},"arguments":["liveAnnouncerElement",{"providedIn":"root","factory":{"__symbolic":"reference","name":"LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY"}}]},"LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY":{"__symbolic":"function","parameters":[],"value":null},"LiveAnnouncerDefaultOptions":{"__symbolic":"interface"},"LIVE_ANNOUNCER_DEFAULT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":38,"character":8},"arguments":["LIVE_ANNOUNCER_DEFAULT_OPTIONS"]},"TOUCH_BUFFER_MS":650,"FocusOrigin":{"__symbolic":"interface"},"FocusOptions":{"__symbolic":"interface"},"FocusMonitorDetectionMode":{"IMMEDIATE":0,"EVENTUAL":1},"FocusMonitorOptions":{"__symbolic":"interface"},"FOCUS_MONITOR_DEFAULT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":65,"character":8},"arguments":["cdk-focus-monitor-default-options"]},"FocusMonitor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":83,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":180,"character":7}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":180,"character":19},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":180,"character":26}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":181,"character":7}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":181,"character":19},"arguments":[{"__symbolic":"reference","name":"FOCUS_MONITOR_DEFAULT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":177,"character":23},{"__symbolic":"reference","module":"@angular/cdk/platform","name":"Platform","line":178,"character":25},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"any"}]}],"monitor":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"stopMonitoring":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"focusVia":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_getDocument":[{"__symbolic":"method"}],"_getWindow":[{"__symbolic":"method"}],"_toggleClass":[{"__symbolic":"method"}],"_getFocusOrigin":[{"__symbolic":"method"}],"_setClasses":[{"__symbolic":"method"}],"_setOriginForCurrentEventQueue":[{"__symbolic":"method"}],"_wasCausedByTouch":[{"__symbolic":"method"}],"_onFocus":[{"__symbolic":"method"}],"_onBlur":[{"__symbolic":"method"}],"_emitOrigin":[{"__symbolic":"method"}],"_incrementMonitoredElementCount":[{"__symbolic":"method"}],"_decrementMonitoredElementCount":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"CdkMonitorFocus":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":510,"character":1},"arguments":[{"selector":"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]"}]}],"members":{"cdkFocusChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":515,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":517,"character":46,"context":{"typeName":"HTMLElement"},"module":"./focus-monitor/focus-monitor"}]},{"__symbolic":"reference","name":"FocusMonitor"}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"isFakeMousedownFromScreenReader":{"__symbolic":"function","parameters":["event"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"event"},"member":"buttons"},"right":0}},"A11yModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":17,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/cdk/platform","name":"PlatformModule","line":18,"character":12},{"__symbolic":"reference","module":"@angular/cdk/observers","name":"ObserversModule","line":18,"character":28}],"declarations":[{"__symbolic":"reference","name":"CdkAriaLive"},{"__symbolic":"reference","name":"CdkTrapFocus"},{"__symbolic":"reference","name":"CdkMonitorFocus"}],"exports":[{"__symbolic":"reference","name":"CdkAriaLive"},{"__symbolic":"reference","name":"CdkTrapFocus"},{"__symbolic":"reference","name":"CdkMonitorFocus"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"HighContrastModeDetector"}]}]}},"HighContrastModeDetector":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":40,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":44,"character":44},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":44,"character":51}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/cdk/platform","name":"Platform","line":44,"character":33},{"__symbolic":"reference","name":"any"}]}],"getHighContrastMode":[{"__symbolic":"method"}],"_applyBodyHighContrastModeCssClasses":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"HighContrastMode":{"NONE":0,"BLACK_ON_WHITE":1,"WHITE_ON_BLACK":2},"ɵangular_material_src_cdk_a11y_a11y_a":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":21,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"register":[{"__symbolic":"method"}],"deregister":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ɵangular_material_src_cdk_a11y_a11y_b":{"__symbolic":"class","members":{}}},"origins":{"RegisteredMessage":"./aria-describer/aria-describer","MESSAGES_CONTAINER_ID":"./aria-describer/aria-describer","CDK_DESCRIBEDBY_ID_PREFIX":"./aria-describer/aria-describer","CDK_DESCRIBEDBY_HOST_ATTRIBUTE":"./aria-describer/aria-describer","AriaDescriber":"./aria-describer/aria-describer","Highlightable":"./key-manager/activedescendant-key-manager","ActiveDescendantKeyManager":"./key-manager/activedescendant-key-manager","FocusableOption":"./key-manager/focus-key-manager","FocusKeyManager":"./key-manager/focus-key-manager","ListKeyManagerOption":"./key-manager/list-key-manager","ListKeyManagerModifierKey":"./key-manager/list-key-manager","ListKeyManager":"./key-manager/list-key-manager","ConfigurableFocusTrap":"./focus-trap/configurable-focus-trap","EventListenerFocusTrapInertStrategy":"./focus-trap/event-listener-inert-strategy","FocusTrap":"./focus-trap/focus-trap","FocusTrapFactory":"./focus-trap/focus-trap","CdkTrapFocus":"./focus-trap/focus-trap","ConfigurableFocusTrapFactory":"./focus-trap/configurable-focus-trap-factory","FOCUS_TRAP_INERT_STRATEGY":"./focus-trap/focus-trap-inert-strategy","FocusTrapInertStrategy":"./focus-trap/focus-trap-inert-strategy","InteractivityChecker":"./interactivity-checker/interactivity-checker","LiveAnnouncer":"./live-announcer/live-announcer","CdkAriaLive":"./live-announcer/live-announcer","AriaLivePoliteness":"./live-announcer/live-announcer-tokens","LIVE_ANNOUNCER_ELEMENT_TOKEN":"./live-announcer/live-announcer-tokens","LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY":"./live-announcer/live-announcer-tokens","LiveAnnouncerDefaultOptions":"./live-announcer/live-announcer-tokens","LIVE_ANNOUNCER_DEFAULT_OPTIONS":"./live-announcer/live-announcer-tokens","TOUCH_BUFFER_MS":"./focus-monitor/focus-monitor","FocusOrigin":"./focus-monitor/focus-monitor","FocusOptions":"./focus-monitor/focus-monitor","FocusMonitorDetectionMode":"./focus-monitor/focus-monitor","FocusMonitorOptions":"./focus-monitor/focus-monitor","FOCUS_MONITOR_DEFAULT_OPTIONS":"./focus-monitor/focus-monitor","FocusMonitor":"./focus-monitor/focus-monitor","CdkMonitorFocus":"./focus-monitor/focus-monitor","isFakeMousedownFromScreenReader":"./fake-mousedown","A11yModule":"./a11y-module","HighContrastModeDetector":"./high-contrast-mode/high-contrast-mode-detector","HighContrastMode":"./high-contrast-mode/high-contrast-mode-detector","ɵangular_material_src_cdk_a11y_a11y_a":"./focus-trap/focus-trap-manager","ɵangular_material_src_cdk_a11y_a11y_b":"./focus-trap/configurable-focus-trap-config"},"importAs":"@angular/cdk/a11y"}
|
package/bundles/cdk-a11y.umd.js
CHANGED
|
@@ -1881,6 +1881,24 @@
|
|
|
1881
1881
|
return CdkAriaLive;
|
|
1882
1882
|
}());
|
|
1883
1883
|
|
|
1884
|
+
/**
|
|
1885
|
+
* @license
|
|
1886
|
+
* Copyright Google LLC All Rights Reserved.
|
|
1887
|
+
*
|
|
1888
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
1889
|
+
* found in the LICENSE file at https://angular.io/license
|
|
1890
|
+
*/
|
|
1891
|
+
/**
|
|
1892
|
+
* Screenreaders will often fire fake mousedown events when a focusable element
|
|
1893
|
+
* is activated using the keyboard. We can typically distinguish between these faked
|
|
1894
|
+
* mousedown events and real mousedown events using the "buttons" property. While
|
|
1895
|
+
* real mousedowns will indicate the mouse button that was pressed (e.g. "1" for
|
|
1896
|
+
* the left mouse button), faked mousedowns will usually set the property value to 0.
|
|
1897
|
+
*/
|
|
1898
|
+
function isFakeMousedownFromScreenReader(event) {
|
|
1899
|
+
return event.buttons === 0;
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1884
1902
|
/**
|
|
1885
1903
|
* @license
|
|
1886
1904
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -1891,6 +1909,8 @@
|
|
|
1891
1909
|
// This is the value used by AngularJS Material. Through trial and error (on iPhone 6S) they found
|
|
1892
1910
|
// that a value of around 650ms seems appropriate.
|
|
1893
1911
|
var TOUCH_BUFFER_MS = 650;
|
|
1912
|
+
/** InjectionToken for FocusMonitorOptions. */
|
|
1913
|
+
var FOCUS_MONITOR_DEFAULT_OPTIONS = new i0.InjectionToken('cdk-focus-monitor-default-options');
|
|
1894
1914
|
/**
|
|
1895
1915
|
* Event listener options that enable capturing and also
|
|
1896
1916
|
* mark the listener as passive if the browser supports it.
|
|
@@ -1901,7 +1921,9 @@
|
|
|
1901
1921
|
});
|
|
1902
1922
|
/** Monitors mouse and keyboard events to determine the cause of focus events. */
|
|
1903
1923
|
var FocusMonitor = /** @class */ (function () {
|
|
1904
|
-
function FocusMonitor(_ngZone, _platform
|
|
1924
|
+
function FocusMonitor(_ngZone, _platform,
|
|
1925
|
+
/** @breaking-change 11.0.0 make document required */
|
|
1926
|
+
document, options) {
|
|
1905
1927
|
var _this = this;
|
|
1906
1928
|
this._ngZone = _ngZone;
|
|
1907
1929
|
this._platform = _platform;
|
|
@@ -1926,11 +1948,14 @@
|
|
|
1926
1948
|
* Event listener for `mousedown` events on the document.
|
|
1927
1949
|
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
1928
1950
|
*/
|
|
1929
|
-
this._documentMousedownListener = function () {
|
|
1951
|
+
this._documentMousedownListener = function (event) {
|
|
1930
1952
|
// On mousedown record the origin only if there is not touch
|
|
1931
1953
|
// target, since a mousedown can happen as a result of a touch event.
|
|
1932
1954
|
if (!_this._lastTouchTarget) {
|
|
1933
|
-
|
|
1955
|
+
// In some cases screen readers fire fake `mousedown` events instead of `keydown`.
|
|
1956
|
+
// Resolve the focus source to `keyboard` if we detect one of them.
|
|
1957
|
+
var source = isFakeMousedownFromScreenReader(event) ? 'keyboard' : 'mouse';
|
|
1958
|
+
_this._setOriginForCurrentEventQueue(source);
|
|
1934
1959
|
}
|
|
1935
1960
|
};
|
|
1936
1961
|
/**
|
|
@@ -1960,9 +1985,22 @@
|
|
|
1960
1985
|
_this._windowFocused = true;
|
|
1961
1986
|
_this._windowFocusTimeoutId = setTimeout(function () { return _this._windowFocused = false; });
|
|
1962
1987
|
};
|
|
1988
|
+
/**
|
|
1989
|
+
* Event listener for `focus` and 'blur' events on the document.
|
|
1990
|
+
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
1991
|
+
*/
|
|
1992
|
+
this._documentFocusAndBlurListener = function (event) {
|
|
1993
|
+
var target = event.target;
|
|
1994
|
+
var handler = event.type === 'focus' ? _this._onFocus : _this._onBlur;
|
|
1995
|
+
// We need to walk up the ancestor chain in order to support `checkChildren`.
|
|
1996
|
+
for (var el = target; el; el = el.parentElement) {
|
|
1997
|
+
handler.call(_this, event, el);
|
|
1998
|
+
}
|
|
1999
|
+
};
|
|
2000
|
+
this._document = document;
|
|
2001
|
+
this._detectionMode = (options === null || options === void 0 ? void 0 : options.detectionMode) || 0 /* IMMEDIATE */;
|
|
1963
2002
|
}
|
|
1964
2003
|
FocusMonitor.prototype.monitor = function (element, checkChildren) {
|
|
1965
|
-
var _this = this;
|
|
1966
2004
|
if (checkChildren === void 0) { checkChildren = false; }
|
|
1967
2005
|
// Do nothing if we're not on the browser platform.
|
|
1968
2006
|
if (!this._platform.isBrowser) {
|
|
@@ -1977,31 +2015,17 @@
|
|
|
1977
2015
|
}
|
|
1978
2016
|
// Create monitored element info.
|
|
1979
2017
|
var info = {
|
|
1980
|
-
unlisten: function () { },
|
|
1981
2018
|
checkChildren: checkChildren,
|
|
1982
2019
|
subject: new rxjs.Subject()
|
|
1983
2020
|
};
|
|
1984
2021
|
this._elementInfo.set(nativeElement, info);
|
|
1985
2022
|
this._incrementMonitoredElementCount();
|
|
1986
|
-
// Start listening. We need to listen in capture phase since focus events don't bubble.
|
|
1987
|
-
var focusListener = function (event) { return _this._onFocus(event, nativeElement); };
|
|
1988
|
-
var blurListener = function (event) { return _this._onBlur(event, nativeElement); };
|
|
1989
|
-
this._ngZone.runOutsideAngular(function () {
|
|
1990
|
-
nativeElement.addEventListener('focus', focusListener, true);
|
|
1991
|
-
nativeElement.addEventListener('blur', blurListener, true);
|
|
1992
|
-
});
|
|
1993
|
-
// Create an unlisten function for later.
|
|
1994
|
-
info.unlisten = function () {
|
|
1995
|
-
nativeElement.removeEventListener('focus', focusListener, true);
|
|
1996
|
-
nativeElement.removeEventListener('blur', blurListener, true);
|
|
1997
|
-
};
|
|
1998
2023
|
return info.subject.asObservable();
|
|
1999
2024
|
};
|
|
2000
2025
|
FocusMonitor.prototype.stopMonitoring = function (element) {
|
|
2001
2026
|
var nativeElement = coercion.coerceElement(element);
|
|
2002
2027
|
var elementInfo = this._elementInfo.get(nativeElement);
|
|
2003
2028
|
if (elementInfo) {
|
|
2004
|
-
elementInfo.unlisten();
|
|
2005
2029
|
elementInfo.subject.complete();
|
|
2006
2030
|
this._setClasses(nativeElement);
|
|
2007
2031
|
this._elementInfo.delete(nativeElement);
|
|
@@ -2021,6 +2045,15 @@
|
|
|
2021
2045
|
var _this = this;
|
|
2022
2046
|
this._elementInfo.forEach(function (_info, element) { return _this.stopMonitoring(element); });
|
|
2023
2047
|
};
|
|
2048
|
+
/** Access injected document if available or fallback to global document reference */
|
|
2049
|
+
FocusMonitor.prototype._getDocument = function () {
|
|
2050
|
+
return this._document || document;
|
|
2051
|
+
};
|
|
2052
|
+
/** Use defaultView of injected document if available or fallback to global window reference */
|
|
2053
|
+
FocusMonitor.prototype._getWindow = function () {
|
|
2054
|
+
var doc = this._getDocument();
|
|
2055
|
+
return doc.defaultView || window;
|
|
2056
|
+
};
|
|
2024
2057
|
FocusMonitor.prototype._toggleClass = function (element, className, shouldSet) {
|
|
2025
2058
|
if (shouldSet) {
|
|
2026
2059
|
element.classList.add(className);
|
|
@@ -2029,33 +2062,53 @@
|
|
|
2029
2062
|
element.classList.remove(className);
|
|
2030
2063
|
}
|
|
2031
2064
|
};
|
|
2065
|
+
FocusMonitor.prototype._getFocusOrigin = function (event) {
|
|
2066
|
+
// If we couldn't detect a cause for the focus event, it's due to one of three reasons:
|
|
2067
|
+
// 1) The window has just regained focus, in which case we want to restore the focused state of
|
|
2068
|
+
// the element from before the window blurred.
|
|
2069
|
+
// 2) It was caused by a touch event, in which case we mark the origin as 'touch'.
|
|
2070
|
+
// 3) The element was programmatically focused, in which case we should mark the origin as
|
|
2071
|
+
// 'program'.
|
|
2072
|
+
if (this._origin) {
|
|
2073
|
+
return this._origin;
|
|
2074
|
+
}
|
|
2075
|
+
if (this._windowFocused && this._lastFocusOrigin) {
|
|
2076
|
+
return this._lastFocusOrigin;
|
|
2077
|
+
}
|
|
2078
|
+
else if (this._wasCausedByTouch(event)) {
|
|
2079
|
+
return 'touch';
|
|
2080
|
+
}
|
|
2081
|
+
else {
|
|
2082
|
+
return 'program';
|
|
2083
|
+
}
|
|
2084
|
+
};
|
|
2032
2085
|
/**
|
|
2033
2086
|
* Sets the focus classes on the element based on the given focus origin.
|
|
2034
2087
|
* @param element The element to update the classes on.
|
|
2035
2088
|
* @param origin The focus origin.
|
|
2036
2089
|
*/
|
|
2037
2090
|
FocusMonitor.prototype._setClasses = function (element, origin) {
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
this._toggleClass(element, 'cdk-mouse-focused', origin === 'mouse');
|
|
2044
|
-
this._toggleClass(element, 'cdk-program-focused', origin === 'program');
|
|
2045
|
-
}
|
|
2091
|
+
this._toggleClass(element, 'cdk-focused', !!origin);
|
|
2092
|
+
this._toggleClass(element, 'cdk-touch-focused', origin === 'touch');
|
|
2093
|
+
this._toggleClass(element, 'cdk-keyboard-focused', origin === 'keyboard');
|
|
2094
|
+
this._toggleClass(element, 'cdk-mouse-focused', origin === 'mouse');
|
|
2095
|
+
this._toggleClass(element, 'cdk-program-focused', origin === 'program');
|
|
2046
2096
|
};
|
|
2047
2097
|
/**
|
|
2048
2098
|
* Sets the origin and schedules an async function to clear it at the end of the event queue.
|
|
2099
|
+
* If the detection mode is 'eventual', the origin is never cleared.
|
|
2049
2100
|
* @param origin The origin to set.
|
|
2050
2101
|
*/
|
|
2051
2102
|
FocusMonitor.prototype._setOriginForCurrentEventQueue = function (origin) {
|
|
2052
2103
|
var _this = this;
|
|
2053
2104
|
this._ngZone.runOutsideAngular(function () {
|
|
2054
2105
|
_this._origin = origin;
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2106
|
+
if (_this._detectionMode === 0 /* IMMEDIATE */) {
|
|
2107
|
+
// Sometimes the focus origin won't be valid in Firefox because Firefox seems to focus *one*
|
|
2108
|
+
// tick after the interaction event fired. To ensure the focus origin is always correct,
|
|
2109
|
+
// the focus origin will be determined at the beginning of the next tick.
|
|
2110
|
+
_this._originTimeoutId = setTimeout(function () { return _this._origin = null; }, 1);
|
|
2111
|
+
}
|
|
2059
2112
|
});
|
|
2060
2113
|
};
|
|
2061
2114
|
/**
|
|
@@ -2101,24 +2154,7 @@
|
|
|
2101
2154
|
if (!elementInfo || (!elementInfo.checkChildren && element !== event.target)) {
|
|
2102
2155
|
return;
|
|
2103
2156
|
}
|
|
2104
|
-
|
|
2105
|
-
// 1) The window has just regained focus, in which case we want to restore the focused state of
|
|
2106
|
-
// the element from before the window blurred.
|
|
2107
|
-
// 2) It was caused by a touch event, in which case we mark the origin as 'touch'.
|
|
2108
|
-
// 3) The element was programmatically focused, in which case we should mark the origin as
|
|
2109
|
-
// 'program'.
|
|
2110
|
-
var origin = this._origin;
|
|
2111
|
-
if (!origin) {
|
|
2112
|
-
if (this._windowFocused && this._lastFocusOrigin) {
|
|
2113
|
-
origin = this._lastFocusOrigin;
|
|
2114
|
-
}
|
|
2115
|
-
else if (this._wasCausedByTouch(event)) {
|
|
2116
|
-
origin = 'touch';
|
|
2117
|
-
}
|
|
2118
|
-
else {
|
|
2119
|
-
origin = 'program';
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2157
|
+
var origin = this._getFocusOrigin(event);
|
|
2122
2158
|
this._setClasses(element, origin);
|
|
2123
2159
|
this._emitOrigin(elementInfo.subject, origin);
|
|
2124
2160
|
this._lastFocusOrigin = origin;
|
|
@@ -2149,6 +2185,10 @@
|
|
|
2149
2185
|
// Note: we listen to events in the capture phase so we
|
|
2150
2186
|
// can detect them even if the user stops propagation.
|
|
2151
2187
|
this._ngZone.runOutsideAngular(function () {
|
|
2188
|
+
var document = _this._getDocument();
|
|
2189
|
+
var window = _this._getWindow();
|
|
2190
|
+
document.addEventListener('focus', _this._documentFocusAndBlurListener, captureEventListenerOptions);
|
|
2191
|
+
document.addEventListener('blur', _this._documentFocusAndBlurListener, captureEventListenerOptions);
|
|
2152
2192
|
document.addEventListener('keydown', _this._documentKeydownListener, captureEventListenerOptions);
|
|
2153
2193
|
document.addEventListener('mousedown', _this._documentMousedownListener, captureEventListenerOptions);
|
|
2154
2194
|
document.addEventListener('touchstart', _this._documentTouchstartListener, captureEventListenerOptions);
|
|
@@ -2159,10 +2199,14 @@
|
|
|
2159
2199
|
FocusMonitor.prototype._decrementMonitoredElementCount = function () {
|
|
2160
2200
|
// Unregister global listeners when last element is unmonitored.
|
|
2161
2201
|
if (!--this._monitoredElementCount) {
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2202
|
+
var document_1 = this._getDocument();
|
|
2203
|
+
var window_1 = this._getWindow();
|
|
2204
|
+
document_1.removeEventListener('focus', this._documentFocusAndBlurListener, captureEventListenerOptions);
|
|
2205
|
+
document_1.removeEventListener('blur', this._documentFocusAndBlurListener, captureEventListenerOptions);
|
|
2206
|
+
document_1.removeEventListener('keydown', this._documentKeydownListener, captureEventListenerOptions);
|
|
2207
|
+
document_1.removeEventListener('mousedown', this._documentMousedownListener, captureEventListenerOptions);
|
|
2208
|
+
document_1.removeEventListener('touchstart', this._documentTouchstartListener, captureEventListenerOptions);
|
|
2209
|
+
window_1.removeEventListener('focus', this._windowFocusListener);
|
|
2166
2210
|
// Clear timeouts for all potentially pending timeouts to prevent the leaks.
|
|
2167
2211
|
clearTimeout(this._windowFocusTimeoutId);
|
|
2168
2212
|
clearTimeout(this._touchTimeoutId);
|
|
@@ -2175,9 +2219,11 @@
|
|
|
2175
2219
|
/** @nocollapse */
|
|
2176
2220
|
FocusMonitor.ctorParameters = function () { return [
|
|
2177
2221
|
{ type: i0.NgZone },
|
|
2178
|
-
{ type: i1.Platform }
|
|
2222
|
+
{ type: i1.Platform },
|
|
2223
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] },
|
|
2224
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [FOCUS_MONITOR_DEFAULT_OPTIONS,] }] }
|
|
2179
2225
|
]; };
|
|
2180
|
-
FocusMonitor.ɵprov = i0.ɵɵdefineInjectable({ factory: function FocusMonitor_Factory() { return new FocusMonitor(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.Platform)); }, token: FocusMonitor, providedIn: "root" });
|
|
2226
|
+
FocusMonitor.ɵprov = i0.ɵɵdefineInjectable({ factory: function FocusMonitor_Factory() { return new FocusMonitor(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.Platform), i0.ɵɵinject(i2.DOCUMENT, 8), i0.ɵɵinject(FOCUS_MONITOR_DEFAULT_OPTIONS, 8)); }, token: FocusMonitor, providedIn: "root" });
|
|
2181
2227
|
return FocusMonitor;
|
|
2182
2228
|
}());
|
|
2183
2229
|
/**
|
|
@@ -2218,24 +2264,6 @@
|
|
|
2218
2264
|
return CdkMonitorFocus;
|
|
2219
2265
|
}());
|
|
2220
2266
|
|
|
2221
|
-
/**
|
|
2222
|
-
* @license
|
|
2223
|
-
* Copyright Google LLC All Rights Reserved.
|
|
2224
|
-
*
|
|
2225
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
2226
|
-
* found in the LICENSE file at https://angular.io/license
|
|
2227
|
-
*/
|
|
2228
|
-
/**
|
|
2229
|
-
* Screenreaders will often fire fake mousedown events when a focusable element
|
|
2230
|
-
* is activated using the keyboard. We can typically distinguish between these faked
|
|
2231
|
-
* mousedown events and real mousedown events using the "buttons" property. While
|
|
2232
|
-
* real mousedowns will indicate the mouse button that was pressed (e.g. "1" for
|
|
2233
|
-
* the left mouse button), faked mousedowns will usually set the property value to 0.
|
|
2234
|
-
*/
|
|
2235
|
-
function isFakeMousedownFromScreenReader(event) {
|
|
2236
|
-
return event.buttons === 0;
|
|
2237
|
-
}
|
|
2238
|
-
|
|
2239
2267
|
/**
|
|
2240
2268
|
* @license
|
|
2241
2269
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -2279,9 +2307,12 @@
|
|
|
2279
2307
|
this._document.body.appendChild(testElement);
|
|
2280
2308
|
// Get the computed style for the background color, collapsing spaces to normalize between
|
|
2281
2309
|
// browsers. Once we get this color, we no longer need the test element. Access the `window`
|
|
2282
|
-
// via the document so we can fake it in tests.
|
|
2283
|
-
|
|
2284
|
-
var
|
|
2310
|
+
// via the document so we can fake it in tests. Note that we have extra null checks, because
|
|
2311
|
+
// this logic will likely run during app bootstrap and throwing can break the entire app.
|
|
2312
|
+
var documentWindow = this._document.defaultView || window;
|
|
2313
|
+
var computedStyle = (documentWindow && documentWindow.getComputedStyle) ?
|
|
2314
|
+
documentWindow.getComputedStyle(testElement) : null;
|
|
2315
|
+
var computedColor = (computedStyle && computedStyle.backgroundColor || '').replace(/ /g, '');
|
|
2285
2316
|
this._document.body.removeChild(testElement);
|
|
2286
2317
|
switch (computedColor) {
|
|
2287
2318
|
case 'rgb(0,0,0)': return 2 /* WHITE_ON_BLACK */;
|
|
@@ -2368,6 +2399,7 @@
|
|
|
2368
2399
|
exports.ConfigurableFocusTrap = ConfigurableFocusTrap;
|
|
2369
2400
|
exports.ConfigurableFocusTrapFactory = ConfigurableFocusTrapFactory;
|
|
2370
2401
|
exports.EventListenerFocusTrapInertStrategy = EventListenerFocusTrapInertStrategy;
|
|
2402
|
+
exports.FOCUS_MONITOR_DEFAULT_OPTIONS = FOCUS_MONITOR_DEFAULT_OPTIONS;
|
|
2371
2403
|
exports.FOCUS_TRAP_INERT_STRATEGY = FOCUS_TRAP_INERT_STRATEGY;
|
|
2372
2404
|
exports.FocusKeyManager = FocusKeyManager;
|
|
2373
2405
|
exports.FocusMonitor = FocusMonitor;
|