@angular/cdk 11.2.0 → 11.2.4

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.
Files changed (57) hide show
  1. package/_a11y.scss +2 -0
  2. package/_overlay.scss +6 -5
  3. package/a11y/_a11y.import.scss +1 -0
  4. package/a11y/_a11y.scss +2 -0
  5. package/a11y/fake-event-detection.d.ts +11 -0
  6. package/a11y/index.metadata.json +1 -1
  7. package/a11y/public-api.d.ts +1 -1
  8. package/accordion/accordion.d.ts +0 -1
  9. package/accordion/index.metadata.json +1 -1
  10. package/bundles/cdk-a11y.umd.js +31 -14
  11. package/bundles/cdk-a11y.umd.js.map +1 -1
  12. package/bundles/cdk-a11y.umd.min.js +6 -6
  13. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  14. package/bundles/cdk-accordion.umd.js +5 -7
  15. package/bundles/cdk-accordion.umd.js.map +1 -1
  16. package/bundles/cdk-accordion.umd.min.js +1 -1
  17. package/bundles/cdk-accordion.umd.min.js.map +1 -1
  18. package/bundles/cdk-clipboard.umd.js +7 -1
  19. package/bundles/cdk-clipboard.umd.js.map +1 -1
  20. package/bundles/cdk-clipboard.umd.min.js +2 -2
  21. package/bundles/cdk-clipboard.umd.min.js.map +1 -1
  22. package/bundles/cdk-drag-drop.umd.js +1 -1
  23. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  24. package/bundles/cdk-drag-drop.umd.min.js +1 -1
  25. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  26. package/bundles/cdk.umd.js +1 -1
  27. package/bundles/cdk.umd.js.map +1 -1
  28. package/bundles/cdk.umd.min.js +1 -1
  29. package/bundles/cdk.umd.min.js.map +1 -1
  30. package/clipboard/copy-to-clipboard.d.ts +5 -0
  31. package/clipboard/index.metadata.json +1 -1
  32. package/esm2015/a11y/fake-event-detection.js +27 -0
  33. package/esm2015/a11y/focus-monitor/focus-monitor.js +16 -9
  34. package/esm2015/a11y/public-api.js +2 -2
  35. package/esm2015/accordion/accordion.js +6 -8
  36. package/esm2015/clipboard/copy-to-clipboard.js +7 -2
  37. package/esm2015/drag-drop/directives/drag.js +2 -2
  38. package/esm2015/version.js +1 -1
  39. package/fesm2015/a11y.js +31 -15
  40. package/fesm2015/a11y.js.map +1 -1
  41. package/fesm2015/accordion.js +5 -7
  42. package/fesm2015/accordion.js.map +1 -1
  43. package/fesm2015/cdk.js +1 -1
  44. package/fesm2015/cdk.js.map +1 -1
  45. package/fesm2015/clipboard.js +7 -2
  46. package/fesm2015/clipboard.js.map +1 -1
  47. package/fesm2015/drag-drop.js +1 -1
  48. package/fesm2015/drag-drop.js.map +1 -1
  49. package/overlay/_overlay.import.scss +1 -0
  50. package/overlay/_overlay.scss +6 -5
  51. package/overlay-prebuilt.css +1 -1
  52. package/package.json +1 -1
  53. package/schematics/ng-add/index.js +1 -1
  54. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +1 -1
  55. package/text-field/_text-field.import.scss +1 -0
  56. package/a11y/fake-mousedown.d.ts +0 -15
  57. 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._openCloseAll(true);
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._openCloseAll(false);
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,Y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AA/B;YAAA,iBAOP;YANC,OAAO,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,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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;;;;;;;;;;;;;;;"}
@@ -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._openCloseAll(!0)},e.prototype.closeAll=function(){this._openCloseAll(!1)},e.prototype.ngOnChanges=function(e){this._stateChanges.next(e)},e.prototype.ngOnDestroy=function(){this._stateChanges.complete()},e.prototype._openCloseAll=function(e){this.multi&&this._openCloseAllActions.next(e)},e}();s.decorators=[{type:t.Directive,args:[{selector:"cdk-accordion, [cdkAccordion]",exportAs:"cdkAccordion",providers:[{provide:r,useExisting:s}]}]}],s.propDecorators={multi:[{type:t.Input}]};
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,K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CAAC,CAAEE,KAAMjC,EAAK0C,QACxBwB,SAAU,CAAC,CAAEjC,KAAMjC,EAAK0C,UAUxBC,EACA,SAASA,OAIMX,WAAa,CAC5B,CAAEC,KAAMjC,EAAKiF,SAAU9C,KAAM,CAAC,CAClB5C,QAAS,CAACiB,EAAcqC,GACxBqC,aAAc,CAAC1E,EAAcqC;;;;;;;;AAgB7CtD,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,Q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,eAAiB,CAC9BW,OAAQ,CAAC,CAAEnB,KAAM/B,EAAK+E,SACtB3B,OAAQ,CAAC,CAAErB,KAAM/B,EAAK+E,SACtB1B,UAAW,CAAC,CAAEtB,KAAM/B,EAAK+E,SACzBzB,eAAgB,CAAC,CAAEvB,KAAM/B,EAAK+E,SAC9BnB,SAAU,CAAC,CAAE7B,KAAM/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"]}
@@ -129,7 +129,12 @@
129
129
  * found in the LICENSE file at https://angular.io/license
130
130
  */
131
131
  /** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */
132
- var CKD_COPY_TO_CLIPBOARD_CONFIG = new i0.InjectionToken('CKD_COPY_TO_CLIPBOARD_CONFIG');
132
+ var CDK_COPY_TO_CLIPBOARD_CONFIG = new i0.InjectionToken('CDK_COPY_TO_CLIPBOARD_CONFIG');
133
+ /**
134
+ * @deprecated Use `CDK_COPY_TO_CLIPBOARD_CONFIG` instead.
135
+ * @breaking-change 13.0.0
136
+ */
137
+ var CKD_COPY_TO_CLIPBOARD_CONFIG = CDK_COPY_TO_CLIPBOARD_CONFIG;
133
138
  /**
134
139
  * Provides behavior for a button that when clicked copies content into user's
135
140
  * clipboard.
@@ -243,6 +248,7 @@
243
248
  * Generated bundle index. Do not edit.
244
249
  */
245
250
 
251
+ exports.CDK_COPY_TO_CLIPBOARD_CONFIG = CDK_COPY_TO_CLIPBOARD_CONFIG;
246
252
  exports.CKD_COPY_TO_CLIPBOARD_CONFIG = CKD_COPY_TO_CLIPBOARD_CONFIG;
247
253
  exports.CdkCopyToClipboard = CdkCopyToClipboard;
248
254
  exports.Clipboard = Clipboard;
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-clipboard.umd.js","sources":["../../../../../src/cdk/clipboard/pending-copy.ts","../../../../../src/cdk/clipboard/clipboard.ts","../../../../../src/cdk/clipboard/copy-to-clipboard.ts","../../../../../src/cdk/clipboard/clipboard-module.ts","../../../../../src/cdk/clipboard/public-api.ts","../../../../../src/cdk/clipboard/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\n/**\n * A pending copy-to-clipboard operation.\n *\n * The implementation of copying text to the clipboard modifies the DOM and\n * forces a relayout. This relayout can take too long if the string is large,\n * causing the execCommand('copy') to happen too long after the user clicked.\n * This results in the browser refusing to copy. This object lets the\n * relayout happen in a separate tick from copying by providing a copy function\n * that can be called later.\n *\n * Destroy must be called when no longer in use, regardless of whether `copy` is\n * called.\n */\nexport class PendingCopy {\n private _textarea: HTMLTextAreaElement|undefined;\n\n constructor(text: string, private readonly _document: Document) {\n const textarea = this._textarea = this._document.createElement('textarea');\n const styles = textarea.style;\n\n // Hide the element for display and accessibility. Set a fixed position so the page layout\n // isn't affected. We use `fixed` with `top: 0`, because focus is moved into the textarea\n // for a split second and if it's off-screen, some browsers will attempt to scroll it into view.\n styles.position = 'fixed';\n styles.top = styles.opacity = '0';\n styles.left = '-999em';\n textarea.setAttribute('aria-hidden', 'true');\n textarea.value = text;\n this._document.body.appendChild(textarea);\n }\n\n /** Finishes copying the text. */\n copy(): boolean {\n const textarea = this._textarea;\n let successful = false;\n\n try { // Older browsers could throw if copy is not supported.\n if (textarea) {\n const currentFocus = this._document.activeElement as HTMLOrSVGElement | null;\n\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n successful = this._document.execCommand('copy');\n\n if (currentFocus) {\n currentFocus.focus();\n }\n }\n } catch {\n // Discard error.\n // Initial setting of {@code successful} will represent failure here.\n }\n\n return successful;\n }\n\n /** Cleans up DOM changes used to perform the copy operation. */\n destroy() {\n const textarea = this._textarea;\n\n if (textarea) {\n if (textarea.parentNode) {\n textarea.parentNode.removeChild(textarea);\n }\n\n this._textarea = undefined;\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\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\nimport {PendingCopy} from './pending-copy';\n\n\n/**\n * A service for copying text to the clipboard.\n */\n@Injectable({providedIn: 'root'})\nexport class Clipboard {\n private readonly _document: Document;\n\n constructor(@Inject(DOCUMENT) document: any) {\n this._document = document;\n }\n\n /**\n * Copies the provided text into the user's clipboard.\n *\n * @param text The string to copy.\n * @returns Whether the operation was successful.\n */\n copy(text: string): boolean {\n const pendingCopy = this.beginCopy(text);\n const successful = pendingCopy.copy();\n pendingCopy.destroy();\n\n return successful;\n }\n\n /**\n * Prepares a string to be copied later. This is useful for large strings\n * which take too long to successfully render and be copied in the same tick.\n *\n * The caller must call `destroy` on the returned `PendingCopy`.\n *\n * @param text The string to copy.\n * @returns the pending copy operation.\n */\n beginCopy(text: string): PendingCopy {\n return new PendingCopy(text, this._document);\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 {\n Directive,\n EventEmitter,\n Input,\n Output,\n NgZone,\n InjectionToken,\n Inject,\n Optional,\n OnDestroy,\n} from '@angular/core';\nimport {Clipboard} from './clipboard';\nimport {PendingCopy} from './pending-copy';\n\n/** Object that can be used to configure the default options for `CdkCopyToClipboard`. */\nexport interface CdkCopyToClipboardConfig {\n /** Default number of attempts to make when copying text to the clipboard. */\n attempts?: number;\n}\n\n/** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\nexport const CKD_COPY_TO_CLIPBOARD_CONFIG =\n new InjectionToken<CdkCopyToClipboardConfig>('CKD_COPY_TO_CLIPBOARD_CONFIG');\n\n/**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\n@Directive({\n selector: '[cdkCopyToClipboard]',\n host: {\n '(click)': 'copy()',\n }\n})\nexport class CdkCopyToClipboard implements OnDestroy {\n /** Content to be copied. */\n @Input('cdkCopyToClipboard') text: string = '';\n\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content.\n */\n @Input('cdkCopyToClipboardAttempts') attempts: number = 1;\n\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n @Output('cdkCopyToClipboardCopied') copied = new EventEmitter<boolean>();\n\n /** Copies that are currently being attempted. */\n private _pending = new Set<PendingCopy>();\n\n /** Whether the directive has been destroyed. */\n private _destroyed: boolean;\n\n /** Timeout for the current copy attempt. */\n private _currentTimeout: any;\n\n constructor(\n private _clipboard: Clipboard,\n private _ngZone: NgZone,\n @Optional() @Inject(CKD_COPY_TO_CLIPBOARD_CONFIG) config?: CdkCopyToClipboardConfig) {\n\n if (config && config.attempts != null) {\n this.attempts = config.attempts;\n }\n }\n\n /** Copies the current text to the clipboard. */\n copy(attempts: number = this.attempts): void {\n if (attempts > 1) {\n let remainingAttempts = attempts;\n const pending = this._clipboard.beginCopy(this.text);\n this._pending.add(pending);\n\n const attempt = () => {\n const successful = pending.copy();\n if (!successful && --remainingAttempts && !this._destroyed) {\n // We use 1 for the timeout since it's more predictable when flushing in unit tests.\n this._currentTimeout = this._ngZone.runOutsideAngular(() => setTimeout(attempt, 1));\n } else {\n this._currentTimeout = null;\n this._pending.delete(pending);\n pending.destroy();\n this.copied.emit(successful);\n }\n };\n attempt();\n } else {\n this.copied.emit(this._clipboard.copy(this.text));\n }\n }\n\n ngOnDestroy() {\n if (this._currentTimeout) {\n clearTimeout(this._currentTimeout);\n }\n\n this._pending.forEach(copy => copy.destroy());\n this._pending.clear();\n this._destroyed = true;\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\nimport {CdkCopyToClipboard} from './copy-to-clipboard';\n\n@NgModule({\n declarations: [CdkCopyToClipboard],\n exports: [CdkCopyToClipboard],\n})\nexport class ClipboardModule {\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 './clipboard';\nexport * from './clipboard-module';\nexport * from './copy-to-clipboard';\nexport * from './pending-copy';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Injectable","Inject","DOCUMENT","InjectionToken","EventEmitter","Directive","NgZone","Optional","Input","Output","NgModule"],"mappings":";;;;;;IAAA;;;;;;;IAQA;;;;;;;;;;;;;AAaA;QAGE,qBAAY,IAAY,EAAmB,SAAmB;YAAnB,cAAS,GAAT,SAAS,CAAU;YAC5D,IAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAC3E,IAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC;;;;YAK9B,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC;YAC1B,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC;YAClC,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;YACvB,QAAQ,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YAC7C,QAAQ,CAAC,KAAK,GAAG,IAAI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O,EAAE,CAAC,kBAAkB,CAAC;iBAC9B;;;ICfD;;;;;;OAMG;;ICNH;;OAEG;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"cdk-clipboard.umd.js","sources":["../../../../../src/cdk/clipboard/pending-copy.ts","../../../../../src/cdk/clipboard/clipboard.ts","../../../../../src/cdk/clipboard/copy-to-clipboard.ts","../../../../../src/cdk/clipboard/clipboard-module.ts","../../../../../src/cdk/clipboard/public-api.ts","../../../../../src/cdk/clipboard/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\n/**\n * A pending copy-to-clipboard operation.\n *\n * The implementation of copying text to the clipboard modifies the DOM and\n * forces a relayout. This relayout can take too long if the string is large,\n * causing the execCommand('copy') to happen too long after the user clicked.\n * This results in the browser refusing to copy. This object lets the\n * relayout happen in a separate tick from copying by providing a copy function\n * that can be called later.\n *\n * Destroy must be called when no longer in use, regardless of whether `copy` is\n * called.\n */\nexport class PendingCopy {\n private _textarea: HTMLTextAreaElement|undefined;\n\n constructor(text: string, private readonly _document: Document) {\n const textarea = this._textarea = this._document.createElement('textarea');\n const styles = textarea.style;\n\n // Hide the element for display and accessibility. Set a fixed position so the page layout\n // isn't affected. We use `fixed` with `top: 0`, because focus is moved into the textarea\n // for a split second and if it's off-screen, some browsers will attempt to scroll it into view.\n styles.position = 'fixed';\n styles.top = styles.opacity = '0';\n styles.left = '-999em';\n textarea.setAttribute('aria-hidden', 'true');\n textarea.value = text;\n this._document.body.appendChild(textarea);\n }\n\n /** Finishes copying the text. */\n copy(): boolean {\n const textarea = this._textarea;\n let successful = false;\n\n try { // Older browsers could throw if copy is not supported.\n if (textarea) {\n const currentFocus = this._document.activeElement as HTMLOrSVGElement | null;\n\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n successful = this._document.execCommand('copy');\n\n if (currentFocus) {\n currentFocus.focus();\n }\n }\n } catch {\n // Discard error.\n // Initial setting of {@code successful} will represent failure here.\n }\n\n return successful;\n }\n\n /** Cleans up DOM changes used to perform the copy operation. */\n destroy() {\n const textarea = this._textarea;\n\n if (textarea) {\n if (textarea.parentNode) {\n textarea.parentNode.removeChild(textarea);\n }\n\n this._textarea = undefined;\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\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\nimport {PendingCopy} from './pending-copy';\n\n\n/**\n * A service for copying text to the clipboard.\n */\n@Injectable({providedIn: 'root'})\nexport class Clipboard {\n private readonly _document: Document;\n\n constructor(@Inject(DOCUMENT) document: any) {\n this._document = document;\n }\n\n /**\n * Copies the provided text into the user's clipboard.\n *\n * @param text The string to copy.\n * @returns Whether the operation was successful.\n */\n copy(text: string): boolean {\n const pendingCopy = this.beginCopy(text);\n const successful = pendingCopy.copy();\n pendingCopy.destroy();\n\n return successful;\n }\n\n /**\n * Prepares a string to be copied later. This is useful for large strings\n * which take too long to successfully render and be copied in the same tick.\n *\n * The caller must call `destroy` on the returned `PendingCopy`.\n *\n * @param text The string to copy.\n * @returns the pending copy operation.\n */\n beginCopy(text: string): PendingCopy {\n return new PendingCopy(text, this._document);\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 {\n Directive,\n EventEmitter,\n Input,\n Output,\n NgZone,\n InjectionToken,\n Inject,\n Optional,\n OnDestroy,\n} from '@angular/core';\nimport {Clipboard} from './clipboard';\nimport {PendingCopy} from './pending-copy';\n\n/** Object that can be used to configure the default options for `CdkCopyToClipboard`. */\nexport interface CdkCopyToClipboardConfig {\n /** Default number of attempts to make when copying text to the clipboard. */\n attempts?: number;\n}\n\n/** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\nexport const CDK_COPY_TO_CLIPBOARD_CONFIG =\n new InjectionToken<CdkCopyToClipboardConfig>('CDK_COPY_TO_CLIPBOARD_CONFIG');\n\n/**\n * @deprecated Use `CDK_COPY_TO_CLIPBOARD_CONFIG` instead.\n * @breaking-change 13.0.0\n */\nexport const CKD_COPY_TO_CLIPBOARD_CONFIG = CDK_COPY_TO_CLIPBOARD_CONFIG;\n\n/**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\n@Directive({\n selector: '[cdkCopyToClipboard]',\n host: {\n '(click)': 'copy()',\n }\n})\nexport class CdkCopyToClipboard implements OnDestroy {\n /** Content to be copied. */\n @Input('cdkCopyToClipboard') text: string = '';\n\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content.\n */\n @Input('cdkCopyToClipboardAttempts') attempts: number = 1;\n\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n @Output('cdkCopyToClipboardCopied') copied = new EventEmitter<boolean>();\n\n /** Copies that are currently being attempted. */\n private _pending = new Set<PendingCopy>();\n\n /** Whether the directive has been destroyed. */\n private _destroyed: boolean;\n\n /** Timeout for the current copy attempt. */\n private _currentTimeout: any;\n\n constructor(\n private _clipboard: Clipboard,\n private _ngZone: NgZone,\n @Optional() @Inject(CKD_COPY_TO_CLIPBOARD_CONFIG) config?: CdkCopyToClipboardConfig) {\n\n if (config && config.attempts != null) {\n this.attempts = config.attempts;\n }\n }\n\n /** Copies the current text to the clipboard. */\n copy(attempts: number = this.attempts): void {\n if (attempts > 1) {\n let remainingAttempts = attempts;\n const pending = this._clipboard.beginCopy(this.text);\n this._pending.add(pending);\n\n const attempt = () => {\n const successful = pending.copy();\n if (!successful && --remainingAttempts && !this._destroyed) {\n // We use 1 for the timeout since it's more predictable when flushing in unit tests.\n this._currentTimeout = this._ngZone.runOutsideAngular(() => setTimeout(attempt, 1));\n } else {\n this._currentTimeout = null;\n this._pending.delete(pending);\n pending.destroy();\n this.copied.emit(successful);\n }\n };\n attempt();\n } else {\n this.copied.emit(this._clipboard.copy(this.text));\n }\n }\n\n ngOnDestroy() {\n if (this._currentTimeout) {\n clearTimeout(this._currentTimeout);\n }\n\n this._pending.forEach(copy => copy.destroy());\n this._pending.clear();\n this._destroyed = true;\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\nimport {CdkCopyToClipboard} from './copy-to-clipboard';\n\n@NgModule({\n declarations: [CdkCopyToClipboard],\n exports: [CdkCopyToClipboard],\n})\nexport class ClipboardModule {\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 './clipboard';\nexport * from './clipboard-module';\nexport * from './copy-to-clipboard';\nexport * from './pending-copy';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Injectable","Inject","DOCUMENT","InjectionToken","EventEmitter","Directive","NgZone","Optional","Input","Output","NgModule"],"mappings":";;;;;;IAAA;;;;;;;IAQA;;;;;;;;;;;;;AAaA;QAGE,qBAAY,IAAY,EAAmB,SAAmB;YAAnB,cAAS,GAAT,SAAS,CAAU;YAC5D,IAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAC3E,IAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC;;;;YAK9B,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC;YAC1B,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC;YAClC,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;YACvB,QAAQ,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YA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AQA;QAQA;;;;;gBAJCC,WAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;iBAC9B;;;ICfD;;;;;;OAMG;;ICNH;;OAEG;;;;;;;;;;;;;;;;;"}
@@ -20,7 +20,7 @@
20
20
  * Use of this source code is governed by an MIT-style license that can be
21
21
  * found in the LICENSE file at https://angular.io/license
22
22
  */
23
- var i,c=new o.InjectionToken("CKD_COPY_TO_CLIPBOARD_CONFIG"),p=function(){function t(t,e,n){this._clipboard=t,this._ngZone=e,this.text="",this.attempts=1,this.copied=new o.EventEmitter,this._pending=new Set,n&&null!=n.attempts&&(this.attempts=n.attempts)}return t.prototype.copy=function(t){var e=this;if(void 0===t&&(t=this.attempts),t>1){var o=t,n=this._clipboard.beginCopy(this.text);this._pending.add(n);var r=function(){var t=n.copy();t||!--o||e._destroyed?(e._currentTimeout=null,e._pending.delete(n),n.destroy(),e.copied.emit(t)):e._currentTimeout=e._ngZone.runOutsideAngular((function(){return setTimeout(r,1)}))};r()}else this.copied.emit(this._clipboard.copy(this.text))},t.prototype.ngOnDestroy=function(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach((function(t){return t.destroy()})),this._pending.clear(),this._destroyed=!0},t}();p.decorators=[{type:o.Directive,args:[{selector:"[cdkCopyToClipboard]",host:{"(click)":"copy()"}}]}],p.ctorParameters=function(){return[{type:r},{type:o.NgZone},{type:void 0,decorators:[{type:o.Optional},{type:o.Inject,args:[c]}]}]},p.propDecorators={text:[{type:o.Input,args:["cdkCopyToClipboard"]}],attempts:[{type:o.Input,args:["cdkCopyToClipboardAttempts"]}],copied:[{type:o.Output,args:["cdkCopyToClipboardCopied"]}]},(i=function i(){}).decorators=[{type:o.NgModule,args:[{declarations:[p],exports:[p]}]}],
23
+ var i,c=new o.InjectionToken("CDK_COPY_TO_CLIPBOARD_CONFIG"),p=c,a=function(){function t(t,e,n){this._clipboard=t,this._ngZone=e,this.text="",this.attempts=1,this.copied=new o.EventEmitter,this._pending=new Set,n&&null!=n.attempts&&(this.attempts=n.attempts)}return t.prototype.copy=function(t){var e=this;if(void 0===t&&(t=this.attempts),t>1){var o=t,n=this._clipboard.beginCopy(this.text);this._pending.add(n);var r=function(){var t=n.copy();t||!--o||e._destroyed?(e._currentTimeout=null,e._pending.delete(n),n.destroy(),e.copied.emit(t)):e._currentTimeout=e._ngZone.runOutsideAngular((function(){return setTimeout(r,1)}))};r()}else this.copied.emit(this._clipboard.copy(this.text))},t.prototype.ngOnDestroy=function(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach((function(t){return t.destroy()})),this._pending.clear(),this._destroyed=!0},t}();a.decorators=[{type:o.Directive,args:[{selector:"[cdkCopyToClipboard]",host:{"(click)":"copy()"}}]}],a.ctorParameters=function(){return[{type:r},{type:o.NgZone},{type:void 0,decorators:[{type:o.Optional},{type:o.Inject,args:[p]}]}]},a.propDecorators={text:[{type:o.Input,args:["cdkCopyToClipboard"]}],attempts:[{type:o.Input,args:["cdkCopyToClipboardAttempts"]}],copied:[{type:o.Output,args:["cdkCopyToClipboardCopied"]}]},(i=function i(){}).decorators=[{type:o.NgModule,args:[{declarations:[a],exports:[a]}]}],
24
24
  /**
25
25
  * @license
26
26
  * Copyright Google LLC All Rights Reserved.
@@ -28,4 +28,4 @@ var i,c=new o.InjectionToken("CKD_COPY_TO_CLIPBOARD_CONFIG"),p=function(){functi
28
28
  * Use of this source code is governed by an MIT-style license that can be
29
29
  * found in the LICENSE file at https://angular.io/license
30
30
  */
31
- t.CKD_COPY_TO_CLIPBOARD_CONFIG=c,t.CdkCopyToClipboard=p,t.Clipboard=r,t.ClipboardModule=i,t.PendingCopy=n,Object.defineProperty(t,"__esModule",{value:!0})}));
31
+ t.CDK_COPY_TO_CLIPBOARD_CONFIG=c,t.CKD_COPY_TO_CLIPBOARD_CONFIG=p,t.CdkCopyToClipboard=a,t.Clipboard=r,t.ClipboardModule=i,t.PendingCopy=n,Object.defineProperty(t,"__esModule",{value:!0})}));
@@ -1 +1 @@
1
- {"version":3,"sources":["src/cdk/cdk-clipboard.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","cdk","clipboard","common","core","this","i1","i0","PendingCopy","text","_document","textarea","_textarea","createElement","styles","style","position","top","opacity","left","setAttribute","value","body","appendChild","prototype","copy","successful","currentFocus","activeElement","select","setSelectionRange","length","execCommand","focus","_a","destroy","parentNode","removeChild","undefined","Clipboard","document","pendingCopy","beginCopy","ɵprov","ɵɵdefineInjectable","Clipboard_Factory","ɵɵinject","DOCUMENT","token","providedIn","decorators","type","Injectable","args","ctorParameters","Inject","ClipboardModule","CKD_COPY_TO_CLIPBOARD_CONFIG","InjectionToken","CdkCopyToClipboard","_clipboard","_ngZone","config","attempts","copied","EventEmitter","_pending","Set","_this","remainingAttempts_1","pending_1","add","attempt_1","_destroyed","_currentTimeout","delete","emit","runOutsideAngular","setTimeout","ngOnDestroy","clearTimeout","forEach","clear","Directive","selector","host","(click)","NgZone","Optional","propDecorators","Input","Output","NgModule","declarations","Object","defineProperty"],"mappings":"CAAC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,kBAClG,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,yBAA0B,CAAC,UAAW,kBAAmB,iBAAkBJ,GACrGA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,IAAMT,EAAOQ,GAAGC,KAAO,GAAIT,EAAOQ,GAAGC,IAAIC,UAAY,IAAKV,EAAOQ,GAAGG,OAAQX,EAAOQ,GAAGI,MAHpK,CAIEC,MAAM,SAAWX,EAASY,EAAIC,GAAM;;;;;;;OAsBlC,IAAIC,EAA6B,WAC7B,SAASA,EAAYC,EAAMC,GACvBL,KAAKK,UAAYA,EACjB,IAAIC,EAAWN,KAAKO,UAAYP,KAAKK,UAAUG,c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,CACjB+B,SAAU,uBACVC,KAAM,CACFC,UAAW,cAI/B3B,EAAmBL,eAAiB,WAAc,MAAO,CACrD,CAAEH,KAAMZ,GACR,CAAEY,KAAM5C,EAAGgF,QACX,CAAEpC,UAAMb,EAAWY,WAAY,CAAC,CAAEC,KAAM5C,EAAGiF,UAAY,CAAErC,KAAM5C,EAAGgD,OAAQF,KAAM,CAACI,QAErFE,EAAmB8B,eAAiB,CAChChF,KAAM,CAAC,CAAE0C,KAAM5C,EAAGmF,MAAOrC,KAAM,CAAC,wBAChCU,SAAU,CAAC,CAAEZ,KAAM5C,EAAGmF,MAAOrC,KAAM,CAAC,gCACpCW,OAAQ,CAAC,CAAEb,KAAM5C,EAAGoF,OAAQtC,KAAM,CAAC,gCAUnCG,EACA,SAASA,OAIGN,WAAa,CACzB,CAAEC,KAAM5C,EAAGqF,SAAUvC,KAAM,CAAC,CAChBwC,aAAc,CAAClC,GACfjE,QAAS,CAACiE;;;;;;;;AAgB1BjE,EAAQ+D,6BAA+BA,EACvC/D,EAAQiE,mBAAqBA,EAC7BjE,EAAQ6C,UAAYA,EACpB7C,EAAQ8D,gBAAkBA,EAC1B9D,EAAQc,YAAcA,EAEtBsF,OAAOC,eAAerG,EAAS,aAAc,CAAE2B,OAAO","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core')) :\n typeof define === 'function' && define.amd ? define('@angular/cdk/clipboard', ['exports', '@angular/common', '@angular/core'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.clipboard = {}), global.ng.common, global.ng.core));\n}(this, (function (exports, i1, i0) { '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 /**\n * A pending copy-to-clipboard operation.\n *\n * The implementation of copying text to the clipboard modifies the DOM and\n * forces a relayout. This relayout can take too long if the string is large,\n * causing the execCommand('copy') to happen too long after the user clicked.\n * This results in the browser refusing to copy. This object lets the\n * relayout happen in a separate tick from copying by providing a copy function\n * that can be called later.\n *\n * Destroy must be called when no longer in use, regardless of whether `copy` is\n * called.\n */\n var PendingCopy = /** @class */ (function () {\n function PendingCopy(text, _document) {\n this._document = _document;\n var textarea = this._textarea = this._document.createElement('textarea');\n var styles = textarea.style;\n // Hide the element for display and accessibility. Set a fixed position so the page layout\n // isn't affected. We use `fixed` with `top: 0`, because focus is moved into the textarea\n // for a split second and if it's off-screen, some browsers will attempt to scroll it into view.\n styles.position = 'fixed';\n styles.top = styles.opacity = '0';\n styles.left = '-999em';\n textarea.setAttribute('aria-hidden', 'true');\n textarea.value = text;\n this._document.body.appendChild(textarea);\n }\n /** Finishes copying the text. */\n PendingCopy.prototype.copy = function () {\n var textarea = this._textarea;\n var successful = false;\n try { // Older browsers could throw if copy is not supported.\n if (textarea) {\n var currentFocus = this._document.activeElement;\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n successful = this._document.execCommand('copy');\n if (currentFocus) {\n currentFocus.focus();\n }\n }\n }\n catch (_a) {\n // Discard error.\n // Initial setting of {@code successful} will represent failure here.\n }\n return successful;\n };\n /** Cleans up DOM changes used to perform the copy operation. */\n PendingCopy.prototype.destroy = function () {\n var textarea = this._textarea;\n if (textarea) {\n if (textarea.parentNode) {\n textarea.parentNode.removeChild(textarea);\n }\n this._textarea = undefined;\n }\n };\n return PendingCopy;\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 * A service for copying text to the clipboard.\n */\n var Clipboard = /** @class */ (function () {\n function Clipboard(document) {\n this._document = document;\n }\n /**\n * Copies the provided text into the user's clipboard.\n *\n * @param text The string to copy.\n * @returns Whether the operation was successful.\n */\n Clipboard.prototype.copy = function (text) {\n var pendingCopy = this.beginCopy(text);\n var successful = pendingCopy.copy();\n pendingCopy.destroy();\n return successful;\n };\n /**\n * Prepares a string to be copied later. This is useful for large strings\n * which take too long to successfully render and be copied in the same tick.\n *\n * The caller must call `destroy` on the returned `PendingCopy`.\n *\n * @param text The string to copy.\n * @returns the pending copy operation.\n */\n Clipboard.prototype.beginCopy = function (text) {\n return new PendingCopy(text, this._document);\n };\n return Clipboard;\n }());\n Clipboard.ɵprov = i0.ɵɵdefineInjectable({ factory: function Clipboard_Factory() { return new Clipboard(i0.ɵɵinject(i1.DOCUMENT)); }, token: Clipboard, providedIn: \"root\" });\n Clipboard.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n Clipboard.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: i0.Inject, args: [i1.DOCUMENT,] }] }\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 /** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\n var CKD_COPY_TO_CLIPBOARD_CONFIG = new i0.InjectionToken('CKD_COPY_TO_CLIPBOARD_CONFIG');\n /**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\n var CdkCopyToClipboard = /** @class */ (function () {\n function CdkCopyToClipboard(_clipboard, _ngZone, config) {\n this._clipboard = _clipboard;\n this._ngZone = _ngZone;\n /** Content to be copied. */\n this.text = '';\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content.\n */\n this.attempts = 1;\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n this.copied = new i0.EventEmitter();\n /** Copies that are currently being attempted. */\n this._pending = new Set();\n if (config && config.attempts != null) {\n this.attempts = config.attempts;\n }\n }\n /** Copies the current text to the clipboard. */\n CdkCopyToClipboard.prototype.copy = function (attempts) {\n var _this = this;\n if (attempts === void 0) { attempts = this.attempts; }\n if (attempts > 1) {\n var remainingAttempts_1 = attempts;\n var pending_1 = this._clipboard.beginCopy(this.text);\n this._pending.add(pending_1);\n var attempt_1 = function () {\n var successful = pending_1.copy();\n if (!successful && --remainingAttempts_1 && !_this._destroyed) {\n // We use 1 for the timeout since it's more predictable when flushing in unit tests.\n _this._currentTimeout = _this._ngZone.runOutsideAngular(function () { return setTimeout(attempt_1, 1); });\n }\n else {\n _this._currentTimeout = null;\n _this._pending.delete(pending_1);\n pending_1.destroy();\n _this.copied.emit(successful);\n }\n };\n attempt_1();\n }\n else {\n this.copied.emit(this._clipboard.copy(this.text));\n }\n };\n CdkCopyToClipboard.prototype.ngOnDestroy = function () {\n if (this._currentTimeout) {\n clearTimeout(this._currentTimeout);\n }\n this._pending.forEach(function (copy) { return copy.destroy(); });\n this._pending.clear();\n this._destroyed = true;\n };\n return CdkCopyToClipboard;\n }());\n CdkCopyToClipboard.decorators = [\n { type: i0.Directive, args: [{\n selector: '[cdkCopyToClipboard]',\n host: {\n '(click)': 'copy()',\n }\n },] }\n ];\n CdkCopyToClipboard.ctorParameters = function () { return [\n { type: Clipboard },\n { type: i0.NgZone },\n { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [CKD_COPY_TO_CLIPBOARD_CONFIG,] }] }\n ]; };\n CdkCopyToClipboard.propDecorators = {\n text: [{ type: i0.Input, args: ['cdkCopyToClipboard',] }],\n attempts: [{ type: i0.Input, args: ['cdkCopyToClipboardAttempts',] }],\n copied: [{ type: i0.Output, args: ['cdkCopyToClipboardCopied',] }]\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 ClipboardModule = /** @class */ (function () {\n function ClipboardModule() {\n }\n return ClipboardModule;\n }());\n ClipboardModule.decorators = [\n { type: i0.NgModule, args: [{\n declarations: [CdkCopyToClipboard],\n exports: [CdkCopyToClipboard],\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.CKD_COPY_TO_CLIPBOARD_CONFIG = CKD_COPY_TO_CLIPBOARD_CONFIG;\n exports.CdkCopyToClipboard = CdkCopyToClipboard;\n exports.Clipboard = Clipboard;\n exports.ClipboardModule = ClipboardModule;\n exports.PendingCopy = PendingCopy;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cdk-clipboard.umd.js.map\n"]}
1
+ {"version":3,"sources":["src/cdk/cdk-clipboard.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","cdk","clipboard","common","core","this","i1","i0","PendingCopy","text","_document","textarea","_textarea","createElement","styles","style","position","top","opacity","left","setAttribute","value","body","appendChild","prototype","copy","successful","currentFocus","activeElement","select","setSelectionRange","length","execCommand","focus","_a","destroy","parentNode","removeChild","undefined","Clipboard","document","pendingCopy","beginCopy","ɵprov","ɵɵdefineInjectable","Clipboard_Factory","ɵɵinject","DOCUMENT","token","providedIn","decorators","type","Injectable","args","ctorParameters","Inject","ClipboardModule","CDK_COPY_TO_CLIPBOARD_CONFIG","InjectionToken","CKD_COPY_TO_CLIPBOARD_CONFIG","CdkCopyToClipboard","_clipboard","_ngZone","config","attempts","copied","EventEmitter","_pending","Set","_this","remainingAttempts_1","pending_1","add","attempt_1","_destroyed","_currentTimeout","delete","emit","runOutsideAngular","setTimeout","ngOnDestroy","clearTimeout","forEach","clear","Directive","selector","host","(click)","NgZone","Optional","propDecorators","Input","Output","NgModule","declarations","Object","defineProperty"],"mappings":"CAAC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,kBAClG,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,yBAA0B,CAAC,UAAW,kBAAmB,iBAAkBJ,GACrGA,IAAzBD,EAASA,GAAUO,MAA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,EAAW,OAS3GA,SAGApE,KAAK4D,OAAOY,KAAKxE,KAAKwD,WAAWpC,KAAKpB,KAAKI,QAGnDmD,EAAmBpC,UAAUwD,YAAc,WACnC3E,KAAKsE,iBACLM,aAAa5E,KAAKsE,iBAEtBtE,KAAK8D,SAASe,SAAQ,SAAUzD,GAAQ,OAAOA,EAAKU,aACpD9B,KAAK8D,SAASgB,QACd9E,KAAKqE,YAAa,GAEfd,EAzD4B,GA2DvCA,EAAmBV,WAAa,CAC5B,CAAEC,KAAM5C,EAAG6E,UAAW/B,KAAM,CAAC,CACjBgC,SAAU,uBACVC,KAAM,CACFC,UAAW,cAI/B3B,EAAmBN,eAAiB,WAAc,MAAO,CACrD,CAAEH,KAAMZ,GACR,CAAEY,KAAM5C,EAAGiF,QACX,CAAErC,UAAMb,EAAWY,WAAY,CAAC,CAAEC,KAAM5C,EAAGkF,UAAY,CAAEtC,KAAM5C,EAAGgD,OAAQF,KAAM,CAACM,QAErFC,EAAmB8B,eAAiB,CAChCjF,KAAM,CAAC,CAAE0C,KAAM5C,EAAGoF,MAAOtC,KAAM,CAAC,wBAChCW,SAAU,CAAC,CAAEb,KAAM5C,EAAGoF,MAAOtC,KAAM,CAAC,gCACpCY,OAAQ,CAAC,CAAEd,KAAM5C,EAAGqF,OAAQvC,KAAM,CAAC,gCAUnCG,EACA,SAASA,OAIGN,WAAa,CACzB,CAAEC,KAAM5C,EAAGsF,SAAUxC,KAAM,CAAC,CAChByC,aAAc,CAAClC,GACflE,QAAS,CAACkE;;;;;;;;AAgB1BlE,EAAQ+D,6BAA+BA,EACvC/D,EAAQiE,6BAA+BA,EACvCjE,EAAQkE,mBAAqBA,EAC7BlE,EAAQ6C,UAAYA,EACpB7C,EAAQ8D,gBAAkBA,EAC1B9D,EAAQc,YAAcA,EAEtBuF,OAAOC,eAAetG,EAAS,aAAc,CAAE2B,OAAO","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core')) :\n typeof define === 'function' && define.amd ? define('@angular/cdk/clipboard', ['exports', '@angular/common', '@angular/core'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.clipboard = {}), global.ng.common, global.ng.core));\n}(this, (function (exports, i1, i0) { '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 /**\n * A pending copy-to-clipboard operation.\n *\n * The implementation of copying text to the clipboard modifies the DOM and\n * forces a relayout. This relayout can take too long if the string is large,\n * causing the execCommand('copy') to happen too long after the user clicked.\n * This results in the browser refusing to copy. This object lets the\n * relayout happen in a separate tick from copying by providing a copy function\n * that can be called later.\n *\n * Destroy must be called when no longer in use, regardless of whether `copy` is\n * called.\n */\n var PendingCopy = /** @class */ (function () {\n function PendingCopy(text, _document) {\n this._document = _document;\n var textarea = this._textarea = this._document.createElement('textarea');\n var styles = textarea.style;\n // Hide the element for display and accessibility. Set a fixed position so the page layout\n // isn't affected. We use `fixed` with `top: 0`, because focus is moved into the textarea\n // for a split second and if it's off-screen, some browsers will attempt to scroll it into view.\n styles.position = 'fixed';\n styles.top = styles.opacity = '0';\n styles.left = '-999em';\n textarea.setAttribute('aria-hidden', 'true');\n textarea.value = text;\n this._document.body.appendChild(textarea);\n }\n /** Finishes copying the text. */\n PendingCopy.prototype.copy = function () {\n var textarea = this._textarea;\n var successful = false;\n try { // Older browsers could throw if copy is not supported.\n if (textarea) {\n var currentFocus = this._document.activeElement;\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n successful = this._document.execCommand('copy');\n if (currentFocus) {\n currentFocus.focus();\n }\n }\n }\n catch (_a) {\n // Discard error.\n // Initial setting of {@code successful} will represent failure here.\n }\n return successful;\n };\n /** Cleans up DOM changes used to perform the copy operation. */\n PendingCopy.prototype.destroy = function () {\n var textarea = this._textarea;\n if (textarea) {\n if (textarea.parentNode) {\n textarea.parentNode.removeChild(textarea);\n }\n this._textarea = undefined;\n }\n };\n return PendingCopy;\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 * A service for copying text to the clipboard.\n */\n var Clipboard = /** @class */ (function () {\n function Clipboard(document) {\n this._document = document;\n }\n /**\n * Copies the provided text into the user's clipboard.\n *\n * @param text The string to copy.\n * @returns Whether the operation was successful.\n */\n Clipboard.prototype.copy = function (text) {\n var pendingCopy = this.beginCopy(text);\n var successful = pendingCopy.copy();\n pendingCopy.destroy();\n return successful;\n };\n /**\n * Prepares a string to be copied later. This is useful for large strings\n * which take too long to successfully render and be copied in the same tick.\n *\n * The caller must call `destroy` on the returned `PendingCopy`.\n *\n * @param text The string to copy.\n * @returns the pending copy operation.\n */\n Clipboard.prototype.beginCopy = function (text) {\n return new PendingCopy(text, this._document);\n };\n return Clipboard;\n }());\n Clipboard.ɵprov = i0.ɵɵdefineInjectable({ factory: function Clipboard_Factory() { return new Clipboard(i0.ɵɵinject(i1.DOCUMENT)); }, token: Clipboard, providedIn: \"root\" });\n Clipboard.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n Clipboard.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: i0.Inject, args: [i1.DOCUMENT,] }] }\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 /** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\n var CDK_COPY_TO_CLIPBOARD_CONFIG = new i0.InjectionToken('CDK_COPY_TO_CLIPBOARD_CONFIG');\n /**\n * @deprecated Use `CDK_COPY_TO_CLIPBOARD_CONFIG` instead.\n * @breaking-change 13.0.0\n */\n var CKD_COPY_TO_CLIPBOARD_CONFIG = CDK_COPY_TO_CLIPBOARD_CONFIG;\n /**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\n var CdkCopyToClipboard = /** @class */ (function () {\n function CdkCopyToClipboard(_clipboard, _ngZone, config) {\n this._clipboard = _clipboard;\n this._ngZone = _ngZone;\n /** Content to be copied. */\n this.text = '';\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content.\n */\n this.attempts = 1;\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n this.copied = new i0.EventEmitter();\n /** Copies that are currently being attempted. */\n this._pending = new Set();\n if (config && config.attempts != null) {\n this.attempts = config.attempts;\n }\n }\n /** Copies the current text to the clipboard. */\n CdkCopyToClipboard.prototype.copy = function (attempts) {\n var _this = this;\n if (attempts === void 0) { attempts = this.attempts; }\n if (attempts > 1) {\n var remainingAttempts_1 = attempts;\n var pending_1 = this._clipboard.beginCopy(this.text);\n this._pending.add(pending_1);\n var attempt_1 = function () {\n var successful = pending_1.copy();\n if (!successful && --remainingAttempts_1 && !_this._destroyed) {\n // We use 1 for the timeout since it's more predictable when flushing in unit tests.\n _this._currentTimeout = _this._ngZone.runOutsideAngular(function () { return setTimeout(attempt_1, 1); });\n }\n else {\n _this._currentTimeout = null;\n _this._pending.delete(pending_1);\n pending_1.destroy();\n _this.copied.emit(successful);\n }\n };\n attempt_1();\n }\n else {\n this.copied.emit(this._clipboard.copy(this.text));\n }\n };\n CdkCopyToClipboard.prototype.ngOnDestroy = function () {\n if (this._currentTimeout) {\n clearTimeout(this._currentTimeout);\n }\n this._pending.forEach(function (copy) { return copy.destroy(); });\n this._pending.clear();\n this._destroyed = true;\n };\n return CdkCopyToClipboard;\n }());\n CdkCopyToClipboard.decorators = [\n { type: i0.Directive, args: [{\n selector: '[cdkCopyToClipboard]',\n host: {\n '(click)': 'copy()',\n }\n },] }\n ];\n CdkCopyToClipboard.ctorParameters = function () { return [\n { type: Clipboard },\n { type: i0.NgZone },\n { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [CKD_COPY_TO_CLIPBOARD_CONFIG,] }] }\n ]; };\n CdkCopyToClipboard.propDecorators = {\n text: [{ type: i0.Input, args: ['cdkCopyToClipboard',] }],\n attempts: [{ type: i0.Input, args: ['cdkCopyToClipboardAttempts',] }],\n copied: [{ type: i0.Output, args: ['cdkCopyToClipboardCopied',] }]\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 ClipboardModule = /** @class */ (function () {\n function ClipboardModule() {\n }\n return ClipboardModule;\n }());\n ClipboardModule.decorators = [\n { type: i0.NgModule, args: [{\n declarations: [CdkCopyToClipboard],\n exports: [CdkCopyToClipboard],\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.CDK_COPY_TO_CLIPBOARD_CONFIG = CDK_COPY_TO_CLIPBOARD_CONFIG;\n exports.CKD_COPY_TO_CLIPBOARD_CONFIG = CKD_COPY_TO_CLIPBOARD_CONFIG;\n exports.CdkCopyToClipboard = CdkCopyToClipboard;\n exports.Clipboard = Clipboard;\n exports.ClipboardModule = ClipboardModule;\n exports.PendingCopy = PendingCopy;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cdk-clipboard.umd.js.map\n"]}
@@ -3517,7 +3517,7 @@
3517
3517
  }
3518
3518
  var index = CdkDrag._dragInstances.indexOf(this);
3519
3519
  if (index > -1) {
3520
- CdkDrag._dragInstances.splice(index, -1);
3520
+ CdkDrag._dragInstances.splice(index, 1);
3521
3521
  }
3522
3522
  this._destroyed.next();
3523
3523
  this._destroyed.complete();