web-manager 4.1.16 → 4.1.18
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/dist/index.js +27 -5
- package/dist/modules/auth.js +4 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -135,6 +135,11 @@ class Manager {
|
|
|
135
135
|
this._setupNotificationAutoRequest();
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
// Initialize Chatsy chat widget if enabled
|
|
139
|
+
if (this.config.chatsy?.enabled && this.config.chatsy?.config?.agentId) {
|
|
140
|
+
this._initializeChatsy();
|
|
141
|
+
}
|
|
142
|
+
|
|
138
143
|
// Old IE force polyfill
|
|
139
144
|
// await this._loadPolyfillsIfNeeded();
|
|
140
145
|
|
|
@@ -225,12 +230,14 @@ class Manager {
|
|
|
225
230
|
chatsy: {
|
|
226
231
|
enabled: false,
|
|
227
232
|
config: {
|
|
228
|
-
|
|
229
|
-
chatId: '',
|
|
233
|
+
agentId: '',
|
|
230
234
|
settings: {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
235
|
+
button: {
|
|
236
|
+
backgroundColor: '#237afc',
|
|
237
|
+
textColor: '#FFFFFF',
|
|
238
|
+
position: 'bottom-right',
|
|
239
|
+
type: 'round',
|
|
240
|
+
icon: 'default',
|
|
234
241
|
}
|
|
235
242
|
}
|
|
236
243
|
}
|
|
@@ -496,6 +503,21 @@ class Manager {
|
|
|
496
503
|
}
|
|
497
504
|
}
|
|
498
505
|
|
|
506
|
+
async _initializeChatsy() {
|
|
507
|
+
try {
|
|
508
|
+
const { default: Chatsy } = await import('chatsy');
|
|
509
|
+
const config = this.config.chatsy.config;
|
|
510
|
+
|
|
511
|
+
this._chatsy = new Chatsy(config.agentId, {
|
|
512
|
+
settings: config.settings,
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
console.log('[Chatsy] Initialized');
|
|
516
|
+
} catch (error) {
|
|
517
|
+
console.error('[Chatsy] Failed to initialize:', error);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
499
521
|
_startVersionCheck() {
|
|
500
522
|
// Quit if window is not available
|
|
501
523
|
if (typeof window !== 'undefined') {
|
package/dist/modules/auth.js
CHANGED
|
@@ -22,11 +22,13 @@ const DEFAULT_ACCOUNT = {
|
|
|
22
22
|
roles: { admin: false, betaTester: false, developer: false },
|
|
23
23
|
affiliate: { code: null, referrals: [] },
|
|
24
24
|
activity: {
|
|
25
|
-
|
|
25
|
+
},
|
|
26
|
+
metadata: {
|
|
26
27
|
created: { timestamp: null, timestampUNIX: null },
|
|
28
|
+
updated: { timestamp: null, timestampUNIX: null },
|
|
27
29
|
},
|
|
28
30
|
api: { clientId: null, privateKey: null },
|
|
29
|
-
usage: {
|
|
31
|
+
usage: {},
|
|
30
32
|
personal: { name: { first: null, last: null } },
|
|
31
33
|
oauth2: {},
|
|
32
34
|
attribution: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-manager",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.18",
|
|
4
4
|
"description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"@sentry/browser": "Resolved by using OVERRIDES in web-manager (lighthouse is the issue"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@sentry/browser": "^10.
|
|
46
|
-
"firebase": "^12.
|
|
45
|
+
"@sentry/browser": "^10.43.0",
|
|
46
|
+
"firebase": "^12.10.0",
|
|
47
47
|
"itwcw-package-analytics": "^1.0.8",
|
|
48
48
|
"lodash": "^4.17.23"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"mocha": "^
|
|
51
|
+
"mocha": "^11.7.5",
|
|
52
52
|
"prepare-package": "^1.2.6"
|
|
53
53
|
}
|
|
54
54
|
}
|