@fynd-design-engineering/fynd-one-v2 3.4.63 → 3.4.65
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 +1 -95
- package/dist/accordians/index.js +1 -391
- package/dist/cms-listing/index.js +1 -24
- package/dist/filters/clear-search.js +1 -32
- package/dist/filters/konnect.js +1 -165
- package/dist/filters/show-count.js +1 -66
- package/dist/form/country-dropdown.css +1 -160
- package/dist/form/cs-gated-redirection.js +1 -40
- package/dist/form/download-file.js +1 -70
- package/dist/form/validation.css +1 -1019
- package/dist/form/validation.js +7 -10611
- package/dist/global/anchor-scroll.js +1 -174
- package/dist/global/auth.js +1 -87
- package/dist/global/chat.js +1 -185
- package/dist/global/console-links.js +1 -89
- package/dist/global/contact-popup.js +2 -83
- package/dist/global/css/in-page-embed.css +1 -1043
- package/dist/global/css/in-project-settings.css +1 -173
- package/dist/global/css/temp.css +1 -89
- package/dist/global/custom-bg-video.js +1 -40
- package/dist/global/footer-accordion.js +1 -44
- package/dist/global/lazy-loader.js +1 -135
- package/dist/global/loader.js +2 -166
- package/dist/global/media-card.js +1 -166
- package/dist/global/miscellaneous.js +1 -136
- package/dist/global/number-count.js +1 -82
- package/dist/global/popup-video.js +1 -276
- package/dist/global/progressive-scroll.js +1 -222
- package/dist/global/responsive-video.js +1 -321
- package/dist/global/style.css +1 -1065
- package/dist/global/video-card.js +1 -50
- package/dist/hacktimus/2025.js +1 -177
- package/dist/hacktimus/styles.css +1 -91
- package/dist/home/index.js +1 -17
- package/dist/marquee/index.js +1 -3104
- package/dist/marquee/marquee-swiper.js +1 -36
- package/dist/navigation/announcement/index.js +1 -5169
- package/dist/navigation/context-menu/index.js +1 -31
- package/dist/navigation/desktop/index.js +1 -4603
- package/dist/navigation/initialization.js +1 -602
- package/dist/navigation/main.js +1 -4911
- package/dist/navigation/mobile/index.js +1 -286
- package/dist/navigation/scroll/index.js +1 -62
- package/dist/navigation/secondary-navigation/index.js +1 -437
- package/dist/navigation/style.css +1 -154
- package/dist/navigation/temp.css +0 -2
- package/dist/navigation/theme.css +1 -69
- package/dist/navigation-v2/index.js +1 -4990
- package/dist/navigation-v2/styles.css +1 -233
- package/dist/others/feature-detail.js +1 -75
- package/dist/others/geolocation.js +1 -50
- package/dist/others/hero-aniamtion.js +1 -53
- package/dist/others/hero-india-animation-2.js +1 -70
- package/dist/others/hero-india-animation.js +1 -93
- package/dist/others/home-solution-tab.js +1 -115
- package/dist/others/storefront-chat/index.js +1 -487
- package/dist/others/storefront-chat/styles.css +1 -107
- package/dist/playbook-2026/hero-reveal.js +1 -47
- package/dist/playbook-2026/index.js +1 -536
- package/dist/playbook-2026/styles.css +1 -110
- package/dist/posthog-and-ga/attributes.js +1 -190
- package/dist/posthog-and-ga/main.js +1 -528
- package/dist/progressive-scroll/index.js +1 -147
- package/dist/quick-fix/reload.js +1 -22
- package/dist/seo/schema.js +1 -465
- package/dist/slider/freescroll.js +1 -34
- package/dist/test/sample.js +1 -15
- package/dist/testimonials/index.js +1 -2654
- package/dist/timeline/index.js +1 -160
- package/dist/timeline/style.css +1 -42
- package/dist/tracking/custom-id.js +1 -75
- package/dist/tracking/fill-form-fields.js +1 -238
- package/dist/tracking/form-tracker.js +1 -146
- package/dist/tracking/page-categories.js +1 -20
- package/dist/tracking/user-journey.js +1 -839
- package/dist/tracking/utm-links.js +1 -194
- package/dist/utils/sample.js +1 -17
- package/dist/validations/localhost.js +1 -221
- package/package.json +1 -1
|
@@ -1,174 +1 @@
|
|
|
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
|
|
1
|
+
"use strict";(()=>{var a=class{constructor(t={}){this.handleTriggerClick=t=>{let i=t.target.closest(`[${this.triggerAttribute}]`);if(i){t.preventDefault(),this.updateActiveStates(i);let r=i.getAttribute(this.triggerAttribute);r&&this.scrollToSection(r)}};this.triggerAttribute=t.triggerAttribute||"fynd-scroll-trigger",this.targetAttribute=t.targetAttribute||"fynd-scroll-target",this.scrollDelay=t.scrollDelay||500,this.init()}init(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this.setupTriggers(),this.handlePageLoad(),this.handleBrowserNavigation()}):(this.setupTriggers(),this.handlePageLoad(),this.handleBrowserNavigation())}scrollToSection(t){let e=document.querySelector(`[${this.targetAttribute}="${t}"]`);e?(this.updateURL(t),this.updateActiveStatesBySection(t),e.scrollIntoView({behavior:"auto",block:"start"})):console.warn(`ScrollNavigation: Target element with ${this.targetAttribute}="${t}" not found`)}updateURL(t){try{let e=new URL(window.location.href);e.searchParams.set("section",t),window.history.pushState({section:t},"",e.toString())}catch(e){console.error("ScrollNavigation: Failed to update URL",e)}}handlePageLoad(){let e=new URLSearchParams(window.location.search).get("section");e&&setTimeout(()=>{this.scrollToSection(e)},this.scrollDelay)}setupTriggers(){document.removeEventListener("click",this.handleTriggerClick),this.initializeActiveStates(),document.addEventListener("click",this.handleTriggerClick)}initializeActiveStates(){document.querySelectorAll(`[${this.triggerAttribute}]`).forEach(e=>{e.setAttribute("fynd-anchor-active","false")})}updateActiveStatesBySection(t){document.querySelectorAll(`[${this.triggerAttribute}]`).forEach(i=>{i.getAttribute(this.triggerAttribute)===t?i.setAttribute("fynd-anchor-active","true"):i.setAttribute("fynd-anchor-active","false")})}updateActiveStates(t){let e=t.getAttribute(this.triggerAttribute);e&&this.updateActiveStatesBySection(e)}handleBrowserNavigation(){window.addEventListener("popstate",t=>{let i=new URLSearchParams(window.location.search).get("section");if(i){let r=document.querySelector(`[${this.targetAttribute}="${i}"]`);r&&(this.updateActiveStatesBySection(i),r.scrollIntoView({behavior:"auto",block:"start"}))}})}goToSection(t){this.scrollToSection(t)}getCurrentSection(){return new URLSearchParams(window.location.search).get("section")}getAvailableSections(){let t=document.querySelectorAll(`[${this.targetAttribute}]`),e=[];return t.forEach(i=>{let r=i.getAttribute(this.targetAttribute);r&&e.push(r)}),e}reinitializeTriggers(){this.setupTriggers()}reinitialize(t){let e={triggers:!0,handlePageLoad:!1,browserNavigation:!1,...t};e.triggers&&this.setupTriggers(),e.handlePageLoad&&this.handlePageLoad(),e.browserNavigation&&this.handleBrowserNavigation()}fullReinitialize(){this.setupTriggers(),this.handlePageLoad(),this.handleBrowserNavigation()}},s=new a;typeof window<"u"&&(window.ScrollNavigation=a);})();
|
package/dist/global/auth.js
CHANGED
|
@@ -1,87 +1 @@
|
|
|
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
|
|
1
|
+
"use strict";(()=>{document.addEventListener("DOMContentLoaded",()=>{let r="https://api.console.fynd.com/service/panel/auth/v1.0/session/";function o(e){document.querySelectorAll("[fynd-console-auth-status]").forEach(s=>{s.setAttribute("fynd-console-auth-status",e?"true":"false")})}function a(e){let n=e.firstName||"",s=n.charAt(0)||"";o(!0),document.querySelectorAll('[fynd-console-auth="name"]').forEach(t=>{t.textContent=n}),document.querySelectorAll('[fynd-console-auth="user-blob"]').forEach(t=>{t.style.display="block"}),document.querySelectorAll('[fynd-console-auth="initial-text"]').forEach(t=>{t.textContent=s});let c=document.querySelectorAll('[fynd-console-auth="image"]');e.profilePicUrl?c.forEach(t=>{t.src=e.profilePicUrl,t.style.display="block"}):c.forEach(t=>{t.style.display="none"})}function l(){o(!1),document.querySelectorAll('[fynd-console-auth="user-blob"]').forEach(s=>{s.style.display="none"}),document.querySelectorAll('[fynd-console-auth="name"]').forEach(s=>{s.textContent="Sign in"})}fetch(r,{method:"GET",credentials:"include"}).then(e=>e.json()).then(e=>{let n=e.user;n&&n.firstName?a(n):l()}).catch(()=>{l()})});})();
|
package/dist/global/chat.js
CHANGED
|
@@ -1,185 +1 @@
|
|
|
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
|
+
"use strict";(()=>{document.addEventListener("DOMContentLoaded",()=>{if(window.location.host!=="fynd-one-master.webflow.io"){document.querySelectorAll("[fynd-chat]").forEach(d=>{d.style.display="none"});return}let t=document.querySelector('[fynd-chat="input"]'),u=document.querySelector('[fynd-chat="input-ghost"]'),a=document.querySelector('[fynd-chat="input-container"]'),y=document.querySelector('[fynd-chat="icon"]'),c=document.querySelector('[fynd-chat="button"]'),s=document.querySelector('[fynd-chat="window"]'),n=document.querySelector('[fynd-chat="window-overlay"]');if(!t||!u||!a||!y||!c||!s||!n)return;s.style.opacity="0",s.style.transform="scale(0)",s.style.transformOrigin="bottom center",n.style.opacity="0",n.style.pointerEvents="none",n.style.display="none";let r=!1,i=!1;function o(){r||i?m():h()}function m(){t.setAttribute("fynd-chat-active","true"),c.setAttribute("fynd-chat-active","true"),y.setAttribute("fynd-chat-active","true")}function h(){t.setAttribute("fynd-chat-active","false"),c.setAttribute("fynd-chat-active","false"),y.setAttribute("fynd-chat-active","false")}function f(){u.textContent=t.value||" ";let e=Math.min(600,Math.max(320,u.offsetWidth+40));a.style.width=`${e}px`}function E(){let e=window.gsap;e&&(n.style.pointerEvents="auto",n.style.display="block",e.to(s,{duration:.3,scale:1,opacity:1,ease:"power2.out"}),e.to(n,{duration:.3,opacity:1,ease:"power2.out"}))}function L(){let e=window.gsap;e&&(e.to(n,{duration:.2,opacity:0,ease:"power2.out",onComplete:()=>{n.style.pointerEvents="none",n.style.display="none"}}),e.to(s,{duration:.2,scale:0,opacity:0,ease:"power2.in"}))}t.addEventListener("input",f),a.addEventListener("mouseenter",()=>{r=!0,o()}),a.addEventListener("mouseleave",()=>{r=!1,o()}),t.addEventListener("focus",()=>{i=!0,o()}),t.addEventListener("blur",()=>{i=!1,o()}),document.addEventListener("keydown",e=>{let d=navigator.platform.toLowerCase().includes("mac");e.key.toLowerCase()==="e"&&(d&&e.metaKey||!d&&e.ctrlKey)&&(e.preventDefault(),t.focus(),i=!0,o())});function p(){let e=t.value.trim();e&&(window.kaily("event","sendUserMessage",{message:e}),E(),t.value="",f(),t.blur(),i=!1,r=!1,o())}c.addEventListener("click",()=>{i&&p()}),t.addEventListener("keydown",e=>{e.key==="Enter"&&(e.preventDefault(),p())}),n.addEventListener("click",L);function w(){let e=window.gsap;e&&e.to(a,{duration:.3,y:0,ease:"power2.out"})}function v(){let e=window.gsap;e&&e.to(a,{duration:.3,y:100,ease:"power2.out"})}let l=window.scrollY>100;l?w():v(),window.addEventListener("scroll",()=>{let e=window.scrollY>100;e&&!l?(w(),l=!0):!e&&l&&(v(),l=!1)}),o()});})();
|
|
@@ -1,89 +1 @@
|
|
|
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
|
+
"use strict";(()=>{var i=[{name:"Fynd PIM",slug:"/solutions/ai-pim",id:"bc50976c-a18e-467f-8e74-8bc7e6a1f247"},{name:"Catalog Cloud",slug:"/solutions/catalog-cloud",id:"bc051955-3ec9-4164-9a2f-097fa2d92279"},{name:"Fynd Platform",slug:"/solutions/storefront",id:"999c6e3a-5baa-4b1c-85b8-e57e67464069"},{name:"Fynd Engage",slug:"/solutions/engage",id:"c14d07f5-138a-4d9d-95d2-426dc0564f68"},{name:"Boltic",slug:"/solutions/workflow-automation",id:"40ec7873-ce38-4f0a-923b-1ebe96887d78"},{name:"TMS",slug:"/solutions/transport-management-system",id:"6fb171d2-612e-4919-b85b-187077171d35"},{name:"Copilot",slug:"/solutions/ai-agent-builder",id:"5f1dbe12-4a95-4d18-88f6-120ccead764d"}],l=window.location.pathname,c=i.find(n=>n.slug===l);if(c){let n=t=>{try{let e=new URL(t,window.location.origin);if(e.hostname.includes("console.fynd.com"))return e.searchParams.set("client_id",c.id),e.toString()}catch{}return t};document.querySelectorAll('a[href*="console.fynd.com"], a[href^="https://console.fynd.com/"], a[href="https://console.fynd.com"]').forEach(t=>{t.getAttribute("update-console")!=="false"&&(t.href=n(t.href))}),document.querySelectorAll("button").forEach(t=>{if(t.getAttribute("update-console")==="false")return;let e=t.getAttribute("data-href"),o=t.getAttribute("onclick");if(e&&e.includes("console.fynd.com")&&t.setAttribute("data-href",n(e)),o&&o.includes("console.fynd.com")){let s=o.match(/https:\/\/console\.fynd\.com[^\s'"]*/);if(s){let a=o.replace(s[0],n(s[0]));t.setAttribute("onclick",a)}}})}})();
|
|
@@ -1,38 +1,4 @@
|
|
|
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 = `
|
|
1
|
+
"use strict";(()=>{document.addEventListener("DOMContentLoaded",()=>{let n=document.querySelector('[data-popup-contact="wrapper"]'),e=document.querySelector('[data-popup-contact="content"]'),o=document.querySelector('[data-popup-contact="overlay"]'),p=document.querySelectorAll('[data-popup-contact-trigger="open"]'),i=document.querySelectorAll('[data-popup-contact-trigger="close"]');n.style.display="none",o.style.opacity="0",e.style.opacity="0",e.style.transform="scale(0.95)";let c=document.createElement("style");c.id="contact-popup-style",c.textContent=`
|
|
36
2
|
.iti.iti--container {
|
|
37
3
|
z-index: 100000000000 !important;
|
|
38
4
|
}
|
|
@@ -41,51 +7,4 @@
|
|
|
41
7
|
width: 100vw !important;
|
|
42
8
|
}
|
|
43
9
|
}
|
|
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
|
|
10
|
+
`;function s(){document.body.style.overflow="hidden"}function r(){document.body.style.overflow=""}function d(){document.getElementById("contact-popup-style")||document.head.appendChild(c)}function y(){let t=document.getElementById("contact-popup-style");t&&t.remove()}function l(){n.style.display="flex",s(),d(),requestAnimationFrame(()=>{o.style.transition="opacity 0.25s ease",e.style.transition="opacity 0.25s ease, transform 0.25s ease",o.style.opacity="1",e.style.opacity="1",e.style.transform="scale(1)"})}function a(){o.style.opacity="0",e.style.opacity="0",e.style.transform="scale(0.95)",setTimeout(()=>{n.style.display="none",r(),y()},250)}p.forEach(t=>t.addEventListener("click",l)),i.forEach(t=>t.addEventListener("click",a)),o.addEventListener("click",t=>{t.target===o&&a()}),window.openContactPopup=l,window.closeContactPopup=a});})();
|