@acorex/components 18.8.0 → 18.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  import { MXValueComponent, AXValuableComponent } from '@acorex/components/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, NgZone, output, input, model, computed, effect, forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, NgModule } from '@angular/core';
3
+ import { inject, NgZone, output, input, model, computed, effect, forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, HostListener, HostBinding, NgModule } from '@angular/core';
4
4
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
5
  import { classes } from 'polytype';
6
6
  import * as i1 from '@angular/common';
@@ -16,28 +16,76 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
16
16
  //protected AXTooltip = computed(() => {});
17
17
  constructor() {
18
18
  super();
19
+ /**
20
+ * @ignore
21
+ */
19
22
  this.zone = inject(NgZone);
20
- //outputs
23
+ /**
24
+ * @event onStart when user interact with range-slider with its bar
25
+ */
21
26
  this.onStart = output();
22
- //inputs
27
+ /**
28
+ * @description orientation including vertical and horizontal
29
+ */
23
30
  this.orientation = input('horizontal');
31
+ /**
32
+ * @description color for highlight and tooltip and handler
33
+ */
24
34
  this.color = input('primary');
35
+ /**
36
+ * @description values is a number single mode
37
+ * and array of 2 number for dual mode
38
+ */
25
39
  this.values = model(this.value);
40
+ /**
41
+ * @description mode including single and dual
42
+ */
26
43
  this.mode = input('single');
44
+ /**
45
+ * @description minimum value
46
+ */
27
47
  this.min = input(0);
48
+ /**
49
+ * @description maximum value
50
+ */
28
51
  this.max = input(100);
52
+ /**
53
+ * @description step for changing values
54
+ */
29
55
  this.step = input(1);
56
+ /**
57
+ * @description act as ruler for range slider,
58
+ * its range of showing to user
59
+ */
30
60
  this.snap = input(1);
61
+ /**
62
+ * @description tooltip for showing value of handlers
63
+ */
31
64
  this.tooltipMode = input('end');
65
+ /**
66
+ * @description deferent modes for snap including start, end and both
67
+ */
32
68
  this.snapMode = input('start');
69
+ /**
70
+ * @description a flag for showing snap
71
+ */
33
72
  this.hasSnap = input(false);
73
+ /**
74
+ * @description a flag for showing snap labels
75
+ */
34
76
  this.hasLable = input(this.hasSnap());
77
+ /**
78
+ * @description a flag for showing tooltip for values
79
+ */
35
80
  this.hasTooltip = input(false);
36
- //computed
37
81
  this.height = 0.25;
82
+ this.newHeight = 'var(--ax-range-slider-base-thickness)';
38
83
  this.range = computed(() => this.max() - this.min());
39
84
  this.isHorizontal = computed(() => this.orientation() === 'horizontal');
40
85
  this.isDual = computed(() => this.mode() === 'dual');
86
+ /**
87
+ * @ignore
88
+ */
41
89
  this.calculateSnapBar = computed(() => {
42
90
  if (this.hasSnap()) {
43
91
  let array = [];
@@ -57,6 +105,9 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
57
105
  return undefined;
58
106
  }
59
107
  });
108
+ /**
109
+ * @ignore
110
+ */
60
111
  this.calculatePos = computed(() => {
61
112
  if (this.isDual() && this.values()) {
62
113
  return [
@@ -68,11 +119,20 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
68
119
  return ((this.values() - this.min()) / this.range()) * 100;
69
120
  }
70
121
  });
122
+ /**
123
+ * @ignore
124
+ */
71
125
  this.choosenHandler = undefined;
126
+ /**
127
+ * @ignore
128
+ */
72
129
  this.sliderElement = null;
130
+ /**
131
+ * @ignore
132
+ */
73
133
  this.AXRangeSliderHighlight = computed(() => this.isHorizontal()
74
134
  ? {
75
- left: this.isDual() ? this.calculatePos()[0] + '%' : this.min() + '%',
135
+ left: this.isDual() ? this.calculatePos()[0] + '%' : '0%',
76
136
  width: this.isDual()
77
137
  ? this.calculatePos()[1] - this.calculatePos()[0] + '%'
78
138
  : this.calculatePos() + '%',
@@ -83,6 +143,9 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
83
143
  : this.calculatePos() + '%',
84
144
  top: this.mode() === 'dual' ? this.calculatePos()[0] + '%' : this.min() + '%',
85
145
  });
146
+ /**
147
+ * @ignore
148
+ */
86
149
  this.AXRangeSliderHandler1 = computed(() => this.isHorizontal()
87
150
  ? {
88
151
  left: this.isDual() ? this.calculatePos()[0] + '%' : this.calculatePos() + '%',
@@ -90,6 +153,9 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
90
153
  : {
91
154
  top: this.isDual() ? this.calculatePos()[0] + '%' : this.calculatePos() + '%',
92
155
  });
156
+ /**
157
+ * @ignore
158
+ */
93
159
  this.AXRangeSliderHandler2 = computed(() => this.isHorizontal()
94
160
  ? {
95
161
  left: this.calculatePos()[1] + '%',
@@ -97,6 +163,9 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
97
163
  : {
98
164
  top: this.calculatePos()[1] + '%',
99
165
  });
166
+ /**
167
+ * @ignore
168
+ */
100
169
  this.AXRangeSliderStep = computed(() => {
101
170
  if (this.isHorizontal()) {
102
171
  switch (this.snapMode()) {
@@ -119,6 +188,9 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
119
188
  }
120
189
  }
121
190
  });
191
+ /**
192
+ * @ignore
193
+ */
122
194
  this.AXRangeLabel = computed(() => {
123
195
  if (this.isHorizontal()) {
124
196
  switch (this.snapMode()) {
@@ -146,10 +218,17 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
146
218
  this.fixChangingMode();
147
219
  }, { allowSignalWrites: true });
148
220
  }
221
+ /**
222
+ * @ignore
223
+ */
149
224
  ngOnInit() {
225
+ //(window as any).rangeSlider = this; for debugging purpose only
150
226
  super.ngOnInit();
151
227
  this.initializeValues();
152
228
  }
229
+ /**
230
+ * @ignore
231
+ */
153
232
  handleOnStart(event, circle) {
154
233
  this.zone.runOutsideAngular(() => {
155
234
  if (this.disabled)
@@ -167,7 +246,11 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
167
246
  }
168
247
  });
169
248
  }
249
+ /**
250
+ * @ignore
251
+ */
170
252
  onclickBar(event) {
253
+ let circle = 'first';
171
254
  this.sliderElement = event.target.closest('ax-range-slider');
172
255
  this.zone.runOutsideAngular(() => {
173
256
  if (!this.sliderElement || this.disabled)
@@ -183,6 +266,7 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
183
266
  this.commitValue(this.values());
184
267
  }
185
268
  else if (clickPosition > this.calculatePos()[1]) {
269
+ circle = 'second';
186
270
  this.values.set([this.values()[0], newValue]);
187
271
  this.commitValue(this.values());
188
272
  }
@@ -200,9 +284,13 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
200
284
  data: this.values(),
201
285
  });
202
286
  });
287
+ this.handleOnStart(event, circle);
203
288
  }
289
+ /**
290
+ * @ignore
291
+ */
204
292
  onMove(event, circle) {
205
- if (!this.sliderElement || this.readonly)
293
+ if (!this.sliderElement || this.disabled)
206
294
  return;
207
295
  const sliderRect = this.sliderElement.getBoundingClientRect();
208
296
  let newValue;
@@ -248,61 +336,17 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
248
336
  this.commitValue(newValue);
249
337
  }
250
338
  }
339
+ this.onStart.emit({
340
+ component: this,
341
+ htmlElement: event.target,
342
+ isUserInteraction: event.isTrusted,
343
+ data: this.values(),
344
+ });
251
345
  }
252
346
  }
253
- onWheel(event) {
254
- this.zone.runOutsideAngular(() => {
255
- event.preventDefault();
256
- if ((this.choosenHandler && this.mode() === 'single') || this.readonly)
257
- return;
258
- let newValue;
259
- if (this.isDual()) {
260
- if (event.deltaY < 0) {
261
- if (this.choosenHandler === 'first') {
262
- newValue = this.calculateStep(this.values()[0] + this.step());
263
- if (this.checkValues(newValue, this.choosenHandler, this.values()[1]) &&
264
- this.values()[0] !== newValue) {
265
- this.values.update((old) => [this.calculateStep(old[0] + this.step()), old[1]]);
266
- }
267
- }
268
- else {
269
- newValue = this.calculateStep(this.values()[1] + this.step());
270
- if (newValue <= this.max() && this.values()[1] !== newValue) {
271
- this.values.update((old) => [old[0], this.calculateStep(old[1] + this.step())]);
272
- }
273
- }
274
- }
275
- else {
276
- if (this.choosenHandler === 'first') {
277
- newValue = this.calculateStep(this.values()[0] - this.step());
278
- if (this.checkValues(newValue, this.choosenHandler, this.values()[1]) &&
279
- this.values() !== newValue) {
280
- this.values.update((old) => [this.calculateStep(old[0] - this.step()), old[1]]);
281
- }
282
- }
283
- else {
284
- newValue = this.calculateStep(this.values()[1] - this.step());
285
- if (this.checkValues(newValue, this.choosenHandler, this.values()[0]) &&
286
- this.values()[1] !== newValue) {
287
- this.values.update((old) => [old[0], this.calculateStep(old[1] - this.step())]);
288
- }
289
- }
290
- }
291
- }
292
- else {
293
- if (event.deltaY < 0) {
294
- if (this.checkValue(this.calculateStep(this.values() + this.step()))) {
295
- this.values.update((old) => this.calculateStep(old + this.step()));
296
- }
297
- }
298
- else {
299
- if (this.checkValue(this.calculateStep(this.values() - this.step()))) {
300
- this.values.update((old) => this.calculateStep(old - this.step()));
301
- }
302
- }
303
- }
304
- });
305
- }
347
+ /**
348
+ * @ignore
349
+ */
306
350
  onEnd(moveListener, endListener) {
307
351
  window.removeEventListener('mousemove', moveListener);
308
352
  window.removeEventListener('mouseup', endListener);
@@ -310,11 +354,17 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
310
354
  window.removeEventListener('touchend', endListener);
311
355
  this.sliderElement = null;
312
356
  }
357
+ /**
358
+ * @ignore
359
+ */
313
360
  initializeValues() {
314
361
  this.fixInitializeUndefined();
315
362
  this.fixInitializeValues();
316
363
  this.fixInitializeStep();
317
364
  }
365
+ /**
366
+ * @ignore
367
+ */
318
368
  fixInitializeUndefined() {
319
369
  if (typeof this.values() === 'undefined') {
320
370
  if (this.isDual()) {
@@ -326,6 +376,9 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
326
376
  this.commitValue(this.values());
327
377
  }
328
378
  }
379
+ /**
380
+ * @ignore
381
+ */
329
382
  fixInitializeValues() {
330
383
  //swap value
331
384
  if (this.isDual() && this.values()[0] > this.values()[1]) {
@@ -343,11 +396,15 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
343
396
  this.commitValue(this.values());
344
397
  }
345
398
  }
399
+ /**
400
+ * @ignore
401
+ */
346
402
  fixInitializeStep() {
347
403
  if (this.step() !== 1) {
348
404
  if (this.isDual()) {
349
405
  this.values.update((old) => [this.calculateStep(old[0]), this.calculateStep(old[1])]);
350
406
  this.commitValue(this.values());
407
+ this.commitValue(this.values());
351
408
  if (this.values()[0] === this.values()[1]) {
352
409
  this.values.update((old) => [this.calculateStep(old[0]), this.calculateStep(old[1]) + this.step()]);
353
410
  this.commitValue(this.values());
@@ -359,6 +416,9 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
359
416
  }
360
417
  }
361
418
  }
419
+ /**
420
+ * @ignore
421
+ */
362
422
  fixChangingMode() {
363
423
  if (typeof this.values() === 'number' && this.isDual()) {
364
424
  this.values.set([this.min(), this.max()]);
@@ -369,6 +429,9 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
369
429
  this.commitValue(this.values());
370
430
  }
371
431
  }
432
+ /**
433
+ * @ignore
434
+ */
372
435
  calculateStep(x) {
373
436
  const roundedValue = Math.round(x / this.step()) * this.step();
374
437
  if (roundedValue > this.max())
@@ -381,12 +444,18 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
381
444
  else
382
445
  return roundedValue;
383
446
  }
447
+ /**
448
+ * @ignore
449
+ */
384
450
  checkValue(x) {
385
451
  if (x >= this.min() && x <= this.max())
386
452
  return true;
387
453
  else
388
454
  return false;
389
455
  }
456
+ /**
457
+ * @ignore
458
+ */
390
459
  checkValues(value1, y, value2) {
391
460
  if (value1 >= this.min() && value1 <= this.max()) {
392
461
  if (y === 'first') {
@@ -405,9 +474,107 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
405
474
  else
406
475
  return false;
407
476
  }
477
+ /**
478
+ * @ignore
479
+ */
408
480
  getPercantage(value) {
409
481
  return (value / this.range()) * 100;
410
482
  }
483
+ /**
484
+ * Increase a step to value if slider in single mode
485
+ * and increase a step the second value if slider in dual mode
486
+ * @method increaseStep
487
+ */
488
+ increaseStep() {
489
+ if (this.isDual()) {
490
+ const newValue = this.calculateStep(this.values()[1] + this.step());
491
+ this.values.set([this.values()[0], newValue]);
492
+ }
493
+ else {
494
+ const newValue = this.calculateStep(this.values() + this.step());
495
+ this.values.set(newValue);
496
+ }
497
+ }
498
+ /**
499
+ * Decrease a step to value if slider in single mode
500
+ * and decrease a step the second value if slider in dual mode
501
+ * @method decreaseStep
502
+ */
503
+ decreaseStep() {
504
+ if (this.isDual()) {
505
+ const newValue = this.calculateStep(this.values()[0] - this.step());
506
+ this.values.set([newValue, this.values()[1]]);
507
+ }
508
+ else {
509
+ const newValue = this.calculateStep(this.values() - this.step());
510
+ this.values.set(newValue);
511
+ }
512
+ }
513
+ /**
514
+ * @ignore
515
+ */
516
+ onWheel(event) {
517
+ this.zone.runOutsideAngular(() => {
518
+ event.preventDefault();
519
+ if (!this.choosenHandler || this.readonly || this.disabled)
520
+ return;
521
+ let newValue;
522
+ if (this.isDual()) {
523
+ if (event.deltaY < 0) {
524
+ if (this.choosenHandler === 'first') {
525
+ newValue = this.calculateStep(this.values()[0] + this.step());
526
+ if (this.checkValues(newValue, this.choosenHandler, this.values()[1]) &&
527
+ this.values()[0] !== newValue) {
528
+ this.values.update((old) => [this.calculateStep(old[0] + this.step()), old[1]]);
529
+ this.commitValue(this.values());
530
+ }
531
+ }
532
+ else {
533
+ newValue = this.calculateStep(this.values()[1] + this.step());
534
+ if (newValue <= this.max() && this.values()[1] !== newValue) {
535
+ this.values.update((old) => [old[0], this.calculateStep(old[1] + this.step())]);
536
+ this.commitValue(this.values());
537
+ }
538
+ }
539
+ }
540
+ else {
541
+ if (this.choosenHandler === 'first') {
542
+ newValue = this.calculateStep(this.values()[0] - this.step());
543
+ if (this.checkValues(newValue, this.choosenHandler, this.values()[1]) &&
544
+ this.values() !== newValue) {
545
+ this.values.update((old) => [this.calculateStep(old[0] - this.step()), old[1]]);
546
+ this.commitValue(this.values());
547
+ }
548
+ }
549
+ else {
550
+ newValue = this.calculateStep(this.values()[1] - this.step());
551
+ if (this.checkValues(newValue, this.choosenHandler, this.values()[0]) &&
552
+ this.values()[1] !== newValue) {
553
+ this.values.update((old) => [old[0], this.calculateStep(old[1] - this.step())]);
554
+ this.commitValue(this.values());
555
+ }
556
+ }
557
+ }
558
+ }
559
+ else {
560
+ if (event.deltaY < 0) {
561
+ if (this.checkValue(this.calculateStep(this.values() + this.step()))) {
562
+ this.values.update((old) => this.calculateStep(old + this.step()));
563
+ this.commitValue(this.values());
564
+ }
565
+ }
566
+ else {
567
+ if (this.checkValue(this.calculateStep(this.values() - this.step()))) {
568
+ this.values.update((old) => this.calculateStep(old - this.step()));
569
+ this.commitValue(this.values());
570
+ }
571
+ }
572
+ }
573
+ });
574
+ }
575
+ /**
576
+ * @ignore
577
+ */
411
578
  get __hostClass() {
412
579
  return [
413
580
  `ax-${this.color()}-solid`,
@@ -416,14 +583,14 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
416
583
  ];
417
584
  }
418
585
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXRangeSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
419
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, snap: { classPropertyName: "snap", publicName: "snap", isSignal: true, isRequired: false, transformFunction: null }, tooltipMode: { classPropertyName: "tooltipMode", publicName: "tooltipMode", isSignal: true, isRequired: false, transformFunction: null }, snapMode: { classPropertyName: "snapMode", publicName: "snapMode", isSignal: true, isRequired: false, transformFunction: null }, hasSnap: { classPropertyName: "hasSnap", publicName: "hasSnap", isSignal: true, isRequired: false, transformFunction: null }, hasLable: { classPropertyName: "hasLable", publicName: "hasLable", isSignal: true, isRequired: false, transformFunction: null }, hasTooltip: { classPropertyName: "hasTooltip", publicName: "hasTooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onStart: "onStart", values: "valuesChange" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
586
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, snap: { classPropertyName: "snap", publicName: "snap", isSignal: true, isRequired: false, transformFunction: null }, tooltipMode: { classPropertyName: "tooltipMode", publicName: "tooltipMode", isSignal: true, isRequired: false, transformFunction: null }, snapMode: { classPropertyName: "snapMode", publicName: "snapMode", isSignal: true, isRequired: false, transformFunction: null }, hasSnap: { classPropertyName: "hasSnap", publicName: "hasSnap", isSignal: true, isRequired: false, transformFunction: null }, hasLable: { classPropertyName: "hasLable", publicName: "hasLable", isSignal: true, isRequired: false, transformFunction: null }, hasTooltip: { classPropertyName: "hasTooltip", publicName: "hasTooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onStart: "onStart", values: "valuesChange" }, host: { listeners: { "wheel": "onWheel($event)" }, properties: { "class": "this.__hostClass" } }, providers: [
420
587
  { provide: AXValuableComponent, useExisting: AXRangeSliderComponent },
421
588
  {
422
589
  provide: NG_VALUE_ACCESSOR,
423
590
  useExisting: forwardRef(() => AXRangeSliderComponent),
424
591
  multi: true,
425
592
  },
426
- ], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-range-slider\" (wheel)=\"onWheel($event)\" [class]=\"'ax-orientation-' + orientation()\">\n <div class=\"ax-range-slider-bar\" (mousedown)=\"onclickBar($event)\" (touchstart)=\"onclickBar($event)\"></div>\n <div class=\"ax-range-slider-highlight\" [ngStyle]=\"AXRangeSliderHighlight()\"></div>\n\n <div\n class=\"ax-range-slider-handler\"\n [ngStyle]=\"AXRangeSliderHandler1()\"\n (mousedown)=\"handleOnStart($event, 'first')\"\n (touchstart)=\"handleOnStart($event, 'first')\"\n >\n @if (hasTooltip()) {\n <div class=\"ax-range-slider-tooltip\">{{ isDual() ? values()[0] : values() }}</div>\n }\n </div>\n\n @if (isDual()) {\n <div\n class=\"ax-range-slider-handler\"\n [ngStyle]=\"AXRangeSliderHandler2()\"\n (mousedown)=\"handleOnStart($event, 'second')\"\n (touchstart)=\"handleOnStart($event, 'second')\"\n >\n @if (hasTooltip()) {\n <div class=\"ax-range-slider-tooltip\">{{ values()[1] }}</div>\n }\n </div>\n }\n @if (hasSnap()) {\n <div class=\"ax-range-slider-step\" [ngStyle]=\"AXRangeSliderStep()\">\n @for (item of calculateSnapBar(); track $index) {\n <div\n class=\"ax-range-slider-steps\"\n [ngStyle]=\"\n isHorizontal() ? { left: getPercantage(item) + '%' } : { top: getPercantage(item) + '%' }\n \"\n >\n @if (hasLable()) {\n <div class=\"ax-range-slider-label\" [ngStyle]=\"AXRangeLabel()\">\n {{ item + min() }}\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [":root{--ax-range-slider-base-thickness: .25rem}ax-range-slider{display:flex;align-items:center;justify-content:center;font-size:small}ax-range-slider .ax-range-slider.ax-orientation-horizontal{position:relative;width:100%;height:calc(var(--ax-range-slider-base-thickness) * 4)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-bar{position:absolute;top:50%;left:0;width:100.1%;height:var(--ax-range-slider-base-thickness);transform:translateY(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-bg));cursor:pointer}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-highlight{position:absolute;top:50%;height:calc(var(--ax-range-slider-base-thickness) * 3 / 2);transform:translateY(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-fg))}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-handler{position:absolute;top:50%;width:calc(var(--ax-range-slider-base-thickness) * 6);height:calc(var(--ax-range-slider-base-thickness) * 6);z-index:20;background-color:rgb(var(--ax-range-slider-fg));border-radius:50%;cursor:pointer;transform:translate(-50%,-50%);transition:box-shadow .1s linear}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-handler:hover{box-shadow:var(--tw-ring-inset) 0 0 0 calc(.6rem + var(--tw-ring-offset-width)) rgba(var(--ax-range-slider-fg),.25)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-handler:active{box-shadow:var(--tw-ring-inset) 0 0 0 calc(.6rem + var(--tw-ring-offset-width)) rgba(var(--ax-range-slider-fg),.25)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-tooltip{position:absolute;left:calc(var(--ax-range-slider-base-thickness) * 2.8);top:calc(var(--ax-range-slider-base-thickness) * -2);background-color:rgb(var(--ax-range-slider-fg));color:rgb(var(--ax-range-tooltip-text));padding:5px 10px;border-radius:3px;white-space:nowrap;transform:translate(-50%,-125%)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-tooltip:after{content:\"\";position:absolute;top:calc(var(--ax-range-slider-base-thickness) * 7);left:50%;transform:translate(-50%);border-width:.5rem;border-style:solid;border-color:rgb(var(--ax-range-slider-fg)) transparent transparent transparent}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-step{position:absolute;display:flex;flex-direction:row;width:100%;z-index:10}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-step .ax-range-slider-steps{position:absolute;border-left:calc(var(--ax-range-slider-base-thickness) / 2) solid rgb(var(--ax-color-border-default));height:50%}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-step .ax-range-slider-steps .ax-range-slider-label{position:relative;text-align:center;top:calc(var(--ax-range-slider-base-thickness) * 2);left:-50%}ax-range-slider .ax-range-slider.ax-orientation-vertical{position:relative;width:calc(var(--ax-range-slider-base-thickness) * 4);height:100%}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-bar{position:absolute;top:0;left:50%;width:var(--ax-range-slider-base-thickness);height:100.1%;transform:translate(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-bg));cursor:pointer}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-highlight{position:absolute;left:50%;width:calc(var(--ax-range-slider-base-thickness) * 3 / 2);transform:translate(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-fg))}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-handler{position:absolute;left:50%;width:calc(var(--ax-range-slider-base-thickness) * 6);height:calc(var(--ax-range-slider-base-thickness) * 6);z-index:20;background-color:rgb(var(--ax-range-slider-fg));border-radius:50%;cursor:pointer;transform:translate(-50%,-50%);transition:background-color .2s ease}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-handler:active{border:1px solid transparent;box-shadow:var(--tw-ring-inset) 0 0 0 calc(.5rem + var(--tw-ring-offset-width)) rgba(var(--ax-range-slider-fg),.25)}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-tooltip{position:absolute;top:calc(var(--ax-range-slider-base-thickness) * 8.5);left:calc(var(--ax-range-slider-base-thickness) * -8);background-color:rgb(var(--ax-range-slider-fg));color:rgb(var(--ax-range-tooltip-text));padding:5px 10px;border-radius:3px;white-space:nowrap;transform:translate(-50%,-125%)}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-tooltip:after{content:\"\";position:absolute;top:50%;left:97%;transform:translateY(-50%);border-width:.5rem;border-style:solid;border-color:transparent transparent transparent rgb(var(--ax-range-slider-fg))}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-step{position:absolute;display:flex;flex-direction:column;height:100%;z-index:10}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-step .ax-range-slider-steps{position:absolute;width:50%;border-top:calc(var(--ax-range-slider-base-thickness) / 2) solid rgb(var(--ax-color-border-default))}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-step .ax-range-slider-steps .ax-range-slider-label{position:absolute;left:150%;top:calc(var(--ax-range-slider-base-thickness) * -3)}ax-range-slider.ax-primary-solid{--ax-range-slider-bg: var(--ax-color-primary-200);--ax-range-slider-fg: var(--ax-color-primary-500);--ax-range-tooltip-text: var(--ax-color-primary-fore)}ax-range-slider.ax-secondary-solid{--ax-range-slider-bg: var(--ax-color-secondary-200);--ax-range-slider-fg: var(--ax-color-secondary-500);--ax-range-tooltip-text: var(--ax-color-secondary-fore)}ax-range-slider.ax-success-solid{--ax-range-slider-bg: var(--ax-color-success-200);--ax-range-slider-fg: var(--ax-color-success-500);--ax-range-tooltip-text: var(--ax-color-success-fore)}ax-range-slider.ax-warning-solid{--ax-range-slider-bg: var(--ax-color-warning-200);--ax-range-slider-fg: var(--ax-color-warning-500);--ax-range-tooltip-text: var(--ax-color-warning-fore)}ax-range-slider.ax-danger-solid{--ax-range-slider-bg: var(--ax-color-danger-200);--ax-range-slider-fg: var(--ax-color-danger-500);--ax-range-tooltip-text: var(--ax-color-danger-fore)}ax-range-slider.ax-info-solid{--ax-range-slider-bg: var(--ax-color-info-200);--ax-range-slider-fg: var(--ax-color-info-500);--ax-range-tooltip-text: var(--ax-color-info-fore)}ax-range-slider.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-range-slider.ax-state-readonly{opacity:.75}.ax-dark ax-range-slider.ax-primary-solid{--ax-range-slider-bg: var(--ax-color-primary-700);--ax-range-slider-fg: var(--ax-color-primary-200);--ax-range-tooltip-text: var(--ax-color-primary-fore-tint)}.ax-dark ax-range-slider.ax-secondary-solid{--ax-range-slider-bg: var(--ax-color-secondary-700);--ax-range-slider-fg: var(--ax-color-secondary-200);--ax-range-tooltip-text: var(--ax-color-secondary-fore-tint)}.ax-dark ax-range-slider.ax-success-solid{--ax-range-slider-bg: var(--ax-color-success-700);--ax-range-slider-fg: var(--ax-color-success-200);--ax-range-tooltip-text: var(--ax-color-success-fore-tint)}.ax-dark ax-range-slider.ax-warning-solid{--ax-range-slider-bg: var(--ax-color-warning-700);--ax-range-slider-fg: var(--ax-color-warning-200);--ax-range-tooltip-text: var(--ax-color-warning-fore-tint)}.ax-dark ax-range-slider.ax-danger-solid{--ax-range-slider-bg: var(--ax-color-danger-700);--ax-range-slider-fg: var(--ax-color-danger-200);--ax-range-tooltip-text: var(--ax-color-danger-fore-tint)}.ax-dark ax-range-slider.ax-info-solid{--ax-range-slider-bg: var(--ax-color-info-700);--ax-range-slider-fg: var(--ax-color-info-200);--ax-range-tooltip-text: var(--ax-color-info-fore-tint)}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
593
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-range-slider\" [class]=\"'ax-orientation-' + orientation()\">\n <div class=\"ax-range-slider-bar\" (mousedown)=\"onclickBar($event)\" (touchstart)=\"onclickBar($event)\"></div>\n <div class=\"ax-range-slider-highlight\" [ngStyle]=\"AXRangeSliderHighlight()\"></div>\n\n <div\n class=\"ax-range-slider-handler\"\n [ngStyle]=\"AXRangeSliderHandler1()\"\n (mousedown)=\"handleOnStart($event, 'first')\"\n (touchstart)=\"handleOnStart($event, 'first')\"\n >\n @if (hasTooltip()) {\n <div class=\"ax-range-slider-tooltip\">{{ isDual() ? values()[0] : values() }}</div>\n }\n </div>\n\n @if (isDual()) {\n <div\n class=\"ax-range-slider-handler\"\n [ngStyle]=\"AXRangeSliderHandler2()\"\n (mousedown)=\"handleOnStart($event, 'second')\"\n (touchstart)=\"handleOnStart($event, 'second')\"\n >\n @if (hasTooltip()) {\n <div class=\"ax-range-slider-tooltip\">{{ values()[1] }}</div>\n }\n </div>\n }\n @if (hasSnap()) {\n <div class=\"ax-range-slider-step\" [ngStyle]=\"AXRangeSliderStep()\">\n @for (item of calculateSnapBar(); track $index) {\n <div\n class=\"ax-range-slider-steps\"\n [ngStyle]=\"\n isHorizontal() ? { left: getPercantage(item) + '%' } : { top: getPercantage(item) + '%' }\n \"\n >\n @if (hasLable()) {\n <div class=\"ax-range-slider-label\" [ngStyle]=\"AXRangeLabel()\">\n {{ item + min() }}\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [":root{--ax-range-slider-base-thickness: .25rem}ax-range-slider{display:flex;align-items:center;justify-content:center;padding:1rem;font-size:small}ax-range-slider .ax-range-slider.ax-orientation-horizontal{position:relative;width:100%;height:calc(var(--ax-range-slider-base-thickness) * 4)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-bar{position:absolute;top:50%;left:0;width:100.1%;height:var(--ax-range-slider-base-thickness);transform:translateY(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-bg));cursor:pointer}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-highlight{position:absolute;top:50%;height:calc(var(--ax-range-slider-base-thickness) * 3 / 2);transform:translateY(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-fg))}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-handler{position:absolute;top:50%;width:calc(var(--ax-range-slider-base-thickness) * 6);height:calc(var(--ax-range-slider-base-thickness) * 6);z-index:20;background-color:rgb(var(--ax-range-slider-fg));border-radius:50%;cursor:pointer;transform:translate(-50%,-50%);transition:box-shadow .1s linear}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-handler:hover{box-shadow:var(--tw-ring-inset) 0 0 0 calc(.6rem + var(--tw-ring-offset-width)) rgba(var(--ax-range-slider-fg),.25)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-handler:active{box-shadow:var(--tw-ring-inset) 0 0 0 calc(.6rem + var(--tw-ring-offset-width)) rgba(var(--ax-range-slider-fg),.25)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-tooltip{position:absolute;left:calc(var(--ax-range-slider-base-thickness) * 2.8);top:calc(var(--ax-range-slider-base-thickness) * -2);background-color:rgb(var(--ax-range-slider-fg));color:rgb(var(--ax-range-tooltip-text));padding:5px 10px;border-radius:3px;white-space:nowrap;font-weight:600;transform:translate(-50%,-125%)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-tooltip:after{content:\"\";position:absolute;top:calc(var(--ax-range-slider-base-thickness) * 7);left:50%;transform:translate(-50%);border-width:.5rem;border-style:solid;border-color:rgb(var(--ax-range-slider-fg)) transparent transparent transparent}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-step{position:absolute;display:flex;flex-direction:row;width:100%;z-index:10}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-step .ax-range-slider-steps{position:absolute;border-left:calc(var(--ax-range-slider-base-thickness) / 2) solid rgb(var(--ax-color-border-default));height:50%}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-step .ax-range-slider-steps .ax-range-slider-label{position:relative;text-align:center;top:calc(var(--ax-range-slider-base-thickness) * 2);left:-50%}ax-range-slider .ax-range-slider.ax-orientation-vertical{position:relative;width:calc(var(--ax-range-slider-base-thickness) * 4);height:100%}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-bar{position:absolute;top:0;left:50%;width:var(--ax-range-slider-base-thickness);height:100.1%;transform:translate(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-bg));cursor:pointer}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-highlight{position:absolute;left:50%;width:calc(var(--ax-range-slider-base-thickness) * 3 / 2);transform:translate(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-fg))}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-handler{position:absolute;left:50%;width:calc(var(--ax-range-slider-base-thickness) * 6);height:calc(var(--ax-range-slider-base-thickness) * 6);z-index:20;background-color:rgb(var(--ax-range-slider-fg));border-radius:50%;cursor:pointer;transform:translate(-50%,-50%);transition:background-color .2s ease}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-handler:active{border:1px solid transparent;box-shadow:var(--tw-ring-inset) 0 0 0 calc(.5rem + var(--tw-ring-offset-width)) rgba(var(--ax-range-slider-fg),.25)}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-tooltip{position:absolute;top:calc(var(--ax-range-slider-base-thickness) * 8.5);left:calc(var(--ax-range-slider-base-thickness) * -8);background-color:rgb(var(--ax-range-slider-fg));color:rgb(var(--ax-range-tooltip-text));padding:5px 10px;border-radius:3px;font-weight:600;white-space:nowrap;transform:translate(-50%,-125%)}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-tooltip:after{content:\"\";position:absolute;top:50%;left:97%;transform:translateY(-50%);border-width:.5rem;border-style:solid;border-color:transparent transparent transparent rgb(var(--ax-range-slider-fg))}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-step{position:absolute;display:flex;flex-direction:column;height:100%;z-index:10}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-step .ax-range-slider-steps{position:absolute;width:50%;border-top:calc(var(--ax-range-slider-base-thickness) / 2) solid rgb(var(--ax-color-border-default))}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-step .ax-range-slider-steps .ax-range-slider-label{position:absolute;left:150%;top:calc(var(--ax-range-slider-base-thickness) * -3)}ax-range-slider.ax-primary-solid{--ax-range-slider-bg: var(--ax-color-primary-200);--ax-range-slider-fg: var(--ax-color-primary-500);--ax-range-tooltip-text: var(--ax-color-primary-fore)}ax-range-slider.ax-secondary-solid{--ax-range-slider-bg: var(--ax-color-secondary-200);--ax-range-slider-fg: var(--ax-color-secondary-500);--ax-range-tooltip-text: var(--ax-color-secondary-fore)}ax-range-slider.ax-success-solid{--ax-range-slider-bg: var(--ax-color-success-200);--ax-range-slider-fg: var(--ax-color-success-500);--ax-range-tooltip-text: var(--ax-color-success-fore)}ax-range-slider.ax-warning-solid{--ax-range-slider-bg: var(--ax-color-warning-200);--ax-range-slider-fg: var(--ax-color-warning-500);--ax-range-tooltip-text: var(--ax-color-warning-fore)}ax-range-slider.ax-danger-solid{--ax-range-slider-bg: var(--ax-color-danger-200);--ax-range-slider-fg: var(--ax-color-danger-500);--ax-range-tooltip-text: var(--ax-color-danger-fore)}ax-range-slider.ax-info-solid{--ax-range-slider-bg: var(--ax-color-info-200);--ax-range-slider-fg: var(--ax-color-info-500);--ax-range-tooltip-text: var(--ax-color-info-fore)}ax-range-slider.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-range-slider.ax-state-readonly{opacity:.75}.ax-dark ax-range-slider.ax-primary-solid{--ax-range-slider-bg: var(--ax-color-primary-700);--ax-range-slider-fg: var(--ax-color-primary-200);--ax-range-tooltip-text: var(--ax-color-primary-fore-tint)}.ax-dark ax-range-slider.ax-secondary-solid{--ax-range-slider-bg: var(--ax-color-secondary-700);--ax-range-slider-fg: var(--ax-color-secondary-200);--ax-range-tooltip-text: var(--ax-color-secondary-fore-tint)}.ax-dark ax-range-slider.ax-success-solid{--ax-range-slider-bg: var(--ax-color-success-700);--ax-range-slider-fg: var(--ax-color-success-200);--ax-range-tooltip-text: var(--ax-color-success-fore-tint)}.ax-dark ax-range-slider.ax-warning-solid{--ax-range-slider-bg: var(--ax-color-warning-700);--ax-range-slider-fg: var(--ax-color-warning-200);--ax-range-tooltip-text: var(--ax-color-warning-fore-tint)}.ax-dark ax-range-slider.ax-danger-solid{--ax-range-slider-bg: var(--ax-color-danger-700);--ax-range-slider-fg: var(--ax-color-danger-200);--ax-range-tooltip-text: var(--ax-color-danger-fore-tint)}.ax-dark ax-range-slider.ax-info-solid{--ax-range-slider-bg: var(--ax-color-info-700);--ax-range-slider-fg: var(--ax-color-info-200);--ax-range-tooltip-text: var(--ax-color-info-fore-tint)}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
427
594
  }
428
595
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXRangeSliderComponent, decorators: [{
429
596
  type: Component,
@@ -434,8 +601,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
434
601
  useExisting: forwardRef(() => AXRangeSliderComponent),
435
602
  multi: true,
436
603
  },
437
- ], template: "<div class=\"ax-range-slider\" (wheel)=\"onWheel($event)\" [class]=\"'ax-orientation-' + orientation()\">\n <div class=\"ax-range-slider-bar\" (mousedown)=\"onclickBar($event)\" (touchstart)=\"onclickBar($event)\"></div>\n <div class=\"ax-range-slider-highlight\" [ngStyle]=\"AXRangeSliderHighlight()\"></div>\n\n <div\n class=\"ax-range-slider-handler\"\n [ngStyle]=\"AXRangeSliderHandler1()\"\n (mousedown)=\"handleOnStart($event, 'first')\"\n (touchstart)=\"handleOnStart($event, 'first')\"\n >\n @if (hasTooltip()) {\n <div class=\"ax-range-slider-tooltip\">{{ isDual() ? values()[0] : values() }}</div>\n }\n </div>\n\n @if (isDual()) {\n <div\n class=\"ax-range-slider-handler\"\n [ngStyle]=\"AXRangeSliderHandler2()\"\n (mousedown)=\"handleOnStart($event, 'second')\"\n (touchstart)=\"handleOnStart($event, 'second')\"\n >\n @if (hasTooltip()) {\n <div class=\"ax-range-slider-tooltip\">{{ values()[1] }}</div>\n }\n </div>\n }\n @if (hasSnap()) {\n <div class=\"ax-range-slider-step\" [ngStyle]=\"AXRangeSliderStep()\">\n @for (item of calculateSnapBar(); track $index) {\n <div\n class=\"ax-range-slider-steps\"\n [ngStyle]=\"\n isHorizontal() ? { left: getPercantage(item) + '%' } : { top: getPercantage(item) + '%' }\n \"\n >\n @if (hasLable()) {\n <div class=\"ax-range-slider-label\" [ngStyle]=\"AXRangeLabel()\">\n {{ item + min() }}\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [":root{--ax-range-slider-base-thickness: .25rem}ax-range-slider{display:flex;align-items:center;justify-content:center;font-size:small}ax-range-slider .ax-range-slider.ax-orientation-horizontal{position:relative;width:100%;height:calc(var(--ax-range-slider-base-thickness) * 4)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-bar{position:absolute;top:50%;left:0;width:100.1%;height:var(--ax-range-slider-base-thickness);transform:translateY(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-bg));cursor:pointer}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-highlight{position:absolute;top:50%;height:calc(var(--ax-range-slider-base-thickness) * 3 / 2);transform:translateY(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-fg))}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-handler{position:absolute;top:50%;width:calc(var(--ax-range-slider-base-thickness) * 6);height:calc(var(--ax-range-slider-base-thickness) * 6);z-index:20;background-color:rgb(var(--ax-range-slider-fg));border-radius:50%;cursor:pointer;transform:translate(-50%,-50%);transition:box-shadow .1s linear}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-handler:hover{box-shadow:var(--tw-ring-inset) 0 0 0 calc(.6rem + var(--tw-ring-offset-width)) rgba(var(--ax-range-slider-fg),.25)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-handler:active{box-shadow:var(--tw-ring-inset) 0 0 0 calc(.6rem + var(--tw-ring-offset-width)) rgba(var(--ax-range-slider-fg),.25)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-tooltip{position:absolute;left:calc(var(--ax-range-slider-base-thickness) * 2.8);top:calc(var(--ax-range-slider-base-thickness) * -2);background-color:rgb(var(--ax-range-slider-fg));color:rgb(var(--ax-range-tooltip-text));padding:5px 10px;border-radius:3px;white-space:nowrap;transform:translate(-50%,-125%)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-tooltip:after{content:\"\";position:absolute;top:calc(var(--ax-range-slider-base-thickness) * 7);left:50%;transform:translate(-50%);border-width:.5rem;border-style:solid;border-color:rgb(var(--ax-range-slider-fg)) transparent transparent transparent}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-step{position:absolute;display:flex;flex-direction:row;width:100%;z-index:10}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-step .ax-range-slider-steps{position:absolute;border-left:calc(var(--ax-range-slider-base-thickness) / 2) solid rgb(var(--ax-color-border-default));height:50%}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-step .ax-range-slider-steps .ax-range-slider-label{position:relative;text-align:center;top:calc(var(--ax-range-slider-base-thickness) * 2);left:-50%}ax-range-slider .ax-range-slider.ax-orientation-vertical{position:relative;width:calc(var(--ax-range-slider-base-thickness) * 4);height:100%}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-bar{position:absolute;top:0;left:50%;width:var(--ax-range-slider-base-thickness);height:100.1%;transform:translate(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-bg));cursor:pointer}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-highlight{position:absolute;left:50%;width:calc(var(--ax-range-slider-base-thickness) * 3 / 2);transform:translate(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-fg))}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-handler{position:absolute;left:50%;width:calc(var(--ax-range-slider-base-thickness) * 6);height:calc(var(--ax-range-slider-base-thickness) * 6);z-index:20;background-color:rgb(var(--ax-range-slider-fg));border-radius:50%;cursor:pointer;transform:translate(-50%,-50%);transition:background-color .2s ease}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-handler:active{border:1px solid transparent;box-shadow:var(--tw-ring-inset) 0 0 0 calc(.5rem + var(--tw-ring-offset-width)) rgba(var(--ax-range-slider-fg),.25)}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-tooltip{position:absolute;top:calc(var(--ax-range-slider-base-thickness) * 8.5);left:calc(var(--ax-range-slider-base-thickness) * -8);background-color:rgb(var(--ax-range-slider-fg));color:rgb(var(--ax-range-tooltip-text));padding:5px 10px;border-radius:3px;white-space:nowrap;transform:translate(-50%,-125%)}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-tooltip:after{content:\"\";position:absolute;top:50%;left:97%;transform:translateY(-50%);border-width:.5rem;border-style:solid;border-color:transparent transparent transparent rgb(var(--ax-range-slider-fg))}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-step{position:absolute;display:flex;flex-direction:column;height:100%;z-index:10}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-step .ax-range-slider-steps{position:absolute;width:50%;border-top:calc(var(--ax-range-slider-base-thickness) / 2) solid rgb(var(--ax-color-border-default))}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-step .ax-range-slider-steps .ax-range-slider-label{position:absolute;left:150%;top:calc(var(--ax-range-slider-base-thickness) * -3)}ax-range-slider.ax-primary-solid{--ax-range-slider-bg: var(--ax-color-primary-200);--ax-range-slider-fg: var(--ax-color-primary-500);--ax-range-tooltip-text: var(--ax-color-primary-fore)}ax-range-slider.ax-secondary-solid{--ax-range-slider-bg: var(--ax-color-secondary-200);--ax-range-slider-fg: var(--ax-color-secondary-500);--ax-range-tooltip-text: var(--ax-color-secondary-fore)}ax-range-slider.ax-success-solid{--ax-range-slider-bg: var(--ax-color-success-200);--ax-range-slider-fg: var(--ax-color-success-500);--ax-range-tooltip-text: var(--ax-color-success-fore)}ax-range-slider.ax-warning-solid{--ax-range-slider-bg: var(--ax-color-warning-200);--ax-range-slider-fg: var(--ax-color-warning-500);--ax-range-tooltip-text: var(--ax-color-warning-fore)}ax-range-slider.ax-danger-solid{--ax-range-slider-bg: var(--ax-color-danger-200);--ax-range-slider-fg: var(--ax-color-danger-500);--ax-range-tooltip-text: var(--ax-color-danger-fore)}ax-range-slider.ax-info-solid{--ax-range-slider-bg: var(--ax-color-info-200);--ax-range-slider-fg: var(--ax-color-info-500);--ax-range-tooltip-text: var(--ax-color-info-fore)}ax-range-slider.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-range-slider.ax-state-readonly{opacity:.75}.ax-dark ax-range-slider.ax-primary-solid{--ax-range-slider-bg: var(--ax-color-primary-700);--ax-range-slider-fg: var(--ax-color-primary-200);--ax-range-tooltip-text: var(--ax-color-primary-fore-tint)}.ax-dark ax-range-slider.ax-secondary-solid{--ax-range-slider-bg: var(--ax-color-secondary-700);--ax-range-slider-fg: var(--ax-color-secondary-200);--ax-range-tooltip-text: var(--ax-color-secondary-fore-tint)}.ax-dark ax-range-slider.ax-success-solid{--ax-range-slider-bg: var(--ax-color-success-700);--ax-range-slider-fg: var(--ax-color-success-200);--ax-range-tooltip-text: var(--ax-color-success-fore-tint)}.ax-dark ax-range-slider.ax-warning-solid{--ax-range-slider-bg: var(--ax-color-warning-700);--ax-range-slider-fg: var(--ax-color-warning-200);--ax-range-tooltip-text: var(--ax-color-warning-fore-tint)}.ax-dark ax-range-slider.ax-danger-solid{--ax-range-slider-bg: var(--ax-color-danger-700);--ax-range-slider-fg: var(--ax-color-danger-200);--ax-range-tooltip-text: var(--ax-color-danger-fore-tint)}.ax-dark ax-range-slider.ax-info-solid{--ax-range-slider-bg: var(--ax-color-info-700);--ax-range-slider-fg: var(--ax-color-info-200);--ax-range-tooltip-text: var(--ax-color-info-fore-tint)}\n"] }]
438
- }], ctorParameters: () => [], propDecorators: { __hostClass: [{
604
+ ], template: "<div class=\"ax-range-slider\" [class]=\"'ax-orientation-' + orientation()\">\n <div class=\"ax-range-slider-bar\" (mousedown)=\"onclickBar($event)\" (touchstart)=\"onclickBar($event)\"></div>\n <div class=\"ax-range-slider-highlight\" [ngStyle]=\"AXRangeSliderHighlight()\"></div>\n\n <div\n class=\"ax-range-slider-handler\"\n [ngStyle]=\"AXRangeSliderHandler1()\"\n (mousedown)=\"handleOnStart($event, 'first')\"\n (touchstart)=\"handleOnStart($event, 'first')\"\n >\n @if (hasTooltip()) {\n <div class=\"ax-range-slider-tooltip\">{{ isDual() ? values()[0] : values() }}</div>\n }\n </div>\n\n @if (isDual()) {\n <div\n class=\"ax-range-slider-handler\"\n [ngStyle]=\"AXRangeSliderHandler2()\"\n (mousedown)=\"handleOnStart($event, 'second')\"\n (touchstart)=\"handleOnStart($event, 'second')\"\n >\n @if (hasTooltip()) {\n <div class=\"ax-range-slider-tooltip\">{{ values()[1] }}</div>\n }\n </div>\n }\n @if (hasSnap()) {\n <div class=\"ax-range-slider-step\" [ngStyle]=\"AXRangeSliderStep()\">\n @for (item of calculateSnapBar(); track $index) {\n <div\n class=\"ax-range-slider-steps\"\n [ngStyle]=\"\n isHorizontal() ? { left: getPercantage(item) + '%' } : { top: getPercantage(item) + '%' }\n \"\n >\n @if (hasLable()) {\n <div class=\"ax-range-slider-label\" [ngStyle]=\"AXRangeLabel()\">\n {{ item + min() }}\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [":root{--ax-range-slider-base-thickness: .25rem}ax-range-slider{display:flex;align-items:center;justify-content:center;padding:1rem;font-size:small}ax-range-slider .ax-range-slider.ax-orientation-horizontal{position:relative;width:100%;height:calc(var(--ax-range-slider-base-thickness) * 4)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-bar{position:absolute;top:50%;left:0;width:100.1%;height:var(--ax-range-slider-base-thickness);transform:translateY(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-bg));cursor:pointer}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-highlight{position:absolute;top:50%;height:calc(var(--ax-range-slider-base-thickness) * 3 / 2);transform:translateY(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-fg))}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-handler{position:absolute;top:50%;width:calc(var(--ax-range-slider-base-thickness) * 6);height:calc(var(--ax-range-slider-base-thickness) * 6);z-index:20;background-color:rgb(var(--ax-range-slider-fg));border-radius:50%;cursor:pointer;transform:translate(-50%,-50%);transition:box-shadow .1s linear}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-handler:hover{box-shadow:var(--tw-ring-inset) 0 0 0 calc(.6rem + var(--tw-ring-offset-width)) rgba(var(--ax-range-slider-fg),.25)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-handler:active{box-shadow:var(--tw-ring-inset) 0 0 0 calc(.6rem + var(--tw-ring-offset-width)) rgba(var(--ax-range-slider-fg),.25)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-tooltip{position:absolute;left:calc(var(--ax-range-slider-base-thickness) * 2.8);top:calc(var(--ax-range-slider-base-thickness) * -2);background-color:rgb(var(--ax-range-slider-fg));color:rgb(var(--ax-range-tooltip-text));padding:5px 10px;border-radius:3px;white-space:nowrap;font-weight:600;transform:translate(-50%,-125%)}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-tooltip:after{content:\"\";position:absolute;top:calc(var(--ax-range-slider-base-thickness) * 7);left:50%;transform:translate(-50%);border-width:.5rem;border-style:solid;border-color:rgb(var(--ax-range-slider-fg)) transparent transparent transparent}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-step{position:absolute;display:flex;flex-direction:row;width:100%;z-index:10}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-step .ax-range-slider-steps{position:absolute;border-left:calc(var(--ax-range-slider-base-thickness) / 2) solid rgb(var(--ax-color-border-default));height:50%}ax-range-slider .ax-range-slider.ax-orientation-horizontal .ax-range-slider-step .ax-range-slider-steps .ax-range-slider-label{position:relative;text-align:center;top:calc(var(--ax-range-slider-base-thickness) * 2);left:-50%}ax-range-slider .ax-range-slider.ax-orientation-vertical{position:relative;width:calc(var(--ax-range-slider-base-thickness) * 4);height:100%}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-bar{position:absolute;top:0;left:50%;width:var(--ax-range-slider-base-thickness);height:100.1%;transform:translate(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-bg));cursor:pointer}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-highlight{position:absolute;left:50%;width:calc(var(--ax-range-slider-base-thickness) * 3 / 2);transform:translate(-50%);z-index:20;border-radius:9999rem;background-color:rgb(var(--ax-range-slider-fg))}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-handler{position:absolute;left:50%;width:calc(var(--ax-range-slider-base-thickness) * 6);height:calc(var(--ax-range-slider-base-thickness) * 6);z-index:20;background-color:rgb(var(--ax-range-slider-fg));border-radius:50%;cursor:pointer;transform:translate(-50%,-50%);transition:background-color .2s ease}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-handler:active{border:1px solid transparent;box-shadow:var(--tw-ring-inset) 0 0 0 calc(.5rem + var(--tw-ring-offset-width)) rgba(var(--ax-range-slider-fg),.25)}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-tooltip{position:absolute;top:calc(var(--ax-range-slider-base-thickness) * 8.5);left:calc(var(--ax-range-slider-base-thickness) * -8);background-color:rgb(var(--ax-range-slider-fg));color:rgb(var(--ax-range-tooltip-text));padding:5px 10px;border-radius:3px;font-weight:600;white-space:nowrap;transform:translate(-50%,-125%)}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-tooltip:after{content:\"\";position:absolute;top:50%;left:97%;transform:translateY(-50%);border-width:.5rem;border-style:solid;border-color:transparent transparent transparent rgb(var(--ax-range-slider-fg))}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-step{position:absolute;display:flex;flex-direction:column;height:100%;z-index:10}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-step .ax-range-slider-steps{position:absolute;width:50%;border-top:calc(var(--ax-range-slider-base-thickness) / 2) solid rgb(var(--ax-color-border-default))}ax-range-slider .ax-range-slider.ax-orientation-vertical .ax-range-slider-step .ax-range-slider-steps .ax-range-slider-label{position:absolute;left:150%;top:calc(var(--ax-range-slider-base-thickness) * -3)}ax-range-slider.ax-primary-solid{--ax-range-slider-bg: var(--ax-color-primary-200);--ax-range-slider-fg: var(--ax-color-primary-500);--ax-range-tooltip-text: var(--ax-color-primary-fore)}ax-range-slider.ax-secondary-solid{--ax-range-slider-bg: var(--ax-color-secondary-200);--ax-range-slider-fg: var(--ax-color-secondary-500);--ax-range-tooltip-text: var(--ax-color-secondary-fore)}ax-range-slider.ax-success-solid{--ax-range-slider-bg: var(--ax-color-success-200);--ax-range-slider-fg: var(--ax-color-success-500);--ax-range-tooltip-text: var(--ax-color-success-fore)}ax-range-slider.ax-warning-solid{--ax-range-slider-bg: var(--ax-color-warning-200);--ax-range-slider-fg: var(--ax-color-warning-500);--ax-range-tooltip-text: var(--ax-color-warning-fore)}ax-range-slider.ax-danger-solid{--ax-range-slider-bg: var(--ax-color-danger-200);--ax-range-slider-fg: var(--ax-color-danger-500);--ax-range-tooltip-text: var(--ax-color-danger-fore)}ax-range-slider.ax-info-solid{--ax-range-slider-bg: var(--ax-color-info-200);--ax-range-slider-fg: var(--ax-color-info-500);--ax-range-tooltip-text: var(--ax-color-info-fore)}ax-range-slider.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-range-slider.ax-state-readonly{opacity:.75}.ax-dark ax-range-slider.ax-primary-solid{--ax-range-slider-bg: var(--ax-color-primary-700);--ax-range-slider-fg: var(--ax-color-primary-200);--ax-range-tooltip-text: var(--ax-color-primary-fore-tint)}.ax-dark ax-range-slider.ax-secondary-solid{--ax-range-slider-bg: var(--ax-color-secondary-700);--ax-range-slider-fg: var(--ax-color-secondary-200);--ax-range-tooltip-text: var(--ax-color-secondary-fore-tint)}.ax-dark ax-range-slider.ax-success-solid{--ax-range-slider-bg: var(--ax-color-success-700);--ax-range-slider-fg: var(--ax-color-success-200);--ax-range-tooltip-text: var(--ax-color-success-fore-tint)}.ax-dark ax-range-slider.ax-warning-solid{--ax-range-slider-bg: var(--ax-color-warning-700);--ax-range-slider-fg: var(--ax-color-warning-200);--ax-range-tooltip-text: var(--ax-color-warning-fore-tint)}.ax-dark ax-range-slider.ax-danger-solid{--ax-range-slider-bg: var(--ax-color-danger-700);--ax-range-slider-fg: var(--ax-color-danger-200);--ax-range-tooltip-text: var(--ax-color-danger-fore-tint)}.ax-dark ax-range-slider.ax-info-solid{--ax-range-slider-bg: var(--ax-color-info-700);--ax-range-slider-fg: var(--ax-color-info-200);--ax-range-tooltip-text: var(--ax-color-info-fore-tint)}\n"] }]
605
+ }], ctorParameters: () => [], propDecorators: { onWheel: [{
606
+ type: HostListener,
607
+ args: ['wheel', ['$event']]
608
+ }], __hostClass: [{
439
609
  type: HostBinding,
440
610
  args: ['class']
441
611
  }] } });