@epigraph/epigraph-std-lib 4.5.5-alpha → 4.7.0-alpha

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.
@@ -26,7 +26,7 @@ declare class BaseAnalyticsEvent implements IAnalyticsEvent {
26
26
  };
27
27
  }
28
28
  export declare class EpigraphArRequestedEvent extends BaseAnalyticsEvent {
29
- constructor(items?: IAnalyticsParameterItems);
29
+ constructor(items: IAnalyticsParameterItems);
30
30
  }
31
31
  export declare class EpigraphModuleLoadingEvent extends BaseAnalyticsEvent {
32
32
  constructor(isPreConfig: boolean);
@@ -38,49 +38,148 @@ export declare class EpigraphModuleFailedEvent extends BaseAnalyticsEvent {
38
38
  constructor(isPreConfig: boolean, loadTimeMs: number, errorType: string);
39
39
  }
40
40
  export declare class EpigraphModuleClosedEvent extends BaseAnalyticsEvent {
41
- constructor(items?: IAnalyticsParameterItems);
41
+ constructor(items: IAnalyticsParameterItems);
42
42
  }
43
43
  export declare class EpigraphSupportDetectedEvent extends BaseAnalyticsEvent {
44
- constructor(supportType: string, deviceCapabilities?: Record<string, unknown>);
44
+ static readonly SUPPORT_TYPE: {
45
+ AR: string;
46
+ QR: string;
47
+ WEBGL2: string;
48
+ };
49
+ constructor(supportType: typeof EpigraphSupportDetectedEvent.SUPPORT_TYPE, deviceCapabilities?: Record<string, unknown>);
45
50
  }
46
51
  export declare class EpigraphButtonClickEvent extends BaseAnalyticsEvent {
47
- constructor(buttonType: string, buttonName: string);
52
+ static readonly BUTTON_TYPE: {
53
+ AR_VIEW: string;
54
+ DIMENSION_SHOW: string;
55
+ DIMENSION_HIDE: string;
56
+ HOTSPOTS_SHOW: string;
57
+ HOTSPOTS_HIDE: string;
58
+ HELP_SHOW: string;
59
+ HELP_HIDE: string;
60
+ HOTSPOT_ENTER: string;
61
+ HOTSPOT_EXIT: string;
62
+ SHARE: string;
63
+ PDF_DOWNLOAD: string;
64
+ COPY: string;
65
+ RESTART: string;
66
+ INSTRUCTIONS_SHOW: string;
67
+ REVIEW_CART: string;
68
+ SHOP_NOW: string;
69
+ SUB_CATEGORY: string;
70
+ NEXT_STEP: string;
71
+ PREVIOUS_STEP: string;
72
+ };
73
+ constructor(buttonType: typeof EpigraphButtonClickEvent.BUTTON_TYPE, buttonName: string);
48
74
  }
49
75
  export declare class EpigraphPanelOpenedEvent extends BaseAnalyticsEvent {
50
- constructor(items: IAnalyticsParameterItems | undefined, isInteractive: boolean, panelType: string, triggerSource: string);
76
+ static readonly PANEL_TYPE: {
77
+ AR: string;
78
+ QR: string;
79
+ INFO: string;
80
+ DOWNLOAD: string;
81
+ PREVIEW_CART: string;
82
+ HOTSPOT_PANEL: string;
83
+ SHARE_MODAL: string;
84
+ RESTART_MODAL: string;
85
+ REMOVE_MODAL: string;
86
+ LOAD_PRECONFIG_MODAL: string;
87
+ MOVE_MODAL: string;
88
+ OUT_OF_STOCK_MODAL: string;
89
+ };
90
+ static readonly TRIGGER_SOURCE: {
91
+ AUTO: string;
92
+ BUTTON: string;
93
+ HOTSPOT: string;
94
+ GESTURE: string;
95
+ };
96
+ constructor(isInteractive: boolean, panelType: typeof EpigraphPanelOpenedEvent.PANEL_TYPE, triggerSource: typeof EpigraphPanelOpenedEvent.TRIGGER_SOURCE, items: IAnalyticsParameterItems);
51
97
  }
52
98
  export declare class EpigraphPanelClosedEvent extends BaseAnalyticsEvent {
53
- constructor(items: IAnalyticsParameterItems | undefined, isInteractive: boolean, panelType: string, triggerSource: string);
99
+ static readonly PANEL_TYPE: {
100
+ AR: string;
101
+ QR: string;
102
+ INFO: string;
103
+ DOWNLOAD: string;
104
+ PREVIEW_CART: string;
105
+ HOTSPOT_PANEL: string;
106
+ SHARE_MODAL: string;
107
+ RESTART_MODAL: string;
108
+ REMOVE_MODAL: string;
109
+ LOAD_PRECONFIG_MODAL: string;
110
+ MOVE_MODAL: string;
111
+ OUT_OF_STOCK_MODAL: string;
112
+ };
113
+ static readonly TRIGGER_SOURCE: {
114
+ AUTO: string;
115
+ BUTTON: string;
116
+ HOTSPOT: string;
117
+ GESTURE: string;
118
+ };
119
+ constructor(isInteractive: boolean, panelType: typeof EpigraphPanelOpenedEvent.PANEL_TYPE, triggerSource: typeof EpigraphPanelOpenedEvent.TRIGGER_SOURCE, items: IAnalyticsParameterItems);
54
120
  }
55
121
  export declare class EpigraphAddToFavouritesEvent extends BaseAnalyticsEvent {
56
- constructor(items?: IAnalyticsParameterItems);
122
+ constructor(items: IAnalyticsParameterItems);
57
123
  }
58
124
  export declare class EpigraphKeyboardInteractionEvent extends BaseAnalyticsEvent {
59
- constructor(actionPerformed: string);
125
+ static readonly ACTION_PERFORMED: {
126
+ ZOOM: string;
127
+ ROTATE: string;
128
+ };
129
+ constructor(actionPerformed: typeof EpigraphKeyboardInteractionEvent.ACTION_PERFORMED);
60
130
  }
61
131
  export declare class EpigraphTouchInteractionEvent extends BaseAnalyticsEvent {
132
+ static readonly INTERACTION_TYPE: {
133
+ ROTATE: string;
134
+ ZOOM: string;
135
+ PAN: string;
136
+ };
62
137
  constructor(interactionType: string);
63
138
  }
64
139
  export declare class EpigraphItemAddedEvent extends BaseAnalyticsEvent {
65
- constructor(items: IAnalyticsParameterItems | undefined, isInteractive: boolean, value: number, currency: string, quantity: number);
140
+ static readonly CURRENCY: {
141
+ USD: string;
142
+ EUR: string;
143
+ GBP: string;
144
+ CAD: string;
145
+ };
146
+ constructor(isInteractive: boolean, value: number, currency: typeof EpigraphItemAddedEvent.CURRENCY, quantity: number, items: IAnalyticsParameterItems);
66
147
  }
67
148
  export declare class EpigraphItemMovedEvent extends BaseAnalyticsEvent {
68
- constructor(items?: IAnalyticsParameterItems);
149
+ constructor(items: IAnalyticsParameterItems);
69
150
  }
70
151
  export declare class EpigraphItemRemovedEvent extends BaseAnalyticsEvent {
71
- constructor(items: IAnalyticsParameterItems | undefined, value: number, currency: string, quantity: number);
152
+ static readonly CURRENCY: {
153
+ USD: string;
154
+ EUR: string;
155
+ GBP: string;
156
+ CAD: string;
157
+ };
158
+ constructor(value: number, currency: typeof EpigraphItemRemovedEvent.CURRENCY, quantity: number, items: IAnalyticsParameterItems);
72
159
  }
73
160
  export declare class EpigraphVariantChangedEvent extends BaseAnalyticsEvent {
74
- constructor(items: IAnalyticsParameterItems | undefined, changeType: string);
161
+ constructor(changeType: string, items: IAnalyticsParameterItems);
75
162
  }
76
163
  export declare class EpigraphContentSharedEvent extends BaseAnalyticsEvent {
77
- constructor(items: IAnalyticsParameterItems | undefined, contentType: string, shareDestination: string);
164
+ constructor(contentType: string, shareDestination: string, items: IAnalyticsParameterItems);
78
165
  }
79
166
  export declare class EpigraphCheckoutEvent extends BaseAnalyticsEvent {
80
- constructor(items: IAnalyticsParameterItems | undefined, value: number, currency: string);
167
+ static readonly CURRENCY: {
168
+ USD: string;
169
+ EUR: string;
170
+ GBP: string;
171
+ CAD: string;
172
+ };
173
+ constructor(value: number, currency: typeof EpigraphCheckoutEvent.CURRENCY, items: IAnalyticsParameterItems);
81
174
  }
82
175
  export declare class EpigraphConversionEvent extends BaseAnalyticsEvent {
83
- constructor(items: IAnalyticsParameterItems | undefined, value: number, currency: string);
176
+ static readonly CURRENCY: {
177
+ USD: string;
178
+ EUR: string;
179
+ GBP: string;
180
+ CAD: string;
181
+ };
182
+ constructor(value: number, currency: typeof EpigraphConversionEvent.CURRENCY, items: IAnalyticsParameterItems);
84
183
  }
85
184
  export declare class EpigraphChangeRateEvent extends BaseAnalyticsEvent {
86
185
  constructor(value: number);
@@ -0,0 +1,17 @@
1
+ import { AnalyticsStatus } from '../analytics-plugin-interface';
2
+ export declare class EpigraphNotifier {
3
+ static readonly NOTIFICATION_NAME = "epg-notification";
4
+ static readonly ACTION_SEND_EVENT = "send-event";
5
+ static readonly ACTION_INITIALIZED = "initialized";
6
+ static readonly ACTION_FAILED_INITIALIZATION = "initialization-failed";
7
+ private readonly _pluginName;
8
+ private readonly _trackingId;
9
+ private readonly _experienceId;
10
+ private readonly _solution;
11
+ private _initializer;
12
+ private _status;
13
+ constructor(pluginName: string, trackingId: string, experienceId: string, solution: string, initializer: string, status: AnalyticsStatus);
14
+ updateStatus(value: AnalyticsStatus): void;
15
+ updateInitializer(value: string): void;
16
+ notify(action: string, eventDetails: Record<string, any>): void;
17
+ }
@@ -28,6 +28,7 @@ export declare class GA4AnalyticsPlugin implements IAnalyticsPlugin {
28
28
  private __isInitialized;
29
29
  private __initializationMethod;
30
30
  private __nexusFailureReported;
31
+ private __epigraphNotifier;
31
32
  constructor({ trackingID, experienceID, solution, verboseLogging }: {
32
33
  trackingID: string;
33
34
  experienceID: string;
@@ -13,6 +13,7 @@ export declare class NexusAnalyticsPlugin implements IAnalyticsPlugin {
13
13
  private __queue;
14
14
  private __status;
15
15
  private __sentEventCount;
16
+ private __epigraphNotifier;
16
17
  constructor({ trackingID, experienceID, solution, sessionId, xPath, verboseLogging, sendToStaging }: {
17
18
  trackingID: string;
18
19
  experienceID: string;
package/package.json CHANGED
@@ -1,41 +1,41 @@
1
- {
2
- "name": "@epigraph/epigraph-std-lib",
3
- "version": "4.5.5-alpha",
4
- "type": "module",
5
- "main": "./dist/epigraph-std-lib.cjs",
6
- "module": "./dist/epigraph-std-lib.js",
7
- "files": [
8
- "dist",
9
- "dist/**/*"
10
- ],
11
- "types": "./dist/epigraph-std-lib.d.ts",
12
- "exports": {
13
- ".": {
14
- "types": "./dist/epigraph-std-lib.d.ts",
15
- "import": "./dist/epigraph-std-lib.js",
16
- "require": "./dist/epigraph-std-lib.cjs"
17
- }
18
- },
19
- "scripts": {
20
- "dev": "vite",
21
- "build": "tsc -b ./tsconfig.lib.json && vite build",
22
- "preview": "vite preview",
23
- "prepublishOnly": "npm run build",
24
- "test": "npm run build && vitest"
25
- },
26
- "dependencies": {},
27
- "peerDependencies": {
28
- "lit": "^3.2.1",
29
- "qr-creator": "^1.0.0"
30
- },
31
- "devDependencies": {
32
- "@types/node": "^22.13.0",
33
- "happy-dom": "^16.8.1",
34
- "typescript": "^5.8.2",
35
- "vite": "^6.0.5",
36
- "vite-plugin-dts": "^4.5.0",
37
- "vitest": "^3.0.5",
38
- "@types/google.analytics": "^0.0.42",
39
- "@types/gtag.js": "^0.0.20"
40
- }
41
- }
1
+ {
2
+ "name": "@epigraph/epigraph-std-lib",
3
+ "version": "4.7.0-alpha",
4
+ "type": "module",
5
+ "main": "./dist/epigraph-std-lib.cjs",
6
+ "module": "./dist/epigraph-std-lib.js",
7
+ "files": [
8
+ "dist",
9
+ "dist/**/*"
10
+ ],
11
+ "types": "./dist/epigraph-std-lib.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/epigraph-std-lib.d.ts",
15
+ "import": "./dist/epigraph-std-lib.js",
16
+ "require": "./dist/epigraph-std-lib.cjs"
17
+ }
18
+ },
19
+ "scripts": {
20
+ "dev": "vite",
21
+ "build": "tsc -b ./tsconfig.lib.json && vite build",
22
+ "preview": "vite preview",
23
+ "prepublishOnly": "npm run build",
24
+ "test": "npm run build && vitest"
25
+ },
26
+ "dependencies": {},
27
+ "peerDependencies": {
28
+ "lit": "^3.2.1",
29
+ "qr-creator": "^1.0.0"
30
+ },
31
+ "devDependencies": {
32
+ "@types/node": "^22.13.0",
33
+ "happy-dom": "^16.8.1",
34
+ "typescript": "^5.8.2",
35
+ "vite": "^6.0.5",
36
+ "vite-plugin-dts": "^4.5.0",
37
+ "vitest": "^3.0.5",
38
+ "@types/google.analytics": "^0.0.42",
39
+ "@types/gtag.js": "^0.0.20"
40
+ }
41
+ }