@senlinz/import-export 0.0.1-beta.5 → 0.1.0-beta.10

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.
Files changed (37) hide show
  1. package/README.md +60 -0
  2. package/dist/components/editable-cell.js +2 -0
  3. package/dist/components/import-export-definition.js +2 -0
  4. package/dist/components/import-export-studio.js +2 -0
  5. package/dist/components/import-export-table.js +2 -0
  6. package/dist/components/index.js +1 -1
  7. package/dist/components/p-2f3be56b.js +2 -0
  8. package/dist/components/p-c9904f6a.js +2 -0
  9. package/dist/components/p-dd1bf849.js +2 -0
  10. package/dist/components/p-ddbe189c.js +2 -0
  11. package/dist/components/p-f7586df1.js +2 -0
  12. package/dist/tests/dist/editable-cell.d.ts +11 -0
  13. package/dist/{components → tests/dist}/imexport-table.d.ts +1 -1
  14. package/dist/tests/dist/import-export-definition.d.ts +11 -0
  15. package/dist/tests/dist/import-export-definiton.d.ts +11 -0
  16. package/dist/tests/dist/import-export-studio.d.ts +11 -0
  17. package/dist/tests/dist/import-export-table.d.ts +11 -0
  18. package/dist/tests/dist/table-definition.d.ts +11 -0
  19. package/dist/types/components/editable-cell/editable-cell.d.ts +18 -0
  20. package/dist/types/components/imexport-table/imexport-table.d.ts +4 -5
  21. package/dist/types/components/import-export-definition/import-export-definition.d.ts +7 -0
  22. package/dist/types/components/import-export-definition/import-export-definiton.d.ts +6 -0
  23. package/dist/types/components/import-export-studio/import-export-studio.d.ts +14 -0
  24. package/dist/types/components/import-export-studio/import-export-table.d.ts +5 -0
  25. package/dist/types/components/import-export-table/import-export-table.d.ts +6 -0
  26. package/dist/types/components/table-definition/table-definition.d.ts +0 -0
  27. package/dist/types/components.d.ts +79 -23
  28. package/dist/types/declarations/ExcelDefinition.d.ts +17 -0
  29. package/dist/types/declarations/ExcelDefintion.d.ts +17 -0
  30. package/dist/types/index.d.ts +14 -1
  31. package/dist/types/types/index.d.ts +10 -3
  32. package/dist/types/utils/utils.d.ts +8 -5
  33. package/dist/types/utils.d.ts +10 -0
  34. package/package.json +12 -12
  35. package/dist/components/imexport-table.js +0 -2
  36. package/dist/components/p-4789c9c3.js +0 -2
  37. /package/dist/{components → tests/dist}/index.d.ts +0 -0
@@ -0,0 +1,2 @@
1
+ import{p as t,H as e,h as a}from"./p-ddbe189c.js";const o=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.definition=void 0,this.data=[]}render(){return this.definition?a("div",{class:"import-export-table"},this.data&&a("table",{class:"data-table"},a("thead",null,a("tr",null,this.definition.columns.map((t=>a("th",null,t.name))))),a("tbody",null,this.data.map((t=>a("tr",null,this.definition.columns.map((e=>a("td",null,t[e.key]))))))))):null}static get style(){return".data-table{width:100%;border-collapse:collapse;margin:0;background-color:#fff;border-radius:8px;overflow:hidden;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1)}.data-table th,.data-table td{border-width:0;padding:8px;text-align:left}.data-table th{background-color:#4caf50;color:white;font-weight:bold}.data-table tr:nth-child(even){background-color:#e8f5e9}.data-table tr:hover{background-color:#c8e6c9}"}},[1,"import-export-table",{definition:[16],data:[16]}]);function l(){if("undefined"==typeof customElements)return;["import-export-table"].forEach((t=>{if("import-export-table"===t)customElements.get(t)||customElements.define(t,o)}))}l();export{o as I,l as d};
2
+ //# sourceMappingURL=p-c9904f6a.js.map
@@ -0,0 +1,2 @@
1
+ import{p as t,H as e,c as i,h as s}from"./p-ddbe189c.js";const n={zh:{tooltip:"双击编辑"},en:{tooltip:"Double click to edit"}},h=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.valueChange=i(this,"valueChange",7),this.dblHandler=t=>{this.showEditor()},this.showEditor=()=>{this.contentELement.style.display="none",this.inputElement.style.display="block",this.inputElement.focus()},this.hideEditor=()=>{this.contentELement.style.display="block",this.inputElement.style.display="none"},this.keyUpHandler=t=>{if(t instanceof KeyboardEvent&&"Enter"===t.key)return void this.completeInput();const e=t.target;this.inputValue=e.value},this.changeHandler=t=>{t.target instanceof HTMLInputElement&&(this.inputValue=t.target.value),this.completeInput()},this.completeInput=()=>{this.contentELement.innerText=this.inputValue,this.hideEditor(),this.valueChange.emit(this.inputValue)},this.culture="en",this.type="text",this.value=void 0,this.inputValue=void 0}componentWillLoad(){this.value instanceof Date?this.inputValue=this.value.toISOString().slice(0,10):this.inputValue=this.value}render(){return s("div",{key:"8452a378b3ccc0989edd053391e0910ab817242e",class:"editable-cell-container",onDblClick:this.dblHandler,title:n[this.culture].tooltip},s("span",{key:"f7bbd64a45084ddb0d08c7b39b0159a116b31aec",class:"value",ref:t=>this.contentELement=t},this.value),s("input",{key:"2a7c5fc922be2adea3ce116430928c8d60f23102",type:this.type,class:"cell-editor",value:this.inputValue,onKeyUp:this.keyUpHandler,onChange:this.changeHandler,onBlur:this.completeInput,ref:t=>this.inputElement=t}))}static get style(){return".editable-cell-container{position:relative;width:100%;height:100%;display:flex;margin:0;padding:0}.cell-editor{display:none;z-index:1;flex:1 0 0;width:100%;line-height:1;font-size:1rem;background-color:transparent;border-width:0;outline:none;border-bottom:1px solid #ccc}"}},[1,"editable-cell",{culture:[1],type:[1],value:[1],inputValue:[32]}]);function l(){if("undefined"==typeof customElements)return;["editable-cell"].forEach((t=>{if("editable-cell"===t)customElements.get(t)||customElements.define(t,h)}))}l();export{h as E,l as d};
2
+ //# sourceMappingURL=p-dd1bf849.js.map
@@ -0,0 +1,2 @@
1
+ const e="hydrated",n=!1,t=!1,l=!0,o=!1;var r=Object.defineProperty,s=new WeakMap,i=e=>s.get(e),c=(e,n)=>n in e,u=(e,n)=>(0,console.error)(e,n),a=new Map,f="undefined"!=typeof window?window:{},h=f.document||{head:{}},d=f.HTMLElement||class{},p={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},m=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),y=!1,b=[],$=[],v=(e,n)=>t=>{e.push(t),y||(y=!0,n&&4&p.t?S(g):p.raf(g))},w=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){u(e)}e.length=0},g=()=>{w(b),w($),(y=b.length>0)&&p.raf(g)},S=e=>{return Promise.resolve(n).then(e);var n},j=v($,!0),k=e=>{const n=new URL(e,p.l);return n.origin!==f.location.origin?n.href:n.pathname},O=e=>p.l=e,E={},C=e=>"object"===(e=typeof e)||"function"===e;((e,n)=>{for(var t in n)r(e,t,{get:n[t],enumerable:!0})})({},{err:()=>x,map:()=>P,ok:()=>M,unwrap:()=>_,unwrapErr:()=>N});var M=e=>({isOk:!0,isErr:!1,value:e}),x=e=>({isOk:!1,isErr:!0,value:e});function P(e,n){if(e.isOk){const t=n(e.value);return t instanceof Promise?t.then((e=>M(e))):M(t)}if(e.isErr){const n=e.value;return x(n)}throw"should never get here"}var A,H,_=e=>{if(e.isOk)return e.value;throw e.value},N=e=>{if(e.isErr)return e.value;throw e.value},R=(e,n,...t)=>{let l=null,o=null,r=!1,s=!1;const i=[],c=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((r="function"!=typeof e&&!C(l))&&(l=String(l)),r&&s?i[i.length-1].o+=l:i.push(r?U(null,l):l),s=r)};if(c(t),n){n.key&&(o=n.key);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}const u=U(e,null);return u.i=n,i.length>0&&(u.u=i),u.h=o,u},U=(e,n)=>{const t={t:0,p:e,o:n,m:null,u:null,i:null,h:null};return t},W={},D=(e,n,t)=>{const l=e;return{emit:e=>F(l,n,{bubbles:!!(4&t),composed:!!(2&t),cancelable:!!(1&t),detail:e})}},F=(e,n,t)=>{const l=p.ce(n,t);return e.dispatchEvent(l),l},L=new WeakMap,q=e=>{const n=e.$,t=e.$hostElement$,l=n.t,o=(n.v,()=>{}),r=((e,n)=>{var t;const l=V(n),o=a.get(l);if(e=11===e.nodeType?e:h,o)if("string"==typeof o){e=e.head||e;let r,s=L.get(e);if(s||L.set(e,s=new Set),!s.has(l)){{r=h.createElement("style"),r.innerHTML=o;const l=null!=(t=p.S)?t:function(){var e,n,t;return null!=(t=null==(n=null==(e=h.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?t:void 0}();if(null!=l&&r.setAttribute("nonce",l),!(1&n.t))if("HEAD"===e.nodeName){const n=e.querySelectorAll("link[rel=preconnect]"),t=n.length>0?n[n.length-1].nextSibling:document.querySelector("style");e.insertBefore(r,t)}else"host"in e?e.prepend(r):e.append(r);1&n.t&&"HEAD"!==e.nodeName&&e.insertBefore(r,null)}4&n.t&&(r.innerHTML+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&2&l&&(t["s-sc"]=r,t.classList.add(r+"-h")),o()},V=(e,n)=>"sc-"+e.v,z=(e,n,t,l,o,r)=>{if(t!==l){let s=c(e,n),i=n.toLowerCase();if("class"===n){const n=e.classList,o=G(t),r=G(l);n.remove(...o.filter((e=>e&&!r.includes(e)))),n.add(...r.filter((e=>e&&!o.includes(e))))}else if("key"===n);else if("ref"===n)l&&l(e);else if(e.__lookupSetter__(n)||"o"!==n[0]||"n"!==n[1]){const i=C(l);if((s||i&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[n]=l;else{const o=null==l?"":l;"list"===n?s=!1:null!=t&&e[n]==o||("function"==typeof e.__lookupSetter__(n)?e[n]=o:e.setAttribute(n,o))}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(n)||e.removeAttribute(n):(!s||4&r||o)&&!i&&(l=!0===l?"":l,e.setAttribute(n,l))}else if(n="-"===n[2]?n.slice(3):c(f,i)?i.slice(2):i[2]+n.slice(3),t||l){const o=n.endsWith(I);n=n.replace(J,""),t&&p.rel(e,n,t,o),l&&p.ael(e,n,l,o)}}},B=/\s/,G=e=>e?e.split(B):[],I="Capture",J=new RegExp(I+"$"),K=(e,n,t)=>{const l=11===n.m.nodeType&&n.m.host?n.m.host:n.m,o=e&&e.i||E,r=n.i||E;for(const e of Q(Object.keys(o)))e in r||z(l,e,o[e],void 0,t,n.t);for(const e of Q(Object.keys(r)))z(l,e,o[e],r[e],t,n.t)};function Q(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var T=!1,X=!1,Y=(e,l,o,r)=>{const s=l.u[o];let i,c,u=0;if(null!==s.o)i=s.m=h.createTextNode(s.o);else{i=s.m=h.createElement(!T&&t&&2&s.t?"slot-fb":s.p),K(null,s,X);if(!!i.getRootNode().querySelector("body")&&n&&null!=A&&i["s-si"]!==A&&i.classList.add(i["s-si"]=A),s.u)for(u=0;u<s.u.length;++u)c=Y(e,s,u),c&&i.appendChild(c)}return i["s-hn"]=H,i},Z=(e,n,t,l,o,r)=>{let s,i=e;for(i.shadowRoot&&i.tagName===H&&(i=i.shadowRoot);o<=r;++o)l[o]&&(s=Y(null,t,o),s&&(l[o].m=s,oe(i,s,n)))},ee=(e,n,t)=>{for(let l=n;l<=t;++l){const n=e[l];if(n){const e=n.m;le(n),e&&e.remove()}}},ne=(e,n,t=!1)=>e.p===n.p&&(!!t||e.h===n.h),te=(e,n,t=!1)=>{const o=n.m=e.m,r=e.u,s=n.u,i=n.o;null===i?(K(e,n,X),null!==r&&null!==s?((e,n,t,l,o=!1)=>{let r,s,i=0,c=0,u=0,a=0,f=n.length-1,h=n[0],d=n[f],p=l.length-1,m=l[0],y=l[p];for(;i<=f&&c<=p;)if(null==h)h=n[++i];else if(null==d)d=n[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(ne(h,m,o))te(h,m,o),h=n[++i],m=l[++c];else if(ne(d,y,o))te(d,y,o),d=n[--f],y=l[--p];else if(ne(h,y,o))te(h,y,o),oe(e,h.m,d.m.nextSibling),h=n[++i],y=l[--p];else if(ne(d,m,o))te(d,m,o),oe(e,d.m,h.m),d=n[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(n[a]&&null!==n[a].h&&n[a].h===m.h){u=a;break}u>=0?(s=n[u],s.p!==m.p?r=Y(n&&n[c],t,u):(te(s,m,o),n[u]=void 0,r=s.m),m=l[++c]):(r=Y(n&&n[c],t,c),m=l[++c]),r&&oe(h.m.parentNode,r,h.m)}i>f?Z(e,null==l[p+1]?null:l[p+1].m,t,l,c,p):c>p&&ee(n,i,f)})(o,r,n,s,t):null!==s?(null!==e.o&&(o.textContent=""),Z(o,null,n,s,0,s.length-1)):!t&&l&&null!==r&&ee(r,0,r.length-1)):e.o!==i&&(o.data=i)},le=e=>{e.i&&e.i.ref&&e.i.ref(null),e.u&&e.u.map(le)},oe=(e,n,t)=>null==e?void 0:e.insertBefore(n,t),re=(e,n,t=!1)=>{const l=e.$hostElement$,o=e.$,r=e.j||U(null,null),s=(i=n)&&i.p===W?n:R(null,null,n);var i;if(H=l.tagName,t&&s.i)for(const e of Object.keys(s.i))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(s.i[e]=l[e]);s.p=null,s.t|=4,e.j=s,s.m=r.m=l.shadowRoot||l,A=l["s-sc"],T=!!(1&o.t),te(r,s,t)},se=(e,n)=>{n&&!e.k&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.k=n)))},ie=(e,n)=>{if(e.t|=16,4&e.t)return void(e.t|=512);se(e,e.O);return j((()=>ce(e,n)))},ce=(e,n)=>{const t=e.$hostElement$,l=(e.$.v,()=>{}),o=t;if(!o)throw new Error(`Can't render component <${t.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let r;return n&&(r=me(o,"componentWillLoad")),l(),ue(r,(()=>fe(e,o,n)))},ue=(e,n)=>ae(e)?e.then(n).catch((e=>{console.error(e),n()})):n(),ae=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,fe=async(e,n,t)=>{var l;const o=e.$hostElement$,r=(e.$.v,()=>{}),s=o["s-rc"];t&&q(e);const i=(e.$.v,()=>{});he(e,n,o,t),s&&(s.map((e=>e())),o["s-rc"]=void 0),i(),r();{const n=null!=(l=o["s-p"])?l:[],t=()=>de(e);0===n.length?t():(Promise.all(n).then(t),e.t|=4,n.length=0)}},he=(e,n,t,l)=>{try{n=n.render(),e.t&=-17,e.t|=2,re(e,n,l)}catch(n){u(n,e.$hostElement$)}return null},de=e=>{e.$.v;const n=e.$hostElement$,t=()=>{},l=e.O;64&e.t?t():(e.t|=64,ye(n),t(),e.C(n),l||pe()),e.k&&(e.k(),e.k=void 0),512&e.t&&S((()=>ie(e,!1))),e.t&=-517},pe=e=>{ye(h.documentElement),S((()=>F(f,"appload",{detail:{namespace:"import-export"}})))},me=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){u(e)}},ye=n=>{var t;return n.classList.add(null!=(t=e)?t:"hydrated")},be=(e,n,t,l)=>{const o=i(e),r=o.M.get(n),s=o.t;var c,u;c=t,u=l.P[n][0],t=null==c||C(c)?c:1&u?String(c):c;const a=Number.isNaN(r)&&Number.isNaN(t);t!==r&&!a&&(o.M.set(n,t),2==(18&s)&&ie(o,!1))},$e=(e,n,t)=>{var l,r;const s=e.prototype;if(n.P||o){const t=Object.entries(null!=(l=n.P)?l:{});t.map((([e,[t]])=>{(31&t||32&t)&&Object.defineProperty(s,e,{get(){return n=e,i(this).M.get(n);var n},set(t){be(this,e,t,n)},configurable:!0,enumerable:!0})}));{const l=new Map;s.attributeChangedCallback=function(e,t,o){p.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))o=this[c],delete this[c];else{if(s.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==o)return;if(null==c){const l=i(this),s=null==l?void 0:l.t;if(s&&!(8&s)&&128&s&&o!==t){const l=this,s=null==(r=n.A)?void 0:r[e];null==s||s.forEach((n=>{null!=l[n]&&l[n].call(l,o,t,e)}))}return}}this[c]=(null!==o||"boolean"!=typeof this[c])&&o}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=n.A)?r:{}),...t.filter((([e,n])=>15&n[0])).map((([e,n])=>{const t=n[1]||e;return l.set(t,e),t}))]))}}return e},ve=async(e,n,t,l)=>{let o;if(!(32&n.t)){n.t|=32;{o=e.constructor;const t=e.localName;customElements.whenDefined(t).then((()=>n.t|=128))}if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const n=V(t);if(!a.has(n)){const l=(t.v,()=>{});((e,n,t)=>{let l=a.get(e);m&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,a.set(e,l)})(n,e,!!(1&t.t)),l()}}}const r=n.O,s=()=>ie(n,!0);r&&r["s-rc"]?r["s-rc"].push(s):s()},we=(e,n)=>{const t={t:n[0],v:n[1]};return t.P=n[2],Object.assign(e.prototype,{__registerHost(){((e,n)=>{const t={t:0,$hostElement$:e,$:n,M:new Map};t.H=new Promise((e=>t.C=e)),e["s-p"]=[],e["s-rc"]=[],s.set(e,t)})(this,t)},connectedCallback(){i(this),(e=>{if(!(1&p.t)){const n=i(e),t=n.$,l=(t.v,()=>{});if(1&n.t)(null==n?void 0:n._)||(null==n?void 0:n.H)&&n.H.then((()=>{}));else{n.t|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){se(n,n.O=t);break}}t.P&&Object.entries(t.P).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),ve(e,n,t)}l()}})(this)},disconnectedCallback(){(async e=>{1&p.t||i(e)})(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${t.v}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else this.attachShadow({mode:"open"})}}),e.is=t.v,$e(e,t)},ge=e=>p.S=e,Se=e=>Object.assign(p,e);export{d as H,ge as a,Se as b,D as c,k as g,R as h,we as p,O as s};
2
+ //# sourceMappingURL=p-ddbe189c.js.map
@@ -0,0 +1,2 @@
1
+ import{p as e,H as l,h as t}from"./p-ddbe189c.js";import{d as i}from"./p-dd1bf849.js";const a={zh:{excelName:"Excel名称",sheetName:"表名",author:"作者",createTime:"创建时间",key:"键",name:"名称",width:"宽度",note:"备注",dataType:"数据类型",allowedValues:"允许值",noDefinition:"未提供定义"},en:{excelName:"Excel Name",sheetName:"Sheet Name",author:"Author",createTime:"Created Time",key:"Key",name:"Name",width:"Width",note:"Note",dataType:"Data Type",allowedValues:"Allowed Values",noDefinition:"No definition provided"}},n=e(class extends l{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.definition=void 0,this.culture="en",this.cultureResources=void 0}render(){var e,l;const i=null!==(l=null===(e=this.cultureResources)||void 0===e?void 0:e[this.culture])&&void 0!==l?l:a[this.culture];return this.definition?t("div",{class:"table-definition"},t("div",{class:"definition-details"},t("div",{class:"detail-item"},t("span",{class:"label"},i.excelName),t("span",{class:"value"},t("editable-cell",{value:this.definition.name,onValueChange:e=>this.definition.name=e.detail}))),t("div",{class:"detail-item"},t("span",{class:"label"},i.sheetName),t("span",{class:"value"},t("editable-cell",{value:this.definition.sheetName,onValueChange:e=>this.definition.sheetName=e.detail}))),t("div",{class:"detail-item"},t("span",{class:"label"},i.author),t("span",{class:"value"},t("editable-cell",{value:this.definition.author,onValueChange:e=>this.definition.author=e.detail}))),t("div",{class:"detail-item"},t("span",{class:"label"},i.createTime),t("span",{class:"value"},t("editable-cell",{value:this.definition.createTime,type:"datetime-local",onValueChange:e=>this.definition.createTime=e.detail})))),t("table",{class:"definition-table"},t("thead",null,t("tr",null,t("th",null,i.key),t("th",null,i.name),t("th",null,i.width),t("th",null,i.note),t("th",null,i.dataType),t("th",null,i.allowedValues))),t("tbody",null,this.definition.columns.map((e=>{var l,i,a;return t("tr",null,t("td",null,t("editable-cell",{value:e.key,onValueChange:l=>e.key=l.detail})),t("td",null,t("editable-cell",{value:e.name,onValueChange:l=>e.name=l.detail})),t("td",null,t("editable-cell",{value:null===(l=e.width)||void 0===l?void 0:l.toString(),onValueChange:l=>e.width=parseInt(l.detail)})),t("td",null,t("editable-cell",{value:e.note,onValueChange:l=>e.note=l.detail})),t("td",null,e.dataType),t("td",null,t("editable-cell",{value:null!==(a=null===(i=e.allowedValues)||void 0===i?void 0:i.join(", "))&&void 0!==a?a:"",onValueChange:l=>e.allowedValues=l.detail.split(",")})))}))))):t("div",{class:"no-definition"},i.noDefinition)}static get style(){return".table-definition{font-family:Arial, sans-serif;margin:4px;padding:20px;border:1px solid #ccc;border-radius:8px;background-color:#f9f9f9;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1)}.definition-name{font-size:24px;font-weight:bold;margin-bottom:10px;color:#333}.definition-details{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.detail-item{display:flex;gap:10px;justify-content:space-between}.label{font-weight:bold;padding-right:10px;flex:0 0 150px;text-align:right;color:#333;border-radius:4px;padding:5px}.value{flex:1;text-align:left;padding:5px;background-color:#e8f5e9;border-radius:4px;box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1)}.definition-table{width:100%;border-collapse:collapse;margin-top:20px;background-color:#fff;border-radius:8px;overflow:hidden;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border:none}.definition-table th,.definition-table td{border-width:0;padding:8px;text-align:left}.definition-table th{background-color:#4caf50;color:white;font-weight:bold}.definition-table tr:nth-child(even){background-color:#e8f5e9}.definition-table tr:hover{background-color:#c8e6c9}.no-definition{font-size:18px;color:#888;text-align:center;margin-top:20px}"}},[1,"import-export-definition",{definition:[16],culture:[1],cultureResources:[16]}]);function o(){if("undefined"==typeof customElements)return;["import-export-definition","editable-cell"].forEach((e=>{switch(e){case"import-export-definition":customElements.get(e)||customElements.define(e,n);break;case"editable-cell":customElements.get(e)||i()}}))}o();export{n as I,o as d};
2
+ //# sourceMappingURL=p-f7586df1.js.map
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../../dist/types/components";
2
+
3
+ interface EditableCell extends Components.EditableCell, HTMLElement {}
4
+ export const EditableCell: {
5
+ prototype: EditableCell;
6
+ new (): EditableCell;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -1,4 +1,4 @@
1
- import type { Components, JSX } from "../types/components";
1
+ import type { Components, JSX } from "../../dist/types/components";
2
2
 
3
3
  interface ImexportTable extends Components.ImexportTable, HTMLElement {}
4
4
  export const ImexportTable: {
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../../dist/types/components";
2
+
3
+ interface ImportExportDefinition extends Components.ImportExportDefinition, HTMLElement {}
4
+ export const ImportExportDefinition: {
5
+ prototype: ImportExportDefinition;
6
+ new (): ImportExportDefinition;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../../dist/types/components";
2
+
3
+ interface ImportExportDefiniton extends Components.ImportExportDefiniton, HTMLElement {}
4
+ export const ImportExportDefiniton: {
5
+ prototype: ImportExportDefiniton;
6
+ new (): ImportExportDefiniton;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../../dist/types/components";
2
+
3
+ interface ImportExportStudio extends Components.ImportExportStudio, HTMLElement {}
4
+ export const ImportExportStudio: {
5
+ prototype: ImportExportStudio;
6
+ new (): ImportExportStudio;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../../dist/types/components";
2
+
3
+ interface ImportExportTable extends Components.ImportExportTable, HTMLElement {}
4
+ export const ImportExportTable: {
5
+ prototype: ImportExportTable;
6
+ new (): ImportExportTable;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../../dist/types/components";
2
+
3
+ interface TableDefinition extends Components.TableDefinition, HTMLElement {}
4
+ export const TableDefinition: {
5
+ prototype: TableDefinition;
6
+ new (): TableDefinition;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,18 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ export declare class EditableCellComponent {
3
+ culture: 'zh' | 'en';
4
+ type: 'text' | 'datetime-local';
5
+ value: string | Date;
6
+ inputValue: string;
7
+ valueChange: EventEmitter<string>;
8
+ inputElement: HTMLInputElement;
9
+ contentELement: HTMLElement;
10
+ componentWillLoad(): void;
11
+ dblHandler: (_: MouseEvent) => void;
12
+ showEditor: () => void;
13
+ hideEditor: () => void;
14
+ keyUpHandler: (event: KeyboardEvent) => void;
15
+ changeHandler: (e: Event) => void;
16
+ completeInput: () => void;
17
+ render(): any;
18
+ }
@@ -1,20 +1,19 @@
1
1
  import { EventEmitter } from 'stream';
2
- import { type ExcelDefinition } from '../../types';
2
+ import { type ExcelDefinition } from '../../declarations/ExcelDefintion';
3
3
  export declare class ImexportTableComponent {
4
4
  info: ExcelDefinition;
5
5
  imported: EventEmitter<any>;
6
- importExcel<T>(options?: {
6
+ importExcel(options?: {
7
7
  buffer?: Uint8Array;
8
8
  }): Promise<void>;
9
- exportExcelTemplate(): Promise<void>;
9
+ downloadExcelTemplate(): Promise<void>;
10
10
  exportExcel(data: any[]): Promise<void>;
11
11
  componentDidLoad(): void;
12
12
  fileInput: HTMLInputElement;
13
13
  linkInput: HTMLAnchorElement;
14
14
  private setDownloadLink;
15
15
  private download;
16
- private exportTemplateHandler;
17
- private getInfo;
18
16
  private onFileChange;
17
+ private exportDataToExcel;
19
18
  render(): any;
20
19
  }
@@ -0,0 +1,7 @@
1
+ import { ExcelDefinition } from '../../declarations/ExcelDefinition';
2
+ export declare class ImportExportDefinitionComponent {
3
+ definition: ExcelDefinition;
4
+ culture: 'zh' | 'en';
5
+ cultureResources?: Record<string, Record<string, string>>;
6
+ render(): any;
7
+ }
@@ -0,0 +1,6 @@
1
+ import { ExcelDefinition } from '../../declarations/ExcelDefintion';
2
+ export declare class ImportExportDefinitionComponent {
3
+ definition: ExcelDefinition;
4
+ culture: 'zh' | 'en';
5
+ render(): any;
6
+ }
@@ -0,0 +1,14 @@
1
+ import { type ExcelDefinition } from '../../declarations/ExcelDefinition';
2
+ export declare class ImportExportStudioComponent {
3
+ definition: ExcelDefinition;
4
+ culture: 'zh' | 'en';
5
+ data: any[];
6
+ showDefinition: boolean;
7
+ showDataSource: boolean;
8
+ componentWillLoad(): void;
9
+ toggleDefinitionVisibility: () => void;
10
+ toggleDataSourceVisibility: () => void;
11
+ importExcelHandler: (definition: ExcelDefinition) => Promise<void>;
12
+ handleDataSourceChange: (e: Event) => void;
13
+ render(): any;
14
+ }
@@ -0,0 +1,5 @@
1
+ import { type ExcelDefinition } from '../../declarations/ExcelDefintion';
2
+ export declare class ImportExportTableComponent {
3
+ info: ExcelDefinition;
4
+ render(): any;
5
+ }
@@ -0,0 +1,6 @@
1
+ import { type ExcelDefinition } from '../../declarations/ExcelDefinition';
2
+ export declare class ImportExportTableComponent {
3
+ definition: ExcelDefinition;
4
+ data: any[];
5
+ render(): any;
6
+ }
@@ -5,56 +5,112 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
- import { ExcelDefinition } from "./types";
9
- export { ExcelDefinition } from "./types";
8
+ import { ExcelDefinition } from "./declarations/ExcelDefinition";
9
+ export { ExcelDefinition } from "./declarations/ExcelDefinition";
10
10
  export namespace Components {
11
- interface ImexportTable {
12
- "exportExcel": (data: any[]) => Promise<void>;
13
- "exportExcelTemplate": () => Promise<void>;
14
- "importExcel": <T>(options?: { buffer?: Uint8Array; }) => Promise<void>;
15
- "info": ExcelDefinition;
11
+ interface EditableCell {
12
+ "culture": 'zh' | 'en';
13
+ "type": 'text' | 'datetime-local';
14
+ "value": string | Date;
15
+ }
16
+ interface ImportExportDefinition {
17
+ "culture": 'zh' | 'en';
18
+ "cultureResources"?: Record<string, Record<string, string>>;
19
+ "definition": ExcelDefinition;
20
+ }
21
+ interface ImportExportStudio {
22
+ "culture": 'zh' | 'en';
23
+ "data": any[];
24
+ "definition": ExcelDefinition;
25
+ }
26
+ interface ImportExportTable {
27
+ "data": any[];
28
+ "definition": ExcelDefinition;
16
29
  }
17
30
  }
18
- export interface ImexportTableCustomEvent<T> extends CustomEvent<T> {
31
+ export interface EditableCellCustomEvent<T> extends CustomEvent<T> {
19
32
  detail: T;
20
- target: HTMLImexportTableElement;
33
+ target: HTMLEditableCellElement;
21
34
  }
22
35
  declare global {
23
- interface HTMLImexportTableElementEventMap {
24
- "imported": any;
36
+ interface HTMLEditableCellElementEventMap {
37
+ "valueChange": string;
25
38
  }
26
- interface HTMLImexportTableElement extends Components.ImexportTable, HTMLStencilElement {
27
- addEventListener<K extends keyof HTMLImexportTableElementEventMap>(type: K, listener: (this: HTMLImexportTableElement, ev: ImexportTableCustomEvent<HTMLImexportTableElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
39
+ interface HTMLEditableCellElement extends Components.EditableCell, HTMLStencilElement {
40
+ addEventListener<K extends keyof HTMLEditableCellElementEventMap>(type: K, listener: (this: HTMLEditableCellElement, ev: EditableCellCustomEvent<HTMLEditableCellElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
28
41
  addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
29
42
  addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
30
43
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
31
- removeEventListener<K extends keyof HTMLImexportTableElementEventMap>(type: K, listener: (this: HTMLImexportTableElement, ev: ImexportTableCustomEvent<HTMLImexportTableElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
44
+ removeEventListener<K extends keyof HTMLEditableCellElementEventMap>(type: K, listener: (this: HTMLEditableCellElement, ev: EditableCellCustomEvent<HTMLEditableCellElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
32
45
  removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
33
46
  removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
34
47
  removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
35
48
  }
36
- var HTMLImexportTableElement: {
37
- prototype: HTMLImexportTableElement;
38
- new (): HTMLImexportTableElement;
49
+ var HTMLEditableCellElement: {
50
+ prototype: HTMLEditableCellElement;
51
+ new (): HTMLEditableCellElement;
52
+ };
53
+ interface HTMLImportExportDefinitionElement extends Components.ImportExportDefinition, HTMLStencilElement {
54
+ }
55
+ var HTMLImportExportDefinitionElement: {
56
+ prototype: HTMLImportExportDefinitionElement;
57
+ new (): HTMLImportExportDefinitionElement;
58
+ };
59
+ interface HTMLImportExportStudioElement extends Components.ImportExportStudio, HTMLStencilElement {
60
+ }
61
+ var HTMLImportExportStudioElement: {
62
+ prototype: HTMLImportExportStudioElement;
63
+ new (): HTMLImportExportStudioElement;
64
+ };
65
+ interface HTMLImportExportTableElement extends Components.ImportExportTable, HTMLStencilElement {
66
+ }
67
+ var HTMLImportExportTableElement: {
68
+ prototype: HTMLImportExportTableElement;
69
+ new (): HTMLImportExportTableElement;
39
70
  };
40
71
  interface HTMLElementTagNameMap {
41
- "imexport-table": HTMLImexportTableElement;
72
+ "editable-cell": HTMLEditableCellElement;
73
+ "import-export-definition": HTMLImportExportDefinitionElement;
74
+ "import-export-studio": HTMLImportExportStudioElement;
75
+ "import-export-table": HTMLImportExportTableElement;
42
76
  }
43
77
  }
44
78
  declare namespace LocalJSX {
45
- interface ImexportTable {
46
- "info"?: ExcelDefinition;
47
- "onImported"?: (event: ImexportTableCustomEvent<any>) => void;
79
+ interface EditableCell {
80
+ "culture"?: 'zh' | 'en';
81
+ "onValueChange"?: (event: EditableCellCustomEvent<string>) => void;
82
+ "type"?: 'text' | 'datetime-local';
83
+ "value"?: string | Date;
84
+ }
85
+ interface ImportExportDefinition {
86
+ "culture"?: 'zh' | 'en';
87
+ "cultureResources"?: Record<string, Record<string, string>>;
88
+ "definition"?: ExcelDefinition;
89
+ }
90
+ interface ImportExportStudio {
91
+ "culture"?: 'zh' | 'en';
92
+ "data"?: any[];
93
+ "definition"?: ExcelDefinition;
94
+ }
95
+ interface ImportExportTable {
96
+ "data"?: any[];
97
+ "definition"?: ExcelDefinition;
48
98
  }
49
99
  interface IntrinsicElements {
50
- "imexport-table": ImexportTable;
100
+ "editable-cell": EditableCell;
101
+ "import-export-definition": ImportExportDefinition;
102
+ "import-export-studio": ImportExportStudio;
103
+ "import-export-table": ImportExportTable;
51
104
  }
52
105
  }
53
106
  export { LocalJSX as JSX };
54
107
  declare module "@stencil/core" {
55
108
  export namespace JSX {
56
109
  interface IntrinsicElements {
57
- "imexport-table": LocalJSX.ImexportTable & JSXBase.HTMLAttributes<HTMLImexportTableElement>;
110
+ "editable-cell": LocalJSX.EditableCell & JSXBase.HTMLAttributes<HTMLEditableCellElement>;
111
+ "import-export-definition": LocalJSX.ImportExportDefinition & JSXBase.HTMLAttributes<HTMLImportExportDefinitionElement>;
112
+ "import-export-studio": LocalJSX.ImportExportStudio & JSXBase.HTMLAttributes<HTMLImportExportStudioElement>;
113
+ "import-export-table": LocalJSX.ImportExportTable & JSXBase.HTMLAttributes<HTMLImportExportTableElement>;
58
114
  }
59
115
  }
60
116
  }
@@ -0,0 +1,17 @@
1
+ import { ExcelDataType } from "@senlinz/import-export-wasm";
2
+ interface ExcelDefinition {
3
+ name: string;
4
+ sheetName: string;
5
+ columns: ExcelColumnDefinition[];
6
+ author?: string;
7
+ createTime?: Date | string;
8
+ }
9
+ interface ExcelColumnDefinition {
10
+ key: string;
11
+ name: string;
12
+ width?: number;
13
+ note?: string;
14
+ dataType?: ExcelDataType;
15
+ allowedValues?: string[];
16
+ }
17
+ export { ExcelDefinition, ExcelColumnDefinition, ExcelDataType };
@@ -0,0 +1,17 @@
1
+ import { ExcelDataType } from "@senlinz/import-export-wasm";
2
+ interface ExcelDefinition {
3
+ name: string;
4
+ sheetName: string;
5
+ columns: ExcelColumnDefinition[];
6
+ author: string;
7
+ createTime: Date | string;
8
+ }
9
+ interface ExcelColumnDefinition {
10
+ key: string;
11
+ name: string;
12
+ width?: number;
13
+ note?: string;
14
+ dataType?: ExcelDataType;
15
+ allowedValues?: string[];
16
+ }
17
+ export { ExcelDefinition, ExcelColumnDefinition, ExcelDataType };
@@ -1,2 +1,15 @@
1
- export {} from './utils/utils';
2
1
  export type * from './components.d.ts';
2
+ import { ExcelDefinition } from './declarations/ExcelDefinition.js';
3
+ import { importExcel, exportExcel, downloadExcelTemplate, fromExcel, toExcel, generateExcelTemplate } from './utils.js';
4
+ declare function getUtils(): {
5
+ importExcel: typeof importExcel;
6
+ exportExcel: typeof exportExcel;
7
+ downloadExcelTemplate: typeof downloadExcelTemplate;
8
+ fromExcel: typeof fromExcel;
9
+ toExcel: typeof toExcel;
10
+ generateExcelTemplate: typeof generateExcelTemplate;
11
+ };
12
+ declare function _importExcel<T>(defintion: ExcelDefinition): Promise<T[]>;
13
+ declare function _exportExcel<T>(defintion: ExcelDefinition, data: T[]): Promise<void>;
14
+ declare function _downloadExcelTemplate(defintion: ExcelDefinition): Promise<void>;
15
+ export { getUtils, _importExcel as importExcel, _exportExcel as exportExcel, _downloadExcelTemplate as downloadExcelTemplate };
@@ -1,12 +1,19 @@
1
+ import { ExcelDataType } from "@senlinz/import-export-wasm"
2
+
1
3
  interface ExcelDefinition {
2
4
  name: string,
3
5
  sheetName: string,
4
- columns: ExcelColumnDefinition[]
6
+ columns: ExcelColumnDefinition[],
7
+ author?: string,
5
8
  }
6
9
 
7
10
  interface ExcelColumnDefinition {
8
11
  key: string,
9
- name: string
12
+ name: string,
13
+ width?: number,
14
+ note?: string,
15
+ dataType?: ExcelDataType,
16
+ allowedValues?: string[],
10
17
  }
11
18
 
12
- export { ExcelDefinition, ExcelColumnDefinition }
19
+ export { ExcelDefinition, ExcelColumnDefinition, ExcelDataType };
@@ -1,6 +1,9 @@
1
- import { ExcelInfo } from '@senlinz/import-export-wasm';
1
+ import { ExcelDefinition } from '../declarations/ExcelDefintion';
2
2
  declare function initializeWasm(): void;
3
- declare function fromExcel<T>(info: ExcelInfo, buffer: Uint8Array): Promise<T[]>;
4
- declare function toExcel<T>(info: ExcelInfo, data: T[]): Promise<Uint8Array>;
5
- declare function createExcel(info: ExcelInfo): Promise<Uint8Array>;
6
- export { fromExcel, toExcel, createExcel, initializeWasm };
3
+ declare function fromExcel<T>(definition: ExcelDefinition, buffer: Uint8Array): Promise<T[]>;
4
+ declare function toExcel<T>(definition: ExcelDefinition, data: T[]): Promise<Uint8Array>;
5
+ declare function generateExcelTemplate(definition: ExcelDefinition): Promise<Uint8Array>;
6
+ declare function downloadExcelTemplate(definition: ExcelDefinition): Promise<void>;
7
+ declare function importExcel<T>(defintion: ExcelDefinition): Promise<T[]>;
8
+ declare function exportExcel<T>(definition: ExcelDefinition, data: T[]): Promise<void>;
9
+ export { importExcel, exportExcel, downloadExcelTemplate, fromExcel, toExcel, generateExcelTemplate, initializeWasm };
@@ -0,0 +1,10 @@
1
+ import { ExcelDefinition } from './declarations/ExcelDefinition';
2
+ declare function initializeWasm(): void;
3
+ declare function fromExcel<T>(definition: ExcelDefinition, buffer: Uint8Array): Promise<T[]>;
4
+ declare function toExcel<T>(definition: ExcelDefinition, data: T[]): Promise<Uint8Array>;
5
+ declare function generateExcelTemplate(definition: ExcelDefinition): Promise<Uint8Array>;
6
+ declare function downloadExcelTemplate(definition: ExcelDefinition): Promise<void>;
7
+ declare function download(data: Uint8Array | string, name: string, type?: string): void;
8
+ declare function importExcel<T>(defintion: ExcelDefinition): Promise<T[]>;
9
+ declare function exportExcel<T>(definition: ExcelDefinition, data: T[]): Promise<void>;
10
+ export { importExcel, exportExcel, downloadExcelTemplate, fromExcel, toExcel, generateExcelTemplate, initializeWasm, download };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@senlinz/import-export",
3
- "version": "0.0.1-beta.5",
3
+ "version": "0.1.0-beta.10",
4
4
  "description": "Stencil Component for import/export excel files.",
5
5
  "module": "dist/components/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -10,23 +10,22 @@
10
10
  "README.md"
11
11
  ],
12
12
  "exports": {
13
- "./components": {
14
- "types": "./dist/types/index.d.ts"
13
+ ".": {
14
+ "import": "./dist/components/index.js",
15
+ "types": "./dist/components/index.d.ts"
15
16
  },
16
- "./components/imexport-table.js": {
17
- "import": "./dist/components/imexport-table.js",
18
- "types": "./dist/components/imexport-table.d.ts"
17
+ "./components/import-export-studio.js": {
18
+ "import": "./dist/components/import-export-studio.js",
19
+ "types": "./dist/components/import-export-studio.d.ts"
19
20
  }
20
21
  },
21
22
  "devDependencies": {
22
23
  "@rollup/plugin-terser": "^0.4.4",
23
24
  "@stencil/core": "^4.7.0",
24
- "@stencil/vue-output-target": "^0.8.9",
25
25
  "@types/jest": "^29.5.6",
26
26
  "@types/node": "^16.18.108",
27
27
  "jest": "^29.7.0",
28
- "jest-cli": "^29.7.0",
29
- "puppeteer": "^21.9.0"
28
+ "jest-cli": "^29.7.0"
30
29
  },
31
30
  "author": "senlin",
32
31
  "license": "MIT",
@@ -36,7 +35,7 @@
36
35
  },
37
36
  "dependencies": {
38
37
  "fflate": "^0.8.2",
39
- "@senlinz/import-export-wasm": "0.0.1-beta.5"
38
+ "@senlinz/import-export-wasm": "0.1.0-beta.10"
40
39
  },
41
40
  "keywords": [
42
41
  "stencil",
@@ -56,8 +55,9 @@
56
55
  "scripts": {
57
56
  "build": "stencil build",
58
57
  "start": "stencil build --dev --watch --serve",
59
- "test": "stencil test --spec --e2e",
60
- "test.watch": "stencil test --spec --e2e --watchAll",
58
+ "test": "stencil test --spec",
59
+ "e2e-serve": "stencil build --config stencil.test.config.ts && serve -l 8080 ./tests",
60
+ "e2e-test": "playwright test",
61
61
  "generate": "stencil generate",
62
62
  "publish-dry-run": "pnpm publish --dry-run --no-git-checks"
63
63
  }