1.10.2 • Published 3 months ago

@epigraph/configurator v1.10.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 months ago

threejs   made-with-javascript   Maintenance  

INTRODUCTION

The "Epigraph Configurator" web component is meant to be a wrapper around "Epigraph's Configurator Core" web component. The Configurator web component aims at providing a fully functional configurator for our clients with a default UI along with some customisation options. Even though we provide a default UI for our clients, the goal is always to allow the client developers to expand on top of these existing functionalities or even replace it entirely.

Some Useful Links:

SETTING UP DEV ENVIRONMENT (For Epigraph Devs Only)


To setup a dev environment please refer to this repository tagged below, which aims to automate the process as mugh as possible:

epigraph-configurator-dev-env

USAGE


Importing the Web Component

In order to import the web component on your page, you must import the the script in your head tag:

<head>
  <!-- Import other scripts above and below this. -->
  <script type="module" src="https://cdn.jsdelivr.net/npm/@epigraph/configurator"></script>
</head>

Once the web component is imported, there are two primary modes that we intended the Epigraph Configurator to be used as. Irrespective of the mode that you choose to setup the configurator in, we have tried to make the process as similar as possible.

With the default UI:

This is the usage that we mostly expect our client to use. This is the quickest mode to get started with embedding a configurator on any website that runs on modern browsers.

To start with setting up a fully functional product configurator on your website:

    <!-- A client-access-key can only be linked to a single domain, so if you would like to whitelist your staging URL as well, please request a separate key for the same. -->
    <epigraph-configurator id="wcEpigraphConfigurator" client-access-key="<key-provided-by-epigraph>"/></epigraph-configurator>

Without UI:

This mode allows the developers to use only the configurator core and build a UI on top of it from scratch. Even though we allows our customers to embed the epigraph-configurator-core directly on their websites, we do not recommend that. If you already have a custom UI in mind for what you wish for the configurator to look like. The recommended way is to import the epigraph-configurator web component on the webpage and set it's mode to disable UI.

<!-- A client-access-key can only be linked to a single domain, so if you would like to whitelist your staging URL as well, please request a separate key for the same. -->
<epigraph-configurator
  id="wcEpigraphConfigurator"
  client-access-key="<key-provided-by-epigraph>"
  disable-ui
></epigraph-configurator>

Working with the API

Once you choose to move forward with a configurator mode, use the Core API documentation to interact with the configurator and expand on top of it's capabilities.

Epigraph API exposes it's core's API on the HTML element itself and the uses the same internally as well. To access the same, all you should have to do it keep a reference to the web component that was attached to the webpage:

<head>
  <!-- Import other scripts above and below this. -->
  <script type="module" src="https://cdn.jsdelivr.net/npm/@epigraph/configurator"></script>
</head>

<!-- A client-access-key can only be linked to a single domain, so if you would like to whitelist your staging URL as well, please request a separate key for the same. -->
<epigraph-configurator
  id="wcEpigraphConfigurator"
  client-access-key="<key-provided-by-epigraph>"
></epigraph-configurator>

<script>
  const EPIGRAPH_CONFIGURATOR_WC = document.querySelector(
    "wcEpigraphConfigurator"
  );
  const IS_API_INITIALISED = EPIGRAPH_CONFIGURATOR_WC.api.isReady(); // returns true if the api is avilable to be used
  // TODO: We are even planning to add an "coreApi:ready" event on the configurator web component for you to subscribe to

  if (IS_API_INITIALISED === false) {
    // You could choose to abort the process and remove the web component if the api isn't available.
  }

  // If the API was initialised and ready to be used. For example:
  // EPIGRAPH_CONFIGURATOR_WC.api.<anyMethodFromTheApi>();
</script>
1.10.2

3 months ago

1.10.1

4 months ago

1.10.0

4 months ago

1.9.6

4 months ago

1.9.5

5 months ago

1.7.7-alpha

9 months ago

1.8.2

7 months ago

1.8.1

7 months ago

1.8.0

8 months ago

1.6.2

9 months ago

1.6.1

9 months ago

1.6.0

9 months ago

1.7.0-alpha

9 months ago

1.7.4-alpha

9 months ago

1.8.2-alpha

7 months ago

1.7.6-alpha

9 months ago

1.7.7

8 months ago

1.9.4

5 months ago

1.7.6

8 months ago

1.9.3

6 months ago

1.7.5

8 months ago

1.9.2

6 months ago

1.7.4

8 months ago

1.9.1

6 months ago

1.7.3

8 months ago

1.9.0

6 months ago

1.7.2

8 months ago

1.5.4

9 months ago

1.7.1

9 months ago

1.5.3

10 months ago

1.7.0

9 months ago

1.5.2

10 months ago

1.7.5-alpha

9 months ago

1.7.2-alpha

9 months ago

1.8.2-alpha.1

7 months ago

1.8.3-alpha

7 months ago

1.7.1-alpha

9 months ago

1.7.8-alpha

9 months ago

1.2.0

1 year ago

1.4.5

11 months ago

1.4.4

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.1.34

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.5.1

11 months ago

1.3.3

1 year ago

1.5.0

11 months ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.1.29

1 year ago

1.1.28

1 year ago

1.1.30

1 year ago

1.1.33

1 year ago

1.1.32

1 year ago

1.1.31

1 year ago

1.1.23

1 year ago

1.1.27

1 year ago

1.1.26

1 year ago

1.1.25

1 year ago

1.1.24

1 year 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.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.22

1 year ago

1.1.21

1 year ago

1.1.20

1 year 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.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.0-alpha.0

2 years ago