diff --git a/src/doc-verification.html b/src/doc-verification.html index a7e86bf9..3e5f72b6 100644 --- a/src/doc-verification.html +++ b/src/doc-verification.html @@ -412,7 +412,6 @@

Submission Complete

- diff --git a/src/js/components/Combobox.js b/src/js/components/Combobox.js index 393dff0d..5660d0d7 100644 --- a/src/js/components/Combobox.js +++ b/src/js/components/Combobox.js @@ -38,7 +38,7 @@ function maintainScrollVisibility(activeElement, scrollParent) { } } -class Combobox extends HTMLElement { +class ComboboxRoot extends HTMLElement { constructor() { super(); @@ -71,8 +71,6 @@ class Combobox extends HTMLElement { } } -window.customElements.define("smileid-combobox", Combobox); - class ComboboxTrigger extends HTMLElement { constructor() { super(); @@ -320,8 +318,6 @@ class ComboboxTrigger extends HTMLElement { } } -window.customElements.define("smileid-combobox-trigger", ComboboxTrigger); - class ComboboxListbox extends HTMLElement { constructor() { super(); @@ -528,8 +524,6 @@ class ComboboxListbox extends HTMLElement { } } -window.customElements.define("smileid-combobox-listbox", ComboboxListbox); - class ComboboxOption extends HTMLElement { connectedCallback() { this.setAttribute("role", "option"); @@ -577,4 +571,9 @@ class ComboboxOption extends HTMLElement { } } -window.customElements.define("smileid-combobox-option", ComboboxOption); +export default { + Root: ComboboxRoot, + Trigger: ComboboxTrigger, + List: ComboboxListbox, + Option: ComboboxOption, +}; diff --git a/src/js/doc-verification.js b/src/js/doc-verification.js index 83e48dd4..b0460f7d 100644 --- a/src/js/doc-verification.js +++ b/src/js/doc-verification.js @@ -1,6 +1,7 @@ import "@smile_identity/smart-camera-web"; import JSZip from "jszip"; import { version as sdkVersion } from "../../package.json"; +import Combobox from "./components/Combobox"; (function documentVerification() { "use strict"; @@ -16,6 +17,11 @@ import { version as sdkVersion } from "../../package.json"; const referenceWindow = window.parent; referenceWindow.postMessage("SmileIdentity::ChildPageReady", "*"); + window.customElements.define("smileid-combobox", Combobox.Root); + window.customElements.define("smileid-combobox-trigger", Combobox.Trigger); + window.customElements.define("smileid-combobox-listbox", Combobox.List); + window.customElements.define("smileid-combobox-option", Combobox.Option); + let config; let activeScreen; let id_info;