@caribeng/ui 22.2.0 → 22.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 (285) hide show
  1. package/README.md +311 -231
  2. package/fesm2022/caribeng-ui-accordion.mjs +2 -2
  3. package/fesm2022/caribeng-ui-account-picker.mjs +533 -0
  4. package/fesm2022/caribeng-ui-aging.mjs +488 -0
  5. package/fesm2022/{caribeng-ui-caribe-alert.mjs → caribeng-ui-alert.mjs} +45 -45
  6. package/fesm2022/caribeng-ui-amount.mjs +249 -0
  7. package/fesm2022/caribeng-ui-anchor.mjs +2 -2
  8. package/fesm2022/{caribeng-ui-caribe-animation-lottie.mjs → caribeng-ui-animation-lottie.mjs} +41 -41
  9. package/fesm2022/caribeng-ui-audit-log.mjs +323 -0
  10. package/fesm2022/caribeng-ui-avatar.mjs +4 -4
  11. package/fesm2022/caribeng-ui-badge.mjs +8 -2
  12. package/fesm2022/caribeng-ui-breadcrumb.mjs +26 -9
  13. package/fesm2022/{caribeng-ui-caribe-button-group.mjs → caribeng-ui-button-group.mjs} +15 -15
  14. package/fesm2022/caribeng-ui-button.mjs +2 -2
  15. package/fesm2022/{caribeng-ui-caribe-card-content.mjs → caribeng-ui-card-content.mjs} +39 -39
  16. package/fesm2022/{caribeng-ui-caribe-card-move.mjs → caribeng-ui-card-move.mjs} +65 -65
  17. package/fesm2022/{caribeng-ui-caribe-card-primary.mjs → caribeng-ui-card-primary.mjs} +31 -31
  18. package/fesm2022/{caribeng-ui-caribe-card-select.mjs → caribeng-ui-card-select.mjs} +67 -67
  19. package/fesm2022/caribeng-ui-carousel.mjs +2 -2
  20. package/fesm2022/caribeng-ui-cascadeselect.mjs +45 -9
  21. package/fesm2022/caribeng-ui-chart.mjs +8 -5
  22. package/fesm2022/caribeng-ui-chat.mjs +1303 -0
  23. package/fesm2022/{caribeng-ui-caribe-coachmark.mjs → caribeng-ui-coachmark.mjs} +85 -85
  24. package/fesm2022/caribeng-ui-code-block.mjs +332 -0
  25. package/fesm2022/caribeng-ui-colorpicker.mjs +99 -5
  26. package/fesm2022/caribeng-ui-command-palette.mjs +476 -0
  27. package/fesm2022/caribeng-ui-comments.mjs +864 -0
  28. package/fesm2022/caribeng-ui-confirmdialog.mjs +78 -13
  29. package/fesm2022/caribeng-ui-confirmpopup.mjs +91 -16
  30. package/fesm2022/caribeng-ui-contextmenu.mjs +8 -4
  31. package/fesm2022/caribeng-ui-copy-button.mjs +230 -0
  32. package/fesm2022/caribeng-ui-datagrid.mjs +1635 -0
  33. package/fesm2022/caribeng-ui-dataview.mjs +6 -3
  34. package/fesm2022/caribeng-ui-datepicker.mjs +2 -2
  35. package/fesm2022/caribeng-ui-dock.mjs +52 -12
  36. package/fesm2022/caribeng-ui-document.mjs +495 -0
  37. package/fesm2022/{caribeng-ui-caribe-dots-indicator.mjs → caribeng-ui-dots-indicator.mjs} +41 -41
  38. package/fesm2022/caribeng-ui-drawer.mjs +9 -4
  39. package/fesm2022/caribeng-ui-dynamic-form.mjs +1581 -0
  40. package/fesm2022/caribeng-ui-editor.mjs +2324 -1311
  41. package/fesm2022/{caribeng-ui-caribe-expansion-panel.mjs → caribeng-ui-expansion-panel.mjs} +39 -39
  42. package/fesm2022/{caribeng-ui-caribe-fab-menu.mjs → caribeng-ui-fab-menu.mjs} +75 -75
  43. package/fesm2022/caribeng-ui-fieldset.mjs +2 -2
  44. package/fesm2022/caribeng-ui-file-card.mjs +134 -17
  45. package/fesm2022/{caribeng-ui-caribe-file-download.mjs → caribeng-ui-file-download.mjs} +63 -63
  46. package/fesm2022/caribeng-ui-financial-report.mjs +380 -0
  47. package/fesm2022/{caribeng-ui-caribe-float-menu.mjs → caribeng-ui-float-menu.mjs} +31 -31
  48. package/fesm2022/caribeng-ui-floatlabel.mjs +2 -2
  49. package/fesm2022/caribeng-ui-flow.mjs +1508 -0
  50. package/fesm2022/caribeng-ui-folder-card.mjs +122 -12
  51. package/fesm2022/{caribeng-ui-caribe-footer.mjs → caribeng-ui-footer.mjs} +19 -19
  52. package/fesm2022/caribeng-ui-gantt.mjs +1094 -0
  53. package/fesm2022/{caribeng-ui-caribe-header.mjs → caribeng-ui-header.mjs} +49 -49
  54. package/fesm2022/{caribeng-ui-caribe-icon-button.mjs → caribeng-ui-icon-button.mjs} +23 -23
  55. package/fesm2022/caribeng-ui-image-cropper.mjs +671 -0
  56. package/fesm2022/caribeng-ui-import-wizard.mjs +746 -0
  57. package/fesm2022/caribeng-ui-infinite-scroll.mjs +226 -0
  58. package/fesm2022/caribeng-ui-inlinemessage.mjs +2 -2
  59. package/fesm2022/caribeng-ui-input-number.mjs +22 -6
  60. package/fesm2022/{caribeng-ui-caribe-input-search.mjs → caribeng-ui-input-search.mjs} +65 -65
  61. package/fesm2022/{caribeng-ui-caribe-input-token.mjs → caribeng-ui-input-token.mjs} +59 -59
  62. package/fesm2022/caribeng-ui-inputmask.mjs +8 -2
  63. package/fesm2022/caribeng-ui-inputotp.mjs +2 -2
  64. package/fesm2022/caribeng-ui-journal-entry.mjs +340 -0
  65. package/fesm2022/caribeng-ui-kanban.mjs +4612 -0
  66. package/fesm2022/caribeng-ui-kbd.mjs +122 -0
  67. package/fesm2022/caribeng-ui-kpi.mjs +189 -0
  68. package/fesm2022/{caribeng-ui-caribe-link.mjs → caribeng-ui-link.mjs} +37 -37
  69. package/fesm2022/caribeng-ui-masonry.mjs +93 -0
  70. package/fesm2022/caribeng-ui-media-player.mjs +821 -0
  71. package/fesm2022/caribeng-ui-megamenu.mjs +13 -9
  72. package/fesm2022/caribeng-ui-mentions.mjs +495 -0
  73. package/fesm2022/caribeng-ui-menu.mjs +8 -4
  74. package/fesm2022/caribeng-ui-menubar.mjs +9 -5
  75. package/fesm2022/caribeng-ui-message.mjs +6 -3
  76. package/fesm2022/caribeng-ui-notification-center.mjs +636 -0
  77. package/fesm2022/{caribeng-ui-caribe-off-canvas.mjs → caribeng-ui-off-canvas.mjs} +55 -55
  78. package/fesm2022/{caribeng-ui-caribe-onboarding.mjs → caribeng-ui-onboarding.mjs} +105 -105
  79. package/fesm2022/caribeng-ui-orderlist.mjs +2 -2
  80. package/fesm2022/caribeng-ui-organizationchart.mjs +6 -10
  81. package/fesm2022/caribeng-ui-panel.mjs +6 -6
  82. package/fesm2022/caribeng-ui-panelmenu.mjs +9 -6
  83. package/fesm2022/caribeng-ui-pdfviewer.mjs +1755 -25
  84. package/fesm2022/caribeng-ui-period-picker.mjs +637 -0
  85. package/fesm2022/caribeng-ui-phone-input.mjs +688 -0
  86. package/fesm2022/caribeng-ui-picklist.mjs +2 -2
  87. package/fesm2022/caribeng-ui-pivot.mjs +419 -0
  88. package/fesm2022/caribeng-ui-pricing.mjs +263 -69
  89. package/fesm2022/caribeng-ui-qrcode.mjs +564 -0
  90. package/fesm2022/caribeng-ui-rating.mjs +14 -17
  91. package/fesm2022/caribeng-ui-reconciliation.mjs +386 -0
  92. package/fesm2022/caribeng-ui-ripple.mjs +2 -0
  93. package/fesm2022/caribeng-ui-scheduler.mjs +1027 -0
  94. package/fesm2022/caribeng-ui-scrolltop.mjs +3 -1
  95. package/fesm2022/caribeng-ui-select.mjs +2 -2
  96. package/fesm2022/{caribeng-ui-caribe-shortcut.mjs → caribeng-ui-shortcut.mjs} +29 -29
  97. package/fesm2022/caribeng-ui-sidebar.mjs +573 -0
  98. package/fesm2022/caribeng-ui-signature-pad.mjs +654 -0
  99. package/fesm2022/{caribeng-ui-caribe-status.mjs → caribeng-ui-status.mjs} +11 -11
  100. package/fesm2022/{caribeng-ui-caribe-step-indicator.mjs → caribeng-ui-step-indicator.mjs} +53 -53
  101. package/fesm2022/caribeng-ui-stepper.mjs +12 -5
  102. package/fesm2022/caribeng-ui-steps.mjs +2 -2
  103. package/fesm2022/caribeng-ui-table.mjs +333 -19
  104. package/fesm2022/caribeng-ui-tabmenu.mjs +10 -6
  105. package/fesm2022/caribeng-ui-tabs.mjs +2 -2
  106. package/fesm2022/{caribeng-ui-caribe-tag-button.mjs → caribeng-ui-tag-button.mjs} +25 -25
  107. package/fesm2022/caribeng-ui-tag.mjs +2 -2
  108. package/fesm2022/caribeng-ui-tieredmenu.mjs +111 -21
  109. package/fesm2022/{caribeng-ui-caribe-tracker.mjs → caribeng-ui-tracker.mjs} +29 -29
  110. package/fesm2022/{caribeng-ui-caribe-transaction-status.mjs → caribeng-ui-transaction-status.mjs} +11 -11
  111. package/fesm2022/caribeng-ui-treeselect.mjs +44 -9
  112. package/fesm2022/caribeng-ui-treetable.mjs +236 -17
  113. package/fesm2022/{caribeng-ui-caribe-voucher.mjs → caribeng-ui-voucher.mjs} +45 -45
  114. package/fesm2022/caribeng-ui-xlsx.mjs +486 -0
  115. package/fesm2022/caribeng-ui.mjs +1568 -1
  116. package/package.json +258 -178
  117. package/schematics/collection.json +5 -0
  118. package/schematics/migrate-from-primeng/core-icons.json +1 -0
  119. package/schematics/migrate-from-primeng/icons.js +269 -0
  120. package/schematics/migrate-from-primeng/index.js +290 -0
  121. package/schematics/migrate-from-primeng/mappings/button.js +93 -0
  122. package/schematics/migrate-from-primeng/mappings/card.js +33 -0
  123. package/schematics/migrate-from-primeng/mappings/checkbox.js +44 -0
  124. package/schematics/migrate-from-primeng/mappings/confirm.js +221 -0
  125. package/schematics/migrate-from-primeng/mappings/datepicker.js +121 -0
  126. package/schematics/migrate-from-primeng/mappings/dialog.js +84 -0
  127. package/schematics/migrate-from-primeng/mappings/index.js +88 -0
  128. package/schematics/migrate-from-primeng/mappings/inputnumber.js +62 -0
  129. package/schematics/migrate-from-primeng/mappings/inputtext.js +60 -0
  130. package/schematics/migrate-from-primeng/mappings/menu.js +468 -0
  131. package/schematics/migrate-from-primeng/mappings/multiselect.js +49 -0
  132. package/schematics/migrate-from-primeng/mappings/radiobutton.js +22 -0
  133. package/schematics/migrate-from-primeng/mappings/rules.js +206 -0
  134. package/schematics/migrate-from-primeng/mappings/select.js +97 -0
  135. package/schematics/migrate-from-primeng/mappings/service-calls.js +100 -0
  136. package/schematics/migrate-from-primeng/mappings/table.js +613 -0
  137. package/schematics/migrate-from-primeng/mappings/tabs.js +225 -0
  138. package/schematics/migrate-from-primeng/mappings/tag.js +29 -0
  139. package/schematics/migrate-from-primeng/mappings/textarea.js +44 -0
  140. package/schematics/migrate-from-primeng/mappings/toast.js +173 -0
  141. package/schematics/migrate-from-primeng/mappings/toggleswitch.js +37 -0
  142. package/schematics/migrate-from-primeng/mappings/tooltip.js +44 -0
  143. package/schematics/migrate-from-primeng/mappings/types.js +10 -0
  144. package/schematics/migrate-from-primeng/report.js +79 -0
  145. package/schematics/migrate-from-primeng/schema.js +2 -0
  146. package/schematics/migrate-from-primeng/schema.json +34 -0
  147. package/schematics/migrate-from-primeng/template.js +387 -0
  148. package/schematics/migrate-from-primeng/todo.js +5 -0
  149. package/schematics/migrate-from-primeng/typescript.js +442 -0
  150. package/schematics/migrate-from-primeng/workspace.js +117 -0
  151. package/schematics/ng-add/index.js +16 -1
  152. package/types/caribeng-ui-account-picker.d.ts +142 -0
  153. package/types/caribeng-ui-aging.d.ts +123 -0
  154. package/types/{caribeng-ui-caribe-alert.d.ts → caribeng-ui-alert.d.ts} +2 -2
  155. package/types/caribeng-ui-amount.d.ts +82 -0
  156. package/types/{caribeng-ui-caribe-animation-lottie.d.ts → caribeng-ui-animation-lottie.d.ts} +2 -2
  157. package/types/caribeng-ui-audit-log.d.ts +86 -0
  158. package/types/caribeng-ui-badge.d.ts +3 -1
  159. package/types/caribeng-ui-breadcrumb.d.ts +9 -1
  160. package/types/{caribeng-ui-caribe-button-group.d.ts → caribeng-ui-button-group.d.ts} +2 -2
  161. package/types/{caribeng-ui-caribe-card-content.d.ts → caribeng-ui-card-content.d.ts} +2 -2
  162. package/types/{caribeng-ui-caribe-card-move.d.ts → caribeng-ui-card-move.d.ts} +1 -1
  163. package/types/{caribeng-ui-caribe-card-primary.d.ts → caribeng-ui-card-primary.d.ts} +2 -2
  164. package/types/{caribeng-ui-caribe-card-select.d.ts → caribeng-ui-card-select.d.ts} +2 -2
  165. package/types/caribeng-ui-cascadeselect.d.ts +6 -0
  166. package/types/caribeng-ui-chart.d.ts +3 -1
  167. package/types/caribeng-ui-chat.d.ts +299 -0
  168. package/types/{caribeng-ui-caribe-coachmark.d.ts → caribeng-ui-coachmark.d.ts} +2 -2
  169. package/types/caribeng-ui-code-block.d.ts +65 -0
  170. package/types/caribeng-ui-colorpicker.d.ts +5 -1
  171. package/types/caribeng-ui-command-palette.d.ts +133 -0
  172. package/types/caribeng-ui-comments.d.ts +214 -0
  173. package/types/caribeng-ui-confirmdialog.d.ts +34 -2
  174. package/types/caribeng-ui-confirmpopup.d.ts +39 -2
  175. package/types/caribeng-ui-contextmenu.d.ts +7 -0
  176. package/types/caribeng-ui-copy-button.d.ts +90 -0
  177. package/types/caribeng-ui-datagrid.d.ts +269 -0
  178. package/types/caribeng-ui-dataview.d.ts +2 -0
  179. package/types/caribeng-ui-dock.d.ts +13 -1
  180. package/types/caribeng-ui-document.d.ts +138 -0
  181. package/types/{caribeng-ui-caribe-dots-indicator.d.ts → caribeng-ui-dots-indicator.d.ts} +2 -2
  182. package/types/caribeng-ui-drawer.d.ts +3 -1
  183. package/types/caribeng-ui-dynamic-form.d.ts +409 -0
  184. package/types/caribeng-ui-editor.d.ts +110 -12
  185. package/types/{caribeng-ui-caribe-expansion-panel.d.ts → caribeng-ui-expansion-panel.d.ts} +1 -1
  186. package/types/{caribeng-ui-caribe-fab-menu.d.ts → caribeng-ui-fab-menu.d.ts} +2 -2
  187. package/types/caribeng-ui-file-card.d.ts +27 -2
  188. package/types/{caribeng-ui-caribe-file-download.d.ts → caribeng-ui-file-download.d.ts} +1 -1
  189. package/types/caribeng-ui-financial-report.d.ts +102 -0
  190. package/types/{caribeng-ui-caribe-float-menu.d.ts → caribeng-ui-float-menu.d.ts} +2 -2
  191. package/types/caribeng-ui-flow.d.ts +228 -0
  192. package/types/caribeng-ui-folder-card.d.ts +27 -5
  193. package/types/{caribeng-ui-caribe-footer.d.ts → caribeng-ui-footer.d.ts} +2 -2
  194. package/types/caribeng-ui-gantt.d.ts +244 -0
  195. package/types/{caribeng-ui-caribe-header.d.ts → caribeng-ui-header.d.ts} +2 -2
  196. package/types/{caribeng-ui-caribe-icon-button.d.ts → caribeng-ui-icon-button.d.ts} +2 -2
  197. package/types/{caribeng-ui-caribe-illustration.d.ts → caribeng-ui-illustration.d.ts} +1 -1
  198. package/types/caribeng-ui-image-cropper.d.ts +169 -0
  199. package/types/caribeng-ui-import-wizard.d.ts +149 -0
  200. package/types/caribeng-ui-infinite-scroll.d.ts +75 -0
  201. package/types/caribeng-ui-input-number.d.ts +1 -1
  202. package/types/{caribeng-ui-caribe-input-search.d.ts → caribeng-ui-input-search.d.ts} +2 -2
  203. package/types/{caribeng-ui-caribe-input-token.d.ts → caribeng-ui-input-token.d.ts} +2 -2
  204. package/types/caribeng-ui-inputmask.d.ts +3 -1
  205. package/types/caribeng-ui-journal-entry.d.ts +110 -0
  206. package/types/caribeng-ui-kanban.d.ts +783 -0
  207. package/types/caribeng-ui-kbd.d.ts +36 -0
  208. package/types/caribeng-ui-kpi.d.ts +64 -0
  209. package/types/{caribeng-ui-caribe-link.d.ts → caribeng-ui-link.d.ts} +2 -2
  210. package/types/{caribeng-ui-caribe-logo.d.ts → caribeng-ui-logo.d.ts} +1 -1
  211. package/types/caribeng-ui-masonry.d.ts +32 -0
  212. package/types/caribeng-ui-media-player.d.ts +140 -0
  213. package/types/caribeng-ui-megamenu.d.ts +11 -0
  214. package/types/caribeng-ui-mentions.d.ts +127 -0
  215. package/types/caribeng-ui-menu.d.ts +7 -0
  216. package/types/caribeng-ui-menubar.d.ts +7 -0
  217. package/types/caribeng-ui-message.d.ts +2 -0
  218. package/types/caribeng-ui-notification-center.d.ts +153 -0
  219. package/types/{caribeng-ui-caribe-off-canvas.d.ts → caribeng-ui-off-canvas.d.ts} +2 -2
  220. package/types/{caribeng-ui-caribe-onboarding.d.ts → caribeng-ui-onboarding.d.ts} +2 -2
  221. package/types/caribeng-ui-panelmenu.d.ts +7 -0
  222. package/types/caribeng-ui-pdfviewer.d.ts +245 -5
  223. package/types/caribeng-ui-period-picker.d.ts +148 -0
  224. package/types/caribeng-ui-phone-input.d.ts +168 -0
  225. package/types/caribeng-ui-pivot.d.ts +116 -0
  226. package/types/caribeng-ui-pricing.d.ts +41 -4
  227. package/types/caribeng-ui-qrcode.d.ts +88 -0
  228. package/types/caribeng-ui-reconciliation.d.ts +109 -0
  229. package/types/caribeng-ui-scheduler.d.ts +188 -0
  230. package/types/{caribeng-ui-caribe-shortcut.d.ts → caribeng-ui-shortcut.d.ts} +2 -2
  231. package/types/caribeng-ui-sidebar.d.ts +167 -0
  232. package/types/caribeng-ui-signature-pad.d.ts +151 -0
  233. package/types/{caribeng-ui-caribe-status.d.ts → caribeng-ui-status.d.ts} +2 -2
  234. package/types/{caribeng-ui-caribe-step-indicator.d.ts → caribeng-ui-step-indicator.d.ts} +2 -2
  235. package/types/caribeng-ui-stepper.d.ts +2 -0
  236. package/types/caribeng-ui-table.d.ts +67 -3
  237. package/types/caribeng-ui-tabmenu.d.ts +7 -0
  238. package/types/{caribeng-ui-caribe-tag-button.d.ts → caribeng-ui-tag-button.d.ts} +2 -2
  239. package/types/caribeng-ui-tieredmenu.d.ts +17 -1
  240. package/types/{caribeng-ui-caribe-tracker.d.ts → caribeng-ui-tracker.d.ts} +2 -2
  241. package/types/{caribeng-ui-caribe-transaction-status.d.ts → caribeng-ui-transaction-status.d.ts} +2 -2
  242. package/types/caribeng-ui-treeselect.d.ts +6 -0
  243. package/types/caribeng-ui-treetable.d.ts +67 -2
  244. package/types/{caribeng-ui-caribe-voucher.d.ts → caribeng-ui-voucher.d.ts} +2 -2
  245. package/types/caribeng-ui-xlsx.d.ts +79 -0
  246. package/types/caribeng-ui.d.ts +985 -2
  247. package/fesm2022/caribeng-ui-caribe-calendar.mjs +0 -92
  248. package/fesm2022/caribeng-ui-caribe-circle-loading.mjs +0 -130
  249. package/fesm2022/caribeng-ui-caribe-data-table.mjs +0 -94
  250. package/fesm2022/caribeng-ui-caribe-file-select.mjs +0 -88
  251. package/fesm2022/caribeng-ui-caribe-inline-alert.mjs +0 -100
  252. package/fesm2022/caribeng-ui-caribe-input-date.mjs +0 -138
  253. package/fesm2022/caribeng-ui-caribe-input-select.mjs +0 -154
  254. package/fesm2022/caribeng-ui-caribe-loader.mjs +0 -48
  255. package/fesm2022/caribeng-ui-caribe-modal.mjs +0 -119
  256. package/fesm2022/caribeng-ui-caribe-pictogram.mjs +0 -52
  257. package/fesm2022/caribeng-ui-caribe-pop-over.mjs +0 -104
  258. package/fesm2022/caribeng-ui-caribe-preloader.mjs +0 -57
  259. package/fesm2022/caribeng-ui-caribe-progress-bar.mjs +0 -84
  260. package/fesm2022/caribeng-ui-caribe-stroke.mjs +0 -69
  261. package/fesm2022/caribeng-ui-caribe-switch.mjs +0 -182
  262. package/styles/caribeng.css +0 -380
  263. package/styles/scss/_mixins.scss +0 -46
  264. package/styles/scss/_overlay.scss +0 -15
  265. package/styles/scss/_tokens.scss +0 -267
  266. package/styles/scss/_utilities.scss +0 -73
  267. package/styles/scss/_variables.scss +0 -33
  268. package/styles/scss/index.scss +0 -16
  269. package/types/caribeng-ui-caribe-calendar.d.ts +0 -27
  270. package/types/caribeng-ui-caribe-circle-loading.d.ts +0 -28
  271. package/types/caribeng-ui-caribe-data-table.d.ts +0 -26
  272. package/types/caribeng-ui-caribe-file-select.d.ts +0 -31
  273. package/types/caribeng-ui-caribe-inline-alert.d.ts +0 -28
  274. package/types/caribeng-ui-caribe-input-date.d.ts +0 -40
  275. package/types/caribeng-ui-caribe-input-select.d.ts +0 -47
  276. package/types/caribeng-ui-caribe-loader.d.ts +0 -22
  277. package/types/caribeng-ui-caribe-modal.d.ts +0 -21
  278. package/types/caribeng-ui-caribe-pictogram.d.ts +0 -15
  279. package/types/caribeng-ui-caribe-pop-over.d.ts +0 -17
  280. package/types/caribeng-ui-caribe-preloader.d.ts +0 -24
  281. package/types/caribeng-ui-caribe-progress-bar.d.ts +0 -28
  282. package/types/caribeng-ui-caribe-stroke.d.ts +0 -17
  283. package/types/caribeng-ui-caribe-switch.d.ts +0 -55
  284. /package/fesm2022/{caribeng-ui-caribe-illustration.mjs → caribeng-ui-illustration.mjs} +0 -0
  285. /package/fesm2022/{caribeng-ui-caribe-logo.mjs → caribeng-ui-logo.mjs} +0 -0
@@ -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
+ };
@@ -0,0 +1,221 @@
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.confirmpopup = exports.confirmdialog = void 0;
37
+ const ts = __importStar(require("typescript"));
38
+ const rules_1 = require("./rules");
39
+ const service_calls_1 = require("./service-calls");
40
+ /** Severidades que admite el botón de aceptar de CaribeNG (`CbConfirmSeverity`). */
41
+ const ACCEPT_SEVERITIES = new Set(['primary', 'danger', 'success', 'warning']);
42
+ /** `acceptButtonStyleClass: 'p-button-danger'` (PrimeNG ≤ 17) → severidad. */
43
+ const STYLE_CLASS_SEVERITY = /\bp-button-(danger|success|warning|warn)\b/;
44
+ /** Opciones de `Confirmation` que se copian tal cual a `CbConfirmation`. */
45
+ const SAME_FIELDS = new Set(['message', 'header', 'accept', 'reject', 'target', 'key', 'acceptLabel', 'rejectLabel']);
46
+ /** Severidad PrimeNG → CaribeNG (`warn` → `warning`); `null` si no tiene equivalente. */
47
+ function acceptSeverity(value) {
48
+ const mapped = value === 'warn' ? 'warning' : value;
49
+ return ACCEPT_SEVERITIES.has(mapped) ? mapped : null;
50
+ }
51
+ /**
52
+ * `{ message, acceptButtonProps: { severity: 'danger', label: 'Sí' }, icon: 'pi pi-x' }`
53
+ * → `{ message, acceptSeverity: 'danger', acceptLabel: 'Sí' }`. Devuelve el
54
+ * texto nuevo (o `null` si no cambia) y deja los avisos en `todos`.
55
+ */
56
+ function rewriteConfirmation(sf, confirmation, todos) {
57
+ const properties = [];
58
+ const dropped = [];
59
+ let severity;
60
+ const has = (name) => confirmation.properties.some((p) => (0, service_calls_1.propertyName)(p) === name);
61
+ let changed = false;
62
+ for (const property of confirmation.properties) {
63
+ const name = (0, service_calls_1.propertyName)(property);
64
+ const text = property.getText(sf);
65
+ if (!name || SAME_FIELDS.has(name) || !ts.isPropertyAssignment(property)) {
66
+ properties.push(text);
67
+ continue;
68
+ }
69
+ changed = true;
70
+ const value = property.initializer;
71
+ if ((name === 'acceptButtonProps' || name === 'rejectButtonProps') && ts.isObjectLiteralExpression(value)) {
72
+ const prefix = name === 'acceptButtonProps' ? 'accept' : 'reject';
73
+ for (const prop of value.properties) {
74
+ const propName = (0, service_calls_1.propertyName)(prop);
75
+ const init = ts.isPropertyAssignment(prop) ? prop.initializer : undefined;
76
+ if (propName === 'label' && init && !has(`${prefix}Label`)) {
77
+ properties.push(`${prefix}Label: ${init.getText(sf)}`);
78
+ }
79
+ else if (prefix === 'accept' && propName === 'severity' && init && ts.isStringLiteralLike(init) && acceptSeverity(init.text)) {
80
+ severity = acceptSeverity(init.text);
81
+ }
82
+ else {
83
+ dropped.push(`${name}.${prop.getText(sf)}`);
84
+ }
85
+ }
86
+ continue;
87
+ }
88
+ if (name === 'acceptButtonStyleClass' && ts.isStringLiteralLike(value) && STYLE_CLASS_SEVERITY.test(value.text)) {
89
+ severity = acceptSeverity(STYLE_CLASS_SEVERITY.exec(value.text)[1]);
90
+ continue;
91
+ }
92
+ dropped.push(text);
93
+ }
94
+ if (severity)
95
+ properties.push(`acceptSeverity: '${severity}'`);
96
+ if (dropped.length)
97
+ todos.push(`${dropped.join(', ')} — CbConfirmationService no tiene estas opciones (iconos, visibilidad de botones, estilos…).`);
98
+ return changed ? (0, service_calls_1.rebuildObject)(sf, confirmation, properties) : null;
99
+ }
100
+ /**
101
+ * `ConfirmationService.confirm({...})` → `CbConfirmationService.confirm({...})`:
102
+ * mismas opciones salvo los botones (`acceptButtonProps.severity` →
103
+ * `acceptSeverity`) y las de iconos/estilo, que se marcan.
104
+ */
105
+ const rewriteConfirmationService = (sf, { locals }, edits) => {
106
+ const local = locals.get('ConfirmationService');
107
+ if (!local)
108
+ return;
109
+ (0, service_calls_1.forEachServiceCall)(sf, local, (method, access, call) => {
110
+ const todos = [];
111
+ if (method === 'confirm' && call) {
112
+ const [confirmation] = call.arguments;
113
+ if (confirmation && ts.isObjectLiteralExpression(confirmation)) {
114
+ const rewritten = rewriteConfirmation(sf, confirmation, todos);
115
+ if (rewritten !== null)
116
+ edits.push({ start: confirmation.getStart(sf), end: confirmation.getEnd(), text: rewritten });
117
+ }
118
+ else if (confirmation) {
119
+ todos.push('confirmación no literal: CbConfirmationService usa acceptSeverity en vez de acceptButtonProps y no tiene iconos.');
120
+ }
121
+ }
122
+ else if (method === 'requireConfirmation$' || method === 'accept' || method === 'onAccept') {
123
+ todos.push(`CbConfirmationService no expone ${method}; pasa accept/reject en confirm() o lee su señal request().`);
124
+ }
125
+ if (todos.length)
126
+ edits.push((0, service_calls_1.todoBefore)(sf, call ?? access, todos));
127
+ });
128
+ };
129
+ /** El host de PrimeNG atiende siempre al servicio: en CaribeNG hay que pedirlo con `service`. */
130
+ function asServiceHost(el) {
131
+ if (!el.attrs.includes('service'))
132
+ el.attrs.push('service');
133
+ }
134
+ /** Se elimina sin aviso salvo que se desactive (`[closeOnEscape]="false"`), que no tiene equivalente. */
135
+ const dropUnlessFalse = (why) => (binding, el) => {
136
+ if ((0, rules_1.staticBoolean)(binding) !== true)
137
+ el.todos.push(`${binding.source} — ${why}`);
138
+ };
139
+ const NO_ICONS = 'las confirmaciones de CaribeNG no tienen iconos.';
140
+ const NO_STYLE = 'personaliza la confirmación con los tokens CSS de CaribeNG.';
141
+ const NO_TEMPLATE = 'las confirmaciones de CaribeNG no admiten plantillas; el contenido no se mostrará.';
142
+ /**
143
+ * `<p-confirmdialog />` + `ConfirmationService` → `<cb-confirm-dialog service />` + `CbConfirmationService`.
144
+ */
145
+ exports.confirmdialog = {
146
+ name: 'confirmdialog',
147
+ entry: '@caribeng/ui/confirmdialog',
148
+ symbol: 'CbConfirmDialog',
149
+ modules: {
150
+ 'primeng/confirmdialog': { ConfirmDialogModule: 'CbConfirmDialog', ConfirmDialog: 'CbConfirmDialog' },
151
+ 'primeng/api': { ConfirmationService: { name: 'CbConfirmationService', entry: '@caribeng/ui' } },
152
+ },
153
+ rootServices: ['CbConfirmationService'],
154
+ rewriteSource: rewriteConfirmationService,
155
+ elements: ['p-confirmdialog', 'p-confirmDialog', 'p-confirm-dialog'].map((tag) => ({
156
+ tag,
157
+ to: 'cb-confirm-dialog',
158
+ finalize: asServiceHost,
159
+ rules: {
160
+ styleClass: (0, rules_1.styleClass)(),
161
+ closeOnEscape: dropUnlessFalse('cb-confirm-dialog siempre se cancela con Escape.'),
162
+ // Comportamiento que cb-confirm-dialog resuelve solo (modal, foco atrapado en "cancelar", clic en la máscara cancela).
163
+ dismissableMask: (0, rules_1.drop)(),
164
+ blockScroll: (0, rules_1.drop)(),
165
+ closable: (0, rules_1.drop)(),
166
+ modal: (0, rules_1.drop)(),
167
+ draggable: (0, rules_1.drop)(),
168
+ focusTrap: (0, rules_1.drop)(),
169
+ defaultFocus: (0, rules_1.drop)(),
170
+ appendTo: (0, rules_1.drop)(),
171
+ autoZIndex: (0, rules_1.drop)(),
172
+ baseZIndex: (0, rules_1.drop)(),
173
+ transitionOptions: (0, rules_1.drop)(),
174
+ icon: (0, rules_1.unsupported)(NO_ICONS),
175
+ acceptIcon: (0, rules_1.unsupported)(NO_ICONS),
176
+ rejectIcon: (0, rules_1.unsupported)(NO_ICONS),
177
+ acceptVisible: (0, rules_1.unsupported)('cb-confirm-dialog muestra siempre los dos botones.'),
178
+ rejectVisible: (0, rules_1.unsupported)('cb-confirm-dialog muestra siempre los dos botones.'),
179
+ acceptButtonStyleClass: (0, rules_1.unsupported)('usa acceptSeverity.'),
180
+ rejectButtonStyleClass: (0, rules_1.unsupported)(NO_STYLE),
181
+ closeAriaLabel: (0, rules_1.drop)(),
182
+ acceptAriaLabel: (0, rules_1.unsupported)('el botón usa acceptLabel como nombre accesible.'),
183
+ rejectAriaLabel: (0, rules_1.unsupported)('el botón usa rejectLabel como nombre accesible.'),
184
+ style: (0, rules_1.unsupported)(NO_STYLE),
185
+ maskStyleClass: (0, rules_1.unsupported)(NO_STYLE),
186
+ breakpoints: (0, rules_1.unsupported)(NO_STYLE),
187
+ position: (0, rules_1.unsupported)('cb-confirm-dialog aparece centrado.'),
188
+ rtl: (0, rules_1.unsupported)('cb-confirm-dialog sigue la dirección del documento (dir="rtl").'),
189
+ '(onHide)': (0, rules_1.unsupported)('usa accept/reject en confirm() o los eventos (accepted)/(rejected).'),
190
+ },
191
+ child: (child) => (child.name === 'ng-template' ? { todo: NO_TEMPLATE } : null),
192
+ same: ['header', 'message', 'acceptLabel', 'rejectLabel', 'key', 'visible'],
193
+ })),
194
+ };
195
+ /** `<p-confirmpopup />` → `<cb-confirm-popup service />` (las confirmaciones con `target`). */
196
+ exports.confirmpopup = {
197
+ name: 'confirmpopup',
198
+ entry: '@caribeng/ui/confirmpopup',
199
+ symbol: 'CbConfirmPopup',
200
+ modules: {
201
+ 'primeng/confirmpopup': { ConfirmPopupModule: 'CbConfirmPopup', ConfirmPopup: 'CbConfirmPopup' },
202
+ },
203
+ elements: ['p-confirmpopup', 'p-confirmPopup', 'p-confirm-popup'].map((tag) => ({
204
+ tag,
205
+ to: 'cb-confirm-popup',
206
+ finalize: asServiceHost,
207
+ rules: {
208
+ styleClass: (0, rules_1.styleClass)(),
209
+ defaultFocus: (0, rules_1.drop)(),
210
+ appendTo: (0, rules_1.drop)(),
211
+ autoZIndex: (0, rules_1.drop)(),
212
+ baseZIndex: (0, rules_1.drop)(),
213
+ showTransitionOptions: (0, rules_1.drop)(),
214
+ hideTransitionOptions: (0, rules_1.drop)(),
215
+ motionOptions: (0, rules_1.drop)(),
216
+ style: (0, rules_1.unsupported)(NO_STYLE),
217
+ },
218
+ child: (child) => (child.name === 'ng-template' ? { todo: NO_TEMPLATE } : null),
219
+ same: ['key', 'visible'],
220
+ })),
221
+ };
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.datepicker = void 0;
4
+ const rules_1 = require("./rules");
5
+ const BEHAVIOUR = 'cb-datepicker gestiona este comportamiento por su cuenta.';
6
+ const NO_STYLE = 'personaliza cb-datepicker con los tokens CSS de CaribeNG.';
7
+ /**
8
+ * `<p-datepicker [(ngModel)]="fecha" dateFormat="dd/mm/yy" [showIcon]="true" />`
9
+ * → `<cb-datepicker [(ngModel)]="fecha" dateFormat="dd/mm/yy" editable />`
10
+ *
11
+ * `dateFormat` usa la misma sintaxis en las dos librerías. Con Angular Forms el
12
+ * valor es igual: una fecha, o `[inicio, fin]` con `selectionMode="range"`.
13
+ */
14
+ const rules = {
15
+ selectionMode: (binding, el) => {
16
+ if (binding.kind === 'static' && binding.value === 'multiple') {
17
+ el.todos.push(`${binding.source} — cb-datepicker no admite varias fechas sueltas; usa un rango o varios campos.`);
18
+ return;
19
+ }
20
+ el.attrs.push(binding.source);
21
+ },
22
+ numberOfMonths: (0, rules_1.numeric)(),
23
+ firstDayOfWeek: (0, rules_1.numeric)(),
24
+ stepMinute: (0, rules_1.numeric)(),
25
+ size: (0, rules_1.values)('size', rules_1.SIZE_VALUES),
26
+ styleClass: (0, rules_1.styleClass)(),
27
+ // PrimeNG deja escribir la fecha salvo con readonlyInput; cb-datepicker solo con editable (ver finalize).
28
+ readonlyInput: (0, rules_1.drop)(),
29
+ // cb-datepicker siempre muestra su icono y abre el calendario como overlay del CDK.
30
+ showIcon: (0, rules_1.drop)(),
31
+ iconDisplay: (0, rules_1.drop)(),
32
+ icon: (0, rules_1.drop)(),
33
+ appendTo: (0, rules_1.drop)(),
34
+ autoZIndex: (0, rules_1.drop)(),
35
+ baseZIndex: (0, rules_1.drop)(),
36
+ showOnFocus: (0, rules_1.drop)(),
37
+ showOtherMonths: (0, rules_1.drop)(),
38
+ selectOtherMonths: (0, rules_1.drop)(),
39
+ hideOnDateTimeSelect: (0, rules_1.drop)(),
40
+ keepInvalid: (0, rules_1.drop)(),
41
+ touchUI: (0, rules_1.drop)(),
42
+ focusTrap: (0, rules_1.drop)(),
43
+ showTransitionOptions: (0, rules_1.drop)(),
44
+ hideTransitionOptions: (0, rules_1.drop)(),
45
+ motionOptions: (0, rules_1.drop)(),
46
+ inline: (0, rules_1.unsupported)('cb-datepicker siempre se abre como desplegable.'),
47
+ timeOnly: (0, rules_1.unsupported)('cb-datepicker no tiene modo solo hora.'),
48
+ showSeconds: (0, rules_1.unsupported)('cb-datepicker muestra horas y minutos.'),
49
+ stepHour: (0, rules_1.unsupported)('cb-datepicker avanza las horas de una en una.'),
50
+ stepSecond: (0, rules_1.unsupported)('cb-datepicker muestra horas y minutos.'),
51
+ showButtonBar: (0, rules_1.unsupported)('usa presets (p. ej. [presets]="[\'today\']") para atajos de fecha.'),
52
+ showClear: (0, rules_1.unsupported)('borra la fecha desde el formulario.'),
53
+ showWeek: (0, rules_1.unsupported)('cb-datepicker no muestra el número de semana.'),
54
+ startWeekFromFirstDayOfYear: (0, rules_1.unsupported)('cb-datepicker no muestra el número de semana.'),
55
+ disabledDates: (0, rules_1.unsupported)('usa minDate/maxDate o valida la fecha en el formulario.'),
56
+ disabledDays: (0, rules_1.unsupported)('usa minDate/maxDate o valida la fecha en el formulario.'),
57
+ dataType: (0, rules_1.unsupported)('cb-datepicker siempre entrega objetos Date.'),
58
+ defaultDate: (0, rules_1.unsupported)('cb-datepicker abre en el mes de la fecha elegida o en el actual.'),
59
+ maxDateCount: (0, rules_1.unsupported)('cb-datepicker no admite varias fechas sueltas.'),
60
+ multipleSeparator: (0, rules_1.unsupported)('cb-datepicker no admite varias fechas sueltas.'),
61
+ rangeSeparator: (0, rules_1.unsupported)(BEHAVIOUR),
62
+ shortYearCutoff: (0, rules_1.unsupported)(BEHAVIOUR),
63
+ timeSeparator: (0, rules_1.unsupported)(BEHAVIOUR),
64
+ responsiveOptions: (0, rules_1.unsupported)(BEHAVIOUR),
65
+ panelStyle: (0, rules_1.unsupported)(NO_STYLE),
66
+ panelStyleClass: (0, rules_1.unsupported)(NO_STYLE),
67
+ inputStyle: (0, rules_1.unsupported)(NO_STYLE),
68
+ inputStyleClass: (0, rules_1.unsupported)(NO_STYLE),
69
+ todayButtonStyleClass: (0, rules_1.unsupported)(NO_STYLE),
70
+ clearButtonStyleClass: (0, rules_1.unsupported)(NO_STYLE),
71
+ ariaLabel: (0, rules_1.unsupported)('usa el input label de cb-datepicker.'),
72
+ ariaLabelledBy: (0, rules_1.unsupported)('usa el input label de cb-datepicker.'),
73
+ iconAriaLabel: (0, rules_1.unsupported)('el botón del calendario usa el texto de provideCaribeNG().'),
74
+ tabindex: (0, rules_1.unsupported)('el tabindex no se reenvía al campo interno.'),
75
+ autofocus: (0, rules_1.unsupported)('usa la directiva cbAutoFocus de @caribeng/ui/autofocus.'),
76
+ variant: (0, rules_1.unsupported)('cb-datepicker no tiene variante "filled".'),
77
+ fluid: (0, rules_1.unsupported)('cb-datepicker ya ocupa todo el ancho de su contenedor.'),
78
+ // PrimeNG emite la fecha elegida, igual que el valueChange de cb-datepicker.
79
+ '(onSelect)': (0, rules_1.event)('valueChange'),
80
+ '(onClose)': (0, rules_1.unsupported)('cb-datepicker no emite el cierre del calendario.'),
81
+ '(onClear)': (0, rules_1.unsupported)('escucha (valueChange) y comprueba el valor null.'),
82
+ '(onInput)': (0, rules_1.unsupported)('escucha (valueChange) o los cambios del control de formulario.'),
83
+ '(onTodayClick)': (0, rules_1.unsupported)('cb-datepicker no tiene barra de botones.'),
84
+ '(onClearClick)': (0, rules_1.unsupported)('cb-datepicker no tiene barra de botones.'),
85
+ '(onMonthChange)': (0, rules_1.unsupported)('cb-datepicker no emite el cambio de mes.'),
86
+ '(onYearChange)': (0, rules_1.unsupported)('cb-datepicker no emite el cambio de año.'),
87
+ '(onClickOutside)': (0, rules_1.unsupported)('cb-datepicker no emite el clic fuera.'),
88
+ '(onShow)': (0, rules_1.unsupported)('cb-datepicker no emite la apertura del calendario.'),
89
+ ...rules_1.FOCUS_EVENTS,
90
+ };
91
+ /** En PrimeNG el campo admite escribir la fecha salvo con `readonlyInput`; en cb-datepicker hay que pedirlo con `editable`. */
92
+ function finalize(el) {
93
+ const readonly = el.find('readonlyInput');
94
+ if (!readonly) {
95
+ el.attrs.push('editable');
96
+ }
97
+ else if ((0, rules_1.staticBoolean)(readonly) === null) {
98
+ el.attrs.push(`[editable]="!(${readonly.value})"`);
99
+ }
100
+ else if ((0, rules_1.staticBoolean)(readonly) === false) {
101
+ el.attrs.push('editable');
102
+ }
103
+ }
104
+ exports.datepicker = {
105
+ name: 'datepicker',
106
+ entry: '@caribeng/ui/datepicker',
107
+ symbol: 'CbDatepicker',
108
+ modules: {
109
+ 'primeng/datepicker': { DatePickerModule: 'CbDatepicker', DatePicker: 'CbDatepicker' },
110
+ // Nombre anterior a PrimeNG 18.
111
+ 'primeng/calendar': { CalendarModule: 'CbDatepicker', Calendar: 'CbDatepicker' },
112
+ },
113
+ elements: ['p-datepicker', 'p-datePicker', 'p-date-picker', 'p-calendar'].map((tag) => ({
114
+ tag,
115
+ to: 'cb-datepicker',
116
+ rules,
117
+ finalize,
118
+ child: (child) => (child.name === 'ng-template' ? { todo: 'cb-datepicker no admite plantillas personalizadas; el contenido no se mostrará.' } : null),
119
+ same: ['dateFormat', 'hourFormat', 'showTime', 'minDate', 'maxDate', 'view', 'placeholder', 'inputId', 'disabled', 'required', 'invalid'],
120
+ })),
121
+ };
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dialog = void 0;
4
+ const rules_1 = require("./rules");
5
+ /** `{ width: '25rem' }` · `{ 'width': "50vw" }`. */
6
+ const WIDTH_OBJECT = /^\s*\{\s*(['"]?)width\1\s*:\s*(['"])([^'"]+)\2\s*,?\s*\}\s*$/;
7
+ /** `width: 25rem` · `width: 25rem;`. */
8
+ const WIDTH_STYLE = /^\s*width\s*:\s*([^;]+?)\s*;?\s*$/;
9
+ /** `[style]="{ width: '25rem' }"` → `width="25rem"` (cb-dialog no aplica el style del host al panel). */
10
+ const style = (binding, el) => {
11
+ const width = binding.kind === 'property' ? WIDTH_OBJECT.exec(binding.value)?.[3] : binding.kind === 'static' ? WIDTH_STYLE.exec(binding.value)?.[1] : undefined;
12
+ if (width)
13
+ el.attrs.push((0, rules_1.renderAttr)('static', 'width', width));
14
+ else
15
+ el.todos.push(`${binding.source} — cb-dialog solo admite el ancho (input width).`);
16
+ };
17
+ /**
18
+ * `<p-dialog header="Editar" [(visible)]="abierto" [modal]="true" [style]="{ width: '25rem' }">`
19
+ * → `<cb-dialog header="Editar" [(visible)]="abierto" width="25rem">`
20
+ */
21
+ const rules = {
22
+ modal: (binding, el) => {
23
+ if ((0, rules_1.staticBoolean)(binding) !== true)
24
+ el.todos.push(`${binding.source} — cb-dialog siempre es modal; sin máscara usa <cb-drawer> o <cb-popover>.`);
25
+ },
26
+ style,
27
+ styleClass: (0, rules_1.styleClass)(),
28
+ // Comportamiento que cb-dialog resuelve solo (overlay del CDK, foco atrapado, scroll bloqueado).
29
+ appendTo: (0, rules_1.drop)(),
30
+ autoZIndex: (0, rules_1.drop)(),
31
+ baseZIndex: (0, rules_1.drop)(),
32
+ blockScroll: (0, rules_1.drop)(),
33
+ focusOnShow: (0, rules_1.drop)(),
34
+ focusTrap: (0, rules_1.drop)(),
35
+ keepInViewport: (0, rules_1.drop)(),
36
+ minX: (0, rules_1.drop)(),
37
+ minY: (0, rules_1.drop)(),
38
+ transitionOptions: (0, rules_1.drop)(),
39
+ motionOptions: (0, rules_1.drop)(),
40
+ maskMotionOptions: (0, rules_1.drop)(),
41
+ draggable: (0, rules_1.drop)(),
42
+ resizable: (0, rules_1.unsupported)('cb-dialog no se puede redimensionar.'),
43
+ maximizable: (0, rules_1.unsupported)('cb-dialog no se puede maximizar.'),
44
+ position: (0, rules_1.unsupported)('cb-dialog siempre aparece centrado; para un panel lateral usa <cb-drawer>.'),
45
+ breakpoints: (0, rules_1.unsupported)('ajusta el ancho con width (admite min(), clamp(), %).'),
46
+ contentStyle: (0, rules_1.unsupported)('aplica estilos al contenido proyectado.'),
47
+ contentStyleClass: (0, rules_1.unsupported)('aplica clases al contenido proyectado.'),
48
+ maskStyle: (0, rules_1.unsupported)('personaliza la máscara con los tokens CSS de cb-dialog.'),
49
+ maskStyleClass: (0, rules_1.unsupported)('personaliza la máscara con los tokens CSS de cb-dialog.'),
50
+ showHeader: (0, rules_1.unsupported)('cb-dialog muestra la cabecera si hay header o closable.'),
51
+ closeIcon: (0, rules_1.unsupported)('cb-dialog usa su propio icono de cierre.'),
52
+ closeAriaLabel: (0, rules_1.unsupported)('el botón de cierre usa el texto de provideCaribeNG().'),
53
+ closeTabindex: (0, rules_1.unsupported)('el botón de cierre ya es accesible por teclado.'),
54
+ closeButtonProps: (0, rules_1.unsupported)('cb-dialog usa su propio botón de cierre.'),
55
+ maximizeButtonProps: (0, rules_1.unsupported)('cb-dialog no se puede maximizar.'),
56
+ minimizeIcon: (0, rules_1.unsupported)('cb-dialog no se puede maximizar.'),
57
+ maximizeIcon: (0, rules_1.unsupported)('cb-dialog no se puede maximizar.'),
58
+ rtl: (0, rules_1.unsupported)('cb-dialog sigue la dirección del documento (dir="rtl").'),
59
+ role: (0, rules_1.unsupported)('cb-dialog usa role="dialog".'),
60
+ '(onResizeInit)': (0, rules_1.unsupported)('cb-dialog no se puede redimensionar.'),
61
+ '(onResizeEnd)': (0, rules_1.unsupported)('cb-dialog no se puede redimensionar.'),
62
+ '(onDragEnd)': (0, rules_1.unsupported)('cb-dialog no se puede arrastrar.'),
63
+ '(onMaximize)': (0, rules_1.unsupported)('cb-dialog no se puede maximizar.'),
64
+ };
65
+ const HEADER = 'cb-dialog solo admite una cabecera de texto (input header).';
66
+ /** El pie pasa a un `<div cb-dialog-footer>` y `#content` se desenvuelve; el resto de plantillas no tiene equivalente. */
67
+ const child = (0, rules_1.slotChild)('cb-dialog', 'cb-dialog-footer', { header: HEADER });
68
+ exports.dialog = {
69
+ name: 'dialog',
70
+ entry: '@caribeng/ui/dialog',
71
+ symbol: 'CbDialog',
72
+ modules: {
73
+ 'primeng/dialog': { DialogModule: 'CbDialog', Dialog: 'CbDialog' },
74
+ },
75
+ elements: [
76
+ {
77
+ tag: 'p-dialog',
78
+ to: 'cb-dialog',
79
+ rules,
80
+ child,
81
+ same: ['visible', 'header', 'closable', 'dismissableMask', 'closeOnEscape', 'ariaLabel', 'onShow', 'onHide', 'visibleChange'],
82
+ },
83
+ ],
84
+ };
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SOURCE_REWRITERS = exports.ROOT_SERVICES = exports.DIRECTIVES_BY_ATTR = exports.MAPPING_BY_TAG = exports.ELEMENTS_BY_ATTR = exports.ELEMENTS_BY_TAG = exports.ATTR_SYMBOLS = exports.TAG_SYMBOLS = exports.SYMBOLS = exports.MAPPINGS = void 0;
4
+ const button_1 = require("./button");
5
+ const card_1 = require("./card");
6
+ const checkbox_1 = require("./checkbox");
7
+ const confirm_1 = require("./confirm");
8
+ const datepicker_1 = require("./datepicker");
9
+ const dialog_1 = require("./dialog");
10
+ const inputnumber_1 = require("./inputnumber");
11
+ const inputtext_1 = require("./inputtext");
12
+ const menu_1 = require("./menu");
13
+ const multiselect_1 = require("./multiselect");
14
+ const radiobutton_1 = require("./radiobutton");
15
+ const select_1 = require("./select");
16
+ const tabs_1 = require("./tabs");
17
+ const table_1 = require("./table");
18
+ const tag_1 = require("./tag");
19
+ const textarea_1 = require("./textarea");
20
+ const toast_1 = require("./toast");
21
+ const toggleswitch_1 = require("./toggleswitch");
22
+ const tooltip_1 = require("./tooltip");
23
+ /** Componentes que el migrador sabe traducir. Para añadir uno, crea su archivo y regístralo aquí. */
24
+ exports.MAPPINGS = [
25
+ button_1.button,
26
+ inputtext_1.inputtext,
27
+ textarea_1.textarea,
28
+ inputnumber_1.inputnumber,
29
+ select_1.select,
30
+ multiselect_1.multiselect,
31
+ checkbox_1.checkbox,
32
+ radiobutton_1.radiobutton,
33
+ toggleswitch_1.toggleswitch,
34
+ datepicker_1.datepicker,
35
+ dialog_1.dialog,
36
+ confirm_1.confirmdialog,
37
+ confirm_1.confirmpopup,
38
+ menu_1.menu,
39
+ menu_1.menubar,
40
+ menu_1.tieredmenu,
41
+ menu_1.panelmenu,
42
+ menu_1.breadcrumb,
43
+ menu_1.tabmenu,
44
+ menu_1.splitbutton,
45
+ menu_1.contextmenu,
46
+ table_1.table,
47
+ tabs_1.tabs,
48
+ tabs_1.accordion,
49
+ tag_1.tag,
50
+ toast_1.toast,
51
+ card_1.card,
52
+ tooltip_1.tooltip,
53
+ ];
54
+ /** Módulo PrimeNG → (símbolo PrimeNG → símbolo CaribeNG). */
55
+ exports.SYMBOLS = (() => {
56
+ const index = new Map();
57
+ for (const mapping of exports.MAPPINGS) {
58
+ for (const [module, symbols] of Object.entries(mapping.modules)) {
59
+ const target = index.get(module) ?? new Map();
60
+ for (const [from, to] of Object.entries(symbols))
61
+ target.set(from, typeof to === 'string' ? { name: to, entry: mapping.entry } : to);
62
+ index.set(module, target);
63
+ }
64
+ }
65
+ return index;
66
+ })();
67
+ /** Tag CaribeNG → símbolo que hay que importar en el componente que lo usa. */
68
+ exports.TAG_SYMBOLS = new Map([
69
+ ['cb-icon', { name: 'CbIcon', entry: '@caribeng/ui/icon' }],
70
+ ...exports.MAPPINGS.flatMap((mapping) => mapping.elements.map((element) => [element.to, { name: element.symbol ?? mapping.symbol, entry: mapping.entry }])),
71
+ ...exports.MAPPINGS.flatMap((mapping) => Object.entries(mapping.tags ?? {}).map(([tag, name]) => [tag, { name, entry: mapping.entry }])),
72
+ ]);
73
+ /** Atributo de directiva CaribeNG (`cbTooltip`) → símbolo que hay que importar. */
74
+ exports.ATTR_SYMBOLS = new Map([
75
+ ...exports.MAPPINGS.flatMap((mapping) => (mapping.directives ?? []).map((directive) => [directive.to, { name: mapping.symbol, entry: mapping.entry }])),
76
+ ...exports.MAPPINGS.flatMap((mapping) => Object.entries(mapping.attrs ?? {}).map(([attr, name]) => [attr, { name, entry: mapping.entry }])),
77
+ ]);
78
+ /** Selectores por tag (`p-button`) y por directiva de atributo (`pButton`). */
79
+ exports.ELEMENTS_BY_TAG = new Map(exports.MAPPINGS.flatMap((mapping) => mapping.elements.filter((element) => element.tag).map((element) => [element.tag, element])));
80
+ exports.ELEMENTS_BY_ATTR = new Map(exports.MAPPINGS.flatMap((mapping) => mapping.elements.filter((element) => element.attr).map((element) => [element.attr, element])));
81
+ /** Tag PrimeNG → su mapeo completo (para saber qué módulo PrimeNG conservar si no se convierte). */
82
+ exports.MAPPING_BY_TAG = new Map(exports.MAPPINGS.flatMap((mapping) => mapping.elements.filter((element) => element.tag).map((element) => [element.tag, mapping])));
83
+ /** Directivas que se traducen sin cambiar el elemento (`pTooltip`). */
84
+ exports.DIRECTIVES_BY_ATTR = new Map(exports.MAPPINGS.flatMap((mapping) => (mapping.directives ?? []).map((directive) => [directive.attr, directive])));
85
+ /** Servicios `providedIn: 'root'` que no deben quedar en `providers`. */
86
+ exports.ROOT_SERVICES = new Set(exports.MAPPINGS.flatMap((mapping) => mapping.rootServices ?? []));
87
+ /** Reescrituras de uso de servicios (`MessageService.add`…). */
88
+ exports.SOURCE_REWRITERS = exports.MAPPINGS.flatMap((mapping) => (mapping.rewriteSource ? [mapping.rewriteSource] : []));
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inputnumber = void 0;
4
+ const rules_1 = require("./rules");
5
+ const NOT_FORWARDED = 'cb-input-number no reenvía este atributo al <input> interno.';
6
+ /**
7
+ * `<p-inputnumber [(ngModel)]="precio" mode="currency" currency="EUR" min="0" [showButtons]="true" />`
8
+ * → `<cb-input-number [(ngModel)]="precio" mode="currency" currency="EUR" [min]="0" [showButtons]="true" />`
9
+ */
10
+ const rules = {
11
+ min: (0, rules_1.numeric)(),
12
+ max: (0, rules_1.numeric)(),
13
+ step: (0, rules_1.numeric)(),
14
+ minFractionDigits: (0, rules_1.numeric)(),
15
+ maxFractionDigits: (0, rules_1.numeric)(),
16
+ size: (0, rules_1.values)('size', rules_1.SIZE_VALUES),
17
+ styleClass: (0, rules_1.styleClass)(),
18
+ buttonLayout: (binding, el) => {
19
+ if (!(binding.kind === 'static' && binding.value === 'stacked'))
20
+ el.todos.push(`${binding.source} — cb-input-number solo tiene un diseño de botones.`);
21
+ },
22
+ localeMatcher: (0, rules_1.drop)(),
23
+ format: (0, rules_1.unsupported)('cb-input-number siempre formatea el número.'),
24
+ currencyDisplay: (0, rules_1.unsupported)('cb-input-number muestra el símbolo de la moneda.'),
25
+ allowEmpty: (0, rules_1.unsupported)('cb-input-number admite vacío (null) por defecto.'),
26
+ showClear: (0, rules_1.unsupported)('cb-input-number no tiene botón para limpiar.'),
27
+ ariaLabel: (0, rules_1.unsupported)('usa el input label de cb-input-number.'),
28
+ ariaLabelledBy: (0, rules_1.unsupported)('usa el input label de cb-input-number.'),
29
+ ariaDescribedBy: (0, rules_1.unsupported)('usa los inputs hint/error de cb-input-number.'),
30
+ ariaRequired: (0, rules_1.unsupported)('usa required.'),
31
+ title: (0, rules_1.unsupported)(NOT_FORWARDED),
32
+ autocomplete: (0, rules_1.unsupported)(NOT_FORWARDED),
33
+ tabindex: (0, rules_1.unsupported)(NOT_FORWARDED),
34
+ autofocus: (0, rules_1.unsupported)('usa la directiva cbAutoFocus de @caribeng/ui/autofocus.'),
35
+ inputStyle: (0, rules_1.unsupported)('personaliza el campo con los tokens CSS de CaribeNG.'),
36
+ inputStyleClass: (0, rules_1.unsupported)('personaliza el campo con los tokens CSS de CaribeNG.'),
37
+ incrementButtonClass: (0, rules_1.unsupported)('cb-input-number usa sus propios botones.'),
38
+ decrementButtonClass: (0, rules_1.unsupported)('cb-input-number usa sus propios botones.'),
39
+ incrementButtonIcon: (0, rules_1.unsupported)('cb-input-number usa sus propios botones.'),
40
+ decrementButtonIcon: (0, rules_1.unsupported)('cb-input-number usa sus propios botones.'),
41
+ variant: (0, rules_1.unsupported)('cb-input-number no tiene variante "filled".'),
42
+ fluid: (0, rules_1.unsupported)('cb-input-number ya ocupa todo el ancho de su contenedor.'),
43
+ '(onInput)': (0, rules_1.unsupported)('escucha (valueChange) o los cambios del control de formulario.'),
44
+ '(onClear)': (0, rules_1.unsupported)('cb-input-number no tiene botón para limpiar.'),
45
+ '(onKeyDown)': (0, rules_1.event)('keydown'),
46
+ ...rules_1.FOCUS_EVENTS,
47
+ };
48
+ exports.inputnumber = {
49
+ name: 'inputnumber',
50
+ entry: '@caribeng/ui/input-number',
51
+ symbol: 'CbInputNumber',
52
+ modules: {
53
+ 'primeng/inputnumber': { InputNumberModule: 'CbInputNumber', InputNumber: 'CbInputNumber' },
54
+ },
55
+ elements: ['p-inputnumber', 'p-inputNumber', 'p-input-number'].map((tag) => ({
56
+ tag,
57
+ to: 'cb-input-number',
58
+ rules,
59
+ child: (child) => (child.name === 'ng-template' ? { todo: 'cb-input-number usa sus propios iconos; la plantilla no se mostrará.' } : null),
60
+ same: ['placeholder', 'inputId', 'readonly', 'disabled', 'required', 'invalid', 'showButtons', 'mode', 'currency', 'locale', 'useGrouping', 'prefix', 'suffix'],
61
+ })),
62
+ };