xv-webcomponents 1.30.2 → 1.30.4-staging.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.
- package/dist/cjs/{index-Cb30DBqk.js → index-D_dNZoSr.js} +19 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/xv-accordion-v2_50.cjs.entry.js +20 -3
- package/dist/cjs/xv-footer-next.cjs.entry.js +1 -1
- package/dist/cjs/xv-header-next.cjs.entry.js +1 -1
- package/dist/cjs/xv-mega-menu-next.cjs.entry.js +1 -1
- package/dist/cjs/xv-webcomponents.cjs.js +1 -1
- package/dist/collection/components/xv-login-modal/xv-login-modal.js +21 -3
- package/dist/collection/utils/utils.js +18 -0
- package/dist/esm/{index-D0yFoU2h.js → index-BXL1a8Ls.js} +19 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/xv-accordion-v2_50.entry.js +20 -3
- package/dist/esm/xv-footer-next.entry.js +1 -1
- package/dist/esm/xv-header-next.entry.js +1 -1
- package/dist/esm/xv-mega-menu-next.entry.js +1 -1
- package/dist/esm/xv-webcomponents.js +1 -1
- package/dist/types/components/xv-login-modal/xv-login-modal.d.ts +4 -0
- package/dist/types/utils/utils.d.ts +6 -0
- package/dist/xv-webcomponents/index.esm.js +1 -1
- package/dist/xv-webcomponents/{p-fbd8ca68.entry.js → p-7dd40e1d.entry.js} +1 -1
- package/dist/xv-webcomponents/p-82716243.entry.js +8 -0
- package/dist/xv-webcomponents/p-BXL1a8Ls.js +1 -0
- package/dist/xv-webcomponents/{p-3dd10203.entry.js → p-bae921d3.entry.js} +1 -1
- package/dist/xv-webcomponents/{p-468ee97d.entry.js → p-c1382742.entry.js} +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/hydrate/index.js +38 -2
- package/hydrate/index.mjs +38 -2
- package/package.json +1 -1
- package/dist/xv-webcomponents/p-479db559.entry.js +0 -8
- package/dist/xv-webcomponents/p-D0yFoU2h.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t,e,o){return(t||"")+(e?` ${e}`:"")+(o?` ${o}`:"")}const e=t=>{const{error:e,warning:o,helper:r}=t;return"string"==typeof e&&e?{level:"error",text:e}:"string"==typeof o&&o?{level:"warning",text:o}:"string"==typeof r&&r?{level:"helper",text:r}:null};function o(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(t=>(+t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+t/4).toString(16)))}const r=(t,e,o)=>Array.prototype.forEach.call(t,e,o),n=(t,e=500)=>{let o;return function(...r){clearTimeout(o),o=setTimeout((()=>{t.apply(this,r)}),e)}},i=(t,e,o)=>"string"==typeof o?(!t.hasAttribute(e)&&t.setAttribute(e,o),t):(o?!t.hasAttribute(e)&&t.setAttribute(e,""):t.hasAttribute(e)&&t.removeAttribute(e),t),s=()=>{try{const t=localStorage.getItem("metaNav");return t?JSON.parse(t):{}}catch(t){return console.warn("Could not parse metaNav from localStorage:",t),{}}},c=()=>{var t;return window.__xvWhitelabelOverride||(()=>{var t;if("undefined"==typeof document)return;const e="ApplicationContext=";return null===(t=document.cookie.split(";").map((t=>t.trim())).find((t=>t.startsWith(e))))||void 0===t?void 0:t.slice(19)})()||(null===(t=s())||void 0===t?void 0:t.WhitelabelName)||void 0},a=(t="")=>{var e;return`${null!==(e={"sitefinity-qa.crossvertise.com":"https://qa.crossvertise.com","www.crossvertise.com":"https://market.crossvertise.com","sitefinity-staging.crossvertise.com":"https://staging.crossvertise.com",localhost:"https://qa.crossvertise.com"}[window.location.hostname])&&void 0!==e?e:window.location.origin}${t}`},l=async(t,e)=>{const o=e||{},{awaitWl:r,raw:n}=o,i=function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(o[r[n]]=t[r[n]])}return o}(o,["awaitWl","raw"]),s=r?await((t=2e3,e=100)=>{const o=c();return o?Promise.resolve(o):new Promise((o=>{const r=Date.now(),n=()=>{const i=c();return i?o(i):Date.now()-r>=t?o("Xv"):void setTimeout(n,e)};n()}))})():c()||"Xv",l=/^https?:\/\//i.test(t)?t:`${a()}/${t.replace(/^\//,"")}`,u=Object.assign(Object.assign({},n?{}:{"Content-Type":"application/json","Application-Context":s}),null==i?void 0:i.headers);return fetch(l,Object.assign(Object.assign({},i),{headers:u})).then((t=>{var e;if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return(null!==(e=t.headers.get("Content-Type"))&&void 0!==e?e:"").includes("application/json")?t.json():t.text()}))},u={get:(t,e)=>l(t,Object.assign(Object.assign({},e),{method:"GET"})),post:(t,e,o)=>l(t,Object.assign(Object.assign({},o),{method:"POST",body:void 0!==e?JSON.stringify(e):void 0})),put:(t,e,o)=>l(t,Object.assign(Object.assign({},o),{method:"PUT",body:void 0!==e?JSON.stringify(e):void 0})),patch:(t,e,o)=>l(t,Object.assign(Object.assign({},o),{method:"PATCH",body:void 0!==e?JSON.stringify(e):void 0})),delete:(t,e)=>l(t,Object.assign(Object.assign({},e),{method:"DELETE"}))};export{u as a,a as b,e as c,n as d,t as e,r as f,s as g,c as r,i as s,o as u}
|