@fynd-design-engineering/fynd-one-v2 3.4.61 → 3.4.63
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/accordians/dropdown.js +95 -1
- package/dist/accordians/index.js +391 -1
- package/dist/cms-listing/index.js +24 -1
- package/dist/filters/clear-search.js +32 -1
- package/dist/filters/konnect.js +165 -1
- package/dist/filters/show-count.js +66 -1
- package/dist/form/country-dropdown.css +160 -1
- package/dist/form/cs-gated-redirection.js +40 -1
- package/dist/form/download-file.js +70 -1
- package/dist/form/validation.css +1019 -1
- package/dist/form/validation.js +10611 -7
- package/dist/global/anchor-scroll.js +174 -1
- package/dist/global/auth.js +87 -1
- package/dist/global/chat.js +185 -1
- package/dist/global/console-links.js +89 -1
- package/dist/global/contact-popup.js +83 -2
- package/dist/global/css/in-page-embed.css +1043 -1
- package/dist/global/css/in-project-settings.css +173 -1
- package/dist/global/css/temp.css +89 -1
- package/dist/global/custom-bg-video.js +40 -1
- package/dist/global/footer-accordion.js +44 -1
- package/dist/global/lazy-loader.js +135 -1
- package/dist/global/loader.js +166 -2
- package/dist/global/media-card.js +166 -1
- package/dist/global/miscellaneous.js +136 -1
- package/dist/global/number-count.js +82 -1
- package/dist/global/popup-video.js +276 -1
- package/dist/global/progressive-scroll.js +222 -1
- package/dist/global/responsive-video.js +321 -1
- package/dist/global/style.css +1065 -1
- package/dist/global/video-card.js +50 -1
- package/dist/hacktimus/2025.js +177 -1
- package/dist/hacktimus/styles.css +91 -1
- package/dist/home/index.js +17 -1
- package/dist/marquee/index.js +3104 -1
- package/dist/marquee/marquee-swiper.js +36 -1
- package/dist/navigation/announcement/index.js +5169 -1
- package/dist/navigation/context-menu/index.js +31 -1
- package/dist/navigation/desktop/index.js +4603 -1
- package/dist/navigation/initialization.js +602 -1
- package/dist/navigation/main.js +4911 -1
- package/dist/navigation/mobile/index.js +286 -1
- package/dist/navigation/scroll/index.js +62 -1
- package/dist/navigation/secondary-navigation/index.js +437 -1
- package/dist/navigation/style.css +154 -1
- package/dist/navigation/temp.css +2 -0
- package/dist/navigation/theme.css +69 -1
- package/dist/navigation-v2/index.js +4990 -1
- package/dist/navigation-v2/styles.css +233 -1
- package/dist/others/feature-detail.js +75 -0
- package/dist/others/feature-detail.js.map +7 -0
- package/dist/others/geolocation.js +50 -1
- package/dist/others/hero-aniamtion.js +53 -1
- package/dist/others/hero-india-animation-2.js +70 -1
- package/dist/others/hero-india-animation.js +93 -1
- package/dist/others/home-solution-tab.js +115 -1
- package/dist/others/storefront-chat/index.js +487 -1
- package/dist/others/storefront-chat/styles.css +107 -1
- package/dist/playbook-2026/hero-reveal.js +47 -1
- package/dist/playbook-2026/index.js +536 -1
- package/dist/playbook-2026/styles.css +110 -1
- package/dist/posthog-and-ga/attributes.js +190 -1
- package/dist/posthog-and-ga/main.js +528 -1
- package/dist/progressive-scroll/index.js +147 -1
- package/dist/quick-fix/reload.js +22 -1
- package/dist/seo/schema.js +465 -1
- package/dist/slider/freescroll.js +34 -1
- package/dist/test/sample.js +15 -1
- package/dist/testimonials/index.js +2654 -1
- package/dist/timeline/index.js +160 -1
- package/dist/timeline/style.css +42 -1
- package/dist/tracking/custom-id.js +75 -1
- package/dist/tracking/fill-form-fields.js +238 -1
- package/dist/tracking/fill-form-fields.js.map +2 -2
- package/dist/tracking/form-tracker.js +146 -1
- package/dist/tracking/page-categories.js +20 -1
- package/dist/tracking/user-journey.js +839 -1
- package/dist/tracking/utm-links.js +194 -1
- package/dist/utils/sample.js +17 -1
- package/dist/validations/localhost.js +221 -1
- package/package.json +1 -1
|
@@ -1 +1,174 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
(() => {
|
|
3
|
+
// bin/live-reload.js
|
|
4
|
+
if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
|
|
5
|
+
new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
|
|
6
|
+
"change",
|
|
7
|
+
() => location.reload()
|
|
8
|
+
);
|
|
9
|
+
} else {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// src/global/anchor-scroll.ts
|
|
13
|
+
var ScrollNavigation = class {
|
|
14
|
+
constructor(options = {}) {
|
|
15
|
+
this.handleTriggerClick = (event) => {
|
|
16
|
+
const target = event.target;
|
|
17
|
+
const trigger = target.closest(`[${this.triggerAttribute}]`);
|
|
18
|
+
if (trigger) {
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
this.updateActiveStates(trigger);
|
|
21
|
+
const sectionValue = trigger.getAttribute(this.triggerAttribute);
|
|
22
|
+
if (sectionValue) {
|
|
23
|
+
this.scrollToSection(sectionValue);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
this.triggerAttribute = options.triggerAttribute || "fynd-scroll-trigger";
|
|
28
|
+
this.targetAttribute = options.targetAttribute || "fynd-scroll-target";
|
|
29
|
+
this.scrollDelay = options.scrollDelay || 500;
|
|
30
|
+
this.init();
|
|
31
|
+
}
|
|
32
|
+
init() {
|
|
33
|
+
if (document.readyState === "loading") {
|
|
34
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
35
|
+
this.setupTriggers();
|
|
36
|
+
this.handlePageLoad();
|
|
37
|
+
this.handleBrowserNavigation();
|
|
38
|
+
});
|
|
39
|
+
} else {
|
|
40
|
+
this.setupTriggers();
|
|
41
|
+
this.handlePageLoad();
|
|
42
|
+
this.handleBrowserNavigation();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
scrollToSection(sectionValue) {
|
|
46
|
+
const target = document.querySelector(`[${this.targetAttribute}="${sectionValue}"]`);
|
|
47
|
+
if (target) {
|
|
48
|
+
this.updateURL(sectionValue);
|
|
49
|
+
this.updateActiveStatesBySection(sectionValue);
|
|
50
|
+
target.scrollIntoView({
|
|
51
|
+
behavior: "auto",
|
|
52
|
+
block: "start"
|
|
53
|
+
});
|
|
54
|
+
} else {
|
|
55
|
+
console.warn(`ScrollNavigation: Target element with ${this.targetAttribute}="${sectionValue}" not found`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
updateURL(sectionValue) {
|
|
59
|
+
try {
|
|
60
|
+
const url = new URL(window.location.href);
|
|
61
|
+
url.searchParams.set("section", sectionValue);
|
|
62
|
+
window.history.pushState({ section: sectionValue }, "", url.toString());
|
|
63
|
+
} catch (error) {
|
|
64
|
+
console.error("ScrollNavigation: Failed to update URL", error);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
handlePageLoad() {
|
|
68
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
69
|
+
const sectionParam = urlParams.get("section");
|
|
70
|
+
if (sectionParam) {
|
|
71
|
+
setTimeout(() => {
|
|
72
|
+
this.scrollToSection(sectionParam);
|
|
73
|
+
}, this.scrollDelay);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
setupTriggers() {
|
|
77
|
+
document.removeEventListener("click", this.handleTriggerClick);
|
|
78
|
+
this.initializeActiveStates();
|
|
79
|
+
document.addEventListener("click", this.handleTriggerClick);
|
|
80
|
+
}
|
|
81
|
+
initializeActiveStates() {
|
|
82
|
+
const triggers = document.querySelectorAll(`[${this.triggerAttribute}]`);
|
|
83
|
+
triggers.forEach((trigger) => {
|
|
84
|
+
trigger.setAttribute("fynd-anchor-active", "false");
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
updateActiveStatesBySection(sectionValue) {
|
|
88
|
+
const allTriggers = document.querySelectorAll(`[${this.triggerAttribute}]`);
|
|
89
|
+
allTriggers.forEach((trigger) => {
|
|
90
|
+
const triggerSectionValue = trigger.getAttribute(this.triggerAttribute);
|
|
91
|
+
if (triggerSectionValue === sectionValue) {
|
|
92
|
+
trigger.setAttribute("fynd-anchor-active", "true");
|
|
93
|
+
} else {
|
|
94
|
+
trigger.setAttribute("fynd-anchor-active", "false");
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
updateActiveStates(activeTrigger) {
|
|
99
|
+
const activeSectionValue = activeTrigger.getAttribute(this.triggerAttribute);
|
|
100
|
+
if (!activeSectionValue) return;
|
|
101
|
+
this.updateActiveStatesBySection(activeSectionValue);
|
|
102
|
+
}
|
|
103
|
+
handleBrowserNavigation() {
|
|
104
|
+
window.addEventListener("popstate", (event) => {
|
|
105
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
106
|
+
const sectionParam = urlParams.get("section");
|
|
107
|
+
if (sectionParam) {
|
|
108
|
+
const target = document.querySelector(`[${this.targetAttribute}="${sectionParam}"]`);
|
|
109
|
+
if (target) {
|
|
110
|
+
this.updateActiveStatesBySection(sectionParam);
|
|
111
|
+
target.scrollIntoView({
|
|
112
|
+
behavior: "auto",
|
|
113
|
+
block: "start"
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
// Public method to programmatically scroll to section
|
|
120
|
+
goToSection(sectionValue) {
|
|
121
|
+
this.scrollToSection(sectionValue);
|
|
122
|
+
}
|
|
123
|
+
// Public method to get current section from URL
|
|
124
|
+
getCurrentSection() {
|
|
125
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
126
|
+
return urlParams.get("section");
|
|
127
|
+
}
|
|
128
|
+
// Public method to get all available sections
|
|
129
|
+
getAvailableSections() {
|
|
130
|
+
const targets = document.querySelectorAll(`[${this.targetAttribute}]`);
|
|
131
|
+
const sections = [];
|
|
132
|
+
targets.forEach((target) => {
|
|
133
|
+
const sectionValue = target.getAttribute(this.targetAttribute);
|
|
134
|
+
if (sectionValue) {
|
|
135
|
+
sections.push(sectionValue);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
return sections;
|
|
139
|
+
}
|
|
140
|
+
// Public method to reinitialize triggers (useful when DOM changes)
|
|
141
|
+
reinitializeTriggers() {
|
|
142
|
+
this.setupTriggers();
|
|
143
|
+
}
|
|
144
|
+
// Public method for comprehensive reinitialization with options
|
|
145
|
+
reinitialize(options) {
|
|
146
|
+
const config = {
|
|
147
|
+
triggers: true,
|
|
148
|
+
handlePageLoad: false,
|
|
149
|
+
browserNavigation: false,
|
|
150
|
+
...options
|
|
151
|
+
};
|
|
152
|
+
if (config.triggers) {
|
|
153
|
+
this.setupTriggers();
|
|
154
|
+
}
|
|
155
|
+
if (config.handlePageLoad) {
|
|
156
|
+
this.handlePageLoad();
|
|
157
|
+
}
|
|
158
|
+
if (config.browserNavigation) {
|
|
159
|
+
this.handleBrowserNavigation();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
// Public method for complete reinitialization (equivalent to creating new instance)
|
|
163
|
+
fullReinitialize() {
|
|
164
|
+
this.setupTriggers();
|
|
165
|
+
this.handlePageLoad();
|
|
166
|
+
this.handleBrowserNavigation();
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
var scrollNavigation = new ScrollNavigation();
|
|
170
|
+
if (typeof window !== "undefined") {
|
|
171
|
+
window.ScrollNavigation = ScrollNavigation;
|
|
172
|
+
}
|
|
173
|
+
})();
|
|
174
|
+
//# sourceMappingURL=anchor-scroll.js.map
|
package/dist/global/auth.js
CHANGED
|
@@ -1 +1,87 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
(() => {
|
|
3
|
+
// bin/live-reload.js
|
|
4
|
+
if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
|
|
5
|
+
new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
|
|
6
|
+
"change",
|
|
7
|
+
() => location.reload()
|
|
8
|
+
);
|
|
9
|
+
} else {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// src/global/auth.ts
|
|
13
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
14
|
+
const API_URL = "https://api.console.fynd.com/service/panel/auth/v1.0/session/";
|
|
15
|
+
function setAuthStatus(value) {
|
|
16
|
+
const statusElements = document.querySelectorAll(
|
|
17
|
+
"[fynd-console-auth-status]"
|
|
18
|
+
);
|
|
19
|
+
statusElements.forEach((el) => {
|
|
20
|
+
el.setAttribute("fynd-console-auth-status", value ? "true" : "false");
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function userLoggedIn(user) {
|
|
24
|
+
const firstName = user.firstName || "";
|
|
25
|
+
const initial = firstName.charAt(0) || "";
|
|
26
|
+
setAuthStatus(true);
|
|
27
|
+
const nameElements = document.querySelectorAll(
|
|
28
|
+
'[fynd-console-auth="name"]'
|
|
29
|
+
);
|
|
30
|
+
nameElements.forEach((el) => {
|
|
31
|
+
el.textContent = firstName;
|
|
32
|
+
});
|
|
33
|
+
const userBlobElements = document.querySelectorAll(
|
|
34
|
+
'[fynd-console-auth="user-blob"]'
|
|
35
|
+
);
|
|
36
|
+
userBlobElements.forEach((el) => {
|
|
37
|
+
el.style.display = "block";
|
|
38
|
+
});
|
|
39
|
+
const initialTextElements = document.querySelectorAll(
|
|
40
|
+
'[fynd-console-auth="initial-text"]'
|
|
41
|
+
);
|
|
42
|
+
initialTextElements.forEach((el) => {
|
|
43
|
+
el.textContent = initial;
|
|
44
|
+
});
|
|
45
|
+
const imageElements = document.querySelectorAll('[fynd-console-auth="image"]');
|
|
46
|
+
if (user.profilePicUrl) {
|
|
47
|
+
imageElements.forEach((img) => {
|
|
48
|
+
img.src = user.profilePicUrl;
|
|
49
|
+
img.style.display = "block";
|
|
50
|
+
});
|
|
51
|
+
} else {
|
|
52
|
+
imageElements.forEach((img) => {
|
|
53
|
+
img.style.display = "none";
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function userNotLoggedIn() {
|
|
58
|
+
setAuthStatus(false);
|
|
59
|
+
const userBlobElements = document.querySelectorAll(
|
|
60
|
+
'[fynd-console-auth="user-blob"]'
|
|
61
|
+
);
|
|
62
|
+
userBlobElements.forEach((el) => {
|
|
63
|
+
el.style.display = "none";
|
|
64
|
+
});
|
|
65
|
+
const nameElements = document.querySelectorAll(
|
|
66
|
+
'[fynd-console-auth="name"]'
|
|
67
|
+
);
|
|
68
|
+
nameElements.forEach((el) => {
|
|
69
|
+
el.textContent = "Sign in";
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
fetch(API_URL, {
|
|
73
|
+
method: "GET",
|
|
74
|
+
credentials: "include"
|
|
75
|
+
}).then((response) => response.json()).then((data) => {
|
|
76
|
+
const user = data.user;
|
|
77
|
+
if (user && user.firstName) {
|
|
78
|
+
userLoggedIn(user);
|
|
79
|
+
} else {
|
|
80
|
+
userNotLoggedIn();
|
|
81
|
+
}
|
|
82
|
+
}).catch(() => {
|
|
83
|
+
userNotLoggedIn();
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
})();
|
|
87
|
+
//# sourceMappingURL=auth.js.map
|
package/dist/global/chat.js
CHANGED
|
@@ -1 +1,185 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
(() => {
|
|
3
|
+
// bin/live-reload.js
|
|
4
|
+
if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
|
|
5
|
+
new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
|
|
6
|
+
"change",
|
|
7
|
+
() => location.reload()
|
|
8
|
+
);
|
|
9
|
+
} else {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// src/global/chat.ts
|
|
13
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
14
|
+
const allowedHost = "fynd-one-master.webflow.io";
|
|
15
|
+
if (window.location.host !== allowedHost) {
|
|
16
|
+
const allChatElements = document.querySelectorAll("[fynd-chat]");
|
|
17
|
+
allChatElements.forEach((el) => {
|
|
18
|
+
;
|
|
19
|
+
el.style.display = "none";
|
|
20
|
+
});
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const dynamicInput = document.querySelector('[fynd-chat="input"]');
|
|
24
|
+
const measureSpan = document.querySelector('[fynd-chat="input-ghost"]');
|
|
25
|
+
const chatContainer = document.querySelector('[fynd-chat="input-container"]');
|
|
26
|
+
const chatIcon = document.querySelector('[fynd-chat="icon"]');
|
|
27
|
+
const chatButton = document.querySelector('[fynd-chat="button"]');
|
|
28
|
+
const chatWindow = document.querySelector('[fynd-chat="window"]');
|
|
29
|
+
const chatOverlay = document.querySelector('[fynd-chat="window-overlay"]');
|
|
30
|
+
if (!dynamicInput || !measureSpan || !chatContainer || !chatIcon || !chatButton || !chatWindow || !chatOverlay) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
chatWindow.style.opacity = "0";
|
|
34
|
+
chatWindow.style.transform = "scale(0)";
|
|
35
|
+
chatWindow.style.transformOrigin = "bottom center";
|
|
36
|
+
chatOverlay.style.opacity = "0";
|
|
37
|
+
chatOverlay.style.pointerEvents = "none";
|
|
38
|
+
chatOverlay.style.display = "none";
|
|
39
|
+
let isHovering = false;
|
|
40
|
+
let isFocused = false;
|
|
41
|
+
function updateState() {
|
|
42
|
+
if (isHovering || isFocused) {
|
|
43
|
+
activateInput();
|
|
44
|
+
} else {
|
|
45
|
+
deActivateInput();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function activateInput() {
|
|
49
|
+
dynamicInput.setAttribute("fynd-chat-active", "true");
|
|
50
|
+
chatButton.setAttribute("fynd-chat-active", "true");
|
|
51
|
+
chatIcon.setAttribute("fynd-chat-active", "true");
|
|
52
|
+
}
|
|
53
|
+
function deActivateInput() {
|
|
54
|
+
dynamicInput.setAttribute("fynd-chat-active", "false");
|
|
55
|
+
chatButton.setAttribute("fynd-chat-active", "false");
|
|
56
|
+
chatIcon.setAttribute("fynd-chat-active", "false");
|
|
57
|
+
}
|
|
58
|
+
function resizeInput() {
|
|
59
|
+
measureSpan.textContent = dynamicInput.value || " ";
|
|
60
|
+
const newWidth = Math.min(600, Math.max(320, measureSpan.offsetWidth + 40));
|
|
61
|
+
chatContainer.style.width = `${newWidth}px`;
|
|
62
|
+
}
|
|
63
|
+
function showKailyWindow() {
|
|
64
|
+
const gsapLib = window.gsap;
|
|
65
|
+
if (!gsapLib) return;
|
|
66
|
+
chatOverlay.style.pointerEvents = "auto";
|
|
67
|
+
chatOverlay.style.display = "block";
|
|
68
|
+
gsapLib.to(chatWindow, {
|
|
69
|
+
duration: 0.3,
|
|
70
|
+
scale: 1,
|
|
71
|
+
opacity: 1,
|
|
72
|
+
ease: "power2.out"
|
|
73
|
+
});
|
|
74
|
+
gsapLib.to(chatOverlay, {
|
|
75
|
+
duration: 0.3,
|
|
76
|
+
opacity: 1,
|
|
77
|
+
ease: "power2.out"
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function hideKailyWindow() {
|
|
81
|
+
const gsapLib = window.gsap;
|
|
82
|
+
if (!gsapLib) return;
|
|
83
|
+
gsapLib.to(chatOverlay, {
|
|
84
|
+
duration: 0.2,
|
|
85
|
+
opacity: 0,
|
|
86
|
+
ease: "power2.out",
|
|
87
|
+
onComplete: () => {
|
|
88
|
+
chatOverlay.style.pointerEvents = "none";
|
|
89
|
+
chatOverlay.style.display = "none";
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
gsapLib.to(chatWindow, {
|
|
93
|
+
duration: 0.2,
|
|
94
|
+
scale: 0,
|
|
95
|
+
opacity: 0,
|
|
96
|
+
ease: "power2.in"
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
dynamicInput.addEventListener("input", resizeInput);
|
|
100
|
+
chatContainer.addEventListener("mouseenter", () => {
|
|
101
|
+
isHovering = true;
|
|
102
|
+
updateState();
|
|
103
|
+
});
|
|
104
|
+
chatContainer.addEventListener("mouseleave", () => {
|
|
105
|
+
isHovering = false;
|
|
106
|
+
updateState();
|
|
107
|
+
});
|
|
108
|
+
dynamicInput.addEventListener("focus", () => {
|
|
109
|
+
isFocused = true;
|
|
110
|
+
updateState();
|
|
111
|
+
});
|
|
112
|
+
dynamicInput.addEventListener("blur", () => {
|
|
113
|
+
isFocused = false;
|
|
114
|
+
updateState();
|
|
115
|
+
});
|
|
116
|
+
document.addEventListener("keydown", (event) => {
|
|
117
|
+
const isMac = navigator.platform.toLowerCase().includes("mac");
|
|
118
|
+
const pressedE = event.key.toLowerCase() === "e";
|
|
119
|
+
if (pressedE && (isMac && event.metaKey || !isMac && event.ctrlKey)) {
|
|
120
|
+
event.preventDefault();
|
|
121
|
+
dynamicInput.focus();
|
|
122
|
+
isFocused = true;
|
|
123
|
+
updateState();
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
function sendMessage() {
|
|
127
|
+
const msg = dynamicInput.value.trim();
|
|
128
|
+
if (!msg) return;
|
|
129
|
+
window.kaily("event", "sendUserMessage", { message: msg });
|
|
130
|
+
showKailyWindow();
|
|
131
|
+
dynamicInput.value = "";
|
|
132
|
+
resizeInput();
|
|
133
|
+
dynamicInput.blur();
|
|
134
|
+
isFocused = false;
|
|
135
|
+
isHovering = false;
|
|
136
|
+
updateState();
|
|
137
|
+
}
|
|
138
|
+
chatButton.addEventListener("click", () => {
|
|
139
|
+
if (isFocused) sendMessage();
|
|
140
|
+
});
|
|
141
|
+
dynamicInput.addEventListener("keydown", (event) => {
|
|
142
|
+
if (event.key === "Enter") {
|
|
143
|
+
event.preventDefault();
|
|
144
|
+
sendMessage();
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
chatOverlay.addEventListener("click", hideKailyWindow);
|
|
148
|
+
function ChatInputIN() {
|
|
149
|
+
const gsapLib = window.gsap;
|
|
150
|
+
if (!gsapLib) return;
|
|
151
|
+
gsapLib.to(chatContainer, {
|
|
152
|
+
duration: 0.3,
|
|
153
|
+
y: 0,
|
|
154
|
+
ease: "power2.out"
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
function chatinputOUT() {
|
|
158
|
+
const gsapLib = window.gsap;
|
|
159
|
+
if (!gsapLib) return;
|
|
160
|
+
gsapLib.to(chatContainer, {
|
|
161
|
+
duration: 0.3,
|
|
162
|
+
y: 100,
|
|
163
|
+
ease: "power2.out"
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
let isChatInputIn = window.scrollY > 100;
|
|
167
|
+
if (isChatInputIn) {
|
|
168
|
+
ChatInputIN();
|
|
169
|
+
} else {
|
|
170
|
+
chatinputOUT();
|
|
171
|
+
}
|
|
172
|
+
window.addEventListener("scroll", () => {
|
|
173
|
+
const shouldBeIn = window.scrollY > 100;
|
|
174
|
+
if (shouldBeIn && !isChatInputIn) {
|
|
175
|
+
ChatInputIN();
|
|
176
|
+
isChatInputIn = true;
|
|
177
|
+
} else if (!shouldBeIn && isChatInputIn) {
|
|
178
|
+
chatinputOUT();
|
|
179
|
+
isChatInputIn = false;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
updateState();
|
|
183
|
+
});
|
|
184
|
+
})();
|
|
185
|
+
//# sourceMappingURL=chat.js.map
|
|
@@ -1 +1,89 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
(() => {
|
|
3
|
+
// bin/live-reload.js
|
|
4
|
+
if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
|
|
5
|
+
new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
|
|
6
|
+
"change",
|
|
7
|
+
() => location.reload()
|
|
8
|
+
);
|
|
9
|
+
} else {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// src/global/console-links.ts
|
|
13
|
+
var solutions = [
|
|
14
|
+
{
|
|
15
|
+
name: "Fynd PIM",
|
|
16
|
+
slug: "/solutions/ai-pim",
|
|
17
|
+
id: "bc50976c-a18e-467f-8e74-8bc7e6a1f247"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "Catalog Cloud",
|
|
21
|
+
slug: "/solutions/catalog-cloud",
|
|
22
|
+
id: "bc051955-3ec9-4164-9a2f-097fa2d92279"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "Fynd Platform",
|
|
26
|
+
slug: "/solutions/storefront",
|
|
27
|
+
id: "999c6e3a-5baa-4b1c-85b8-e57e67464069"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "Fynd Engage",
|
|
31
|
+
slug: "/solutions/engage",
|
|
32
|
+
id: "c14d07f5-138a-4d9d-95d2-426dc0564f68"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "Boltic",
|
|
36
|
+
slug: "/solutions/workflow-automation",
|
|
37
|
+
id: "40ec7873-ce38-4f0a-923b-1ebe96887d78"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "TMS",
|
|
41
|
+
slug: "/solutions/transport-management-system",
|
|
42
|
+
id: "6fb171d2-612e-4919-b85b-187077171d35"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "Copilot",
|
|
46
|
+
slug: "/solutions/ai-agent-builder",
|
|
47
|
+
id: "5f1dbe12-4a95-4d18-88f6-120ccead764d"
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
var currentPath = window.location.pathname;
|
|
51
|
+
var currentSolution = solutions.find((sol) => sol.slug === currentPath);
|
|
52
|
+
if (currentSolution) {
|
|
53
|
+
const updateUrl = (href) => {
|
|
54
|
+
try {
|
|
55
|
+
const url = new URL(href, window.location.origin);
|
|
56
|
+
if (url.hostname.includes("console.fynd.com")) {
|
|
57
|
+
url.searchParams.set("client_id", currentSolution.id);
|
|
58
|
+
return url.toString();
|
|
59
|
+
}
|
|
60
|
+
} catch {
|
|
61
|
+
}
|
|
62
|
+
return href;
|
|
63
|
+
};
|
|
64
|
+
const links = document.querySelectorAll(
|
|
65
|
+
'a[href*="console.fynd.com"], a[href^="https://console.fynd.com/"], a[href="https://console.fynd.com"]'
|
|
66
|
+
);
|
|
67
|
+
links.forEach((link) => {
|
|
68
|
+
if (link.getAttribute("update-console") === "false") return;
|
|
69
|
+
link.href = updateUrl(link.href);
|
|
70
|
+
});
|
|
71
|
+
const buttons = document.querySelectorAll("button");
|
|
72
|
+
buttons.forEach((button) => {
|
|
73
|
+
if (button.getAttribute("update-console") === "false") return;
|
|
74
|
+
const dataHref = button.getAttribute("data-href");
|
|
75
|
+
const onClick = button.getAttribute("onclick");
|
|
76
|
+
if (dataHref && dataHref.includes("console.fynd.com")) {
|
|
77
|
+
button.setAttribute("data-href", updateUrl(dataHref));
|
|
78
|
+
}
|
|
79
|
+
if (onClick && onClick.includes("console.fynd.com")) {
|
|
80
|
+
const match = onClick.match(/https:\/\/console\.fynd\.com[^\s'"]*/);
|
|
81
|
+
if (match) {
|
|
82
|
+
const newOnClick = onClick.replace(match[0], updateUrl(match[0]));
|
|
83
|
+
button.setAttribute("onclick", newOnClick);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
})();
|
|
89
|
+
//# sourceMappingURL=console-links.js.map
|
|
@@ -1,4 +1,38 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
(() => {
|
|
3
|
+
// bin/live-reload.js
|
|
4
|
+
if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
|
|
5
|
+
new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
|
|
6
|
+
"change",
|
|
7
|
+
() => location.reload()
|
|
8
|
+
);
|
|
9
|
+
} else {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// src/global/contact-popup.ts
|
|
13
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
14
|
+
const wrapper = document.querySelector(
|
|
15
|
+
'[data-popup-contact="wrapper"]'
|
|
16
|
+
);
|
|
17
|
+
const content = document.querySelector(
|
|
18
|
+
'[data-popup-contact="content"]'
|
|
19
|
+
);
|
|
20
|
+
const overlay = document.querySelector(
|
|
21
|
+
'[data-popup-contact="overlay"]'
|
|
22
|
+
);
|
|
23
|
+
const openTriggers = document.querySelectorAll(
|
|
24
|
+
'[data-popup-contact-trigger="open"]'
|
|
25
|
+
);
|
|
26
|
+
const closeTriggers = document.querySelectorAll(
|
|
27
|
+
'[data-popup-contact-trigger="close"]'
|
|
28
|
+
);
|
|
29
|
+
wrapper.style.display = "none";
|
|
30
|
+
overlay.style.opacity = "0";
|
|
31
|
+
content.style.opacity = "0";
|
|
32
|
+
content.style.transform = "scale(0.95)";
|
|
33
|
+
const popupStyle = document.createElement("style");
|
|
34
|
+
popupStyle.id = "contact-popup-style";
|
|
35
|
+
popupStyle.textContent = `
|
|
2
36
|
.iti.iti--container {
|
|
3
37
|
z-index: 100000000000 !important;
|
|
4
38
|
}
|
|
@@ -7,4 +41,51 @@
|
|
|
7
41
|
width: 100vw !important;
|
|
8
42
|
}
|
|
9
43
|
}
|
|
10
|
-
`;
|
|
44
|
+
`;
|
|
45
|
+
function lockScroll() {
|
|
46
|
+
document.body.style.overflow = "hidden";
|
|
47
|
+
}
|
|
48
|
+
function unlockScroll() {
|
|
49
|
+
document.body.style.overflow = "";
|
|
50
|
+
}
|
|
51
|
+
function addPopupStyle() {
|
|
52
|
+
if (!document.getElementById("contact-popup-style")) {
|
|
53
|
+
document.head.appendChild(popupStyle);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function removePopupStyle() {
|
|
57
|
+
const existing = document.getElementById("contact-popup-style");
|
|
58
|
+
if (existing) existing.remove();
|
|
59
|
+
}
|
|
60
|
+
function openPopup() {
|
|
61
|
+
wrapper.style.display = "flex";
|
|
62
|
+
lockScroll();
|
|
63
|
+
addPopupStyle();
|
|
64
|
+
requestAnimationFrame(() => {
|
|
65
|
+
overlay.style.transition = "opacity 0.25s ease";
|
|
66
|
+
content.style.transition = "opacity 0.25s ease, transform 0.25s ease";
|
|
67
|
+
overlay.style.opacity = "1";
|
|
68
|
+
content.style.opacity = "1";
|
|
69
|
+
content.style.transform = "scale(1)";
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function closePopup() {
|
|
73
|
+
overlay.style.opacity = "0";
|
|
74
|
+
content.style.opacity = "0";
|
|
75
|
+
content.style.transform = "scale(0.95)";
|
|
76
|
+
setTimeout(() => {
|
|
77
|
+
wrapper.style.display = "none";
|
|
78
|
+
unlockScroll();
|
|
79
|
+
removePopupStyle();
|
|
80
|
+
}, 250);
|
|
81
|
+
}
|
|
82
|
+
openTriggers.forEach((el) => el.addEventListener("click", openPopup));
|
|
83
|
+
closeTriggers.forEach((el) => el.addEventListener("click", closePopup));
|
|
84
|
+
overlay.addEventListener("click", (e) => {
|
|
85
|
+
if (e.target === overlay) closePopup();
|
|
86
|
+
});
|
|
87
|
+
window.openContactPopup = openPopup;
|
|
88
|
+
window.closeContactPopup = closePopup;
|
|
89
|
+
});
|
|
90
|
+
})();
|
|
91
|
+
//# sourceMappingURL=contact-popup.js.map
|