@forgeroute/ui 0.5.15 → 0.5.17
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/fesm2022/forgeroute-ui-action-bar.mjs +190 -0
- package/fesm2022/forgeroute-ui-action-bar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-address-input.mjs +1164 -0
- package/fesm2022/forgeroute-ui-address-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-alert.mjs +223 -0
- package/fesm2022/forgeroute-ui-alert.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-avatar.mjs +320 -0
- package/fesm2022/forgeroute-ui-avatar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-badge.mjs +158 -0
- package/fesm2022/forgeroute-ui-badge.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-bar-row.mjs +255 -0
- package/fesm2022/forgeroute-ui-bar-row.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-boards.mjs +2201 -0
- package/fesm2022/forgeroute-ui-boards.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-bulk-eligible.mjs +172 -0
- package/fesm2022/forgeroute-ui-bulk-eligible.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-business-hours.mjs +771 -0
- package/fesm2022/forgeroute-ui-business-hours.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-calendar.mjs +2006 -0
- package/fesm2022/forgeroute-ui-calendar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-card-list-item.mjs +556 -0
- package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-charts.mjs +1 -1
- package/fesm2022/forgeroute-ui-charts.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-checkbox.mjs +815 -0
- package/fesm2022/forgeroute-ui-checkbox.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-chip.mjs +379 -0
- package/fesm2022/forgeroute-ui-chip.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-color-input.mjs +492 -0
- package/fesm2022/forgeroute-ui-color-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-column-filter.mjs +645 -0
- package/fesm2022/forgeroute-ui-column-filter.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-columns.mjs +351 -0
- package/fesm2022/forgeroute-ui-columns.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-combobox.mjs +772 -0
- package/fesm2022/forgeroute-ui-combobox.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-confirm.mjs +48 -0
- package/fesm2022/forgeroute-ui-confirm.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-contact-picker.mjs +865 -0
- package/fesm2022/forgeroute-ui-contact-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-conversations.mjs +3627 -0
- package/fesm2022/forgeroute-ui-conversations.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-copy-field.mjs +378 -0
- package/fesm2022/forgeroute-ui-copy-field.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-data-table-core.mjs +6150 -0
- package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-date-input.mjs +384 -0
- package/fesm2022/forgeroute-ui-date-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-date-range-picker.mjs +453 -0
- package/fesm2022/forgeroute-ui-date-range-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-datetime-input.mjs +375 -0
- package/fesm2022/forgeroute-ui-datetime-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-detail-card.mjs +655 -0
- package/fesm2022/forgeroute-ui-detail-card.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-discount-selector.mjs +259 -0
- package/fesm2022/forgeroute-ui-discount-selector.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-divider.mjs +111 -0
- package/fesm2022/forgeroute-ui-divider.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-dropdown.mjs +550 -0
- package/fesm2022/forgeroute-ui-dropdown.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-editor.mjs +4545 -0
- package/fesm2022/forgeroute-ui-editor.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-empty-state.mjs +231 -0
- package/fesm2022/forgeroute-ui-empty-state.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-error-state.mjs +195 -0
- package/fesm2022/forgeroute-ui-error-state.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-error.mjs +93 -0
- package/fesm2022/forgeroute-ui-error.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-fade.mjs +117 -0
- package/fesm2022/forgeroute-ui-fade.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-file-input.mjs +999 -0
- package/fesm2022/forgeroute-ui-file-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-fixed-footer.mjs +115 -0
- package/fesm2022/forgeroute-ui-fixed-footer.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-form-row.mjs +126 -0
- package/fesm2022/forgeroute-ui-form-row.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-form-section.mjs +93 -0
- package/fesm2022/forgeroute-ui-form-section.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-form.mjs +139 -0
- package/fesm2022/forgeroute-ui-form.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-hint.mjs +47 -0
- package/fesm2022/forgeroute-ui-hint.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-icon-picker.mjs +424 -0
- package/fesm2022/forgeroute-ui-icon-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-icon.mjs +311 -0
- package/fesm2022/forgeroute-ui-icon.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-image-preview.mjs +237 -0
- package/fesm2022/forgeroute-ui-image-preview.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-keypad.mjs +278 -0
- package/fesm2022/forgeroute-ui-keypad.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-kpi-card.mjs +490 -0
- package/fesm2022/forgeroute-ui-kpi-card.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-language-switcher.mjs +134 -0
- package/fesm2022/forgeroute-ui-language-switcher.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-layout.mjs +18 -0
- package/fesm2022/forgeroute-ui-layout.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-list-item.mjs +620 -0
- package/fesm2022/forgeroute-ui-list-item.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-list.mjs +866 -0
- package/fesm2022/forgeroute-ui-list.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-live-region.mjs +118 -0
- package/fesm2022/forgeroute-ui-live-region.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-map.mjs +5 -1
- package/fesm2022/forgeroute-ui-map.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-maps.mjs +2 -1
- package/fesm2022/forgeroute-ui-maps.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-media.mjs +4615 -0
- package/fesm2022/forgeroute-ui-media.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-messaging.mjs +20 -1
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-more-menu.mjs +418 -0
- package/fesm2022/forgeroute-ui-more-menu.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-multi-select.mjs +532 -0
- package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-notes.mjs +768 -0
- package/fesm2022/forgeroute-ui-notes.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-notification-bell.mjs +587 -0
- package/fesm2022/forgeroute-ui-notification-bell.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-offline-banner.mjs +156 -0
- package/fesm2022/forgeroute-ui-offline-banner.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-option-card.mjs +379 -0
- package/fesm2022/forgeroute-ui-option-card.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-page.mjs +317 -0
- package/fesm2022/forgeroute-ui-page.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-pagination.mjs +225 -0
- package/fesm2022/forgeroute-ui-pagination.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-panel-info-list.mjs +422 -0
- package/fesm2022/forgeroute-ui-panel-info-list.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-password-requirements.mjs +237 -0
- package/fesm2022/forgeroute-ui-password-requirements.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-payments.mjs +6243 -0
- package/fesm2022/forgeroute-ui-payments.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-pdf.mjs +9 -1
- package/fesm2022/forgeroute-ui-pdf.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-phone-number-picker.mjs +840 -0
- package/fesm2022/forgeroute-ui-phone-number-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-pill-tabs.mjs +546 -0
- package/fesm2022/forgeroute-ui-pill-tabs.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-print.mjs +76 -0
- package/fesm2022/forgeroute-ui-print.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-progress-bar.mjs +252 -0
- package/fesm2022/forgeroute-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-progress-ring.mjs +277 -0
- package/fesm2022/forgeroute-ui-progress-ring.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs +301 -0
- package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-quickbooks.mjs +20 -3
- package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-radio-matrix.mjs +471 -0
- package/fesm2022/forgeroute-ui-radio-matrix.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-radio.mjs +911 -0
- package/fesm2022/forgeroute-ui-radio.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-read-only-mode.mjs +15 -0
- package/fesm2022/forgeroute-ui-read-only-mode.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-readonly-fieldset.mjs +146 -0
- package/fesm2022/forgeroute-ui-readonly-fieldset.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-reminder-alerts.mjs +249 -0
- package/fesm2022/forgeroute-ui-reminder-alerts.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-search-input.mjs +373 -0
- package/fesm2022/forgeroute-ui-search-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-section-header.mjs +296 -0
- package/fesm2022/forgeroute-ui-section-header.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-select.mjs +498 -0
- package/fesm2022/forgeroute-ui-select.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-setup.mjs +4649 -0
- package/fesm2022/forgeroute-ui-setup.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-share-menu.mjs +461 -0
- package/fesm2022/forgeroute-ui-share-menu.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-shell.mjs +981 -0
- package/fesm2022/forgeroute-ui-shell.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-show.mjs +129 -0
- package/fesm2022/forgeroute-ui-show.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-sidebar-layout.mjs +355 -0
- package/fesm2022/forgeroute-ui-sidebar-layout.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-skeleton.mjs +152 -0
- package/fesm2022/forgeroute-ui-skeleton.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-skip-link.mjs +129 -0
- package/fesm2022/forgeroute-ui-skip-link.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-snackbar.mjs +200 -0
- package/fesm2022/forgeroute-ui-snackbar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-square.mjs +17 -3
- package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stack.mjs +233 -0
- package/fesm2022/forgeroute-ui-stack.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stacked-bar.mjs +200 -0
- package/fesm2022/forgeroute-ui-stacked-bar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stacking-plan.mjs +365 -0
- package/fesm2022/forgeroute-ui-stacking-plan.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-star-rating.mjs +498 -0
- package/fesm2022/forgeroute-ui-star-rating.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-star.mjs +184 -0
- package/fesm2022/forgeroute-ui-star.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stepper.mjs +615 -0
- package/fesm2022/forgeroute-ui-stepper.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stripe.mjs +16 -3
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-swatch-picker.mjs +416 -0
- package/fesm2022/forgeroute-ui-swatch-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-table-toolbar.mjs +770 -0
- package/fesm2022/forgeroute-ui-table-toolbar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-table-types.mjs +277 -0
- package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-text-input.mjs +1003 -0
- package/fesm2022/forgeroute-ui-text-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-text-template-picker.mjs +356 -0
- package/fesm2022/forgeroute-ui-text-template-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-text.mjs +195 -0
- package/fesm2022/forgeroute-ui-text.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-textarea-input.mjs +542 -0
- package/fesm2022/forgeroute-ui-textarea-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-time-input.mjs +401 -0
- package/fesm2022/forgeroute-ui-time-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-timeline.mjs +549 -0
- package/fesm2022/forgeroute-ui-timeline.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-toast.mjs +507 -0
- package/fesm2022/forgeroute-ui-toast.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-toggle-badge.mjs +177 -0
- package/fesm2022/forgeroute-ui-toggle-badge.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-toggle.mjs +275 -0
- package/fesm2022/forgeroute-ui-toggle.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-tooltip.mjs +155 -0
- package/fesm2022/forgeroute-ui-tooltip.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-utils.mjs +1071 -0
- package/fesm2022/forgeroute-ui-utils.mjs.map +1 -0
- package/fesm2022/forgeroute-ui.mjs +105 -70663
- package/package.json +417 -1
- package/types/forgeroute-ui-action-bar.d.ts +74 -0
- package/types/forgeroute-ui-address-input.d.ts +354 -0
- package/types/forgeroute-ui-alert.d.ts +89 -0
- package/types/forgeroute-ui-avatar.d.ts +85 -0
- package/types/forgeroute-ui-badge.d.ts +45 -0
- package/types/forgeroute-ui-bar-row.d.ts +90 -0
- package/types/forgeroute-ui-boards.d.ts +575 -0
- package/types/forgeroute-ui-bulk-eligible.d.ts +53 -0
- package/types/forgeroute-ui-business-hours.d.ts +191 -0
- package/types/forgeroute-ui-calendar.d.ts +544 -0
- package/types/forgeroute-ui-card-list-item.d.ts +186 -0
- package/types/forgeroute-ui-charts.d.ts +1 -1
- package/types/forgeroute-ui-checkbox.d.ts +270 -0
- package/types/forgeroute-ui-chip.d.ts +125 -0
- package/types/forgeroute-ui-color-input.d.ts +160 -0
- package/types/forgeroute-ui-column-filter.d.ts +130 -0
- package/types/forgeroute-ui-columns.d.ts +150 -0
- package/types/forgeroute-ui-combobox.d.ts +252 -0
- package/types/forgeroute-ui-confirm.d.ts +34 -0
- package/types/forgeroute-ui-contact-picker.d.ts +173 -0
- package/types/forgeroute-ui-conversations.d.ts +993 -0
- package/types/forgeroute-ui-copy-field.d.ts +122 -0
- package/types/forgeroute-ui-data-table-core.d.ts +1221 -0
- package/types/forgeroute-ui-date-input.d.ts +101 -0
- package/types/forgeroute-ui-date-range-picker.d.ts +109 -0
- package/types/forgeroute-ui-datetime-input.d.ts +97 -0
- package/types/forgeroute-ui-detail-card.d.ts +252 -0
- package/types/forgeroute-ui-discount-selector.d.ts +57 -0
- package/types/forgeroute-ui-divider.d.ts +40 -0
- package/types/forgeroute-ui-dropdown.d.ts +156 -0
- package/types/forgeroute-ui-editor.d.ts +873 -0
- package/types/forgeroute-ui-empty-state.d.ts +29 -0
- package/types/forgeroute-ui-error-state.d.ts +38 -0
- package/types/forgeroute-ui-error.d.ts +29 -0
- package/types/forgeroute-ui-fade.d.ts +39 -0
- package/types/forgeroute-ui-file-input.d.ts +337 -0
- package/types/forgeroute-ui-fixed-footer.d.ts +53 -0
- package/types/forgeroute-ui-form-row.d.ts +30 -0
- package/types/forgeroute-ui-form-section.d.ts +18 -0
- package/types/forgeroute-ui-form.d.ts +68 -0
- package/types/forgeroute-ui-hint.d.ts +10 -0
- package/types/forgeroute-ui-icon-picker.d.ts +122 -0
- package/types/forgeroute-ui-icon.d.ts +95 -0
- package/types/forgeroute-ui-image-preview.d.ts +88 -0
- package/types/forgeroute-ui-keypad.d.ts +73 -0
- package/types/forgeroute-ui-kpi-card.d.ts +161 -0
- package/types/forgeroute-ui-language-switcher.d.ts +41 -0
- package/types/forgeroute-ui-layout.d.ts +13 -0
- package/types/forgeroute-ui-list-item.d.ts +253 -0
- package/types/forgeroute-ui-list.d.ts +282 -0
- package/types/forgeroute-ui-live-region.d.ts +49 -0
- package/types/forgeroute-ui-map.d.ts +1 -1
- package/types/forgeroute-ui-maps.d.ts +1 -1
- package/types/forgeroute-ui-media.d.ts +1221 -0
- package/types/forgeroute-ui-messaging.d.ts +11 -6
- package/types/forgeroute-ui-more-menu.d.ts +91 -0
- package/types/forgeroute-ui-multi-select.d.ts +119 -0
- package/types/forgeroute-ui-notes.d.ts +172 -0
- package/types/forgeroute-ui-notification-bell.d.ts +135 -0
- package/types/forgeroute-ui-offline-banner.d.ts +44 -0
- package/types/forgeroute-ui-option-card.d.ts +106 -0
- package/types/forgeroute-ui-page.d.ts +115 -0
- package/types/forgeroute-ui-pagination.d.ts +55 -0
- package/types/forgeroute-ui-panel-info-list.d.ts +147 -0
- package/types/forgeroute-ui-password-requirements.d.ts +89 -0
- package/types/forgeroute-ui-payments.d.ts +1818 -0
- package/types/forgeroute-ui-pdf.d.ts +1 -1
- package/types/forgeroute-ui-phone-number-picker.d.ts +199 -0
- package/types/forgeroute-ui-pill-tabs.d.ts +208 -0
- package/types/forgeroute-ui-print.d.ts +40 -0
- package/types/forgeroute-ui-progress-bar.d.ts +88 -0
- package/types/forgeroute-ui-progress-ring.d.ts +102 -0
- package/types/forgeroute-ui-quick-filter-tabs.d.ts +51 -0
- package/types/forgeroute-ui-quickbooks.d.ts +6 -3
- package/types/forgeroute-ui-radio-matrix.d.ts +131 -0
- package/types/forgeroute-ui-radio.d.ts +311 -0
- package/types/forgeroute-ui-read-only-mode.d.ts +26 -0
- package/types/forgeroute-ui-readonly-fieldset.d.ts +62 -0
- package/types/forgeroute-ui-reminder-alerts.d.ts +71 -0
- package/types/forgeroute-ui-search-input.d.ts +93 -0
- package/types/forgeroute-ui-section-header.d.ts +149 -0
- package/types/forgeroute-ui-select.d.ts +183 -0
- package/types/forgeroute-ui-setup.d.ts +775 -0
- package/types/forgeroute-ui-share-menu.d.ts +99 -0
- package/types/forgeroute-ui-shell.d.ts +173 -0
- package/types/forgeroute-ui-show.d.ts +40 -0
- package/types/forgeroute-ui-sidebar-layout.d.ts +161 -0
- package/types/forgeroute-ui-skeleton.d.ts +51 -0
- package/types/forgeroute-ui-skip-link.d.ts +51 -0
- package/types/forgeroute-ui-snackbar.d.ts +50 -0
- package/types/forgeroute-ui-square.d.ts +5 -3
- package/types/forgeroute-ui-stack.d.ts +99 -0
- package/types/forgeroute-ui-stacked-bar.d.ts +84 -0
- package/types/forgeroute-ui-stacking-plan.d.ts +116 -0
- package/types/forgeroute-ui-star-rating.d.ts +151 -0
- package/types/forgeroute-ui-star.d.ts +46 -0
- package/types/forgeroute-ui-stepper.d.ts +273 -0
- package/types/forgeroute-ui-stripe.d.ts +4 -2
- package/types/forgeroute-ui-swatch-picker.d.ts +118 -0
- package/types/forgeroute-ui-table-toolbar.d.ts +116 -0
- package/types/forgeroute-ui-table-types.d.ts +624 -0
- package/types/forgeroute-ui-text-input.d.ts +359 -0
- package/types/forgeroute-ui-text-template-picker.d.ts +100 -0
- package/types/forgeroute-ui-text.d.ts +76 -0
- package/types/forgeroute-ui-textarea-input.d.ts +174 -0
- package/types/forgeroute-ui-time-input.d.ts +105 -0
- package/types/forgeroute-ui-timeline.d.ts +196 -0
- package/types/forgeroute-ui-toast.d.ts +131 -0
- package/types/forgeroute-ui-toggle-badge.d.ts +64 -0
- package/types/forgeroute-ui-toggle.d.ts +92 -0
- package/types/forgeroute-ui-tooltip.d.ts +36 -0
- package/types/forgeroute-ui-utils.d.ts +210 -0
- package/types/forgeroute-ui.d.ts +106 -19539
- package/fesm2022/forgeroute-ui.mjs.map +0 -1
|
@@ -0,0 +1,865 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, afterNextRender, computed, effect, inject, input, output, signal } from "@angular/core";
|
|
3
|
+
import { HttpClient } from "@angular/common/http";
|
|
4
|
+
import { FORGEROUTE_CONFIG, UiFieldValidity, UiLabelsService, createFieldReveal, requiredIssue } from "@forgeroute/ui/core";
|
|
5
|
+
import { Subject, catchError, debounceTime, of, switchMap } from "rxjs";
|
|
6
|
+
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
7
|
+
import * as i1 from "@angular/forms";
|
|
8
|
+
import { FormsModule } from "@angular/forms";
|
|
9
|
+
import { CheckboxComponent } from "@forgeroute/ui/checkbox";
|
|
10
|
+
let nextPickerId = 0;
|
|
11
|
+
function formatPhone(raw) {
|
|
12
|
+
if (!raw) return "";
|
|
13
|
+
const normalized = raw.startsWith("+1") && raw.replace(/\D/g, "").length === 11 ? raw.slice(2) : raw;
|
|
14
|
+
if (normalized.startsWith("+")) return normalized;
|
|
15
|
+
const digits = normalized.replace(/\D/g, "");
|
|
16
|
+
const d = digits.startsWith("1") && digits.length === 11 ? digits.slice(1) : digits.slice(0, 10);
|
|
17
|
+
if (d.length <= 3) return d;
|
|
18
|
+
if (d.length <= 6) return `(${d.slice(0, 3)}) ${d.slice(3)}`;
|
|
19
|
+
return `(${d.slice(0, 3)}) ${d.slice(3, 6)}-${d.slice(6)}`;
|
|
20
|
+
}
|
|
21
|
+
var ContactPickerComponent = class ContactPickerComponent {
|
|
22
|
+
optionId(i) {
|
|
23
|
+
return `${this.uid}-opt-${i}`;
|
|
24
|
+
}
|
|
25
|
+
constructor() {
|
|
26
|
+
this.labels = inject(UiLabelsService);
|
|
27
|
+
this.formatPhone = formatPhone;
|
|
28
|
+
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
29
|
+
this.placeholderInput = input(null, {
|
|
30
|
+
...ngDevMode ? { debugName: "placeholderInput" } : /* istanbul ignore next */ {},
|
|
31
|
+
alias: "placeholder"
|
|
32
|
+
});
|
|
33
|
+
this.placeholder = computed(() => this.placeholderInput() ?? this.labels.t("contactPicker.placeholder"), ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
34
|
+
this.hint = input("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
35
|
+
this.required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
36
|
+
this.errorId = input("", ...ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []);
|
|
37
|
+
this.invalid = input(false, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
38
|
+
this.showErrors = input(false, ...ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []);
|
|
39
|
+
this.showDetails = input(true, ...ngDevMode ? [{ debugName: "showDetails" }] : /* istanbul ignore next */ []);
|
|
40
|
+
this.isMultiSelect = input(false, ...ngDevMode ? [{ debugName: "isMultiSelect" }] : /* istanbul ignore next */ []);
|
|
41
|
+
this.showChips = input(true, ...ngDevMode ? [{ debugName: "showChips" }] : /* istanbul ignore next */ []);
|
|
42
|
+
this.initialContact = input(null, ...ngDevMode ? [{ debugName: "initialContact" }] : /* istanbul ignore next */ []);
|
|
43
|
+
this.contactSelected = output();
|
|
44
|
+
this.contactsSelected = output();
|
|
45
|
+
this.invalidChange = output();
|
|
46
|
+
this.http = inject(HttpClient);
|
|
47
|
+
this.apiBase = inject(FORGEROUTE_CONFIG, { optional: true })?.baseUrl ?? "/api";
|
|
48
|
+
this.destroyRef = inject(DestroyRef);
|
|
49
|
+
this.search$ = new Subject();
|
|
50
|
+
this.uid = `ui-contact-picker-${nextPickerId++}`;
|
|
51
|
+
this.inputId = `${this.uid}-input`;
|
|
52
|
+
this.labelId = `${this.uid}-label`;
|
|
53
|
+
this.hintId = `${this.uid}-hint`;
|
|
54
|
+
this.listboxId = `${this.uid}-listbox`;
|
|
55
|
+
this.query = "";
|
|
56
|
+
this.results = signal([], ...ngDevMode ? [{ debugName: "results" }] : /* istanbul ignore next */ []);
|
|
57
|
+
this.loading = signal(false, ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
|
|
58
|
+
this.selected = signal(null, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
59
|
+
this.selectedMultiple = signal([], ...ngDevMode ? [{ debugName: "selectedMultiple" }] : /* istanbul ignore next */ []);
|
|
60
|
+
this.showResults = signal(false, ...ngDevMode ? [{ debugName: "showResults" }] : /* istanbul ignore next */ []);
|
|
61
|
+
this.pending = signal(false, ...ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []);
|
|
62
|
+
this.activeIndex = signal(-1, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
63
|
+
this.reveal = createFieldReveal(this.showErrors);
|
|
64
|
+
this.requiredEmpty = computed(() => this.required() && (this.isMultiSelect() ? this.selectedMultiple().length === 0 : !this.selected()), ...ngDevMode ? [{ debugName: "requiredEmpty" }] : /* istanbul ignore next */ []);
|
|
65
|
+
this.fieldInvalid = computed(() => this.invalid() || this.requiredEmpty(), ...ngDevMode ? [{ debugName: "fieldInvalid" }] : /* istanbul ignore next */ []);
|
|
66
|
+
this.errorMessage = computed(() => this.requiredEmpty() ? requiredIssue(this.label()).message : "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
67
|
+
this.visibleErrorMessage = computed(() => this.reveal.revealed() ? this.errorMessage() : "", ...ngDevMode ? [{ debugName: "visibleErrorMessage" }] : /* istanbul ignore next */ []);
|
|
68
|
+
this.ariaInvalid = computed(() => this.reveal.revealed() && (this.invalid() || this.requiredEmpty()), ...ngDevMode ? [{ debugName: "ariaInvalid" }] : /* istanbul ignore next */ []);
|
|
69
|
+
this.showHint = computed(() => this.isMultiSelect() || !this.selected(), ...ngDevMode ? [{ debugName: "showHint" }] : /* istanbul ignore next */ []);
|
|
70
|
+
this.describedBy = computed(() => {
|
|
71
|
+
const ids = [this.hint() && this.showHint() ? this.hintId : "", this.errorId()].filter(Boolean);
|
|
72
|
+
return ids.length ? ids.join(" ") : null;
|
|
73
|
+
}, ...ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []);
|
|
74
|
+
this.options = computed(() => this.isMultiSelect() ? this.results().filter((c) => !this.isSelected(c)) : this.results(), ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
75
|
+
this.inputFocusable = computed(() => this.isMultiSelect() || !this.selected(), ...ngDevMode ? [{ debugName: "inputFocusable" }] : /* istanbul ignore next */ []);
|
|
76
|
+
this.activeDescendant = computed(() => {
|
|
77
|
+
const i = this.activeIndex();
|
|
78
|
+
return this.showResults() && i >= 0 && i < this.options().length ? this.optionId(i) : null;
|
|
79
|
+
}, ...ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []);
|
|
80
|
+
this.liveText = computed(() => {
|
|
81
|
+
if (!this.showResults()) return "";
|
|
82
|
+
if (this.loading() || this.pending()) return this.labels.t("search.searching");
|
|
83
|
+
const n = this.options().length;
|
|
84
|
+
if (n === 0) return this.query.length >= 2 ? this.labels.t("contactPicker.noResults") : "";
|
|
85
|
+
return this.labels.t(n === 1 ? "contactPicker.resultCount_one" : "contactPicker.resultCount_other", { count: n });
|
|
86
|
+
}, ...ngDevMode ? [{ debugName: "liveText" }] : /* istanbul ignore next */ []);
|
|
87
|
+
this.blurTimer = null;
|
|
88
|
+
this.lastMouseActivation = 0;
|
|
89
|
+
this.host = inject(ElementRef);
|
|
90
|
+
this.injector = inject(Injector);
|
|
91
|
+
this.fallbackName = computed(() => this.placeholder() || this.labels.t("contactPicker.searchContacts"), ...ngDevMode ? [{ debugName: "fallbackName" }] : /* istanbul ignore next */ []);
|
|
92
|
+
this.destroyRef.onDestroy(() => this.clearBlurTimer());
|
|
93
|
+
effect(() => {
|
|
94
|
+
this.invalidChange.emit(this.fieldInvalid());
|
|
95
|
+
});
|
|
96
|
+
effect(() => {
|
|
97
|
+
this.selected.set(this.initialContact());
|
|
98
|
+
});
|
|
99
|
+
this.search$.pipe(debounceTime(250), switchMap((q) => {
|
|
100
|
+
if (q.length < 2) {
|
|
101
|
+
this.results.set([]);
|
|
102
|
+
this.loading.set(false);
|
|
103
|
+
this.pending.set(false);
|
|
104
|
+
return of([]);
|
|
105
|
+
}
|
|
106
|
+
this.loading.set(true);
|
|
107
|
+
return this.http.get(`${this.apiBase}/contacts/lookup`, { params: { search: q } }).pipe(catchError(() => of([])));
|
|
108
|
+
}), takeUntilDestroyed(this.destroyRef)).subscribe((results) => {
|
|
109
|
+
this.results.set(results);
|
|
110
|
+
this.activeIndex.set(-1);
|
|
111
|
+
this.loading.set(false);
|
|
112
|
+
this.pending.set(false);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
onInput() {
|
|
116
|
+
this.clearBlurTimer();
|
|
117
|
+
this.activeIndex.set(-1);
|
|
118
|
+
this.pending.set(this.query.length >= 2);
|
|
119
|
+
this.search$.next(this.query);
|
|
120
|
+
this.showResults.set(this.query.length >= 2);
|
|
121
|
+
}
|
|
122
|
+
onFocus() {
|
|
123
|
+
this.clearBlurTimer();
|
|
124
|
+
if (this.query.length >= 2) this.showResults.set(true);
|
|
125
|
+
}
|
|
126
|
+
onSelectedFocusOut() {
|
|
127
|
+
this.reveal.touched.set(true);
|
|
128
|
+
}
|
|
129
|
+
onBlur() {
|
|
130
|
+
this.reveal.touched.set(true);
|
|
131
|
+
this.clearBlurTimer();
|
|
132
|
+
this.blurTimer = setTimeout(() => {
|
|
133
|
+
this.blurTimer = null;
|
|
134
|
+
this.showResults.set(false);
|
|
135
|
+
this.activeIndex.set(-1);
|
|
136
|
+
}, 200);
|
|
137
|
+
}
|
|
138
|
+
clearBlurTimer() {
|
|
139
|
+
if (this.blurTimer !== null) {
|
|
140
|
+
clearTimeout(this.blurTimer);
|
|
141
|
+
this.blurTimer = null;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
onKeydown(event) {
|
|
145
|
+
this.clearBlurTimer();
|
|
146
|
+
const n = this.options().length;
|
|
147
|
+
const open = this.showResults();
|
|
148
|
+
switch (event.key) {
|
|
149
|
+
case "ArrowDown":
|
|
150
|
+
case "ArrowUp": {
|
|
151
|
+
if (!open) {
|
|
152
|
+
if (this.query.length < 2) return;
|
|
153
|
+
this.showResults.set(true);
|
|
154
|
+
event.preventDefault();
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
event.preventDefault();
|
|
158
|
+
if (n === 0) return;
|
|
159
|
+
const cur = this.activeIndex();
|
|
160
|
+
const next = event.key === "ArrowDown" ? (cur + 1) % n : cur <= 0 ? n - 1 : cur - 1;
|
|
161
|
+
this.activeIndex.set(next);
|
|
162
|
+
this.scrollActiveIntoView(next);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
case "Home":
|
|
166
|
+
case "End":
|
|
167
|
+
if (!open || n === 0) return;
|
|
168
|
+
event.preventDefault();
|
|
169
|
+
this.activeIndex.set(event.key === "Home" ? 0 : n - 1);
|
|
170
|
+
this.scrollActiveIntoView(this.activeIndex());
|
|
171
|
+
return;
|
|
172
|
+
case "Enter": {
|
|
173
|
+
const i = this.activeIndex();
|
|
174
|
+
if (!open || i < 0 || i >= n) return;
|
|
175
|
+
event.preventDefault();
|
|
176
|
+
const c = this.options()[i];
|
|
177
|
+
if (this.isMultiSelect()) this.toggleContact(c);
|
|
178
|
+
else this.selectContact(c);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
case "Escape":
|
|
182
|
+
if (!open) return;
|
|
183
|
+
event.preventDefault();
|
|
184
|
+
event.stopPropagation();
|
|
185
|
+
this.showResults.set(false);
|
|
186
|
+
this.activeIndex.set(-1);
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
scrollActiveIntoView(i) {
|
|
191
|
+
this.host.nativeElement.querySelector(`#${this.optionId(i)}`)?.scrollIntoView?.({ block: "nearest" });
|
|
192
|
+
}
|
|
193
|
+
onOptionMouseDown() {
|
|
194
|
+
this.lastMouseActivation = Date.now();
|
|
195
|
+
}
|
|
196
|
+
onOptionClick(event, c) {
|
|
197
|
+
if (Date.now() - this.lastMouseActivation < 500) return;
|
|
198
|
+
if (this.isMultiSelect()) this.toggleContact(c);
|
|
199
|
+
else this.selectContact(c);
|
|
200
|
+
}
|
|
201
|
+
selectContact(c) {
|
|
202
|
+
const hadFocus = this.host.nativeElement.contains(document.activeElement);
|
|
203
|
+
this.selected.set(c);
|
|
204
|
+
this.query = "";
|
|
205
|
+
this.pending.set(false);
|
|
206
|
+
this.showResults.set(false);
|
|
207
|
+
this.activeIndex.set(-1);
|
|
208
|
+
this.contactSelected.emit(c);
|
|
209
|
+
if (hadFocus) this.focusAfterRender(".selected-input");
|
|
210
|
+
}
|
|
211
|
+
clear() {
|
|
212
|
+
this.selected.set(null);
|
|
213
|
+
this.query = "";
|
|
214
|
+
this.results.set([]);
|
|
215
|
+
this.pending.set(false);
|
|
216
|
+
this.showResults.set(false);
|
|
217
|
+
this.contactSelected.emit(null);
|
|
218
|
+
this.focusAfterRender(".picker-input");
|
|
219
|
+
}
|
|
220
|
+
focusAfterRender(selector) {
|
|
221
|
+
afterNextRender(() => this.host.nativeElement.querySelector(selector)?.focus(), { injector: this.injector });
|
|
222
|
+
}
|
|
223
|
+
isSelected(c) {
|
|
224
|
+
return this.selectedMultiple().some((s) => s.id === c.id);
|
|
225
|
+
}
|
|
226
|
+
toggleContact(c) {
|
|
227
|
+
const current = this.selectedMultiple();
|
|
228
|
+
const next = this.isSelected(c) ? current.filter((s) => s.id !== c.id) : [...current, c];
|
|
229
|
+
this.selectedMultiple.set(next);
|
|
230
|
+
this.activeIndex.set(-1);
|
|
231
|
+
this.contactsSelected.emit(next);
|
|
232
|
+
}
|
|
233
|
+
removeContact(c) {
|
|
234
|
+
this.selectedMultiple.set(this.selectedMultiple().filter((s) => s.id !== c.id));
|
|
235
|
+
this.activeIndex.set(-1);
|
|
236
|
+
this.contactsSelected.emit(this.selectedMultiple());
|
|
237
|
+
}
|
|
238
|
+
onChipMouseDown(c) {
|
|
239
|
+
this.lastMouseActivation = Date.now();
|
|
240
|
+
this.removeContact(c);
|
|
241
|
+
}
|
|
242
|
+
onChipClick(c) {
|
|
243
|
+
if (Date.now() - this.lastMouseActivation < 500) return;
|
|
244
|
+
this.removeContact(c);
|
|
245
|
+
this.focusAfterRender(".picker-input");
|
|
246
|
+
}
|
|
247
|
+
static {
|
|
248
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
249
|
+
minVersion: "12.0.0",
|
|
250
|
+
version: "22.2.2",
|
|
251
|
+
ngImport: i0,
|
|
252
|
+
type: ContactPickerComponent,
|
|
253
|
+
deps: [],
|
|
254
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
static {
|
|
258
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
259
|
+
minVersion: "17.0.0",
|
|
260
|
+
version: "22.2.2",
|
|
261
|
+
type: ContactPickerComponent,
|
|
262
|
+
isStandalone: true,
|
|
263
|
+
selector: "ui-contact-picker",
|
|
264
|
+
inputs: {
|
|
265
|
+
label: {
|
|
266
|
+
classPropertyName: "label",
|
|
267
|
+
publicName: "label",
|
|
268
|
+
isSignal: true,
|
|
269
|
+
isRequired: false,
|
|
270
|
+
transformFunction: null
|
|
271
|
+
},
|
|
272
|
+
placeholderInput: {
|
|
273
|
+
classPropertyName: "placeholderInput",
|
|
274
|
+
publicName: "placeholder",
|
|
275
|
+
isSignal: true,
|
|
276
|
+
isRequired: false,
|
|
277
|
+
transformFunction: null
|
|
278
|
+
},
|
|
279
|
+
hint: {
|
|
280
|
+
classPropertyName: "hint",
|
|
281
|
+
publicName: "hint",
|
|
282
|
+
isSignal: true,
|
|
283
|
+
isRequired: false,
|
|
284
|
+
transformFunction: null
|
|
285
|
+
},
|
|
286
|
+
required: {
|
|
287
|
+
classPropertyName: "required",
|
|
288
|
+
publicName: "required",
|
|
289
|
+
isSignal: true,
|
|
290
|
+
isRequired: false,
|
|
291
|
+
transformFunction: null
|
|
292
|
+
},
|
|
293
|
+
errorId: {
|
|
294
|
+
classPropertyName: "errorId",
|
|
295
|
+
publicName: "errorId",
|
|
296
|
+
isSignal: true,
|
|
297
|
+
isRequired: false,
|
|
298
|
+
transformFunction: null
|
|
299
|
+
},
|
|
300
|
+
invalid: {
|
|
301
|
+
classPropertyName: "invalid",
|
|
302
|
+
publicName: "invalid",
|
|
303
|
+
isSignal: true,
|
|
304
|
+
isRequired: false,
|
|
305
|
+
transformFunction: null
|
|
306
|
+
},
|
|
307
|
+
showErrors: {
|
|
308
|
+
classPropertyName: "showErrors",
|
|
309
|
+
publicName: "showErrors",
|
|
310
|
+
isSignal: true,
|
|
311
|
+
isRequired: false,
|
|
312
|
+
transformFunction: null
|
|
313
|
+
},
|
|
314
|
+
showDetails: {
|
|
315
|
+
classPropertyName: "showDetails",
|
|
316
|
+
publicName: "showDetails",
|
|
317
|
+
isSignal: true,
|
|
318
|
+
isRequired: false,
|
|
319
|
+
transformFunction: null
|
|
320
|
+
},
|
|
321
|
+
isMultiSelect: {
|
|
322
|
+
classPropertyName: "isMultiSelect",
|
|
323
|
+
publicName: "isMultiSelect",
|
|
324
|
+
isSignal: true,
|
|
325
|
+
isRequired: false,
|
|
326
|
+
transformFunction: null
|
|
327
|
+
},
|
|
328
|
+
showChips: {
|
|
329
|
+
classPropertyName: "showChips",
|
|
330
|
+
publicName: "showChips",
|
|
331
|
+
isSignal: true,
|
|
332
|
+
isRequired: false,
|
|
333
|
+
transformFunction: null
|
|
334
|
+
},
|
|
335
|
+
initialContact: {
|
|
336
|
+
classPropertyName: "initialContact",
|
|
337
|
+
publicName: "initialContact",
|
|
338
|
+
isSignal: true,
|
|
339
|
+
isRequired: false,
|
|
340
|
+
transformFunction: null
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
outputs: {
|
|
344
|
+
contactSelected: "contactSelected",
|
|
345
|
+
contactsSelected: "contactsSelected",
|
|
346
|
+
invalidChange: "invalidChange"
|
|
347
|
+
},
|
|
348
|
+
providers: [{
|
|
349
|
+
provide: UiFieldValidity,
|
|
350
|
+
useFactory: () => {
|
|
351
|
+
const c = inject(ContactPickerComponent);
|
|
352
|
+
return {
|
|
353
|
+
invalid: c.fieldInvalid,
|
|
354
|
+
errorMessage: c.errorMessage
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
}],
|
|
358
|
+
ngImport: i0,
|
|
359
|
+
template: `
|
|
360
|
+
<div class="picker-wrapper">
|
|
361
|
+
@if (label()) {
|
|
362
|
+
<label class="picker-label" [id]="labelId" [attr.for]="inputFocusable() ? inputId : null">{{ label() }}@if (required()) {<span class="picker-req"> *</span>}</label>
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
<!-- ── Multi-select mode ── -->
|
|
366
|
+
@if (isMultiSelect()) {
|
|
367
|
+
@if (showChips() && selectedMultiple().length > 0) {
|
|
368
|
+
<div class="multi-chips">
|
|
369
|
+
@for (c of selectedMultiple(); track c.id) {
|
|
370
|
+
<span class="multi-chip">
|
|
371
|
+
{{ c.name }}
|
|
372
|
+
<button type="button" class="chip-remove" (mousedown)="onChipMouseDown(c)" (click)="onChipClick(c)" [attr.aria-label]="labels.t('common.removeNamed', { name: c.name })">×</button>
|
|
373
|
+
</span>
|
|
374
|
+
}
|
|
375
|
+
</div>
|
|
376
|
+
}
|
|
377
|
+
<input
|
|
378
|
+
class="picker-input"
|
|
379
|
+
type="text"
|
|
380
|
+
[id]="inputId"
|
|
381
|
+
[placeholder]="placeholder()"
|
|
382
|
+
[attr.aria-describedby]="describedBy()"
|
|
383
|
+
[attr.aria-invalid]="ariaInvalid() ? 'true' : null"
|
|
384
|
+
[attr.aria-required]="required() || null"
|
|
385
|
+
[attr.aria-label]="label() ? null : fallbackName()"
|
|
386
|
+
role="combobox"
|
|
387
|
+
aria-autocomplete="list"
|
|
388
|
+
aria-haspopup="listbox"
|
|
389
|
+
[attr.aria-expanded]="showResults()"
|
|
390
|
+
[attr.aria-controls]="showResults() ? listboxId : null"
|
|
391
|
+
[attr.aria-activedescendant]="activeDescendant()"
|
|
392
|
+
[(ngModel)]="query"
|
|
393
|
+
autocomplete="off"
|
|
394
|
+
(input)="onInput()"
|
|
395
|
+
(focus)="onFocus()"
|
|
396
|
+
(blur)="onBlur()"
|
|
397
|
+
(keydown)="onKeydown($event)"
|
|
398
|
+
/>
|
|
399
|
+
@if (showResults()) {
|
|
400
|
+
<div class="picker-dropdown" role="listbox" [id]="listboxId" aria-multiselectable="true"
|
|
401
|
+
[attr.aria-labelledby]="label() ? labelId : null" [attr.aria-label]="label() ? null : fallbackName()"
|
|
402
|
+
(mousedown)="$event.preventDefault()">
|
|
403
|
+
@if (loading() || (pending() && results().length === 0)) {
|
|
404
|
+
<div class="picker-loading">{{ labels.t('contactPicker.searching') }}</div>
|
|
405
|
+
} @else if (results().length === 0 && query.length >= 2) {
|
|
406
|
+
<div class="picker-empty">{{ labels.t('contactPicker.noContactsFound') }}</div>
|
|
407
|
+
} @else {
|
|
408
|
+
@for (c of options(); track c.id; let i = $index) {
|
|
409
|
+
<div class="picker-option picker-option--check" role="option"
|
|
410
|
+
[id]="optionId(i)" [class.picker-option--active]="i === activeIndex()"
|
|
411
|
+
[attr.aria-selected]="i === activeIndex()"
|
|
412
|
+
(mousedown)="onOptionMouseDown(); toggleContact(c)"
|
|
413
|
+
(click)="onOptionClick($event, c)">
|
|
414
|
+
<!-- Presentational: the listbox is the only interaction surface (no nested tab stop). -->
|
|
415
|
+
<span class="option-check" aria-hidden="true" inert>
|
|
416
|
+
<ui-checkbox [checked]="isSelected(c)" />
|
|
417
|
+
</span>
|
|
418
|
+
<span class="option-body">
|
|
419
|
+
<span class="option-name">{{ c.name }}</span>
|
|
420
|
+
@if (c.email || c.phone) {
|
|
421
|
+
<span class="option-detail">{{ c.email || c.phone }}</span>
|
|
422
|
+
}
|
|
423
|
+
</span>
|
|
424
|
+
</div>
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
</div>
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
<!-- ── Single-select mode ── -->
|
|
431
|
+
} @else {
|
|
432
|
+
@if (selected()) {
|
|
433
|
+
<div class="selected-input" role="group" tabindex="-1" (focusout)="onSelectedFocusOut()" [attr.aria-labelledby]="label() ? labelId : null"
|
|
434
|
+
[attr.aria-describedby]="describedBy()" [attr.aria-invalid]="ariaInvalid() ? 'true' : null">
|
|
435
|
+
<span>{{ selected()!.name }}</span>
|
|
436
|
+
<button type="button" class="clear-btn" (click)="clear()" [attr.aria-label]="labels.t('contactPicker.clearSelection')">×</button>
|
|
437
|
+
</div>
|
|
438
|
+
@if (showDetails()) {
|
|
439
|
+
<div class="recipient-details">
|
|
440
|
+
<span class="details-label">{{ labels.t('contactPicker.recipientDetails') }}</span>
|
|
441
|
+
<div class="details-card">
|
|
442
|
+
<div class="detail-row">
|
|
443
|
+
<span class="detail-key">{{ labels.t('common.name') }}</span>
|
|
444
|
+
<span class="detail-val">{{ selected()!.name }}</span>
|
|
445
|
+
</div>
|
|
446
|
+
<div class="detail-row">
|
|
447
|
+
<span class="detail-key">{{ labels.t('common.email') }}</span>
|
|
448
|
+
<span class="detail-val">{{ selected()!.email || '—' }}</span>
|
|
449
|
+
</div>
|
|
450
|
+
<div class="detail-row last">
|
|
451
|
+
<span class="detail-key">{{ labels.t('common.phone') }}</span>
|
|
452
|
+
<span class="detail-val">{{ formatPhone(selected()!.phone) || '—' }}</span>
|
|
453
|
+
</div>
|
|
454
|
+
</div>
|
|
455
|
+
</div>
|
|
456
|
+
}
|
|
457
|
+
} @else {
|
|
458
|
+
<input
|
|
459
|
+
class="picker-input"
|
|
460
|
+
type="text"
|
|
461
|
+
[id]="inputId"
|
|
462
|
+
[placeholder]="placeholder()"
|
|
463
|
+
[attr.aria-describedby]="describedBy()"
|
|
464
|
+
[attr.aria-invalid]="ariaInvalid() ? 'true' : null"
|
|
465
|
+
[attr.aria-required]="required() || null"
|
|
466
|
+
[attr.aria-label]="label() ? null : fallbackName()"
|
|
467
|
+
role="combobox"
|
|
468
|
+
aria-autocomplete="list"
|
|
469
|
+
aria-haspopup="listbox"
|
|
470
|
+
[attr.aria-expanded]="showResults()"
|
|
471
|
+
[attr.aria-controls]="showResults() ? listboxId : null"
|
|
472
|
+
[attr.aria-activedescendant]="activeDescendant()"
|
|
473
|
+
[(ngModel)]="query"
|
|
474
|
+
autocomplete="off"
|
|
475
|
+
(input)="onInput()"
|
|
476
|
+
(focus)="onFocus()"
|
|
477
|
+
(blur)="onBlur()"
|
|
478
|
+
(keydown)="onKeydown($event)"
|
|
479
|
+
/>
|
|
480
|
+
@if (showResults()) {
|
|
481
|
+
<div class="picker-dropdown" role="listbox" [id]="listboxId"
|
|
482
|
+
[attr.aria-labelledby]="label() ? labelId : null" [attr.aria-label]="label() ? null : fallbackName()"
|
|
483
|
+
(mousedown)="$event.preventDefault()">
|
|
484
|
+
@if (loading() || (pending() && results().length === 0)) {
|
|
485
|
+
<div class="picker-loading">{{ labels.t('contactPicker.searching') }}</div>
|
|
486
|
+
} @else if (results().length === 0 && query.length >= 2) {
|
|
487
|
+
<div class="picker-empty">{{ labels.t('contactPicker.noContactsFound') }}</div>
|
|
488
|
+
} @else {
|
|
489
|
+
@for (c of results(); track c.id; let i = $index) {
|
|
490
|
+
<button type="button" class="picker-option" role="option" tabindex="-1"
|
|
491
|
+
[id]="optionId(i)" [class.picker-option--active]="i === activeIndex()"
|
|
492
|
+
[attr.aria-selected]="i === activeIndex()"
|
|
493
|
+
(mousedown)="onOptionMouseDown(); selectContact(c)"
|
|
494
|
+
(click)="onOptionClick($event, c)">
|
|
495
|
+
<span class="option-name">{{ c.name }}</span>
|
|
496
|
+
<span class="option-detail">{{ c.email || c.phone || '' }}</span>
|
|
497
|
+
</button>
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
</div>
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
<!-- Announces the result count to screen readers while the list is open. -->
|
|
506
|
+
<span class="picker-sr" role="status" aria-live="polite" aria-atomic="true">{{ liveText() }}</span>
|
|
507
|
+
|
|
508
|
+
@if (hint() && showHint()) {
|
|
509
|
+
<p class="picker-hint" [id]="hintId">{{ hint() }}</p>
|
|
510
|
+
}
|
|
511
|
+
</div>
|
|
512
|
+
`,
|
|
513
|
+
isInline: true,
|
|
514
|
+
styles: [".picker-wrapper{position:relative;overflow:visible}.picker-label{display:block;font-size:.8125rem;font-weight:600;color:#374151;margin-bottom:6px}.picker-req{color:#dc2626}.picker-hint{margin:6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b}.picker-input{width:100%;padding:9px 12px;border:1px solid #7c8ba1;border-radius:8px;font-size:.875rem;color:#1e293b;font-family:inherit;outline:none;box-sizing:border-box}.picker-input::placeholder{color:#64748b;opacity:1}.picker-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.picker-input:focus-visible{outline:2px solid transparent}@media(max-width:480px){.picker-input{font-size:1rem}}.picker-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.picker-dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:9999;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 6px 16px #0000001a;max-height:240px;overflow-y:auto}@media(pointer:coarse),(max-width:480px){.picker-input{min-height:44px}.picker-dropdown{max-height:min(240px,40vh);overscroll-behavior:contain}.picker-option{min-height:44px;justify-content:center;box-sizing:border-box}.picker-option--check{min-height:44px}.chip-remove{position:relative}.chip-remove:after{content:\"\";position:absolute;inset:-13px}}@media(max-width:480px){:host-context(.m-body) .picker-dropdown{position:static;margin-top:4px;max-height:min(240px,calc(var(--ui-vvh, 100dvh) * .3))}}.picker-option{display:flex;flex-direction:column;gap:2px;width:100%;padding:10px 12px;border:none;background:none;text-align:left;cursor:pointer;font-family:inherit}.picker-option:hover,.picker-option.picker-option--active{background:#f8fafc}.picker-option:first-child{border-radius:8px 8px 0 0}.picker-option:last-child{border-radius:0 0 8px 8px}.picker-option--check{flex-direction:row;align-items:center;gap:10px}.picker-option--check .option-body{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}.picker-option--check .option-name,.picker-option--check .option-detail{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.option-check{display:flex;pointer-events:none}.option-name{font-size:.875rem;font-weight:600;color:#1e293b;overflow-wrap:anywhere}.option-detail{font-size:.75rem;color:#94a3b8;overflow-wrap:anywhere}.picker-loading,.picker-empty{padding:12px;font-size:.8125rem;color:#94a3b8;text-align:center}.selected-input{display:flex;align-items:center;justify-content:space-between;padding:9px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;font-size:.875rem;font-weight:600;color:#1e293b;gap:8px;overflow-wrap:anywhere;min-width:0}.selected-input:focus{outline:none}.selected-input:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.clear-btn{width:18px;height:18px;border:none;background:#e2e8f0;border-radius:50%;cursor:pointer;font-size:.75rem;color:#64748b;display:flex;align-items:center;justify-content:center;position:relative;flex-shrink:0}.clear-btn:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.clear-btn:hover{background:#cbd5e1;color:#1e293b}.clear-btn:after{content:\"\";position:absolute;inset:-13px}.recipient-details{margin-top:16px}.details-label{display:block;font-size:.6875rem;font-weight:600;color:#94a3b8;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}.details-card{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden}.detail-row{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;border-bottom:1px solid #f1f5f9}.detail-row.last{border-bottom:none}.detail-row:nth-child(2n){background:#f8fafc}.detail-key{font-size:.8125rem;color:#94a3b8;font-weight:500}.detail-val{font-size:.875rem;color:#1e293b;font-weight:600}.multi-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.multi-chip{display:inline-flex;align-items:center;gap:4px;padding:4px 8px 4px 10px;background:#dbeafe;border-radius:20px;font-size:.8125rem;font-weight:500;color:#1e40af}.chip-remove{width:18px;height:18px;border:none;background:#1e40af26;border-radius:50%;cursor:pointer;font-size:.875rem;line-height:1;color:#1e40af;display:flex;align-items:center;justify-content:center;flex-shrink:0}.chip-remove:hover{background:#1e40af4d}.chip-remove:focus-visible{outline:2px solid #1e40af;outline-offset:2px}@media(forced-colors:active){.picker-input:focus{outline:2px solid Highlight;outline-offset:1px}.picker-option--active{outline:2px solid Highlight;outline-offset:-2px}}\n"],
|
|
515
|
+
dependencies: [
|
|
516
|
+
{
|
|
517
|
+
kind: "ngmodule",
|
|
518
|
+
type: FormsModule
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
kind: "directive",
|
|
522
|
+
type: i1.DefaultValueAccessor,
|
|
523
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
kind: "directive",
|
|
527
|
+
type: i1.NgControlStatus,
|
|
528
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
kind: "directive",
|
|
532
|
+
type: i1.NgModel,
|
|
533
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
534
|
+
inputs: [
|
|
535
|
+
"name",
|
|
536
|
+
"disabled",
|
|
537
|
+
"ngModel",
|
|
538
|
+
"ngModelOptions"
|
|
539
|
+
],
|
|
540
|
+
outputs: ["ngModelChange"],
|
|
541
|
+
exportAs: ["ngModel"]
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
kind: "component",
|
|
545
|
+
type: CheckboxComponent,
|
|
546
|
+
selector: "ui-checkbox, ui-checkbox-group",
|
|
547
|
+
inputs: [
|
|
548
|
+
"label",
|
|
549
|
+
"ariaLabel",
|
|
550
|
+
"testId",
|
|
551
|
+
"labelTestId",
|
|
552
|
+
"headingLevel",
|
|
553
|
+
"indeterminate",
|
|
554
|
+
"checked",
|
|
555
|
+
"options",
|
|
556
|
+
"legend",
|
|
557
|
+
"orientation",
|
|
558
|
+
"values",
|
|
559
|
+
"labelLinks",
|
|
560
|
+
"description",
|
|
561
|
+
"indent",
|
|
562
|
+
"required",
|
|
563
|
+
"requiredMessage",
|
|
564
|
+
"hint",
|
|
565
|
+
"error",
|
|
566
|
+
"showErrors",
|
|
567
|
+
"disabled"
|
|
568
|
+
],
|
|
569
|
+
outputs: [
|
|
570
|
+
"checkedChange",
|
|
571
|
+
"valuesChange",
|
|
572
|
+
"invalidChange"
|
|
573
|
+
]
|
|
574
|
+
}
|
|
575
|
+
],
|
|
576
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
581
|
+
minVersion: "12.0.0",
|
|
582
|
+
version: "22.2.2",
|
|
583
|
+
ngImport: i0,
|
|
584
|
+
type: ContactPickerComponent,
|
|
585
|
+
decorators: [{
|
|
586
|
+
type: Component,
|
|
587
|
+
args: [{
|
|
588
|
+
selector: "ui-contact-picker",
|
|
589
|
+
standalone: true,
|
|
590
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
591
|
+
imports: [FormsModule, CheckboxComponent],
|
|
592
|
+
providers: [{
|
|
593
|
+
provide: UiFieldValidity,
|
|
594
|
+
useFactory: () => {
|
|
595
|
+
const c = inject(ContactPickerComponent);
|
|
596
|
+
return {
|
|
597
|
+
invalid: c.fieldInvalid,
|
|
598
|
+
errorMessage: c.errorMessage
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
}],
|
|
602
|
+
template: `
|
|
603
|
+
<div class="picker-wrapper">
|
|
604
|
+
@if (label()) {
|
|
605
|
+
<label class="picker-label" [id]="labelId" [attr.for]="inputFocusable() ? inputId : null">{{ label() }}@if (required()) {<span class="picker-req"> *</span>}</label>
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
<!-- ── Multi-select mode ── -->
|
|
609
|
+
@if (isMultiSelect()) {
|
|
610
|
+
@if (showChips() && selectedMultiple().length > 0) {
|
|
611
|
+
<div class="multi-chips">
|
|
612
|
+
@for (c of selectedMultiple(); track c.id) {
|
|
613
|
+
<span class="multi-chip">
|
|
614
|
+
{{ c.name }}
|
|
615
|
+
<button type="button" class="chip-remove" (mousedown)="onChipMouseDown(c)" (click)="onChipClick(c)" [attr.aria-label]="labels.t('common.removeNamed', { name: c.name })">×</button>
|
|
616
|
+
</span>
|
|
617
|
+
}
|
|
618
|
+
</div>
|
|
619
|
+
}
|
|
620
|
+
<input
|
|
621
|
+
class="picker-input"
|
|
622
|
+
type="text"
|
|
623
|
+
[id]="inputId"
|
|
624
|
+
[placeholder]="placeholder()"
|
|
625
|
+
[attr.aria-describedby]="describedBy()"
|
|
626
|
+
[attr.aria-invalid]="ariaInvalid() ? 'true' : null"
|
|
627
|
+
[attr.aria-required]="required() || null"
|
|
628
|
+
[attr.aria-label]="label() ? null : fallbackName()"
|
|
629
|
+
role="combobox"
|
|
630
|
+
aria-autocomplete="list"
|
|
631
|
+
aria-haspopup="listbox"
|
|
632
|
+
[attr.aria-expanded]="showResults()"
|
|
633
|
+
[attr.aria-controls]="showResults() ? listboxId : null"
|
|
634
|
+
[attr.aria-activedescendant]="activeDescendant()"
|
|
635
|
+
[(ngModel)]="query"
|
|
636
|
+
autocomplete="off"
|
|
637
|
+
(input)="onInput()"
|
|
638
|
+
(focus)="onFocus()"
|
|
639
|
+
(blur)="onBlur()"
|
|
640
|
+
(keydown)="onKeydown($event)"
|
|
641
|
+
/>
|
|
642
|
+
@if (showResults()) {
|
|
643
|
+
<div class="picker-dropdown" role="listbox" [id]="listboxId" aria-multiselectable="true"
|
|
644
|
+
[attr.aria-labelledby]="label() ? labelId : null" [attr.aria-label]="label() ? null : fallbackName()"
|
|
645
|
+
(mousedown)="$event.preventDefault()">
|
|
646
|
+
@if (loading() || (pending() && results().length === 0)) {
|
|
647
|
+
<div class="picker-loading">{{ labels.t('contactPicker.searching') }}</div>
|
|
648
|
+
} @else if (results().length === 0 && query.length >= 2) {
|
|
649
|
+
<div class="picker-empty">{{ labels.t('contactPicker.noContactsFound') }}</div>
|
|
650
|
+
} @else {
|
|
651
|
+
@for (c of options(); track c.id; let i = $index) {
|
|
652
|
+
<div class="picker-option picker-option--check" role="option"
|
|
653
|
+
[id]="optionId(i)" [class.picker-option--active]="i === activeIndex()"
|
|
654
|
+
[attr.aria-selected]="i === activeIndex()"
|
|
655
|
+
(mousedown)="onOptionMouseDown(); toggleContact(c)"
|
|
656
|
+
(click)="onOptionClick($event, c)">
|
|
657
|
+
<!-- Presentational: the listbox is the only interaction surface (no nested tab stop). -->
|
|
658
|
+
<span class="option-check" aria-hidden="true" inert>
|
|
659
|
+
<ui-checkbox [checked]="isSelected(c)" />
|
|
660
|
+
</span>
|
|
661
|
+
<span class="option-body">
|
|
662
|
+
<span class="option-name">{{ c.name }}</span>
|
|
663
|
+
@if (c.email || c.phone) {
|
|
664
|
+
<span class="option-detail">{{ c.email || c.phone }}</span>
|
|
665
|
+
}
|
|
666
|
+
</span>
|
|
667
|
+
</div>
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
</div>
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
<!-- ── Single-select mode ── -->
|
|
674
|
+
} @else {
|
|
675
|
+
@if (selected()) {
|
|
676
|
+
<div class="selected-input" role="group" tabindex="-1" (focusout)="onSelectedFocusOut()" [attr.aria-labelledby]="label() ? labelId : null"
|
|
677
|
+
[attr.aria-describedby]="describedBy()" [attr.aria-invalid]="ariaInvalid() ? 'true' : null">
|
|
678
|
+
<span>{{ selected()!.name }}</span>
|
|
679
|
+
<button type="button" class="clear-btn" (click)="clear()" [attr.aria-label]="labels.t('contactPicker.clearSelection')">×</button>
|
|
680
|
+
</div>
|
|
681
|
+
@if (showDetails()) {
|
|
682
|
+
<div class="recipient-details">
|
|
683
|
+
<span class="details-label">{{ labels.t('contactPicker.recipientDetails') }}</span>
|
|
684
|
+
<div class="details-card">
|
|
685
|
+
<div class="detail-row">
|
|
686
|
+
<span class="detail-key">{{ labels.t('common.name') }}</span>
|
|
687
|
+
<span class="detail-val">{{ selected()!.name }}</span>
|
|
688
|
+
</div>
|
|
689
|
+
<div class="detail-row">
|
|
690
|
+
<span class="detail-key">{{ labels.t('common.email') }}</span>
|
|
691
|
+
<span class="detail-val">{{ selected()!.email || '—' }}</span>
|
|
692
|
+
</div>
|
|
693
|
+
<div class="detail-row last">
|
|
694
|
+
<span class="detail-key">{{ labels.t('common.phone') }}</span>
|
|
695
|
+
<span class="detail-val">{{ formatPhone(selected()!.phone) || '—' }}</span>
|
|
696
|
+
</div>
|
|
697
|
+
</div>
|
|
698
|
+
</div>
|
|
699
|
+
}
|
|
700
|
+
} @else {
|
|
701
|
+
<input
|
|
702
|
+
class="picker-input"
|
|
703
|
+
type="text"
|
|
704
|
+
[id]="inputId"
|
|
705
|
+
[placeholder]="placeholder()"
|
|
706
|
+
[attr.aria-describedby]="describedBy()"
|
|
707
|
+
[attr.aria-invalid]="ariaInvalid() ? 'true' : null"
|
|
708
|
+
[attr.aria-required]="required() || null"
|
|
709
|
+
[attr.aria-label]="label() ? null : fallbackName()"
|
|
710
|
+
role="combobox"
|
|
711
|
+
aria-autocomplete="list"
|
|
712
|
+
aria-haspopup="listbox"
|
|
713
|
+
[attr.aria-expanded]="showResults()"
|
|
714
|
+
[attr.aria-controls]="showResults() ? listboxId : null"
|
|
715
|
+
[attr.aria-activedescendant]="activeDescendant()"
|
|
716
|
+
[(ngModel)]="query"
|
|
717
|
+
autocomplete="off"
|
|
718
|
+
(input)="onInput()"
|
|
719
|
+
(focus)="onFocus()"
|
|
720
|
+
(blur)="onBlur()"
|
|
721
|
+
(keydown)="onKeydown($event)"
|
|
722
|
+
/>
|
|
723
|
+
@if (showResults()) {
|
|
724
|
+
<div class="picker-dropdown" role="listbox" [id]="listboxId"
|
|
725
|
+
[attr.aria-labelledby]="label() ? labelId : null" [attr.aria-label]="label() ? null : fallbackName()"
|
|
726
|
+
(mousedown)="$event.preventDefault()">
|
|
727
|
+
@if (loading() || (pending() && results().length === 0)) {
|
|
728
|
+
<div class="picker-loading">{{ labels.t('contactPicker.searching') }}</div>
|
|
729
|
+
} @else if (results().length === 0 && query.length >= 2) {
|
|
730
|
+
<div class="picker-empty">{{ labels.t('contactPicker.noContactsFound') }}</div>
|
|
731
|
+
} @else {
|
|
732
|
+
@for (c of results(); track c.id; let i = $index) {
|
|
733
|
+
<button type="button" class="picker-option" role="option" tabindex="-1"
|
|
734
|
+
[id]="optionId(i)" [class.picker-option--active]="i === activeIndex()"
|
|
735
|
+
[attr.aria-selected]="i === activeIndex()"
|
|
736
|
+
(mousedown)="onOptionMouseDown(); selectContact(c)"
|
|
737
|
+
(click)="onOptionClick($event, c)">
|
|
738
|
+
<span class="option-name">{{ c.name }}</span>
|
|
739
|
+
<span class="option-detail">{{ c.email || c.phone || '' }}</span>
|
|
740
|
+
</button>
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
</div>
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
<!-- Announces the result count to screen readers while the list is open. -->
|
|
749
|
+
<span class="picker-sr" role="status" aria-live="polite" aria-atomic="true">{{ liveText() }}</span>
|
|
750
|
+
|
|
751
|
+
@if (hint() && showHint()) {
|
|
752
|
+
<p class="picker-hint" [id]="hintId">{{ hint() }}</p>
|
|
753
|
+
}
|
|
754
|
+
</div>
|
|
755
|
+
`,
|
|
756
|
+
styles: [".picker-wrapper{position:relative;overflow:visible}.picker-label{display:block;font-size:.8125rem;font-weight:600;color:#374151;margin-bottom:6px}.picker-req{color:#dc2626}.picker-hint{margin:6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b}.picker-input{width:100%;padding:9px 12px;border:1px solid #7c8ba1;border-radius:8px;font-size:.875rem;color:#1e293b;font-family:inherit;outline:none;box-sizing:border-box}.picker-input::placeholder{color:#64748b;opacity:1}.picker-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.picker-input:focus-visible{outline:2px solid transparent}@media(max-width:480px){.picker-input{font-size:1rem}}.picker-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.picker-dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:9999;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 6px 16px #0000001a;max-height:240px;overflow-y:auto}@media(pointer:coarse),(max-width:480px){.picker-input{min-height:44px}.picker-dropdown{max-height:min(240px,40vh);overscroll-behavior:contain}.picker-option{min-height:44px;justify-content:center;box-sizing:border-box}.picker-option--check{min-height:44px}.chip-remove{position:relative}.chip-remove:after{content:\"\";position:absolute;inset:-13px}}@media(max-width:480px){:host-context(.m-body) .picker-dropdown{position:static;margin-top:4px;max-height:min(240px,calc(var(--ui-vvh, 100dvh) * .3))}}.picker-option{display:flex;flex-direction:column;gap:2px;width:100%;padding:10px 12px;border:none;background:none;text-align:left;cursor:pointer;font-family:inherit}.picker-option:hover,.picker-option.picker-option--active{background:#f8fafc}.picker-option:first-child{border-radius:8px 8px 0 0}.picker-option:last-child{border-radius:0 0 8px 8px}.picker-option--check{flex-direction:row;align-items:center;gap:10px}.picker-option--check .option-body{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}.picker-option--check .option-name,.picker-option--check .option-detail{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.option-check{display:flex;pointer-events:none}.option-name{font-size:.875rem;font-weight:600;color:#1e293b;overflow-wrap:anywhere}.option-detail{font-size:.75rem;color:#94a3b8;overflow-wrap:anywhere}.picker-loading,.picker-empty{padding:12px;font-size:.8125rem;color:#94a3b8;text-align:center}.selected-input{display:flex;align-items:center;justify-content:space-between;padding:9px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;font-size:.875rem;font-weight:600;color:#1e293b;gap:8px;overflow-wrap:anywhere;min-width:0}.selected-input:focus{outline:none}.selected-input:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.clear-btn{width:18px;height:18px;border:none;background:#e2e8f0;border-radius:50%;cursor:pointer;font-size:.75rem;color:#64748b;display:flex;align-items:center;justify-content:center;position:relative;flex-shrink:0}.clear-btn:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.clear-btn:hover{background:#cbd5e1;color:#1e293b}.clear-btn:after{content:\"\";position:absolute;inset:-13px}.recipient-details{margin-top:16px}.details-label{display:block;font-size:.6875rem;font-weight:600;color:#94a3b8;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}.details-card{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden}.detail-row{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;border-bottom:1px solid #f1f5f9}.detail-row.last{border-bottom:none}.detail-row:nth-child(2n){background:#f8fafc}.detail-key{font-size:.8125rem;color:#94a3b8;font-weight:500}.detail-val{font-size:.875rem;color:#1e293b;font-weight:600}.multi-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.multi-chip{display:inline-flex;align-items:center;gap:4px;padding:4px 8px 4px 10px;background:#dbeafe;border-radius:20px;font-size:.8125rem;font-weight:500;color:#1e40af}.chip-remove{width:18px;height:18px;border:none;background:#1e40af26;border-radius:50%;cursor:pointer;font-size:.875rem;line-height:1;color:#1e40af;display:flex;align-items:center;justify-content:center;flex-shrink:0}.chip-remove:hover{background:#1e40af4d}.chip-remove:focus-visible{outline:2px solid #1e40af;outline-offset:2px}@media(forced-colors:active){.picker-input:focus{outline:2px solid Highlight;outline-offset:1px}.picker-option--active{outline:2px solid Highlight;outline-offset:-2px}}\n"]
|
|
757
|
+
}]
|
|
758
|
+
}],
|
|
759
|
+
ctorParameters: () => [],
|
|
760
|
+
propDecorators: {
|
|
761
|
+
label: [{
|
|
762
|
+
type: i0.Input,
|
|
763
|
+
args: [{
|
|
764
|
+
isSignal: true,
|
|
765
|
+
alias: "label",
|
|
766
|
+
required: false
|
|
767
|
+
}]
|
|
768
|
+
}],
|
|
769
|
+
placeholderInput: [{
|
|
770
|
+
type: i0.Input,
|
|
771
|
+
args: [{
|
|
772
|
+
isSignal: true,
|
|
773
|
+
alias: "placeholder",
|
|
774
|
+
required: false
|
|
775
|
+
}]
|
|
776
|
+
}],
|
|
777
|
+
hint: [{
|
|
778
|
+
type: i0.Input,
|
|
779
|
+
args: [{
|
|
780
|
+
isSignal: true,
|
|
781
|
+
alias: "hint",
|
|
782
|
+
required: false
|
|
783
|
+
}]
|
|
784
|
+
}],
|
|
785
|
+
required: [{
|
|
786
|
+
type: i0.Input,
|
|
787
|
+
args: [{
|
|
788
|
+
isSignal: true,
|
|
789
|
+
alias: "required",
|
|
790
|
+
required: false
|
|
791
|
+
}]
|
|
792
|
+
}],
|
|
793
|
+
errorId: [{
|
|
794
|
+
type: i0.Input,
|
|
795
|
+
args: [{
|
|
796
|
+
isSignal: true,
|
|
797
|
+
alias: "errorId",
|
|
798
|
+
required: false
|
|
799
|
+
}]
|
|
800
|
+
}],
|
|
801
|
+
invalid: [{
|
|
802
|
+
type: i0.Input,
|
|
803
|
+
args: [{
|
|
804
|
+
isSignal: true,
|
|
805
|
+
alias: "invalid",
|
|
806
|
+
required: false
|
|
807
|
+
}]
|
|
808
|
+
}],
|
|
809
|
+
showErrors: [{
|
|
810
|
+
type: i0.Input,
|
|
811
|
+
args: [{
|
|
812
|
+
isSignal: true,
|
|
813
|
+
alias: "showErrors",
|
|
814
|
+
required: false
|
|
815
|
+
}]
|
|
816
|
+
}],
|
|
817
|
+
showDetails: [{
|
|
818
|
+
type: i0.Input,
|
|
819
|
+
args: [{
|
|
820
|
+
isSignal: true,
|
|
821
|
+
alias: "showDetails",
|
|
822
|
+
required: false
|
|
823
|
+
}]
|
|
824
|
+
}],
|
|
825
|
+
isMultiSelect: [{
|
|
826
|
+
type: i0.Input,
|
|
827
|
+
args: [{
|
|
828
|
+
isSignal: true,
|
|
829
|
+
alias: "isMultiSelect",
|
|
830
|
+
required: false
|
|
831
|
+
}]
|
|
832
|
+
}],
|
|
833
|
+
showChips: [{
|
|
834
|
+
type: i0.Input,
|
|
835
|
+
args: [{
|
|
836
|
+
isSignal: true,
|
|
837
|
+
alias: "showChips",
|
|
838
|
+
required: false
|
|
839
|
+
}]
|
|
840
|
+
}],
|
|
841
|
+
initialContact: [{
|
|
842
|
+
type: i0.Input,
|
|
843
|
+
args: [{
|
|
844
|
+
isSignal: true,
|
|
845
|
+
alias: "initialContact",
|
|
846
|
+
required: false
|
|
847
|
+
}]
|
|
848
|
+
}],
|
|
849
|
+
contactSelected: [{
|
|
850
|
+
type: i0.Output,
|
|
851
|
+
args: ["contactSelected"]
|
|
852
|
+
}],
|
|
853
|
+
contactsSelected: [{
|
|
854
|
+
type: i0.Output,
|
|
855
|
+
args: ["contactsSelected"]
|
|
856
|
+
}],
|
|
857
|
+
invalidChange: [{
|
|
858
|
+
type: i0.Output,
|
|
859
|
+
args: ["invalidChange"]
|
|
860
|
+
}]
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
export { ContactPickerComponent };
|
|
864
|
+
|
|
865
|
+
//# sourceMappingURL=forgeroute-ui-contact-picker.mjs.map
|