UNPKG

chatchamp-empty-state

Version:
2 lines 4.57 kB
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["chatchamp-empty-state"]=e():t["chatchamp-empty-state"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({5230:function(t,e,n){t.exports=n.p+"img/haunted-house.fb9a4845.svg"},8875:function(t,e,n){var r,o,i;(function(n,c){o=[],r=c,i="function"===typeof r?r.apply(e,o):r,void 0===i||(t.exports=i)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(d){var n,r,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,c=/@([^@]*):(\d+):(\d+)\s*$/gi,u=i.exec(d.stack)||c.exec(d.stack),a=u&&u[1]||!1,s=u&&u[2]||!1,f=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");a===f&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(s-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var p=0;p<l.length;p++){if("interactive"===l[p].readyState)return l[p];if(l[p].src===a)return l[p];if(a===f&&l[p].innerHTML&&l[p].innerHTML.trim()===o)return l[p]}return null}}return t}))},b20f:function(t,e,n){},fb15:function(t,e,n){"use strict";if(n.r(e),"undefined"!==typeof window){var r=window.document.currentScript,o=n("8875");r=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var c=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.isEmpty(t.data)?r("div",{staticClass:"empty_state"},[r("div",{staticClass:"image-wrapper"},[t.image?r("img",{staticClass:"image-outline",attrs:{src:t.image}}):r("img",{staticClass:"image-outline",attrs:{src:n("5230")}})]),r("p",{staticClass:"text title-outline"},[t._v(t._s(t.title))]),r("p",{staticClass:"text subtitle-outline"},[t._v(t._s(t.subTitle))]),t.hasButton?r("button",{on:{click:function(e){return t.$emit("click")}}},[t._v("Call to action!")]):t._e()]):t._e()},u=[],a=(n("b20f"),{name:"EmptyState",props:{data:{type:[Array,String,Object,Boolean,Number],default:!1,required:!1},image:{type:String,required:!1},title:{type:String,default:"Nothing to show here",required:!1},subTitle:{type:String,default:"We couldn't find anything to show and thats all we know",required:!1}},computed:{hasButton(){return"function"===typeof this.$listeners.click}},methods:{isEmpty(t){return!(!Array.isArray(t)||0!==t.length)||("object"===typeof t&&!Object.keys(t).length||("string"===typeof t&&0===t.length||!t))}}}),s=a;function f(t,e,n,r,o,i,c,u){var a,s="function"===typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),i&&(s._scopeId="data-v-"+i),c?(a=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},s._ssrRegister=a):o&&(a=u?function(){o.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:o),a)if(s.functional){s._injectStyles=a;var f=s.render;s.render=function(t,e){return a.call(e),f(t,e)}}else{var l=s.beforeCreate;s.beforeCreate=l?[].concat(l,a):[a]}return{exports:t,options:s}}var l=f(s,c,u,!1,null,null,null),p=l.exports,d=p;e["default"]=d}})})); //# sourceMappingURL=chatchamp-empty-state.umd.min.js.map