@anguless/angulux 22.4.0 → 22.5.1

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 (188) hide show
  1. package/fesm2022/anguless-angulux-api.mjs +22 -22
  2. package/fesm2022/anguless-angulux-autofocus.mjs +7 -7
  3. package/fesm2022/anguless-angulux-avatar.mjs +10 -10
  4. package/fesm2022/anguless-angulux-avatargroup.mjs +10 -10
  5. package/fesm2022/anguless-angulux-badge.mjs +13 -13
  6. package/fesm2022/anguless-angulux-base.mjs +3 -3
  7. package/fesm2022/anguless-angulux-basecomponent.mjs +13 -11
  8. package/fesm2022/anguless-angulux-basecomponent.mjs.map +1 -1
  9. package/fesm2022/anguless-angulux-baseeditableholder.mjs +20 -14
  10. package/fesm2022/anguless-angulux-baseeditableholder.mjs.map +1 -1
  11. package/fesm2022/anguless-angulux-baseinput.mjs +3 -3
  12. package/fesm2022/anguless-angulux-basemodelholder.mjs +104 -4
  13. package/fesm2022/anguless-angulux-basemodelholder.mjs.map +1 -1
  14. package/fesm2022/anguless-angulux-bind.mjs +34 -16
  15. package/fesm2022/anguless-angulux-bind.mjs.map +1 -1
  16. package/fesm2022/anguless-angulux-button.mjs +19 -19
  17. package/fesm2022/anguless-angulux-card.mjs +10 -10
  18. package/fesm2022/anguless-angulux-chart.mjs +10 -10
  19. package/fesm2022/anguless-angulux-checkbox.mjs +12 -12
  20. package/fesm2022/anguless-angulux-checkbox.mjs.map +1 -1
  21. package/fesm2022/anguless-angulux-chip.mjs +10 -10
  22. package/fesm2022/anguless-angulux-colorpicker.mjs +10 -10
  23. package/fesm2022/anguless-angulux-config.mjs +6 -6
  24. package/fesm2022/anguless-angulux-confirmdialog.mjs +10 -10
  25. package/fesm2022/anguless-angulux-datepicker.mjs +14 -14
  26. package/fesm2022/anguless-angulux-datepicker.mjs.map +1 -1
  27. package/fesm2022/anguless-angulux-dialog.mjs +10 -10
  28. package/fesm2022/anguless-angulux-divider.mjs +10 -10
  29. package/fesm2022/anguless-angulux-drawer.mjs +10 -10
  30. package/fesm2022/anguless-angulux-fileupload.mjs +13 -13
  31. package/fesm2022/anguless-angulux-fluid.mjs +10 -10
  32. package/fesm2022/anguless-angulux-focustrap.mjs +7 -7
  33. package/fesm2022/anguless-angulux-iconfield.mjs +10 -10
  34. package/fesm2022/anguless-angulux-icons-angledoubledown.mjs +3 -3
  35. package/fesm2022/anguless-angulux-icons-angledoubleleft.mjs +3 -3
  36. package/fesm2022/anguless-angulux-icons-angledoubleright.mjs +3 -3
  37. package/fesm2022/anguless-angulux-icons-angledoubleup.mjs +3 -3
  38. package/fesm2022/anguless-angulux-icons-angledown.mjs +3 -3
  39. package/fesm2022/anguless-angulux-icons-angleleft.mjs +3 -3
  40. package/fesm2022/anguless-angulux-icons-angleright.mjs +3 -3
  41. package/fesm2022/anguless-angulux-icons-angleup.mjs +3 -3
  42. package/fesm2022/anguless-angulux-icons-arrowdown.mjs +3 -3
  43. package/fesm2022/anguless-angulux-icons-arrowdownleft.mjs +3 -3
  44. package/fesm2022/anguless-angulux-icons-arrowdownright.mjs +3 -3
  45. package/fesm2022/anguless-angulux-icons-arrowleft.mjs +3 -3
  46. package/fesm2022/anguless-angulux-icons-arrowright.mjs +3 -3
  47. package/fesm2022/anguless-angulux-icons-arrowup.mjs +3 -3
  48. package/fesm2022/anguless-angulux-icons-ban.mjs +3 -3
  49. package/fesm2022/anguless-angulux-icons-bars.mjs +3 -3
  50. package/fesm2022/anguless-angulux-icons-baseicon.mjs +6 -6
  51. package/fesm2022/anguless-angulux-icons-blank.mjs +3 -3
  52. package/fesm2022/anguless-angulux-icons-calendar.mjs +3 -3
  53. package/fesm2022/anguless-angulux-icons-caretleft.mjs +3 -3
  54. package/fesm2022/anguless-angulux-icons-caretright.mjs +3 -3
  55. package/fesm2022/anguless-angulux-icons-check.mjs +3 -3
  56. package/fesm2022/anguless-angulux-icons-chevrondown.mjs +3 -3
  57. package/fesm2022/anguless-angulux-icons-chevronleft.mjs +3 -3
  58. package/fesm2022/anguless-angulux-icons-chevronright.mjs +3 -3
  59. package/fesm2022/anguless-angulux-icons-chevronup.mjs +3 -3
  60. package/fesm2022/anguless-angulux-icons-exclamationtriangle.mjs +3 -3
  61. package/fesm2022/anguless-angulux-icons-eye.mjs +3 -3
  62. package/fesm2022/anguless-angulux-icons-eyeslash.mjs +3 -3
  63. package/fesm2022/anguless-angulux-icons-filter.mjs +3 -3
  64. package/fesm2022/anguless-angulux-icons-filterfill.mjs +3 -3
  65. package/fesm2022/anguless-angulux-icons-filterslash.mjs +3 -3
  66. package/fesm2022/anguless-angulux-icons-home.mjs +3 -3
  67. package/fesm2022/anguless-angulux-icons-infocircle.mjs +3 -3
  68. package/fesm2022/anguless-angulux-icons-minus.mjs +3 -3
  69. package/fesm2022/anguless-angulux-icons-pencil.mjs +3 -3
  70. package/fesm2022/anguless-angulux-icons-plus.mjs +3 -3
  71. package/fesm2022/anguless-angulux-icons-refresh.mjs +3 -3
  72. package/fesm2022/anguless-angulux-icons-search.mjs +3 -3
  73. package/fesm2022/anguless-angulux-icons-searchminus.mjs +3 -3
  74. package/fesm2022/anguless-angulux-icons-searchplus.mjs +3 -3
  75. package/fesm2022/anguless-angulux-icons-sortalt.mjs +3 -3
  76. package/fesm2022/anguless-angulux-icons-sortamountdown.mjs +3 -3
  77. package/fesm2022/anguless-angulux-icons-sortamountupalt.mjs +3 -3
  78. package/fesm2022/anguless-angulux-icons-spinner.mjs +3 -3
  79. package/fesm2022/anguless-angulux-icons-star.mjs +3 -3
  80. package/fesm2022/anguless-angulux-icons-starfill.mjs +3 -3
  81. package/fesm2022/anguless-angulux-icons-thlarge.mjs +3 -3
  82. package/fesm2022/anguless-angulux-icons-times.mjs +3 -3
  83. package/fesm2022/anguless-angulux-icons-timescircle.mjs +3 -3
  84. package/fesm2022/anguless-angulux-icons-trash.mjs +3 -3
  85. package/fesm2022/anguless-angulux-icons-undo.mjs +3 -3
  86. package/fesm2022/anguless-angulux-icons-upload.mjs +3 -3
  87. package/fesm2022/anguless-angulux-icons-windowmaximize.mjs +3 -3
  88. package/fesm2022/anguless-angulux-icons-windowminimize.mjs +3 -3
  89. package/fesm2022/anguless-angulux-iftalabel.mjs +10 -10
  90. package/fesm2022/anguless-angulux-inputicon.mjs +10 -10
  91. package/fesm2022/anguless-angulux-inputnumber.mjs +12 -12
  92. package/fesm2022/anguless-angulux-inputnumber.mjs.map +1 -1
  93. package/fesm2022/anguless-angulux-inputtext.mjs +15 -19
  94. package/fesm2022/anguless-angulux-inputtext.mjs.map +1 -1
  95. package/fesm2022/anguless-angulux-menu.mjs +16 -16
  96. package/fesm2022/anguless-angulux-message.mjs +10 -10
  97. package/fesm2022/anguless-angulux-motion.mjs +13 -13
  98. package/fesm2022/anguless-angulux-multiselect.mjs +15 -15
  99. package/fesm2022/anguless-angulux-multiselect.mjs.map +1 -1
  100. package/fesm2022/anguless-angulux-overlay.mjs +10 -10
  101. package/fesm2022/anguless-angulux-paginator.mjs +10 -10
  102. package/fesm2022/anguless-angulux-password.mjs +19 -18
  103. package/fesm2022/anguless-angulux-password.mjs.map +1 -1
  104. package/fesm2022/anguless-angulux-popover.mjs +10 -10
  105. package/fesm2022/anguless-angulux-progressbar.mjs +10 -10
  106. package/fesm2022/anguless-angulux-progressspinner.mjs +10 -10
  107. package/fesm2022/anguless-angulux-radiobutton.mjs +15 -15
  108. package/fesm2022/anguless-angulux-radiobutton.mjs.map +1 -1
  109. package/fesm2022/anguless-angulux-ripple.mjs +10 -10
  110. package/fesm2022/anguless-angulux-scroller.mjs +10 -10
  111. package/fesm2022/anguless-angulux-select.mjs +19 -19
  112. package/fesm2022/anguless-angulux-select.mjs.map +1 -1
  113. package/fesm2022/anguless-angulux-selectbutton.mjs +10 -10
  114. package/fesm2022/anguless-angulux-skeleton.mjs +10 -10
  115. package/fesm2022/anguless-angulux-splitbutton.mjs +10 -10
  116. package/fesm2022/anguless-angulux-table.mjs +85 -85
  117. package/fesm2022/anguless-angulux-tabs.mjs +34 -34
  118. package/fesm2022/anguless-angulux-tag.mjs +10 -10
  119. package/fesm2022/anguless-angulux-textarea.mjs +15 -19
  120. package/fesm2022/anguless-angulux-textarea.mjs.map +1 -1
  121. package/fesm2022/anguless-angulux-tieredmenu.mjs +13 -13
  122. package/fesm2022/anguless-angulux-timeline.mjs +10 -10
  123. package/fesm2022/anguless-angulux-toast.mjs +13 -13
  124. package/fesm2022/anguless-angulux-togglebutton.mjs +10 -10
  125. package/fesm2022/anguless-angulux-toggleswitch.mjs +12 -12
  126. package/fesm2022/anguless-angulux-toggleswitch.mjs.map +1 -1
  127. package/fesm2022/anguless-angulux-tooltip.mjs +10 -10
  128. package/fesm2022/anguless-angulux-treetable.mjs +58 -58
  129. package/fesm2022/anguless-angulux-usestyle.mjs +3 -3
  130. package/package.json +1 -1
  131. package/types/anguless-angulux-api.d.ts +6 -6
  132. package/types/anguless-angulux-avatar.d.ts +1 -1
  133. package/types/anguless-angulux-avatargroup.d.ts +1 -1
  134. package/types/anguless-angulux-badge.d.ts +1 -1
  135. package/types/anguless-angulux-base.d.ts +1 -1
  136. package/types/anguless-angulux-basecomponent.d.ts +8 -6
  137. package/types/anguless-angulux-baseeditableholder.d.ts +15 -3
  138. package/types/anguless-angulux-basemodelholder.d.ts +47 -0
  139. package/types/anguless-angulux-bind.d.ts +10 -5
  140. package/types/anguless-angulux-button.d.ts +1 -1
  141. package/types/anguless-angulux-card.d.ts +1 -1
  142. package/types/anguless-angulux-chart.d.ts +1 -1
  143. package/types/anguless-angulux-checkbox.d.ts +1 -1
  144. package/types/anguless-angulux-chip.d.ts +1 -1
  145. package/types/anguless-angulux-colorpicker.d.ts +1 -1
  146. package/types/anguless-angulux-config.d.ts +2 -2
  147. package/types/anguless-angulux-confirmdialog.d.ts +1 -1
  148. package/types/anguless-angulux-datepicker.d.ts +1 -1
  149. package/types/anguless-angulux-dialog.d.ts +1 -1
  150. package/types/anguless-angulux-divider.d.ts +1 -1
  151. package/types/anguless-angulux-drawer.d.ts +1 -1
  152. package/types/anguless-angulux-fileupload.d.ts +1 -1
  153. package/types/anguless-angulux-fluid.d.ts +1 -1
  154. package/types/anguless-angulux-iconfield.d.ts +1 -1
  155. package/types/anguless-angulux-icons-baseicon.d.ts +1 -1
  156. package/types/anguless-angulux-iftalabel.d.ts +1 -1
  157. package/types/anguless-angulux-inputicon.d.ts +1 -1
  158. package/types/anguless-angulux-inputnumber.d.ts +1 -1
  159. package/types/anguless-angulux-inputtext.d.ts +4 -2
  160. package/types/anguless-angulux-menu.d.ts +1 -1
  161. package/types/anguless-angulux-message.d.ts +1 -1
  162. package/types/anguless-angulux-motion.d.ts +1 -1
  163. package/types/anguless-angulux-multiselect.d.ts +1 -1
  164. package/types/anguless-angulux-overlay.d.ts +1 -1
  165. package/types/anguless-angulux-paginator.d.ts +1 -1
  166. package/types/anguless-angulux-password.d.ts +1 -1
  167. package/types/anguless-angulux-popover.d.ts +1 -1
  168. package/types/anguless-angulux-progressbar.d.ts +1 -1
  169. package/types/anguless-angulux-progressspinner.d.ts +1 -1
  170. package/types/anguless-angulux-radiobutton.d.ts +2 -2
  171. package/types/anguless-angulux-ripple.d.ts +1 -1
  172. package/types/anguless-angulux-scroller.d.ts +1 -1
  173. package/types/anguless-angulux-select.d.ts +1 -1
  174. package/types/anguless-angulux-selectbutton.d.ts +1 -1
  175. package/types/anguless-angulux-skeleton.d.ts +1 -1
  176. package/types/anguless-angulux-splitbutton.d.ts +1 -1
  177. package/types/anguless-angulux-table.d.ts +2 -2
  178. package/types/anguless-angulux-tabs.d.ts +5 -5
  179. package/types/anguless-angulux-tag.d.ts +1 -1
  180. package/types/anguless-angulux-textarea.d.ts +4 -2
  181. package/types/anguless-angulux-tieredmenu.d.ts +1 -1
  182. package/types/anguless-angulux-timeline.d.ts +1 -1
  183. package/types/anguless-angulux-toast.d.ts +1 -1
  184. package/types/anguless-angulux-togglebutton.d.ts +1 -1
  185. package/types/anguless-angulux-toggleswitch.d.ts +1 -1
  186. package/types/anguless-angulux-tooltip.d.ts +1 -1
  187. package/types/anguless-angulux-treetable.d.ts +2 -2
  188. package/types/anguless-angulux-usestyle.d.ts +1 -1
@@ -15,13 +15,17 @@ function interactionState(value) {
15
15
  }
16
16
  class BaseEditableHolder extends BaseModelHolder {
17
17
  /**
18
- * There must be a value (if set).
18
+ * There must be a value (if set). Left unbound, a control bound through `formControlName`,
19
+ * `[formControl]` or `ngModel` is required when that control carries `Validators.required`
20
+ * or `Validators.requiredTrue`.
19
21
  * @defaultValue false
20
22
  * @group Props
21
23
  */
22
24
  required = input(undefined, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
23
25
  /**
24
- * When present, it specifies that the component should have invalid state style.
26
+ * When present, it specifies that the component should have invalid state style. Left
27
+ * unbound, a control bound through `formControlName`, `[formControl]` or `ngModel` shows the
28
+ * state of that control once it is touched or dirty.
25
29
  * @defaultValue false
26
30
  * @group Props
27
31
  */
@@ -60,17 +64,19 @@ class BaseEditableHolder extends BaseModelHolder {
60
64
  ...(ngDevMode ? [{ debugName: "$disabled" }] : /* istanbul ignore next */ []));
61
65
  /**
62
66
  * Whether the invalid state is shown: `invalid`, held back until the control is touched or
63
- * dirty when the form layer reports either. The style and `aria-invalid` both read this.
67
+ * dirty when the form layer reports either; with `invalid` unbound, the bound forms control
68
+ * decides (see `showsInvalid`). The style and `aria-invalid` both read this.
64
69
  */
65
- $invalid = computed(() => {
66
- if (!this.invalid()) {
67
- return false;
68
- }
69
- const touched = this.touched();
70
- const dirty = this.dirty();
71
- return (touched === undefined && dirty === undefined) || !!touched || !!dirty;
72
- }, /* @ts-ignore */
70
+ $invalid = computed(() => this.showsInvalid(this.invalid(), this.touched(), this.dirty()), /* @ts-ignore */
73
71
  ...(ngDevMode ? [{ debugName: "$invalid" }] : /* istanbul ignore next */ []));
72
+ /**
73
+ * Whether the control is announced as required: `required` when bound, else `true` when the
74
+ * bound forms control requires a value, else `undefined` — so an element that says nothing
75
+ * about it still renders no `aria-required`. The `required` and `aria-required` attributes
76
+ * read this.
77
+ */
78
+ $required = computed(() => this.required() ?? (this.$ngControlState()?.required ? true : undefined), /* @ts-ignore */
79
+ ...(ngDevMode ? [{ debugName: "$required" }] : /* istanbul ignore next */ []));
74
80
  onModelChange = () => { };
75
81
  onModelTouched = () => { };
76
82
  writeDisabledState(value) {
@@ -93,10 +99,10 @@ class BaseEditableHolder extends BaseModelHolder {
93
99
  this.writeDisabledState(val);
94
100
  this.cd.markForCheck();
95
101
  }
96
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BaseEditableHolder, deps: null, target: i0.ɵɵFactoryTarget.Directive });
97
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.1", type: BaseEditableHolder, isStandalone: true, inputs: { required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
102
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: BaseEditableHolder, deps: null, target: i0.ɵɵFactoryTarget.Directive });
103
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.2", type: BaseEditableHolder, isStandalone: true, inputs: { required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
98
104
  }
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BaseEditableHolder, decorators: [{
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: BaseEditableHolder, decorators: [{
100
106
  type: Directive,
101
107
  args: [{ standalone: true }]
102
108
  }], propDecorators: { required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"anguless-angulux-baseeditableholder.mjs","sources":["../../src/baseeditableholder/baseeditableholder.ts","../../src/baseeditableholder/anguless-angulux-baseeditableholder.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, input, signal } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { BaseModelHolder } from '@anguless/angulux/basemodelholder';\n\n/**\n * `booleanAttribute`, except that \"not set\" — `undefined` or `null` — stays `undefined` instead\n * of becoming `false`.\n *\n * `touched` and `dirty` need that third state. It is what tells a form layer that reports\n * neither — Reactive Forms, ngModel, a bare `[invalid]` binding — apart from one that reports\n * \"not yet\", and only the second may hold the invalid style back.\n */\nfunction interactionState(value: unknown): boolean | undefined {\n return value === null || value === undefined ? undefined : booleanAttribute(value);\n}\n\n@Directive({ standalone: true })\nexport class BaseEditableHolder<PT = any> extends BaseModelHolder<PT> implements ControlValueAccessor {\n /**\n * There must be a value (if set).\n * @defaultValue false\n * @group Props\n */\n required = input(undefined, { transform: booleanAttribute });\n /**\n * When present, it specifies that the component should have invalid state style.\n * @defaultValue false\n * @group Props\n */\n invalid = input(undefined, { transform: booleanAttribute });\n /**\n * Whether the user has visited the control. Once this or `dirty` is set, the invalid state\n * style waits for interaction: it appears when the control is touched or dirty. Signal Forms'\n * `[formField]` sets both, so an untouched required field is not shown as invalid. Leave both\n * unset and `invalid` alone decides.\n * @defaultValue undefined\n * @group Props\n */\n touched = input<boolean | undefined, unknown>(undefined, { transform: interactionState });\n /**\n * Whether the user has changed the value. See `touched`.\n * @defaultValue undefined\n * @group Props\n */\n dirty = input<boolean | undefined, unknown>(undefined, { transform: interactionState });\n /**\n * When present, it specifies that the component should have disabled state style.\n * @defaultValue false\n * @group Props\n */\n disabled = input(undefined, { transform: booleanAttribute });\n /**\n * When present, it specifies that the name of the input.\n * @defaultValue undefined\n * @group Props\n */\n name = input<string | undefined>();\n\n _disabled = signal<boolean>(false);\n\n $disabled = computed(() => this.disabled() || this._disabled());\n\n /**\n * Whether the invalid state is shown: `invalid`, held back until the control is touched or\n * dirty when the form layer reports either. The style and `aria-invalid` both read this.\n */\n $invalid = computed(() => {\n if (!this.invalid()) {\n return false;\n }\n\n const touched = this.touched();\n const dirty = this.dirty();\n\n return (touched === undefined && dirty === undefined) || !!touched || !!dirty;\n });\n\n onModelChange: Function = () => {};\n\n onModelTouched: Function = () => {};\n\n writeDisabledState(value: boolean) {\n this._disabled.set(value);\n }\n\n writeControlValue(value: any, setModelValue?: (value: any) => void) {\n // NOOP - this method should be overridden in the derived classes\n }\n\n /**** Angular ControlValueAccessors ****/\n writeValue(value: any) {\n this.writeControlValue(value, this.writeModelValue.bind(this));\n }\n\n registerOnChange(fn: Function) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function) {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val: boolean) {\n this.writeDisabledState(val);\n this.cd.markForCheck();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAIA;;;;;;;AAOG;AACH,SAAS,gBAAgB,CAAC,KAAc,EAAA;AACpC,IAAA,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,GAAG,SAAS,GAAG,gBAAgB,CAAC,KAAK,CAAC;AACtF;AAGM,MAAO,kBAA6B,SAAQ,eAAmB,CAAA;AACjE;;;;AAIG;IACH,QAAQ,GAAG,KAAK,CAAC,SAAS,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC5D;;;;AAIG;IACH,OAAO,GAAG,KAAK,CAAC,SAAS,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC3D;;;;;;;AAOG;IACH,OAAO,GAAG,KAAK,CAA+B,SAAS,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACzF;;;;AAIG;IACH,KAAK,GAAG,KAAK,CAA+B,SAAS,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACvF;;;;AAIG;IACH,QAAQ,GAAG,KAAK,CAAC,SAAS,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC5D;;;;AAIG;AACH,IAAA,IAAI,GAAG,KAAK;wFAAsB;IAElC,SAAS,GAAG,MAAM,CAAU,KAAK;kFAAC;AAElC,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,SAAS,EAAE;kFAAC;AAE/D;;;AAGG;AACH,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAK;AACrB,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE;AACjB,YAAA,OAAO,KAAK;QAChB;AAEA,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAC9B,QAAA,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AAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,SAAS;mBAAC,EAAE,UAAU,EAAE,IAAI,EAAE;;;AChB/B;;AAEG;;;;"}
1
+ {"version":3,"file":"anguless-angulux-baseeditableholder.mjs","sources":["../../src/baseeditableholder/baseeditableholder.ts","../../src/baseeditableholder/anguless-angulux-baseeditableholder.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, input, signal } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { BaseModelHolder } from '@anguless/angulux/basemodelholder';\n\n/**\n * `booleanAttribute`, except that \"not set\" — `undefined` or `null` — stays `undefined` instead\n * of becoming `false`.\n *\n * `touched` and `dirty` need that third state. It is what tells a form layer that reports\n * neither — Reactive Forms, ngModel, a bare `[invalid]` binding — apart from one that reports\n * \"not yet\", and only the second may hold the invalid style back.\n */\nfunction interactionState(value: unknown): boolean | undefined {\n return value === null || value === undefined ? undefined : booleanAttribute(value);\n}\n\n@Directive({ standalone: true })\nexport class BaseEditableHolder<PT = any> extends BaseModelHolder<PT> implements ControlValueAccessor {\n /**\n * There must be a value (if set). Left unbound, a control bound through `formControlName`,\n * `[formControl]` or `ngModel` is required when that control carries `Validators.required`\n * or `Validators.requiredTrue`.\n * @defaultValue false\n * @group Props\n */\n required = input(undefined, { transform: booleanAttribute });\n /**\n * When present, it specifies that the component should have invalid state style. Left\n * unbound, a control bound through `formControlName`, `[formControl]` or `ngModel` shows the\n * state of that control once it is touched or dirty.\n * @defaultValue false\n * @group Props\n */\n invalid = input(undefined, { transform: booleanAttribute });\n /**\n * Whether the user has visited the control. Once this or `dirty` is set, the invalid state\n * style waits for interaction: it appears when the control is touched or dirty. Signal Forms'\n * `[formField]` sets both, so an untouched required field is not shown as invalid. Leave both\n * unset and `invalid` alone decides.\n * @defaultValue undefined\n * @group Props\n */\n touched = input<boolean | undefined, unknown>(undefined, { transform: interactionState });\n /**\n * Whether the user has changed the value. See `touched`.\n * @defaultValue undefined\n * @group Props\n */\n dirty = input<boolean | undefined, unknown>(undefined, { transform: interactionState });\n /**\n * When present, it specifies that the component should have disabled state style.\n * @defaultValue false\n * @group Props\n */\n disabled = input(undefined, { transform: booleanAttribute });\n /**\n * When present, it specifies that the name of the input.\n * @defaultValue undefined\n * @group Props\n */\n name = input<string | undefined>();\n\n _disabled = signal<boolean>(false);\n\n $disabled = computed(() => this.disabled() || this._disabled());\n\n /**\n * Whether the invalid state is shown: `invalid`, held back until the control is touched or\n * dirty when the form layer reports either; with `invalid` unbound, the bound forms control\n * decides (see `showsInvalid`). The style and `aria-invalid` both read this.\n */\n $invalid = computed(() => this.showsInvalid(this.invalid(), this.touched(), this.dirty()));\n\n /**\n * Whether the control is announced as required: `required` when bound, else `true` when the\n * bound forms control requires a value, else `undefined` — so an element that says nothing\n * about it still renders no `aria-required`. The `required` and `aria-required` attributes\n * read this.\n */\n $required = computed(() => this.required() ?? (this.$ngControlState()?.required ? true : undefined));\n\n onModelChange: Function = () => {};\n\n onModelTouched: Function = () => {};\n\n writeDisabledState(value: boolean) {\n this._disabled.set(value);\n }\n\n writeControlValue(value: any, setModelValue?: (value: any) => void) {\n // NOOP - this method should be overridden in the derived classes\n }\n\n /**** Angular ControlValueAccessors ****/\n writeValue(value: any) {\n this.writeControlValue(value, this.writeModelValue.bind(this));\n }\n\n registerOnChange(fn: Function) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function) {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val: boolean) {\n this.writeDisabledState(val);\n this.cd.markForCheck();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAIA;;;;;;;AAOG;AACH,SAAS,gBAAgB,CAAC,KAAc,EAAA;AACpC,IAAA,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,GAAG,SAAS,GAAG,gBAAgB,CAAC,KAAK,CAAC;AACtF;AAGM,MAAO,kBAA6B,SAAQ,eAAmB,CAAA;AACjE;;;;;;AAMG;IACH,QAAQ,GAAG,KAAK,CAAC,SAAS,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC5D;;;;;;AAMG;IACH,OAAO,GAAG,KAAK,CAAC,SAAS,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC3D;;;;;;;AAOG;IACH,OAAO,GAAG,KAAK,CAA+B,SAAS,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACzF;;;;AAIG;IACH,KAAK,GAAG,KAAK,CAA+B,SAAS,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACvF;;;;AAIG;IACH,QAAQ,GAAG,KAAK,CAAC,SAAS,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAA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B/B;;AAEG;;;;"}
@@ -108,10 +108,10 @@ class BaseInput extends BaseEditableHolder {
108
108
  get hasFluid() {
109
109
  return this.fluid() ?? !!this.pcFluid;
110
110
  }
111
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BaseInput, deps: null, target: i0.ɵɵFactoryTarget.Directive });
112
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.1", type: BaseInput, isStandalone: true, inputs: { fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, inputSize: { classPropertyName: "inputSize", publicName: "inputSize", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, minlength: { classPropertyName: "minlength", publicName: "minlength", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
111
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: BaseInput, deps: null, target: i0.ɵɵFactoryTarget.Directive });
112
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.2", type: BaseInput, isStandalone: true, inputs: { fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, inputSize: { classPropertyName: "inputSize", publicName: "inputSize", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, minlength: { classPropertyName: "minlength", publicName: "minlength", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
113
113
  }
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BaseInput, decorators: [{
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: BaseInput, decorators: [{
115
115
  type: Directive,
116
116
  args: [{ standalone: true }]
117
117
  }], propDecorators: { fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], inputSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputSize", required: false }] }], pattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "pattern", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], minlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minlength", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }] } });
@@ -1,20 +1,120 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, computed, Directive } from '@angular/core';
2
+ import { signal, computed, effect, untracked, Directive } from '@angular/core';
3
+ import { Validators, NgControl, AbstractControl } from '@angular/forms';
3
4
  import { isNotEmpty } from '@anguless/angulux-utils';
4
5
  import { BaseComponent } from '@anguless/angulux/basecomponent';
5
6
 
7
+ const sameNgControlState = (a, b) => a === b || (!!a && !!b && a.invalid === b.invalid && a.touched === b.touched && a.dirty === b.dirty && a.required === b.required);
8
+ const readNgControlState = (control) => ({
9
+ invalid: control.invalid,
10
+ touched: control.touched,
11
+ dirty: control.dirty,
12
+ required: control.hasValidator(Validators.required) || control.hasValidator(Validators.requiredTrue)
13
+ });
6
14
  class BaseModelHolder extends BaseComponent {
7
15
  modelValue = signal(undefined, /* @ts-ignore */
8
16
  ...(ngDevMode ? [{ debugName: "modelValue" }] : /* istanbul ignore next */ []));
9
17
  $filled = computed(() => isNotEmpty(this.modelValue()), /* @ts-ignore */
10
18
  ...(ngDevMode ? [{ debugName: "$filled" }] : /* istanbul ignore next */ []));
19
+ /**
20
+ * What the Angular forms control bound to this element reports about itself — through
21
+ * `formControlName`, `[formControl]` or `ngModel` — or `null` when there is none. Signal Forms'
22
+ * `[formField]` does not count: it writes the state into the inputs instead.
23
+ *
24
+ * Kept current from the control's `events`, not read in a template: Angular reads `invalid`,
25
+ * `touched` and `dirty` untracked, so a change made in code (`markAllAsTouched()`, `reset()`, a
26
+ * validator added at run time) would otherwise reach the view only when something else
27
+ * refreshed it, which without zone.js may be never.
28
+ */
29
+ $ngControlState = signal(null, { ...(ngDevMode ? { debugName: "$ngControlState" } : /* istanbul ignore next */ {}), equal: sameNgControlState });
30
+ _ngControl;
31
+ _ngControlBound = null;
32
+ _ngControlEvents;
11
33
  writeModelValue(value) {
12
34
  this.modelValue.set(value);
13
35
  }
14
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BaseModelHolder, deps: null, target: i0.ɵɵFactoryTarget.Directive });
15
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.1", type: BaseModelHolder, isStandalone: true, usesInheritance: true, ngImport: i0 });
36
+ /**
37
+ * Whether a control shows its invalid state — the style and `aria-invalid` both follow it.
38
+ *
39
+ * With `invalid` bound, as before: `invalid`, held back until the control is touched or dirty
40
+ * when the form layer reports either. With `invalid` left unbound, the bound forms control
41
+ * decides by the same rule, `invalid && (touched || dirty)`, which is when an error message
42
+ * gated the usual way appears. The two paths never mix: a bound `invalid`, even `false`, wins.
43
+ */
44
+ showsInvalid(invalid, touched, dirty) {
45
+ if (invalid === undefined) {
46
+ const state = this.$ngControlState();
47
+ return !!state && state.invalid && (state.touched || state.dirty);
48
+ }
49
+ if (!invalid) {
50
+ return false;
51
+ }
52
+ return (touched === undefined && dirty === undefined) || !!touched || !!dirty;
53
+ }
54
+ /**
55
+ * For a directive on a native form element (`aglInputText`, `aglTextarea`): puts
56
+ * `aria-required="true"` on the element while the bound forms control requires a value, so a
57
+ * screen reader announces what a label's asterisk shows. It removes only what it wrote, so an
58
+ * `aria-required` set on the element by hand is left alone. Call it from the constructor.
59
+ */
60
+ reflectNgControlRequired() {
61
+ let owned = false;
62
+ effect(() => {
63
+ const required = !!this.$ngControlState()?.required;
64
+ const element = this.el.nativeElement;
65
+ if (required && !element.hasAttribute('aria-required')) {
66
+ this.renderer.setAttribute(element, 'aria-required', 'true');
67
+ owned = true;
68
+ }
69
+ else if (!required && owned) {
70
+ this.renderer.removeAttribute(element, 'aria-required');
71
+ owned = false;
72
+ }
73
+ });
74
+ }
75
+ ngDoCheck() {
76
+ this.bindNgControl();
77
+ super.ngDoCheck();
78
+ }
79
+ ngAfterContentInit() {
80
+ this.bindNgControl();
81
+ super.ngAfterContentInit();
82
+ }
83
+ ngOnDestroy() {
84
+ this._ngControlEvents?.unsubscribe();
85
+ super.ngOnDestroy();
86
+ }
87
+ /**
88
+ * Follows the control the element is bound to. The NgControl is looked up here, not injected:
89
+ * a control that is its own value accessor would be asking for the directive that is asking
90
+ * for it. By `ngAfterContentInit` every directive on the element has run its first
91
+ * `ngOnChanges`, so `formControlName` has resolved its control; `ngDoCheck` catches a control
92
+ * swapped later, which costs one comparison per check.
93
+ */
94
+ bindNgControl() {
95
+ if (this._ngControl === undefined) {
96
+ this._ngControl = this.injector.get(NgControl, null, { self: true, optional: true });
97
+ }
98
+ const control = this._ngControl?.control;
99
+ const bound = control instanceof AbstractControl ? control : null;
100
+ if (bound === this._ngControlBound) {
101
+ return;
102
+ }
103
+ this._ngControlEvents?.unsubscribe();
104
+ this._ngControlEvents = undefined;
105
+ this._ngControlBound = bound;
106
+ if (!bound) {
107
+ this.$ngControlState.set(null);
108
+ return;
109
+ }
110
+ const read = () => untracked(() => this.$ngControlState.set(readNgControlState(bound)));
111
+ read();
112
+ this._ngControlEvents = bound.events.subscribe(read);
113
+ }
114
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: BaseModelHolder, deps: null, target: i0.ɵɵFactoryTarget.Directive });
115
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.2", type: BaseModelHolder, isStandalone: true, usesInheritance: true, ngImport: i0 });
16
116
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BaseModelHolder, decorators: [{
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: BaseModelHolder, decorators: [{
18
118
  type: Directive,
19
119
  args: [{ standalone: true }]
20
120
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"anguless-angulux-basemodelholder.mjs","sources":["../../src/basemodelholder/basemodelholder.ts","../../src/basemodelholder/anguless-angulux-basemodelholder.ts"],"sourcesContent":["import { computed, Directive, signal } from '@angular/core';\nimport { isNotEmpty } from '@anguless/angulux-utils';\nimport { BaseComponent } from '@anguless/angulux/basecomponent';\n\n@Directive({ standalone: true })\nexport class BaseModelHolder<PT = any> extends BaseComponent<PT> {\n modelValue = signal<string | string[] | any | undefined>(undefined);\n\n $filled = computed(() => isNotEmpty(this.modelValue()));\n\n writeModelValue(value: any) {\n this.modelValue.set(value);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAKM,MAAO,eAA0B,SAAQ,aAAiB,CAAA;IAC5D,UAAU,GAAG,MAAM,CAAsC,SAAS;mFAAC;AAEnE,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;gFAAC;AAEvD,IAAA,eAAe,CAAC,KAAU,EAAA;AACtB,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC;IAC9B;uGAPS,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,SAAS;mBAAC,EAAE,UAAU,EAAE,IAAI,EAAE;;;ACJ/B;;AAEG;;;;"}
1
+ {"version":3,"file":"anguless-angulux-basemodelholder.mjs","sources":["../../src/basemodelholder/basemodelholder.ts","../../src/basemodelholder/anguless-angulux-basemodelholder.ts"],"sourcesContent":["import { computed, Directive, effect, signal, untracked } from '@angular/core';\nimport { AbstractControl, NgControl, Validators } from '@angular/forms';\nimport { isNotEmpty } from '@anguless/angulux-utils';\nimport { BaseComponent } from '@anguless/angulux/basecomponent';\nimport type { Subscription } from 'rxjs';\n\ntype NgControlState = { invalid: boolean; touched: boolean; dirty: boolean; required: boolean };\n\nconst sameNgControlState = (a: NgControlState | null, b: NgControlState | null) =>\n a === b || (!!a && !!b && a.invalid === b.invalid && a.touched === b.touched && a.dirty === b.dirty && a.required === b.required);\n\nconst readNgControlState = (control: AbstractControl): NgControlState => ({\n invalid: control.invalid,\n touched: control.touched,\n dirty: control.dirty,\n required: control.hasValidator(Validators.required) || control.hasValidator(Validators.requiredTrue)\n});\n\n@Directive({ standalone: true })\nexport class BaseModelHolder<PT = any> extends BaseComponent<PT> {\n modelValue = signal<string | string[] | any | undefined>(undefined);\n\n $filled = computed(() => isNotEmpty(this.modelValue()));\n\n /**\n * What the Angular forms control bound to this element reports about itself — through\n * `formControlName`, `[formControl]` or `ngModel` — or `null` when there is none. Signal Forms'\n * `[formField]` does not count: it writes the state into the inputs instead.\n *\n * Kept current from the control's `events`, not read in a template: Angular reads `invalid`,\n * `touched` and `dirty` untracked, so a change made in code (`markAllAsTouched()`, `reset()`, a\n * validator added at run time) would otherwise reach the view only when something else\n * refreshed it, which without zone.js may be never.\n */\n $ngControlState = signal<NgControlState | null>(null, { equal: sameNgControlState });\n\n private _ngControl: NgControl | null | undefined;\n\n private _ngControlBound: AbstractControl | null = null;\n\n private _ngControlEvents: Subscription | undefined;\n\n writeModelValue(value: any) {\n this.modelValue.set(value);\n }\n\n /**\n * Whether a control shows its invalid state — the style and `aria-invalid` both follow it.\n *\n * With `invalid` bound, as before: `invalid`, held back until the control is touched or dirty\n * when the form layer reports either. With `invalid` left unbound, the bound forms control\n * decides by the same rule, `invalid && (touched || dirty)`, which is when an error message\n * gated the usual way appears. The two paths never mix: a bound `invalid`, even `false`, wins.\n */\n protected showsInvalid(invalid: boolean | undefined, touched: boolean | undefined, dirty: boolean | undefined): boolean {\n if (invalid === undefined) {\n const state = this.$ngControlState();\n\n return !!state && state.invalid && (state.touched || state.dirty);\n }\n\n if (!invalid) {\n return false;\n }\n\n return (touched === undefined && dirty === undefined) || !!touched || !!dirty;\n }\n\n /**\n * For a directive on a native form element (`aglInputText`, `aglTextarea`): puts\n * `aria-required=\"true\"` on the element while the bound forms control requires a value, so a\n * screen reader announces what a label's asterisk shows. It removes only what it wrote, so an\n * `aria-required` set on the element by hand is left alone. Call it from the constructor.\n */\n protected reflectNgControlRequired() {\n let owned = false;\n\n effect(() => {\n const required = !!this.$ngControlState()?.required;\n const element = this.el.nativeElement as HTMLElement;\n\n if (required && !element.hasAttribute('aria-required')) {\n this.renderer.setAttribute(element, 'aria-required', 'true');\n owned = true;\n } else if (!required && owned) {\n this.renderer.removeAttribute(element, 'aria-required');\n owned = false;\n }\n });\n }\n\n override ngDoCheck() {\n this.bindNgControl();\n super.ngDoCheck();\n }\n\n override ngAfterContentInit() {\n this.bindNgControl();\n super.ngAfterContentInit();\n }\n\n override ngOnDestroy() {\n this._ngControlEvents?.unsubscribe();\n super.ngOnDestroy();\n }\n\n /**\n * Follows the control the element is bound to. The NgControl is looked up here, not injected:\n * a control that is its own value accessor would be asking for the directive that is asking\n * for it. By `ngAfterContentInit` every directive on the element has run its first\n * `ngOnChanges`, so `formControlName` has resolved its control; `ngDoCheck` catches a control\n * swapped later, which costs one comparison per check.\n */\n private bindNgControl() {\n if (this._ngControl === undefined) {\n this._ngControl = this.injector.get(NgControl, null, { self: true, optional: true });\n }\n\n const control = this._ngControl?.control;\n const bound = control instanceof AbstractControl ? control : null;\n\n if (bound === this._ngControlBound) {\n return;\n }\n\n this._ngControlEvents?.unsubscribe();\n this._ngControlEvents = undefined;\n this._ngControlBound = bound;\n\n if (!bound) {\n this.$ngControlState.set(null);\n\n return;\n }\n\n const read = () => untracked(() => this.$ngControlState.set(readNgControlState(bound)));\n\n read();\n this._ngControlEvents = bound.events.subscribe(read);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAQA,MAAM,kBAAkB,GAAG,CAAC,CAAwB,EAAE,CAAwB,KAC1E,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,C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AG,IAAI,CAAC,UAAU,EAAE,OAAO;AACxC,QAAA,MAAM,KAAK,GAAG,OAAO,YAAY,eAAe,GAAG,OAAO,GAAG,IAAI;AAEjE,QAAA,IAAI,KAAK,KAAK,IAAI,CAAC,eAAe,EAAE;YAChC;QACJ;AAEA,QAAA,IAAI,CAAC,gBAAgB,EAAE,WAAW,EAAE;AACpC,QAAA,IAAI,CAAC,gBAAgB,GAAG,SAAS;AACjC,QAAA,IAAI,CAAC,eAAe,GAAG,KAAK;QAE5B,IAAI,CAAC,KAAK,EAAE;AACR,YAAA,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC;YAE9B;QACJ;QAEA,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;AAEvF,QAAA,IAAI,EAAE;QACN,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;IACxD;uGAxHS,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,SAAS;mBAAC,EAAE,UAAU,EAAE,IAAI,EAAE;;;AClB/B;;AAEG;;;;"}
@@ -1,7 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, signal, computed, effect, Directive, NgModule } from '@angular/core';
2
+ import { input, signal, computed, inject, effect, SecurityContext, Directive, NgModule } from '@angular/core';
3
+ import { DomSanitizer } from '@angular/platform-browser';
3
4
  import { cn, equals } from '@anguless/angulux-utils';
4
5
 
6
+ /** Keys whose value the browser parses as markup. Compared lowercased. */
7
+ const HTML_KEYS = new Set(['innerhtml', 'outerhtml', 'srcdoc']);
8
+ /** Keys whose value the browser follows as a URL. Compared lowercased. */
9
+ const URL_KEYS = new Set(['href', 'src', 'action', 'formaction', 'xlink:href']);
5
10
  /**
6
11
  * Bind directive provides dynamic attribute, property, and event listener binding functionality.
7
12
  * @group Components
@@ -12,11 +17,14 @@ class Bind {
12
17
  /**
13
18
  * Dynamic attributes, properties, and event listeners to be applied to the host element.
14
19
  *
15
- * TRUSTED INPUT ONLY. Every key is applied to the DOM as given — set as an attribute, and
16
- * additionally assigned to the element property of the same name when one exists. No
17
- * sanitizer runs on either path, so a key such as `innerHTML` writes markup and an `on*`
18
- * key can install a handler. This is the mechanism the passthrough API is built on; it is
19
- * safe only for values you control, and never for values that reached you from a user.
20
+ * Each key is set as an attribute, and also assigned to the element property of the same
21
+ * name when one exists. Values that the browser would parse as markup (`innerHTML`,
22
+ * `outerHTML`, `srcdoc`) or follow as a URL (`href`, `src`, `action`, `formaction`,
23
+ * `xlink:href`) go through Angular's sanitizer first, exactly as they would in a template
24
+ * binding. To write such a value unsanitized on purpose, pass a value from
25
+ * `DomSanitizer.bypassSecurityTrustHtml` or `bypassSecurityTrustUrl`. An `on*` key installs
26
+ * a listener when its value is a function; any other `on*` value is ignored, because as an
27
+ * attribute it would be script.
20
28
  * @group Props
21
29
  */
22
30
  aglBind = input(undefined, /* @ts-ignore */
@@ -30,6 +38,7 @@ class Bind {
30
38
  classes = computed(() => cn(this.attrs()?.class), /* @ts-ignore */
31
39
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
32
40
  listeners = [];
41
+ sanitizer = inject(DomSanitizer);
33
42
  constructor(el, renderer) {
34
43
  this.el = el;
35
44
  this.renderer = renderer;
@@ -48,11 +57,15 @@ class Bind {
48
57
  // remove attr
49
58
  this.renderer.removeAttribute(this.el.nativeElement, key);
50
59
  }
60
+ else if (key.startsWith('on')) {
61
+ // a non-function handler would be an inline script attribute; never write it
62
+ }
51
63
  else {
52
- // attr & prop fallback
53
- this.renderer.setAttribute(this.el.nativeElement, key, value.toString());
64
+ // attr & prop fallback, through the sanitizer where the browser would execute
65
+ const safe = this.sanitize(key, value);
66
+ this.renderer.setAttribute(this.el.nativeElement, key, String(safe));
54
67
  if (key in this.el.nativeElement) {
55
- this.el.nativeElement[key] = value;
68
+ this.el.nativeElement[key] = safe;
56
69
  }
57
70
  }
58
71
  }
@@ -66,14 +79,19 @@ class Bind {
66
79
  this._attrs.set(attrs);
67
80
  }
68
81
  }
82
+ sanitize(key, value) {
83
+ const name = key.toLowerCase();
84
+ const context = HTML_KEYS.has(name) ? SecurityContext.HTML : URL_KEYS.has(name) ? SecurityContext.URL : null;
85
+ return context === null ? value : (this.sanitizer.sanitize(context, value) ?? '');
86
+ }
69
87
  clearListeners() {
70
88
  this.listeners.forEach(({ unlisten }) => unlisten());
71
89
  this.listeners = [];
72
90
  }
73
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: Bind, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
74
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.1", type: Bind, isStandalone: true, selector: "[aglBind]", inputs: { aglBind: { classPropertyName: "aglBind", publicName: "aglBind", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "styles()", "class": "classes()" } }, ngImport: i0 });
91
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: Bind, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
92
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.2", type: Bind, isStandalone: true, selector: "[aglBind]", inputs: { aglBind: { classPropertyName: "aglBind", publicName: "aglBind", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "styles()", "class": "classes()" } }, ngImport: i0 });
75
93
  }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: Bind, decorators: [{
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: Bind, decorators: [{
77
95
  type: Directive,
78
96
  args: [{
79
97
  selector: '[aglBind]',
@@ -85,11 +103,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
85
103
  }]
86
104
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { aglBind: [{ type: i0.Input, args: [{ isSignal: true, alias: "aglBind", required: false }] }] } });
87
105
  class BindModule {
88
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BindModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
89
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.1", ngImport: i0, type: BindModule, imports: [Bind], exports: [Bind] });
90
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BindModule });
106
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: BindModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
107
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.2", ngImport: i0, type: BindModule, imports: [Bind], exports: [Bind] });
108
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: BindModule });
91
109
  }
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BindModule, decorators: [{
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: BindModule, decorators: [{
93
111
  type: NgModule,
94
112
  args: [{
95
113
  imports: [Bind],
@@ -1 +1 @@
1
- {"version":3,"file":"anguless-angulux-bind.mjs","sources":["../../src/bind/bind.ts","../../src/bind/anguless-angulux-bind.ts"],"sourcesContent":["import { computed, Directive, effect, ElementRef, input, NgModule, Renderer2, signal } from '@angular/core';\nimport { cn, equals } from '@anguless/angulux-utils';\n\n/**\n * Bind directive provides dynamic attribute, property, and event listener binding functionality.\n * @group Components\n */\n@Directive({\n selector: '[aglBind]',\n standalone: true,\n host: {\n '[style]': 'styles()',\n '[class]': 'classes()'\n }\n})\nexport class Bind {\n /**\n * Dynamic attributes, properties, and event listeners to be applied to the host element.\n *\n * TRUSTED INPUT ONLY. Every key is applied to the DOM as given — set as an attribute, and\n * additionally assigned to the element property of the same name when one exists. No\n * sanitizer runs on either path, so a key such as `innerHTML` writes markup and an `on*`\n * key can install a handler. This is the mechanism the passthrough API is built on; it is\n * safe only for values you control, and never for values that reached you from a user.\n * @group Props\n */\n aglBind = input<{ [key: string]: any } | undefined>(undefined);\n\n private _attrs = signal<{ [key: string]: any } | undefined>(undefined);\n private attrs = computed(() => this._attrs() || this.aglBind());\n\n styles = computed(() => this.attrs()?.style);\n classes = computed(() => cn(this.attrs()?.class));\n\n private listeners: { eventName: string; unlisten: () => void }[] = [];\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2\n ) {\n effect(() => {\n const { style, class: className, ...rest } = this.attrs() || {};\n\n for (const [key, value] of Object.entries(rest)) {\n if (key.startsWith('on') && typeof value === 'function') {\n const eventName = key.slice(2).toLowerCase();\n\n // add listener if not already added\n if (!this.listeners.some((l) => l.eventName === eventName)) {\n const unlisten = this.renderer.listen(this.el.nativeElement, eventName, value);\n this.listeners.push({ eventName, unlisten });\n }\n } else if (value === null || value === undefined) {\n // remove attr\n this.renderer.removeAttribute(this.el.nativeElement, key);\n } else {\n // attr & prop fallback\n this.renderer.setAttribute(this.el.nativeElement, key, value.toString());\n if (key in this.el.nativeElement) {\n (this.el.nativeElement as any)[key] = value;\n }\n }\n }\n });\n }\n\n ngOnDestroy() {\n this.clearListeners();\n }\n\n public setAttrs(attrs: { [key: string]: any } | undefined) {\n if (!equals(this._attrs(), attrs)) {\n this._attrs.set(attrs);\n }\n }\n\n private clearListeners() {\n this.listeners.forEach(({ unlisten }) => unlisten());\n this.listeners = [];\n }\n}\n\n@NgModule({\n imports: [Bind],\n exports: [Bind]\n})\nexport class BindModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAGA;;;AAGG;MASU,IAAI,CAAA;AAsBD,IAAA,EAAA;AACA,IAAA,QAAA;AAtBZ;;;;;;;;;AASG;IACH,OAAO,GAAG,KAAK,CAAqC,SAAS;gFAAC;IAEtD,MAAM,GAAG,MAAM,CAAqC,SAAS;+EAAC;AAC9D,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE;8EAAC;IAE/D,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK;+EAAC;AAC5C,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK,CAAC;gFAAC;IAEzC,SAAS,GAAkD,EAAE;IAErE,WAAA,CACY,EAAc,EACd,QAAmB,EAAA;QADnB,IAAA,CAAA,EAAE,GAAF,EAAE;QACF,IAAA,CAAA,QAAQ,GAAR,QAAQ;QAEhB,MAAM,CAAC,MAAK;AACR,YAAA,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;AAE/D,YAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;AAC7C,gBAAA,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,OAAO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,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,IAAI,CAAC;oBACf,OAAO,EAAE,CAAC,IAAI;AACjB,iBAAA;;;ACrFD;;AAEG;;;;"}
1
+ {"version":3,"file":"anguless-angulux-bind.mjs","sources":["../../src/bind/bind.ts","../../src/bind/anguless-angulux-bind.ts"],"sourcesContent":["import { computed, Directive, effect, ElementRef, inject, input, NgModule, Renderer2, SecurityContext, signal } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { cn, equals } from '@anguless/angulux-utils';\n\n/** Keys whose value the browser parses as markup. Compared lowercased. */\nconst HTML_KEYS = new Set(['innerhtml', 'outerhtml', 'srcdoc']);\n\n/** Keys whose value the browser follows as a URL. Compared lowercased. */\nconst URL_KEYS = new Set(['href', 'src', 'action', 'formaction', 'xlink:href']);\n\n/**\n * Bind directive provides dynamic attribute, property, and event listener binding functionality.\n * @group Components\n */\n@Directive({\n selector: '[aglBind]',\n standalone: true,\n host: {\n '[style]': 'styles()',\n '[class]': 'classes()'\n }\n})\nexport class Bind {\n /**\n * Dynamic attributes, properties, and event listeners to be applied to the host element.\n *\n * Each key is set as an attribute, and also assigned to the element property of the same\n * name when one exists. Values that the browser would parse as markup (`innerHTML`,\n * `outerHTML`, `srcdoc`) or follow as a URL (`href`, `src`, `action`, `formaction`,\n * `xlink:href`) go through Angular's sanitizer first, exactly as they would in a template\n * binding. To write such a value unsanitized on purpose, pass a value from\n * `DomSanitizer.bypassSecurityTrustHtml` or `bypassSecurityTrustUrl`. An `on*` key installs\n * a listener when its value is a function; any other `on*` value is ignored, because as an\n * attribute it would be script.\n * @group Props\n */\n aglBind = input<{ [key: string]: any } | undefined>(undefined);\n\n private _attrs = signal<{ [key: string]: any } | undefined>(undefined);\n private attrs = computed(() => this._attrs() || this.aglBind());\n\n styles = computed(() => this.attrs()?.style);\n classes = computed(() => cn(this.attrs()?.class));\n\n private listeners: { eventName: string; unlisten: () => void }[] = [];\n\n private sanitizer = inject(DomSanitizer);\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2\n ) {\n effect(() => {\n const { style, class: className, ...rest } = this.attrs() || {};\n\n for (const [key, value] of Object.entries(rest)) {\n if (key.startsWith('on') && typeof value === 'function') {\n const eventName = key.slice(2).toLowerCase();\n\n // add listener if not already added\n if (!this.listeners.some((l) => l.eventName === eventName)) {\n const unlisten = this.renderer.listen(this.el.nativeElement, eventName, value);\n this.listeners.push({ eventName, unlisten });\n }\n } else if (value === null || value === undefined) {\n // remove attr\n this.renderer.removeAttribute(this.el.nativeElement, key);\n } else if (key.startsWith('on')) {\n // a non-function handler would be an inline script attribute; never write it\n } else {\n // attr & prop fallback, through the sanitizer where the browser would execute\n const safe = this.sanitize(key, value);\n this.renderer.setAttribute(this.el.nativeElement, key, String(safe));\n if (key in this.el.nativeElement) {\n (this.el.nativeElement as any)[key] = safe;\n }\n }\n }\n });\n }\n\n ngOnDestroy() {\n this.clearListeners();\n }\n\n public setAttrs(attrs: { [key: string]: any } | undefined) {\n if (!equals(this._attrs(), attrs)) {\n this._attrs.set(attrs);\n }\n }\n\n private sanitize(key: string, value: unknown): unknown {\n const name = key.toLowerCase();\n const context = HTML_KEYS.has(name) ? SecurityContext.HTML : URL_KEYS.has(name) ? SecurityContext.URL : null;\n return context === null ? value : (this.sanitizer.sanitize(context, value as string) ?? '');\n }\n\n private clearListeners() {\n this.listeners.forEach(({ unlisten }) => unlisten());\n this.listeners = [];\n }\n}\n\n@NgModule({\n imports: [Bind],\n exports: [Bind]\n})\nexport class BindModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAIA;AACA,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;AAE/D;AACA,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,CA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,iBAAA;;MAsFY,UAAU,CAAA;uGAAV,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAV,UAAU,EAAA,OAAA,EAAA,CArFV,IAAI,CAAA,EAAA,OAAA,EAAA,CAAJ,IAAI,CAAA,EAAA,CAAA;wGAqFJ,UAAU,EAAA,CAAA;;2FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,IAAI,CAAC;oBACf,OAAO,EAAE,CAAC,IAAI;AACjB,iBAAA;;;AC1GD;;AAEG;;;;"}
@@ -60,10 +60,10 @@ class ButtonStyle extends BaseStyle {
60
60
  name = 'button';
61
61
  style = style;
62
62
  classes = classes;
63
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
64
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonStyle });
63
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ButtonStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
64
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ButtonStyle });
65
65
  }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonStyle, decorators: [{
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ButtonStyle, decorators: [{
67
67
  type: Injectable
68
68
  }] });
69
69
  /**
@@ -144,10 +144,10 @@ class ButtonLabel extends BaseComponent {
144
144
  onAfterViewChecked() {
145
145
  this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
146
146
  }
147
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
148
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.1", type: ButtonLabel, isStandalone: true, selector: "[aglButtonLabel]", inputs: { ptButtonLabel: { classPropertyName: "ptButtonLabel", publicName: "ptButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, pButtonLabelPT: { classPropertyName: "pButtonLabelPT", publicName: "pButtonLabelPT", isSignal: true, isRequired: false, transformFunction: null }, pButtonLabelUnstyled: { classPropertyName: "pButtonLabelUnstyled", publicName: "pButtonLabelUnstyled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.p-button-label": "!$unstyled() && true" } }, providers: [ButtonStyle, { provide: BUTTON_LABEL_INSTANCE, useExisting: ButtonLabel }, { provide: PARENT_INSTANCE, useExisting: ButtonLabel }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
147
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ButtonLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
148
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.2", type: ButtonLabel, isStandalone: true, selector: "[aglButtonLabel]", inputs: { ptButtonLabel: { classPropertyName: "ptButtonLabel", publicName: "ptButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, pButtonLabelPT: { classPropertyName: "pButtonLabelPT", publicName: "pButtonLabelPT", isSignal: true, isRequired: false, transformFunction: null }, pButtonLabelUnstyled: { classPropertyName: "pButtonLabelUnstyled", publicName: "pButtonLabelUnstyled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.p-button-label": "!$unstyled() && true" } }, providers: [ButtonStyle, { provide: BUTTON_LABEL_INSTANCE, useExisting: ButtonLabel }, { provide: PARENT_INSTANCE, useExisting: ButtonLabel }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
149
149
  }
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonLabel, decorators: [{
150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ButtonLabel, decorators: [{
151
151
  type: Directive,
152
152
  args: [{
153
153
  selector: '[aglButtonLabel]',
@@ -198,10 +198,10 @@ class ButtonIcon extends BaseComponent {
198
198
  onAfterViewChecked() {
199
199
  this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
200
200
  }
201
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
202
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.1", type: ButtonIcon, isStandalone: true, selector: "[aglButtonIcon]", inputs: { ptButtonIcon: { classPropertyName: "ptButtonIcon", publicName: "ptButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, pButtonIconPT: { classPropertyName: "pButtonIconPT", publicName: "pButtonIconPT", isSignal: true, isRequired: false, transformFunction: null }, pButtonUnstyled: { classPropertyName: "pButtonUnstyled", publicName: "pButtonUnstyled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.p-button-icon": "!$unstyled() && true" } }, providers: [ButtonStyle, { provide: BUTTON_ICON_INSTANCE, useExisting: ButtonIcon }, { provide: PARENT_INSTANCE, useExisting: ButtonIcon }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
201
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ButtonIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
202
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.2", type: ButtonIcon, isStandalone: true, selector: "[aglButtonIcon]", inputs: { ptButtonIcon: { classPropertyName: "ptButtonIcon", publicName: "ptButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, pButtonIconPT: { classPropertyName: "pButtonIconPT", publicName: "pButtonIconPT", isSignal: true, isRequired: false, transformFunction: null }, pButtonUnstyled: { classPropertyName: "pButtonUnstyled", publicName: "pButtonUnstyled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.p-button-icon": "!$unstyled() && true" } }, providers: [ButtonStyle, { provide: BUTTON_ICON_INSTANCE, useExisting: ButtonIcon }, { provide: PARENT_INSTANCE, useExisting: ButtonIcon }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
203
203
  }
204
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonIcon, decorators: [{
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ButtonIcon, decorators: [{
205
205
  type: Directive,
206
206
  args: [{
207
207
  selector: '[aglButtonIcon]',
@@ -540,10 +540,10 @@ class ButtonDirective extends BaseComponent {
540
540
  onDestroy() {
541
541
  this.initialized = false;
542
542
  }
543
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
544
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.1.1", type: ButtonDirective, isStandalone: true, selector: "[aglButton]", inputs: { ptButtonDirective: { classPropertyName: "ptButtonDirective", publicName: "ptButtonDirective", isSignal: true, isRequired: false, transformFunction: null }, pButtonPT: { classPropertyName: "pButtonPT", publicName: "pButtonPT", isSignal: true, isRequired: false, transformFunction: null }, pButtonUnstyled: { classPropertyName: "pButtonUnstyled", publicName: "pButtonUnstyled", isSignal: true, isRequired: false, transformFunction: null }, hostName: { classPropertyName: "hostName", publicName: "hostName", isSignal: false, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: false, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: false, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: null }, buttonProps: { classPropertyName: "buttonProps", publicName: "buttonProps", isSignal: false, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class.p-button-icon-only": "!$unstyled() && isIconOnly()", "class.p-button-text": " !$unstyled() && isTextButton()" } }, providers: [ButtonStyle, { provide: BUTTON_DIRECTIVE_INSTANCE, useExisting: ButtonDirective }, { provide: PARENT_INSTANCE, useExisting: ButtonDirective }], queries: [{ propertyName: "iconSignal", first: true, predicate: ButtonIcon, descendants: true, isSignal: true }, { propertyName: "labelSignal", first: true, predicate: ButtonLabel, descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
543
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
544
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.2.2", type: ButtonDirective, isStandalone: true, selector: "[aglButton]", inputs: { ptButtonDirective: { classPropertyName: "ptButtonDirective", publicName: "ptButtonDirective", isSignal: true, isRequired: false, transformFunction: null }, pButtonPT: { classPropertyName: "pButtonPT", publicName: "pButtonPT", isSignal: true, isRequired: false, transformFunction: null }, pButtonUnstyled: { classPropertyName: "pButtonUnstyled", publicName: "pButtonUnstyled", isSignal: true, isRequired: false, transformFunction: null }, hostName: { classPropertyName: "hostName", publicName: "hostName", isSignal: false, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: false, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: false, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: null }, buttonProps: { classPropertyName: "buttonProps", publicName: "buttonProps", isSignal: false, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class.p-button-icon-only": "!$unstyled() && isIconOnly()", "class.p-button-text": " !$unstyled() && isTextButton()" } }, providers: [ButtonStyle, { provide: BUTTON_DIRECTIVE_INSTANCE, useExisting: ButtonDirective }, { provide: PARENT_INSTANCE, useExisting: ButtonDirective }], queries: [{ propertyName: "iconSignal", first: true, predicate: ButtonIcon, descendants: true, isSignal: true }, { propertyName: "labelSignal", first: true, predicate: ButtonLabel, descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
545
545
  }
546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonDirective, decorators: [{
546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ButtonDirective, decorators: [{
547
547
  type: Directive,
548
548
  args: [{
549
549
  selector: '[aglButton]',
@@ -807,8 +807,8 @@ class Button extends BaseComponent {
807
807
  'icon-only': this.hasIcon && !this.label && !this.badge
808
808
  });
809
809
  }
810
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: Button, deps: null, target: i0.ɵɵFactoryTarget.Component });
811
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.1", type: Button, isStandalone: true, selector: "agl-button", inputs: { hostName: { classPropertyName: "hostName", publicName: "hostName", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, text: { classPropertyName: "text", publicName: "text", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, link: { classPropertyName: "link", publicName: "link", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: false, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: false, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: false, isRequired: false, transformFunction: null }, badgeClass: { classPropertyName: "badgeClass", publicName: "badgeClass", isSignal: false, isRequired: false, transformFunction: null }, badgeSeverity: { classPropertyName: "badgeSeverity", publicName: "badgeSeverity", isSignal: false, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: false, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: false, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: false, isRequired: false, transformFunction: null }, buttonProps: { classPropertyName: "buttonProps", publicName: "buttonProps", isSignal: false, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick", onFocus: "onFocus", onBlur: "onBlur" }, providers: [ButtonStyle, { provide: BUTTON_INSTANCE, useExisting: Button }, { provide: PARENT_INSTANCE, useExisting: Button }], queries: [{ propertyName: "contentTemplate", first: true, predicate: ["content"], descendants: true, isSignal: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ["icon"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
810
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: Button, deps: null, target: i0.ɵɵFactoryTarget.Component });
811
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.2.2", type: Button, isStandalone: true, selector: "agl-button", inputs: { hostName: { classPropertyName: "hostName", publicName: "hostName", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, text: { classPropertyName: "text", publicName: "text", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, link: { classPropertyName: "link", publicName: "link", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: false, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: false, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: false, isRequired: false, transformFunction: null }, badgeClass: { classPropertyName: "badgeClass", publicName: "badgeClass", isSignal: false, isRequired: false, transformFunction: null }, badgeSeverity: { classPropertyName: "badgeSeverity", publicName: "badgeSeverity", isSignal: false, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: false, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: false, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: false, isRequired: false, transformFunction: null }, buttonProps: { classPropertyName: "buttonProps", publicName: "buttonProps", isSignal: false, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick", onFocus: "onFocus", onBlur: "onBlur" }, providers: [ButtonStyle, { provide: BUTTON_INSTANCE, useExisting: Button }, { provide: PARENT_INSTANCE, useExisting: Button }], queries: [{ propertyName: "contentTemplate", first: true, predicate: ["content"], descendants: true, isSignal: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ["icon"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
812
812
  <button
813
813
  [attr.type]="type || buttonProps?.type"
814
814
  [attr.aria-label]="ariaLabel || buttonProps?.ariaLabel"
@@ -857,7 +857,7 @@ class Button extends BaseComponent {
857
857
  </button>
858
858
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: Ripple, selector: "[aglRipple]" }, { kind: "directive", type: AutoFocus, selector: "[aglAutoFocus]", inputs: ["aglAutoFocus"] }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "ngmodule", type: BadgeModule }, { kind: "component", type: i3.Badge, selector: "agl-badge", inputs: ["styleClass", "badgeSize", "size", "severity", "value", "badgeDisabled"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: Bind, selector: "[aglBind]", inputs: ["aglBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
859
859
  }
860
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: Button, decorators: [{
860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: Button, decorators: [{
861
861
  type: Component,
862
862
  args: [{
863
863
  selector: 'agl-button',
@@ -986,11 +986,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
986
986
  type: Output
987
987
  }], contentTemplate: [{ type: i0.ContentChild, args: ['content', { isSignal: true }] }], loadingIconTemplate: [{ type: i0.ContentChild, args: ['loadingicon', { isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: ['icon', { isSignal: true }] }] } });
988
988
  class ButtonModule {
989
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
990
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.1", ngImport: i0, type: ButtonModule, imports: [CommonModule, ButtonDirective, Button, SharedModule, ButtonLabel, ButtonIcon], exports: [ButtonDirective, Button, ButtonLabel, ButtonIcon, SharedModule] });
991
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonModule, imports: [CommonModule, Button, SharedModule, SharedModule] });
989
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
990
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.2", ngImport: i0, type: ButtonModule, imports: [CommonModule, ButtonDirective, Button, SharedModule, ButtonLabel, ButtonIcon], exports: [ButtonDirective, Button, ButtonLabel, ButtonIcon, SharedModule] });
991
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ButtonModule, imports: [CommonModule, Button, SharedModule, SharedModule] });
992
992
  }
993
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonModule, decorators: [{
993
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: ButtonModule, decorators: [{
994
994
  type: NgModule,
995
995
  args: [{
996
996
  imports: [CommonModule, ButtonDirective, Button, SharedModule, ButtonLabel, ButtonIcon],