- Success Stories: full migration from old site (48/48, audited), markets n:n, quotation content block, columns content block, pretty SEO detail URLs via SuccessStoryPathRewrite middleware, list/detail split (list page 4 / story page), detailUrl/backUrl - New plugins: VITEC Locations (grid/list/map + RTE map text), VITEC Customer Logos (color/bw logic, only-show-selected), VITEC Card (one plugin for product/story/market/solution with reloading FlexForm + custom backend preview renderer) - Eventlist: layout dropdown (list/grid/teaserbar) in settings - Hero section CB: Images/Video tabs, background video + overlay - Product JSON: full category rootline (parents), fixed missing ConnectionPool import (all-products crash), category tree map - Backend preview CSS: container-query responsive (narrow columns) - Docs: ISO architecture spec, root + extension READMEs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 line
5.7 KiB
JavaScript
1 line
5.7 KiB
JavaScript
import{A as e,J as t,O as n,d as r,f as i,k as a,ot as o,q as s,r as c,ut as l,x as u}from"./index-CM0zIqrs.js";var d=l(),f=o(),p=s(`prod`,{BASE_URL:`/_frontend/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}),m=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),h=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``);function g(e){if(e?.length)return e.map(e=>`${e.url} ${e.descriptor}`).join(`, `)}function _({value:e,onChange:t}){return(0,f.jsxs)(n,{sx:{display:`flex`,alignItems:`center`,gap:`0.625rem`,px:`0.875rem`,py:`0.5rem`,borderRadius:`0.5rem`,border:`1.5px solid`,borderColor:e?`rgba(var(--vitec-brand), 1)`:`divider`,bgcolor:`#fff`,maxWidth:`24rem`,transition:`border-color 0.15s`,"&:focus-within":{borderColor:`rgba(var(--vitec-brand), 1)`}},children:[(0,f.jsx)(n,{sx:{color:`text.disabled`,flexShrink:0,display:`flex`},children:(0,f.jsxs)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,f.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,f.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})}),(0,f.jsx)(n,{component:`input`,value:e,onChange:e=>t(e.target.value),placeholder:`Search success stories…`,sx:{flex:1,border:`none`,outline:`none`,background:`transparent`,fontSize:`0.875rem`,color:`text.primary`,"&::placeholder":{color:`text.disabled`}}}),e&&(0,f.jsx)(n,{component:`button`,onClick:()=>t(``),sx:{display:`flex`,p:0,border:`none`,background:`none`,cursor:`pointer`,color:`text.disabled`,"&:hover":{color:`text.primary`}},children:(0,f.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,f.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,f.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]})}function v({element:o,className:s,nested:l,devInfoTags:v,uid:y,spaceBefore:b,spaceAfter:x}){let S=r(o),C=Number(i(o)??0),w=u(C===0?2:C),T=Array.isArray(o.content?.usecases)?o.content.usecases:[],[E,D]=(0,d.useState)(``),O=(0,d.useMemo)(()=>{let e=new Map;for(let t of T)for(let n of t.markets??[])n.uid!=null&&n.title&&e.set(n.uid,n.title);return Array.from(e.entries()).map(([e,t])=>({uid:e,title:t})).sort((e,t)=>e.title.localeCompare(t.title))},[T]),[k,A]=(0,d.useState)(()=>{let e=new Set(new URLSearchParams(window.location.search).keys());if(e.size===0)return new Set;let t=new Map;for(let e of T)for(let n of e.markets??[])n.uid!=null&&n.title&&t.set(h(n.title),n.uid);let n=new Set;for(let r of e)t.has(r)&&n.add(t.get(r));return n});(0,d.useEffect)(()=>{let e=[...k].map(e=>O.find(t=>t.uid===e)?.title).filter(e=>!!e).map(h),t=window.location.pathname+(e.length?`?`+e.join(`&`):``);history.replaceState(null,``,t)},[k,O]);let j=(0,d.useMemo)(()=>{let e=E.toLowerCase().trim();return T.filter(t=>{let n=!e||t.title?.toLowerCase().includes(e)||t.subtitle?.toLowerCase().includes(e)||t.teaser?.toLowerCase().includes(e),r=k.size===0||(t.markets??[]).some(e=>e.uid!=null&&k.has(e.uid));return n&&r})},[T,E,k]),M=e=>{A(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,f.jsx)(c,{className:s,devInfoTags:v,nested:l,uid:y,spaceBefore:b,spaceAfter:x,children:(0,f.jsxs)(`div`,{className:`vitec_usecaselist__inner`,children:[S&&(0,f.jsx)(e,{variant:w,className:`vitec_usecaselist__heading`,children:S}),(0,f.jsxs)(`div`,{className:`vitec_usecaselist__toolbar`,children:[(0,f.jsx)(_,{value:E,onChange:D}),(0,f.jsx)(e,{variant:`body2`,color:`text.secondary`,sx:{whiteSpace:`nowrap`,ml:`auto`},children:j.length===T.length?`${T.length} success stor${T.length===1?`y`:`ies`}`:`${j.length} of ${T.length}`})]}),O.length>0&&(0,f.jsxs)(`div`,{className:`vitec_usecaselist__filters`,children:[O.map(e=>(0,f.jsx)(a,{label:e.title,size:`small`,clickable:!0,onClick:()=>M(e.uid),variant:k.has(e.uid)?`filled`:`outlined`,sx:{fontSize:`0.75rem`,...k.has(e.uid)&&{bgcolor:`rgba(var(--vitec-brand), 1)`,color:`#fff`,"&:hover":{bgcolor:`rgba(var(--vitec-navy-deep), 1)`}}}},e.uid)),k.size>0&&(0,f.jsx)(a,{label:`Clear`,size:`small`,clickable:!0,onClick:()=>A(new Set),sx:{fontSize:`0.75rem`,color:`text.secondary`}})]}),j.length>0?(0,f.jsx)(`div`,{className:`vitec_usecaselist__grid`,children:j.map(e=>(0,f.jsxs)(`a`,{href:t(`/success-stories/${e.slug}`,p.base_url,p.router_mode),className:`vitec_usecasecard`,children:[(0,f.jsxs)(`div`,{className:`vitec_usecasecard__media`,children:[e.cardImage?.url?(0,f.jsx)(`img`,{className:`vitec_usecasecard__image`,src:e.cardImage.url,srcSet:g(e.cardImage.srcset),sizes:`(max-width: 599px) 100vw, (max-width: 899px) 50vw, 33vw`,alt:e.cardImage.alternative||e.title||``,loading:`lazy`}):(0,f.jsx)(`div`,{className:`vitec_usecasecard__image-fallback`}),e.customerLogo?.url&&(0,f.jsx)(`div`,{className:`vitec_usecasecard__logo-badge`,children:(0,f.jsx)(`img`,{className:`vitec_usecasecard__logo`,src:e.customerLogo.url,srcSet:g(e.customerLogo.srcset),sizes:`160px`,alt:e.customerLogo.alternative||e.title||``,loading:`lazy`})})]}),(0,f.jsxs)(`div`,{className:`vitec_usecasecard__body`,children:[e.markets&&e.markets.length>0&&(0,f.jsx)(`div`,{className:`vitec_usecasecard__markets`,children:e.markets.map(e=>(0,f.jsx)(`span`,{className:`vitec_usecasecard__market-chip`,children:e.title},e.uid))}),e.title&&(0,f.jsx)(`p`,{className:`vitec_usecasecard__title`,children:e.title}),e.subtitle&&(0,f.jsx)(`p`,{className:`vitec_usecasecard__subtitle`,children:m(e.subtitle)}),(0,f.jsx)(`span`,{className:`vitec_usecasecard__cta`,children:`Read case study`})]})]},e.uid))}):(0,f.jsx)(n,{sx:{py:`3rem`,textAlign:`center`},children:(0,f.jsx)(e,{color:`text.secondary`,children:`No success stories match your search.`})})]})})}export{v as VitecUsecaseList}; |