3.1.5 • Published 6 months ago

@authenticins/widget v3.1.5

Weekly downloads
-
License
-
Repository
github
Last release
6 months ago

Authentic Widget

A plug and play embedded widget for Authentic's Insurance Portal.

Installation

Add the following script tag to the <head> of your index.html file.

<script type="module" src="https://www.unpkg.com/@authenticins/widget@latest/dist/authenticWidget.js"></script>

Usage

Once installed, the widget script will expose controls to the browser window. You can configure the widget's look and behavior on initialization (see the full WidgetConfig definition below).

<script>
  window.addEventListener("load", () => {
    window.authenticWidget.init({
      insurancePortal: { url: "https://example-tenant-name.prod.authenticinsurance.com" },
      prefillData: {
        lead: { email: "johndoe@email.com" }
      },
      themeOverrides: {
        primaryColor: "#000000",
        borderRadiusPx: 6,
        brand: {
          name: "Example Brand Name",
          logoUrls: {
            darkBg: "https://example-tenant-website.com/logo-white.png",
            lightBg: "https://example-tenant-website.com/logo-black.png"
          },
          faviconUrl: "https://example-tenant-website.com/favicon.ico"
        }
      }
    });
  });
</script>

Configuration

interface WidgetConfig {
  insurancePortal?: {
    url?: string;
    // The CSS selector for the target element you want the Insurance Portal injected into.
    // If no target selector is provided, the widget will inject its default persistent banner and modal.
    targetSelector?: string;
  };
  customerId?: string;
  prefillData?: {
    lead?: {
      email?: string;
      businessClassCode?: string;
      stateCodes?: string[];
      productIds?: string[];
    };
    responses?: {
      exposures?: Array<{
        exposureName: string;
        // Where each key is a field's name mapped to its value (e.g. ['BUSINESS_LEGAL_NAME']: 'Example Business Name');
        fieldValues: Record<string, string>;
      }>;
      // Same as format described above.
      questions?: Record<string, string>;
    };
  };
  themeOverrides?: {
    useDarkMode?: boolean;
    primaryColor?: string;
    secondaryColor?: string;
    borderRadiusPx?: number;
    brand?: {
      name?: string;
      logoUrls?: {
        darkBg?: string;
        lightBg?: string;
      };
      faviconUrl?: string;
    };
  };
}
3.1.3

7 months ago

3.1.2

12 months ago

3.1.5

6 months ago

3.1.4

6 months ago

3.1.1

12 months ago

3.0.9

1 year ago

3.1.0

1 year ago

3.0.8

1 year ago

3.0.7

2 years ago

3.0.4

2 years ago

3.0.6

2 years ago

3.0.5

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.2.20

2 years ago

2.2.19

2 years ago

2.2.17

2 years ago

2.2.18

2 years ago

2.2.15

2 years ago

2.2.16

2 years ago

2.2.13

2 years ago

2.2.14

2 years ago

2.2.12

2 years ago

2.2.11

2 years ago

2.2.10

2 years ago

2.2.9

2 years ago

2.2.8

2 years ago

2.2.7

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

2.2.5

2 years ago

2.2.4

2 years ago

2.2.6

2 years ago

2.1.9

2 years ago

2.1.8

2 years ago

2.1.7

2 years ago

2.1.6

2 years ago

2.1.5

2 years ago

2.1.4

2 years ago

2.1.3

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago