You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
13 KiB
1 lines
13 KiB
{"version":3,"file":"slider.d.ts","sources":["slider.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA","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 */\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, NgZone, AfterViewInit } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { CanColor, CanDisable, HasTabIndex } from '@angular/material/core';\n/**\n * Provider Expression that allows mat-slider to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)] and [formControl].\n * @docs-private\n */\nexport declare const MAT_SLIDER_VALUE_ACCESSOR: any;\n/** A simple change event emitted by the MatSlider component. */\nexport declare class MatSliderChange {\n /** The MatSlider that changed. */\n source: MatSlider;\n /** The new value of the source slider. */\n value: number | null;\n}\n/** @docs-private */\ndeclare const _MatSliderBase: import(\"@angular/material/core/common-behaviors/constructor\").Constructor<HasTabIndex> & import(\"@angular/material/core/common-behaviors/constructor\").AbstractConstructor<HasTabIndex> & import(\"@angular/material/core/common-behaviors/constructor\").Constructor<CanColor> & import(\"@angular/material/core/common-behaviors/constructor\").AbstractConstructor<CanColor> & import(\"@angular/material/core/common-behaviors/constructor\").Constructor<CanDisable> & import(\"@angular/material/core/common-behaviors/constructor\").AbstractConstructor<CanDisable> & {\n new (_elementRef: ElementRef): {\n _elementRef: ElementRef;\n };\n};\n/**\n * Allows users to select from a range of values by moving the slider thumb. It is similar in\n * behavior to the native `<input type=\"range\">` element.\n */\nexport declare class MatSlider extends _MatSliderBase implements ControlValueAccessor, OnDestroy, CanDisable, CanColor, AfterViewInit, HasTabIndex {\n private _focusMonitor;\n private _changeDetectorRef;\n private _dir;\n private _ngZone;\n _animationMode?: string | undefined;\n /** Whether the slider is inverted. */\n get invert(): boolean;\n set invert(value: boolean);\n private _invert;\n /** The maximum value that the slider can have. */\n get max(): number;\n set max(v: number);\n private _max;\n /** The minimum value that the slider can have. */\n get min(): number;\n set min(v: number);\n private _min;\n /** The values at which the thumb will snap. */\n get step(): number;\n set step(v: number);\n private _step;\n /** Whether or not to show the thumb label. */\n get thumbLabel(): boolean;\n set thumbLabel(value: boolean);\n private _thumbLabel;\n /**\n * How often to show ticks. Relative to the step so that a tick always appears on a step.\n * Ex: Tick interval of 4 with a step of 3 will draw a tick every 4 steps (every 12 values).\n */\n get tickInterval(): 'auto' | number;\n set tickInterval(value: 'auto' | number);\n private _tickInterval;\n /** Value of the slider. */\n get value(): number;\n set value(v: number);\n private _value;\n /**\n * Function that will be used to format the value before it is displayed\n * in the thumb label. Can be used to format very large number in order\n * for them to fit into the slider thumb.\n */\n displayWith: (value: number) => string | number;\n /** Text corresponding to the slider's value. Used primarily for improved accessibility. */\n valueText: string;\n /** Whether the slider is vertical. */\n get vertical(): boolean;\n set vertical(value: boolean);\n private _vertical;\n /** Event emitted when the slider value has changed. */\n readonly change: EventEmitter<MatSliderChange>;\n /** Event emitted when the slider thumb moves. */\n readonly input: EventEmitter<MatSliderChange>;\n /**\n * Emits when the raw value of the slider changes. This is here primarily\n * to facilitate the two-way binding for the `value` input.\n * @docs-private\n */\n readonly valueChange: EventEmitter<number | null>;\n /** The value to be used for display purposes. */\n get displayValue(): string | number;\n /** set focus to the host element */\n focus(options?: FocusOptions): void;\n /** blur the host element */\n blur(): void;\n /** onTouch function registered via registerOnTouch (ControlValueAccessor). */\n onTouched: () => any;\n /** The percentage of the slider that coincides with the value. */\n get percent(): number;\n private _percent;\n /**\n * Whether or not the thumb is sliding and what the user is using to slide it with.\n * Used to determine if there should be a transition for the thumb and fill track.\n */\n _isSliding: 'keyboard' | 'pointer' | null;\n /**\n * Whether or not the slider is active (clicked or sliding).\n * Used to shrink and grow the thumb as according to the Material Design spec.\n */\n _isActive: boolean;\n /**\n * Whether the axis of the slider is inverted.\n * (i.e. whether moving the thumb in the positive x or y direction decreases the slider's value).\n */\n _shouldInvertAxis(): boolean;\n /** Whether the slider is at its minimum value. */\n _isMinValue(): boolean;\n /**\n * The amount of space to leave between the slider thumb and the track fill & track background\n * elements.\n */\n _getThumbGap(): 7 | 10 | 0;\n /** CSS styles for the track background element. */\n _getTrackBackgroundStyles(): {\n [key: string]: string;\n };\n /** CSS styles for the track fill element. */\n _getTrackFillStyles(): {\n [key: string]: string;\n };\n /** CSS styles for the ticks container element. */\n _getTicksContainerStyles(): {\n [key: string]: string;\n };\n /** CSS styles for the ticks element. */\n _getTicksStyles(): {\n [key: string]: string;\n };\n _getThumbContainerStyles(): {\n [key: string]: string;\n };\n /** The size of a tick interval as a percentage of the size of the track. */\n private _tickIntervalPercent;\n /** The dimensions of the slider. */\n private _sliderDimensions;\n private _controlValueAccessorChangeFn;\n /** Decimal places to round to, based on the step amount. */\n private _roundToDecimal;\n /** Subscription to the Directionality change EventEmitter. */\n private _dirChangeSubscription;\n /** The value of the slider when the slide start event fires. */\n private _valueOnSlideStart;\n /** Reference to the inner slider wrapper element. */\n private _sliderWrapper;\n /**\n * Whether mouse events should be converted to a slider position by calculating their distance\n * from the right or bottom edge of the slider as opposed to the top or left.\n */\n _shouldInvertMouseCoords(): boolean;\n /** The language direction for this slider element. */\n private _getDirection;\n /** Keeps track of the last pointer event that was captured by the slider. */\n private _lastPointerEvent;\n /** Used to subscribe to global move and end events */\n protected _document: Document;\n /**\n * Identifier used to attribute a touch event to a particular slider.\n * Will be undefined if one of the following conditions is true:\n * - The user isn't dragging using a touch device.\n * - The browser doesn't support `Touch.identifier`.\n * - Dragging hasn't started yet.\n */\n private _touchId;\n constructor(elementRef: ElementRef, _focusMonitor: FocusMonitor, _changeDetectorRef: ChangeDetectorRef, _dir: Directionality, tabIndex: string, _ngZone: NgZone, _document: any, _animationMode?: string | undefined);\n ngAfterViewInit(): void;\n ngOnDestroy(): void;\n _onMouseenter(): void;\n _onFocus(): void;\n _onBlur(): void;\n _onKeydown(event: KeyboardEvent): void;\n _onKeyup(): void;\n /** Called when the user has put their pointer down on the slider. */\n private _pointerDown;\n /**\n * Called when the user has moved their pointer after\n * starting to drag. Bound on the document level.\n */\n private _pointerMove;\n /** Called when the user has lifted their pointer. Bound on the document level. */\n private _pointerUp;\n /** Called when the window has lost focus. */\n private _windowBlur;\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow;\n /**\n * Binds our global move and end events. They're bound at the document level and only while\n * dragging so that the user doesn't have to keep their pointer exactly over the slider\n * as they're swiping across the screen.\n */\n private _bindGlobalEvents;\n /** Removes any global event listeners that we may have added. */\n private _removeGlobalEvents;\n /** Increments the slider by the given number of steps (negative number decrements). */\n private _increment;\n /** Calculate the new value from the new physical location. The value will always be snapped. */\n private _updateValueFromPosition;\n /** Emits a change event if the current value is different from the last emitted value. */\n private _emitChangeEvent;\n /** Emits an input event when the current value is different from the last emitted value. */\n private _emitInputEvent;\n /** Updates the amount of space between ticks as a percentage of the width of the slider. */\n private _updateTickIntervalPercent;\n /** Creates a slider change object from the specified value. */\n private _createChangeEvent;\n /** Calculates the percentage of the slider that a value is. */\n private _calculatePercentage;\n /** Calculates the value a percentage of the slider corresponds to. */\n private _calculateValue;\n /** Return a number between two numbers. */\n private _clamp;\n /**\n * Get the bounding client rect of the slider track element.\n * The track is used rather than the native element to ignore the extra space that the thumb can\n * take up.\n */\n private _getSliderDimensions;\n /**\n * Focuses the native element.\n * Currently only used to allow a blur event to fire but will be used with keyboard input later.\n */\n private _focusHostElement;\n /** Blurs the native element. */\n private _blurHostElement;\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value: any): void;\n /**\n * Registers a callback to be triggered when the value has changed.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: (value: any) => void): void;\n /**\n * Registers a callback to be triggered when the component is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: any): void;\n /**\n * Sets whether the component should be disabled.\n * Implemented as part of ControlValueAccessor.\n * @param isDisabled\n */\n setDisabledState(isDisabled: boolean): void;\n static ngAcceptInputType_invert: BooleanInput;\n static ngAcceptInputType_max: NumberInput;\n static ngAcceptInputType_min: NumberInput;\n static ngAcceptInputType_step: NumberInput;\n static ngAcceptInputType_thumbLabel: BooleanInput;\n static ngAcceptInputType_tickInterval: NumberInput;\n static ngAcceptInputType_value: NumberInput;\n static ngAcceptInputType_vertical: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_tabIndex: NumberInput;\n}\nexport {};\n"]}
|