@forgeroute/ui 0.5.32 → 0.5.33
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-conversations.mjs +1 -0
- package/fesm2022/forgeroute-ui-conversations.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-core.mjs +20 -2
- package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-editor.mjs +1 -0
- package/fesm2022/forgeroute-ui-editor.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-messaging.mjs +1 -0
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-notification-bell.mjs +1 -0
- package/fesm2022/forgeroute-ui-notification-bell.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-offline.mjs +1 -0
- package/fesm2022/forgeroute-ui-offline.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-payments.mjs +3 -0
- package/fesm2022/forgeroute-ui-payments.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-phone-number-picker.mjs +1 -0
- package/fesm2022/forgeroute-ui-phone-number-picker.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stripe.mjs +1 -0
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-core.d.ts +7 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgeroute-ui-phone-number-picker.mjs","names":[],"sources":["../../../projects/forgeroute-ui/phone-number-picker/src/lib/phone-number-picker/phone-number-picker.component.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, afterNextRender, computed, effect, inject, input, output, signal, untracked,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { Observable, Subscription } from 'rxjs';\nimport { SidePanelComponent } from '@forgeroute/ui/core';\nimport { TextInputComponent } from '@forgeroute/ui/text-input';\nimport { RadioGroupComponent, RadioOption } from '@forgeroute/ui/radio';\nimport { ButtonComponent } from '@forgeroute/ui/core';\nimport { AlertComponent } from '@forgeroute/ui/alert';\nimport { BadgeComponent } from '@forgeroute/ui/badge';\nimport { SkeletonComponent } from '@forgeroute/ui/skeleton';\nimport { EmptyStateComponent } from '@forgeroute/ui/empty-state';\nimport { isTouchViewport } from '@forgeroute/ui/core';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n/** One phone number the host found for sale. */\nexport interface PhoneNumberOption {\n /** E.164 number, e.g. '+15125550100'. */\n phoneNumber: string;\n /** What the user sees, e.g. '(512) 555-0100'. */\n friendlyName: string;\n /** City / state label shown as a badge, e.g. 'Austin, TX'. */\n region: string | null;\n}\n\n/** What the host's `search` function receives: exactly one of the two keys. */\nexport interface PhoneNumberSearchCriteria {\n postalCode?: string;\n areaCode?: string;\n}\n\n/** What `selected` emits: the chosen number plus the criteria that found it. */\nexport type PhoneNumberSelection = PhoneNumberOption & PhoneNumberSearchCriteria;\n\nexport type PhoneNumberSearchMode = 'zip' | 'area-code';\n\nexport const PHONE_NUMBER_ZIP_LENGTH = 5;\nexport const PHONE_NUMBER_AREA_CODE_LENGTH = 3;\n\n/** Keeps only digits and cuts to `max` (\"78701-1234\" -> \"78701\"). */\nexport function digitsOnly(value: string | null | undefined, max: number): string {\n return (value ?? '').replace(/\\D/g, '').slice(0, max);\n}\n\n/**\n * Side panel that walks the user through finding and choosing a phone number to buy. The HOST does the searching (the\n * library owns no HTTP and knows nothing about the phone provider): it passes a `search` function that returns the\n * numbers for a ZIP code or an area code.\n *\n * <ui-phone-number-picker\n * [open]=\"showPicker()\"\n * defaultPostalCode=\"78701\"\n * costNotice=\"Each number costs about $1.00/month.\"\n * [search]=\"searchNumbers\"\n * (selected)=\"buy($event)\"\n * (closed)=\"showPicker.set(false)\" />\n *\n * searchNumbers = (c: PhoneNumberSearchCriteria) => this.api.get<PhoneNumberOption[]>('/phone-numbers/available', c);\n *\n * Inputs: `open`, `title` ('Get a Phone Number'), `subtitle`, `defaultPostalCode` (prefilled ZIP, may be empty),\n * `defaultMode` ('zip' | 'area-code'), `allowAreaCode` (true: the user can switch to an area code search), `search`\n * (required), `costNotice` (warning shown on steps 1 and 3), `confirmLabel` ('Get this number'), `maxResults` (5: caps what is shown).\n * Outputs: `selected` (PhoneNumberSelection, only from the final confirm button) and `closed`.\n *\n * Flow (three steps, nothing is ever searched or bought without a click):\n * 1. Confirm location - ZIP code (5 digits) or area code (3 digits), prefilled from `defaultPostalCode`. The primary button\n * \"Confirm ZIP code and search\" is disabled until the value is complete; Enter does the same. Non-digits are ignored while\n * typing, a pasted ZIP+4 keeps its first 5 digits.\n * 2. Results - `search(criteria)` runs ONCE per confirm; a newer search (or closing) drops the older response. Skeleton while\n * loading, an empty state, or an error with Retry. Picking a row only moves on to step 3.\n * 3. Confirm number - \"You chose ...\". Only the final button emits `selected`, then `closed`.\n * Every time `open` becomes true the panel starts again at step 1 with the defaults; closing discards everything.\n * `defaultPostalCode` may arrive after the panel opened (the host loads it asynchronously): while the panel is on step 1 in ZIP\n * mode and the user has NOT typed or pasted in the ZIP field (clearing it counts as an edit), a non-empty default fills the field;\n * typed input is never overwritten, an empty default is ignored, and a default that arrives on step 2 or 3 is applied when the user\n * returns to step 1 only if the field is still untouched.\n * The final confirm emits `selected` at most once per opening (double clicks / repeated Enter are ignored and the button is disabled\n * after the first click). The panel emits `closed` right after `selected`, so the host closes it; reopening re-enables the button.\n *\n * Accessibility: labelled fields with the library's inline errors, focus moves to the first control of each step (a text\n * field is not focused on touch devices so no keyboard pops up), a visually hidden polite live region announces searching,\n * result counts, errors and step changes, Escape closes the panel even from inside a field, 44px touch targets come from the\n * shared components.\n */\n@Component({\n selector: 'ui-phone-number-picker',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ReactiveFormsModule, SidePanelComponent, TextInputComponent, RadioGroupComponent, ButtonComponent, AlertComponent,\n BadgeComponent, SkeletonComponent, EmptyStateComponent,\n ],\n template: `\n <ui-side-panel\n [open]=\"open()\"\n [title]=\"title()\"\n [subtitle]=\"subtitle()\"\n [primaryLabel]=\"primaryLabel()\"\n [primaryDisabled]=\"(step() === 1 && !valid()) || (step() === 3 && confirmed())\"\n (closed)=\"close()\"\n (primaryClick)=\"onPrimary()\">\n\n <div class=\"pn-sr-only\" role=\"status\" aria-live=\"polite\" data-testid=\"pn-live\">{{ announcement() }}</div>\n\n @if (step() === 1) {\n <div class=\"pn-step\" data-testid=\"pn-step-1\">\n @if (costNotice()) {\n <ui-alert variant=\"warning\" data-testid=\"pn-cost-notice\">{{ costNotice() }}</ui-alert>\n }\n @if (allowAreaCode()) {\n <ui-radio-group [label]=\"labels.t('phoneNumberPicker.searchBy')\" orientation=\"horizontal\" [options]=\"modeOptions()\" [formControl]=\"modeCtl\" data-testid=\"pn-mode\" />\n }\n <div (keydown.enter)=\"onEnter($event)\" (beforeinput)=\"onBeforeInput($event)\" (paste)=\"onPaste($event)\">\n @if (mode() === 'zip') {\n <ui-text-input\n [label]=\"labels.t('phoneNumberPicker.zipCode')\" [required]=\"true\" [maxlength]=\"5\" type=\"text\" inputmode=\"numeric\" autocomplete=\"postal-code\"\n placeholder=\"78701\" [formControl]=\"zipCtl\" [error]=\"fieldError()\" [showErrors]=\"touched()\"\n [hint]=\"labels.t('phoneNumberPicker.weLlLookForNumbers')\"\n (blurred)=\"onFieldBlur('zip')\" data-testid=\"pn-zip\" />\n } @else {\n <ui-text-input\n [label]=\"labels.t('phoneNumberPicker.areaCode')\" [required]=\"true\" [maxlength]=\"3\" type=\"text\" inputmode=\"numeric\" autocomplete=\"off\"\n placeholder=\"512\" [formControl]=\"areaCtl\" [error]=\"fieldError()\" [showErrors]=\"touched()\"\n [hint]=\"labels.t('phoneNumberPicker.weLlLookForNumbers2')\"\n (blurred)=\"onFieldBlur('area-code')\" data-testid=\"pn-area\" />\n }\n </div>\n </div>\n }\n\n @if (step() === 2) {\n <div class=\"pn-step\" data-testid=\"pn-step-2\">\n @if (loading()) {\n <div class=\"pn-skeletons\" aria-busy=\"true\" data-testid=\"pn-loading\">\n @for (i of skeletonRows; track i) { <ui-skeleton [height]=\"56\" [radius]=\"10\" /> }\n </div>\n } @else if (searchFailed()) {\n <ui-alert variant=\"danger\" data-testid=\"pn-error\">{{ labels.t('phoneNumberPicker.couldnTSearchForNumbers') }}<ui-button variant=\"secondary\" size=\"sm\" data-testid=\"pn-retry\" (click)=\"retry()\">{{ labels.t('common.retry') }}</ui-button>\n </ui-alert>\n } @else if (visibleResults().length === 0) {\n <ui-empty-state iconType=\"search\" [title]=\"emptyTitle()\" [message]=\"labels.t('phoneNumberPicker.tryADifferentZipCode')\" data-testid=\"pn-empty\" />\n } @else {\n <ul class=\"pn-list\" [attr.aria-label]=\"labels.t('phoneNumberPicker.availablePhoneNumbers')\" data-testid=\"pn-results\">\n @for (opt of visibleResults(); track opt.phoneNumber) {\n <li class=\"pn-row\" data-testid=\"pn-row\">\n <span class=\"pn-name\">{{ opt.friendlyName }}</span>\n @if (opt.region) { <ui-badge [label]=\"opt.region\" variant=\"gray\" /> }\n <ui-button class=\"pn-select\" variant=\"secondary\" size=\"sm\" [ariaLabel]=\"labels.t('phoneNumberPicker.selectNamed', { name: opt.friendlyName })\"\n (click)=\"choose(opt)\">{{ labels.t('common.select') }}</ui-button>\n </li>\n }\n </ul>\n }\n <div class=\"pn-actions\">\n <ui-button variant=\"ghost\" size=\"sm\" data-testid=\"pn-change\" (click)=\"changeLocation()\">{{ changeLabel() }}</ui-button>\n </div>\n </div>\n }\n\n @if (step() === 3 && chosen(); as pick) {\n <div class=\"pn-step\" data-testid=\"pn-step-3\">\n <h3 class=\"pn-chosen\" tabindex=\"-1\" data-pn-heading data-testid=\"pn-chosen\">{{ labels.t('phoneNumberPicker.youChose', { name: pick.friendlyName }) }}</h3>\n <p class=\"pn-criteria\" data-testid=\"pn-criteria\">{{ criteriaText() }}</p>\n @if (pick.region) { <ui-badge [label]=\"pick.region\" variant=\"gray\" /> }\n @if (costNotice()) {\n <ui-alert variant=\"warning\" data-testid=\"pn-cost-notice\">{{ costNotice() }}</ui-alert>\n }\n <div class=\"pn-actions\">\n <ui-button variant=\"ghost\" size=\"sm\" data-testid=\"pn-back\" (click)=\"backToResults()\">{{ labels.t('phoneNumberPicker.backToResults') }}</ui-button>\n </div>\n </div>\n }\n </ui-side-panel>\n `,\n styles: [`\n :host { display: contents; }\n .pn-step { display: flex; flex-direction: column; gap: 16px; }\n .pn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }\n .pn-row {\n display: flex; align-items: center; gap: 10px; padding: 10px 12px;\n border: 1px solid #e2e8f0; border-radius: 10px; background: #fff;\n }\n .pn-name { font-size: 0.9375rem; font-weight: 600; color: #1e293b; flex: 1; min-width: 0; overflow-wrap: anywhere; }\n .pn-select { flex-shrink: 0; }\n .pn-skeletons { display: flex; flex-direction: column; gap: 10px; }\n .pn-actions { display: flex; justify-content: flex-start; }\n .pn-chosen { margin: 0; font-size: 1.125rem; font-weight: 700; color: #1e293b; }\n .pn-chosen:focus { outline: none; }\n .pn-criteria { margin: 0; font-size: 0.875rem; color: #475569; }\n .pn-sr-only {\n position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;\n clip: rect(0, 0, 0, 0); -webkit-clip-path: inset(50%); clip-path: inset(50%); white-space: nowrap; border: 0;\n }\n `],\n})\nexport class PhoneNumberPickerComponent {\n protected readonly labels = inject(UiLabelsService);\n readonly open = input(false);\n readonly titleInput = input<string | null>(null, { alias: 'title' });\n readonly title = computed(() => this.titleInput() ?? this.labels.t('phoneNumberPicker.title'));\n readonly subtitle = input('');\n readonly defaultPostalCode = input('');\n readonly defaultMode = input<PhoneNumberSearchMode>('zip');\n readonly allowAreaCode = input(true);\n /** Host-supplied search. Called once per confirm; the library never fetches by itself. */\n readonly search = input.required<(criteria: PhoneNumberSearchCriteria) => Observable<PhoneNumberOption[]>>();\n readonly costNotice = input('');\n readonly confirmLabelInput = input<string | null>(null, { alias: 'confirmLabel' });\n readonly confirmLabel = computed(() => this.confirmLabelInput() ?? this.labels.t('phoneNumberPicker.confirmLabel'));\n readonly maxResults = input(5);\n\n readonly closed = output<void>();\n readonly selected = output<PhoneNumberSelection>();\n\n protected readonly modeOptions = computed((): RadioOption[] => [\n { value: 'zip', label: this.labels.t('phoneNumberPicker.zip') },\n { value: 'area-code', label: this.labels.t('phoneNumberPicker.areaCodeMode') },\n ]);\n protected readonly skeletonRows = [0, 1, 2];\n\n protected readonly modeCtl = new FormControl<string>('zip', { nonNullable: true });\n protected readonly zipCtl = new FormControl<string>('', { nonNullable: true });\n protected readonly areaCtl = new FormControl<string>('', { nonNullable: true });\n\n protected readonly step = signal<1 | 2 | 3>(1);\n protected readonly mode = signal<PhoneNumberSearchMode>('zip');\n private readonly _zip = signal('');\n private readonly _area = signal('');\n protected readonly touched = signal(false);\n /** True once the user typed / pasted in the ZIP field this opening: a late default never overwrites it. */\n private readonly _zipEdited = signal(false);\n /** True once the final confirm emitted `selected` this opening: further confirms are ignored. */\n protected readonly confirmed = signal(false);\n\n protected readonly loading = signal(false);\n protected readonly searchFailed = signal(false);\n private readonly _results = signal<PhoneNumberOption[]>([]);\n private readonly _criteria = signal<PhoneNumberSearchCriteria | null>(null);\n protected readonly chosen = signal<PhoneNumberOption | null>(null);\n\n private readonly _value = computed(() => (this.mode() === 'zip' ? this._zip() : this._area()));\n private readonly _length = computed(() => (this.mode() === 'zip' ? PHONE_NUMBER_ZIP_LENGTH : PHONE_NUMBER_AREA_CODE_LENGTH));\n protected readonly valid = computed(() => this._value().length === this._length());\n private readonly _fieldName = computed(() => (this.mode() === 'zip' ? this.labels.t('phoneNumberPicker.zip') : this.labels.t('phoneNumberPicker.areaCodeMode')));\n /** Own \"wrong length\" message (empty is left to the input's built-in \"is required\"); only once the field was touched. */\n protected readonly fieldError = computed(() => {\n const v = this._value();\n if (!this.touched() || v.length === 0 || v.length === this._length()) return '';\n return this.labels.t('phoneNumberPicker.mustBeDigits', { field: this._fieldName(), count: this._length() });\n });\n\n protected readonly visibleResults = computed(() => this._results().slice(0, Math.max(0, this.maxResults())));\n protected readonly primaryLabel = computed(() => {\n if (this.step() === 1) return this.mode() === 'zip' ? this.labels.t('phoneNumberPicker.confirmZipAndSearch') : this.labels.t('phoneNumberPicker.confirmAreaAndSearch');\n return this.step() === 3 ? this.confirmLabel() : '';\n });\n protected readonly changeLabel = computed(() => (this._criteria()?.areaCode !== undefined ? this.labels.t('phoneNumberPicker.changeAreaCode') : this.labels.t('phoneNumberPicker.changeZip')));\n protected readonly emptyTitle = computed(() => {\n const c = this._criteria();\n return c?.areaCode !== undefined ? this.labels.t('phoneNumberPicker.noNumbersForArea', { value: c.areaCode }) : this.labels.t('phoneNumberPicker.noNumbersNearZip', { value: c?.postalCode ?? '' });\n });\n protected readonly criteriaText = computed(() => {\n const c = this._criteria();\n return c?.areaCode !== undefined ? this.labels.t('phoneNumberPicker.inAreaCode', { value: c.areaCode }) : this.labels.t('phoneNumberPicker.nearZip', { value: c?.postalCode ?? '' });\n });\n protected readonly announcement = computed(() => {\n if (!this.open()) return '';\n switch (this.step()) {\n case 1: return this.labels.t('phoneNumberPicker.step1');\n case 2: {\n if (this.loading()) return this.labels.t('phoneNumberPicker.searchingNumbers');\n if (this.searchFailed()) return this.labels.t('phoneNumberPicker.couldnTSearchForNumbers');\n const n = this.visibleResults().length;\n return n === 0 ? this.emptyTitle() : this.labels.t(n === 1 ? 'phoneNumberPicker.step2_one' : 'phoneNumberPicker.step2_other', { count: n });\n }\n default: return this.labels.t('phoneNumberPicker.step3', { number: this.chosen()?.friendlyName ?? this.labels.t('phoneNumberPicker.yourNumber') });\n }\n });\n\n private readonly _destroyRef = inject(DestroyRef);\n private readonly _injector = inject(Injector);\n private readonly _el = inject(ElementRef<HTMLElement>);\n private _searchSub: Subscription | null = null;\n\n constructor() {\n this.zipCtl.valueChanges.pipe(takeUntilDestroyed()).subscribe(v => {\n // The text input re-validates (and so re-emits the same value) whenever one of its inputs changes; only a changed value is an edit.\n if (v !== this._zip()) this._zipEdited.set(true);\n this._typed(this.zipCtl, this._zip, v, PHONE_NUMBER_ZIP_LENGTH);\n });\n this.areaCtl.valueChanges.pipe(takeUntilDestroyed()).subscribe(v => this._typed(this.areaCtl, this._area, v, PHONE_NUMBER_AREA_CODE_LENGTH));\n this.modeCtl.valueChanges.pipe(takeUntilDestroyed()).subscribe(v => {\n this.mode.set(v === 'area-code' ? 'area-code' : 'zip');\n this.touched.set(false);\n });\n this._destroyRef.onDestroy(() => this._abort());\n\n // Every open starts fresh with the defaults (read untracked: only `open` triggers a reset); closing drops any search.\n effect(() => {\n if (this.open()) untracked(() => this._reset());\n else untracked(() => this._abort());\n });\n\n // A default ZIP that arrives (or changes) while the panel is open fills an untouched ZIP field on step 1; see the class comment.\n effect(() => {\n const open = this.open();\n const digits = digitsOnly(this.defaultPostalCode(), PHONE_NUMBER_ZIP_LENGTH);\n const step = this.step();\n const mode = this.mode();\n untracked(() => {\n if (!open || step !== 1 || mode !== 'zip' || this._zipEdited() || digits === '' || digits === this._zip()) return;\n this._write(this.zipCtl, this._zip, digits);\n });\n });\n }\n\n // ── Step 1 ──────────────────────────────────────────────────────────────────────────────────────\n protected onPrimary() {\n if (this.step() === 1) this.submit();\n else if (this.step() === 3) this.confirm();\n }\n\n protected onEnter(event: Event) {\n event.preventDefault();\n this.submit();\n }\n\n /** A field that was swapped out by a mode switch blurs while it is removed: that late blur must not mark the new field touched. */\n protected onFieldBlur(from: PhoneNumberSearchMode) {\n if (this.mode() === from) this.touched.set(true);\n }\n\n /** Typing a non-digit is blocked before it reaches the field. */\n protected onBeforeInput(event: Event) {\n const e = event as InputEvent;\n if (e.inputType?.startsWith('insertText') && e.data && /\\D/.test(e.data)) e.preventDefault();\n }\n\n /** A pasted ZIP+4 / formatted text keeps its first 5 (or 3) digits and replaces the field's text. */\n protected onPaste(event: Event) {\n const text = (event as ClipboardEvent).clipboardData?.getData('text') ?? '';\n event.preventDefault();\n if (this.mode() === 'zip') { this._zipEdited.set(true); this._write(this.zipCtl, this._zip, digitsOnly(text, PHONE_NUMBER_ZIP_LENGTH)); }\n else this._write(this.areaCtl, this._area, digitsOnly(text, PHONE_NUMBER_AREA_CODE_LENGTH));\n }\n\n protected submit() {\n if (!this.valid()) { this.touched.set(true); return; }\n const value = this._value();\n this._run(this.mode() === 'zip' ? { postalCode: value } : { areaCode: value });\n }\n\n // ── Step 2 ──────────────────────────────────────────────────────────────────────────────────────\n protected retry() {\n const c = this._criteria();\n if (c) this._run(c);\n }\n\n protected choose(option: PhoneNumberOption) {\n this.chosen.set(option);\n this.step.set(3);\n this._focusStep();\n }\n\n protected changeLocation() {\n this._abort();\n this.step.set(1);\n this._focusStep();\n }\n\n // ── Step 3 ──────────────────────────────────────────────────────────────────────────────────────\n protected backToResults() {\n this.step.set(2);\n this._focusStep();\n }\n\n protected confirm() {\n const option = this.chosen();\n const criteria = this._criteria();\n if (!option || !criteria || this.confirmed()) return;\n this.confirmed.set(true);\n this.selected.emit({ ...option, ...criteria });\n this.closed.emit();\n }\n\n protected close() {\n this.closed.emit();\n }\n\n // ── Internals ───────────────────────────────────────────────────────────────────────────────────\n private _run(criteria: PhoneNumberSearchCriteria) {\n this._abort();\n this._criteria.set(criteria);\n this._results.set([]);\n this.chosen.set(null);\n this.searchFailed.set(false);\n this.loading.set(true);\n this.step.set(2);\n this._searchSub = this.search()(criteria).subscribe({\n next: list => { this._results.set(list ?? []); this.loading.set(false); this._focusStep(); },\n error: () => { this.searchFailed.set(true); this.loading.set(false); },\n });\n this._focusStep();\n }\n\n private _abort() {\n this._searchSub?.unsubscribe();\n this._searchSub = null;\n this.loading.set(false);\n }\n\n private _reset() {\n this._abort();\n const allowArea = this.allowAreaCode();\n const mode: PhoneNumberSearchMode = allowArea && this.defaultMode() === 'area-code' ? 'area-code' : 'zip';\n this.step.set(1);\n this.touched.set(false);\n this._zipEdited.set(false);\n this.confirmed.set(false);\n this._criteria.set(null);\n this._results.set([]);\n this.chosen.set(null);\n this.searchFailed.set(false);\n this.mode.set(mode);\n this.modeCtl.setValue(mode, { emitEvent: false });\n this._write(this.zipCtl, this._zip, digitsOnly(this.defaultPostalCode(), PHONE_NUMBER_ZIP_LENGTH));\n this._write(this.areaCtl, this._area, '');\n }\n\n /** A user edit: sanitise and write back into the field when something was stripped. */\n private _typed(ctl: FormControl<string>, sig: { set(v: string): void }, raw: string, max: number) {\n const clean = digitsOnly(raw, max);\n if (clean !== raw) ctl.setValue(clean, { emitEvent: false });\n sig.set(clean);\n }\n\n private _write(ctl: FormControl<string>, sig: { set(v: string): void }, value: string) {\n ctl.setValue(value, { emitEvent: false });\n sig.set(value);\n }\n\n /** Moves focus to the first control of the step that was just shown. */\n private _focusStep() {\n afterNextRender(() => {\n const root = this._el.nativeElement as HTMLElement;\n const step = this.step();\n let target: HTMLElement | null = null;\n if (step === 1) {\n if (isTouchViewport(root.ownerDocument)) return;\n target = root.querySelector('[data-testid=\"pn-step-1\"] input[type=\"text\"]');\n } else if (step === 2) {\n target = root.querySelector('.pn-select button') ?? root.querySelector('[data-testid=\"pn-change\"] button');\n } else {\n target = root.querySelector('[data-pn-heading]');\n }\n target?.focus();\n }, { injector: this._injector });\n }\n}\n"],"mappings":";;;;;;;;;;;;AAsCA,MAAa,0BAA0B;AACvC,MAAa,gCAAgC;AAG7C,SAAgB,WAAW,OAAkC,KAAW;CACtE,QAAQ,SAAS,GAAA,CAAI,QAAQ,OAAO,EAAE,CAAC,CAAC,MAAM,GAAG,GAAG;AACtD;AAyJA,IAAa,6BAAb,MAAa,2BAA0B;CAyFrC,cAAA;EAxFmB,KAAA,SAAS,OAAO,eAAe;EACzC,KAAA,OAAoB,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAChC,KAAA,aAAa,MAAqB,MAAI;GAAA,GAAA,YAAA,EAAA,WAAA,a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A;KAAA,MAAA;KAAA,MAAE;KAAe,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAc,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;KAAA,SAAA,CAAA,WAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MACjH;KAAc,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAiB,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAmB,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;KAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAyG7C,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EA/GtC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAwB,YACtB;GAAI,iBACC,wBAAwB;GAAM,SACtC;IACP;IAAqB;IAAoB;IAAoB;IAAqB;IAAiB;IACnG;IAAgB;IAAmB;GACpC;GAAA,UACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFT,QAAA,CAAA,q2BAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-phone-number-picker.mjs","names":[],"sources":["../../../projects/forgeroute-ui/phone-number-picker/src/lib/phone-number-picker/phone-number-picker.component.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, afterNextRender, computed, effect, inject, input, output, signal, untracked,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { Observable, Subscription } from 'rxjs';\nimport { SidePanelComponent } from '@forgeroute/ui/core';\nimport { TextInputComponent } from '@forgeroute/ui/text-input';\nimport { RadioGroupComponent, RadioOption } from '@forgeroute/ui/radio';\nimport { ButtonComponent } from '@forgeroute/ui/core';\nimport { AlertComponent } from '@forgeroute/ui/alert';\nimport { BadgeComponent } from '@forgeroute/ui/badge';\nimport { SkeletonComponent } from '@forgeroute/ui/skeleton';\nimport { EmptyStateComponent } from '@forgeroute/ui/empty-state';\nimport { isTouchViewport } from '@forgeroute/ui/core';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n/** One phone number the host found for sale. */\nexport interface PhoneNumberOption {\n /** E.164 number, e.g. '+15125550100'. */\n phoneNumber: string;\n /** What the user sees, e.g. '(512) 555-0100'. */\n friendlyName: string;\n /** City / state label shown as a badge, e.g. 'Austin, TX'. */\n region: string | null;\n}\n\n/** What the host's `search` function receives: exactly one of the two keys. */\nexport interface PhoneNumberSearchCriteria {\n postalCode?: string;\n areaCode?: string;\n}\n\n/** What `selected` emits: the chosen number plus the criteria that found it. */\nexport type PhoneNumberSelection = PhoneNumberOption & PhoneNumberSearchCriteria;\n\nexport type PhoneNumberSearchMode = 'zip' | 'area-code';\n\nexport const PHONE_NUMBER_ZIP_LENGTH = 5;\nexport const PHONE_NUMBER_AREA_CODE_LENGTH = 3;\n\n/** Keeps only digits and cuts to `max` (\"78701-1234\" -> \"78701\"). */\nexport function digitsOnly(value: string | null | undefined, max: number): string {\n return (value ?? '').replace(/\\D/g, '').slice(0, max);\n}\n\n/**\n * Side panel that walks the user through finding and choosing a phone number to buy. The HOST does the searching (the\n * library owns no HTTP and knows nothing about the phone provider): it passes a `search` function that returns the\n * numbers for a ZIP code or an area code.\n *\n * <ui-phone-number-picker\n * [open]=\"showPicker()\"\n * defaultPostalCode=\"78701\"\n * costNotice=\"Each number costs about $1.00/month.\"\n * [search]=\"searchNumbers\"\n * (selected)=\"buy($event)\"\n * (closed)=\"showPicker.set(false)\" />\n *\n * searchNumbers = (c: PhoneNumberSearchCriteria) => this.api.get<PhoneNumberOption[]>('/phone-numbers/available', c);\n *\n * Inputs: `open`, `title` ('Get a Phone Number'), `subtitle`, `defaultPostalCode` (prefilled ZIP, may be empty),\n * `defaultMode` ('zip' | 'area-code'), `allowAreaCode` (true: the user can switch to an area code search), `search`\n * (required), `costNotice` (warning shown on steps 1 and 3), `confirmLabel` ('Get this number'), `maxResults` (5: caps what is shown).\n * Outputs: `selected` (PhoneNumberSelection, only from the final confirm button) and `closed`.\n *\n * Flow (three steps, nothing is ever searched or bought without a click):\n * 1. Confirm location - ZIP code (5 digits) or area code (3 digits), prefilled from `defaultPostalCode`. The primary button\n * \"Confirm ZIP code and search\" is disabled until the value is complete; Enter does the same. Non-digits are ignored while\n * typing, a pasted ZIP+4 keeps its first 5 digits.\n * 2. Results - `search(criteria)` runs ONCE per confirm; a newer search (or closing) drops the older response. Skeleton while\n * loading, an empty state, or an error with Retry. Picking a row only moves on to step 3.\n * 3. Confirm number - \"You chose ...\". Only the final button emits `selected`, then `closed`.\n * Every time `open` becomes true the panel starts again at step 1 with the defaults; closing discards everything.\n * `defaultPostalCode` may arrive after the panel opened (the host loads it asynchronously): while the panel is on step 1 in ZIP\n * mode and the user has NOT typed or pasted in the ZIP field (clearing it counts as an edit), a non-empty default fills the field;\n * typed input is never overwritten, an empty default is ignored, and a default that arrives on step 2 or 3 is applied when the user\n * returns to step 1 only if the field is still untouched.\n * The final confirm emits `selected` at most once per opening (double clicks / repeated Enter are ignored and the button is disabled\n * after the first click). The panel emits `closed` right after `selected`, so the host closes it; reopening re-enables the button.\n *\n * Accessibility: labelled fields with the library's inline errors, focus moves to the first control of each step (a text\n * field is not focused on touch devices so no keyboard pops up), a visually hidden polite live region announces searching,\n * result counts, errors and step changes, Escape closes the panel even from inside a field, 44px touch targets come from the\n * shared components.\n */\n@Component({\n selector: 'ui-phone-number-picker',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ReactiveFormsModule, SidePanelComponent, TextInputComponent, RadioGroupComponent, ButtonComponent, AlertComponent,\n BadgeComponent, SkeletonComponent, EmptyStateComponent,\n ],\n template: `\n <ui-side-panel\n [open]=\"open()\"\n [title]=\"title()\"\n [subtitle]=\"subtitle()\"\n [primaryLabel]=\"primaryLabel()\"\n [primaryDisabled]=\"(step() === 1 && !valid()) || (step() === 3 && confirmed())\"\n (closed)=\"close()\"\n (primaryClick)=\"onPrimary()\">\n\n <div class=\"pn-sr-only\" role=\"status\" aria-live=\"polite\" data-testid=\"pn-live\">{{ announcement() }}</div>\n\n @if (step() === 1) {\n <div class=\"pn-step\" data-testid=\"pn-step-1\">\n @if (costNotice()) {\n <ui-alert variant=\"warning\" data-testid=\"pn-cost-notice\">{{ costNotice() }}</ui-alert>\n }\n @if (allowAreaCode()) {\n <ui-radio-group [label]=\"labels.t('phoneNumberPicker.searchBy')\" orientation=\"horizontal\" [options]=\"modeOptions()\" [formControl]=\"modeCtl\" data-testid=\"pn-mode\" />\n }\n <div (keydown.enter)=\"onEnter($event)\" (beforeinput)=\"onBeforeInput($event)\" (paste)=\"onPaste($event)\">\n @if (mode() === 'zip') {\n <ui-text-input\n [label]=\"labels.t('phoneNumberPicker.zipCode')\" [required]=\"true\" [maxlength]=\"5\" type=\"text\" inputmode=\"numeric\" autocomplete=\"postal-code\"\n placeholder=\"78701\" [formControl]=\"zipCtl\" [error]=\"fieldError()\" [showErrors]=\"touched()\"\n [hint]=\"labels.t('phoneNumberPicker.weLlLookForNumbers')\"\n (blurred)=\"onFieldBlur('zip')\" data-testid=\"pn-zip\" />\n } @else {\n <ui-text-input\n [label]=\"labels.t('phoneNumberPicker.areaCode')\" [required]=\"true\" [maxlength]=\"3\" type=\"text\" inputmode=\"numeric\" autocomplete=\"off\"\n placeholder=\"512\" [formControl]=\"areaCtl\" [error]=\"fieldError()\" [showErrors]=\"touched()\"\n [hint]=\"labels.t('phoneNumberPicker.weLlLookForNumbers2')\"\n (blurred)=\"onFieldBlur('area-code')\" data-testid=\"pn-area\" />\n }\n </div>\n </div>\n }\n\n @if (step() === 2) {\n <div class=\"pn-step\" data-testid=\"pn-step-2\">\n @if (loading()) {\n <div class=\"pn-skeletons\" aria-busy=\"true\" data-testid=\"pn-loading\">\n @for (i of skeletonRows; track i) { <ui-skeleton [height]=\"56\" [radius]=\"10\" /> }\n </div>\n } @else if (searchFailed()) {\n <ui-alert variant=\"danger\" data-testid=\"pn-error\">{{ labels.t('phoneNumberPicker.couldnTSearchForNumbers') }}<ui-button variant=\"secondary\" size=\"sm\" data-testid=\"pn-retry\" (click)=\"retry()\">{{ labels.t('common.retry') }}</ui-button>\n </ui-alert>\n } @else if (visibleResults().length === 0) {\n <ui-empty-state iconType=\"search\" [title]=\"emptyTitle()\" [message]=\"labels.t('phoneNumberPicker.tryADifferentZipCode')\" data-testid=\"pn-empty\" />\n } @else {\n <ul class=\"pn-list\" [attr.aria-label]=\"labels.t('phoneNumberPicker.availablePhoneNumbers')\" data-testid=\"pn-results\">\n @for (opt of visibleResults(); track opt.phoneNumber) {\n <li class=\"pn-row\" data-testid=\"pn-row\">\n <span class=\"pn-name\">{{ opt.friendlyName }}</span>\n @if (opt.region) { <ui-badge [label]=\"opt.region\" variant=\"gray\" /> }\n <ui-button class=\"pn-select\" variant=\"secondary\" size=\"sm\" [ariaLabel]=\"labels.t('phoneNumberPicker.selectNamed', { name: opt.friendlyName })\"\n (click)=\"choose(opt)\">{{ labels.t('common.select') }}</ui-button>\n </li>\n }\n </ul>\n }\n <div class=\"pn-actions\">\n <ui-button variant=\"ghost\" size=\"sm\" data-testid=\"pn-change\" (click)=\"changeLocation()\">{{ changeLabel() }}</ui-button>\n </div>\n </div>\n }\n\n @if (step() === 3 && chosen(); as pick) {\n <div class=\"pn-step\" data-testid=\"pn-step-3\">\n <h3 class=\"pn-chosen\" tabindex=\"-1\" data-pn-heading data-testid=\"pn-chosen\">{{ labels.t('phoneNumberPicker.youChose', { name: pick.friendlyName }) }}</h3>\n <p class=\"pn-criteria\" data-testid=\"pn-criteria\">{{ criteriaText() }}</p>\n @if (pick.region) { <ui-badge [label]=\"pick.region\" variant=\"gray\" /> }\n @if (costNotice()) {\n <ui-alert variant=\"warning\" data-testid=\"pn-cost-notice\">{{ costNotice() }}</ui-alert>\n }\n <div class=\"pn-actions\">\n <ui-button variant=\"ghost\" size=\"sm\" data-testid=\"pn-back\" (click)=\"backToResults()\">{{ labels.t('phoneNumberPicker.backToResults') }}</ui-button>\n </div>\n </div>\n }\n </ui-side-panel>\n `,\n styles: [`\n :host { display: contents; }\n .pn-step { display: flex; flex-direction: column; gap: 16px; }\n .pn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }\n .pn-row {\n display: flex; align-items: center; gap: 10px; padding: 10px 12px;\n border: 1px solid #e2e8f0; border-radius: 10px; background: #fff;\n }\n .pn-name { font-size: 0.9375rem; font-weight: 600; color: #1e293b; flex: 1; min-width: 0; overflow-wrap: anywhere; }\n .pn-select { flex-shrink: 0; }\n .pn-skeletons { display: flex; flex-direction: column; gap: 10px; }\n .pn-actions { display: flex; justify-content: flex-start; }\n .pn-chosen { margin: 0; font-size: 1.125rem; font-weight: 700; color: #1e293b; }\n .pn-chosen:focus { outline: none; }\n .pn-criteria { margin: 0; font-size: 0.875rem; color: #475569; }\n .pn-sr-only {\n position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;\n clip: rect(0, 0, 0, 0); -webkit-clip-path: inset(50%); clip-path: inset(50%); white-space: nowrap; border: 0;\n }\n `],\n})\nexport class PhoneNumberPickerComponent {\n protected readonly labels = inject(UiLabelsService);\n readonly open = input(false);\n readonly titleInput = input<string | null>(null, { alias: 'title' });\n readonly title = computed(() => this.titleInput() ?? this.labels.t('phoneNumberPicker.title'));\n readonly subtitle = input('');\n readonly defaultPostalCode = input('');\n readonly defaultMode = input<PhoneNumberSearchMode>('zip');\n readonly allowAreaCode = input(true);\n /** Host-supplied search. Called once per confirm; the library never fetches by itself. */\n readonly search = input.required<(criteria: PhoneNumberSearchCriteria) => Observable<PhoneNumberOption[]>>();\n readonly costNotice = input('');\n readonly confirmLabelInput = input<string | null>(null, { alias: 'confirmLabel' });\n readonly confirmLabel = computed(() => this.confirmLabelInput() ?? this.labels.t('phoneNumberPicker.confirmLabel'));\n readonly maxResults = input(5);\n\n readonly closed = output<void>();\n readonly selected = output<PhoneNumberSelection>();\n\n protected readonly modeOptions = computed((): RadioOption[] => [\n { value: 'zip', label: this.labels.t('phoneNumberPicker.zip') },\n { value: 'area-code', label: this.labels.t('phoneNumberPicker.areaCodeMode') },\n ]);\n protected readonly skeletonRows = [0, 1, 2];\n\n protected readonly modeCtl = new FormControl<string>('zip', { nonNullable: true });\n protected readonly zipCtl = new FormControl<string>('', { nonNullable: true });\n protected readonly areaCtl = new FormControl<string>('', { nonNullable: true });\n\n protected readonly step = signal<1 | 2 | 3>(1);\n protected readonly mode = signal<PhoneNumberSearchMode>('zip');\n private readonly _zip = signal('');\n private readonly _area = signal('');\n protected readonly touched = signal(false);\n /** True once the user typed / pasted in the ZIP field this opening: a late default never overwrites it. */\n private readonly _zipEdited = signal(false);\n /** True once the final confirm emitted `selected` this opening: further confirms are ignored. */\n protected readonly confirmed = signal(false);\n\n protected readonly loading = signal(false);\n protected readonly searchFailed = signal(false);\n private readonly _results = signal<PhoneNumberOption[]>([]);\n private readonly _criteria = signal<PhoneNumberSearchCriteria | null>(null);\n protected readonly chosen = signal<PhoneNumberOption | null>(null);\n\n private readonly _value = computed(() => (this.mode() === 'zip' ? this._zip() : this._area()));\n private readonly _length = computed(() => (this.mode() === 'zip' ? PHONE_NUMBER_ZIP_LENGTH : PHONE_NUMBER_AREA_CODE_LENGTH));\n protected readonly valid = computed(() => this._value().length === this._length());\n private readonly _fieldName = computed(() => (this.mode() === 'zip' ? this.labels.t('phoneNumberPicker.zip') : this.labels.t('phoneNumberPicker.areaCodeMode')));\n /** Own \"wrong length\" message (empty is left to the input's built-in \"is required\"); only once the field was touched. */\n protected readonly fieldError = computed(() => {\n const v = this._value();\n if (!this.touched() || v.length === 0 || v.length === this._length()) return '';\n return this.labels.t('phoneNumberPicker.mustBeDigits', { field: this._fieldName(), count: this._length() });\n });\n\n protected readonly visibleResults = computed(() => this._results().slice(0, Math.max(0, this.maxResults())));\n protected readonly primaryLabel = computed(() => {\n if (this.step() === 1) return this.mode() === 'zip' ? this.labels.t('phoneNumberPicker.confirmZipAndSearch') : this.labels.t('phoneNumberPicker.confirmAreaAndSearch');\n return this.step() === 3 ? this.confirmLabel() : '';\n });\n protected readonly changeLabel = computed(() => (this._criteria()?.areaCode !== undefined ? this.labels.t('phoneNumberPicker.changeAreaCode') : this.labels.t('phoneNumberPicker.changeZip')));\n protected readonly emptyTitle = computed(() => {\n const c = this._criteria();\n return c?.areaCode !== undefined ? this.labels.t('phoneNumberPicker.noNumbersForArea', { value: c.areaCode }) : this.labels.t('phoneNumberPicker.noNumbersNearZip', { value: c?.postalCode ?? '' });\n });\n protected readonly criteriaText = computed(() => {\n const c = this._criteria();\n return c?.areaCode !== undefined ? this.labels.t('phoneNumberPicker.inAreaCode', { value: c.areaCode }) : this.labels.t('phoneNumberPicker.nearZip', { value: c?.postalCode ?? '' });\n });\n protected readonly announcement = computed(() => {\n if (!this.open()) return '';\n switch (this.step()) {\n case 1: return this.labels.t('phoneNumberPicker.step1');\n case 2: {\n if (this.loading()) return this.labels.t('phoneNumberPicker.searchingNumbers');\n if (this.searchFailed()) return this.labels.t('phoneNumberPicker.couldnTSearchForNumbers');\n const n = this.visibleResults().length;\n return n === 0 ? this.emptyTitle() : this.labels.t(n === 1 ? 'phoneNumberPicker.step2_one' : 'phoneNumberPicker.step2_other', { count: n });\n }\n default: return this.labels.t('phoneNumberPicker.step3', { number: this.chosen()?.friendlyName ?? this.labels.t('phoneNumberPicker.yourNumber') });\n }\n });\n\n private readonly _destroyRef = inject(DestroyRef);\n private readonly _injector = inject(Injector);\n private readonly _el = inject(ElementRef<HTMLElement>);\n private _searchSub: Subscription | null = null;\n\n constructor() {\n this.zipCtl.valueChanges.pipe(takeUntilDestroyed()).subscribe(v => {\n // The text input re-validates (and so re-emits the same value) whenever one of its inputs changes; only a changed value is an edit.\n if (v !== this._zip()) this._zipEdited.set(true);\n this._typed(this.zipCtl, this._zip, v, PHONE_NUMBER_ZIP_LENGTH);\n });\n this.areaCtl.valueChanges.pipe(takeUntilDestroyed()).subscribe(v => this._typed(this.areaCtl, this._area, v, PHONE_NUMBER_AREA_CODE_LENGTH));\n this.modeCtl.valueChanges.pipe(takeUntilDestroyed()).subscribe(v => {\n this.mode.set(v === 'area-code' ? 'area-code' : 'zip');\n this.touched.set(false);\n });\n this._destroyRef.onDestroy(() => this._abort());\n\n // Every open starts fresh with the defaults (read untracked: only `open` triggers a reset); closing drops any search.\n effect(() => {\n if (this.open()) untracked(() => this._reset());\n else untracked(() => this._abort());\n });\n\n // A default ZIP that arrives (or changes) while the panel is open fills an untouched ZIP field on step 1; see the class comment.\n effect(() => {\n const open = this.open();\n const digits = digitsOnly(this.defaultPostalCode(), PHONE_NUMBER_ZIP_LENGTH);\n const step = this.step();\n const mode = this.mode();\n untracked(() => {\n if (!open || step !== 1 || mode !== 'zip' || this._zipEdited() || digits === '' || digits === this._zip()) return;\n this._write(this.zipCtl, this._zip, digits);\n });\n });\n }\n\n // ── Step 1 ──────────────────────────────────────────────────────────────────────────────────────\n protected onPrimary() {\n if (this.step() === 1) this.submit();\n else if (this.step() === 3) this.confirm();\n }\n\n protected onEnter(event: Event) {\n event.preventDefault();\n this.submit();\n }\n\n /** A field that was swapped out by a mode switch blurs while it is removed: that late blur must not mark the new field touched. */\n protected onFieldBlur(from: PhoneNumberSearchMode) {\n if (this.mode() === from) this.touched.set(true);\n }\n\n /** Typing a non-digit is blocked before it reaches the field. */\n protected onBeforeInput(event: Event) {\n const e = event as InputEvent;\n if (e.inputType?.startsWith('insertText') && e.data && /\\D/.test(e.data)) e.preventDefault();\n }\n\n /** A pasted ZIP+4 / formatted text keeps its first 5 (or 3) digits and replaces the field's text. */\n protected onPaste(event: Event) {\n const text = (event as ClipboardEvent).clipboardData?.getData('text') ?? '';\n event.preventDefault();\n if (this.mode() === 'zip') { this._zipEdited.set(true); this._write(this.zipCtl, this._zip, digitsOnly(text, PHONE_NUMBER_ZIP_LENGTH)); }\n else this._write(this.areaCtl, this._area, digitsOnly(text, PHONE_NUMBER_AREA_CODE_LENGTH));\n }\n\n protected submit() {\n if (!this.valid()) { this.touched.set(true); return; }\n const value = this._value();\n this._run(this.mode() === 'zip' ? { postalCode: value } : { areaCode: value });\n }\n\n // ── Step 2 ──────────────────────────────────────────────────────────────────────────────────────\n protected retry() {\n const c = this._criteria();\n if (c) this._run(c);\n }\n\n protected choose(option: PhoneNumberOption) {\n this.chosen.set(option);\n this.step.set(3);\n this._focusStep();\n }\n\n protected changeLocation() {\n this._abort();\n this.step.set(1);\n this._focusStep();\n }\n\n // ── Step 3 ──────────────────────────────────────────────────────────────────────────────────────\n protected backToResults() {\n this.step.set(2);\n this._focusStep();\n }\n\n protected confirm() {\n const option = this.chosen();\n const criteria = this._criteria();\n if (!option || !criteria || this.confirmed()) return;\n this.confirmed.set(true);\n this.selected.emit({ ...option, ...criteria });\n this.closed.emit();\n }\n\n protected close() {\n this.closed.emit();\n }\n\n // ── Internals ───────────────────────────────────────────────────────────────────────────────────\n private _run(criteria: PhoneNumberSearchCriteria) {\n this._abort();\n this._criteria.set(criteria);\n this._results.set([]);\n this.chosen.set(null);\n this.searchFailed.set(false);\n this.loading.set(true);\n this.step.set(2);\n this._searchSub = this.search()(criteria).subscribe({\n next: list => { this._results.set(list ?? []); this.loading.set(false); this._focusStep(); },\n error: () => { this.searchFailed.set(true); this.loading.set(false); },\n });\n this._focusStep();\n }\n\n private _abort() {\n this._searchSub?.unsubscribe();\n this._searchSub = null;\n this.loading.set(false);\n }\n\n private _reset() {\n this._abort();\n const allowArea = this.allowAreaCode();\n const mode: PhoneNumberSearchMode = allowArea && this.defaultMode() === 'area-code' ? 'area-code' : 'zip';\n this.step.set(1);\n this.touched.set(false);\n this._zipEdited.set(false);\n this.confirmed.set(false);\n this._criteria.set(null);\n this._results.set([]);\n this.chosen.set(null);\n this.searchFailed.set(false);\n this.mode.set(mode);\n this.modeCtl.setValue(mode, { emitEvent: false });\n this._write(this.zipCtl, this._zip, digitsOnly(this.defaultPostalCode(), PHONE_NUMBER_ZIP_LENGTH));\n this._write(this.areaCtl, this._area, '');\n }\n\n /** A user edit: sanitise and write back into the field when something was stripped. */\n private _typed(ctl: FormControl<string>, sig: { set(v: string): void }, raw: string, max: number) {\n const clean = digitsOnly(raw, max);\n if (clean !== raw) ctl.setValue(clean, { emitEvent: false });\n sig.set(clean);\n }\n\n private _write(ctl: FormControl<string>, sig: { set(v: string): void }, value: string) {\n ctl.setValue(value, { emitEvent: false });\n sig.set(value);\n }\n\n /** Moves focus to the first control of the step that was just shown. */\n private _focusStep() {\n afterNextRender(() => {\n const root = this._el.nativeElement as HTMLElement;\n const step = this.step();\n let target: HTMLElement | null = null;\n if (step === 1) {\n if (isTouchViewport(root.ownerDocument)) return;\n target = root.querySelector('[data-testid=\"pn-step-1\"] input[type=\"text\"]');\n } else if (step === 2) {\n target = root.querySelector('.pn-select button') ?? root.querySelector('[data-testid=\"pn-change\"] button');\n } else {\n target = root.querySelector('[data-pn-heading]');\n }\n target?.focus();\n }, { injector: this._injector });\n }\n}\n"],"mappings":";;;;;;;;;;;;AAsCA,MAAa,0BAA0B;AACvC,MAAa,gCAAgC;AAG7C,SAAgB,WAAW,OAAkC,KAAW;CACtE,QAAQ,SAAS,GAAA,CAAI,QAAQ,OAAO,EAAE,CAAC,CAAC,MAAM,GAAG,GAAG;AACtD;AAyJA,IAAa,6BAAb,MAAa,2BAA0B;CAyFrC,cAAA;EAxFm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,CAAA"}
|
|
@@ -12050,6 +12050,7 @@ var StripeReaderOrderPanelComponent = class StripeReaderOrderPanelComponent {
|
|
|
12050
12050
|
"subtitle",
|
|
12051
12051
|
"wide",
|
|
12052
12052
|
"extraWide",
|
|
12053
|
+
"ultraWide",
|
|
12053
12054
|
"cancelLabel",
|
|
12054
12055
|
"primaryLabel",
|
|
12055
12056
|
"primaryVariant",
|