@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.
- package/README.md +311 -231
- package/fesm2022/caribeng-ui-accordion.mjs +2 -2
- package/fesm2022/caribeng-ui-account-picker.mjs +533 -0
- package/fesm2022/caribeng-ui-aging.mjs +488 -0
- package/fesm2022/{caribeng-ui-caribe-alert.mjs → caribeng-ui-alert.mjs} +45 -45
- package/fesm2022/caribeng-ui-amount.mjs +249 -0
- package/fesm2022/caribeng-ui-anchor.mjs +2 -2
- package/fesm2022/{caribeng-ui-caribe-animation-lottie.mjs → caribeng-ui-animation-lottie.mjs} +41 -41
- package/fesm2022/caribeng-ui-audit-log.mjs +323 -0
- package/fesm2022/caribeng-ui-avatar.mjs +4 -4
- package/fesm2022/caribeng-ui-badge.mjs +8 -2
- package/fesm2022/caribeng-ui-breadcrumb.mjs +26 -9
- package/fesm2022/{caribeng-ui-caribe-button-group.mjs → caribeng-ui-button-group.mjs} +15 -15
- package/fesm2022/caribeng-ui-button.mjs +2 -2
- package/fesm2022/{caribeng-ui-caribe-card-content.mjs → caribeng-ui-card-content.mjs} +39 -39
- package/fesm2022/{caribeng-ui-caribe-card-move.mjs → caribeng-ui-card-move.mjs} +65 -65
- package/fesm2022/{caribeng-ui-caribe-card-primary.mjs → caribeng-ui-card-primary.mjs} +31 -31
- package/fesm2022/{caribeng-ui-caribe-card-select.mjs → caribeng-ui-card-select.mjs} +67 -67
- package/fesm2022/caribeng-ui-carousel.mjs +2 -2
- package/fesm2022/caribeng-ui-cascadeselect.mjs +45 -9
- package/fesm2022/caribeng-ui-chart.mjs +8 -5
- package/fesm2022/caribeng-ui-chat.mjs +1303 -0
- package/fesm2022/{caribeng-ui-caribe-coachmark.mjs → caribeng-ui-coachmark.mjs} +85 -85
- package/fesm2022/caribeng-ui-code-block.mjs +332 -0
- package/fesm2022/caribeng-ui-colorpicker.mjs +99 -5
- package/fesm2022/caribeng-ui-command-palette.mjs +476 -0
- package/fesm2022/caribeng-ui-comments.mjs +864 -0
- package/fesm2022/caribeng-ui-confirmdialog.mjs +78 -13
- package/fesm2022/caribeng-ui-confirmpopup.mjs +91 -16
- package/fesm2022/caribeng-ui-contextmenu.mjs +8 -4
- package/fesm2022/caribeng-ui-copy-button.mjs +230 -0
- package/fesm2022/caribeng-ui-datagrid.mjs +1635 -0
- package/fesm2022/caribeng-ui-dataview.mjs +6 -3
- package/fesm2022/caribeng-ui-datepicker.mjs +2 -2
- package/fesm2022/caribeng-ui-dock.mjs +52 -12
- package/fesm2022/caribeng-ui-document.mjs +495 -0
- package/fesm2022/{caribeng-ui-caribe-dots-indicator.mjs → caribeng-ui-dots-indicator.mjs} +41 -41
- package/fesm2022/caribeng-ui-drawer.mjs +9 -4
- package/fesm2022/caribeng-ui-dynamic-form.mjs +1581 -0
- package/fesm2022/caribeng-ui-editor.mjs +2324 -1311
- package/fesm2022/{caribeng-ui-caribe-expansion-panel.mjs → caribeng-ui-expansion-panel.mjs} +39 -39
- package/fesm2022/{caribeng-ui-caribe-fab-menu.mjs → caribeng-ui-fab-menu.mjs} +75 -75
- package/fesm2022/caribeng-ui-fieldset.mjs +2 -2
- package/fesm2022/caribeng-ui-file-card.mjs +134 -17
- package/fesm2022/{caribeng-ui-caribe-file-download.mjs → caribeng-ui-file-download.mjs} +63 -63
- package/fesm2022/caribeng-ui-financial-report.mjs +380 -0
- package/fesm2022/{caribeng-ui-caribe-float-menu.mjs → caribeng-ui-float-menu.mjs} +31 -31
- package/fesm2022/caribeng-ui-floatlabel.mjs +2 -2
- package/fesm2022/caribeng-ui-flow.mjs +1508 -0
- package/fesm2022/caribeng-ui-folder-card.mjs +122 -12
- package/fesm2022/{caribeng-ui-caribe-footer.mjs → caribeng-ui-footer.mjs} +19 -19
- package/fesm2022/caribeng-ui-gantt.mjs +1094 -0
- package/fesm2022/{caribeng-ui-caribe-header.mjs → caribeng-ui-header.mjs} +49 -49
- package/fesm2022/{caribeng-ui-caribe-icon-button.mjs → caribeng-ui-icon-button.mjs} +23 -23
- package/fesm2022/caribeng-ui-image-cropper.mjs +671 -0
- package/fesm2022/caribeng-ui-import-wizard.mjs +746 -0
- package/fesm2022/caribeng-ui-infinite-scroll.mjs +226 -0
- package/fesm2022/caribeng-ui-inlinemessage.mjs +2 -2
- package/fesm2022/caribeng-ui-input-number.mjs +22 -6
- package/fesm2022/{caribeng-ui-caribe-input-search.mjs → caribeng-ui-input-search.mjs} +65 -65
- package/fesm2022/{caribeng-ui-caribe-input-token.mjs → caribeng-ui-input-token.mjs} +59 -59
- package/fesm2022/caribeng-ui-inputmask.mjs +8 -2
- package/fesm2022/caribeng-ui-inputotp.mjs +2 -2
- package/fesm2022/caribeng-ui-journal-entry.mjs +340 -0
- package/fesm2022/caribeng-ui-kanban.mjs +4612 -0
- package/fesm2022/caribeng-ui-kbd.mjs +122 -0
- package/fesm2022/caribeng-ui-kpi.mjs +189 -0
- package/fesm2022/{caribeng-ui-caribe-link.mjs → caribeng-ui-link.mjs} +37 -37
- package/fesm2022/caribeng-ui-masonry.mjs +93 -0
- package/fesm2022/caribeng-ui-media-player.mjs +821 -0
- package/fesm2022/caribeng-ui-megamenu.mjs +13 -9
- package/fesm2022/caribeng-ui-mentions.mjs +495 -0
- package/fesm2022/caribeng-ui-menu.mjs +8 -4
- package/fesm2022/caribeng-ui-menubar.mjs +9 -5
- package/fesm2022/caribeng-ui-message.mjs +6 -3
- package/fesm2022/caribeng-ui-notification-center.mjs +636 -0
- package/fesm2022/{caribeng-ui-caribe-off-canvas.mjs → caribeng-ui-off-canvas.mjs} +55 -55
- package/fesm2022/{caribeng-ui-caribe-onboarding.mjs → caribeng-ui-onboarding.mjs} +105 -105
- package/fesm2022/caribeng-ui-orderlist.mjs +2 -2
- package/fesm2022/caribeng-ui-organizationchart.mjs +6 -10
- package/fesm2022/caribeng-ui-panel.mjs +6 -6
- package/fesm2022/caribeng-ui-panelmenu.mjs +9 -6
- package/fesm2022/caribeng-ui-pdfviewer.mjs +1755 -25
- package/fesm2022/caribeng-ui-period-picker.mjs +637 -0
- package/fesm2022/caribeng-ui-phone-input.mjs +688 -0
- package/fesm2022/caribeng-ui-picklist.mjs +2 -2
- package/fesm2022/caribeng-ui-pivot.mjs +419 -0
- package/fesm2022/caribeng-ui-pricing.mjs +263 -69
- package/fesm2022/caribeng-ui-qrcode.mjs +564 -0
- package/fesm2022/caribeng-ui-rating.mjs +14 -17
- package/fesm2022/caribeng-ui-reconciliation.mjs +386 -0
- package/fesm2022/caribeng-ui-ripple.mjs +2 -0
- package/fesm2022/caribeng-ui-scheduler.mjs +1027 -0
- package/fesm2022/caribeng-ui-scrolltop.mjs +3 -1
- package/fesm2022/caribeng-ui-select.mjs +2 -2
- package/fesm2022/{caribeng-ui-caribe-shortcut.mjs → caribeng-ui-shortcut.mjs} +29 -29
- package/fesm2022/caribeng-ui-sidebar.mjs +573 -0
- package/fesm2022/caribeng-ui-signature-pad.mjs +654 -0
- package/fesm2022/{caribeng-ui-caribe-status.mjs → caribeng-ui-status.mjs} +11 -11
- package/fesm2022/{caribeng-ui-caribe-step-indicator.mjs → caribeng-ui-step-indicator.mjs} +53 -53
- package/fesm2022/caribeng-ui-stepper.mjs +12 -5
- package/fesm2022/caribeng-ui-steps.mjs +2 -2
- package/fesm2022/caribeng-ui-table.mjs +333 -19
- package/fesm2022/caribeng-ui-tabmenu.mjs +10 -6
- package/fesm2022/caribeng-ui-tabs.mjs +2 -2
- package/fesm2022/{caribeng-ui-caribe-tag-button.mjs → caribeng-ui-tag-button.mjs} +25 -25
- package/fesm2022/caribeng-ui-tag.mjs +2 -2
- package/fesm2022/caribeng-ui-tieredmenu.mjs +111 -21
- package/fesm2022/{caribeng-ui-caribe-tracker.mjs → caribeng-ui-tracker.mjs} +29 -29
- package/fesm2022/{caribeng-ui-caribe-transaction-status.mjs → caribeng-ui-transaction-status.mjs} +11 -11
- package/fesm2022/caribeng-ui-treeselect.mjs +44 -9
- package/fesm2022/caribeng-ui-treetable.mjs +236 -17
- package/fesm2022/{caribeng-ui-caribe-voucher.mjs → caribeng-ui-voucher.mjs} +45 -45
- package/fesm2022/caribeng-ui-xlsx.mjs +486 -0
- package/fesm2022/caribeng-ui.mjs +1568 -1
- package/package.json +258 -178
- package/schematics/collection.json +5 -0
- package/schematics/migrate-from-primeng/core-icons.json +1 -0
- package/schematics/migrate-from-primeng/icons.js +269 -0
- package/schematics/migrate-from-primeng/index.js +290 -0
- package/schematics/migrate-from-primeng/mappings/button.js +93 -0
- package/schematics/migrate-from-primeng/mappings/card.js +33 -0
- package/schematics/migrate-from-primeng/mappings/checkbox.js +44 -0
- package/schematics/migrate-from-primeng/mappings/confirm.js +221 -0
- package/schematics/migrate-from-primeng/mappings/datepicker.js +121 -0
- package/schematics/migrate-from-primeng/mappings/dialog.js +84 -0
- package/schematics/migrate-from-primeng/mappings/index.js +88 -0
- package/schematics/migrate-from-primeng/mappings/inputnumber.js +62 -0
- package/schematics/migrate-from-primeng/mappings/inputtext.js +60 -0
- package/schematics/migrate-from-primeng/mappings/menu.js +468 -0
- package/schematics/migrate-from-primeng/mappings/multiselect.js +49 -0
- package/schematics/migrate-from-primeng/mappings/radiobutton.js +22 -0
- package/schematics/migrate-from-primeng/mappings/rules.js +206 -0
- package/schematics/migrate-from-primeng/mappings/select.js +97 -0
- package/schematics/migrate-from-primeng/mappings/service-calls.js +100 -0
- package/schematics/migrate-from-primeng/mappings/table.js +613 -0
- package/schematics/migrate-from-primeng/mappings/tabs.js +225 -0
- package/schematics/migrate-from-primeng/mappings/tag.js +29 -0
- package/schematics/migrate-from-primeng/mappings/textarea.js +44 -0
- package/schematics/migrate-from-primeng/mappings/toast.js +173 -0
- package/schematics/migrate-from-primeng/mappings/toggleswitch.js +37 -0
- package/schematics/migrate-from-primeng/mappings/tooltip.js +44 -0
- package/schematics/migrate-from-primeng/mappings/types.js +10 -0
- package/schematics/migrate-from-primeng/report.js +79 -0
- package/schematics/migrate-from-primeng/schema.js +2 -0
- package/schematics/migrate-from-primeng/schema.json +34 -0
- package/schematics/migrate-from-primeng/template.js +387 -0
- package/schematics/migrate-from-primeng/todo.js +5 -0
- package/schematics/migrate-from-primeng/typescript.js +442 -0
- package/schematics/migrate-from-primeng/workspace.js +117 -0
- package/schematics/ng-add/index.js +16 -1
- package/types/caribeng-ui-account-picker.d.ts +142 -0
- package/types/caribeng-ui-aging.d.ts +123 -0
- package/types/{caribeng-ui-caribe-alert.d.ts → caribeng-ui-alert.d.ts} +2 -2
- package/types/caribeng-ui-amount.d.ts +82 -0
- package/types/{caribeng-ui-caribe-animation-lottie.d.ts → caribeng-ui-animation-lottie.d.ts} +2 -2
- package/types/caribeng-ui-audit-log.d.ts +86 -0
- package/types/caribeng-ui-badge.d.ts +3 -1
- package/types/caribeng-ui-breadcrumb.d.ts +9 -1
- package/types/{caribeng-ui-caribe-button-group.d.ts → caribeng-ui-button-group.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-card-content.d.ts → caribeng-ui-card-content.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-card-move.d.ts → caribeng-ui-card-move.d.ts} +1 -1
- package/types/{caribeng-ui-caribe-card-primary.d.ts → caribeng-ui-card-primary.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-card-select.d.ts → caribeng-ui-card-select.d.ts} +2 -2
- package/types/caribeng-ui-cascadeselect.d.ts +6 -0
- package/types/caribeng-ui-chart.d.ts +3 -1
- package/types/caribeng-ui-chat.d.ts +299 -0
- package/types/{caribeng-ui-caribe-coachmark.d.ts → caribeng-ui-coachmark.d.ts} +2 -2
- package/types/caribeng-ui-code-block.d.ts +65 -0
- package/types/caribeng-ui-colorpicker.d.ts +5 -1
- package/types/caribeng-ui-command-palette.d.ts +133 -0
- package/types/caribeng-ui-comments.d.ts +214 -0
- package/types/caribeng-ui-confirmdialog.d.ts +34 -2
- package/types/caribeng-ui-confirmpopup.d.ts +39 -2
- package/types/caribeng-ui-contextmenu.d.ts +7 -0
- package/types/caribeng-ui-copy-button.d.ts +90 -0
- package/types/caribeng-ui-datagrid.d.ts +269 -0
- package/types/caribeng-ui-dataview.d.ts +2 -0
- package/types/caribeng-ui-dock.d.ts +13 -1
- package/types/caribeng-ui-document.d.ts +138 -0
- package/types/{caribeng-ui-caribe-dots-indicator.d.ts → caribeng-ui-dots-indicator.d.ts} +2 -2
- package/types/caribeng-ui-drawer.d.ts +3 -1
- package/types/caribeng-ui-dynamic-form.d.ts +409 -0
- package/types/caribeng-ui-editor.d.ts +110 -12
- package/types/{caribeng-ui-caribe-expansion-panel.d.ts → caribeng-ui-expansion-panel.d.ts} +1 -1
- package/types/{caribeng-ui-caribe-fab-menu.d.ts → caribeng-ui-fab-menu.d.ts} +2 -2
- package/types/caribeng-ui-file-card.d.ts +27 -2
- package/types/{caribeng-ui-caribe-file-download.d.ts → caribeng-ui-file-download.d.ts} +1 -1
- package/types/caribeng-ui-financial-report.d.ts +102 -0
- package/types/{caribeng-ui-caribe-float-menu.d.ts → caribeng-ui-float-menu.d.ts} +2 -2
- package/types/caribeng-ui-flow.d.ts +228 -0
- package/types/caribeng-ui-folder-card.d.ts +27 -5
- package/types/{caribeng-ui-caribe-footer.d.ts → caribeng-ui-footer.d.ts} +2 -2
- package/types/caribeng-ui-gantt.d.ts +244 -0
- package/types/{caribeng-ui-caribe-header.d.ts → caribeng-ui-header.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-icon-button.d.ts → caribeng-ui-icon-button.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-illustration.d.ts → caribeng-ui-illustration.d.ts} +1 -1
- package/types/caribeng-ui-image-cropper.d.ts +169 -0
- package/types/caribeng-ui-import-wizard.d.ts +149 -0
- package/types/caribeng-ui-infinite-scroll.d.ts +75 -0
- package/types/caribeng-ui-input-number.d.ts +1 -1
- package/types/{caribeng-ui-caribe-input-search.d.ts → caribeng-ui-input-search.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-input-token.d.ts → caribeng-ui-input-token.d.ts} +2 -2
- package/types/caribeng-ui-inputmask.d.ts +3 -1
- package/types/caribeng-ui-journal-entry.d.ts +110 -0
- package/types/caribeng-ui-kanban.d.ts +783 -0
- package/types/caribeng-ui-kbd.d.ts +36 -0
- package/types/caribeng-ui-kpi.d.ts +64 -0
- package/types/{caribeng-ui-caribe-link.d.ts → caribeng-ui-link.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-logo.d.ts → caribeng-ui-logo.d.ts} +1 -1
- package/types/caribeng-ui-masonry.d.ts +32 -0
- package/types/caribeng-ui-media-player.d.ts +140 -0
- package/types/caribeng-ui-megamenu.d.ts +11 -0
- package/types/caribeng-ui-mentions.d.ts +127 -0
- package/types/caribeng-ui-menu.d.ts +7 -0
- package/types/caribeng-ui-menubar.d.ts +7 -0
- package/types/caribeng-ui-message.d.ts +2 -0
- package/types/caribeng-ui-notification-center.d.ts +153 -0
- package/types/{caribeng-ui-caribe-off-canvas.d.ts → caribeng-ui-off-canvas.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-onboarding.d.ts → caribeng-ui-onboarding.d.ts} +2 -2
- package/types/caribeng-ui-panelmenu.d.ts +7 -0
- package/types/caribeng-ui-pdfviewer.d.ts +245 -5
- package/types/caribeng-ui-period-picker.d.ts +148 -0
- package/types/caribeng-ui-phone-input.d.ts +168 -0
- package/types/caribeng-ui-pivot.d.ts +116 -0
- package/types/caribeng-ui-pricing.d.ts +41 -4
- package/types/caribeng-ui-qrcode.d.ts +88 -0
- package/types/caribeng-ui-reconciliation.d.ts +109 -0
- package/types/caribeng-ui-scheduler.d.ts +188 -0
- package/types/{caribeng-ui-caribe-shortcut.d.ts → caribeng-ui-shortcut.d.ts} +2 -2
- package/types/caribeng-ui-sidebar.d.ts +167 -0
- package/types/caribeng-ui-signature-pad.d.ts +151 -0
- package/types/{caribeng-ui-caribe-status.d.ts → caribeng-ui-status.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-step-indicator.d.ts → caribeng-ui-step-indicator.d.ts} +2 -2
- package/types/caribeng-ui-stepper.d.ts +2 -0
- package/types/caribeng-ui-table.d.ts +67 -3
- package/types/caribeng-ui-tabmenu.d.ts +7 -0
- package/types/{caribeng-ui-caribe-tag-button.d.ts → caribeng-ui-tag-button.d.ts} +2 -2
- package/types/caribeng-ui-tieredmenu.d.ts +17 -1
- package/types/{caribeng-ui-caribe-tracker.d.ts → caribeng-ui-tracker.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-transaction-status.d.ts → caribeng-ui-transaction-status.d.ts} +2 -2
- package/types/caribeng-ui-treeselect.d.ts +6 -0
- package/types/caribeng-ui-treetable.d.ts +67 -2
- package/types/{caribeng-ui-caribe-voucher.d.ts → caribeng-ui-voucher.d.ts} +2 -2
- package/types/caribeng-ui-xlsx.d.ts +79 -0
- package/types/caribeng-ui.d.ts +985 -2
- package/fesm2022/caribeng-ui-caribe-calendar.mjs +0 -92
- package/fesm2022/caribeng-ui-caribe-circle-loading.mjs +0 -130
- package/fesm2022/caribeng-ui-caribe-data-table.mjs +0 -94
- package/fesm2022/caribeng-ui-caribe-file-select.mjs +0 -88
- package/fesm2022/caribeng-ui-caribe-inline-alert.mjs +0 -100
- package/fesm2022/caribeng-ui-caribe-input-date.mjs +0 -138
- package/fesm2022/caribeng-ui-caribe-input-select.mjs +0 -154
- package/fesm2022/caribeng-ui-caribe-loader.mjs +0 -48
- package/fesm2022/caribeng-ui-caribe-modal.mjs +0 -119
- package/fesm2022/caribeng-ui-caribe-pictogram.mjs +0 -52
- package/fesm2022/caribeng-ui-caribe-pop-over.mjs +0 -104
- package/fesm2022/caribeng-ui-caribe-preloader.mjs +0 -57
- package/fesm2022/caribeng-ui-caribe-progress-bar.mjs +0 -84
- package/fesm2022/caribeng-ui-caribe-stroke.mjs +0 -69
- package/fesm2022/caribeng-ui-caribe-switch.mjs +0 -182
- package/styles/caribeng.css +0 -380
- package/styles/scss/_mixins.scss +0 -46
- package/styles/scss/_overlay.scss +0 -15
- package/styles/scss/_tokens.scss +0 -267
- package/styles/scss/_utilities.scss +0 -73
- package/styles/scss/_variables.scss +0 -33
- package/styles/scss/index.scss +0 -16
- package/types/caribeng-ui-caribe-calendar.d.ts +0 -27
- package/types/caribeng-ui-caribe-circle-loading.d.ts +0 -28
- package/types/caribeng-ui-caribe-data-table.d.ts +0 -26
- package/types/caribeng-ui-caribe-file-select.d.ts +0 -31
- package/types/caribeng-ui-caribe-inline-alert.d.ts +0 -28
- package/types/caribeng-ui-caribe-input-date.d.ts +0 -40
- package/types/caribeng-ui-caribe-input-select.d.ts +0 -47
- package/types/caribeng-ui-caribe-loader.d.ts +0 -22
- package/types/caribeng-ui-caribe-modal.d.ts +0 -21
- package/types/caribeng-ui-caribe-pictogram.d.ts +0 -15
- package/types/caribeng-ui-caribe-pop-over.d.ts +0 -17
- package/types/caribeng-ui-caribe-preloader.d.ts +0 -24
- package/types/caribeng-ui-caribe-progress-bar.d.ts +0 -28
- package/types/caribeng-ui-caribe-stroke.d.ts +0 -17
- package/types/caribeng-ui-caribe-switch.d.ts +0 -55
- /package/fesm2022/{caribeng-ui-caribe-illustration.mjs → caribeng-ui-illustration.mjs} +0 -0
- /package/fesm2022/{caribeng-ui-caribe-logo.mjs → caribeng-ui-logo.mjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
["flip-horizontal","flip-vertical","accessibility","arrow-big-down","arrow-big-down-dash","arrow-big-left","arrow-big-left-dash","arrow-big-right","arrow-big-right-dash","arrow-big-up","arrow-big-up-dash","arrow-down","arrow-down-0-1","arrow-down-1-0","arrow-down-a-z","arrow-down-from-line","arrow-down-left","arrow-down-narrow-wide","arrow-down-right","arrow-down-to-dot","arrow-down-to-line","arrow-down-up","arrow-down-wide-narrow","arrow-down-z-a","arrow-left","arrow-left-from-line","arrow-left-right","arrow-left-to-line","arrow-right","arrow-right-from-line","arrow-right-left","arrow-right-to-line","arrow-up","arrow-up-0-1","arrow-up-1-0","arrow-up-a-z","arrow-up-down","arrow-up-from-dot","arrow-up-from-line","arrow-up-left","arrow-up-narrow-wide","arrow-up-right","arrow-up-to-line","arrow-up-wide-narrow","arrow-up-z-a","arrows-up-from-line","astroid","badge","barrel","bell","binoculars","birdhouse","calendar","calendar-chevrons-left","calendar-chevrons-right","calendar-days","calendar-sync","castle","check","check-check","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","chevrons-down","chevrons-down-up","chevrons-left","chevrons-left-right","chevrons-right","chevrons-right-left","chevrons-up","chevrons-up-down","church","circle","circle-alert","circle-arrow-down","circle-arrow-left","circle-arrow-out-down-left","circle-arrow-out-down-right","circle-arrow-out-up-left","circle-arrow-out-up-right","circle-arrow-right","circle-arrow-up","circle-check","circle-chevron-down","circle-chevron-left","circle-chevron-right","circle-chevron-up","circle-fading-arrow-up","circle-parking","circle-parking-off","circle-x","clipboard","clipboard-copy","clipboard-paste","clock","clock-arrow-right","cloud-backup","cloud-download","cloud-sync","cloud-upload","compass","copy","corner-down-left","corner-down-right","corner-left-down","corner-left-up","corner-right-down","corner-right-up","corner-up-left","corner-up-right","credit-card-reader","dam","database-backup","decimals-arrow-left","decimals-arrow-right","delete","dome","download","dumbbell","earth","ev-charger","expand","external-link","eye","eye-off","factory","fast-forward","faucet","ferris-wheel","file","file-down","file-input","file-output","file-up","flag-triangle-left","flag-triangle-right","fold-horizontal","fold-vertical","folder","folder-down","folder-input","folder-output","folder-sync","folder-up","footprints","fuel","funnel","gavel","git-commit-horizontal","git-commit-vertical","git-compare-arrows","git-pull-request-arrow","git-pull-request-create-arrow","globe","globe-check","globe-code","globe-off","globe-x","hard-drive-download","hard-drive-upload","heart","hiking-stick","hospital","hotel","house","image","import","info","iteration-ccw","iteration-cw","landmark","lasso-select","layers-arrow-up","library","library-big","lighthouse","line-dot-bottom-vertical","line-dot-left-horizontal","line-dot-right-horizontal","line-dot-top-vertical","list-chevrons-down-up","list-chevrons-up-down","loader","loader-circle","locate","locate-fixed","locate-off","lock","log-in","log-out","mail","map","map-minus","map-pin","map-pin-check","map-pin-check-inside","map-pin-house","map-pin-minus","map-pin-minus-inside","map-pin-off","map-pin-pen","map-pin-plus","map-pin-plus-inside","map-pin-search","map-pin-x","map-pin-x-inside","map-pinned","map-plus","maximize-2","menu","merge","milestone","minimize-2","minus","moon","mosque","mouse-pointer","mouse-pointer-2","mouse-pointer-2-off","mouse-pointer-ban","mouse-pointer-click","move","move-diagonal","move-diagonal-2","move-down","move-down-left","move-down-right","move-horizontal","move-left","move-right","move-up","move-up-left","move-up-right","move-vertical","navigation","navigation-2","navigation-2-off","navigation-off","palette","panel-bottom-close","panel-bottom-open","panel-left-close","panel-left-open","panel-right-close","panel-right-open","panel-top-close","panel-top-open","park","parking-meter","pencil","phone-forwarded","phone-incoming","phone-outgoing","pin","pin-off","plane","play","plug","plus","puzzle","radar","redo","redo-2","redo-dot","refresh-ccw","refresh-ccw-dot","refresh-cw","refresh-cw-off","repeat","repeat-2","repeat-off","rewind","roller-coaster","rotate-ccw","rotate-ccw-clock","rotate-ccw-square","rotate-cw","rotate-cw-clock","rotate-cw-square","route","route-off","save","scale","school","search","separator-horizontal","separator-vertical","settings","shield-check","ship","ship-cargo","ship-wheel","shrink","shuffle","signpost","signpost-big","skip-back","skip-forward","sparkles","spline-pointer","split","square-arrow-down","square-arrow-down-left","square-arrow-down-right","square-arrow-left","square-arrow-out-down-left","square-arrow-out-down-right","square-arrow-out-up-left","square-arrow-out-up-right","square-arrow-right","square-arrow-right-enter","square-arrow-right-exit","square-arrow-up","square-arrow-up-left","square-arrow-up-right","square-chevron-down","square-chevron-left","square-chevron-right","square-chevron-up","square-dashed-mouse-pointer","square-library","square-m","square-mouse-pointer","square-parking","square-parking-off","square-play","star","step-back","step-forward","store","sun","sunrise","sunset","text-wrap","train-front-tunnel","train-track","trash","tree-pine","trending-down","trending-up","trending-up-down","triangle-alert","undo","undo-2","undo-dot","unfold-horizontal","unfold-vertical","university","upload","user","user-round-arrow-left","users","utensils","utensils-crossed","warehouse","waves-horizontal","waypoints","wind-arrow-up","x","zap"]
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PRIME_ICONS = void 0;
|
|
4
|
+
exports.parsePrimeIcon = parsePrimeIcon;
|
|
5
|
+
exports.isCoreIcon = isCoreIcon;
|
|
6
|
+
exports.catalogExport = catalogExport;
|
|
7
|
+
const node_fs_1 = require("node:fs");
|
|
8
|
+
const node_path_1 = require("node:path");
|
|
9
|
+
/**
|
|
10
|
+
* PrimeIcons (`pi pi-<nombre>`) → iconos de CaribeNG (nombres de Lucide).
|
|
11
|
+
* Los que no están aquí se dejan con un aviso. Un test comprueba que cada
|
|
12
|
+
* destino existe en el set núcleo o en el catálogo `@caribeng/ui/icons`.
|
|
13
|
+
*/
|
|
14
|
+
exports.PRIME_ICONS = {
|
|
15
|
+
check: 'check',
|
|
16
|
+
'check-circle': 'circle-check',
|
|
17
|
+
'check-square': 'square-check',
|
|
18
|
+
times: 'x',
|
|
19
|
+
'times-circle': 'circle-x',
|
|
20
|
+
plus: 'plus',
|
|
21
|
+
'plus-circle': 'circle-plus',
|
|
22
|
+
minus: 'minus',
|
|
23
|
+
'minus-circle': 'circle-minus',
|
|
24
|
+
trash: 'trash',
|
|
25
|
+
pencil: 'pencil',
|
|
26
|
+
'pen-to-square': 'square-pen',
|
|
27
|
+
'file-edit': 'file-pen',
|
|
28
|
+
search: 'search',
|
|
29
|
+
'search-plus': 'zoom-in',
|
|
30
|
+
'search-minus': 'zoom-out',
|
|
31
|
+
user: 'user',
|
|
32
|
+
'user-plus': 'user-plus',
|
|
33
|
+
'user-minus': 'user-minus',
|
|
34
|
+
'user-edit': 'user-pen',
|
|
35
|
+
users: 'users',
|
|
36
|
+
home: 'house',
|
|
37
|
+
cog: 'settings',
|
|
38
|
+
sliders_h: 'sliders-horizontal',
|
|
39
|
+
'sliders-h': 'sliders-horizontal',
|
|
40
|
+
'sliders-v': 'sliders-vertical',
|
|
41
|
+
bars: 'menu',
|
|
42
|
+
'chevron-down': 'chevron-down',
|
|
43
|
+
'chevron-up': 'chevron-up',
|
|
44
|
+
'chevron-left': 'chevron-left',
|
|
45
|
+
'chevron-right': 'chevron-right',
|
|
46
|
+
'chevron-circle-down': 'circle-chevron-down',
|
|
47
|
+
'chevron-circle-up': 'circle-chevron-up',
|
|
48
|
+
'chevron-circle-left': 'circle-chevron-left',
|
|
49
|
+
'chevron-circle-right': 'circle-chevron-right',
|
|
50
|
+
'angle-down': 'chevron-down',
|
|
51
|
+
'angle-up': 'chevron-up',
|
|
52
|
+
'angle-left': 'chevron-left',
|
|
53
|
+
'angle-right': 'chevron-right',
|
|
54
|
+
'angle-double-down': 'chevrons-down',
|
|
55
|
+
'angle-double-up': 'chevrons-up',
|
|
56
|
+
'angle-double-left': 'chevrons-left',
|
|
57
|
+
'angle-double-right': 'chevrons-right',
|
|
58
|
+
'arrow-down': 'arrow-down',
|
|
59
|
+
'arrow-up': 'arrow-up',
|
|
60
|
+
'arrow-left': 'arrow-left',
|
|
61
|
+
'arrow-right': 'arrow-right',
|
|
62
|
+
'arrow-up-right': 'arrow-up-right',
|
|
63
|
+
'arrow-down-left': 'arrow-down-left',
|
|
64
|
+
'arrow-right-arrow-left': 'arrow-left-right',
|
|
65
|
+
'arrows-h': 'move-horizontal',
|
|
66
|
+
'arrows-v': 'move-vertical',
|
|
67
|
+
'arrows-alt': 'move',
|
|
68
|
+
'sort-alt': 'arrow-up-down',
|
|
69
|
+
'sort-amount-down': 'arrow-down-wide-narrow',
|
|
70
|
+
'sort-amount-up': 'arrow-up-wide-narrow',
|
|
71
|
+
'sort-alpha-down': 'arrow-down-a-z',
|
|
72
|
+
'sort-alpha-up': 'arrow-up-a-z',
|
|
73
|
+
refresh: 'refresh-cw',
|
|
74
|
+
sync: 'refresh-cw',
|
|
75
|
+
replay: 'rotate-ccw',
|
|
76
|
+
undo: 'undo',
|
|
77
|
+
history: 'rotate-ccw-clock',
|
|
78
|
+
save: 'save',
|
|
79
|
+
download: 'download',
|
|
80
|
+
upload: 'upload',
|
|
81
|
+
eye: 'eye',
|
|
82
|
+
'eye-slash': 'eye-off',
|
|
83
|
+
calendar: 'calendar',
|
|
84
|
+
'calendar-plus': 'calendar-plus',
|
|
85
|
+
'calendar-minus': 'calendar-minus',
|
|
86
|
+
'calendar-times': 'calendar-x',
|
|
87
|
+
clock: 'clock',
|
|
88
|
+
stopwatch: 'timer',
|
|
89
|
+
envelope: 'mail',
|
|
90
|
+
inbox: 'inbox',
|
|
91
|
+
phone: 'phone',
|
|
92
|
+
mobile: 'smartphone',
|
|
93
|
+
tablet: 'tablet',
|
|
94
|
+
desktop: 'monitor',
|
|
95
|
+
lock: 'lock',
|
|
96
|
+
'lock-open': 'lock-open',
|
|
97
|
+
unlock: 'lock-open',
|
|
98
|
+
key: 'key',
|
|
99
|
+
shield: 'shield',
|
|
100
|
+
'sign-in': 'log-in',
|
|
101
|
+
'sign-out': 'log-out',
|
|
102
|
+
'power-off': 'power',
|
|
103
|
+
info: 'info',
|
|
104
|
+
'info-circle': 'info',
|
|
105
|
+
question: 'circle-question-mark',
|
|
106
|
+
'question-circle': 'circle-question-mark',
|
|
107
|
+
exclamation: 'circle-alert',
|
|
108
|
+
'exclamation-circle': 'circle-alert',
|
|
109
|
+
'exclamation-triangle': 'triangle-alert',
|
|
110
|
+
ban: 'ban',
|
|
111
|
+
star: 'star',
|
|
112
|
+
'star-fill': 'star',
|
|
113
|
+
heart: 'heart',
|
|
114
|
+
'heart-fill': 'heart',
|
|
115
|
+
bookmark: 'bookmark',
|
|
116
|
+
'bookmark-fill': 'bookmark',
|
|
117
|
+
'thumbs-up': 'thumbs-up',
|
|
118
|
+
'thumbs-down': 'thumbs-down',
|
|
119
|
+
filter: 'funnel',
|
|
120
|
+
'filter-fill': 'funnel',
|
|
121
|
+
'filter-slash': 'funnel-x',
|
|
122
|
+
'external-link': 'external-link',
|
|
123
|
+
link: 'link',
|
|
124
|
+
copy: 'copy',
|
|
125
|
+
clone: 'copy',
|
|
126
|
+
clipboard: 'clipboard',
|
|
127
|
+
file: 'file',
|
|
128
|
+
'file-pdf': 'file-text',
|
|
129
|
+
'file-excel': 'file-spreadsheet',
|
|
130
|
+
'file-word': 'file-text',
|
|
131
|
+
'file-export': 'file-output',
|
|
132
|
+
'file-import': 'file-input',
|
|
133
|
+
folder: 'folder',
|
|
134
|
+
'folder-open': 'folder-open',
|
|
135
|
+
image: 'image',
|
|
136
|
+
images: 'images',
|
|
137
|
+
camera: 'camera',
|
|
138
|
+
video: 'video',
|
|
139
|
+
microphone: 'mic',
|
|
140
|
+
'volume-up': 'volume-2',
|
|
141
|
+
'volume-down': 'volume-1',
|
|
142
|
+
'volume-off': 'volume-x',
|
|
143
|
+
play: 'play',
|
|
144
|
+
pause: 'pause',
|
|
145
|
+
stop: 'square',
|
|
146
|
+
'step-forward': 'skip-forward',
|
|
147
|
+
'step-backward': 'skip-back',
|
|
148
|
+
forward: 'fast-forward',
|
|
149
|
+
backward: 'rewind',
|
|
150
|
+
print: 'printer',
|
|
151
|
+
'share-alt': 'share-2',
|
|
152
|
+
send: 'send',
|
|
153
|
+
'map-marker': 'map-pin',
|
|
154
|
+
map: 'map',
|
|
155
|
+
globe: 'globe',
|
|
156
|
+
compass: 'compass',
|
|
157
|
+
bell: 'bell',
|
|
158
|
+
'bell-slash': 'bell-off',
|
|
159
|
+
'shopping-cart': 'shopping-cart',
|
|
160
|
+
'shopping-bag': 'shopping-bag',
|
|
161
|
+
'cart-plus': 'shopping-cart',
|
|
162
|
+
tag: 'tag',
|
|
163
|
+
tags: 'tags',
|
|
164
|
+
'ellipsis-v': 'ellipsis-vertical',
|
|
165
|
+
'ellipsis-h': 'ellipsis',
|
|
166
|
+
spinner: 'loader-circle',
|
|
167
|
+
'spinner-dotted': 'loader',
|
|
168
|
+
'circle-notch': 'loader-circle',
|
|
169
|
+
sun: 'sun',
|
|
170
|
+
moon: 'moon',
|
|
171
|
+
comment: 'message-circle',
|
|
172
|
+
comments: 'messages-square',
|
|
173
|
+
wrench: 'wrench',
|
|
174
|
+
hammer: 'hammer',
|
|
175
|
+
database: 'database',
|
|
176
|
+
server: 'server',
|
|
177
|
+
'chart-bar': 'chart-column',
|
|
178
|
+
'chart-line': 'chart-line',
|
|
179
|
+
'chart-pie': 'chart-pie',
|
|
180
|
+
'chart-scatter': 'chart-scatter',
|
|
181
|
+
list: 'list',
|
|
182
|
+
'list-check': 'list-checks',
|
|
183
|
+
'th-large': 'layout-grid',
|
|
184
|
+
table: 'table',
|
|
185
|
+
paperclip: 'paperclip',
|
|
186
|
+
cloud: 'cloud',
|
|
187
|
+
'cloud-upload': 'cloud-upload',
|
|
188
|
+
'cloud-download': 'cloud-download',
|
|
189
|
+
'credit-card': 'credit-card',
|
|
190
|
+
wallet: 'wallet',
|
|
191
|
+
dollar: 'dollar-sign',
|
|
192
|
+
euro: 'euro',
|
|
193
|
+
'money-bill': 'banknote',
|
|
194
|
+
percentage: 'percent',
|
|
195
|
+
calculator: 'calculator',
|
|
196
|
+
receipt: 'receipt',
|
|
197
|
+
ticket: 'ticket',
|
|
198
|
+
building: 'building',
|
|
199
|
+
'building-columns': 'landmark',
|
|
200
|
+
briefcase: 'briefcase',
|
|
201
|
+
flag: 'flag',
|
|
202
|
+
'flag-fill': 'flag',
|
|
203
|
+
gift: 'gift',
|
|
204
|
+
book: 'book',
|
|
205
|
+
box: 'box',
|
|
206
|
+
car: 'car',
|
|
207
|
+
truck: 'truck',
|
|
208
|
+
'id-card': 'id-card',
|
|
209
|
+
verified: 'badge-check',
|
|
210
|
+
megaphone: 'megaphone',
|
|
211
|
+
bolt: 'zap',
|
|
212
|
+
at: 'at-sign',
|
|
213
|
+
hashtag: 'hash',
|
|
214
|
+
palette: 'palette',
|
|
215
|
+
qrcode: 'qr-code',
|
|
216
|
+
expand: 'expand',
|
|
217
|
+
'window-maximize': 'maximize-2',
|
|
218
|
+
'window-minimize': 'minimize-2',
|
|
219
|
+
sitemap: 'network',
|
|
220
|
+
'objects-column': 'layout-dashboard',
|
|
221
|
+
'circle-fill': 'circle',
|
|
222
|
+
circle: 'circle',
|
|
223
|
+
'stop-circle': 'circle-stop',
|
|
224
|
+
'play-circle': 'circle-play',
|
|
225
|
+
'pause-circle': 'circle-pause',
|
|
226
|
+
directions: 'signpost',
|
|
227
|
+
language: 'languages',
|
|
228
|
+
'shield-check': 'shield-check',
|
|
229
|
+
};
|
|
230
|
+
/** Clases de PrimeIcons que no son un icono. */
|
|
231
|
+
const MODIFIERS = new Set(['pi', 'pi-fw', 'pi-spin']);
|
|
232
|
+
/** Lee `"pi pi-check pi-spin mr-2"`. `null` si las clases no son de un icono de PrimeIcons. */
|
|
233
|
+
function parsePrimeIcon(classes) {
|
|
234
|
+
const tokens = classes.split(/\s+/).filter(Boolean);
|
|
235
|
+
if (!tokens.includes('pi'))
|
|
236
|
+
return null;
|
|
237
|
+
const icon = tokens.find((token) => token.startsWith('pi-') && !MODIFIERS.has(token));
|
|
238
|
+
if (!icon)
|
|
239
|
+
return null;
|
|
240
|
+
const prime = icon.slice(3);
|
|
241
|
+
return {
|
|
242
|
+
prime,
|
|
243
|
+
name: exports.PRIME_ICONS[prime] ?? null,
|
|
244
|
+
spin: tokens.includes('pi-spin'),
|
|
245
|
+
rest: tokens.filter((token) => token !== 'pi' && !token.startsWith('pi-')),
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
let coreIcons;
|
|
249
|
+
/**
|
|
250
|
+
* Iconos del set núcleo de CaribeNG (se registran solos). Los demás hay que
|
|
251
|
+
* registrarlos con `provideCbIcons`. `core-icons.json` lo genera
|
|
252
|
+
* `scripts/build-schematics.mjs` a partir de `icon/src/lib/icons.ts`.
|
|
253
|
+
*/
|
|
254
|
+
function isCoreIcon(name) {
|
|
255
|
+
coreIcons ??= new Set(JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(__dirname, 'core-icons.json'), 'utf8')));
|
|
256
|
+
return coreIcons.has(name);
|
|
257
|
+
}
|
|
258
|
+
/** Palabras reservadas: el catálogo las exporta con prefijo (`delete` → `iconDelete`). */
|
|
259
|
+
const RESERVED = new Set(('break case catch class const continue debugger default delete do else enum export extends false finally for ' +
|
|
260
|
+
'function if import in instanceof new null return super switch this throw true try typeof var void while ' +
|
|
261
|
+
'with let static yield await implements interface package private protected public').split(' '));
|
|
262
|
+
/**
|
|
263
|
+
* Nombre del export del catálogo `@caribeng/ui/icons` (`arrow-down-0-1` →
|
|
264
|
+
* `arrowDown01`). Misma regla que `icon/scripts/generate-icons.mjs`.
|
|
265
|
+
*/
|
|
266
|
+
function catalogExport(name) {
|
|
267
|
+
const camel = name.replace(/-([a-z0-9])/g, (_, char) => char.toUpperCase());
|
|
268
|
+
return /^[0-9]/.test(camel) || RESERVED.has(camel) ? `icon${camel[0].toUpperCase()}${camel.slice(1)}` : camel;
|
|
269
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.migrateFromPrimeng = migrateFromPrimeng;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
6
|
+
const utility_1 = require("@schematics/angular/utility");
|
|
7
|
+
const index_1 = require("../ng-add/index");
|
|
8
|
+
const icons_1 = require("./icons");
|
|
9
|
+
const mappings_1 = require("./mappings");
|
|
10
|
+
const report_1 = require("./report");
|
|
11
|
+
const template_1 = require("./template");
|
|
12
|
+
const typescript_1 = require("./typescript");
|
|
13
|
+
const workspace_1 = require("./workspace");
|
|
14
|
+
/** Versión mínima de PrimeNG con la que se escribieron los mapeos (`p-select` existe desde la 18). */
|
|
15
|
+
const MIN_PRIMENG_MAJOR = 18;
|
|
16
|
+
const STYLESHEET = /\.(css|scss|sass|less)$/;
|
|
17
|
+
const WORKSPACE_CONFIG = /(^|\/)(angular|project)\.json$/;
|
|
18
|
+
/**
|
|
19
|
+
* `ng generate @caribeng/ui:migrate-from-primeng`: traduce un proyecto
|
|
20
|
+
* PrimeNG a CaribeNG. Cambia imports, plantillas, iconos, estilos y el
|
|
21
|
+
* proveedor; lo que no puede traducir con seguridad lo marca con
|
|
22
|
+
* `TODO(caribeng)` y lo resume en `caribeng-migration-report.md`.
|
|
23
|
+
*/
|
|
24
|
+
function migrateFromPrimeng(options) {
|
|
25
|
+
return async (tree, context) => {
|
|
26
|
+
checkPreconditions(tree, options);
|
|
27
|
+
context.logger.info('Migrando de PrimeNG a CaribeNG. Revisa el resultado con `git diff` antes de hacer commit.');
|
|
28
|
+
const migration = {
|
|
29
|
+
compiler: await (0, template_1.loadCompiler)(),
|
|
30
|
+
context,
|
|
31
|
+
changed: new Set(),
|
|
32
|
+
icons: new Map(),
|
|
33
|
+
templates: new Set(),
|
|
34
|
+
manual: [],
|
|
35
|
+
};
|
|
36
|
+
const root = normalizeRoot(options.path);
|
|
37
|
+
const files = (0, workspace_1.workspaceFiles)(tree, root);
|
|
38
|
+
for (const path of files) {
|
|
39
|
+
if (/\.(ts|mts)$/.test(path) && !path.endsWith('.d.ts'))
|
|
40
|
+
migrateSource(tree, path, migration);
|
|
41
|
+
}
|
|
42
|
+
for (const path of files) {
|
|
43
|
+
if (path.endsWith('.html') && !migration.templates.has(path))
|
|
44
|
+
migrateHtml(tree, path, migration);
|
|
45
|
+
else if (STYLESHEET.test(path))
|
|
46
|
+
migrateStylesheet(tree, path, migration);
|
|
47
|
+
}
|
|
48
|
+
for (const path of (0, workspace_1.workspaceFiles)(tree)) {
|
|
49
|
+
if (WORKSPACE_CONFIG.test(path) && (0, workspace_1.removePrimeStyleEntries)(tree, path, context))
|
|
50
|
+
migration.changed.add(path);
|
|
51
|
+
}
|
|
52
|
+
const apps = await applications(tree, context);
|
|
53
|
+
return (0, schematics_1.chain)([
|
|
54
|
+
...apps.map((app) => (0, index_1.addStyles)(app.name)),
|
|
55
|
+
...apps.map((app) => ensureProvider(app)),
|
|
56
|
+
...apps.map((app) => registerIcons(app, migration)),
|
|
57
|
+
finish(options, migration),
|
|
58
|
+
]);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function checkPreconditions(tree, options) {
|
|
62
|
+
const pkg = (0, workspace_1.readPackageJson)(tree);
|
|
63
|
+
if (!pkg)
|
|
64
|
+
throw new schematics_1.SchematicsException('No se encontró package.json en la raíz del workspace.');
|
|
65
|
+
if (options.force)
|
|
66
|
+
return;
|
|
67
|
+
if (!(0, workspace_1.dependencyVersion)(pkg, '@caribeng/ui')) {
|
|
68
|
+
throw new schematics_1.SchematicsException('Instala CaribeNG antes de migrar:\n npm install @caribeng/ui@22\nUsa --force para migrar igualmente.');
|
|
69
|
+
}
|
|
70
|
+
const primeng = (0, workspace_1.dependencyVersion)(pkg, 'primeng');
|
|
71
|
+
if (!primeng)
|
|
72
|
+
throw new schematics_1.SchematicsException('primeng no está en package.json. Usa --force para migrar igualmente.');
|
|
73
|
+
const major = (0, workspace_1.majorOf)(primeng);
|
|
74
|
+
if (major !== null && major < MIN_PRIMENG_MAJOR) {
|
|
75
|
+
throw new schematics_1.SchematicsException(`Se encontró PrimeNG ${primeng}. El migrador admite PrimeNG ${MIN_PRIMENG_MAJOR} o superior: actualiza primero (ng update primeng@${MIN_PRIMENG_MAJOR}) o usa --force.`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function normalizeRoot(path) {
|
|
79
|
+
const clean = (path ?? '/').replace(/\\/g, '/').replace(/^\.?\/*/, '/').replace(/\/+$/, '');
|
|
80
|
+
return clean || '/';
|
|
81
|
+
}
|
|
82
|
+
function dirname(path) {
|
|
83
|
+
return path.slice(0, path.lastIndexOf('/')) || '/';
|
|
84
|
+
}
|
|
85
|
+
/** `../shared/x.html` relativo a `/src/app/a/a.ts` → `/src/app/shared/x.html`. */
|
|
86
|
+
function resolvePath(from, relative) {
|
|
87
|
+
const parts = dirname(from).split('/');
|
|
88
|
+
for (const part of relative.replace(/^\.\//, '').split('/')) {
|
|
89
|
+
if (part === '..')
|
|
90
|
+
parts.pop();
|
|
91
|
+
else if (part !== '.')
|
|
92
|
+
parts.push(part);
|
|
93
|
+
}
|
|
94
|
+
return parts.join('/');
|
|
95
|
+
}
|
|
96
|
+
/** Tags (`cb-button`) y directivas (`cbTooltip`) CaribeNG que aparecen en `after` pero no en `before` → símbolos a importar. */
|
|
97
|
+
function introducedSymbols(before, after) {
|
|
98
|
+
// Los avisos TODO(caribeng) citan tags de CaribeNG (`<cb-radio-group>`): los comentarios no cuentan.
|
|
99
|
+
const code = (text) => text.replace(/<!--[\s\S]*?-->/g, '');
|
|
100
|
+
const tags = (text) => new Set([...code(text).matchAll(/<(cb-[a-z0-9-]+)/g)].map((m) => m[1]));
|
|
101
|
+
const attrs = (text) => new Set([...code(text).matchAll(/[\s[](cb[A-Z][A-Za-z]*)\]?(?=[\s=/>])/g)].map((m) => m[1]));
|
|
102
|
+
const symbols = new Map();
|
|
103
|
+
for (const [found, index] of [
|
|
104
|
+
[tags, mappings_1.TAG_SYMBOLS],
|
|
105
|
+
[attrs, mappings_1.ATTR_SYMBOLS],
|
|
106
|
+
]) {
|
|
107
|
+
const previous = found(before);
|
|
108
|
+
for (const name of found(after)) {
|
|
109
|
+
const symbol = index.get(name);
|
|
110
|
+
if (symbol && !previous.has(name))
|
|
111
|
+
symbols.set(symbol.name, symbol);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return [...symbols.values()];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Módulos PrimeNG que el componente importaba y que su plantilla migrada aún
|
|
118
|
+
* necesita porque algún elemento no se pudo convertir (p. ej. una p-table con
|
|
119
|
+
* columnas dinámicas): se vuelven a importar para que siga compilando.
|
|
120
|
+
*/
|
|
121
|
+
function keptPrimengModules(source, template) {
|
|
122
|
+
const code = template.replace(/<!--[\s\S]*?-->/g, '');
|
|
123
|
+
const kept = new Map();
|
|
124
|
+
for (const [tag, mapping] of mappings_1.MAPPING_BY_TAG) {
|
|
125
|
+
if (!new RegExp(`<${tag}[\\s/>]`).test(code))
|
|
126
|
+
continue;
|
|
127
|
+
for (const [module, symbols] of Object.entries(mapping.modules)) {
|
|
128
|
+
const name = Object.keys(symbols).find((symbol) => new RegExp(`import\\s*\\{[^}]*\\b${symbol}\\b[^}]*\\}\\s*from\\s*['"]${module}['"]`).test(source));
|
|
129
|
+
if (name)
|
|
130
|
+
kept.set(name, { name, entry: module });
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return [...kept.values()];
|
|
134
|
+
}
|
|
135
|
+
function addIcons(migration, path, icons) {
|
|
136
|
+
if (!icons.size)
|
|
137
|
+
return;
|
|
138
|
+
const set = migration.icons.get(path) ?? new Set();
|
|
139
|
+
icons.forEach((icon) => set.add(icon));
|
|
140
|
+
migration.icons.set(path, set);
|
|
141
|
+
}
|
|
142
|
+
/** Un `.ts`: imports, plantilla (en línea o `templateUrl`) e `imports` del componente. */
|
|
143
|
+
function migrateSource(tree, path, migration) {
|
|
144
|
+
const original = tree.readText(path);
|
|
145
|
+
// Las plantillas (sin migrar) dicen qué menú recibe cada array de MenuItem.
|
|
146
|
+
const templates = (0, typescript_1.findComponents)(path, original).flatMap((component) => {
|
|
147
|
+
if (component.inlineTemplate !== undefined)
|
|
148
|
+
return [component.inlineTemplate];
|
|
149
|
+
const templatePath = component.templateUrl && resolvePath(path, component.templateUrl);
|
|
150
|
+
return templatePath && tree.exists(templatePath) ? [tree.readText(templatePath)] : [];
|
|
151
|
+
});
|
|
152
|
+
const imported = (0, typescript_1.rewriteImports)(path, original, templates);
|
|
153
|
+
addIcons(migration, path, imported.icons);
|
|
154
|
+
let text = imported.text;
|
|
155
|
+
const needed = new Map();
|
|
156
|
+
for (const component of (0, typescript_1.findComponents)(path, text)) {
|
|
157
|
+
let before;
|
|
158
|
+
let after;
|
|
159
|
+
if (component.inlineTemplate !== undefined) {
|
|
160
|
+
const result = (0, template_1.rewriteTemplate)(migration.compiler, component.inlineTemplate, path);
|
|
161
|
+
if (result.error)
|
|
162
|
+
migration.context.logger.warn(`${path}: la plantilla no se pudo analizar y no se migró.\n${result.error}`);
|
|
163
|
+
if (result.changed) {
|
|
164
|
+
text = (0, typescript_1.replaceInlineTemplate)(path, text, component.index, result.text);
|
|
165
|
+
[before, after] = [component.inlineTemplate, result.text];
|
|
166
|
+
addIcons(migration, path, result.icons);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
else if (component.templateUrl) {
|
|
170
|
+
const templatePath = resolvePath(path, component.templateUrl);
|
|
171
|
+
if (!tree.exists(templatePath) || migration.templates.has(templatePath))
|
|
172
|
+
continue;
|
|
173
|
+
migration.templates.add(templatePath);
|
|
174
|
+
const html = tree.readText(templatePath);
|
|
175
|
+
const result = (0, template_1.rewriteTemplate)(migration.compiler, html, templatePath);
|
|
176
|
+
if (result.error)
|
|
177
|
+
migration.context.logger.warn(`${templatePath}: la plantilla no se pudo analizar y no se migró.\n${result.error}`);
|
|
178
|
+
if (result.changed) {
|
|
179
|
+
tree.overwrite(templatePath, result.text);
|
|
180
|
+
migration.changed.add(templatePath);
|
|
181
|
+
[before, after] = [html, result.text];
|
|
182
|
+
addIcons(migration, templatePath, result.icons);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if (before !== undefined && after !== undefined) {
|
|
186
|
+
needed.set(component.index, [...introducedSymbols(before, after), ...keptPrimengModules(original, after)]);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const imports = (0, typescript_1.ensureComponentImports)(path, text, needed);
|
|
190
|
+
text = imports.text;
|
|
191
|
+
migration.manual.push(...imports.manual.map((name) => `\`${path.slice(1)}\`: añade \`${name}\` a los imports del NgModule que declara el componente.`));
|
|
192
|
+
if (text !== original) {
|
|
193
|
+
tree.overwrite(path, text);
|
|
194
|
+
migration.changed.add(path);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/** Un `.html` que no es plantilla de ningún componente migrado (p. ej. de otro proyecto). */
|
|
198
|
+
function migrateHtml(tree, path, migration) {
|
|
199
|
+
const result = (0, template_1.rewriteTemplate)(migration.compiler, tree.readText(path), path);
|
|
200
|
+
if (result.error) {
|
|
201
|
+
migration.context.logger.warn(`${path}: no se pudo analizar y no se migró.`);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (!result.changed)
|
|
205
|
+
return;
|
|
206
|
+
tree.overwrite(path, result.text);
|
|
207
|
+
migration.changed.add(path);
|
|
208
|
+
addIcons(migration, path, result.icons);
|
|
209
|
+
if (introducedSymbols('', result.text).length) {
|
|
210
|
+
migration.manual.push(`\`${path.slice(1)}\`: no se encontró su componente; importa los componentes CaribeNG que usa.`);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
function migrateStylesheet(tree, path, migration) {
|
|
214
|
+
const original = tree.readText(path);
|
|
215
|
+
const text = (0, workspace_1.removePrimeStyleImports)(original);
|
|
216
|
+
if (text === original)
|
|
217
|
+
return;
|
|
218
|
+
tree.overwrite(path, text);
|
|
219
|
+
migration.changed.add(path);
|
|
220
|
+
}
|
|
221
|
+
/** Aplicaciones de angular.json. En workspaces sin angular.json (Nx) devuelve [] y avisa. */
|
|
222
|
+
async function applications(tree, context) {
|
|
223
|
+
try {
|
|
224
|
+
const workspace = await (0, utility_1.readWorkspace)(tree);
|
|
225
|
+
return [...workspace.projects.entries()]
|
|
226
|
+
.filter(([, project]) => project.extensions['projectType'] === 'application')
|
|
227
|
+
.map(([name, project]) => {
|
|
228
|
+
const root = project.root ? `/${project.root.replace(/^\/|\/$/g, '')}` : '';
|
|
229
|
+
return { name, root, sourceRoot: project.sourceRoot ? `/${project.sourceRoot.replace(/^\/|\/$/g, '')}` : `${root}/src` };
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
catch {
|
|
233
|
+
context.logger.warn('No se encontró angular.json: añade a mano @caribeng/ui/styles.css a los estilos y provideCaribeNG() a la configuración de la app.');
|
|
234
|
+
return [];
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
/** Si la app no tiene provideCaribeNG() (no usaba providePrimeNG), se añade. */
|
|
238
|
+
function ensureProvider(app) {
|
|
239
|
+
return (tree) => {
|
|
240
|
+
if ((0, index_1.containsText)(tree, app.sourceRoot, 'provideCaribeNG('))
|
|
241
|
+
return;
|
|
242
|
+
return (0, utility_1.addRootProvider)(app.name, ({ code, external }) => code `${external('provideCaribeNG', '@caribeng/ui')}(${typescript_1.PROVIDER_CONFIG})`);
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
/** Registra con provideCbIcons los iconos usados que no son del set núcleo. */
|
|
246
|
+
function registerIcons(app, migration) {
|
|
247
|
+
return () => {
|
|
248
|
+
const names = new Set();
|
|
249
|
+
for (const [path, icons] of migration.icons) {
|
|
250
|
+
if (path.startsWith(`${app.root}/`) || app.root === '')
|
|
251
|
+
icons.forEach((icon) => (0, icons_1.isCoreIcon)(icon) || names.add(icon));
|
|
252
|
+
}
|
|
253
|
+
if (!names.size)
|
|
254
|
+
return;
|
|
255
|
+
return (0, utility_1.addRootProvider)(app.name, ({ code, external }) => {
|
|
256
|
+
const entries = [...names].sort().map((name) => `'${name}': ${external((0, icons_1.catalogExport)(name), '@caribeng/ui/icons')}`);
|
|
257
|
+
const expression = `${external('provideCbIcons', '@caribeng/ui/icon')}({ ${entries.join(', ')} })`;
|
|
258
|
+
return code(Object.assign([expression], { raw: [expression] }));
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
/** Informe, limpieza de package.json e instalación. */
|
|
263
|
+
function finish(options, migration) {
|
|
264
|
+
return (tree, context) => {
|
|
265
|
+
const scan = (0, report_1.scanWorkspace)(tree);
|
|
266
|
+
const removed = scan.leftovers.length === 0 && options.removePrimeng !== false ? (0, workspace_1.removePrimeDependencies)(tree) : [];
|
|
267
|
+
if (options.report !== false) {
|
|
268
|
+
const report = (0, report_1.renderReport)({ scan, changedFiles: [...migration.changed], manual: migration.manual, removedPackages: removed });
|
|
269
|
+
if (tree.exists(report_1.REPORT_PATH))
|
|
270
|
+
tree.overwrite(report_1.REPORT_PATH, report);
|
|
271
|
+
else
|
|
272
|
+
tree.create(report_1.REPORT_PATH, report);
|
|
273
|
+
}
|
|
274
|
+
context.logger.info(`✔ ${migration.changed.size} archivo(s) migrado(s).`);
|
|
275
|
+
if (removed.length)
|
|
276
|
+
context.logger.info(`✔ Eliminados de package.json: ${removed.join(', ')}.`);
|
|
277
|
+
if (scan.todos.length)
|
|
278
|
+
context.logger.warn(`⚠ ${scan.todos.length} aviso(s) TODO(caribeng) para revisar.`);
|
|
279
|
+
if (scan.leftovers.length) {
|
|
280
|
+
context.logger.warn(`⚠ Quedan ${scan.leftovers.length} referencia(s) a PrimeNG sin migrar; PrimeNG sigue instalado mientras tanto.`);
|
|
281
|
+
}
|
|
282
|
+
if (migration.manual.length)
|
|
283
|
+
context.logger.warn(`⚠ ${migration.manual.length} import(s) que añadir a mano.`);
|
|
284
|
+
if (options.report !== false && (scan.todos.length || scan.leftovers.length || migration.manual.length)) {
|
|
285
|
+
context.logger.info(` Detalle en ${report_1.REPORT_PATH.slice(1)}`);
|
|
286
|
+
}
|
|
287
|
+
if (removed.length && !options.skipInstall)
|
|
288
|
+
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
289
|
+
};
|
|
290
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.button = void 0;
|
|
4
|
+
const icons_1 = require("../icons");
|
|
5
|
+
const rules_1 = require("./rules");
|
|
6
|
+
/**
|
|
7
|
+
* `<p-button label="Guardar" icon="pi pi-check" [outlined]="true" />`
|
|
8
|
+
* → `<cb-button variant="outlined"><cb-icon name="check" />Guardar</cb-button>`
|
|
9
|
+
*/
|
|
10
|
+
const rules = {
|
|
11
|
+
// label, icon e iconPos se combinan en `finalize` (pasan a ser contenido).
|
|
12
|
+
label: (0, rules_1.drop)(),
|
|
13
|
+
icon: (0, rules_1.drop)(),
|
|
14
|
+
iconPos: (0, rules_1.drop)(),
|
|
15
|
+
severity: (0, rules_1.values)('severity', rules_1.SEVERITY_VALUES),
|
|
16
|
+
outlined: (0, rules_1.flagToValue)('variant', 'outlined', 'solid'),
|
|
17
|
+
text: (0, rules_1.flagToValue)('variant', 'text', 'solid'),
|
|
18
|
+
size: (0, rules_1.values)('size', rules_1.SIZE_VALUES),
|
|
19
|
+
fluid: (0, rules_1.rename)('fullWidth'),
|
|
20
|
+
styleClass: (0, rules_1.styleClass)(),
|
|
21
|
+
raised: (0, rules_1.unsupported)('cb-button no tiene variante elevada; usa una clase propia.'),
|
|
22
|
+
rounded: (0, rules_1.unsupported)('cb-button no tiene variante redondeada; usa una clase propia o <cb-icon-button>.'),
|
|
23
|
+
plain: (0, rules_1.unsupported)('sin equivalente; usa severity="secondary".'),
|
|
24
|
+
link: (0, rules_1.unsupported)('para enlaces usa <cb-link>.'),
|
|
25
|
+
badge: (0, rules_1.unsupported)('usa un <cb-badge> dentro del botón.'),
|
|
26
|
+
badgeClass: (0, rules_1.unsupported)('usa un <cb-badge> dentro del botón.'),
|
|
27
|
+
badgeSeverity: (0, rules_1.unsupported)('usa un <cb-badge> dentro del botón.'),
|
|
28
|
+
loadingIcon: (0, rules_1.unsupported)('cb-button usa su propio spinner.'),
|
|
29
|
+
buttonProps: (0, rules_1.unsupported)('pasa cada propiedad como input de cb-button.'),
|
|
30
|
+
tabindex: (0, rules_1.unsupported)('el tabindex no se reenvía al <button> interno.'),
|
|
31
|
+
autofocus: (0, rules_1.unsupported)('usa la directiva cbAutoFocus de @caribeng/ui/autofocus.'),
|
|
32
|
+
'(onClick)': (0, rules_1.event)('click'),
|
|
33
|
+
...rules_1.FOCUS_EVENTS,
|
|
34
|
+
};
|
|
35
|
+
const same = ['variant', 'disabled', 'loading', 'type', 'ariaLabel'];
|
|
36
|
+
/** Convierte `label`, `icon` e `iconPos` en el contenido del botón. */
|
|
37
|
+
function finalize(el) {
|
|
38
|
+
const label = el.find('label');
|
|
39
|
+
const icon = el.find('icon');
|
|
40
|
+
const position = el.find('iconPos');
|
|
41
|
+
let text = '';
|
|
42
|
+
if (label?.kind === 'static')
|
|
43
|
+
text = label.value.includes('{{') ? label.value : (0, rules_1.escapeText)(label.value);
|
|
44
|
+
else if (label?.kind === 'property')
|
|
45
|
+
text = `{{ ${label.value} }}`;
|
|
46
|
+
let iconTag = '';
|
|
47
|
+
if (icon?.kind === 'static') {
|
|
48
|
+
const parsed = (0, icons_1.parsePrimeIcon)(icon.value);
|
|
49
|
+
if (parsed?.name) {
|
|
50
|
+
iconTag = `<cb-icon name="${parsed.name}"${parsed.spin ? ' spin' : ''} />`;
|
|
51
|
+
el.icons.add(parsed.name);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
el.todos.push(`${icon.source} — ${parsed ? `el icono pi-${parsed.prime} no tiene equivalente conocido` : 'icono que no es de PrimeIcons'}; añade un <cb-icon> dentro del botón.`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else if (icon) {
|
|
58
|
+
el.todos.push(`${icon.source} — icono dinámico: usa <cb-icon [name]="…" /> dentro del botón.`);
|
|
59
|
+
}
|
|
60
|
+
let after = false;
|
|
61
|
+
if (position?.kind === 'static' && position.value === 'right')
|
|
62
|
+
after = true;
|
|
63
|
+
else if (position && !(position.kind === 'static' && position.value === 'left')) {
|
|
64
|
+
el.todos.push(`${position.source} — cb-button coloca el icono donde lo pongas en el contenido.`);
|
|
65
|
+
}
|
|
66
|
+
if (iconTag && after) {
|
|
67
|
+
if (text)
|
|
68
|
+
el.before.push(text);
|
|
69
|
+
el.after.push(iconTag);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
if (iconTag)
|
|
73
|
+
el.before.push(iconTag);
|
|
74
|
+
if (text)
|
|
75
|
+
el.before.push(text);
|
|
76
|
+
}
|
|
77
|
+
const hasName = el.attrs.some((attr) => /^(\[?ariaLabel\]?|aria-label|\[attr\.aria-label\])=/.test(attr));
|
|
78
|
+
if (icon && !label && !hasName) {
|
|
79
|
+
el.todos.push('botón solo con icono: añade ariaLabel="…" para que tenga nombre accesible.');
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.button = {
|
|
83
|
+
name: 'button',
|
|
84
|
+
entry: '@caribeng/ui/button',
|
|
85
|
+
symbol: 'CbButton',
|
|
86
|
+
modules: {
|
|
87
|
+
'primeng/button': { ButtonModule: 'CbButton', Button: 'CbButton', ButtonDirective: 'CbButton' },
|
|
88
|
+
},
|
|
89
|
+
elements: [
|
|
90
|
+
{ tag: 'p-button', to: 'cb-button', rules, finalize, same },
|
|
91
|
+
{ attr: 'pButton', on: ['button'], otherTags: 'para enlaces usa <cb-link>.', to: 'cb-button', rules, finalize, same },
|
|
92
|
+
],
|
|
93
|
+
};
|