@epigraph/epigraph-std-lib 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -49
- package/dist/Epigraph/constants/enums.d.ts +1 -1
- package/dist/Epigraph/epigraph.d.ts +12 -10
- package/dist/Epigraph/epigraphBaseSolution.d.ts +43 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/EpigraphAnalytics.d.ts +42 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/analytics-event-interface.d.ts +8 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/analytics-plugin-interface.d.ts +9 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/consent-plugin-interface.d.ts +5 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/consent-plugins/consent-plugin-names.d.ts +3 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/consent-plugins/one-trust-consent-plugin.d.ts +13 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/generics/node.d.ts +11 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/generics/queue.d.ts +13 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/generics/single-linked-list.d.ts +11 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/plugins/ga3-analytics-plugin.d.ts +44 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/plugins/ga4-analytics-plugin.d.ts +44 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/plugins/nexus-analytics-plugin.d.ts +18 -0
- package/dist/EpigraphLibs/epigraphLibs.d.ts +3 -3
- package/dist/ThirdPartyLibs/thirdPartyLibs.d.ts +3 -0
- package/dist/epigraph-std-lib.js +6189 -6376
- package/package.json +41 -36
- package/dist/EpigraphLibs/EpigraphBaseSolution/epigraphBaseSolution.d.ts +0 -16
package/README.md
CHANGED
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
# INTRODUCTION
|
|
2
|
-
|
|
3
|
-
Epigraph Standard Library or epigraph-std-lib is a collection of standards that we follow across our solutions. The idea is to have a single source of truth across solutions while ensuring that the dependencies are always up to date with the industry standards.
|
|
4
|
-
|
|
5
|
-
### EPIGRAPH
|
|
6
|
-
A global object that must only be initialized once per session and provides some common functionalities across solutions in that session.
|
|
7
|
-
|
|
8
|
-
### EPIGRAPH LIBRARY EXPORTS
|
|
9
|
-
|
|
10
|
-
| Name | Description |
|
|
11
|
-
|---|---|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
| [
|
|
25
|
-
| [
|
|
26
|
-
| [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
1
|
+
# INTRODUCTION
|
|
2
|
+
|
|
3
|
+
Epigraph Standard Library or epigraph-std-lib is a collection of standards that we follow across our solutions. The idea is to have a single source of truth across solutions while ensuring that the dependencies are always up to date with the industry standards.
|
|
4
|
+
|
|
5
|
+
### EPIGRAPH
|
|
6
|
+
A global object that must only be initialized once per session and provides some common functionalities across solutions in that session.
|
|
7
|
+
|
|
8
|
+
### EPIGRAPH LIBRARY EXPORTS
|
|
9
|
+
|
|
10
|
+
| Name | Description |
|
|
11
|
+
|---|---|
|
|
12
|
+
| EpigraphBaseSolutionHtmlElement | A base class intended to enforce some common functionalities across our solutions, built by extending the HTMLElement |
|
|
13
|
+
| EpigraphBaseSolutionLitElement | A base class intended to enforce some common functionalities across our solutions, built by extending the LitElement |
|
|
14
|
+
| EpigraphLogger | A logger class that provides a convenient way for logging info, warning or errors in any given session |
|
|
15
|
+
| EpigraphQrCoreGenerator | A Utility class that allows the generation of a QR code from a give string input |
|
|
16
|
+
| EpigraphUnitsConverter | A Utility class that allows conversion between different standard unit, including but not limited to Distance, Color, etc. |
|
|
17
|
+
| EpigraphUrlProcessor | A Utility class that provides various methods to generate, process, manipulate URLs |
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### 3rd PARTY LIBRARY EXPORTS
|
|
21
|
+
|
|
22
|
+
| Name | Version |
|
|
23
|
+
|---|---|
|
|
24
|
+
| [three](https://threejs.org/) |  |
|
|
25
|
+
| [model-viewer](https://modelviewer.dev/) |  |
|
|
26
|
+
| [@epigraph/epigraph-analytics](https://www.npmjs.com/package/@epigraph/epigraph-analytics) ||
|
|
27
|
+
| [qr-creator](https://www.npmjs.com/package/qr-creator) ||
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# HOW TO:
|
|
31
|
+
|
|
32
|
+
### Add a new EpigraphLibrary:
|
|
33
|
+
1. Create a new directory under lib/EpigraphLibs/`<MyEpigraphLibrary>`
|
|
34
|
+
2. Create the module file/s. Ensure that the names of these files are in camelCase.
|
|
35
|
+
3. Export this module in lib/EpigraphLibs/epigraph-std-lib.ts as `export * from "./ThirdPartyLibs/main";`
|
|
36
|
+
4. Write a test for this Library under tests/<MyEpigraphLibrary.test.ts>
|
|
37
|
+
|
|
38
|
+
### Write a test:
|
|
39
|
+
We use [vitest](https://vitest.dev/guide/) to write tests in this repository using [happy-dom](https://www.npmjs.com/package/happy-dom) to support some but not all browser functionalities. In order to write a new test:
|
|
40
|
+
|
|
41
|
+
1. Create a new file for a specific test under tests/ as `<MyEpigraphLibrary>`.test.ts
|
|
42
|
+
2. Write a test following the instructions and samples [here](https://vitest.dev/guide/#writing-tests)
|
|
43
|
+
3. Make sure to import the library from "../dist/epigraph-std-lib" to avoid any issues that might come up after bundling.
|
|
44
|
+
4. Open a terminal and execute "npm run test". This will build all the libraries under dist/ and then run tests using those.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# REFERENCES
|
|
48
|
+
A huge thanks to everyone who inspired the setup for this repository:
|
|
49
|
+
1. [Andreas Riedmuller's Article](https://dev.to/receter/how-to-create-a-react-component-library-using-vites-library-mode-4lma)
|
|
50
|
+
2. [Vitest Docs](https://vitest.dev/guide/)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EpigraphLogger, LoggerModeNames } from '../EpigraphLibs/EpigraphLogger/epigraphLogger';
|
|
2
2
|
import { ENVIRONMENT_TYPE } from './constants/enums';
|
|
3
3
|
import { UrlProcessor } from '../EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor';
|
|
4
|
-
import {
|
|
4
|
+
import { EpigraphBaseSolutionTypes, EpigraphBaseSolutionHtmlElement, EpigraphBaseSolutionLitElement } from './epigraphBaseSolution';
|
|
5
5
|
/**
|
|
6
6
|
* Epigraph component is intended to be a global source of truth/tracker in a given session for all of our components.
|
|
7
7
|
* This object would be responsible for serving/communicating/validating information, wherever necessary
|
|
@@ -11,6 +11,7 @@ import { EpigraphBaseSolution } from '../EpigraphLibs/EpigraphBaseSolution/epigr
|
|
|
11
11
|
* global analytics tracker, etc.
|
|
12
12
|
*/
|
|
13
13
|
export declare class Epigraph {
|
|
14
|
+
private _loggerContext;
|
|
14
15
|
id: string;
|
|
15
16
|
private _isReady;
|
|
16
17
|
private _logger;
|
|
@@ -20,15 +21,15 @@ export declare class Epigraph {
|
|
|
20
21
|
private _environment;
|
|
21
22
|
private _activeComponentsInSession;
|
|
22
23
|
private _staleComponentsInSession;
|
|
23
|
-
constructor(
|
|
24
|
+
constructor(initializer: EpigraphBaseSolutionTypes);
|
|
24
25
|
get isReady(): boolean;
|
|
25
26
|
get logger(): EpigraphLogger;
|
|
26
27
|
get urlProcessor(): UrlProcessor;
|
|
27
28
|
get epigraphSessionId(): string;
|
|
28
29
|
get environment(): ENVIRONMENT_TYPE;
|
|
29
|
-
get initializer():
|
|
30
|
-
get activeComponentsInSession(): Map<string,
|
|
31
|
-
get staleComponentsInSession(): Map<string,
|
|
30
|
+
get initializer(): EpigraphBaseSolutionTypes;
|
|
31
|
+
get activeComponentsInSession(): Map<string, EpigraphBaseSolutionTypes>;
|
|
32
|
+
get staleComponentsInSession(): Map<string, EpigraphBaseSolutionTypes>;
|
|
32
33
|
/**
|
|
33
34
|
* Logs Epigraph Branding in the console to help redirect potential interests in the right direction.
|
|
34
35
|
*/
|
|
@@ -39,18 +40,18 @@ export declare class Epigraph {
|
|
|
39
40
|
* registering any component that gets initialized in this session.
|
|
40
41
|
* Any component that inherits from EpigraphBaseSolution should automatically register itself on initialization.
|
|
41
42
|
*
|
|
42
|
-
* @param {
|
|
43
|
+
* @param {EpigraphBaseSolutionTypes} solutionRef A type of Epigraph base component that is initialized in the session.
|
|
43
44
|
*/
|
|
44
|
-
registerActiveComponent(solutionRef:
|
|
45
|
+
registerActiveComponent(solutionRef: EpigraphBaseSolutionTypes): void;
|
|
45
46
|
/**
|
|
46
47
|
* De-Registers a component that was initialized on this page.
|
|
47
48
|
* This is optional from the perspective of the unmount flow but highly recommend
|
|
48
49
|
* de-registering any component that gets removed in this session.
|
|
49
50
|
* Any component that inherits from EpigraphBaseSolution should automatically de-register itself on unmount.
|
|
50
51
|
*
|
|
51
|
-
* @param {
|
|
52
|
+
* @param {EpigraphBaseSolutionTypes} solutionRef A type of Epigraph base component that is initialized in the session.
|
|
52
53
|
*/
|
|
53
|
-
deregisterActiveComponent(solutionRef:
|
|
54
|
+
deregisterActiveComponent(solutionRef: EpigraphBaseSolutionTypes): void;
|
|
54
55
|
/**
|
|
55
56
|
* Gets the mode that the logger should be executed in, based on the runtime environment.
|
|
56
57
|
*
|
|
@@ -72,7 +73,8 @@ export declare class Epigraph {
|
|
|
72
73
|
*/
|
|
73
74
|
static generateXPath(element: HTMLElement): string;
|
|
74
75
|
}
|
|
75
|
-
export { ENVIRONMENT_TYPE,
|
|
76
|
+
export { ENVIRONMENT_TYPE, EpigraphBaseSolutionHtmlElement, EpigraphBaseSolutionLitElement };
|
|
77
|
+
export type { EpigraphBaseSolutionTypes };
|
|
76
78
|
declare global {
|
|
77
79
|
interface Window {
|
|
78
80
|
epigraph: Epigraph;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { ENVIRONMENT_TYPE } from './epigraph';
|
|
3
|
+
export declare class EpigraphBaseSolutionHtmlElement extends HTMLElement {
|
|
4
|
+
private _xPath;
|
|
5
|
+
private _uuid;
|
|
6
|
+
private _isReady;
|
|
7
|
+
private _environment;
|
|
8
|
+
protected _elementName: string;
|
|
9
|
+
protected _solutionVersion: string;
|
|
10
|
+
protected _loggerContextOverride: string;
|
|
11
|
+
constructor(solutionVersion: string, environment: ENVIRONMENT_TYPE);
|
|
12
|
+
get isReady(): boolean;
|
|
13
|
+
get environment(): ENVIRONMENT_TYPE;
|
|
14
|
+
get elementName(): string;
|
|
15
|
+
/**
|
|
16
|
+
* This is the npm package version of this solution.
|
|
17
|
+
*/
|
|
18
|
+
get solutionVersion(): string;
|
|
19
|
+
get uuid(): string;
|
|
20
|
+
get xPath(): string;
|
|
21
|
+
disconnectedCallback(): void;
|
|
22
|
+
}
|
|
23
|
+
export declare class EpigraphBaseSolutionLitElement extends LitElement {
|
|
24
|
+
private _xPath;
|
|
25
|
+
private _uuid;
|
|
26
|
+
private _isReady;
|
|
27
|
+
private _environment;
|
|
28
|
+
protected _elementName: string;
|
|
29
|
+
protected _solutionVersion: string;
|
|
30
|
+
protected _loggerContextOverride: string;
|
|
31
|
+
constructor(solutionVersion: string, environment: ENVIRONMENT_TYPE);
|
|
32
|
+
get isReady(): boolean;
|
|
33
|
+
get environment(): ENVIRONMENT_TYPE;
|
|
34
|
+
get elementName(): string;
|
|
35
|
+
/**
|
|
36
|
+
* This is the npm package version of this solution.
|
|
37
|
+
*/
|
|
38
|
+
get solutionVersion(): string;
|
|
39
|
+
get uuid(): string;
|
|
40
|
+
get xPath(): string;
|
|
41
|
+
disconnectedCallback(): void;
|
|
42
|
+
}
|
|
43
|
+
export type EpigraphBaseSolutionTypes = EpigraphBaseSolutionHtmlElement | EpigraphBaseSolutionLitElement;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IAnalyticsPlugin } from './analytics-plugin-interface';
|
|
2
|
+
import { AnalyticsEvent } from './analytics-event-interface';
|
|
3
|
+
import { GA3AnalyticsPlugin } from './plugins/ga3-analytics-plugin';
|
|
4
|
+
import { GA4AnalyticsPlugin } from './plugins/ga4-analytics-plugin';
|
|
5
|
+
import { NexusAnalyticsPlugin } from './plugins/nexus-analytics-plugin';
|
|
6
|
+
import { IConsentPlugin } from './consent-plugin-interface';
|
|
7
|
+
import { OneTrustConsentPlugin } from './consent-plugins/one-trust-consent-plugin';
|
|
8
|
+
import { ConsentPluginNames } from './consent-plugins/consent-plugin-names';
|
|
9
|
+
declare const $analyticsPluginsMap: unique symbol;
|
|
10
|
+
export type AnalyticsTrackerMap = Map<string, IAnalyticsPlugin>;
|
|
11
|
+
export type { AnalyticsEvent };
|
|
12
|
+
export { GA3AnalyticsPlugin };
|
|
13
|
+
export { GA4AnalyticsPlugin };
|
|
14
|
+
export { NexusAnalyticsPlugin };
|
|
15
|
+
export { OneTrustConsentPlugin };
|
|
16
|
+
export { ConsentPluginNames };
|
|
17
|
+
export declare class EpigraphAnalytics {
|
|
18
|
+
private [$analyticsPluginsMap];
|
|
19
|
+
_consentPlugin: IConsentPlugin | null;
|
|
20
|
+
constructor(consentPluginName: string | null, consentIdentifier: string | null);
|
|
21
|
+
/**
|
|
22
|
+
* Epigraph Analytics uses plugins to send events to multiple trackers at a time. You can create a customer tracker
|
|
23
|
+
* by implementing the IAnalyticsPlugin and then adding it via this function. This will also hold only a single
|
|
24
|
+
* instance of a plugin with a given Tracking Identifier.
|
|
25
|
+
*
|
|
26
|
+
* @param plugin
|
|
27
|
+
*/
|
|
28
|
+
addEventPlugin(plugin: IAnalyticsPlugin): void;
|
|
29
|
+
/**
|
|
30
|
+
* Send an Event to all plugins
|
|
31
|
+
*
|
|
32
|
+
* @param eventData
|
|
33
|
+
*/
|
|
34
|
+
sendEvent(eventData: AnalyticsEvent): void;
|
|
35
|
+
/**
|
|
36
|
+
* Returns an IConsentPlugin if something is passed to it. Returns null if we can't find the plugin named.
|
|
37
|
+
* @param consentPluginName
|
|
38
|
+
* @param consentIdentifier
|
|
39
|
+
* @private
|
|
40
|
+
*/
|
|
41
|
+
private buildConsentPlugin;
|
|
42
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AnalyticsEvent } from './analytics-event-interface';
|
|
2
|
+
import { IConsentPlugin } from './consent-plugin-interface';
|
|
3
|
+
export interface IAnalyticsPlugin {
|
|
4
|
+
trackingID: string;
|
|
5
|
+
pluginName: string;
|
|
6
|
+
sendEvent(event: AnalyticsEvent, consentPlugin: IConsentPlugin | null): void;
|
|
7
|
+
getUniquePluginIdentifier(): string;
|
|
8
|
+
setupPlugin(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IConsentPlugin } from '../consent-plugin-interface';
|
|
2
|
+
export declare class OneTrustConsentPlugin implements IConsentPlugin {
|
|
3
|
+
consentSet: boolean;
|
|
4
|
+
consent: boolean;
|
|
5
|
+
pluginName: string;
|
|
6
|
+
consentIdentifier: string;
|
|
7
|
+
constructor(consentIdentifier: string);
|
|
8
|
+
/**
|
|
9
|
+
* Checks to see if the user has consented. If this is false, it will block all analytics
|
|
10
|
+
*/
|
|
11
|
+
hasConsent(): boolean;
|
|
12
|
+
private addConsentChangedListener;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const $data: unique symbol;
|
|
2
|
+
declare const $next: unique symbol;
|
|
3
|
+
export default class Node {
|
|
4
|
+
private [$data];
|
|
5
|
+
private [$next];
|
|
6
|
+
constructor(data: any);
|
|
7
|
+
get data(): any;
|
|
8
|
+
set next(node: Node | null);
|
|
9
|
+
get next(): Node | null;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as SLL } from './single-linked-list.js';
|
|
2
|
+
declare const $queue: unique symbol;
|
|
3
|
+
declare const $size: unique symbol;
|
|
4
|
+
export default class Queue {
|
|
5
|
+
private [$queue];
|
|
6
|
+
private [$size];
|
|
7
|
+
constructor();
|
|
8
|
+
get queue(): SLL;
|
|
9
|
+
get size(): number;
|
|
10
|
+
enqueue(data: any): void;
|
|
11
|
+
dequeue(): any;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as Node } from './node.js';
|
|
2
|
+
declare const $head: unique symbol;
|
|
3
|
+
export default class SLL {
|
|
4
|
+
private [$head];
|
|
5
|
+
constructor();
|
|
6
|
+
set head(node: Node | null);
|
|
7
|
+
get head(): Node | null;
|
|
8
|
+
addToTail(data: any): Node;
|
|
9
|
+
removeHead(): any;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IAnalyticsPlugin } from '../analytics-plugin-interface';
|
|
2
|
+
import { AnalyticsEvent } from '../analytics-event-interface';
|
|
3
|
+
export declare class GA3AnalyticsPlugin implements IAnalyticsPlugin {
|
|
4
|
+
name: string;
|
|
5
|
+
pluginName: string;
|
|
6
|
+
trackingID: string;
|
|
7
|
+
verboseLogging: boolean;
|
|
8
|
+
private queue;
|
|
9
|
+
private readonly user;
|
|
10
|
+
private readonly trackerName;
|
|
11
|
+
private trackerInterval;
|
|
12
|
+
private trackerCreated;
|
|
13
|
+
constructor(trackingID: string, verboseLogging: boolean, user: string, trackerName: string);
|
|
14
|
+
/**
|
|
15
|
+
* This function will send an Event to GA3.
|
|
16
|
+
*
|
|
17
|
+
* @param eventData AnalyticsEvent The event to be tracked
|
|
18
|
+
*/
|
|
19
|
+
sendEvent(eventData: AnalyticsEvent): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Send all events that are in the queue
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
private dequeueAndSendEvents;
|
|
25
|
+
/**
|
|
26
|
+
* GA3 requires that a tracker be created prior to being sent. This is called from the constructor. It is
|
|
27
|
+
* important to note that the promise that is inherently returned is ignored in the constructor at this
|
|
28
|
+
* time. This is due to the events that are added will be queued from the page. This script requires
|
|
29
|
+
* that the GA script has been imported on the page already as it does not check for it today.
|
|
30
|
+
*
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
private createTracker;
|
|
34
|
+
/**
|
|
35
|
+
* Checks if verboseLogging is enabled, then logs the error
|
|
36
|
+
* @param err
|
|
37
|
+
*/
|
|
38
|
+
private logger;
|
|
39
|
+
/**
|
|
40
|
+
* Returns a unique plugin identifier so that tracking ID's can be the same across multiple plugins.
|
|
41
|
+
*/
|
|
42
|
+
getUniquePluginIdentifier(): string;
|
|
43
|
+
setupPlugin(): void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IAnalyticsPlugin } from '../analytics-plugin-interface';
|
|
2
|
+
import { AnalyticsEvent } from '../analytics-event-interface';
|
|
3
|
+
import { IConsentPlugin } from '../consent-plugin-interface';
|
|
4
|
+
declare global {
|
|
5
|
+
interface Window {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare class GA4AnalyticsPlugin implements IAnalyticsPlugin {
|
|
10
|
+
name: string;
|
|
11
|
+
pluginName: string;
|
|
12
|
+
trackingID: string;
|
|
13
|
+
verboseLogging: boolean;
|
|
14
|
+
private queue;
|
|
15
|
+
dataLayer: Array<Record<string, any>>;
|
|
16
|
+
dataLayerName: string | undefined;
|
|
17
|
+
constructor(trackingID: string, verboseLogging: boolean);
|
|
18
|
+
private setupDataLayer;
|
|
19
|
+
private initGtag;
|
|
20
|
+
/**
|
|
21
|
+
* This function will send an Event to GA3.
|
|
22
|
+
*
|
|
23
|
+
* @param eventData AnalyticsEvent The event to be tracked
|
|
24
|
+
* @param consentPlugin
|
|
25
|
+
*/
|
|
26
|
+
sendEvent(eventData: AnalyticsEvent, consentPlugin: IConsentPlugin | null): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Send all events that are in the queue
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
private dequeueAndSendEvents;
|
|
32
|
+
/**
|
|
33
|
+
* Checks if verboseLogging is enabled, then logs the error
|
|
34
|
+
* @param err
|
|
35
|
+
*/
|
|
36
|
+
private logger;
|
|
37
|
+
/**
|
|
38
|
+
* Returns a unique plugin identifier so that tracking ID's can be the same across multiple plugins.
|
|
39
|
+
*/
|
|
40
|
+
getUniquePluginIdentifier(): string;
|
|
41
|
+
setupPlugin(): void;
|
|
42
|
+
private sendGA4LongParameters;
|
|
43
|
+
private findGA4ScriptInfo;
|
|
44
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IAnalyticsPlugin } from '../analytics-plugin-interface';
|
|
2
|
+
import { AnalyticsEvent } from '../analytics-event-interface';
|
|
3
|
+
import { IConsentPlugin } from '../consent-plugin-interface';
|
|
4
|
+
export declare class NexusAnalyticsPlugin implements IAnalyticsPlugin {
|
|
5
|
+
name: string;
|
|
6
|
+
pluginName: string;
|
|
7
|
+
trackingID: string;
|
|
8
|
+
verboseLogging: boolean;
|
|
9
|
+
url: string;
|
|
10
|
+
private queue;
|
|
11
|
+
private readonly sessionId;
|
|
12
|
+
private readonly xPath;
|
|
13
|
+
constructor(trackingID: string, sessionId: string, xPath: string, verboseLogging: boolean, sendToStaging?: boolean);
|
|
14
|
+
sendEvent(event: AnalyticsEvent, consentPlugin: IConsentPlugin | null): Promise<void>;
|
|
15
|
+
private dequeueAndSendEvents;
|
|
16
|
+
getUniquePluginIdentifier(): string;
|
|
17
|
+
setupPlugin(): void;
|
|
18
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * as epigraphLogger from './EpigraphLogger/epigraphLogger';
|
|
2
2
|
export * as epigraphUrlProcessor from './EpigraphUrlProcessor/epigraphUrlProcessor';
|
|
3
|
-
export * as epigraphBaseSolution from '
|
|
3
|
+
export * as epigraphBaseSolution from '../Epigraph/epigraphBaseSolution';
|
|
4
4
|
export * as epgUnitsConverter from './EpigraphUnitsConverter/epigraphUnitsConverter';
|
|
5
5
|
export * as epigraphQrCodeGenerator from './EpigraphQrCodeGenerator/epigraphQrCodeGenerator';
|
|
6
|
-
export { EpigraphAnalytics, GA3AnalyticsPlugin, GA4AnalyticsPlugin, OneTrustConsentPlugin, NexusAnalyticsPlugin, ConsentPluginNames } from '
|
|
6
|
+
export { EpigraphAnalytics, GA3AnalyticsPlugin, GA4AnalyticsPlugin, OneTrustConsentPlugin, NexusAnalyticsPlugin, ConsentPluginNames } from './EpigraphAnalytics/EpigraphAnalytics';
|
|
7
7
|
export * from './EpigraphResultFactory/epigraphResultFactory';
|
|
8
8
|
export * from './EpigraphNexusApi/epigraphNexusApi';
|
|
9
|
-
export type { AnalyticsEvent } from '
|
|
9
|
+
export type { AnalyticsEvent } from './EpigraphAnalytics/EpigraphAnalytics';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { default as WebGL } from 'three/addons/capabilities/WebGL.js';
|
|
2
2
|
export * from 'three';
|
|
3
3
|
export { GLTFLoader, DRACOLoader, GLTFExporter, USDZExporter, EffectComposer, HorizontalBlurShader, VerticalBlurShader, RGBELoader } from 'three/examples/jsm/Addons.js';
|
|
4
|
+
export * from 'three';
|
|
5
|
+
export * as GLTFMaterialsVariantsExtension from 'three-gltf-extensions/loaders/KHR_materials_variants/KHR_materials_variants.js';
|
|
6
|
+
export * as GLTFExporterMaterialsVariantsExtension from 'three-gltf-extensions/exporters/KHR_materials_variants/KHR_materials_variants_exporter.js';
|
|
4
7
|
export * as ModelViewer from '@google/model-viewer';
|
|
5
8
|
export * as MODEL_VIEWER_CONSTANTS from '@google/model-viewer/lib/constants';
|
|
6
9
|
export { WebGL };
|