3.0.48 • Published 2 days ago

@evokegroup/js v3.0.48

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

@evokegroup/js - Version 3

Version 3 is similar to version 2. Major differences include:

  • Source file origanization
  • Analytics overhaul
  • TypeScript definitions generated from JSDoc
  • Create your own bundle using node custom-bundle

Requires NodeJS v16+ to build and bundle

Use

To support asynchronous loading, it is recommended that you render the source of a few files in the head, load your bundle using async defer, and the wait for the Evoke.ready() Promise to resolve.

<html>
  <head>
    <script>
      (window.Evoke = window.Evoke || {}).Settings = {
        // Override default settings
      };
    </script>
    <script>
      /* If loading scripts asynchronously, render code directly in head for best results
       * /dist/index.min.js - Defines Evoke
       * /dist/ready.min.js - Defines Evoke.ready() asynchronous loading helper
       * /dist/browser/webp.min.js - For WebP support detection; best before the CSS
       * /dist/lazyload/index.min.js - Lazy loading
       * If you use the custom bundler, your scripts will be bundled in the proper order
       */
    </script>
  </head>
  <body>
    <h1>My Awesome Web Site</h1>
    <script>
      // Override default settings after Evoke has partially loaded
      Evoke.Settings.Console = Evoke.Settings.merge({
        enabled: location.hostname === 'production'
      }, Evoke.Settings.Console || {});
    </script>
    <!--
      /core.js - Should always be first in bundle
      * Some modules (i.e. Analytics) require jQuery or Evoke's $query DOM helper library
      * /jquery/evoke.$.js
      * OR
      * /query/index.js
      * /query/evoke.$.js
      Other scripts
      /ready-resolve.js - Always should be last when using Evoke.ready()
      If you use the custom bundler, your scripts will be bundled in the proper order
    -->
    <script src="evoke-v3-bundle.js" async defer></script>
    <script>
      Evoke.ready()
        .then(() => {
          // do something
        });
    </script>
  </body>
</html>

Production Scripts

Minified production scripts can be found in the dist folder.

Documentation

Markdown files are autogenerated from JSDoc comments and can be found in the docs folder.

TypeScript Types

TypeScript type definition files are autogenerated from JSDoc comments and can be found in the dist-types folder.

Custom Bundler

Create custom bundles using a browser-based UI. See the custom bundler readme.

Modules

Core

FileDocumentationDescription
indexMarkdownDefines the window.Evoke namespace and base functionality.
readyMarkdownDefines Evoke.ready, useful (but not required) for asynchronous script loading.
coreMarkdownAdds code Evoke functionality required by most modules.
scrollingMarkdownAdds smooth scrolling functionality.
utilityMarkdownUtility functions.
ready-resolveWhen using Evoke.ready, resolves the Promise. For be results make sure this is the last script included in your bundle.

Accessibility

FileDocumentationDescription
accessibility/indexMarkdownAdd accessibility support for modal dialogs.

AJAX

FileDocumentationDescription
ajax/indexMarkdownAJAX helper.

Analytics

FileDocumentationDescription
analytics/indexMarkdownCore analytics functionality.
analytics/plugins/timerMarkdownAdd timer functionality.
analytics/plugins/legacy-v1MarkdownAdd support for legacy evoke analytics tracking.
Video
analytics/plugins/videoMarkdownAdd core video tracking functionality.
analytics-video/azureMarkdownImplements Azure video tracking.
analytics-video/vimeoMarkdownImplements Vimeo video tracking.
analytics-video/wistiaMarkdownImplements Wistia video tracking.
analytics-video/youtubeMarkdownImplements YouTube video tracking.
Platforms - Google
analytics-google/indexMarkdownCore Google Analytics functionality.
analytics-google/ga4Send data to GA4.
analytics-google/gtmSend data to GTM. See analytics-google/gtm-container/*.json container files.
analytics-google/plugins/timerMarkdownSend analytics timer data to Google.
analytics-google/plugins/videoMarkdownSend analytics video data to Google.

Browser

FileDocumentationDescription
browser/indexMarkdownCore browser detection functionality.
browser/apiMarkdownAPI for accessing browser detection data.
browser/fingerprintMarkdownGenerate a browser fingerprint. Does not require core browser functionality.
browser/webpMarkdownWebP support detection. Standalone. Use in head for best results.

Casing

FileDocumentationDescription
casing/indexMarkdownManipulate the casing of a string.

Date/Time

FileDocumentationDescription
datetime/indexMarkdownDate/time string formatting (english).
datetime/locale-esMarkdownSpanish support.
datetime/locale-frMarkdownFrench support.

Forms

FileDocumentationDescription
forms/indexMarkdownBase forms functionality.
forms/inputsMarkdownSpecialized form input formatting.
forms/validationMarkdownForm validation.

Geolocation

FileDocumentationDescription
geolocation/indexMarkdownCore geolocation functionality.
Evoke.Geolocation.geocode
geolocation/arcgis-geocodeMarkdownImplement Evoke.Geolocation.geocode using ArcGIS. Requires an ArcGIS API key.
geolocation/census-geocodeMarkdownImplement Evoke.Geolocation.geocode using Census.gov data.
Evoke.Geolocation.reverseGeocode
geolocation/arcgis-reverse-geocodeMarkdownImplement Evoke.Geolocation.reverseGeocode using ArcGIS.

Google

FileDocumentationDescription
google/recaptchaMarkdownAdd Google reCAPTCHA support.

jQuery

FileDocumentationDescription
jquery/evoke.$MarkdownDefine Evoke.$ for use in various modules.

Lazy Loading

FileDocumentationDescription
lazyload/indexMarkdownAdd lazy loading functionality.

Messages

FileDocumentationDescription
message-listener/indexMarkdownListen for messages sent using window.postMessage.

Network

FileDocumentationDescription
network/indexMarkdownCore network functionality.
network/cloudflareMarkdownGet client-side IP information using Cloudflare.
network/ipifyMarkdownGet client-side IP information using ipify.

$query

A lighter weight, less robust jQuery alternative.

FileDocumentationDescription
query/indexMarkdownDefine $query.
query/evoke.$MarkdownDefine Evoke.$ for use in various modules.

Screenshots

FileDocumentationDescription
screenshots/indexMarkdownIntegrate with the Evoke screenshooter.
screenshots/uiMarkdownAdd screenshooter UI elements.

Social

FileDocumentationDescription
social/indexMarkdownSocial network sharing helper.

Storage

FileDocumentationDescription
storage/indexMarkdownBrowser storage access helper.
storage/cookieMarkdownAdd browser cookie access.

String Generator

FileDocumentationDescription
string-generator/indexMarkdownGenerate random strings using specified characters and formats.
string-generator/generate-addressMarkdown Generate random address data for testing.

Templates

FileDocumentationDescription
template/indexMarkdownRender templated HTML.

UI

FileDocumentationDescription
ui/accordionMarkdownCreate accordions.
ui/modalMarkdownCreate a modal dialog.

USPS

FileDocumentationDescription
usps/indexMarkdownValidate addressed using the USPS API. Requires an API key.

Video

FileDocumentationDescription
video/indexMarkdownVideo embedding and control core functionality.
video/azureMarkdownSupport Azure hosted videos.
video/vimeoMarkdownSupport Vimeo hosted videos.
video/wistiaMarkdownSupport Wistia hosted videos.
video/youtubeMarkdownSupport YouTube hosted videos.
3.0.47

3 days ago

3.0.48

2 days ago

3.0.46

4 days ago

3.0.45

7 days ago

3.0.44

7 days ago

3.0.43

8 days ago

3.0.42

9 days ago

3.0.41

14 days ago

3.0.40

21 days ago

3.0.38

21 days ago

3.0.39

21 days ago

3.0.37

2 months ago

3.0.36

2 months ago

3.0.35

2 months ago

3.0.34

2 months ago

3.0.27

10 months ago

3.0.28

7 months ago

3.0.32

6 months ago

3.0.33

5 months ago

3.0.30

7 months ago

3.0.31

6 months ago

3.0.29

7 months ago

3.0.12

1 year ago

3.0.4

1 year ago

3.0.13

12 months ago

3.0.3

1 year ago

3.0.10

1 year ago

3.0.2

1 year ago

3.0.11

1 year ago

3.0.1

1 year ago

3.0.16

12 months ago

3.0.8

1 year ago

3.0.17

12 months ago

3.0.7

1 year ago

3.0.14

12 months ago

3.0.6

1 year ago

3.0.15

12 months ago

3.0.5

1 year ago

3.0.0

1 year ago

3.0.23

12 months ago

3.0.24

12 months ago

3.0.21

12 months ago

3.0.22

12 months ago

3.0.25

12 months ago

3.0.26

12 months ago

3.0.20

12 months ago

3.0.18

12 months ago

3.0.19

12 months ago

3.0.9

1 year ago

1.1.2

1 year ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.9

2 years ago

2.0.8

2 years ago

2.0.15

2 years ago

2.0.16

2 years ago

2.0.13

2 years ago

2.0.14

2 years ago

2.0.11

2 years ago

2.0.12

2 years ago

2.0.10

2 years ago

2.0.19

2 years ago

2.0.17

2 years ago

2.0.18

2 years ago

2.0.26

2 years ago

2.0.24

2 years ago

2.0.25

2 years ago

2.0.22

2 years ago

2.0.23

2 years ago

2.0.20

2 years ago

2.0.21

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.22

2 years ago

1.0.23

2 years ago

1.0.21

2 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.20

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.11

3 years ago

1.0.12

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.10

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago