@fynd-design-engineering/fynd-one-v2 3.3.32 → 3.3.33

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.
@@ -0,0 +1 @@
1
+ "use strict";(()=>{document.addEventListener("DOMContentLoaded",()=>{let a=document.querySelectorAll("[konnect-filter-element]");a.length!==0&&(setTimeout(i,200),a.forEach(e=>{e.addEventListener("click",()=>{e.getAttribute("konnect-filter-element")==="primary"?(setTimeout(c,100),document.querySelectorAll('[konnect-filter-element="secondary"]').forEach((n,o)=>{o==0?(n.click(),n.setAttribute("konnect-filter-active","true")):n.setAttribute("konnect-filter-active","false")})):setTimeout(r,100)})}))});function r(){let e=new URLSearchParams(window.location.search).get("nest-tag_equal"),t=document.querySelectorAll('[konnect-filter-element="secondary"]');if(!e){t.forEach((n,o)=>{o==0?n.setAttribute("konnect-filter-active","true"):n.setAttribute("konnect-filter-active","false")});return}let l=e.trim().toLowerCase();t.length!==0&&t.forEach(n=>{let o=n.querySelector("[fs-list-value]");if(!o)return;o.getAttribute("fs-list-value")?.trim().toLowerCase()===l?(n.setAttribute("konnect-filter-active","true"),t[0].setAttribute("konnect-filter-active","false")):n.setAttribute("konnect-filter-active","false")})}function c(){let e=new URLSearchParams(window.location.search).get("tag_equal"),t=document.getElementById("konnect-filter");if(!t){console.warn("Select element with id 'konnect-filter' not found.");return}e?Array.from(t.options).find(n=>n.value===e)?(t.value=e,console.log(`Selected option: ${e}`)):console.warn(`No matching option found for value: ${e}`):console.log("No 'tag_equal' parameter in URL.")}function i(){let e=new URLSearchParams(window.location.search).get("tag_equal"),t=document.getElementById("konnect-filter");if(!t){console.warn("Select element with id 'konnect-filter' not found.");return}e?Array.from(t.options).find(n=>n.value===e)?(t.value=e,console.log(`Selected from URL param: ${e}`)):(console.warn(`No matching option found for value: ${e}. Defaulting to Marketplaces.`),t.value="Marketplaces"):(t.value="Marketplaces",console.log("No tag_equal param found. Defaulted to Marketplaces."))}})();
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../bin/live-reload.js", "../../src/filters/konnect.ts"],
4
+ "sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n // console.log(\"Live reload disabled: not running on localhost\");\n}\n", "document.addEventListener(\"DOMContentLoaded\", () => {\n const elements = document.querySelectorAll<HTMLElement>(\n \"[konnect-filter-element]\"\n );\n if (elements.length === 0) return;\n setTimeout(updateMobileSelectOnLoad, 200);\n\n elements.forEach((el) => {\n el.addEventListener(\"click\", () => {\n // console.log(\"konnect-filter-element clicked:\", el);\n const type = el.getAttribute(\"konnect-filter-element\");\n if (type === \"primary\") {\n setTimeout(updateMobileSelect, 100);\n const items = document.querySelectorAll<HTMLElement>(\n '[konnect-filter-element=\"secondary\"]'\n );\n items.forEach((el, index) => {\n if (index == 0) {\n el.click();\n el.setAttribute(\"konnect-filter-active\", \"true\");\n } else {\n el.setAttribute(\"konnect-filter-active\", \"false\");\n }\n });\n } else {\n // console.log(\"check secondary active tab\");\n setTimeout(updateSecondaryFilterTabs, 100);\n }\n });\n });\n});\n\nfunction updateSecondaryFilterTabs(): void {\n // Read ?nest-tag_equal=... from the URL\n const params = new URLSearchParams(window.location.search);\n const raw = params.get(\"nest-tag_equal\");\n // Find all secondary filter elements\n const items = document.querySelectorAll<HTMLElement>(\n '[konnect-filter-element=\"secondary\"]'\n );\n if (!raw) {\n items.forEach((el, index) => {\n if (index == 0) {\n el.setAttribute(\"konnect-filter-active\", \"true\");\n } else {\n el.setAttribute(\"konnect-filter-active\", \"false\");\n }\n });\n return;\n }\n\n const target = raw.trim().toLowerCase();\n\n if (items.length === 0) return;\n\n items.forEach((el) => {\n const input = el.querySelector<HTMLInputElement>(\"[fs-list-value]\");\n if (!input) return;\n const valFromAttr = input\n .getAttribute(\"fs-list-value\")\n ?.trim()\n .toLowerCase();\n\n if (valFromAttr === target) {\n el.setAttribute(\"konnect-filter-active\", \"true\");\n items[0].setAttribute(\"konnect-filter-active\", \"false\");\n } else {\n el.setAttribute(\"konnect-filter-active\", \"false\");\n }\n });\n}\n\nfunction updateMobileSelect(): void {\n const params = new URLSearchParams(window.location.search);\n const raw = params.get(\"tag_equal\");\n\n const select = document.getElementById(\n \"konnect-filter\"\n ) as HTMLSelectElement | null;\n\n if (!select) {\n console.warn(\"Select element with id 'konnect-filter' not found.\");\n return;\n }\n\n if (raw) {\n const matchedOption = Array.from(select.options).find(\n (option) => option.value === raw\n );\n\n if (matchedOption) {\n select.value = raw;\n console.log(`Selected option: ${raw}`);\n } else {\n console.warn(`No matching option found for value: ${raw}`);\n }\n } else {\n console.log(\"No 'tag_equal' parameter in URL.\");\n }\n}\n\nfunction updateMobileSelectOnLoad(): void {\n const params = new URLSearchParams(window.location.search);\n const raw = params.get(\"tag_equal\");\n\n const select = document.getElementById(\n \"konnect-filter\"\n ) as HTMLSelectElement | null;\n\n if (!select) {\n console.warn(\"Select element with id 'konnect-filter' not found.\");\n return;\n }\n\n // If 'tag_equal' exists, select it. Otherwise, default to 'Marketplaces'\n if (raw) {\n const matchedOption = Array.from(select.options).find(\n (option) => option.value === raw\n );\n\n if (matchedOption) {\n select.value = raw;\n console.log(`Selected from URL param: ${raw}`);\n } else {\n console.warn(\n `No matching option found for value: ${raw}. Defaulting to Marketplaces.`\n );\n select.value = \"Marketplaces\";\n }\n } else {\n select.value = \"Marketplaces\";\n console.log(\"No tag_equal param found. Defaulted to Marketplaces.\");\n }\n}\n"],
5
+ "mappings": ";;;AACA,MACE,OAAO,SAAS,aAAa,eAC7B,OAAO,SAAS,aAAa,aAC7B;AACA,QAAI,YAAY,GAAG,uBAAY,UAAU,EAAE;AAAA,MAAiB;AAAA,MAAU,MACpE,SAAS,OAAO;AAAA,IAClB;AAAA,EACF,OAAO;AAAA,EAEP;;;ACVA,WAAS,i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uC,GAAG;AAAA,QAC5C;AACA,eAAO,QAAQ;AAAA,MACjB;AAAA,IACF,OAAO;AACL,aAAO,QAAQ;AACf,cAAQ,IAAI,sDAAsD;AAAA,IACpE;AAAA,EACF;",
6
+ "names": ["el"]
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fynd-design-engineering/fynd-one-v2",
3
- "version": "3.3.32",
3
+ "version": "3.3.33",
4
4
  "description": "Updated CDN for fynd.com",
5
5
  "homepage": "https://github.com/Fynd-Design-Engineering/Fynd-Utils/blob/main/README.md",
6
6
  "license": "ISC",