Files
VITEC-website/public/_frontend/assets/vitec_eventlist-Do7dy7ug.js
o-rasche bb7c03235d Checkpoint: headless JSON architecture documented + cleanup (Stufe 1+2)
Restore point before Stufe 3 (central resolver-service refactoring).

Includes this session's work:
- Success Story (usecase) rebuild: new fields/tabs, UsecaseSerializer,
  thin List/Show renderers, MM relations, inline content elements.
- vitec_columns content block (two-column layout with per-item content)
  incl. unified header section; special-cased JSON resolution.
- Container per-column flex (items[].config align/justify) + gap on parent.
- Unified header section across CEs/plugins/containers; header fields in JSON.
- ISO-style architecture spec: Documentation/Headless-JSON-Architecture.md.
- Cleanup: removed local scratch + verified .bak backups.
- Fixes: B-6 (undefined thumbnail variable in Downloadcardcollection image
  resolver), B-7 (unsatisfiable legacy CType OR branch in Downloadcard/Datasheets).

Rollback: git reset --hard snapshot-2026-07-09-pre-stufe3

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 10:01:56 +02:00

1 line
4.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{C as e,E as t,O as n,Z as r,_ as i,c as a,d as o,k as s,n as c,u as l}from"./index-7LYai_r-.js";var u=r();function d(e){return e?Array.isArray(e)?e[0]??null:e:null}function f(e){return e.url??e.publicUrl}function p(e,t){return e.alternative??e.alt??e.title??t}function m(e){if(e.srcset?.length)return e.srcset.map(e=>`${e.url} ${e.descriptor}`).join(`, `)}function h(e){let t=new Date(e);return{day:t.toLocaleString(`en-US`,{day:`numeric`}),month:t.toLocaleString(`en-US`,{month:`short`}).toUpperCase()}}function g(e,t){if(!e)return null;let n=new Date(e),r=n.toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`});if(!t||e===t)return r;let i=new Date(t);return n.getMonth()===i.getMonth()&&n.getFullYear()===i.getFullYear()?`${n.toLocaleString(`en-US`,{month:`short`,day:`numeric`})} ${i.toLocaleString(`en-US`,{day:`numeric`,year:`numeric`})}`:`${r} ${i.toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}`}function _(e){return e?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim()):!1}function v({element:r,className:v,nested:y,devInfoTags:b,uid:x,spaceBefore:S,spaceAfter:C}){let w=a(r),T=o(r),E=i(l(r)),D=r.content?.eventlist?.events??[];return(0,u.jsx)(c,{className:[`vitec_eventlist`,v].filter(Boolean).join(` `),devInfoTags:b,nested:y,uid:x,spaceBefore:S,spaceAfter:C,children:(0,u.jsxs)(`div`,{className:`vitec_eventlist__inner`,children:[(w||T)&&(0,u.jsxs)(e,{spacing:.5,sx:{mb:2.5,textAlign:E,alignItems:E===`center`?`center`:E===`right`?`flex-end`:`flex-start`},children:[w&&(0,u.jsx)(s,{variant:`h4`,children:w}),T&&(0,u.jsx)(s,{variant:`subtitle1`,color:`text.secondary`,children:T})]}),D.length===0?(0,u.jsx)(s,{variant:`body2`,color:`text.secondary`,children:`No upcoming events.`}):(0,u.jsx)(`div`,{className:`vitec_eventlist__items`,children:D.map(r=>{let i=r.eventstart?h(r.eventstart):null,a=r.eventend&&r.eventstart!==r.eventend,o=g(r.eventstart,r.eventend),c=[r.venue,r.city,r.country].filter(Boolean).join(`, `),l=d(r.image),v=l?f(l):void 0,y=_(r.meetinglink)?`mailto:${r.meetinglink.trim()}`:r.meetinglink?r.meetinglink:void 0;return(0,u.jsxs)(`div`,{className:`vitec_eventlist__item`,children:[i&&(0,u.jsxs)(`div`,{className:`vitec_eventlist__date-badge`,"aria-label":o??void 0,children:[(0,u.jsx)(`span`,{className:`vitec_eventlist__date-day`,children:i.day}),(0,u.jsx)(`span`,{className:`vitec_eventlist__date-month`,children:i.month}),a&&(0,u.jsx)(`span`,{className:`vitec_eventlist__date-multiday`,children:`multi-day`})]}),(0,u.jsxs)(`div`,{className:`vitec_eventlist__content`,children:[(0,u.jsx)(s,{variant:`h6`,className:`vitec_eventlist__title`,children:r.title}),r.teaser&&(0,u.jsx)(s,{variant:`body2`,className:`vitec_eventlist__teaser`,children:r.teaser}),(o||c)&&(0,u.jsxs)(`div`,{className:`vitec_eventlist__meta`,children:[o&&(0,u.jsx)(`span`,{className:`vitec_eventlist__meta-date`,children:o}),o&&c&&(0,u.jsx)(`span`,{className:`vitec_eventlist__meta-sep`,"aria-hidden":!0,children:`·`}),c&&(0,u.jsx)(`span`,{className:`vitec_eventlist__meta-location`,children:c})]}),(0,u.jsxs)(e,{direction:`row`,spacing:1,flexWrap:`wrap`,useFlexGap:!0,alignItems:`center`,sx:{mt:1},children:[r.booth&&(0,u.jsx)(n,{label:r.booth,size:`small`,variant:`outlined`,className:`vitec_eventlist__chip vitec_eventlist__chip--booth`}),r.attendancemode===`online`&&(0,u.jsx)(n,{label:`Online`,size:`small`,variant:`outlined`,className:`vitec_eventlist__chip vitec_eventlist__chip--online`}),y&&(0,u.jsx)(t,{component:`a`,href:y,size:`small`,variant:`outlined`,className:`vitec_eventlist__btn vitec_eventlist__btn--contact`,children:`Contact`}),r.eventurl&&(0,u.jsx)(t,{component:`a`,href:r.eventurl,target:`_blank`,rel:`noreferrer`,size:`small`,variant:`contained`,className:`vitec_eventlist__btn vitec_eventlist__btn--more`,children:`Learn more`})]})]}),(0,u.jsx)(`div`,{className:`vitec_eventlist__logo-box${v?``:` vitec_eventlist__logo-box--empty`}`,children:v&&(0,u.jsx)(`img`,{src:v,srcSet:l?m(l):void 0,sizes:`128px`,alt:l?p(l,r.title):r.title,className:`vitec_eventlist__logo-img`,loading:`lazy`})})]},r.uid)})})]})})}export{v as VitecEventList};