UNPKG

@europeana/portal

Version:
2 lines 4.22 kB
(window.webpackJsonp=window.webpackJsonp||[]).push([[113,3,11],{658:function(t,e,r){"use strict";r.r(e);var o={components:{BAlert:r(670).a},props:{error:{type:String,default:""}}},n=r(40),component=Object(n.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("b-alert",{staticClass:"mt-3",attrs:{show:"",variant:"dark","data-qa":"error notice"}},[r("strong",[t._v(t._s(t.$t("error"))+":")]),t._v(" "+t._s(t.error)+"\n")])}),[],!1,null,null,null);e.default=component.exports},670:function(t,e,r){"use strict";r.d(e,"a",(function(){return L}));var o=r(6),n=r(8),l=r(11),c=r(2),h=r(9),d=r(1),m=r(15),w=r(3),v=r(7),f=r(64),O=r(26),j=r(4),y=r(0),D=r(29),S=r(87),P=r(118);function _(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function $(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?_(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):_(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var{mixin:T,props:C,prop:x,event:k}=Object(f.a)("show",{type:d.h,defaultValue:!1}),W=t=>""===t||Object(v.b)(t)?0:(t=Object(O.b)(t,0))>0?t:0,E=t=>""===t||!0===t||!(Object(O.b)(t,0)<1)&&!!t,A=Object(y.d)(Object(j.m)($($({},C),{},{dismissLabel:Object(y.c)(d.q,"Close"),dismissible:Object(y.c)(d.g,!1),fade:Object(y.c)(d.g,!1),variant:Object(y.c)(d.q,"info")})),c.a),L=n.default.extend({name:c.a,mixins:[T,D.a],props:A,data(){return{countDown:0,localShow:E(this[x])}},watch:{[x](t){this.countDown=W(t),this.localShow=E(t)},countDown(t){this.clearCountDownInterval();var e=this[x];Object(v.h)(e)&&(this.$emit(h.m,t),e!==t&&this.$emit(k,t),t>0?(this.localShow=!0,this.$_countDownTimeout=setTimeout((()=>{this.countDown--}),1e3)):this.$nextTick((()=>{Object(w.B)((()=>{this.localShow=!1}))})))},localShow(t){var e=this[x];t||!this.dismissible&&!Object(v.h)(e)||this.$emit(h.l),Object(v.h)(e)||e===t||this.$emit(k,t)}},created(){this.$_filterTimer=null;var t=this[x];this.countDown=W(t),this.localShow=E(t)},beforeDestroy(){this.clearCountDownInterval()},methods:{dismiss(){this.clearCountDownInterval(),this.countDown=0,this.localShow=!1},clearCountDownInterval(){clearTimeout(this.$_countDownTimeout),this.$_countDownTimeout=null}},render(t){var e=t();if(this.localShow){var{dismissible:r,variant:o}=this,n=t();r&&(n=t(S.a,{attrs:{"aria-label":this.dismissLabel},on:{click:this.dismiss}},[this.normalizeSlot(m.h)])),e=t("div",{staticClass:"alert",class:{"alert-dismissible":r,["alert-".concat(o)]:o},attrs:{role:"alert","aria-live":"polite","aria-atomic":!0},key:this[l.a]},[n,this.normalizeSlot()])}return t(P.a,{props:{noFade:!this.fade}},[e])}})},692:function(t,e,r){"use strict";r.r(e);var o={name:"HTMLEmbed",components:{AlertMessage:r(658).default},props:{html:{type:String,default:""},provider:{type:String,default:""},height:{type:[Number,String],default:null},width:{type:[Number,String],default:null},error:{type:[String,Error],default:""}},computed:{responsiveProvider(){return["YouTube","Vimeo"].includes(this.provider)},heightAsPercentOfWidth(){return 100*this.height/this.width},maxWidthWrapper(){var t=window.innerWidth<=768?22.5:35.5;return this.width*t/this.height}}},n=r(40),component=Object(n.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.html&&t.responsiveProvider?r("div",{staticClass:"responsive-embed-wrapper",style:"max-width:"+t.maxWidthWrapper+"rem",attrs:{"data-qa":"responsive embed wrapper"}},[r("div",{staticClass:"mb-5 html-embed",style:"padding-bottom:"+t.heightAsPercentOfWidth+"%",attrs:{"data-qa":"html embed"},domProps:{innerHTML:t._s(t.html)}})]):t.html&&!t.responsiveProvider?r("div",{staticClass:"mb-5 html-embed",attrs:{"data-qa":"html embed"},domProps:{innerHTML:t._s(t.html)}}):t.error?r("AlertMessage",{attrs:{error:t.error}}):t._e()}),[],!1,null,null,null);e.default=component.exports}}]); //# sourceMappingURL=41ccf18.modern.js.map