materio-d9/web/themes/custom/materiotheme/assets/dist/module-article.bundle.js

7 lines
15 KiB
JavaScript
Raw Normal View History

2021-06-01 22:46:15 +02:00
(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[790],{7682:e=>{var t={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ArticleFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Article"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"uuid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"date"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"start"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"end"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"source"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"body"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"showroom"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"thesaurus"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"linked_materials"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"short_description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reference"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"style_cardmedium_url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"style_hd_url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"samples"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"showroom"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"note"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"alt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"style_articlecardmedium"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}},{kind:"Fie
article(id: ${this.id}, lang: "${drupalDecoupled.lang_code}") {
...ArticleFields
}
}
${m()}
`;l.E.post("",{query:(0,r.S)(e)}).then((({data:{data:{article:e}}})=>{this.parseDataGQL(e)})).catch((e=>{console.warn("Issue with loadArticle",e),Promise.reject(e)}))},parseDataGQL(e){this.article=e,this.items.length?this.getIndex():this.getItems().then((()=>{this.getIndex()})),this.image_accroche=e.images[0],this.lightbox_items=[];for(let t=0;t<e.images.length;t++)e.images[t].thumb=e.images[t].style_articlecardmedium.url,this.lightbox_items.push(e.images[t]);for(let t=0;t<e.videos.length;t++){let i=e.videos[t].url,n=null,a=null;switch(/https:\/\/(www\.)?(?<provider>youtube|vimeo)\.com\/.+/.exec(i).groups.provider){case"vimeo":n=/https:\/\/vimeo\.com\/(?<id>\d+)/.exec(i).groups.id||null,a="http://blogpeda.ac-poitiers.fr/ent-lyc/files/2015/06/Vimeo_icon_block.png";break;case"youtube":n=/https:\/\/(www\.)?youtube\.com\/watch\?v=(?<id>.+)/.exec(i).groups.id||null,a="http://img.youtube.com/vi/"+n+"/0.jpg"}this.lightbox_items.push({url:i,title:"",description:"",thumb:a})}this.lightbox_items,this.$store.commit("Common/setPagetitle",e.title),this.loading=!1},onPrevNext(e){let t=e.view_node.replace(/^\/\D{2,3}\/blabla\//g,"");this.$router.push({name:"article",params:{alias:t,id:e.nid}})},setLightboxIndex(e){this.lightbox_index=e}},components:{Card:u.Z},watch:{$route(e,t){this.getArticle()}}};var h=(0,i(1900).Z)(g,n,[],!1,null,"74fbee19",null);h.options.__file="web/themes/custom/materiotheme/vuejs/components/Pages/Article.vue";const _=h.exports}}]);