@europeana/portal
Version:
Europeana Portal
2 lines • 5.82 kB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[103],{659:function(e,t,n){var content=n(668);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(106).default)("2c019ec8",content,!0,{sourceMap:!1})},667:function(e,t,n){"use strict";n(659)},668:function(e,t,n){var r=n(105)(!1);r.push([e.i,"[data-v-57cf4cac] .attribution::after{padding-top:.2rem}",""]),e.exports=r},671:function(e,t,n){"use strict";n.r(t);var r=n(6),o=n(16);n(21),n(42),n(22),n(43);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(t){Object(r.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):l(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var m={components:{CompareImageSlider:()=>n.e(87).then(n.bind(null,1102)),ContentCardSection:()=>Promise.all([n.e(0),n.e(93)]).then(n.bind(null,830)),LatestSection:()=>Promise.all([n.e(0),n.e(94)]).then(n.bind(null,1103)),HTMLEmbed:()=>n.e(113).then(n.bind(null,692)),ImageWithAttribution:()=>n.e(15).then(n.bind(null,1104)),CallToAction:()=>n.e(120).then(n.bind(null,833)),RichText:()=>Promise.all([n.e(0),n.e(104)]).then(n.bind(null,835)),AutomatedCardGroup:()=>Promise.all([n.e(0),n.e(91)]).then(n.bind(null,1052)),PrimaryCallToAction:()=>Promise.all([n.e(0),n.e(92)]).then(n.bind(null,1105))},props:{richTextIsCard:{type:Boolean,default:!0},sections:{type:Array,default:()=>[]}},data(){return{content:this.sections}},fetch(){var e=this;return Object(o.a)((function*(){e.content=yield e.sectionsWithLatestCardGroups(e.sections)}))()},methods:{sectionsWithLatestCardGroups(e){var t=this;return Object(o.a)((function*(){var content=[].concat(e),n=content.filter((e=>e&&"LatestCardGroup"===e.__typename)).map((e=>e.genre));if(0===n.length)return content;var r,o={locale:t.$i18n.isoLocale(),preview:"preview"===t.$route.query.mode,exhibitions:n.includes("Exhibitions"),blogPosts:n.includes("Blog posts"),galleries:n.includes("Galleries"),limit:4};try{r=(yield t.$contentful.query("latestCardGroups",o)).data}catch(e){return content}for(var i=0;i<content.length;i++)if(content[i]&&"LatestCardGroup"===content[i].__typename){var l={};switch(content[i].genre){case"Exhibitions":l=r.data.exhibitionPageCollection;break;case"Blog posts":l=r.data.blogPostingCollection;break;case"Galleries":l=r.data.imageGalleryCollection}content[i]=c(c({},content[i]),l)}return content}))()},contentType:(section,e)=>section&§ion.__typename===e,attributionFields:e=>({name:null==e?void 0:e.name,creator:null==e?void 0:e.creator,provider:null==e?void 0:e.provider,rightsStatement:null==e?void 0:e.license,url:null==e?void 0:e.url}),imageCompareImage(section,e){var t,n,r;return null===(t=section.hasPartCollection)||void 0===t||null===(n=t.items)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.image}}},d=(n(667),n(40)),component=Object(d.a)(m,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"figure-attribution"},e._l(e.content,(function(section,t){return n("div",{key:t},[e.contentType(section,"ContentTypeRichText")?n("RichText",{attrs:{text:section.text,"rich-text-is-card":e.richTextIsCard}}):e.contentType(section,"CardGroup")?n("ContentCardSection",{attrs:{section:section}}):e.contentType(section,"LatestCardGroup")&§ion.total?n("LatestSection",{attrs:{category:section.genre,total:section.total,cards:section.items}}):e.contentType(section,"AutomatedCardGroup")?n("AutomatedCardGroup",{attrs:{"section-type":section.genre,"more-button":section.moreButton}}):e.contentType(section,"Embed")?n("HTMLEmbed",{attrs:{html:section.embed}}):e.contentType(section,"ImageComparison")?n("CompareImageSlider",{attrs:{"left-image-src":e.imageCompareImage(section,0)?e.imageCompareImage(section,0).url:null,"left-image-content-type":e.imageCompareImage(section,0)?e.imageCompareImage(section,0).contentType:null,"left-image-attribution":e.attributionFields(section.hasPartCollection.items[0]),"left-image-width":e.imageCompareImage(section,0)?e.imageCompareImage(section,0).width:null,"left-image-height":e.imageCompareImage(section,0)?e.imageCompareImage(section,0).height:null,"right-image-src":e.imageCompareImage(section,1)?e.imageCompareImage(section,1).url:null,"right-image-content-type":e.imageCompareImage(section,1)?e.imageCompareImage(section,1).contentType:null,"right-image-attribution":e.attributionFields(section.hasPartCollection.items[1]),"right-image-width":e.imageCompareImage(section,1)?e.imageCompareImage(section,1).width:null,"right-image-height":e.imageCompareImage(section,1)?e.imageCompareImage(section,1).height:null}}):e.contentType(section,"ImageWithAttribution")?n("ImageWithAttribution",{attrs:{src:section.image?section.image.url:null,"content-type":section.image?section.image.contentType:null,width:section.image?section.image.width:null,height:section.image?section.image.height:null,alt:section.image&§ion.image.description?section.image.description:"",attribution:e.attributionFields(section),"rights-statement":section.license}}):e.contentType(section,"Link")?n("CallToAction",{attrs:{text:section.text,url:section.url}}):e.contentType(section,"PrimaryCallToAction")?n("PrimaryCallToAction",{attrs:{text:section.text,link:section.relatedLink}}):e._e()],1)})),0)}),[],!1,null,"57cf4cac",null);t.default=component.exports}}]);
//# sourceMappingURL=59f6fc5.modern.js.map