@usecsv/vuejs 1.16.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/UseCSVButton.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
2
|
|
|
3
3
|
/*!
|
|
4
|
-
* @usecsv/js v0.
|
|
4
|
+
* @usecsv/js v0.32.1
|
|
5
5
|
* (c) usecsv
|
|
6
6
|
* Released under the MIT License.
|
|
7
7
|
*/
|
|
@@ -664,7 +664,7 @@ whenDomReady.resume = function (doc) {
|
|
|
664
664
|
|
|
665
665
|
// eslint-disable-next-line dot-notation
|
|
666
666
|
var MOUNT_URL = {"MOUNT_URL":"https://app.usecsv.com/importer"}["MOUNT_URL"] ;
|
|
667
|
-
var insertIframe = function (id, importerDisplay) {
|
|
667
|
+
var insertIframe = function (id, importerDisplay, iframeId) {
|
|
668
668
|
var usecsvInlineWrapper = document.getElementById("usecsv-importer-inline-wrapper");
|
|
669
669
|
var usecsvContainerStyles = importerDisplay === "modal" || !usecsvInlineWrapper
|
|
670
670
|
? ".usecsv_container { position: fixed; top: 0px; bottom: 0; right: 0; left: 0; z-index: 100000; }"
|
|
@@ -673,6 +673,9 @@ var insertIframe = function (id, importerDisplay) {
|
|
|
673
673
|
document.body.insertAdjacentHTML("beforeend", "<div id=".concat(id, " class=\"usecsv_container loading\"></div>"));
|
|
674
674
|
var iframe = document.createElement("iframe");
|
|
675
675
|
iframe.setAttribute("src", MOUNT_URL);
|
|
676
|
+
if (iframeId) {
|
|
677
|
+
iframe.setAttribute("id", iframeId);
|
|
678
|
+
}
|
|
676
679
|
var usecsvContainer = document.getElementById(id);
|
|
677
680
|
usecsvContainer === null || usecsvContainer === void 0 ? void 0 : usecsvContainer.appendChild(iframe);
|
|
678
681
|
if (importerDisplay === "inline" && usecsvInlineWrapper) {
|
|
@@ -682,10 +685,10 @@ var insertIframe = function (id, importerDisplay) {
|
|
|
682
685
|
return iframe;
|
|
683
686
|
};
|
|
684
687
|
var useCsvPlugin = function (_a) {
|
|
685
|
-
var importerKey = _a.importerKey, user = _a.user, metadata = _a.metadata, onData = _a.onData, onRecordsInitial = _a.onRecordsInitial, onRecordEdit = _a.onRecordEdit, _b = _a.importerDisplay, importerDisplay = _b === void 0 ? "modal" : _b, onClose = _a.onClose, theme = _a.theme, batchSize = _a.batchSize, sampleFileURL = _a.sampleFileURL, downloadExampleButton = _a.downloadExampleButton, dynamicColumns = _a.dynamicColumns, defaultLanguage = _a.defaultLanguage, onError = _a.onError, customText = _a.customText, acceptedFileFormats = _a.acceptedFileFormats, onFileUpload = _a.onFileUpload, columnWidth = _a.columnWidth, onMatchColumns = _a.onMatchColumns;
|
|
688
|
+
var importerKey = _a.importerKey, user = _a.user, metadata = _a.metadata, onData = _a.onData, onRecordsInitial = _a.onRecordsInitial, onRecordEdit = _a.onRecordEdit, _b = _a.importerDisplay, importerDisplay = _b === void 0 ? "modal" : _b, onClose = _a.onClose, theme = _a.theme, batchSize = _a.batchSize, sampleFileURL = _a.sampleFileURL, downloadExampleButton = _a.downloadExampleButton, dynamicColumns = _a.dynamicColumns, defaultLanguage = _a.defaultLanguage, onError = _a.onError, customText = _a.customText, acceptedFileFormats = _a.acceptedFileFormats, onFileUpload = _a.onFileUpload, columnWidth = _a.columnWidth, onMatchColumns = _a.onMatchColumns, iframeId = _a.iframeId;
|
|
686
689
|
var id = "usecsv-".concat(Math.round(Math.random() * 100000000));
|
|
687
690
|
return whenDomReady().then(function () {
|
|
688
|
-
var iframe = insertIframe(id, importerDisplay);
|
|
691
|
+
var iframe = insertIframe(id, importerDisplay, iframeId);
|
|
689
692
|
var closeIframe = function () {
|
|
690
693
|
var _a;
|
|
691
694
|
(_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
@@ -747,7 +750,8 @@ var script = /*#__PURE__*/Vue.extend({
|
|
|
747
750
|
acceptedFileFormats: {},
|
|
748
751
|
onFileUpload: {},
|
|
749
752
|
columnWidth: {},
|
|
750
|
-
onMatchColumns: {}
|
|
753
|
+
onMatchColumns: {},
|
|
754
|
+
iframeId: {}
|
|
751
755
|
},
|
|
752
756
|
data() {
|
|
753
757
|
return {
|
|
@@ -776,7 +780,8 @@ var script = /*#__PURE__*/Vue.extend({
|
|
|
776
780
|
acceptedFileFormats: this.acceptedFileFormats,
|
|
777
781
|
onFileUpload: this.onFileUpload,
|
|
778
782
|
columnWidth: this.columnWidth,
|
|
779
|
-
onMatchColumns: this.onMatchColumns
|
|
783
|
+
onMatchColumns: this.onMatchColumns,
|
|
784
|
+
iframeId: this.iframeId
|
|
780
785
|
});
|
|
781
786
|
},
|
|
782
787
|
hasScopedSlot() {
|
|
@@ -942,14 +947,14 @@ var __vue_staticRenderFns__ = [];
|
|
|
942
947
|
/* style */
|
|
943
948
|
const __vue_inject_styles__ = function (inject) {
|
|
944
949
|
if (!inject) return;
|
|
945
|
-
inject("data-v-
|
|
946
|
-
source: "#usecsv-button[data-v-
|
|
950
|
+
inject("data-v-1c1e8164_0", {
|
|
951
|
+
source: "#usecsv-button[data-v-1c1e8164]{background-color:#fff;color:#000;border:2px solid #000;border-radius:6px;padding:10px 15px;text-align:center;font-size:16px;cursor:pointer}",
|
|
947
952
|
map: undefined,
|
|
948
953
|
media: undefined
|
|
949
954
|
});
|
|
950
955
|
};
|
|
951
956
|
/* scoped */
|
|
952
|
-
const __vue_scope_id__ = "data-v-
|
|
957
|
+
const __vue_scope_id__ = "data-v-1c1e8164";
|
|
953
958
|
/* module identifier */
|
|
954
959
|
const __vue_module_identifier__ = undefined;
|
|
955
960
|
/* functional template */
|
package/dist/UseCSVButton.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var UseCSVButton=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],c=!0,d=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);c=!0);}catch(e){d=!0,r=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw r}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}
|
|
2
2
|
/*!
|
|
3
|
-
* @usecsv/js v0.
|
|
3
|
+
* @usecsv/js v0.32.1
|
|
4
4
|
* (c) usecsv
|
|
5
5
|
* Released under the MIT License.
|
|
6
|
-
*/()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var i=function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)},a=[],s=[];function c(e,t){if(t=t||{},void 0===e)throw new Error("insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).");var n,o=!0===t.prepend?"prepend":"append",r=void 0!==t.container?t.container:document.querySelector("head"),i=a.indexOf(r);return-1===i&&(i=a.push(r)-1,s[i]={}),void 0!==s[i]&&void 0!==s[i][o]?n=s[i][o]:(n=s[i][o]=function(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}(),"prepend"===o?r.insertBefore(n,r.childNodes[0]):r.appendChild(n)),65279===e.charCodeAt(0)&&(e=e.substr(1,e.length)),n.styleSheet?n.styleSheet.cssText+=e:n.textContent+=e,n}var d,l,u,m,p,f=c;c.insertCss=f,function(e){e.Call="call",e.Reply="reply",e.Syn="syn",e.SynAck="synAck",e.Ack="ack"}(d||(d={})),function(e){e.Fulfilled="fulfilled",e.Rejected="rejected"}(l||(l={})),function(e){e.ConnectionDestroyed="ConnectionDestroyed",e.ConnectionTimeout="ConnectionTimeout",e.NoIframeSrc="NoIframeSrc"}(u||(u={})),function(e){e.DataCloneError="DataCloneError"}(m||(m={})),function(e){e.Message="message"}(p||(p={}));const h={"http:":"80","https:":"443"},v=/^(https?:)?\/\/([^/:]+)?(:(\d+))?/,g=["file:","data:"];const y=({name:e,message:t,stack:n})=>({name:e,message:t,stack:n});let C=0;var b=()=>++C;const E=e=>e?e.split("."):[],S=(e,t,n)=>{const o=E(t);return o.reduce(((e,t,r)=>(void 0===e[t]&&(e[t]={}),r===o.length-1&&(e[t]=n),e[t])),e),e},w=(e,t)=>{const n={};return Object.keys(e).forEach((o=>{const r=e[o],i=((e,t)=>{const n=E(t||"");return n.push(e),(e=>e.join("."))(n)})(o,t);"object"==typeof r&&Object.assign(n,w(r,i)),"function"==typeof r&&(n[i]=r)})),n};var R=(e,t,n,o,r)=>{const{localName:i,local:a,remote:s,originForSending:c,originForReceiving:m}=t;let f=!1;r(`${i}: Connecting call sender`);const h=e=>(...t)=>{let n;r(`${i}: Sending ${e}() call`);try{s.closed&&(n=!0)}catch(e){n=!0}if(n&&o(),f){const t=new Error(`Unable to send ${e}() call due to destroyed connection`);throw t.code=u.ConnectionDestroyed,t}return new Promise(((n,o)=>{const u=b(),f=t=>{if(t.source!==s||t.data.penpal!==d.Reply||t.data.id!==u)return;if("*"!==m&&t.origin!==m)return void r(`${i} received message from origin ${t.origin} which did not match expected origin ${m}`);const c=t.data;r(`${i}: Received ${e}() reply`),a.removeEventListener(p.Message,f);let h=c.returnValue;c.returnValueIsError&&(h=(e=>{const t=new Error;return Object.keys(e).forEach((n=>t[n]=e[n])),t})(h)),(c.resolution===l.Fulfilled?n:o)(h)};a.addEventListener(p.Message,f);const h={penpal:d.Call,id:u,methodName:e,args:t};s.postMessage(h,c)}))},v=n.reduce(((e,t)=>(e[t]=h(t),e)),{});return Object.assign(e,(e=>{const t={};for(const n in e)S(t,n,e[n]);return t})(v)),()=>{f=!0}},$=(e,t,n,o,r)=>{const{destroy:i,onDestroy:a}=o;let s,c;const u={};return o=>{if("*"!==t&&o.origin!==t)return void r(`Parent: Handshake - Received ACK message from origin ${o.origin} which did not match expected origin ${t}`);r("Parent: Handshake - Received ACK");const f={localName:"Parent",local:window,remote:o.source,originForSending:n,originForReceiving:t};s&&s(),s=((e,t,n)=>{const{localName:o,local:r,remote:i,originForSending:a,originForReceiving:s}=e;let c=!1;const u=e=>{if(e.source!==i||e.data.penpal!==d.Call)return;if("*"!==s&&e.origin!==s)return void n(`${o} received message from origin ${e.origin} which did not match expected origin ${s}`);const r=e.data,{methodName:u,args:p,id:f}=r;n(`${o}: Received ${u}() call`);const h=e=>t=>{if(n(`${o}: Sending ${u}() reply`),c)return void n(`${o}: Unable to send ${u}() reply due to destroyed connection`);const r={penpal:d.Reply,id:f,resolution:e,returnValue:t};e===l.Rejected&&t instanceof Error&&(r.returnValue=y(t),r.returnValueIsError=!0);try{i.postMessage(r,a)}catch(e){if(e.name===m.DataCloneError){const t={penpal:d.Reply,id:f,resolution:l.Rejected,returnValue:y(e),returnValueIsError:!0};i.postMessage(t,a)}throw e}};new Promise((e=>e(t[u].apply(t,p)))).then(h(l.Fulfilled),h(l.Rejected))};return r.addEventListener(p.Message,u),()=>{c=!0,r.removeEventListener(p.Message,u)}})(f,e,r),a(s),c&&c.forEach((e=>{delete u[e]})),c=o.data.methodNames;const h=R(u,f,c,i,r);return a(h),u}};var x=e=>{let{iframe:t,methods:n={},childOrigin:o,timeout:r,debug:i=!1}=e;const a=(e=>(...t)=>{e&&console.log("[Penpal]",...t)})(i),s=((e,t)=>{const n=[];let o=!1;return{destroy(r){o||(o=!0,t(`${e}: Destroying connection`),n.forEach((e=>{e(r)})))},onDestroy(e){o?e():n.push(e)}}})("Parent",a),{onDestroy:c,destroy:l}=s;o||((e=>{if(!e.src&&!e.srcdoc){const e=new Error("Iframe must have src or srcdoc property defined.");throw e.code=u.NoIframeSrc,e}})(t),o=(e=>{if(e&&g.find((t=>e.startsWith(t))))return"null";const t=document.location,n=v.exec(e);let o,r,i;return n?(o=n[1]?n[1]:t.protocol,r=n[2],i=n[4]):(o=t.protocol,r=t.hostname,i=t.port),`${o}//${r}${i&&i!==h[o]?`:${i}`:""}`})(t.src));const m="null"===o?"*":o,f=w(n),y=((e,t,n,o)=>r=>{if(!r.source)return;if("*"!==n&&r.origin!==n)return void e(`Parent: Handshake - Received SYN message from origin ${r.origin} which did not match expected origin ${n}`);e("Parent: Handshake - Received SYN, responding with SYN-ACK");const i={penpal:d.SynAck,methodNames:Object.keys(t)};r.source.postMessage(i,o)})(a,f,o,m),C=$(f,o,m,s,a),b=new Promise(((e,n)=>{const o=((e,t)=>{let n;return void 0!==e&&(n=window.setTimeout((()=>{const n=new Error(`Connection timed out after ${e}ms`);n.code=u.ConnectionTimeout,t(n)}),e)),()=>{clearTimeout(n)}})(r,l),i=n=>{if(n.source===t.contentWindow&&n.data)if(n.data.penpal!==d.Syn)if(n.data.penpal!==d.Ack);else{const t=C(n);t&&(o(),e(t))}else y(n)};window.addEventListener(p.Message,i),a("Parent: Awaiting handshake"),((e,t)=>{const{destroy:n,onDestroy:o}=t,r=setInterval((()=>{e.isConnected||(clearInterval(r),n())}),6e4);o((()=>{clearInterval(r)}))})(t,s),c((e=>{window.removeEventListener(p.Message,i),e&&n(e)}))}));return{promise:b,destroy(){l()}}},F=["interactive","complete"],_=function(e,t){return new Promise((function(n){e&&"function"!=typeof e&&(t=e,e=null),t=t||window.document;var o=function(){return n(void(e&&setTimeout(e)))};-1!==F.indexOf(t.readyState)?o():t.addEventListener("DOMContentLoaded",o)}))};_.resume=function(e){return function(t){return _(e).then((function(){return t}))}};var M=function(e){var t=e.importerKey,n=e.user,o=e.metadata,r=e.onData,a=e.onRecordsInitial,s=e.onRecordEdit,c=e.importerDisplay,d=void 0===c?"modal":c,l=e.onClose,u=e.theme,m=e.batchSize,p=e.sampleFileURL,h=e.downloadExampleButton,v=e.dynamicColumns,g=e.defaultLanguage,y=e.onError,C=e.customText,b=e.acceptedFileFormats,E=e.onFileUpload,S=e.columnWidth,w=e.onMatchColumns,R="usecsv-".concat(Math.round(1e8*Math.random()));return _().then((function(){var e=function(e,t){var n=document.getElementById("usecsv-importer-inline-wrapper");f("\n ".concat("modal"!==t&&n?"":".usecsv_container { position: fixed; top: 0px; bottom: 0; right: 0; left: 0; z-index: 100000; }","\n .usecsv_container iframe {\n width: 100%;\n height: 100%;\n position: absolute;\n border-width: 0;\n top: 0;\n left: 0; \n }\n .usecsv_container {\n overflow: hidden;\n overscroll-behavior-x: none;\n }\n")),document.body.insertAdjacentHTML("beforeend","<div id=".concat(e,' class="usecsv_container loading"></div>'));var o=document.createElement("iframe");o.setAttribute("src","https://app.usecsv.com/importer");var r=document.getElementById(e);return null==r||r.appendChild(o),"inline"===t&&n&&(null==n||n.appendChild(r)),o}(R,d),c=function(){var e;null===(e=document.getElementById(R))||void 0===e||e.remove()},$=function(){return l&&l(),c()},F=x({iframe:e,methods:i(i(i(i(i(i(i({closeIframe:c},r?{onData:function(e){return r(e,$)}}:{}),a?{onRecordsInitial:a}:{}),s?{onRecordEdit:s}:{}),l?{onClose:l}:{}),y?{onError:y}:{}),E?{onFileUpload:E}:{}),w?{onMatchColumns:w}:{})});return F.promise.then((function(e){var r;null===(r=document.getElementById(R))||void 0===r||r.classList.remove("loading"),e.setParams&&e.setParams({importerKey:t,user:n,metadata:o,importerDisplay:d,theme:u,batchSize:m,sampleFileURL:p,downloadExampleButton:h,dynamicColumns:v,defaultLanguage:g,customText:C,acceptedFileFormats:b,columnWidth:S})})),F}))},j=n.default.extend({name:"usecsv-button",props:{importerKey:{},user:{},metadata:{},onData:{},importerDisplay:{},onRecordsInitial:{},onRecordEdit:{},onClose:{},theme:{},batchSize:{},sampleFileURL:{},downloadExampleButton:{},dynamicColumns:{},defaultLanguage:{},onError:{},customText:{},acceptedFileFormats:{},onFileUpload:{},columnWidth:{},onMatchColumns:{}},data:function(){return{hasSlot:!!this.$slots.default}},methods:{openModal:function(){M({importerKey:this.importerKey,user:this.user,metadata:this.metadata,onData:this.onData,importerDisplay:this.importerDisplay,onRecordsInitial:this.onRecordsInitial,onRecordEdit:this.onRecordEdit,onClose:this.onClose,theme:this.theme,batchSize:this.batchSize,sampleFileURL:this.sampleFileURL,downloadExampleButton:this.downloadExampleButton,dynamicColumns:this.dynamicColumns,defaultLanguage:this.defaultLanguage,onError:this.onError,customText:this.customText,acceptedFileFormats:this.acceptedFileFormats,onFileUpload:this.onFileUpload,columnWidth:this.columnWidth,onMatchColumns:this.onMatchColumns})},hasScopedSlot:function(){return"normalized"===(this.$scopedSlots.default&&this.$scopedSlots.default.name)}}});function I(e,t,n,o,r,i,a,s,c,d){"boolean"!=typeof a&&(c=s,s=a,a=!1);const l="function"==typeof n?n.options:n;let u;if(e&&e.render&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,r&&(l.functional=!0)),o&&(l._scopeId=o),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},l._ssrRegister=u):t&&(u=a?function(e){t.call(this,d(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),u)if(l.functional){const e=l.render;l.render=function(t,n){return u.call(n),e(t,n)}}else{const e=l.beforeCreate;l.beforeCreate=e?[].concat(e,u):[u]}return n}const L="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function D(e){return(e,t)=>function(e,t){const n=L?t.media||"default":e,o=O[n]||(O[n]={ids:new Set,styles:[]});if(!o.ids.has(e)){o.ids.add(e);let n=t.source;if(t.map&&(n+="\n/*# sourceURL="+t.map.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),o.element||(o.element=document.createElement("style"),o.element.type="text/css",t.media&&o.element.setAttribute("media",t.media),void 0===A&&(A=document.head||document.getElementsByTagName("head")[0]),A.appendChild(o.element)),"styleSheet"in o.element)o.styles.push(n),o.element.styleSheet.cssText=o.styles.filter(Boolean).join("\n");else{const e=o.ids.size-1,t=document.createTextNode(n),r=o.element.childNodes;r[e]&&o.element.removeChild(r[e]),r.length?o.element.insertBefore(t,r[e]):o.element.appendChild(t)}}}(e,t)}let A;const O={};var T=I({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"usecsv"},[e.hasScopedSlot()?n("div",[e._t("default",null,{openModal:e.openModal})],2):n("div",[n("button",{attrs:{type:"button",id:"usecsv-button"},on:{click:e.openModal}},[e._t("default",(function(){return[e._v(" open usecsv ")]}))],2)])])},staticRenderFns:[]},(function(e){e&&e("data-v-43f090ed_0",{source:"#usecsv-button[data-v-43f090ed]{background-color:#fff;color:#000;border:2px solid #000;border-radius:6px;padding:10px 15px;text-align:center;font-size:16px;cursor:pointer}",map:void 0,media:void 0})}),j,"data-v-43f090ed",false,undefined,!1,D,void 0,void 0),N=function(){var e=T;return e.install=function(t){t.component("usecsv-button",e)},e}(),U=Object.freeze({__proto__:null,default:N});return Object.entries(U).forEach((function(e){var t=o(e,2),n=t[0],r=t[1];"default"!==n&&(N[n]=r)})),N}(Vue);
|
|
6
|
+
*/()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var i=function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)},a=[],s=[];function c(e,t){if(t=t||{},void 0===e)throw new Error("insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).");var n,o=!0===t.prepend?"prepend":"append",r=void 0!==t.container?t.container:document.querySelector("head"),i=a.indexOf(r);return-1===i&&(i=a.push(r)-1,s[i]={}),void 0!==s[i]&&void 0!==s[i][o]?n=s[i][o]:(n=s[i][o]=function(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}(),"prepend"===o?r.insertBefore(n,r.childNodes[0]):r.appendChild(n)),65279===e.charCodeAt(0)&&(e=e.substr(1,e.length)),n.styleSheet?n.styleSheet.cssText+=e:n.textContent+=e,n}var d,l,u,m,p,f=c;c.insertCss=f,function(e){e.Call="call",e.Reply="reply",e.Syn="syn",e.SynAck="synAck",e.Ack="ack"}(d||(d={})),function(e){e.Fulfilled="fulfilled",e.Rejected="rejected"}(l||(l={})),function(e){e.ConnectionDestroyed="ConnectionDestroyed",e.ConnectionTimeout="ConnectionTimeout",e.NoIframeSrc="NoIframeSrc"}(u||(u={})),function(e){e.DataCloneError="DataCloneError"}(m||(m={})),function(e){e.Message="message"}(p||(p={}));const h={"http:":"80","https:":"443"},v=/^(https?:)?\/\/([^/:]+)?(:(\d+))?/,g=["file:","data:"];const y=({name:e,message:t,stack:n})=>({name:e,message:t,stack:n});let C=0;var b=()=>++C;const E=e=>e?e.split("."):[],S=(e,t,n)=>{const o=E(t);return o.reduce(((e,t,r)=>(void 0===e[t]&&(e[t]={}),r===o.length-1&&(e[t]=n),e[t])),e),e},w=(e,t)=>{const n={};return Object.keys(e).forEach((o=>{const r=e[o],i=((e,t)=>{const n=E(t||"");return n.push(e),(e=>e.join("."))(n)})(o,t);"object"==typeof r&&Object.assign(n,w(r,i)),"function"==typeof r&&(n[i]=r)})),n};var R=(e,t,n,o,r)=>{const{localName:i,local:a,remote:s,originForSending:c,originForReceiving:m}=t;let f=!1;r(`${i}: Connecting call sender`);const h=e=>(...t)=>{let n;r(`${i}: Sending ${e}() call`);try{s.closed&&(n=!0)}catch(e){n=!0}if(n&&o(),f){const t=new Error(`Unable to send ${e}() call due to destroyed connection`);throw t.code=u.ConnectionDestroyed,t}return new Promise(((n,o)=>{const u=b(),f=t=>{if(t.source!==s||t.data.penpal!==d.Reply||t.data.id!==u)return;if("*"!==m&&t.origin!==m)return void r(`${i} received message from origin ${t.origin} which did not match expected origin ${m}`);const c=t.data;r(`${i}: Received ${e}() reply`),a.removeEventListener(p.Message,f);let h=c.returnValue;c.returnValueIsError&&(h=(e=>{const t=new Error;return Object.keys(e).forEach((n=>t[n]=e[n])),t})(h)),(c.resolution===l.Fulfilled?n:o)(h)};a.addEventListener(p.Message,f);const h={penpal:d.Call,id:u,methodName:e,args:t};s.postMessage(h,c)}))},v=n.reduce(((e,t)=>(e[t]=h(t),e)),{});return Object.assign(e,(e=>{const t={};for(const n in e)S(t,n,e[n]);return t})(v)),()=>{f=!0}},$=(e,t,n,o,r)=>{const{destroy:i,onDestroy:a}=o;let s,c;const u={};return o=>{if("*"!==t&&o.origin!==t)return void r(`Parent: Handshake - Received ACK message from origin ${o.origin} which did not match expected origin ${t}`);r("Parent: Handshake - Received ACK");const f={localName:"Parent",local:window,remote:o.source,originForSending:n,originForReceiving:t};s&&s(),s=((e,t,n)=>{const{localName:o,local:r,remote:i,originForSending:a,originForReceiving:s}=e;let c=!1;const u=e=>{if(e.source!==i||e.data.penpal!==d.Call)return;if("*"!==s&&e.origin!==s)return void n(`${o} received message from origin ${e.origin} which did not match expected origin ${s}`);const r=e.data,{methodName:u,args:p,id:f}=r;n(`${o}: Received ${u}() call`);const h=e=>t=>{if(n(`${o}: Sending ${u}() reply`),c)return void n(`${o}: Unable to send ${u}() reply due to destroyed connection`);const r={penpal:d.Reply,id:f,resolution:e,returnValue:t};e===l.Rejected&&t instanceof Error&&(r.returnValue=y(t),r.returnValueIsError=!0);try{i.postMessage(r,a)}catch(e){if(e.name===m.DataCloneError){const t={penpal:d.Reply,id:f,resolution:l.Rejected,returnValue:y(e),returnValueIsError:!0};i.postMessage(t,a)}throw e}};new Promise((e=>e(t[u].apply(t,p)))).then(h(l.Fulfilled),h(l.Rejected))};return r.addEventListener(p.Message,u),()=>{c=!0,r.removeEventListener(p.Message,u)}})(f,e,r),a(s),c&&c.forEach((e=>{delete u[e]})),c=o.data.methodNames;const h=R(u,f,c,i,r);return a(h),u}};var x=e=>{let{iframe:t,methods:n={},childOrigin:o,timeout:r,debug:i=!1}=e;const a=(e=>(...t)=>{e&&console.log("[Penpal]",...t)})(i),s=((e,t)=>{const n=[];let o=!1;return{destroy(r){o||(o=!0,t(`${e}: Destroying connection`),n.forEach((e=>{e(r)})))},onDestroy(e){o?e():n.push(e)}}})("Parent",a),{onDestroy:c,destroy:l}=s;o||((e=>{if(!e.src&&!e.srcdoc){const e=new Error("Iframe must have src or srcdoc property defined.");throw e.code=u.NoIframeSrc,e}})(t),o=(e=>{if(e&&g.find((t=>e.startsWith(t))))return"null";const t=document.location,n=v.exec(e);let o,r,i;return n?(o=n[1]?n[1]:t.protocol,r=n[2],i=n[4]):(o=t.protocol,r=t.hostname,i=t.port),`${o}//${r}${i&&i!==h[o]?`:${i}`:""}`})(t.src));const m="null"===o?"*":o,f=w(n),y=((e,t,n,o)=>r=>{if(!r.source)return;if("*"!==n&&r.origin!==n)return void e(`Parent: Handshake - Received SYN message from origin ${r.origin} which did not match expected origin ${n}`);e("Parent: Handshake - Received SYN, responding with SYN-ACK");const i={penpal:d.SynAck,methodNames:Object.keys(t)};r.source.postMessage(i,o)})(a,f,o,m),C=$(f,o,m,s,a),b=new Promise(((e,n)=>{const o=((e,t)=>{let n;return void 0!==e&&(n=window.setTimeout((()=>{const n=new Error(`Connection timed out after ${e}ms`);n.code=u.ConnectionTimeout,t(n)}),e)),()=>{clearTimeout(n)}})(r,l),i=n=>{if(n.source===t.contentWindow&&n.data)if(n.data.penpal!==d.Syn)if(n.data.penpal!==d.Ack);else{const t=C(n);t&&(o(),e(t))}else y(n)};window.addEventListener(p.Message,i),a("Parent: Awaiting handshake"),((e,t)=>{const{destroy:n,onDestroy:o}=t,r=setInterval((()=>{e.isConnected||(clearInterval(r),n())}),6e4);o((()=>{clearInterval(r)}))})(t,s),c((e=>{window.removeEventListener(p.Message,i),e&&n(e)}))}));return{promise:b,destroy(){l()}}},F=["interactive","complete"],_=function(e,t){return new Promise((function(n){e&&"function"!=typeof e&&(t=e,e=null),t=t||window.document;var o=function(){return n(void(e&&setTimeout(e)))};-1!==F.indexOf(t.readyState)?o():t.addEventListener("DOMContentLoaded",o)}))};_.resume=function(e){return function(t){return _(e).then((function(){return t}))}};var I=function(e){var t=e.importerKey,n=e.user,o=e.metadata,r=e.onData,a=e.onRecordsInitial,s=e.onRecordEdit,c=e.importerDisplay,d=void 0===c?"modal":c,l=e.onClose,u=e.theme,m=e.batchSize,p=e.sampleFileURL,h=e.downloadExampleButton,v=e.dynamicColumns,g=e.defaultLanguage,y=e.onError,C=e.customText,b=e.acceptedFileFormats,E=e.onFileUpload,S=e.columnWidth,w=e.onMatchColumns,R=e.iframeId,$="usecsv-".concat(Math.round(1e8*Math.random()));return _().then((function(){var e=function(e,t,n){var o=document.getElementById("usecsv-importer-inline-wrapper");f("\n ".concat("modal"!==t&&o?"":".usecsv_container { position: fixed; top: 0px; bottom: 0; right: 0; left: 0; z-index: 100000; }","\n .usecsv_container iframe {\n width: 100%;\n height: 100%;\n position: absolute;\n border-width: 0;\n top: 0;\n left: 0; \n }\n .usecsv_container {\n overflow: hidden;\n overscroll-behavior-x: none;\n }\n")),document.body.insertAdjacentHTML("beforeend","<div id=".concat(e,' class="usecsv_container loading"></div>'));var r=document.createElement("iframe");r.setAttribute("src","https://app.usecsv.com/importer"),n&&r.setAttribute("id",n);var i=document.getElementById(e);return null==i||i.appendChild(r),"inline"===t&&o&&(null==o||o.appendChild(i)),r}($,d,R),c=function(){var e;null===(e=document.getElementById($))||void 0===e||e.remove()},F=function(){return l&&l(),c()},_=x({iframe:e,methods:i(i(i(i(i(i(i({closeIframe:c},r?{onData:function(e){return r(e,F)}}:{}),a?{onRecordsInitial:a}:{}),s?{onRecordEdit:s}:{}),l?{onClose:l}:{}),y?{onError:y}:{}),E?{onFileUpload:E}:{}),w?{onMatchColumns:w}:{})});return _.promise.then((function(e){var r;null===(r=document.getElementById($))||void 0===r||r.classList.remove("loading"),e.setParams&&e.setParams({importerKey:t,user:n,metadata:o,importerDisplay:d,theme:u,batchSize:m,sampleFileURL:p,downloadExampleButton:h,dynamicColumns:v,defaultLanguage:g,customText:C,acceptedFileFormats:b,columnWidth:S})})),_}))},M=n.default.extend({name:"usecsv-button",props:{importerKey:{},user:{},metadata:{},onData:{},importerDisplay:{},onRecordsInitial:{},onRecordEdit:{},onClose:{},theme:{},batchSize:{},sampleFileURL:{},downloadExampleButton:{},dynamicColumns:{},defaultLanguage:{},onError:{},customText:{},acceptedFileFormats:{},onFileUpload:{},columnWidth:{},onMatchColumns:{},iframeId:{}},data:function(){return{hasSlot:!!this.$slots.default}},methods:{openModal:function(){I({importerKey:this.importerKey,user:this.user,metadata:this.metadata,onData:this.onData,importerDisplay:this.importerDisplay,onRecordsInitial:this.onRecordsInitial,onRecordEdit:this.onRecordEdit,onClose:this.onClose,theme:this.theme,batchSize:this.batchSize,sampleFileURL:this.sampleFileURL,downloadExampleButton:this.downloadExampleButton,dynamicColumns:this.dynamicColumns,defaultLanguage:this.defaultLanguage,onError:this.onError,customText:this.customText,acceptedFileFormats:this.acceptedFileFormats,onFileUpload:this.onFileUpload,columnWidth:this.columnWidth,onMatchColumns:this.onMatchColumns,iframeId:this.iframeId})},hasScopedSlot:function(){return"normalized"===(this.$scopedSlots.default&&this.$scopedSlots.default.name)}}});function j(e,t,n,o,r,i,a,s,c,d){"boolean"!=typeof a&&(c=s,s=a,a=!1);const l="function"==typeof n?n.options:n;let u;if(e&&e.render&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,r&&(l.functional=!0)),o&&(l._scopeId=o),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},l._ssrRegister=u):t&&(u=a?function(e){t.call(this,d(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),u)if(l.functional){const e=l.render;l.render=function(t,n){return u.call(n),e(t,n)}}else{const e=l.beforeCreate;l.beforeCreate=e?[].concat(e,u):[u]}return n}const L="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function A(e){return(e,t)=>function(e,t){const n=L?t.media||"default":e,o=O[n]||(O[n]={ids:new Set,styles:[]});if(!o.ids.has(e)){o.ids.add(e);let n=t.source;if(t.map&&(n+="\n/*# sourceURL="+t.map.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),o.element||(o.element=document.createElement("style"),o.element.type="text/css",t.media&&o.element.setAttribute("media",t.media),void 0===D&&(D=document.head||document.getElementsByTagName("head")[0]),D.appendChild(o.element)),"styleSheet"in o.element)o.styles.push(n),o.element.styleSheet.cssText=o.styles.filter(Boolean).join("\n");else{const e=o.ids.size-1,t=document.createTextNode(n),r=o.element.childNodes;r[e]&&o.element.removeChild(r[e]),r.length?o.element.insertBefore(t,r[e]):o.element.appendChild(t)}}}(e,t)}let D;const O={};var T=j({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"usecsv"},[e.hasScopedSlot()?n("div",[e._t("default",null,{openModal:e.openModal})],2):n("div",[n("button",{attrs:{type:"button",id:"usecsv-button"},on:{click:e.openModal}},[e._t("default",(function(){return[e._v(" open usecsv ")]}))],2)])])},staticRenderFns:[]},(function(e){e&&e("data-v-1c1e8164_0",{source:"#usecsv-button[data-v-1c1e8164]{background-color:#fff;color:#000;border:2px solid #000;border-radius:6px;padding:10px 15px;text-align:center;font-size:16px;cursor:pointer}",map:void 0,media:void 0})}),M,"data-v-1c1e8164",false,undefined,!1,A,void 0,void 0),N=function(){var e=T;return e.install=function(t){t.component("usecsv-button",e)},e}(),U=Object.freeze({__proto__:null,default:N});return Object.entries(U).forEach((function(e){var t=o(e,2),n=t[0],r=t[1];"default"!==n&&(N[n]=r)})),N}(Vue);
|
package/dist/UseCSVButton.ssr.js
CHANGED
|
@@ -47,7 +47,7 @@ function _arrayLikeToArray(arr, len) {
|
|
|
47
47
|
function _nonIterableRest() {
|
|
48
48
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
49
49
|
}/*!
|
|
50
|
-
* @usecsv/js v0.
|
|
50
|
+
* @usecsv/js v0.32.1
|
|
51
51
|
* (c) usecsv
|
|
52
52
|
* Released under the MIT License.
|
|
53
53
|
*/
|
|
@@ -710,7 +710,7 @@ whenDomReady.resume = function (doc) {
|
|
|
710
710
|
|
|
711
711
|
// eslint-disable-next-line dot-notation
|
|
712
712
|
var MOUNT_URL = {"MOUNT_URL":"https://app.usecsv.com/importer"}["MOUNT_URL"] ;
|
|
713
|
-
var insertIframe = function (id, importerDisplay) {
|
|
713
|
+
var insertIframe = function (id, importerDisplay, iframeId) {
|
|
714
714
|
var usecsvInlineWrapper = document.getElementById("usecsv-importer-inline-wrapper");
|
|
715
715
|
var usecsvContainerStyles = importerDisplay === "modal" || !usecsvInlineWrapper
|
|
716
716
|
? ".usecsv_container { position: fixed; top: 0px; bottom: 0; right: 0; left: 0; z-index: 100000; }"
|
|
@@ -719,6 +719,9 @@ var insertIframe = function (id, importerDisplay) {
|
|
|
719
719
|
document.body.insertAdjacentHTML("beforeend", "<div id=".concat(id, " class=\"usecsv_container loading\"></div>"));
|
|
720
720
|
var iframe = document.createElement("iframe");
|
|
721
721
|
iframe.setAttribute("src", MOUNT_URL);
|
|
722
|
+
if (iframeId) {
|
|
723
|
+
iframe.setAttribute("id", iframeId);
|
|
724
|
+
}
|
|
722
725
|
var usecsvContainer = document.getElementById(id);
|
|
723
726
|
usecsvContainer === null || usecsvContainer === void 0 ? void 0 : usecsvContainer.appendChild(iframe);
|
|
724
727
|
if (importerDisplay === "inline" && usecsvInlineWrapper) {
|
|
@@ -728,10 +731,10 @@ var insertIframe = function (id, importerDisplay) {
|
|
|
728
731
|
return iframe;
|
|
729
732
|
};
|
|
730
733
|
var useCsvPlugin = function (_a) {
|
|
731
|
-
var importerKey = _a.importerKey, user = _a.user, metadata = _a.metadata, onData = _a.onData, onRecordsInitial = _a.onRecordsInitial, onRecordEdit = _a.onRecordEdit, _b = _a.importerDisplay, importerDisplay = _b === void 0 ? "modal" : _b, onClose = _a.onClose, theme = _a.theme, batchSize = _a.batchSize, sampleFileURL = _a.sampleFileURL, downloadExampleButton = _a.downloadExampleButton, dynamicColumns = _a.dynamicColumns, defaultLanguage = _a.defaultLanguage, onError = _a.onError, customText = _a.customText, acceptedFileFormats = _a.acceptedFileFormats, onFileUpload = _a.onFileUpload, columnWidth = _a.columnWidth, onMatchColumns = _a.onMatchColumns;
|
|
734
|
+
var importerKey = _a.importerKey, user = _a.user, metadata = _a.metadata, onData = _a.onData, onRecordsInitial = _a.onRecordsInitial, onRecordEdit = _a.onRecordEdit, _b = _a.importerDisplay, importerDisplay = _b === void 0 ? "modal" : _b, onClose = _a.onClose, theme = _a.theme, batchSize = _a.batchSize, sampleFileURL = _a.sampleFileURL, downloadExampleButton = _a.downloadExampleButton, dynamicColumns = _a.dynamicColumns, defaultLanguage = _a.defaultLanguage, onError = _a.onError, customText = _a.customText, acceptedFileFormats = _a.acceptedFileFormats, onFileUpload = _a.onFileUpload, columnWidth = _a.columnWidth, onMatchColumns = _a.onMatchColumns, iframeId = _a.iframeId;
|
|
732
735
|
var id = "usecsv-".concat(Math.round(Math.random() * 100000000));
|
|
733
736
|
return whenDomReady().then(function () {
|
|
734
|
-
var iframe = insertIframe(id, importerDisplay);
|
|
737
|
+
var iframe = insertIframe(id, importerDisplay, iframeId);
|
|
735
738
|
var closeIframe = function () {
|
|
736
739
|
var _a;
|
|
737
740
|
(_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
@@ -792,7 +795,8 @@ var useCsvPlugin = function (_a) {
|
|
|
792
795
|
acceptedFileFormats: {},
|
|
793
796
|
onFileUpload: {},
|
|
794
797
|
columnWidth: {},
|
|
795
|
-
onMatchColumns: {}
|
|
798
|
+
onMatchColumns: {},
|
|
799
|
+
iframeId: {}
|
|
796
800
|
},
|
|
797
801
|
data: function data() {
|
|
798
802
|
return {
|
|
@@ -821,7 +825,8 @@ var useCsvPlugin = function (_a) {
|
|
|
821
825
|
acceptedFileFormats: this.acceptedFileFormats,
|
|
822
826
|
onFileUpload: this.onFileUpload,
|
|
823
827
|
columnWidth: this.columnWidth,
|
|
824
|
-
onMatchColumns: this.onMatchColumns
|
|
828
|
+
onMatchColumns: this.onMatchColumns,
|
|
829
|
+
iframeId: this.iframeId
|
|
825
830
|
});
|
|
826
831
|
},
|
|
827
832
|
hasScopedSlot: function hasScopedSlot() {
|
|
@@ -951,9 +956,9 @@ var __vue_render__ = function __vue_render__() {
|
|
|
951
956
|
var _c = _vm._self._c || _h;
|
|
952
957
|
return _c('div', {
|
|
953
958
|
staticClass: "usecsv"
|
|
954
|
-
}, [_vm.hasScopedSlot() ? _vm._ssrNode("<div data-v-
|
|
959
|
+
}, [_vm.hasScopedSlot() ? _vm._ssrNode("<div data-v-1c1e8164>", "</div>", [_vm._t("default", null, {
|
|
955
960
|
"openModal": _vm.openModal
|
|
956
|
-
})], 2) : _vm._ssrNode("<div data-v-
|
|
961
|
+
})], 2) : _vm._ssrNode("<div data-v-1c1e8164>", "</div>", [_vm._ssrNode("<button type=\"button\" id=\"usecsv-button\" data-v-1c1e8164>", "</button>", [_vm._t("default", function () {
|
|
957
962
|
return [_vm._v(" open usecsv ")];
|
|
958
963
|
})], 2)])]);
|
|
959
964
|
};
|
|
@@ -962,16 +967,16 @@ var __vue_staticRenderFns__ = [];
|
|
|
962
967
|
/* style */
|
|
963
968
|
var __vue_inject_styles__ = function __vue_inject_styles__(inject) {
|
|
964
969
|
if (!inject) return;
|
|
965
|
-
inject("data-v-
|
|
966
|
-
source: "#usecsv-button[data-v-
|
|
970
|
+
inject("data-v-1c1e8164_0", {
|
|
971
|
+
source: "#usecsv-button[data-v-1c1e8164]{background-color:#fff;color:#000;border:2px solid #000;border-radius:6px;padding:10px 15px;text-align:center;font-size:16px;cursor:pointer}",
|
|
967
972
|
map: undefined,
|
|
968
973
|
media: undefined
|
|
969
974
|
});
|
|
970
975
|
};
|
|
971
976
|
/* scoped */
|
|
972
|
-
var __vue_scope_id__ = "data-v-
|
|
977
|
+
var __vue_scope_id__ = "data-v-1c1e8164";
|
|
973
978
|
/* module identifier */
|
|
974
|
-
var __vue_module_identifier__ = "data-v-
|
|
979
|
+
var __vue_module_identifier__ = "data-v-1c1e8164";
|
|
975
980
|
/* functional template */
|
|
976
981
|
var __vue_is_functional_template__ = false;
|
|
977
982
|
/* style inject shadow dom */
|
|
@@ -25,5 +25,6 @@ declare const _default: import("vue/types/vue").ExtendedVue<Vue<Record<string, a
|
|
|
25
25
|
onFileUpload?: import("@usecsv/js/build/types/lib/types").onFileUploadType;
|
|
26
26
|
columnWidth?: import("@usecsv/js/build/types/lib/types").columnWidthType | undefined;
|
|
27
27
|
onMatchColumns?: import("@usecsv/js/build/types/lib/types").onMatchColumnsType | undefined;
|
|
28
|
+
iframeId?: string | undefined;
|
|
28
29
|
}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin>;
|
|
29
30
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usecsv/vuejs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/UseCSVButton.ssr.js",
|
|
6
6
|
"browser": "dist/UseCSVButton.esm.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"prepublishOnly": "yarn build"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@usecsv/js": "^0.
|
|
27
|
+
"@usecsv/js": "^0.32.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@babel/core": "^7.21.8",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@rollup/plugin-replace": "^5.0.2",
|
|
38
38
|
"@rushstack/eslint-patch": "^1.2.0",
|
|
39
39
|
"@semantic-release/changelog": "^6.0.3",
|
|
40
|
-
"@semantic-release/commit-analyzer": "^13.0.
|
|
40
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
41
41
|
"@semantic-release/git": "^10.0.1",
|
|
42
|
-
"@semantic-release/github": "^
|
|
43
|
-
"@semantic-release/release-notes-generator": "^14.0
|
|
42
|
+
"@semantic-release/github": "^12.0.6",
|
|
43
|
+
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
44
44
|
"@vue/cli-plugin-babel": "^5.0.8",
|
|
45
45
|
"@vue/cli-plugin-typescript": "^5.0.8",
|
|
46
46
|
"@vue/cli-service": "^5.0.8",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"rollup-plugin-terser": "^7.0.2",
|
|
56
56
|
"rollup-plugin-typescript2": "^0.34.1",
|
|
57
57
|
"rollup-plugin-vue": "^5.1.9",
|
|
58
|
-
"semantic-release": "^
|
|
58
|
+
"semantic-release": "^25.0.3",
|
|
59
59
|
"ttypescript": "^1.5.15",
|
|
60
60
|
"typescript": "<4.8",
|
|
61
61
|
"vue": "^2.6.14",
|
package/src/UseCSVButton.vue
CHANGED
|
@@ -32,6 +32,7 @@ export default /*#__PURE__*/ Vue.extend<
|
|
|
32
32
|
onFileUpload: {},
|
|
33
33
|
columnWidth: {},
|
|
34
34
|
onMatchColumns: {},
|
|
35
|
+
iframeId: {},
|
|
35
36
|
},
|
|
36
37
|
data() {
|
|
37
38
|
return {
|
|
@@ -61,6 +62,7 @@ export default /*#__PURE__*/ Vue.extend<
|
|
|
61
62
|
onFileUpload: this.onFileUpload,
|
|
62
63
|
columnWidth: this.columnWidth,
|
|
63
64
|
onMatchColumns: this.onMatchColumns,
|
|
65
|
+
iframeId: this.iframeId,
|
|
64
66
|
});
|
|
65
67
|
},
|
|
66
68
|
hasScopedSlot(): boolean {
|