@forgeroute/ui 0.5.16 → 0.5.18
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-core-ui-labels.es-Dzj_XJJM.mjs → forgeroute-ui-core-ui-labels.es-Woi3az70.mjs} +186 -2
- package/fesm2022/{forgeroute-ui-core-ui-labels.es-Dzj_XJJM.mjs.map → forgeroute-ui-core-ui-labels.es-Woi3az70.mjs.map} +1 -1
- package/fesm2022/forgeroute-ui-core.mjs +186 -2
- package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
- 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 +6258 -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 +18 -1
- 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 +15 -1
- 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 +6254 -1188
- 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 +422 -2
- 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-core.d.ts +188 -4
- 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 +1826 -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 +1458 -3
- 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,1164 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ElementRef, computed, effect, forwardRef, inject, input, output, signal, untracked } from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/forms";
|
|
4
|
+
import { FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
5
|
+
import { TextInputComponent } from "@forgeroute/ui/text-input";
|
|
6
|
+
import { SelectComponent } from "@forgeroute/ui/select";
|
|
7
|
+
import { FormSectionComponent } from "@forgeroute/ui/form-section";
|
|
8
|
+
import { FormRowComponent } from "@forgeroute/ui/form-row";
|
|
9
|
+
import { HintComponent } from "@forgeroute/ui/hint";
|
|
10
|
+
import { ErrorComponent } from "@forgeroute/ui/error";
|
|
11
|
+
import { UiFieldValidity, UiLabelsService, issueToErrors, maxLengthIssue, requiredIssue } from "@forgeroute/ui/core";
|
|
12
|
+
import { US_STATES, usStateName } from "@forgeroute/ui/utils";
|
|
13
|
+
const US_STATE_OPTIONS = US_STATES.map((s) => ({
|
|
14
|
+
value: s.value,
|
|
15
|
+
label: s.value,
|
|
16
|
+
description: s.label
|
|
17
|
+
}));
|
|
18
|
+
function emptyAddress() {
|
|
19
|
+
return {
|
|
20
|
+
street: "",
|
|
21
|
+
apt: "",
|
|
22
|
+
city: "",
|
|
23
|
+
state: "",
|
|
24
|
+
zip: ""
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function normalizeAddress(v) {
|
|
28
|
+
const s = (x) => x == null ? "" : String(x);
|
|
29
|
+
return v && typeof v === "object" ? {
|
|
30
|
+
street: s(v.street),
|
|
31
|
+
apt: s(v.apt),
|
|
32
|
+
city: s(v.city),
|
|
33
|
+
state: s(v.state),
|
|
34
|
+
zip: s(v.zip)
|
|
35
|
+
} : emptyAddress();
|
|
36
|
+
}
|
|
37
|
+
function isEmptyAddress(a) {
|
|
38
|
+
const n = normalizeAddress(a);
|
|
39
|
+
return !n.street.trim() && !n.apt.trim() && !n.city.trim() && !n.state.trim() && !n.zip.trim();
|
|
40
|
+
}
|
|
41
|
+
const US_ZIP_PATTERN = /^\d{5}(?:-\d{4})?$/;
|
|
42
|
+
function cityStateZip(a, comma) {
|
|
43
|
+
return [[a.city.trim(), a.state.trim()].filter(Boolean).join(comma ? ", " : " "), a.zip.trim()].filter(Boolean).join(" ");
|
|
44
|
+
}
|
|
45
|
+
function formatAddressValue(a) {
|
|
46
|
+
const n = normalizeAddress(a);
|
|
47
|
+
const parts = [];
|
|
48
|
+
if (n.street.trim()) parts.push(n.street.trim());
|
|
49
|
+
if (n.apt.trim()) parts.push(n.apt.trim());
|
|
50
|
+
const line2 = cityStateZip(n, true);
|
|
51
|
+
if (line2) parts.push(line2);
|
|
52
|
+
return parts.join("\n");
|
|
53
|
+
}
|
|
54
|
+
function formatAddressValueOneLine(a, options = {}) {
|
|
55
|
+
const n = normalizeAddress(a);
|
|
56
|
+
return [
|
|
57
|
+
n.street.trim(),
|
|
58
|
+
n.apt.trim(),
|
|
59
|
+
cityStateZip(n, options.comma !== false)
|
|
60
|
+
].filter(Boolean).join(", ");
|
|
61
|
+
}
|
|
62
|
+
const ZIP = "\\d{5}(?:-\\d{4})?";
|
|
63
|
+
const CSZ_RE = new RegExp(`^(?:(.*?)[,\\s]+)?([A-Z]{2})\\s+(${ZIP})$`);
|
|
64
|
+
const CSZ_COMMA_RE = new RegExp(`^(.+?)\\s*,\\s*([A-Za-z]{2})\\s+(${ZIP})$`);
|
|
65
|
+
const CS_RE = /^(.+?)\s*,\s*([A-Z]{2})$/;
|
|
66
|
+
const TAIL_RE = new RegExp(`^(?:(.+?)\\s+)?([A-Z]{2})\\s+(${ZIP})$`);
|
|
67
|
+
function splitCityStateLine(line) {
|
|
68
|
+
const trimmed = line.replace(/[\s.,;]+$/, "");
|
|
69
|
+
const m = CSZ_RE.exec(trimmed);
|
|
70
|
+
if (m) return {
|
|
71
|
+
city: (m[1] ?? "").trim(),
|
|
72
|
+
state: m[2],
|
|
73
|
+
zip: m[3]
|
|
74
|
+
};
|
|
75
|
+
const c = CSZ_COMMA_RE.exec(trimmed);
|
|
76
|
+
if (c) return {
|
|
77
|
+
city: c[1].trim(),
|
|
78
|
+
state: c[2].toUpperCase(),
|
|
79
|
+
zip: c[3]
|
|
80
|
+
};
|
|
81
|
+
const cs = CS_RE.exec(trimmed);
|
|
82
|
+
if (cs) return {
|
|
83
|
+
city: cs[1].trim(),
|
|
84
|
+
state: cs[2],
|
|
85
|
+
zip: ""
|
|
86
|
+
};
|
|
87
|
+
return {
|
|
88
|
+
city: line,
|
|
89
|
+
state: "",
|
|
90
|
+
zip: ""
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function parseAddressValue(raw) {
|
|
94
|
+
if (!raw) return emptyAddress();
|
|
95
|
+
const lines = String(raw).split(/\r?\n/).map((l) => l.trim()).filter(Boolean);
|
|
96
|
+
if (!lines.length) return emptyAddress();
|
|
97
|
+
if (lines.length === 1) return {
|
|
98
|
+
...emptyAddress(),
|
|
99
|
+
street: lines[0]
|
|
100
|
+
};
|
|
101
|
+
return {
|
|
102
|
+
street: lines[0],
|
|
103
|
+
apt: lines.slice(1, -1).join(", "),
|
|
104
|
+
...splitCityStateLine(lines[lines.length - 1])
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function parseAddressOneLine(raw) {
|
|
108
|
+
const text = raw == null ? "" : String(raw).replace(/\s+/g, " ").trim();
|
|
109
|
+
if (!text) return emptyAddress();
|
|
110
|
+
const segs = text.split(",").map((x) => x.trim()).filter(Boolean);
|
|
111
|
+
const m = TAIL_RE.exec(segs[segs.length - 1]);
|
|
112
|
+
if (!m) return {
|
|
113
|
+
...emptyAddress(),
|
|
114
|
+
street: text
|
|
115
|
+
};
|
|
116
|
+
let head = segs.slice(0, -1);
|
|
117
|
+
let city = m[1] ?? "";
|
|
118
|
+
if (!city && head.length) {
|
|
119
|
+
city = head[head.length - 1];
|
|
120
|
+
head = head.slice(0, -1);
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
street: head[0] ?? "",
|
|
124
|
+
apt: head.slice(1).join(", "),
|
|
125
|
+
city,
|
|
126
|
+
state: m[2],
|
|
127
|
+
zip: m[3]
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function isValidZip(zip) {
|
|
131
|
+
return US_ZIP_PATTERN.test(zip);
|
|
132
|
+
}
|
|
133
|
+
const FIELDS = [
|
|
134
|
+
"street",
|
|
135
|
+
"apt",
|
|
136
|
+
"city",
|
|
137
|
+
"state",
|
|
138
|
+
"zip"
|
|
139
|
+
];
|
|
140
|
+
var AddressInputComponent = class AddressInputComponent {
|
|
141
|
+
constructor() {
|
|
142
|
+
this.labels = inject(UiLabelsService);
|
|
143
|
+
this.labelInput = input(null, {
|
|
144
|
+
...ngDevMode ? { debugName: "labelInput" } : /* istanbul ignore next */ {},
|
|
145
|
+
alias: "label"
|
|
146
|
+
});
|
|
147
|
+
this.label = computed(() => this.labelInput() ?? this.labels.t("addressInput.label"), ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
148
|
+
this.required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
149
|
+
this.requireComplete = input(false, ...ngDevMode ? [{ debugName: "requireComplete" }] : /* istanbul ignore next */ []);
|
|
150
|
+
this.streetLabelInput = input(null, {
|
|
151
|
+
...ngDevMode ? { debugName: "streetLabelInput" } : /* istanbul ignore next */ {},
|
|
152
|
+
alias: "streetLabel"
|
|
153
|
+
});
|
|
154
|
+
this.streetLabel = computed(() => this.streetLabelInput() ?? this.labels.t("addressInput.streetLabel"), ...ngDevMode ? [{ debugName: "streetLabel" }] : /* istanbul ignore next */ []);
|
|
155
|
+
this.unitLabelInput = input(null, {
|
|
156
|
+
...ngDevMode ? { debugName: "unitLabelInput" } : /* istanbul ignore next */ {},
|
|
157
|
+
alias: "unitLabel"
|
|
158
|
+
});
|
|
159
|
+
this.unitLabel = computed(() => this.unitLabelInput() ?? this.labels.t("addressInput.unitLabel"), ...ngDevMode ? [{ debugName: "unitLabel" }] : /* istanbul ignore next */ []);
|
|
160
|
+
this.cityLabelInput = input(null, {
|
|
161
|
+
...ngDevMode ? { debugName: "cityLabelInput" } : /* istanbul ignore next */ {},
|
|
162
|
+
alias: "cityLabel"
|
|
163
|
+
});
|
|
164
|
+
this.cityLabel = computed(() => this.cityLabelInput() ?? this.labels.t("addressInput.cityLabel"), ...ngDevMode ? [{ debugName: "cityLabel" }] : /* istanbul ignore next */ []);
|
|
165
|
+
this.stateLabelInput = input(null, {
|
|
166
|
+
...ngDevMode ? { debugName: "stateLabelInput" } : /* istanbul ignore next */ {},
|
|
167
|
+
alias: "stateLabel"
|
|
168
|
+
});
|
|
169
|
+
this.stateLabel = computed(() => this.stateLabelInput() ?? this.labels.t("addressInput.stateLabel"), ...ngDevMode ? [{ debugName: "stateLabel" }] : /* istanbul ignore next */ []);
|
|
170
|
+
this.zipLabelInput = input(null, {
|
|
171
|
+
...ngDevMode ? { debugName: "zipLabelInput" } : /* istanbul ignore next */ {},
|
|
172
|
+
alias: "zipLabel"
|
|
173
|
+
});
|
|
174
|
+
this.zipLabel = computed(() => this.zipLabelInput() ?? this.labels.t("addressInput.zipLabel"), ...ngDevMode ? [{ debugName: "zipLabel" }] : /* istanbul ignore next */ []);
|
|
175
|
+
this.streetPlaceholderInput = input(null, {
|
|
176
|
+
...ngDevMode ? { debugName: "streetPlaceholderInput" } : /* istanbul ignore next */ {},
|
|
177
|
+
alias: "streetPlaceholder"
|
|
178
|
+
});
|
|
179
|
+
this.streetPlaceholder = computed(() => this.streetPlaceholderInput() ?? this.labels.t("addressInput.streetPlaceholder"), ...ngDevMode ? [{ debugName: "streetPlaceholder" }] : /* istanbul ignore next */ []);
|
|
180
|
+
this.unitPlaceholderInput = input(null, {
|
|
181
|
+
...ngDevMode ? { debugName: "unitPlaceholderInput" } : /* istanbul ignore next */ {},
|
|
182
|
+
alias: "unitPlaceholder"
|
|
183
|
+
});
|
|
184
|
+
this.unitPlaceholder = computed(() => this.unitPlaceholderInput() ?? this.labels.t("addressInput.unitPlaceholder"), ...ngDevMode ? [{ debugName: "unitPlaceholder" }] : /* istanbul ignore next */ []);
|
|
185
|
+
this.cityPlaceholderInput = input(null, {
|
|
186
|
+
...ngDevMode ? { debugName: "cityPlaceholderInput" } : /* istanbul ignore next */ {},
|
|
187
|
+
alias: "cityPlaceholder"
|
|
188
|
+
});
|
|
189
|
+
this.cityPlaceholder = computed(() => this.cityPlaceholderInput() ?? this.labels.t("addressInput.cityPlaceholder"), ...ngDevMode ? [{ debugName: "cityPlaceholder" }] : /* istanbul ignore next */ []);
|
|
190
|
+
this.zipPlaceholder = input("62701", ...ngDevMode ? [{ debugName: "zipPlaceholder" }] : /* istanbul ignore next */ []);
|
|
191
|
+
this.statePlaceholder = input("—", ...ngDevMode ? [{ debugName: "statePlaceholder" }] : /* istanbul ignore next */ []);
|
|
192
|
+
this.showUnit = input(true, ...ngDevMode ? [{ debugName: "showUnit" }] : /* istanbul ignore next */ []);
|
|
193
|
+
this.statesInput = input(null, {
|
|
194
|
+
...ngDevMode ? { debugName: "statesInput" } : /* istanbul ignore next */ {},
|
|
195
|
+
alias: "states"
|
|
196
|
+
});
|
|
197
|
+
this.states = computed(() => this.statesInput() ?? US_STATE_OPTIONS.map((o) => ({
|
|
198
|
+
...o,
|
|
199
|
+
description: usStateName(String(o.value), o.description)
|
|
200
|
+
})), ...ngDevMode ? [{ debugName: "states" }] : /* istanbul ignore next */ []);
|
|
201
|
+
this.streetMaxlength = input(200, ...ngDevMode ? [{ debugName: "streetMaxlength" }] : /* istanbul ignore next */ []);
|
|
202
|
+
this.unitMaxlength = input(50, ...ngDevMode ? [{ debugName: "unitMaxlength" }] : /* istanbul ignore next */ []);
|
|
203
|
+
this.cityMaxlength = input(100, ...ngDevMode ? [{ debugName: "cityMaxlength" }] : /* istanbul ignore next */ []);
|
|
204
|
+
this.zipMaxlength = input(10, ...ngDevMode ? [{ debugName: "zipMaxlength" }] : /* istanbul ignore next */ []);
|
|
205
|
+
this.readonly = input(false, ...ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []);
|
|
206
|
+
this.showErrors = input(false, ...ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []);
|
|
207
|
+
this.hint = input("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
208
|
+
this.error = input("", ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
209
|
+
this.idPrefix = input("addr_", ...ngDevMode ? [{ debugName: "idPrefix" }] : /* istanbul ignore next */ []);
|
|
210
|
+
this.prefix = input(void 0, ...ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []);
|
|
211
|
+
this.valueFormat = input("auto", ...ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []);
|
|
212
|
+
this.zipPattern = input(US_ZIP_PATTERN, ...ngDevMode ? [{ debugName: "zipPattern" }] : /* istanbul ignore next */ []);
|
|
213
|
+
this.zipErrorInput = input(null, {
|
|
214
|
+
...ngDevMode ? { debugName: "zipErrorInput" } : /* istanbul ignore next */ {},
|
|
215
|
+
alias: "zipError"
|
|
216
|
+
});
|
|
217
|
+
this.zipError = computed(() => this.zipErrorInput() ?? this.labels.t("addressInput.zipError"), ...ngDevMode ? [{ debugName: "zipError" }] : /* istanbul ignore next */ []);
|
|
218
|
+
this.value = input(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
219
|
+
this._disabledInput = input(false, {
|
|
220
|
+
...ngDevMode ? { debugName: "_disabledInput" } : /* istanbul ignore next */ {},
|
|
221
|
+
alias: "disabled"
|
|
222
|
+
});
|
|
223
|
+
this.valueChange = output();
|
|
224
|
+
this.invalidChange = output();
|
|
225
|
+
this.host = inject(ElementRef);
|
|
226
|
+
this._cvaDisabled = signal(false, ...ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []);
|
|
227
|
+
this.disabled = computed(() => this._disabledInput() || this._cvaDisabled(), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
228
|
+
this._v = signal(emptyAddress(), ...ngDevMode ? [{ debugName: "_v" }] : /* istanbul ignore next */ []);
|
|
229
|
+
this._touched = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []);
|
|
230
|
+
this._standalone = { standalone: true };
|
|
231
|
+
this._p = computed(() => this.prefix() ?? this.idPrefix(), ...ngDevMode ? [{ debugName: "_p" }] : /* istanbul ignore next */ []);
|
|
232
|
+
this._uid = Math.random().toString(36).slice(2, 8);
|
|
233
|
+
this._legendId = `ai-${this._uid}-legend`;
|
|
234
|
+
this._errorId = `ai-${this._uid}-error`;
|
|
235
|
+
this._hintId = `ai-${this._uid}-hint`;
|
|
236
|
+
this._stateOptions = computed(() => {
|
|
237
|
+
const opts = this.states();
|
|
238
|
+
return opts.some((o) => String(o.value) === "") ? [...opts] : [{
|
|
239
|
+
value: "",
|
|
240
|
+
label: this.statePlaceholder()
|
|
241
|
+
}, ...opts];
|
|
242
|
+
}, ...ngDevMode ? [{ debugName: "_stateOptions" }] : /* istanbul ignore next */ []);
|
|
243
|
+
this._issues = computed(() => this._check(this._v()), ...ngDevMode ? [{ debugName: "_issues" }] : /* istanbul ignore next */ []);
|
|
244
|
+
this.invalid = computed(() => !!this.error() || this._firstIssue(this._issues()) !== null, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
245
|
+
this.errorMessage = computed(() => this._firstIssue(this._issues())?.message ?? "", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
246
|
+
this._req = computed(() => this.required() || this.requireComplete() && this._hasText(this._v()), ...ngDevMode ? [{ debugName: "_req" }] : /* istanbul ignore next */ []);
|
|
247
|
+
this._shownError = computed(() => this.showErrors() || this._touched().size > 0 ? this.error() : "", ...ngDevMode ? [{ debugName: "_shownError" }] : /* istanbul ignore next */ []);
|
|
248
|
+
this._describedBy = computed(() => this._shownError() ? this._errorId : this.hint() ? this._hintId : null, ...ngDevMode ? [{ debugName: "_describedBy" }] : /* istanbul ignore next */ []);
|
|
249
|
+
this._onChange = (_) => {};
|
|
250
|
+
this._textModel = false;
|
|
251
|
+
this._edited = /* @__PURE__ */ new Set();
|
|
252
|
+
this._onTouched = () => {};
|
|
253
|
+
this._onValidatorChange = () => {};
|
|
254
|
+
effect(() => {
|
|
255
|
+
this.invalidChange.emit(this.invalid());
|
|
256
|
+
});
|
|
257
|
+
effect(() => {
|
|
258
|
+
const v = this.value();
|
|
259
|
+
if (v === void 0) return;
|
|
260
|
+
untracked(() => {
|
|
261
|
+
const cur = this._v();
|
|
262
|
+
if (typeof v === "string" && v.trim() === formatAddressValue(cur).trim()) return;
|
|
263
|
+
const incoming = typeof v === "string" ? parseAddressValue(v) : normalizeAddress(v);
|
|
264
|
+
const same = (f) => incoming[f] === cur[f] || typeof v === "string" && incoming[f] === cur[f].trim();
|
|
265
|
+
if (FIELDS.every(same)) return;
|
|
266
|
+
for (const f of FIELDS) if (!same(f)) this._edited.delete(f);
|
|
267
|
+
this._v.set(incoming);
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
let previous = false;
|
|
271
|
+
effect(() => {
|
|
272
|
+
const show = this.showErrors();
|
|
273
|
+
if (previous && !show) untracked(() => this._touched.set(/* @__PURE__ */ new Set()));
|
|
274
|
+
previous = show;
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
ngOnChanges() {
|
|
278
|
+
this._onValidatorChange();
|
|
279
|
+
}
|
|
280
|
+
writeValue(val) {
|
|
281
|
+
this._textModel = typeof val === "string";
|
|
282
|
+
this._edited.clear();
|
|
283
|
+
this._v.set(typeof val === "string" ? parseAddressValue(val) : normalizeAddress(val));
|
|
284
|
+
if (!this._hasText(this._v())) this._touched.set(/* @__PURE__ */ new Set());
|
|
285
|
+
}
|
|
286
|
+
registerOnChange(fn) {
|
|
287
|
+
this._onChange = fn;
|
|
288
|
+
}
|
|
289
|
+
registerOnTouched(fn) {
|
|
290
|
+
this._onTouched = fn;
|
|
291
|
+
}
|
|
292
|
+
setDisabledState(d) {
|
|
293
|
+
this._cvaDisabled.set(d);
|
|
294
|
+
}
|
|
295
|
+
registerOnValidatorChange(fn) {
|
|
296
|
+
this._onValidatorChange = fn;
|
|
297
|
+
}
|
|
298
|
+
validate(control) {
|
|
299
|
+
const raw = control.value;
|
|
300
|
+
const v = typeof raw === "string" ? parseAddressValue(raw) : normalizeAddress(raw);
|
|
301
|
+
return issueToErrors(this._firstIssue(this._check(v)));
|
|
302
|
+
}
|
|
303
|
+
_set(field, text) {
|
|
304
|
+
const t = text == null ? "" : String(text);
|
|
305
|
+
this._edited.add(field);
|
|
306
|
+
const next = {
|
|
307
|
+
...this._v(),
|
|
308
|
+
[field]: t
|
|
309
|
+
};
|
|
310
|
+
this._v.set(next);
|
|
311
|
+
const fmt = this.valueFormat();
|
|
312
|
+
this._onChange(fmt === "text" || fmt === "auto" && this._textModel ? formatAddressValue(next) : { ...next });
|
|
313
|
+
this.valueChange.emit({ ...next });
|
|
314
|
+
}
|
|
315
|
+
_onFocusOut(field, event) {
|
|
316
|
+
if (!this._touched().has(field)) this._touched.set(/* @__PURE__ */ new Set([...this._touched(), field]));
|
|
317
|
+
const cur = this._v()[field];
|
|
318
|
+
if (this._edited.has(field) && cur !== cur.trim() && !this.disabled() && !this.readonly()) this._set(field, cur.trim());
|
|
319
|
+
const next = event.relatedTarget;
|
|
320
|
+
if (!next || !this.host.nativeElement.contains(next)) this._onTouched();
|
|
321
|
+
}
|
|
322
|
+
_revealed(field) {
|
|
323
|
+
return this.showErrors() || this._touched().has(field);
|
|
324
|
+
}
|
|
325
|
+
_fieldError(field) {
|
|
326
|
+
if (this.disabled() || this.readonly()) return "";
|
|
327
|
+
if (!this._revealed(field)) return "";
|
|
328
|
+
return this._issues()[field]?.message ?? "";
|
|
329
|
+
}
|
|
330
|
+
_hasText(v) {
|
|
331
|
+
return !!(v.street.trim() || v.city.trim() || v.state.trim() || v.zip.trim());
|
|
332
|
+
}
|
|
333
|
+
_firstIssue(issues) {
|
|
334
|
+
for (const f of FIELDS) if (issues[f]) return issues[f];
|
|
335
|
+
return null;
|
|
336
|
+
}
|
|
337
|
+
_check(v) {
|
|
338
|
+
const out = {};
|
|
339
|
+
if (this.disabled() || this.readonly()) return out;
|
|
340
|
+
const mustFill = this.required() || this.requireComplete() && this._hasText(v);
|
|
341
|
+
const labels = {
|
|
342
|
+
street: this.streetLabel(),
|
|
343
|
+
city: this.cityLabel(),
|
|
344
|
+
state: this.stateLabel(),
|
|
345
|
+
zip: this.zipLabel()
|
|
346
|
+
};
|
|
347
|
+
const max = {
|
|
348
|
+
street: this.streetMaxlength(),
|
|
349
|
+
apt: this.unitMaxlength(),
|
|
350
|
+
city: this.cityMaxlength(),
|
|
351
|
+
state: Infinity,
|
|
352
|
+
zip: this.zipMaxlength()
|
|
353
|
+
};
|
|
354
|
+
for (const f of FIELDS) {
|
|
355
|
+
if (f === "apt" && !this.showUnit()) continue;
|
|
356
|
+
const text = v[f].trim();
|
|
357
|
+
if (!text) {
|
|
358
|
+
if (mustFill && f !== "apt") out[f] = requiredIssue(labels[f]);
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
const tooLong = maxLengthIssue(text, max[f]);
|
|
362
|
+
if (tooLong) {
|
|
363
|
+
out[f] = tooLong;
|
|
364
|
+
continue;
|
|
365
|
+
}
|
|
366
|
+
if (f === "zip" && !this._zipOk(text)) out[f] = {
|
|
367
|
+
key: "zip",
|
|
368
|
+
message: this.zipError()
|
|
369
|
+
};
|
|
370
|
+
if (f === "state" && !this._stateOptions().some((o) => String(o.value) === text)) out[f] = {
|
|
371
|
+
key: "option",
|
|
372
|
+
message: this.labels.t("common.selectValidOption")
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
return out;
|
|
376
|
+
}
|
|
377
|
+
_zipOk(zip) {
|
|
378
|
+
const pattern = this.zipPattern();
|
|
379
|
+
if (!pattern) return true;
|
|
380
|
+
return new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, "")).test(zip);
|
|
381
|
+
}
|
|
382
|
+
static {
|
|
383
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
384
|
+
minVersion: "12.0.0",
|
|
385
|
+
version: "22.2.2",
|
|
386
|
+
ngImport: i0,
|
|
387
|
+
type: AddressInputComponent,
|
|
388
|
+
deps: [],
|
|
389
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
static {
|
|
393
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
394
|
+
minVersion: "17.0.0",
|
|
395
|
+
version: "22.2.2",
|
|
396
|
+
type: AddressInputComponent,
|
|
397
|
+
isStandalone: true,
|
|
398
|
+
selector: "ui-address-input",
|
|
399
|
+
inputs: {
|
|
400
|
+
labelInput: {
|
|
401
|
+
classPropertyName: "labelInput",
|
|
402
|
+
publicName: "label",
|
|
403
|
+
isSignal: true,
|
|
404
|
+
isRequired: false,
|
|
405
|
+
transformFunction: null
|
|
406
|
+
},
|
|
407
|
+
required: {
|
|
408
|
+
classPropertyName: "required",
|
|
409
|
+
publicName: "required",
|
|
410
|
+
isSignal: true,
|
|
411
|
+
isRequired: false,
|
|
412
|
+
transformFunction: null
|
|
413
|
+
},
|
|
414
|
+
requireComplete: {
|
|
415
|
+
classPropertyName: "requireComplete",
|
|
416
|
+
publicName: "requireComplete",
|
|
417
|
+
isSignal: true,
|
|
418
|
+
isRequired: false,
|
|
419
|
+
transformFunction: null
|
|
420
|
+
},
|
|
421
|
+
streetLabelInput: {
|
|
422
|
+
classPropertyName: "streetLabelInput",
|
|
423
|
+
publicName: "streetLabel",
|
|
424
|
+
isSignal: true,
|
|
425
|
+
isRequired: false,
|
|
426
|
+
transformFunction: null
|
|
427
|
+
},
|
|
428
|
+
unitLabelInput: {
|
|
429
|
+
classPropertyName: "unitLabelInput",
|
|
430
|
+
publicName: "unitLabel",
|
|
431
|
+
isSignal: true,
|
|
432
|
+
isRequired: false,
|
|
433
|
+
transformFunction: null
|
|
434
|
+
},
|
|
435
|
+
cityLabelInput: {
|
|
436
|
+
classPropertyName: "cityLabelInput",
|
|
437
|
+
publicName: "cityLabel",
|
|
438
|
+
isSignal: true,
|
|
439
|
+
isRequired: false,
|
|
440
|
+
transformFunction: null
|
|
441
|
+
},
|
|
442
|
+
stateLabelInput: {
|
|
443
|
+
classPropertyName: "stateLabelInput",
|
|
444
|
+
publicName: "stateLabel",
|
|
445
|
+
isSignal: true,
|
|
446
|
+
isRequired: false,
|
|
447
|
+
transformFunction: null
|
|
448
|
+
},
|
|
449
|
+
zipLabelInput: {
|
|
450
|
+
classPropertyName: "zipLabelInput",
|
|
451
|
+
publicName: "zipLabel",
|
|
452
|
+
isSignal: true,
|
|
453
|
+
isRequired: false,
|
|
454
|
+
transformFunction: null
|
|
455
|
+
},
|
|
456
|
+
streetPlaceholderInput: {
|
|
457
|
+
classPropertyName: "streetPlaceholderInput",
|
|
458
|
+
publicName: "streetPlaceholder",
|
|
459
|
+
isSignal: true,
|
|
460
|
+
isRequired: false,
|
|
461
|
+
transformFunction: null
|
|
462
|
+
},
|
|
463
|
+
unitPlaceholderInput: {
|
|
464
|
+
classPropertyName: "unitPlaceholderInput",
|
|
465
|
+
publicName: "unitPlaceholder",
|
|
466
|
+
isSignal: true,
|
|
467
|
+
isRequired: false,
|
|
468
|
+
transformFunction: null
|
|
469
|
+
},
|
|
470
|
+
cityPlaceholderInput: {
|
|
471
|
+
classPropertyName: "cityPlaceholderInput",
|
|
472
|
+
publicName: "cityPlaceholder",
|
|
473
|
+
isSignal: true,
|
|
474
|
+
isRequired: false,
|
|
475
|
+
transformFunction: null
|
|
476
|
+
},
|
|
477
|
+
zipPlaceholder: {
|
|
478
|
+
classPropertyName: "zipPlaceholder",
|
|
479
|
+
publicName: "zipPlaceholder",
|
|
480
|
+
isSignal: true,
|
|
481
|
+
isRequired: false,
|
|
482
|
+
transformFunction: null
|
|
483
|
+
},
|
|
484
|
+
statePlaceholder: {
|
|
485
|
+
classPropertyName: "statePlaceholder",
|
|
486
|
+
publicName: "statePlaceholder",
|
|
487
|
+
isSignal: true,
|
|
488
|
+
isRequired: false,
|
|
489
|
+
transformFunction: null
|
|
490
|
+
},
|
|
491
|
+
showUnit: {
|
|
492
|
+
classPropertyName: "showUnit",
|
|
493
|
+
publicName: "showUnit",
|
|
494
|
+
isSignal: true,
|
|
495
|
+
isRequired: false,
|
|
496
|
+
transformFunction: null
|
|
497
|
+
},
|
|
498
|
+
statesInput: {
|
|
499
|
+
classPropertyName: "statesInput",
|
|
500
|
+
publicName: "states",
|
|
501
|
+
isSignal: true,
|
|
502
|
+
isRequired: false,
|
|
503
|
+
transformFunction: null
|
|
504
|
+
},
|
|
505
|
+
streetMaxlength: {
|
|
506
|
+
classPropertyName: "streetMaxlength",
|
|
507
|
+
publicName: "streetMaxlength",
|
|
508
|
+
isSignal: true,
|
|
509
|
+
isRequired: false,
|
|
510
|
+
transformFunction: null
|
|
511
|
+
},
|
|
512
|
+
unitMaxlength: {
|
|
513
|
+
classPropertyName: "unitMaxlength",
|
|
514
|
+
publicName: "unitMaxlength",
|
|
515
|
+
isSignal: true,
|
|
516
|
+
isRequired: false,
|
|
517
|
+
transformFunction: null
|
|
518
|
+
},
|
|
519
|
+
cityMaxlength: {
|
|
520
|
+
classPropertyName: "cityMaxlength",
|
|
521
|
+
publicName: "cityMaxlength",
|
|
522
|
+
isSignal: true,
|
|
523
|
+
isRequired: false,
|
|
524
|
+
transformFunction: null
|
|
525
|
+
},
|
|
526
|
+
zipMaxlength: {
|
|
527
|
+
classPropertyName: "zipMaxlength",
|
|
528
|
+
publicName: "zipMaxlength",
|
|
529
|
+
isSignal: true,
|
|
530
|
+
isRequired: false,
|
|
531
|
+
transformFunction: null
|
|
532
|
+
},
|
|
533
|
+
readonly: {
|
|
534
|
+
classPropertyName: "readonly",
|
|
535
|
+
publicName: "readonly",
|
|
536
|
+
isSignal: true,
|
|
537
|
+
isRequired: false,
|
|
538
|
+
transformFunction: null
|
|
539
|
+
},
|
|
540
|
+
showErrors: {
|
|
541
|
+
classPropertyName: "showErrors",
|
|
542
|
+
publicName: "showErrors",
|
|
543
|
+
isSignal: true,
|
|
544
|
+
isRequired: false,
|
|
545
|
+
transformFunction: null
|
|
546
|
+
},
|
|
547
|
+
hint: {
|
|
548
|
+
classPropertyName: "hint",
|
|
549
|
+
publicName: "hint",
|
|
550
|
+
isSignal: true,
|
|
551
|
+
isRequired: false,
|
|
552
|
+
transformFunction: null
|
|
553
|
+
},
|
|
554
|
+
error: {
|
|
555
|
+
classPropertyName: "error",
|
|
556
|
+
publicName: "error",
|
|
557
|
+
isSignal: true,
|
|
558
|
+
isRequired: false,
|
|
559
|
+
transformFunction: null
|
|
560
|
+
},
|
|
561
|
+
idPrefix: {
|
|
562
|
+
classPropertyName: "idPrefix",
|
|
563
|
+
publicName: "idPrefix",
|
|
564
|
+
isSignal: true,
|
|
565
|
+
isRequired: false,
|
|
566
|
+
transformFunction: null
|
|
567
|
+
},
|
|
568
|
+
prefix: {
|
|
569
|
+
classPropertyName: "prefix",
|
|
570
|
+
publicName: "prefix",
|
|
571
|
+
isSignal: true,
|
|
572
|
+
isRequired: false,
|
|
573
|
+
transformFunction: null
|
|
574
|
+
},
|
|
575
|
+
valueFormat: {
|
|
576
|
+
classPropertyName: "valueFormat",
|
|
577
|
+
publicName: "valueFormat",
|
|
578
|
+
isSignal: true,
|
|
579
|
+
isRequired: false,
|
|
580
|
+
transformFunction: null
|
|
581
|
+
},
|
|
582
|
+
zipPattern: {
|
|
583
|
+
classPropertyName: "zipPattern",
|
|
584
|
+
publicName: "zipPattern",
|
|
585
|
+
isSignal: true,
|
|
586
|
+
isRequired: false,
|
|
587
|
+
transformFunction: null
|
|
588
|
+
},
|
|
589
|
+
zipErrorInput: {
|
|
590
|
+
classPropertyName: "zipErrorInput",
|
|
591
|
+
publicName: "zipError",
|
|
592
|
+
isSignal: true,
|
|
593
|
+
isRequired: false,
|
|
594
|
+
transformFunction: null
|
|
595
|
+
},
|
|
596
|
+
value: {
|
|
597
|
+
classPropertyName: "value",
|
|
598
|
+
publicName: "value",
|
|
599
|
+
isSignal: true,
|
|
600
|
+
isRequired: false,
|
|
601
|
+
transformFunction: null
|
|
602
|
+
},
|
|
603
|
+
_disabledInput: {
|
|
604
|
+
classPropertyName: "_disabledInput",
|
|
605
|
+
publicName: "disabled",
|
|
606
|
+
isSignal: true,
|
|
607
|
+
isRequired: false,
|
|
608
|
+
transformFunction: null
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
outputs: {
|
|
612
|
+
valueChange: "valueChange",
|
|
613
|
+
invalidChange: "invalidChange"
|
|
614
|
+
},
|
|
615
|
+
providers: [
|
|
616
|
+
{
|
|
617
|
+
provide: NG_VALUE_ACCESSOR,
|
|
618
|
+
useExisting: forwardRef(() => AddressInputComponent),
|
|
619
|
+
multi: true
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
provide: NG_VALIDATORS,
|
|
623
|
+
useExisting: forwardRef(() => AddressInputComponent),
|
|
624
|
+
multi: true
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
provide: UiFieldValidity,
|
|
628
|
+
useExisting: forwardRef(() => AddressInputComponent)
|
|
629
|
+
}
|
|
630
|
+
],
|
|
631
|
+
usesOnChanges: true,
|
|
632
|
+
ngImport: i0,
|
|
633
|
+
template: `
|
|
634
|
+
<div class="ai-group" role="group"
|
|
635
|
+
[attr.aria-labelledby]="label() ? _legendId : null" [attr.aria-label]="label() ? null : labels.t('addressInput.label')"
|
|
636
|
+
[attr.aria-describedby]="_describedBy()"
|
|
637
|
+
[attr.data-testid]="_p() + 'group'">
|
|
638
|
+
@if (label()) {
|
|
639
|
+
<span class="ai-legend" [id]="_legendId">
|
|
640
|
+
{{ label() }}
|
|
641
|
+
@if (required()) { <span class="ai-required" aria-hidden="true">*</span> }
|
|
642
|
+
</span>
|
|
643
|
+
}
|
|
644
|
+
<ui-form-section>
|
|
645
|
+
<ui-form-row [cols]="showUnit() ? 3 : 1" class="ai-row-street">
|
|
646
|
+
<ui-text-input [class.ui-span-2]="showUnit()" [label]="streetLabel()" [placeholder]="streetPlaceholder()"
|
|
647
|
+
[required]="_req()" [maxlength]="streetMaxlength()" autocomplete="address-line1"
|
|
648
|
+
[inputTestId]="_p() + 'street'" [inputName]="_p() + 'street'" [ariaDescribedBy]="_describedBy() ?? ''" [showErrors]="_revealed('street')" [readonly]="readonly()" [disabled]="disabled()"
|
|
649
|
+
[error]="_fieldError('street')"
|
|
650
|
+
[ngModel]="_v().street" [ngModelOptions]="_standalone" (ngModelChange)="_set('street', $event)"
|
|
651
|
+
(focusout)="_onFocusOut('street', $event)" />
|
|
652
|
+
@if (showUnit()) {
|
|
653
|
+
<ui-text-input [label]="unitLabel()" [placeholder]="unitPlaceholder()" [maxlength]="unitMaxlength()" autocomplete="address-line2"
|
|
654
|
+
[inputTestId]="_p() + 'apt'" [inputName]="_p() + 'apt'" [showErrors]="_revealed('apt')" [readonly]="readonly()" [disabled]="disabled()"
|
|
655
|
+
[error]="_fieldError('apt')"
|
|
656
|
+
[ngModel]="_v().apt" [ngModelOptions]="_standalone" (ngModelChange)="_set('apt', $event)"
|
|
657
|
+
(focusout)="_onFocusOut('apt', $event)" />
|
|
658
|
+
}
|
|
659
|
+
</ui-form-row>
|
|
660
|
+
<ui-form-row [cols]="4" class="ai-row-csz">
|
|
661
|
+
<ui-text-input class="ui-span-2" [label]="cityLabel()" [placeholder]="cityPlaceholder()"
|
|
662
|
+
[required]="_req()" [maxlength]="cityMaxlength()" autocomplete="address-level2"
|
|
663
|
+
[inputTestId]="_p() + 'city'" [inputName]="_p() + 'city'" [showErrors]="_revealed('city')" [readonly]="readonly()" [disabled]="disabled()"
|
|
664
|
+
[error]="_fieldError('city')"
|
|
665
|
+
[ngModel]="_v().city" [ngModelOptions]="_standalone" (ngModelChange)="_set('city', $event)"
|
|
666
|
+
(focusout)="_onFocusOut('city', $event)" />
|
|
667
|
+
<ui-select [label]="stateLabel()" [options]="_stateOptions()"
|
|
668
|
+
[required]="_req()" [attr.data-testid]="_p() + 'state'" [inputName]="_p() + 'state'" [showErrors]="_revealed('state')"
|
|
669
|
+
[disabled]="disabled() || readonly()" [error]="_fieldError('state')"
|
|
670
|
+
[ngModel]="_v().state.trim()" [ngModelOptions]="_standalone" (ngModelChange)="_set('state', $event)"
|
|
671
|
+
(focusout)="_onFocusOut('state', $event)" />
|
|
672
|
+
<ui-text-input [label]="zipLabel()" [placeholder]="zipPlaceholder()"
|
|
673
|
+
[required]="_req()" [maxlength]="zipMaxlength()" autocomplete="postal-code"
|
|
674
|
+
[inputTestId]="_p() + 'zip'" [inputName]="_p() + 'zip'" [showErrors]="_revealed('zip')" [readonly]="readonly()" [disabled]="disabled()"
|
|
675
|
+
[error]="_fieldError('zip')"
|
|
676
|
+
[ngModel]="_v().zip" [ngModelOptions]="_standalone" (ngModelChange)="_set('zip', $event)"
|
|
677
|
+
(focusout)="_onFocusOut('zip', $event)" />
|
|
678
|
+
</ui-form-row>
|
|
679
|
+
</ui-form-section>
|
|
680
|
+
@if (_shownError()) {
|
|
681
|
+
<ui-error [errorId]="_errorId" [message]="_shownError()" />
|
|
682
|
+
} @else if (hint()) {
|
|
683
|
+
<ui-hint [attr.id]="_hintId">{{ hint() }}</ui-hint>
|
|
684
|
+
}
|
|
685
|
+
</div>
|
|
686
|
+
`,
|
|
687
|
+
isInline: true,
|
|
688
|
+
styles: [":host{display:block}.ai-group{display:flex;flex-direction:column;gap:6px}.ai-legend{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.ai-required{color:#dc2626;margin-left:2px}\n"],
|
|
689
|
+
dependencies: [
|
|
690
|
+
{
|
|
691
|
+
kind: "ngmodule",
|
|
692
|
+
type: FormsModule
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
kind: "directive",
|
|
696
|
+
type: i1.NgControlStatus,
|
|
697
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
kind: "directive",
|
|
701
|
+
type: i1.RequiredValidator,
|
|
702
|
+
selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
|
|
703
|
+
inputs: ["required"]
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
kind: "directive",
|
|
707
|
+
type: i1.MaxLengthValidator,
|
|
708
|
+
selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",
|
|
709
|
+
inputs: ["maxlength"]
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
kind: "directive",
|
|
713
|
+
type: i1.NgModel,
|
|
714
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
715
|
+
inputs: [
|
|
716
|
+
"name",
|
|
717
|
+
"disabled",
|
|
718
|
+
"ngModel",
|
|
719
|
+
"ngModelOptions"
|
|
720
|
+
],
|
|
721
|
+
outputs: ["ngModelChange"],
|
|
722
|
+
exportAs: ["ngModel"]
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
kind: "component",
|
|
726
|
+
type: TextInputComponent,
|
|
727
|
+
selector: "ui-text-input",
|
|
728
|
+
inputs: [
|
|
729
|
+
"label",
|
|
730
|
+
"ariaLabel",
|
|
731
|
+
"inputTestId",
|
|
732
|
+
"inputName",
|
|
733
|
+
"placeholder",
|
|
734
|
+
"prefix",
|
|
735
|
+
"leadingIcon",
|
|
736
|
+
"revealable",
|
|
737
|
+
"passwordRequirements",
|
|
738
|
+
"passwordRules",
|
|
739
|
+
"type",
|
|
740
|
+
"maxlength",
|
|
741
|
+
"required",
|
|
742
|
+
"autocomplete",
|
|
743
|
+
"inputmode",
|
|
744
|
+
"readonly",
|
|
745
|
+
"hint",
|
|
746
|
+
"ariaDescribedBy",
|
|
747
|
+
"ariaInvalid",
|
|
748
|
+
"error",
|
|
749
|
+
"phoneFormat",
|
|
750
|
+
"min",
|
|
751
|
+
"max",
|
|
752
|
+
"maxDecimals",
|
|
753
|
+
"step",
|
|
754
|
+
"valueType",
|
|
755
|
+
"formatter",
|
|
756
|
+
"integer",
|
|
757
|
+
"showErrors",
|
|
758
|
+
"disabled"
|
|
759
|
+
],
|
|
760
|
+
outputs: [
|
|
761
|
+
"valueChange",
|
|
762
|
+
"focused",
|
|
763
|
+
"blurred",
|
|
764
|
+
"invalidChange"
|
|
765
|
+
]
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
kind: "component",
|
|
769
|
+
type: SelectComponent,
|
|
770
|
+
selector: "ui-select",
|
|
771
|
+
inputs: [
|
|
772
|
+
"label",
|
|
773
|
+
"ariaLabel",
|
|
774
|
+
"labelHidden",
|
|
775
|
+
"inputName",
|
|
776
|
+
"placeholder",
|
|
777
|
+
"options",
|
|
778
|
+
"valueType",
|
|
779
|
+
"required",
|
|
780
|
+
"hint",
|
|
781
|
+
"ariaDescribedBy",
|
|
782
|
+
"error",
|
|
783
|
+
"showErrors",
|
|
784
|
+
"size",
|
|
785
|
+
"disabled"
|
|
786
|
+
],
|
|
787
|
+
outputs: ["invalidChange", "valueChange"]
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
kind: "component",
|
|
791
|
+
type: FormSectionComponent,
|
|
792
|
+
selector: "ui-form-section",
|
|
793
|
+
inputs: ["label", "divider"]
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
kind: "component",
|
|
797
|
+
type: FormRowComponent,
|
|
798
|
+
selector: "ui-form-row",
|
|
799
|
+
inputs: ["cols"]
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
kind: "component",
|
|
803
|
+
type: HintComponent,
|
|
804
|
+
selector: "ui-hint"
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
kind: "component",
|
|
808
|
+
type: ErrorComponent,
|
|
809
|
+
selector: "ui-error",
|
|
810
|
+
inputs: ["message", "errorId"]
|
|
811
|
+
}
|
|
812
|
+
],
|
|
813
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
};
|
|
817
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
818
|
+
minVersion: "12.0.0",
|
|
819
|
+
version: "22.2.2",
|
|
820
|
+
ngImport: i0,
|
|
821
|
+
type: AddressInputComponent,
|
|
822
|
+
decorators: [{
|
|
823
|
+
type: Component,
|
|
824
|
+
args: [{
|
|
825
|
+
selector: "ui-address-input",
|
|
826
|
+
standalone: true,
|
|
827
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
828
|
+
imports: [
|
|
829
|
+
FormsModule,
|
|
830
|
+
TextInputComponent,
|
|
831
|
+
SelectComponent,
|
|
832
|
+
FormSectionComponent,
|
|
833
|
+
FormRowComponent,
|
|
834
|
+
HintComponent,
|
|
835
|
+
ErrorComponent
|
|
836
|
+
],
|
|
837
|
+
providers: [
|
|
838
|
+
{
|
|
839
|
+
provide: NG_VALUE_ACCESSOR,
|
|
840
|
+
useExisting: forwardRef(() => AddressInputComponent),
|
|
841
|
+
multi: true
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
provide: NG_VALIDATORS,
|
|
845
|
+
useExisting: forwardRef(() => AddressInputComponent),
|
|
846
|
+
multi: true
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
provide: UiFieldValidity,
|
|
850
|
+
useExisting: forwardRef(() => AddressInputComponent)
|
|
851
|
+
}
|
|
852
|
+
],
|
|
853
|
+
template: `
|
|
854
|
+
<div class="ai-group" role="group"
|
|
855
|
+
[attr.aria-labelledby]="label() ? _legendId : null" [attr.aria-label]="label() ? null : labels.t('addressInput.label')"
|
|
856
|
+
[attr.aria-describedby]="_describedBy()"
|
|
857
|
+
[attr.data-testid]="_p() + 'group'">
|
|
858
|
+
@if (label()) {
|
|
859
|
+
<span class="ai-legend" [id]="_legendId">
|
|
860
|
+
{{ label() }}
|
|
861
|
+
@if (required()) { <span class="ai-required" aria-hidden="true">*</span> }
|
|
862
|
+
</span>
|
|
863
|
+
}
|
|
864
|
+
<ui-form-section>
|
|
865
|
+
<ui-form-row [cols]="showUnit() ? 3 : 1" class="ai-row-street">
|
|
866
|
+
<ui-text-input [class.ui-span-2]="showUnit()" [label]="streetLabel()" [placeholder]="streetPlaceholder()"
|
|
867
|
+
[required]="_req()" [maxlength]="streetMaxlength()" autocomplete="address-line1"
|
|
868
|
+
[inputTestId]="_p() + 'street'" [inputName]="_p() + 'street'" [ariaDescribedBy]="_describedBy() ?? ''" [showErrors]="_revealed('street')" [readonly]="readonly()" [disabled]="disabled()"
|
|
869
|
+
[error]="_fieldError('street')"
|
|
870
|
+
[ngModel]="_v().street" [ngModelOptions]="_standalone" (ngModelChange)="_set('street', $event)"
|
|
871
|
+
(focusout)="_onFocusOut('street', $event)" />
|
|
872
|
+
@if (showUnit()) {
|
|
873
|
+
<ui-text-input [label]="unitLabel()" [placeholder]="unitPlaceholder()" [maxlength]="unitMaxlength()" autocomplete="address-line2"
|
|
874
|
+
[inputTestId]="_p() + 'apt'" [inputName]="_p() + 'apt'" [showErrors]="_revealed('apt')" [readonly]="readonly()" [disabled]="disabled()"
|
|
875
|
+
[error]="_fieldError('apt')"
|
|
876
|
+
[ngModel]="_v().apt" [ngModelOptions]="_standalone" (ngModelChange)="_set('apt', $event)"
|
|
877
|
+
(focusout)="_onFocusOut('apt', $event)" />
|
|
878
|
+
}
|
|
879
|
+
</ui-form-row>
|
|
880
|
+
<ui-form-row [cols]="4" class="ai-row-csz">
|
|
881
|
+
<ui-text-input class="ui-span-2" [label]="cityLabel()" [placeholder]="cityPlaceholder()"
|
|
882
|
+
[required]="_req()" [maxlength]="cityMaxlength()" autocomplete="address-level2"
|
|
883
|
+
[inputTestId]="_p() + 'city'" [inputName]="_p() + 'city'" [showErrors]="_revealed('city')" [readonly]="readonly()" [disabled]="disabled()"
|
|
884
|
+
[error]="_fieldError('city')"
|
|
885
|
+
[ngModel]="_v().city" [ngModelOptions]="_standalone" (ngModelChange)="_set('city', $event)"
|
|
886
|
+
(focusout)="_onFocusOut('city', $event)" />
|
|
887
|
+
<ui-select [label]="stateLabel()" [options]="_stateOptions()"
|
|
888
|
+
[required]="_req()" [attr.data-testid]="_p() + 'state'" [inputName]="_p() + 'state'" [showErrors]="_revealed('state')"
|
|
889
|
+
[disabled]="disabled() || readonly()" [error]="_fieldError('state')"
|
|
890
|
+
[ngModel]="_v().state.trim()" [ngModelOptions]="_standalone" (ngModelChange)="_set('state', $event)"
|
|
891
|
+
(focusout)="_onFocusOut('state', $event)" />
|
|
892
|
+
<ui-text-input [label]="zipLabel()" [placeholder]="zipPlaceholder()"
|
|
893
|
+
[required]="_req()" [maxlength]="zipMaxlength()" autocomplete="postal-code"
|
|
894
|
+
[inputTestId]="_p() + 'zip'" [inputName]="_p() + 'zip'" [showErrors]="_revealed('zip')" [readonly]="readonly()" [disabled]="disabled()"
|
|
895
|
+
[error]="_fieldError('zip')"
|
|
896
|
+
[ngModel]="_v().zip" [ngModelOptions]="_standalone" (ngModelChange)="_set('zip', $event)"
|
|
897
|
+
(focusout)="_onFocusOut('zip', $event)" />
|
|
898
|
+
</ui-form-row>
|
|
899
|
+
</ui-form-section>
|
|
900
|
+
@if (_shownError()) {
|
|
901
|
+
<ui-error [errorId]="_errorId" [message]="_shownError()" />
|
|
902
|
+
} @else if (hint()) {
|
|
903
|
+
<ui-hint [attr.id]="_hintId">{{ hint() }}</ui-hint>
|
|
904
|
+
}
|
|
905
|
+
</div>
|
|
906
|
+
`,
|
|
907
|
+
styles: [":host{display:block}.ai-group{display:flex;flex-direction:column;gap:6px}.ai-legend{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.ai-required{color:#dc2626;margin-left:2px}\n"]
|
|
908
|
+
}]
|
|
909
|
+
}],
|
|
910
|
+
ctorParameters: () => [],
|
|
911
|
+
propDecorators: {
|
|
912
|
+
labelInput: [{
|
|
913
|
+
type: i0.Input,
|
|
914
|
+
args: [{
|
|
915
|
+
isSignal: true,
|
|
916
|
+
alias: "label",
|
|
917
|
+
required: false
|
|
918
|
+
}]
|
|
919
|
+
}],
|
|
920
|
+
required: [{
|
|
921
|
+
type: i0.Input,
|
|
922
|
+
args: [{
|
|
923
|
+
isSignal: true,
|
|
924
|
+
alias: "required",
|
|
925
|
+
required: false
|
|
926
|
+
}]
|
|
927
|
+
}],
|
|
928
|
+
requireComplete: [{
|
|
929
|
+
type: i0.Input,
|
|
930
|
+
args: [{
|
|
931
|
+
isSignal: true,
|
|
932
|
+
alias: "requireComplete",
|
|
933
|
+
required: false
|
|
934
|
+
}]
|
|
935
|
+
}],
|
|
936
|
+
streetLabelInput: [{
|
|
937
|
+
type: i0.Input,
|
|
938
|
+
args: [{
|
|
939
|
+
isSignal: true,
|
|
940
|
+
alias: "streetLabel",
|
|
941
|
+
required: false
|
|
942
|
+
}]
|
|
943
|
+
}],
|
|
944
|
+
unitLabelInput: [{
|
|
945
|
+
type: i0.Input,
|
|
946
|
+
args: [{
|
|
947
|
+
isSignal: true,
|
|
948
|
+
alias: "unitLabel",
|
|
949
|
+
required: false
|
|
950
|
+
}]
|
|
951
|
+
}],
|
|
952
|
+
cityLabelInput: [{
|
|
953
|
+
type: i0.Input,
|
|
954
|
+
args: [{
|
|
955
|
+
isSignal: true,
|
|
956
|
+
alias: "cityLabel",
|
|
957
|
+
required: false
|
|
958
|
+
}]
|
|
959
|
+
}],
|
|
960
|
+
stateLabelInput: [{
|
|
961
|
+
type: i0.Input,
|
|
962
|
+
args: [{
|
|
963
|
+
isSignal: true,
|
|
964
|
+
alias: "stateLabel",
|
|
965
|
+
required: false
|
|
966
|
+
}]
|
|
967
|
+
}],
|
|
968
|
+
zipLabelInput: [{
|
|
969
|
+
type: i0.Input,
|
|
970
|
+
args: [{
|
|
971
|
+
isSignal: true,
|
|
972
|
+
alias: "zipLabel",
|
|
973
|
+
required: false
|
|
974
|
+
}]
|
|
975
|
+
}],
|
|
976
|
+
streetPlaceholderInput: [{
|
|
977
|
+
type: i0.Input,
|
|
978
|
+
args: [{
|
|
979
|
+
isSignal: true,
|
|
980
|
+
alias: "streetPlaceholder",
|
|
981
|
+
required: false
|
|
982
|
+
}]
|
|
983
|
+
}],
|
|
984
|
+
unitPlaceholderInput: [{
|
|
985
|
+
type: i0.Input,
|
|
986
|
+
args: [{
|
|
987
|
+
isSignal: true,
|
|
988
|
+
alias: "unitPlaceholder",
|
|
989
|
+
required: false
|
|
990
|
+
}]
|
|
991
|
+
}],
|
|
992
|
+
cityPlaceholderInput: [{
|
|
993
|
+
type: i0.Input,
|
|
994
|
+
args: [{
|
|
995
|
+
isSignal: true,
|
|
996
|
+
alias: "cityPlaceholder",
|
|
997
|
+
required: false
|
|
998
|
+
}]
|
|
999
|
+
}],
|
|
1000
|
+
zipPlaceholder: [{
|
|
1001
|
+
type: i0.Input,
|
|
1002
|
+
args: [{
|
|
1003
|
+
isSignal: true,
|
|
1004
|
+
alias: "zipPlaceholder",
|
|
1005
|
+
required: false
|
|
1006
|
+
}]
|
|
1007
|
+
}],
|
|
1008
|
+
statePlaceholder: [{
|
|
1009
|
+
type: i0.Input,
|
|
1010
|
+
args: [{
|
|
1011
|
+
isSignal: true,
|
|
1012
|
+
alias: "statePlaceholder",
|
|
1013
|
+
required: false
|
|
1014
|
+
}]
|
|
1015
|
+
}],
|
|
1016
|
+
showUnit: [{
|
|
1017
|
+
type: i0.Input,
|
|
1018
|
+
args: [{
|
|
1019
|
+
isSignal: true,
|
|
1020
|
+
alias: "showUnit",
|
|
1021
|
+
required: false
|
|
1022
|
+
}]
|
|
1023
|
+
}],
|
|
1024
|
+
statesInput: [{
|
|
1025
|
+
type: i0.Input,
|
|
1026
|
+
args: [{
|
|
1027
|
+
isSignal: true,
|
|
1028
|
+
alias: "states",
|
|
1029
|
+
required: false
|
|
1030
|
+
}]
|
|
1031
|
+
}],
|
|
1032
|
+
streetMaxlength: [{
|
|
1033
|
+
type: i0.Input,
|
|
1034
|
+
args: [{
|
|
1035
|
+
isSignal: true,
|
|
1036
|
+
alias: "streetMaxlength",
|
|
1037
|
+
required: false
|
|
1038
|
+
}]
|
|
1039
|
+
}],
|
|
1040
|
+
unitMaxlength: [{
|
|
1041
|
+
type: i0.Input,
|
|
1042
|
+
args: [{
|
|
1043
|
+
isSignal: true,
|
|
1044
|
+
alias: "unitMaxlength",
|
|
1045
|
+
required: false
|
|
1046
|
+
}]
|
|
1047
|
+
}],
|
|
1048
|
+
cityMaxlength: [{
|
|
1049
|
+
type: i0.Input,
|
|
1050
|
+
args: [{
|
|
1051
|
+
isSignal: true,
|
|
1052
|
+
alias: "cityMaxlength",
|
|
1053
|
+
required: false
|
|
1054
|
+
}]
|
|
1055
|
+
}],
|
|
1056
|
+
zipMaxlength: [{
|
|
1057
|
+
type: i0.Input,
|
|
1058
|
+
args: [{
|
|
1059
|
+
isSignal: true,
|
|
1060
|
+
alias: "zipMaxlength",
|
|
1061
|
+
required: false
|
|
1062
|
+
}]
|
|
1063
|
+
}],
|
|
1064
|
+
readonly: [{
|
|
1065
|
+
type: i0.Input,
|
|
1066
|
+
args: [{
|
|
1067
|
+
isSignal: true,
|
|
1068
|
+
alias: "readonly",
|
|
1069
|
+
required: false
|
|
1070
|
+
}]
|
|
1071
|
+
}],
|
|
1072
|
+
showErrors: [{
|
|
1073
|
+
type: i0.Input,
|
|
1074
|
+
args: [{
|
|
1075
|
+
isSignal: true,
|
|
1076
|
+
alias: "showErrors",
|
|
1077
|
+
required: false
|
|
1078
|
+
}]
|
|
1079
|
+
}],
|
|
1080
|
+
hint: [{
|
|
1081
|
+
type: i0.Input,
|
|
1082
|
+
args: [{
|
|
1083
|
+
isSignal: true,
|
|
1084
|
+
alias: "hint",
|
|
1085
|
+
required: false
|
|
1086
|
+
}]
|
|
1087
|
+
}],
|
|
1088
|
+
error: [{
|
|
1089
|
+
type: i0.Input,
|
|
1090
|
+
args: [{
|
|
1091
|
+
isSignal: true,
|
|
1092
|
+
alias: "error",
|
|
1093
|
+
required: false
|
|
1094
|
+
}]
|
|
1095
|
+
}],
|
|
1096
|
+
idPrefix: [{
|
|
1097
|
+
type: i0.Input,
|
|
1098
|
+
args: [{
|
|
1099
|
+
isSignal: true,
|
|
1100
|
+
alias: "idPrefix",
|
|
1101
|
+
required: false
|
|
1102
|
+
}]
|
|
1103
|
+
}],
|
|
1104
|
+
prefix: [{
|
|
1105
|
+
type: i0.Input,
|
|
1106
|
+
args: [{
|
|
1107
|
+
isSignal: true,
|
|
1108
|
+
alias: "prefix",
|
|
1109
|
+
required: false
|
|
1110
|
+
}]
|
|
1111
|
+
}],
|
|
1112
|
+
valueFormat: [{
|
|
1113
|
+
type: i0.Input,
|
|
1114
|
+
args: [{
|
|
1115
|
+
isSignal: true,
|
|
1116
|
+
alias: "valueFormat",
|
|
1117
|
+
required: false
|
|
1118
|
+
}]
|
|
1119
|
+
}],
|
|
1120
|
+
zipPattern: [{
|
|
1121
|
+
type: i0.Input,
|
|
1122
|
+
args: [{
|
|
1123
|
+
isSignal: true,
|
|
1124
|
+
alias: "zipPattern",
|
|
1125
|
+
required: false
|
|
1126
|
+
}]
|
|
1127
|
+
}],
|
|
1128
|
+
zipErrorInput: [{
|
|
1129
|
+
type: i0.Input,
|
|
1130
|
+
args: [{
|
|
1131
|
+
isSignal: true,
|
|
1132
|
+
alias: "zipError",
|
|
1133
|
+
required: false
|
|
1134
|
+
}]
|
|
1135
|
+
}],
|
|
1136
|
+
value: [{
|
|
1137
|
+
type: i0.Input,
|
|
1138
|
+
args: [{
|
|
1139
|
+
isSignal: true,
|
|
1140
|
+
alias: "value",
|
|
1141
|
+
required: false
|
|
1142
|
+
}]
|
|
1143
|
+
}],
|
|
1144
|
+
_disabledInput: [{
|
|
1145
|
+
type: i0.Input,
|
|
1146
|
+
args: [{
|
|
1147
|
+
isSignal: true,
|
|
1148
|
+
alias: "disabled",
|
|
1149
|
+
required: false
|
|
1150
|
+
}]
|
|
1151
|
+
}],
|
|
1152
|
+
valueChange: [{
|
|
1153
|
+
type: i0.Output,
|
|
1154
|
+
args: ["valueChange"]
|
|
1155
|
+
}],
|
|
1156
|
+
invalidChange: [{
|
|
1157
|
+
type: i0.Output,
|
|
1158
|
+
args: ["invalidChange"]
|
|
1159
|
+
}]
|
|
1160
|
+
}
|
|
1161
|
+
});
|
|
1162
|
+
export { AddressInputComponent, US_STATE_OPTIONS, US_ZIP_PATTERN, emptyAddress, formatAddressValue, formatAddressValueOneLine, isEmptyAddress, isValidZip, normalizeAddress, parseAddressOneLine, parseAddressValue };
|
|
1163
|
+
|
|
1164
|
+
//# sourceMappingURL=forgeroute-ui-address-input.mjs.map
|