@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
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ViewContainerRef, Injector, viewChild, model, input, booleanAttribute, output, signal, computed, afterNextRender, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
5
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
6
|
+
import { injectCbTranslation, cbFieldState, cbFormat } from '@caribeng/ui';
|
|
7
|
+
|
|
8
|
+
/** Propiedades que afectan a cómo se reparte el texto en líneas. */
|
|
9
|
+
const MIRRORED = [
|
|
10
|
+
'boxSizing',
|
|
11
|
+
'width',
|
|
12
|
+
'height',
|
|
13
|
+
'overflowX',
|
|
14
|
+
'overflowY',
|
|
15
|
+
'borderTopWidth',
|
|
16
|
+
'borderRightWidth',
|
|
17
|
+
'borderBottomWidth',
|
|
18
|
+
'borderLeftWidth',
|
|
19
|
+
'paddingTop',
|
|
20
|
+
'paddingRight',
|
|
21
|
+
'paddingBottom',
|
|
22
|
+
'paddingLeft',
|
|
23
|
+
'fontStyle',
|
|
24
|
+
'fontVariant',
|
|
25
|
+
'fontWeight',
|
|
26
|
+
'fontStretch',
|
|
27
|
+
'fontSize',
|
|
28
|
+
'lineHeight',
|
|
29
|
+
'fontFamily',
|
|
30
|
+
'textAlign',
|
|
31
|
+
'textTransform',
|
|
32
|
+
'textIndent',
|
|
33
|
+
'letterSpacing',
|
|
34
|
+
'wordSpacing',
|
|
35
|
+
'tabSize',
|
|
36
|
+
];
|
|
37
|
+
/**
|
|
38
|
+
* Posición (px, relativa al campo) del carácter `index` de un textarea o
|
|
39
|
+
* input, con un div espejo invisible que copia su tipografía y su ancho.
|
|
40
|
+
* Sirve para abrir el panel de sugerencias justo bajo lo que se escribe.
|
|
41
|
+
*/
|
|
42
|
+
function cbCaretCoordinates(field, index) {
|
|
43
|
+
const doc = field.ownerDocument;
|
|
44
|
+
const style = doc.defaultView?.getComputedStyle(field);
|
|
45
|
+
const mirror = doc.createElement('div');
|
|
46
|
+
const isInput = field.nodeName === 'INPUT';
|
|
47
|
+
mirror.style.position = 'absolute';
|
|
48
|
+
mirror.style.visibility = 'hidden';
|
|
49
|
+
mirror.style.top = '0';
|
|
50
|
+
mirror.style.left = '-9999px';
|
|
51
|
+
mirror.style.whiteSpace = isInput ? 'nowrap' : 'pre-wrap';
|
|
52
|
+
mirror.style.overflowWrap = 'break-word';
|
|
53
|
+
if (style)
|
|
54
|
+
for (const prop of MIRRORED)
|
|
55
|
+
mirror.style[prop] = style[prop];
|
|
56
|
+
mirror.textContent = field.value.slice(0, index);
|
|
57
|
+
const marker = doc.createElement('span');
|
|
58
|
+
marker.textContent = field.value.slice(index) || '.';
|
|
59
|
+
mirror.appendChild(marker);
|
|
60
|
+
doc.body.appendChild(mirror);
|
|
61
|
+
const lineHeight = parseFloat(style?.lineHeight ?? '') || parseFloat(style?.fontSize ?? '') * 1.2 || 18;
|
|
62
|
+
const result = {
|
|
63
|
+
top: marker.offsetTop + (parseFloat(style?.borderTopWidth ?? '') || 0) - field.scrollTop,
|
|
64
|
+
left: marker.offsetLeft + (parseFloat(style?.borderLeftWidth ?? '') || 0) - field.scrollLeft,
|
|
65
|
+
height: lineHeight,
|
|
66
|
+
};
|
|
67
|
+
mirror.remove();
|
|
68
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
let nextUid = 0;
|
|
72
|
+
const normalize = (text) => text.normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase();
|
|
73
|
+
/**
|
|
74
|
+
* Campo de texto con menciones de CaribeNG: al escribir `@` (u otro
|
|
75
|
+
* disparador como `#`) muestra sugerencias junto al cursor, que se filtran
|
|
76
|
+
* sin tildes y se eligen con el teclado o el ratón. Funciona con Angular Forms
|
|
77
|
+
* (el valor es el texto) y emite las menciones presentes con su `id`.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```html
|
|
81
|
+
* <cb-mentions label="Comentario" [suggestions]="equipo" formControlName="comentario" (mentionsChange)="menciones = $event" />
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
class CbMentions {
|
|
85
|
+
constructor() {
|
|
86
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
87
|
+
this.t = injectCbTranslation();
|
|
88
|
+
this.overlay = inject(Overlay);
|
|
89
|
+
this.vcr = inject(ViewContainerRef);
|
|
90
|
+
this.injector = inject(Injector);
|
|
91
|
+
this.fieldEl = viewChild.required('field');
|
|
92
|
+
this.panelTpl = viewChild.required('panel');
|
|
93
|
+
this.overlayRef = null;
|
|
94
|
+
this.inputId = `cb-mentions-${++nextUid}`;
|
|
95
|
+
this.listId = `${this.inputId}-list`;
|
|
96
|
+
/** Texto (bidireccional y con Angular Forms). */
|
|
97
|
+
this.value = model('', /* @ts-ignore */
|
|
98
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
99
|
+
/** Elementos mencionables. Cada uno puede indicar su `trigger`. */
|
|
100
|
+
this.suggestions = input([], /* @ts-ignore */
|
|
101
|
+
...(ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []));
|
|
102
|
+
/** Caracteres que abren las sugerencias. */
|
|
103
|
+
this.triggers = input(['@'], /* @ts-ignore */
|
|
104
|
+
...(ngDevMode ? [{ debugName: "triggers" }] : /* istanbul ignore next */ []));
|
|
105
|
+
/** Filtra `suggestions` con lo escrito. Desactívalo si llegan ya filtradas del servidor. */
|
|
106
|
+
this.filter = input(true, { ...(ngDevMode ? { debugName: "filter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
107
|
+
/** Máximo de sugerencias visibles. */
|
|
108
|
+
this.maxResults = input(8, /* @ts-ignore */
|
|
109
|
+
...(ngDevMode ? [{ debugName: "maxResults" }] : /* istanbul ignore next */ []));
|
|
110
|
+
/** Muestra "Cargando" mientras no hay sugerencias. */
|
|
111
|
+
this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
112
|
+
this.label = input('', /* @ts-ignore */
|
|
113
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
114
|
+
this.hint = input('', /* @ts-ignore */
|
|
115
|
+
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
116
|
+
this.placeholder = input('', /* @ts-ignore */
|
|
117
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
118
|
+
/** Nombre accesible sin `label` visible. */
|
|
119
|
+
this.ariaLabel = input('', /* @ts-ignore */
|
|
120
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
121
|
+
this.rows = input(3, /* @ts-ignore */
|
|
122
|
+
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
123
|
+
this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
124
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
125
|
+
this.requiredIndicator = input(undefined, /* @ts-ignore */
|
|
126
|
+
...(ngDevMode ? [{ debugName: "requiredIndicator" }] : /* istanbul ignore next */ []));
|
|
127
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
128
|
+
/** Lo escrito tras el disparador (para pedir sugerencias). */
|
|
129
|
+
this.search = output();
|
|
130
|
+
/** Menciones presentes en el texto, cada vez que cambian. */
|
|
131
|
+
this.mentionsChange = output();
|
|
132
|
+
this.fieldState = cbFieldState({
|
|
133
|
+
invalid: () => this.invalid(),
|
|
134
|
+
required: () => this.required(),
|
|
135
|
+
requiredIndicator: () => this.requiredIndicator(),
|
|
136
|
+
});
|
|
137
|
+
this.cvaDisabled = signal(false, /* @ts-ignore */
|
|
138
|
+
...(ngDevMode ? [{ debugName: "cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
139
|
+
this.isDisabled = computed(() => this.disabled() || this.cvaDisabled(), /* @ts-ignore */
|
|
140
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
141
|
+
this.query = signal(null, /* @ts-ignore */
|
|
142
|
+
...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
143
|
+
this.open = signal(false, /* @ts-ignore */
|
|
144
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
145
|
+
this.active = signal(0, /* @ts-ignore */
|
|
146
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
147
|
+
this.announcement = signal('', /* @ts-ignore */
|
|
148
|
+
...(ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []));
|
|
149
|
+
/** Menciones elegidas (se conservan mientras su texto siga en el campo). */
|
|
150
|
+
this.chosen = [];
|
|
151
|
+
this.lastMentions = '';
|
|
152
|
+
this.results = computed(() => {
|
|
153
|
+
const q = this.query();
|
|
154
|
+
if (!q)
|
|
155
|
+
return [];
|
|
156
|
+
const items = this.suggestions().filter((s) => (s.trigger ?? '@') === q.trigger);
|
|
157
|
+
if (!this.filter())
|
|
158
|
+
return items.slice(0, this.maxResults());
|
|
159
|
+
const needle = normalize(q.query);
|
|
160
|
+
const scored = items
|
|
161
|
+
.map((item) => {
|
|
162
|
+
const label = normalize(item.label);
|
|
163
|
+
const score = !needle ? 1 : label.startsWith(needle) ? 3 : label.split(/\s+/).some((w) => w.startsWith(needle)) ? 2 : label.includes(needle) ? 1 : 0;
|
|
164
|
+
return { item, score };
|
|
165
|
+
})
|
|
166
|
+
.filter((e) => e.score > 0)
|
|
167
|
+
.sort((a, b) => b.score - a.score);
|
|
168
|
+
return scored.slice(0, this.maxResults()).map((e) => e.item);
|
|
169
|
+
}, /* @ts-ignore */
|
|
170
|
+
...(ngDevMode ? [{ debugName: "results" }] : /* istanbul ignore next */ []));
|
|
171
|
+
this.activeId = computed(() => (this.results().length ? `${this.listId}-${this.active()}` : null), /* @ts-ignore */
|
|
172
|
+
...(ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []));
|
|
173
|
+
this.onChange = () => { };
|
|
174
|
+
this.onTouched = () => { };
|
|
175
|
+
}
|
|
176
|
+
initials(item) {
|
|
177
|
+
return item.label
|
|
178
|
+
.split(/\s+/)
|
|
179
|
+
.filter(Boolean)
|
|
180
|
+
.slice(0, 2)
|
|
181
|
+
.map((w) => w.charAt(0).toUpperCase())
|
|
182
|
+
.join('');
|
|
183
|
+
}
|
|
184
|
+
// --- ControlValueAccessor ---------------------------------------------------
|
|
185
|
+
writeValue(value) {
|
|
186
|
+
this.value.set(value ?? '');
|
|
187
|
+
this.syncMentions(false);
|
|
188
|
+
}
|
|
189
|
+
registerOnChange(fn) {
|
|
190
|
+
this.onChange = fn;
|
|
191
|
+
}
|
|
192
|
+
registerOnTouched(fn) {
|
|
193
|
+
this.onTouched = fn;
|
|
194
|
+
}
|
|
195
|
+
setDisabledState(isDisabled) {
|
|
196
|
+
this.cvaDisabled.set(isDisabled);
|
|
197
|
+
}
|
|
198
|
+
// --- Escritura ----------------------------------------------------------------
|
|
199
|
+
onInput(event) {
|
|
200
|
+
const text = event.target.value;
|
|
201
|
+
this.value.set(text);
|
|
202
|
+
this.onChange(text);
|
|
203
|
+
this.syncMentions(true);
|
|
204
|
+
this.detect();
|
|
205
|
+
}
|
|
206
|
+
onBlur() {
|
|
207
|
+
this.onTouched();
|
|
208
|
+
this.close();
|
|
209
|
+
}
|
|
210
|
+
/** Busca un disparador justo antes del cursor y abre (o cierra) las sugerencias. */
|
|
211
|
+
detect() {
|
|
212
|
+
const el = this.fieldEl().nativeElement;
|
|
213
|
+
const caret = el.selectionStart ?? el.value.length;
|
|
214
|
+
if (el.selectionEnd !== caret)
|
|
215
|
+
return this.close();
|
|
216
|
+
const before = el.value.slice(0, caret);
|
|
217
|
+
let found = null;
|
|
218
|
+
for (const trigger of this.triggers()) {
|
|
219
|
+
const start = before.lastIndexOf(trigger);
|
|
220
|
+
if (start < 0 || (start > 0 && !/\s|[([{"'¿¡]/.test(before[start - 1])))
|
|
221
|
+
continue;
|
|
222
|
+
const query = before.slice(start + trigger.length);
|
|
223
|
+
// Admite nombres con espacios, pero no saltos de línea ni búsquedas larguísimas.
|
|
224
|
+
if (/\n/.test(query) || query.length > 40 || /\s{2}/.test(query))
|
|
225
|
+
continue;
|
|
226
|
+
if (!found || start > found.start)
|
|
227
|
+
found = { trigger, query, start };
|
|
228
|
+
}
|
|
229
|
+
if (!found)
|
|
230
|
+
return this.close();
|
|
231
|
+
const previous = this.query();
|
|
232
|
+
this.query.set(found);
|
|
233
|
+
if (previous?.query !== found.query || previous.trigger !== found.trigger) {
|
|
234
|
+
this.active.set(0);
|
|
235
|
+
this.search.emit({ trigger: found.trigger, query: found.query });
|
|
236
|
+
}
|
|
237
|
+
// Con un espacio y sin resultados, se entiende que ya no es una mención.
|
|
238
|
+
if (/\s/.test(found.query) && !this.results().length && !this.loading())
|
|
239
|
+
return this.close();
|
|
240
|
+
this.openPanel(found.start);
|
|
241
|
+
this.announcement.set(this.results().length ? cbFormat(this.t().mentionsCount, this.results().length) : this.t().noResults);
|
|
242
|
+
}
|
|
243
|
+
onKeydown(event) {
|
|
244
|
+
if (!this.open())
|
|
245
|
+
return;
|
|
246
|
+
const count = this.results().length;
|
|
247
|
+
switch (event.key) {
|
|
248
|
+
case 'ArrowDown':
|
|
249
|
+
case 'ArrowUp':
|
|
250
|
+
if (!count)
|
|
251
|
+
return;
|
|
252
|
+
event.preventDefault();
|
|
253
|
+
this.active.set((this.active() + (event.key === 'ArrowDown' ? 1 : -1) + count) % count);
|
|
254
|
+
this.scrollActiveIntoView();
|
|
255
|
+
break;
|
|
256
|
+
case 'Enter':
|
|
257
|
+
case 'Tab': {
|
|
258
|
+
const item = this.results()[this.active()];
|
|
259
|
+
if (!item)
|
|
260
|
+
return;
|
|
261
|
+
event.preventDefault();
|
|
262
|
+
this.choose(item);
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
case 'Escape':
|
|
266
|
+
event.preventDefault();
|
|
267
|
+
event.stopPropagation();
|
|
268
|
+
this.close();
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
/** Inserta la mención elegida en lugar de lo escrito tras el disparador. */
|
|
273
|
+
choose(item) {
|
|
274
|
+
const q = this.query();
|
|
275
|
+
const el = this.fieldEl().nativeElement;
|
|
276
|
+
if (!q)
|
|
277
|
+
return;
|
|
278
|
+
const caret = el.selectionStart ?? el.value.length;
|
|
279
|
+
const inserted = `${q.trigger}${item.label} `;
|
|
280
|
+
const text = el.value.slice(0, q.start) + inserted + el.value.slice(caret);
|
|
281
|
+
const position = q.start + inserted.length;
|
|
282
|
+
this.value.set(text);
|
|
283
|
+
el.value = text;
|
|
284
|
+
el.setSelectionRange(position, position);
|
|
285
|
+
this.chosen = [...this.chosen.filter((m) => !(m.id === item.id && m.trigger === q.trigger)), { id: item.id, label: item.label, trigger: q.trigger }];
|
|
286
|
+
this.onChange(text);
|
|
287
|
+
this.close();
|
|
288
|
+
this.syncMentions(true);
|
|
289
|
+
el.focus();
|
|
290
|
+
}
|
|
291
|
+
/** Quita las menciones cuyo texto ya no está y avisa si cambió la lista. */
|
|
292
|
+
syncMentions(emit) {
|
|
293
|
+
const text = this.value();
|
|
294
|
+
this.chosen = this.chosen.filter((m) => text.includes(`${m.trigger}${m.label}`));
|
|
295
|
+
const signature = JSON.stringify(this.chosen.map((m) => `${m.trigger}${m.id}`));
|
|
296
|
+
if (signature === this.lastMentions)
|
|
297
|
+
return;
|
|
298
|
+
this.lastMentions = signature;
|
|
299
|
+
if (emit)
|
|
300
|
+
this.mentionsChange.emit([...this.chosen]);
|
|
301
|
+
}
|
|
302
|
+
// --- Panel ---------------------------------------------------------------------
|
|
303
|
+
openPanel(start) {
|
|
304
|
+
const el = this.fieldEl().nativeElement;
|
|
305
|
+
const rect = el.getBoundingClientRect();
|
|
306
|
+
const caret = cbCaretCoordinates(el, start);
|
|
307
|
+
const origin = { x: rect.left + caret.left, y: rect.top + caret.top + caret.height };
|
|
308
|
+
if (this.overlayRef) {
|
|
309
|
+
this.overlayRef.updatePositionStrategy(this.position(origin));
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
this.overlayRef = this.overlay.create({
|
|
313
|
+
positionStrategy: this.position(origin),
|
|
314
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
315
|
+
});
|
|
316
|
+
this.overlayRef.attach(new TemplatePortal(this.panelTpl(), this.vcr));
|
|
317
|
+
this.open.set(true);
|
|
318
|
+
}
|
|
319
|
+
position(origin) {
|
|
320
|
+
return this.overlay
|
|
321
|
+
.position()
|
|
322
|
+
.flexibleConnectedTo(origin)
|
|
323
|
+
.withPositions([
|
|
324
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'top', offsetY: 4 },
|
|
325
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -24 },
|
|
326
|
+
])
|
|
327
|
+
.withPush(true);
|
|
328
|
+
}
|
|
329
|
+
/** Cierra las sugerencias. */
|
|
330
|
+
close() {
|
|
331
|
+
this.query.set(null);
|
|
332
|
+
if (!this.overlayRef)
|
|
333
|
+
return;
|
|
334
|
+
this.overlayRef.dispose();
|
|
335
|
+
this.overlayRef = null;
|
|
336
|
+
this.open.set(false);
|
|
337
|
+
this.announcement.set('');
|
|
338
|
+
}
|
|
339
|
+
scrollActiveIntoView() {
|
|
340
|
+
const id = this.activeId();
|
|
341
|
+
afterNextRender(() => (id ? this.overlayRef?.overlayElement.querySelector(`#${id}`)?.scrollIntoView?.({ block: 'nearest' }) : null), {
|
|
342
|
+
injector: this.injector,
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbMentions, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
346
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbMentions, isStandalone: true, selector: "cb-mentions", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, triggers: { classPropertyName: "triggers", publicName: "triggers", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, maxResults: { classPropertyName: "maxResults", publicName: "maxResults", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, requiredIndicator: { classPropertyName: "requiredIndicator", publicName: "requiredIndicator", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", search: "search", mentionsChange: "mentionsChange" }, host: { classAttribute: "cb-mentions" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CbMentions), multi: true }], viewQueries: [{ propertyName: "fieldEl", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
347
|
+
@if (label()) {
|
|
348
|
+
<label class="cb-mentions__label" [attr.for]="inputId">
|
|
349
|
+
{{ label() }}
|
|
350
|
+
@if (fieldState.indicator(); as mark) {
|
|
351
|
+
<span [class]="'cb-mentions__required cb-mentions__required--' + mark.kind" [attr.aria-hidden]="mark.kind === 'optional' ? null : 'true'">{{ mark.text }}</span>
|
|
352
|
+
}
|
|
353
|
+
</label>
|
|
354
|
+
}
|
|
355
|
+
<textarea
|
|
356
|
+
#field
|
|
357
|
+
class="cb-mentions__field"
|
|
358
|
+
[class.cb-is-invalid]="fieldState.invalid()"
|
|
359
|
+
[id]="inputId"
|
|
360
|
+
[rows]="rows()"
|
|
361
|
+
[value]="value()"
|
|
362
|
+
[placeholder]="placeholder()"
|
|
363
|
+
[disabled]="isDisabled()"
|
|
364
|
+
[required]="fieldState.required()"
|
|
365
|
+
aria-autocomplete="list"
|
|
366
|
+
[attr.aria-controls]="open() ? listId : null"
|
|
367
|
+
[attr.aria-activedescendant]="open() ? activeId() : null"
|
|
368
|
+
[attr.aria-invalid]="fieldState.invalid() ? 'true' : null"
|
|
369
|
+
[attr.aria-describedby]="hint() ? inputId + '-hint' : null"
|
|
370
|
+
[attr.aria-label]="label() ? null : (ariaLabel() || null)"
|
|
371
|
+
(input)="onInput($event)"
|
|
372
|
+
(keydown)="onKeydown($event)"
|
|
373
|
+
(click)="detect()"
|
|
374
|
+
(blur)="onBlur()"
|
|
375
|
+
></textarea>
|
|
376
|
+
@if (hint()) {
|
|
377
|
+
<p class="cb-mentions__hint" [id]="inputId + '-hint'">{{ hint() }}</p>
|
|
378
|
+
}
|
|
379
|
+
<div class="cb-mentions__sr" role="status">{{ announcement() }}</div>
|
|
380
|
+
|
|
381
|
+
<ng-template #panel>
|
|
382
|
+
<ul class="cb-mentions__panel" role="listbox" [id]="listId" [attr.aria-label]="label() || ariaLabel() || null">
|
|
383
|
+
@for (item of results(); track item.id; let i = $index) {
|
|
384
|
+
<li
|
|
385
|
+
class="cb-mentions__option"
|
|
386
|
+
role="option"
|
|
387
|
+
[id]="listId + '-' + i"
|
|
388
|
+
[class.cb-mentions__option--active]="i === active()"
|
|
389
|
+
[attr.aria-selected]="i === active()"
|
|
390
|
+
(mousedown)="$event.preventDefault()"
|
|
391
|
+
(mousemove)="active.set(i)"
|
|
392
|
+
(click)="choose(item)"
|
|
393
|
+
>
|
|
394
|
+
<span class="cb-mentions__avatar" aria-hidden="true">
|
|
395
|
+
@if (item.avatar) {
|
|
396
|
+
<img [src]="item.avatar" alt="" />
|
|
397
|
+
} @else {
|
|
398
|
+
{{ initials(item) }}
|
|
399
|
+
}
|
|
400
|
+
</span>
|
|
401
|
+
<span class="cb-mentions__text">
|
|
402
|
+
<span class="cb-mentions__name">{{ item.label }}</span>
|
|
403
|
+
@if (item.description) {
|
|
404
|
+
<span class="cb-mentions__description">{{ item.description }}</span>
|
|
405
|
+
}
|
|
406
|
+
</span>
|
|
407
|
+
</li>
|
|
408
|
+
} @empty {
|
|
409
|
+
<li class="cb-mentions__empty" role="presentation">{{ loading() ? t().loading : t().noResults }}</li>
|
|
410
|
+
}
|
|
411
|
+
</ul>
|
|
412
|
+
</ng-template>
|
|
413
|
+
`, isInline: true, styles: [":host{display:block;font-family:var(--cb-font-sans)}.cb-mentions__label{display:block;margin-bottom:var(--cb-space-1);font-size:var(--cb-text-sm);font-weight:var(--cb-font-weight-medium);color:var(--cb-color-text)}.cb-mentions__required{margin-left:2px;color:var(--cb-color-danger)}.cb-mentions__required--required,.cb-mentions__required--optional{margin-left:.25rem;color:var(--cb-color-text-muted);font-size:.85em;font-weight:var(--cb-font-weight-normal, 400)}.cb-mentions__field{box-sizing:border-box;display:block;width:100%;padding:var(--cb-space-2) var(--cb-space-3);border:var(--cb-border-width, 1px) solid var(--cb-color-border-strong);border-radius:var(--cb-radius-md);background-color:var(--cb-color-bg);color:var(--cb-color-text);font:inherit;font-size:var(--cb-text-base);line-height:1.5;resize:vertical;transition:border-color var(--cb-duration-fast) var(--cb-ease),box-shadow var(--cb-duration-fast) var(--cb-ease)}.cb-mentions__field::placeholder{color:var(--cb-color-text-muted)}.cb-mentions__field:hover:not(:disabled):not(:focus){border-color:var(--cb-color-text-muted)}.cb-mentions__field:focus-visible{outline:none;border-color:var(--cb-color-primary-500);box-shadow:0 0 0 3px color-mix(in srgb,var(--cb-color-primary-500) 25%,transparent)}.cb-mentions__field.cb-is-invalid{border-color:var(--cb-color-danger)}.cb-mentions__field:disabled{cursor:not-allowed;background-color:var(--cb-color-surface);color:var(--cb-color-text-muted)}.cb-mentions__hint{margin:var(--cb-space-1) 0 0;color:var(--cb-color-text-muted);font-size:var(--cb-text-sm)}.cb-mentions__sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.cb-mentions__panel{width:18rem;max-width:calc(100vw - 2rem);max-height:16rem;margin:0;padding:.375rem;overflow-y:auto;border:1px solid var(--cb-color-border);border-radius:var(--cb-radius-md);background:var(--cb-color-surface-raised);box-shadow:var(--cb-shadow-lg);color:var(--cb-color-text);font-family:var(--cb-font-sans);list-style:none}.cb-mentions__option{display:flex;align-items:center;gap:.625rem;padding:.375rem .5rem;border-radius:var(--cb-radius-sm);font-size:var(--cb-text-sm);cursor:pointer}.cb-mentions__option--active{background:var(--cb-color-surface-hover);box-shadow:inset 3px 0 0 var(--cb-color-primary)}.cb-mentions__avatar{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;overflow:hidden;border-radius:50%;background:color-mix(in srgb,var(--cb-color-primary) 14%,transparent);color:var(--cb-color-primary);font-size:.6875rem;font-weight:var(--cb-font-weight-semibold, 600)}.cb-mentions__avatar img{width:100%;height:100%;object-fit:cover}.cb-mentions__text{display:flex;flex-direction:column;min-width:0}.cb-mentions__name,.cb-mentions__description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cb-mentions__description{color:var(--cb-color-text-muted);font-size:var(--cb-text-xs)}.cb-mentions__empty{padding:.75rem;color:var(--cb-color-text-muted);font-size:var(--cb-text-sm);text-align:center}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
414
|
+
}
|
|
415
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbMentions, decorators: [{
|
|
416
|
+
type: Component,
|
|
417
|
+
args: [{ selector: 'cb-mentions', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { class: 'cb-mentions' }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CbMentions), multi: true }], template: `
|
|
418
|
+
@if (label()) {
|
|
419
|
+
<label class="cb-mentions__label" [attr.for]="inputId">
|
|
420
|
+
{{ label() }}
|
|
421
|
+
@if (fieldState.indicator(); as mark) {
|
|
422
|
+
<span [class]="'cb-mentions__required cb-mentions__required--' + mark.kind" [attr.aria-hidden]="mark.kind === 'optional' ? null : 'true'">{{ mark.text }}</span>
|
|
423
|
+
}
|
|
424
|
+
</label>
|
|
425
|
+
}
|
|
426
|
+
<textarea
|
|
427
|
+
#field
|
|
428
|
+
class="cb-mentions__field"
|
|
429
|
+
[class.cb-is-invalid]="fieldState.invalid()"
|
|
430
|
+
[id]="inputId"
|
|
431
|
+
[rows]="rows()"
|
|
432
|
+
[value]="value()"
|
|
433
|
+
[placeholder]="placeholder()"
|
|
434
|
+
[disabled]="isDisabled()"
|
|
435
|
+
[required]="fieldState.required()"
|
|
436
|
+
aria-autocomplete="list"
|
|
437
|
+
[attr.aria-controls]="open() ? listId : null"
|
|
438
|
+
[attr.aria-activedescendant]="open() ? activeId() : null"
|
|
439
|
+
[attr.aria-invalid]="fieldState.invalid() ? 'true' : null"
|
|
440
|
+
[attr.aria-describedby]="hint() ? inputId + '-hint' : null"
|
|
441
|
+
[attr.aria-label]="label() ? null : (ariaLabel() || null)"
|
|
442
|
+
(input)="onInput($event)"
|
|
443
|
+
(keydown)="onKeydown($event)"
|
|
444
|
+
(click)="detect()"
|
|
445
|
+
(blur)="onBlur()"
|
|
446
|
+
></textarea>
|
|
447
|
+
@if (hint()) {
|
|
448
|
+
<p class="cb-mentions__hint" [id]="inputId + '-hint'">{{ hint() }}</p>
|
|
449
|
+
}
|
|
450
|
+
<div class="cb-mentions__sr" role="status">{{ announcement() }}</div>
|
|
451
|
+
|
|
452
|
+
<ng-template #panel>
|
|
453
|
+
<ul class="cb-mentions__panel" role="listbox" [id]="listId" [attr.aria-label]="label() || ariaLabel() || null">
|
|
454
|
+
@for (item of results(); track item.id; let i = $index) {
|
|
455
|
+
<li
|
|
456
|
+
class="cb-mentions__option"
|
|
457
|
+
role="option"
|
|
458
|
+
[id]="listId + '-' + i"
|
|
459
|
+
[class.cb-mentions__option--active]="i === active()"
|
|
460
|
+
[attr.aria-selected]="i === active()"
|
|
461
|
+
(mousedown)="$event.preventDefault()"
|
|
462
|
+
(mousemove)="active.set(i)"
|
|
463
|
+
(click)="choose(item)"
|
|
464
|
+
>
|
|
465
|
+
<span class="cb-mentions__avatar" aria-hidden="true">
|
|
466
|
+
@if (item.avatar) {
|
|
467
|
+
<img [src]="item.avatar" alt="" />
|
|
468
|
+
} @else {
|
|
469
|
+
{{ initials(item) }}
|
|
470
|
+
}
|
|
471
|
+
</span>
|
|
472
|
+
<span class="cb-mentions__text">
|
|
473
|
+
<span class="cb-mentions__name">{{ item.label }}</span>
|
|
474
|
+
@if (item.description) {
|
|
475
|
+
<span class="cb-mentions__description">{{ item.description }}</span>
|
|
476
|
+
}
|
|
477
|
+
</span>
|
|
478
|
+
</li>
|
|
479
|
+
} @empty {
|
|
480
|
+
<li class="cb-mentions__empty" role="presentation">{{ loading() ? t().loading : t().noResults }}</li>
|
|
481
|
+
}
|
|
482
|
+
</ul>
|
|
483
|
+
</ng-template>
|
|
484
|
+
`, styles: [":host{display:block;font-family:var(--cb-font-sans)}.cb-mentions__label{display:block;margin-bottom:var(--cb-space-1);font-size:var(--cb-text-sm);font-weight:var(--cb-font-weight-medium);color:var(--cb-color-text)}.cb-mentions__required{margin-left:2px;color:var(--cb-color-danger)}.cb-mentions__required--required,.cb-mentions__required--optional{margin-left:.25rem;color:var(--cb-color-text-muted);font-size:.85em;font-weight:var(--cb-font-weight-normal, 400)}.cb-mentions__field{box-sizing:border-box;display:block;width:100%;padding:var(--cb-space-2) var(--cb-space-3);border:var(--cb-border-width, 1px) solid var(--cb-color-border-strong);border-radius:var(--cb-radius-md);background-color:var(--cb-color-bg);color:var(--cb-color-text);font:inherit;font-size:var(--cb-text-base);line-height:1.5;resize:vertical;transition:border-color var(--cb-duration-fast) var(--cb-ease),box-shadow var(--cb-duration-fast) var(--cb-ease)}.cb-mentions__field::placeholder{color:var(--cb-color-text-muted)}.cb-mentions__field:hover:not(:disabled):not(:focus){border-color:var(--cb-color-text-muted)}.cb-mentions__field:focus-visible{outline:none;border-color:var(--cb-color-primary-500);box-shadow:0 0 0 3px color-mix(in srgb,var(--cb-color-primary-500) 25%,transparent)}.cb-mentions__field.cb-is-invalid{border-color:var(--cb-color-danger)}.cb-mentions__field:disabled{cursor:not-allowed;background-color:var(--cb-color-surface);color:var(--cb-color-text-muted)}.cb-mentions__hint{margin:var(--cb-space-1) 0 0;color:var(--cb-color-text-muted);font-size:var(--cb-text-sm)}.cb-mentions__sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.cb-mentions__panel{width:18rem;max-width:calc(100vw - 2rem);max-height:16rem;margin:0;padding:.375rem;overflow-y:auto;border:1px solid var(--cb-color-border);border-radius:var(--cb-radius-md);background:var(--cb-color-surface-raised);box-shadow:var(--cb-shadow-lg);color:var(--cb-color-text);font-family:var(--cb-font-sans);list-style:none}.cb-mentions__option{display:flex;align-items:center;gap:.625rem;padding:.375rem .5rem;border-radius:var(--cb-radius-sm);font-size:var(--cb-text-sm);cursor:pointer}.cb-mentions__option--active{background:var(--cb-color-surface-hover);box-shadow:inset 3px 0 0 var(--cb-color-primary)}.cb-mentions__avatar{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;overflow:hidden;border-radius:50%;background:color-mix(in srgb,var(--cb-color-primary) 14%,transparent);color:var(--cb-color-primary);font-size:.6875rem;font-weight:var(--cb-font-weight-semibold, 600)}.cb-mentions__avatar img{width:100%;height:100%;object-fit:cover}.cb-mentions__text{display:flex;flex-direction:column;min-width:0}.cb-mentions__name,.cb-mentions__description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cb-mentions__description{color:var(--cb-color-text-muted);font-size:var(--cb-text-xs)}.cb-mentions__empty{padding:.75rem;color:var(--cb-color-text-muted);font-size:var(--cb-text-sm);text-align:center}\n"] }]
|
|
485
|
+
}], propDecorators: { fieldEl: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], triggers: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggers", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], maxResults: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxResults", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], requiredIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "requiredIndicator", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], search: [{ type: i0.Output, args: ["search"] }], mentionsChange: [{ type: i0.Output, args: ["mentionsChange"] }] } });
|
|
486
|
+
|
|
487
|
+
/*
|
|
488
|
+
* Public API Surface de @caribeng/ui/mentions
|
|
489
|
+
*/
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Generated bundle index. Do not edit.
|
|
493
|
+
*/
|
|
494
|
+
|
|
495
|
+
export { CbMentions, cbCaretCoordinates };
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ViewContainerRef, DestroyRef, input, output, viewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { inject, ViewContainerRef, DestroyRef, input, computed, output, viewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { Overlay } from '@angular/cdk/overlay';
|
|
4
4
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
5
5
|
import { CbIcon } from '@caribeng/ui/icon';
|
|
6
|
+
import { injectCbTranslation, cbVisibleItems, cbRunCommand } from '@caribeng/ui';
|
|
6
7
|
|
|
7
8
|
/** Popup menu anchored to any trigger element. */
|
|
8
9
|
class CbMenu {
|
|
9
10
|
constructor() {
|
|
11
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
12
|
+
this.t = injectCbTranslation();
|
|
10
13
|
this.overlay = inject(Overlay);
|
|
11
14
|
this.vcr = inject(ViewContainerRef);
|
|
12
15
|
this.destroyRef = inject(DestroyRef);
|
|
13
16
|
this.items = input([], /* @ts-ignore */
|
|
14
17
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
15
|
-
|
|
18
|
+
/** Items sin los de `visible: false`. */
|
|
19
|
+
this.visibleItems = computed(() => cbVisibleItems(this.items()), /* @ts-ignore */
|
|
20
|
+
...(ngDevMode ? [{ debugName: "visibleItems" }] : /* istanbul ignore next */ []));
|
|
21
|
+
this.ariaLabel = input(undefined, /* @ts-ignore */
|
|
16
22
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
17
23
|
this.itemSelect = output();
|
|
24
|
+
/** Se emite al cerrarse el menú (clic fuera, Escape o al elegir una opción). */
|
|
25
|
+
this.hidden = output();
|
|
18
26
|
this.content = viewChild.required('content');
|
|
19
27
|
this.overlayRef = null;
|
|
20
28
|
this.trigger = null;
|
|
@@ -59,12 +67,14 @@ class CbMenu {
|
|
|
59
67
|
const trigger = this.trigger;
|
|
60
68
|
this.trigger = null;
|
|
61
69
|
trigger?.focus();
|
|
70
|
+
this.hidden.emit();
|
|
62
71
|
}
|
|
63
72
|
activate(item, event) {
|
|
64
73
|
if (item.disabled || item.separator) {
|
|
65
74
|
event.preventDefault();
|
|
66
75
|
return;
|
|
67
76
|
}
|
|
77
|
+
cbRunCommand(item, event);
|
|
68
78
|
this.itemSelect.emit(item);
|
|
69
79
|
this.hide();
|
|
70
80
|
}
|
|
@@ -91,10 +101,10 @@ class CbMenu {
|
|
|
91
101
|
}
|
|
92
102
|
}
|
|
93
103
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbMenu, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
94
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbMenu, isStandalone: true, selector: "cb-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
104
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbMenu, isStandalone: true, selector: "cb-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect", hidden: "hidden" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
95
105
|
<ng-template #content>
|
|
96
|
-
<div class="cb-menu__panel" role="menu" [attr.aria-label]="ariaLabel() || null" (click)="onPanelClick($event)">
|
|
97
|
-
@for (item of
|
|
106
|
+
<div class="cb-menu__panel" role="menu" [attr.aria-label]="(ariaLabel() ?? t().menu) || null" (click)="onPanelClick($event)">
|
|
107
|
+
@for (item of visibleItems(); track $index) {
|
|
98
108
|
@if (item.separator) {
|
|
99
109
|
<div class="cb-menu__separator" role="separator"></div>
|
|
100
110
|
} @else {
|
|
@@ -133,8 +143,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
133
143
|
type: Component,
|
|
134
144
|
args: [{ selector: 'cb-menu', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [CbIcon], template: `
|
|
135
145
|
<ng-template #content>
|
|
136
|
-
<div class="cb-menu__panel" role="menu" [attr.aria-label]="ariaLabel() || null" (click)="onPanelClick($event)">
|
|
137
|
-
@for (item of
|
|
146
|
+
<div class="cb-menu__panel" role="menu" [attr.aria-label]="(ariaLabel() ?? t().menu) || null" (click)="onPanelClick($event)">
|
|
147
|
+
@for (item of visibleItems(); track $index) {
|
|
138
148
|
@if (item.separator) {
|
|
139
149
|
<div class="cb-menu__separator" role="separator"></div>
|
|
140
150
|
} @else {
|
|
@@ -168,7 +178,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
168
178
|
</div>
|
|
169
179
|
</ng-template>
|
|
170
180
|
`, styles: [".cb-menu__panel{min-width:12rem;padding:.375rem;background:var(--cb-color-surface-raised);border:1px solid var(--cb-color-border);border-radius:var(--cb-radius-md);box-shadow:var(--cb-shadow-lg);color:var(--cb-color-text);font-family:var(--cb-font-sans)}.cb-menu__item{display:flex;align-items:center;gap:.625rem;width:100%;min-height:2.25rem;padding:.5rem .625rem;border:0;border-radius:var(--cb-radius-sm);background:transparent;color:inherit;font:inherit;text-align:left;text-decoration:none;cursor:pointer}.cb-menu__item:hover:not(:disabled):not([aria-disabled=true]),.cb-menu__item:focus-visible{outline:none;background:var(--cb-color-surface)}.cb-menu__item:disabled,.cb-menu__item[aria-disabled=true]{opacity:.5;cursor:default}.cb-menu__separator{height:1px;margin:.375rem .25rem;background:var(--cb-color-border)}\n"] }]
|
|
171
|
-
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], itemSelect: [{ type: i0.Output, args: ["itemSelect"] }], content: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }] } });
|
|
181
|
+
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], itemSelect: [{ type: i0.Output, args: ["itemSelect"] }], hidden: [{ type: i0.Output, args: ["hidden"] }], content: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }] } });
|
|
172
182
|
|
|
173
183
|
/**
|
|
174
184
|
* Generated bundle index. Do not edit.
|