Web-component usage example

Prerequisites before testing the example:
  1. Use Eliq API to receive a `ticket-id` with `status = 'completed'`.
  2. Then edit this HTML file and provide that `ticket-id` to 'initializer-v1' web-component in `initInitializer` function.
  3. Run the server and open this HTML file in the browser.
    Note! Eliq should have already let its API (Base URL) to be accessible from where you're deploying this HTML file (origin) to prevent `CORS Policy` errors.
  4. First click `Init Initializer` button to initialize the 'initializer-v1' component! Then click any other button to initialize other components.
    Important! Whenever you like to initialize a component, you MUST always first initialize the 'initializer-v1' component, and then your desired component. Because 'initializer-v1' prepares the environment for all of the other components to get loaded successfully and show data to the user.
    Note! You can always initialize the 'initializer-v1' component without providing it with a `ticket-id`! And listen to its `authenticated` event! (1) If the event's payload is `false`, it means that the user is not authenticated, so let's provide the `ticket-id`. (2) If it's `true`, it means that the user is already authenticated, so you don't necessarily need to provide the `ticket-id`! Although, you can always provide it to re-authenticate the user with a new `ticket-id`.