4.48.1 • Published 4 days ago

genesys-spark v4.48.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 days ago

genesys-spark

This package is the default way to use Spark. It provides access to Spark's lazy-loading custom elements via a single shared CDN, as well as utilities for non-rendering UI tasks.

Getting Started

Installation

Use your package manager of choice to install the package in your project.

npm install genesys-spark

Localization

To ensure components are localized correctly, use the lang attribute to set the language of your page. Components will respect the language of their closest ancestor with a recognized lang attribute.

Loading the components

When initializing your app/page, call registerSparkComponents, which will inject the script and style tags into your page that define the main Spark custom elements:

import { registerSparkComponents } from 'genesys-spark';

// It's not _required_ to await component loading, but it can help prevent a flash
// of unstyled content.
await registerSparkComponents();

Loading the chart components

When initializing your app/page, call registerSparkChartComponents, which will inject the script and style tags into your page that define the chart related Spark custom elements:

import { registerSparkChartComponents } from 'genesys-spark';

// It's not _required_ to await component loading, but it can help prevent a flash
// of unstyled content.
await registerSparkChartComponents();

Font Loading

While registerSparkComponents() and registerSparkChartComponents() will add the required web fonts to your page if they are not already present, it is recommended that you link stylesheets to load the Urbanist and Noto Sans fonts in your document prior to starting your app. This will improve loading performance and prevent a jarring font transition when the required fonts load.

Asset loading details

By adding a script tag to the document, we ensure that the components are always loaded from the same location. This keeps the bundle size of the consuming application smaller, and ensures that multiple apps on the same domain will share the browser's cache of the component definitions. Overall, this leads to a better end-user experience.

Additionally, Stencil builds the components so that their full implementations do not need to be loaded up-front. Instead, components are fetched as they are used in the page. Those lazy-loaded implementations also benefit from sharing the browser cache in the same way as the initial script.

4.48.1

4 days ago

4.48.0

10 days ago

4.47.0

12 days ago

4.46.0

13 days ago

4.45.0

14 days ago

4.44.0

17 days ago

4.43.0

18 days ago

4.42.0

19 days ago

4.41.0

20 days ago

4.40.0

21 days ago

4.39.0

24 days ago

4.38.0

26 days ago

4.37.0

27 days ago

4.36.0

1 month ago

4.35.0

1 month ago

4.34.0

1 month ago

4.33.1

1 month ago

4.33.0

1 month ago

4.32.0

1 month ago

4.31.1

1 month ago

4.31.0

1 month ago

4.30.0

2 months ago

4.29.1-beta.0

2 months ago

4.29.0

2 months ago

4.29.0-beta.0

2 months ago

4.28.0

2 months ago

4.28.1

2 months ago

4.27.0

2 months ago

4.26.1

2 months ago

4.26.2

2 months ago

4.26.3

2 months ago

4.26.1-beta.0

2 months ago

4.26.0

2 months ago

5.0.0

2 months ago

4.25.0

2 months ago

4.24.0

2 months ago

4.23.1

2 months ago

4.23.0

2 months ago

4.22.1

2 months ago

4.21.3

2 months ago

4.22.0

2 months ago

4.21.2

3 months ago

4.21.1

3 months ago

4.21.0

3 months ago

4.20.2

3 months ago

4.20.1

3 months ago

4.19.0

3 months ago

4.20.0

3 months ago

4.18.0

3 months ago

4.17.0

3 months ago

4.16.0

3 months ago

4.14.0

3 months ago

4.15.0

3 months ago

4.12.1-beta.1

3 months ago

4.13.0

3 months ago

4.12.0

3 months ago

4.10.1

4 months ago

4.11.0

3 months ago

4.10.0

4 months ago

4.9.0

4 months ago

4.8.0

4 months ago

4.7.0

4 months ago

4.6.1

4 months ago

4.6.0

4 months ago

4.5.0

5 months ago

4.4.1

5 months ago

4.4.0

5 months ago

4.3.1

5 months ago

4.3.0

5 months ago

4.2.0

5 months ago

4.1.2

5 months ago

4.1.0

5 months ago

4.1.1

5 months ago

4.0.1

5 months ago

4.0.0-beta.48

7 months ago

4.0.0-beta.69

5 months ago

4.0.0-beta.47

7 months ago

4.0.0-beta.49

7 months ago

4.0.0-beta.66

6 months ago

4.0.0-beta.44

7 months ago

4.0.0-beta.65

6 months ago

4.0.0-beta.43

7 months ago

4.0.0-beta.68

6 months ago

4.0.0-beta.46

7 months ago

4.0.0-beta.67

6 months ago

4.0.0-beta.45

7 months ago

4.0.0-beta.62

6 months ago

4.0.0-beta.61

6 months ago

4.0.0-beta.64

6 months ago

4.0.0-beta.63

6 months ago

4.0.0-beta.60

6 months ago

4.0.0-beta.59

6 months ago

4.0.0-beta.58

6 months ago

4.0.0-beta.55

6 months ago

4.0.0-beta.54

6 months ago

4.0.0-beta.57

6 months ago

4.0.0-beta.56

6 months ago

4.0.0-beta.51

7 months ago

4.0.0-beta.50

7 months ago

4.0.0-beta.53

6 months ago

4.0.0-beta.52

7 months ago

4.0.0-beta.71

5 months ago

4.0.0-beta.70

5 months ago

4.0.0-beta.42

7 months ago

4.0.0-beta.41

7 months ago

4.0.0-beta.40

7 months ago

4.0.0-beta.39

7 months ago

4.0.0-beta.38

7 months ago

4.0.0-beta.37

7 months ago