@exhaustive-ui/core 22.0.0-rc.2 → 22.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 (211) hide show
  1. package/fesm2022/exhaustive-ui-core-accordion.mjs +5 -0
  2. package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
  3. package/fesm2022/exhaustive-ui-core-autocomplete.mjs +12 -14
  4. package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
  5. package/fesm2022/exhaustive-ui-core-avatargroup.mjs +3 -9
  6. package/fesm2022/exhaustive-ui-core-avatargroup.mjs.map +1 -1
  7. package/fesm2022/exhaustive-ui-core-badge.mjs +3 -34
  8. package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
  9. package/fesm2022/exhaustive-ui-core-basecomponent.mjs +3 -0
  10. package/fesm2022/exhaustive-ui-core-basecomponent.mjs.map +1 -1
  11. package/fesm2022/exhaustive-ui-core-baseinput.mjs +27 -7
  12. package/fesm2022/exhaustive-ui-core-baseinput.mjs.map +1 -1
  13. package/fesm2022/exhaustive-ui-core-blockui.mjs +13 -1
  14. package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
  15. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +1 -1
  16. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
  17. package/fesm2022/exhaustive-ui-core-button.mjs +10 -34
  18. package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
  19. package/fesm2022/exhaustive-ui-core-carousel.mjs +5 -0
  20. package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
  21. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +25 -11
  22. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
  23. package/fesm2022/exhaustive-ui-core-checkbox.mjs +1 -1
  24. package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
  25. package/fesm2022/exhaustive-ui-core-config.mjs +1 -8
  26. package/fesm2022/exhaustive-ui-core-config.mjs.map +1 -1
  27. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +1 -1
  28. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
  29. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +3 -8
  30. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
  31. package/fesm2022/exhaustive-ui-core-contextmenu.mjs +16 -3
  32. package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
  33. package/fesm2022/exhaustive-ui-core-dataview.mjs +2 -14
  34. package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
  35. package/fesm2022/exhaustive-ui-core-datepicker.mjs +38 -4
  36. package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
  37. package/fesm2022/exhaustive-ui-core-dialog.mjs +12 -7
  38. package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
  39. package/fesm2022/exhaustive-ui-core-dock.mjs +1 -1
  40. package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
  41. package/fesm2022/exhaustive-ui-core-dom.mjs +9 -2
  42. package/fesm2022/exhaustive-ui-core-dom.mjs.map +1 -1
  43. package/fesm2022/exhaustive-ui-core-drawer.mjs +6 -6
  44. package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
  45. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +19 -19
  46. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
  47. package/fesm2022/exhaustive-ui-core-editor.mjs +11 -0
  48. package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
  49. package/fesm2022/exhaustive-ui-core-fileupload.mjs +4 -1
  50. package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
  51. package/fesm2022/exhaustive-ui-core-galleria.mjs +12 -0
  52. package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
  53. package/fesm2022/exhaustive-ui-core-image.mjs +7 -0
  54. package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
  55. package/fesm2022/exhaustive-ui-core-imagecompare.mjs +5 -5
  56. package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
  57. package/fesm2022/exhaustive-ui-core-inplace.mjs +6 -32
  58. package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
  59. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +3 -9
  60. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
  61. package/fesm2022/exhaustive-ui-core-inputmask.mjs +54 -27
  62. package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
  63. package/fesm2022/exhaustive-ui-core-inputnumber.mjs +9 -11
  64. package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
  65. package/fesm2022/exhaustive-ui-core-inputotp.mjs +8 -3
  66. package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
  67. package/fesm2022/exhaustive-ui-core-inputtext.mjs +6 -14
  68. package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
  69. package/fesm2022/exhaustive-ui-core-listbox.mjs +53 -20
  70. package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
  71. package/fesm2022/exhaustive-ui-core-megamenu.mjs +4 -1
  72. package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
  73. package/fesm2022/exhaustive-ui-core-menu.mjs +11 -5
  74. package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
  75. package/fesm2022/exhaustive-ui-core-menubar.mjs +8 -2
  76. package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
  77. package/fesm2022/exhaustive-ui-core-message.mjs +5 -10
  78. package/fesm2022/exhaustive-ui-core-message.mjs.map +1 -1
  79. package/fesm2022/exhaustive-ui-core-metergroup.mjs +3 -0
  80. package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
  81. package/fesm2022/exhaustive-ui-core-motion.mjs +10 -1
  82. package/fesm2022/exhaustive-ui-core-motion.mjs.map +1 -1
  83. package/fesm2022/exhaustive-ui-core-multiselect.mjs +77 -38
  84. package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
  85. package/fesm2022/exhaustive-ui-core-orderlist.mjs +14 -19
  86. package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
  87. package/fesm2022/exhaustive-ui-core-organizationchart.mjs +3 -1
  88. package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
  89. package/fesm2022/exhaustive-ui-core-overlay.mjs +28 -0
  90. package/fesm2022/exhaustive-ui-core-overlay.mjs.map +1 -1
  91. package/fesm2022/exhaustive-ui-core-panel.mjs +12 -2
  92. package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
  93. package/fesm2022/exhaustive-ui-core-panelmenu.mjs +61 -13
  94. package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
  95. package/fesm2022/exhaustive-ui-core-password.mjs +37 -26
  96. package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
  97. package/fesm2022/exhaustive-ui-core-picklist.mjs +11 -25
  98. package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
  99. package/fesm2022/exhaustive-ui-core-popover.mjs +2 -2
  100. package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
  101. package/fesm2022/exhaustive-ui-core-radiobutton.mjs +8 -4
  102. package/fesm2022/exhaustive-ui-core-radiobutton.mjs.map +1 -1
  103. package/fesm2022/exhaustive-ui-core-scroller.mjs +91 -10
  104. package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
  105. package/fesm2022/exhaustive-ui-core-select.mjs +36 -4
  106. package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
  107. package/fesm2022/exhaustive-ui-core-selectbutton.mjs +3 -8
  108. package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
  109. package/fesm2022/exhaustive-ui-core-slider.mjs +6 -0
  110. package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
  111. package/fesm2022/exhaustive-ui-core-speeddial.mjs +1 -1
  112. package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
  113. package/fesm2022/exhaustive-ui-core-splitbutton.mjs +1 -1
  114. package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
  115. package/fesm2022/exhaustive-ui-core-stepper.mjs +7 -11
  116. package/fesm2022/exhaustive-ui-core-stepper.mjs.map +1 -1
  117. package/fesm2022/exhaustive-ui-core-steps.mjs +1 -1
  118. package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
  119. package/fesm2022/exhaustive-ui-core-table.mjs +227 -32
  120. package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
  121. package/fesm2022/exhaustive-ui-core-tabs.mjs +16 -1
  122. package/fesm2022/exhaustive-ui-core-tabs.mjs.map +1 -1
  123. package/fesm2022/exhaustive-ui-core-textarea.mjs +1 -1
  124. package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
  125. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +60 -16
  126. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
  127. package/fesm2022/exhaustive-ui-core-toast.mjs +6 -2
  128. package/fesm2022/exhaustive-ui-core-toast.mjs.map +1 -1
  129. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +2 -9
  130. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
  131. package/fesm2022/exhaustive-ui-core-tooltip.mjs +9 -17
  132. package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
  133. package/fesm2022/exhaustive-ui-core-tree.mjs +99 -28
  134. package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
  135. package/fesm2022/exhaustive-ui-core-treeselect.mjs +1 -1
  136. package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
  137. package/fesm2022/exhaustive-ui-core-treetable.mjs +75 -19
  138. package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
  139. package/fesm2022/exhaustive-ui-core-utils.mjs +15 -0
  140. package/fesm2022/exhaustive-ui-core-utils.mjs.map +1 -1
  141. package/package.json +5 -5
  142. package/schematics/migrations/config-input-style-to-variant/migration.js +70 -0
  143. package/schematics/migrations/remove-dead-inputs/migration.js +46 -7
  144. package/schematics/migrations/removed-exports/migration.js +73 -0
  145. package/schematics/migrations/renamed-inputs/migration.js +54 -3
  146. package/schematics/migrations/renamed-outputs/migration.js +89 -0
  147. package/schematics/migrations/renamed-templates/migration.js +59 -0
  148. package/schematics/migrations/styleclass-to-class/migration.js +5 -0
  149. package/schematics/migrations.json +23 -3
  150. package/schematics/utils/config-signal.js +115 -0
  151. package/schematics/utils/removed-exports.js +172 -0
  152. package/schematics/utils/removed-inputs.js +0 -0
  153. package/schematics/utils/renamed-inputs.js +20 -9
  154. package/schematics/utils/renamed-outputs.js +154 -0
  155. package/schematics/utils/renamed-templates.js +142 -0
  156. package/schematics/utils/versions.json +8 -8
  157. package/types/exhaustive-ui-core-api.d.ts +0 -10
  158. package/types/exhaustive-ui-core-autocomplete.d.ts +4 -9
  159. package/types/exhaustive-ui-core-avatargroup.d.ts +1 -6
  160. package/types/exhaustive-ui-core-badge.d.ts +1 -14
  161. package/types/exhaustive-ui-core-basecomponent.d.ts +3 -0
  162. package/types/exhaustive-ui-core-baseinput.d.ts +3 -3
  163. package/types/exhaustive-ui-core-button.d.ts +4 -25
  164. package/types/exhaustive-ui-core-cascadeselect.d.ts +5 -2
  165. package/types/exhaustive-ui-core-config.d.ts +0 -8
  166. package/types/exhaustive-ui-core-confirmpopup.d.ts +1 -6
  167. package/types/exhaustive-ui-core-contextmenu.d.ts +3 -0
  168. package/types/exhaustive-ui-core-dataview.d.ts +1 -11
  169. package/types/exhaustive-ui-core-datepicker.d.ts +1 -0
  170. package/types/exhaustive-ui-core-dialog.d.ts +1 -1
  171. package/types/exhaustive-ui-core-drawer.d.ts +2 -2
  172. package/types/exhaustive-ui-core-dynamicdialog.d.ts +3 -12
  173. package/types/exhaustive-ui-core-editor.d.ts +5 -0
  174. package/types/exhaustive-ui-core-fileupload.d.ts +3 -0
  175. package/types/exhaustive-ui-core-galleria.d.ts +12 -0
  176. package/types/exhaustive-ui-core-image.d.ts +1 -0
  177. package/types/exhaustive-ui-core-imagecompare.d.ts +2 -2
  178. package/types/exhaustive-ui-core-inplace.d.ts +3 -11
  179. package/types/exhaustive-ui-core-inputgroupaddon.d.ts +1 -6
  180. package/types/exhaustive-ui-core-inputmask.d.ts +2 -2
  181. package/types/exhaustive-ui-core-inputtext.d.ts +3 -10
  182. package/types/exhaustive-ui-core-listbox.d.ts +12 -6
  183. package/types/exhaustive-ui-core-megamenu.d.ts +3 -0
  184. package/types/exhaustive-ui-core-menu.d.ts +6 -11
  185. package/types/exhaustive-ui-core-menubar.d.ts +5 -11
  186. package/types/exhaustive-ui-core-message.d.ts +1 -8
  187. package/types/exhaustive-ui-core-metergroup.d.ts +3 -0
  188. package/types/exhaustive-ui-core-multiselect.d.ts +13 -10
  189. package/types/exhaustive-ui-core-orderlist.d.ts +2 -12
  190. package/types/exhaustive-ui-core-organizationchart.d.ts +3 -1
  191. package/types/exhaustive-ui-core-overlay.d.ts +8 -0
  192. package/types/exhaustive-ui-core-panel.d.ts +2 -0
  193. package/types/exhaustive-ui-core-panelmenu.d.ts +9 -0
  194. package/types/exhaustive-ui-core-password.d.ts +19 -14
  195. package/types/exhaustive-ui-core-picklist.d.ts +1 -16
  196. package/types/exhaustive-ui-core-radiobutton.d.ts +4 -1
  197. package/types/exhaustive-ui-core-scroller.d.ts +10 -0
  198. package/types/exhaustive-ui-core-select.d.ts +11 -27
  199. package/types/exhaustive-ui-core-selectbutton.d.ts +1 -6
  200. package/types/exhaustive-ui-core-stepper.d.ts +3 -11
  201. package/types/exhaustive-ui-core-table.d.ts +32 -4
  202. package/types/exhaustive-ui-core-tieredmenu.d.ts +8 -0
  203. package/types/exhaustive-ui-core-toast.d.ts +3 -0
  204. package/types/exhaustive-ui-core-toggleswitch.d.ts +1 -7
  205. package/types/exhaustive-ui-core-tooltip.d.ts +3 -10
  206. package/types/exhaustive-ui-core-tree.d.ts +17 -1
  207. package/types/exhaustive-ui-core-treetable.d.ts +24 -5
  208. package/types/exhaustive-ui-core-types-multiselect.d.ts +0 -6
  209. package/types/exhaustive-ui-core-types-table.d.ts +1 -1
  210. package/types/exhaustive-ui-core-types-tree.d.ts +5 -0
  211. package/types/exhaustive-ui-core-utils.d.ts +15 -0
@@ -123,6 +123,21 @@ var InputMaskClasses;
123
123
  */
124
124
  const INPUTMASK_INSTANCE = new InjectionToken('INPUTMASK_INSTANCE');
125
125
  const INPUTMASK_DIRECTIVE_INSTANCE = new InjectionToken('INPUTMASK_DIRECTIVE_INSTANCE');
126
+ /**
127
+ * Splits a mask into its characters; a backslash makes the next character a literal, so '+\\9 999' keeps its '9' prefix.
128
+ */
129
+ function maskTokens(mask) {
130
+ const tokens = [];
131
+ for (let i = 0; i < mask.length; i++) {
132
+ if (mask[i] === '\\' && i + 1 < mask.length) {
133
+ tokens.push({ char: mask[++i], literal: true });
134
+ }
135
+ else {
136
+ tokens.push({ char: mask[i], literal: false });
137
+ }
138
+ }
139
+ return tokens;
140
+ }
126
141
  /**
127
142
  * InputMask directive is applied directly to input elements to enable masked input.
128
143
  * @group Components
@@ -145,7 +160,7 @@ class InputMaskDirective extends BaseComponent {
145
160
  pInputMaskUnstyled = input(/* @ts-ignore */
146
161
  ...(ngDevMode ? [undefined, { debugName: "pInputMaskUnstyled" }] : /* istanbul ignore next */ []));
147
162
  /**
148
- * Mask pattern.
163
+ * Mask pattern. A backslash makes the next character a literal, e.g. mask="+\9 999" for a fixed '+9' prefix.
149
164
  * @group Props
150
165
  */
151
166
  pInputMask = input(/* @ts-ignore */
@@ -188,8 +203,9 @@ class InputMaskDirective extends BaseComponent {
188
203
  return { defs: undefined, tests: undefined, partialPosition: undefined, firstNonMaskPos: undefined, lastRequiredNonMaskPos: undefined, len: undefined, buffer: undefined, defaultBuffer: undefined };
189
204
  }
190
205
  const tests = [];
191
- let partialPosition = maskValue.length;
192
- let len = maskValue.length;
206
+ const tokens = maskTokens(maskValue);
207
+ let partialPosition = tokens.length;
208
+ let len = tokens.length;
193
209
  let firstNonMaskPos = null;
194
210
  let lastRequiredNonMaskPos;
195
211
  const defs = {
@@ -197,14 +213,13 @@ class InputMaskDirective extends BaseComponent {
197
213
  a: this.characterPattern(),
198
214
  '*': `${this.characterPattern()}|[0-9]`
199
215
  };
200
- const maskTokens = maskValue.split('');
201
- for (let i = 0; i < maskTokens.length; i++) {
202
- const c = maskTokens[i];
203
- if (c == '?') {
216
+ for (let i = 0; i < tokens.length; i++) {
217
+ const { char: c, literal } = tokens[i];
218
+ if (c == '?' && !literal) {
204
219
  len--;
205
220
  partialPosition = i;
206
221
  }
207
- else if (defs[c]) {
222
+ else if (!literal && defs[c]) {
208
223
  tests.push(new RegExp(defs[c]));
209
224
  if (firstNonMaskPos === null) {
210
225
  firstNonMaskPos = tests.length - 1;
@@ -218,10 +233,10 @@ class InputMaskDirective extends BaseComponent {
218
233
  }
219
234
  }
220
235
  const buffer = [];
221
- for (let i = 0; i < maskTokens.length; i++) {
222
- const c = maskTokens[i];
223
- if (c != '?') {
224
- if (defs[c])
236
+ for (let i = 0; i < tokens.length; i++) {
237
+ const { char: c, literal } = tokens[i];
238
+ if (c != '?' || literal) {
239
+ if (!literal && defs[c])
225
240
  buffer.push(this.getPlaceholder(i));
226
241
  else
227
242
  buffer.push(c);
@@ -313,7 +328,7 @@ class InputMaskDirective extends BaseComponent {
313
328
  return;
314
329
  }
315
330
  this.writeBuffer();
316
- if (pos == this.pInputMask()?.replace('?', '').length) {
331
+ if (pos == this.len()) {
317
332
  this.caret(0, pos);
318
333
  }
319
334
  else {
@@ -568,6 +583,9 @@ class InputMaskDirective extends BaseComponent {
568
583
  while (pos.begin < this.firstNonMaskPos() && !this.tests()[pos.begin])
569
584
  pos.begin++;
570
585
  }
586
+ // checkVal() rewrote the value and sent the caret to the end: put it back now so it does not flicker,
587
+ // and again after the keyboard has finished its own update
588
+ this.caret(pos.begin, pos.begin);
571
589
  setTimeout(() => {
572
590
  this.caret(pos.begin, pos.begin);
573
591
  this.onUnmaskedChange.emit(this.getUnmaskedValue());
@@ -586,6 +604,9 @@ class InputMaskDirective extends BaseComponent {
586
604
  while (pos.begin < this.len() && !this.tests()[pos.begin])
587
605
  pos.begin++;
588
606
  }
607
+ // checkVal() rewrote the value and sent the caret to the end: put it back now so it does not flicker,
608
+ // and again after the keyboard has finished its own update
609
+ this.caret(pos.begin, pos.begin);
589
610
  setTimeout(() => {
590
611
  this.caret(pos.begin, pos.begin);
591
612
  this.onUnmaskedChange.emit(this.getUnmaskedValue());
@@ -874,7 +895,7 @@ class InputMask extends BaseInput {
874
895
  */
875
896
  keepBuffer = input(false, { ...(ngDevMode ? { debugName: "keepBuffer" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
876
897
  /**
877
- * Mask pattern.
898
+ * Mask pattern. A backslash makes the next character a literal, e.g. mask="+\9 999" for a fixed '+9' prefix.
878
899
  * @group Props
879
900
  */
880
901
  mask = input(/* @ts-ignore */
@@ -930,8 +951,9 @@ class InputMask extends BaseInput {
930
951
  return { defs: undefined, tests: undefined, partialPosition: undefined, firstNonMaskPos: undefined, lastRequiredNonMaskPos: undefined, len: undefined, buffer: undefined, defaultBuffer: undefined };
931
952
  }
932
953
  const tests = [];
933
- let partialPosition = mask.length;
934
- let len = mask.length;
954
+ const tokens = maskTokens(mask);
955
+ let partialPosition = tokens.length;
956
+ let len = tokens.length;
935
957
  let firstNonMaskPos = null;
936
958
  let lastRequiredNonMaskPos;
937
959
  const defs = {
@@ -939,14 +961,13 @@ class InputMask extends BaseInput {
939
961
  a: this.characterPattern(),
940
962
  '*': `${this.characterPattern()}|[0-9]`
941
963
  };
942
- let maskTokens = mask.split('');
943
- for (let i = 0; i < maskTokens.length; i++) {
944
- let c = maskTokens[i];
945
- if (c == '?') {
964
+ for (let i = 0; i < tokens.length; i++) {
965
+ const { char: c, literal } = tokens[i];
966
+ if (c == '?' && !literal) {
946
967
  len--;
947
968
  partialPosition = i;
948
969
  }
949
- else if (defs[c]) {
970
+ else if (!literal && defs[c]) {
950
971
  tests.push(new RegExp(defs[c]));
951
972
  if (firstNonMaskPos === null) {
952
973
  firstNonMaskPos = tests.length - 1;
@@ -960,10 +981,10 @@ class InputMask extends BaseInput {
960
981
  }
961
982
  }
962
983
  const buffer = [];
963
- for (let i = 0; i < maskTokens.length; i++) {
964
- let c = maskTokens[i];
965
- if (c != '?') {
966
- if (defs[c])
984
+ for (let i = 0; i < tokens.length; i++) {
985
+ const { char: c, literal } = tokens[i];
986
+ if (c != '?' || literal) {
987
+ if (!literal && defs[c])
967
988
  buffer.push(this.getPlaceholder(i));
968
989
  else
969
990
  buffer.push(c);
@@ -1118,6 +1139,9 @@ class InputMask extends BaseInput {
1118
1139
  while (pos.begin < this.firstNonMaskPos() && !this.tests()[pos.begin])
1119
1140
  pos.begin++;
1120
1141
  }
1142
+ // checkVal() rewrote the value and sent the caret to the end: put it back now so it does not flicker,
1143
+ // and again after the keyboard has finished its own update
1144
+ this.caret(pos.begin, pos.begin);
1121
1145
  setTimeout(() => {
1122
1146
  this.caret(pos.begin, pos.begin);
1123
1147
  this.updateModel(e);
@@ -1136,6 +1160,9 @@ class InputMask extends BaseInput {
1136
1160
  while (pos.begin < this.len() && !this.tests()[pos.begin])
1137
1161
  pos.begin++;
1138
1162
  }
1163
+ // checkVal() rewrote the value and sent the caret to the end: put it back now so it does not flicker,
1164
+ // and again after the keyboard has finished its own update
1165
+ this.caret(pos.begin, pos.begin);
1139
1166
  setTimeout(() => {
1140
1167
  this.caret(pos.begin, pos.begin);
1141
1168
  this.updateModel(e);
@@ -1355,7 +1382,7 @@ class InputMask extends BaseInput {
1355
1382
  return;
1356
1383
  }
1357
1384
  this.writeBuffer();
1358
- if (pos == this.mask()?.replace('?', '').length) {
1385
+ if (pos == this.len()) {
1359
1386
  this.caret(0, pos);
1360
1387
  }
1361
1388
  else {
@@ -1482,7 +1509,7 @@ class InputMask extends BaseInput {
1482
1509
  </span>
1483
1510
  }
1484
1511
  }
1485
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i1.Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1512
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i1.Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1486
1513
  }
1487
1514
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: InputMask, decorators: [{
1488
1515
  type: Component,