1 | import { NgModule, Component, Input, Output, EventEmitter, forwardRef, ViewChild, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
---|
2 | import { CommonModule } from '@angular/common';
|
---|
3 | import { DomHandler } from 'primeng/dom';
|
---|
4 | import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
---|
5 | import * as i0 from "@angular/core";
|
---|
6 | import * as i1 from "@angular/common";
|
---|
7 | export const SLIDER_VALUE_ACCESSOR = {
|
---|
8 | provide: NG_VALUE_ACCESSOR,
|
---|
9 | useExisting: forwardRef(() => Slider),
|
---|
10 | multi: true
|
---|
11 | };
|
---|
12 | export class Slider {
|
---|
13 | constructor(el, renderer, ngZone, cd) {
|
---|
14 | this.el = el;
|
---|
15 | this.renderer = renderer;
|
---|
16 | this.ngZone = ngZone;
|
---|
17 | this.cd = cd;
|
---|
18 | this.min = 0;
|
---|
19 | this.max = 100;
|
---|
20 | this.orientation = 'horizontal';
|
---|
21 | this.tabindex = 0;
|
---|
22 | this.onChange = new EventEmitter();
|
---|
23 | this.onSlideEnd = new EventEmitter();
|
---|
24 | this.handleValues = [];
|
---|
25 | this.onModelChange = () => { };
|
---|
26 | this.onModelTouched = () => { };
|
---|
27 | this.handleIndex = 0;
|
---|
28 | }
|
---|
29 | onMouseDown(event, index) {
|
---|
30 | if (this.disabled) {
|
---|
31 | return;
|
---|
32 | }
|
---|
33 | this.dragging = true;
|
---|
34 | this.updateDomData();
|
---|
35 | this.sliderHandleClick = true;
|
---|
36 | if (this.range && this.handleValues && this.handleValues[0] === this.max) {
|
---|
37 | this.handleIndex = 0;
|
---|
38 | }
|
---|
39 | else {
|
---|
40 | this.handleIndex = index;
|
---|
41 | }
|
---|
42 | this.bindDragListeners();
|
---|
43 | event.target.focus();
|
---|
44 | event.preventDefault();
|
---|
45 | if (this.animate) {
|
---|
46 | DomHandler.removeClass(this.el.nativeElement.children[0], 'p-slider-animate');
|
---|
47 | }
|
---|
48 | }
|
---|
49 | onTouchStart(event, index) {
|
---|
50 | if (this.disabled) {
|
---|
51 | return;
|
---|
52 | }
|
---|
53 | var touchobj = event.changedTouches[0];
|
---|
54 | this.startHandleValue = (this.range) ? this.handleValues[index] : this.handleValue;
|
---|
55 | this.dragging = true;
|
---|
56 | if (this.range && this.handleValues && this.handleValues[0] === this.max) {
|
---|
57 | this.handleIndex = 0;
|
---|
58 | }
|
---|
59 | else {
|
---|
60 | this.handleIndex = index;
|
---|
61 | }
|
---|
62 | if (this.orientation === 'horizontal') {
|
---|
63 | this.startx = parseInt(touchobj.clientX, 10);
|
---|
64 | this.barWidth = this.el.nativeElement.children[0].offsetWidth;
|
---|
65 | }
|
---|
66 | else {
|
---|
67 | this.starty = parseInt(touchobj.clientY, 10);
|
---|
68 | this.barHeight = this.el.nativeElement.children[0].offsetHeight;
|
---|
69 | }
|
---|
70 | if (this.animate) {
|
---|
71 | DomHandler.removeClass(this.el.nativeElement.children[0], 'p-slider-animate');
|
---|
72 | }
|
---|
73 | event.preventDefault();
|
---|
74 | }
|
---|
75 | onTouchMove(event, index) {
|
---|
76 | if (this.disabled) {
|
---|
77 | return;
|
---|
78 | }
|
---|
79 | var touchobj = event.changedTouches[0], handleValue = 0;
|
---|
80 | if (this.orientation === 'horizontal') {
|
---|
81 | handleValue = Math.floor(((parseInt(touchobj.clientX, 10) - this.startx) * 100) / (this.barWidth)) + this.startHandleValue;
|
---|
82 | }
|
---|
83 | else {
|
---|
84 | handleValue = Math.floor(((this.starty - parseInt(touchobj.clientY, 10)) * 100) / (this.barHeight)) + this.startHandleValue;
|
---|
85 | }
|
---|
86 | this.setValueFromHandle(event, handleValue);
|
---|
87 | event.preventDefault();
|
---|
88 | }
|
---|
89 | onTouchEnd(event, index) {
|
---|
90 | if (this.disabled) {
|
---|
91 | return;
|
---|
92 | }
|
---|
93 | this.dragging = false;
|
---|
94 | if (this.range)
|
---|
95 | this.onSlideEnd.emit({ originalEvent: event, values: this.values });
|
---|
96 | else
|
---|
97 | this.onSlideEnd.emit({ originalEvent: event, value: this.value });
|
---|
98 | if (this.animate) {
|
---|
99 | DomHandler.addClass(this.el.nativeElement.children[0], 'p-slider-animate');
|
---|
100 | }
|
---|
101 | event.preventDefault();
|
---|
102 | }
|
---|
103 | onBarClick(event) {
|
---|
104 | if (this.disabled) {
|
---|
105 | return;
|
---|
106 | }
|
---|
107 | if (!this.sliderHandleClick) {
|
---|
108 | this.updateDomData();
|
---|
109 | this.handleChange(event);
|
---|
110 | }
|
---|
111 | this.sliderHandleClick = false;
|
---|
112 | }
|
---|
113 | onHandleKeydown(event, handleIndex) {
|
---|
114 | if (this.disabled) {
|
---|
115 | return;
|
---|
116 | }
|
---|
117 | if (event.which == 38 || event.which == 39) {
|
---|
118 | this.spin(event, 1, handleIndex);
|
---|
119 | }
|
---|
120 | else if (event.which == 37 || event.which == 40) {
|
---|
121 | this.spin(event, -1, handleIndex);
|
---|
122 | }
|
---|
123 | }
|
---|
124 | spin(event, dir, handleIndex) {
|
---|
125 | let step = (this.step || 1) * dir;
|
---|
126 | if (this.range) {
|
---|
127 | this.handleIndex = handleIndex;
|
---|
128 | this.updateValue(this.values[this.handleIndex] + step);
|
---|
129 | this.updateHandleValue();
|
---|
130 | }
|
---|
131 | else {
|
---|
132 | this.updateValue(this.value + step);
|
---|
133 | this.updateHandleValue();
|
---|
134 | }
|
---|
135 | event.preventDefault();
|
---|
136 | }
|
---|
137 | handleChange(event) {
|
---|
138 | let handleValue = this.calculateHandleValue(event);
|
---|
139 | this.setValueFromHandle(event, handleValue);
|
---|
140 | }
|
---|
141 | bindDragListeners() {
|
---|
142 | this.ngZone.runOutsideAngular(() => {
|
---|
143 | const documentTarget = this.el ? this.el.nativeElement.ownerDocument : 'document';
|
---|
144 | if (!this.dragListener) {
|
---|
145 | this.dragListener = this.renderer.listen(documentTarget, 'mousemove', (event) => {
|
---|
146 | if (this.dragging) {
|
---|
147 | this.ngZone.run(() => {
|
---|
148 | this.handleChange(event);
|
---|
149 | });
|
---|
150 | }
|
---|
151 | });
|
---|
152 | }
|
---|
153 | if (!this.mouseupListener) {
|
---|
154 | this.mouseupListener = this.renderer.listen(documentTarget, 'mouseup', (event) => {
|
---|
155 | if (this.dragging) {
|
---|
156 | this.dragging = false;
|
---|
157 | this.ngZone.run(() => {
|
---|
158 | if (this.range)
|
---|
159 | this.onSlideEnd.emit({ originalEvent: event, values: this.values });
|
---|
160 | else
|
---|
161 | this.onSlideEnd.emit({ originalEvent: event, value: this.value });
|
---|
162 | if (this.animate) {
|
---|
163 | DomHandler.addClass(this.el.nativeElement.children[0], 'p-slider-animate');
|
---|
164 | }
|
---|
165 | });
|
---|
166 | }
|
---|
167 | });
|
---|
168 | }
|
---|
169 | });
|
---|
170 | }
|
---|
171 | unbindDragListeners() {
|
---|
172 | if (this.dragListener) {
|
---|
173 | this.dragListener();
|
---|
174 | }
|
---|
175 | if (this.mouseupListener) {
|
---|
176 | this.mouseupListener();
|
---|
177 | }
|
---|
178 | }
|
---|
179 | setValueFromHandle(event, handleValue) {
|
---|
180 | this.sliderHandleClick = false;
|
---|
181 | let newValue = this.getValueFromHandle(handleValue);
|
---|
182 | if (this.range) {
|
---|
183 | if (this.step) {
|
---|
184 | this.handleStepChange(newValue, this.values[this.handleIndex]);
|
---|
185 | }
|
---|
186 | else {
|
---|
187 | this.handleValues[this.handleIndex] = handleValue;
|
---|
188 | this.updateValue(newValue, event);
|
---|
189 | }
|
---|
190 | }
|
---|
191 | else {
|
---|
192 | if (this.step) {
|
---|
193 | this.handleStepChange(newValue, this.value);
|
---|
194 | }
|
---|
195 | else {
|
---|
196 | this.handleValue = handleValue;
|
---|
197 | this.updateValue(newValue, event);
|
---|
198 | }
|
---|
199 | }
|
---|
200 | this.cd.markForCheck();
|
---|
201 | }
|
---|
202 | handleStepChange(newValue, oldValue) {
|
---|
203 | let diff = (newValue - oldValue);
|
---|
204 | let val = oldValue;
|
---|
205 | if (diff < 0) {
|
---|
206 | val = oldValue + Math.ceil(newValue / this.step - oldValue / this.step) * this.step;
|
---|
207 | }
|
---|
208 | else if (diff > 0) {
|
---|
209 | val = oldValue + Math.floor(newValue / this.step - oldValue / this.step) * this.step;
|
---|
210 | }
|
---|
211 | this.updateValue(val);
|
---|
212 | this.updateHandleValue();
|
---|
213 | }
|
---|
214 | writeValue(value) {
|
---|
215 | if (this.range)
|
---|
216 | this.values = value || [0, 0];
|
---|
217 | else
|
---|
218 | this.value = value || 0;
|
---|
219 | this.updateHandleValue();
|
---|
220 | this.cd.markForCheck();
|
---|
221 | }
|
---|
222 | registerOnChange(fn) {
|
---|
223 | this.onModelChange = fn;
|
---|
224 | }
|
---|
225 | registerOnTouched(fn) {
|
---|
226 | this.onModelTouched = fn;
|
---|
227 | }
|
---|
228 | setDisabledState(val) {
|
---|
229 | this.disabled = val;
|
---|
230 | this.cd.markForCheck();
|
---|
231 | }
|
---|
232 | get rangeStartLeft() {
|
---|
233 | return this.isVertical() ? 'auto' : this.handleValues[0] + '%';
|
---|
234 | }
|
---|
235 | get rangeStartBottom() {
|
---|
236 | return this.isVertical() ? this.handleValues[0] + '%' : 'auto';
|
---|
237 | }
|
---|
238 | get rangeEndLeft() {
|
---|
239 | return this.isVertical() ? 'auto' : this.handleValues[1] + '%';
|
---|
240 | }
|
---|
241 | get rangeEndBottom() {
|
---|
242 | return this.isVertical() ? this.handleValues[1] + '%' : 'auto';
|
---|
243 | }
|
---|
244 | isVertical() {
|
---|
245 | return this.orientation === 'vertical';
|
---|
246 | }
|
---|
247 | updateDomData() {
|
---|
248 | let rect = this.el.nativeElement.children[0].getBoundingClientRect();
|
---|
249 | this.initX = rect.left + DomHandler.getWindowScrollLeft();
|
---|
250 | this.initY = rect.top + DomHandler.getWindowScrollTop();
|
---|
251 | this.barWidth = this.el.nativeElement.children[0].offsetWidth;
|
---|
252 | this.barHeight = this.el.nativeElement.children[0].offsetHeight;
|
---|
253 | }
|
---|
254 | calculateHandleValue(event) {
|
---|
255 | if (this.orientation === 'horizontal')
|
---|
256 | return ((event.pageX - this.initX) * 100) / (this.barWidth);
|
---|
257 | else
|
---|
258 | return (((this.initY + this.barHeight) - event.pageY) * 100) / (this.barHeight);
|
---|
259 | }
|
---|
260 | updateHandleValue() {
|
---|
261 | if (this.range) {
|
---|
262 | this.handleValues[0] = (this.values[0] < this.min ? 0 : this.values[0] - this.min) * 100 / (this.max - this.min);
|
---|
263 | this.handleValues[1] = (this.values[1] > this.max ? 100 : this.values[1] - this.min) * 100 / (this.max - this.min);
|
---|
264 | }
|
---|
265 | else {
|
---|
266 | if (this.value < this.min)
|
---|
267 | this.handleValue = 0;
|
---|
268 | else if (this.value > this.max)
|
---|
269 | this.handleValue = 100;
|
---|
270 | else
|
---|
271 | this.handleValue = (this.value - this.min) * 100 / (this.max - this.min);
|
---|
272 | }
|
---|
273 | }
|
---|
274 | updateValue(val, event) {
|
---|
275 | if (this.range) {
|
---|
276 | let value = val;
|
---|
277 | if (this.handleIndex == 0) {
|
---|
278 | if (value < this.min) {
|
---|
279 | value = this.min;
|
---|
280 | this.handleValues[0] = 0;
|
---|
281 | }
|
---|
282 | else if (value > this.values[1]) {
|
---|
283 | value = this.values[1];
|
---|
284 | this.handleValues[0] = this.handleValues[1];
|
---|
285 | }
|
---|
286 | this.sliderHandleStart.nativeElement.focus();
|
---|
287 | }
|
---|
288 | else {
|
---|
289 | if (value > this.max) {
|
---|
290 | value = this.max;
|
---|
291 | this.handleValues[1] = 100;
|
---|
292 | }
|
---|
293 | else if (value < this.values[0]) {
|
---|
294 | value = this.values[0];
|
---|
295 | this.handleValues[1] = this.handleValues[0];
|
---|
296 | }
|
---|
297 | this.sliderHandleEnd.nativeElement.focus();
|
---|
298 | }
|
---|
299 | this.values[this.handleIndex] = this.getNormalizedValue(value);
|
---|
300 | this.values = this.values.slice();
|
---|
301 | this.onModelChange(this.values);
|
---|
302 | this.onChange.emit({ event: event, values: this.values });
|
---|
303 | }
|
---|
304 | else {
|
---|
305 | if (val < this.min) {
|
---|
306 | val = this.min;
|
---|
307 | this.handleValue = 0;
|
---|
308 | }
|
---|
309 | else if (val > this.max) {
|
---|
310 | val = this.max;
|
---|
311 | this.handleValue = 100;
|
---|
312 | }
|
---|
313 | this.value = this.getNormalizedValue(val);
|
---|
314 | this.onModelChange(this.value);
|
---|
315 | this.onChange.emit({ event: event, value: this.value });
|
---|
316 | this.sliderHandle.nativeElement.focus();
|
---|
317 | }
|
---|
318 | }
|
---|
319 | getValueFromHandle(handleValue) {
|
---|
320 | return (this.max - this.min) * (handleValue / 100) + this.min;
|
---|
321 | }
|
---|
322 | getDecimalsCount(value) {
|
---|
323 | if (value && Math.floor(value) !== value)
|
---|
324 | return value.toString().split(".")[1].length || 0;
|
---|
325 | return 0;
|
---|
326 | }
|
---|
327 | getNormalizedValue(val) {
|
---|
328 | let decimalsCount = this.getDecimalsCount(this.step);
|
---|
329 | if (decimalsCount > 0) {
|
---|
330 | return +val.toFixed(decimalsCount);
|
---|
331 | }
|
---|
332 | else {
|
---|
333 | return Math.floor(val);
|
---|
334 | }
|
---|
335 | }
|
---|
336 | ngOnDestroy() {
|
---|
337 | this.unbindDragListeners();
|
---|
338 | }
|
---|
339 | }
|
---|
340 | Slider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Slider, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
---|
341 | Slider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: Slider, selector: "p-slider", inputs: { animate: "animate", disabled: "disabled", min: "min", max: "max", orientation: "orientation", step: "step", range: "range", style: "style", styleClass: "styleClass", ariaLabelledBy: "ariaLabelledBy", tabindex: "tabindex" }, outputs: { onChange: "onChange", onSlideEnd: "onSlideEnd" }, host: { classAttribute: "p-element" }, providers: [SLIDER_VALUE_ACCESSOR], viewQueries: [{ propertyName: "sliderHandle", first: true, predicate: ["sliderHandle"], descendants: true }, { propertyName: "sliderHandleStart", first: true, predicate: ["sliderHandleStart"], descendants: true }, { propertyName: "sliderHandleEnd", first: true, predicate: ["sliderHandleEnd"], descendants: true }], ngImport: i0, template: `
|
---|
342 | <div [ngStyle]="style" [class]="styleClass" [ngClass]="{'p-slider p-component':true,'p-disabled':disabled,
|
---|
343 | 'p-slider-horizontal':orientation == 'horizontal','p-slider-vertical':orientation == 'vertical','p-slider-animate':animate}"
|
---|
344 | (click)="onBarClick($event)">
|
---|
345 | <span *ngIf="range && orientation == 'horizontal'" class="p-slider-range" [ngStyle]="{'left':handleValues[0] + '%',width: (handleValues[1] - handleValues[0] + '%')}"></span>
|
---|
346 | <span *ngIf="range && orientation == 'vertical'" class="p-slider-range" [ngStyle]="{'bottom':handleValues[0] + '%',height: (handleValues[1] - handleValues[0] + '%')}"></span>
|
---|
347 | <span *ngIf="!range && orientation=='vertical'" class="p-slider-range" [ngStyle]="{'height': handleValue + '%'}"></span>
|
---|
348 | <span *ngIf="!range && orientation=='horizontal'" class="p-slider-range" [ngStyle]="{'width': handleValue + '%'}"></span>
|
---|
349 | <span #sliderHandle *ngIf="!range" [attr.tabindex]="disabled ? null : tabindex" (keydown)="onHandleKeydown($event)" class="p-slider-handle" (mousedown)="onMouseDown($event)" (touchstart)="onTouchStart($event)" (touchmove)="onTouchMove($event)" (touchend)="onTouchEnd($event)"
|
---|
350 | [style.transition]="dragging ? 'none': null" [ngStyle]="{'left': orientation == 'horizontal' ? handleValue + '%' : null,'bottom': orientation == 'vertical' ? handleValue + '%' : null}"
|
---|
351 | [attr.aria-valuemin]="min" [attr.aria-valuenow]="value" [attr.aria-valuemax]="max" [attr.aria-labelledby]="ariaLabelledBy"></span>
|
---|
352 | <span #sliderHandleStart *ngIf="range" [attr.tabindex]="disabled ? null : tabindex" (keydown)="onHandleKeydown($event,0)" (mousedown)="onMouseDown($event,0)" (touchstart)="onTouchStart($event,0)" (touchmove)="onTouchMove($event,0)" (touchend)="onTouchEnd($event)" [style.transition]="dragging ? 'none': null" class="p-slider-handle"
|
---|
353 | [ngStyle]="{'left': rangeStartLeft, 'bottom': rangeStartBottom}" [ngClass]="{'p-slider-handle-active':handleIndex==0}"
|
---|
354 | [attr.aria-valuemin]="min" [attr.aria-valuenow]="value ? value[0] : null" [attr.aria-valuemax]="max" [attr.aria-labelledby]="ariaLabelledBy"></span>
|
---|
355 | <span #sliderHandleEnd *ngIf="range" [attr.tabindex]="disabled ? null : tabindex" (keydown)="onHandleKeydown($event,1)" (mousedown)="onMouseDown($event,1)" (touchstart)="onTouchStart($event,1)" (touchmove)="onTouchMove($event,1)" (touchend)="onTouchEnd($event)" [style.transition]="dragging ? 'none': null" class="p-slider-handle"
|
---|
356 | [ngStyle]="{'left': rangeEndLeft, 'bottom': rangeEndBottom}" [ngClass]="{'p-slider-handle-active':handleIndex==1}"
|
---|
357 | [attr.aria-valuemin]="min" [attr.aria-valuenow]="value ? value[1] : null" [attr.aria-valuemax]="max" [attr.aria-labelledby]="ariaLabelledBy"></span>
|
---|
358 | </div>
|
---|
359 | `, isInline: true, styles: [".p-slider{position:relative}.p-slider .p-slider-handle{position:absolute;cursor:grab;touch-action:none;display:block}.p-slider-range{position:absolute;display:block}.p-slider-horizontal .p-slider-range{top:0;left:0;height:100%}.p-slider-horizontal .p-slider-handle{top:50%}.p-slider-vertical{height:100px}.p-slider-vertical .p-slider-handle{left:50%}.p-slider-vertical .p-slider-range{bottom:0;left:0;width:100%}\n"], directives: [{ type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
---|
360 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Slider, decorators: [{
|
---|
361 | type: Component,
|
---|
362 | args: [{ selector: 'p-slider', template: `
|
---|
363 | <div [ngStyle]="style" [class]="styleClass" [ngClass]="{'p-slider p-component':true,'p-disabled':disabled,
|
---|
364 | 'p-slider-horizontal':orientation == 'horizontal','p-slider-vertical':orientation == 'vertical','p-slider-animate':animate}"
|
---|
365 | (click)="onBarClick($event)">
|
---|
366 | <span *ngIf="range && orientation == 'horizontal'" class="p-slider-range" [ngStyle]="{'left':handleValues[0] + '%',width: (handleValues[1] - handleValues[0] + '%')}"></span>
|
---|
367 | <span *ngIf="range && orientation == 'vertical'" class="p-slider-range" [ngStyle]="{'bottom':handleValues[0] + '%',height: (handleValues[1] - handleValues[0] + '%')}"></span>
|
---|
368 | <span *ngIf="!range && orientation=='vertical'" class="p-slider-range" [ngStyle]="{'height': handleValue + '%'}"></span>
|
---|
369 | <span *ngIf="!range && orientation=='horizontal'" class="p-slider-range" [ngStyle]="{'width': handleValue + '%'}"></span>
|
---|
370 | <span #sliderHandle *ngIf="!range" [attr.tabindex]="disabled ? null : tabindex" (keydown)="onHandleKeydown($event)" class="p-slider-handle" (mousedown)="onMouseDown($event)" (touchstart)="onTouchStart($event)" (touchmove)="onTouchMove($event)" (touchend)="onTouchEnd($event)"
|
---|
371 | [style.transition]="dragging ? 'none': null" [ngStyle]="{'left': orientation == 'horizontal' ? handleValue + '%' : null,'bottom': orientation == 'vertical' ? handleValue + '%' : null}"
|
---|
372 | [attr.aria-valuemin]="min" [attr.aria-valuenow]="value" [attr.aria-valuemax]="max" [attr.aria-labelledby]="ariaLabelledBy"></span>
|
---|
373 | <span #sliderHandleStart *ngIf="range" [attr.tabindex]="disabled ? null : tabindex" (keydown)="onHandleKeydown($event,0)" (mousedown)="onMouseDown($event,0)" (touchstart)="onTouchStart($event,0)" (touchmove)="onTouchMove($event,0)" (touchend)="onTouchEnd($event)" [style.transition]="dragging ? 'none': null" class="p-slider-handle"
|
---|
374 | [ngStyle]="{'left': rangeStartLeft, 'bottom': rangeStartBottom}" [ngClass]="{'p-slider-handle-active':handleIndex==0}"
|
---|
375 | [attr.aria-valuemin]="min" [attr.aria-valuenow]="value ? value[0] : null" [attr.aria-valuemax]="max" [attr.aria-labelledby]="ariaLabelledBy"></span>
|
---|
376 | <span #sliderHandleEnd *ngIf="range" [attr.tabindex]="disabled ? null : tabindex" (keydown)="onHandleKeydown($event,1)" (mousedown)="onMouseDown($event,1)" (touchstart)="onTouchStart($event,1)" (touchmove)="onTouchMove($event,1)" (touchend)="onTouchEnd($event)" [style.transition]="dragging ? 'none': null" class="p-slider-handle"
|
---|
377 | [ngStyle]="{'left': rangeEndLeft, 'bottom': rangeEndBottom}" [ngClass]="{'p-slider-handle-active':handleIndex==1}"
|
---|
378 | [attr.aria-valuemin]="min" [attr.aria-valuenow]="value ? value[1] : null" [attr.aria-valuemax]="max" [attr.aria-labelledby]="ariaLabelledBy"></span>
|
---|
379 | </div>
|
---|
380 | `, providers: [SLIDER_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
---|
381 | 'class': 'p-element'
|
---|
382 | }, styles: [".p-slider{position:relative}.p-slider .p-slider-handle{position:absolute;cursor:grab;touch-action:none;display:block}.p-slider-range{position:absolute;display:block}.p-slider-horizontal .p-slider-range{top:0;left:0;height:100%}.p-slider-horizontal .p-slider-handle{top:50%}.p-slider-vertical{height:100px}.p-slider-vertical .p-slider-handle{left:50%}.p-slider-vertical .p-slider-range{bottom:0;left:0;width:100%}\n"] }]
|
---|
383 | }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { animate: [{
|
---|
384 | type: Input
|
---|
385 | }], disabled: [{
|
---|
386 | type: Input
|
---|
387 | }], min: [{
|
---|
388 | type: Input
|
---|
389 | }], max: [{
|
---|
390 | type: Input
|
---|
391 | }], orientation: [{
|
---|
392 | type: Input
|
---|
393 | }], step: [{
|
---|
394 | type: Input
|
---|
395 | }], range: [{
|
---|
396 | type: Input
|
---|
397 | }], style: [{
|
---|
398 | type: Input
|
---|
399 | }], styleClass: [{
|
---|
400 | type: Input
|
---|
401 | }], ariaLabelledBy: [{
|
---|
402 | type: Input
|
---|
403 | }], tabindex: [{
|
---|
404 | type: Input
|
---|
405 | }], onChange: [{
|
---|
406 | type: Output
|
---|
407 | }], onSlideEnd: [{
|
---|
408 | type: Output
|
---|
409 | }], sliderHandle: [{
|
---|
410 | type: ViewChild,
|
---|
411 | args: ["sliderHandle"]
|
---|
412 | }], sliderHandleStart: [{
|
---|
413 | type: ViewChild,
|
---|
414 | args: ["sliderHandleStart"]
|
---|
415 | }], sliderHandleEnd: [{
|
---|
416 | type: ViewChild,
|
---|
417 | args: ["sliderHandleEnd"]
|
---|
418 | }] } });
|
---|
419 | export class SliderModule {
|
---|
420 | }
|
---|
421 | SliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
---|
422 | SliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SliderModule, declarations: [Slider], imports: [CommonModule], exports: [Slider] });
|
---|
423 | SliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SliderModule, imports: [[CommonModule]] });
|
---|
424 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SliderModule, decorators: [{
|
---|
425 | type: NgModule,
|
---|
426 | args: [{
|
---|
427 | imports: [CommonModule],
|
---|
428 | exports: [Slider],
|
---|
429 | declarations: [Slider]
|
---|
430 | }]
|
---|
431 | }] });
|
---|
432 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9jb21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YW5nZSAmJiB0aGlzLmhhbmRsZVZhbHVlcyAmJiB0aGlzLmhhbmRsZVZhbHVlc1swXSA9PT0gdGhpcy5tYXgpIHtcbiAgICAgICAgICAgIHRoaXMuaGFuZGxlSW5kZXggPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5oYW5kbGVJbmRleCA9IGluZGV4O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMub3JpZW50YXRpb24gPT09ICdob3Jpem9udGFsJykge1xuICAgICAgICAgICAgdGhpcy5zdGFydHggPSBwYXJzZUludCh0b3VjaG9iai5jbGllbnRYLCAxMCk7XG4gICAgICAgICAgICB0aGlzLmJhcldpZHRoID0gdGhpcy5lbC5uYXRpdmVFbGVtZW50LmNoaWxkcmVuWzBdLm9mZnNldFdpZHRoO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5zdGFydHkgPSBwYXJzZUludCh0b3VjaG9iai5jbGllbnRZLCAxMCk7XG4gICAgICAgICAgICB0aGlzLmJhckhlaWdodCA9IHRoaXMuZWwubmF0aXZlRWxlbWVudC5jaGlsZHJlblswXS5vZmZzZXRIZWlnaHQ7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5hbmltYXRlKSB7XG4gICAgICAgICAgICBEb21IYW5kbGVyLnJlbW92ZUNsYXNzKHRoaXMuZWwubmF0aXZlRWxlbWVudC5jaGlsZHJlblswXSwgJ3Atc2xpZGVyLWFuaW1hdGUnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgfVxuXG4gICAgb25Ub3VjaE1vdmUoZXZlbnQsIGluZGV4PzpudW1iZXIpIHtcbiAgICAgICAgaWYgKHRoaXMuZGlzYWJsZWQpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciB0b3VjaG9iaiA9IGV2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OiB0aGlzLnZhbHVlfSk7XG5cbiAgICAgICAgaWYgKHRoaXMuYW5pbWF0ZSkge1xuICAgICAgICAgICAgRG9tSGFuZGxlci5hZGRDbGFzcyh0aGlzLmVsLm5hdGl2ZUVsZW1lbnQuY2hpbGRyZW5bMF0sICdwLXNsaWRlci1hbmltYXRlJyk7XG4gICAgICAgIH1cblxuICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgIH1cblxuICAgIG9uQmFyQ2xpY2soZXZlbnQpIHtcbiAgICAgICAgaWYgKHRoaXMuZGlzYWJsZWQpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdGhpcy5zbGlkZXJIYW5kbGVDbGljaykge1xuICAgICAgICAgICAgdGhpcy51cGRhdGVEb21EYXRhKCk7XG4gICAgICAgICAgICB0aGlzLmhhbmRsZUNoYW5nZShldmVudCk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnNsaWRlckhhbmRsZUNsaWNrID0gZmFsc2U7XG4gICAgfVxuXG4gICAgb25IYW5kbGVLZXlkb3duKGV2ZW50LCBoYW5kbGVJbmRleD86bnVtYmVyKSB7XG4gICAgICAgIGlmICh0aGlzLmRpc2FibGVkKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGV2ZW50LndoaWNoID09IDM4IHx8IGV2ZW50LndoaWNoID09IDM5KSB7XG4gICAgICAgICAgICB0aGlzLnNwaW4oZXZlbnQsIDEsIGhhbmRsZUluZGV4KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChldmVudC53aGljaCA9PSAzNyB8fCBldmVudC53aGljaCA9PSA0MCkge1xuICAgICAgICAgICAgdGhpcy5zcGluKGV2ZW50LCAtMSwgaGFuZGxlSW5kZXgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgc3BpbihldmVudCwgZGlyOiBudW1iZXIsIGhhbmRsZUluZGV4PzpudW1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MucmVuZGVyZXIubGlzdGVuKGRvY3VtZW50VGFyZ2V0LCAnbW91c2Vtb3ZlJywgKGV2ZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmRyYWdnaW5nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5nWm9uZS5ydW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaGFuZGxlQ2hhbmdlKGV2ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghdGhpcy5tb3VzZXVwTGlzdGVuZXIpIHtcbiAgICAgICAgICAgICAgICB0aGlzLm1vdXNldXBMaXN0ZW5lciA9IHRoaXMucmVuZGVyZXIubGlzdGVuKGRvY3VtZW50VGFyZ2V0LCAnbW91c2V1cCcsIChldmVudCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5kcmFnZ2luZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kcmFnZ2luZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5uZ1pvbmUucnVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5yYW5nZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5vblNsaWRlRW5kLmVtaXQoe29yaWdpbmFsRXZlbnQ6IGV2ZW50LCB2YWx1ZXM6IHRoaXMudmFsdWVzfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm9uU2xpZGVFbmQuZW1pdCh7b3JpZ2luYWxFdmVudDogZXZlbnQsIHZhbHVlOiB0aGlzLnZhbHVlfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5hbmltYXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERvbUhhbmRsZXIuYWRkQ2xhc3ModGhpcy5lbC5uYXRpdmVFbGVtZW50LmNoaWxkcmVuWzBdLCAncC1zbGlkZXItYW5pbWF0ZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHVuYmluZERyYWdMaXN0ZW5lcnMoKSB7XG4gICAgICAgIGlmICh0aGlzLmRyYWdMaXN0ZW5lcikge1xuICAgICAgICAgICAgdGhpcy5kcmFnTGlzdGVuZXIoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLm1vdXNldXBMaXN0ZW5lcikge1xuICAgICAgICAgICAgdGhpcy5tb3VzZXVwTGlzdGVuZXIoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHNldFZhbHVlRnJvbUhhbmRsZShldmVudDogRXZlbnQsIGhhbmRsZVZhbHVlOiBhbnkpIHtcbiAgICAgICAgdGhpcy5zbGlkZXJIYW5kbGVDbGljayA9IGZhbHNlO1xuICAgICAgICBsZXQgbmV3VmFsdWUgPSB0aGlzLmdldFZhbHVlRnJvbUhhbmRsZShoYW5kbGVWYWx1ZSk7XG5cbiAgICAgICAgaWYgKHRoaXMucmFuZ2UpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnN0ZXApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZVN0ZXBDaGFuZ2UobmV3VmFsdWUsIHRoaXMudmFsdWVzW3RoaXMuaGFuZGxlSW5kZXhdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuaGFuZGxlVmFsdWV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CBldmVudD86IEV2ZW50KTogdm9pZCB7XG4gICAgICAgIGlmICh0aGlzLnJhbmdlKSB7XG4gICAgICAgICAgICBsZXQgdmFsdWUgPSB2YWw7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLmhhbmRsZUluZGV4ID09IDApIHtcbiAgICAgICAgICAgICAgICBpZiAodmFsdWUgPCB0aGlzLm1pbikge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHRoaXMubWluO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZVZhbHVlc1swXSA9IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZhbHVlID4gdGhpcy52YWx1ZXNbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB0aGlzLnZhbHVlc1sxXTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVWYWx1ZXNbMF0gPSB0aGlzLmhhbmRsZVZhbHVlc1sxXTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aGlzLnNsaWRlckhhbmRsZVN0YXJ0Lm5hdGl2ZUVsZW1lbnQuZm9jdXMoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA+IHRoaXMubWF4KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdGhpcy5tYXg7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaGFuZGxlVmFsdWVzWzFdID0gMTAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICh2YWx1ZSA8IHRoaXMudmFsdWVzWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdGhpcy52YWx1ZXNbMF07XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaGFuZGxlVmFsdWVzWzFdID0gdGhpcy5oYW5kbGVWYWx1ZXNb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