1 |
- (self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[694],{6024:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("article",{staticClass:"card search-card"},[s("header",{on:{click:function(t){return t.preventDefault(),e.openModalCard(t)}}},[e.isloggedin?s("h1",[e._v(e._s(e.item.title))]):e._e(),e._v(" "),s("h4",[e._v(e._s(e.item.short_description))]),e._v(" "),e.isloggedin?s("span",{staticClass:"ref"},[e._v(e._s(e.item.reference))]):e._e()]),e._v(" "),e.isloggedin?s("nav",{staticClass:"tools"},[s("section",{staticClass:"tool flags"},[s("span",{staticClass:"btn mdi mdi-folder-outline"}),e._v(" "),s("div",{staticClass:"tool-content"},[s("ul",[e._l(e.flagcolls,(function(t){return e.flagcolls?s("li",{key:t.id},[s("span",{staticClass:"flag mdi",class:[e.flagIsLoading(t.id)?"mdi-loading mdi-spin":e.flagIsActive(t.id)?"mdi-close-circle isActive":"mdi-plus"],attrs:{collid:t.id},on:{click:function(t){return t.preventDefault(),e.onFlagActionCard(t)}}},[e._v("\n "+e._s(t.name)+"\n ")])]):e._e()})),e._v(" "),e.collsLength<15?s("li",{staticClass:"create-flag"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.new_folder_name,expression:"new_folder_name"}],attrs:{placeholder:"new folder"},domProps:{value:e.new_folder_name},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),t.stopPropagation(),e.onCreateFlagColl(t))},input:function(t){t.target.composing||(e.new_folder_name=t.target.value)}}}),e._v(" "),s("span",{staticClass:"add-btn mdi",class:e.addFlagBtnClassObj,on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onCreateFlagColl(t)}}})]):e._e()],2)])]),e._v(" "),e.item.samples&&e.item.samples.length?s("section",{staticClass:"tool samples"},[s("span",{staticClass:"btn mdi mdi-beaker-outline"}),e._v(" "),s("div",{staticClass:"tool-content"},[s("span",{staticClass:"label"},[e._v(e._s(e.$t("materio.Samples")))]),e._v(" "),s("ul",e._l(e.item.samples,(function(t){return s("li",{key:t.showroom.id},[s("span",{staticClass:"showroom"},[e._v(e._s(t.showroom.name))]),e._v(": "+e._s(t.location)+"\n ")])})),0)])]):e._e(),e._v(" "),e.item.note?s("section",{staticClass:"tool note"},[s("span",{staticClass:"btn mdi mdi-note"})]):e._e(),e._v(" "),s("section",{staticClass:"tool print"},[s("a",{attrs:{href:e.item.path+"/printable/print",target:"_blank"}},[s("span",{staticClass:"btn mdi mdi-printer"})])])]):e._e(),e._v(" "),s("section",{directives:[{name:"switcher",rawName:"v-switcher"}],staticClass:"images"},e._l(e.item.images,(function(t,a){return s("figure",{key:t.url},[s("img",{directives:[{name:"lazy",rawName:"v-lazy",value:a,expression:"index"}],staticClass:"lazy",attrs:{"data-src":t.style_cardmedium_url,title:t.title}}),e._v(" "),s("img",{staticClass:"blank",attrs:{src:e.blanksrc},on:{click:function(t){return t.preventDefault(),e.openModalCard(t)}}})])})),0)])};a._withStripped=!0;var i=s(629),l=s(8357),n=s(3939);const r={name:"Card",props:["item"],mixins:[l.Z],components:{ModalCard:n.Z},data:()=>({blanksrc:`${drupalSettings.path.themePath}/assets/img/blank.gif`,loadingFlag:!1,new_folder_name:"",is_creating_folder:!1}),computed:{...(0,i.rn)({flagcolls:e=>e.User.flagcolls,isloggedin:e=>e.User.isloggedin}),collsLength(){return Object.keys(this.flagcolls).length},addFlagBtnClassObj(){return{"mdi-plus-circle-outline":!this.is_creating_folder,"mdi-loading":this.is_creating_folder,active:this.new_folder_name.length>4&&!this.is_creating_folder,loading:this.is_creating_folder}}},methods:{...(0,i.nv)({createFlagColl:"User/createFlagColl",flagUnflag:"User/flagUnflag"}),onCreateFlagColl(){this.new_folder_name,this.is_creating_folder=!0,this.createFlagColl(this.new_folder_name).then((e=>{this.new_folder_name="",this.is_creating_folder=!1;let t=e.id;this.loadingFlag=t,this.flagUnflag({action:"flag",id:this.item.id,collid:t}).then((e=>{this.loadingFlag=!1}))}))},flagIsActive(e){return-1!==this.flagcolls[e].items.indexOf(this.item.id)},flagIsLoading(e){return e===this.loadingFlag},onFlagActionCard(e){if(this.item,!this.loadingFlag){let t=e.target.getAttribute("collid"),s=this.flagIsActive(t)?"unflag":"flag";this.loadingFlag=t,this.flagUnflag({action:s,id:this.item.id,collid:t}).then((e=>{this.loadingFlag=!1}))}},openModalCard(e){this.isLoggedin,this.isloggedin&&this.$modal.show(n.Z,{item:this.item,addNoteId:e=>{this.item.note={id:e}}},{name:`modal-${this.item.id}`,draggable:!1,classes:"vm--modale-card",width:"95%",height:"95%"})}}};var o=(0,s(1900).Z)(r,a,[],!1,null,"0318fc68",null);o.options.__file="web/themes/custom/materiotheme/vuejs/components/Content/Card.vue";const c=o.exports},2074:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{attrs:{id:"Base"}},[e.searchinfos?s("div",{staticClass:"cards-list"},[s("aside",{staticClass:"search-info"},[e._v("\n "+e._s(e.searchinfos)+"\n ")]),e._v(" "),!e.items.length&!e.noresults?s("div",{staticClass:"loading"},[s("span",[e._v("Loading ...")])]):s("ul",e._l(e.items,(function(t){return s("li",{key:t.id},["materiau"==t.bundle?s("Card",{attrs:{item:t}}):e._e(),e._v(" "),"thematique"==t.bundle?s("CardThematique",{attrs:{item:t}}):e._e()],1)})),0),e._v(" "),e.count>e.limit?s("infinite-loading",{on:{infinite:e.nextPage}},[s("div",{attrs:{slot:"no-more"},slot:"no-more"},[e._v("No more results")])]):e._e()],1):s("div",{staticClass:"loading"},[s("span",[e._v("Loading ...")])])])};a._withStripped=!0;var i=s(6024),l=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("article",{staticClass:"card card-thematique search-card"},[s("header",[s("a",{attrs:{href:e.item.path},on:{click:function(t){return t.preventDefault(),e.openThematique(t)}}},[s("h1",[e._v(e._s(e.item.title))]),e._v(" "),s("h4",[e._v(e._s(e.item.short_description))])])]),e._v(" "),s("section",{directives:[{name:"switcher",rawName:"v-switcher"}],staticClass:"images"},e._l(e.item.images,(function(t,a){return s("figure",{key:t.url},[s("img",{directives:[{name:"lazy",rawName:"v-lazy",value:a,expression:"index"}],staticClass:"lazy",attrs:{"data-src":t.style_cardmedium_url,title:t.title}}),e._v(" "),s("img",{staticClass:"blank",attrs:{src:e.blanksrc},on:{click:function(t){return t.preventDefault(),e.openThematique(t)}}})])})),0)])};l._withStripped=!0;const n={name:"Card",props:["item"],mixins:[s(8357).Z],data(){return{blanksrc:`${drupalSettings.path.themePath}/assets/img/blank.gif`,lightbox_index:null,alias:this.item.path.replace(/^.*\/thematique\//g,"")}},methods:{openThematique(e){this.alias,this.$router.push({name:"thematique",params:{alias:this.alias,id:this.item.id}})}}};var r=s(1900),o=(0,r.Z)(n,l,[],!1,null,"6a3bc2e2",null);o.options.__file="web/themes/custom/materiotheme/vuejs/components/Content/CardThematique.vue";const c=o.exports;var m=s(629);const d={name:"Base",data:()=>({pagetitle:"Base"}),computed:{...(0,m.rn)({items:e=>e.Search.items,searchinfos:e=>e.Search.infos,count:e=>e.Search.count,noresults:e=>e.Search.noresults,limit:e=>e.Search.limit})},methods:{...(0,m.nv)({newSearch:"Search/newSearch",nextPage:"Search/nextPage"})},created(){window.location;let e=new URLSearchParams(window.location.search);e.has("keys")?(this.$store.commit("Search/setKeys",e.get("keys")),this.pagetitle=e.get("keys")):(this.$store.commit("Search/setKeys",""),this.pagetitle="Base"),e.has("term")?this.$store.commit("Search/setTerm",e.get("term")):this.$store.commit("Search/setTerm",""),e.has("filters")?this.$store.commit("Search/setFilters",e.get("filters").split(",")):this.$store.commit("Search/setFilters",[]),this.newSearch()},beforeRouteUpdate(e,t,s){this.$store.commit("Search/setKeys",e.query.keys),this.$store.commit("Search/setTerm",e.query.term),this.$store.commit("Search/setFilters",e.query.filters),this.pagetitle=e.query.keys,this.newSearch(),s()},components:{Card:i.Z,CardThematique:c}};var h=(0,r.Z)(d,a,[],!1,null,"04a51984",null);h.options.__file="web/themes/custom/materiotheme/vuejs/components/Pages/Base.vue";const g=h.exports}}]);
|