amcis_vue
Version:
## Project setup ``` npm install ```
2 lines • 8.9 kB
JavaScript
(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}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="6b2d")})({2350:function(t,e){function n(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"===typeof btoa){var i=r(o),s=o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"});return[n].concat(s).concat([i]).join("\n")}return[n].join("\n")}function r(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,"+e;return"/*# "+n+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,n){"string"===typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"===typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var s=t[o];"number"===typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},"2f91":function(t,e,n){"use strict";n.r(e);var r=n("b2c8"),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,function(){return r[t]})}(i);e["default"]=o.a},"35d6":function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],s=i[0],a=i[1],u=i[2],c=i[3],l={id:t+":"+o,css:a,media:u,sourceMap:c};r[s]?r[s].parts.push(l):n.push(r[s]={id:s,parts:[l]})}return n}function o(t,e,n){var o=r(t,e);i(o,n)}function i(t,e){const n=e._injectedStyles||(e._injectedStyles={});for(var r=0;r<t.length;r++){var o=t[r],i=n[o.id];if(!i){for(var s=0;s<o.parts.length;s++)a(o.parts[s],e);n[o.id]=!0}}}function s(t){var e=document.createElement("style");return e.type="text/css",t.appendChild(e),e}function a(t,e){var n=s(e),r=t.css,o=t.media,i=t.sourceMap;if(o&&n.setAttribute("media",o),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),n.styleSheet)n.styleSheet.cssText=r;else{while(n.firstChild)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(r))}}n.r(e),n.d(e,"default",function(){return o})},"6b2d":function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&((r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^\/]+\.js(\?.*)?$/))&&(n.p=r[1]));var o=n("8bbf"),i=n.n(o);const s=/-(\w)/g,a=t=>{return t.replace(s,(t,e)=>e?e.toUpperCase():"")},u=/\B([A-Z])/g,c=t=>{return t.replace(u,"-$1").toLowerCase()};function l(t){const e={};return t.forEach(t=>{e[t]=void 0}),e}function f(t,e,n){t[e]=[].concat(t[e]||[]),t[e].unshift(n)}function p(t,e){if(t){const n=t.$options[e]||[];n.forEach(e=>{e.call(t)})}}function d(t,e){return new CustomEvent(t,{bubbles:!1,cancelable:!1,detail:e})}const h=t=>/function Boolean/.test(String(t)),v=t=>/function Number/.test(String(t));function m(t,e,{type:n}={}){if(h(n))return"true"===t||"false"===t?"true"===t:""===t||t===e||null!=t;if(v(n)){const e=parseFloat(t,10);return isNaN(e)?t:e}return t}function b(t,e){const n=[];for(let r=0,o=e.length;r<o;r++)n.push(g(t,e[r]));return n}function g(t,e){if(3===e.nodeType)return e.data.trim()?e.data:null;if(1===e.nodeType){const n={attrs:_(e),domProps:{innerHTML:e.innerHTML}};return n.attrs.slot&&(n.slot=n.attrs.slot,delete n.attrs.slot),t(e.tagName,n)}return null}function _(t){const e={};for(let n=0,r=t.attributes.length;n<r;n++){const r=t.attributes[n];e[r.nodeName]=r.nodeValue}return e}function y(t,e){const n="function"===typeof e&&!e.cid;let r,o,i,s=!1;function u(t){if(s)return;const e="function"===typeof t?t.options:t,n=Array.isArray(e.props)?e.props:Object.keys(e.props||{});r=n.map(c),o=n.map(a);const u=Array.isArray(e.props)?{}:e.props||{};i=o.reduce((t,e,r)=>{return t[e]=u[n[r]],t},{}),f(e,"beforeCreate",function(){const t=this.$emit;this.$emit=((e,...n)=>{return this.$root.$options.customElement.dispatchEvent(d(e,n)),t.call(this,e,...n)})}),f(e,"created",function(){o.forEach(t=>{this.$root.props[t]=this[t]})}),o.forEach(t=>{Object.defineProperty(v.prototype,t,{get(){return this._wrapper.props[t]},set(e){this._wrapper.props[t]=e},enumerable:!1,configurable:!0})}),s=!0}function h(t,e){const n=a(e),r=t.hasAttribute(e)?t.getAttribute(e):void 0;t._wrapper.props[n]=m(r,e,i[n])}class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const n=this._wrapper=new t({name:"shadow-root",customElement:this,shadowRoot:this.shadowRoot,data(){return{props:{},slotChildren:[]}},render(t){return t(e,{ref:"inner",props:this.props},this.slotChildren)}}),r=new MutationObserver(t=>{let e=!1;for(let n=0;n<t.length;n++){const r=t[n];s&&"attributes"===r.type&&r.target===this?h(this,r.attributeName):e=!0}e&&(n.slotChildren=Object.freeze(b(n.$createElement,this.childNodes)))});r.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0})}get vueComponent(){return this._wrapper.$refs.inner}connectedCallback(){const t=this._wrapper;if(t._isMounted)p(this.vueComponent,"activated");else{const n=()=>{t.props=l(o),r.forEach(t=>{h(this,t)})};s?n():e().then(t=>{(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),u(t),n()}),t.slotChildren=Object.freeze(b(t.$createElement,this.childNodes)),t.$mount(),this.shadowRoot.appendChild(t.$el)}}disconnectedCallback(){p(this.vueComponent,"deactivated")}}return n||u(e),v}var C=y;n("d8f9");var j=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("label",{staticClass:"file-select"},[n("div",{staticClass:"select-button"},[t.value?n("span",[t._v("Selected File: "+t._s(t.value.name))]):n("span",[t._v("Select File")])]),n("input",{attrs:{type:"file"},on:{change:t.handleFileChange}})])},S=[],w={name:"File",data(){return{files:[],input:null,file:null}},props:{value:File},methods:{handleFileChange(t){this.$emit("input",t.target.files[0]),console.log("input",t.target.files[0])}}},$=w;function x(t,e,n,r,o,i,s,a){var u,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),s?(u=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(s)},c._ssrRegister=u):o&&(u=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),u)if(c.functional){c._injectStyles=u;var l=c.render;c.render=function(t,e){return u.call(e),l(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,u):[u]}return{exports:t,options:c}}function E(t){var e=n("2f91");e.__inject__&&e.__inject__(t)}var R=x($,j,S,!1,E,"49f2e205",null,!0),O=R.exports;window.customElements.define("file-component-vue",C(i.a,O))},7326:function(t,e,n){e=t.exports=n("2350")(!1),e.push([t.i,".file-select>.select-button[data-v-49f2e205]{padding:1rem;color:#fff;background-color:#2ea169;border-radius:.3rem;text-align:center;font-weight:700}.file-select>input[type=file][data-v-49f2e205]{display:none}",""])},"8bbf":function(t,e){t.exports=Vue},b2c8:function(t,e,n){var r=n("7326");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("35d6").default;t.exports.__inject__=function(t){o("e53e3702",r,t)}},d8f9:function(t,e){function n(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"===typeof btoa){var i=r(o),s=o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"});return[n].concat(s).concat([i]).join("\n")}return[n].join("\n")}function r(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,"+e;return"/*# "+n+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,n){"string"===typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"===typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var s=t[o];"number"===typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}}});
//# sourceMappingURL=file-component-vue.min.js.map