@angular/cdk 11.2.2 → 11.2.6
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.scss +2 -0
- package/_overlay.scss +6 -7
- package/a11y/_a11y.scss +2 -0
- package/a11y/fake-event-detection.d.ts +11 -0
- package/a11y/focus-trap/focus-trap.d.ts +4 -4
- package/a11y/index.metadata.json +1 -1
- package/a11y/public-api.d.ts +1 -1
- package/accordion/accordion.d.ts +0 -1
- package/accordion/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +35 -18
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +6 -6
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-accordion.umd.js +5 -7
- package/bundles/cdk-accordion.umd.js.map +1 -1
- package/bundles/cdk-accordion.umd.min.js +1 -1
- package/bundles/cdk-accordion.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +3 -2
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +3 -3
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +2 -2
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.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/esm2015/a11y/fake-event-detection.js +27 -0
- package/esm2015/a11y/focus-monitor/focus-monitor.js +16 -9
- package/esm2015/a11y/focus-trap/focus-trap.js +5 -5
- package/esm2015/a11y/public-api.js +2 -2
- package/esm2015/accordion/accordion.js +6 -8
- package/esm2015/platform/features/scrolling.js +4 -3
- package/esm2015/table/cell.js +3 -3
- package/esm2015/version.js +1 -1
- package/fesm2015/a11y.js +35 -19
- package/fesm2015/a11y.js.map +1 -1
- package/fesm2015/accordion.js +5 -7
- package/fesm2015/accordion.js.map +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/platform.js +3 -2
- package/fesm2015/platform.js.map +1 -1
- package/fesm2015/table.js +2 -2
- package/fesm2015/table.js.map +1 -1
- package/overlay/_overlay.scss +6 -7
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +1 -1
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +1 -1
- package/schematics/paths.d.ts +11 -0
- package/schematics/paths.js +16 -0
- package/a11y/fake-mousedown.d.ts +0 -15
- package/esm2015/a11y/fake-mousedown.js +0 -18
|
@@ -41,22 +41,20 @@
|
|
|
41
41
|
});
|
|
42
42
|
/** Opens all enabled accordion items in an accordion where multi is enabled. */
|
|
43
43
|
CdkAccordion.prototype.openAll = function () {
|
|
44
|
-
this.
|
|
44
|
+
if (this._multi) {
|
|
45
|
+
this._openCloseAllActions.next(true);
|
|
46
|
+
}
|
|
45
47
|
};
|
|
46
48
|
/** Closes all enabled accordion items in an accordion where multi is enabled. */
|
|
47
49
|
CdkAccordion.prototype.closeAll = function () {
|
|
48
|
-
this.
|
|
50
|
+
this._openCloseAllActions.next(false);
|
|
49
51
|
};
|
|
50
52
|
CdkAccordion.prototype.ngOnChanges = function (changes) {
|
|
51
53
|
this._stateChanges.next(changes);
|
|
52
54
|
};
|
|
53
55
|
CdkAccordion.prototype.ngOnDestroy = function () {
|
|
54
56
|
this._stateChanges.complete();
|
|
55
|
-
|
|
56
|
-
CdkAccordion.prototype._openCloseAll = function (expanded) {
|
|
57
|
-
if (this.multi) {
|
|
58
|
-
this._openCloseAllActions.next(expanded);
|
|
59
|
-
}
|
|
57
|
+
this._openCloseAllActions.complete();
|
|
60
58
|
};
|
|
61
59
|
return CdkAccordion;
|
|
62
60
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk-accordion.umd.js","sources":["../../../../../src/cdk/accordion/accordion.ts","../../../../../src/cdk/accordion/accordion-item.ts","../../../../../src/cdk/accordion/accordion-module.ts","../../../../../src/cdk/accordion/public-api.ts","../../../../../src/cdk/accordion/index.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.io/license\n */\n\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Directive, InjectionToken, Input, OnChanges, OnDestroy, SimpleChanges} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n/** Used to generate unique ID for each accordion. */\nlet nextId = 0;\n\n/**\n * Injection token that can be used to reference instances of `CdkAccordion`. It serves\n * as alternative token to the actual `CdkAccordion` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_ACCORDION = new InjectionToken<CdkAccordion>('CdkAccordion');\n\n/**\n * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.\n */\n@Directive({\n selector: 'cdk-accordion, [cdkAccordion]',\n exportAs: 'cdkAccordion',\n providers: [{provide: CDK_ACCORDION, useExisting: CdkAccordion}],\n})\nexport class CdkAccordion implements OnDestroy, OnChanges {\n /** Emits when the state of the accordion changes */\n readonly _stateChanges = new Subject<SimpleChanges>();\n\n /** Stream that emits true/false when openAll/closeAll is triggered. */\n readonly _openCloseAllActions: Subject<boolean> = new Subject<boolean>();\n\n /** A readonly id value to use for unique selection coordination. */\n readonly id = `cdk-accordion-${nextId++}`;\n\n /** Whether the accordion should allow multiple expanded accordion items simultaneously. */\n @Input()\n get multi(): boolean { return this._multi; }\n set multi(multi: boolean) { this._multi = coerceBooleanProperty(multi); }\n private _multi: boolean = false;\n\n /** Opens all enabled accordion items in an accordion where multi is enabled. */\n openAll(): void {\n this._openCloseAll(true);\n }\n\n /** Closes all enabled accordion items in an accordion where multi is enabled. */\n closeAll(): void {\n this._openCloseAll(false);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n this._stateChanges.next(changes);\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n private _openCloseAll(expanded: boolean): void {\n if (this.multi) {\n this._openCloseAllActions.next(expanded);\n }\n }\n\n static ngAcceptInputType_multi: BooleanInput;\n}\n","/**\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.io/license\n */\n\nimport {\n Output,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n Optional,\n ChangeDetectorRef,\n SkipSelf,\n Inject,\n} from '@angular/core';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {CDK_ACCORDION, CdkAccordion} from './accordion';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Subscription} from 'rxjs';\n\n/** Used to generate unique ID for each accordion item. */\nlet nextId = 0;\n\n/**\n * An basic directive expected to be extended and decorated as a component. Sets up all\n * events and attributes needed to be managed by a CdkAccordion parent.\n */\n@Directive({\n selector: 'cdk-accordion-item, [cdkAccordionItem]',\n exportAs: 'cdkAccordionItem',\n providers: [\n // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from\n // registering to the same accordion.\n {provide: CDK_ACCORDION, useValue: undefined},\n ],\n})\nexport class CdkAccordionItem implements OnDestroy {\n /** Subscription to openAll/closeAll events. */\n private _openCloseAllSubscription = Subscription.EMPTY;\n /** Event emitted every time the AccordionItem is closed. */\n @Output() closed: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted every time the AccordionItem is opened. */\n @Output() opened: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted when the AccordionItem is destroyed. */\n @Output() destroyed: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * Emits whenever the expanded state of the accordion changes.\n * Primarily used to facilitate two-way binding.\n * @docs-private\n */\n @Output() expandedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The unique AccordionItem id. */\n readonly id: string = `cdk-accordion-child-${nextId++}`;\n\n /** Whether the AccordionItem is expanded. */\n @Input()\n get expanded(): any { return this._expanded; }\n set expanded(expanded: any) {\n expanded = coerceBooleanProperty(expanded);\n\n // Only emit events and update the internal value if the value changes.\n if (this._expanded !== expanded) {\n this._expanded = expanded;\n this.expandedChange.emit(expanded);\n\n if (expanded) {\n this.opened.emit();\n /**\n * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n * the name value is the id of the accordion.\n */\n const accordionId = this.accordion ? this.accordion.id : this.id;\n this._expansionDispatcher.notify(this.id, accordionId);\n } else {\n this.closed.emit();\n }\n\n // Ensures that the animation will run when the value is set outside of an `@Input`.\n // This includes cases like the open, close and toggle methods.\n this._changeDetectorRef.markForCheck();\n }\n }\n private _expanded = false;\n\n /** Whether the AccordionItem is disabled. */\n @Input()\n get disabled() { return this._disabled; }\n set disabled(disabled: any) { this._disabled = coerceBooleanProperty(disabled); }\n private _disabled: boolean = false;\n\n /** Unregister function for _expansionDispatcher. */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n constructor(@Optional() @Inject(CDK_ACCORDION) @SkipSelf() public accordion: CdkAccordion,\n private _changeDetectorRef: ChangeDetectorRef,\n protected _expansionDispatcher: UniqueSelectionDispatcher) {\n this._removeUniqueSelectionListener =\n _expansionDispatcher.listen((id: string, accordionId: string) => {\n if (this.accordion && !this.accordion.multi &&\n this.accordion.id === accordionId && this.id !== id) {\n this.expanded = false;\n }\n });\n\n // When an accordion item is hosted in an accordion, subscribe to open/close events.\n if (this.accordion) {\n this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();\n }\n }\n\n /** Emits an event for the accordion item being destroyed. */\n ngOnDestroy() {\n this.opened.complete();\n this.closed.complete();\n this.destroyed.emit();\n this.destroyed.complete();\n this._removeUniqueSelectionListener();\n this._openCloseAllSubscription.unsubscribe();\n }\n\n /** Toggles the expanded state of the accordion item. */\n toggle(): void {\n if (!this.disabled) {\n this.expanded = !this.expanded;\n }\n }\n\n /** Sets the expanded state of the accordion item to false. */\n close(): void {\n if (!this.disabled) {\n this.expanded = false;\n }\n }\n\n /** Sets the expanded state of the accordion item to true. */\n open(): void {\n if (!this.disabled) {\n this.expanded = true;\n }\n }\n\n private _subscribeToOpenCloseAllActions(): Subscription {\n return this.accordion._openCloseAllActions.subscribe(expanded => {\n // Only change expanded state if item is enabled\n if (!this.disabled) {\n this.expanded = expanded;\n }\n });\n }\n\n static ngAcceptInputType_expanded: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n","/**\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.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkAccordion} from './accordion';\nimport {CdkAccordionItem} from './accordion-item';\n\n\n@NgModule({\n exports: [CdkAccordion, CdkAccordionItem],\n declarations: [CdkAccordion, CdkAccordionItem],\n})\nexport class CdkAccordionModule {}\n","/**\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.io/license\n */\n\nexport {CdkAccordionItem} from './accordion-item';\nexport {CdkAccordion} from './accordion';\nexport * from './accordion-module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {CDK_ACCORDION as ɵangular_material_src_cdk_accordion_accordion_a} from './accordion';"],"names":["InjectionToken","Subject","coerceBooleanProperty","Directive","Input","nextId","Subscription","EventEmitter","Optional","Inject","SkipSelf","ChangeDetectorRef","UniqueSelectionDispatcher","Output","NgModule"],"mappings":";;;;;;IAAA;;;;;;;AAQA,IAIA;IACA,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf;;;;;AAKA,QAAa,aAAa,GAAG,IAAIA,mBAAc,CAAe,cAAc,CAAC,CAAC;IAE9E;;;AAQA;QALA;;YAOW,kBAAa,GAAG,IAAIC,YAAO,EAAiB,CAAC;;YAG7C,yB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,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,SAAS,CAAC,UAAA,QAAQ;;gBAE3D,IAAI,CAAC,KAAI,CAAC,QAAQ,EAAE;oBAClB,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;iBAC1B;aACF,CAAC,CAAC;SACJ;;;;gBA3HFC,cAAS,SAAC;oBACT,QAAQ,EAAE,wCAAwC;oBAClD,QAAQ,EAAE,kBAAkB;oBAC5B,SAAS,EAAE;;;wBAGT,EAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,IAAW,EAAC;qBAC9C;iBACF;;;gBAnBsB,YAAY,uBA+EpBK,aAAQ,YAAIC,WAAM,SAAC,aAAa,cAAGC,aAAQ;gBApFxDC,sBAAiB;gBAIXC,qCAAyB;;;yBAyB9BC,WAAM;yBAENA,WAAM;4BAENA,WAAM;iCAONA,WAAM;2BAMNT,UAAK;2BA8BLA,UAAK;;;IC3FR;;;;;;;AAQA;QASA;;;;;gBAJCU,aAAQ,SAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;oBACzC,YAAY,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;iBAC/C;;;IChBD;;;;;;OAMG;;ICNH;;OAEG;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"cdk-accordion.umd.js","sources":["../../../../../src/cdk/accordion/accordion.ts","../../../../../src/cdk/accordion/accordion-item.ts","../../../../../src/cdk/accordion/accordion-module.ts","../../../../../src/cdk/accordion/public-api.ts","../../../../../src/cdk/accordion/index.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.io/license\n */\n\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Directive, InjectionToken, Input, OnChanges, OnDestroy, SimpleChanges} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n/** Used to generate unique ID for each accordion. */\nlet nextId = 0;\n\n/**\n * Injection token that can be used to reference instances of `CdkAccordion`. It serves\n * as alternative token to the actual `CdkAccordion` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_ACCORDION = new InjectionToken<CdkAccordion>('CdkAccordion');\n\n/**\n * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.\n */\n@Directive({\n selector: 'cdk-accordion, [cdkAccordion]',\n exportAs: 'cdkAccordion',\n providers: [{provide: CDK_ACCORDION, useExisting: CdkAccordion}],\n})\nexport class CdkAccordion implements OnDestroy, OnChanges {\n /** Emits when the state of the accordion changes */\n readonly _stateChanges = new Subject<SimpleChanges>();\n\n /** Stream that emits true/false when openAll/closeAll is triggered. */\n readonly _openCloseAllActions: Subject<boolean> = new Subject<boolean>();\n\n /** A readonly id value to use for unique selection coordination. */\n readonly id = `cdk-accordion-${nextId++}`;\n\n /** Whether the accordion should allow multiple expanded accordion items simultaneously. */\n @Input()\n get multi(): boolean { return this._multi; }\n set multi(multi: boolean) { this._multi = coerceBooleanProperty(multi); }\n private _multi: boolean = false;\n\n /** Opens all enabled accordion items in an accordion where multi is enabled. */\n openAll(): void {\n if (this._multi) {\n this._openCloseAllActions.next(true);\n }\n }\n\n /** Closes all enabled accordion items in an accordion where multi is enabled. */\n closeAll(): void {\n this._openCloseAllActions.next(false);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n this._stateChanges.next(changes);\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n this._openCloseAllActions.complete();\n }\n\n static ngAcceptInputType_multi: BooleanInput;\n}\n","/**\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.io/license\n */\n\nimport {\n Output,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n Optional,\n ChangeDetectorRef,\n SkipSelf,\n Inject,\n} from '@angular/core';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {CDK_ACCORDION, CdkAccordion} from './accordion';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Subscription} from 'rxjs';\n\n/** Used to generate unique ID for each accordion item. */\nlet nextId = 0;\n\n/**\n * An basic directive expected to be extended and decorated as a component. Sets up all\n * events and attributes needed to be managed by a CdkAccordion parent.\n */\n@Directive({\n selector: 'cdk-accordion-item, [cdkAccordionItem]',\n exportAs: 'cdkAccordionItem',\n providers: [\n // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from\n // registering to the same accordion.\n {provide: CDK_ACCORDION, useValue: undefined},\n ],\n})\nexport class CdkAccordionItem implements OnDestroy {\n /** Subscription to openAll/closeAll events. */\n private _openCloseAllSubscription = Subscription.EMPTY;\n /** Event emitted every time the AccordionItem is closed. */\n @Output() closed: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted every time the AccordionItem is opened. */\n @Output() opened: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted when the AccordionItem is destroyed. */\n @Output() destroyed: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * Emits whenever the expanded state of the accordion changes.\n * Primarily used to facilitate two-way binding.\n * @docs-private\n */\n @Output() expandedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The unique AccordionItem id. */\n readonly id: string = `cdk-accordion-child-${nextId++}`;\n\n /** Whether the AccordionItem is expanded. */\n @Input()\n get expanded(): any { return this._expanded; }\n set expanded(expanded: any) {\n expanded = coerceBooleanProperty(expanded);\n\n // Only emit events and update the internal value if the value changes.\n if (this._expanded !== expanded) {\n this._expanded = expanded;\n this.expandedChange.emit(expanded);\n\n if (expanded) {\n this.opened.emit();\n /**\n * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n * the name value is the id of the accordion.\n */\n const accordionId = this.accordion ? this.accordion.id : this.id;\n this._expansionDispatcher.notify(this.id, accordionId);\n } else {\n this.closed.emit();\n }\n\n // Ensures that the animation will run when the value is set outside of an `@Input`.\n // This includes cases like the open, close and toggle methods.\n this._changeDetectorRef.markForCheck();\n }\n }\n private _expanded = false;\n\n /** Whether the AccordionItem is disabled. */\n @Input()\n get disabled() { return this._disabled; }\n set disabled(disabled: any) { this._disabled = coerceBooleanProperty(disabled); }\n private _disabled: boolean = false;\n\n /** Unregister function for _expansionDispatcher. */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n constructor(@Optional() @Inject(CDK_ACCORDION) @SkipSelf() public accordion: CdkAccordion,\n private _changeDetectorRef: ChangeDetectorRef,\n protected _expansionDispatcher: UniqueSelectionDispatcher) {\n this._removeUniqueSelectionListener =\n _expansionDispatcher.listen((id: string, accordionId: string) => {\n if (this.accordion && !this.accordion.multi &&\n this.accordion.id === accordionId && this.id !== id) {\n this.expanded = false;\n }\n });\n\n // When an accordion item is hosted in an accordion, subscribe to open/close events.\n if (this.accordion) {\n this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();\n }\n }\n\n /** Emits an event for the accordion item being destroyed. */\n ngOnDestroy() {\n this.opened.complete();\n this.closed.complete();\n this.destroyed.emit();\n this.destroyed.complete();\n this._removeUniqueSelectionListener();\n this._openCloseAllSubscription.unsubscribe();\n }\n\n /** Toggles the expanded state of the accordion item. */\n toggle(): void {\n if (!this.disabled) {\n this.expanded = !this.expanded;\n }\n }\n\n /** Sets the expanded state of the accordion item to false. */\n close(): void {\n if (!this.disabled) {\n this.expanded = false;\n }\n }\n\n /** Sets the expanded state of the accordion item to true. */\n open(): void {\n if (!this.disabled) {\n this.expanded = true;\n }\n }\n\n private _subscribeToOpenCloseAllActions(): Subscription {\n return this.accordion._openCloseAllActions.subscribe(expanded => {\n // Only change expanded state if item is enabled\n if (!this.disabled) {\n this.expanded = expanded;\n }\n });\n }\n\n static ngAcceptInputType_expanded: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n","/**\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.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkAccordion} from './accordion';\nimport {CdkAccordionItem} from './accordion-item';\n\n\n@NgModule({\n exports: [CdkAccordion, CdkAccordionItem],\n declarations: [CdkAccordion, CdkAccordionItem],\n})\nexport class CdkAccordionModule {}\n","/**\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.io/license\n */\n\nexport {CdkAccordionItem} from './accordion-item';\nexport {CdkAccordion} from './accordion';\nexport * from './accordion-module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {CDK_ACCORDION as ɵangular_material_src_cdk_accordion_accordion_a} from './accordion';"],"names":["InjectionToken","Subject","coerceBooleanProperty","Directive","Input","nextId","Subscription","EventEmitter","Optional","Inject","SkipSelf","ChangeDetectorRef","UniqueSelectionDispatcher","Output","NgModule"],"mappings":";;;;;;IAAA;;;;;;;AAQA,IAIA;IACA,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf;;;;;AAKA,QAAa,aAAa,GAAG,IAAIA,mBAAc,CAAe,cAAc,CAAC,CAAC;IAE9E;;;AAQA;QALA;;YAOW,kBAAa,GAAG,IAAIC,YAAO,EAAiB,CAAC;;YAG7C,yBAAoB,GAAqB,IAAIA,YAAO,EAAW,CAAC;;YAGhE,OAAE,GAAG,mBAAiB,MAAM,EAAI,CAAC;YAMlC,WAAM,GAAY,KAAK,CAAC;SAwBjC;QA3BC,sBACI,+BAAK;;iBADT,cACuB,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE;iBAC5C,UAAU,KAAc,IAAI,IAAI,CAAC,MAAM,GAAGC,8BAAqB,CAAC,KAAK,CAAC,CAAC,EAAE;;;WAD7B;;QAK5C,8BAAO,GAAP;YACE,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACtC;SACF;;QAGD,+BAAQ,GAAR;YACE,IAAI,CAAC,oBAAoB,CAAC,IAAI,C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AENA,WAAM;iCAONA,WAAM;2BAMNT,UAAK;2BA8BLA,UAAK;;;IC3FR;;;;;;;AAQA;QASA;;;;;gBAJCU,aAAQ,SAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;oBACzC,YAAY,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;iBAC/C;;;IChBD;;;;;;OAMG;;ICNH;;OAEG;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
|
-
*/var c=0,r=new t.InjectionToken("CdkAccordion"),s=function(){function e(){this._stateChanges=new i.Subject,this._openCloseAllActions=new i.Subject,this.id="cdk-accordion-"+c++,this._multi=!1}return Object.defineProperty(e.prototype,"multi",{get:function(){return this._multi},set:function(e){this._multi=n.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),e.prototype.openAll=function(){this.
|
|
8
|
+
*/var c=0,r=new t.InjectionToken("CdkAccordion"),s=function(){function e(){this._stateChanges=new i.Subject,this._openCloseAllActions=new i.Subject,this.id="cdk-accordion-"+c++,this._multi=!1}return Object.defineProperty(e.prototype,"multi",{get:function(){return this._multi},set:function(e){this._multi=n.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),e.prototype.openAll=function(){this._multi&&this._openCloseAllActions.next(!0)},e.prototype.closeAll=function(){this._openCloseAllActions.next(!1)},e.prototype.ngOnChanges=function(e){this._stateChanges.next(e)},e.prototype.ngOnDestroy=function(){this._stateChanges.complete(),this._openCloseAllActions.complete()},e}();s.decorators=[{type:t.Directive,args:[{selector:"cdk-accordion, [cdkAccordion]",exportAs:"cdkAccordion",providers:[{provide:r,useExisting:s}]}]}],s.propDecorators={multi:[{type:t.Input}]};
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["src/cdk/cdk-accordion.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","cdk","accordion","core","collections","coercion","rxjs","this","nextId","CDK_ACCORDION","InjectionToken","CdkAccordion","_stateChanges","Subject","_openCloseAllActions","id","_multi","Object","defineProperty","prototype","get","set","multi","coerceBooleanProperty","enumerable","configurable","openAll","_openCloseAll","closeAll","ngOnChanges","changes","next","ngOnDestroy","complete","expanded","decorators","type","Directive","args","selector","exportAs","providers","provide","useExisting","propDecorators","Input","CdkAccordionModule","nextId$1","CdkAccordionItem","_changeDetectorRef","_expansionDispatcher","_this","_openCloseAllSubscription","Subscription","EMPTY","closed","EventEmitter","opened","destroyed","expandedChange","_expanded","_disabled","_removeUniqueSelectionListener","listen","accordionId","_subscribeToOpenCloseAllActions","emit","notify","markForCheck","disabled","unsubscribe","toggle","close","open","subscribe","useValue","undefined","ctorParameters","Optional","Inject","SkipSelf","ChangeDetectorRef","UniqueSelectionDispatcher","Output","NgModule","declarations","ɵangular_material_src_cdk_accordion_accordion_a","value"],"mappings":"CAAC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,iBAAkBA,QAAQ,4BAA6BA,QAAQ,yBAA0BA,QAAQ,SACvK,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,yBAA0B,CAAC,UAAW,gBAAiB,2BAA4B,wBAAyB,QAASJ,GAC/IA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,IAAMT,EAAOQ,GAAGC,KAAO,GAAIT,EAAOQ,GAAGC,IAAIC,UAAY,IAAKV,EAAOQ,GAAGG,KAAMX,EAAOQ,GAAGC,IAAIG,YAAaZ,EAAOQ,GAAGC,IAAII,SAAUb,EAAOc,MAHlN,CAIEC,MAAM,SAAWb,EAASS,EAAMC,EAAaC,EAAUC,GAAQ;;;;;;;OAU7D,IAAIE,EAAS,EAMTC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7CtD,EAAQiB,aAAeA,EACvBjB,EAAQsD,iBAAmBA,EAC3BtD,EAAQoD,mBAAqBA,EAC7BpD,EAAQ4F,gDAAkD7E,EAE1DQ,OAAOC,eAAexB,EAAS,aAAc,CAAE6F,OAAO","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/collections'), require('@angular/cdk/coercion'), require('rxjs')) :\n typeof define === 'function' && define.amd ? define('@angular/cdk/accordion', ['exports', '@angular/core', '@angular/cdk/collections', '@angular/cdk/coercion', 'rxjs'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.accordion = {}), global.ng.core, global.ng.cdk.collections, global.ng.cdk.coercion, global.rxjs));\n}(this, (function (exports, core, collections, coercion, rxjs) { 'use strict';\n\n /**\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.io/license\n */\n /** Used to generate unique ID for each accordion. */\n var nextId = 0;\n /**\n * Injection token that can be used to reference instances of `CdkAccordion`. It serves\n * as alternative token to the actual `CdkAccordion` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\n var CDK_ACCORDION = new core.InjectionToken('CdkAccordion');\n /**\n * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.\n */\n var CdkAccordion = /** @class */ (function () {\n function CdkAccordion() {\n /** Emits when the state of the accordion changes */\n this._stateChanges = new rxjs.Subject();\n /** Stream that emits true/false when openAll/closeAll is triggered. */\n this._openCloseAllActions = new rxjs.Subject();\n /** A readonly id value to use for unique selection coordination. */\n this.id = \"cdk-accordion-\" + nextId++;\n this._multi = false;\n }\n Object.defineProperty(CdkAccordion.prototype, \"multi\", {\n /** Whether the accordion should allow multiple expanded accordion items simultaneously. */\n get: function () { return this._multi; },\n set: function (multi) { this._multi = coercion.coerceBooleanProperty(multi); },\n enumerable: false,\n configurable: true\n });\n /** Opens all enabled accordion items in an accordion where multi is enabled. */\n CdkAccordion.prototype.openAll = function () {\n this._openCloseAll(true);\n };\n /** Closes all enabled accordion items in an accordion where multi is enabled. */\n CdkAccordion.prototype.closeAll = function () {\n this._openCloseAll(false);\n };\n CdkAccordion.prototype.ngOnChanges = function (changes) {\n this._stateChanges.next(changes);\n };\n CdkAccordion.prototype.ngOnDestroy = function () {\n this._stateChanges.complete();\n };\n CdkAccordion.prototype._openCloseAll = function (expanded) {\n if (this.multi) {\n this._openCloseAllActions.next(expanded);\n }\n };\n return CdkAccordion;\n }());\n CdkAccordion.decorators = [\n { type: core.Directive, args: [{\n selector: 'cdk-accordion, [cdkAccordion]',\n exportAs: 'cdkAccordion',\n providers: [{ provide: CDK_ACCORDION, useExisting: CdkAccordion }],\n },] }\n ];\n CdkAccordion.propDecorators = {\n multi: [{ type: core.Input }]\n };\n\n /**\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.io/license\n */\n /** Used to generate unique ID for each accordion item. */\n var nextId$1 = 0;\n var ɵ0 = undefined;\n /**\n * An basic directive expected to be extended and decorated as a component. Sets up all\n * events and attributes needed to be managed by a CdkAccordion parent.\n */\n var CdkAccordionItem = /** @class */ (function () {\n function CdkAccordionItem(accordion, _changeDetectorRef, _expansionDispatcher) {\n var _this = this;\n this.accordion = accordion;\n this._changeDetectorRef = _changeDetectorRef;\n this._expansionDispatcher = _expansionDispatcher;\n /** Subscription to openAll/closeAll events. */\n this._openCloseAllSubscription = rxjs.Subscription.EMPTY;\n /** Event emitted every time the AccordionItem is closed. */\n this.closed = new core.EventEmitter();\n /** Event emitted every time the AccordionItem is opened. */\n this.opened = new core.EventEmitter();\n /** Event emitted when the AccordionItem is destroyed. */\n this.destroyed = new core.EventEmitter();\n /**\n * Emits whenever the expanded state of the accordion changes.\n * Primarily used to facilitate two-way binding.\n * @docs-private\n */\n this.expandedChange = new core.EventEmitter();\n /** The unique AccordionItem id. */\n this.id = \"cdk-accordion-child-\" + nextId$1++;\n this._expanded = false;\n this._disabled = false;\n /** Unregister function for _expansionDispatcher. */\n this._removeUniqueSelectionListener = function () { };\n this._removeUniqueSelectionListener =\n _expansionDispatcher.listen(function (id, accordionId) {\n if (_this.accordion && !_this.accordion.multi &&\n _this.accordion.id === accordionId && _this.id !== id) {\n _this.expanded = false;\n }\n });\n // When an accordion item is hosted in an accordion, subscribe to open/close events.\n if (this.accordion) {\n this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();\n }\n }\n Object.defineProperty(CdkAccordionItem.prototype, \"expanded\", {\n /** Whether the AccordionItem is expanded. */\n get: function () { return this._expanded; },\n set: function (expanded) {\n expanded = coercion.coerceBooleanProperty(expanded);\n // Only emit events and update the internal value if the value changes.\n if (this._expanded !== expanded) {\n this._expanded = expanded;\n this.expandedChange.emit(expanded);\n if (expanded) {\n this.opened.emit();\n /**\n * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n * the name value is the id of the accordion.\n */\n var accordionId = this.accordion ? this.accordion.id : this.id;\n this._expansionDispatcher.notify(this.id, accordionId);\n }\n else {\n this.closed.emit();\n }\n // Ensures that the animation will run when the value is set outside of an `@Input`.\n // This includes cases like the open, close and toggle methods.\n this._changeDetectorRef.markForCheck();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CdkAccordionItem.prototype, \"disabled\", {\n /** Whether the AccordionItem is disabled. */\n get: function () { return this._disabled; },\n set: function (disabled) { this._disabled = coercion.coerceBooleanProperty(disabled); },\n enumerable: false,\n configurable: true\n });\n /** Emits an event for the accordion item being destroyed. */\n CdkAccordionItem.prototype.ngOnDestroy = function () {\n this.opened.complete();\n this.closed.complete();\n this.destroyed.emit();\n this.destroyed.complete();\n this._removeUniqueSelectionListener();\n this._openCloseAllSubscription.unsubscribe();\n };\n /** Toggles the expanded state of the accordion item. */\n CdkAccordionItem.prototype.toggle = function () {\n if (!this.disabled) {\n this.expanded = !this.expanded;\n }\n };\n /** Sets the expanded state of the accordion item to false. */\n CdkAccordionItem.prototype.close = function () {\n if (!this.disabled) {\n this.expanded = false;\n }\n };\n /** Sets the expanded state of the accordion item to true. */\n CdkAccordionItem.prototype.open = function () {\n if (!this.disabled) {\n this.expanded = true;\n }\n };\n CdkAccordionItem.prototype._subscribeToOpenCloseAllActions = function () {\n var _this = this;\n return this.accordion._openCloseAllActions.subscribe(function (expanded) {\n // Only change expanded state if item is enabled\n if (!_this.disabled) {\n _this.expanded = expanded;\n }\n });\n };\n return CdkAccordionItem;\n }());\n CdkAccordionItem.decorators = [\n { type: core.Directive, args: [{\n selector: 'cdk-accordion-item, [cdkAccordionItem]',\n exportAs: 'cdkAccordionItem',\n providers: [\n // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from\n // registering to the same accordion.\n { provide: CDK_ACCORDION, useValue: ɵ0 },\n ],\n },] }\n ];\n CdkAccordionItem.ctorParameters = function () { return [\n { type: CdkAccordion, decorators: [{ type: core.Optional }, { type: core.Inject, args: [CDK_ACCORDION,] }, { type: core.SkipSelf }] },\n { type: core.ChangeDetectorRef },\n { type: collections.UniqueSelectionDispatcher }\n ]; };\n CdkAccordionItem.propDecorators = {\n closed: [{ type: core.Output }],\n opened: [{ type: core.Output }],\n destroyed: [{ type: core.Output }],\n expandedChange: [{ type: core.Output }],\n expanded: [{ type: core.Input }],\n disabled: [{ type: core.Input }]\n };\n\n /**\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.io/license\n */\n var CdkAccordionModule = /** @class */ (function () {\n function CdkAccordionModule() {\n }\n return CdkAccordionModule;\n }());\n CdkAccordionModule.decorators = [\n { type: core.NgModule, args: [{\n exports: [CdkAccordion, CdkAccordionItem],\n declarations: [CdkAccordion, CdkAccordionItem],\n },] }\n ];\n\n /**\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.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.CdkAccordion = CdkAccordion;\n exports.CdkAccordionItem = CdkAccordionItem;\n exports.CdkAccordionModule = CdkAccordionModule;\n exports.ɵangular_material_src_cdk_accordion_accordion_a = CDK_ACCORDION;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cdk-accordion.umd.js.map\n"]}
|
|
1
|
+
{"version":3,"sources":["src/cdk/cdk-accordion.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","cdk","accordion","core","collections","coercion","rxjs","this","nextId","CDK_ACCORDION","InjectionToken","CdkAccordion","_stateChanges","Subject","_openCloseAllActions","id","_multi","Object","defineProperty","prototype","get","set","multi","coerceBooleanProperty","enumerable","configurable","openAll","next","closeAll","ngOnChanges","changes","ngOnDestroy","complete","decorators","type","Directive","args","selector","exportAs","providers","provide","useExisting","propDecorators","Input","CdkAccordionModule","nextId$1","CdkAccordionItem","_changeDetectorRef","_expansionDispatcher","_this","_openCloseAllSubscription","Subscription","EMPTY","closed","EventEmitter","opened","destroyed","expandedChange","_expanded","_disabled","_removeUniqueSelectionListener","listen","accordionId","expanded","_subscribeToOpenCloseAllActions","emit","notify","markForCheck","disabled","unsubscribe","toggle","close","open","subscribe","useValue","undefined","ctorParameters","Optional","Inject","SkipSelf","ChangeDetectorRef","UniqueSelectionDispatcher","Output","NgModule","declarations","ɵangular_material_src_cdk_accordion_accordion_a","value"],"mappings":"CAAC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,iBAAkBA,QAAQ,4BAA6BA,QAAQ,yBAA0BA,QAAQ,SACvK,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,yBAA0B,CAAC,UAAW,gBAAiB,2BAA4B,wBAAyB,QAASJ,GAC/IA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,IAAMT,E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AM/B,EAAKwC,QACxByB,SAAU,CAAC,CAAElC,KAAM/B,EAAKwC,UAUxBC,EACA,SAASA,OAIMX,WAAa,CAC5B,CAAEC,KAAM/B,EAAKgF,SAAU/C,KAAM,CAAC,CAClB1C,QAAS,CAACiB,EAAcmC,GACxBsC,aAAc,CAACzE,EAAcmC;;;;;;;;AAgB7CpD,EAAQiB,aAAeA,EACvBjB,EAAQoD,iBAAmBA,EAC3BpD,EAAQkD,mBAAqBA,EAC7BlD,EAAQ2F,gDAAkD5E,EAE1DQ,OAAOC,eAAexB,EAAS,aAAc,CAAE4F,OAAO","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/collections'), require('@angular/cdk/coercion'), require('rxjs')) :\n typeof define === 'function' && define.amd ? define('@angular/cdk/accordion', ['exports', '@angular/core', '@angular/cdk/collections', '@angular/cdk/coercion', 'rxjs'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.accordion = {}), global.ng.core, global.ng.cdk.collections, global.ng.cdk.coercion, global.rxjs));\n}(this, (function (exports, core, collections, coercion, rxjs) { 'use strict';\n\n /**\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.io/license\n */\n /** Used to generate unique ID for each accordion. */\n var nextId = 0;\n /**\n * Injection token that can be used to reference instances of `CdkAccordion`. It serves\n * as alternative token to the actual `CdkAccordion` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\n var CDK_ACCORDION = new core.InjectionToken('CdkAccordion');\n /**\n * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.\n */\n var CdkAccordion = /** @class */ (function () {\n function CdkAccordion() {\n /** Emits when the state of the accordion changes */\n this._stateChanges = new rxjs.Subject();\n /** Stream that emits true/false when openAll/closeAll is triggered. */\n this._openCloseAllActions = new rxjs.Subject();\n /** A readonly id value to use for unique selection coordination. */\n this.id = \"cdk-accordion-\" + nextId++;\n this._multi = false;\n }\n Object.defineProperty(CdkAccordion.prototype, \"multi\", {\n /** Whether the accordion should allow multiple expanded accordion items simultaneously. */\n get: function () { return this._multi; },\n set: function (multi) { this._multi = coercion.coerceBooleanProperty(multi); },\n enumerable: false,\n configurable: true\n });\n /** Opens all enabled accordion items in an accordion where multi is enabled. */\n CdkAccordion.prototype.openAll = function () {\n if (this._multi) {\n this._openCloseAllActions.next(true);\n }\n };\n /** Closes all enabled accordion items in an accordion where multi is enabled. */\n CdkAccordion.prototype.closeAll = function () {\n this._openCloseAllActions.next(false);\n };\n CdkAccordion.prototype.ngOnChanges = function (changes) {\n this._stateChanges.next(changes);\n };\n CdkAccordion.prototype.ngOnDestroy = function () {\n this._stateChanges.complete();\n this._openCloseAllActions.complete();\n };\n return CdkAccordion;\n }());\n CdkAccordion.decorators = [\n { type: core.Directive, args: [{\n selector: 'cdk-accordion, [cdkAccordion]',\n exportAs: 'cdkAccordion',\n providers: [{ provide: CDK_ACCORDION, useExisting: CdkAccordion }],\n },] }\n ];\n CdkAccordion.propDecorators = {\n multi: [{ type: core.Input }]\n };\n\n /**\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.io/license\n */\n /** Used to generate unique ID for each accordion item. */\n var nextId$1 = 0;\n var ɵ0 = undefined;\n /**\n * An basic directive expected to be extended and decorated as a component. Sets up all\n * events and attributes needed to be managed by a CdkAccordion parent.\n */\n var CdkAccordionItem = /** @class */ (function () {\n function CdkAccordionItem(accordion, _changeDetectorRef, _expansionDispatcher) {\n var _this = this;\n this.accordion = accordion;\n this._changeDetectorRef = _changeDetectorRef;\n this._expansionDispatcher = _expansionDispatcher;\n /** Subscription to openAll/closeAll events. */\n this._openCloseAllSubscription = rxjs.Subscription.EMPTY;\n /** Event emitted every time the AccordionItem is closed. */\n this.closed = new core.EventEmitter();\n /** Event emitted every time the AccordionItem is opened. */\n this.opened = new core.EventEmitter();\n /** Event emitted when the AccordionItem is destroyed. */\n this.destroyed = new core.EventEmitter();\n /**\n * Emits whenever the expanded state of the accordion changes.\n * Primarily used to facilitate two-way binding.\n * @docs-private\n */\n this.expandedChange = new core.EventEmitter();\n /** The unique AccordionItem id. */\n this.id = \"cdk-accordion-child-\" + nextId$1++;\n this._expanded = false;\n this._disabled = false;\n /** Unregister function for _expansionDispatcher. */\n this._removeUniqueSelectionListener = function () { };\n this._removeUniqueSelectionListener =\n _expansionDispatcher.listen(function (id, accordionId) {\n if (_this.accordion && !_this.accordion.multi &&\n _this.accordion.id === accordionId && _this.id !== id) {\n _this.expanded = false;\n }\n });\n // When an accordion item is hosted in an accordion, subscribe to open/close events.\n if (this.accordion) {\n this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();\n }\n }\n Object.defineProperty(CdkAccordionItem.prototype, \"expanded\", {\n /** Whether the AccordionItem is expanded. */\n get: function () { return this._expanded; },\n set: function (expanded) {\n expanded = coercion.coerceBooleanProperty(expanded);\n // Only emit events and update the internal value if the value changes.\n if (this._expanded !== expanded) {\n this._expanded = expanded;\n this.expandedChange.emit(expanded);\n if (expanded) {\n this.opened.emit();\n /**\n * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n * the name value is the id of the accordion.\n */\n var accordionId = this.accordion ? this.accordion.id : this.id;\n this._expansionDispatcher.notify(this.id, accordionId);\n }\n else {\n this.closed.emit();\n }\n // Ensures that the animation will run when the value is set outside of an `@Input`.\n // This includes cases like the open, close and toggle methods.\n this._changeDetectorRef.markForCheck();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CdkAccordionItem.prototype, \"disabled\", {\n /** Whether the AccordionItem is disabled. */\n get: function () { return this._disabled; },\n set: function (disabled) { this._disabled = coercion.coerceBooleanProperty(disabled); },\n enumerable: false,\n configurable: true\n });\n /** Emits an event for the accordion item being destroyed. */\n CdkAccordionItem.prototype.ngOnDestroy = function () {\n this.opened.complete();\n this.closed.complete();\n this.destroyed.emit();\n this.destroyed.complete();\n this._removeUniqueSelectionListener();\n this._openCloseAllSubscription.unsubscribe();\n };\n /** Toggles the expanded state of the accordion item. */\n CdkAccordionItem.prototype.toggle = function () {\n if (!this.disabled) {\n this.expanded = !this.expanded;\n }\n };\n /** Sets the expanded state of the accordion item to false. */\n CdkAccordionItem.prototype.close = function () {\n if (!this.disabled) {\n this.expanded = false;\n }\n };\n /** Sets the expanded state of the accordion item to true. */\n CdkAccordionItem.prototype.open = function () {\n if (!this.disabled) {\n this.expanded = true;\n }\n };\n CdkAccordionItem.prototype._subscribeToOpenCloseAllActions = function () {\n var _this = this;\n return this.accordion._openCloseAllActions.subscribe(function (expanded) {\n // Only change expanded state if item is enabled\n if (!_this.disabled) {\n _this.expanded = expanded;\n }\n });\n };\n return CdkAccordionItem;\n }());\n CdkAccordionItem.decorators = [\n { type: core.Directive, args: [{\n selector: 'cdk-accordion-item, [cdkAccordionItem]',\n exportAs: 'cdkAccordionItem',\n providers: [\n // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from\n // registering to the same accordion.\n { provide: CDK_ACCORDION, useValue: ɵ0 },\n ],\n },] }\n ];\n CdkAccordionItem.ctorParameters = function () { return [\n { type: CdkAccordion, decorators: [{ type: core.Optional }, { type: core.Inject, args: [CDK_ACCORDION,] }, { type: core.SkipSelf }] },\n { type: core.ChangeDetectorRef },\n { type: collections.UniqueSelectionDispatcher }\n ]; };\n CdkAccordionItem.propDecorators = {\n closed: [{ type: core.Output }],\n opened: [{ type: core.Output }],\n destroyed: [{ type: core.Output }],\n expandedChange: [{ type: core.Output }],\n expanded: [{ type: core.Input }],\n disabled: [{ type: core.Input }]\n };\n\n /**\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.io/license\n */\n var CdkAccordionModule = /** @class */ (function () {\n function CdkAccordionModule() {\n }\n return CdkAccordionModule;\n }());\n CdkAccordionModule.decorators = [\n { type: core.NgModule, args: [{\n exports: [CdkAccordion, CdkAccordionItem],\n declarations: [CdkAccordion, CdkAccordionItem],\n },] }\n ];\n\n /**\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.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.CdkAccordion = CdkAccordion;\n exports.CdkAccordionItem = CdkAccordionItem;\n exports.CdkAccordionModule = CdkAccordionModule;\n exports.ɵangular_material_src_cdk_accordion_accordion_a = CDK_ACCORDION;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cdk-accordion.umd.js.map\n"]}
|
|
@@ -204,8 +204,9 @@
|
|
|
204
204
|
/** Check whether the browser supports scroll behaviors. */
|
|
205
205
|
function supportsScrollBehavior() {
|
|
206
206
|
if (scrollBehaviorSupported == null) {
|
|
207
|
-
// If we're not in the browser, it can't be supported.
|
|
208
|
-
|
|
207
|
+
// If we're not in the browser, it can't be supported. Also check for `Element`, because
|
|
208
|
+
// some projects stub out the global `document` during SSR which can throw us off.
|
|
209
|
+
if (typeof document !== 'object' || !document || typeof Element !== 'function' || !Element) {
|
|
209
210
|
scrollBehaviorSupported = false;
|
|
210
211
|
return scrollBehaviorSupported;
|
|
211
212
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk-platform.umd.js","sources":["../../../../../src/cdk/platform/platform.ts","../../../../../src/cdk/platform/platform-module.ts","../../../../../src/cdk/platform/features/input-types.ts","../../../../../src/cdk/platform/features/passive-listeners.ts","../../../../../src/cdk/platform/features/scrolling.ts","../../../../../src/cdk/platform/features/shadow-dom.ts","../../../../../src/cdk/platform/public-api.ts","../../../../../src/cdk/platform/index.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.io/license\n */\n\nimport {Inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);\n} catch {\n hasV8BreakIterator = false;\n}\n\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n@Injectable({providedIn: 'root'})\nexport class Platform {\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n isBrowser: boolean = this._platformId ?\n isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;\n\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean = this.isBrowser && (!!((window as any).chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n\n constructor(@Inject(PLATFORM_ID) private _platformId: Object) {}\n}\n\n","/**\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.io/license\n */\n\nimport {NgModule} from '@angular/core';\n\n\n@NgModule({})\nexport class PlatformModule {}\n","/**\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.io/license\n */\n\n/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes: Set<string>;\n\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n\n/** @returns The input types supported by this browser. */\nexport function getSupportedInputTypes(): Set<string> {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n\n return supportedInputTypes;\n}\n","/**\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.io/license\n */\n\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function supportsPassiveEventListeners(): boolean {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null!, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}\n\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nexport function normalizePassiveListenerOptions(options: AddEventListenerOptions):\n AddEventListenerOptions | boolean {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n}\n","/**\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.io/license\n */\n\n/** The possible ways the browser may handle the horizontal scroll axis in RTL languages. */\nexport const enum RtlScrollAxisType {\n /**\n * scrollLeft is 0 when scrolled all the way left and (scrollWidth - clientWidth) when scrolled\n * all the way right.\n */\n NORMAL,\n /**\n * scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n NEGATED,\n /**\n * scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n INVERTED\n}\n\n/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\nlet rtlScrollAxisType: RtlScrollAxisType|undefined;\n\n/** Cached result of the check that indicates whether the browser supports scroll behaviors. */\nlet scrollBehaviorSupported: boolean|undefined;\n\n/** Check whether the browser supports scroll behaviors. */\nexport function supportsScrollBehavior(): boolean {\n if (scrollBehaviorSupported == null) {\n // If we're not in the browser, it can't be supported.\n if (typeof document !== 'object' || !document) {\n scrollBehaviorSupported = false;\n return scrollBehaviorSupported;\n }\n\n // If the element can have a `scrollBehavior` style, we can be sure that it's supported.\n if ('scrollBehavior' in document.documentElement!.style) {\n scrollBehaviorSupported = true;\n } else {\n // At this point we have 3 possibilities: `scrollTo` isn't supported at all, it's\n // supported but it doesn't handle scroll behavior, or it has been polyfilled.\n const scrollToFunction: Function|undefined = Element.prototype.scrollTo;\n\n if (scrollToFunction) {\n // We can detect if the function has been polyfilled by calling `toString` on it. Native\n // functions are obfuscated using `[native code]`, whereas if it was overwritten we'd get\n // the actual function source. Via https://davidwalsh.name/detect-native-function. Consider\n // polyfilled functions as supporting scroll behavior.\n scrollBehaviorSupported = !/\\{\\s*\\[native code\\]\\s*\\}/.test(scrollToFunction.toString());\n } else {\n scrollBehaviorSupported = false;\n }\n }\n }\n\n return scrollBehaviorSupported;\n}\n\n/**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\nexport function getRtlScrollAxisType(): RtlScrollAxisType {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return RtlScrollAxisType.NORMAL;\n }\n\n if (rtlScrollAxisType == null) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n const scrollContainer = document.createElement('div');\n const containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n\n const content = document.createElement('div');\n const contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n\n rtlScrollAxisType = RtlScrollAxisType.NORMAL;\n\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? RtlScrollAxisType.NEGATED : RtlScrollAxisType.INVERTED;\n }\n\n scrollContainer.parentNode!.removeChild(scrollContainer);\n }\n return rtlScrollAxisType;\n}\n","/**\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.io/license\n */\n\nlet shadowDomIsSupported: boolean;\n\n/** Checks whether the user's browser support Shadow DOM. */\nexport function _supportsShadowDom(): boolean {\n if (shadowDomIsSupported == null) {\n const head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && ((head as any).createShadowRoot || head.attachShadow));\n }\n\n return shadowDomIsSupported;\n}\n\n/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\nexport function _getShadowRoot(element: HTMLElement): ShadowRoot | null {\n if (_supportsShadowDom()) {\n const rootNode = element.getRootNode ? element.getRootNode() : null;\n\n // Note that this should be caught by `_supportsShadowDom`, but some\n // teams have been able to hit this code path on unsupported browsers.\n if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n return rootNode;\n }\n }\n\n return null;\n}\n","/**\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.io/license\n */\n\nexport * from './platform';\nexport * from './platform-module';\nexport * from './features/input-types';\nexport * from './features/passive-listeners';\nexport * from './features/scrolling';\nexport * from './features/shadow-dom';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["isPlatformBrowser","Injectable","Inject","PLATFORM_ID","NgModule"],"mappings":";;;;;;IAAA;;;;;;;AAQA,IAGA;IACA;IACA,IAAI,kBAA2B,CAAC;IAEhC;IACA;IACA;IACA;IACA;IACA,IAAI;QACF,kBAAkB,IAAI,OAAO,IAAI,KAAK,WAAW,IAAK,IAAY,CAAC,eAAe,CAAC,CAAC;KACrF;IAAC,WAAM;QACN,kBAAkB,GAAG,KAAK,CAAC;KAC5B;IAED;;;;AAKA;QA8CE,kBAAyC,WAAmB;YAAnB,gBAAW,GAAX,WAAW,CAAQ;;;;;YAzC5D,cAAS,GAAY,IAAI,CAAC,WAAW;gBACjCA,wBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC;;YAGrF,SAAI,GAAY,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;;YAGtE,YAAO,GAAY,IAAI,CAAC,SAAS,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;;;YAIjF,UAAK,GAAY,IAAI,CAAC,SAAS,KAAK,CAAC,EAAG,MAAc,CAAC,MAAM,IAAI,kBAAkB,CAAC;gBAChF,OAAO,GAAG,KAAK,WAAW,I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,OAAO,IAAI,CAAC;IACd,CAAC;;ICjCD;;;;;;OAMG;;ICNH;;OAEG;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"cdk-platform.umd.js","sources":["../../../../../src/cdk/platform/platform.ts","../../../../../src/cdk/platform/platform-module.ts","../../../../../src/cdk/platform/features/input-types.ts","../../../../../src/cdk/platform/features/passive-listeners.ts","../../../../../src/cdk/platform/features/scrolling.ts","../../../../../src/cdk/platform/features/shadow-dom.ts","../../../../../src/cdk/platform/public-api.ts","../../../../../src/cdk/platform/index.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.io/license\n */\n\nimport {Inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);\n} catch {\n hasV8BreakIterator = false;\n}\n\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n@Injectable({providedIn: 'root'})\nexport class Platform {\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n isBrowser: boolean = this._platformId ?\n isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;\n\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean = this.isBrowser && (!!((window as any).chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n\n constructor(@Inject(PLATFORM_ID) private _platformId: Object) {}\n}\n\n","/**\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.io/license\n */\n\nimport {NgModule} from '@angular/core';\n\n\n@NgModule({})\nexport class PlatformModule {}\n","/**\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.io/license\n */\n\n/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes: Set<string>;\n\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n\n/** @returns The input types supported by this browser. */\nexport function getSupportedInputTypes(): Set<string> {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n\n return supportedInputTypes;\n}\n","/**\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.io/license\n */\n\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function supportsPassiveEventListeners(): boolean {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null!, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}\n\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nexport function normalizePassiveListenerOptions(options: AddEventListenerOptions):\n AddEventListenerOptions | boolean {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n}\n","/**\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.io/license\n */\n\n/** The possible ways the browser may handle the horizontal scroll axis in RTL languages. */\nexport const enum RtlScrollAxisType {\n /**\n * scrollLeft is 0 when scrolled all the way left and (scrollWidth - clientWidth) when scrolled\n * all the way right.\n */\n NORMAL,\n /**\n * scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n NEGATED,\n /**\n * scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n INVERTED\n}\n\n/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\nlet rtlScrollAxisType: RtlScrollAxisType|undefined;\n\n/** Cached result of the check that indicates whether the browser supports scroll behaviors. */\nlet scrollBehaviorSupported: boolean|undefined;\n\n/** Check whether the browser supports scroll behaviors. */\nexport function supportsScrollBehavior(): boolean {\n if (scrollBehaviorSupported == null) {\n // If we're not in the browser, it can't be supported. Also check for `Element`, because\n // some projects stub out the global `document` during SSR which can throw us off.\n if (typeof document !== 'object' || !document || typeof Element !== 'function' || !Element) {\n scrollBehaviorSupported = false;\n return scrollBehaviorSupported;\n }\n\n // If the element can have a `scrollBehavior` style, we can be sure that it's supported.\n if ('scrollBehavior' in document.documentElement!.style) {\n scrollBehaviorSupported = true;\n } else {\n // At this point we have 3 possibilities: `scrollTo` isn't supported at all, it's\n // supported but it doesn't handle scroll behavior, or it has been polyfilled.\n const scrollToFunction: Function|undefined = Element.prototype.scrollTo;\n\n if (scrollToFunction) {\n // We can detect if the function has been polyfilled by calling `toString` on it. Native\n // functions are obfuscated using `[native code]`, whereas if it was overwritten we'd get\n // the actual function source. Via https://davidwalsh.name/detect-native-function. Consider\n // polyfilled functions as supporting scroll behavior.\n scrollBehaviorSupported = !/\\{\\s*\\[native code\\]\\s*\\}/.test(scrollToFunction.toString());\n } else {\n scrollBehaviorSupported = false;\n }\n }\n }\n\n return scrollBehaviorSupported;\n}\n\n/**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\nexport function getRtlScrollAxisType(): RtlScrollAxisType {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return RtlScrollAxisType.NORMAL;\n }\n\n if (rtlScrollAxisType == null) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n const scrollContainer = document.createElement('div');\n const containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n\n const content = document.createElement('div');\n const contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n\n rtlScrollAxisType = RtlScrollAxisType.NORMAL;\n\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? RtlScrollAxisType.NEGATED : RtlScrollAxisType.INVERTED;\n }\n\n scrollContainer.parentNode!.removeChild(scrollContainer);\n }\n return rtlScrollAxisType;\n}\n","/**\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.io/license\n */\n\nlet shadowDomIsSupported: boolean;\n\n/** Checks whether the user's browser support Shadow DOM. */\nexport function _supportsShadowDom(): boolean {\n if (shadowDomIsSupported == null) {\n const head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && ((head as any).createShadowRoot || head.attachShadow));\n }\n\n return shadowDomIsSupported;\n}\n\n/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\nexport function _getShadowRoot(element: HTMLElement): ShadowRoot | null {\n if (_supportsShadowDom()) {\n const rootNode = element.getRootNode ? element.getRootNode() : null;\n\n // Note that this should be caught by `_supportsShadowDom`, but some\n // teams have been able to hit this code path on unsupported browsers.\n if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n return rootNode;\n }\n }\n\n return null;\n}\n","/**\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.io/license\n */\n\nexport * from './platform';\nexport * from './platform-module';\nexport * from './features/input-types';\nexport * from './features/passive-listeners';\nexport * from './features/scrolling';\nexport * from './features/shadow-dom';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["isPlatformBrowser","Injectable","Inject","PLATFORM_ID","NgModule"],"mappings":";;;;;;IAAA;;;;;;;AAQA,IAGA;IACA;IACA,IAAI,kBAA2B,CAAC;IAEhC;IACA;IACA;IACA;IACA;IACA,IAAI;QACF,kBAAkB,IAAI,OAAO,IAAI,KAAK,WAAW,IAAK,IAAY,CAAC,eAAe,CAAC,CAAC;KACrF;IAAC,WAAM;QACN,kBAAkB,GAAG,KAAK,CAAC;KAC5B;IAED;;;;AAKA;QA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ACA,aAAgB,kBAAkB;QAChC,IAAI,oBAAoB,IAAI,IAAI,EAAE;YAChC,IAAM,IAAI,GAAG,OAAO,QAAQ,KAAK,WAAW,GAAG,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;YACpE,oBAAoB,GAAG,CAAC,EAAE,IAAI,KAAM,IAAY,CAAC,gBAAgB,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;SAC1F;QAED,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IAED;AACA,aAAgB,cAAc,CAAC,OAAoB;QACjD,IAAI,kBAAkB,EAAE,EAAE;YACxB,IAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC;;;YAIpE,IAAI,OAAO,UAAU,KAAK,WAAW,IAAI,UAAU,IAAI,QAAQ,YAAY,UAAU,EAAE;gBACrF,OAAO,QAAQ,CAAC;aACjB;SACF;QAED,OAAO,IAAI,CAAC;IACd,CAAC;;ICjCD;;;;;;OAMG;;ICNH;;OAEG;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
|
-
*/var n,r,i,s;try{n="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(e){n=!1}(r=function r(e){this._platformId=e,this.isBrowser=this._platformId?o.isPlatformBrowser(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!n)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}).ɵprov=t.ɵɵdefineInjectable({factory:function e(){return new r(t.ɵɵinject(t.PLATFORM_ID))},token:r,providedIn:"root"}),r.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]},(s=function s(){}).decorators=[{type:t.NgModule,args:[{}]}];var a,d,u,c
|
|
8
|
+
*/var n,r,i,s;try{n="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(e){n=!1}(r=function r(e){this._platformId=e,this.isBrowser=this._platformId?o.isPlatformBrowser(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!n)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}).ɵprov=t.ɵɵdefineInjectable({factory:function e(){return new r(t.ɵɵinject(t.PLATFORM_ID))},token:r,providedIn:"root"}),r.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]},(s=function s(){}).decorators=[{type:t.NgModule,args:[{}]}];var a,d,u,l,c=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function f(){if(null==a&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return a=!0}}))}finally{a=a||!1}return a}function p(){if(null==l){var e="undefined"!=typeof document?document.head:null;l=!(!e||!e.createShadowRoot&&!e.attachShadow)}return l}
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -20,7 +20,7 @@ e.Platform=r,e.PlatformModule=s,e._getShadowRoot=function h(e){if(p()){var t=e.g
|
|
|
20
20
|
*
|
|
21
21
|
* Use of this source code is governed by an MIT-style license that can be
|
|
22
22
|
* found in the LICENSE file at https://angular.io/license
|
|
23
|
-
*/,e.getSupportedInputTypes=function g(){if(i)return i;if("object"!=typeof document||!document)return i=new Set(
|
|
23
|
+
*/,e.getSupportedInputTypes=function g(){if(i)return i;if("object"!=typeof document||!document)return i=new Set(c);var e=document.createElement("input");return i=new Set(c.filter((function(t){return e.setAttribute("type",t),e.type===t})))}
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -34,4 +34,4 @@ e.Platform=r,e.PlatformModule=s,e._getShadowRoot=function h(e){if(p()){var t=e.g
|
|
|
34
34
|
*
|
|
35
35
|
* Use of this source code is governed by an MIT-style license that can be
|
|
36
36
|
* found in the LICENSE file at https://angular.io/license
|
|
37
|
-
*/,e.supportsPassiveEventListeners=f,e.supportsScrollBehavior=function w(){if(null==u){if("object"!=typeof document||!document)return u=!1;if("scrollBehavior"in document.documentElement.style)u=!0;else{var e=Element.prototype.scrollTo;u=!!e&&!/\{\s*\[native code\]\s*\}/.test(e.toString())}}return u},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
37
|
+
*/,e.supportsPassiveEventListeners=f,e.supportsScrollBehavior=function w(){if(null==u){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return u=!1;if("scrollBehavior"in document.documentElement.style)u=!0;else{var e=Element.prototype.scrollTo;u=!!e&&!/\{\s*\[native code\]\s*\}/.test(e.toString())}}return u},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["src/cdk/cdk-platform.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","cdk","platform","core","common","this","i0","hasV8BreakIterator","Platform","supportedInputTypes","PlatformModule","Intl","v8BreakIterator","_a","_platformId","isBrowser","isPlatformBrowser","document","EDGE","test","navigator","userAgent","TRIDENT","BLINK","window","chrome","CSS","WEBKIT","IOS","FIREFOX","ANDROID","SAFARI","ɵprov","ɵɵdefineInjectable","Platform_Factory","ɵɵinject","PLATFORM_ID","token","providedIn","decorators","type","Injectable","args","ctorParameters","Object","Inject","NgModule","supportsPassiveEvents","rtlScrollAxisType","scrollBehaviorSupported","shadowDomIsSupported","candidateInputTypes","supportsPassiveEventListeners","addEventListener","defineProperty","get","_supportsShadowDom","head","createShadowRoot","attachShadow","_getShadowRoot","element","rootNode","getRootNode","ShadowRoot","getRtlScrollAxisType","scrollContainer","createElement","containerStyle","style","dir","width","overflow","visibility","pointerEvents","position","content","contentStyle","height","appendChild","body","scrollLeft","parentNode","removeChild","getSupportedInputTypes","Set","featureTestInput","filter","value","setAttribute","normalizePassiveListenerOptions","options","capture","supportsScrollBehavior","documentElement","scrollToFunction","Element","prototype","scrollTo","toString"],"mappings":"CAAC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,iBAAkBA,QAAQ,oBAChG,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,wBAAyB,CAAC,UAAW,gBAAiB,mBAAoBJ,GACpGA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,G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require('@angular/core'), require('@angular/common')) :\n typeof define === 'function' && define.amd ? define('@angular/cdk/platform', ['exports', '@angular/core', '@angular/common'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.platform = {}), global.ng.core, global.ng.common));\n}(this, (function (exports, i0, common) { 'use strict';\n\n /**\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.io/license\n */\n // Whether the current platform supports the V8 Break Iterator. The V8 check\n // is necessary to detect all Blink based browsers.\n var hasV8BreakIterator;\n // We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n // cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n // the consumer is providing a polyfilled `Map`. See:\n // https://github.com/Microsoft/ChakraCore/issues/3189\n // https://github.com/angular/components/issues/15687\n try {\n hasV8BreakIterator = (typeof Intl !== 'undefined' && Intl.v8BreakIterator);\n }\n catch (_a) {\n hasV8BreakIterator = false;\n }\n /**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n var Platform = /** @class */ (function () {\n function Platform(_platformId) {\n this._platformId = _platformId;\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n this.isBrowser = this._platformId ?\n common.isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;\n /** Whether the current browser is Microsoft Edge. */\n this.EDGE = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n /** Whether the current rendering engine is Microsoft Trident. */\n this.TRIDENT = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n this.BLINK = this.isBrowser && (!!(window.chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n this.WEBKIT = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n /** Whether the current platform is Apple iOS. */\n this.IOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !('MSStream' in window);\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n this.FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n this.ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n this.SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n }\n return Platform;\n }());\n Platform.ɵprov = i0.ɵɵdefineInjectable({ factory: function Platform_Factory() { return new Platform(i0.ɵɵinject(i0.PLATFORM_ID)); }, token: Platform, providedIn: \"root\" });\n Platform.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n Platform.ctorParameters = function () { return [\n { type: Object, decorators: [{ type: i0.Inject, args: [i0.PLATFORM_ID,] }] }\n ]; };\n\n /**\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.io/license\n */\n var PlatformModule = /** @class */ (function () {\n function PlatformModule() {\n }\n return PlatformModule;\n }());\n PlatformModule.decorators = [\n { type: i0.NgModule, args: [{},] }\n ];\n\n /**\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.io/license\n */\n /** Cached result Set of input types support by the current browser. */\n var supportedInputTypes;\n /** Types of `<input>` that *might* be supported. */\n var candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n ];\n /** @returns The input types supported by this browser. */\n function getSupportedInputTypes() {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n var featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(function (value) {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n return supportedInputTypes;\n }\n\n /**\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.io/license\n */\n /** Cached result of whether the user's browser supports passive event listeners. */\n var supportsPassiveEvents;\n /**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\n function supportsPassiveEventListeners() {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n get: function () { return supportsPassiveEvents = true; }\n }));\n }\n finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n return supportsPassiveEvents;\n }\n /**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\n function normalizePassiveListenerOptions(options) {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n }\n\n /**\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.io/license\n */\n /** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\n var rtlScrollAxisType;\n /** Cached result of the check that indicates whether the browser supports scroll behaviors. */\n var scrollBehaviorSupported;\n /** Check whether the browser supports scroll behaviors. */\n function supportsScrollBehavior() {\n if (scrollBehaviorSupported == null) {\n // If we're not in the browser, it can't be supported.\n if (typeof document !== 'object' || !document) {\n scrollBehaviorSupported = false;\n return scrollBehaviorSupported;\n }\n // If the element can have a `scrollBehavior` style, we can be sure that it's supported.\n if ('scrollBehavior' in document.documentElement.style) {\n scrollBehaviorSupported = true;\n }\n else {\n // At this point we have 3 possibilities: `scrollTo` isn't supported at all, it's\n // supported but it doesn't handle scroll behavior, or it has been polyfilled.\n var scrollToFunction = Element.prototype.scrollTo;\n if (scrollToFunction) {\n // We can detect if the function has been polyfilled by calling `toString` on it. Native\n // functions are obfuscated using `[native code]`, whereas if it was overwritten we'd get\n // the actual function source. Via https://davidwalsh.name/detect-native-function. Consider\n // polyfilled functions as supporting scroll behavior.\n scrollBehaviorSupported = !/\\{\\s*\\[native code\\]\\s*\\}/.test(scrollToFunction.toString());\n }\n else {\n scrollBehaviorSupported = false;\n }\n }\n }\n return scrollBehaviorSupported;\n }\n /**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\n function getRtlScrollAxisType() {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return 0 /* NORMAL */;\n }\n if (rtlScrollAxisType == null) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n var scrollContainer = document.createElement('div');\n var containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n var content = document.createElement('div');\n var contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n rtlScrollAxisType = 0 /* NORMAL */;\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? 1 /* NEGATED */ : 2 /* INVERTED */;\n }\n scrollContainer.parentNode.removeChild(scrollContainer);\n }\n return rtlScrollAxisType;\n }\n\n /**\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.io/license\n */\n var shadowDomIsSupported;\n /** Checks whether the user's browser support Shadow DOM. */\n function _supportsShadowDom() {\n if (shadowDomIsSupported == null) {\n var head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && (head.createShadowRoot || head.attachShadow));\n }\n return shadowDomIsSupported;\n }\n /** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\n function _getShadowRoot(element) {\n if (_supportsShadowDom()) {\n var rootNode = element.getRootNode ? element.getRootNode() : null;\n // Note that this should be caught by `_supportsShadowDom`, but some\n // teams have been able to hit this code path on unsupported browsers.\n if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n return rootNode;\n }\n }\n return null;\n }\n\n /**\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.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.Platform = Platform;\n exports.PlatformModule = PlatformModule;\n exports._getShadowRoot = _getShadowRoot;\n exports._supportsShadowDom = _supportsShadowDom;\n exports.getRtlScrollAxisType = getRtlScrollAxisType;\n exports.getSupportedInputTypes = getSupportedInputTypes;\n exports.normalizePassiveListenerOptions = normalizePassiveListenerOptions;\n exports.supportsPassiveEventListeners = supportsPassiveEventListeners;\n exports.supportsScrollBehavior = supportsScrollBehavior;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cdk-platform.umd.js.map\n"]}
|
|
1
|
+
{"version":3,"sources":["src/cdk/cdk-platform.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","cdk","platform","core","common","this","i0","hasV8BreakIterator","Platform","supportedInputTypes","PlatformModule","Intl","v8BreakIterator","_a","_platformId","isBrowser","isPlatformBrowser","document","EDGE","test","navigator","userAgent","TRIDENT","BLINK","window","chrome","CSS","WEBKIT","IOS","FIREFOX","ANDROID","SAFARI","ɵprov","ɵɵdefineInjectable","Platform_Factory","ɵɵinject","PLATFORM_ID","token","providedIn","decorators","type","Injectable","args","ctorParameters","Object","Inject","NgModule","supportsPassiveEvents","rtlScrollAxisType","scrollBehaviorSupported","shadowDomIsSupported","candidateInputTypes","supportsPassiveEventListeners","addEventListener","defineProperty","get","_supportsShadowDom","head","createShadowRoot","attachShadow","_getShadowRoot","element","rootNode","getRootNode","ShadowRoot","getRtlScrollAxisType","scrollContainer","createElement","containerStyle","style","dir","width","overflow","visibility","pointerEvents","position","content","contentStyle","height","appendChild","body","scrollLeft","parentNode","removeChild","getSupportedInputTypes","Set","featureTestInput","filter","value","setAttribute","normalizePassiveListenerOptions","options","capture","supportsScrollBehavior","Element","documentElement","scrollToFunction","prototype","scrollTo","toString"],"mappings":"CAAC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,iBAAkBA,QAAQ,oBAChG,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,wBAAyB,CAAC,UAAW,gBAAiB,mBAAoBJ,GACpGA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,IAAMT,EAAOQ,GAAGC,KAAO,GAAIT,EAAOQ,GAAGC,IAAIC,SAAW,IAAKV,EAAOQ,GAAGG,KAAMX,EAAOQ,GAAGI,QAHjK,CAIEC,MAAM,SAAWX,EAASY,EAAIF,GAAU;;;;;;;OAWtC,IAAIG,EAgBAC,EA0EAC,EAjBAC,EAnEJ,IACIH,EAAsC,oBAATI,MAAwBA,KAAKC,gBAE9D,MAAOC,GACHN,GAAqB,GAMrBC,EACA,SAASA,EAASM,GACdT,KAAKS,YAAcA,EAKnBT,KAAKU,UAAYV,KAAKS,YAClBV,EAAOY,kBAAkBX,KAAKS,aAAmC,iBAAbG,YAA2BA,SAEnFZ,KAAKa,KAAOb,KAAKU,WAAa,UAAUI,KAAKC,UAAUC,WAEvDhB,KAAKiB,QAAUjB,KAAKU,WAAa,kBAAkBI,KAAKC,UAAUC,WAGlEhB,KAAKkB,MAAQlB,KAAKU,cAAiBS,OAAOC,SAAUlB,IACjC,oBAARmB,MAAwBrB,KAAKa,OAASb,KAAKiB,QAItDjB,KAAKsB,OAAStB,KAAKU,WACf,eAAeI,KAAKC,UAAUC,aAAehB,KAAKkB,QAAUlB,KAAKa,OAASb,KAAKiB,QAEnFjB,KAAKuB,IAAMvB,KAAKU,WAAa,mBAAmBI,KAAKC,UAAUC,cACzD,aAAcG,QAMpBnB,KAAKwB,QAAUxB,KAAKU,WAAa,uBAAuBI,KAAKC,UAAUC,WAG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AAiC,CAGjC,GAAwB,iBAAbhC,WAA0BA,UAA+B,mBAAZ6E,UAA2BA,QAE/E,OADA7C,GAA0B,EAI9B,GAAI,mBAAoBhC,SAAS8E,gBAAgB1B,MAC7CpB,GAA0B,MAEzB,CAGD,IAAI+C,EAAmBF,QAAQG,UAAUC,SAMrCjD,IALA+C,IAK2B,4BAA4B7E,KAAK6E,EAAiBG,aAOzF,OAAOlD,GAgGXL,OAAOU,eAAe5D,EAAS,aAAc,CAAE8F,OAAO","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common')) :\n typeof define === 'function' && define.amd ? define('@angular/cdk/platform', ['exports', '@angular/core', '@angular/common'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.platform = {}), global.ng.core, global.ng.common));\n}(this, (function (exports, i0, common) { 'use strict';\n\n /**\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.io/license\n */\n // Whether the current platform supports the V8 Break Iterator. The V8 check\n // is necessary to detect all Blink based browsers.\n var hasV8BreakIterator;\n // We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n // cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n // the consumer is providing a polyfilled `Map`. See:\n // https://github.com/Microsoft/ChakraCore/issues/3189\n // https://github.com/angular/components/issues/15687\n try {\n hasV8BreakIterator = (typeof Intl !== 'undefined' && Intl.v8BreakIterator);\n }\n catch (_a) {\n hasV8BreakIterator = false;\n }\n /**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n var Platform = /** @class */ (function () {\n function Platform(_platformId) {\n this._platformId = _platformId;\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n this.isBrowser = this._platformId ?\n common.isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;\n /** Whether the current browser is Microsoft Edge. */\n this.EDGE = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n /** Whether the current rendering engine is Microsoft Trident. */\n this.TRIDENT = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n this.BLINK = this.isBrowser && (!!(window.chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n this.WEBKIT = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n /** Whether the current platform is Apple iOS. */\n this.IOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !('MSStream' in window);\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n this.FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n this.ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n this.SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n }\n return Platform;\n }());\n Platform.ɵprov = i0.ɵɵdefineInjectable({ factory: function Platform_Factory() { return new Platform(i0.ɵɵinject(i0.PLATFORM_ID)); }, token: Platform, providedIn: \"root\" });\n Platform.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n Platform.ctorParameters = function () { return [\n { type: Object, decorators: [{ type: i0.Inject, args: [i0.PLATFORM_ID,] }] }\n ]; };\n\n /**\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.io/license\n */\n var PlatformModule = /** @class */ (function () {\n function PlatformModule() {\n }\n return PlatformModule;\n }());\n PlatformModule.decorators = [\n { type: i0.NgModule, args: [{},] }\n ];\n\n /**\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.io/license\n */\n /** Cached result Set of input types support by the current browser. */\n var supportedInputTypes;\n /** Types of `<input>` that *might* be supported. */\n var candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n ];\n /** @returns The input types supported by this browser. */\n function getSupportedInputTypes() {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n var featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(function (value) {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n return supportedInputTypes;\n }\n\n /**\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.io/license\n */\n /** Cached result of whether the user's browser supports passive event listeners. */\n var supportsPassiveEvents;\n /**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\n function supportsPassiveEventListeners() {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n get: function () { return supportsPassiveEvents = true; }\n }));\n }\n finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n return supportsPassiveEvents;\n }\n /**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\n function normalizePassiveListenerOptions(options) {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n }\n\n /**\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.io/license\n */\n /** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\n var rtlScrollAxisType;\n /** Cached result of the check that indicates whether the browser supports scroll behaviors. */\n var scrollBehaviorSupported;\n /** Check whether the browser supports scroll behaviors. */\n function supportsScrollBehavior() {\n if (scrollBehaviorSupported == null) {\n // If we're not in the browser, it can't be supported. Also check for `Element`, because\n // some projects stub out the global `document` during SSR which can throw us off.\n if (typeof document !== 'object' || !document || typeof Element !== 'function' || !Element) {\n scrollBehaviorSupported = false;\n return scrollBehaviorSupported;\n }\n // If the element can have a `scrollBehavior` style, we can be sure that it's supported.\n if ('scrollBehavior' in document.documentElement.style) {\n scrollBehaviorSupported = true;\n }\n else {\n // At this point we have 3 possibilities: `scrollTo` isn't supported at all, it's\n // supported but it doesn't handle scroll behavior, or it has been polyfilled.\n var scrollToFunction = Element.prototype.scrollTo;\n if (scrollToFunction) {\n // We can detect if the function has been polyfilled by calling `toString` on it. Native\n // functions are obfuscated using `[native code]`, whereas if it was overwritten we'd get\n // the actual function source. Via https://davidwalsh.name/detect-native-function. Consider\n // polyfilled functions as supporting scroll behavior.\n scrollBehaviorSupported = !/\\{\\s*\\[native code\\]\\s*\\}/.test(scrollToFunction.toString());\n }\n else {\n scrollBehaviorSupported = false;\n }\n }\n }\n return scrollBehaviorSupported;\n }\n /**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\n function getRtlScrollAxisType() {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return 0 /* NORMAL */;\n }\n if (rtlScrollAxisType == null) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n var scrollContainer = document.createElement('div');\n var containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n var content = document.createElement('div');\n var contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n rtlScrollAxisType = 0 /* NORMAL */;\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? 1 /* NEGATED */ : 2 /* INVERTED */;\n }\n scrollContainer.parentNode.removeChild(scrollContainer);\n }\n return rtlScrollAxisType;\n }\n\n /**\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.io/license\n */\n var shadowDomIsSupported;\n /** Checks whether the user's browser support Shadow DOM. */\n function _supportsShadowDom() {\n if (shadowDomIsSupported == null) {\n var head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && (head.createShadowRoot || head.attachShadow));\n }\n return shadowDomIsSupported;\n }\n /** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\n function _getShadowRoot(element) {\n if (_supportsShadowDom()) {\n var rootNode = element.getRootNode ? element.getRootNode() : null;\n // Note that this should be caught by `_supportsShadowDom`, but some\n // teams have been able to hit this code path on unsupported browsers.\n if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n return rootNode;\n }\n }\n return null;\n }\n\n /**\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.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.Platform = Platform;\n exports.PlatformModule = PlatformModule;\n exports._getShadowRoot = _getShadowRoot;\n exports._supportsShadowDom = _supportsShadowDom;\n exports.getRtlScrollAxisType = getRtlScrollAxisType;\n exports.getSupportedInputTypes = getSupportedInputTypes;\n exports.normalizePassiveListenerOptions = normalizePassiveListenerOptions;\n exports.supportsPassiveEventListeners = supportsPassiveEventListeners;\n exports.supportsScrollBehavior = supportsScrollBehavior;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cdk-platform.umd.js.map\n"]}
|
package/bundles/cdk-table.umd.js
CHANGED
|
@@ -482,8 +482,8 @@
|
|
|
482
482
|
* @docs-private
|
|
483
483
|
*/
|
|
484
484
|
CdkColumnDef.prototype._setNameInput = function (value) {
|
|
485
|
-
// If the directive is set without a name (updated
|
|
486
|
-
// trigger with an empty string and should not overwrite the
|
|
485
|
+
// If the directive is set without a name (updated programmatically), then this setter will
|
|
486
|
+
// trigger with an empty string and should not overwrite the programmatically set value.
|
|
487
487
|
if (value) {
|
|
488
488
|
this._name = value;
|
|
489
489
|
this.cssClassFriendlyName = value.replace(/[^a-z0-9_-]/ig, '-');
|