@cleartrip/ct-design-header 1.2.0-SNAPSHOT-hide-chips-test.0 → 1.2.0-SNAPSHOT-final-header-test.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.
Files changed (37) hide show
  1. package/dist/BusinessDropdown/index.d.ts.map +1 -1
  2. package/dist/Header.d.ts.map +1 -1
  3. package/dist/HeaderAnimatedMask /index.d.ts.map +1 -1
  4. package/dist/LobsHeader/index.d.ts +1 -2
  5. package/dist/LobsHeader/index.d.ts.map +1 -1
  6. package/dist/RewardsSection/LoyaltyChips.d.ts +1 -1
  7. package/dist/RewardsSection/LoyaltyChips.d.ts.map +1 -1
  8. package/dist/RewardsSection/index.d.ts +1 -2
  9. package/dist/RewardsSection/index.d.ts.map +1 -1
  10. package/dist/UserAccount/UserAccountDropdown.d.ts.map +1 -1
  11. package/dist/UserAccount/accountOptions.d.ts +1 -0
  12. package/dist/UserAccount/accountOptions.d.ts.map +1 -1
  13. package/dist/UserAccount/index.d.ts +1 -2
  14. package/dist/UserAccount/index.d.ts.map +1 -1
  15. package/dist/constants.d.ts +21 -24
  16. package/dist/constants.d.ts.map +1 -1
  17. package/dist/context/HeaderProvider.d.ts +8 -0
  18. package/dist/context/HeaderProvider.d.ts.map +1 -0
  19. package/dist/ct-design-header.browser.cjs.js +1 -1
  20. package/dist/ct-design-header.browser.cjs.js.map +1 -1
  21. package/dist/ct-design-header.browser.esm.js +1 -1
  22. package/dist/ct-design-header.browser.esm.js.map +1 -1
  23. package/dist/ct-design-header.cjs.js +410 -231
  24. package/dist/ct-design-header.cjs.js.map +1 -1
  25. package/dist/ct-design-header.esm.js +412 -233
  26. package/dist/ct-design-header.esm.js.map +1 -1
  27. package/dist/ct-design-header.umd.js +422 -234
  28. package/dist/ct-design-header.umd.js.map +1 -1
  29. package/dist/hooks/useHoverDropdown.d.ts.map +1 -1
  30. package/dist/index.css +1 -1
  31. package/dist/index.d.ts +1 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/type.d.ts +5 -6
  34. package/dist/type.d.ts.map +1 -1
  35. package/dist/utils.d.ts +15 -0
  36. package/dist/utils.d.ts.map +1 -0
  37. package/package.json +9 -8
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime'), require('@cleartrip/ct-design-container'), require('@cleartrip/ct-design-typography'), require('@cleartrip/ct-design-button'), require('@cleartrip/ct-design-divider'), require('@cleartrip/ct-design-icons'), require('react'), require('@cleartrip/ct-design-shimmer')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime', '@cleartrip/ct-design-container', '@cleartrip/ct-design-typography', '@cleartrip/ct-design-button', '@cleartrip/ct-design-divider', '@cleartrip/ct-design-icons', 'react', '@cleartrip/ct-design-shimmer'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.CTDesignSystemHeader = {}, global.jsxRuntime, global.ctDesignContainer, global.ctDesignTypography, global.ctDesignButton, global.ctDesignDivider, global.ctDesignIcons, global.React, global.ctDesignShimmer));
5
- })(this, (function (exports, jsxRuntime, ctDesignContainer, ctDesignTypography, ctDesignButton, ctDesignDivider, ctDesignIcons, react, ctDesignShimmer) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime'), require('react'), require('@cleartrip/ct-design-container'), require('@cleartrip/ct-design-typography'), require('@cleartrip/ct-design-button'), require('@cleartrip/ct-design-divider'), require('@cleartrip/ct-design-icons'), require('@cleartrip/ct-design-shimmer')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime', 'react', '@cleartrip/ct-design-container', '@cleartrip/ct-design-typography', '@cleartrip/ct-design-button', '@cleartrip/ct-design-divider', '@cleartrip/ct-design-icons', '@cleartrip/ct-design-shimmer'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.CTDesignSystemHeader = {}, global.jsxRuntime, global.React, global.ctDesignContainer, global.ctDesignTypography, global.ctDesignButton, global.ctDesignDivider, global.ctDesignIcons, global.ctDesignShimmer));
5
+ })(this, (function (exports, jsxRuntime, react, ctDesignContainer, ctDesignTypography, ctDesignButton, ctDesignDivider, ctDesignIcons, ctDesignShimmer) { 'use strict';
6
6
 
7
7
  /******************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -30,6 +30,15 @@
30
30
  };
31
31
  return __assign.apply(this, arguments);
32
32
  };
33
+ function __spreadArray(to, from, pack) {
34
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
35
+ if (ar || !(i in from)) {
36
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
37
+ ar[i] = from[i];
38
+ }
39
+ }
40
+ return to.concat(ar || Array.prototype.slice.call(from));
41
+ }
33
42
  typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
34
43
  var e = new Error(message);
35
44
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
@@ -41,23 +50,27 @@
41
50
  var NAVBAR_OPTIONS = [{
42
51
  lefticon: ctDesignIcons.Offers,
43
52
  text: 'Offers',
53
+ ravenActionName: 'offers',
44
54
  isHoverable: false,
45
55
  isClickable: true,
46
56
  link: OFFERS_URL
47
57
  }, {
48
58
  lefticon: ctDesignIcons.BusinessBag,
49
59
  text: 'Business',
60
+ ravenActionName: 'business',
50
61
  rightIcon: ctDesignIcons.ChevronDown,
51
62
  isHoverable: true
52
63
  }, {
53
64
  lefticon: ctDesignIcons.MyTrips,
54
65
  text: 'My Trips',
66
+ ravenActionName: 'mytrips',
55
67
  isHoverable: false,
56
68
  isClickable: true,
57
69
  link: MY_TRIPS_URL
58
70
  }, {
59
71
  lefticon: ctDesignIcons.SupportIcon,
60
72
  text: 'Support',
73
+ ravenActionName: 'support',
61
74
  isHoverable: false,
62
75
  isClickable: true,
63
76
  link: SUPPORT_URL
@@ -93,24 +106,57 @@
93
106
  var bdConfig = [{
94
107
  title: 'AgentBox',
95
108
  subtitle: 'For travel agents',
96
- details: 'One-stop travel solution offering the best deals to our travel agency partners'
109
+ details: 'One-stop travel solution offering the best deals to our travel agency partners',
110
+ link: 'https://agency.cleartrip.com'
97
111
  }, {
98
112
  title: 'OutOfOffice',
99
113
  subtitle: 'For startups, corporates and SMEs',
100
- details: 'Manage corporate business travel, smartly'
114
+ details: 'Manage corporate business travel, smartly',
115
+ link: 'https://ooo.cleartrip.com/',
116
+ ravenActionName: 'ooo'
101
117
  }, {
102
118
  title: 'MICE',
103
119
  subtitle: 'For corporate events',
104
- details: 'An end-to-end management solution for all your corporate events'
120
+ details: 'An end-to-end management solution for all your corporate events',
121
+ link: '/mice'
105
122
  }, {
106
123
  title: 'API',
107
124
  subtitle: 'For developers',
108
- details: 'Unlock seamless integration and scale with our powerful, reliable APIs'
125
+ details: 'Unlock seamless integration and scale with our powerful, reliable APIs',
126
+ link: '/api'
109
127
  }];
110
128
  var BUSINESS_DROPDOWN_HEADING = 'Other business services';
129
+ exports.RAVEN_PAGE_NAMES = void 0;
130
+ (function (RAVEN_PAGE_NAMES) {
131
+ RAVEN_PAGE_NAMES["UNIFIED_HOME"] = "unified_homepage";
132
+ RAVEN_PAGE_NAMES["HOTELS_HOME"] = "hotels_homepage";
133
+ RAVEN_PAGE_NAMES["FLIGHTS_HOME"] = "flights_homepage";
134
+ })(exports.RAVEN_PAGE_NAMES || (exports.RAVEN_PAGE_NAMES = {}));
135
+ var RAVEN_PLATFORMS;
136
+ (function (RAVEN_PLATFORMS) {
137
+ RAVEN_PLATFORMS["DESKTOP"] = "desktop";
138
+ })(RAVEN_PLATFORMS || (RAVEN_PLATFORMS = {}));
139
+
140
+ var HeaderContext = react.createContext(undefined);
141
+ var useHeaderContext = function () {
142
+ var context = react.useContext(HeaderContext);
143
+ if (!context) {
144
+ throw new Error('useHeaderContext must be used within a HeaderProvider');
145
+ }
146
+ return context;
147
+ };
148
+ var HeaderProvider = function (_a) {
149
+ var value = _a.value,
150
+ children = _a.children;
151
+ return jsxRuntime.jsx(HeaderContext.Provider, __assign({
152
+ value: value
153
+ }, {
154
+ children: children
155
+ }));
156
+ };
111
157
 
112
- var LobsHeader = function (_a) {
113
- var selectedLOB = _a.selectedLOB;
158
+ var LobsHeader = function () {
159
+ var selectedLOB = useHeaderContext().selectedLOB;
114
160
  return jsxRuntime.jsx(ctDesignContainer.Container, __assign({
115
161
  className: 'flex p-4 flex-middle flex-center p-sticky',
116
162
  css: {
@@ -214,7 +260,6 @@
214
260
  var showFlagProxy = useDelayedUnmount(show, 300);
215
261
  var triggerTransition = useMountTransition(show, 100);
216
262
  var triggerOpenTransition = triggerTransition;
217
- console.log(show, showFlagProxy, 'custom hook');
218
263
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
219
264
  children: [showFlagProxy && jsxRuntime.jsx(ctDesignContainer.Container, {
220
265
  id: 'mask-container',
@@ -243,7 +288,7 @@
243
288
  var useHoverDropdown = function (_a) {
244
289
  var _b = _a === void 0 ? {} : _a,
245
290
  _c = _b.closeDelay,
246
- closeDelayArg = _c === void 0 ? 300 : _c,
291
+ closeDelayArg = _c === void 0 ? 0 : _c,
247
292
  _d = _b.openDelay,
248
293
  openDelay = _d === void 0 ? 500 : _d;
249
294
  var closeDelay = Math.max(closeDelayArg, MIN_CLOSE_DELAY);
@@ -348,18 +393,83 @@
348
393
  };
349
394
  };
350
395
 
396
+ var stringifyPayload = function (payload) {
397
+ var keys = Object.keys(payload);
398
+ var numericValues = [];
399
+ keys.forEach(function (key) {
400
+ if (numericValues.includes(key)) {
401
+ payload[key] = Number(payload[key]);
402
+ } else {
403
+ payload[key] = '' + payload[key];
404
+ }
405
+ });
406
+ return payload;
407
+ };
408
+ var isServer = function () {
409
+ return typeof window === 'undefined' || !window;
410
+ };
411
+ var getQueryParam = function (queryParam) {
412
+ if (isServer()) {
413
+ return '';
414
+ }
415
+ var urlParams = new URLSearchParams(window.location.search);
416
+ return urlParams.get(queryParam);
417
+ };
418
+ var ravenLoyaltyTypes = function (loyaltyType) {
419
+ switch (loyaltyType) {
420
+ case 'FkVip':
421
+ return 'fk_vip';
422
+ case 'FkPremium':
423
+ return 'fk_plus_premium';
424
+ case 'InsiderIcon':
425
+ return 'myntra_insidericon';
426
+ case 'InsiderElite':
427
+ return 'myntra_insiderelite';
428
+ default:
429
+ return '';
430
+ }
431
+ };
432
+ var ravenSDKTrigger = function (isUserLoggedIn, eventName, ravenPayload, customRavenPayload, ravenPushCallback, pageName) {
433
+ var _a;
434
+ var commonPayload = {
435
+ page_name: pageName,
436
+ platform: RAVEN_PLATFORMS.DESKTOP,
437
+ login_status: isUserLoggedIn ? 'yes' : 'no',
438
+ domain: (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host
439
+ };
440
+ var newRavenPayload = stringifyPayload(ravenPayload);
441
+ var parsedCustomRavenPayload = stringifyPayload(customRavenPayload);
442
+ try {
443
+ ravenPushCallback(eventName, __assign(__assign(__assign({}, commonPayload), newRavenPayload), parsedCustomRavenPayload));
444
+ } catch (err) {
445
+ console.log(err);
446
+ return;
447
+ }
448
+ };
449
+
351
450
  var BusinessDropdownContent = function (_a) {
352
451
  var isOpen = _a.isOpen;
353
- var _b = react.useState(0),
354
- leftPosition = _b[0],
355
- setLeftPosition = _b[1];
452
+ var _b = useHeaderContext(),
453
+ isUserLoggedIn = _b.isUserLoggedIn,
454
+ ravenPushCallback = _b.ravenPushCallback,
455
+ ravenPageName = _b.ravenPageName,
456
+ ravenEventName = _b.ravenEventName,
457
+ loyaltyType = _b.loyaltyType,
458
+ _c = _b.ravenPayload,
459
+ ravenPayload = _c === void 0 ? {} : _c;
460
+ var _d = react.useState(0),
461
+ leftPosition = _d[0],
462
+ setLeftPosition = _d[1];
356
463
  var containerRef = useDropdownAnimation(isOpen).containerRef;
357
464
  react.useEffect(function () {
358
465
  var updatePosition = function () {
359
466
  if (containerRef.current) {
360
467
  var screenWidth = window.innerWidth;
361
468
  var containerWidth = containerRef.current.offsetWidth || 0;
362
- setLeftPosition((screenWidth - containerWidth) / 2);
469
+ var newLeft = (screenWidth - containerWidth) / 2;
470
+ if (newLeft !== leftPosition) {
471
+ setLeftPosition(newLeft);
472
+ }
363
473
  }
364
474
  };
365
475
  updatePosition();
@@ -367,7 +477,22 @@
367
477
  return function () {
368
478
  return window.removeEventListener('resize', updatePosition);
369
479
  };
370
- }, []);
480
+ }, [containerRef, leftPosition]);
481
+ var handleBusinessDropdownClick = react.useCallback(function (link, title, ravenActionName) {
482
+ var _a;
483
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
484
+ var actionName = ravenActionName ? "".concat(ravenActionName, "_business_click") : title ? "".concat(title.toLowerCase(), "_business_click") : '';
485
+ var defaultPayload = {
486
+ action_name: actionName,
487
+ action_type: 'click',
488
+ u_utm_source: utmSource,
489
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
490
+ };
491
+ if (link) {
492
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
493
+ window.location.href = link;
494
+ }
495
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
371
496
  return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
372
497
  ref: containerRef,
373
498
  className: 'bg-neutral-100 o-hidden',
@@ -404,11 +529,16 @@
404
529
  children: bdConfig.map(function (_a) {
405
530
  var title = _a.title,
406
531
  subtitle = _a.subtitle,
407
- details = _a.details;
532
+ details = _a.details,
533
+ link = _a.link,
534
+ ravenActionName = _a.ravenActionName;
408
535
  return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
409
536
  css: {
410
537
  width: '200px'
411
538
  },
539
+ onClick: function () {
540
+ return handleBusinessDropdownClick(link, title, ravenActionName);
541
+ },
412
542
  className: 'bd-hover-container c-pointer'
413
543
  }, {
414
544
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
@@ -444,22 +574,16 @@
444
574
  }));
445
575
  };
446
576
  var AnimatedArrow = function () {
447
- return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
577
+ return jsxRuntime.jsx(ctDesignContainer.Container, __assign({
448
578
  className: 'bd-arrow-container'
449
579
  }, {
450
- children: [jsxRuntime.jsx(ctDesignContainer.Container, __assign({
451
- className: 'bd-arrow-wrapper'
452
- }, {
453
- children: jsxRuntime.jsx(ctDesignIcons.ArrowRight, {})
454
- })), jsxRuntime.jsx(ctDesignContainer.Container, __assign({
455
- className: 'bd-arrow-wrapper'
456
- }, {
457
- children: jsxRuntime.jsx(ctDesignIcons.ArrowRight, {})
458
- })), jsxRuntime.jsx(ctDesignContainer.Container, __assign({
459
- className: 'bd-arrow-wrapper'
460
- }, {
461
- children: jsxRuntime.jsx(ctDesignIcons.ArrowRight, {})
462
- }))]
580
+ children: __spreadArray([], Array(3), true).map(function (_, index) {
581
+ return jsxRuntime.jsx(ctDesignContainer.Container, __assign({
582
+ className: 'bd-arrow-wrapper'
583
+ }, {
584
+ children: jsxRuntime.jsx(ctDesignIcons.ArrowRight, {})
585
+ }), index);
586
+ })
463
587
  }));
464
588
  };
465
589
 
@@ -512,6 +636,7 @@
512
636
  redirectionLink: 'accounts/personal-data-dashboard'
513
637
  }];
514
638
  var SIGN_OUT_TEXT = 'Logout';
639
+ var MY_ACCOUNT_TEXT = 'My Account';
515
640
  var LOGGEDIN_USER_TEXT = 'You are logged in with';
516
641
  var HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID = 'header-acc-btn';
517
642
  var ACCOUNT_OPTIONS_CONTAINER_ID = 'account-options';
@@ -522,13 +647,33 @@
522
647
  borderGradient = _a.borderGradient,
523
648
  backgroundGradient = _a.backgroundGradient,
524
649
  handleChipClick = _a.handleChipClick;
525
- var _b = react.useState(false),
526
- isHovered = _b[0],
527
- setIsHovered = _b[1];
528
- var handleClick = function () {
529
- window.location.href = '/';
530
- handleChipClick && handleChipClick();
531
- };
650
+ var _b = useHeaderContext(),
651
+ loyaltyType = _b.loyaltyType,
652
+ isUserLoggedIn = _b.isUserLoggedIn,
653
+ ravenPushCallback = _b.ravenPushCallback,
654
+ ravenPageName = _b.ravenPageName,
655
+ _c = _b.ravenPayload,
656
+ ravenPayload = _c === void 0 ? {} : _c,
657
+ ravenEventName = _b.ravenEventName;
658
+ var _d = react.useState(false),
659
+ isHovered = _d[0],
660
+ setIsHovered = _d[1];
661
+ var handleClick = react.useCallback(function () {
662
+ var _a;
663
+ if (handleChipClick) {
664
+ handleChipClick();
665
+ } else {
666
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
667
+ var defaultPayload = {
668
+ action_name: "loyalty_account_click",
669
+ action_type: 'click',
670
+ u_utm_source: utmSource,
671
+ loyaltyType: ravenLoyaltyTypes(loyaltyType)
672
+ };
673
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
674
+ window.location.href = '/all-offers/loyalty-october';
675
+ }
676
+ }, [handleChipClick, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
532
677
  return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
533
678
  className: 'flex p-relative flex-middle flex-center br-8 o-hidden c-pointer',
534
679
  style: {
@@ -627,17 +772,39 @@
627
772
  handleChipClick = _a.handleChipClick,
628
773
  value = _a.value,
629
774
  type = _a.type;
630
- var _b = react.useState(false),
631
- isHovered = _b[0],
632
- setIsHovered = _b[1];
633
- var handleDefaultClick = function () {
634
- if (type === 'supercoins') {
635
- window.location.href = '/supercoins';
636
- } else if (type === 'wallet') {
637
- window.location.href = '/wallet';
775
+ var _b = useHeaderContext(),
776
+ loyaltyType = _b.loyaltyType,
777
+ isUserLoggedIn = _b.isUserLoggedIn,
778
+ ravenPushCallback = _b.ravenPushCallback,
779
+ ravenPageName = _b.ravenPageName,
780
+ ravenEventName = _b.ravenEventName,
781
+ _c = _b.ravenPayload,
782
+ ravenPayload = _c === void 0 ? {} : _c;
783
+ var _d = react.useState(false),
784
+ isHovered = _d[0],
785
+ setIsHovered = _d[1];
786
+ var handleDefaultClick = react.useCallback(function () {
787
+ var _a;
788
+ if (handleChipClick) {
789
+ handleChipClick();
790
+ } else {
791
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
792
+ var defaultPayload = {
793
+ action_name: "".concat(type, "_account_click"),
794
+ action_type: 'click',
795
+ u_utm_source: utmSource,
796
+ loyaltyType: ravenLoyaltyTypes(loyaltyType)
797
+ };
798
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
799
+ var redirectUrls = {
800
+ supercoin: '/all-offers/supercoins/',
801
+ wallet: '/accounts/wallet'
802
+ };
803
+ if (redirectUrls[type]) {
804
+ window.location.href = redirectUrls[type];
805
+ }
638
806
  }
639
- handleChipClick && handleChipClick();
640
- };
807
+ }, [handleChipClick, type, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
641
808
  return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
642
809
  className: "flex flex-middle justify-center br-8 c-pointer",
643
810
  style: {
@@ -677,21 +844,22 @@
677
844
  }))]
678
845
  }));
679
846
  };
680
- var RewardsSection = function (props) {
681
- var selectedLoyaltyType = props.loyaltyType,
682
- _a = props.fkSupercoinBurnBalance,
683
- superCoinBalance = _a === void 0 ? 0 : _a,
684
- _b = props.walletBalance,
685
- walletBalance = _b === void 0 ? 0 : _b,
686
- loyaltyLoading = props.loyaltyLoading,
687
- superCoinsLoading = props.superCoinsLoading,
688
- walletLoading = props.walletLoading,
689
- walletChipClick = props.walletChipClick,
690
- supercoinsChipClick = props.supercoinsChipClick,
691
- loyaltyChipClick = props.loyaltyChipClick,
692
- hideWalletChip = props.hideWalletChip,
693
- hideSupercoinsChip = props.hideSupercoinsChip,
694
- hideLoyaltyChip = props.hideLoyaltyChip;
847
+ var RewardsSection = function () {
848
+ var _a = useHeaderContext(),
849
+ selectedLoyaltyType = _a.loyaltyType,
850
+ _b = _a.fkSupercoinBurnBalance,
851
+ superCoinBalance = _b === void 0 ? 0 : _b,
852
+ _c = _a.walletBalance,
853
+ walletBalance = _c === void 0 ? 0 : _c,
854
+ loyaltyLoading = _a.loyaltyLoading,
855
+ superCoinsLoading = _a.superCoinsLoading,
856
+ walletLoading = _a.walletLoading,
857
+ walletChipClick = _a.walletChipClick,
858
+ supercoinsChipClick = _a.supercoinsChipClick,
859
+ loyaltyChipClick = _a.loyaltyChipClick,
860
+ hideWalletChip = _a.hideWalletChip,
861
+ hideSupercoinsChip = _a.hideSupercoinsChip,
862
+ hideLoyaltyChip = _a.hideLoyaltyChip;
695
863
  return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
696
864
  className: 'flex p-4 pt-0 flex-start flex-gap-1',
697
865
  style: {
@@ -718,7 +886,7 @@
718
886
  }),
719
887
  value: superCoinBalance,
720
888
  handleChipClick: supercoinsChipClick,
721
- type: 'supercoins'
889
+ type: 'supercoin'
722
890
  }), walletLoading ? jsxRuntime.jsx(ctDesignShimmer.Shimmer, {
723
891
  width: '50px',
724
892
  height: '32px',
@@ -735,53 +903,58 @@
735
903
  }));
736
904
  };
737
905
 
738
- var AccountDropdownContent = function (props) {
739
- var _a = props || {},
740
- handleLogout = _a.handleLogout,
741
- userName = _a.userName,
742
- userMobileNumber = _a.userMobileNumber,
743
- countryCode = _a.countryCode,
744
- userDetailsLoading = _a.userDetailsLoading,
745
- superCoinBalance = _a.fkSupercoinBurnBalance,
746
- walletBalance = _a.walletBalance,
747
- loyaltyType = _a.loyaltyType,
748
- loyaltyLoading = _a.loyaltyLoading,
749
- walletLoading = _a.walletLoading,
750
- superCoinsLoading = _a.superCoinsLoading,
751
- walletChipClick = _a.walletChipClick,
752
- supercoinsChipClick = _a.supercoinsChipClick,
753
- loyaltyChipClick = _a.loyaltyChipClick,
754
- hideLoyaltyChip = _a.hideLoyaltyChip,
755
- hideSupercoinsChip = _a.hideSupercoinsChip,
756
- hideWalletChip = _a.hideWalletChip,
757
- isOpen = _a.isOpen;
906
+ var AccountDropdownContent = function (_a) {
907
+ var isOpen = _a.isOpen;
908
+ var _b = useHeaderContext(),
909
+ handleLogoutClick = _b.handleLogoutClick,
910
+ userName = _b.userName,
911
+ userMobileNumber = _b.userMobileNumber,
912
+ countryCode = _b.countryCode,
913
+ userDetailsLoading = _b.userDetailsLoading,
914
+ loyaltyType = _b.loyaltyType,
915
+ isUserLoggedIn = _b.isUserLoggedIn,
916
+ ravenEventName = _b.ravenEventName,
917
+ ravenPageName = _b.ravenPageName,
918
+ _c = _b.ravenPayload,
919
+ ravenPayload = _c === void 0 ? {} : _c,
920
+ ravenPushCallback = _b.ravenPushCallback;
758
921
  var containerRef = useDropdownAnimation(isOpen).containerRef;
759
- var _b = react.useMemo(function () {
760
- var userGreeting = userName && "Hello ".concat(userName, "!");
761
- var phoneNumber = countryCode && userMobileNumber ? "".concat(countryCode, " ").concat(userMobileNumber) : '';
922
+ var _d = react.useMemo(function () {
762
923
  return {
763
- userGreeting: userGreeting,
764
- phoneNumber: phoneNumber
924
+ userGreeting: userName ? "Hello ".concat(userName, "!") : '',
925
+ phoneNumber: countryCode && userMobileNumber ? "".concat(countryCode, " ").concat(userMobileNumber) : ''
765
926
  };
766
927
  }, [userName, userMobileNumber, countryCode]),
767
- userGreeting = _b.userGreeting,
768
- phoneNumber = _b.phoneNumber;
769
- var handleRedirectClick = function (redirectLink) {
770
- return function () {
771
- window.location.href = redirectLink;
928
+ userGreeting = _d.userGreeting,
929
+ phoneNumber = _d.phoneNumber;
930
+ var generateRavenPayload = function (actionName) {
931
+ var _a;
932
+ return {
933
+ action_name: actionName.toLowerCase().replace(/[\s-]/g, '') + '_account_click',
934
+ action_type: 'click',
935
+ u_utm_source: (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic',
936
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
772
937
  };
773
938
  };
774
- react.useEffect(function () {
939
+ var handleAccountOptionsClick = react.useCallback(function (text, redirectLink) {
940
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(text), ravenPayload, ravenPushCallback, ravenPageName);
941
+ window.location.href = redirectLink;
942
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
943
+ var handleLogout = react.useCallback(function () {
944
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(SIGN_OUT_TEXT), ravenPayload, ravenPushCallback, ravenPageName);
945
+ handleLogoutClick();
946
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, handleLogoutClick]);
947
+ var positionAccountOptionsDiv = react.useCallback(function () {
775
948
  var headerAccBtn = document.getElementById(HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID);
776
949
  var accountOptionsElem = document.getElementById(ACCOUNT_OPTIONS_CONTAINER_ID);
777
- var positionAccountOptionsDiv = function () {
778
- var headerBtnRight = headerAccBtn === null || headerAccBtn === void 0 ? void 0 : headerAccBtn.getBoundingClientRect().right;
779
- if (accountOptionsElem && headerBtnRight) {
780
- accountOptionsElem.style.left = "".concat(headerBtnRight - ACCOUNT_OPTIONS_CONTAINER_WIDTH, "px");
781
- }
782
- };
783
- positionAccountOptionsDiv();
950
+ if (headerAccBtn && accountOptionsElem) {
951
+ var headerBtnRight = headerAccBtn.getBoundingClientRect().right;
952
+ accountOptionsElem.style.left = "".concat(headerBtnRight - ACCOUNT_OPTIONS_CONTAINER_WIDTH, "px");
953
+ }
784
954
  }, []);
955
+ react.useEffect(function () {
956
+ positionAccountOptionsDiv();
957
+ }, [positionAccountOptionsDiv]);
785
958
  var renderUserData = function () {
786
959
  var renderContent = function (loading, content, variant, color) {
787
960
  return jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
@@ -822,20 +995,7 @@
822
995
  height: '72px'
823
996
  }, {
824
997
  children: renderUserData()
825
- })), jsxRuntime.jsx(RewardsSection, {
826
- fkSupercoinBurnBalance: superCoinBalance,
827
- walletBalance: walletBalance,
828
- loyaltyType: loyaltyType,
829
- loyaltyLoading: loyaltyLoading,
830
- superCoinsLoading: superCoinsLoading,
831
- walletLoading: walletLoading,
832
- walletChipClick: walletChipClick,
833
- supercoinsChipClick: supercoinsChipClick,
834
- loyaltyChipClick: loyaltyChipClick,
835
- hideLoyaltyChip: hideLoyaltyChip,
836
- hideSupercoinsChip: hideSupercoinsChip,
837
- hideWalletChip: hideWalletChip
838
- }), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
998
+ })), jsxRuntime.jsx(RewardsSection, {}), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
839
999
  className: 'p-2 flex flex-column',
840
1000
  backgroundColor: 'white',
841
1001
  style: {
@@ -850,7 +1010,9 @@
850
1010
  redirectionLink = _a.redirectionLink;
851
1011
  return jsxRuntime.jsx(ctDesignContainer.Container, __assign({
852
1012
  className: 'p-2 br-8 c-pointer hoverable-container',
853
- onClick: handleRedirectClick(redirectionLink)
1013
+ onClick: function () {
1014
+ return handleAccountOptionsClick(text, redirectionLink);
1015
+ }
854
1016
  }, {
855
1017
  children: jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
856
1018
  className: 'flex c-pointer',
@@ -889,32 +1051,48 @@
889
1051
  }));
890
1052
  };
891
1053
 
892
- var UserAccount = function (props) {
893
- var handleLogout = props.handleLogout,
894
- userDetailsLoading = props.userDetailsLoading,
895
- userName = props.userName,
896
- userMobileNumber = props.userMobileNumber,
897
- countryCode = props.countryCode,
898
- fkSupercoinBurnBalance = props.fkSupercoinBurnBalance,
899
- walletBalance = props.walletBalance,
900
- loyaltyType = props.loyaltyType,
901
- walletLoading = props.walletLoading,
902
- superCoinsLoading = props.superCoinsLoading,
903
- loyaltyLoading = props.loyaltyLoading,
904
- loyaltyChipClick = props.loyaltyChipClick,
905
- supercoinsChipClick = props.supercoinsChipClick,
906
- walletChipClick = props.walletChipClick,
907
- hideLoyaltyChip = props.hideLoyaltyChip,
908
- hideSupercoinsChip = props.hideSupercoinsChip,
909
- hideWalletChip = props.hideWalletChip;
910
- var _a = useHoverDropdown({
911
- openDelay: 500
1054
+ var UserAccount = function () {
1055
+ var _a = useHeaderContext(),
1056
+ isNovacThemeEnabled = _a.isNovacThemeEnabled,
1057
+ ravenEventName = _a.ravenEventName,
1058
+ _b = _a.ravenPayload,
1059
+ ravenPayload = _b === void 0 ? {} : _b,
1060
+ ravenPushCallback = _a.ravenPushCallback,
1061
+ isUserLoggedIn = _a.isUserLoggedIn,
1062
+ loyaltyType = _a.loyaltyType,
1063
+ ravenPageName = _a.ravenPageName;
1064
+ var _c = useHoverDropdown({
1065
+ openDelay: 0
912
1066
  }),
913
- isDropdownVisible = _a.isDropdownVisible,
914
- handleOnMouseEnter = _a.handleOnMouseEnter,
915
- handleOnMouseLeave = _a.handleOnMouseLeave,
916
- handleDropdownMouseEnter = _a.handleDropdownMouseEnter,
917
- handleDropdownMouseLeave = _a.handleDropdownMouseLeave;
1067
+ isDropdownVisible = _c.isDropdownVisible,
1068
+ handleOnMouseEnter = _c.handleOnMouseEnter,
1069
+ handleOnMouseLeave = _c.handleOnMouseLeave,
1070
+ handleDropdownMouseEnter = _c.handleDropdownMouseEnter,
1071
+ handleDropdownMouseLeave = _c.handleDropdownMouseLeave;
1072
+ var _d = react.useState(false),
1073
+ scrolled = _d[0],
1074
+ setScrolled = _d[1];
1075
+ react.useEffect(function () {
1076
+ var handleScroll = function () {
1077
+ setScrolled(window.scrollY >= 100);
1078
+ };
1079
+ window.addEventListener('scroll', handleScroll);
1080
+ return function () {
1081
+ return window.removeEventListener('scroll', handleScroll);
1082
+ };
1083
+ }, []);
1084
+ var effectiveNovacThemeEnabled = isNovacThemeEnabled && !scrolled;
1085
+ var triggerRavenEventOnHover = react.useCallback(function () {
1086
+ var _a;
1087
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
1088
+ var defaultPayload = {
1089
+ action_name: "".concat(MY_ACCOUNT_TEXT.toLowerCase().replace(/[\s-]/g, ''), "_header_hover"),
1090
+ action_type: 'hover',
1091
+ u_utm_source: utmSource,
1092
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
1093
+ };
1094
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
1095
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
918
1096
  return jsxRuntime.jsxs(ctDesignContainer.Container, {
919
1097
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
920
1098
  className: "flex px-3 py-2 flex-middle br-12 h-100p c-pointer",
@@ -923,26 +1101,27 @@
923
1101
  height: 64
924
1102
  },
925
1103
  onMouseEnter: function () {
926
- return handleOnMouseEnter(0);
1104
+ handleOnMouseEnter(0);
1105
+ triggerRavenEventOnHover();
927
1106
  },
928
1107
  onMouseLeave: handleOnMouseLeave,
929
1108
  id: HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID
930
1109
  }, {
931
1110
  children: [jsxRuntime.jsx(ctDesignIcons.MyAccount, {
932
- color: isDropdownVisible ? '#FF4F17' : '#1A1A1A'
1111
+ color: isDropdownVisible ? '#FF4F17' : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
933
1112
  }), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
934
1113
  className: 'flex flex-row flex-middle'
935
1114
  }, {
936
1115
  children: [jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
937
1116
  variant: 'B2',
938
1117
  className: 'c-pointer',
939
- color: isDropdownVisible ? 'secondary' : 'primary'
1118
+ color: isDropdownVisible ? 'secondary' : effectiveNovacThemeEnabled ? 'neutral' : 'primary'
940
1119
  }, {
941
- children: "My Account"
1120
+ children: MY_ACCOUNT_TEXT
942
1121
  })), jsxRuntime.jsx(ctDesignIcons.ChevronDown, {
943
1122
  width: 20,
944
1123
  height: 20,
945
- fill: isDropdownVisible ? '#FF4F17' : '#1A1A1A'
1124
+ fill: isDropdownVisible ? '#FF4F17' : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
946
1125
  })]
947
1126
  }))]
948
1127
  })), jsxRuntime.jsx(HeaderAnimatedMask, __assign({
@@ -953,23 +1132,6 @@
953
1132
  onMaskClick: handleDropdownMouseLeave
954
1133
  }, {
955
1134
  children: jsxRuntime.jsx(AccountDropdownContent, {
956
- handleLogout: handleLogout,
957
- userDetailsLoading: userDetailsLoading,
958
- userName: userName,
959
- userMobileNumber: userMobileNumber,
960
- countryCode: countryCode,
961
- loyaltyType: loyaltyType,
962
- walletBalance: walletBalance,
963
- fkSupercoinBurnBalance: fkSupercoinBurnBalance,
964
- walletLoading: walletLoading,
965
- superCoinsLoading: superCoinsLoading,
966
- loyaltyLoading: loyaltyLoading,
967
- loyaltyChipClick: loyaltyChipClick,
968
- walletChipClick: walletChipClick,
969
- supercoinsChipClick: supercoinsChipClick,
970
- hideLoyaltyChip: hideLoyaltyChip,
971
- hideSupercoinsChip: hideSupercoinsChip,
972
- hideWalletChip: hideWalletChip,
973
1135
  isOpen: isDropdownVisible
974
1136
  })
975
1137
  }))]
@@ -977,47 +1139,86 @@
977
1139
  };
978
1140
 
979
1141
  var Header = function (props) {
980
- var superCoinsLoading = props.superCoinsLoading,
981
- fkSupercoinBurnBalance = props.fkSupercoinBurnBalance,
982
- onLoginButtonClick = props.onLoginButtonClick,
983
- _a = props.showAllLobs,
984
- showAllLobs = _a === void 0 ? false : _a,
985
- selectedLOB = props.selectedLOB,
986
- isUserLoggedIn = props.isUserLoggedIn,
987
- handleLogoutClick = props.handleLogoutClick,
988
- walletBalance = props.walletBalance,
989
- walletLoading = props.walletLoading,
990
- loyaltyLoading = props.loyaltyLoading,
991
- loyaltyType = props.loyaltyType,
992
- userDetailsLoading = props.userDetailsLoading,
993
- userName = props.userName,
994
- userMobileNumber = props.userMobileNumber,
995
- countryCode = props.countryCode,
996
- loyaltyChipClick = props.loyaltyChipClick,
997
- supercoinsChipClick = props.supercoinsChipClick,
998
- walletChipClick = props.walletChipClick,
999
- hideLoyaltyChip = props.hideLoyaltyChip,
1000
- hideSupercoinsChip = props.hideSupercoinsChip,
1001
- hideWalletChip = props.hideWalletChip;
1002
- props.ravenPayload;
1003
- props.ravenPushCallback;
1004
- var _c = useHoverDropdown({
1005
- openDelay: 500
1142
+ return jsxRuntime.jsx(HeaderProvider, __assign({
1143
+ value: props
1144
+ }, {
1145
+ children: jsxRuntime.jsx(HeaderContent, {})
1146
+ }));
1147
+ };
1148
+ var HeaderContent = function () {
1149
+ var _a;
1150
+ var _b = useHeaderContext(),
1151
+ onLoginButtonClick = _b.onLoginButtonClick,
1152
+ _c = _b.showAllLobs,
1153
+ showAllLobs = _c === void 0 ? false : _c,
1154
+ isUserLoggedIn = _b.isUserLoggedIn,
1155
+ loyaltyType = _b.loyaltyType,
1156
+ _d = _b.isNovacThemeEnabled,
1157
+ isNovacThemeEnabled = _d === void 0 ? false : _d,
1158
+ _e = _b.ravenPayload,
1159
+ ravenPayload = _e === void 0 ? {} : _e,
1160
+ ravenPushCallback = _b.ravenPushCallback,
1161
+ ravenPageName = _b.ravenPageName,
1162
+ ravenEventName = _b.ravenEventName;
1163
+ var _f = react.useState(false),
1164
+ scrolled = _f[0],
1165
+ setScrolled = _f[1];
1166
+ react.useEffect(function () {
1167
+ var handleScroll = function () {
1168
+ setScrolled(window.scrollY >= 100);
1169
+ };
1170
+ window.addEventListener('scroll', handleScroll);
1171
+ return function () {
1172
+ return window.removeEventListener('scroll', handleScroll);
1173
+ };
1174
+ }, []);
1175
+ var effectiveNovacThemeEnabled = isNovacThemeEnabled && !scrolled;
1176
+ var headerBackground = effectiveNovacThemeEnabled ? 'transparent' : '#F7FAFF';
1177
+ var _g = useHoverDropdown({
1178
+ openDelay: 0
1006
1179
  }),
1007
- isDropdownVisible = _c.isDropdownVisible,
1008
- hoveredElemIndex = _c.hoveredElemIndex,
1009
- handleOnMouseEnter = _c.handleOnMouseEnter,
1010
- handleOnMouseLeave = _c.handleOnMouseLeave,
1011
- handleDropdownMouseEnter = _c.handleDropdownMouseEnter,
1012
- handleDropdownMouseLeave = _c.handleDropdownMouseLeave;
1180
+ isDropdownVisible = _g.isDropdownVisible,
1181
+ hoveredElemIndex = _g.hoveredElemIndex,
1182
+ handleOnMouseEnter = _g.handleOnMouseEnter,
1183
+ handleOnMouseLeave = _g.handleOnMouseLeave,
1184
+ handleDropdownMouseEnter = _g.handleDropdownMouseEnter,
1185
+ handleDropdownMouseLeave = _g.handleDropdownMouseLeave;
1186
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
1187
+ var createPayload = react.useCallback(function (actionName, actionType) {
1188
+ return {
1189
+ action_name: actionName,
1190
+ action_type: actionType,
1191
+ u_utm_source: utmSource,
1192
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
1193
+ };
1194
+ }, [utmSource, loyaltyType]);
1195
+ var handleNavbarOptionsClick = react.useCallback(function (option) {
1196
+ if (option.isClickable && option.link) {
1197
+ var actionName = "".concat(option.text.toLowerCase().replace(/\s/g, ''), "_header_click");
1198
+ var payload = createPayload(actionName, 'click');
1199
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1200
+ window.location.href = option.link;
1201
+ }
1202
+ }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1203
+ var handleHomeClick = react.useCallback(function () {
1204
+ var payload = createPayload('home_header_click', 'click');
1205
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1206
+ window.location.href = '/';
1207
+ }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1208
+ var triggerRavenEventOnHover = react.useCallback(function (option) {
1209
+ var actionName = "".concat(option.text.toLowerCase().replace(/\s/g, ''), "_header_hover");
1210
+ var payload = createPayload(actionName, 'hover');
1211
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1212
+ }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1013
1213
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
1014
1214
  children: [jsxRuntime.jsx(ctDesignContainer.Container, __assign({
1015
1215
  className: 'flex t-0 p-sticky w-100p flex-middle flex-center flex-gap-6 flex-no-shrink',
1016
1216
  style: {
1017
1217
  zIndex: 1000,
1018
1218
  height: 64,
1019
- borderBottom: '1px solid #E6E6E6',
1020
- background: '#F7FAFF'
1219
+ borderBottom: effectiveNovacThemeEnabled ? '' : '1px solid #E6E6E6',
1220
+ background: headerBackground,
1221
+ transition: 'background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out'
1021
1222
  }
1022
1223
  }, {
1023
1224
  children: jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
@@ -1029,9 +1230,12 @@
1029
1230
  }
1030
1231
  }, {
1031
1232
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
1032
- className: 'flex flex-row flex-center flex-middle'
1233
+ className: 'flex flex-row flex-center flex-middle c-pointer',
1234
+ onClick: handleHomeClick
1033
1235
  }, {
1034
- children: [jsxRuntime.jsx(ctDesignIcons.CTLogo, {}), jsxRuntime.jsx(ctDesignDivider.Divider, {
1236
+ children: [jsxRuntime.jsx(ctDesignIcons.CTLogo, {
1237
+ fillColor: effectiveNovacThemeEnabled ? '#FFF' : '#FF4F17'
1238
+ }), jsxRuntime.jsx(ctDesignDivider.Divider, {
1035
1239
  style: {
1036
1240
  width: 12,
1037
1241
  marginLeft: 2,
@@ -1039,7 +1243,9 @@
1039
1243
  transform: 'rotate(90deg)',
1040
1244
  borderBottom: '1px solid #e0e0e0'
1041
1245
  }
1042
- }), jsxRuntime.jsx(ctDesignIcons.Fkcompany, {})]
1246
+ }), jsxRuntime.jsx(ctDesignIcons.Fkcompany, {
1247
+ color: effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1248
+ })]
1043
1249
  })), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
1044
1250
  className: 'flex flex-row flex-middle flex-center flex-cg-6'
1045
1251
  }, {
@@ -1051,7 +1257,10 @@
1051
1257
  return jsxRuntime.jsxs(ctDesignContainer.Container, {
1052
1258
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
1053
1259
  onMouseEnter: function () {
1054
- return handleOnMouseEnter(index);
1260
+ handleOnMouseEnter(index);
1261
+ if (option.isHoverable) {
1262
+ triggerRavenEventOnHover(option);
1263
+ }
1055
1264
  },
1056
1265
  onMouseLeave: handleOnMouseLeave,
1057
1266
  className: 'flex flex-row flex-middle px-3 py-2 c-pointer p-relative',
@@ -1060,26 +1269,24 @@
1060
1269
  height: 64
1061
1270
  },
1062
1271
  onClick: function () {
1063
- if (option.isClickable) {
1064
- window.location.href = option.link;
1065
- }
1272
+ return handleNavbarOptionsClick(option);
1066
1273
  }
1067
1274
  }, {
1068
1275
  children: [jsxRuntime.jsx(option.lefticon, {
1069
- color: isHovered ? '#FF4F17' : '#1A1A1A'
1276
+ color: isHovered ? '#FF4F17' : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1070
1277
  }), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
1071
1278
  className: 'flex flex-row flex-middle'
1072
1279
  }, {
1073
1280
  children: [jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
1074
1281
  variant: 'B2',
1075
- color: isHovered ? 'secondary' : 'primary',
1282
+ color: isHovered ? 'secondary' : effectiveNovacThemeEnabled ? 'neutral' : 'primary',
1076
1283
  isClickable: true
1077
1284
  }, {
1078
1285
  children: option.text
1079
1286
  })), option.rightIcon && jsxRuntime.jsx(option.rightIcon, {
1080
1287
  width: 20,
1081
1288
  height: 20,
1082
- fill: isHovered ? '#FF4F17' : '#1A1A1A'
1289
+ fill: isHovered ? '#FF4F17' : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1083
1290
  })]
1084
1291
  }))]
1085
1292
  }), "nav-option-".concat(index)), jsxRuntime.jsx(HeaderAnimatedMask, __assign({
@@ -1106,38 +1313,21 @@
1106
1313
  children: isUserLoggedIn ? jsxRuntime.jsx(ctDesignContainer.Container, __assign({
1107
1314
  className: 'flex flex-row flex-middle'
1108
1315
  }, {
1109
- children: jsxRuntime.jsx(UserAccount, {
1110
- handleLogout: handleLogoutClick,
1111
- superCoinsLoading: superCoinsLoading,
1112
- fkSupercoinBurnBalance: fkSupercoinBurnBalance,
1113
- walletBalance: walletBalance,
1114
- walletLoading: walletLoading,
1115
- loyaltyLoading: loyaltyLoading,
1116
- loyaltyType: loyaltyType,
1117
- userDetailsLoading: userDetailsLoading,
1118
- userName: userName,
1119
- userMobileNumber: userMobileNumber,
1120
- countryCode: countryCode,
1121
- walletChipClick: walletChipClick,
1122
- supercoinsChipClick: supercoinsChipClick,
1123
- loyaltyChipClick: loyaltyChipClick,
1124
- hideLoyaltyChip: hideLoyaltyChip,
1125
- hideSupercoinsChip: hideSupercoinsChip,
1126
- hideWalletChip: hideWalletChip
1127
- })
1316
+ children: jsxRuntime.jsx(UserAccount, {})
1128
1317
  })) : jsxRuntime.jsx(ctDesignButton.Button, __assign({
1129
- className: "fw-400 fs-14 login-button",
1318
+ className: "fw-400 fs-14 ".concat(effectiveNovacThemeEnabled ? 'novac-login-button' : 'login-button'),
1130
1319
  onClick: onLoginButtonClick,
1131
1320
  style: {
1132
1321
  width: 153,
1133
1322
  height: 40,
1134
- border: '1px solid #1A1A1A'
1323
+ border: effectiveNovacThemeEnabled ? '1px solid #FFF' : '1px solid #1A1A1A'
1135
1324
  },
1136
1325
  loading: false
1137
1326
  }, {
1138
1327
  children: jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
1139
1328
  componentNode: 'span',
1140
- variant: 'L2'
1329
+ variant: 'L2',
1330
+ color: effectiveNovacThemeEnabled ? 'neutral' : 'primary'
1141
1331
  }, {
1142
1332
  children: "Login"
1143
1333
  }))
@@ -1145,9 +1335,7 @@
1145
1335
  })]
1146
1336
  }))]
1147
1337
  }))
1148
- })), showAllLobs && jsxRuntime.jsx(LobsHeader, {
1149
- selectedLOB: selectedLOB
1150
- })]
1338
+ })), showAllLobs && jsxRuntime.jsx(LobsHeader, {})]
1151
1339
  });
1152
1340
  };
1153
1341