@digital-realty/ix-phone-input 2.2.10 → 2.2.12

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.
@@ -169,6 +169,7 @@ export declare class IxPhoneInput extends LitElement {
169
169
  protected updated(changedProperties: PropertyValues): void;
170
170
  protected willUpdate(changedProperties: PropertyValues<this>): void;
171
171
  private handleInput;
172
+ private handlePaste;
172
173
  disconnectedCallback(): void;
173
174
  protected render(): import("lit-html").TemplateResult<1>;
174
175
  /** @private */
@@ -354,6 +354,16 @@ export class IxPhoneInput extends LitElement {
354
354
  // Sync validity so that clients can check validity on input.
355
355
  this.syncValidity();
356
356
  }
357
+ handlePaste() {
358
+ // zero second time out to ensure that the input value is updated
359
+ setTimeout(() => {
360
+ var _a;
361
+ this.formatValue();
362
+ (_a = this.iti) === null || _a === void 0 ? void 0 : _a.setNumber(this.value);
363
+ this.syncValidity();
364
+ this.dispatchEvent(new Event('input', { bubbles: true, composed: true }));
365
+ }, 0);
366
+ }
357
367
  disconnectedCallback() {
358
368
  var _a;
359
369
  (_a = this.iti) === null || _a === void 0 ? void 0 : _a.destroy();
@@ -394,6 +404,7 @@ export class IxPhoneInput extends LitElement {
394
404
  aria-describedby="description"
395
405
  @input="${this.handleInput}"
396
406
  @keypress="${this.handleKeyPress}"
407
+ @paste="${this.handlePaste}"
397
408
  />
398
409
  <div id="description" slot="aria-describedby"></div>
399
410
  </ix-field>
@@ -1 +1 @@
1
- {"version":3,"file":"IxPhoneInput.js","sourceRoot":"","sources":["../src/IxPhoneInput.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,OAAO,sCAAsC,CAAC;AAE9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EACL,MAAM,IAAI,0BAA0B,EACpC,MAAM,IAAI,cAAc,GACzB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,uDAAuD,CAA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AI,EAAE,CAAC;2CAAe;AAUnB;IAAtC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;+CAAgB;AAMV;IAA3C,QAAQ,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;oDAAqB;AAEpB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAkB;AAM5C;IAAhB,KAAK,EAAE;2CAAuB;AAEd;IAAhB,KAAK,EAAE;6CAAyB;AAKhB;IAAhB,KAAK,EAAE;iDAA6B;AAMpB;IAAhB,KAAK,EAAE;qDAA8B;AAkN1B;IAAX,QAAQ,EAAE;2CAAY;AAEK;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAY;AAEX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAa;AAG5B;IAAX,QAAQ,EAAE;2CAAkE","sourcesContent":["/* eslint-disable lit/no-value-attribute */\nimport '@digital-realty/ix-field/ix-field.js';\nimport { Field } from '@material/web/field/internal/field.js';\nimport { requestUpdateOnAriaChange } from '@material/web/internal/aria/delegate.js';\nimport {\n styles as outlinedForcedColorsStyles,\n styles as outlinedStyles,\n} from '@material/web/textfield/internal/outlined-styles.css.js';\nimport { styles as sharedStyles } from '@material/web/textfield/internal/shared-styles.css.js';\nimport intlTelInput, { Plugin } from 'intl-tel-input';\nimport { LitElement, PropertyValues, html, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { CONFIG } from './config.js';\nimport { IxPhoneInputStyles } from './ix-phone-input-styles.js';\n\nexport class IxPhoneInput extends LitElement {\n static {\n requestUpdateOnAriaChange(IxPhoneInput);\n }\n\n @query('input')\n readonly input!: HTMLInputElement;\n\n @query('.field') private readonly field?: Field | null;\n\n static get styles() {\n return [\n sharedStyles,\n outlinedStyles,\n outlinedForcedColorsStyles,\n CONFIG.FLAG_SPRITES,\n IxPhoneInputStyles,\n ];\n }\n\n /** @nocollapse */\n static override shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /** @nocollapse */\n static readonly formAssociated = true;\n\n private readonly internals = (this as HTMLElement) /* needed for closure */\n .attachInternals();\n\n @property()\n private readonly type = 'tel';\n\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * Gets or sets whether or not the text field is in a visually invalid state.\n *\n * This error state overrides the error state controlled by\n * `reportValidity()`.\n */\n @property({ type: Boolean, reflect: true }) error = false;\n\n /**\n * The error message that replaces supporting text when `error` is true. If\n * `errorText` is an empty string, then the supporting text will continue to\n * show.\n *\n * This error message overrides the error message displayed by\n * `reportValidity()`.\n */\n @property({ attribute: 'error-text' }) errorText = '';\n\n /**\n * Conveys additional information below the text field, such as how it should\n * be used.\n */\n @property({ attribute: 'supporting-text' }) supportingText = '';\n\n @property({ type: Boolean, reflect: true }) required = false;\n\n /**\n * Returns true when the text field has been interacted with. Native\n * validation errors only display in response to user interactions.\n */\n @state() private dirty = false;\n\n @state() private focused = false;\n\n /**\n * Whether or not a native error has been reported via `reportValidity()`.\n */\n @state() private nativeError = false;\n\n /**\n * The validation message displayed from a native error via\n * `reportValidity()`.\n */\n @state() private nativeErrorText = '';\n\n private get hasError() {\n return this.error || this.nativeError;\n }\n\n /**\n * Returns the text field's validation error message.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Constraint_validation\n */\n get validationMessage() {\n this.syncValidity();\n return this.internals.validationMessage;\n }\n\n /**\n * Returns a `ValidityState` object that represents the validity states of the\n * text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/ValidityState\n */\n get validity() {\n this.syncValidity();\n return this.internals.validity;\n }\n\n /**\n * Returns whether an element will successfully validate based on forms\n * validation rules and constraints.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/willValidate\n */\n get willValidate() {\n this.syncValidity();\n return this.internals.willValidate;\n }\n\n /**\n * The associated form element with which this element's value will submit.\n */\n get form() {\n return this.internals.form;\n }\n\n /**\n * The labels this element is associated with.\n */\n get labels() {\n return this.internals.labels;\n }\n\n /**\n * The HTML name to use in form submission.\n */\n get name() {\n return this.getAttribute('name') ?? '';\n }\n\n set name(name: string) {\n this.setAttribute('name', name);\n }\n\n /**\n * Gets or sets the direction in which selection occurred.\n */\n get selectionDirection() {\n return this.getInput().selectionDirection;\n }\n\n set selectionDirection(value: 'forward' | 'backward' | 'none' | null) {\n this.getInput().selectionDirection = value;\n }\n\n /**\n * Gets or sets the end position or offset of a text selection.\n */\n get selectionEnd() {\n return this.getInput().selectionEnd;\n }\n\n set selectionEnd(value: number | null) {\n this.getInput().selectionEnd = value;\n }\n\n /**\n * Gets or sets the starting position or offset of a text selection.\n */\n get selectionStart() {\n return this.getInput().selectionStart;\n }\n\n set selectionStart(value: number | null) {\n this.getInput().selectionStart = value;\n }\n\n /**\n * Checks the text field's native validation and returns whether or not the\n * element is valid.\n *\n * If invalid, this method will dispatch the `invalid` event.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity\n *\n * @return true if the text field is valid, or false if not.\n */\n checkValidity() {\n this.syncValidity();\n return this.internals.checkValidity();\n }\n\n /**\n * Checks the text field's native validation and returns whether or not the\n * element is valid.\n *\n * If invalid, this method will dispatch the `invalid` event.\n *\n * This method will display or clear an error text message equal to the text\n * field's `validationMessage`, unless the invalid event is canceled.\n *\n * Use `setCustomValidity()` to customize the `validationMessage`.\n *\n * This method can also be used to re-announce error messages to screen\n * readers.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/reportValidity\n *\n * @return true if the text field is valid, or false if not.\n */\n reportValidity() {\n let invalidEvent: Event | undefined;\n this.addEventListener(\n 'invalid',\n event => {\n invalidEvent = event;\n },\n { once: true }\n );\n\n const valid = this.checkValidity();\n if (invalidEvent?.defaultPrevented) {\n return valid;\n }\n\n const prevMessage = this.getErrorText();\n this.nativeError = !valid;\n this.nativeErrorText = this.validationMessage;\n\n if (prevMessage === this.getErrorText()) {\n this.field?.reannounceError();\n }\n\n return valid;\n }\n\n /**\n * Selects all the text in the text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select\n */\n select() {\n this.input.select();\n }\n\n /**\n * Sets a custom validation error message for the text field. Use this for\n * custom error message.\n *\n * When the error is not an empty string, the text field is considered invalid\n * and `validity.customError` will be true.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setCustomValidity\n *\n * @param error The error message to display.\n */\n setCustomValidity(error: string) {\n this.hasCustomValidityError = !!error;\n this.internals.setValidity({ customError: !!error }, error, this.input);\n }\n\n /**\n * Reset the text field to its default value.\n */\n reset() {\n this.dirty = false;\n this.value = this.getAttribute('value') ?? '';\n this.input.value = this.value;\n this.nativeError = false;\n this.nativeErrorText = '';\n }\n\n private hasCustomValidityError = false;\n\n private syncValidity() {\n // Sync the internal <input>'s validity and the host's ElementInternals\n // validity. We do this to re-use native `<input>` validation messages.\n const input = this.getInput();\n if (this.hasCustomValidityError) {\n input.setCustomValidity(this.internals.validationMessage);\n } else {\n input.setCustomValidity('');\n }\n\n this.internals.setValidity(\n input.validity,\n input.validationMessage,\n this.getInput()\n );\n }\n\n @property() label = '';\n\n @property({ type: String }) value = '';\n\n @property({ type: String }) region = '';\n\n // get geo lookup fn from props, use default fn from config or use empty callback\n @property() geoFn = CONFIG?.GEO_FN || ((callback: Function) => callback(''));\n\n iti: Plugin | undefined = undefined;\n\n private formatValue() {\n if (window.intlTelInputUtils?.numberFormat) {\n this.value =\n this.iti?.getNumber(window.intlTelInputUtils.numberFormat.E164) || '';\n }\n }\n\n private handleKeyPress(e: KeyboardEvent) {\n if (/^[A-Z]$/i.test(e.key)) {\n e.preventDefault();\n return false;\n }\n this.formatValue();\n return true;\n }\n\n private getErrorText() {\n return this.error ? this.errorText : this.nativeErrorText;\n }\n\n private handleFocusin() {\n this.focused = true;\n }\n\n private handleFocusout() {\n this.focused = false;\n }\n\n private getInput() {\n if (!this.input) {\n // If the input is not yet defined, synchronously render.\n // e.g.\n // const textField = document.createElement('md-outlined-text-field');\n // document.body.appendChild(textField);\n // textField.focus(); // synchronously render\n this.connectedCallback();\n this.scheduleUpdate();\n }\n\n if (this.isUpdatePending) {\n // If there are pending updates, synchronously perform them. This ensures\n // that constraint validation properties (like `required`) are synced\n // before interacting with input APIs that depend on them.\n this.scheduleUpdate();\n }\n\n return this.input!;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n if (!window.intlTelInputUtils) {\n window.intlTelInputGlobals.loadUtils(CONFIG.UTILS_SCRIPT);\n }\n }\n\n protected override firstUpdated() {\n this.input.addEventListener('countrychange', () => {\n this.formatValue();\n this.dispatchEvent(\n new CustomEvent('country-change', {\n bubbles: true,\n composed: true,\n })\n );\n });\n this.iti = intlTelInput(this.input, {\n initialCountry: this.region !== '' ? this.region : 'auto',\n formatOnDisplay: true,\n nationalMode: false,\n hiddenInput: 'full',\n autoPlaceholder: 'off',\n geoIpLookup: this.geoFn,\n });\n this.iti.promise.then(() => {\n // format on inititalisation\n this.formatValue();\n });\n }\n\n override attributeChangedCallback(\n attribute: string,\n oldValue: string | null,\n newValue: string | null\n ) {\n if (attribute === 'value' && this.dirty) {\n // After user input, changing the value attribute no longer updates the\n // text field's value (until reset). This matches native <input> behavior.\n return;\n }\n\n super.attributeChangedCallback(attribute, oldValue, newValue);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected override updated(changedProperties: PropertyValues) {\n // Keep changedProperties arg so that subclasses may call it\n\n // If a property such as `type` changes and causes the internal <input>\n // value to change without dispatching an event, re-sync it.\n const { value } = this.input;\n if (this.value !== value) {\n // Note this is typically inefficient in updated() since it schedules\n // another update. However, it is needed for the <input> to fully render\n // before checking its value.\n this.value = value;\n }\n\n this.internals.setFormValue(value);\n // Sync validity when properties change, since validation properties may\n // have changed.\n this.syncValidity();\n }\n\n protected willUpdate(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('region')) {\n this.iti?.setCountry(this.region);\n }\n }\n\n private handleInput(event: InputEvent) {\n this.dirty = true;\n this.value = (event.target as HTMLInputElement).value;\n // Sync validity so that clients can check validity on input.\n this.syncValidity();\n }\n\n override disconnectedCallback() {\n this.iti?.destroy();\n }\n\n protected override render() {\n if (this.iti && this.value) {\n this.iti.setNumber(this.value);\n }\n\n const classes = {\n disabled: this.disabled,\n error: !this.disabled && this.hasError,\n };\n\n const ariaLabel = this.ariaLabel || this.label || nothing;\n\n return html`\n <span class=\"text-field ${classMap(classes)}\">\n <ix-field\n class=\"field\"\n count=${this.value.length}\n ?disabled=${this.disabled}\n ?error=${this.hasError}\n error-text=${this.getErrorText()}\n ?focused=${this.focused}\n label=${this.label}\n ?populated=${!!this.value}\n ?required=${this.required}\n supporting-text=${this.supportingText}\n @focusin=${this.handleFocusin}\n @focusout=${this.handleFocusout}\n >\n <input\n name=\"${this.name}\"\n type=\"${this.type}\"\n value=\"${this.value}\"\n ?disabled=${this.disabled}\n ?required=${this.required}\n aria-invalid=${this.hasError}\n aria-label=${ariaLabel}\n aria-describedby=\"description\"\n @input=\"${this.handleInput}\"\n @keypress=\"${this.handleKeyPress}\"\n />\n <div id=\"description\" slot=\"aria-describedby\"></div>\n </ix-field>\n </span>\n `;\n }\n\n /** @private */\n formResetCallback() {\n this.reset();\n }\n\n /** @private */\n formStateRestoreCallback(newState: string) {\n this.value = newState;\n }\n\n override focus() {\n // Required for the case that the user slots a focusable element into the\n // leading icon slot such as an iconbutton due to how delegatesFocus works.\n this.getInput().focus();\n }\n}\n"]}
1
+ {"version":3,"file":"IxPhoneInput.js","sourceRoot":"","sources":["../src/IxPhoneInput.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,OAAO,sCAAsC,CAAC;AAE9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EACL,MAAM,IAAI,0BAA0B,EACpC,M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ACE,yBAAyB,CAAC,YAAY,CAAC,CAAC;AAC1C,CAAC,GAAA,CAAA;AAiBD,kBAAkB;AACF,8BAAiB,GAAmB;IAClD,GAAG,UAAU,CAAC,iBAAiB;IAC/B,cAAc,EAAE,IAAI;CACrB,AAHgC,CAG/B;AAEF,mBAAmB;AACH,2BAAc,GAAG,IAAI,AAAP,CAAQ;AArB7B;IADR,KAAK,CAAC,OAAO,CAAC;2CACmB;AAEA;IAAjC,KAAK,CAAC,QAAQ,CAAC;2CAAuC;AAyBtC;IADhB,QAAQ,EAAE;0CACmB;AAEc;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAkB;AAQjB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAe;AAUnB;IAAtC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;+CAAgB;AAMV;IAA3C,QAAQ,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;oDAAqB;AAEpB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAkB;AAM5C;IAAhB,KAAK,EAAE;2CAAuB;AAEd;IAAhB,KAAK,EAAE;6CAAyB;AAKhB;IAAhB,KAAK,EAAE;iDAA6B;AAMpB;IAAhB,KAAK,EAAE;qDAA8B;AAkN1B;IAAX,QAAQ,EAAE;2CAAY;AAEK;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAY;AAEX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAa;AAG5B;IAAX,QAAQ,EAAE;2CAAkE","sourcesContent":["/* eslint-disable lit/no-value-attribute */\nimport '@digital-realty/ix-field/ix-field.js';\nimport { Field } from '@material/web/field/internal/field.js';\nimport { requestUpdateOnAriaChange } from '@material/web/internal/aria/delegate.js';\nimport {\n styles as outlinedForcedColorsStyles,\n styles as outlinedStyles,\n} from '@material/web/textfield/internal/outlined-styles.css.js';\nimport { styles as sharedStyles } from '@material/web/textfield/internal/shared-styles.css.js';\nimport intlTelInput, { Plugin } from 'intl-tel-input';\nimport { LitElement, PropertyValues, html, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { CONFIG } from './config.js';\nimport { IxPhoneInputStyles } from './ix-phone-input-styles.js';\n\nexport class IxPhoneInput extends LitElement {\n static {\n requestUpdateOnAriaChange(IxPhoneInput);\n }\n\n @query('input')\n readonly input!: HTMLInputElement;\n\n @query('.field') private readonly field?: Field | null;\n\n static get styles() {\n return [\n sharedStyles,\n outlinedStyles,\n outlinedForcedColorsStyles,\n CONFIG.FLAG_SPRITES,\n IxPhoneInputStyles,\n ];\n }\n\n /** @nocollapse */\n static override shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /** @nocollapse */\n static readonly formAssociated = true;\n\n private readonly internals = (this as HTMLElement) /* needed for closure */\n .attachInternals();\n\n @property()\n private readonly type = 'tel';\n\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * Gets or sets whether or not the text field is in a visually invalid state.\n *\n * This error state overrides the error state controlled by\n * `reportValidity()`.\n */\n @property({ type: Boolean, reflect: true }) error = false;\n\n /**\n * The error message that replaces supporting text when `error` is true. If\n * `errorText` is an empty string, then the supporting text will continue to\n * show.\n *\n * This error message overrides the error message displayed by\n * `reportValidity()`.\n */\n @property({ attribute: 'error-text' }) errorText = '';\n\n /**\n * Conveys additional information below the text field, such as how it should\n * be used.\n */\n @property({ attribute: 'supporting-text' }) supportingText = '';\n\n @property({ type: Boolean, reflect: true }) required = false;\n\n /**\n * Returns true when the text field has been interacted with. Native\n * validation errors only display in response to user interactions.\n */\n @state() private dirty = false;\n\n @state() private focused = false;\n\n /**\n * Whether or not a native error has been reported via `reportValidity()`.\n */\n @state() private nativeError = false;\n\n /**\n * The validation message displayed from a native error via\n * `reportValidity()`.\n */\n @state() private nativeErrorText = '';\n\n private get hasError() {\n return this.error || this.nativeError;\n }\n\n /**\n * Returns the text field's validation error message.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Constraint_validation\n */\n get validationMessage() {\n this.syncValidity();\n return this.internals.validationMessage;\n }\n\n /**\n * Returns a `ValidityState` object that represents the validity states of the\n * text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/ValidityState\n */\n get validity() {\n this.syncValidity();\n return this.internals.validity;\n }\n\n /**\n * Returns whether an element will successfully validate based on forms\n * validation rules and constraints.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/willValidate\n */\n get willValidate() {\n this.syncValidity();\n return this.internals.willValidate;\n }\n\n /**\n * The associated form element with which this element's value will submit.\n */\n get form() {\n return this.internals.form;\n }\n\n /**\n * The labels this element is associated with.\n */\n get labels() {\n return this.internals.labels;\n }\n\n /**\n * The HTML name to use in form submission.\n */\n get name() {\n return this.getAttribute('name') ?? '';\n }\n\n set name(name: string) {\n this.setAttribute('name', name);\n }\n\n /**\n * Gets or sets the direction in which selection occurred.\n */\n get selectionDirection() {\n return this.getInput().selectionDirection;\n }\n\n set selectionDirection(value: 'forward' | 'backward' | 'none' | null) {\n this.getInput().selectionDirection = value;\n }\n\n /**\n * Gets or sets the end position or offset of a text selection.\n */\n get selectionEnd() {\n return this.getInput().selectionEnd;\n }\n\n set selectionEnd(value: number | null) {\n this.getInput().selectionEnd = value;\n }\n\n /**\n * Gets or sets the starting position or offset of a text selection.\n */\n get selectionStart() {\n return this.getInput().selectionStart;\n }\n\n set selectionStart(value: number | null) {\n this.getInput().selectionStart = value;\n }\n\n /**\n * Checks the text field's native validation and returns whether or not the\n * element is valid.\n *\n * If invalid, this method will dispatch the `invalid` event.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity\n *\n * @return true if the text field is valid, or false if not.\n */\n checkValidity() {\n this.syncValidity();\n return this.internals.checkValidity();\n }\n\n /**\n * Checks the text field's native validation and returns whether or not the\n * element is valid.\n *\n * If invalid, this method will dispatch the `invalid` event.\n *\n * This method will display or clear an error text message equal to the text\n * field's `validationMessage`, unless the invalid event is canceled.\n *\n * Use `setCustomValidity()` to customize the `validationMessage`.\n *\n * This method can also be used to re-announce error messages to screen\n * readers.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/reportValidity\n *\n * @return true if the text field is valid, or false if not.\n */\n reportValidity() {\n let invalidEvent: Event | undefined;\n this.addEventListener(\n 'invalid',\n event => {\n invalidEvent = event;\n },\n { once: true }\n );\n\n const valid = this.checkValidity();\n if (invalidEvent?.defaultPrevented) {\n return valid;\n }\n\n const prevMessage = this.getErrorText();\n this.nativeError = !valid;\n this.nativeErrorText = this.validationMessage;\n\n if (prevMessage === this.getErrorText()) {\n this.field?.reannounceError();\n }\n\n return valid;\n }\n\n /**\n * Selects all the text in the text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select\n */\n select() {\n this.input.select();\n }\n\n /**\n * Sets a custom validation error message for the text field. Use this for\n * custom error message.\n *\n * When the error is not an empty string, the text field is considered invalid\n * and `validity.customError` will be true.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setCustomValidity\n *\n * @param error The error message to display.\n */\n setCustomValidity(error: string) {\n this.hasCustomValidityError = !!error;\n this.internals.setValidity({ customError: !!error }, error, this.input);\n }\n\n /**\n * Reset the text field to its default value.\n */\n reset() {\n this.dirty = false;\n this.value = this.getAttribute('value') ?? '';\n this.input.value = this.value;\n this.nativeError = false;\n this.nativeErrorText = '';\n }\n\n private hasCustomValidityError = false;\n\n private syncValidity() {\n // Sync the internal <input>'s validity and the host's ElementInternals\n // validity. We do this to re-use native `<input>` validation messages.\n const input = this.getInput();\n if (this.hasCustomValidityError) {\n input.setCustomValidity(this.internals.validationMessage);\n } else {\n input.setCustomValidity('');\n }\n\n this.internals.setValidity(\n input.validity,\n input.validationMessage,\n this.getInput()\n );\n }\n\n @property() label = '';\n\n @property({ type: String }) value = '';\n\n @property({ type: String }) region = '';\n\n // get geo lookup fn from props, use default fn from config or use empty callback\n @property() geoFn = CONFIG?.GEO_FN || ((callback: Function) => callback(''));\n\n iti: Plugin | undefined = undefined;\n\n private formatValue() {\n if (window.intlTelInputUtils?.numberFormat) {\n this.value =\n this.iti?.getNumber(window.intlTelInputUtils.numberFormat.E164) || '';\n }\n }\n\n private handleKeyPress(e: KeyboardEvent) {\n if (/^[A-Z]$/i.test(e.key)) {\n e.preventDefault();\n return false;\n }\n this.formatValue();\n return true;\n }\n\n private getErrorText() {\n return this.error ? this.errorText : this.nativeErrorText;\n }\n\n private handleFocusin() {\n this.focused = true;\n }\n\n private handleFocusout() {\n this.focused = false;\n }\n\n private getInput() {\n if (!this.input) {\n // If the input is not yet defined, synchronously render.\n // e.g.\n // const textField = document.createElement('md-outlined-text-field');\n // document.body.appendChild(textField);\n // textField.focus(); // synchronously render\n this.connectedCallback();\n this.scheduleUpdate();\n }\n\n if (this.isUpdatePending) {\n // If there are pending updates, synchronously perform them. This ensures\n // that constraint validation properties (like `required`) are synced\n // before interacting with input APIs that depend on them.\n this.scheduleUpdate();\n }\n\n return this.input!;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n if (!window.intlTelInputUtils) {\n window.intlTelInputGlobals.loadUtils(CONFIG.UTILS_SCRIPT);\n }\n }\n\n protected override firstUpdated() {\n this.input.addEventListener('countrychange', () => {\n this.formatValue();\n this.dispatchEvent(\n new CustomEvent('country-change', {\n bubbles: true,\n composed: true,\n })\n );\n });\n this.iti = intlTelInput(this.input, {\n initialCountry: this.region !== '' ? this.region : 'auto',\n formatOnDisplay: true,\n nationalMode: false,\n hiddenInput: 'full',\n autoPlaceholder: 'off',\n geoIpLookup: this.geoFn,\n });\n this.iti.promise.then(() => {\n // format on inititalisation\n this.formatValue();\n });\n }\n\n override attributeChangedCallback(\n attribute: string,\n oldValue: string | null,\n newValue: string | null\n ) {\n if (attribute === 'value' && this.dirty) {\n // After user input, changing the value attribute no longer updates the\n // text field's value (until reset). This matches native <input> behavior.\n return;\n }\n\n super.attributeChangedCallback(attribute, oldValue, newValue);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected override updated(changedProperties: PropertyValues) {\n // Keep changedProperties arg so that subclasses may call it\n\n // If a property such as `type` changes and causes the internal <input>\n // value to change without dispatching an event, re-sync it.\n const { value } = this.input;\n if (this.value !== value) {\n // Note this is typically inefficient in updated() since it schedules\n // another update. However, it is needed for the <input> to fully render\n // before checking its value.\n this.value = value;\n }\n\n this.internals.setFormValue(value);\n // Sync validity when properties change, since validation properties may\n // have changed.\n this.syncValidity();\n }\n\n protected willUpdate(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('region')) {\n this.iti?.setCountry(this.region);\n }\n }\n\n private handleInput(event: InputEvent) {\n this.dirty = true;\n this.value = (event.target as HTMLInputElement).value;\n // Sync validity so that clients can check validity on input.\n this.syncValidity();\n }\n\n private handlePaste() {\n // zero second time out to ensure that the input value is updated\n setTimeout(() => {\n this.formatValue();\n this.iti?.setNumber(this.value);\n this.syncValidity();\n this.dispatchEvent(new Event('input', { bubbles: true, composed: true }));\n }, 0);\n }\n\n override disconnectedCallback() {\n this.iti?.destroy();\n }\n\n protected override render() {\n if (this.iti && this.value) {\n this.iti.setNumber(this.value);\n }\n\n const classes = {\n disabled: this.disabled,\n error: !this.disabled && this.hasError,\n };\n\n const ariaLabel = this.ariaLabel || this.label || nothing;\n\n return html`\n <span class=\"text-field ${classMap(classes)}\">\n <ix-field\n class=\"field\"\n count=${this.value.length}\n ?disabled=${this.disabled}\n ?error=${this.hasError}\n error-text=${this.getErrorText()}\n ?focused=${this.focused}\n label=${this.label}\n ?populated=${!!this.value}\n ?required=${this.required}\n supporting-text=${this.supportingText}\n @focusin=${this.handleFocusin}\n @focusout=${this.handleFocusout}\n >\n <input\n name=\"${this.name}\"\n type=\"${this.type}\"\n value=\"${this.value}\"\n ?disabled=${this.disabled}\n ?required=${this.required}\n aria-invalid=${this.hasError}\n aria-label=${ariaLabel}\n aria-describedby=\"description\"\n @input=\"${this.handleInput}\"\n @keypress=\"${this.handleKeyPress}\"\n @paste=\"${this.handlePaste}\"\n />\n <div id=\"description\" slot=\"aria-describedby\"></div>\n </ix-field>\n </span>\n `;\n }\n\n /** @private */\n formResetCallback() {\n this.reset();\n }\n\n /** @private */\n formStateRestoreCallback(newState: string) {\n this.value = newState;\n }\n\n override focus() {\n // Required for the case that the user slots a focusable element into the\n // leading icon slot such as an iconbutton due to how delegatesFocus works.\n this.getInput().focus();\n }\n}\n"]}
@@ -3348,6 +3348,16 @@ class IxPhoneInput extends LitElement {
3348
3348
  // Sync validity so that clients can check validity on input.
3349
3349
  this.syncValidity();
3350
3350
  }
3351
+ handlePaste() {
3352
+ // zero second time out to ensure that the input value is updated
3353
+ setTimeout(() => {
3354
+ var _a;
3355
+ this.formatValue();
3356
+ (_a = this.iti) === null || _a === void 0 ? void 0 : _a.setNumber(this.value);
3357
+ this.syncValidity();
3358
+ this.dispatchEvent(new Event('input', { bubbles: true, composed: true }));
3359
+ }, 0);
3360
+ }
3351
3361
  disconnectedCallback() {
3352
3362
  var _a;
3353
3363
  (_a = this.iti) === null || _a === void 0 ? void 0 : _a.destroy();
@@ -3388,6 +3398,7 @@ class IxPhoneInput extends LitElement {
3388
3398
  aria-describedby="description"
3389
3399
  @input="${this.handleInput}"
3390
3400
  @keypress="${this.handleKeyPress}"
3401
+ @paste="${this.handlePaste}"
3391
3402
  />
3392
3403
  <div id="description" slot="aria-describedby"></div>
3393
3404
  </ix-field>
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent ix-phone-input following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "Digital Realty",
6
- "version": "2.2.10",
6
+ "version": "2.2.12",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "build": "npm run start:pre-serve && npm run buildTS && npm run start:pre-serve && rimraf distEsm && rollup -c rollup.config.js"
31
31
  },
32
32
  "dependencies": {
33
- "@digital-realty/ix-field": "^1.1.6",
33
+ "@digital-realty/ix-field": "^1.1.7",
34
34
  "@lit/react": "^1.0.2",
35
35
  "@material/web": "1.2.0",
36
36
  "intl-tel-input": "^18.5.3",
@@ -49,10 +49,10 @@
49
49
  "@types/react": "^18.2.22",
50
50
  "@typescript-eslint/eslint-plugin": "^5.48.0",
51
51
  "@typescript-eslint/parser": "^5.48.0",
52
- "@web/dev-server": "^0.1.34",
52
+ "@web/dev-server": "^0.4.6",
53
53
  "@web/dev-server-rollup": "^0.5.2",
54
54
  "@web/rollup-plugin-import-meta-assets": "^1.0.7",
55
- "@web/test-runner": "^0.14.0",
55
+ "@web/test-runner": "^0.20.2",
56
56
  "concurrently": "^9.1.0",
57
57
  "eslint": "^8.31.0",
58
58
  "eslint-config-prettier": "^8.3.0",
@@ -119,5 +119,5 @@
119
119
  "README.md",
120
120
  "LICENSE"
121
121
  ],
122
- "gitHead": "58274d28e3928c90e1e3dc91a629bfe530325ae0"
122
+ "gitHead": "efb86e89e9bfdb5a9a797dd223331ad6455b692c"
123
123
  }