primeng 20.0.0-rc.2 → 20.0.0-rc.3

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.
Files changed (96) hide show
  1. package/autocomplete/index.d.ts +8 -7
  2. package/baseeditableholder/index.d.ts +14 -5
  3. package/basemodelholder/index.d.ts +12 -0
  4. package/cascadeselect/index.d.ts +7 -5
  5. package/checkbox/index.d.ts +9 -7
  6. package/colorpicker/index.d.ts +8 -7
  7. package/datepicker/index.d.ts +8 -7
  8. package/editor/index.d.ts +9 -8
  9. package/fesm2022/primeng-autocomplete.mjs +33 -35
  10. package/fesm2022/primeng-autocomplete.mjs.map +1 -1
  11. package/fesm2022/primeng-baseeditableholder.mjs +25 -7
  12. package/fesm2022/primeng-baseeditableholder.mjs.map +1 -1
  13. package/fesm2022/primeng-basemodelholder.mjs +25 -0
  14. package/fesm2022/primeng-basemodelholder.mjs.map +1 -0
  15. package/fesm2022/primeng-card.mjs +2 -2
  16. package/fesm2022/primeng-card.mjs.map +1 -1
  17. package/fesm2022/primeng-cascadeselect.mjs +21 -23
  18. package/fesm2022/primeng-cascadeselect.mjs.map +1 -1
  19. package/fesm2022/primeng-checkbox.mjs +13 -15
  20. package/fesm2022/primeng-checkbox.mjs.map +1 -1
  21. package/fesm2022/primeng-colorpicker.mjs +35 -37
  22. package/fesm2022/primeng-colorpicker.mjs.map +1 -1
  23. package/fesm2022/primeng-contextmenu.mjs +1 -9
  24. package/fesm2022/primeng-contextmenu.mjs.map +1 -1
  25. package/fesm2022/primeng-datepicker.mjs +41 -43
  26. package/fesm2022/primeng-datepicker.mjs.map +1 -1
  27. package/fesm2022/primeng-divider.mjs +2 -2
  28. package/fesm2022/primeng-divider.mjs.map +1 -1
  29. package/fesm2022/primeng-editor.mjs +8 -10
  30. package/fesm2022/primeng-editor.mjs.map +1 -1
  31. package/fesm2022/primeng-fileupload.mjs +4 -3
  32. package/fesm2022/primeng-fileupload.mjs.map +1 -1
  33. package/fesm2022/primeng-inputmask.mjs +23 -25
  34. package/fesm2022/primeng-inputmask.mjs.map +1 -1
  35. package/fesm2022/primeng-inputnumber.mjs +28 -30
  36. package/fesm2022/primeng-inputnumber.mjs.map +1 -1
  37. package/fesm2022/primeng-inputotp.mjs +26 -28
  38. package/fesm2022/primeng-inputotp.mjs.map +1 -1
  39. package/fesm2022/primeng-inputtext.mjs +11 -5
  40. package/fesm2022/primeng-inputtext.mjs.map +1 -1
  41. package/fesm2022/primeng-knob.mjs +22 -24
  42. package/fesm2022/primeng-knob.mjs.map +1 -1
  43. package/fesm2022/primeng-listbox.mjs +36 -38
  44. package/fesm2022/primeng-listbox.mjs.map +1 -1
  45. package/fesm2022/primeng-menubar.mjs +2 -2
  46. package/fesm2022/primeng-menubar.mjs.map +1 -1
  47. package/fesm2022/primeng-multiselect.mjs +38 -39
  48. package/fesm2022/primeng-multiselect.mjs.map +1 -1
  49. package/fesm2022/primeng-password.mjs +19 -21
  50. package/fesm2022/primeng-password.mjs.map +1 -1
  51. package/fesm2022/primeng-radiobutton.mjs +16 -18
  52. package/fesm2022/primeng-radiobutton.mjs.map +1 -1
  53. package/fesm2022/primeng-rating.mjs +14 -16
  54. package/fesm2022/primeng-rating.mjs.map +1 -1
  55. package/fesm2022/primeng-select.mjs +32 -34
  56. package/fesm2022/primeng-select.mjs.map +1 -1
  57. package/fesm2022/primeng-selectbutton.mjs +15 -17
  58. package/fesm2022/primeng-selectbutton.mjs.map +1 -1
  59. package/fesm2022/primeng-slider.mjs +28 -30
  60. package/fesm2022/primeng-slider.mjs.map +1 -1
  61. package/fesm2022/primeng-stepper.mjs +32 -7
  62. package/fesm2022/primeng-stepper.mjs.map +1 -1
  63. package/fesm2022/primeng-table.mjs +13 -21
  64. package/fesm2022/primeng-table.mjs.map +1 -1
  65. package/fesm2022/primeng-textarea.mjs +10 -5
  66. package/fesm2022/primeng-textarea.mjs.map +1 -1
  67. package/fesm2022/primeng-togglebutton.mjs +13 -15
  68. package/fesm2022/primeng-togglebutton.mjs.map +1 -1
  69. package/fesm2022/primeng-toggleswitch.mjs +14 -16
  70. package/fesm2022/primeng-toggleswitch.mjs.map +1 -1
  71. package/fesm2022/primeng-tree.mjs +1 -1
  72. package/fesm2022/primeng-tree.mjs.map +1 -1
  73. package/fesm2022/primeng-treeselect.mjs +16 -18
  74. package/fesm2022/primeng-treeselect.mjs.map +1 -1
  75. package/fesm2022/primeng-treetable.mjs +8 -8
  76. package/fesm2022/primeng-treetable.mjs.map +1 -1
  77. package/inputmask/index.d.ts +8 -7
  78. package/inputnumber/index.d.ts +8 -7
  79. package/inputotp/index.d.ts +7 -5
  80. package/inputtext/index.d.ts +10 -4
  81. package/knob/index.d.ts +7 -5
  82. package/listbox/index.d.ts +8 -7
  83. package/multiselect/index.d.ts +8 -7
  84. package/package.json +213 -209
  85. package/password/index.d.ts +7 -5
  86. package/radiobutton/index.d.ts +9 -7
  87. package/rating/index.d.ts +8 -7
  88. package/select/index.d.ts +8 -7
  89. package/selectbutton/index.d.ts +9 -8
  90. package/slider/index.d.ts +9 -8
  91. package/stepper/index.d.ts +4 -0
  92. package/table/index.d.ts +1 -5
  93. package/textarea/index.d.ts +9 -4
  94. package/togglebutton/index.d.ts +8 -7
  95. package/toggleswitch/index.d.ts +7 -5
  96. package/treeselect/index.d.ts +7 -5
@@ -24,7 +24,7 @@ const classes = {
24
24
  'p-rating',
25
25
  {
26
26
  'p-readonly': instance.readonly,
27
- 'p-disabled': instance.disabled()
27
+ 'p-disabled': instance.$disabled()
28
28
  }
29
29
  ],
30
30
  option: ({ instance, star, value }) => [
@@ -151,8 +151,6 @@ class Rating extends BaseEditableHolder {
151
151
  offIconTemplate;
152
152
  templates;
153
153
  value;
154
- onModelChange = () => { };
155
- onModelTouched = () => { };
156
154
  starsArray;
157
155
  isFocusVisibleItem = true;
158
156
  focusedOptionIndex = signal(-1);
@@ -181,7 +179,7 @@ class Rating extends BaseEditableHolder {
181
179
  });
182
180
  }
183
181
  onOptionClick(event, value) {
184
- if (!this.readonly && !this.disabled()) {
182
+ if (!this.readonly && !this.$disabled()) {
185
183
  this.onOptionSelect(event, value);
186
184
  this.isFocusVisibleItem = false;
187
185
  const firstFocusableEl = getFirstFocusableElement(event.currentTarget, '');
@@ -189,7 +187,7 @@ class Rating extends BaseEditableHolder {
189
187
  }
190
188
  }
191
189
  onOptionSelect(event, value) {
192
- if (!this.readonly && !this.disabled()) {
190
+ if (!this.readonly && !this.$disabled()) {
193
191
  if (this.focusedOptionIndex() === value || value === this.value) {
194
192
  this.focusedOptionIndex.set(-1);
195
193
  this.updateModel(event, null);
@@ -209,7 +207,7 @@ class Rating extends BaseEditableHolder {
209
207
  this.onBlur.emit(event);
210
208
  }
211
209
  onInputFocus(event, value) {
212
- if (!this.readonly && !this.disabled()) {
210
+ if (!this.readonly && !this.$disabled()) {
213
211
  this.focusedOptionIndex.set(value);
214
212
  this.isFocusVisibleItem = event.sourceCapabilities?.firesTouchEvents === false;
215
213
  this.onFocus.emit(event);
@@ -230,15 +228,15 @@ class Rating extends BaseEditableHolder {
230
228
  getIconTemplate(i) {
231
229
  return !this.value || i >= this.value ? this.offIconTemplate || this._offIconTemplate : this.onIconTemplate || this.offIconTemplate;
232
230
  }
233
- writeValue(value) {
231
+ /**
232
+ * @override
233
+ *
234
+ * @see {@link BaseEditableHolder.writeControlValue}
235
+ * Writes the value to the control.
236
+ */
237
+ writeControlValue(value, setModelValue) {
234
238
  this.value = value;
235
- this.writeModelValue(value);
236
- }
237
- registerOnChange(fn) {
238
- this.onModelChange = fn;
239
- }
240
- registerOnTouched(fn) {
241
- this.onModelTouched = fn;
239
+ setModelValue(value);
242
240
  }
243
241
  get isCustomIcon() {
244
242
  return !!(this.onIconTemplate || this._onIconTemplate || this.offIconTemplate || this._offIconTemplate);
@@ -255,7 +253,7 @@ class Rating extends BaseEditableHolder {
255
253
  [attr.value]="modelValue()"
256
254
  [attr.required]="required() ? '' : undefined"
257
255
  [attr.readonly]="readonly ? '' : undefined"
258
- [attr.disabled]="disabled() ? '' : undefined"
256
+ [attr.disabled]="$disabled() ? '' : undefined"
259
257
  [checked]="value === star + 1"
260
258
  [attr.aria-label]="starAriaLabel(star + 1)"
261
259
  (focus)="onInputFocus($event, star + 1)"
@@ -300,7 +298,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
300
298
  [attr.value]="modelValue()"
301
299
  [attr.required]="required() ? '' : undefined"
302
300
  [attr.readonly]="readonly ? '' : undefined"
303
- [attr.disabled]="disabled() ? '' : undefined"
301
+ [attr.disabled]="$disabled() ? '' : undefined"
304
302
  [checked]="value === star + 1"
305
303
  [attr.aria-label]="starAriaLabel(star + 1)"
306
304
  (focus)="onInputFocus($event, star + 1)"
@@ -1 +1 @@
1
- {"version":3,"file":"primeng-rating.mjs","sources":["../../src/rating/style/ratingstyle.ts","../../src/rating/rating.ts","../../src/rating/primeng-rating.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style } from '@primeuix/styles/rating';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = /*css*/ `\n ${style}\n\n /* For PrimeNG */\n p-rating.ng-invalid.ng-dirty > .p-rating > .p-rating-icon {\n stroke: dt('rating.invalid.icon.color');\n }\n`;\n\nconst classes = {\n root: ({ instance }) => [\n 'p-rating',\n {\n 'p-readonly': instance.readonly,\n 'p-disabled': instance.disabled()\n }\n ],\n option: ({ instance, star, value }) => [\n 'p-rating-option',\n\n {\n 'p-rating-option-active': star + 1 <= value,\n 'p-focus-visible': star + 1 === instance.focusedOptionIndex() && instance.isFocusVisibleItem\n }\n ],\n onIcon: ({ instance }) => ['p-rating-icon p-rating-on-icon', { 'p-invalid': instance.invalid() }],\n offIcon: ({ instance }) => ['p-rating-icon p-rating-off-icon', { 'p-invalid': instance.invalid() }]\n};\n\n@Injectable()\nexport class RatingStyle extends BaseStyle {\n name = 'rating';\n\n theme = theme;\n\n classes = classes;\n}\n\n/**\n *\n * Rating component is a star based selection input.\n *\n * [Live Demo](https://www.primeng.org/rating/)\n *\n * @module ratingstyle\n *\n */\nexport enum RatingClasses {\n /**\n * Class name of the root element\n */\n root = 'p-rating',\n /**\n * Class name of the option element\n */\n option = 'p-rating-option',\n /**\n * Class name of the on icon element\n */\n onIcon = 'p-rating-on-icon',\n /**\n * Class name of the off icon element\n */\n offIcon = 'p-rating-off-icon'\n}\n\nexport interface RatingStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n EventEmitter,\n forwardRef,\n inject,\n Input,\n NgModule,\n numberAttribute,\n OnInit,\n Output,\n QueryList,\n signal,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { focus, getFirstFocusableElement, uuid } from '@primeuix/utils';\nimport { PrimeTemplate, SharedModule } from 'primeng/api';\nimport { AutoFocus } from 'primeng/autofocus';\nimport { BaseEditableHolder } from 'primeng/baseeditableholder';\nimport { StarFillIcon, StarIcon } from 'primeng/icons';\nimport { Nullable } from 'primeng/ts-helpers';\nimport { RatingRateEvent } from './rating.interface';\nimport { RatingStyle } from './style/ratingstyle';\n\nexport const RATING_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Rating),\n multi: true\n};\n/**\n * Rating is an extension to standard radio button element with theming.\n * @group Components\n */\n@Component({\n selector: 'p-rating',\n imports: [CommonModule, AutoFocus, StarFillIcon, StarIcon, SharedModule],\n standalone: true,\n template: `\n <ng-template ngFor [ngForOf]=\"starsArray\" let-star let-i=\"index\">\n <div [class]=\"cx('option', { star, value })\" (click)=\"onOptionClick($event, star + 1)\">\n <span class=\"p-hidden-accessible\" [attr.data-p-hidden-accessible]=\"true\">\n <input\n type=\"radio\"\n [value]=\"star + 1\"\n [attr.name]=\"name() || nameattr + '_name'\"\n [attr.value]=\"modelValue()\"\n [attr.required]=\"required() ? '' : undefined\"\n [attr.readonly]=\"readonly ? '' : undefined\"\n [attr.disabled]=\"disabled() ? '' : undefined\"\n [checked]=\"value === star + 1\"\n [attr.aria-label]=\"starAriaLabel(star + 1)\"\n (focus)=\"onInputFocus($event, star + 1)\"\n (blur)=\"onInputBlur($event)\"\n (change)=\"onChange($event, star + 1)\"\n [pAutoFocus]=\"autofocus\"\n />\n </span>\n @if (star + 1 <= value) {\n @if (onIconTemplate || _onIconTemplate) {\n <ng-container *ngTemplateOutlet=\"onIconTemplate || _onIconTemplate; context: { $implicit: star + 1, class: cx('onIcon') }\"></ng-container>\n } @else {\n <span [class]=\"cx('onIcon')\" *ngIf=\"iconOnClass\" [ngStyle]=\"iconOnStyle\" [ngClass]=\"iconOnClass\" [attr.data-pc-section]=\"'onIcon'\"></span>\n <svg data-p-icon=\"star-fill\" *ngIf=\"!iconOnClass\" [ngStyle]=\"iconOnStyle\" [class]=\"cx('onIcon')\" [attr.data-pc-section]=\"'onIcon'\" />\n }\n } @else {\n @if (offIconTemplate || _offIconTemplate) {\n <ng-container *ngTemplateOutlet=\"offIconTemplate || _offIconTemplate; context: { $implicit: star + 1, class: cx('offIcon') }\"></ng-container>\n } @else {\n <span [class]=\"cx('offIcon')\" *ngIf=\"iconOffClass\" [ngStyle]=\"iconOffStyle\" [ngClass]=\"iconOffClass\" [attr.data-pc-section]=\"'offIcon'\"></span>\n <svg data-p-icon=\"star\" *ngIf=\"!iconOffClass\" [ngStyle]=\"iconOffStyle\" [class]=\"cx('offIcon')\" [attr.data-pc-section]=\"'offIcon'\" />\n }\n }\n </div>\n </ng-template>\n `,\n providers: [RATING_VALUE_ACCESSOR, RatingStyle],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': \"cx('root')\",\n '[attr.data-pc-name]': \"'rating'\",\n '[attr.data-pc-section]': \"'root'\"\n }\n})\nexport class Rating extends BaseEditableHolder implements OnInit, ControlValueAccessor {\n /**\n * When present, changing the value is not possible.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) readonly: boolean | undefined;\n /**\n * Number of stars.\n * @group Props\n */\n @Input({ transform: numberAttribute }) stars: number = 5;\n /**\n * Style class of the on icon.\n * @group Props\n */\n @Input() iconOnClass: string | undefined;\n /**\n * Inline style of the on icon.\n * @group Props\n */\n @Input() iconOnStyle: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the off icon.\n * @group Props\n */\n @Input() iconOffClass: string | undefined;\n /**\n * Inline style of the off icon.\n * @group Props\n */\n @Input() iconOffStyle: { [klass: string]: any } | null | undefined;\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) autofocus: boolean | undefined;\n /**\n * Emitted on value change.\n * @param {RatingRateEvent} value - Custom rate event.\n * @group Emits\n */\n @Output() onRate: EventEmitter<RatingRateEvent> = new EventEmitter<RatingRateEvent>();\n /**\n * Emitted when the rating receives focus.\n * @param {Event} value - Browser event.\n * @group Emits\n */\n @Output() onFocus: EventEmitter<FocusEvent> = new EventEmitter<FocusEvent>();\n /**\n * Emitted when the rating loses focus.\n * @param {Event} value - Browser event.\n * @group Emits\n */\n @Output() onBlur: EventEmitter<FocusEvent> = new EventEmitter<FocusEvent>();\n /**\n * Custom on icon template.\n * @group Templates\n */\n @ContentChild('onicon', { descendants: false }) onIconTemplate: Nullable<TemplateRef<any>>;\n /**\n * Custom off icon template.\n * @group Templates\n */\n @ContentChild('officon', { descendants: false }) offIconTemplate: Nullable<TemplateRef<any>>;\n\n @ContentChildren(PrimeTemplate) templates!: QueryList<PrimeTemplate>;\n\n value: Nullable<number>;\n\n onModelChange: Function = () => {};\n\n onModelTouched: Function = () => {};\n\n public starsArray: Nullable<number[]>;\n\n isFocusVisibleItem: boolean = true;\n\n focusedOptionIndex = signal<number>(-1);\n\n nameattr: string | undefined;\n\n _componentStyle = inject(RatingStyle);\n\n _onIconTemplate: TemplateRef<any> | undefined;\n\n _offIconTemplate: TemplateRef<any> | undefined;\n\n ngOnInit() {\n super.ngOnInit();\n this.nameattr = this.nameattr || uuid('pn_id_');\n this.starsArray = [];\n for (let i = 0; i < this.stars; i++) {\n this.starsArray[i] = i;\n }\n }\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch (item.getType()) {\n case 'onicon':\n this._onIconTemplate = item.template;\n break;\n\n case 'officon':\n this._offIconTemplate = item.template;\n break;\n }\n });\n }\n\n onOptionClick(event, value) {\n if (!this.readonly && !this.disabled()) {\n this.onOptionSelect(event, value);\n this.isFocusVisibleItem = false;\n const firstFocusableEl = <any>getFirstFocusableElement(event.currentTarget, '');\n\n firstFocusableEl && focus(firstFocusableEl);\n }\n }\n\n onOptionSelect(event, value) {\n if (!this.readonly && !this.disabled()) {\n if (this.focusedOptionIndex() === value || value === this.value) {\n this.focusedOptionIndex.set(-1);\n this.updateModel(event, null);\n } else {\n this.focusedOptionIndex.set(value);\n this.updateModel(event, value || null);\n }\n }\n }\n\n onChange(event, value) {\n this.onOptionSelect(event, value);\n this.isFocusVisibleItem = true;\n }\n\n onInputBlur(event) {\n this.focusedOptionIndex.set(-1);\n this.onBlur.emit(event);\n }\n\n onInputFocus(event, value) {\n if (!this.readonly && !this.disabled()) {\n this.focusedOptionIndex.set(value);\n this.isFocusVisibleItem = event.sourceCapabilities?.firesTouchEvents === false;\n\n this.onFocus.emit(event);\n }\n }\n\n updateModel(event, value) {\n this.writeValue(value);\n this.onModelChange(this.value);\n this.onModelTouched();\n\n this.onRate.emit({\n originalEvent: event,\n value\n });\n }\n\n starAriaLabel(value) {\n return value === 1 ? this.config.translation.aria.star : this.config.translation.aria.stars.replace(/{star}/g, value);\n }\n\n getIconTemplate(i: number): Nullable<TemplateRef<any>> {\n return !this.value || i >= this.value ? this.offIconTemplate || this._offIconTemplate : this.onIconTemplate || this.offIconTemplate;\n }\n\n writeValue(value: any): void {\n this.value = value;\n this.writeModelValue(value);\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n get isCustomIcon(): boolean {\n return !!(this.onIconTemplate || this._onIconTemplate || this.offIconTemplate || this._offIconTemplate);\n }\n}\n\n@NgModule({\n imports: [Rating, SharedModule],\n exports: [Rating, SharedModule]\n})\nexport class RatingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChB,KAAK;;;;;;CAMV;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK;QACpB,UAAU;AACV,QAAA;YACI,YAAY,EAAE,QAAQ,CAAC,QAAQ;AAC/B,YAAA,YAAY,EAAE,QAAQ,CAAC,QAAQ;AAClC;AACJ,KAAA;IACD,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK;QACnC,iBAAiB;AAEjB,QAAA;AACI,YAAA,wBAAwB,EAAE,IAAI,GAAG,CAAC,IAAI,KAAK;AAC3C,YAAA,iBAAiB,EAAE,IAAI,GAAG,CAAC,KAAK,QAAQ,CAAC,kBAAkB,EAAE,IAAI,QAAQ,CAAC;AAC7E;AACJ,KAAA;AACD,IAAA,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,gCAAgC,EAAE,EAAE,WAAW,EAAE,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC;AACjG,IAAA,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,iCAAiC,EAAE,EAAE,WAAW,EAAE,QAAQ,CAAC,OAAO,EAAE,EAAE;CACrG;AAGK,MAAO,WAAY,SAAQ,SAAS,CAAA;IACtC,IAAI,GAAG,QAAQ;IAEf,KAAK,GAAG,KAAK;IAEb,OAAO,GAAG,OAAO;uGALR,WAAW,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAA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le.ts","../../src/rating/rating.ts","../../src/rating/primeng-rating.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style } from '@primeuix/styles/rating';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = /*css*/ `\n ${style}\n\n /* For PrimeNG */\n p-rating.ng-invalid.ng-dirty > .p-rating > .p-rating-icon {\n stroke: dt('rating.invalid.icon.color');\n }\n`;\n\nconst classes = {\n root: ({ instance }) => [\n 'p-rating',\n {\n 'p-readonly': instance.readonly,\n 'p-disabled': instance.$disabled()\n }\n ],\n option: ({ instance, star, value }) => [\n 'p-rating-option',\n\n {\n 'p-rating-option-active': star + 1 <= value,\n 'p-focus-visible': star + 1 === instance.focusedOptionIndex() && instance.isFocusVisibleItem\n }\n ],\n onIcon: ({ instance }) => ['p-rating-icon p-rating-on-icon', { 'p-invalid': instance.invalid() }],\n offIcon: ({ instance }) => ['p-rating-icon p-rating-off-icon', { 'p-invalid': instance.invalid() }]\n};\n\n@Injectable()\nexport class RatingStyle extends BaseStyle {\n name = 'rating';\n\n theme = theme;\n\n classes = classes;\n}\n\n/**\n *\n * Rating component is a star based selection input.\n *\n * [Live Demo](https://www.primeng.org/rating/)\n *\n * @module ratingstyle\n *\n */\nexport enum RatingClasses {\n /**\n * Class name of the root element\n */\n root = 'p-rating',\n /**\n * Class name of the option element\n */\n option = 'p-rating-option',\n /**\n * Class name of the on icon element\n */\n onIcon = 'p-rating-on-icon',\n /**\n * Class name of the off icon element\n */\n offIcon = 'p-rating-off-icon'\n}\n\nexport interface RatingStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n EventEmitter,\n forwardRef,\n inject,\n Input,\n NgModule,\n numberAttribute,\n OnInit,\n Output,\n QueryList,\n signal,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { focus, getFirstFocusableElement, uuid } from '@primeuix/utils';\nimport { PrimeTemplate, SharedModule } from 'primeng/api';\nimport { AutoFocus } from 'primeng/autofocus';\nimport { BaseEditableHolder } from 'primeng/baseeditableholder';\nimport { StarFillIcon, StarIcon } from 'primeng/icons';\nimport { Nullable } from 'primeng/ts-helpers';\nimport { RatingRateEvent } from './rating.interface';\nimport { RatingStyle } from './style/ratingstyle';\n\nexport const RATING_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Rating),\n multi: true\n};\n/**\n * Rating is an extension to standard radio button element with theming.\n * @group Components\n */\n@Component({\n selector: 'p-rating',\n imports: [CommonModule, AutoFocus, StarFillIcon, StarIcon, SharedModule],\n standalone: true,\n template: `\n <ng-template ngFor [ngForOf]=\"starsArray\" let-star let-i=\"index\">\n <div [class]=\"cx('option', { star, value })\" (click)=\"onOptionClick($event, star + 1)\">\n <span class=\"p-hidden-accessible\" [attr.data-p-hidden-accessible]=\"true\">\n <input\n type=\"radio\"\n [value]=\"star + 1\"\n [attr.name]=\"name() || nameattr + '_name'\"\n [attr.value]=\"modelValue()\"\n [attr.required]=\"required() ? '' : undefined\"\n [attr.readonly]=\"readonly ? '' : undefined\"\n [attr.disabled]=\"$disabled() ? '' : undefined\"\n [checked]=\"value === star + 1\"\n [attr.aria-label]=\"starAriaLabel(star + 1)\"\n (focus)=\"onInputFocus($event, star + 1)\"\n (blur)=\"onInputBlur($event)\"\n (change)=\"onChange($event, star + 1)\"\n [pAutoFocus]=\"autofocus\"\n />\n </span>\n @if (star + 1 <= value) {\n @if (onIconTemplate || _onIconTemplate) {\n <ng-container *ngTemplateOutlet=\"onIconTemplate || _onIconTemplate; context: { $implicit: star + 1, class: cx('onIcon') }\"></ng-container>\n } @else {\n <span [class]=\"cx('onIcon')\" *ngIf=\"iconOnClass\" [ngStyle]=\"iconOnStyle\" [ngClass]=\"iconOnClass\" [attr.data-pc-section]=\"'onIcon'\"></span>\n <svg data-p-icon=\"star-fill\" *ngIf=\"!iconOnClass\" [ngStyle]=\"iconOnStyle\" [class]=\"cx('onIcon')\" [attr.data-pc-section]=\"'onIcon'\" />\n }\n } @else {\n @if (offIconTemplate || _offIconTemplate) {\n <ng-container *ngTemplateOutlet=\"offIconTemplate || _offIconTemplate; context: { $implicit: star + 1, class: cx('offIcon') }\"></ng-container>\n } @else {\n <span [class]=\"cx('offIcon')\" *ngIf=\"iconOffClass\" [ngStyle]=\"iconOffStyle\" [ngClass]=\"iconOffClass\" [attr.data-pc-section]=\"'offIcon'\"></span>\n <svg data-p-icon=\"star\" *ngIf=\"!iconOffClass\" [ngStyle]=\"iconOffStyle\" [class]=\"cx('offIcon')\" [attr.data-pc-section]=\"'offIcon'\" />\n }\n }\n </div>\n </ng-template>\n `,\n providers: [RATING_VALUE_ACCESSOR, RatingStyle],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': \"cx('root')\",\n '[attr.data-pc-name]': \"'rating'\",\n '[attr.data-pc-section]': \"'root'\"\n }\n})\nexport class Rating extends BaseEditableHolder implements OnInit {\n /**\n * When present, changing the value is not possible.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) readonly: boolean | undefined;\n /**\n * Number of stars.\n * @group Props\n */\n @Input({ transform: numberAttribute }) stars: number = 5;\n /**\n * Style class of the on icon.\n * @group Props\n */\n @Input() iconOnClass: string | undefined;\n /**\n * Inline style of the on icon.\n * @group Props\n */\n @Input() iconOnStyle: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the off icon.\n * @group Props\n */\n @Input() iconOffClass: string | undefined;\n /**\n * Inline style of the off icon.\n * @group Props\n */\n @Input() iconOffStyle: { [klass: string]: any } | null | undefined;\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) autofocus: boolean | undefined;\n /**\n * Emitted on value change.\n * @param {RatingRateEvent} value - Custom rate event.\n * @group Emits\n */\n @Output() onRate: EventEmitter<RatingRateEvent> = new EventEmitter<RatingRateEvent>();\n /**\n * Emitted when the rating receives focus.\n * @param {Event} value - Browser event.\n * @group Emits\n */\n @Output() onFocus: EventEmitter<FocusEvent> = new EventEmitter<FocusEvent>();\n /**\n * Emitted when the rating loses focus.\n * @param {Event} value - Browser event.\n * @group Emits\n */\n @Output() onBlur: EventEmitter<FocusEvent> = new EventEmitter<FocusEvent>();\n /**\n * Custom on icon template.\n * @group Templates\n */\n @ContentChild('onicon', { descendants: false }) onIconTemplate: Nullable<TemplateRef<any>>;\n /**\n * Custom off icon template.\n * @group Templates\n */\n @ContentChild('officon', { descendants: false }) offIconTemplate: Nullable<TemplateRef<any>>;\n\n @ContentChildren(PrimeTemplate) templates!: QueryList<PrimeTemplate>;\n\n value: Nullable<number>;\n\n public starsArray: Nullable<number[]>;\n\n isFocusVisibleItem: boolean = true;\n\n focusedOptionIndex = signal<number>(-1);\n\n nameattr: string | undefined;\n\n _componentStyle = inject(RatingStyle);\n\n _onIconTemplate: TemplateRef<any> | undefined;\n\n _offIconTemplate: TemplateRef<any> | undefined;\n\n ngOnInit() {\n super.ngOnInit();\n this.nameattr = this.nameattr || uuid('pn_id_');\n this.starsArray = [];\n for (let i = 0; i < this.stars; i++) {\n this.starsArray[i] = i;\n }\n }\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch (item.getType()) {\n case 'onicon':\n this._onIconTemplate = item.template;\n break;\n\n case 'officon':\n this._offIconTemplate = item.template;\n break;\n }\n });\n }\n\n onOptionClick(event, value) {\n if (!this.readonly && !this.$disabled()) {\n this.onOptionSelect(event, value);\n this.isFocusVisibleItem = false;\n const firstFocusableEl = <any>getFirstFocusableElement(event.currentTarget, '');\n\n firstFocusableEl && focus(firstFocusableEl);\n }\n }\n\n onOptionSelect(event, value) {\n if (!this.readonly && !this.$disabled()) {\n if (this.focusedOptionIndex() === value || value === this.value) {\n this.focusedOptionIndex.set(-1);\n this.updateModel(event, null);\n } else {\n this.focusedOptionIndex.set(value);\n this.updateModel(event, value || null);\n }\n }\n }\n\n onChange(event, value) {\n this.onOptionSelect(event, value);\n this.isFocusVisibleItem = true;\n }\n\n onInputBlur(event) {\n this.focusedOptionIndex.set(-1);\n this.onBlur.emit(event);\n }\n\n onInputFocus(event, value) {\n if (!this.readonly && !this.$disabled()) {\n this.focusedOptionIndex.set(value);\n this.isFocusVisibleItem = event.sourceCapabilities?.firesTouchEvents === false;\n\n this.onFocus.emit(event);\n }\n }\n\n updateModel(event, value) {\n this.writeValue(value);\n this.onModelChange(this.value);\n this.onModelTouched();\n\n this.onRate.emit({\n originalEvent: event,\n value\n });\n }\n\n starAriaLabel(value) {\n return value === 1 ? this.config.translation.aria.star : this.config.translation.aria.stars.replace(/{star}/g, value);\n }\n\n getIconTemplate(i: number): Nullable<TemplateRef<any>> {\n return !this.value || i >= this.value ? this.offIconTemplate || this._offIconTemplate : this.onIconTemplate || this.offIconTemplate;\n }\n\n /**\n * @override\n *\n * @see {@link BaseEditableHolder.writeControlValue}\n * Writes the value to the control.\n */\n writeControlValue(value: any, setModelValue: (value: any) => void): void {\n this.value = value;\n setModelValue(value);\n }\n\n get isCustomIcon(): boolean {\n return !!(this.onIconTemplate || this._onIconTemplate || this.offIconTemplate || this._offIconTemplate);\n }\n}\n\n@NgModule({\n imports: [Rating, SharedModule],\n exports: [Rating, SharedModule]\n})\nexport class RatingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChB,KAAK;;;;;;CAMV;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK;QACpB,UAAU;AACV,QAAA;YACI,YAAY,EAAE,QAAQ,CAAC,QAAQ;AAC/B,YAAA,YAAY,EAAE,QAAQ,CAAC,SAAS;AACnC;AACJ,KAAA;IACD,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK;Q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,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,EAAA,OAAA,EAAA,CAHX,MAAM,EAAE,YAAY,EACZ,YAAY,CAAA,EAAA,CAAA;;2FAErB,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC;AAC/B,oBAAA,OAAO,EAAE,CAAC,MAAM,EAAE,YAAY;AACjC,iBAAA;;;ACnRD;;AAEG;;;;"}
@@ -42,7 +42,7 @@ const classes = {
42
42
  root: ({ instance }) => [
43
43
  'p-select p-component p-inputwrapper',
44
44
  {
45
- 'p-disabled': instance.disabled(),
45
+ 'p-disabled': instance.$disabled(),
46
46
  'p-variant-filled': instance.$variant() === 'filled',
47
47
  'p-focus': instance.focused,
48
48
  'p-invalid': instance.invalid(),
@@ -752,8 +752,6 @@ class Select extends BaseInput {
752
752
  _options = signal(null);
753
753
  _placeholder = signal(undefined);
754
754
  value;
755
- onModelChange = () => { };
756
- onModelTouched = () => { };
757
755
  hover;
758
756
  focused;
759
757
  overlayVisible;
@@ -780,7 +778,7 @@ class Select extends BaseInput {
780
778
  return this.emptyFilterMessage || this.config.getTranslation(TranslationKeys.EMPTY_FILTER_MESSAGE);
781
779
  }
782
780
  get isVisibleClearIcon() {
783
- return this.modelValue() != null && this.hasSelectedOption() && this.showClear && !this.disabled();
781
+ return this.modelValue() != null && this.hasSelectedOption() && this.showClear && !this.$disabled();
784
782
  }
785
783
  get listLabel() {
786
784
  return this.config.getTranslation(TranslationKeys.ARIA)['listLabel'];
@@ -978,16 +976,6 @@ class Select extends BaseInput {
978
976
  this.writeModelValue(value);
979
977
  this.selectedOptionUpdated = true;
980
978
  }
981
- writeValue(value) {
982
- if (this.filter) {
983
- this.resetFilter();
984
- }
985
- this.value = value;
986
- this.allowModelChange() && this.onModelChange(value);
987
- this.writeModelValue(this.value);
988
- this.updateEditableLabel();
989
- this.cd.markForCheck();
990
- }
991
979
  allowModelChange() {
992
980
  return !!this.modelValue() && !this.placeholder() && (this.modelValue() === undefined || this.modelValue() === null) && !this.editable && this.options && this.options.length;
993
981
  }
@@ -1071,14 +1059,8 @@ class Select extends BaseInput {
1071
1059
  this.filterViewChild.nativeElement.value = '';
1072
1060
  }
1073
1061
  }
1074
- registerOnChange(fn) {
1075
- this.onModelChange = fn;
1076
- }
1077
- registerOnTouched(fn) {
1078
- this.onModelTouched = fn;
1079
- }
1080
1062
  onContainerClick(event) {
1081
- if (this.disabled() || this.readonly || this.loading) {
1063
+ if (this.$disabled() || this.readonly || this.loading) {
1082
1064
  return;
1083
1065
  }
1084
1066
  this.focusInputViewChild?.nativeElement.focus({ preventScroll: true });
@@ -1177,7 +1159,7 @@ class Select extends BaseInput {
1177
1159
  this.cd.markForCheck();
1178
1160
  }
1179
1161
  onInputFocus(event) {
1180
- if (this.disabled()) {
1162
+ if (this.$disabled()) {
1181
1163
  // For ScreenReaders
1182
1164
  return;
1183
1165
  }
@@ -1196,7 +1178,7 @@ class Select extends BaseInput {
1196
1178
  this.preventModelTouched = false;
1197
1179
  }
1198
1180
  onKeyDown(event, search = false) {
1199
- if (this.disabled() || this.readonly || this.loading) {
1181
+ if (this.$disabled() || this.readonly || this.loading) {
1200
1182
  return;
1201
1183
  }
1202
1184
  switch (event.code) {
@@ -1569,6 +1551,22 @@ class Select extends BaseInput {
1569
1551
  this.onClear.emit(event);
1570
1552
  this.resetFilter();
1571
1553
  }
1554
+ /**
1555
+ * @override
1556
+ *
1557
+ * @see {@link BaseEditableHolder.writeControlValue}
1558
+ * Writes the value to the control.
1559
+ */
1560
+ writeControlValue(value, setModelValue) {
1561
+ if (this.filter) {
1562
+ this.resetFilter();
1563
+ }
1564
+ this.value = value;
1565
+ this.allowModelChange() && this.onModelChange(value);
1566
+ setModelValue(this.value);
1567
+ this.updateEditableLabel();
1568
+ this.cd.markForCheck();
1569
+ }
1572
1570
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Select, deps: [{ token: i0.NgZone }, { token: i2.FilterService }], target: i0.ɵɵFactoryTarget.Component });
1573
1571
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: Select, isStandalone: true, selector: "p-select", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: false, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: false, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: false, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: false, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: false, isRequired: false, transformFunction: null }, filterLocale: { classPropertyName: "filterLocale", publicName: "filterLocale", isSignal: false, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: false, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: false, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: false, isRequired: false, transformFunction: null }, filterFields: { classPropertyName: "filterFields", publicName: "filterFields", isSignal: false, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, checkmark: { classPropertyName: "checkmark", publicName: "checkmark", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: false, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: false, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: false, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: false, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: false, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: false, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: false, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: false, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: false, isRequired: false, transformFunction: numberAttribute }, virtualScrollOptions: { classPropertyName: "virtualScrollOptions", publicName: "virtualScrollOptions", isSignal: false, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: false, isRequired: false, transformFunction: null }, ariaFilterLabel: { classPropertyName: "ariaFilterLabel", publicName: "ariaFilterLabel", isSignal: false, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: false, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: false, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: false, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: false, isRequired: false, transformFunction: null }, tooltipPositionStyle: { classPropertyName: "tooltipPositionStyle", publicName: "tooltipPositionStyle", isSignal: false, isRequired: false, transformFunction: null }, tooltipStyleClass: { classPropertyName: "tooltipStyleClass", publicName: "tooltipStyleClass", isSignal: false, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, autofocusFilter: { classPropertyName: "autofocusFilter", publicName: "autofocusFilter", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: false, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: false, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange", onFilter: "onFilter", onFocus: "onFocus", onBlur: "onBlur", onClick: "onClick", onShow: "onShow", onHide: "onHide", onClear: "onClear", onLazyLoad: "onLazyLoad" }, host: { listeners: { "click": "onContainerClick($event)" }, properties: { "class": "cn(cx('root'), styleClass)", "attr.id": "id" } }, providers: [SELECT_VALUE_ACCESSOR, SelectStyle], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"] }, { propertyName: "groupTemplate", first: true, predicate: ["group"] }, { propertyName: "loaderTemplate", first: true, predicate: ["loader"] }, { propertyName: "selectedItemTemplate", first: true, predicate: ["selectedItem"] }, { propertyName: "headerTemplate", first: true, predicate: ["header"] }, { propertyName: "filterTemplate", first: true, predicate: ["filter"] }, { propertyName: "footerTemplate", first: true, predicate: ["footer"] }, { propertyName: "emptyFilterTemplate", first: true, predicate: ["emptyfilter"] }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"] }, { propertyName: "dropdownIconTemplate", first: true, predicate: ["dropdownicon"] }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"] }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"] }, { propertyName: "filterIconTemplate", first: true, predicate: ["filtericon"] }, { propertyName: "onIconTemplate", first: true, predicate: ["onicon"] }, { propertyName: "offIconTemplate", first: true, predicate: ["officon"] }, { propertyName: "cancelIconTemplate", first: true, predicate: ["cancelicon"] }, { propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "filterViewChild", first: true, predicate: ["filter"], descendants: true }, { propertyName: "focusInputViewChild", first: true, predicate: ["focusInput"], descendants: true }, { propertyName: "editableInputViewChild", first: true, predicate: ["editableInput"], descendants: true }, { propertyName: "itemsViewChild", first: true, predicate: ["items"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }, { propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true }, { propertyName: "firstHiddenFocusableElementOnOverlay", first: true, predicate: ["firstHiddenFocusableEl"], descendants: true }, { propertyName: "lastHiddenFocusableElementOnOverlay", first: true, predicate: ["lastHiddenFocusableEl"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
1574
1572
  <span
@@ -1579,7 +1577,7 @@ class Select extends BaseInput {
1579
1577
  [tooltipPosition]="tooltipPosition"
1580
1578
  [positionStyle]="tooltipPositionStyle"
1581
1579
  [tooltipStyleClass]="tooltipStyleClass"
1582
- [attr.aria-disabled]="disabled()"
1580
+ [attr.aria-disabled]="$disabled()"
1583
1581
  [attr.id]="inputId"
1584
1582
  role="combobox"
1585
1583
  [attr.aria-label]="ariaLabel || (label() === 'p-emptylabel' ? undefined : label())"
@@ -1587,7 +1585,7 @@ class Select extends BaseInput {
1587
1585
  [attr.aria-haspopup]="'listbox'"
1588
1586
  [attr.aria-expanded]="overlayVisible ?? false"
1589
1587
  [attr.aria-controls]="overlayVisible ? id + '_list' : null"
1590
- [attr.tabindex]="!disabled() ? tabindex : -1"
1588
+ [attr.tabindex]="!$disabled() ? tabindex : -1"
1591
1589
  [pAutoFocus]="autofocus"
1592
1590
  [attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
1593
1591
  (focus)="onInputFocus($event)"
@@ -1595,7 +1593,7 @@ class Select extends BaseInput {
1595
1593
  (keydown)="onKeyDown($event)"
1596
1594
  [attr.aria-required]="required()"
1597
1595
  [attr.required]="required() ? '' : undefined"
1598
- [attr.disabled]="disabled() ? '' : undefined"
1596
+ [attr.disabled]="$disabled() ? '' : undefined"
1599
1597
  >
1600
1598
  <ng-container *ngIf="!selectedItemTemplate && !_selectedItemTemplate; else defaultPlaceholder">{{ label() === 'p-emptylabel' ? '&nbsp;' : label() }}</ng-container>
1601
1599
  <ng-container *ngIf="(selectedItemTemplate || _selectedItemTemplate) && !isSelectedOptionEmpty()" [ngTemplateOutlet]="selectedItemTemplate || _selectedItemTemplate" [ngTemplateOutletContext]="{ $implicit: selectedOption }"></ng-container>
@@ -1609,7 +1607,7 @@ class Select extends BaseInput {
1609
1607
  type="text"
1610
1608
  [attr.id]="inputId"
1611
1609
  [class]="cx('label')"
1612
- aria-haspopup="listbox"
1610
+ [attr.aria-haspopup]="'listbox'"
1613
1611
  [attr.placeholder]="modelValue() === undefined || modelValue() === null ? placeholder() : undefined"
1614
1612
  [attr.aria-label]="ariaLabel || (label() === 'p-emptylabel' ? undefined : label())"
1615
1613
  (input)="onEditableInput($event)"
@@ -1627,7 +1625,7 @@ class Select extends BaseInput {
1627
1625
  [attr.maxlength]="maxlength()"
1628
1626
  [attr.required]="required() ? '' : undefined"
1629
1627
  [attr.readonly]="readonly ? '' : undefined"
1630
- [attr.disabled]="disabled() ? '' : undefined"
1628
+ [attr.disabled]="$disabled() ? '' : undefined"
1631
1629
  />
1632
1630
  <ng-container *ngIf="isVisibleClearIcon">
1633
1631
  <svg data-p-icon="times" [class]="cx('clearIcon')" (click)="clear($event)" *ngIf="!clearIconTemplate && !_clearIconTemplate" [attr.data-pc-section]="'clearicon'" />
@@ -1786,7 +1784,7 @@ class Select extends BaseInput {
1786
1784
  </div>
1787
1785
  </ng-template>
1788
1786
  </p-overlay>
1789
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: SelectItem, selector: "p-selectItem", inputs: ["id", "option", "selected", "focused", "label", "disabled", "visible", "itemSize", "ariaPosInset", "ariaSetSize", "template", "checkmark"], outputs: ["onClick", "onMouseEnter"] }, { kind: "component", type: Overlay, selector: "p-overlay", inputs: ["visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "listener", "responsive", "options", "appendTo", "hostAttrSelector"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: SearchIcon, selector: "[data-p-icon=\"search\"]" }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid"] }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }, { kind: "component", type: Scroller, selector: "p-scroller, p-virtualscroller, p-virtual-scroller, p-virtualScroller", inputs: ["id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "ngmodule", type: SharedModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1787
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: SelectItem, selector: "p-selectItem", inputs: ["id", "option", "selected", "focused", "label", "disabled", "visible", "itemSize", "ariaPosInset", "ariaSetSize", "template", "checkmark"], outputs: ["onClick", "onMouseEnter"] }, { kind: "component", type: Overlay, selector: "p-overlay", inputs: ["visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "listener", "responsive", "options", "appendTo", "hostAttrSelector"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: SearchIcon, selector: "[data-p-icon=\"search\"]" }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }, { kind: "component", type: Scroller, selector: "p-scroller, p-virtualscroller, p-virtual-scroller, p-virtualScroller", inputs: ["id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "ngmodule", type: SharedModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1790
1788
  }
1791
1789
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Select, decorators: [{
1792
1790
  type: Component,
@@ -1803,7 +1801,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
1803
1801
  [tooltipPosition]="tooltipPosition"
1804
1802
  [positionStyle]="tooltipPositionStyle"
1805
1803
  [tooltipStyleClass]="tooltipStyleClass"
1806
- [attr.aria-disabled]="disabled()"
1804
+ [attr.aria-disabled]="$disabled()"
1807
1805
  [attr.id]="inputId"
1808
1806
  role="combobox"
1809
1807
  [attr.aria-label]="ariaLabel || (label() === 'p-emptylabel' ? undefined : label())"
@@ -1811,7 +1809,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
1811
1809
  [attr.aria-haspopup]="'listbox'"
1812
1810
  [attr.aria-expanded]="overlayVisible ?? false"
1813
1811
  [attr.aria-controls]="overlayVisible ? id + '_list' : null"
1814
- [attr.tabindex]="!disabled() ? tabindex : -1"
1812
+ [attr.tabindex]="!$disabled() ? tabindex : -1"
1815
1813
  [pAutoFocus]="autofocus"
1816
1814
  [attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
1817
1815
  (focus)="onInputFocus($event)"
@@ -1819,7 +1817,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
1819
1817
  (keydown)="onKeyDown($event)"
1820
1818
  [attr.aria-required]="required()"
1821
1819
  [attr.required]="required() ? '' : undefined"
1822
- [attr.disabled]="disabled() ? '' : undefined"
1820
+ [attr.disabled]="$disabled() ? '' : undefined"
1823
1821
  >
1824
1822
  <ng-container *ngIf="!selectedItemTemplate && !_selectedItemTemplate; else defaultPlaceholder">{{ label() === 'p-emptylabel' ? '&nbsp;' : label() }}</ng-container>
1825
1823
  <ng-container *ngIf="(selectedItemTemplate || _selectedItemTemplate) && !isSelectedOptionEmpty()" [ngTemplateOutlet]="selectedItemTemplate || _selectedItemTemplate" [ngTemplateOutletContext]="{ $implicit: selectedOption }"></ng-container>
@@ -1833,7 +1831,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
1833
1831
  type="text"
1834
1832
  [attr.id]="inputId"
1835
1833
  [class]="cx('label')"
1836
- aria-haspopup="listbox"
1834
+ [attr.aria-haspopup]="'listbox'"
1837
1835
  [attr.placeholder]="modelValue() === undefined || modelValue() === null ? placeholder() : undefined"
1838
1836
  [attr.aria-label]="ariaLabel || (label() === 'p-emptylabel' ? undefined : label())"
1839
1837
  (input)="onEditableInput($event)"
@@ -1851,7 +1849,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
1851
1849
  [attr.maxlength]="maxlength()"
1852
1850
  [attr.required]="required() ? '' : undefined"
1853
1851
  [attr.readonly]="readonly ? '' : undefined"
1854
- [attr.disabled]="disabled() ? '' : undefined"
1852
+ [attr.disabled]="$disabled() ? '' : undefined"
1855
1853
  />
1856
1854
  <ng-container *ngIf="isVisibleClearIcon">
1857
1855
  <svg data-p-icon="times" [class]="cx('clearIcon')" (click)="clear($event)" *ngIf="!clearIconTemplate && !_clearIconTemplate" [attr.data-pc-section]="'clearicon'" />