@forgeroute/ui 0.5.30 → 0.5.32
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-address-input.mjs +10 -2
- package/fesm2022/forgeroute-ui-address-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-core.mjs +4 -4
- package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-data-table-core.mjs +21 -7
- package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-form-row.mjs +54 -18
- package/fesm2022/forgeroute-ui-form-row.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-form-section.mjs +32 -4
- package/fesm2022/forgeroute-ui-form-section.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-kpi-card.mjs +20 -4
- package/fesm2022/forgeroute-ui-kpi-card.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-list-item.mjs +2 -2
- package/fesm2022/forgeroute-ui-list-item.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-map.mjs +10 -2
- package/fesm2022/forgeroute-ui-map.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-messaging.mjs +30 -6
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-payments.mjs +26 -5
- package/fesm2022/forgeroute-ui-payments.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-quickbooks.mjs +11 -2
- package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-share-menu.mjs +46 -15
- package/fesm2022/forgeroute-ui-share-menu.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-square.mjs +1 -0
- package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stripe.mjs +21 -4
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-core.d.ts +8 -7
- package/types/forgeroute-ui-data-table-core.d.ts +5 -0
- package/types/forgeroute-ui-form-row.d.ts +14 -0
- package/types/forgeroute-ui-form-section.d.ts +8 -1
- package/types/forgeroute-ui-kpi-card.d.ts +7 -0
- package/types/forgeroute-ui-list-item.d.ts +1 -1
- package/types/forgeroute-ui-share-menu.d.ts +20 -11
- package/types/forgeroute-ui-table-types.d.ts +7 -0
|
@@ -790,13 +790,21 @@ var AddressInputComponent = class AddressInputComponent {
|
|
|
790
790
|
kind: "component",
|
|
791
791
|
type: FormSectionComponent,
|
|
792
792
|
selector: "ui-form-section",
|
|
793
|
-
inputs: [
|
|
793
|
+
inputs: [
|
|
794
|
+
"label",
|
|
795
|
+
"divider",
|
|
796
|
+
"hint"
|
|
797
|
+
]
|
|
794
798
|
},
|
|
795
799
|
{
|
|
796
800
|
kind: "component",
|
|
797
801
|
type: FormRowComponent,
|
|
798
802
|
selector: "ui-form-row",
|
|
799
|
-
inputs: [
|
|
803
|
+
inputs: [
|
|
804
|
+
"cols",
|
|
805
|
+
"autoLast",
|
|
806
|
+
"align"
|
|
807
|
+
]
|
|
800
808
|
},
|
|
801
809
|
{
|
|
802
810
|
kind: "component",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgeroute-ui-address-input.mjs","names":[],"sources":["../../../projects/forgeroute-ui/address-input/src/lib/address-input/address-input.models.ts","../../../projects/forgeroute-ui/address-input/src/lib/address-input/address-input.component.ts"],"sourcesContent":["import type { SelectOption } from '@forgeroute/ui/select';\nimport { US_STATES } from '@forgeroute/ui/utils';\n\n/**\n * The value of `ui-address-input`: five plain strings (never null). `apt` is the second line (apartment / suite / unit).\n *\n * Note: the library already exports `formatAddress(parts, options)` / `AddressParts` (utils/format) for display of an address with\n * city / state / zip parts. The helpers below work on this value model and are therefore named `...AddressValue`.\n */\nexport interface AddressValue {\n street: string;\n apt: string;\n city: string;\n state: string;\n zip: string;\n}\n\n/** The 50 US states + DC as select options: value = 2-letter code, label = the code (compact, fits the narrow State column), description = the state name (read by screen readers, shown under the select). */\nexport const US_STATE_OPTIONS: readonly SelectOption[] = US_STATES.map(s => ({ value: s.value, label: s.value, description: s.label }));\n\n/** A fresh blank address. */\nexport function emptyAddress(): AddressValue {\n return { street: '', apt: '', city: '', state: '', zip: '' };\n}\n\n/** Coerces anything (null, a partial object, non-string members) to a complete `AddressValue` of strings. */\nexport function normalizeAddress(v: Partial<Record<keyof AddressValue, unknown>> | null | undefined): AddressValue {\n const s = (x: unknown): string => (x == null ? '' : String(x));\n return v && typeof v === 'object'\n ? { street: s(v.street), apt: s(v.apt), city: s(v.city), state: s(v.state), zip: s(v.zip) }\n : emptyAddress();\n}\n\n/** True when every part is empty or whitespace (null / undefined count as empty). */\nexport function isEmptyAddress(a: Partial<Record<keyof AddressValue, unknown>> | null | undefined): boolean {\n const n = normalizeAddress(a);\n return !n.street.trim() && !n.apt.trim() && !n.city.trim() && !n.state.trim() && !n.zip.trim();\n}\n\n/** The default ZIP rule of the component: US 5 digits or 5+4. */\nexport const US_ZIP_PATTERN = /^\\d{5}(?:-\\d{4})?$/;\n\n/** Joins \"City\", \"ST\" and ZIP: \"Austin, TX 78701\" (comma true) or \"Austin TX 78701\" (comma false). Parts are trimmed, empty ones left out. */\nfunction cityStateZip(a: AddressValue, comma: boolean): string {\n const cityState = [a.city.trim(), a.state.trim()].filter(Boolean).join(comma ? ', ' : ' ');\n return [cityState, a.zip.trim()].filter(Boolean).join(' ');\n}\n\n/**\n * Multi-line text, the storage form used by apps: street, apt, then \"City, ST 12345\", joined with \"\\n\". Every part is trimmed and empty\n * parts are left out, so `parseAddressValue(formatAddressValue(x))` is stable.\n * `{street:'1 Main', apt:'Apt 4', city:'Austin', state:'TX', zip:'78701'}` -> `\"1 Main\\nApt 4\\nAustin, TX 78701\"`.\n */\nexport function formatAddressValue(a: AddressValue | null | undefined): string {\n const n = normalizeAddress(a);\n const parts: string[] = [];\n if (n.street.trim()) parts.push(n.street.trim());\n if (n.apt.trim()) parts.push(n.apt.trim());\n const line2 = cityStateZip(n, true);\n if (line2) parts.push(line2);\n return parts.join('\\n');\n}\n\n/**\n * The same address on ONE line for tables, labels and maps: \"1 Main, Apt 4, Austin, TX 78701\". `{ comma: false }` drops the comma between\n * city and state (\"1 Main, Apt 4, Austin TX 78701\", the older mfh resident style). Empty parts are left out.\n */\nexport function formatAddressValueOneLine(a: AddressValue | null | undefined, options: { comma?: boolean } = {}): string {\n const n = normalizeAddress(a);\n return [n.street.trim(), n.apt.trim(), cityStateZip(n, options.comma !== false)].filter(Boolean).join(', ');\n}\n\nconst ZIP = '\\\\d{5}(?:-\\\\d{4})?';\n/** City line \"Austin, TX 78701\" / \"Austin TX 78701\" / \"Austin,TX 78701-1234\" / \"TX 78701\" (state in capitals). */\nconst CSZ_RE = new RegExp(`^(?:(.*?)[,\\\\s]+)?([A-Z]{2})\\\\s+(${ZIP})$`);\n/** City line with a comma and a state in any case: \"austin, tx 78701\". */\nconst CSZ_COMMA_RE = new RegExp(`^(.+?)\\\\s*,\\\\s*([A-Za-z]{2})\\\\s+(${ZIP})$`);\n/** \"Austin, TX\" (comma required so a plain two-letter word is not taken for a state; capitals only). */\nconst CS_RE = /^(.+?)\\s*,\\s*([A-Z]{2})$/;\n/** Last segment of a one-line address: \"TX 78701\" or (without a comma) \"Austin TX 78701\". */\nconst TAIL_RE = new RegExp(`^(?:(.+?)\\\\s+)?([A-Z]{2})\\\\s+(${ZIP})$`);\n\nfunction splitCityStateLine(line: string): Pick<AddressValue, 'city' | 'state' | 'zip'> {\n const trimmed = line.replace(/[\\s.,;]+$/, ''); // \"Austin, TX 78701.\" / \"...78701,\"\n const m = CSZ_RE.exec(trimmed);\n if (m) return { city: (m[1] ?? '').trim(), state: m[2], zip: m[3] };\n const c = CSZ_COMMA_RE.exec(trimmed);\n if (c) return { city: c[1].trim(), state: c[2].toUpperCase(), zip: c[3] };\n const cs = CS_RE.exec(trimmed);\n if (cs) return { city: cs[1].trim(), state: cs[2], zip: '' };\n return { city: line, state: '', zip: '' };\n}\n\n/**\n * Reads the multi-line text form back into an address (the inverse of `formatAddressValue`; never throws).\n * - null / undefined / blank -> empty address.\n * - 1 line: the street only (`parseAddressOneLine` reads the one-line form).\n * - 2 lines: street + city line. 3 lines: street + apt + city line.\n * - 4+ lines: first = street, last = city line, everything in between = apt (joined with \", \").\n * - The city line may be \"City, ST 12345\", \"City ST 12345\", \"City, ST 12345-6789\", \"city, st 12345\" (any case with a comma), \"City, ST\",\n * \"TX 78701\" (city blank), with a trailing comma / period / semicolon tolerated. The state is two letters (capitals unless a comma\n * separates it), the ZIP 5 digits or 5+4. Anything else (a city only, a full state name, a 4-digit or foreign postcode, a unit line\n * without a city line) lands WHOLE in `city` - nothing is dropped.\n * - Lines are trimmed, blank lines dropped, \\r\\n accepted.\n */\nexport function parseAddressValue(raw: string | null | undefined): AddressValue {\n if (!raw) return emptyAddress();\n const lines = String(raw).split(/\\r?\\n/).map(l => l.trim()).filter(Boolean);\n if (!lines.length) return emptyAddress();\n if (lines.length === 1) return { ...emptyAddress(), street: lines[0] };\n return { street: lines[0], apt: lines.slice(1, -1).join(', '), ...splitCityStateLine(lines[lines.length - 1]) };\n}\n\n/**\n * Reads the ONE-LINE form that `formatAddressValueOneLine` writes (\"street[, apt], city, ST 12345\", or \"..., city ST 12345\" without the\n * comma). Segments are split at commas: the last one carries \"ST 12345\" (and the city when there is no comma before the state), the city\n * is the segment before it, the first remaining segment is the street and the rest the apt. A street that itself contains a comma\n * (\"Bldg 2, 100 Main St\") therefore splits into street + apt. Text that does not end in \"ST 12345\" becomes the street whole.\n */\nexport function parseAddressOneLine(raw: string | null | undefined): AddressValue {\n const text = raw == null ? '' : String(raw).replace(/\\s+/g, ' ').trim();\n if (!text) return emptyAddress();\n const segs = text.split(',').map(x => x.trim()).filter(Boolean);\n const m = TAIL_RE.exec(segs[segs.length - 1]);\n if (!m) return { ...emptyAddress(), street: text };\n let head = segs.slice(0, -1);\n let city = m[1] ?? '';\n if (!city && head.length) { city = head[head.length - 1]; head = head.slice(0, -1); }\n return { street: head[0] ?? '', apt: head.slice(1).join(', '), city, state: m[2], zip: m[3] };\n}\n\n/** 5 digits or 5+4 (\"12345\", \"12345-6789\"); surrounding spaces are NOT accepted (trim first). */\nexport function isValidZip(zip: string): boolean {\n return US_ZIP_PATTERN.test(zip);\n}\n","import { Component, ChangeDetectionStrategy, ElementRef, computed, effect, forwardRef, inject, input, output, signal, untracked } from '@angular/core';\nimport { AbstractControl, ControlValueAccessor, FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { TextInputComponent } from '@forgeroute/ui/text-input';\nimport { SelectComponent, SelectOption } from '@forgeroute/ui/select';\nimport { FormSectionComponent } from '@forgeroute/ui/form-section';\nimport { FormRowComponent } from '@forgeroute/ui/form-row';\nimport { HintComponent } from '@forgeroute/ui/hint';\nimport { ErrorComponent } from '@forgeroute/ui/error';\nimport { FieldIssue, UiFieldValidity, issueToErrors, maxLengthIssue, requiredIssue } from '@forgeroute/ui/core';\nimport { usStateName } from '@forgeroute/ui/utils';\nimport { AddressValue, US_STATE_OPTIONS, US_ZIP_PATTERN, emptyAddress, formatAddressValue, normalizeAddress, parseAddressValue } from './address-input.models';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\ntype AddressField = keyof AddressValue;\nconst FIELDS: readonly AddressField[] = ['street', 'apt', 'city', 'state', 'zip'];\n\n/**\n * Address entry (ControlValueAccessor): street, unit, city, state (select) and ZIP, built only from library inputs.\n *\n * Value: `AddressValue` ({ street, apt, city, state, zip }, all strings). Works with `[(ngModel)]`, `[formControl]`, or a signal via\n * `[value]` / `(valueChange)`. A written `null` / `undefined` clears the form; a written string is read with `parseAddressValue`.\n * Writing a value never emits; only user edits emit (the whole new `AddressValue`).\n *\n * Built-in validation (also reported on the form control as a `Validator`; `invalid` / `errorMessage` signals, `invalidChange` output,\n * provides `UiFieldValidity`): `required` -> street, city, state and ZIP are required (\"<Field label> is required.\"); ZIP must be\n * 5 digits or 5+4 (\"Enter a valid ZIP code.\"); state must be one of the options (\"Select a valid option.\"); maxlengths\n * (\"Too long (max N characters).\"); `requireComplete` -> once ANY of street / city / state / ZIP is filled the others are required too\n * (for an optional address that must not be half-filled). The unit is never required. Messages show per field after that field was left,\n * revealed at once by `showErrors=\"true\"`, otherwise only a sub-field the user left shows its message; the host `error` is shown under the group and always counts as invalid.\n *\n * Layout: street + unit, then city + state + ZIP in `ui-form-row`s (they collapse to one column on phones).\n */\n@Component({\n selector: 'ui-address-input',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, TextInputComponent, SelectComponent, FormSectionComponent, FormRowComponent, HintComponent, ErrorComponent],\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AddressInputComponent),\n multi: true,\n }, {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => AddressInputComponent),\n multi: true,\n }, {\n provide: UiFieldValidity,\n useExisting: forwardRef(() => AddressInputComponent),\n }],\n template: `\n <div class=\"ai-group\" role=\"group\"\n [attr.aria-labelledby]=\"label() ? _legendId : null\" [attr.aria-label]=\"label() ? null : labels.t('addressInput.label')\"\n [attr.aria-describedby]=\"_describedBy()\"\n [attr.data-testid]=\"_p() + 'group'\">\n @if (label()) {\n <span class=\"ai-legend\" [id]=\"_legendId\">\n {{ label() }}\n @if (required()) { <span class=\"ai-required\" aria-hidden=\"true\">*</span> }\n </span>\n }\n <ui-form-section>\n <ui-form-row [cols]=\"showUnit() ? 3 : 1\" class=\"ai-row-street\">\n <ui-text-input [class.ui-span-2]=\"showUnit()\" [label]=\"streetLabel()\" [placeholder]=\"streetPlaceholder()\"\n [required]=\"_req()\" [maxlength]=\"streetMaxlength()\" autocomplete=\"address-line1\"\n [inputTestId]=\"_p() + 'street'\" [inputName]=\"_p() + 'street'\" [ariaDescribedBy]=\"_describedBy() ?? ''\" [showErrors]=\"_revealed('street')\" [readonly]=\"readonly()\" [disabled]=\"disabled()\"\n [error]=\"_fieldError('street')\"\n [ngModel]=\"_v().street\" [ngModelOptions]=\"_standalone\" (ngModelChange)=\"_set('street', $event)\"\n (focusout)=\"_onFocusOut('street', $event)\" />\n @if (showUnit()) {\n <ui-text-input [label]=\"unitLabel()\" [placeholder]=\"unitPlaceholder()\" [maxlength]=\"unitMaxlength()\" autocomplete=\"address-line2\"\n [inputTestId]=\"_p() + 'apt'\" [inputName]=\"_p() + 'apt'\" [showErrors]=\"_revealed('apt')\" [readonly]=\"readonly()\" [disabled]=\"disabled()\"\n [error]=\"_fieldError('apt')\"\n [ngModel]=\"_v().apt\" [ngModelOptions]=\"_standalone\" (ngModelChange)=\"_set('apt', $event)\"\n (focusout)=\"_onFocusOut('apt', $event)\" />\n }\n </ui-form-row>\n <ui-form-row [cols]=\"4\" class=\"ai-row-csz\">\n <ui-text-input class=\"ui-span-2\" [label]=\"cityLabel()\" [placeholder]=\"cityPlaceholder()\"\n [required]=\"_req()\" [maxlength]=\"cityMaxlength()\" autocomplete=\"address-level2\"\n [inputTestId]=\"_p() + 'city'\" [inputName]=\"_p() + 'city'\" [showErrors]=\"_revealed('city')\" [readonly]=\"readonly()\" [disabled]=\"disabled()\"\n [error]=\"_fieldError('city')\"\n [ngModel]=\"_v().city\" [ngModelOptions]=\"_standalone\" (ngModelChange)=\"_set('city', $event)\"\n (focusout)=\"_onFocusOut('city', $event)\" />\n <ui-select [label]=\"stateLabel()\" [options]=\"_stateOptions()\"\n [required]=\"_req()\" [attr.data-testid]=\"_p() + 'state'\" [inputName]=\"_p() + 'state'\" [showErrors]=\"_revealed('state')\"\n [disabled]=\"disabled() || readonly()\" [error]=\"_fieldError('state')\"\n [ngModel]=\"_v().state.trim()\" [ngModelOptions]=\"_standalone\" (ngModelChange)=\"_set('state', $event)\"\n (focusout)=\"_onFocusOut('state', $event)\" />\n <ui-text-input [label]=\"zipLabel()\" [placeholder]=\"zipPlaceholder()\"\n [required]=\"_req()\" [maxlength]=\"zipMaxlength()\" autocomplete=\"postal-code\"\n [inputTestId]=\"_p() + 'zip'\" [inputName]=\"_p() + 'zip'\" [showErrors]=\"_revealed('zip')\" [readonly]=\"readonly()\" [disabled]=\"disabled()\"\n [error]=\"_fieldError('zip')\"\n [ngModel]=\"_v().zip\" [ngModelOptions]=\"_standalone\" (ngModelChange)=\"_set('zip', $event)\"\n (focusout)=\"_onFocusOut('zip', $event)\" />\n </ui-form-row>\n </ui-form-section>\n @if (_shownError()) {\n <ui-error [errorId]=\"_errorId\" [message]=\"_shownError()\" />\n } @else if (hint()) {\n <ui-hint [attr.id]=\"_hintId\">{{ hint() }}</ui-hint>\n }\n </div>\n `,\n styles: [`\n :host { display: block; }\n .ai-group { display: flex; flex-direction: column; gap: 6px; }\n .ai-legend { font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1; }\n .ai-required { color: #dc2626; margin-left: 2px; }\n `],\n})\nexport class AddressInputComponent implements ControlValueAccessor, Validator, UiFieldValidity {\n protected readonly labels = inject(UiLabelsService);\n /** Group label (the visible legend and the group's accessible name). Empty -> no legend, the group is named \"Address\". */\n readonly labelInput = input<string | null>(null, { alias: 'label' });\n readonly label = computed(() => this.labelInput() ?? this.labels.t('addressInput.label'));\n /** Street, city, state and ZIP are required (never the unit). Shows `*` on the legend and on those fields. */\n readonly required = input(false);\n /** Optional address that must not be half-filled: when any of street / city / state / ZIP has text, the other three are required. */\n readonly requireComplete = input(false);\n readonly streetLabelInput = input<string | null>(null, { alias: 'streetLabel' });\n readonly streetLabel = computed(() => this.streetLabelInput() ?? this.labels.t('addressInput.streetLabel'));\n readonly unitLabelInput = input<string | null>(null, { alias: 'unitLabel' });\n readonly unitLabel = computed(() => this.unitLabelInput() ?? this.labels.t('addressInput.unitLabel'));\n readonly cityLabelInput = input<string | null>(null, { alias: 'cityLabel' });\n readonly cityLabel = computed(() => this.cityLabelInput() ?? this.labels.t('addressInput.cityLabel'));\n readonly stateLabelInput = input<string | null>(null, { alias: 'stateLabel' });\n readonly stateLabel = computed(() => this.stateLabelInput() ?? this.labels.t('addressInput.stateLabel'));\n readonly zipLabelInput = input<string | null>(null, { alias: 'zipLabel' });\n readonly zipLabel = computed(() => this.zipLabelInput() ?? this.labels.t('addressInput.zipLabel'));\n readonly streetPlaceholderInput = input<string | null>(null, { alias: 'streetPlaceholder' });\n readonly streetPlaceholder = computed(() => this.streetPlaceholderInput() ?? this.labels.t('addressInput.streetPlaceholder'));\n readonly unitPlaceholderInput = input<string | null>(null, { alias: 'unitPlaceholder' });\n readonly unitPlaceholder = computed(() => this.unitPlaceholderInput() ?? this.labels.t('addressInput.unitPlaceholder'));\n readonly cityPlaceholderInput = input<string | null>(null, { alias: 'cityPlaceholder' });\n readonly cityPlaceholder = computed(() => this.cityPlaceholderInput() ?? this.labels.t('addressInput.cityPlaceholder'));\n readonly zipPlaceholder = input('62701');\n /** Text of the empty State option (the one that clears the state). */\n readonly statePlaceholder = input('—');\n /** Show the Apt / Suite field. Hidden -> the value's `apt` is kept as written and never edited. */\n readonly showUnit = input(true);\n /** State choices (value = what is stored). Default: the 50 US states + DC by code. An empty \"no state\" option is added in front when missing. */\n readonly statesInput = input<readonly SelectOption[] | null>(null, { alias: 'states' });\n /** The State options: the host's list, else the 50 states + DC with their names in the app's active language. */\n readonly states = computed((): readonly SelectOption[] => this.statesInput() ?? US_STATE_OPTIONS.map(o => ({ ...o, description: usStateName(String(o.value), o.description) })));\n readonly streetMaxlength = input(200);\n readonly unitMaxlength = input(50);\n readonly cityMaxlength = input(100);\n readonly zipMaxlength = input(10);\n /** Native select cannot be read-only: while `readonly`, the State select is disabled and the text fields are read-only. */\n readonly readonly = input(false);\n /** The host's \"tried to submit\" flag. `true` reveals every sub-field's message (and the host `error`) at once; switching back to false forgets which fields were left. */\n readonly showErrors = input(false);\n readonly hint = input('');\n /** Host error for the whole address; shown under the group (replaces the hint), always makes the field invalid. */\n readonly error = input('');\n /** Prefix of the per-field test ids and native names: `<prefix>street`, `<prefix>apt`, `<prefix>city`, `<prefix>state`, `<prefix>zip` (and `<prefix>group`). */\n readonly idPrefix = input('addr_');\n /** Alias of `idPrefix` (the name the old app-level address input used). When set (even to ''), it wins over `idPrefix`. */\n readonly prefix = input<string | undefined>(undefined);\n /**\n * What the form control (ngModel / FormControl) receives. 'auto' (default): the type last written to it - a string model gets the multi-line\n * string (`formatAddressValue`), an object / null / never-written model gets the `AddressValue`; 'text': always the string; 'object': always\n * the object. `valueChange` always emits the object. A written string is read with `parseAddressValue` for display only: the control keeps\n * the original text until the user edits a field (so a text the parser cannot split is not rewritten on load).\n */\n readonly valueFormat = input<'auto' | 'object' | 'text'>('auto');\n /** ZIP rule; the default is the US 5 digits / 5+4 rule. `null` accepts any non-empty ZIP. The ZIP is validated and stored trimmed. */\n readonly zipPattern = input<RegExp | null>(US_ZIP_PATTERN);\n /** Message shown when the ZIP breaks `zipPattern`. */\n readonly zipErrorInput = input<string | null>(null, { alias: 'zipError' });\n readonly zipError = computed(() => this.zipErrorInput() ?? this.labels.t('addressInput.zipError'));\n /** Signal-style value (use with `(valueChange)` or `[(value)]`); not needed with ngModel / FormControl. null / undefined = blank. */\n readonly value = input<AddressValue | string | null | undefined>(undefined);\n /** The `[disabled]` input (also set by the form control through `setDisabledState`). Public so `[disabled]=\"x\"` type-checks in hosts. */\n readonly _disabledInput = input(false, { alias: 'disabled' });\n\n /** Emits the whole new address when the USER edits a field. Not emitted for written values. */\n readonly valueChange = output<AddressValue>();\n /** Emits whenever the address becomes invalid / valid. */\n readonly invalidChange = output<boolean>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n protected readonly _v = signal<AddressValue>(emptyAddress());\n private readonly _touched = signal<ReadonlySet<AddressField>>(new Set());\n protected readonly _standalone = { standalone: true };\n\n protected readonly _p = computed(() => this.prefix() ?? this.idPrefix());\n private readonly _uid = Math.random().toString(36).slice(2, 8);\n protected readonly _legendId = `ai-${this._uid}-legend`;\n protected readonly _errorId = `ai-${this._uid}-error`;\n protected readonly _hintId = `ai-${this._uid}-hint`;\n\n protected readonly _stateOptions = computed((): SelectOption[] => {\n const opts = this.states();\n return opts.some(o => String(o.value) === '') ? [...opts] : [{ value: '', label: this.statePlaceholder() }, ...opts];\n });\n\n private readonly _issues = computed(() => this._check(this._v()));\n /** True while the address breaks a built-in rule or the host passed an `[error]`. */\n readonly invalid = computed(() => !!this.error() || this._firstIssue(this._issues()) !== null);\n /** Message of the first broken built-in rule in field order ('' when valid), shown or not. */\n readonly errorMessage = computed(() => this._firstIssue(this._issues())?.message ?? '');\n /** Street, city, state and ZIP are required: always with `required`, and with `requireComplete` once any of them has text. */\n protected readonly _req = computed(() => this.required() || (this.requireComplete() && this._hasText(this._v())));\n /** The host `[error]` shows after the user left one of the address fields, or while `showErrors` is true. */\n protected readonly _shownError = computed(() => this.showErrors() || this._touched().size > 0 ? this.error() : '');\n protected readonly _describedBy = computed(() => this._shownError() ? this._errorId : (this.hint() ? this._hintId : null));\n\n private _onChange = (_: AddressValue | string) => {};\n /** True once a string was written to the control (valueFormat 'auto' then emits strings). */\n private _textModel = false;\n /** Fields whose text the USER changed since the last write; only those are trimmed when left. */\n private readonly _edited = new Set<AddressField>();\n private _onTouched = () => {};\n private _onValidatorChange = () => {};\n\n constructor() {\n effect(() => { this.invalidChange.emit(this.invalid()); });\n effect(() => {\n const v = this.value();\n if (v === undefined) return; // not bound: leave what the form control wrote\n untracked(() => {\n const cur = this._v();\n // A text host echoing `formatAddressValue(...)` of what the user typed: compare the text before parsing (the parse of the text is lossy,\n // e.g. city 'Austin' + ZIP only formats to 'Austin 12345', which parses back to a city).\n if (typeof v === 'string' && v.trim() === formatAddressValue(cur).trim()) return;\n const incoming = typeof v === 'string' ? parseAddressValue(v) : normalizeAddress(v);\n // Echo of the user's own edit (`[value]` + `(valueChange)` / `[(value)]`): same content (a text echo is trimmed), so keep the typed text\n // and the \"edited\" state. Only a host write with different content replaces the fields and clears their \"edited\" state.\n const same = (f: AddressField) => incoming[f] === cur[f] || (typeof v === 'string' && incoming[f] === cur[f].trim());\n if (FIELDS.every(same)) return;\n for (const f of FIELDS) if (!same(f)) this._edited.delete(f);\n this._v.set(incoming);\n });\n });\n let previous = false;\n effect(() => {\n const show = this.showErrors();\n if (previous && !show) untracked(() => this._touched.set(new Set()));\n previous = show;\n });\n }\n\n /** Re-run the form control's validation when a rule input (required, maxlength, states, ...) changes. */\n ngOnChanges() { this._onValidatorChange(); }\n\n writeValue(val: AddressValue | string | null | undefined) {\n this._textModel = typeof val === 'string';\n this._edited.clear();\n this._v.set(typeof val === 'string' ? parseAddressValue(val) : normalizeAddress(val));\n if (!this._hasText(this._v())) this._touched.set(new Set());\n }\n registerOnChange(fn: (v: AddressValue | string) => void) { this._onChange = fn; }\n registerOnTouched(fn: () => void) { this._onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n\n validate(control: AbstractControl): ValidationErrors | null {\n const raw = control.value as AddressValue | string | null | undefined;\n const v = typeof raw === 'string' ? parseAddressValue(raw) : normalizeAddress(raw);\n return issueToErrors(this._firstIssue(this._check(v)));\n }\n\n protected _set(field: AddressField, text: unknown) {\n const t = text == null ? '' : String(text);\n this._edited.add(field);\n const next = { ...this._v(), [field]: t };\n this._v.set(next);\n const fmt = this.valueFormat();\n this._onChange(fmt === 'text' || (fmt === 'auto' && this._textModel) ? formatAddressValue(next) : { ...next });\n this.valueChange.emit({ ...next });\n }\n\n protected _onFocusOut(field: AddressField, event: FocusEvent) {\n if (!this._touched().has(field)) this._touched.set(new Set([...this._touched(), field]));\n const cur = this._v()[field];\n // edge spaces the user typed are dropped when the field is left (never while typing; an untouched tab-through of a host-written value emits nothing)\n if (this._edited.has(field) && cur !== cur.trim() && !this.disabled() && !this.readonly()) this._set(field, cur.trim());\n const next = event.relatedTarget as Node | null;\n if (!next || !this.host.nativeElement.contains(next)) this._onTouched();\n }\n\n /** True while the field's own message may show: after the field was left, or while the host's `showErrors` is true. Bound to the child's `showErrors` so a reset clears the child too. */\n protected _revealed(field: AddressField): boolean {\n return this.showErrors() || this._touched().has(field);\n }\n\n protected _fieldError(field: AddressField): string {\n if (this.disabled() || this.readonly()) return '';\n if (!this._revealed(field)) return '';\n return this._issues()[field]?.message ?? '';\n }\n\n private _hasText(v: AddressValue): boolean {\n return !!(v.street.trim() || v.city.trim() || v.state.trim() || v.zip.trim());\n }\n\n private _firstIssue(issues: Partial<Record<AddressField, FieldIssue>>): FieldIssue | null {\n for (const f of FIELDS) if (issues[f]) return issues[f]!;\n return null;\n }\n\n private _check(v: AddressValue): Partial<Record<AddressField, FieldIssue>> {\n const out: Partial<Record<AddressField, FieldIssue>> = {};\n if (this.disabled() || this.readonly()) return out;\n const mustFill = this.required() || (this.requireComplete() && this._hasText(v));\n const labels: Record<'street' | 'city' | 'state' | 'zip', string> = {\n street: this.streetLabel(), city: this.cityLabel(), state: this.stateLabel(), zip: this.zipLabel(),\n };\n const max: Record<AddressField, number> = {\n street: this.streetMaxlength(), apt: this.unitMaxlength(), city: this.cityMaxlength(), state: Infinity, zip: this.zipMaxlength(),\n };\n for (const f of FIELDS) {\n if (f === 'apt' && !this.showUnit()) continue; // a hidden unit has no rules\n const text = v[f].trim();\n if (!text) {\n if (mustFill && f !== 'apt') out[f] = requiredIssue(labels[f]);\n continue;\n }\n const tooLong = maxLengthIssue(text, max[f]);\n if (tooLong) { out[f] = tooLong; continue; }\n if (f === 'zip' && !this._zipOk(text)) out[f] = { key: 'zip', message: this.zipError() };\n if (f === 'state' && !this._stateOptions().some(o => String(o.value) === text)) {\n out[f] = { key: 'option', message: this.labels.t('common.selectValidOption') };\n }\n }\n return out;\n }\n\n private _zipOk(zip: string): boolean {\n const pattern = this.zipPattern();\n if (!pattern) return true;\n return new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, '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AA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;KAAA,SAAA,CAAA,iBAAA,aAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAoB,UAAA;KAAA,QAAA,CAAA,SAAA,SAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAgB,UAAA;KAAA,QAAA,CAAA,MAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAa,UAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAc,UAAA;KAAA,QAAA,CAAA,WAAA,SAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AA0EtH,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EA9EjC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAkB,YAChB;GAAI,iBACC,wBAAwB;GAAM,SACtC;IAAC;IAAa;IAAoB;IAAiB;IAAsB;IAAkB;IAAe;GAAc;GAAC,WACvH;IAAC;KACV,SAAS;KACT,aAAa,iBAAgB,qBAAsB;KACnD,OAAO;IACR;IAAE;KACD,SAAS;KACT,aAAa,iBAAgB,qBAAsB;KACnD,OAAO;IACR;IAAE;KACD,SAAS;KACT,aAAa,iBAAgB,qBAAsB;IACpD;GAAA;GAAC,UACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDT,QAAA,CAAA,kMAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-address-input.mjs","names":[],"sources":["../../../projects/forgeroute-ui/address-input/src/lib/address-input/address-input.models.ts","../../../projects/forgeroute-ui/address-input/src/lib/address-input/address-input.component.ts"],"sourcesContent":["import type { SelectOption } from '@forgeroute/ui/select';\nimport { US_STATES } from '@forgeroute/ui/utils';\n\n/**\n * The value of `ui-address-input`: five plain strings (never null). `apt` is the second line (apartment / suite / unit).\n *\n * Note: the library already exports `formatAddress(parts, options)` / `AddressParts` (utils/format) for display of an address with\n * city / state / zip parts. The helpers below work on this value model and are therefore named `...AddressValue`.\n */\nexport interface AddressValue {\n street: string;\n apt: string;\n city: string;\n state: string;\n zip: string;\n}\n\n/** The 50 US states + DC as select options: value = 2-letter code, label = the code (compact, fits the narrow State column), description = the state name (read by screen readers, shown under the select). */\nexport const US_STATE_OPTIONS: readonly SelectOption[] = US_STATES.map(s => ({ value: s.value, label: s.value, description: s.label }));\n\n/** A fresh blank address. */\nexport function emptyAddress(): AddressValue {\n return { street: '', apt: '', city: '', state: '', zip: '' };\n}\n\n/** Coerces anything (null, a partial object, non-string members) to a complete `AddressValue` of strings. */\nexport function normalizeAddress(v: Partial<Record<keyof AddressValue, unknown>> | null | undefined): AddressValue {\n const s = (x: unknown): string => (x == null ? '' : String(x));\n return v && typeof v === 'object'\n ? { street: s(v.street), apt: s(v.apt), city: s(v.city), state: s(v.state), zip: s(v.zip) }\n : emptyAddress();\n}\n\n/** True when every part is empty or whitespace (null / undefined count as empty). */\nexport function isEmptyAddress(a: Partial<Record<keyof AddressValue, unknown>> | null | undefined): boolean {\n const n = normalizeAddress(a);\n return !n.street.trim() && !n.apt.trim() && !n.city.trim() && !n.state.trim() && !n.zip.trim();\n}\n\n/** The default ZIP rule of the component: US 5 digits or 5+4. */\nexport const US_ZIP_PATTERN = /^\\d{5}(?:-\\d{4})?$/;\n\n/** Joins \"City\", \"ST\" and ZIP: \"Austin, TX 78701\" (comma true) or \"Austin TX 78701\" (comma false). Parts are trimmed, empty ones left out. */\nfunction cityStateZip(a: AddressValue, comma: boolean): string {\n const cityState = [a.city.trim(), a.state.trim()].filter(Boolean).join(comma ? ', ' : ' ');\n return [cityState, a.zip.trim()].filter(Boolean).join(' ');\n}\n\n/**\n * Multi-line text, the storage form used by apps: street, apt, then \"City, ST 12345\", joined with \"\\n\". Every part is trimmed and empty\n * parts are left out, so `parseAddressValue(formatAddressValue(x))` is stable.\n * `{street:'1 Main', apt:'Apt 4', city:'Austin', state:'TX', zip:'78701'}` -> `\"1 Main\\nApt 4\\nAustin, TX 78701\"`.\n */\nexport function formatAddressValue(a: AddressValue | null | undefined): string {\n const n = normalizeAddress(a);\n const parts: string[] = [];\n if (n.street.trim()) parts.push(n.street.trim());\n if (n.apt.trim()) parts.push(n.apt.trim());\n const line2 = cityStateZip(n, true);\n if (line2) parts.push(line2);\n return parts.join('\\n');\n}\n\n/**\n * The same address on ONE line for tables, labels and maps: \"1 Main, Apt 4, Austin, TX 78701\". `{ comma: false }` drops the comma between\n * city and state (\"1 Main, Apt 4, Austin TX 78701\", the older mfh resident style). Empty parts are left out.\n */\nexport function formatAddressValueOneLine(a: AddressValue | null | undefined, options: { comma?: boolean } = {}): string {\n const n = normalizeAddress(a);\n return [n.street.trim(), n.apt.trim(), cityStateZip(n, options.comma !== false)].filter(Boolean).join(', ');\n}\n\nconst ZIP = '\\\\d{5}(?:-\\\\d{4})?';\n/** City line \"Austin, TX 78701\" / \"Austin TX 78701\" / \"Austin,TX 78701-1234\" / \"TX 78701\" (state in capitals). */\nconst CSZ_RE = new RegExp(`^(?:(.*?)[,\\\\s]+)?([A-Z]{2})\\\\s+(${ZIP})$`);\n/** City line with a comma and a state in any case: \"austin, tx 78701\". */\nconst CSZ_COMMA_RE = new RegExp(`^(.+?)\\\\s*,\\\\s*([A-Za-z]{2})\\\\s+(${ZIP})$`);\n/** \"Austin, TX\" (comma required so a plain two-letter word is not taken for a state; capitals only). */\nconst CS_RE = /^(.+?)\\s*,\\s*([A-Z]{2})$/;\n/** Last segment of a one-line address: \"TX 78701\" or (without a comma) \"Austin TX 78701\". */\nconst TAIL_RE = new RegExp(`^(?:(.+?)\\\\s+)?([A-Z]{2})\\\\s+(${ZIP})$`);\n\nfunction splitCityStateLine(line: string): Pick<AddressValue, 'city' | 'state' | 'zip'> {\n const trimmed = line.replace(/[\\s.,;]+$/, ''); // \"Austin, TX 78701.\" / \"...78701,\"\n const m = CSZ_RE.exec(trimmed);\n if (m) return { city: (m[1] ?? '').trim(), state: m[2], zip: m[3] };\n const c = CSZ_COMMA_RE.exec(trimmed);\n if (c) return { city: c[1].trim(), state: c[2].toUpperCase(), zip: c[3] };\n const cs = CS_RE.exec(trimmed);\n if (cs) return { city: cs[1].trim(), state: cs[2], zip: '' };\n return { city: line, state: '', zip: '' };\n}\n\n/**\n * Reads the multi-line text form back into an address (the inverse of `formatAddressValue`; never throws).\n * - null / undefined / blank -> empty address.\n * - 1 line: the street only (`parseAddressOneLine` reads the one-line form).\n * - 2 lines: street + city line. 3 lines: street + apt + city line.\n * - 4+ lines: first = street, last = city line, everything in between = apt (joined with \", \").\n * - The city line may be \"City, ST 12345\", \"City ST 12345\", \"City, ST 12345-6789\", \"city, st 12345\" (any case with a comma), \"City, ST\",\n * \"TX 78701\" (city blank), with a trailing comma / period / semicolon tolerated. The state is two letters (capitals unless a comma\n * separates it), the ZIP 5 digits or 5+4. Anything else (a city only, a full state name, a 4-digit or foreign postcode, a unit line\n * without a city line) lands WHOLE in `city` - nothing is dropped.\n * - Lines are trimmed, blank lines dropped, \\r\\n accepted.\n */\nexport function parseAddressValue(raw: string | null | undefined): AddressValue {\n if (!raw) return emptyAddress();\n const lines = String(raw).split(/\\r?\\n/).map(l => l.trim()).filter(Boolean);\n if (!lines.length) return emptyAddress();\n if (lines.length === 1) return { ...emptyAddress(), street: lines[0] };\n return { street: lines[0], apt: lines.slice(1, -1).join(', '), ...splitCityStateLine(lines[lines.length - 1]) };\n}\n\n/**\n * Reads the ONE-LINE form that `formatAddressValueOneLine` writes (\"street[, apt], city, ST 12345\", or \"..., city ST 12345\" without the\n * comma). Segments are split at commas: the last one carries \"ST 12345\" (and the city when there is no comma before the state), the city\n * is the segment before it, the first remaining segment is the street and the rest the apt. A street that itself contains a comma\n * (\"Bldg 2, 100 Main St\") therefore splits into street + apt. Text that does not end in \"ST 12345\" becomes the street whole.\n */\nexport function parseAddressOneLine(raw: string | null | undefined): AddressValue {\n const text = raw == null ? '' : String(raw).replace(/\\s+/g, ' ').trim();\n if (!text) return emptyAddress();\n const segs = text.split(',').map(x => x.trim()).filter(Boolean);\n const m = TAIL_RE.exec(segs[segs.length - 1]);\n if (!m) return { ...emptyAddress(), street: text };\n let head = segs.slice(0, -1);\n let city = m[1] ?? '';\n if (!city && head.length) { city = head[head.length - 1]; head = head.slice(0, -1); }\n return { street: head[0] ?? '', apt: head.slice(1).join(', '), city, state: m[2], zip: m[3] };\n}\n\n/** 5 digits or 5+4 (\"12345\", \"12345-6789\"); surrounding spaces are NOT accepted (trim first). */\nexport function isValidZip(zip: string): boolean {\n return US_ZIP_PATTERN.test(zip);\n}\n","import { Component, ChangeDetectionStrategy, ElementRef, computed, effect, forwardRef, inject, input, output, signal, untracked } from '@angular/core';\nimport { AbstractControl, ControlValueAccessor, FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { TextInputComponent } from '@forgeroute/ui/text-input';\nimport { SelectComponent, SelectOption } from '@forgeroute/ui/select';\nimport { FormSectionComponent } from '@forgeroute/ui/form-section';\nimport { FormRowComponent } from '@forgeroute/ui/form-row';\nimport { HintComponent } from '@forgeroute/ui/hint';\nimport { ErrorComponent } from '@forgeroute/ui/error';\nimport { FieldIssue, UiFieldValidity, issueToErrors, maxLengthIssue, requiredIssue } from '@forgeroute/ui/core';\nimport { usStateName } from '@forgeroute/ui/utils';\nimport { AddressValue, US_STATE_OPTIONS, US_ZIP_PATTERN, emptyAddress, formatAddressValue, normalizeAddress, parseAddressValue } from './address-input.models';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\ntype AddressField = keyof AddressValue;\nconst FIELDS: readonly AddressField[] = ['street', 'apt', 'city', 'state', 'zip'];\n\n/**\n * Address entry (ControlValueAccessor): street, unit, city, state (select) and ZIP, built only from library inputs.\n *\n * Value: `AddressValue` ({ street, apt, city, state, zip }, all strings). Works with `[(ngModel)]`, `[formControl]`, or a signal via\n * `[value]` / `(valueChange)`. A written `null` / `undefined` clears the form; a written string is read with `parseAddressValue`.\n * Writing a value never emits; only user edits emit (the whole new `AddressValue`).\n *\n * Built-in validation (also reported on the form control as a `Validator`; `invalid` / `errorMessage` signals, `invalidChange` output,\n * provides `UiFieldValidity`): `required` -> street, city, state and ZIP are required (\"<Field label> is required.\"); ZIP must be\n * 5 digits or 5+4 (\"Enter a valid ZIP code.\"); state must be one of the options (\"Select a valid option.\"); maxlengths\n * (\"Too long (max N characters).\"); `requireComplete` -> once ANY of street / city / state / ZIP is filled the others are required too\n * (for an optional address that must not be half-filled). The unit is never required. Messages show per field after that field was left,\n * revealed at once by `showErrors=\"true\"`, otherwise only a sub-field the user left shows its message; the host `error` is shown under the group and always counts as invalid.\n *\n * Layout: street + unit, then city + state + ZIP in `ui-form-row`s (they collapse to one column on phones).\n */\n@Component({\n selector: 'ui-address-input',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, TextInputComponent, SelectComponent, FormSectionComponent, FormRowComponent, HintComponent, ErrorComponent],\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AddressInputComponent),\n multi: true,\n }, {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => AddressInputComponent),\n multi: true,\n }, {\n provide: UiFieldValidity,\n useExisting: forwardRef(() => AddressInputComponent),\n }],\n template: `\n <div class=\"ai-group\" role=\"group\"\n [attr.aria-labelledby]=\"label() ? _legendId : null\" [attr.aria-label]=\"label() ? null : labels.t('addressInput.label')\"\n [attr.aria-describedby]=\"_describedBy()\"\n [attr.data-testid]=\"_p() + 'group'\">\n @if (label()) {\n <span class=\"ai-legend\" [id]=\"_legendId\">\n {{ label() }}\n @if (required()) { <span class=\"ai-required\" aria-hidden=\"true\">*</span> }\n </span>\n }\n <ui-form-section>\n <ui-form-row [cols]=\"showUnit() ? 3 : 1\" class=\"ai-row-street\">\n <ui-text-input [class.ui-span-2]=\"showUnit()\" [label]=\"streetLabel()\" [placeholder]=\"streetPlaceholder()\"\n [required]=\"_req()\" [maxlength]=\"streetMaxlength()\" autocomplete=\"address-line1\"\n [inputTestId]=\"_p() + 'street'\" [inputName]=\"_p() + 'street'\" [ariaDescribedBy]=\"_describedBy() ?? ''\" [showErrors]=\"_revealed('street')\" [readonly]=\"readonly()\" [disabled]=\"disabled()\"\n [error]=\"_fieldError('street')\"\n [ngModel]=\"_v().street\" [ngModelOptions]=\"_standalone\" (ngModelChange)=\"_set('street', $event)\"\n (focusout)=\"_onFocusOut('street', $event)\" />\n @if (showUnit()) {\n <ui-text-input [label]=\"unitLabel()\" [placeholder]=\"unitPlaceholder()\" [maxlength]=\"unitMaxlength()\" autocomplete=\"address-line2\"\n [inputTestId]=\"_p() + 'apt'\" [inputName]=\"_p() + 'apt'\" [showErrors]=\"_revealed('apt')\" [readonly]=\"readonly()\" [disabled]=\"disabled()\"\n [error]=\"_fieldError('apt')\"\n [ngModel]=\"_v().apt\" [ngModelOptions]=\"_standalone\" (ngModelChange)=\"_set('apt', $event)\"\n (focusout)=\"_onFocusOut('apt', $event)\" />\n }\n </ui-form-row>\n <ui-form-row [cols]=\"4\" class=\"ai-row-csz\">\n <ui-text-input class=\"ui-span-2\" [label]=\"cityLabel()\" [placeholder]=\"cityPlaceholder()\"\n [required]=\"_req()\" [maxlength]=\"cityMaxlength()\" autocomplete=\"address-level2\"\n [inputTestId]=\"_p() + 'city'\" [inputName]=\"_p() + 'city'\" [showErrors]=\"_revealed('city')\" [readonly]=\"readonly()\" [disabled]=\"disabled()\"\n [error]=\"_fieldError('city')\"\n [ngModel]=\"_v().city\" [ngModelOptions]=\"_standalone\" (ngModelChange)=\"_set('city', $event)\"\n (focusout)=\"_onFocusOut('city', $event)\" />\n <ui-select [label]=\"stateLabel()\" [options]=\"_stateOptions()\"\n [required]=\"_req()\" [attr.data-testid]=\"_p() + 'state'\" [inputName]=\"_p() + 'state'\" [showErrors]=\"_revealed('state')\"\n [disabled]=\"disabled() || readonly()\" [error]=\"_fieldError('state')\"\n [ngModel]=\"_v().state.trim()\" [ngModelOptions]=\"_standalone\" (ngModelChange)=\"_set('state', $event)\"\n (focusout)=\"_onFocusOut('state', $event)\" />\n <ui-text-input [label]=\"zipLabel()\" [placeholder]=\"zipPlaceholder()\"\n [required]=\"_req()\" [maxlength]=\"zipMaxlength()\" autocomplete=\"postal-code\"\n [inputTestId]=\"_p() + 'zip'\" [inputName]=\"_p() + 'zip'\" [showErrors]=\"_revealed('zip')\" [readonly]=\"readonly()\" [disabled]=\"disabled()\"\n [error]=\"_fieldError('zip')\"\n [ngModel]=\"_v().zip\" [ngModelOptions]=\"_standalone\" (ngModelChange)=\"_set('zip', $event)\"\n (focusout)=\"_onFocusOut('zip', $event)\" />\n </ui-form-row>\n </ui-form-section>\n @if (_shownError()) {\n <ui-error [errorId]=\"_errorId\" [message]=\"_shownError()\" />\n } @else if (hint()) {\n <ui-hint [attr.id]=\"_hintId\">{{ hint() }}</ui-hint>\n }\n </div>\n `,\n styles: [`\n :host { display: block; }\n .ai-group { display: flex; flex-direction: column; gap: 6px; }\n .ai-legend { font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1; }\n .ai-required { color: #dc2626; margin-left: 2px; }\n `],\n})\nexport class AddressInputComponent implements ControlValueAccessor, Validator, UiFieldValidity {\n protected readonly labels = inject(UiLabelsService);\n /** Group label (the visible legend and the group's accessible name). Empty -> no legend, the group is named \"Address\". */\n readonly labelInput = input<string | null>(null, { alias: 'label' });\n readonly label = computed(() => this.labelInput() ?? this.labels.t('addressInput.label'));\n /** Street, city, state and ZIP are required (never the unit). Shows `*` on the legend and on those fields. */\n readonly required = input(false);\n /** Optional address that must not be half-filled: when any of street / city / state / ZIP has text, the other three are required. */\n readonly requireComplete = input(false);\n readonly streetLabelInput = input<string | null>(null, { alias: 'streetLabel' });\n readonly streetLabel = computed(() => this.streetLabelInput() ?? this.labels.t('addressInput.streetLabel'));\n readonly unitLabelInput = input<string | null>(null, { alias: 'unitLabel' });\n readonly unitLabel = computed(() => this.unitLabelInput() ?? this.labels.t('addressInput.unitLabel'));\n readonly cityLabelInput = input<string | null>(null, { alias: 'cityLabel' });\n readonly cityLabel = computed(() => this.cityLabelInput() ?? this.labels.t('addressInput.cityLabel'));\n readonly stateLabelInput = input<string | null>(null, { alias: 'stateLabel' });\n readonly stateLabel = computed(() => this.stateLabelInput() ?? this.labels.t('addressInput.stateLabel'));\n readonly zipLabelInput = input<string | null>(null, { alias: 'zipLabel' });\n readonly zipLabel = computed(() => this.zipLabelInput() ?? this.labels.t('addressInput.zipLabel'));\n readonly streetPlaceholderInput = input<string | null>(null, { alias: 'streetPlaceholder' });\n readonly streetPlaceholder = computed(() => this.streetPlaceholderInput() ?? this.labels.t('addressInput.streetPlaceholder'));\n readonly unitPlaceholderInput = input<string | null>(null, { alias: 'unitPlaceholder' });\n readonly unitPlaceholder = computed(() => this.unitPlaceholderInput() ?? this.labels.t('addressInput.unitPlaceholder'));\n readonly cityPlaceholderInput = input<string | null>(null, { alias: 'cityPlaceholder' });\n readonly cityPlaceholder = computed(() => this.cityPlaceholderInput() ?? this.labels.t('addressInput.cityPlaceholder'));\n readonly zipPlaceholder = input('62701');\n /** Text of the empty State option (the one that clears the state). */\n readonly statePlaceholder = input('—');\n /** Show the Apt / Suite field. Hidden -> the value's `apt` is kept as written and never edited. */\n readonly showUnit = input(true);\n /** State choices (value = what is stored). Default: the 50 US states + DC by code. An empty \"no state\" option is added in front when missing. */\n readonly statesInput = input<readonly SelectOption[] | null>(null, { alias: 'states' });\n /** The State options: the host's list, else the 50 states + DC with their names in the app's active language. */\n readonly states = computed((): readonly SelectOption[] => this.statesInput() ?? US_STATE_OPTIONS.map(o => ({ ...o, description: usStateName(String(o.value), o.description) })));\n readonly streetMaxlength = input(200);\n readonly unitMaxlength = input(50);\n readonly cityMaxlength = input(100);\n readonly zipMaxlength = input(10);\n /** Native select cannot be read-only: while `readonly`, the State select is disabled and the text fields are read-only. */\n readonly readonly = input(false);\n /** The host's \"tried to submit\" flag. `true` reveals every sub-field's message (and the host `error`) at once; switching back to false forgets which fields were left. */\n readonly showErrors = input(false);\n readonly hint = input('');\n /** Host error for the whole address; shown under the group (replaces the hint), always makes the field invalid. */\n readonly error = input('');\n /** Prefix of the per-field test ids and native names: `<prefix>street`, `<prefix>apt`, `<prefix>city`, `<prefix>state`, `<prefix>zip` (and `<prefix>group`). */\n readonly idPrefix = input('addr_');\n /** Alias of `idPrefix` (the name the old app-level address input used). When set (even to ''), it wins over `idPrefix`. */\n readonly prefix = input<string | undefined>(undefined);\n /**\n * What the form control (ngModel / FormControl) receives. 'auto' (default): the type last written to it - a string model gets the multi-line\n * string (`formatAddressValue`), an object / null / never-written model gets the `AddressValue`; 'text': always the string; 'object': always\n * the object. `valueChange` always emits the object. A written string is read with `parseAddressValue` for display only: the control keeps\n * the original text until the user edits a field (so a text the parser cannot split is not rewritten on load).\n */\n readonly valueFormat = input<'auto' | 'object' | 'text'>('auto');\n /** ZIP rule; the default is the US 5 digits / 5+4 rule. `null` accepts any non-empty ZIP. The ZIP is validated and stored trimmed. */\n readonly zipPattern = input<RegExp | null>(US_ZIP_PATTERN);\n /** Message shown when the ZIP breaks `zipPattern`. */\n readonly zipErrorInput = input<string | null>(null, { alias: 'zipError' });\n readonly zipError = computed(() => this.zipErrorInput() ?? this.labels.t('addressInput.zipError'));\n /** Signal-style value (use with `(valueChange)` or `[(value)]`); not needed with ngModel / FormControl. null / undefined = blank. */\n readonly value = input<AddressValue | string | null | undefined>(undefined);\n /** The `[disabled]` input (also set by the form control through `setDisabledState`). Public so `[disabled]=\"x\"` type-checks in hosts. */\n readonly _disabledInput = input(false, { alias: 'disabled' });\n\n /** Emits the whole new address when the USER edits a field. Not emitted for written values. */\n readonly valueChange = output<AddressValue>();\n /** Emits whenever the address becomes invalid / valid. */\n readonly invalidChange = output<boolean>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n protected readonly _v = signal<AddressValue>(emptyAddress());\n private readonly _touched = signal<ReadonlySet<AddressField>>(new Set());\n protected readonly _standalone = { standalone: true };\n\n protected readonly _p = computed(() => this.prefix() ?? this.idPrefix());\n private readonly _uid = Math.random().toString(36).slice(2, 8);\n protected readonly _legendId = `ai-${this._uid}-legend`;\n protected readonly _errorId = `ai-${this._uid}-error`;\n protected readonly _hintId = `ai-${this._uid}-hint`;\n\n protected readonly _stateOptions = computed((): SelectOption[] => {\n const opts = this.states();\n return opts.some(o => String(o.value) === '') ? [...opts] : [{ value: '', label: this.statePlaceholder() }, ...opts];\n });\n\n private readonly _issues = computed(() => this._check(this._v()));\n /** True while the address breaks a built-in rule or the host passed an `[error]`. */\n readonly invalid = computed(() => !!this.error() || this._firstIssue(this._issues()) !== null);\n /** Message of the first broken built-in rule in field order ('' when valid), shown or not. */\n readonly errorMessage = computed(() => this._firstIssue(this._issues())?.message ?? '');\n /** Street, city, state and ZIP are required: always with `required`, and with `requireComplete` once any of them has text. */\n protected readonly _req = computed(() => this.required() || (this.requireComplete() && this._hasText(this._v())));\n /** The host `[error]` shows after the user left one of the address fields, or while `showErrors` is true. */\n protected readonly _shownError = computed(() => this.showErrors() || this._touched().size > 0 ? this.error() : '');\n protected readonly _describedBy = computed(() => this._shownError() ? this._errorId : (this.hint() ? this._hintId : null));\n\n private _onChange = (_: AddressValue | string) => {};\n /** True once a string was written to the control (valueFormat 'auto' then emits strings). */\n private _textModel = false;\n /** Fields whose text the USER changed since the last write; only those are trimmed when left. */\n private readonly _edited = new Set<AddressField>();\n private _onTouched = () => {};\n private _onValidatorChange = () => {};\n\n constructor() {\n effect(() => { this.invalidChange.emit(this.invalid()); });\n effect(() => {\n const v = this.value();\n if (v === undefined) return; // not bound: leave what the form control wrote\n untracked(() => {\n const cur = this._v();\n // A text host echoing `formatAddressValue(...)` of what the user typed: compare the text before parsing (the parse of the text is lossy,\n // e.g. city 'Austin' + ZIP only formats to 'Austin 12345', which parses back to a city).\n if (typeof v === 'string' && v.trim() === formatAddressValue(cur).trim()) return;\n const incoming = typeof v === 'string' ? parseAddressValue(v) : normalizeAddress(v);\n // Echo of the user's own edit (`[value]` + `(valueChange)` / `[(value)]`): same content (a text echo is trimmed), so keep the typed text\n // and the \"edited\" state. Only a host write with different content replaces the fields and clears their \"edited\" state.\n const same = (f: AddressField) => incoming[f] === cur[f] || (typeof v === 'string' && incoming[f] === cur[f].trim());\n if (FIELDS.every(same)) return;\n for (const f of FIELDS) if (!same(f)) this._edited.delete(f);\n this._v.set(incoming);\n });\n });\n let previous = false;\n effect(() => {\n const show = this.showErrors();\n if (previous && !show) untracked(() => this._touched.set(new Set()));\n previous = show;\n });\n }\n\n /** Re-run the form control's validation when a rule input (required, maxlength, states, ...) changes. */\n ngOnChanges() { this._onValidatorChange(); }\n\n writeValue(val: AddressValue | string | null | undefined) {\n this._textModel = typeof val === 'string';\n this._edited.clear();\n this._v.set(typeof val === 'string' ? parseAddressValue(val) : normalizeAddress(val));\n if (!this._hasText(this._v())) this._touched.set(new Set());\n }\n registerOnChange(fn: (v: AddressValue | string) => void) { this._onChange = fn; }\n registerOnTouched(fn: () => void) { this._onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n\n validate(control: AbstractControl): ValidationErrors | null {\n const raw = control.value as AddressValue | string | null | undefined;\n const v = typeof raw === 'string' ? parseAddressValue(raw) : normalizeAddress(raw);\n return issueToErrors(this._firstIssue(this._check(v)));\n }\n\n protected _set(field: AddressField, text: unknown) {\n const t = text == null ? '' : String(text);\n this._edited.add(field);\n const next = { ...this._v(), [field]: t };\n this._v.set(next);\n const fmt = this.valueFormat();\n this._onChange(fmt === 'text' || (fmt === 'auto' && this._textModel) ? formatAddressValue(next) : { ...next });\n this.valueChange.emit({ ...next });\n }\n\n protected _onFocusOut(field: AddressField, event: FocusEvent) {\n if (!this._touched().has(field)) this._touched.set(new Set([...this._touched(), field]));\n const cur = this._v()[field];\n // edge spaces the user typed are dropped when the field is left (never while typing; an untouched tab-through of a host-written value emits nothing)\n if (this._edited.has(field) && cur !== cur.trim() && !this.disabled() && !this.readonly()) this._set(field, cur.trim());\n const next = event.relatedTarget as Node | null;\n if (!next || !this.host.nativeElement.contains(next)) this._onTouched();\n }\n\n /** True while the field's own message may show: after the field was left, or while the host's `showErrors` is true. Bound to the child's `showErrors` so a reset clears the child too. */\n protected _revealed(field: AddressField): boolean {\n return this.showErrors() || this._touched().has(field);\n }\n\n protected _fieldError(field: AddressField): string {\n if (this.disabled() || this.readonly()) return '';\n if (!this._revealed(field)) return '';\n return this._issues()[field]?.message ?? '';\n }\n\n private _hasText(v: AddressValue): boolean {\n return !!(v.street.trim() || v.city.trim() || v.state.trim() || v.zip.trim());\n }\n\n private _firstIssue(issues: Partial<Record<AddressField, FieldIssue>>): FieldIssue | null {\n for (const f of FIELDS) if (issues[f]) return issues[f]!;\n return null;\n }\n\n private _check(v: AddressValue): Partial<Record<AddressField, FieldIssue>> {\n const out: Partial<Record<AddressField, FieldIssue>> = {};\n if (this.disabled() || this.readonly()) return out;\n const mustFill = this.required() || (this.requireComplete() && this._hasText(v));\n const labels: Record<'street' | 'city' | 'state' | 'zip', string> = {\n street: this.streetLabel(), city: this.cityLabel(), state: this.stateLabel(), zip: this.zipLabel(),\n };\n const max: Record<AddressField, number> = {\n street: this.streetMaxlength(), apt: this.unitMaxlength(), city: this.cityMaxlength(), state: Infinity, zip: this.zipMaxlength(),\n };\n for (const f of FIELDS) {\n if (f === 'apt' && !this.showUnit()) continue; // a hidden unit has no rules\n const text = v[f].trim();\n if (!text) {\n if (mustFill && f !== 'apt') out[f] = requiredIssue(labels[f]);\n continue;\n }\n const tooLong = maxLengthIssue(text, max[f]);\n if (tooLong) { out[f] = tooLong; continue; }\n if (f === 'zip' && !this._zipOk(text)) out[f] = { key: 'zip', message: this.zipError() };\n if (f === 'state' && !this._stateOptions().some(o => String(o.value) === text)) {\n out[f] = { key: 'option', message: this.labels.t('common.selectValidOption') };\n }\n }\n return out;\n }\n\n private _zipOk(zip: string): boolean {\n const pattern = this.zipPattern();\n if (!pattern) return true;\n return new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, '')).test(zip); // a /g or /y regex would keep state between calls\n }\n}\n"],"mappings":";;;;;;;;;;;;AAkBA,MAAa,mBAA4C,UAAU,KAAI,OAAM;CAAE,OAAO,EAAE;CAAO,OAAO,EAAE;CAAO,aAAa,EAAE;AAAK,EAAG;AAGtI,SAAgB,eAAY;CAC1B,OAAO;EAAE,QAAQ;EAAI,KAAK;EAAI,MAAM;EAAI,OAAO;EAAI,KAAK;CAAE;AAC5D;AAGA,SAAgB,iBAAiB,GAAkE;CACjG,MAAM,KAAK,MAAwB,KAAK,OAAO,KAAK,OAAO,CAAC;CAC5D,OAAO,KAAK,OAAO,MAAM,WACrB;EAAE,QAAQ,EAAE,EAAE,MAAM;EAAG,KAAK,EAAE,EAAE,GAAG;EAAG,MAAM,EAAE,EAAE,IAAI;EAAG,OAAO,EAAE,EAAE,KAAK;EAAG,KAAK,EAAE,EAAE,GAAG;CAAC,IACvF,aAAY;AAClB;AAGA,SAAgB,eAAe,GAAkE;CAC/F,MAAM,IAAI,iBAAiB,CAAC;CAC5B,OAAO,CAAC,EAAE,OAAO,KAAI,KAAM,CAAC,EAAE,IAAI,KAAI,KAAM,CAAC,EAAE,KAAK,KAAI,KAAM,CAAC,EAAE,MAAM,KAAI,KAAM,CAAC,EAAE,IAAI,KAAI;AAC9F;AAGA,MAAa,iBAAiB;AAG9B,SAAS,aAAa,GAAiB,OAAc;CAEnD,OAAO,CADW,CAAC,EAAE,KAAK,KAAI,GAAI,EAAE,MAAM,KAAI,CAAE,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,QAAQ,OAAO,GAC9E,GAAW,EAAE,IAAI,KAAI,CAAE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AA;EAAA,CAAA"}
|
|
@@ -3281,8 +3281,6 @@ function focusInitial(dialog, body, doc) {
|
|
|
3281
3281
|
if (!control) continue;
|
|
3282
3282
|
if ((control.tagName === "BUTTON" ? !control.disabled && control.getClientRects().length > 0 : isUsableField(control)) && tryFocus(control)) return;
|
|
3283
3283
|
}
|
|
3284
|
-
const fields = Array.from(body.querySelectorAll("input, select, textarea"));
|
|
3285
|
-
for (const f of fields) if (isUsableField(f) && tryFocus(f)) return;
|
|
3286
3284
|
dialog.focus();
|
|
3287
3285
|
}
|
|
3288
3286
|
const FOCUSABLE_ANCESTOR = "button, a[href], [tabindex], [role=\"button\"], input:not([type=\"hidden\"]), select, textarea, summary";
|
|
@@ -5234,6 +5232,7 @@ var SidePanelComponent = class SidePanelComponent {
|
|
|
5234
5232
|
<h2 class="sp-title" data-testid="side-panel-title" [id]="titleId">{{ title() }}</h2>
|
|
5235
5233
|
@if (subtitle()) { <p class="sp-subtitle" data-testid="side-panel-subtitle">{{ subtitle() }}</p> }
|
|
5236
5234
|
</div>
|
|
5235
|
+
<div class="sp-header-end"><ng-content select="[panel-header-end]" /></div>
|
|
5237
5236
|
<button class="sp-close" type="button" (click)="closed.emit()" [attr.aria-label]="labels.t('sidePanel.dismissPanel')">
|
|
5238
5237
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
5239
5238
|
<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>
|
|
@@ -5290,7 +5289,7 @@ var SidePanelComponent = class SidePanelComponent {
|
|
|
5290
5289
|
}
|
|
5291
5290
|
`,
|
|
5292
5291
|
isInline: true,
|
|
5293
|
-
styles: [".sp-backdrop{position:fixed;inset:0;background:#0000004d;z-index:90;animation:sp-fade .2s ease}.sp-panel{position:fixed;top:0;right:0;bottom:var(--ui-kb, 0px);width:480px;max-width:100vw;max-height:100vh;max-height:var(--ui-vvh, 100dvh);background:#fff;z-index:100;box-shadow:-4px 0 20px #0000001a;display:flex;flex-direction:column;animation:sp-slide .25s ease}.sp-panel:focus{outline:none}.sp-focus-guard{position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;outline:none}.sp-wide{width:620px}.sp-extra-wide{width:760px}.sp-header{display:flex;justify-content:space-between;align-items:center;padding:24px 24px 20px;gap:12px;flex-shrink:0;background:linear-gradient(135deg,#1e293b,#334155)}.sp-header-text{flex:1;min-width:0}.sp-title{font-size:1.125rem;font-weight:700;color:#fff;margin:0;overflow-wrap:anywhere}.sp-subtitle{font-size:.8125rem;color:#94a3b8;margin:4px 0 0}.sp-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;border-radius:8px;border:1px solid rgba(255,255,255,.2);background:#ffffff1a;cursor:pointer;color:#cbd5e1;transition:background .15s,border-color .15s}.sp-close:hover{background:#fff3;border-color:#ffffff4d;color:#fff}.sp-close:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.sp-body{padding:20px 24px 24px;flex:1;overflow-y:auto;overflow-x:hidden}.sp-body:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.sp-footer{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:14px 24px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid #e2e8f0;background:#f8fafc}.sp-footer-extra{display:flex;align-items:center;justify-content:center;gap:8px;flex:1 1 auto;margin:0 8px;min-width:0}.sp-footer-extra:empty{display:none}.sp-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;border-radius:8px;font-size:.875rem;font-weight:600;font-family:inherit;cursor:pointer;white-space:nowrap;transition:all .15s ease}.sp-btn:disabled{opacity:.5;cursor:not-allowed}.sp-btn:focus-visible{outline:2px solid var(--ui-focus, #3b82f6);outline-offset:2px}.sp-btn-cancel{background:#fff;border:1px solid #e2e8f0;color:#334155}.sp-btn-cancel:hover:not(:disabled){background:#f8fafc;border-color:#cbd5e1}.sp-btn-primary{background:var(--ui-accent, #2563eb);border:1px solid var(--ui-accent, #2563eb);color:var(--ui-on-accent, #fff)}.sp-btn-primary:hover:not(:disabled){background:var(--ui-accent-hover, #1d4ed8);border-color:var(--ui-accent-hover, #1d4ed8)}.sp-btn-danger{background:#dc2626;border:1px solid #dc2626;color:#fff}.sp-btn-danger:hover:not(:disabled){background:#b91c1c;border-color:#b91c1c}.sp-btn-warning{background:#f97316;border:1px solid #f97316;color:#fff}.sp-btn-warning:hover:not(:disabled){background:#ea6c0a;border-color:#ea6c0a}.sp-spinner{display:inline-block;width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.3);border-top-color:currentColor;animation:sp-spin .6s linear infinite;flex-shrink:0}@media(max-width:768px){.sp-panel,.sp-wide,.sp-extra-wide{width:100vw}}@media(max-width:480px){.sp-panel,.sp-wide,.sp-extra-wide{inset:auto 0 0;width:100vw;max-height:90vh;max-height:min(90dvh,var(--ui-vvh, 100dvh));border-radius:16px 16px 0 0;box-shadow:0 -4px 24px #00000026;animation:sp-up .25s ease}.sp-header{padding:16px 16px 14px}.sp-body{padding:16px}.sp-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px))}.sp-footer{flex-direction:column-reverse;align-items:stretch;gap:8px}.sp-footer .sp-btn{width:100%;white-space:normal}.sp-footer .sp-footer-extra{margin:0;flex-wrap:wrap}}@media(pointer:coarse),(max-width:480px){.sp-close{position:relative;box-sizing:border-box;width:44px;height:44px;margin:-4px;border:0;background:none}.sp-close:hover{background:none}.sp-close:before{content:\"\";position:absolute;inset:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.2);border-radius:8px;background:#ffffff1a;pointer-events:none;transition:background .15s,border-color .15s}.sp-close:hover:before{background:#fff3;border-color:#ffffff4d}.sp-close>svg{position:relative}.sp-btn{min-height:44px;justify-content:center}}@keyframes sp-slide{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes sp-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes sp-fade{0%{opacity:0}to{opacity:1}}@keyframes sp-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sp-backdrop,.sp-panel,.sp-wide,.sp-extra-wide{animation:none}.sp-spinner{animation-duration:2s}}\n"],
|
|
5292
|
+
styles: [".sp-backdrop{position:fixed;inset:0;background:#0000004d;z-index:90;animation:sp-fade .2s ease}.sp-panel{position:fixed;top:0;right:0;bottom:var(--ui-kb, 0px);width:480px;max-width:100vw;max-height:100vh;max-height:var(--ui-vvh, 100dvh);background:#fff;z-index:100;box-shadow:-4px 0 20px #0000001a;display:flex;flex-direction:column;animation:sp-slide .25s ease}.sp-panel:focus{outline:none}.sp-focus-guard{position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;outline:none}.sp-wide{width:620px}.sp-extra-wide{width:760px}.sp-header{display:flex;justify-content:space-between;align-items:center;padding:24px 24px 20px;gap:12px;flex-shrink:0;background:linear-gradient(135deg,#1e293b,#334155)}.sp-header-text{flex:1;min-width:0}.sp-header-end{display:flex;align-items:center;gap:8px;flex-shrink:0}.sp-header-end:empty{display:none}.sp-title{font-size:1.125rem;font-weight:700;color:#fff;margin:0;overflow-wrap:anywhere}.sp-subtitle{font-size:.8125rem;color:#94a3b8;margin:4px 0 0}.sp-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;border-radius:8px;border:1px solid rgba(255,255,255,.2);background:#ffffff1a;cursor:pointer;color:#cbd5e1;transition:background .15s,border-color .15s}.sp-close:hover{background:#fff3;border-color:#ffffff4d;color:#fff}.sp-close:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.sp-body{padding:20px 24px 24px;flex:1;overflow-y:auto;overflow-x:hidden}.sp-body:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.sp-footer{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:14px 24px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid #e2e8f0;background:#f8fafc}.sp-footer-extra{display:flex;align-items:center;justify-content:center;gap:8px;flex:1 1 auto;margin:0 8px;min-width:0}.sp-footer-extra:empty{display:none}.sp-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;border-radius:8px;font-size:.875rem;font-weight:600;font-family:inherit;cursor:pointer;white-space:nowrap;transition:all .15s ease}.sp-btn:disabled{opacity:.5;cursor:not-allowed}.sp-btn:focus-visible{outline:2px solid var(--ui-focus, #3b82f6);outline-offset:2px}.sp-btn-cancel{background:#fff;border:1px solid #e2e8f0;color:#334155}.sp-btn-cancel:hover:not(:disabled){background:#f8fafc;border-color:#cbd5e1}.sp-btn-primary{background:var(--ui-accent, #2563eb);border:1px solid var(--ui-accent, #2563eb);color:var(--ui-on-accent, #fff)}.sp-btn-primary:hover:not(:disabled){background:var(--ui-accent-hover, #1d4ed8);border-color:var(--ui-accent-hover, #1d4ed8)}.sp-btn-danger{background:#dc2626;border:1px solid #dc2626;color:#fff}.sp-btn-danger:hover:not(:disabled){background:#b91c1c;border-color:#b91c1c}.sp-btn-warning{background:#f97316;border:1px solid #f97316;color:#fff}.sp-btn-warning:hover:not(:disabled){background:#ea6c0a;border-color:#ea6c0a}.sp-spinner{display:inline-block;width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.3);border-top-color:currentColor;animation:sp-spin .6s linear infinite;flex-shrink:0}@media(max-width:768px){.sp-panel,.sp-wide,.sp-extra-wide{width:100vw}}@media(max-width:480px){.sp-panel,.sp-wide,.sp-extra-wide{inset:auto 0 0;width:100vw;max-height:90vh;max-height:min(90dvh,var(--ui-vvh, 100dvh));border-radius:16px 16px 0 0;box-shadow:0 -4px 24px #00000026;animation:sp-up .25s ease}.sp-header{padding:16px 16px 14px}.sp-body{padding:16px}.sp-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px))}.sp-footer{flex-direction:column-reverse;align-items:stretch;gap:8px}.sp-footer .sp-btn{width:100%;white-space:normal}.sp-footer .sp-footer-extra{margin:0;flex-wrap:wrap}}@media(pointer:coarse),(max-width:480px){.sp-close{position:relative;box-sizing:border-box;width:44px;height:44px;margin:-4px;border:0;background:none}.sp-close:hover{background:none}.sp-close:before{content:\"\";position:absolute;inset:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.2);border-radius:8px;background:#ffffff1a;pointer-events:none;transition:background .15s,border-color .15s}.sp-close:hover:before{background:#fff3;border-color:#ffffff4d}.sp-close>svg{position:relative}.sp-btn{min-height:44px;justify-content:center}}@keyframes sp-slide{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes sp-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes sp-fade{0%{opacity:0}to{opacity:1}}@keyframes sp-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sp-backdrop,.sp-panel,.sp-wide,.sp-extra-wide{animation:none}.sp-spinner{animation-duration:2s}}\n"],
|
|
5294
5293
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
5295
5294
|
});
|
|
5296
5295
|
}
|
|
@@ -5330,6 +5329,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5330
5329
|
<h2 class="sp-title" data-testid="side-panel-title" [id]="titleId">{{ title() }}</h2>
|
|
5331
5330
|
@if (subtitle()) { <p class="sp-subtitle" data-testid="side-panel-subtitle">{{ subtitle() }}</p> }
|
|
5332
5331
|
</div>
|
|
5332
|
+
<div class="sp-header-end"><ng-content select="[panel-header-end]" /></div>
|
|
5333
5333
|
<button class="sp-close" type="button" (click)="closed.emit()" [attr.aria-label]="labels.t('sidePanel.dismissPanel')">
|
|
5334
5334
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
5335
5335
|
<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>
|
|
@@ -5385,7 +5385,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5385
5385
|
</div>
|
|
5386
5386
|
}
|
|
5387
5387
|
`,
|
|
5388
|
-
styles: [".sp-backdrop{position:fixed;inset:0;background:#0000004d;z-index:90;animation:sp-fade .2s ease}.sp-panel{position:fixed;top:0;right:0;bottom:var(--ui-kb, 0px);width:480px;max-width:100vw;max-height:100vh;max-height:var(--ui-vvh, 100dvh);background:#fff;z-index:100;box-shadow:-4px 0 20px #0000001a;display:flex;flex-direction:column;animation:sp-slide .25s ease}.sp-panel:focus{outline:none}.sp-focus-guard{position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;outline:none}.sp-wide{width:620px}.sp-extra-wide{width:760px}.sp-header{display:flex;justify-content:space-between;align-items:center;padding:24px 24px 20px;gap:12px;flex-shrink:0;background:linear-gradient(135deg,#1e293b,#334155)}.sp-header-text{flex:1;min-width:0}.sp-title{font-size:1.125rem;font-weight:700;color:#fff;margin:0;overflow-wrap:anywhere}.sp-subtitle{font-size:.8125rem;color:#94a3b8;margin:4px 0 0}.sp-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;border-radius:8px;border:1px solid rgba(255,255,255,.2);background:#ffffff1a;cursor:pointer;color:#cbd5e1;transition:background .15s,border-color .15s}.sp-close:hover{background:#fff3;border-color:#ffffff4d;color:#fff}.sp-close:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.sp-body{padding:20px 24px 24px;flex:1;overflow-y:auto;overflow-x:hidden}.sp-body:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.sp-footer{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:14px 24px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid #e2e8f0;background:#f8fafc}.sp-footer-extra{display:flex;align-items:center;justify-content:center;gap:8px;flex:1 1 auto;margin:0 8px;min-width:0}.sp-footer-extra:empty{display:none}.sp-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;border-radius:8px;font-size:.875rem;font-weight:600;font-family:inherit;cursor:pointer;white-space:nowrap;transition:all .15s ease}.sp-btn:disabled{opacity:.5;cursor:not-allowed}.sp-btn:focus-visible{outline:2px solid var(--ui-focus, #3b82f6);outline-offset:2px}.sp-btn-cancel{background:#fff;border:1px solid #e2e8f0;color:#334155}.sp-btn-cancel:hover:not(:disabled){background:#f8fafc;border-color:#cbd5e1}.sp-btn-primary{background:var(--ui-accent, #2563eb);border:1px solid var(--ui-accent, #2563eb);color:var(--ui-on-accent, #fff)}.sp-btn-primary:hover:not(:disabled){background:var(--ui-accent-hover, #1d4ed8);border-color:var(--ui-accent-hover, #1d4ed8)}.sp-btn-danger{background:#dc2626;border:1px solid #dc2626;color:#fff}.sp-btn-danger:hover:not(:disabled){background:#b91c1c;border-color:#b91c1c}.sp-btn-warning{background:#f97316;border:1px solid #f97316;color:#fff}.sp-btn-warning:hover:not(:disabled){background:#ea6c0a;border-color:#ea6c0a}.sp-spinner{display:inline-block;width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.3);border-top-color:currentColor;animation:sp-spin .6s linear infinite;flex-shrink:0}@media(max-width:768px){.sp-panel,.sp-wide,.sp-extra-wide{width:100vw}}@media(max-width:480px){.sp-panel,.sp-wide,.sp-extra-wide{inset:auto 0 0;width:100vw;max-height:90vh;max-height:min(90dvh,var(--ui-vvh, 100dvh));border-radius:16px 16px 0 0;box-shadow:0 -4px 24px #00000026;animation:sp-up .25s ease}.sp-header{padding:16px 16px 14px}.sp-body{padding:16px}.sp-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px))}.sp-footer{flex-direction:column-reverse;align-items:stretch;gap:8px}.sp-footer .sp-btn{width:100%;white-space:normal}.sp-footer .sp-footer-extra{margin:0;flex-wrap:wrap}}@media(pointer:coarse),(max-width:480px){.sp-close{position:relative;box-sizing:border-box;width:44px;height:44px;margin:-4px;border:0;background:none}.sp-close:hover{background:none}.sp-close:before{content:\"\";position:absolute;inset:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.2);border-radius:8px;background:#ffffff1a;pointer-events:none;transition:background .15s,border-color .15s}.sp-close:hover:before{background:#fff3;border-color:#ffffff4d}.sp-close>svg{position:relative}.sp-btn{min-height:44px;justify-content:center}}@keyframes sp-slide{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes sp-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes sp-fade{0%{opacity:0}to{opacity:1}}@keyframes sp-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sp-backdrop,.sp-panel,.sp-wide,.sp-extra-wide{animation:none}.sp-spinner{animation-duration:2s}}\n"]
|
|
5388
|
+
styles: [".sp-backdrop{position:fixed;inset:0;background:#0000004d;z-index:90;animation:sp-fade .2s ease}.sp-panel{position:fixed;top:0;right:0;bottom:var(--ui-kb, 0px);width:480px;max-width:100vw;max-height:100vh;max-height:var(--ui-vvh, 100dvh);background:#fff;z-index:100;box-shadow:-4px 0 20px #0000001a;display:flex;flex-direction:column;animation:sp-slide .25s ease}.sp-panel:focus{outline:none}.sp-focus-guard{position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;outline:none}.sp-wide{width:620px}.sp-extra-wide{width:760px}.sp-header{display:flex;justify-content:space-between;align-items:center;padding:24px 24px 20px;gap:12px;flex-shrink:0;background:linear-gradient(135deg,#1e293b,#334155)}.sp-header-text{flex:1;min-width:0}.sp-header-end{display:flex;align-items:center;gap:8px;flex-shrink:0}.sp-header-end:empty{display:none}.sp-title{font-size:1.125rem;font-weight:700;color:#fff;margin:0;overflow-wrap:anywhere}.sp-subtitle{font-size:.8125rem;color:#94a3b8;margin:4px 0 0}.sp-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;border-radius:8px;border:1px solid rgba(255,255,255,.2);background:#ffffff1a;cursor:pointer;color:#cbd5e1;transition:background .15s,border-color .15s}.sp-close:hover{background:#fff3;border-color:#ffffff4d;color:#fff}.sp-close:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.sp-body{padding:20px 24px 24px;flex:1;overflow-y:auto;overflow-x:hidden}.sp-body:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.sp-footer{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:14px 24px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid #e2e8f0;background:#f8fafc}.sp-footer-extra{display:flex;align-items:center;justify-content:center;gap:8px;flex:1 1 auto;margin:0 8px;min-width:0}.sp-footer-extra:empty{display:none}.sp-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;border-radius:8px;font-size:.875rem;font-weight:600;font-family:inherit;cursor:pointer;white-space:nowrap;transition:all .15s ease}.sp-btn:disabled{opacity:.5;cursor:not-allowed}.sp-btn:focus-visible{outline:2px solid var(--ui-focus, #3b82f6);outline-offset:2px}.sp-btn-cancel{background:#fff;border:1px solid #e2e8f0;color:#334155}.sp-btn-cancel:hover:not(:disabled){background:#f8fafc;border-color:#cbd5e1}.sp-btn-primary{background:var(--ui-accent, #2563eb);border:1px solid var(--ui-accent, #2563eb);color:var(--ui-on-accent, #fff)}.sp-btn-primary:hover:not(:disabled){background:var(--ui-accent-hover, #1d4ed8);border-color:var(--ui-accent-hover, #1d4ed8)}.sp-btn-danger{background:#dc2626;border:1px solid #dc2626;color:#fff}.sp-btn-danger:hover:not(:disabled){background:#b91c1c;border-color:#b91c1c}.sp-btn-warning{background:#f97316;border:1px solid #f97316;color:#fff}.sp-btn-warning:hover:not(:disabled){background:#ea6c0a;border-color:#ea6c0a}.sp-spinner{display:inline-block;width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.3);border-top-color:currentColor;animation:sp-spin .6s linear infinite;flex-shrink:0}@media(max-width:768px){.sp-panel,.sp-wide,.sp-extra-wide{width:100vw}}@media(max-width:480px){.sp-panel,.sp-wide,.sp-extra-wide{inset:auto 0 0;width:100vw;max-height:90vh;max-height:min(90dvh,var(--ui-vvh, 100dvh));border-radius:16px 16px 0 0;box-shadow:0 -4px 24px #00000026;animation:sp-up .25s ease}.sp-header{padding:16px 16px 14px}.sp-body{padding:16px}.sp-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px))}.sp-footer{flex-direction:column-reverse;align-items:stretch;gap:8px}.sp-footer .sp-btn{width:100%;white-space:normal}.sp-footer .sp-footer-extra{margin:0;flex-wrap:wrap}}@media(pointer:coarse),(max-width:480px){.sp-close{position:relative;box-sizing:border-box;width:44px;height:44px;margin:-4px;border:0;background:none}.sp-close:hover{background:none}.sp-close:before{content:\"\";position:absolute;inset:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.2);border-radius:8px;background:#ffffff1a;pointer-events:none;transition:background .15s,border-color .15s}.sp-close:hover:before{background:#fff3;border-color:#ffffff4d}.sp-close>svg{position:relative}.sp-btn{min-height:44px;justify-content:center}}@keyframes sp-slide{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes sp-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes sp-fade{0%{opacity:0}to{opacity:1}}@keyframes sp-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sp-backdrop,.sp-panel,.sp-wide,.sp-extra-wide{animation:none}.sp-spinner{animation-duration:2s}}\n"]
|
|
5389
5389
|
}]
|
|
5390
5390
|
}],
|
|
5391
5391
|
ctorParameters: () => [],
|