primeng 16.6.0 → 16.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/animate/animate.d.ts +3 -2
- package/animateonscroll/animateonscroll.d.ts +73 -0
- package/animateonscroll/index.d.ts +5 -0
- package/animateonscroll/public_api.d.ts +1 -0
- package/api/primengconfig.d.ts +1 -0
- package/autocomplete/autocomplete.d.ts +177 -54
- package/autocomplete/autocomplete.interface.d.ts +30 -0
- package/cascadeselect/cascadeselect.d.ts +188 -68
- package/cascadeselect/cascadeselect.interface.d.ts +19 -0
- package/checkbox/checkbox.d.ts +1 -4
- package/chips/chips.d.ts +21 -5
- package/colorpicker/colorpicker.d.ts +5 -5
- package/contextmenu/contextmenu.d.ts +1 -0
- package/dialog/dialog.d.ts +1 -2
- package/dom/domhandler.d.ts +4 -1
- package/dropdown/dropdown.d.ts +115 -37
- package/esm2022/accordion/accordion.mjs +11 -7
- package/esm2022/animate/animate.mjs +4 -1
- package/esm2022/animateonscroll/animateonscroll.mjs +185 -0
- package/esm2022/animateonscroll/primeng-animateonscroll.mjs +5 -0
- package/esm2022/animateonscroll/public_api.mjs +2 -0
- package/esm2022/api/primengconfig.mjs +2 -1
- package/esm2022/autocomplete/autocomplete.interface.mjs +1 -1
- package/esm2022/autocomplete/autocomplete.mjs +893 -617
- package/esm2022/carousel/carousel.mjs +5 -1
- package/esm2022/cascadeselect/cascadeselect.interface.mjs +1 -1
- package/esm2022/cascadeselect/cascadeselect.mjs +921 -482
- package/esm2022/checkbox/checkbox.mjs +90 -73
- package/esm2022/chips/chips.mjs +197 -53
- package/esm2022/colorpicker/colorpicker.mjs +56 -37
- package/esm2022/contextmenu/contextmenu.mjs +10 -1
- package/esm2022/dialog/dialog.mjs +6 -11
- package/esm2022/dom/domhandler.mjs +26 -8
- package/esm2022/dropdown/dropdown.mjs +707 -588
- package/esm2022/inputmask/inputmask.mjs +22 -9
- package/esm2022/inputnumber/inputnumber.mjs +142 -83
- package/esm2022/inputswitch/inputswitch.mjs +55 -49
- package/esm2022/knob/knob.mjs +92 -5
- package/esm2022/listbox/listbox.interface.mjs +1 -1
- package/esm2022/listbox/listbox.mjs +996 -454
- package/esm2022/multiselect/multiselect.mjs +1022 -604
- package/esm2022/overlaypanel/overlaypanel.mjs +2 -2
- package/esm2022/paginator/paginator.mjs +2 -2
- package/esm2022/password/password.mjs +29 -28
- package/esm2022/radiobutton/radiobutton.mjs +46 -33
- package/esm2022/rating/rating.mjs +172 -80
- package/esm2022/selectbutton/selectbutton.mjs +105 -34
- package/esm2022/slider/slider.mjs +151 -66
- package/esm2022/table/table.mjs +3 -3
- package/esm2022/togglebutton/togglebutton.mjs +47 -10
- package/esm2022/tristatecheckbox/tristatecheckbox.mjs +53 -35
- package/fesm2022/primeng-accordion.mjs +10 -6
- package/fesm2022/primeng-accordion.mjs.map +1 -1
- package/fesm2022/primeng-animate.mjs +3 -0
- package/fesm2022/primeng-animate.mjs.map +1 -1
- package/fesm2022/primeng-animateonscroll.mjs +190 -0
- package/fesm2022/primeng-animateonscroll.mjs.map +1 -0
- package/fesm2022/primeng-api.mjs +1 -0
- package/fesm2022/primeng-api.mjs.map +1 -1
- package/fesm2022/primeng-autocomplete.mjs +893 -617
- package/fesm2022/primeng-autocomplete.mjs.map +1 -1
- package/fesm2022/primeng-carousel.mjs +4 -0
- package/fesm2022/primeng-carousel.mjs.map +1 -1
- package/fesm2022/primeng-cascadeselect.mjs +920 -481
- package/fesm2022/primeng-cascadeselect.mjs.map +1 -1
- package/fesm2022/primeng-checkbox.mjs +89 -72
- package/fesm2022/primeng-checkbox.mjs.map +1 -1
- package/fesm2022/primeng-chips.mjs +195 -51
- package/fesm2022/primeng-chips.mjs.map +1 -1
- package/fesm2022/primeng-colorpicker.mjs +55 -36
- package/fesm2022/primeng-colorpicker.mjs.map +1 -1
- package/fesm2022/primeng-contextmenu.mjs +9 -0
- package/fesm2022/primeng-contextmenu.mjs.map +1 -1
- package/fesm2022/primeng-dialog.mjs +5 -10
- package/fesm2022/primeng-dialog.mjs.map +1 -1
- package/fesm2022/primeng-dom.mjs +25 -7
- package/fesm2022/primeng-dom.mjs.map +1 -1
- package/fesm2022/primeng-dropdown.mjs +707 -588
- package/fesm2022/primeng-dropdown.mjs.map +1 -1
- package/fesm2022/primeng-inputmask.mjs +20 -7
- package/fesm2022/primeng-inputmask.mjs.map +1 -1
- package/fesm2022/primeng-inputnumber.mjs +140 -81
- package/fesm2022/primeng-inputnumber.mjs.map +1 -1
- package/fesm2022/primeng-inputswitch.mjs +55 -49
- package/fesm2022/primeng-inputswitch.mjs.map +1 -1
- package/fesm2022/primeng-knob.mjs +92 -5
- package/fesm2022/primeng-knob.mjs.map +1 -1
- package/fesm2022/primeng-listbox.mjs +995 -453
- package/fesm2022/primeng-listbox.mjs.map +1 -1
- package/fesm2022/primeng-multiselect.mjs +1021 -603
- package/fesm2022/primeng-multiselect.mjs.map +1 -1
- package/fesm2022/primeng-overlaypanel.mjs +1 -1
- package/fesm2022/primeng-overlaypanel.mjs.map +1 -1
- package/fesm2022/primeng-paginator.mjs +1 -1
- package/fesm2022/primeng-paginator.mjs.map +1 -1
- package/fesm2022/primeng-password.mjs +27 -26
- package/fesm2022/primeng-password.mjs.map +1 -1
- package/fesm2022/primeng-radiobutton.mjs +46 -33
- package/fesm2022/primeng-radiobutton.mjs.map +1 -1
- package/fesm2022/primeng-rating.mjs +171 -79
- package/fesm2022/primeng-rating.mjs.map +1 -1
- package/fesm2022/primeng-selectbutton.mjs +104 -33
- package/fesm2022/primeng-selectbutton.mjs.map +1 -1
- package/fesm2022/primeng-slider.mjs +150 -65
- package/fesm2022/primeng-slider.mjs.map +1 -1
- package/fesm2022/primeng-table.mjs +2 -2
- package/fesm2022/primeng-table.mjs.map +1 -1
- package/fesm2022/primeng-togglebutton.mjs +46 -9
- package/fesm2022/primeng-togglebutton.mjs.map +1 -1
- package/fesm2022/primeng-tristatecheckbox.mjs +53 -35
- package/fesm2022/primeng-tristatecheckbox.mjs.map +1 -1
- package/inputmask/inputmask.d.ts +6 -1
- package/inputnumber/inputnumber.d.ts +6 -1
- package/inputswitch/inputswitch.d.ts +6 -9
- package/knob/knob.d.ts +20 -3
- package/listbox/listbox.d.ts +208 -39
- package/listbox/listbox.interface.d.ts +15 -0
- package/multiselect/multiselect.d.ts +171 -60
- package/package.json +126 -120
- package/password/password.d.ts +3 -4
- package/radiobutton/radiobutton.d.ts +1 -2
- package/rating/rating.d.ts +29 -7
- package/resources/components/dropdown/dropdown.css +16 -2
- package/resources/themes/arya-blue/theme.css +106 -84
- package/resources/themes/arya-green/theme.css +106 -84
- package/resources/themes/arya-orange/theme.css +106 -84
- package/resources/themes/arya-purple/theme.css +106 -84
- package/resources/themes/bootstrap4-dark-blue/theme.css +110 -88
- package/resources/themes/bootstrap4-dark-purple/theme.css +110 -88
- package/resources/themes/bootstrap4-light-blue/theme.css +110 -88
- package/resources/themes/bootstrap4-light-purple/theme.css +110 -88
- package/resources/themes/fluent-light/theme.css +103 -81
- package/resources/themes/lara-dark-blue/theme.css +106 -84
- package/resources/themes/lara-dark-indigo/theme.css +106 -84
- package/resources/themes/lara-dark-purple/theme.css +106 -84
- package/resources/themes/lara-dark-teal/theme.css +106 -84
- package/resources/themes/lara-light-blue/theme.css +109 -87
- package/resources/themes/lara-light-indigo/theme.css +109 -87
- package/resources/themes/lara-light-purple/theme.css +109 -87
- package/resources/themes/lara-light-teal/theme.css +109 -87
- package/resources/themes/luna-amber/theme.css +110 -88
- package/resources/themes/luna-blue/theme.css +110 -88
- package/resources/themes/luna-green/theme.css +110 -88
- package/resources/themes/luna-pink/theme.css +110 -88
- package/resources/themes/md-dark-deeppurple/theme.css +117 -95
- package/resources/themes/md-dark-indigo/theme.css +117 -95
- package/resources/themes/md-light-deeppurple/theme.css +117 -95
- package/resources/themes/md-light-indigo/theme.css +117 -95
- package/resources/themes/mdc-dark-deeppurple/theme.css +117 -95
- package/resources/themes/mdc-dark-indigo/theme.css +117 -95
- package/resources/themes/mdc-light-deeppurple/theme.css +117 -95
- package/resources/themes/mdc-light-indigo/theme.css +117 -95
- package/resources/themes/mira/theme.css +107 -85
- package/resources/themes/nano/theme.css +109 -87
- package/resources/themes/nova/theme.css +110 -88
- package/resources/themes/nova-accent/theme.css +109 -87
- package/resources/themes/nova-alt/theme.css +110 -88
- package/resources/themes/rhea/theme.css +109 -87
- package/resources/themes/saga-blue/theme.css +106 -84
- package/resources/themes/saga-green/theme.css +106 -84
- package/resources/themes/saga-orange/theme.css +106 -84
- package/resources/themes/saga-purple/theme.css +106 -84
- package/resources/themes/soho-dark/theme.css +109 -87
- package/resources/themes/soho-light/theme.css +109 -87
- package/resources/themes/tailwind-light/theme.css +110 -88
- package/resources/themes/vela-blue/theme.css +106 -84
- package/resources/themes/vela-green/theme.css +106 -84
- package/resources/themes/vela-orange/theme.css +106 -84
- package/resources/themes/vela-purple/theme.css +106 -84
- package/resources/themes/viva-dark/theme.css +109 -87
- package/resources/themes/viva-light/theme.css +109 -87
- package/selectbutton/selectbutton.d.ts +15 -3
- package/slider/slider.d.ts +12 -6
- package/togglebutton/togglebutton.d.ts +7 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +8 -4
@@ -3,15 +3,15 @@ import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
4
4
|
import { forwardRef, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, Input, Output, ViewChild, ContentChildren, NgModule } from '@angular/core';
|
5
5
|
import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
|
6
|
+
import { PrimeTemplate, SharedModule } from 'primeng/api';
|
6
7
|
import * as i3 from 'primeng/button';
|
7
8
|
import { ButtonModule } from 'primeng/button';
|
8
9
|
import { DomHandler } from 'primeng/dom';
|
10
|
+
import { AngleDownIcon } from 'primeng/icons/angledown';
|
11
|
+
import { AngleUpIcon } from 'primeng/icons/angleup';
|
12
|
+
import { TimesIcon } from 'primeng/icons/times';
|
9
13
|
import * as i2 from 'primeng/inputtext';
|
10
14
|
import { InputTextModule } from 'primeng/inputtext';
|
11
|
-
import { PrimeTemplate, SharedModule } from 'primeng/api';
|
12
|
-
import { TimesIcon } from 'primeng/icons/times';
|
13
|
-
import { AngleUpIcon } from 'primeng/icons/angleup';
|
14
|
-
import { AngleDownIcon } from 'primeng/icons/angledown';
|
15
15
|
|
16
16
|
const INPUTNUMBER_VALUE_ACCESSOR = {
|
17
17
|
provide: NG_VALUE_ACCESSOR,
|
@@ -82,6 +82,11 @@ class InputNumber {
|
|
82
82
|
* @group Props
|
83
83
|
*/
|
84
84
|
title;
|
85
|
+
/**
|
86
|
+
* Specifies one or more IDs in the DOM that labels the input field.
|
87
|
+
* @group Props
|
88
|
+
*/
|
89
|
+
ariaLabelledBy;
|
85
90
|
/**
|
86
91
|
* Used to define a string that labels the input element.
|
87
92
|
* @group Props
|
@@ -468,15 +473,21 @@ class InputNumber {
|
|
468
473
|
this.clearTimer();
|
469
474
|
return;
|
470
475
|
}
|
471
|
-
this.
|
472
|
-
|
473
|
-
|
476
|
+
if (!this.disabled) {
|
477
|
+
this.input?.nativeElement.focus();
|
478
|
+
this.repeat(event, null, 1);
|
479
|
+
event.preventDefault();
|
480
|
+
}
|
474
481
|
}
|
475
482
|
onUpButtonMouseUp() {
|
476
|
-
this.
|
483
|
+
if (!this.disabled) {
|
484
|
+
this.clearTimer();
|
485
|
+
}
|
477
486
|
}
|
478
487
|
onUpButtonMouseLeave() {
|
479
|
-
this.
|
488
|
+
if (!this.disabled) {
|
489
|
+
this.clearTimer();
|
490
|
+
}
|
480
491
|
}
|
481
492
|
onUpButtonKeyDown(event) {
|
482
493
|
if (event.keyCode === 32 || event.keyCode === 13) {
|
@@ -484,25 +495,35 @@ class InputNumber {
|
|
484
495
|
}
|
485
496
|
}
|
486
497
|
onUpButtonKeyUp() {
|
487
|
-
this.
|
498
|
+
if (!this.disabled) {
|
499
|
+
this.clearTimer();
|
500
|
+
}
|
488
501
|
}
|
489
502
|
onDownButtonMouseDown(event) {
|
490
503
|
if (event.button === 2) {
|
491
504
|
this.clearTimer();
|
492
505
|
return;
|
493
506
|
}
|
494
|
-
this.
|
495
|
-
|
496
|
-
|
507
|
+
if (!this.disabled) {
|
508
|
+
this.input?.nativeElement.focus();
|
509
|
+
this.repeat(event, null, -1);
|
510
|
+
event.preventDefault();
|
511
|
+
}
|
497
512
|
}
|
498
513
|
onDownButtonMouseUp() {
|
499
|
-
this.
|
514
|
+
if (!this.disabled) {
|
515
|
+
this.clearTimer();
|
516
|
+
}
|
500
517
|
}
|
501
518
|
onDownButtonMouseLeave() {
|
502
|
-
this.
|
519
|
+
if (!this.disabled) {
|
520
|
+
this.clearTimer();
|
521
|
+
}
|
503
522
|
}
|
504
523
|
onDownButtonKeyUp() {
|
505
|
-
this.
|
524
|
+
if (!this.disabled) {
|
525
|
+
this.clearTimer();
|
526
|
+
}
|
506
527
|
}
|
507
528
|
onDownButtonKeyDown(event) {
|
508
529
|
if (event.keyCode === 32 || event.keyCode === 13) {
|
@@ -534,38 +555,33 @@ class InputNumber {
|
|
534
555
|
if (event.altKey) {
|
535
556
|
event.preventDefault();
|
536
557
|
}
|
537
|
-
switch (event.
|
538
|
-
|
539
|
-
case 38:
|
558
|
+
switch (event.code) {
|
559
|
+
case 'ArrowUp':
|
540
560
|
this.spin(event, 1);
|
541
561
|
event.preventDefault();
|
542
562
|
break;
|
543
|
-
|
544
|
-
case 40:
|
563
|
+
case 'ArrowDown':
|
545
564
|
this.spin(event, -1);
|
546
565
|
event.preventDefault();
|
547
566
|
break;
|
548
|
-
|
549
|
-
case 37:
|
567
|
+
case 'ArrowLeft':
|
550
568
|
if (!this.isNumeralChar(inputValue.charAt(selectionStart - 1))) {
|
551
569
|
event.preventDefault();
|
552
570
|
}
|
553
571
|
break;
|
554
|
-
|
555
|
-
case 39:
|
572
|
+
case 'ArrowRight':
|
556
573
|
if (!this.isNumeralChar(inputValue.charAt(selectionStart))) {
|
557
574
|
event.preventDefault();
|
558
575
|
}
|
559
576
|
break;
|
560
|
-
|
561
|
-
case
|
577
|
+
case 'Tab':
|
578
|
+
case 'Enter':
|
562
579
|
newValueStr = this.validateValue(this.parseValue(this.input.nativeElement.value));
|
563
580
|
this.input.nativeElement.value = this.formatValue(newValueStr);
|
564
581
|
this.input.nativeElement.setAttribute('aria-valuenow', newValueStr);
|
565
582
|
this.updateModel(event, newValueStr);
|
566
583
|
break;
|
567
|
-
|
568
|
-
case 8: {
|
584
|
+
case 'Backspace': {
|
569
585
|
event.preventDefault();
|
570
586
|
if (selectionStart === selectionEnd) {
|
571
587
|
const deleteChar = inputValue.charAt(selectionStart - 1);
|
@@ -605,8 +621,7 @@ class InputNumber {
|
|
605
621
|
}
|
606
622
|
break;
|
607
623
|
}
|
608
|
-
|
609
|
-
case 46:
|
624
|
+
case 'Delete':
|
610
625
|
event.preventDefault();
|
611
626
|
if (selectionStart === selectionEnd) {
|
612
627
|
const deleteChar = inputValue.charAt(selectionStart);
|
@@ -645,6 +660,18 @@ class InputNumber {
|
|
645
660
|
this.updateValue(event, newValueStr, null, 'delete-range');
|
646
661
|
}
|
647
662
|
break;
|
663
|
+
case 'Home':
|
664
|
+
if (this.min) {
|
665
|
+
this.updateModel(event, this.min);
|
666
|
+
event.preventDefault();
|
667
|
+
}
|
668
|
+
break;
|
669
|
+
case 'End':
|
670
|
+
if (this.max) {
|
671
|
+
this.updateModel(event, this.max);
|
672
|
+
event.preventDefault();
|
673
|
+
}
|
674
|
+
break;
|
648
675
|
default:
|
649
676
|
break;
|
650
677
|
}
|
@@ -1022,10 +1049,10 @@ class InputNumber {
|
|
1022
1049
|
onInputBlur(event) {
|
1023
1050
|
this.focused = false;
|
1024
1051
|
let newValue = this.validateValue(this.parseValue(this.input.nativeElement.value));
|
1052
|
+
this.onBlur.emit(event);
|
1025
1053
|
this.input.nativeElement.value = this.formatValue(newValue);
|
1026
1054
|
this.input.nativeElement.setAttribute('aria-valuenow', newValue);
|
1027
1055
|
this.updateModel(event, newValue);
|
1028
|
-
this.onBlur.emit(event);
|
1029
1056
|
}
|
1030
1057
|
formattedValue() {
|
1031
1058
|
const val = !this.value && !this.allowEmpty ? 0 : this.value;
|
@@ -1070,7 +1097,7 @@ class InputNumber {
|
|
1070
1097
|
return this.numberFormat;
|
1071
1098
|
}
|
1072
1099
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: InputNumber, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
1073
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: InputNumber, selector: "p-inputNumber", inputs: { showButtons: "showButtons", format: "format", buttonLayout: "buttonLayout", inputId: "inputId", styleClass: "styleClass", style: "style", placeholder: "placeholder", size: "size", maxlength: "maxlength", tabindex: "tabindex", title: "title", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", name: "name", required: "required", autocomplete: "autocomplete", min: "min", max: "max", incrementButtonClass: "incrementButtonClass", decrementButtonClass: "decrementButtonClass", incrementButtonIcon: "incrementButtonIcon", decrementButtonIcon: "decrementButtonIcon", readonly: "readonly", step: "step", allowEmpty: "allowEmpty", locale: "locale", localeMatcher: "localeMatcher", mode: "mode", currency: "currency", currencyDisplay: "currencyDisplay", useGrouping: "useGrouping", minFractionDigits: "minFractionDigits", maxFractionDigits: "maxFractionDigits", prefix: "prefix", suffix: "suffix", inputStyle: "inputStyle", inputStyleClass: "inputStyleClass", showClear: "showClear", disabled: "disabled" }, outputs: { onInput: "onInput", onFocus: "onFocus", onBlur: "onBlur", onKeyDown: "onKeyDown", onClear: "onClear" }, host: { properties: { "class.p-inputwrapper-filled": "filled", "class.p-inputwrapper-focus": "focused", "class.p-inputnumber-clearable": "showClear && buttonLayout != \"vertical\"" }, classAttribute: "p-element p-inputwrapper" }, providers: [INPUTNUMBER_VALUE_ACCESSOR], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
1100
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: InputNumber, selector: "p-inputNumber", inputs: { showButtons: "showButtons", format: "format", buttonLayout: "buttonLayout", inputId: "inputId", styleClass: "styleClass", style: "style", placeholder: "placeholder", size: "size", maxlength: "maxlength", tabindex: "tabindex", title: "title", ariaLabelledBy: "ariaLabelledBy", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", name: "name", required: "required", autocomplete: "autocomplete", min: "min", max: "max", incrementButtonClass: "incrementButtonClass", decrementButtonClass: "decrementButtonClass", incrementButtonIcon: "incrementButtonIcon", decrementButtonIcon: "decrementButtonIcon", readonly: "readonly", step: "step", allowEmpty: "allowEmpty", locale: "locale", localeMatcher: "localeMatcher", mode: "mode", currency: "currency", currencyDisplay: "currencyDisplay", useGrouping: "useGrouping", minFractionDigits: "minFractionDigits", maxFractionDigits: "maxFractionDigits", prefix: "prefix", suffix: "suffix", inputStyle: "inputStyle", inputStyleClass: "inputStyleClass", showClear: "showClear", disabled: "disabled" }, outputs: { onInput: "onInput", onFocus: "onFocus", onBlur: "onBlur", onKeyDown: "onKeyDown", onClear: "onClear" }, host: { properties: { "class.p-inputwrapper-filled": "filled", "class.p-inputwrapper-focus": "focused", "class.p-inputnumber-clearable": "showClear && buttonLayout != \"vertical\"" }, classAttribute: "p-element p-inputwrapper" }, providers: [INPUTNUMBER_VALUE_ACCESSOR], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
1074
1101
|
<span
|
1075
1102
|
[ngClass]="{
|
1076
1103
|
'p-inputnumber p-component': true,
|
@@ -1080,29 +1107,36 @@ class InputNumber {
|
|
1080
1107
|
}"
|
1081
1108
|
[ngStyle]="style"
|
1082
1109
|
[class]="styleClass"
|
1110
|
+
[attr.data-pc-name]="'inputnumber'"
|
1111
|
+
[attr.data-pc-section]="'root'"
|
1083
1112
|
>
|
1084
1113
|
<input
|
1114
|
+
pInputText
|
1085
1115
|
#input
|
1116
|
+
[attr.id]="inputId"
|
1117
|
+
role="spinbutton"
|
1086
1118
|
[ngClass]="'p-inputnumber-input'"
|
1087
1119
|
[ngStyle]="inputStyle"
|
1088
1120
|
[class]="inputStyleClass"
|
1089
|
-
pInputText
|
1090
1121
|
[value]="formattedValue()"
|
1122
|
+
[attr.aria-valuemin]="min"
|
1123
|
+
[attr.aria-valuemax]="max"
|
1124
|
+
[attr.aria-valuenow]="value"
|
1125
|
+
[disabled]="disabled"
|
1126
|
+
[readonly]="readonly"
|
1091
1127
|
[attr.placeholder]="placeholder"
|
1128
|
+
[attr.aria-label]="ariaLabel"
|
1129
|
+
[attr.aria-labelledby]="ariaLabelledBy"
|
1092
1130
|
[attr.title]="title"
|
1093
|
-
[attr.id]="inputId"
|
1094
1131
|
[attr.size]="size"
|
1095
1132
|
[attr.name]="name"
|
1096
1133
|
[attr.autocomplete]="autocomplete"
|
1097
1134
|
[attr.maxlength]="maxlength"
|
1098
1135
|
[attr.tabindex]="tabindex"
|
1099
|
-
[attr.aria-label]="ariaLabel"
|
1100
1136
|
[attr.aria-required]="ariaRequired"
|
1101
|
-
[disabled]="disabled"
|
1102
1137
|
[attr.required]="required"
|
1103
1138
|
[attr.min]="min"
|
1104
1139
|
[attr.max]="max"
|
1105
|
-
[readonly]="readonly"
|
1106
1140
|
inputmode="decimal"
|
1107
1141
|
(input)="onUserInput($event)"
|
1108
1142
|
(keydown)="onInputKeyDown($event)"
|
@@ -1111,15 +1145,15 @@ class InputNumber {
|
|
1111
1145
|
(click)="onInputClick()"
|
1112
1146
|
(focus)="onInputFocus($event)"
|
1113
1147
|
(blur)="onInputBlur($event)"
|
1148
|
+
[attr.data-pc-section]="'input'"
|
1114
1149
|
/>
|
1115
|
-
<ng-container *ngIf="buttonLayout != 'vertical' && showClear &&
|
1116
|
-
<TimesIcon *ngIf="!clearIconTemplate" [ngClass]="'p-inputnumber-clear-icon'" (click)="clear()" />
|
1117
|
-
<span *ngIf="clearIconTemplate" (click)="clear()" class="p-inputnumber-clear-icon">
|
1150
|
+
<ng-container *ngIf="buttonLayout != 'vertical' && showClear && value">
|
1151
|
+
<TimesIcon *ngIf="!clearIconTemplate" [ngClass]="'p-inputnumber-clear-icon'" (click)="clear()" [attr.data-pc-section]="'clearIcon'" />
|
1152
|
+
<span *ngIf="clearIconTemplate" (click)="clear()" class="p-inputnumber-clear-icon" [attr.data-pc-section]="'clearIcon'">
|
1118
1153
|
<ng-template *ngTemplateOutlet="clearIconTemplate"></ng-template>
|
1119
1154
|
</span>
|
1120
1155
|
</ng-container>
|
1121
|
-
|
1122
|
-
<span class="p-inputnumber-button-group" *ngIf="showButtons && buttonLayout === 'stacked'">
|
1156
|
+
<span class="p-inputnumber-button-group" *ngIf="showButtons && buttonLayout === 'stacked'" [attr.data-pc-section]="'buttonGroup'">
|
1123
1157
|
<button
|
1124
1158
|
type="button"
|
1125
1159
|
pButton
|
@@ -1127,16 +1161,18 @@ class InputNumber {
|
|
1127
1161
|
class="p-button-icon-only"
|
1128
1162
|
[class]="incrementButtonClass"
|
1129
1163
|
[disabled]="disabled"
|
1164
|
+
tabindex="-1"
|
1130
1165
|
(mousedown)="onUpButtonMouseDown($event)"
|
1131
1166
|
(mouseup)="onUpButtonMouseUp()"
|
1132
1167
|
(mouseleave)="onUpButtonMouseLeave()"
|
1133
1168
|
(keydown)="onUpButtonKeyDown($event)"
|
1134
1169
|
(keyup)="onUpButtonKeyUp()"
|
1135
|
-
|
1170
|
+
[attr.aria-hidden]="true"
|
1171
|
+
[attr.data-pc-section]="'incrementbutton'"
|
1136
1172
|
>
|
1137
|
-
<span *ngIf="incrementButtonIcon" [ngClass]="incrementButtonIcon"></span>
|
1173
|
+
<span *ngIf="incrementButtonIcon" [ngClass]="incrementButtonIcon" [attr.data-pc-section]="'incrementbuttonicon'"></span>
|
1138
1174
|
<ng-container *ngIf="!incrementButtonIcon">
|
1139
|
-
<AngleUpIcon *ngIf="!incrementButtonIconTemplate" />
|
1175
|
+
<AngleUpIcon *ngIf="!incrementButtonIconTemplate" [attr.data-pc-section]="'incrementbuttonicon'" />
|
1140
1176
|
<ng-template *ngTemplateOutlet="incrementButtonIconTemplate"></ng-template>
|
1141
1177
|
</ng-container>
|
1142
1178
|
</button>
|
@@ -1147,59 +1183,65 @@ class InputNumber {
|
|
1147
1183
|
class="p-button-icon-only"
|
1148
1184
|
[class]="decrementButtonClass"
|
1149
1185
|
[disabled]="disabled"
|
1186
|
+
tabindex="-1"
|
1187
|
+
[attr.aria-hidden]="true"
|
1150
1188
|
(mousedown)="onDownButtonMouseDown($event)"
|
1151
1189
|
(mouseup)="onDownButtonMouseUp()"
|
1152
1190
|
(mouseleave)="onDownButtonMouseLeave()"
|
1153
1191
|
(keydown)="onDownButtonKeyDown($event)"
|
1154
1192
|
(keyup)="onDownButtonKeyUp()"
|
1155
|
-
|
1193
|
+
[attr.data-pc-section]="decrementbutton"
|
1156
1194
|
>
|
1157
|
-
<span *ngIf="decrementButtonIcon" [ngClass]="decrementButtonIcon"></span>
|
1195
|
+
<span *ngIf="decrementButtonIcon" [ngClass]="decrementButtonIcon" [attr.data-pc-section]="'decrementbuttonicon'"></span>
|
1158
1196
|
<ng-container *ngIf="!decrementButtonIcon">
|
1159
|
-
<AngleDownIcon *ngIf="!decrementButtonIconTemplate" />
|
1197
|
+
<AngleDownIcon *ngIf="!decrementButtonIconTemplate" [attr.data-pc-section]="'decrementbuttonicon'" />
|
1160
1198
|
<ng-template *ngTemplateOutlet="decrementButtonIconTemplate"></ng-template>
|
1161
1199
|
</ng-container>
|
1162
1200
|
</button>
|
1163
1201
|
</span>
|
1164
1202
|
<button
|
1203
|
+
*ngIf="showButtons && buttonLayout !== 'stacked'"
|
1165
1204
|
type="button"
|
1166
1205
|
pButton
|
1167
1206
|
[ngClass]="{ 'p-inputnumber-button p-inputnumber-button-up': true }"
|
1168
1207
|
[class]="incrementButtonClass"
|
1169
1208
|
class="p-button-icon-only"
|
1170
|
-
*ngIf="showButtons && buttonLayout !== 'stacked'"
|
1171
1209
|
[disabled]="disabled"
|
1210
|
+
tabindex="-1"
|
1211
|
+
[attr.aria-hidden]="true"
|
1172
1212
|
(mousedown)="onUpButtonMouseDown($event)"
|
1173
1213
|
(mouseup)="onUpButtonMouseUp()"
|
1174
1214
|
(mouseleave)="onUpButtonMouseLeave()"
|
1175
1215
|
(keydown)="onUpButtonKeyDown($event)"
|
1176
1216
|
(keyup)="onUpButtonKeyUp()"
|
1177
|
-
|
1217
|
+
[attr.data-pc-section]="'incrementbutton'"
|
1178
1218
|
>
|
1179
|
-
<span *ngIf="incrementButtonIcon" [ngClass]="incrementButtonIcon"></span>
|
1219
|
+
<span *ngIf="incrementButtonIcon" [ngClass]="incrementButtonIcon" [attr.data-pc-section]="'incrementbuttonicon'"></span>
|
1180
1220
|
<ng-container *ngIf="!incrementButtonIcon">
|
1181
|
-
<AngleUpIcon *ngIf="!incrementButtonIconTemplate" />
|
1221
|
+
<AngleUpIcon *ngIf="!incrementButtonIconTemplate" [attr.data-pc-section]="'incrementbuttonicon'" />
|
1182
1222
|
<ng-template *ngTemplateOutlet="incrementButtonIconTemplate"></ng-template>
|
1183
1223
|
</ng-container>
|
1184
1224
|
</button>
|
1185
1225
|
<button
|
1226
|
+
*ngIf="showButtons && buttonLayout !== 'stacked'"
|
1186
1227
|
type="button"
|
1187
1228
|
pButton
|
1188
1229
|
[ngClass]="{ 'p-inputnumber-button p-inputnumber-button-down': true }"
|
1189
1230
|
class="p-button-icon-only"
|
1190
1231
|
[class]="decrementButtonClass"
|
1191
|
-
*ngIf="showButtons && buttonLayout !== 'stacked'"
|
1192
1232
|
[disabled]="disabled"
|
1233
|
+
tabindex="-1"
|
1234
|
+
[attr.aria-hidden]="true"
|
1193
1235
|
(mousedown)="onDownButtonMouseDown($event)"
|
1194
1236
|
(mouseup)="onDownButtonMouseUp()"
|
1195
1237
|
(mouseleave)="onDownButtonMouseLeave()"
|
1196
1238
|
(keydown)="onDownButtonKeyDown($event)"
|
1197
1239
|
(keyup)="onDownButtonKeyUp()"
|
1198
|
-
|
1240
|
+
[attr.data-pc-section]="'decrementbutton'"
|
1199
1241
|
>
|
1200
|
-
<span *ngIf="decrementButtonIcon" [ngClass]="decrementButtonIcon"></span>
|
1242
|
+
<span *ngIf="decrementButtonIcon" [ngClass]="decrementButtonIcon" [attr.data-pc-section]="'decrementbuttonicon'"></span>
|
1201
1243
|
<ng-container *ngIf="!decrementButtonIcon">
|
1202
|
-
<AngleDownIcon *ngIf="!decrementButtonIconTemplate" />
|
1244
|
+
<AngleDownIcon *ngIf="!decrementButtonIconTemplate" [attr.data-pc-section]="'decrementbuttonicon'" />
|
1203
1245
|
<ng-template *ngTemplateOutlet="decrementButtonIconTemplate"></ng-template>
|
1204
1246
|
</ng-container>
|
1205
1247
|
</button>
|
@@ -1218,29 +1260,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
1218
1260
|
}"
|
1219
1261
|
[ngStyle]="style"
|
1220
1262
|
[class]="styleClass"
|
1263
|
+
[attr.data-pc-name]="'inputnumber'"
|
1264
|
+
[attr.data-pc-section]="'root'"
|
1221
1265
|
>
|
1222
1266
|
<input
|
1267
|
+
pInputText
|
1223
1268
|
#input
|
1269
|
+
[attr.id]="inputId"
|
1270
|
+
role="spinbutton"
|
1224
1271
|
[ngClass]="'p-inputnumber-input'"
|
1225
1272
|
[ngStyle]="inputStyle"
|
1226
1273
|
[class]="inputStyleClass"
|
1227
|
-
pInputText
|
1228
1274
|
[value]="formattedValue()"
|
1275
|
+
[attr.aria-valuemin]="min"
|
1276
|
+
[attr.aria-valuemax]="max"
|
1277
|
+
[attr.aria-valuenow]="value"
|
1278
|
+
[disabled]="disabled"
|
1279
|
+
[readonly]="readonly"
|
1229
1280
|
[attr.placeholder]="placeholder"
|
1281
|
+
[attr.aria-label]="ariaLabel"
|
1282
|
+
[attr.aria-labelledby]="ariaLabelledBy"
|
1230
1283
|
[attr.title]="title"
|
1231
|
-
[attr.id]="inputId"
|
1232
1284
|
[attr.size]="size"
|
1233
1285
|
[attr.name]="name"
|
1234
1286
|
[attr.autocomplete]="autocomplete"
|
1235
1287
|
[attr.maxlength]="maxlength"
|
1236
1288
|
[attr.tabindex]="tabindex"
|
1237
|
-
[attr.aria-label]="ariaLabel"
|
1238
1289
|
[attr.aria-required]="ariaRequired"
|
1239
|
-
[disabled]="disabled"
|
1240
1290
|
[attr.required]="required"
|
1241
1291
|
[attr.min]="min"
|
1242
1292
|
[attr.max]="max"
|
1243
|
-
[readonly]="readonly"
|
1244
1293
|
inputmode="decimal"
|
1245
1294
|
(input)="onUserInput($event)"
|
1246
1295
|
(keydown)="onInputKeyDown($event)"
|
@@ -1249,15 +1298,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
1249
1298
|
(click)="onInputClick()"
|
1250
1299
|
(focus)="onInputFocus($event)"
|
1251
1300
|
(blur)="onInputBlur($event)"
|
1301
|
+
[attr.data-pc-section]="'input'"
|
1252
1302
|
/>
|
1253
|
-
<ng-container *ngIf="buttonLayout != 'vertical' && showClear &&
|
1254
|
-
<TimesIcon *ngIf="!clearIconTemplate" [ngClass]="'p-inputnumber-clear-icon'" (click)="clear()" />
|
1255
|
-
<span *ngIf="clearIconTemplate" (click)="clear()" class="p-inputnumber-clear-icon">
|
1303
|
+
<ng-container *ngIf="buttonLayout != 'vertical' && showClear && value">
|
1304
|
+
<TimesIcon *ngIf="!clearIconTemplate" [ngClass]="'p-inputnumber-clear-icon'" (click)="clear()" [attr.data-pc-section]="'clearIcon'" />
|
1305
|
+
<span *ngIf="clearIconTemplate" (click)="clear()" class="p-inputnumber-clear-icon" [attr.data-pc-section]="'clearIcon'">
|
1256
1306
|
<ng-template *ngTemplateOutlet="clearIconTemplate"></ng-template>
|
1257
1307
|
</span>
|
1258
1308
|
</ng-container>
|
1259
|
-
|
1260
|
-
<span class="p-inputnumber-button-group" *ngIf="showButtons && buttonLayout === 'stacked'">
|
1309
|
+
<span class="p-inputnumber-button-group" *ngIf="showButtons && buttonLayout === 'stacked'" [attr.data-pc-section]="'buttonGroup'">
|
1261
1310
|
<button
|
1262
1311
|
type="button"
|
1263
1312
|
pButton
|
@@ -1265,16 +1314,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
1265
1314
|
class="p-button-icon-only"
|
1266
1315
|
[class]="incrementButtonClass"
|
1267
1316
|
[disabled]="disabled"
|
1317
|
+
tabindex="-1"
|
1268
1318
|
(mousedown)="onUpButtonMouseDown($event)"
|
1269
1319
|
(mouseup)="onUpButtonMouseUp()"
|
1270
1320
|
(mouseleave)="onUpButtonMouseLeave()"
|
1271
1321
|
(keydown)="onUpButtonKeyDown($event)"
|
1272
1322
|
(keyup)="onUpButtonKeyUp()"
|
1273
|
-
|
1323
|
+
[attr.aria-hidden]="true"
|
1324
|
+
[attr.data-pc-section]="'incrementbutton'"
|
1274
1325
|
>
|
1275
|
-
<span *ngIf="incrementButtonIcon" [ngClass]="incrementButtonIcon"></span>
|
1326
|
+
<span *ngIf="incrementButtonIcon" [ngClass]="incrementButtonIcon" [attr.data-pc-section]="'incrementbuttonicon'"></span>
|
1276
1327
|
<ng-container *ngIf="!incrementButtonIcon">
|
1277
|
-
<AngleUpIcon *ngIf="!incrementButtonIconTemplate" />
|
1328
|
+
<AngleUpIcon *ngIf="!incrementButtonIconTemplate" [attr.data-pc-section]="'incrementbuttonicon'" />
|
1278
1329
|
<ng-template *ngTemplateOutlet="incrementButtonIconTemplate"></ng-template>
|
1279
1330
|
</ng-container>
|
1280
1331
|
</button>
|
@@ -1285,59 +1336,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
1285
1336
|
class="p-button-icon-only"
|
1286
1337
|
[class]="decrementButtonClass"
|
1287
1338
|
[disabled]="disabled"
|
1339
|
+
tabindex="-1"
|
1340
|
+
[attr.aria-hidden]="true"
|
1288
1341
|
(mousedown)="onDownButtonMouseDown($event)"
|
1289
1342
|
(mouseup)="onDownButtonMouseUp()"
|
1290
1343
|
(mouseleave)="onDownButtonMouseLeave()"
|
1291
1344
|
(keydown)="onDownButtonKeyDown($event)"
|
1292
1345
|
(keyup)="onDownButtonKeyUp()"
|
1293
|
-
|
1346
|
+
[attr.data-pc-section]="decrementbutton"
|
1294
1347
|
>
|
1295
|
-
<span *ngIf="decrementButtonIcon" [ngClass]="decrementButtonIcon"></span>
|
1348
|
+
<span *ngIf="decrementButtonIcon" [ngClass]="decrementButtonIcon" [attr.data-pc-section]="'decrementbuttonicon'"></span>
|
1296
1349
|
<ng-container *ngIf="!decrementButtonIcon">
|
1297
|
-
<AngleDownIcon *ngIf="!decrementButtonIconTemplate" />
|
1350
|
+
<AngleDownIcon *ngIf="!decrementButtonIconTemplate" [attr.data-pc-section]="'decrementbuttonicon'" />
|
1298
1351
|
<ng-template *ngTemplateOutlet="decrementButtonIconTemplate"></ng-template>
|
1299
1352
|
</ng-container>
|
1300
1353
|
</button>
|
1301
1354
|
</span>
|
1302
1355
|
<button
|
1356
|
+
*ngIf="showButtons && buttonLayout !== 'stacked'"
|
1303
1357
|
type="button"
|
1304
1358
|
pButton
|
1305
1359
|
[ngClass]="{ 'p-inputnumber-button p-inputnumber-button-up': true }"
|
1306
1360
|
[class]="incrementButtonClass"
|
1307
1361
|
class="p-button-icon-only"
|
1308
|
-
*ngIf="showButtons && buttonLayout !== 'stacked'"
|
1309
1362
|
[disabled]="disabled"
|
1363
|
+
tabindex="-1"
|
1364
|
+
[attr.aria-hidden]="true"
|
1310
1365
|
(mousedown)="onUpButtonMouseDown($event)"
|
1311
1366
|
(mouseup)="onUpButtonMouseUp()"
|
1312
1367
|
(mouseleave)="onUpButtonMouseLeave()"
|
1313
1368
|
(keydown)="onUpButtonKeyDown($event)"
|
1314
1369
|
(keyup)="onUpButtonKeyUp()"
|
1315
|
-
|
1370
|
+
[attr.data-pc-section]="'incrementbutton'"
|
1316
1371
|
>
|
1317
|
-
<span *ngIf="incrementButtonIcon" [ngClass]="incrementButtonIcon"></span>
|
1372
|
+
<span *ngIf="incrementButtonIcon" [ngClass]="incrementButtonIcon" [attr.data-pc-section]="'incrementbuttonicon'"></span>
|
1318
1373
|
<ng-container *ngIf="!incrementButtonIcon">
|
1319
|
-
<AngleUpIcon *ngIf="!incrementButtonIconTemplate" />
|
1374
|
+
<AngleUpIcon *ngIf="!incrementButtonIconTemplate" [attr.data-pc-section]="'incrementbuttonicon'" />
|
1320
1375
|
<ng-template *ngTemplateOutlet="incrementButtonIconTemplate"></ng-template>
|
1321
1376
|
</ng-container>
|
1322
1377
|
</button>
|
1323
1378
|
<button
|
1379
|
+
*ngIf="showButtons && buttonLayout !== 'stacked'"
|
1324
1380
|
type="button"
|
1325
1381
|
pButton
|
1326
1382
|
[ngClass]="{ 'p-inputnumber-button p-inputnumber-button-down': true }"
|
1327
1383
|
class="p-button-icon-only"
|
1328
1384
|
[class]="decrementButtonClass"
|
1329
|
-
*ngIf="showButtons && buttonLayout !== 'stacked'"
|
1330
1385
|
[disabled]="disabled"
|
1386
|
+
tabindex="-1"
|
1387
|
+
[attr.aria-hidden]="true"
|
1331
1388
|
(mousedown)="onDownButtonMouseDown($event)"
|
1332
1389
|
(mouseup)="onDownButtonMouseUp()"
|
1333
1390
|
(mouseleave)="onDownButtonMouseLeave()"
|
1334
1391
|
(keydown)="onDownButtonKeyDown($event)"
|
1335
1392
|
(keyup)="onDownButtonKeyUp()"
|
1336
|
-
|
1393
|
+
[attr.data-pc-section]="'decrementbutton'"
|
1337
1394
|
>
|
1338
|
-
<span *ngIf="decrementButtonIcon" [ngClass]="decrementButtonIcon"></span>
|
1395
|
+
<span *ngIf="decrementButtonIcon" [ngClass]="decrementButtonIcon" [attr.data-pc-section]="'decrementbuttonicon'"></span>
|
1339
1396
|
<ng-container *ngIf="!decrementButtonIcon">
|
1340
|
-
<AngleDownIcon *ngIf="!decrementButtonIconTemplate" />
|
1397
|
+
<AngleDownIcon *ngIf="!decrementButtonIconTemplate" [attr.data-pc-section]="'decrementbuttonicon'" />
|
1341
1398
|
<ng-template *ngTemplateOutlet="decrementButtonIconTemplate"></ng-template>
|
1342
1399
|
</ng-container>
|
1343
1400
|
</button>
|
@@ -1373,6 +1430,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
1373
1430
|
type: Input
|
1374
1431
|
}], title: [{
|
1375
1432
|
type: Input
|
1433
|
+
}], ariaLabelledBy: [{
|
1434
|
+
type: Input
|
1376
1435
|
}], ariaLabel: [{
|
1377
1436
|
type: Input
|
1378
1437
|
}], ariaRequired: [{
|