Socket
Socket
Sign inDemoInstall

@xlork/core

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xlork/core - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

70

dist/index.min.js

@@ -1,4 +0,7 @@

var xLorkClient=function(e){this.props=e;let{settings:o={},licenseKey:t,user:i,origin:l="https://app.xlork.com",onCancel:n=function(e){console.log("[onCancelDefault]",e)},onComplete:r=function(e){console.log("[onCompleteDefault]",e)}}=this.props;o=Object.assign({},{title:"Data",allowInvalidSubmit:!0,theme:null,maxRecords:0,sampleUrl:null,columns:[]},o);let a="__xlork",d=l+"/embed/"+t,s='<div class="__xlork_iframe_container"><div class="__xlork_loader" id="__xlork_loader" style="height:100%"><div class="loader_ripple"><div></div><div></div></div><span> Connecting ...</span></div><iframe name="__xlork_iframe" id="__xlork_iframe" src="'+d+'" frameBorder="0" style="height:0%" ></iframe> </div>',p=` .__xlork_hidden {
display: none !important;
}
var xLorkClient=function(a){this.props=a;let{settings:d={},licenseKey:b,user:c,origin:e="https://app.xlork.com",onCancel:f=function(a){console.log("[onCancelDefault]",a)},onComplete:g=function(a){console.log("[onCompleteDefault]",a)}}=this.props;d=Object.assign({},{title:"Data",allowInvalidSubmit:!0,theme:null,maxRecords:0,sampleUrl:null,columns:[],display:"popup",header:!0,branding:!1,history:!1,social:!0},d);const h="__xlork",i=e+"/embed/"+b,j=`<div class=${"inline"==d?.display?"__xlork_iframe_container _inline":"__xlork_iframe_container"}><div class="__xlork_loader" id="__xlork_loader" style="height:100%"><div class="loader_ripple"><div></div><div></div></div><span> Connecting ...</span></div><iframe name="__xlork_iframe" id="__xlork_iframe" src=${i} frameBorder="0" style="height:0%" ></iframe> </div>`;let k={error:!0,message:""};const l=a=>new Promise(b=>setTimeout(b,a)),m=({settings:a,licenseKey:b,user:c,embedURL:d,onComplete:e,onCancel:f})=>{let g="";b?c?c?.email?d?e&&"function"!=typeof e?g=`[REQUIRED] onComplete should be function type.`:f&&"function"!=typeof f?g=`[REQUIRED] onCancel should be function type.`:a?a?.hasOwnProperty("columns")?0<!a?.columns?.length||a?.columns?.forEach(a=>{if(!(a.label&&a.key))return g=`[REQUIRED] each column should have label & key in 'columns'`,!1}):g=`[REQUIRED] should have required property 'columns'`:g=`[REQUIRED] setting not defined.`:g=`[REQUIRED] embedURL not defined.`:g=`[REQUIRED] email(unique) not defined.`:g=`[REQUIRED] user not defined.`:g="[REQUIRED] A Valid licenseKey is required.",k={error:!!g,message:g},n(k)},n=async a=>{if(a?.error&&a?.message)alert(a?.message);else{for(;"complete"!=document.readyState;)await l(100);o(j,"__xlork_main_container")}},o=function(a,b){const c=document.getElementById(b);c&&c.remove();let d=document.body||document.getElementsByTagName("body")[0],e=document.createElement("div");e.id=b,e.innerHTML=a,d.appendChild(e)},p=a=>{const e=a?.data;if("object"==typeof e&&e?.channel==h)switch(e?.type){case"[IFRAME LOADED]":const a={type:"[CONFIG INITILIZE]",channel:h,settings:d,licenseKey:b,user:c};window.frames.__xlork_iframe.postMessage(a,"*");try{document.getElementById("__xlork_loader").style.display="none",document.getElementById("__xlork_iframe").style.height="100%"}catch(a){console.log(a)}break;case"[onComplete]":g&&g(e.value);case"[onCancel]":r(),f&&f();}},q=a=>{const b=document.getElementById(a);b&&b.remove();const c=document.createElement("style");c.textContent=`.__xlork_hidden {
display: none;
}
.__xlork_modal_open {
overflow: hidden;
}
.__xlork_btn_default {

@@ -15,9 +18,9 @@ background-color: #7b66f0;

font-weight: 600;
}
}
.__xlork_error {
padding: 8px;
border: 1px solid;
border: 1px dashed;
color: red;
background: #ff000008;
}
background: #f00 8;
}
.__xlork_iframe_container {

@@ -40,3 +43,3 @@ position: fixed;

z-index: 2147483647;
}
}
.__xlork_iframe_container iframe {

@@ -49,15 +52,14 @@ width: 100%;

z-index: 9999;
/* background-color: #fff; */
}
.__xlork_loader {
}
.__xlork_iframe_container .__xlork_loader {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
color: #e8f0fe;
color: #fff;
font-size: 18px;
align-items: center;
font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}
.__xlork_loader .loader_ripple {
font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-weight: 500;
}
.__xlork_iframe_container .__xlork_loader .loader_ripple {
display: inline-block;

@@ -67,4 +69,4 @@ position: relative;

height: 80px;
}
.__xlork_loader .loader_ripple div {
}
.__xlork_iframe_container .__xlork_loader .loader_ripple div {
position: absolute;

@@ -75,6 +77,22 @@ border: 4px solid #fff;

animation: loader_ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.__xlork_loader .loader_ripple div:nth-child(2) {
}
.__xlork_iframe_container .__xlork_loader .loader_ripple div:nth-child(2) {
animation-delay: -0.5s;
}
}
.__xlork_iframe_container._inline {
background: transparent;
display: flex;
height: 100%;
width: 100%;
justify-self: center;
align-self: center;
backdrop-filter: blur(4px);
position: relative;
}
.__xlork_iframe_container._inline .__xlork_loader {
color: #707070;
}
.__xlork_iframe_container._inline .__xlork_loader .loader_ripple div {
border: 4px solid #707070;
}
@keyframes loader_ripple {

@@ -87,3 +105,3 @@ 0% {

opacity: 1;
}
}
100% {

@@ -95,6 +113,4 @@ top: 0px;

opacity: 0;
}
}
.__xlork_modal_open {
overflow: hidden;
}`,c={error:!0,message:""},m=e=>new Promise(o=>setTimeout(o,e)),f=({settings:e,licenseKey:o,user:t,embedURL:i,onComplete:l,onCancel:n})=>{let r="";o?t?t?.email?i?l&&"function"!=typeof l?r="[REQUIRED] onComplete should be function type.":n&&"function"!=typeof n?r="[REQUIRED] onCancel should be function type.":e?e?.hasOwnProperty("columns")?!e?.columns?.length>0?r="[REQUIRED] should have atlest one column in 'columns'":e?.columns?.forEach(e=>{if(!(e.label&&e.key))return r="[REQUIRED] each column should have label & key in 'columns'",!1}):r="[REQUIRED] should have required property 'columns'":r="[REQUIRED] setting not defined.":r="[REQUIRED] embedURL not defined.":r="[REQUIRED] email(unique) not defined.":r="[REQUIRED] user not defined.":r="[REQUIRED] A Valid licenseKey is required.",h(c={error:!!r,message:r})},h=async e=>{if(e?.error&&e?.message)alert(e?.message);else{for(;"complete"!=document.readyState;)await m(100);x(s,"__xlork_main_container")}},x=function(e,o){let t=document.getElementById(o);t&&t.remove();let i=document.body||document.getElementsByTagName("body")[0],l=document.createElement("div");l.id=o,l.innerHTML=e,i.appendChild(l)},$=e=>{let l=e?.data;if("object"==typeof l&&l?.channel==a)switch(l?.type){case"[IFRAME LOADED]":let d={type:"[CONFIG INITILIZE]",channel:a,settings:o,licenseKey:t,user:i};window.frames.__xlork_iframe.postMessage(d,"*");try{document.getElementById("__xlork_loader").style.display="none",document.getElementById("__xlork_iframe").style.height="100%"}catch(s){console.log(s)}break;case"[onComplete]":r&&r(l.value);break;case"[onCancel]":y(),n&&n()}},u=e=>{let o=document.getElementById(e);o&&o.remove();let t=document.createElement("style");t.textContent=p,t.id=e,t.type="text/css",document.head.appendChild(t)},y=()=>{window.removeEventListener("message",$,!1);try{document.body.classList.remove("__xlork_modal_open");let e=document.getElementById("__xlork_main_container");e&&e.remove()}catch(o){console.log("__xlork_modal_open",o)}};this.init=()=>{u("__xlork_styles"),window.addEventListener("message",$,!1),f({settings:o,licenseKey:t,user:i,embedURL:d,onComplete:r,onCancel:n})}};
}
}
`,c.id=a,c.type="text/css",document.head.appendChild(c)},r=()=>{window.removeEventListener("message",p,!1);try{document.body.classList.remove("__xlork_modal_open");const a=document.getElementById("__xlork_main_container");a&&a.remove()}catch(a){console.log("__xlork_modal_open",a)}};this.init=()=>{q("__xlork_styles"),window.addEventListener("message",p,!1),m({settings:d,licenseKey:b,user:c,embedURL:i,onComplete:g,onCancel:f})}};
{
"name": "@xlork/core",
"version": "2.0.5",
"version": "2.0.6",
"description": "XLork is a powerful Node.js/ Vanilla js package for parsing and manipulating CSV and XML files. With its intuitive API, XLork makes it easy to read, write, and modify CSV and XML data in your Node.js applications. Whether you're dealing with large datasets or just need to perform some quick data transformations, XLork has you covered. Plus, with its comprehensive documentation and responsive community support, XLork is the perfect choice for developers looking to work with CSV and XML data in Node.js. Install XLork today and start parsing and manipulating your data with ease!",

@@ -13,9 +13,4 @@ "author": "Shavron",

],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"build-lib": "rollup -c"
},
"keywords": [
"pure Javascript uploader",
"react",

@@ -33,6 +28,6 @@ "react csv uploader",

"dromo",
"flatfile alternative"
],
"devDependencies": {},
"dependencies": {}
"flatfile alternative",
"osmos",
"handsontable"
]
}

@@ -70,4 +70,9 @@ ## xlork

## React Package
For React Package - https://www.npmjs.com/package/@xlork/reacts
## License
MIT © [xlork]
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc