blob: 19dd7944cda3eb39e2bb4a2a78d6b01a3c1d3c76 [file] [log] [blame]
{"version":3,"file":"slide-toggle.es5.js","sources":["../../../src/material/slide-toggle/slide-toggle-module.ts","../../../src/material/slide-toggle/slide-toggle.ts","../../../src/material/slide-toggle/slide-toggle-config.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 {ObserversModule} from '@angular/cdk/observers';\nimport {NgModule} from '@angular/core';\nimport {GestureConfig, MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {HAMMER_GESTURE_CONFIG} from '@angular/platform-browser';\nimport {MatSlideToggle} from './slide-toggle';\n\n\n@NgModule({\n imports: [MatRippleModule, MatCommonModule, ObserversModule],\n exports: [MatSlideToggle, MatCommonModule],\n declarations: [MatSlideToggle],\n providers: [\n {provide: HAMMER_GESTURE_CONFIG, useClass: GestureConfig}\n ],\n})\nexport class MatSlideToggleModule {}\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 {FocusMonitor} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n ViewEncapsulation,\n NgZone,\n Optional,\n Inject,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanColor, CanColorCtor,\n CanDisable, CanDisableCtor,\n CanDisableRipple, CanDisableRippleCtor,\n HammerInput,\n HasTabIndex, HasTabIndexCtor,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {\n MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS,\n MatSlideToggleDefaultOptions\n} from './slide-toggle-config';\n\n// Increasing integer for generating unique ids for slide-toggle components.\nlet nextUniqueId = 0;\n\n/** @docs-private */\nexport const MAT_SLIDE_TOGGLE_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatSlideToggle),\n multi: true\n};\n\n/** Change event object emitted by a MatSlideToggle. */\nexport class MatSlideToggleChange {\n constructor(\n /** The source MatSlideToggle of the event. */\n public source: MatSlideToggle,\n /** The new `checked` value of the MatSlideToggle. */\n public checked: boolean) { }\n}\n\n// Boilerplate for applying mixins to MatSlideToggle.\n/** @docs-private */\nclass MatSlideToggleBase {\n constructor(public _elementRef: ElementRef) {}\n}\nconst _MatSlideToggleMixinBase:\n HasTabIndexCtor &\n CanColorCtor &\n CanDisableRippleCtor &\n CanDisableCtor &\n typeof MatSlideToggleBase =\n mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(MatSlideToggleBase)), 'accent'));\n\n/** Represents a slidable \"switch\" toggle that can be moved between on and off. */\n@Component({\n moduleId: module.id,\n selector: 'mat-slide-toggle',\n exportAs: 'matSlideToggle',\n host: {\n 'class': 'mat-slide-toggle',\n '[id]': 'id',\n // Needs to be `-1` so it can still receive programmatic focus.\n '[attr.tabindex]': 'disabled ? null : -1',\n '[class.mat-checked]': 'checked',\n '[class.mat-disabled]': 'disabled',\n '[class.mat-slide-toggle-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n '(focus)': '_inputElement.nativeElement.focus()',\n },\n templateUrl: 'slide-toggle.html',\n styleUrls: ['slide-toggle.css'],\n providers: [MAT_SLIDE_TOGGLE_VALUE_ACCESSOR],\n inputs: ['disabled', 'disableRipple', 'color', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatSlideToggle extends _MatSlideToggleMixinBase implements OnDestroy, AfterContentInit,\n ControlValueAccessor,\n CanDisable, CanColor,\n HasTabIndex,\n CanDisableRipple {\n private _onChange = (_: any) => {};\n private _onTouched = () => {};\n\n private _uniqueId: string = `mat-slide-toggle-${++nextUniqueId}`;\n private _required: boolean = false;\n private _checked: boolean = false;\n\n /** Whether the thumb is currently being dragged. */\n private _dragging = false;\n\n /** Previous checked state before drag started. */\n private _previousChecked: boolean;\n\n /** Width of the thumb bar of the slide-toggle. */\n private _thumbBarWidth: number;\n\n /** Percentage of the thumb while dragging. Percentage as fraction of 100. */\n private _dragPercentage: number;\n\n /** Reference to the thumb HTMLElement. */\n @ViewChild('thumbContainer', {static: false}) _thumbEl: ElementRef;\n\n /** Reference to the thumb bar HTMLElement. */\n @ViewChild('toggleBar', {static: false}) _thumbBarEl: ElementRef;\n\n /** Name value will be applied to the input element if present. */\n @Input() name: string | null = null;\n\n /** A unique id for the slide-toggle input. If none is supplied, it will be auto-generated. */\n @Input() id: string = this._uniqueId;\n\n /** Whether the label should appear after or before the slide-toggle. Defaults to 'after'. */\n @Input() labelPosition: 'before' | 'after' = 'after';\n\n /** Used to set the aria-label attribute on the underlying input element. */\n @Input('aria-label') ariaLabel: string | null = null;\n\n /** Used to set the aria-labelledby attribute on the underlying input element. */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n /** Whether the slide-toggle is required. */\n @Input()\n get required(): boolean { return this._required; }\n set required(value) { this._required = coerceBooleanProperty(value); }\n\n /** Whether the slide-toggle element is checked or not. */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value) {\n this._checked = coerceBooleanProperty(value);\n this._changeDetectorRef.markForCheck();\n }\n /** An event will be dispatched each time the slide-toggle changes its value. */\n @Output() readonly change: EventEmitter<MatSlideToggleChange> =\n new EventEmitter<MatSlideToggleChange>();\n\n /**\n * An event will be dispatched each time the slide-toggle input is toggled.\n * This event is always emitted when the user toggles the slide toggle, but this does not mean\n * the slide toggle's value has changed. The event does not fire when the user drags to change\n * the slide toggle value.\n */\n @Output() readonly toggleChange: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * An event will be dispatched each time the slide-toggle is dragged.\n * This event is always emitted when the user drags the slide toggle to make a change greater\n * than 50%. It does not mean the slide toggle's value is changed. The event is not emitted when\n * the user toggles the slide toggle to change its value.\n */\n @Output() readonly dragChange: EventEmitter<void> = new EventEmitter<void>();\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Reference to the underlying input element. */\n @ViewChild('input', {static: false}) _inputElement: ElementRef<HTMLInputElement>;\n\n constructor(elementRef: ElementRef,\n private _focusMonitor: FocusMonitor,\n private _changeDetectorRef: ChangeDetectorRef,\n @Attribute('tabindex') tabIndex: string,\n private _ngZone: NgZone,\n @Inject(MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS)\n public defaults: MatSlideToggleDefaultOptions,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n @Optional() private _dir?: Directionality) {\n super(elementRef);\n this.tabIndex = parseInt(tabIndex) || 0;\n }\n\n ngAfterContentInit() {\n this._focusMonitor\n .monitor(this._elementRef, true)\n .subscribe(focusOrigin => {\n if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state\n // change (such as a form control's 'ng-touched') will cause a changed-after-checked\n // error. See https://github.com/angular/angular/issues/17793. To work around this,\n // we defer telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => this._onTouched());\n }\n });\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /** Method being called whenever the underlying input emits a change event. */\n _onChangeEvent(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the component's `change` output.\n event.stopPropagation();\n\n if (!this._dragging) {\n this.toggleChange.emit();\n }\n // Releasing the pointer over the `<label>` element while dragging triggers another\n // click event on the `<label>` element. This means that the checked state of the underlying\n // input changed unintentionally and needs to be changed back. Or when the slide toggle's config\n // disabled toggle change event by setting `disableToggleValue: true`, the slide toggle's value\n // does not change, and the checked state of the underlying input needs to be changed back.\n if (this._dragging || this.defaults.disableToggleValue) {\n this._inputElement.nativeElement.checked = this.checked;\n return;\n }\n\n // Sync the value from the underlying input element with the component instance.\n this.checked = this._inputElement.nativeElement.checked;\n\n // Emit our custom change event only if the underlying input emitted one. This ensures that\n // there is no change event, when the checked state changes programmatically.\n this._emitChangeEvent();\n }\n\n /** Method being called whenever the slide-toggle has been clicked. */\n _onInputClick(event: Event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `slide-toggle` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n\n /** Implemented as part of ControlValueAccessor. */\n writeValue(value: any): void {\n this.checked = !!value;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n\n /** Implemented as a part of ControlValueAccessor. */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this._changeDetectorRef.markForCheck();\n }\n\n /** Focuses the slide-toggle. */\n focus(): void {\n this._focusMonitor.focusVia(this._inputElement, 'keyboard');\n }\n\n /** Toggles the checked state of the slide-toggle. */\n toggle(): void {\n this.checked = !this.checked;\n this._onChange(this.checked);\n }\n\n /**\n * Emits a change event on the `change` output. Also notifies the FormControl about the change.\n */\n private _emitChangeEvent() {\n this._onChange(this.checked);\n this.change.emit(new MatSlideToggleChange(this, this.checked));\n }\n\n /** Retrieves the percentage of thumb from the moved distance. Percentage as fraction of 100. */\n private _getDragPercentage(distance: number) {\n let percentage = (distance / this._thumbBarWidth) * 100;\n\n // When the toggle was initially checked, then we have to start the drag at the end.\n if (this._previousChecked) {\n percentage += 100;\n }\n\n return Math.max(0, Math.min(percentage, 100));\n }\n\n _onDragStart() {\n if (!this.disabled && !this._dragging) {\n const thumbEl = this._thumbEl.nativeElement;\n this._thumbBarWidth = this._thumbBarEl.nativeElement.clientWidth - thumbEl.clientWidth;\n thumbEl.classList.add('mat-dragging');\n\n this._previousChecked = this.checked;\n this._dragging = true;\n }\n }\n\n _onDrag(event: HammerInput) {\n if (this._dragging) {\n const direction = this._dir && this._dir.value === 'rtl' ? -1 : 1;\n this._dragPercentage = this._getDragPercentage(event.deltaX * direction);\n // Calculate the moved distance based on the thumb bar width.\n const dragX = (this._dragPercentage / 100) * this._thumbBarWidth * direction;\n this._thumbEl.nativeElement.style.transform = `translate3d(${dragX}px, 0, 0)`;\n }\n }\n\n _onDragEnd() {\n if (this._dragging) {\n const newCheckedValue = this._dragPercentage > 50;\n\n if (newCheckedValue !== this.checked) {\n this.dragChange.emit();\n if (!this.defaults.disableDragValue) {\n this.checked = newCheckedValue;\n this._emitChangeEvent();\n }\n }\n\n // The drag should be stopped outside of the current event handler, otherwise the\n // click event will be fired before it and will revert the drag change.\n this._ngZone.runOutsideAngular(() => setTimeout(() => {\n if (this._dragging) {\n this._dragging = false;\n this._thumbEl.nativeElement.classList.remove('mat-dragging');\n\n // Reset the transform because the component will take care\n // of the thumb position after drag.\n this._thumbEl.nativeElement.style.transform = '';\n }\n }));\n }\n }\n\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // Since the event of the `cdkObserveContent` directive runs outside of the zone, the\n // slide-toggle component will be only marked for check, but no actual change detection runs\n // automatically. Instead of going back into the zone in order to trigger a change detection\n // which causes *all* components to be checked (if explicitly marked or not using OnPush),\n // we only trigger an explicit change detection for the slide-toggle view and it's children.\n this._changeDetectorRef.detectChanges();\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 */\nimport {InjectionToken} from '@angular/core';\n\n\n/** Default `mat-slide-toggle` options that can be overridden. */\nexport interface MatSlideToggleDefaultOptions {\n /** Whether toggle action triggers value changes in slide toggle. */\n disableToggleValue?: boolean;\n /** Whether drag action triggers value changes in slide toggle. */\n disableDragValue?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-slide-toggle`. */\nexport const MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS =\n new InjectionToken<MatSlideToggleDefaultOptions>('mat-slide-toggle-default-options', {\n providedIn: 'root',\n factory: () => ({disableToggleValue: false, disableDragValue: false})\n });\n"],"names":["tslib_1.__extends"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AEmBA,AAAA,IAAa,gCAAgC,GAC3C,IAAI,cAAc,CAA+B,kCAAkC,EAAE;IACnF,UAAU,EAAE,MAAM;IAClB,OAAO;;;IAAE,YAAb,EAAmB,QAAC,EAAC,kBAAkB,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAC,EAAxE,EAAyE,CAAA;CACtE,CAAC;;;;;;;;ADyBJ,IAAI,YAAY,GAAG,CAAC,CAApB;;;;;AAGA,AAAA,IAAa,+BAA+B,GAAQ;IAClD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU;;;IAAC,YAA1B,EAAgC,OAAA,cAAc,CAA9C,EAA8C,EAAC;IAC7C,KAAK,EAAE,IAAI;CACZ,CAAD;;;;AAGA,AAAA,IAAA;;;;IACE,SAAF,oBAAA,CAEW,MAAsB,EAEtB,OAAgB,EAJ3B;QAEW,IAAX,CAAA,MAAiB,GAAN,MAAM,CAAgB;QAEtB,IAAX,CAAA,OAAkB,GAAP,OAAO,CAAS;KAAK;IAChC,OAAA,oBAAC,CAAD;CAAC,EAAD,CAAA,CAAC;;;;;AAID;;;;;;IACE,SAAF,kBAAA,CAAqB,WAAuB,EAA5C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