Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@finsweet/attributes-cmsselect

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@finsweet/attributes-cmsselect - npm Package Compare versions

Comparing version 1.4.3 to 1.4.4

2

cmsselect.js

@@ -1,1 +0,1 @@

(()=>{var U=Object.defineProperty;var B=(e,t,o)=>t in e?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var I=(e,t,o)=>(B(e,typeof t!="symbol"?t+"":t,o),o);var C="@finsweet/attributes-cmscore";var u=class{static activateAlerts(){this.alertsActivated=!0}static alert(t,o){if(this.alertsActivated&&window.alert(t),o==="error")throw new Error(t)}};I(u,"alertsActivated",!1);var h={wrapper:"w-dyn-list",list:"w-dyn-items",item:"w-dyn-item",paginationWrapper:"w-pagination-wrapper",paginationNext:"w-pagination-next",paginationPrevious:"w-pagination-previous",pageCount:"w-page-count",emptyState:"w-dyn-empty"};var x=e=>{let t=e.split("-"),o=parseInt(t[t.length-1]);if(!isNaN(o))return o};var L=(e,t)=>{let o=e.getAttribute(t);return o?x(o):void 0};var G=`https://cdn.jsdelivr.net/npm/${C}@1/cmscore.js`,b=async()=>{let{fsAttributes:e}=window;e.cms||(e.cms={});let{cms:t}=e;if(t.coreImport)return t.coreImport;try{let o=import(G);return t.coreImport=o,o.then(n=>{n&&(t.coreVersion||(t.coreVersion=n.version))}),o}catch(o){u.alert(`${o}`,"error");return}};var d="fs-attributes";var Y=`${d}-support`,j="https://cdn.jsdelivr.net/npm/@finsweet/attributes-support@1/support.js",N=async()=>{let{fsAttributes:e,location:t}=window,{host:o,searchParams:n}=new URL(t.href);if(!o.includes("webflow.io")||!n.has(Y))return!1;if(e.supportImport)return e.supportImport;try{e.supportImport=new Promise((s,r)=>{let i=document.createElement("script");i.src=j,i.onload=()=>s(!0),i.onerror=r,document.head.append(i)})}catch(s){return!1}return e.supportImport};var m=e=>t=>`${e}${t?`-${t}`:""}`,f=e=>{let t=(n,s,r)=>{let i=e[n],{key:a,values:c}=i,p;if(!s)return`[${a}]`;let S=c==null?void 0:c[s];if(typeof S=="string"?p=S:p=S(r&&"instanceIndex"in r?r.instanceIndex:void 0),!(r!=null&&r.operator))return`[${a}="${p}"]`;switch(r.operator){case"prefixed":return`[${a}^="${p}"]`;case"suffixed":return`[${a}$="${p}"]`;case"contains":return`[${a}*="${p}"]`}};function o(n,s){let r=t("element",n,s),i=(s==null?void 0:s.scope)||document;return s!=null&&s.all?i.querySelectorAll(r):i.querySelector(r)}return[t,o]};var w={preventLoad:{key:`${d}-preventload`},debugMode:{key:`${d}-debug`},src:{key:"src",values:{finsweet:"@finsweet/attributes"}},dev:{key:`${d}-dev`}},[y,zt]=f(w);var k=()=>{let{currentScript:e}=document,{preventLoad:t,debugMode:o}=w,n=typeof(e==null?void 0:e.getAttribute(t.key))=="string";return typeof(e==null?void 0:e.getAttribute(o.key))=="string"&&u.activateAlerts(),{preventsLoad:n}};var v=()=>{if(window.fsAttributes&&!Array.isArray(window.fsAttributes))return;let e={cms:{},push(...t){var o,n;for(let[s,r]of t)(n=(o=this[s])==null?void 0:o.loading)==null||n.then(r)}};H(e),q(e),window.fsAttributes=e,window.FsAttributes=window.fsAttributes,N()},H=e=>{let t=y("src","finsweet",{operator:"contains"}),o=y("dev"),s=[...document.querySelectorAll(`script${t}, script${o}`)].reduce((r,i)=>{var c;let a=i.getAttribute(w.dev.key)||((c=i.src.match(/[\w-. ]+(?=(\.js)$)/))==null?void 0:c[0]);return a&&!r.includes(a)&&r.push(a),r},[]);for(let r of s){e[r]={};let i=e[r];i.loading=new Promise(a=>{i.resolve=c=>{a(c),delete i.resolve}})}},q=e=>{let t=Array.isArray(window.fsAttributes)?window.fsAttributes:[];e.push(...t)};var M="1.4.3";var E="cmsselect",X=`fs-${E}`,Q="text-value",z="select",T={element:{key:`${X}-element`,values:{textValue:m(Q),select:z}}},[A,me]=f(T);var g="cmsload",l=`fs-${g}`,J="list",Z="loader",tt="items-count",et="visible-count",ot="scroll-anchor",rt="page-button",st="page-dots",nt="empty",it="mode",at={loadUnder:"load-under",renderAll:"render-all",pagination:"pagination",infinite:"infinite"},ct="threshold",pt="pagesiblings",lt="pageboundary",mt="animation",ut="easing",dt="duration",ft="stagger",Et="resetix",St={true:"true"},bt="showquery",wt={true:"true"},At={element:{key:`${l}-element`,values:{list:m(J),loader:m(Z),itemsCount:m(tt),visibleCount:m(et),scrollAnchor:m(ot),empty:m(nt),pageButton:rt,pageDots:st}},mode:{key:`${l}-${it}`,values:at},threshold:{key:`${l}-${ct}`},pageSiblings:{key:`${l}-${pt}`},pageBoundary:{key:`${l}-${lt}`},animation:{key:`${l}-${mt}`},easing:{key:`${l}-${ut}`},duration:{key:`${l}-${dt}`},stagger:{key:`${l}-${ft}`},resetIx:{key:`${l}-${Et}`,values:St},showQuery:{key:`${l}-${bt}`,values:wt}},[fe,Ee]=f(At);var P=(e,t)=>{var i;let o=L(e,T.element.key),n=R(o),s=new Set,r=new Set;for(let a of n){O(e,a,r);let c=a.closest(`.${h.wrapper}`);if(!c)continue;let p=(i=t.createCMSListInstance)==null?void 0:i.call(t,c);!p||s.add(p)}for(let a of s)a.on("additems",c=>{for(let{element:p}of c){let S=R(o,p);for(let D of S)O(e,D,r)}});return[...s]},R=(e,t=document)=>[...t.querySelectorAll(A("element","textValue",{instanceIndex:e}))],O=(e,{innerText:t},o)=>{if(!t||o.has(t))return;let n=new Option(t,t);e.options.add(n),o.add(t)};var _=async()=>{var s,r,i;let e=await b();if(!e)return[];let t=[...document.querySelectorAll(A("element","select",{operator:"prefixed"}))],o=new Set;for(let a of t){if(!(a instanceof HTMLSelectElement))continue;let c=P(a,e);for(let p of c)o.add(p)}let n=[...o];return await((s=window.fsAttributes[g])==null?void 0:s.loading),(i=(r=window.fsAttributes[E]).resolve)==null||i.call(r,n),n};v();b();var V,$;(V=window.fsAttributes)[$=E]||(V[$]={});var{preventsLoad:xt}=k(),K=window.fsAttributes[E];K.version=M;xt?K.init=_:(window.Webflow||(window.Webflow=[]),window.Webflow.push(_));})();
(()=>{var U=Object.defineProperty;var B=(e,t,o)=>t in e?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var C=(e,t,o)=>(B(e,typeof t!="symbol"?t+"":t,o),o);var h="@finsweet/attributes-cmscore";var u=class{static activateAlerts(){this.alertsActivated=!0}static alert(t,o){if(this.alertsActivated&&window.alert(t),o==="error")throw new Error(t)}};C(u,"alertsActivated",!1);var L={wrapper:"w-dyn-list",list:"w-dyn-items",item:"w-dyn-item",paginationWrapper:"w-pagination-wrapper",paginationNext:"w-pagination-next",paginationPrevious:"w-pagination-previous",pageCount:"w-page-count",emptyState:"w-dyn-empty"};var y=e=>{let t=e.split("-"),o=parseInt(t[t.length-1]);if(!isNaN(o))return o};var N=(e,t)=>{let o=e.getAttribute(t);return o?y(o):void 0};var G=`https://cdn.jsdelivr.net/npm/${h}@1/cmscore.js`,w=async()=>{let{fsAttributes:e}=window;e.cms||(e.cms={});let{cms:t}=e;if(t.coreImport)return t.coreImport;try{let o=import(G);return t.coreImport=o,o.then(n=>{n&&(t.coreVersion||(t.coreVersion=n.version))}),o}catch(o){u.alert(`${o}`,"error");return}};var f="fs-attributes";var Y=`${f}-support`,j="https://cdn.jsdelivr.net/npm/@finsweet/attributes-support@1/support.js",v=async()=>{let{fsAttributes:e,location:t}=window,{host:o,searchParams:n}=new URL(t.href);if(!o.includes("webflow.io")||!n.has(Y))return!1;if(e.supportImport)return e.supportImport;try{e.supportImport=new Promise((s,r)=>{let i=document.createElement("script");i.src=j,i.onload=()=>s(!0),i.onerror=r,document.head.append(i)})}catch(s){return!1}return e.supportImport};var m=e=>t=>`${e}${t?`-${t}`:""}`,E=e=>{let t=(n,s,r)=>{let i=e[n],{key:a,values:c}=i,p;if(!s)return`[${a}]`;let b=c==null?void 0:c[s];typeof b=="string"?p=b:p=b(r&&"instanceIndex"in r?r.instanceIndex:void 0);let d=r&&"caseInsensitive"in r&&r.caseInsensitive?"i":"";if(!(r!=null&&r.operator))return`[${a}="${p}"${d}]`;switch(r.operator){case"prefixed":return`[${a}^="${p}"${d}]`;case"suffixed":return`[${a}$="${p}"${d}]`;case"contains":return`[${a}*="${p}"${d}]`}};function o(n,s){let r=t("element",n,s),i=(s==null?void 0:s.scope)||document;return s!=null&&s.all?i.querySelectorAll(r):i.querySelector(r)}return[t,o]};var A={preventLoad:{key:`${f}-preventload`},debugMode:{key:`${f}-debug`},src:{key:"src",values:{finsweet:"@finsweet/attributes"}},dev:{key:`${f}-dev`}},[T,zt]=E(A);var k=()=>{let{currentScript:e}=document,{preventLoad:t,debugMode:o}=A,n=typeof(e==null?void 0:e.getAttribute(t.key))=="string";return typeof(e==null?void 0:e.getAttribute(o.key))=="string"&&u.activateAlerts(),{preventsLoad:n}};var M=()=>{if(window.fsAttributes&&!Array.isArray(window.fsAttributes))return;let e={cms:{},push(...t){var o,n;for(let[s,r]of t)(n=(o=this[s])==null?void 0:o.loading)==null||n.then(r)}};H(e),q(e),window.fsAttributes=e,window.FsAttributes=window.fsAttributes,v()},H=e=>{let t=T("src","finsweet",{operator:"contains"}),o=T("dev"),s=[...document.querySelectorAll(`script${t}, script${o}`)].reduce((r,i)=>{var c;let a=i.getAttribute(A.dev.key)||((c=i.src.match(/[\w-. ]+(?=(\.js)$)/))==null?void 0:c[0]);return a&&!r.includes(a)&&r.push(a),r},[]);for(let r of s){e[r]={};let i=e[r];i.loading=new Promise(a=>{i.resolve=c=>{a(c),delete i.resolve}})}},q=e=>{let t=Array.isArray(window.fsAttributes)?window.fsAttributes:[];e.push(...t)};var R="1.4.4";var S="cmsselect",X=`fs-${S}`,Q="text-value",z="select",g={element:{key:`${X}-element`,values:{textValue:m(Q),select:z}}},[x,me]=E(g);var I="cmsload",l=`fs-${I}`,J="list",Z="loader",tt="items-count",et="visible-count",ot="scroll-anchor",rt="page-button",st="page-dots",nt="empty",it="mode",at={loadUnder:"load-under",renderAll:"render-all",pagination:"pagination",infinite:"infinite"},ct="threshold",pt="pagesiblings",lt="pageboundary",mt="animation",ut="easing",dt="duration",ft="stagger",Et="resetix",St={true:"true"},bt="showquery",wt={true:"true"},At={element:{key:`${l}-element`,values:{list:m(J),loader:m(Z),itemsCount:m(tt),visibleCount:m(et),scrollAnchor:m(ot),empty:m(nt),pageButton:rt,pageDots:st}},mode:{key:`${l}-${it}`,values:at},threshold:{key:`${l}-${ct}`},pageSiblings:{key:`${l}-${pt}`},pageBoundary:{key:`${l}-${lt}`},animation:{key:`${l}-${mt}`},easing:{key:`${l}-${ut}`},duration:{key:`${l}-${dt}`},stagger:{key:`${l}-${ft}`},resetIx:{key:`${l}-${Et}`,values:St},showQuery:{key:`${l}-${bt}`,values:wt}},[fe,Ee]=E(At);var P=(e,t)=>{var i;let o=N(e,g.element.key),n=$(o),s=new Set,r=new Set;for(let a of n){O(e,a,r);let c=a.closest(`.${L.wrapper}`);if(!c)continue;let p=(i=t.createCMSListInstance)==null?void 0:i.call(t,c);!p||s.add(p)}for(let a of s)a.on("additems",c=>{for(let{element:p}of c){let b=$(o,p);for(let d of b)O(e,d,r)}});return[...s]},$=(e,t=document)=>[...t.querySelectorAll(x("element","textValue",{instanceIndex:e}))],O=(e,{innerText:t},o)=>{if(!t||o.has(t))return;let n=new Option(t,t);e.options.add(n),o.add(t)};var _=async()=>{var s,r,i;let e=await w();if(!e)return[];let t=[...document.querySelectorAll(x("element","select",{operator:"prefixed"}))],o=new Set;for(let a of t){if(!(a instanceof HTMLSelectElement))continue;let c=P(a,e);for(let p of c)o.add(p)}let n=[...o];return await((s=window.fsAttributes[I])==null?void 0:s.loading),(i=(r=window.fsAttributes[S]).resolve)==null||i.call(r,n),n};M();w();var V,K;(V=window.fsAttributes)[K=S]||(V[K]={});var{preventsLoad:xt}=k(),D=window.fsAttributes[S];D.version=R;xt?D.init=_:(window.Webflow||(window.Webflow=[]),window.Webflow.push(_));})();
{
"name": "@finsweet/attributes-cmsselect",
"version": "1.4.3",
"version": "1.4.4",
"description": "Populate Select elements based on a CMS source.",

@@ -38,5 +38,5 @@ "homepage": "https://www.finsweet.com/attributes",

"@finsweet/attributes-cmscore": "1.6.7",
"@finsweet/attributes-cmsload": "1.7.4",
"@finsweet/attributes-cmsload": "1.7.5",
"@global/constants": "1.0.0",
"@global/factory": "1.1.0",
"@global/factory": "1.1.1",
"@global/helpers": "1.0.0",

@@ -43,0 +43,0 @@ "@finsweet/ts-utils": "^0.33.1"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc