diff --git a/dist/js/tool.js b/dist/js/tool.js index 454f048..add4545 100644 --- a/dist/js/tool.js +++ b/dist/js/tool.js @@ -1 +1 @@ -!function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)e.d(r,o,function(t){return n[t]}.bind(null,o));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="/",e(e.s=6)}([function(n,t,e){"use strict";function r(n,t,e,r,o,i,s,a){var c,u="function"==typeof n?n.options:n;if(t&&(u.render=t,u.staticRenderFns=e,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),s?(c=function(n){(n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),o&&o.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(s)},u._ssrRegister=c):o&&(c=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(n,t){return c.call(t),l(n,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:n,options:u}}e.d(t,"a",function(){return r})},function(n,t,e){var r=e(9);"string"==typeof r&&(r=[[n.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};e(5)(r,o);r.locals&&(n.exports=r.locals)},function(n,t,e){var r=e(12);"string"==typeof r&&(r=[[n.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};e(5)(r,o);r.locals&&(n.exports=r.locals)},function(n,t,e){var r=e(14);"string"==typeof r&&(r=[[n.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};e(5)(r,o);r.locals&&(n.exports=r.locals)},function(n,t){n.exports=function(n){var t=[];return t.toString=function(){return this.map(function(t){var e=function(n,t){var e=n[1]||"",r=n[3];if(!r)return e;if(t&&"function"==typeof btoa){var o=(s=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),i=r.sources.map(function(n){return"/*# sourceURL="+r.sourceRoot+n+" */"});return[e].concat(i).concat([o]).join("\n")}var s;return[e].join("\n")}(t,n);return t[2]?"@media "+t[2]+"{"+e+"}":e}).join("")},t.i=function(n,e){"string"==typeof n&&(n=[[null,n,""]]);for(var r={},o=0;o=0&&l.splice(t,1)}function m(n){var t=document.createElement("style");if(void 0===n.attrs.type&&(n.attrs.type="text/css"),void 0===n.attrs.nonce){var r=function(){0;return e.nc}();r&&(n.attrs.nonce=r)}return b(t,n.attrs),v(n,t),t}function b(n,t){Object.keys(t).forEach(function(e){n.setAttribute(e,t[e])})}function g(n,t){var e,r,o,i;if(t.transform&&n.css){if(!(i="function"==typeof t.transform?t.transform(n.css):t.transform.default(n.css)))return function(){};n.css=i}if(t.singleton){var s=u++;e=c||(c=m(t)),r=w.bind(null,e,s,!1),o=w.bind(null,e,s,!0)}else n.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=function(n){var t=document.createElement("link");return void 0===n.attrs.type&&(n.attrs.type="text/css"),n.attrs.rel="stylesheet",b(t,n.attrs),v(n,t),t}(t),r=function(n,t,e){var r=e.css,o=e.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=f(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var s=new Blob([r],{type:"text/css"}),a=n.href;n.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}.bind(null,e,t),o=function(){h(e),e.href&&URL.revokeObjectURL(e.href)}):(e=m(t),r=function(n,t){var e=t.css,r=t.media;r&&n.setAttribute("media",r);if(n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}.bind(null,e),o=function(){h(e)});return r(n),function(t){if(t){if(t.css===n.css&&t.media===n.media&&t.sourceMap===n.sourceMap)return;r(n=t)}else o()}}n.exports=function(n,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var e=d(n,t);return p(e,t),function(n){for(var r=[],o=0;o0},url:function(n){return"/nova-vendor/laravel-nova-csv-import/"+n}},computed:{disabledImport:function(){return!this.hasValidConfiguration()}}},o=(e(11),e(0)),i=Object(o.a)(r,function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",[e("heading",{staticClass:"mb-6"},[n._v("CSV Import")]),n._v(" "),e("card",{staticClass:"flex flex-col",staticStyle:{"min-height":"300px"}},[e("div",{staticClass:"p-8"},[e("h2",{staticClass:"pb-4"},[n._v("Preview")]),n._v(" "),e("p",{staticClass:"pb-4"},[n._v("\n We were able to discover "),e("b",[n._v(n._s(n.headings.length))]),n._v(" column(s) and "),e("b",[n._v(n._s(n.total_rows))]),n._v("\n row(s) in your data.\n ")]),n._v(" "),e("p",{staticClass:"pb-4"},[n._v("\n Choose a resource to import them into and match up the headings from the CSV to the\n appropriate fields of the resource.\n ")]),n._v(" "),e("h2",{staticClass:"py-4"},[n._v("Resource")]),n._v(" "),e("p",{staticClass:"pb-4"},[n._v("Choose which resource to import your data into:")]),n._v(" "),e("div",[e("select",{directives:[{name:"model",rawName:"v-model",value:n.resource,expression:"resource"}],staticClass:"block form-control form-select",attrs:{name:"resource"},on:{change:function(t){var e=Array.prototype.filter.call(t.target.options,function(n){return n.selected}).map(function(n){return"_value"in n?n._value:n.value});n.resource=t.target.multiple?e:e[0]}}},[e("option",{attrs:{value:""}},[n._v("- Select a resource -")]),n._v(" "),n._l(n.resources,function(t,r){return e("option",{domProps:{value:r}},[n._v(n._s(t))])})],2)])]),n._v(" "),e("table",{staticClass:"table w-full"},[e("thead",[e("tr",n._l(n.headings,function(t){return e("th",[n._v(n._s(t))])}),0)]),n._v(" "),e("tbody",[e("tr",n._l(n.headings,function(t){return e("td",{staticClass:"text-center"},[e("select",{directives:[{name:"model",rawName:"v-model",value:n.mappings[t],expression:"mappings[heading]"}],staticClass:"w-full form-control form-select",on:{change:function(e){var r=Array.prototype.filter.call(e.target.options,function(n){return n.selected}).map(function(n){return"_value"in n?n._value:n.value});n.$set(n.mappings,t,e.target.multiple?r:r[0])}}},[e("option",{attrs:{value:""}},[n._v("- Ignore this column -")]),n._v(" "),n._l(n.fields[n.resource],function(t){return e("option",{domProps:{value:t.attribute}},[n._v(n._s(t.name))])})],2)])}),0),n._v(" "),n._l(n.rows,function(t){return e("tr",n._l(t,function(t){return e("td",[n._v(n._s(t))])}),0)})],2)]),n._v(" "),e("div",{staticClass:"bg-30 flex px-8 py-4"},[e("button",{staticClass:"btn btn-default btn-primary",attrs:{disabled:n.disabledImport},on:{click:n.runImport}},[n._v("Import → ")])])])],1)},[],!1,null,null,null);t.default=i.exports},function(n,t,e){"use strict";e.r(t);var r={mounted:function(){},data:function(){return{imported:""}},methods:{}},o=(e(13),e(0)),i=Object(o.a)(r,function(){var n=this.$createElement,t=this._self._c||n;return t("div",[t("heading",{staticClass:"mb-6"},[this._v("CSV Import")]),this._v(" "),t("card",{staticClass:"flex flex-col items-center justify-center",staticStyle:{"min-height":"300px"}},[this._v("\n Done! The following data was imported:\n ")])],1)},[],!1,null,null,null);t.default=i.exports},function(n,t){}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(i=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),s=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(s).concat([o]).join("\n")}var i;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;on.parts.length&&(r.parts.length=n.parts.length)}else{var i=[];for(o=0;o0},url:function(e){return"/nova-vendor/laravel-nova-csv-import/"+e}},computed:{disabledImport:function(){return!this.hasValidConfiguration()}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("heading",{staticClass:"mb-6"},[e._v("CSV Import")]),e._v(" "),n("card",{staticClass:"flex flex-col",staticStyle:{"min-height":"300px"}},[n("div",{staticClass:"p-8"},[n("h2",{staticClass:"pb-4"},[e._v("Preview")]),e._v(" "),n("p",{staticClass:"pb-4"},[e._v("\n We were able to discover "),n("b",[e._v(e._s(e.headings.length))]),e._v(" column(s) and "),n("b",[e._v(e._s(e.total_rows))]),e._v("\n row(s) in your data.\n ")]),e._v(" "),n("p",{staticClass:"pb-4"},[e._v("\n Choose a resource to import them into and match up the headings from the CSV to the\n appropriate fields of the resource.\n ")]),e._v(" "),n("h2",{staticClass:"py-4"},[e._v("Resource")]),e._v(" "),n("p",{staticClass:"pb-4"},[e._v("Choose which resource to import your data into:")]),e._v(" "),n("div",[n("select",{directives:[{name:"model",rawName:"v-model",value:e.resource,expression:"resource"}],staticClass:"block form-control form-select",attrs:{name:"resource"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){return"_value"in e?e._value:e.value});e.resource=t.target.multiple?n:n[0]}}},[n("option",{attrs:{value:""}},[e._v("- Select a resource -")]),e._v(" "),e._l(e.resources,function(t,r){return n("option",{domProps:{value:r}},[e._v(e._s(t))])})],2)])]),e._v(" "),n("table",{staticClass:"table w-full"},[n("thead",[n("tr",e._l(e.headings,function(t){return n("th",[e._v(e._s(t))])}),0)]),e._v(" "),n("tbody",[n("tr",e._l(e.headings,function(t){return n("td",{staticClass:"text-center"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.mappings[t],expression:"mappings[heading]"}],staticClass:"w-full form-control form-select",on:{change:function(n){var r=Array.prototype.filter.call(n.target.options,function(e){return e.selected}).map(function(e){return"_value"in e?e._value:e.value});e.$set(e.mappings,t,n.target.multiple?r:r[0])}}},[n("option",{attrs:{value:""}},[e._v("- Ignore this column -")]),e._v(" "),e._l(e.fields[e.resource],function(t){return n("option",{domProps:{value:t.attribute}},[e._v(e._s(t.name))])})],2)])}),0),e._v(" "),e._l(e.rows,function(t){return n("tr",e._l(t,function(t){return n("td",[e._v(e._s(t))])}),0)})],2)]),e._v(" "),n("div",{staticClass:"bg-30 flex px-8 py-4"},[n("button",{staticClass:"btn btn-default btn-primary",attrs:{disabled:e.disabledImport},on:{click:e.runImport}},[e._v("Import → ")])])])],1)},staticRenderFns:[]}},function(e,t,n){var r=n(2)(n(19),n(20),!1,function(e){n(17)},null,null);e.exports=r.exports},function(e,t,n){var r=n(18);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(1)("50a6a610",r,!0,{})},function(e,t,n){(e.exports=n(0)(!1)).push([e.i,"",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={mounted:function(){},data:function(){return{imported:""}},methods:{}}},function(e,t){e.exports={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("heading",{staticClass:"mb-6"},[this._v("CSV Import")]),this._v(" "),t("card",{staticClass:"flex flex-col items-center justify-center",staticStyle:{"min-height":"300px"}},[this._v("\n Done! The following data was imported:\n ")])],1)},staticRenderFns:[]}}]); \ No newline at end of file diff --git a/dist/mix-manifest.json b/dist/mix-manifest.json index 4eb9813..adedd85 100644 --- a/dist/mix-manifest.json +++ b/dist/mix-manifest.json @@ -1,4 +1,3 @@ { - "/js/tool.js": "/js/tool.js", - "/css/tool.css": "/css/tool.css" -} + "/js/tool.js": "/js/tool.js" +} \ No newline at end of file diff --git a/package.json b/package.json index cdb23c5..fb91be3 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,7 @@ }, "devDependencies": { "cross-env": "^5.0.0", - "laravel-mix": "^4.0", - "resolve-url-loader": "^2.3.1", - "sass": "^1.19.0", - "sass-loader": "^7.1.0", - "vue-template-compiler": "^2.6.10" + "laravel-mix": "^1.0" }, "dependencies": { "vue": "^2.5.0" diff --git a/webpack.mix.js b/webpack.mix.js index 2a13f44..dafd2de 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -2,4 +2,4 @@ let mix = require('laravel-mix') mix.setPublicPath('dist') .js('resources/js/tool.js', 'js') - .sass('resources/sass/tool.scss', 'css') + //.sass('resources/sass/tool.scss', 'css')