@caribeng/ui 22.1.1 → 22.4.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 (305) hide show
  1. package/README.md +134 -12
  2. package/fesm2022/caribeng-ui-accordion.mjs +4 -4
  3. package/fesm2022/caribeng-ui-anchor.mjs +169 -0
  4. package/fesm2022/caribeng-ui-autocomplete.mjs +10 -8
  5. package/fesm2022/caribeng-ui-avatar.mjs +2 -2
  6. package/fesm2022/caribeng-ui-avatargroup.mjs +9 -3
  7. package/fesm2022/caribeng-ui-badge.mjs +8 -2
  8. package/fesm2022/caribeng-ui-blockui.mjs +12 -4
  9. package/fesm2022/caribeng-ui-breadcrumb.mjs +17 -7
  10. package/fesm2022/caribeng-ui-button.mjs +22 -2
  11. package/fesm2022/caribeng-ui-caribe-alert.mjs +5 -2
  12. package/fesm2022/caribeng-ui-caribe-animation-lottie.mjs +6 -3
  13. package/fesm2022/caribeng-ui-caribe-button-group.mjs +6 -3
  14. package/fesm2022/caribeng-ui-caribe-calendar.mjs +11 -6
  15. package/fesm2022/caribeng-ui-caribe-card-content.mjs +6 -3
  16. package/fesm2022/caribeng-ui-caribe-card-move.mjs +29 -7
  17. package/fesm2022/caribeng-ui-caribe-card-select.mjs +56 -14
  18. package/fesm2022/caribeng-ui-caribe-circle-loading.mjs +10 -7
  19. package/fesm2022/caribeng-ui-caribe-coachmark.mjs +42 -19
  20. package/fesm2022/caribeng-ui-caribe-data-table.mjs +15 -9
  21. package/fesm2022/caribeng-ui-caribe-dots-indicator.mjs +38 -5
  22. package/fesm2022/caribeng-ui-caribe-expansion-panel.mjs +16 -5
  23. package/fesm2022/caribeng-ui-caribe-fab-menu.mjs +56 -7
  24. package/fesm2022/caribeng-ui-caribe-file-download.mjs +68 -27
  25. package/fesm2022/caribeng-ui-caribe-file-select.mjs +22 -17
  26. package/fesm2022/caribeng-ui-caribe-float-menu.mjs +6 -3
  27. package/fesm2022/caribeng-ui-caribe-footer.mjs +8 -4
  28. package/fesm2022/caribeng-ui-caribe-header.mjs +6 -3
  29. package/fesm2022/caribeng-ui-caribe-icon-button.mjs +6 -3
  30. package/fesm2022/caribeng-ui-caribe-illustration.mjs +6 -3
  31. package/fesm2022/caribeng-ui-caribe-inline-alert.mjs +5 -2
  32. package/fesm2022/caribeng-ui-caribe-input-search.mjs +14 -10
  33. package/fesm2022/caribeng-ui-caribe-input-select.mjs +12 -10
  34. package/fesm2022/caribeng-ui-caribe-input-token.mjs +61 -11
  35. package/fesm2022/caribeng-ui-caribe-link.mjs +7 -2
  36. package/fesm2022/caribeng-ui-caribe-loader.mjs +8 -5
  37. package/fesm2022/caribeng-ui-caribe-modal.mjs +32 -16
  38. package/fesm2022/caribeng-ui-caribe-off-canvas.mjs +26 -12
  39. package/fesm2022/caribeng-ui-caribe-onboarding.mjs +44 -19
  40. package/fesm2022/caribeng-ui-caribe-pictogram.mjs +6 -3
  41. package/fesm2022/caribeng-ui-caribe-pop-over.mjs +34 -10
  42. package/fesm2022/caribeng-ui-caribe-preloader.mjs +9 -6
  43. package/fesm2022/caribeng-ui-caribe-progress-bar.mjs +5 -2
  44. package/fesm2022/caribeng-ui-caribe-shortcut.mjs +8 -3
  45. package/fesm2022/caribeng-ui-caribe-step-indicator.mjs +12 -5
  46. package/fesm2022/caribeng-ui-caribe-stroke.mjs +6 -3
  47. package/fesm2022/caribeng-ui-caribe-switch.mjs +5 -3
  48. package/fesm2022/caribeng-ui-caribe-tag-button.mjs +1 -1
  49. package/fesm2022/caribeng-ui-caribe-tracker.mjs +5 -2
  50. package/fesm2022/caribeng-ui-caribe-transaction-status.mjs +1 -1
  51. package/fesm2022/caribeng-ui-caribe-voucher.mjs +11 -8
  52. package/fesm2022/caribeng-ui-carousel.mjs +49 -14
  53. package/fesm2022/caribeng-ui-cascadeselect.mjs +22 -8
  54. package/fesm2022/caribeng-ui-chart.mjs +2601 -303
  55. package/fesm2022/caribeng-ui-chat.mjs +1303 -0
  56. package/fesm2022/caribeng-ui-chip.mjs +9 -4
  57. package/fesm2022/caribeng-ui-chips.mjs +9 -5
  58. package/fesm2022/caribeng-ui-code-block.mjs +332 -0
  59. package/fesm2022/caribeng-ui-colorpicker.mjs +107 -11
  60. package/fesm2022/caribeng-ui-command-palette.mjs +476 -0
  61. package/fesm2022/caribeng-ui-confirmdialog.mjs +140 -10
  62. package/fesm2022/caribeng-ui-confirmpopup.mjs +209 -9
  63. package/fesm2022/caribeng-ui-contextmenu.mjs +13 -6
  64. package/fesm2022/caribeng-ui-copy-button.mjs +230 -0
  65. package/fesm2022/caribeng-ui-dataview.mjs +214 -6
  66. package/fesm2022/caribeng-ui-datepicker.mjs +1630 -393
  67. package/fesm2022/caribeng-ui-descriptions.mjs +124 -0
  68. package/fesm2022/caribeng-ui-dialog.mjs +10 -7
  69. package/fesm2022/caribeng-ui-dock.mjs +58 -15
  70. package/fesm2022/caribeng-ui-drawer.mjs +17 -9
  71. package/fesm2022/caribeng-ui-dynamicdialog.mjs +210 -6
  72. package/fesm2022/caribeng-ui-editor.mjs +4413 -243
  73. package/fesm2022/caribeng-ui-empty.mjs +80 -0
  74. package/fesm2022/caribeng-ui-fieldset.mjs +2 -2
  75. package/fesm2022/caribeng-ui-file-card.mjs +136 -19
  76. package/fesm2022/caribeng-ui-fileupload.mjs +96 -19
  77. package/fesm2022/caribeng-ui-floatlabel.mjs +4 -2
  78. package/fesm2022/caribeng-ui-folder-card.mjs +132 -15
  79. package/fesm2022/caribeng-ui-galleria.mjs +76 -45
  80. package/fesm2022/caribeng-ui-image.mjs +52 -29
  81. package/fesm2022/caribeng-ui-inlinemessage.mjs +2 -2
  82. package/fesm2022/caribeng-ui-inplace.mjs +22 -6
  83. package/fesm2022/caribeng-ui-input-number.mjs +9 -7
  84. package/fesm2022/caribeng-ui-inputgroup.mjs +2 -2
  85. package/fesm2022/caribeng-ui-inputmask.mjs +22 -13
  86. package/fesm2022/caribeng-ui-inputotp.mjs +12 -6
  87. package/fesm2022/caribeng-ui-kanban.mjs +4612 -0
  88. package/fesm2022/caribeng-ui-kbd.mjs +122 -0
  89. package/fesm2022/caribeng-ui-keyfilter.mjs +72 -0
  90. package/fesm2022/caribeng-ui-listbox.mjs +13 -11
  91. package/fesm2022/caribeng-ui-megamenu.mjs +228 -32
  92. package/fesm2022/caribeng-ui-mentions.mjs +495 -0
  93. package/fesm2022/caribeng-ui-menu.mjs +18 -8
  94. package/fesm2022/caribeng-ui-menubar.mjs +17 -8
  95. package/fesm2022/caribeng-ui-message.mjs +13 -7
  96. package/fesm2022/caribeng-ui-metergroup.mjs +29 -11
  97. package/fesm2022/caribeng-ui-multiselect.mjs +399 -97
  98. package/fesm2022/caribeng-ui-orderlist.mjs +230 -11
  99. package/fesm2022/caribeng-ui-organizationchart.mjs +16 -15
  100. package/fesm2022/caribeng-ui-paginator.mjs +18 -15
  101. package/fesm2022/caribeng-ui-panel.mjs +11 -8
  102. package/fesm2022/caribeng-ui-panelmenu.mjs +14 -8
  103. package/fesm2022/caribeng-ui-password.mjs +8 -6
  104. package/fesm2022/caribeng-ui-pdfviewer.mjs +1553 -0
  105. package/fesm2022/caribeng-ui-phone-input.mjs +688 -0
  106. package/fesm2022/caribeng-ui-picklist.mjs +251 -14
  107. package/fesm2022/caribeng-ui-pricing.mjs +272 -75
  108. package/fesm2022/caribeng-ui-qrcode.mjs +564 -0
  109. package/fesm2022/caribeng-ui-rating.mjs +7 -3
  110. package/fesm2022/caribeng-ui-repeater.mjs +223 -0
  111. package/fesm2022/caribeng-ui-result.mjs +91 -0
  112. package/fesm2022/caribeng-ui-ripple.mjs +2 -0
  113. package/fesm2022/caribeng-ui-scrollpanel.mjs +6 -3
  114. package/fesm2022/caribeng-ui-scrolltop.mjs +9 -4
  115. package/fesm2022/caribeng-ui-select.mjs +379 -87
  116. package/fesm2022/caribeng-ui-selectbutton.mjs +2 -2
  117. package/fesm2022/caribeng-ui-sidebar.mjs +573 -0
  118. package/fesm2022/caribeng-ui-slider.mjs +171 -75
  119. package/fesm2022/caribeng-ui-speeddial.mjs +7 -4
  120. package/fesm2022/caribeng-ui-spinner.mjs +5 -2
  121. package/fesm2022/caribeng-ui-splitbutton.mjs +163 -0
  122. package/fesm2022/caribeng-ui-splitter.mjs +5 -2
  123. package/fesm2022/caribeng-ui-statistic.mjs +183 -0
  124. package/fesm2022/caribeng-ui-stepper.mjs +17 -7
  125. package/fesm2022/caribeng-ui-steps.mjs +6 -3
  126. package/fesm2022/caribeng-ui-table.mjs +716 -84
  127. package/fesm2022/caribeng-ui-tabmenu.mjs +13 -6
  128. package/fesm2022/caribeng-ui-tag.mjs +2 -2
  129. package/fesm2022/caribeng-ui-terminal.mjs +45 -9
  130. package/fesm2022/caribeng-ui-themetoggle.mjs +82 -0
  131. package/fesm2022/caribeng-ui-tieredmenu.mjs +113 -20
  132. package/fesm2022/caribeng-ui-timeline.mjs +175 -6
  133. package/fesm2022/caribeng-ui-toast.mjs +7 -4
  134. package/fesm2022/caribeng-ui-togglebutton.mjs +8 -6
  135. package/fesm2022/caribeng-ui-toolbar.mjs +6 -3
  136. package/fesm2022/caribeng-ui-tree.mjs +302 -6
  137. package/fesm2022/caribeng-ui-treeselect.mjs +26 -10
  138. package/fesm2022/caribeng-ui-treetable.mjs +269 -6
  139. package/fesm2022/caribeng-ui-virtualscroller.mjs +123 -10
  140. package/fesm2022/caribeng-ui.mjs +1216 -6
  141. package/package.json +93 -3
  142. package/schematics/collection.json +15 -0
  143. package/schematics/migrate-from-primeng/core-icons.json +1 -0
  144. package/schematics/migrate-from-primeng/icons.js +269 -0
  145. package/schematics/migrate-from-primeng/index.js +290 -0
  146. package/schematics/migrate-from-primeng/mappings/button.js +93 -0
  147. package/schematics/migrate-from-primeng/mappings/card.js +33 -0
  148. package/schematics/migrate-from-primeng/mappings/checkbox.js +44 -0
  149. package/schematics/migrate-from-primeng/mappings/confirm.js +221 -0
  150. package/schematics/migrate-from-primeng/mappings/datepicker.js +121 -0
  151. package/schematics/migrate-from-primeng/mappings/dialog.js +84 -0
  152. package/schematics/migrate-from-primeng/mappings/index.js +88 -0
  153. package/schematics/migrate-from-primeng/mappings/inputnumber.js +62 -0
  154. package/schematics/migrate-from-primeng/mappings/inputtext.js +60 -0
  155. package/schematics/migrate-from-primeng/mappings/menu.js +468 -0
  156. package/schematics/migrate-from-primeng/mappings/multiselect.js +49 -0
  157. package/schematics/migrate-from-primeng/mappings/radiobutton.js +22 -0
  158. package/schematics/migrate-from-primeng/mappings/rules.js +206 -0
  159. package/schematics/migrate-from-primeng/mappings/select.js +97 -0
  160. package/schematics/migrate-from-primeng/mappings/service-calls.js +100 -0
  161. package/schematics/migrate-from-primeng/mappings/table.js +613 -0
  162. package/schematics/migrate-from-primeng/mappings/tabs.js +225 -0
  163. package/schematics/migrate-from-primeng/mappings/tag.js +29 -0
  164. package/schematics/migrate-from-primeng/mappings/textarea.js +44 -0
  165. package/schematics/migrate-from-primeng/mappings/toast.js +173 -0
  166. package/schematics/migrate-from-primeng/mappings/toggleswitch.js +37 -0
  167. package/schematics/migrate-from-primeng/mappings/tooltip.js +44 -0
  168. package/schematics/migrate-from-primeng/mappings/types.js +10 -0
  169. package/schematics/migrate-from-primeng/report.js +79 -0
  170. package/schematics/migrate-from-primeng/schema.js +2 -0
  171. package/schematics/migrate-from-primeng/schema.json +34 -0
  172. package/schematics/migrate-from-primeng/template.js +387 -0
  173. package/schematics/migrate-from-primeng/todo.js +5 -0
  174. package/schematics/migrate-from-primeng/typescript.js +442 -0
  175. package/schematics/migrate-from-primeng/workspace.js +117 -0
  176. package/schematics/ng-add/index.js +140 -0
  177. package/schematics/ng-add/schema.js +2 -0
  178. package/schematics/ng-add/schema.json +66 -0
  179. package/types/caribeng-ui-anchor.d.ts +50 -0
  180. package/types/caribeng-ui-autocomplete.d.ts +4 -2
  181. package/types/caribeng-ui-avatargroup.d.ts +3 -1
  182. package/types/caribeng-ui-badge.d.ts +3 -1
  183. package/types/caribeng-ui-blockui.d.ts +9 -4
  184. package/types/caribeng-ui-breadcrumb.d.ts +11 -0
  185. package/types/caribeng-ui-button.d.ts +9 -1
  186. package/types/caribeng-ui-caribe-alert.d.ts +3 -0
  187. package/types/caribeng-ui-caribe-animation-lottie.d.ts +4 -1
  188. package/types/caribeng-ui-caribe-button-group.d.ts +4 -1
  189. package/types/caribeng-ui-caribe-calendar.d.ts +5 -1
  190. package/types/caribeng-ui-caribe-card-content.d.ts +4 -1
  191. package/types/caribeng-ui-caribe-card-move.d.ts +13 -13
  192. package/types/caribeng-ui-caribe-card-select.d.ts +10 -1
  193. package/types/caribeng-ui-caribe-circle-loading.d.ts +4 -1
  194. package/types/caribeng-ui-caribe-coachmark.d.ts +6 -0
  195. package/types/caribeng-ui-caribe-data-table.d.ts +7 -2
  196. package/types/caribeng-ui-caribe-dots-indicator.d.ts +9 -0
  197. package/types/caribeng-ui-caribe-expansion-panel.d.ts +7 -10
  198. package/types/caribeng-ui-caribe-fab-menu.d.ts +10 -1
  199. package/types/caribeng-ui-caribe-file-download.d.ts +8 -10
  200. package/types/caribeng-ui-caribe-file-select.d.ts +7 -1
  201. package/types/caribeng-ui-caribe-float-menu.d.ts +4 -1
  202. package/types/caribeng-ui-caribe-header.d.ts +3 -0
  203. package/types/caribeng-ui-caribe-icon-button.d.ts +4 -1
  204. package/types/caribeng-ui-caribe-illustration.d.ts +4 -1
  205. package/types/caribeng-ui-caribe-inline-alert.d.ts +3 -0
  206. package/types/caribeng-ui-caribe-input-search.d.ts +4 -2
  207. package/types/caribeng-ui-caribe-input-select.d.ts +4 -2
  208. package/types/caribeng-ui-caribe-input-token.d.ts +16 -1
  209. package/types/caribeng-ui-caribe-link.d.ts +3 -0
  210. package/types/caribeng-ui-caribe-loader.d.ts +4 -1
  211. package/types/caribeng-ui-caribe-modal.d.ts +7 -10
  212. package/types/caribeng-ui-caribe-off-canvas.d.ts +6 -1
  213. package/types/caribeng-ui-caribe-onboarding.d.ts +6 -0
  214. package/types/caribeng-ui-caribe-pictogram.d.ts +4 -1
  215. package/types/caribeng-ui-caribe-pop-over.d.ts +7 -10
  216. package/types/caribeng-ui-caribe-preloader.d.ts +4 -1
  217. package/types/caribeng-ui-caribe-progress-bar.d.ts +3 -0
  218. package/types/caribeng-ui-caribe-shortcut.d.ts +3 -1
  219. package/types/caribeng-ui-caribe-step-indicator.d.ts +6 -0
  220. package/types/caribeng-ui-caribe-stroke.d.ts +4 -1
  221. package/types/caribeng-ui-caribe-switch.d.ts +3 -1
  222. package/types/caribeng-ui-caribe-tracker.d.ts +3 -0
  223. package/types/caribeng-ui-caribe-voucher.d.ts +5 -2
  224. package/types/caribeng-ui-carousel.d.ts +10 -1
  225. package/types/caribeng-ui-cascadeselect.d.ts +7 -2
  226. package/types/caribeng-ui-chart.d.ts +471 -44
  227. package/types/caribeng-ui-chat.d.ts +299 -0
  228. package/types/caribeng-ui-chip.d.ts +6 -0
  229. package/types/caribeng-ui-chips.d.ts +6 -2
  230. package/types/caribeng-ui-code-block.d.ts +65 -0
  231. package/types/caribeng-ui-colorpicker.d.ts +8 -2
  232. package/types/caribeng-ui-command-palette.d.ts +133 -0
  233. package/types/caribeng-ui-confirmdialog.d.ts +57 -6
  234. package/types/caribeng-ui-confirmpopup.d.ts +74 -5
  235. package/types/caribeng-ui-contextmenu.d.ts +11 -1
  236. package/types/caribeng-ui-copy-button.d.ts +90 -0
  237. package/types/caribeng-ui-dataview.d.ts +65 -5
  238. package/types/caribeng-ui-datepicker.d.ts +186 -21
  239. package/types/caribeng-ui-descriptions.d.ts +63 -0
  240. package/types/caribeng-ui-dialog.d.ts +4 -1
  241. package/types/caribeng-ui-dock.d.ts +17 -2
  242. package/types/caribeng-ui-drawer.d.ts +7 -2
  243. package/types/caribeng-ui-dynamicdialog.d.ts +93 -3
  244. package/types/caribeng-ui-editor.d.ts +486 -13
  245. package/types/caribeng-ui-empty.d.ts +34 -0
  246. package/types/caribeng-ui-file-card.d.ts +28 -3
  247. package/types/caribeng-ui-fileupload.d.ts +27 -4
  248. package/types/caribeng-ui-folder-card.d.ts +31 -6
  249. package/types/caribeng-ui-galleria.d.ts +9 -0
  250. package/types/caribeng-ui-image.d.ts +10 -0
  251. package/types/caribeng-ui-inplace.d.ts +8 -0
  252. package/types/caribeng-ui-input-number.d.ts +3 -1
  253. package/types/caribeng-ui-inputmask.d.ts +8 -1
  254. package/types/caribeng-ui-inputotp.d.ts +7 -2
  255. package/types/caribeng-ui-kanban.d.ts +783 -0
  256. package/types/caribeng-ui-kbd.d.ts +36 -0
  257. package/types/caribeng-ui-keyfilter.d.ts +30 -0
  258. package/types/caribeng-ui-listbox.d.ts +5 -3
  259. package/types/caribeng-ui-megamenu.d.ts +37 -2
  260. package/types/caribeng-ui-mentions.d.ts +127 -0
  261. package/types/caribeng-ui-menu.d.ts +14 -2
  262. package/types/caribeng-ui-menubar.d.ts +12 -1
  263. package/types/caribeng-ui-message.d.ts +5 -0
  264. package/types/caribeng-ui-metergroup.d.ts +9 -1
  265. package/types/caribeng-ui-multiselect.d.ts +71 -10
  266. package/types/caribeng-ui-orderlist.d.ts +58 -6
  267. package/types/caribeng-ui-organizationchart.d.ts +7 -1
  268. package/types/caribeng-ui-paginator.d.ts +3 -0
  269. package/types/caribeng-ui-panel.d.ts +3 -0
  270. package/types/caribeng-ui-panelmenu.d.ts +11 -1
  271. package/types/caribeng-ui-password.d.ts +4 -2
  272. package/types/caribeng-ui-pdfviewer.d.ts +258 -0
  273. package/types/caribeng-ui-phone-input.d.ts +168 -0
  274. package/types/caribeng-ui-picklist.d.ts +67 -7
  275. package/types/caribeng-ui-pricing.d.ts +49 -9
  276. package/types/caribeng-ui-qrcode.d.ts +88 -0
  277. package/types/caribeng-ui-rating.d.ts +6 -2
  278. package/types/caribeng-ui-repeater.d.ts +79 -0
  279. package/types/caribeng-ui-result.d.ts +35 -0
  280. package/types/caribeng-ui-scrollpanel.d.ts +4 -1
  281. package/types/caribeng-ui-scrolltop.d.ts +4 -1
  282. package/types/caribeng-ui-select.d.ts +73 -9
  283. package/types/caribeng-ui-sidebar.d.ts +167 -0
  284. package/types/caribeng-ui-slider.d.ts +63 -10
  285. package/types/caribeng-ui-speeddial.d.ts +5 -2
  286. package/types/caribeng-ui-spinner.d.ts +3 -0
  287. package/types/caribeng-ui-splitbutton.d.ts +49 -0
  288. package/types/caribeng-ui-splitter.d.ts +3 -0
  289. package/types/caribeng-ui-statistic.d.ts +65 -0
  290. package/types/caribeng-ui-stepper.d.ts +5 -0
  291. package/types/caribeng-ui-steps.d.ts +4 -1
  292. package/types/caribeng-ui-table.d.ts +185 -17
  293. package/types/caribeng-ui-tabmenu.d.ts +11 -1
  294. package/types/caribeng-ui-terminal.d.ts +10 -0
  295. package/types/caribeng-ui-themetoggle.d.ts +32 -0
  296. package/types/caribeng-ui-tieredmenu.d.ts +22 -3
  297. package/types/caribeng-ui-timeline.d.ts +63 -4
  298. package/types/caribeng-ui-toast.d.ts +3 -0
  299. package/types/caribeng-ui-togglebutton.d.ts +5 -3
  300. package/types/caribeng-ui-toolbar.d.ts +7 -4
  301. package/types/caribeng-ui-tree.d.ts +76 -4
  302. package/types/caribeng-ui-treeselect.d.ts +10 -2
  303. package/types/caribeng-ui-treetable.d.ts +68 -4
  304. package/types/caribeng-ui-virtualscroller.d.ts +45 -5
  305. package/types/caribeng-ui.d.ts +775 -12
@@ -0,0 +1,290 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.migrateFromPrimeng = migrateFromPrimeng;
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const tasks_1 = require("@angular-devkit/schematics/tasks");
6
+ const utility_1 = require("@schematics/angular/utility");
7
+ const index_1 = require("../ng-add/index");
8
+ const icons_1 = require("./icons");
9
+ const mappings_1 = require("./mappings");
10
+ const report_1 = require("./report");
11
+ const template_1 = require("./template");
12
+ const typescript_1 = require("./typescript");
13
+ const workspace_1 = require("./workspace");
14
+ /** Versión mínima de PrimeNG con la que se escribieron los mapeos (`p-select` existe desde la 18). */
15
+ const MIN_PRIMENG_MAJOR = 18;
16
+ const STYLESHEET = /\.(css|scss|sass|less)$/;
17
+ const WORKSPACE_CONFIG = /(^|\/)(angular|project)\.json$/;
18
+ /**
19
+ * `ng generate @caribeng/ui:migrate-from-primeng`: traduce un proyecto
20
+ * PrimeNG a CaribeNG. Cambia imports, plantillas, iconos, estilos y el
21
+ * proveedor; lo que no puede traducir con seguridad lo marca con
22
+ * `TODO(caribeng)` y lo resume en `caribeng-migration-report.md`.
23
+ */
24
+ function migrateFromPrimeng(options) {
25
+ return async (tree, context) => {
26
+ checkPreconditions(tree, options);
27
+ context.logger.info('Migrando de PrimeNG a CaribeNG. Revisa el resultado con `git diff` antes de hacer commit.');
28
+ const migration = {
29
+ compiler: await (0, template_1.loadCompiler)(),
30
+ context,
31
+ changed: new Set(),
32
+ icons: new Map(),
33
+ templates: new Set(),
34
+ manual: [],
35
+ };
36
+ const root = normalizeRoot(options.path);
37
+ const files = (0, workspace_1.workspaceFiles)(tree, root);
38
+ for (const path of files) {
39
+ if (/\.(ts|mts)$/.test(path) && !path.endsWith('.d.ts'))
40
+ migrateSource(tree, path, migration);
41
+ }
42
+ for (const path of files) {
43
+ if (path.endsWith('.html') && !migration.templates.has(path))
44
+ migrateHtml(tree, path, migration);
45
+ else if (STYLESHEET.test(path))
46
+ migrateStylesheet(tree, path, migration);
47
+ }
48
+ for (const path of (0, workspace_1.workspaceFiles)(tree)) {
49
+ if (WORKSPACE_CONFIG.test(path) && (0, workspace_1.removePrimeStyleEntries)(tree, path, context))
50
+ migration.changed.add(path);
51
+ }
52
+ const apps = await applications(tree, context);
53
+ return (0, schematics_1.chain)([
54
+ ...apps.map((app) => (0, index_1.addStyles)(app.name)),
55
+ ...apps.map((app) => ensureProvider(app)),
56
+ ...apps.map((app) => registerIcons(app, migration)),
57
+ finish(options, migration),
58
+ ]);
59
+ };
60
+ }
61
+ function checkPreconditions(tree, options) {
62
+ const pkg = (0, workspace_1.readPackageJson)(tree);
63
+ if (!pkg)
64
+ throw new schematics_1.SchematicsException('No se encontró package.json en la raíz del workspace.');
65
+ if (options.force)
66
+ return;
67
+ if (!(0, workspace_1.dependencyVersion)(pkg, '@caribeng/ui')) {
68
+ throw new schematics_1.SchematicsException('Instala CaribeNG antes de migrar:\n npm install @caribeng/ui@22\nUsa --force para migrar igualmente.');
69
+ }
70
+ const primeng = (0, workspace_1.dependencyVersion)(pkg, 'primeng');
71
+ if (!primeng)
72
+ throw new schematics_1.SchematicsException('primeng no está en package.json. Usa --force para migrar igualmente.');
73
+ const major = (0, workspace_1.majorOf)(primeng);
74
+ if (major !== null && major < MIN_PRIMENG_MAJOR) {
75
+ throw new schematics_1.SchematicsException(`Se encontró PrimeNG ${primeng}. El migrador admite PrimeNG ${MIN_PRIMENG_MAJOR} o superior: actualiza primero (ng update primeng@${MIN_PRIMENG_MAJOR}) o usa --force.`);
76
+ }
77
+ }
78
+ function normalizeRoot(path) {
79
+ const clean = (path ?? '/').replace(/\\/g, '/').replace(/^\.?\/*/, '/').replace(/\/+$/, '');
80
+ return clean || '/';
81
+ }
82
+ function dirname(path) {
83
+ return path.slice(0, path.lastIndexOf('/')) || '/';
84
+ }
85
+ /** `../shared/x.html` relativo a `/src/app/a/a.ts` → `/src/app/shared/x.html`. */
86
+ function resolvePath(from, relative) {
87
+ const parts = dirname(from).split('/');
88
+ for (const part of relative.replace(/^\.\//, '').split('/')) {
89
+ if (part === '..')
90
+ parts.pop();
91
+ else if (part !== '.')
92
+ parts.push(part);
93
+ }
94
+ return parts.join('/');
95
+ }
96
+ /** Tags (`cb-button`) y directivas (`cbTooltip`) CaribeNG que aparecen en `after` pero no en `before` → símbolos a importar. */
97
+ function introducedSymbols(before, after) {
98
+ // Los avisos TODO(caribeng) citan tags de CaribeNG (`<cb-radio-group>`): los comentarios no cuentan.
99
+ const code = (text) => text.replace(/<!--[\s\S]*?-->/g, '');
100
+ const tags = (text) => new Set([...code(text).matchAll(/<(cb-[a-z0-9-]+)/g)].map((m) => m[1]));
101
+ const attrs = (text) => new Set([...code(text).matchAll(/[\s[](cb[A-Z][A-Za-z]*)\]?(?=[\s=/>])/g)].map((m) => m[1]));
102
+ const symbols = new Map();
103
+ for (const [found, index] of [
104
+ [tags, mappings_1.TAG_SYMBOLS],
105
+ [attrs, mappings_1.ATTR_SYMBOLS],
106
+ ]) {
107
+ const previous = found(before);
108
+ for (const name of found(after)) {
109
+ const symbol = index.get(name);
110
+ if (symbol && !previous.has(name))
111
+ symbols.set(symbol.name, symbol);
112
+ }
113
+ }
114
+ return [...symbols.values()];
115
+ }
116
+ /**
117
+ * Módulos PrimeNG que el componente importaba y que su plantilla migrada aún
118
+ * necesita porque algún elemento no se pudo convertir (p. ej. una p-table con
119
+ * columnas dinámicas): se vuelven a importar para que siga compilando.
120
+ */
121
+ function keptPrimengModules(source, template) {
122
+ const code = template.replace(/<!--[\s\S]*?-->/g, '');
123
+ const kept = new Map();
124
+ for (const [tag, mapping] of mappings_1.MAPPING_BY_TAG) {
125
+ if (!new RegExp(`<${tag}[\\s/>]`).test(code))
126
+ continue;
127
+ for (const [module, symbols] of Object.entries(mapping.modules)) {
128
+ const name = Object.keys(symbols).find((symbol) => new RegExp(`import\\s*\\{[^}]*\\b${symbol}\\b[^}]*\\}\\s*from\\s*['"]${module}['"]`).test(source));
129
+ if (name)
130
+ kept.set(name, { name, entry: module });
131
+ }
132
+ }
133
+ return [...kept.values()];
134
+ }
135
+ function addIcons(migration, path, icons) {
136
+ if (!icons.size)
137
+ return;
138
+ const set = migration.icons.get(path) ?? new Set();
139
+ icons.forEach((icon) => set.add(icon));
140
+ migration.icons.set(path, set);
141
+ }
142
+ /** Un `.ts`: imports, plantilla (en línea o `templateUrl`) e `imports` del componente. */
143
+ function migrateSource(tree, path, migration) {
144
+ const original = tree.readText(path);
145
+ // Las plantillas (sin migrar) dicen qué menú recibe cada array de MenuItem.
146
+ const templates = (0, typescript_1.findComponents)(path, original).flatMap((component) => {
147
+ if (component.inlineTemplate !== undefined)
148
+ return [component.inlineTemplate];
149
+ const templatePath = component.templateUrl && resolvePath(path, component.templateUrl);
150
+ return templatePath && tree.exists(templatePath) ? [tree.readText(templatePath)] : [];
151
+ });
152
+ const imported = (0, typescript_1.rewriteImports)(path, original, templates);
153
+ addIcons(migration, path, imported.icons);
154
+ let text = imported.text;
155
+ const needed = new Map();
156
+ for (const component of (0, typescript_1.findComponents)(path, text)) {
157
+ let before;
158
+ let after;
159
+ if (component.inlineTemplate !== undefined) {
160
+ const result = (0, template_1.rewriteTemplate)(migration.compiler, component.inlineTemplate, path);
161
+ if (result.error)
162
+ migration.context.logger.warn(`${path}: la plantilla no se pudo analizar y no se migró.\n${result.error}`);
163
+ if (result.changed) {
164
+ text = (0, typescript_1.replaceInlineTemplate)(path, text, component.index, result.text);
165
+ [before, after] = [component.inlineTemplate, result.text];
166
+ addIcons(migration, path, result.icons);
167
+ }
168
+ }
169
+ else if (component.templateUrl) {
170
+ const templatePath = resolvePath(path, component.templateUrl);
171
+ if (!tree.exists(templatePath) || migration.templates.has(templatePath))
172
+ continue;
173
+ migration.templates.add(templatePath);
174
+ const html = tree.readText(templatePath);
175
+ const result = (0, template_1.rewriteTemplate)(migration.compiler, html, templatePath);
176
+ if (result.error)
177
+ migration.context.logger.warn(`${templatePath}: la plantilla no se pudo analizar y no se migró.\n${result.error}`);
178
+ if (result.changed) {
179
+ tree.overwrite(templatePath, result.text);
180
+ migration.changed.add(templatePath);
181
+ [before, after] = [html, result.text];
182
+ addIcons(migration, templatePath, result.icons);
183
+ }
184
+ }
185
+ if (before !== undefined && after !== undefined) {
186
+ needed.set(component.index, [...introducedSymbols(before, after), ...keptPrimengModules(original, after)]);
187
+ }
188
+ }
189
+ const imports = (0, typescript_1.ensureComponentImports)(path, text, needed);
190
+ text = imports.text;
191
+ migration.manual.push(...imports.manual.map((name) => `\`${path.slice(1)}\`: añade \`${name}\` a los imports del NgModule que declara el componente.`));
192
+ if (text !== original) {
193
+ tree.overwrite(path, text);
194
+ migration.changed.add(path);
195
+ }
196
+ }
197
+ /** Un `.html` que no es plantilla de ningún componente migrado (p. ej. de otro proyecto). */
198
+ function migrateHtml(tree, path, migration) {
199
+ const result = (0, template_1.rewriteTemplate)(migration.compiler, tree.readText(path), path);
200
+ if (result.error) {
201
+ migration.context.logger.warn(`${path}: no se pudo analizar y no se migró.`);
202
+ return;
203
+ }
204
+ if (!result.changed)
205
+ return;
206
+ tree.overwrite(path, result.text);
207
+ migration.changed.add(path);
208
+ addIcons(migration, path, result.icons);
209
+ if (introducedSymbols('', result.text).length) {
210
+ migration.manual.push(`\`${path.slice(1)}\`: no se encontró su componente; importa los componentes CaribeNG que usa.`);
211
+ }
212
+ }
213
+ function migrateStylesheet(tree, path, migration) {
214
+ const original = tree.readText(path);
215
+ const text = (0, workspace_1.removePrimeStyleImports)(original);
216
+ if (text === original)
217
+ return;
218
+ tree.overwrite(path, text);
219
+ migration.changed.add(path);
220
+ }
221
+ /** Aplicaciones de angular.json. En workspaces sin angular.json (Nx) devuelve [] y avisa. */
222
+ async function applications(tree, context) {
223
+ try {
224
+ const workspace = await (0, utility_1.readWorkspace)(tree);
225
+ return [...workspace.projects.entries()]
226
+ .filter(([, project]) => project.extensions['projectType'] === 'application')
227
+ .map(([name, project]) => {
228
+ const root = project.root ? `/${project.root.replace(/^\/|\/$/g, '')}` : '';
229
+ return { name, root, sourceRoot: project.sourceRoot ? `/${project.sourceRoot.replace(/^\/|\/$/g, '')}` : `${root}/src` };
230
+ });
231
+ }
232
+ catch {
233
+ context.logger.warn('No se encontró angular.json: añade a mano @caribeng/ui/styles.css a los estilos y provideCaribeNG() a la configuración de la app.');
234
+ return [];
235
+ }
236
+ }
237
+ /** Si la app no tiene provideCaribeNG() (no usaba providePrimeNG), se añade. */
238
+ function ensureProvider(app) {
239
+ return (tree) => {
240
+ if ((0, index_1.containsText)(tree, app.sourceRoot, 'provideCaribeNG('))
241
+ return;
242
+ return (0, utility_1.addRootProvider)(app.name, ({ code, external }) => code `${external('provideCaribeNG', '@caribeng/ui')}(${typescript_1.PROVIDER_CONFIG})`);
243
+ };
244
+ }
245
+ /** Registra con provideCbIcons los iconos usados que no son del set núcleo. */
246
+ function registerIcons(app, migration) {
247
+ return () => {
248
+ const names = new Set();
249
+ for (const [path, icons] of migration.icons) {
250
+ if (path.startsWith(`${app.root}/`) || app.root === '')
251
+ icons.forEach((icon) => (0, icons_1.isCoreIcon)(icon) || names.add(icon));
252
+ }
253
+ if (!names.size)
254
+ return;
255
+ return (0, utility_1.addRootProvider)(app.name, ({ code, external }) => {
256
+ const entries = [...names].sort().map((name) => `'${name}': ${external((0, icons_1.catalogExport)(name), '@caribeng/ui/icons')}`);
257
+ const expression = `${external('provideCbIcons', '@caribeng/ui/icon')}({ ${entries.join(', ')} })`;
258
+ return code(Object.assign([expression], { raw: [expression] }));
259
+ });
260
+ };
261
+ }
262
+ /** Informe, limpieza de package.json e instalación. */
263
+ function finish(options, migration) {
264
+ return (tree, context) => {
265
+ const scan = (0, report_1.scanWorkspace)(tree);
266
+ const removed = scan.leftovers.length === 0 && options.removePrimeng !== false ? (0, workspace_1.removePrimeDependencies)(tree) : [];
267
+ if (options.report !== false) {
268
+ const report = (0, report_1.renderReport)({ scan, changedFiles: [...migration.changed], manual: migration.manual, removedPackages: removed });
269
+ if (tree.exists(report_1.REPORT_PATH))
270
+ tree.overwrite(report_1.REPORT_PATH, report);
271
+ else
272
+ tree.create(report_1.REPORT_PATH, report);
273
+ }
274
+ context.logger.info(`✔ ${migration.changed.size} archivo(s) migrado(s).`);
275
+ if (removed.length)
276
+ context.logger.info(`✔ Eliminados de package.json: ${removed.join(', ')}.`);
277
+ if (scan.todos.length)
278
+ context.logger.warn(`⚠ ${scan.todos.length} aviso(s) TODO(caribeng) para revisar.`);
279
+ if (scan.leftovers.length) {
280
+ context.logger.warn(`⚠ Quedan ${scan.leftovers.length} referencia(s) a PrimeNG sin migrar; PrimeNG sigue instalado mientras tanto.`);
281
+ }
282
+ if (migration.manual.length)
283
+ context.logger.warn(`⚠ ${migration.manual.length} import(s) que añadir a mano.`);
284
+ if (options.report !== false && (scan.todos.length || scan.leftovers.length || migration.manual.length)) {
285
+ context.logger.info(` Detalle en ${report_1.REPORT_PATH.slice(1)}`);
286
+ }
287
+ if (removed.length && !options.skipInstall)
288
+ context.addTask(new tasks_1.NodePackageInstallTask());
289
+ };
290
+ }
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.button = void 0;
4
+ const icons_1 = require("../icons");
5
+ const rules_1 = require("./rules");
6
+ /**
7
+ * `<p-button label="Guardar" icon="pi pi-check" [outlined]="true" />`
8
+ * → `<cb-button variant="outlined"><cb-icon name="check" />Guardar</cb-button>`
9
+ */
10
+ const rules = {
11
+ // label, icon e iconPos se combinan en `finalize` (pasan a ser contenido).
12
+ label: (0, rules_1.drop)(),
13
+ icon: (0, rules_1.drop)(),
14
+ iconPos: (0, rules_1.drop)(),
15
+ severity: (0, rules_1.values)('severity', rules_1.SEVERITY_VALUES),
16
+ outlined: (0, rules_1.flagToValue)('variant', 'outlined', 'solid'),
17
+ text: (0, rules_1.flagToValue)('variant', 'text', 'solid'),
18
+ size: (0, rules_1.values)('size', rules_1.SIZE_VALUES),
19
+ fluid: (0, rules_1.rename)('fullWidth'),
20
+ styleClass: (0, rules_1.styleClass)(),
21
+ raised: (0, rules_1.unsupported)('cb-button no tiene variante elevada; usa una clase propia.'),
22
+ rounded: (0, rules_1.unsupported)('cb-button no tiene variante redondeada; usa una clase propia o <cb-icon-button>.'),
23
+ plain: (0, rules_1.unsupported)('sin equivalente; usa severity="secondary".'),
24
+ link: (0, rules_1.unsupported)('para enlaces usa <cb-link>.'),
25
+ badge: (0, rules_1.unsupported)('usa un <cb-badge> dentro del botón.'),
26
+ badgeClass: (0, rules_1.unsupported)('usa un <cb-badge> dentro del botón.'),
27
+ badgeSeverity: (0, rules_1.unsupported)('usa un <cb-badge> dentro del botón.'),
28
+ loadingIcon: (0, rules_1.unsupported)('cb-button usa su propio spinner.'),
29
+ buttonProps: (0, rules_1.unsupported)('pasa cada propiedad como input de cb-button.'),
30
+ tabindex: (0, rules_1.unsupported)('el tabindex no se reenvía al <button> interno.'),
31
+ autofocus: (0, rules_1.unsupported)('usa la directiva cbAutoFocus de @caribeng/ui/autofocus.'),
32
+ '(onClick)': (0, rules_1.event)('click'),
33
+ ...rules_1.FOCUS_EVENTS,
34
+ };
35
+ const same = ['variant', 'disabled', 'loading', 'type', 'ariaLabel'];
36
+ /** Convierte `label`, `icon` e `iconPos` en el contenido del botón. */
37
+ function finalize(el) {
38
+ const label = el.find('label');
39
+ const icon = el.find('icon');
40
+ const position = el.find('iconPos');
41
+ let text = '';
42
+ if (label?.kind === 'static')
43
+ text = label.value.includes('{{') ? label.value : (0, rules_1.escapeText)(label.value);
44
+ else if (label?.kind === 'property')
45
+ text = `{{ ${label.value} }}`;
46
+ let iconTag = '';
47
+ if (icon?.kind === 'static') {
48
+ const parsed = (0, icons_1.parsePrimeIcon)(icon.value);
49
+ if (parsed?.name) {
50
+ iconTag = `<cb-icon name="${parsed.name}"${parsed.spin ? ' spin' : ''} />`;
51
+ el.icons.add(parsed.name);
52
+ }
53
+ else {
54
+ el.todos.push(`${icon.source} — ${parsed ? `el icono pi-${parsed.prime} no tiene equivalente conocido` : 'icono que no es de PrimeIcons'}; añade un <cb-icon> dentro del botón.`);
55
+ }
56
+ }
57
+ else if (icon) {
58
+ el.todos.push(`${icon.source} — icono dinámico: usa <cb-icon [name]="…" /> dentro del botón.`);
59
+ }
60
+ let after = false;
61
+ if (position?.kind === 'static' && position.value === 'right')
62
+ after = true;
63
+ else if (position && !(position.kind === 'static' && position.value === 'left')) {
64
+ el.todos.push(`${position.source} — cb-button coloca el icono donde lo pongas en el contenido.`);
65
+ }
66
+ if (iconTag && after) {
67
+ if (text)
68
+ el.before.push(text);
69
+ el.after.push(iconTag);
70
+ }
71
+ else {
72
+ if (iconTag)
73
+ el.before.push(iconTag);
74
+ if (text)
75
+ el.before.push(text);
76
+ }
77
+ const hasName = el.attrs.some((attr) => /^(\[?ariaLabel\]?|aria-label|\[attr\.aria-label\])=/.test(attr));
78
+ if (icon && !label && !hasName) {
79
+ el.todos.push('botón solo con icono: añade ariaLabel="…" para que tenga nombre accesible.');
80
+ }
81
+ }
82
+ exports.button = {
83
+ name: 'button',
84
+ entry: '@caribeng/ui/button',
85
+ symbol: 'CbButton',
86
+ modules: {
87
+ 'primeng/button': { ButtonModule: 'CbButton', Button: 'CbButton', ButtonDirective: 'CbButton' },
88
+ },
89
+ elements: [
90
+ { tag: 'p-button', to: 'cb-button', rules, finalize, same },
91
+ { attr: 'pButton', on: ['button'], otherTags: 'para enlaces usa <cb-link>.', to: 'cb-button', rules, finalize, same },
92
+ ],
93
+ };
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.card = void 0;
4
+ const rules_1 = require("./rules");
5
+ const TEXT_ONLY = 'cb-card solo admite título y subtítulo de texto (inputs header y subtitle).';
6
+ /**
7
+ * `<p-card header="Resumen" subheader="Octubre"><ng-template #footer>…</ng-template></p-card>`
8
+ * → `<cb-card header="Resumen" subtitle="Octubre"><div cb-card-footer>…</div></cb-card>`
9
+ */
10
+ exports.card = {
11
+ name: 'card',
12
+ entry: '@caribeng/ui/card',
13
+ symbol: 'CbCard',
14
+ modules: {
15
+ 'primeng/card': { CardModule: 'CbCard', Card: 'CbCard' },
16
+ },
17
+ elements: [
18
+ {
19
+ tag: 'p-card',
20
+ to: 'cb-card',
21
+ rules: {
22
+ subheader: (0, rules_1.rename)('subtitle'),
23
+ styleClass: (0, rules_1.styleClass)(),
24
+ },
25
+ child: (0, rules_1.slotChild)('cb-card', 'cb-card-footer', {
26
+ header: 'cb-card no tiene zona de cabecera (p. ej. una imagen); ponla al principio del contenido.',
27
+ title: TEXT_ONLY,
28
+ subtitle: TEXT_ONLY,
29
+ }),
30
+ same: ['header'],
31
+ },
32
+ ],
33
+ };
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkbox = void 0;
4
+ const rules_1 = require("./rules");
5
+ /**
6
+ * `<p-checkbox [(ngModel)]="acepto" [binary]="true" inputId="acepto" />`
7
+ * → `<cb-checkbox [(ngModel)]="acepto" inputId="acepto" />`
8
+ *
9
+ * cb-checkbox decide el modo por el valor del modelo: booleano si no es un
10
+ * array, lista si lo es (como `binary` / `value` en PrimeNG).
11
+ */
12
+ const rules = {
13
+ binary: (0, rules_1.drop)(),
14
+ size: (0, rules_1.values)('size', rules_1.SIZE_VALUES),
15
+ styleClass: (0, rules_1.styleClass)(),
16
+ ariaLabelledBy: (0, rules_1.unsupported)('usa ariaLabel o el input label de cb-checkbox.'),
17
+ readonly: (0, rules_1.unsupported)('usa disabled o deshabilita el control de formulario.'),
18
+ tabindex: (0, rules_1.unsupported)('el tabindex no se reenvía al control interno.'),
19
+ autofocus: (0, rules_1.unsupported)('usa la directiva cbAutoFocus de @caribeng/ui/autofocus.'),
20
+ trueValue: (0, rules_1.unsupported)('cb-checkbox usa true/false en modo binario; convierte el valor en el modelo.'),
21
+ falseValue: (0, rules_1.unsupported)('cb-checkbox usa true/false en modo binario; convierte el valor en el modelo.'),
22
+ checkboxIcon: (0, rules_1.unsupported)('cb-checkbox usa su propio icono.'),
23
+ inputStyle: (0, rules_1.unsupported)('personaliza el control con los tokens CSS de cb-checkbox.'),
24
+ inputClass: (0, rules_1.unsupported)('personaliza el control con los tokens CSS de cb-checkbox.'),
25
+ variant: (0, rules_1.unsupported)('cb-checkbox no tiene variante "filled".'),
26
+ '(onChange)': (0, rules_1.event)('changed', (0, rules_1.adaptEvent)('checked')),
27
+ ...rules_1.FOCUS_EVENTS,
28
+ };
29
+ exports.checkbox = {
30
+ name: 'checkbox',
31
+ entry: '@caribeng/ui/checkbox',
32
+ symbol: 'CbCheckbox',
33
+ modules: {
34
+ 'primeng/checkbox': { CheckboxModule: 'CbCheckbox', Checkbox: 'CbCheckbox' },
35
+ },
36
+ // Selectores alternativos que acepta PrimeNG.
37
+ elements: ['p-checkbox', 'p-checkBox', 'p-check-box'].map((tag) => ({
38
+ tag,
39
+ to: 'cb-checkbox',
40
+ rules,
41
+ child: (child) => (child.name === 'ng-template' ? { todo: 'cb-checkbox usa su propio icono; la plantilla no se mostrará.' } : null),
42
+ same: ['value', 'inputId', 'ariaLabel', 'indeterminate', 'disabled', 'required', 'invalid', 'label'],
43
+ })),
44
+ };