@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,206 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FOCUS_EVENTS = exports.iconName = exports.SEVERITY_VALUES = exports.SIZE_VALUES = exports.styleClass = exports.adaptEvent = exports.numeric = exports.event = exports.flagToValue = exports.values = exports.unsupported = exports.drop = exports.rename = void 0;
4
+ exports.renderAttr = renderAttr;
5
+ exports.staticBoolean = staticBoolean;
6
+ exports.escapeText = escapeText;
7
+ exports.templateName = templateName;
8
+ exports.slotChild = slotChild;
9
+ const icons_1 = require("../icons");
10
+ /** Escribe un atributo de plantilla con la sintaxis de su tipo. */
11
+ function renderAttr(kind, name, value, bare = false) {
12
+ const key = kind === 'property' ? `[${name}]` : kind === 'twoWay' ? `[(${name})]` : kind === 'event' ? `(${name})` : name;
13
+ if (kind === 'static' && bare)
14
+ return key;
15
+ const quote = value.includes('"') ? "'" : '"';
16
+ return `${key}=${quote}${value}${quote}`;
17
+ }
18
+ /** Valor booleano de un atributo estático (`outlined`, `outlined="true"` → true). `null` si es una expresión. */
19
+ function staticBoolean(binding) {
20
+ if (binding.kind === 'static')
21
+ return binding.value !== 'false';
22
+ const value = binding.value.trim();
23
+ if (value === 'true')
24
+ return true;
25
+ if (value === 'false')
26
+ return false;
27
+ return null;
28
+ }
29
+ /** Texto plano listo para usarse como contenido de una plantilla Angular. */
30
+ function escapeText(text) {
31
+ return text
32
+ .replace(/&/g, '&')
33
+ .replace(/</g, '&lt;')
34
+ .replace(/>/g, '&gt;')
35
+ .replace(/\{/g, '&#123;')
36
+ .replace(/\}/g, '&#125;')
37
+ .replace(/@/g, '&#64;');
38
+ }
39
+ /** El input/output existe con otro nombre. */
40
+ const rename = (to) => (binding, el) => el.attrs.push(renderAttr(binding.kind, to, binding.value, binding.bare));
41
+ exports.rename = rename;
42
+ /** Se elimina sin aviso: no tiene efecto en CaribeNG (p. ej. `appendTo`, que resuelve el overlay del CDK). */
43
+ const drop = () => () => undefined;
44
+ exports.drop = drop;
45
+ /** Sin equivalente: se elimina y se deja un aviso con el atributo original para no perder información. */
46
+ const unsupported = (why) => (binding, el) => el.todos.push(`${binding.source} — ${why}`);
47
+ exports.unsupported = unsupported;
48
+ /**
49
+ * El input existe pero sus valores cambian (`small` → `sm`). Los valores
50
+ * estáticos se traducen; las expresiones se conservan con un aviso.
51
+ */
52
+ const values = (to, map) => (binding, el) => {
53
+ if (binding.kind === 'static') {
54
+ const mapped = map[binding.value];
55
+ if (mapped !== undefined) {
56
+ el.attrs.push(renderAttr('static', to, mapped));
57
+ }
58
+ else {
59
+ el.attrs.push(renderAttr('static', to, binding.value, binding.bare));
60
+ el.todos.push(`${binding.source} — valor sin equivalente conocido en ${el.tag}.`);
61
+ }
62
+ return;
63
+ }
64
+ el.attrs.push(renderAttr(binding.kind, to, binding.value));
65
+ const table = Object.entries(map)
66
+ .filter(([from, mapped]) => from !== mapped)
67
+ .map(([from, mapped]) => `'${from}' → '${mapped}'`)
68
+ .join(', ');
69
+ if (table)
70
+ el.todos.push(`${binding.source} — revisa los valores de la expresión: ${table}.`);
71
+ };
72
+ exports.values = values;
73
+ /**
74
+ * Un booleano de PrimeNG (`outlined`, `text`) se convierte en un valor de un
75
+ * input de CaribeNG (`variant="outlined"`). Con una expresión se escribe un
76
+ * ternario con el valor por defecto.
77
+ */
78
+ const flagToValue = (to, value, otherwise) => (binding, el) => {
79
+ if (el.attrs.some((attr) => attr.startsWith(`${to}=`) || attr.startsWith(`[${to}]=`))) {
80
+ el.todos.push(`${binding.source} — ya hay otro ${to}; revisa cuál aplica.`);
81
+ return;
82
+ }
83
+ const flag = staticBoolean(binding);
84
+ if (flag === true)
85
+ el.attrs.push(renderAttr('static', to, value));
86
+ else if (flag === null)
87
+ el.attrs.push(renderAttr('property', to, `(${binding.value}) ? '${value}' : '${otherwise}'`));
88
+ };
89
+ exports.flagToValue = flagToValue;
90
+ /**
91
+ * Un output con otro nombre. `adapt` traduce la expresión cuando cambia el
92
+ * payload; si devuelve `null` se conserva el output con un aviso.
93
+ */
94
+ const event = (to, adapt) => (binding, el) => {
95
+ if (!adapt) {
96
+ el.attrs.push(renderAttr('event', to, binding.value));
97
+ return;
98
+ }
99
+ const adapted = adapt(binding.value);
100
+ if (adapted !== null) {
101
+ el.attrs.push(renderAttr('event', to, adapted));
102
+ }
103
+ else {
104
+ el.attrs.push(renderAttr('event', to, binding.value));
105
+ el.todos.push(`${binding.source} — el evento ahora es (${to}) y su $event es distinto; revisa el manejador.`);
106
+ }
107
+ };
108
+ exports.event = event;
109
+ /**
110
+ * Input numérico de CaribeNG (`input<number>` sin transform). Con
111
+ * strictTemplates un atributo estático (`rows="5"`) es un string y no compila:
112
+ * se escribe como binding (`[rows]="5"`).
113
+ */
114
+ const numeric = (to) => (binding, el) => {
115
+ const name = to ?? binding.name;
116
+ if (binding.kind !== 'static') {
117
+ el.attrs.push(renderAttr(binding.kind, name, binding.value));
118
+ }
119
+ else if (/^-?\d+(\.\d+)?$/.test(binding.value.trim())) {
120
+ el.attrs.push(renderAttr('property', name, binding.value.trim()));
121
+ }
122
+ else {
123
+ el.attrs.push(renderAttr('static', name, binding.value, binding.bare));
124
+ el.todos.push(`${binding.source} — ${name} es numérico en ${el.tag}; usa [${name}]="…".`);
125
+ }
126
+ };
127
+ exports.numeric = numeric;
128
+ /**
129
+ * Adaptador para `event()`: PrimeNG envuelve el valor en `$event.<campo>`
130
+ * (`{ value, originalEvent }`, `{ checked, originalEvent }`) y CaribeNG emite
131
+ * el valor directamente. `$event.value` → `$event`; cualquier otro uso de
132
+ * `$event` devuelve `null` (se deja un aviso).
133
+ */
134
+ const adaptEvent = (field) => (expression) => {
135
+ const property = new RegExp(`\\$event\\.${field}\\b`, 'g');
136
+ const other = new RegExp(`\\$event\\b(?!\\.${field}\\b)`);
137
+ return other.test(expression) ? null : expression.replace(property, '$event');
138
+ };
139
+ exports.adaptEvent = adaptEvent;
140
+ /** `styleClass` → `class` en el host (CaribeNG aplica las clases del host). */
141
+ const styleClass = () => (0, exports.rename)('class');
142
+ exports.styleClass = styleClass;
143
+ /** Tamaños de PrimeNG (`small`/`large`) a los de CaribeNG (`sm`/`lg`). */
144
+ exports.SIZE_VALUES = { small: 'sm', large: 'lg' };
145
+ /** Severidades de PrimeNG a las de CaribeNG (solo cambia `warn`). */
146
+ exports.SEVERITY_VALUES = {
147
+ primary: 'primary',
148
+ secondary: 'secondary',
149
+ success: 'success',
150
+ info: 'info',
151
+ warn: 'warning',
152
+ danger: 'danger',
153
+ help: 'help',
154
+ contrast: 'contrast',
155
+ };
156
+ /**
157
+ * `icon="pi pi-check"` → `icon="check"` en componentes CaribeNG cuyo input
158
+ * `icon` recibe el nombre del icono (Tag…).
159
+ */
160
+ const iconName = (to = 'icon') => (binding, el) => {
161
+ const parsed = binding.kind === 'static' ? (0, icons_1.parsePrimeIcon)(binding.value) : null;
162
+ if (parsed?.name) {
163
+ el.attrs.push(renderAttr('static', to, parsed.name));
164
+ el.icons.add(parsed.name);
165
+ }
166
+ else if (binding.kind === 'static') {
167
+ el.todos.push(`${binding.source} — ${parsed ? `pi-${parsed.prime} no tiene equivalente conocido` : 'icono que no es de PrimeIcons'}; usa un nombre de @caribeng/ui/icon.`);
168
+ }
169
+ else {
170
+ el.attrs.push(renderAttr(binding.kind, to, binding.value));
171
+ el.todos.push(`${binding.source} — ${to} recibe el nombre de un icono de CaribeNG ("check"), no clases "pi pi-check".`);
172
+ }
173
+ };
174
+ exports.iconName = iconName;
175
+ /** Nombre de la plantilla PrimeNG de un hijo (`#footer` o `pTemplate="footer"`). */
176
+ function templateName(child) {
177
+ if (child.name !== 'ng-template')
178
+ return undefined;
179
+ return child.references[0] ?? child.bindings.find((b) => b.kind === 'static' && b.name === 'pTemplate')?.value;
180
+ }
181
+ /**
182
+ * Hijos de los componentes con pie y contenido proyectado (Dialog, Card):
183
+ * `#footer`/`<p-footer>` pasan al slot `[footerAttr]`, `#content` se desenvuelve
184
+ * y el resto de plantillas se marca con un aviso.
185
+ */
186
+ function slotChild(tag, footerAttr, others) {
187
+ return (child) => {
188
+ if (child.name === 'p-footer')
189
+ return { tag: 'div', attrs: [footerAttr] };
190
+ if (child.name === 'p-header')
191
+ return { todo: others['header'] ?? `${tag} no tiene cabecera personalizada.` };
192
+ const name = templateName(child);
193
+ if (!name)
194
+ return null;
195
+ if (name === 'footer')
196
+ return { tag: 'div', attrs: [footerAttr] };
197
+ if (name === 'content')
198
+ return { tag: 'ng-container', attrs: [] };
199
+ return { todo: others[name] ?? `${tag} no tiene la plantilla "${name}"; pon el contenido directamente dentro de ${tag}.` };
200
+ };
201
+ }
202
+ /** Outputs de foco: los de PrimeNG pasan a los eventos nativos que burbujean hasta el host. */
203
+ exports.FOCUS_EVENTS = {
204
+ '(onFocus)': (0, exports.event)('focusin'),
205
+ '(onBlur)': (0, exports.event)('focusout'),
206
+ };
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.select = exports.selectChild = exports.selectSame = exports.selectRules = void 0;
4
+ const rules_1 = require("./rules");
5
+ const NO_TEMPLATES = 'cb-select no admite plantillas personalizadas; este contenido no se mostrará.';
6
+ /**
7
+ * `<p-select [options]="ciudades" optionLabel="nombre" [(ngModel)]="ciudad" size="small" />`
8
+ * → `<cb-select [options]="ciudades" optionLabel="nombre" [(ngModel)]="ciudad" size="sm" />`
9
+ */
10
+ exports.selectRules = {
11
+ size: (0, rules_1.values)('size', rules_1.SIZE_VALUES),
12
+ virtualScrollItemSize: (0, rules_1.numeric)(),
13
+ styleClass: (0, rules_1.styleClass)(),
14
+ emptyFilterMessage: (binding, el) => {
15
+ if (el.find('emptyMessage'))
16
+ el.todos.push(`${binding.source} — cb-select usa un solo mensaje (emptyMessage).`);
17
+ else
18
+ (0, rules_1.rename)('emptyMessage')(binding, el);
19
+ },
20
+ // cb-select abre su panel con el overlay del CDK: no hace falta.
21
+ appendTo: (0, rules_1.drop)(),
22
+ autoZIndex: (0, rules_1.drop)(),
23
+ baseZIndex: (0, rules_1.drop)(),
24
+ panelStyle: (0, rules_1.unsupported)('personaliza el panel con los tokens CSS de cb-select.'),
25
+ panelStyleClass: (0, rules_1.unsupported)('personaliza el panel con los tokens CSS de cb-select.'),
26
+ editable: (0, rules_1.unsupported)('cb-select no es editable; usa <cb-autocomplete>.'),
27
+ filterBy: (0, rules_1.unsupported)('cb-select filtra por optionLabel.'),
28
+ filterFields: (0, rules_1.unsupported)('cb-select filtra por optionLabel.'),
29
+ filterMatchMode: (0, rules_1.unsupported)('cb-select filtra por "contiene".'),
30
+ filterLocale: (0, rules_1.unsupported)('cb-select usa el idioma de provideCaribeNG().'),
31
+ resetFilterOnHide: (0, rules_1.unsupported)('cb-select limpia el filtro al cerrar.'),
32
+ dataKey: (0, rules_1.unsupported)('cb-select compara los valores con ===.'),
33
+ lazy: (0, rules_1.unsupported)('cb-select no tiene carga diferida; carga las opciones antes.'),
34
+ loading: (0, rules_1.unsupported)('cb-select no tiene estado de carga.'),
35
+ loadingIcon: (0, rules_1.unsupported)('cb-select no tiene estado de carga.'),
36
+ dropdownIcon: (0, rules_1.unsupported)('cb-select usa su propio icono.'),
37
+ checkmark: (0, rules_1.unsupported)('cb-select marca la opción elegida por defecto.'),
38
+ tooltip: (0, rules_1.unsupported)('usa la directiva cbTooltip de @caribeng/ui/tooltip.'),
39
+ tooltipPosition: (0, rules_1.unsupported)('usa la directiva cbTooltip de @caribeng/ui/tooltip.'),
40
+ tooltipStyleClass: (0, rules_1.unsupported)('usa la directiva cbTooltip de @caribeng/ui/tooltip.'),
41
+ tooltipPositionStyle: (0, rules_1.unsupported)('usa la directiva cbTooltip de @caribeng/ui/tooltip.'),
42
+ overlayOptions: (0, rules_1.unsupported)('cb-select gestiona su overlay.'),
43
+ virtualScrollOptions: (0, rules_1.unsupported)('usa virtualScroll y virtualScrollItemSize.'),
44
+ autofocus: (0, rules_1.unsupported)('usa la directiva cbAutoFocus de @caribeng/ui/autofocus.'),
45
+ autofocusFilter: (0, rules_1.unsupported)('el filtro recibe el foco al abrir.'),
46
+ tabindex: (0, rules_1.unsupported)('el tabindex no se reenvía al control interno.'),
47
+ readonly: (0, rules_1.unsupported)('usa disabled o deshabilita el control de formulario.'),
48
+ focusOnHover: (0, rules_1.drop)(),
49
+ selectOnFocus: (0, rules_1.unsupported)('cb-select solo selecciona al confirmar.'),
50
+ autoOptionFocus: (0, rules_1.drop)(),
51
+ variant: (0, rules_1.unsupported)('cb-select no tiene variante "filled".'),
52
+ fluid: (0, rules_1.unsupported)('cb-select ya ocupa todo el ancho de su contenedor.'),
53
+ ariaFilterLabel: (0, rules_1.unsupported)('el filtro usa filterPlaceholder como nombre accesible.'),
54
+ '(onChange)': (0, rules_1.event)('valueChange', (0, rules_1.adaptEvent)('value')),
55
+ ...rules_1.FOCUS_EVENTS,
56
+ '(onShow)': (0, rules_1.unsupported)('cb-select no emite la apertura del panel.'),
57
+ '(onHide)': (0, rules_1.unsupported)('cb-select no emite el cierre del panel.'),
58
+ '(onClear)': (0, rules_1.unsupported)('escucha (valueChange) y comprueba el valor null.'),
59
+ '(onFilter)': (0, rules_1.unsupported)('cb-select no emite el texto del filtro.'),
60
+ '(onClick)': (0, rules_1.unsupported)('usa (click) en el host.'),
61
+ '(onLazyLoad)': (0, rules_1.unsupported)('cb-select no tiene carga diferida.'),
62
+ };
63
+ exports.selectSame = [
64
+ 'options',
65
+ 'optionLabel',
66
+ 'optionValue',
67
+ 'optionDisabled',
68
+ 'group',
69
+ 'optionGroupLabel',
70
+ 'optionGroupChildren',
71
+ 'placeholder',
72
+ 'filter',
73
+ 'filterPlaceholder',
74
+ 'emptyMessage',
75
+ 'showClear',
76
+ 'scrollHeight',
77
+ 'virtualScroll',
78
+ 'invalid',
79
+ 'disabled',
80
+ 'inputId',
81
+ 'ariaLabel',
82
+ 'ariaLabelledBy',
83
+ ];
84
+ /** Las plantillas de PrimeNG (`#item`, `#selectedItem`…) no tienen equivalente. */
85
+ const selectChild = (element) => (element.name === 'ng-template' ? { todo: NO_TEMPLATES } : null);
86
+ exports.selectChild = selectChild;
87
+ exports.select = {
88
+ name: 'select',
89
+ entry: '@caribeng/ui/select',
90
+ symbol: 'CbSelect',
91
+ modules: {
92
+ 'primeng/select': { SelectModule: 'CbSelect', Select: 'CbSelect' },
93
+ // Nombre anterior a PrimeNG 18.
94
+ 'primeng/dropdown': { DropdownModule: 'CbSelect', Dropdown: 'CbSelect' },
95
+ },
96
+ elements: ['p-select', 'p-dropdown'].map((tag) => ({ tag, to: 'cb-select', rules: exports.selectRules, child: exports.selectChild, same: exports.selectSame })),
97
+ };
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.forEachServiceCall = forEachServiceCall;
37
+ exports.propertyName = propertyName;
38
+ exports.rebuildObject = rebuildObject;
39
+ exports.todoBefore = todoBefore;
40
+ const ts = __importStar(require("typescript"));
41
+ const todo_1 = require("../todo");
42
+ /** El tipo es una referencia a `local` (`ms: MessageService`). */
43
+ function isTypeOf(type, local) {
44
+ return !!type && ts.isTypeReferenceNode(type) && ts.isIdentifier(type.typeName) && type.typeName.text === local;
45
+ }
46
+ /** `inject(MessageService)`. */
47
+ function isInjectOf(expression, local) {
48
+ return (!!expression &&
49
+ ts.isCallExpression(expression) &&
50
+ ts.isIdentifier(expression.expression) &&
51
+ expression.expression.text === 'inject' &&
52
+ expression.arguments.some((arg) => ts.isIdentifier(arg) && arg.text === local));
53
+ }
54
+ /**
55
+ * Recorre los usos de un servicio PrimeNG en el archivo: propiedades,
56
+ * parámetros y variables tipadas con él o creadas con `inject(Servicio)`, y
57
+ * llama a `visit` por cada acceso `this.ms.metodo` / `ms.metodo`.
58
+ */
59
+ function forEachServiceCall(sf, local, visit) {
60
+ const receivers = new Set();
61
+ const collect = (node) => {
62
+ if ((ts.isPropertyDeclaration(node) || ts.isParameter(node) || ts.isVariableDeclaration(node)) && ts.isIdentifier(node.name)) {
63
+ if (isTypeOf(node.type, local) || isInjectOf(node.initializer, local))
64
+ receivers.add(node.name.text);
65
+ }
66
+ ts.forEachChild(node, collect);
67
+ };
68
+ collect(sf);
69
+ if (!receivers.size)
70
+ return;
71
+ const isReceiver = (expression) => (ts.isIdentifier(expression) && receivers.has(expression.text)) ||
72
+ (ts.isPropertyAccessExpression(expression) && expression.expression.kind === ts.SyntaxKind.ThisKeyword && receivers.has(expression.name.text));
73
+ const walk = (node) => {
74
+ if (ts.isPropertyAccessExpression(node) && isReceiver(node.expression)) {
75
+ const call = ts.isCallExpression(node.parent) && node.parent.expression === node ? node.parent : undefined;
76
+ visit(node.name.text, node, call);
77
+ }
78
+ ts.forEachChild(node, walk);
79
+ };
80
+ walk(sf);
81
+ }
82
+ /** Nombre de una propiedad de un objeto literal (`severity`, `'severity'`). */
83
+ function propertyName(property) {
84
+ return property.name && (ts.isIdentifier(property.name) || ts.isStringLiteral(property.name)) ? property.name.text : undefined;
85
+ }
86
+ /** Reescribe un objeto literal con estas propiedades, conservando si estaba en una línea o en varias. */
87
+ function rebuildObject(sf, object, properties) {
88
+ if (!object.getText(sf).includes('\n'))
89
+ return properties.length ? `{ ${properties.join(', ')} }` : '{}';
90
+ const first = object.properties[0];
91
+ const indent = /[ \t]*$/.exec(sf.text.slice(0, first.getStart(sf)))?.[0] ?? ' ';
92
+ const closing = /[ \t]*$/.exec(sf.text.slice(0, object.getEnd() - 1))?.[0] ?? '';
93
+ const eol = sf.text.includes('\r\n') ? '\r\n' : '\n';
94
+ return `{${eol}${properties.map((p) => indent + p).join(`,${eol}`)},${eol}${closing}}`;
95
+ }
96
+ /** Comentarios `TODO(caribeng)` justo antes de `node`. */
97
+ function todoBefore(sf, node, messages) {
98
+ const start = node.getStart(sf);
99
+ return { start, end: start, text: messages.map((m) => `/* ${todo_1.TODO_MARK}: ${m} */ `).join('') };
100
+ }