ux4g-components-angular 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/README.md +330 -48
  2. package/dist/accessibility-bar/README.md +330 -48
  3. package/dist/accordion/README.md +330 -48
  4. package/dist/alert/README.md +330 -48
  5. package/dist/avatar/README.md +330 -48
  6. package/dist/badge/README.md +330 -48
  7. package/dist/breadcrumb/README.md +330 -48
  8. package/dist/button/README.md +330 -48
  9. package/dist/card/README.md +330 -48
  10. package/dist/carousel/README.md +330 -48
  11. package/dist/checkbox/README.md +330 -48
  12. package/dist/chip/README.md +330 -48
  13. package/dist/chip-group/README.md +330 -48
  14. package/dist/combobox/README.md +330 -48
  15. package/dist/date-time-picker/README.md +330 -48
  16. package/dist/divider/README.md +330 -48
  17. package/dist/draft-status-banner/README.md +330 -48
  18. package/dist/drawer/README.md +330 -48
  19. package/dist/dropdown/README.md +330 -48
  20. package/dist/empty-state/README.md +330 -48
  21. package/dist/feedback/README.md +330 -48
  22. package/dist/file-upload/README.md +330 -48
  23. package/dist/footer/README.md +330 -48
  24. package/dist/form-field-group/README.md +330 -48
  25. package/dist/icon-button/README.md +330 -48
  26. package/dist/image/README.md +330 -48
  27. package/dist/input/README.md +330 -48
  28. package/dist/journey-timeline/README.md +330 -48
  29. package/dist/link/README.md +330 -48
  30. package/dist/list/README.md +330 -48
  31. package/dist/mega-menu/README.md +330 -48
  32. package/dist/modal/README.md +330 -48
  33. package/dist/native/accordion/README.md +1541 -0
  34. package/dist/native/accordion/fesm2022/ux4g-components-angular-native-accordion.mjs +85 -0
  35. package/dist/native/accordion/fesm2022/ux4g-components-angular-native-accordion.mjs.map +1 -0
  36. package/dist/native/accordion/index.d.ts +6 -0
  37. package/dist/native/accordion/public-api.d.ts +3 -0
  38. package/dist/native/accordion/public-api.d.ts.map +1 -0
  39. package/dist/native/accordion/ux4g-components-angular-native-accordion.d.ts.map +1 -0
  40. package/dist/native/accordion/ux4g-native-accordion.component.d.ts +31 -0
  41. package/dist/native/accordion/ux4g-native-accordion.component.d.ts.map +1 -0
  42. package/dist/native/accordion/ux4g-native-accordion.module.d.ts +12 -0
  43. package/dist/native/accordion/ux4g-native-accordion.module.d.ts.map +1 -0
  44. package/dist/native/avatar/README.md +1541 -0
  45. package/dist/native/avatar/fesm2022/ux4g-components-angular-native-avatar.mjs +81 -0
  46. package/dist/native/avatar/fesm2022/ux4g-components-angular-native-avatar.mjs.map +1 -0
  47. package/dist/native/avatar/index.d.ts +6 -0
  48. package/dist/native/avatar/public-api.d.ts +3 -0
  49. package/dist/native/avatar/public-api.d.ts.map +1 -0
  50. package/dist/native/avatar/ux4g-components-angular-native-avatar.d.ts.map +1 -0
  51. package/dist/native/avatar/ux4g-native-avatar.component.d.ts +34 -0
  52. package/dist/native/avatar/ux4g-native-avatar.component.d.ts.map +1 -0
  53. package/dist/native/avatar/ux4g-native-avatar.module.d.ts +8 -0
  54. package/dist/native/avatar/ux4g-native-avatar.module.d.ts.map +1 -0
  55. package/dist/native/carousel/README.md +1541 -0
  56. package/dist/native/carousel/fesm2022/ux4g-components-angular-native-carousel.mjs +91 -0
  57. package/dist/native/carousel/fesm2022/ux4g-components-angular-native-carousel.mjs.map +1 -0
  58. package/dist/native/carousel/index.d.ts +6 -0
  59. package/dist/native/carousel/public-api.d.ts +3 -0
  60. package/dist/native/carousel/public-api.d.ts.map +1 -0
  61. package/dist/native/carousel/ux4g-components-angular-native-carousel.d.ts.map +1 -0
  62. package/dist/native/carousel/ux4g-native-carousel.component.d.ts +34 -0
  63. package/dist/native/carousel/ux4g-native-carousel.component.d.ts.map +1 -0
  64. package/dist/native/carousel/ux4g-native-carousel.module.d.ts +8 -0
  65. package/dist/native/carousel/ux4g-native-carousel.module.d.ts.map +1 -0
  66. package/dist/native/chip/README.md +1541 -0
  67. package/dist/native/chip/fesm2022/ux4g-components-angular-native-chip.mjs +99 -0
  68. package/dist/native/chip/fesm2022/ux4g-components-angular-native-chip.mjs.map +1 -0
  69. package/dist/native/chip/index.d.ts +6 -0
  70. package/dist/native/chip/public-api.d.ts +3 -0
  71. package/dist/native/chip/public-api.d.ts.map +1 -0
  72. package/dist/native/chip/ux4g-components-angular-native-chip.d.ts.map +1 -0
  73. package/dist/native/chip/ux4g-native-chip.component.d.ts +34 -0
  74. package/dist/native/chip/ux4g-native-chip.component.d.ts.map +1 -0
  75. package/dist/native/chip/ux4g-native-chip.module.d.ts +8 -0
  76. package/dist/native/chip/ux4g-native-chip.module.d.ts.map +1 -0
  77. package/dist/native/combobox/README.md +1541 -0
  78. package/dist/native/combobox/fesm2022/ux4g-components-angular-native-combobox.mjs +107 -0
  79. package/dist/native/combobox/fesm2022/ux4g-components-angular-native-combobox.mjs.map +1 -0
  80. package/dist/native/combobox/index.d.ts +6 -0
  81. package/dist/native/combobox/public-api.d.ts +3 -0
  82. package/dist/native/combobox/public-api.d.ts.map +1 -0
  83. package/dist/native/combobox/ux4g-components-angular-native-combobox.d.ts.map +1 -0
  84. package/dist/native/combobox/ux4g-native-combobox.component.d.ts +30 -0
  85. package/dist/native/combobox/ux4g-native-combobox.component.d.ts.map +1 -0
  86. package/dist/native/combobox/ux4g-native-combobox.module.d.ts +8 -0
  87. package/dist/native/combobox/ux4g-native-combobox.module.d.ts.map +1 -0
  88. package/dist/native/date-picker/README.md +1541 -0
  89. package/dist/native/date-picker/fesm2022/ux4g-components-angular-native-date-picker.mjs +181 -0
  90. package/dist/native/date-picker/fesm2022/ux4g-components-angular-native-date-picker.mjs.map +1 -0
  91. package/dist/native/date-picker/index.d.ts +6 -0
  92. package/dist/native/date-picker/public-api.d.ts +3 -0
  93. package/dist/native/date-picker/public-api.d.ts.map +1 -0
  94. package/dist/native/date-picker/ux4g-components-angular-native-date-picker.d.ts.map +1 -0
  95. package/dist/native/date-picker/ux4g-native-date-picker.component.d.ts +39 -0
  96. package/dist/native/date-picker/ux4g-native-date-picker.component.d.ts.map +1 -0
  97. package/dist/native/date-picker/ux4g-native-date-picker.module.d.ts +12 -0
  98. package/dist/native/date-picker/ux4g-native-date-picker.module.d.ts.map +1 -0
  99. package/dist/native/drawer/README.md +1541 -0
  100. package/dist/native/drawer/fesm2022/ux4g-components-angular-native-drawer.mjs +159 -0
  101. package/dist/native/drawer/fesm2022/ux4g-components-angular-native-drawer.mjs.map +1 -0
  102. package/dist/native/drawer/index.d.ts +6 -0
  103. package/dist/native/drawer/public-api.d.ts +3 -0
  104. package/dist/native/drawer/public-api.d.ts.map +1 -0
  105. package/dist/native/drawer/ux4g-components-angular-native-drawer.d.ts.map +1 -0
  106. package/dist/native/drawer/ux4g-native-drawer.component.d.ts +37 -0
  107. package/dist/native/drawer/ux4g-native-drawer.component.d.ts.map +1 -0
  108. package/dist/native/drawer/ux4g-native-drawer.module.d.ts +12 -0
  109. package/dist/native/drawer/ux4g-native-drawer.module.d.ts.map +1 -0
  110. package/dist/native/dropdown/README.md +1541 -0
  111. package/dist/native/dropdown/fesm2022/ux4g-components-angular-native-dropdown.mjs +108 -0
  112. package/dist/native/dropdown/fesm2022/ux4g-components-angular-native-dropdown.mjs.map +1 -0
  113. package/dist/native/dropdown/index.d.ts +6 -0
  114. package/dist/native/dropdown/public-api.d.ts +3 -0
  115. package/dist/native/dropdown/public-api.d.ts.map +1 -0
  116. package/dist/native/dropdown/ux4g-components-angular-native-dropdown.d.ts.map +1 -0
  117. package/dist/native/dropdown/ux4g-native-dropdown.component.d.ts +32 -0
  118. package/dist/native/dropdown/ux4g-native-dropdown.component.d.ts.map +1 -0
  119. package/dist/native/dropdown/ux4g-native-dropdown.module.d.ts +8 -0
  120. package/dist/native/dropdown/ux4g-native-dropdown.module.d.ts.map +1 -0
  121. package/dist/native/file-upload/README.md +1541 -0
  122. package/dist/native/file-upload/fesm2022/ux4g-components-angular-native-file-upload.mjs +193 -0
  123. package/dist/native/file-upload/fesm2022/ux4g-components-angular-native-file-upload.mjs.map +1 -0
  124. package/dist/native/file-upload/index.d.ts +6 -0
  125. package/dist/native/file-upload/public-api.d.ts +3 -0
  126. package/dist/native/file-upload/public-api.d.ts.map +1 -0
  127. package/dist/native/file-upload/ux4g-components-angular-native-file-upload.d.ts.map +1 -0
  128. package/dist/native/file-upload/ux4g-native-file-upload.component.d.ts +40 -0
  129. package/dist/native/file-upload/ux4g-native-file-upload.component.d.ts.map +1 -0
  130. package/dist/native/file-upload/ux4g-native-file-upload.module.d.ts +8 -0
  131. package/dist/native/file-upload/ux4g-native-file-upload.module.d.ts.map +1 -0
  132. package/dist/native/modal/README.md +1541 -0
  133. package/dist/native/modal/fesm2022/ux4g-components-angular-native-modal.mjs +219 -0
  134. package/dist/native/modal/fesm2022/ux4g-components-angular-native-modal.mjs.map +1 -0
  135. package/dist/native/modal/index.d.ts +6 -0
  136. package/dist/native/modal/public-api.d.ts +3 -0
  137. package/dist/native/modal/public-api.d.ts.map +1 -0
  138. package/dist/native/modal/ux4g-components-angular-native-modal.d.ts.map +1 -0
  139. package/dist/native/modal/ux4g-native-modal.component.d.ts +42 -0
  140. package/dist/native/modal/ux4g-native-modal.component.d.ts.map +1 -0
  141. package/dist/native/modal/ux4g-native-modal.module.d.ts +12 -0
  142. package/dist/native/modal/ux4g-native-modal.module.d.ts.map +1 -0
  143. package/dist/native/otp/README.md +1541 -0
  144. package/dist/native/otp/fesm2022/ux4g-components-angular-native-otp.mjs +176 -0
  145. package/dist/native/otp/fesm2022/ux4g-components-angular-native-otp.mjs.map +1 -0
  146. package/dist/native/otp/index.d.ts +6 -0
  147. package/dist/native/otp/public-api.d.ts +3 -0
  148. package/dist/native/otp/public-api.d.ts.map +1 -0
  149. package/dist/native/otp/ux4g-components-angular-native-otp.d.ts.map +1 -0
  150. package/dist/native/otp/ux4g-native-otp.component.d.ts +32 -0
  151. package/dist/native/otp/ux4g-native-otp.component.d.ts.map +1 -0
  152. package/dist/native/otp/ux4g-native-otp.module.d.ts +8 -0
  153. package/dist/native/otp/ux4g-native-otp.module.d.ts.map +1 -0
  154. package/dist/native/popover/README.md +1541 -0
  155. package/dist/native/popover/fesm2022/ux4g-components-angular-native-popover.mjs +75 -0
  156. package/dist/native/popover/fesm2022/ux4g-components-angular-native-popover.mjs.map +1 -0
  157. package/dist/native/popover/index.d.ts +6 -0
  158. package/dist/native/popover/public-api.d.ts +3 -0
  159. package/dist/native/popover/public-api.d.ts.map +1 -0
  160. package/dist/native/popover/ux4g-components-angular-native-popover.d.ts.map +1 -0
  161. package/dist/native/popover/ux4g-native-popover.component.d.ts +29 -0
  162. package/dist/native/popover/ux4g-native-popover.component.d.ts.map +1 -0
  163. package/dist/native/popover/ux4g-native-popover.module.d.ts +8 -0
  164. package/dist/native/popover/ux4g-native-popover.module.d.ts.map +1 -0
  165. package/dist/native/progress/README.md +1541 -0
  166. package/dist/native/progress/fesm2022/ux4g-components-angular-native-progress.mjs +79 -0
  167. package/dist/native/progress/fesm2022/ux4g-components-angular-native-progress.mjs.map +1 -0
  168. package/dist/native/progress/index.d.ts +6 -0
  169. package/dist/native/progress/public-api.d.ts +3 -0
  170. package/dist/native/progress/public-api.d.ts.map +1 -0
  171. package/dist/native/progress/ux4g-components-angular-native-progress.d.ts.map +1 -0
  172. package/dist/native/progress/ux4g-native-progress.component.d.ts +29 -0
  173. package/dist/native/progress/ux4g-native-progress.component.d.ts.map +1 -0
  174. package/dist/native/progress/ux4g-native-progress.module.d.ts +8 -0
  175. package/dist/native/progress/ux4g-native-progress.module.d.ts.map +1 -0
  176. package/dist/native/search/README.md +1541 -0
  177. package/dist/native/search/fesm2022/ux4g-components-angular-native-search.mjs +148 -0
  178. package/dist/native/search/fesm2022/ux4g-components-angular-native-search.mjs.map +1 -0
  179. package/dist/native/search/index.d.ts +6 -0
  180. package/dist/native/search/public-api.d.ts +3 -0
  181. package/dist/native/search/public-api.d.ts.map +1 -0
  182. package/dist/native/search/ux4g-components-angular-native-search.d.ts.map +1 -0
  183. package/dist/native/search/ux4g-native-search.component.d.ts +46 -0
  184. package/dist/native/search/ux4g-native-search.component.d.ts.map +1 -0
  185. package/dist/native/search/ux4g-native-search.module.d.ts +8 -0
  186. package/dist/native/search/ux4g-native-search.module.d.ts.map +1 -0
  187. package/dist/native/shared/README.md +1541 -0
  188. package/dist/native/shared/base-native.component.d.ts +38 -0
  189. package/dist/native/shared/base-native.component.d.ts.map +1 -0
  190. package/dist/native/shared/fesm2022/ux4g-components-angular-native-shared.mjs +113 -0
  191. package/dist/native/shared/fesm2022/ux4g-components-angular-native-shared.mjs.map +1 -0
  192. package/dist/native/shared/index.d.ts +6 -0
  193. package/dist/native/shared/public-api.d.ts +3 -0
  194. package/dist/native/shared/public-api.d.ts.map +1 -0
  195. package/dist/native/shared/render-descriptor.d.ts +8 -0
  196. package/dist/native/shared/render-descriptor.d.ts.map +1 -0
  197. package/dist/native/shared/ux4g-components-angular-native-shared.d.ts.map +1 -0
  198. package/dist/native/stepper/README.md +1541 -0
  199. package/dist/native/stepper/fesm2022/ux4g-components-angular-native-stepper.mjs +92 -0
  200. package/dist/native/stepper/fesm2022/ux4g-components-angular-native-stepper.mjs.map +1 -0
  201. package/dist/native/stepper/index.d.ts +6 -0
  202. package/dist/native/stepper/public-api.d.ts +3 -0
  203. package/dist/native/stepper/public-api.d.ts.map +1 -0
  204. package/dist/native/stepper/ux4g-components-angular-native-stepper.d.ts.map +1 -0
  205. package/dist/native/stepper/ux4g-native-stepper.component.d.ts +35 -0
  206. package/dist/native/stepper/ux4g-native-stepper.component.d.ts.map +1 -0
  207. package/dist/native/stepper/ux4g-native-stepper.module.d.ts +8 -0
  208. package/dist/native/stepper/ux4g-native-stepper.module.d.ts.map +1 -0
  209. package/dist/native/table/README.md +1541 -0
  210. package/dist/native/table/fesm2022/ux4g-components-angular-native-table.mjs +91 -0
  211. package/dist/native/table/fesm2022/ux4g-components-angular-native-table.mjs.map +1 -0
  212. package/dist/native/table/index.d.ts +6 -0
  213. package/dist/native/table/public-api.d.ts +3 -0
  214. package/dist/native/table/public-api.d.ts.map +1 -0
  215. package/dist/native/table/ux4g-components-angular-native-table.d.ts.map +1 -0
  216. package/dist/native/table/ux4g-native-table.component.d.ts +32 -0
  217. package/dist/native/table/ux4g-native-table.component.d.ts.map +1 -0
  218. package/dist/native/table/ux4g-native-table.module.d.ts +12 -0
  219. package/dist/native/table/ux4g-native-table.module.d.ts.map +1 -0
  220. package/dist/native/tabs/README.md +1541 -0
  221. package/dist/native/tabs/fesm2022/ux4g-components-angular-native-tabs.mjs +190 -0
  222. package/dist/native/tabs/fesm2022/ux4g-components-angular-native-tabs.mjs.map +1 -0
  223. package/dist/native/tabs/index.d.ts +6 -0
  224. package/dist/native/tabs/public-api.d.ts +3 -0
  225. package/dist/native/tabs/public-api.d.ts.map +1 -0
  226. package/dist/native/tabs/ux4g-components-angular-native-tabs.d.ts.map +1 -0
  227. package/dist/native/tabs/ux4g-native-tabs.component.d.ts +43 -0
  228. package/dist/native/tabs/ux4g-native-tabs.component.d.ts.map +1 -0
  229. package/dist/native/tabs/ux4g-native-tabs.module.d.ts +12 -0
  230. package/dist/native/tabs/ux4g-native-tabs.module.d.ts.map +1 -0
  231. package/dist/native/time-picker/README.md +1541 -0
  232. package/dist/native/time-picker/fesm2022/ux4g-components-angular-native-time-picker.mjs +104 -0
  233. package/dist/native/time-picker/fesm2022/ux4g-components-angular-native-time-picker.mjs.map +1 -0
  234. package/dist/native/time-picker/index.d.ts +6 -0
  235. package/dist/native/time-picker/public-api.d.ts +3 -0
  236. package/dist/native/time-picker/public-api.d.ts.map +1 -0
  237. package/dist/native/time-picker/ux4g-components-angular-native-time-picker.d.ts.map +1 -0
  238. package/dist/native/time-picker/ux4g-native-time-picker.component.d.ts +27 -0
  239. package/dist/native/time-picker/ux4g-native-time-picker.component.d.ts.map +1 -0
  240. package/dist/native/time-picker/ux4g-native-time-picker.module.d.ts +8 -0
  241. package/dist/native/time-picker/ux4g-native-time-picker.module.d.ts.map +1 -0
  242. package/dist/native/tooltip/README.md +1541 -0
  243. package/dist/native/tooltip/fesm2022/ux4g-components-angular-native-tooltip.mjs +80 -0
  244. package/dist/native/tooltip/fesm2022/ux4g-components-angular-native-tooltip.mjs.map +1 -0
  245. package/dist/native/tooltip/index.d.ts +6 -0
  246. package/dist/native/tooltip/public-api.d.ts +3 -0
  247. package/dist/native/tooltip/public-api.d.ts.map +1 -0
  248. package/dist/native/tooltip/ux4g-components-angular-native-tooltip.d.ts.map +1 -0
  249. package/dist/native/tooltip/ux4g-native-tooltip.component.d.ts +31 -0
  250. package/dist/native/tooltip/ux4g-native-tooltip.component.d.ts.map +1 -0
  251. package/dist/native/tooltip/ux4g-native-tooltip.module.d.ts +8 -0
  252. package/dist/native/tooltip/ux4g-native-tooltip.module.d.ts.map +1 -0
  253. package/dist/navbar/README.md +330 -48
  254. package/dist/otp-input/README.md +330 -48
  255. package/dist/pagination/README.md +330 -48
  256. package/dist/popover/README.md +330 -48
  257. package/dist/progress-indicator/README.md +330 -48
  258. package/dist/radio/README.md +330 -48
  259. package/dist/result-list-row/README.md +330 -48
  260. package/dist/search/README.md +330 -48
  261. package/dist/sla-progress-indicator/README.md +330 -48
  262. package/dist/slider/README.md +330 -48
  263. package/dist/slot-grid/README.md +330 -48
  264. package/dist/social-links/README.md +330 -48
  265. package/dist/spinner/README.md +330 -48
  266. package/dist/status-pipeline/README.md +330 -48
  267. package/dist/stepper/README.md +330 -48
  268. package/dist/switch/README.md +330 -48
  269. package/dist/tab/README.md +330 -48
  270. package/dist/table/README.md +330 -48
  271. package/dist/tag/README.md +330 -48
  272. package/dist/tooltip/README.md +330 -48
  273. package/package.json +176 -3
@@ -0,0 +1,176 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, forwardRef, Output, Input, ViewEncapsulation, Component, NgModule } from '@angular/core';
3
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
+ import { generateOtpDOM } from 'ux4g-components-web/dom-generators';
5
+ import { BaseNativeComponent, renderDescriptorToDOM } from '@ux4g-native-shared';
6
+
7
+ /**
8
+ * UX4GNativeOtpComponent — Angular Native Wrapper for the OTP Input component.
9
+ *
10
+ * Generates individual input cells using the shared DOM Generator.
11
+ * Implements auto-advance focus on input, backspace navigation,
12
+ * and paste distribution across cells.
13
+ *
14
+ * Implements ControlValueAccessor for Angular forms integration (ngModel/formControl).
15
+ */
16
+ class UX4GNativeOtpComponent extends BaseNativeComponent {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.length = 6;
20
+ this.otpChange = new EventEmitter();
21
+ this.inputElements = [];
22
+ this.eventListenerCleanups = [];
23
+ }
24
+ // eslint-disable-next-line @angular-eslint/no-input-rename
25
+ set disabledInput(val) {
26
+ this.disabled = val;
27
+ }
28
+ get disabledInput() {
29
+ return this.disabled;
30
+ }
31
+ ngOnChanges() {
32
+ this.renderComponent();
33
+ }
34
+ ngAfterViewInit() {
35
+ this.attachEventListeners();
36
+ }
37
+ ngOnDestroy() {
38
+ this.cleanupEventListeners();
39
+ super.ngOnDestroy();
40
+ }
41
+ renderComponent() {
42
+ // Clear existing children and event listeners
43
+ this.cleanupEventListeners();
44
+ const hostEl = this.elementRef.nativeElement;
45
+ while (hostEl.firstChild) {
46
+ this.renderer.removeChild(hostEl, hostEl.firstChild);
47
+ }
48
+ // Get current values from the stored value
49
+ const currentValue = this.value || '';
50
+ const values = Array.from({ length: this.length }, (_, i) => currentValue[i] || '');
51
+ // Generate descriptor and render to DOM
52
+ const descriptor = generateOtpDOM({
53
+ length: this.length,
54
+ values,
55
+ disabled: this.disabled,
56
+ });
57
+ renderDescriptorToDOM(this.renderer, descriptor, hostEl);
58
+ // Collect input elements and attach listeners
59
+ this.inputElements = Array.from(hostEl.querySelectorAll('input.ux4g-otp-cell'));
60
+ this.attachEventListeners();
61
+ }
62
+ attachEventListeners() {
63
+ this.cleanupEventListeners();
64
+ this.inputElements.forEach((input, index) => {
65
+ const onInput = (event) => this.handleInput(index, event);
66
+ const onKeyDown = (event) => this.handleKeyDown(index, event);
67
+ const onPaste = (event) => this.handlePaste(event);
68
+ const onFocus = () => this.notifyTouched();
69
+ input.addEventListener('input', onInput);
70
+ input.addEventListener('keydown', onKeyDown);
71
+ input.addEventListener('paste', onPaste);
72
+ input.addEventListener('focus', onFocus);
73
+ this.eventListenerCleanups.push(() => {
74
+ input.removeEventListener('input', onInput);
75
+ input.removeEventListener('keydown', onKeyDown);
76
+ input.removeEventListener('paste', onPaste);
77
+ input.removeEventListener('focus', onFocus);
78
+ });
79
+ });
80
+ }
81
+ cleanupEventListeners() {
82
+ this.eventListenerCleanups.forEach((cleanup) => cleanup());
83
+ this.eventListenerCleanups = [];
84
+ }
85
+ handleInput(index, event) {
86
+ const input = event.target;
87
+ const char = input.value.slice(-1); // Take only last character
88
+ const currentValue = this.value || '';
89
+ const values = Array.from({ length: this.length }, (_, i) => currentValue[i] || '');
90
+ values[index] = char;
91
+ const newValue = values.join('');
92
+ this.notifyChange(newValue);
93
+ this.otpChange.emit(newValue);
94
+ // Auto-advance focus to next cell
95
+ if (char && index < this.length - 1) {
96
+ this.inputElements[index + 1]?.focus();
97
+ }
98
+ // Re-render to sync displayed values
99
+ this.renderComponent();
100
+ }
101
+ handleKeyDown(index, event) {
102
+ if (event.key === 'Backspace') {
103
+ const currentValue = this.value || '';
104
+ if (!currentValue[index] && index > 0) {
105
+ // Move focus to previous cell on backspace when current cell is empty
106
+ this.inputElements[index - 1]?.focus();
107
+ }
108
+ }
109
+ }
110
+ handlePaste(event) {
111
+ event.preventDefault();
112
+ const pastedText = event.clipboardData?.getData('text/plain') || '';
113
+ const chars = pastedText.slice(0, this.length);
114
+ const currentValue = this.value || '';
115
+ const values = Array.from({ length: this.length }, (_, i) => chars[i] || currentValue[i] || '');
116
+ const newValue = values.join('');
117
+ this.notifyChange(newValue);
118
+ this.otpChange.emit(newValue);
119
+ // Focus the cell after the last pasted character, or the last cell
120
+ const focusIndex = Math.min(chars.length, this.length - 1);
121
+ this.inputElements[focusIndex]?.focus();
122
+ // Re-render to sync displayed values
123
+ this.renderComponent();
124
+ }
125
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeOtpComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
126
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: UX4GNativeOtpComponent, isStandalone: true, selector: "ux4g-native-otp", inputs: { length: "length", disabledInput: ["disabled", "disabledInput"] }, outputs: { otpChange: "otpChange" }, providers: [
127
+ {
128
+ provide: NG_VALUE_ACCESSOR,
129
+ useExisting: forwardRef(() => UX4GNativeOtpComponent),
130
+ multi: true,
131
+ },
132
+ ], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
133
+ }
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeOtpComponent, decorators: [{
135
+ type: Component,
136
+ args: [{
137
+ selector: 'ux4g-native-otp',
138
+ standalone: true,
139
+ template: '',
140
+ encapsulation: ViewEncapsulation.None,
141
+ providers: [
142
+ {
143
+ provide: NG_VALUE_ACCESSOR,
144
+ useExisting: forwardRef(() => UX4GNativeOtpComponent),
145
+ multi: true,
146
+ },
147
+ ],
148
+ }]
149
+ }], propDecorators: { length: [{
150
+ type: Input
151
+ }], disabledInput: [{
152
+ type: Input,
153
+ args: ['disabled']
154
+ }], otpChange: [{
155
+ type: Output
156
+ }] } });
157
+
158
+ class UX4GNativeOtpModule {
159
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeOtpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
160
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeOtpModule, imports: [UX4GNativeOtpComponent], exports: [UX4GNativeOtpComponent] }); }
161
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeOtpModule }); }
162
+ }
163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeOtpModule, decorators: [{
164
+ type: NgModule,
165
+ args: [{
166
+ imports: [UX4GNativeOtpComponent],
167
+ exports: [UX4GNativeOtpComponent],
168
+ }]
169
+ }] });
170
+
171
+ /**
172
+ * Generated bundle index. Do not edit.
173
+ */
174
+
175
+ export { UX4GNativeOtpComponent, UX4GNativeOtpModule };
176
+ //# sourceMappingURL=ux4g-components-angular-native-otp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux4g-components-angular-native-otp.mjs","sources":["../../../../src/native/otp/ux4g-native-otp.component.ts","../../../../src/native/otp/ux4g-native-otp.module.ts","../../../../src/native/otp/ux4g-components-angular-native-otp.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n OnChanges,\r\n AfterViewInit,\r\n OnDestroy,\r\n ViewEncapsulation,\r\n forwardRef,\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { generateOtpDOM } from 'ux4g-components-web/dom-generators';\r\nimport { BaseNativeComponent, renderDescriptorToDOM } from '@ux4g-native-shared';\r\n\r\n/**\r\n * UX4GNativeOtpComponent — Angular Native Wrapper for the OTP Input component.\r\n *\r\n * Generates individual input cells using the shared DOM Generator.\r\n * Implements auto-advance focus on input, backspace navigation,\r\n * and paste distribution across cells.\r\n *\r\n * Implements ControlValueAccessor for Angular forms integration (ngModel/formControl).\r\n */\r\n@Component({\r\n selector: 'ux4g-native-otp',\r\n standalone: true,\r\n template: '',\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => UX4GNativeOtpComponent),\r\n multi: true,\r\n },\r\n ],\r\n})\r\nexport class UX4GNativeOtpComponent\r\n extends BaseNativeComponent\r\n implements OnChanges, AfterViewInit, OnDestroy\r\n{\r\n @Input() length: number = 6;\r\n\r\n // eslint-disable-next-line @angular-eslint/no-input-rename\r\n @Input('disabled')\r\n set disabledInput(val: boolean) {\r\n this.disabled = val;\r\n }\r\n get disabledInput(): boolean {\r\n return this.disabled;\r\n }\r\n\r\n @Output() otpChange = new EventEmitter<string>();\r\n\r\n private inputElements: HTMLInputElement[] = [];\r\n private eventListenerCleanups: (() => void)[] = [];\r\n\r\n ngOnChanges(): void {\r\n this.renderComponent();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.attachEventListeners();\r\n }\r\n\r\n override ngOnDestroy(): void {\r\n this.cleanupEventListeners();\r\n super.ngOnDestroy();\r\n }\r\n\r\n protected override renderComponent(): void {\r\n // Clear existing children and event listeners\r\n this.cleanupEventListeners();\r\n const hostEl = this.elementRef.nativeElement;\r\n while (hostEl.firstChild) {\r\n this.renderer.removeChild(hostEl, hostEl.firstChild);\r\n }\r\n\r\n // Get current values from the stored value\r\n const currentValue = (this.value as string) || '';\r\n const values = Array.from({ length: this.length }, (_, i) => currentValue[i] || '');\r\n\r\n // Generate descriptor and render to DOM\r\n const descriptor = generateOtpDOM({\r\n length: this.length,\r\n values,\r\n disabled: this.disabled,\r\n });\r\n\r\n renderDescriptorToDOM(this.renderer, descriptor, hostEl);\r\n\r\n // Collect input elements and attach listeners\r\n this.inputElements = Array.from(\r\n hostEl.querySelectorAll('input.ux4g-otp-cell')\r\n ) as HTMLInputElement[];\r\n\r\n this.attachEventListeners();\r\n }\r\n\r\n private attachEventListeners(): void {\r\n this.cleanupEventListeners();\r\n\r\n this.inputElements.forEach((input, index) => {\r\n const onInput = (event: Event) => this.handleInput(index, event);\r\n const onKeyDown = (event: Event) => this.handleKeyDown(index, event as KeyboardEvent);\r\n const onPaste = (event: Event) => this.handlePaste(event as ClipboardEvent);\r\n const onFocus = () => this.notifyTouched();\r\n\r\n input.addEventListener('input', onInput);\r\n input.addEventListener('keydown', onKeyDown);\r\n input.addEventListener('paste', onPaste);\r\n input.addEventListener('focus', onFocus);\r\n\r\n this.eventListenerCleanups.push(() => {\r\n input.removeEventListener('input', onInput);\r\n input.removeEventListener('keydown', onKeyDown);\r\n input.removeEventListener('paste', onPaste);\r\n input.removeEventListener('focus', onFocus);\r\n });\r\n });\r\n }\r\n\r\n private cleanupEventListeners(): void {\r\n this.eventListenerCleanups.forEach((cleanup) => cleanup());\r\n this.eventListenerCleanups = [];\r\n }\r\n\r\n private handleInput(index: number, event: Event): void {\r\n const input = event.target as HTMLInputElement;\r\n const char = input.value.slice(-1); // Take only last character\r\n\r\n const currentValue = (this.value as string) || '';\r\n const values = Array.from({ length: this.length }, (_, i) => currentValue[i] || '');\r\n values[index] = char;\r\n const newValue = values.join('');\r\n\r\n this.notifyChange(newValue);\r\n this.otpChange.emit(newValue);\r\n\r\n // Auto-advance focus to next cell\r\n if (char && index < this.length - 1) {\r\n this.inputElements[index + 1]?.focus();\r\n }\r\n\r\n // Re-render to sync displayed values\r\n this.renderComponent();\r\n }\r\n\r\n private handleKeyDown(index: number, event: KeyboardEvent): void {\r\n if (event.key === 'Backspace') {\r\n const currentValue = (this.value as string) || '';\r\n if (!currentValue[index] && index > 0) {\r\n // Move focus to previous cell on backspace when current cell is empty\r\n this.inputElements[index - 1]?.focus();\r\n }\r\n }\r\n }\r\n\r\n private handlePaste(event: ClipboardEvent): void {\r\n event.preventDefault();\r\n const pastedText = event.clipboardData?.getData('text/plain') || '';\r\n const chars = pastedText.slice(0, this.length);\r\n\r\n const currentValue = (this.value as string) || '';\r\n const values = Array.from({ length: this.length }, (_, i) => chars[i] || currentValue[i] || '');\r\n const newValue = values.join('');\r\n\r\n this.notifyChange(newValue);\r\n this.otpChange.emit(newValue);\r\n\r\n // Focus the cell after the last pasted character, or the last cell\r\n const focusIndex = Math.min(chars.length, this.length - 1);\r\n this.inputElements[focusIndex]?.focus();\r\n\r\n // Re-render to sync displayed values\r\n this.renderComponent();\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { UX4GNativeOtpComponent } from './ux4g-native-otp.component';\r\n\r\n@NgModule({\r\n imports: [UX4GNativeOtpComponent],\r\n exports: [UX4GNativeOtpComponent],\r\n})\r\nexport class UX4GNativeOtpModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAeA;;;;;;;;AAQG;AAcG,MAAO,sBACX,SAAQ,mBAAmB,CAAA;AAd7B,IAAA,WAAA,GAAA;;QAiBW,IAAA,CAAA,MAAM,GAAW,CAAC;AAWjB,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAU;QAExC,IAAA,CAAA,aAAa,GAAuB,EAAE;QACtC,IAAA,CAAA,qBAAqB,GAAmB,EAAE;AA0HnD,IAAA;;IArIC,IACI,aAAa,CAAC,GAAY,EAAA;AAC5B,QAAA,IAAI,CAAC,QAAQ,GAAG,GAAG;IACrB;AACA,IAAA,IAAI,aAAa,GAAA;QACf,OAAO,IAAI,CAAC,QAAQ;IACtB;IAOA,WAAW,GAAA;QACT,IAAI,CAAC,eAAe,EAAE;IACxB;IAEA,eAAe,GAAA;QACb,IAAI,CAAC,oBAAoB,EAAE;IAC7B;IAES,WAAW,GAAA;QAClB,IAAI,CAAC,qBAAqB,EAAE;QAC5B,KAAK,CAAC,WAAW,EAAE;IACrB;IAEmB,eAAe,GAAA;;QAEhC,IAAI,CAAC,qBAAqB,EAAE;AAC5B,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AAC5C,QAAA,OAAO,MAAM,CAAC,UAAU,EAAE;YACxB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC;QACtD;;AAGA,QAAA,MAAM,YAAY,GAAI,IAAI,CAAC,KAAgB,IAAI,EAAE;AACjD,QAAA,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE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AAC;AACrD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA;8BAKU,MAAM,EAAA,CAAA;sBAAd;gBAIG,aAAa,EAAA,CAAA;sBADhB,KAAK;uBAAC,UAAU;gBAQP,SAAS,EAAA,CAAA;sBAAlB;;;MC7CU,mBAAmB,CAAA;+GAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAnB,mBAAmB,EAAA,OAAA,EAAA,CAHpB,sBAAsB,CAAA,EAAA,OAAA,EAAA,CACtB,sBAAsB,CAAA,EAAA,CAAA,CAAA;gHAErB,mBAAmB,EAAA,CAAA,CAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,OAAO,EAAE,CAAC,sBAAsB,CAAC;AAClC,iBAAA;;;ACND;;AAEG;;;;"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="ux4g-components-angular" />
5
+ export * from './public-api';
6
+ //# sourceMappingURL=ux4g-components-angular-native-otp.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { UX4GNativeOtpComponent } from './ux4g-native-otp.component';
2
+ export { UX4GNativeOtpModule } from './ux4g-native-otp.module';
3
+ //# sourceMappingURL=public-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../../src/native/otp/public-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux4g-components-angular-native-otp.d.ts","sourceRoot":"","sources":["../../../src/native/otp/ux4g-components-angular-native-otp.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { EventEmitter, OnChanges, AfterViewInit, OnDestroy } from '@angular/core';
2
+ import { BaseNativeComponent } from '@ux4g-native-shared';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * UX4GNativeOtpComponent — Angular Native Wrapper for the OTP Input component.
6
+ *
7
+ * Generates individual input cells using the shared DOM Generator.
8
+ * Implements auto-advance focus on input, backspace navigation,
9
+ * and paste distribution across cells.
10
+ *
11
+ * Implements ControlValueAccessor for Angular forms integration (ngModel/formControl).
12
+ */
13
+ export declare class UX4GNativeOtpComponent extends BaseNativeComponent implements OnChanges, AfterViewInit, OnDestroy {
14
+ length: number;
15
+ set disabledInput(val: boolean);
16
+ get disabledInput(): boolean;
17
+ otpChange: EventEmitter<string>;
18
+ private inputElements;
19
+ private eventListenerCleanups;
20
+ ngOnChanges(): void;
21
+ ngAfterViewInit(): void;
22
+ ngOnDestroy(): void;
23
+ protected renderComponent(): void;
24
+ private attachEventListeners;
25
+ private cleanupEventListeners;
26
+ private handleInput;
27
+ private handleKeyDown;
28
+ private handlePaste;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<UX4GNativeOtpComponent, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<UX4GNativeOtpComponent, "ux4g-native-otp", never, { "length": { "alias": "length"; "required": false; }; "disabledInput": { "alias": "disabled"; "required": false; }; }, { "otpChange": "otpChange"; }, never, never, true, never>;
31
+ }
32
+ //# sourceMappingURL=ux4g-native-otp.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux4g-native-otp.component.d.ts","sourceRoot":"","sources":["../../../src/native/otp/ux4g-native-otp.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACZ,SAAS,EACT,aAAa,EACb,SAAS,EAGV,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,mBAAmB,EAAyB,MAAM,qBAAqB,CAAC;;AAEjF;;;;;;;;GAQG;AACH,qBAaa,sBACX,SAAQ,mBACR,YAAW,SAAS,EAAE,aAAa,EAAE,SAAS;IAErC,MAAM,EAAE,MAAM,CAAK;IAG5B,IACI,aAAa,CAAC,GAAG,EAAE,OAAO,EAE7B;IACD,IAAI,aAAa,IAAI,OAAO,CAE3B;IAES,SAAS,uBAA8B;IAEjD,OAAO,CAAC,aAAa,CAA0B;IAC/C,OAAO,CAAC,qBAAqB,CAAsB;IAEnD,WAAW,IAAI,IAAI;IAInB,eAAe,IAAI,IAAI;IAId,WAAW,IAAI,IAAI;cAKT,eAAe,IAAI,IAAI;IA6B1C,OAAO,CAAC,oBAAoB;IAuB5B,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,WAAW;IAqBnB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,WAAW;yCAzHR,sBAAsB;2CAAtB,sBAAsB;CA4IlC"}
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./ux4g-native-otp.component";
3
+ export declare class UX4GNativeOtpModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<UX4GNativeOtpModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<UX4GNativeOtpModule, never, [typeof i1.UX4GNativeOtpComponent], [typeof i1.UX4GNativeOtpComponent]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<UX4GNativeOtpModule>;
7
+ }
8
+ //# sourceMappingURL=ux4g-native-otp.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux4g-native-otp.module.d.ts","sourceRoot":"","sources":["../../../src/native/otp/ux4g-native-otp.module.ts"],"names":[],"mappings":";;AAGA,qBAIa,mBAAmB;yCAAnB,mBAAmB;0CAAnB,mBAAmB;0CAAnB,mBAAmB;CAAG"}