web-manager 3.1.40 → 3.1.42
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +68 -14
- package/package.json +10 -2
package/index.js
CHANGED
@@ -285,7 +285,8 @@ function Manager() {
|
|
285
285
|
command: 'user:sign-up',
|
286
286
|
payload: {
|
287
287
|
newsletterSignUp: select('.auth-newsletter-input').getValue(),
|
288
|
-
affiliateCode: store.get('auth.affiliateCode', ''),
|
288
|
+
// affiliateCode: store.get('auth.affiliateCode', ''),
|
289
|
+
affiliateCode: store.get('affiliateCode', ''),
|
289
290
|
},
|
290
291
|
}),
|
291
292
|
})
|
@@ -546,8 +547,13 @@ function Manager() {
|
|
546
547
|
storageBucket: '',
|
547
548
|
messagingSenderId: '',
|
548
549
|
appId: '',
|
550
|
+
measurementId: '',
|
549
551
|
},
|
550
552
|
},
|
553
|
+
firebase_auth: {
|
554
|
+
enabled: true,
|
555
|
+
load: false,
|
556
|
+
},
|
551
557
|
firebase_firestore: {
|
552
558
|
enabled: true,
|
553
559
|
load: false,
|
@@ -556,9 +562,12 @@ function Manager() {
|
|
556
562
|
enabled: true,
|
557
563
|
load: false,
|
558
564
|
},
|
559
|
-
|
565
|
+
firebase_appCheck: {
|
560
566
|
enabled: true,
|
561
567
|
load: false,
|
568
|
+
config: {
|
569
|
+
siteKey: '',
|
570
|
+
},
|
562
571
|
},
|
563
572
|
lazysizes: {
|
564
573
|
enabled: true,
|
@@ -578,7 +587,7 @@ function Manager() {
|
|
578
587
|
settings: {
|
579
588
|
openChatButton: {
|
580
589
|
background: '#237afc',
|
581
|
-
text: '#
|
590
|
+
text: '#fff',
|
582
591
|
},
|
583
592
|
},
|
584
593
|
},
|
@@ -589,7 +598,7 @@ function Manager() {
|
|
589
598
|
palette: {
|
590
599
|
popup: {
|
591
600
|
background: '#237afc',
|
592
|
-
text: '#
|
601
|
+
text: '#fff',
|
593
602
|
},
|
594
603
|
button: {
|
595
604
|
background: '#fff',
|
@@ -650,11 +659,13 @@ function Manager() {
|
|
650
659
|
This.properties.global.validRedirectHosts = configuration.global.validRedirectHosts;
|
651
660
|
This.properties.meta.environment = utilities.get(configuration, 'global.settings.debug.environment', This.properties.meta.environment);
|
652
661
|
This.properties.page.queryString = new URLSearchParams(window.location.search);
|
662
|
+
|
653
663
|
var pageQueryString = This.properties.page.queryString
|
654
664
|
var pagePathname = window.location.pathname;
|
655
665
|
var qsAff = pageQueryString.get('aff');
|
656
666
|
if (qsAff) {
|
657
|
-
store.set('auth.affiliateCode', qsAff);
|
667
|
+
// store.set('auth.affiliateCode', qsAff);
|
668
|
+
store.set('affiliateCode', qsAff);
|
658
669
|
}
|
659
670
|
var qsRedirect = pageQueryString.get('redirect');
|
660
671
|
if (qsRedirect && This.isValidRedirectUrl(qsRedirect)) {
|
@@ -669,7 +680,6 @@ function Manager() {
|
|
669
680
|
})
|
670
681
|
}
|
671
682
|
|
672
|
-
|
673
683
|
// load critical libraries
|
674
684
|
function postCrucial() {
|
675
685
|
// console.log('HERE 5');
|
@@ -706,16 +716,22 @@ function Manager() {
|
|
706
716
|
|
707
717
|
var chatsyOps = options_user.libraries.chatsy;
|
708
718
|
if (chatsyOps.enabled) {
|
709
|
-
var preChatBtn = select('#prechat-btn');
|
719
|
+
var $preChatBtn = select('#prechat-btn');
|
720
|
+
var $preChatBtnSvg = select('#prechat-btn svg path');
|
721
|
+
var settings = chatsyOps.config.settings
|
710
722
|
|
711
|
-
preChatBtn.css({
|
712
|
-
background:
|
723
|
+
$preChatBtn.css({
|
724
|
+
background: settings.background,
|
713
725
|
})
|
714
726
|
.show();
|
715
727
|
|
728
|
+
$preChatBtnSvg.each(function ($el) {
|
729
|
+
$el.setAttribute('fill', settings.text)
|
730
|
+
})
|
731
|
+
|
716
732
|
window.chatsy = {};
|
717
733
|
window.chatsy.open = function() {
|
718
|
-
preChatBtn.get(0).click();
|
734
|
+
$preChatBtn.get(0).click();
|
719
735
|
}
|
720
736
|
}
|
721
737
|
|
@@ -1303,6 +1319,7 @@ function Manager() {
|
|
1303
1319
|
load_firebase_auth(This, options),
|
1304
1320
|
load_firebase_firestore(This, options),
|
1305
1321
|
load_firebase_messaging(This, options),
|
1322
|
+
load_firebase_appCheck(This, options),
|
1306
1323
|
])
|
1307
1324
|
.then(resolve)
|
1308
1325
|
.catch(reject);
|
@@ -1312,7 +1329,8 @@ function Manager() {
|
|
1312
1329
|
.then(_post)
|
1313
1330
|
.catch(reject);
|
1314
1331
|
} else {
|
1315
|
-
import('firebase/app')
|
1332
|
+
// import('firebase/app')
|
1333
|
+
import('firebase/compat/app')
|
1316
1334
|
.then(function(mod) {
|
1317
1335
|
window.firebase = mod.default;
|
1318
1336
|
_post()
|
@@ -1338,7 +1356,8 @@ function Manager() {
|
|
1338
1356
|
.then(resolve)
|
1339
1357
|
.catch(reject);
|
1340
1358
|
} else {
|
1341
|
-
import('firebase/auth')
|
1359
|
+
// import('firebase/auth')
|
1360
|
+
import('firebase/compat/auth')
|
1342
1361
|
.then(resolve)
|
1343
1362
|
.catch(reject);
|
1344
1363
|
}
|
@@ -1362,7 +1381,8 @@ function Manager() {
|
|
1362
1381
|
.then(resolve)
|
1363
1382
|
.catch(reject);
|
1364
1383
|
} else {
|
1365
|
-
import('firebase/firestore')
|
1384
|
+
// import('firebase/firestore')
|
1385
|
+
import('firebase/compat/firestore')
|
1366
1386
|
.then(resolve)
|
1367
1387
|
.catch(reject);
|
1368
1388
|
}
|
@@ -1384,7 +1404,8 @@ function Manager() {
|
|
1384
1404
|
.then(resolve)
|
1385
1405
|
.catch(reject);
|
1386
1406
|
} else {
|
1387
|
-
import('firebase/messaging')
|
1407
|
+
// import('firebase/messaging')
|
1408
|
+
import('firebase/compat/messaging')
|
1388
1409
|
.then(resolve)
|
1389
1410
|
.catch(reject);
|
1390
1411
|
}
|
@@ -1394,6 +1415,39 @@ function Manager() {
|
|
1394
1415
|
});
|
1395
1416
|
}
|
1396
1417
|
|
1418
|
+
var load_firebase_appCheck = function(This, options) {
|
1419
|
+
return new Promise(function(resolve, reject) {
|
1420
|
+
var setting = options.libraries.firebase_appCheck;
|
1421
|
+
if (setting.enabled === true) {
|
1422
|
+
if (setting.load) {
|
1423
|
+
setting.load(This)
|
1424
|
+
.then(resolve)
|
1425
|
+
.catch(reject);
|
1426
|
+
} else {
|
1427
|
+
// import('firebase/app-check')
|
1428
|
+
import('firebase/compat/app-check')
|
1429
|
+
.then(function (mod) {
|
1430
|
+
var appCheck = firebase.appCheck;
|
1431
|
+
var siteKey = setting.config.siteKey;
|
1432
|
+
|
1433
|
+
if (!siteKey) {
|
1434
|
+
return resolve();
|
1435
|
+
}
|
1436
|
+
|
1437
|
+
appCheck().activate(
|
1438
|
+
new appCheck.ReCaptchaEnterpriseProvider(siteKey),
|
1439
|
+
true,
|
1440
|
+
);
|
1441
|
+
|
1442
|
+
resolve();
|
1443
|
+
})
|
1444
|
+
.catch(reject);
|
1445
|
+
}
|
1446
|
+
} else {
|
1447
|
+
resolve();
|
1448
|
+
}
|
1449
|
+
});
|
1450
|
+
}
|
1397
1451
|
|
1398
1452
|
var load_lazysizes = function(This, options) {
|
1399
1453
|
return new Promise(function(resolve, reject) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "web-manager",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.42",
|
4
4
|
"description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -22,10 +22,18 @@
|
|
22
22
|
"url": "https://github.com/itw-creative-works/web-manager/issues"
|
23
23
|
},
|
24
24
|
"homepage": "https://itwcreativeworks.com",
|
25
|
+
"backup": {
|
26
|
+
"dependencies": {
|
27
|
+
"@sentry/browser": "^6.19.7",
|
28
|
+
"cookieconsent": "^3.1.1",
|
29
|
+
"firebase": "^8.10.1",
|
30
|
+
"lazysizes": "^5.3.2"
|
31
|
+
}
|
32
|
+
},
|
25
33
|
"dependencies": {
|
26
34
|
"@sentry/browser": "^6.19.7",
|
27
35
|
"cookieconsent": "^3.1.1",
|
28
|
-
"firebase": "^
|
36
|
+
"firebase": "^9.23.0",
|
29
37
|
"lazysizes": "^5.3.2"
|
30
38
|
}
|
31
39
|
}
|