@caribeng/ui 22.1.1 → 22.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +134 -12
- package/fesm2022/caribeng-ui-accordion.mjs +4 -4
- package/fesm2022/caribeng-ui-anchor.mjs +169 -0
- package/fesm2022/caribeng-ui-autocomplete.mjs +10 -8
- package/fesm2022/caribeng-ui-avatar.mjs +2 -2
- package/fesm2022/caribeng-ui-avatargroup.mjs +9 -3
- package/fesm2022/caribeng-ui-badge.mjs +8 -2
- package/fesm2022/caribeng-ui-blockui.mjs +12 -4
- package/fesm2022/caribeng-ui-breadcrumb.mjs +17 -7
- package/fesm2022/caribeng-ui-button.mjs +22 -2
- package/fesm2022/caribeng-ui-caribe-alert.mjs +5 -2
- package/fesm2022/caribeng-ui-caribe-animation-lottie.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-button-group.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-calendar.mjs +11 -6
- package/fesm2022/caribeng-ui-caribe-card-content.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-card-move.mjs +29 -7
- package/fesm2022/caribeng-ui-caribe-card-select.mjs +56 -14
- package/fesm2022/caribeng-ui-caribe-circle-loading.mjs +10 -7
- package/fesm2022/caribeng-ui-caribe-coachmark.mjs +42 -19
- package/fesm2022/caribeng-ui-caribe-data-table.mjs +15 -9
- package/fesm2022/caribeng-ui-caribe-dots-indicator.mjs +38 -5
- package/fesm2022/caribeng-ui-caribe-expansion-panel.mjs +16 -5
- package/fesm2022/caribeng-ui-caribe-fab-menu.mjs +56 -7
- package/fesm2022/caribeng-ui-caribe-file-download.mjs +68 -27
- package/fesm2022/caribeng-ui-caribe-file-select.mjs +22 -17
- package/fesm2022/caribeng-ui-caribe-float-menu.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-footer.mjs +8 -4
- package/fesm2022/caribeng-ui-caribe-header.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-icon-button.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-illustration.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-inline-alert.mjs +5 -2
- package/fesm2022/caribeng-ui-caribe-input-search.mjs +14 -10
- package/fesm2022/caribeng-ui-caribe-input-select.mjs +12 -10
- package/fesm2022/caribeng-ui-caribe-input-token.mjs +61 -11
- package/fesm2022/caribeng-ui-caribe-link.mjs +7 -2
- package/fesm2022/caribeng-ui-caribe-loader.mjs +8 -5
- package/fesm2022/caribeng-ui-caribe-modal.mjs +32 -16
- package/fesm2022/caribeng-ui-caribe-off-canvas.mjs +26 -12
- package/fesm2022/caribeng-ui-caribe-onboarding.mjs +44 -19
- package/fesm2022/caribeng-ui-caribe-pictogram.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-pop-over.mjs +34 -10
- package/fesm2022/caribeng-ui-caribe-preloader.mjs +9 -6
- package/fesm2022/caribeng-ui-caribe-progress-bar.mjs +5 -2
- package/fesm2022/caribeng-ui-caribe-shortcut.mjs +8 -3
- package/fesm2022/caribeng-ui-caribe-step-indicator.mjs +12 -5
- package/fesm2022/caribeng-ui-caribe-stroke.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-switch.mjs +5 -3
- package/fesm2022/caribeng-ui-caribe-tag-button.mjs +1 -1
- package/fesm2022/caribeng-ui-caribe-tracker.mjs +5 -2
- package/fesm2022/caribeng-ui-caribe-transaction-status.mjs +1 -1
- package/fesm2022/caribeng-ui-caribe-voucher.mjs +11 -8
- package/fesm2022/caribeng-ui-carousel.mjs +49 -14
- package/fesm2022/caribeng-ui-cascadeselect.mjs +22 -8
- package/fesm2022/caribeng-ui-chart.mjs +2601 -303
- package/fesm2022/caribeng-ui-chat.mjs +1303 -0
- package/fesm2022/caribeng-ui-chip.mjs +9 -4
- package/fesm2022/caribeng-ui-chips.mjs +9 -5
- package/fesm2022/caribeng-ui-code-block.mjs +332 -0
- package/fesm2022/caribeng-ui-colorpicker.mjs +107 -11
- package/fesm2022/caribeng-ui-command-palette.mjs +476 -0
- package/fesm2022/caribeng-ui-confirmdialog.mjs +140 -10
- package/fesm2022/caribeng-ui-confirmpopup.mjs +209 -9
- package/fesm2022/caribeng-ui-contextmenu.mjs +13 -6
- package/fesm2022/caribeng-ui-copy-button.mjs +230 -0
- package/fesm2022/caribeng-ui-dataview.mjs +214 -6
- package/fesm2022/caribeng-ui-datepicker.mjs +1630 -393
- package/fesm2022/caribeng-ui-descriptions.mjs +124 -0
- package/fesm2022/caribeng-ui-dialog.mjs +10 -7
- package/fesm2022/caribeng-ui-dock.mjs +58 -15
- package/fesm2022/caribeng-ui-drawer.mjs +17 -9
- package/fesm2022/caribeng-ui-dynamicdialog.mjs +210 -6
- package/fesm2022/caribeng-ui-editor.mjs +4413 -243
- package/fesm2022/caribeng-ui-empty.mjs +80 -0
- package/fesm2022/caribeng-ui-fieldset.mjs +2 -2
- package/fesm2022/caribeng-ui-file-card.mjs +136 -19
- package/fesm2022/caribeng-ui-fileupload.mjs +96 -19
- package/fesm2022/caribeng-ui-floatlabel.mjs +4 -2
- package/fesm2022/caribeng-ui-folder-card.mjs +132 -15
- package/fesm2022/caribeng-ui-galleria.mjs +76 -45
- package/fesm2022/caribeng-ui-image.mjs +52 -29
- package/fesm2022/caribeng-ui-inlinemessage.mjs +2 -2
- package/fesm2022/caribeng-ui-inplace.mjs +22 -6
- package/fesm2022/caribeng-ui-input-number.mjs +9 -7
- package/fesm2022/caribeng-ui-inputgroup.mjs +2 -2
- package/fesm2022/caribeng-ui-inputmask.mjs +22 -13
- package/fesm2022/caribeng-ui-inputotp.mjs +12 -6
- package/fesm2022/caribeng-ui-kanban.mjs +4612 -0
- package/fesm2022/caribeng-ui-kbd.mjs +122 -0
- package/fesm2022/caribeng-ui-keyfilter.mjs +72 -0
- package/fesm2022/caribeng-ui-listbox.mjs +13 -11
- package/fesm2022/caribeng-ui-megamenu.mjs +228 -32
- package/fesm2022/caribeng-ui-mentions.mjs +495 -0
- package/fesm2022/caribeng-ui-menu.mjs +18 -8
- package/fesm2022/caribeng-ui-menubar.mjs +17 -8
- package/fesm2022/caribeng-ui-message.mjs +13 -7
- package/fesm2022/caribeng-ui-metergroup.mjs +29 -11
- package/fesm2022/caribeng-ui-multiselect.mjs +399 -97
- package/fesm2022/caribeng-ui-orderlist.mjs +230 -11
- package/fesm2022/caribeng-ui-organizationchart.mjs +16 -15
- package/fesm2022/caribeng-ui-paginator.mjs +18 -15
- package/fesm2022/caribeng-ui-panel.mjs +11 -8
- package/fesm2022/caribeng-ui-panelmenu.mjs +14 -8
- package/fesm2022/caribeng-ui-password.mjs +8 -6
- package/fesm2022/caribeng-ui-pdfviewer.mjs +1553 -0
- package/fesm2022/caribeng-ui-phone-input.mjs +688 -0
- package/fesm2022/caribeng-ui-picklist.mjs +251 -14
- package/fesm2022/caribeng-ui-pricing.mjs +272 -75
- package/fesm2022/caribeng-ui-qrcode.mjs +564 -0
- package/fesm2022/caribeng-ui-rating.mjs +7 -3
- package/fesm2022/caribeng-ui-repeater.mjs +223 -0
- package/fesm2022/caribeng-ui-result.mjs +91 -0
- package/fesm2022/caribeng-ui-ripple.mjs +2 -0
- package/fesm2022/caribeng-ui-scrollpanel.mjs +6 -3
- package/fesm2022/caribeng-ui-scrolltop.mjs +9 -4
- package/fesm2022/caribeng-ui-select.mjs +379 -87
- package/fesm2022/caribeng-ui-selectbutton.mjs +2 -2
- package/fesm2022/caribeng-ui-sidebar.mjs +573 -0
- package/fesm2022/caribeng-ui-slider.mjs +171 -75
- package/fesm2022/caribeng-ui-speeddial.mjs +7 -4
- package/fesm2022/caribeng-ui-spinner.mjs +5 -2
- package/fesm2022/caribeng-ui-splitbutton.mjs +163 -0
- package/fesm2022/caribeng-ui-splitter.mjs +5 -2
- package/fesm2022/caribeng-ui-statistic.mjs +183 -0
- package/fesm2022/caribeng-ui-stepper.mjs +17 -7
- package/fesm2022/caribeng-ui-steps.mjs +6 -3
- package/fesm2022/caribeng-ui-table.mjs +716 -84
- package/fesm2022/caribeng-ui-tabmenu.mjs +13 -6
- package/fesm2022/caribeng-ui-tag.mjs +2 -2
- package/fesm2022/caribeng-ui-terminal.mjs +45 -9
- package/fesm2022/caribeng-ui-themetoggle.mjs +82 -0
- package/fesm2022/caribeng-ui-tieredmenu.mjs +113 -20
- package/fesm2022/caribeng-ui-timeline.mjs +175 -6
- package/fesm2022/caribeng-ui-toast.mjs +7 -4
- package/fesm2022/caribeng-ui-togglebutton.mjs +8 -6
- package/fesm2022/caribeng-ui-toolbar.mjs +6 -3
- package/fesm2022/caribeng-ui-tree.mjs +302 -6
- package/fesm2022/caribeng-ui-treeselect.mjs +26 -10
- package/fesm2022/caribeng-ui-treetable.mjs +269 -6
- package/fesm2022/caribeng-ui-virtualscroller.mjs +123 -10
- package/fesm2022/caribeng-ui.mjs +1216 -6
- package/package.json +93 -3
- package/schematics/collection.json +15 -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 +140 -0
- package/schematics/ng-add/schema.js +2 -0
- package/schematics/ng-add/schema.json +66 -0
- package/types/caribeng-ui-anchor.d.ts +50 -0
- package/types/caribeng-ui-autocomplete.d.ts +4 -2
- package/types/caribeng-ui-avatargroup.d.ts +3 -1
- package/types/caribeng-ui-badge.d.ts +3 -1
- package/types/caribeng-ui-blockui.d.ts +9 -4
- package/types/caribeng-ui-breadcrumb.d.ts +11 -0
- package/types/caribeng-ui-button.d.ts +9 -1
- package/types/caribeng-ui-caribe-alert.d.ts +3 -0
- package/types/caribeng-ui-caribe-animation-lottie.d.ts +4 -1
- package/types/caribeng-ui-caribe-button-group.d.ts +4 -1
- package/types/caribeng-ui-caribe-calendar.d.ts +5 -1
- package/types/caribeng-ui-caribe-card-content.d.ts +4 -1
- package/types/caribeng-ui-caribe-card-move.d.ts +13 -13
- package/types/caribeng-ui-caribe-card-select.d.ts +10 -1
- package/types/caribeng-ui-caribe-circle-loading.d.ts +4 -1
- package/types/caribeng-ui-caribe-coachmark.d.ts +6 -0
- package/types/caribeng-ui-caribe-data-table.d.ts +7 -2
- package/types/caribeng-ui-caribe-dots-indicator.d.ts +9 -0
- package/types/caribeng-ui-caribe-expansion-panel.d.ts +7 -10
- package/types/caribeng-ui-caribe-fab-menu.d.ts +10 -1
- package/types/caribeng-ui-caribe-file-download.d.ts +8 -10
- package/types/caribeng-ui-caribe-file-select.d.ts +7 -1
- package/types/caribeng-ui-caribe-float-menu.d.ts +4 -1
- package/types/caribeng-ui-caribe-header.d.ts +3 -0
- package/types/caribeng-ui-caribe-icon-button.d.ts +4 -1
- package/types/caribeng-ui-caribe-illustration.d.ts +4 -1
- package/types/caribeng-ui-caribe-inline-alert.d.ts +3 -0
- package/types/caribeng-ui-caribe-input-search.d.ts +4 -2
- package/types/caribeng-ui-caribe-input-select.d.ts +4 -2
- package/types/caribeng-ui-caribe-input-token.d.ts +16 -1
- package/types/caribeng-ui-caribe-link.d.ts +3 -0
- package/types/caribeng-ui-caribe-loader.d.ts +4 -1
- package/types/caribeng-ui-caribe-modal.d.ts +7 -10
- package/types/caribeng-ui-caribe-off-canvas.d.ts +6 -1
- package/types/caribeng-ui-caribe-onboarding.d.ts +6 -0
- package/types/caribeng-ui-caribe-pictogram.d.ts +4 -1
- package/types/caribeng-ui-caribe-pop-over.d.ts +7 -10
- package/types/caribeng-ui-caribe-preloader.d.ts +4 -1
- package/types/caribeng-ui-caribe-progress-bar.d.ts +3 -0
- package/types/caribeng-ui-caribe-shortcut.d.ts +3 -1
- package/types/caribeng-ui-caribe-step-indicator.d.ts +6 -0
- package/types/caribeng-ui-caribe-stroke.d.ts +4 -1
- package/types/caribeng-ui-caribe-switch.d.ts +3 -1
- package/types/caribeng-ui-caribe-tracker.d.ts +3 -0
- package/types/caribeng-ui-caribe-voucher.d.ts +5 -2
- package/types/caribeng-ui-carousel.d.ts +10 -1
- package/types/caribeng-ui-cascadeselect.d.ts +7 -2
- package/types/caribeng-ui-chart.d.ts +471 -44
- package/types/caribeng-ui-chat.d.ts +299 -0
- package/types/caribeng-ui-chip.d.ts +6 -0
- package/types/caribeng-ui-chips.d.ts +6 -2
- package/types/caribeng-ui-code-block.d.ts +65 -0
- package/types/caribeng-ui-colorpicker.d.ts +8 -2
- package/types/caribeng-ui-command-palette.d.ts +133 -0
- package/types/caribeng-ui-confirmdialog.d.ts +57 -6
- package/types/caribeng-ui-confirmpopup.d.ts +74 -5
- package/types/caribeng-ui-contextmenu.d.ts +11 -1
- package/types/caribeng-ui-copy-button.d.ts +90 -0
- package/types/caribeng-ui-dataview.d.ts +65 -5
- package/types/caribeng-ui-datepicker.d.ts +186 -21
- package/types/caribeng-ui-descriptions.d.ts +63 -0
- package/types/caribeng-ui-dialog.d.ts +4 -1
- package/types/caribeng-ui-dock.d.ts +17 -2
- package/types/caribeng-ui-drawer.d.ts +7 -2
- package/types/caribeng-ui-dynamicdialog.d.ts +93 -3
- package/types/caribeng-ui-editor.d.ts +486 -13
- package/types/caribeng-ui-empty.d.ts +34 -0
- package/types/caribeng-ui-file-card.d.ts +28 -3
- package/types/caribeng-ui-fileupload.d.ts +27 -4
- package/types/caribeng-ui-folder-card.d.ts +31 -6
- package/types/caribeng-ui-galleria.d.ts +9 -0
- package/types/caribeng-ui-image.d.ts +10 -0
- package/types/caribeng-ui-inplace.d.ts +8 -0
- package/types/caribeng-ui-input-number.d.ts +3 -1
- package/types/caribeng-ui-inputmask.d.ts +8 -1
- package/types/caribeng-ui-inputotp.d.ts +7 -2
- package/types/caribeng-ui-kanban.d.ts +783 -0
- package/types/caribeng-ui-kbd.d.ts +36 -0
- package/types/caribeng-ui-keyfilter.d.ts +30 -0
- package/types/caribeng-ui-listbox.d.ts +5 -3
- package/types/caribeng-ui-megamenu.d.ts +37 -2
- package/types/caribeng-ui-mentions.d.ts +127 -0
- package/types/caribeng-ui-menu.d.ts +14 -2
- package/types/caribeng-ui-menubar.d.ts +12 -1
- package/types/caribeng-ui-message.d.ts +5 -0
- package/types/caribeng-ui-metergroup.d.ts +9 -1
- package/types/caribeng-ui-multiselect.d.ts +71 -10
- package/types/caribeng-ui-orderlist.d.ts +58 -6
- package/types/caribeng-ui-organizationchart.d.ts +7 -1
- package/types/caribeng-ui-paginator.d.ts +3 -0
- package/types/caribeng-ui-panel.d.ts +3 -0
- package/types/caribeng-ui-panelmenu.d.ts +11 -1
- package/types/caribeng-ui-password.d.ts +4 -2
- package/types/caribeng-ui-pdfviewer.d.ts +258 -0
- package/types/caribeng-ui-phone-input.d.ts +168 -0
- package/types/caribeng-ui-picklist.d.ts +67 -7
- package/types/caribeng-ui-pricing.d.ts +49 -9
- package/types/caribeng-ui-qrcode.d.ts +88 -0
- package/types/caribeng-ui-rating.d.ts +6 -2
- package/types/caribeng-ui-repeater.d.ts +79 -0
- package/types/caribeng-ui-result.d.ts +35 -0
- package/types/caribeng-ui-scrollpanel.d.ts +4 -1
- package/types/caribeng-ui-scrolltop.d.ts +4 -1
- package/types/caribeng-ui-select.d.ts +73 -9
- package/types/caribeng-ui-sidebar.d.ts +167 -0
- package/types/caribeng-ui-slider.d.ts +63 -10
- package/types/caribeng-ui-speeddial.d.ts +5 -2
- package/types/caribeng-ui-spinner.d.ts +3 -0
- package/types/caribeng-ui-splitbutton.d.ts +49 -0
- package/types/caribeng-ui-splitter.d.ts +3 -0
- package/types/caribeng-ui-statistic.d.ts +65 -0
- package/types/caribeng-ui-stepper.d.ts +5 -0
- package/types/caribeng-ui-steps.d.ts +4 -1
- package/types/caribeng-ui-table.d.ts +185 -17
- package/types/caribeng-ui-tabmenu.d.ts +11 -1
- package/types/caribeng-ui-terminal.d.ts +10 -0
- package/types/caribeng-ui-themetoggle.d.ts +32 -0
- package/types/caribeng-ui-tieredmenu.d.ts +22 -3
- package/types/caribeng-ui-timeline.d.ts +63 -4
- package/types/caribeng-ui-toast.d.ts +3 -0
- package/types/caribeng-ui-togglebutton.d.ts +5 -3
- package/types/caribeng-ui-toolbar.d.ts +7 -4
- package/types/caribeng-ui-tree.d.ts +76 -4
- package/types/caribeng-ui-treeselect.d.ts +10 -2
- package/types/caribeng-ui-treetable.d.ts +68 -4
- package/types/caribeng-ui-virtualscroller.d.ts +45 -5
- package/types/caribeng-ui.d.ts +775 -12
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _caribeng_ui from '@caribeng/ui';
|
|
3
|
+
import { cbFormat } from '@caribeng/ui';
|
|
2
4
|
|
|
3
5
|
interface CbOrganizationChartNode {
|
|
4
6
|
key: string;
|
|
@@ -9,9 +11,13 @@ interface CbOrganizationChartNode {
|
|
|
9
11
|
children?: readonly CbOrganizationChartNode[];
|
|
10
12
|
}
|
|
11
13
|
declare class CbOrganizationChart {
|
|
14
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
15
|
+
protected readonly t: _angular_core.Signal<_caribeng_ui.CbTranslation>;
|
|
16
|
+
/** Rellena `{0}`, `{1}`… de un texto traducido. */
|
|
17
|
+
protected readonly fmt: typeof cbFormat;
|
|
12
18
|
readonly value: _angular_core.InputSignal<readonly CbOrganizationChartNode[]>;
|
|
13
19
|
readonly selection: _angular_core.ModelSignal<CbOrganizationChartNode | null>;
|
|
14
|
-
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
20
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
15
21
|
protected readonly expanded: _angular_core.WritableSignal<ReadonlySet<string>>;
|
|
16
22
|
protected toggle(key: string): void;
|
|
17
23
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CbOrganizationChart, never>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _caribeng_ui from '@caribeng/ui';
|
|
2
3
|
|
|
3
4
|
interface CbPaginatorState {
|
|
4
5
|
/** Índice del primer registro de la página. */
|
|
@@ -21,6 +22,8 @@ interface CbPaginatorState {
|
|
|
21
22
|
* ```
|
|
22
23
|
*/
|
|
23
24
|
declare class CbPaginator {
|
|
25
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
26
|
+
protected readonly t: _angular_core.Signal<_caribeng_ui.CbTranslation>;
|
|
24
27
|
readonly totalRecords: _angular_core.InputSignal<number>;
|
|
25
28
|
readonly rows: _angular_core.ModelSignal<number>;
|
|
26
29
|
readonly first: _angular_core.ModelSignal<number>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _caribeng_ui from '@caribeng/ui';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Panel de CaribeNG: contenedor con encabezado, cuerpo colapsable opcional y pie.
|
|
@@ -12,6 +13,8 @@ import * as _angular_core from '@angular/core';
|
|
|
12
13
|
* ```
|
|
13
14
|
*/
|
|
14
15
|
declare class CbPanel {
|
|
16
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
17
|
+
protected readonly t: _angular_core.Signal<_caribeng_ui.CbTranslation>;
|
|
15
18
|
private readonly uid;
|
|
16
19
|
/** Título mostrado en la cabecera del panel. */
|
|
17
20
|
readonly header: _angular_core.InputSignal<string>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _caribeng_ui from '@caribeng/ui';
|
|
3
|
+
import { CbMenuCommandEvent } from '@caribeng/ui';
|
|
2
4
|
|
|
3
5
|
interface CbPanelMenuItem {
|
|
4
6
|
label: string;
|
|
@@ -6,12 +8,20 @@ interface CbPanelMenuItem {
|
|
|
6
8
|
url?: string;
|
|
7
9
|
disabled?: boolean;
|
|
8
10
|
items?: readonly CbPanelMenuItem[];
|
|
11
|
+
/** Acción al elegir el item (además del evento de selección), como `command` en PrimeNG. */
|
|
12
|
+
command?: (event: CbMenuCommandEvent<CbPanelMenuItem>) => void;
|
|
13
|
+
/** `false` oculta el item. */
|
|
14
|
+
visible?: boolean;
|
|
9
15
|
}
|
|
10
16
|
/** Vertical menu with collapsible sections. */
|
|
11
17
|
declare class CbPanelMenu {
|
|
18
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
19
|
+
protected readonly t: _angular_core.Signal<_caribeng_ui.CbTranslation>;
|
|
12
20
|
private readonly uid;
|
|
13
21
|
readonly items: _angular_core.InputSignal<readonly CbPanelMenuItem[]>;
|
|
14
|
-
|
|
22
|
+
/** Items sin los de `visible: false`. */
|
|
23
|
+
protected readonly visibleItems: _angular_core.Signal<CbPanelMenuItem[]>;
|
|
24
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
15
25
|
readonly multiple: _angular_core.InputSignal<boolean>;
|
|
16
26
|
readonly itemSelect: _angular_core.OutputEmitterRef<CbPanelMenuItem>;
|
|
17
27
|
private readonly openItems;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as _caribeng_ui from '@caribeng/ui';
|
|
2
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _caribeng_ui from '@caribeng/ui';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
|
|
5
5
|
type CbPasswordSize = 'sm' | 'md' | 'lg';
|
|
@@ -9,6 +9,8 @@ type CbPasswordStrength = 'none' | 'weak' | 'medium' | 'strong';
|
|
|
9
9
|
* indicador de fortaleza e integración completa con Angular Forms (CVA).
|
|
10
10
|
*/
|
|
11
11
|
declare class CbPassword implements ControlValueAccessor {
|
|
12
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
13
|
+
protected readonly t: _angular_core.Signal<_caribeng_ui.CbTranslation>;
|
|
12
14
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
13
15
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
14
16
|
readonly invalid: _angular_core.InputSignal<boolean>;
|
|
@@ -25,7 +27,7 @@ declare class CbPassword implements ControlValueAccessor {
|
|
|
25
27
|
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
26
28
|
readonly strengthScore: _angular_core.Signal<0 | 1 | 2 | 3>;
|
|
27
29
|
readonly strength: _angular_core.Signal<CbPasswordStrength>;
|
|
28
|
-
protected readonly strengthLabel: _angular_core.Signal<
|
|
30
|
+
protected readonly strengthLabel: _angular_core.Signal<string>;
|
|
29
31
|
private onChange;
|
|
30
32
|
private onTouched;
|
|
31
33
|
toggleReveal(): void;
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import * as _caribeng_ui from '@caribeng/ui';
|
|
4
|
+
import { cbFormat } from '@caribeng/ui';
|
|
5
|
+
import * as pdfjs_dist from 'pdfjs-dist';
|
|
6
|
+
|
|
7
|
+
/** Módulo de pdf.js (`pdfjs-dist`) que usa el visor. */
|
|
8
|
+
type CbPdfJs = typeof pdfjs_dist;
|
|
9
|
+
/** Documento abierto por pdf.js. */
|
|
10
|
+
type CbPdfDocument = pdfjs_dist.PDFDocumentProxy;
|
|
11
|
+
/** Página de un documento de pdf.js. */
|
|
12
|
+
type CbPdfPage = pdfjs_dist.PDFPageProxy;
|
|
13
|
+
/** Origen del documento: URL, bytes o un `Blob` / `File`. */
|
|
14
|
+
type CbPdfSource = string | URL | ArrayBuffer | Uint8Array | Blob;
|
|
15
|
+
/** Opciones globales del visor (`provideCbPdfViewer`). */
|
|
16
|
+
interface CbPdfViewerOptions {
|
|
17
|
+
/**
|
|
18
|
+
* URL del worker de pdf.js. Por defecto `pdfjs/build/pdf.worker.min.mjs`,
|
|
19
|
+
* relativa al `<base href>` (ver la configuración de assets en la documentación).
|
|
20
|
+
*/
|
|
21
|
+
workerSrc?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Carpeta con los recursos de pdf.js (`cmaps/`, `standard_fonts/`, `wasm/`,
|
|
24
|
+
* `iccs/`). Por defecto `pdfjs/`.
|
|
25
|
+
*/
|
|
26
|
+
assetsUrl?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Carga de pdf.js. Por defecto su build `legacy` (se descarga al abrir el primer PDF):
|
|
29
|
+
* la build moderna usa APIs que los navegadores estables aún no tienen
|
|
30
|
+
* (`Map.prototype.getOrInsertComputed`, `Math.sumPrecise`) y la legacy las incluye.
|
|
31
|
+
*/
|
|
32
|
+
loader?: () => Promise<CbPdfJs>;
|
|
33
|
+
}
|
|
34
|
+
declare const CB_PDF_VIEWER_OPTIONS: InjectionToken<CbPdfViewerOptions>;
|
|
35
|
+
/**
|
|
36
|
+
* Configura el visor de PDF (worker, recursos y carga de pdf.js).
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* bootstrapApplication(App, {
|
|
41
|
+
* providers: [provideCaribeNG(), provideCbPdfViewer({ workerSrc: '/static/pdf.worker.min.mjs' })],
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
declare function provideCbPdfViewer(options: CbPdfViewerOptions): EnvironmentProviders;
|
|
46
|
+
/** Recursos que pdf.js necesita, ya resueltos como URLs absolutas. */
|
|
47
|
+
interface CbPdfResources {
|
|
48
|
+
cMapUrl: string;
|
|
49
|
+
standardFontDataUrl: string;
|
|
50
|
+
wasmUrl: string;
|
|
51
|
+
iccUrl: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Carga pdf.js una sola vez y configura su worker. Las URLs se resuelven contra
|
|
55
|
+
* el `<base href>` del documento: el worker de pdf.js las pediría relativas a
|
|
56
|
+
* su propio script.
|
|
57
|
+
*/
|
|
58
|
+
declare class CbPdfEngine {
|
|
59
|
+
private readonly options;
|
|
60
|
+
private readonly document;
|
|
61
|
+
private pdfjs?;
|
|
62
|
+
load(): Promise<CbPdfJs>;
|
|
63
|
+
resources(): CbPdfResources;
|
|
64
|
+
/**
|
|
65
|
+
* Resuelve una URL contra el `<base href>`, como Angular y `<img>`; pdf.js
|
|
66
|
+
* la resolvería contra la ruta actual (`/components/visor/doc.pdf`).
|
|
67
|
+
*/
|
|
68
|
+
resolve(url: string | URL): string;
|
|
69
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CbPdfEngine, never>;
|
|
70
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CbPdfEngine>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Posición dentro del texto de una página: elemento de texto de pdf.js y desplazamiento. */
|
|
74
|
+
interface CbPdfTextPosition {
|
|
75
|
+
item: number;
|
|
76
|
+
offset: number;
|
|
77
|
+
}
|
|
78
|
+
/** Coincidencia de búsqueda. `end.offset` es exclusivo. */
|
|
79
|
+
interface CbPdfMatch {
|
|
80
|
+
page: number;
|
|
81
|
+
start: CbPdfTextPosition;
|
|
82
|
+
end: CbPdfTextPosition;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Zoom: factor (1 = 100 %), ajustar al ancho o página completa. */
|
|
86
|
+
type CbPdfZoom = number | 'page-width' | 'page-fit';
|
|
87
|
+
/** Giro del documento, en grados. */
|
|
88
|
+
type CbPdfRotation = 0 | 90 | 180 | 270;
|
|
89
|
+
type ViewerState = 'idle' | 'loading' | 'password' | 'ready' | 'error';
|
|
90
|
+
/**
|
|
91
|
+
* Visor de PDF sobre [pdf.js](https://mozilla.github.io/pdf.js/) (`pdfjs-dist`,
|
|
92
|
+
* dependencia opcional que se carga al abrir el primer documento).
|
|
93
|
+
*
|
|
94
|
+
* Renderiza las páginas a medida que se ven, con texto seleccionable y
|
|
95
|
+
* legible por lectores de pantalla, búsqueda (ignora tildes y mayúsculas),
|
|
96
|
+
* miniaturas, zoom, giro, descarga, impresión y documentos con contraseña.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```html
|
|
100
|
+
* <cb-pdf-viewer src="/docs/extracto.pdf" [(page)]="pagina" zoom="page-width" />
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
declare class CbPdfViewer {
|
|
104
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
105
|
+
protected readonly t: _angular_core.Signal<_caribeng_ui.CbTranslation>;
|
|
106
|
+
protected readonly format: typeof cbFormat;
|
|
107
|
+
/** Documento: URL, `ArrayBuffer`, `Uint8Array`, `Blob` o `File`. */
|
|
108
|
+
readonly src: _angular_core.InputSignal<CbPdfSource | null | undefined>;
|
|
109
|
+
/** Nombre del archivo al descargar (por defecto, el de la URL o del `File`). */
|
|
110
|
+
readonly fileName: _angular_core.InputSignal<string | undefined>;
|
|
111
|
+
/** Contraseña para abrir el documento sin pedirla. */
|
|
112
|
+
readonly password: _angular_core.InputSignal<string | undefined>;
|
|
113
|
+
/** Envía cookies en peticiones a otro origen. */
|
|
114
|
+
readonly withCredentials: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
115
|
+
/** Cabeceras HTTP para descargar el documento (p. ej. `Authorization`). */
|
|
116
|
+
readonly httpHeaders: _angular_core.InputSignal<Record<string, string> | undefined>;
|
|
117
|
+
/** Página actual (desde 1). */
|
|
118
|
+
readonly page: _angular_core.ModelSignal<number>;
|
|
119
|
+
readonly zoom: _angular_core.ModelSignal<CbPdfZoom>;
|
|
120
|
+
readonly rotation: _angular_core.ModelSignal<CbPdfRotation>;
|
|
121
|
+
/** Panel de miniaturas abierto. */
|
|
122
|
+
readonly sidebar: _angular_core.ModelSignal<boolean>;
|
|
123
|
+
readonly showToolbar: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
124
|
+
readonly showSearch: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
125
|
+
readonly showThumbnails: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
126
|
+
readonly showRotate: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
127
|
+
readonly downloadable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
128
|
+
readonly printable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
129
|
+
/** Nombre accesible del visor (por defecto, "Visor de PDF"). */
|
|
130
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
131
|
+
/** Documento abierto. */
|
|
132
|
+
readonly loaded: _angular_core.OutputEmitterRef<{
|
|
133
|
+
numPages: number;
|
|
134
|
+
}>;
|
|
135
|
+
/** No se pudo abrir el documento. */
|
|
136
|
+
readonly loadError: _angular_core.OutputEmitterRef<unknown>;
|
|
137
|
+
private readonly engine;
|
|
138
|
+
private readonly document;
|
|
139
|
+
private readonly injector;
|
|
140
|
+
private readonly isBrowser;
|
|
141
|
+
protected readonly uid: string;
|
|
142
|
+
protected readonly state: _angular_core.WritableSignal<ViewerState>;
|
|
143
|
+
protected readonly progress: _angular_core.WritableSignal<number | null>;
|
|
144
|
+
protected readonly passwordIncorrect: _angular_core.WritableSignal<boolean>;
|
|
145
|
+
protected readonly printProgress: _angular_core.WritableSignal<{
|
|
146
|
+
done: number;
|
|
147
|
+
total: number;
|
|
148
|
+
} | null>;
|
|
149
|
+
protected readonly numPages: _angular_core.WritableSignal<number>;
|
|
150
|
+
private readonly sizes;
|
|
151
|
+
private readonly box;
|
|
152
|
+
protected readonly query: _angular_core.WritableSignal<string>;
|
|
153
|
+
protected readonly matches: _angular_core.WritableSignal<CbPdfMatch[]>;
|
|
154
|
+
protected readonly matchIndex: _angular_core.WritableSignal<number>;
|
|
155
|
+
protected readonly searching: _angular_core.WritableSignal<boolean>;
|
|
156
|
+
protected readonly zoomLevels: number[];
|
|
157
|
+
private readonly viewport;
|
|
158
|
+
private readonly pageEls;
|
|
159
|
+
private readonly thumbEls;
|
|
160
|
+
private readonly searchInput;
|
|
161
|
+
private readonly passwordInput;
|
|
162
|
+
/** Factor de zoom efectivo (1 = 100 %). */
|
|
163
|
+
readonly scale: _angular_core.Signal<number>;
|
|
164
|
+
/** Tamaño de cada página en píxeles CSS con el zoom y el giro actuales. */
|
|
165
|
+
protected readonly pageBoxes: _angular_core.Signal<{
|
|
166
|
+
width: number;
|
|
167
|
+
height: number;
|
|
168
|
+
scaleFactor: number;
|
|
169
|
+
userUnit: number;
|
|
170
|
+
}[]>;
|
|
171
|
+
protected readonly thumbBoxes: _angular_core.Signal<{
|
|
172
|
+
width: number;
|
|
173
|
+
height: number;
|
|
174
|
+
}[]>;
|
|
175
|
+
/** Valor del selector de zoom. */
|
|
176
|
+
protected readonly zoomValue: _angular_core.Signal<string>;
|
|
177
|
+
protected readonly customZoom: _angular_core.Signal<number | null>;
|
|
178
|
+
protected readonly searchStatus: _angular_core.Signal<string>;
|
|
179
|
+
private pdfjs?;
|
|
180
|
+
private pdf?;
|
|
181
|
+
private loadingTask?;
|
|
182
|
+
private passwordCallback?;
|
|
183
|
+
private loadToken;
|
|
184
|
+
private searchToken;
|
|
185
|
+
private searchTimer?;
|
|
186
|
+
private readonly pages;
|
|
187
|
+
private readonly texts;
|
|
188
|
+
private readonly indexes;
|
|
189
|
+
private readonly rendered;
|
|
190
|
+
private readonly thumbs;
|
|
191
|
+
private readonly visible;
|
|
192
|
+
private readonly visibleThumbs;
|
|
193
|
+
private pageObserver?;
|
|
194
|
+
private thumbObserver?;
|
|
195
|
+
private resizeObserver?;
|
|
196
|
+
/** Página que se ve al desplazarse (distingue el scroll del usuario de un cambio de `page`). */
|
|
197
|
+
private visiblePage;
|
|
198
|
+
private scrollFrame;
|
|
199
|
+
private scrollToMatch;
|
|
200
|
+
constructor();
|
|
201
|
+
goToPage(page: number): void;
|
|
202
|
+
previousPage(): void;
|
|
203
|
+
nextPage(): void;
|
|
204
|
+
zoomIn(): void;
|
|
205
|
+
zoomOut(): void;
|
|
206
|
+
/** Gira 90° a la derecha (o a la izquierda con `-1`). */
|
|
207
|
+
rotate(direction?: 1 | -1): void;
|
|
208
|
+
/** Busca en todo el documento; resalta y lleva a la primera coincidencia. */
|
|
209
|
+
search(query: string): Promise<void>;
|
|
210
|
+
findNext(): void;
|
|
211
|
+
findPrevious(): void;
|
|
212
|
+
/** Descarga el documento original. */
|
|
213
|
+
download(): Promise<void>;
|
|
214
|
+
/** Imprime el documento (no la página de la aplicación). */
|
|
215
|
+
print(): Promise<void>;
|
|
216
|
+
private open;
|
|
217
|
+
protected submitPassword(event: Event, value: string): void;
|
|
218
|
+
/** Lee el tamaño real de todas las páginas (pueden ser distintas de la primera). */
|
|
219
|
+
private measurePages;
|
|
220
|
+
private close;
|
|
221
|
+
private getPage;
|
|
222
|
+
private textContent;
|
|
223
|
+
private textIndex;
|
|
224
|
+
/** Observa qué páginas están cerca de la vista para renderizar solo esas. */
|
|
225
|
+
private observePages;
|
|
226
|
+
private renderVisible;
|
|
227
|
+
private renderPage;
|
|
228
|
+
private unrender;
|
|
229
|
+
private observeThumbs;
|
|
230
|
+
private renderThumbs;
|
|
231
|
+
private renderThumb;
|
|
232
|
+
private selectMatch;
|
|
233
|
+
private refreshHighlights;
|
|
234
|
+
private highlightPage;
|
|
235
|
+
protected onSearchInput(value: string): void;
|
|
236
|
+
protected onSearchKeydown(event: KeyboardEvent, value: string): void;
|
|
237
|
+
protected onScroll(): void;
|
|
238
|
+
private mostVisiblePage;
|
|
239
|
+
private scrollToPage;
|
|
240
|
+
private readAnchor;
|
|
241
|
+
private restoreAnchor;
|
|
242
|
+
private observeResize;
|
|
243
|
+
private pageEl;
|
|
244
|
+
protected onPageInput(event: Event): void;
|
|
245
|
+
protected onZoomSelect(value: string): void;
|
|
246
|
+
protected onThumbKeydown(event: KeyboardEvent, n: number): void;
|
|
247
|
+
protected onHostKeydown(event: KeyboardEvent): void;
|
|
248
|
+
protected onWheel(event: WheelEvent): void;
|
|
249
|
+
protected percent(zoom: number): string;
|
|
250
|
+
private downloadName;
|
|
251
|
+
private rotatedPoints;
|
|
252
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CbPdfViewer, never>;
|
|
253
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CbPdfViewer, "cb-pdf-viewer", never, { "src": { "alias": "src"; "required": false; "isSignal": true; }; "fileName": { "alias": "fileName"; "required": false; "isSignal": true; }; "password": { "alias": "password"; "required": false; "isSignal": true; }; "withCredentials": { "alias": "withCredentials"; "required": false; "isSignal": true; }; "httpHeaders": { "alias": "httpHeaders"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; "rotation": { "alias": "rotation"; "required": false; "isSignal": true; }; "sidebar": { "alias": "sidebar"; "required": false; "isSignal": true; }; "showToolbar": { "alias": "showToolbar"; "required": false; "isSignal": true; }; "showSearch": { "alias": "showSearch"; "required": false; "isSignal": true; }; "showThumbnails": { "alias": "showThumbnails"; "required": false; "isSignal": true; }; "showRotate": { "alias": "showRotate"; "required": false; "isSignal": true; }; "downloadable": { "alias": "downloadable"; "required": false; "isSignal": true; }; "printable": { "alias": "printable"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; "zoom": "zoomChange"; "rotation": "rotationChange"; "sidebar": "sidebarChange"; "loaded": "loaded"; "loadError": "loadError"; }, never, never, true, never>;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export { CB_PDF_VIEWER_OPTIONS, CbPdfEngine, CbPdfViewer, provideCbPdfViewer };
|
|
257
|
+
export type { CbPdfDocument, CbPdfJs, CbPdfMatch, CbPdfPage, CbPdfRotation, CbPdfSource, CbPdfTextPosition, CbPdfViewerOptions, CbPdfZoom };
|
|
258
|
+
//# sourceMappingURL=caribeng-ui-pdfviewer.d.ts.map
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _caribeng_ui from '@caribeng/ui';
|
|
3
|
+
import { CbRequiredIndicator, CbSize } from '@caribeng/ui';
|
|
4
|
+
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Datos de numeración telefónica de un país (plan nacional, ITU-T E.164).
|
|
8
|
+
* El "número nacional" es el que va después del prefijo internacional, sin el
|
|
9
|
+
* 0 (o el dígito) que se marca dentro del país.
|
|
10
|
+
*/
|
|
11
|
+
interface CbPhoneCountry {
|
|
12
|
+
/** Código ISO 3166-1 alfa-2 (`CO`). */
|
|
13
|
+
readonly iso: string;
|
|
14
|
+
/** Prefijo internacional sin `+` (`57`). */
|
|
15
|
+
readonly dial: string;
|
|
16
|
+
/** Longitudes válidas del número nacional. */
|
|
17
|
+
readonly lengths: readonly number[];
|
|
18
|
+
/** Formato por longitud con `#` por dígito (`{ 10: '### ### ####' }`). Sin él, grupos de 3. */
|
|
19
|
+
readonly formats?: Readonly<Record<number, string>>;
|
|
20
|
+
/** Dígito que se marca delante dentro del país y se quita al guardar (`0`). */
|
|
21
|
+
readonly trunk?: string;
|
|
22
|
+
/** Comienzos del número nacional para distinguir países que comparten prefijo (+1). */
|
|
23
|
+
readonly leading?: readonly string[];
|
|
24
|
+
/** Ejemplo de número nacional (se usa como placeholder). */
|
|
25
|
+
readonly example?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Países incluidos: América Latina y el Caribe, Norteamérica, la Europa más
|
|
29
|
+
* habitual y los mayores de Asia y Oceanía. Amplíalos con `[countries]`.
|
|
30
|
+
*/
|
|
31
|
+
declare const CB_PHONE_COUNTRIES: readonly CbPhoneCountry[];
|
|
32
|
+
/** Emoji de bandera a partir del código ISO (indicadores regionales). */
|
|
33
|
+
declare function cbFlagEmoji(iso: string): string;
|
|
34
|
+
/** Aplica el formato del país al número nacional (solo dígitos), también a medio escribir. */
|
|
35
|
+
declare function cbFormatNational(country: CbPhoneCountry, digits: string): string;
|
|
36
|
+
interface CbParsedPhone {
|
|
37
|
+
readonly country: CbPhoneCountry | null;
|
|
38
|
+
/** Número nacional (solo dígitos, sin prefijo ni 0 nacional). */
|
|
39
|
+
readonly national: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Interpreta lo escrito o pegado. Con `+` o `00` detecta el país por el prefijo
|
|
43
|
+
* (el más largo que coincide; entre los que comparten prefijo, por el comienzo
|
|
44
|
+
* del número o, si no, el país actual). Sin prefijo, usa `current` y quita su 0 nacional.
|
|
45
|
+
*/
|
|
46
|
+
declare function cbParsePhone(text: string, current: CbPhoneCountry | null, countries: readonly CbPhoneCountry[]): CbParsedPhone;
|
|
47
|
+
/** Número completo en formato E.164 (`+573001234567`), o `''` sin dígitos. */
|
|
48
|
+
declare function cbToE164(country: CbPhoneCountry | null, national: string): string;
|
|
49
|
+
/** Si la longitud del número nacional es válida para el país. */
|
|
50
|
+
declare function cbIsValidPhone(country: CbPhoneCountry | null, national: string): boolean;
|
|
51
|
+
|
|
52
|
+
/** Cambio del teléfono con todos sus datos. */
|
|
53
|
+
interface CbPhoneChange {
|
|
54
|
+
/** Formato internacional E.164 (`+573001234567`), o `''`. */
|
|
55
|
+
readonly e164: string;
|
|
56
|
+
/** Número nacional (solo dígitos). */
|
|
57
|
+
readonly national: string;
|
|
58
|
+
/** Código ISO del país (`CO`). */
|
|
59
|
+
readonly country: string;
|
|
60
|
+
/** La longitud es válida para el país. */
|
|
61
|
+
readonly valid: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Teléfono internacional de CaribeNG: selector de país (bandera, nombre y
|
|
65
|
+
* prefijo, con buscador) y número que se formatea mientras se escribe. El
|
|
66
|
+
* valor es E.164 (`+573001234567`), listo para guardar o enviar. Al pegar un
|
|
67
|
+
* número con `+` o `00` detecta el país.
|
|
68
|
+
*
|
|
69
|
+
* Funciona con Angular Forms (`formControlName`, `ngModel`) y añade el error
|
|
70
|
+
* `{ phone: true }` si el número está incompleto o no es válido para el país.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```html
|
|
74
|
+
* <cb-phone-input label="Celular" formControlName="celular" country="CO" [preferredCountries]="['CO', 'MX', 'US']" />
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
declare class CbPhoneInput implements ControlValueAccessor, Validator {
|
|
78
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
79
|
+
protected readonly t: _angular_core.Signal<_caribeng_ui.CbTranslation>;
|
|
80
|
+
private readonly overlay;
|
|
81
|
+
private readonly vcr;
|
|
82
|
+
private readonly injector;
|
|
83
|
+
private readonly triggerEl;
|
|
84
|
+
private readonly fieldEl;
|
|
85
|
+
private readonly searchEl;
|
|
86
|
+
private readonly panelTpl;
|
|
87
|
+
private overlayRef;
|
|
88
|
+
protected readonly inputId: string;
|
|
89
|
+
protected readonly listId: string;
|
|
90
|
+
/** Número en formato E.164 (`+573001234567`); `''` si está vacío. */
|
|
91
|
+
readonly value: _angular_core.ModelSignal<string>;
|
|
92
|
+
/** País seleccionado (código ISO). */
|
|
93
|
+
readonly country: _angular_core.ModelSignal<string>;
|
|
94
|
+
/** Países disponibles. Por defecto, `CB_PHONE_COUNTRIES`; puedes pasar otros o filtrar por código ISO. */
|
|
95
|
+
readonly countries: _angular_core.InputSignal<readonly (string | CbPhoneCountry)[]>;
|
|
96
|
+
/** Países que aparecen primero en la lista (código ISO). */
|
|
97
|
+
readonly preferredCountries: _angular_core.InputSignal<readonly string[]>;
|
|
98
|
+
/** Bloquea el país (solo se escribe el número). */
|
|
99
|
+
readonly countryLocked: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
100
|
+
/** Muestra la bandera (emoji). En Windows algunos navegadores la muestran como letras. */
|
|
101
|
+
readonly showFlag: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
102
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
103
|
+
readonly hint: _angular_core.InputSignal<string>;
|
|
104
|
+
/** Error a mostrar. Por defecto, "Número de teléfono incompleto o no válido" cuando lo es. */
|
|
105
|
+
readonly error: _angular_core.InputSignal<string | undefined>;
|
|
106
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
107
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
108
|
+
readonly requiredIndicator: _angular_core.InputSignal<CbRequiredIndicator | undefined>;
|
|
109
|
+
/** Placeholder. Por defecto, un número de ejemplo del país. */
|
|
110
|
+
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
111
|
+
readonly size: _angular_core.InputSignal<CbSize>;
|
|
112
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
113
|
+
/** Cada cambio con el número E.164, el nacional, el país y si es válido. */
|
|
114
|
+
readonly phoneChange: _angular_core.OutputEmitterRef<CbPhoneChange>;
|
|
115
|
+
protected readonly fieldState: _caribeng_ui.CbFieldState;
|
|
116
|
+
/** Número nacional (solo dígitos). */
|
|
117
|
+
private readonly national;
|
|
118
|
+
private readonly touched;
|
|
119
|
+
private readonly cvaDisabled;
|
|
120
|
+
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
121
|
+
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
122
|
+
protected readonly query: _angular_core.WritableSignal<string>;
|
|
123
|
+
protected readonly active: _angular_core.WritableSignal<number>;
|
|
124
|
+
private readonly displayNames;
|
|
125
|
+
protected readonly list: _angular_core.Signal<CbPhoneCountry[]>;
|
|
126
|
+
protected readonly selected: _angular_core.Signal<CbPhoneCountry | null>;
|
|
127
|
+
protected readonly filtered: _angular_core.Signal<CbPhoneCountry[]>;
|
|
128
|
+
protected readonly activeId: _angular_core.Signal<string | null>;
|
|
129
|
+
protected readonly display: _angular_core.Signal<string>;
|
|
130
|
+
protected readonly examplePlaceholder: _angular_core.Signal<string>;
|
|
131
|
+
protected readonly isValid: _angular_core.Signal<boolean>;
|
|
132
|
+
protected readonly showInvalid: _angular_core.Signal<boolean>;
|
|
133
|
+
protected readonly errorText: _angular_core.Signal<string>;
|
|
134
|
+
protected readonly countryLabel: _angular_core.Signal<string>;
|
|
135
|
+
protected readonly describedBy: _angular_core.Signal<string | null>;
|
|
136
|
+
private onChange;
|
|
137
|
+
private onTouched;
|
|
138
|
+
private onValidatorChange;
|
|
139
|
+
constructor();
|
|
140
|
+
protected flag(c: CbPhoneCountry): string;
|
|
141
|
+
protected name(c: CbPhoneCountry): string;
|
|
142
|
+
private normalize;
|
|
143
|
+
writeValue(value: string | null): void;
|
|
144
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
145
|
+
registerOnTouched(fn: () => void): void;
|
|
146
|
+
setDisabledState(isDisabled: boolean): void;
|
|
147
|
+
validate(_control: AbstractControl): ValidationErrors | null;
|
|
148
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
149
|
+
protected onInput(event: Event): void;
|
|
150
|
+
protected onBlur(): void;
|
|
151
|
+
/** Interpreta texto escrito, pegado o recibido (E.164 o nacional). */
|
|
152
|
+
private applyText;
|
|
153
|
+
private publish;
|
|
154
|
+
toggle(): void;
|
|
155
|
+
protected openFromKeyboard(event: Event): void;
|
|
156
|
+
private openPanel;
|
|
157
|
+
/** Cierra la lista de países. */
|
|
158
|
+
close(focusTrigger?: boolean): void;
|
|
159
|
+
protected choose(c: CbPhoneCountry): void;
|
|
160
|
+
protected onSearchKeydown(event: KeyboardEvent): void;
|
|
161
|
+
private scrollActiveIntoView;
|
|
162
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CbPhoneInput, never>;
|
|
163
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CbPhoneInput, "cb-phone-input", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "country": { "alias": "country"; "required": false; "isSignal": true; }; "countries": { "alias": "countries"; "required": false; "isSignal": true; }; "preferredCountries": { "alias": "preferredCountries"; "required": false; "isSignal": true; }; "countryLocked": { "alias": "countryLocked"; "required": false; "isSignal": true; }; "showFlag": { "alias": "showFlag"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "requiredIndicator": { "alias": "requiredIndicator"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "country": "countryChange"; "phoneChange": "phoneChange"; }, never, never, true, never>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export { CB_PHONE_COUNTRIES, CbPhoneInput, cbFlagEmoji, cbFormatNational, cbIsValidPhone, cbParsePhone, cbToE164 };
|
|
167
|
+
export type { CbParsedPhone, CbPhoneChange, CbPhoneCountry };
|
|
168
|
+
//# sourceMappingURL=caribeng-ui-phone-input.d.ts.map
|
|
@@ -1,14 +1,74 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import * as _caribeng_ui from '@caribeng/ui';
|
|
2
4
|
|
|
5
|
+
/** Contexto de `<ng-template cbPickListItem let-item let-list="list">`. */
|
|
6
|
+
interface CbPickListItemContext<T = any> {
|
|
7
|
+
$implicit: T;
|
|
8
|
+
index: number;
|
|
9
|
+
list: 'source' | 'target';
|
|
10
|
+
}
|
|
11
|
+
/** Plantilla de cada elemento de un `<cb-picklist>`. */
|
|
12
|
+
declare class CbPickListItemTemplate {
|
|
13
|
+
readonly template: TemplateRef<CbPickListItemContext<any>>;
|
|
14
|
+
static ngTemplateContextGuard(_dir: CbPickListItemTemplate, ctx: unknown): ctx is CbPickListItemContext;
|
|
15
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CbPickListItemTemplate, never>;
|
|
16
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CbPickListItemTemplate, "ng-template[cbPickListItem]", never, {}, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
18
|
+
/** Elementos transferidos entre listas. */
|
|
19
|
+
interface CbPickListMoveEvent {
|
|
20
|
+
to: 'source' | 'target';
|
|
21
|
+
items: readonly unknown[];
|
|
22
|
+
}
|
|
23
|
+
type Side = 'source' | 'target';
|
|
24
|
+
/**
|
|
25
|
+
* PickList de CaribeNG: transfiere elementos entre una lista de disponibles y
|
|
26
|
+
* otra de seleccionados, con botones, doble clic o teclado (Espacio marca,
|
|
27
|
+
* Enter transfiere).
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```html
|
|
31
|
+
* <cb-picklist [(source)]="disponibles" [(target)]="asignados" sourceHeader="Permisos" targetHeader="Asignados">
|
|
32
|
+
* <ng-template cbPickListItem let-permiso>{{ permiso.nombre }}</ng-template>
|
|
33
|
+
* </cb-picklist>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
3
36
|
declare class CbPickList {
|
|
4
|
-
readonly
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
37
|
+
protected readonly t: _angular_core.Signal<_caribeng_ui.CbTranslation>;
|
|
38
|
+
private readonly host;
|
|
39
|
+
private readonly uid;
|
|
40
|
+
/** Elementos disponibles (two-way). */
|
|
41
|
+
readonly source: _angular_core.ModelSignal<readonly unknown[]>;
|
|
42
|
+
/** Elementos seleccionados (two-way). */
|
|
43
|
+
readonly target: _angular_core.ModelSignal<readonly unknown[]>;
|
|
44
|
+
/** Título de la lista de origen. Por defecto, "Disponibles" del idioma activo. */
|
|
45
|
+
readonly sourceHeader: _angular_core.InputSignal<string | undefined>;
|
|
46
|
+
/** Título de la lista de destino. Por defecto, "Seleccionados" del idioma activo. */
|
|
47
|
+
readonly targetHeader: _angular_core.InputSignal<string | undefined>;
|
|
48
|
+
/** Se emite tras transferir elementos. */
|
|
49
|
+
readonly moved: _angular_core.OutputEmitterRef<CbPickListMoveEvent>;
|
|
50
|
+
protected readonly itemTemplate: _angular_core.Signal<CbPickListItemTemplate | undefined>;
|
|
51
|
+
/** Posiciones marcadas en cada lista. */
|
|
52
|
+
protected readonly selected: _angular_core.WritableSignal<Record<Side, ReadonlySet<number>>>;
|
|
53
|
+
private readonly focused;
|
|
54
|
+
protected headerId(side: Side): string;
|
|
55
|
+
protected isSelected(side: Side, index: number): boolean;
|
|
56
|
+
protected tabbable(side: Side): number;
|
|
57
|
+
protected setFocused(side: Side, index: number): void;
|
|
58
|
+
protected toggle(side: Side, index: number): void;
|
|
59
|
+
/** Transfiere los elementos marcados al lado indicado. */
|
|
60
|
+
protected move(to: Side): void;
|
|
61
|
+
/** Transfiere todos los elementos al lado indicado. */
|
|
62
|
+
protected moveAll(to: Side): void;
|
|
63
|
+
/** Transfiere un único elemento al otro lado (doble clic). */
|
|
64
|
+
protected moveOne(from: Side, index: number): void;
|
|
65
|
+
protected onKeydown(event: KeyboardEvent, side: Side): void;
|
|
66
|
+
private list;
|
|
67
|
+
private transfer;
|
|
9
68
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CbPickList, never>;
|
|
10
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CbPickList, "cb-picklist", never, { "source": { "alias": "source"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; }, { "source": "sourceChange"; "target": "targetChange"; },
|
|
69
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CbPickList, "cb-picklist", never, { "source": { "alias": "source"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "sourceHeader": { "alias": "sourceHeader"; "required": false; "isSignal": true; }; "targetHeader": { "alias": "targetHeader"; "required": false; "isSignal": true; }; }, { "source": "sourceChange"; "target": "targetChange"; "moved": "moved"; }, ["itemTemplate"], never, true, never>;
|
|
11
70
|
}
|
|
12
71
|
|
|
13
|
-
export { CbPickList };
|
|
72
|
+
export { CbPickList, CbPickListItemTemplate };
|
|
73
|
+
export type { CbPickListItemContext, CbPickListMoveEvent };
|
|
14
74
|
//# sourceMappingURL=caribeng-ui-picklist.d.ts.map
|