proto-table-wc 0.0.425 → 0.0.427
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/demo-table_2.cjs.entry.js +1 -1
- package/dist/cjs/{index-c03a3c70.js → index-0623402f.js} +13 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/proto-table-wc.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/esm/demo-table_2.entry.js +1 -1
- package/dist/esm/{index-f309bd9e.js → index-6fcd1f4c.js} +13 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/proto-table-wc.js +3 -3
- package/dist/proto-table-wc/p-03a6f52a.js +2 -0
- package/dist/proto-table-wc/{p-11839a21.entry.js → p-3b833bd3.entry.js} +1 -1
- package/dist/proto-table-wc/proto-table-wc.esm.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +2 -0
- package/package.json +3 -3
- package/dist/proto-table-wc/p-6ea9ad25.js +0 -2
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-0623402f.js');
|
6
6
|
|
7
7
|
const demoTableCss = ".detailWrapper{font-weight:100;font-size:13px;display:flex;flex-direction:column;justify-items:start;padding:5px;padding-left:30px}";
|
8
8
|
|
@@ -908,7 +908,19 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
908
908
|
* @param fn a function to enqueue
|
909
909
|
* @returns either a `Promise` or the return value of the provided function
|
910
910
|
*/
|
911
|
-
const enqueue = (maybePromise, fn) => maybePromise
|
911
|
+
const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
|
912
|
+
/**
|
913
|
+
* Check that a value is a `Promise`. To check, we first see if the value is an
|
914
|
+
* instance of the `Promise` global. In a few circumstances, in particular if
|
915
|
+
* the global has been overwritten, this is could be misleading, so we also do
|
916
|
+
* a little 'duck typing' check to see if the `.then` property of the value is
|
917
|
+
* defined and a function.
|
918
|
+
*
|
919
|
+
* @param maybePromise it might be a promise!
|
920
|
+
* @returns whether it is or not
|
921
|
+
*/
|
922
|
+
const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
|
923
|
+
(maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
|
912
924
|
const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
913
925
|
var _a;
|
914
926
|
const elm = hostRef.$hostElement$;
|
package/dist/cjs/loader.cjs.js
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-0623402f.js');
|
6
6
|
|
7
7
|
/*
|
8
|
-
Stencil Client Patch Esm v3.
|
8
|
+
Stencil Client Patch Esm v3.4.0 | MIT Licensed | https://stenciljs.com
|
9
9
|
*/
|
10
10
|
const patchEsm = () => {
|
11
11
|
return index.promiseResolve();
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-0623402f.js');
|
6
6
|
|
7
7
|
/*
|
8
|
-
Stencil Client Patch Browser v3.
|
8
|
+
Stencil Client Patch Browser v3.4.0 | MIT Licensed | https://stenciljs.com
|
9
9
|
*/
|
10
10
|
const patchBrowser = () => {
|
11
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('proto-table-wc.cjs.js', document.baseURI).href));
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-6fcd1f4c.js';
|
2
2
|
|
3
3
|
const demoTableCss = ".detailWrapper{font-weight:100;font-size:13px;display:flex;flex-direction:column;justify-items:start;padding:5px;padding-left:30px}";
|
4
4
|
|
@@ -886,7 +886,19 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
886
886
|
* @param fn a function to enqueue
|
887
887
|
* @returns either a `Promise` or the return value of the provided function
|
888
888
|
*/
|
889
|
-
const enqueue = (maybePromise, fn) => maybePromise
|
889
|
+
const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
|
890
|
+
/**
|
891
|
+
* Check that a value is a `Promise`. To check, we first see if the value is an
|
892
|
+
* instance of the `Promise` global. In a few circumstances, in particular if
|
893
|
+
* the global has been overwritten, this is could be misleading, so we also do
|
894
|
+
* a little 'duck typing' check to see if the `.then` property of the value is
|
895
|
+
* defined and a function.
|
896
|
+
*
|
897
|
+
* @param maybePromise it might be a promise!
|
898
|
+
* @returns whether it is or not
|
899
|
+
*/
|
900
|
+
const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
|
901
|
+
(maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
|
890
902
|
const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
891
903
|
var _a;
|
892
904
|
const elm = hostRef.$hostElement$;
|
package/dist/esm/loader.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
2
|
-
export { s as setNonce } from './index-
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-6fcd1f4c.js';
|
2
|
+
export { s as setNonce } from './index-6fcd1f4c.js';
|
3
3
|
|
4
4
|
/*
|
5
|
-
Stencil Client Patch Esm v3.
|
5
|
+
Stencil Client Patch Esm v3.4.0 | MIT Licensed | https://stenciljs.com
|
6
6
|
*/
|
7
7
|
const patchEsm = () => {
|
8
8
|
return promiseResolve();
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
2
|
-
export { s as setNonce } from './index-
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-6fcd1f4c.js';
|
2
|
+
export { s as setNonce } from './index-6fcd1f4c.js';
|
3
3
|
|
4
4
|
/*
|
5
|
-
Stencil Client Patch Browser v3.
|
5
|
+
Stencil Client Patch Browser v3.4.0 | MIT Licensed | https://stenciljs.com
|
6
6
|
*/
|
7
7
|
const patchBrowser = () => {
|
8
8
|
const importMeta = import.meta.url;
|
@@ -0,0 +1,2 @@
|
|
1
|
+
let t,n,e=!1,l=!1;const o={},s=t=>"object"==(t=typeof t)||"function"===t;function i(t){var n,e,l;return null!==(l=null===(e=null===(n=t.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===e?void 0:e.getAttribute("content"))&&void 0!==l?l:void 0}const c=(t,n,...e)=>{let l=null,o=!1,i=!1;const c=[],u=n=>{for(let e=0;e<n.length;e++)l=n[e],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof t&&!s(l))&&(l+=""),o&&i?c[c.length-1].t+=l:c.push(o?r(null,l):l),i=o)};if(u(e),n){const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}const a=r(t,null);return a.l=n,c.length>0&&(a.o=c),a},r=(t,n)=>({i:0,u:t,t:n,p:null,o:null,l:null}),u={},a=new WeakMap,f=t=>"sc-"+t.h,d=(t,n,e,l,o,i)=>{if(e!==l){let c=F(t,n),r=n.toLowerCase();if("class"===n){const n=t.classList,o=h(e),s=h(l);n.remove(...o.filter((t=>t&&!s.includes(t)))),n.add(...s.filter((t=>t&&!o.includes(t))))}else if("ref"===n)l&&l(t);else if(c||"o"!==n[0]||"n"!==n[1]){const r=s(l);if((c||r&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[n]=l;else{const o=null==l?"":l;"list"===n?c=!1:null!=e&&t[n]==o||(t[n]=o)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(n)||t.removeAttribute(n):(!c||4&i||o)&&!r&&t.setAttribute(n,l=!0===l?"":l)}else n="-"===n[2]?n.slice(3):F(B,r)?r.slice(2):r[2]+n.slice(3),e&&I.rel(t,n,e,!1),l&&I.ael(t,n,l,!1)}},p=/\s/,h=t=>t?t.split(p):[],m=(t,n,e,l)=>{const s=11===n.p.nodeType&&n.p.host?n.p.host:n.p,i=t&&t.l||o,c=n.l||o;for(l in i)l in c||d(s,l,i[l],void 0,e,n.i);for(l in c)d(s,l,i[l],c[l],e,n.i)},$=(n,l,o)=>{const s=l.o[o];let i,c,r=0;if(null!==s.t)i=s.p=G.createTextNode(s.t);else{if(e||(e="svg"===s.u),i=s.p=G.createElementNS(e?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.u),e&&"foreignObject"===s.u&&(e=!1),m(null,s,e),null!=t&&i["s-si"]!==t&&i.classList.add(i["s-si"]=t),s.o)for(r=0;r<s.o.length;++r)c=$(n,s,r),c&&i.appendChild(c);"svg"===s.u?e=!1:"foreignObject"===i.tagName&&(e=!0)}return i},y=(t,e,l,o,s,i)=>{let c,r=t;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=$(null,l,s),c&&(o[s].p=c,r.insertBefore(c,e)))},w=(t,n,e)=>{for(let l=n;l<=e;++l){const n=t[l];if(n){const t=n.p;g(n),t&&t.remove()}}},b=(t,n)=>t.u===n.u,v=(t,n)=>{const l=n.p=t.p,o=t.o,s=n.o,i=n.u,c=n.t;null===c?(e="svg"===i||"foreignObject"!==i&&e,m(t,n,e),null!==o&&null!==s?((t,n,e,l)=>{let o,s=0,i=0,c=n.length-1,r=n[0],u=n[c],a=l.length-1,f=l[0],d=l[a];for(;s<=c&&i<=a;)null==r?r=n[++s]:null==u?u=n[--c]:null==f?f=l[++i]:null==d?d=l[--a]:b(r,f)?(v(r,f),r=n[++s],f=l[++i]):b(u,d)?(v(u,d),u=n[--c],d=l[--a]):b(r,d)?(v(r,d),t.insertBefore(r.p,u.p.nextSibling),r=n[++s],d=l[--a]):b(u,f)?(v(u,f),t.insertBefore(u.p,r.p),u=n[--c],f=l[++i]):(o=$(n&&n[i],e,i),f=l[++i],o&&r.p.parentNode.insertBefore(o,r.p));s>c?y(t,null==l[a+1]?null:l[a+1].p,e,l,i,a):i>a&&w(n,s,c)})(l,o,n,s):null!==s?(null!==t.t&&(l.textContent=""),y(l,null,n,s,0,s.length-1)):null!==o&&w(o,0,o.length-1),e&&"svg"===i&&(e=!1)):t.t!==c&&(l.data=c)},g=t=>{t.l&&t.l.ref&&t.l.ref(null),t.o&&t.o.map(g)},S=(t,n)=>{n&&!t.m&&n["s-p"]&&n["s-p"].push(new Promise((n=>t.m=n)))},j=(t,n)=>{if(t.i|=16,!(4&t.i))return S(t,t.$),et((()=>O(t,n)));t.i|=512},O=(t,n)=>{const e=t.v;let l;return n&&(l=E(e,"componentWillLoad")),M(l,(()=>C(t,e,n)))},M=(t,n)=>k(t)?t.then(n):n(),k=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,C=async(t,n,e)=>{var l;const o=t.g,s=o["s-rc"];e&&(t=>{const n=t.S,e=t.g,l=n.i,o=((t,n)=>{var e;let l=f(n);const o=z.get(l);if(t=11===t.nodeType?t:G,o)if("string"==typeof o){let n,s=a.get(t=t.head||t);if(s||a.set(t,s=new Set),!s.has(l)){{n=G.createElement("style"),n.innerHTML=o;const l=null!==(e=I.j)&&void 0!==e?e:i(G);null!=l&&n.setAttribute("nonce",l),t.insertBefore(n,t.querySelector("link"))}s&&s.add(l)}}else t.adoptedStyleSheets.includes(o)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]);return l})(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&l&&(e["s-sc"]=o,e.classList.add(o+"-h"))})(t);P(t,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const n=null!==(l=o["s-p"])&&void 0!==l?l:[],e=()=>x(t);0===n.length?e():(Promise.all(n).then(e),t.i|=4,n.length=0)}},P=(e,l)=>{try{l=l.render(),e.i&=-17,e.i|=2,((e,l)=>{const o=e.g,s=e.O||r(null,null),i=(t=>t&&t.u===u)(l)?l:c(null,null,l);n=o.tagName,i.u=null,i.i|=4,e.O=i,i.p=s.p=o.shadowRoot||o,t=o["s-sc"],v(s,i)})(e,l)}catch(t){H(t,e.g)}return null},x=t=>{const n=t.g,e=t.v,l=t.$;64&t.i||(t.i|=64,N(n),E(e,"componentDidLoad"),t.M(n),l||L()),t.m&&(t.m(),t.m=void 0),512&t.i&&nt((()=>j(t,!1))),t.i&=-517},L=()=>{N(G.documentElement),nt((()=>(t=>{const n=I.ce("appload",{detail:{namespace:"proto-table-wc"}});return t.dispatchEvent(n),n})(B)))},E=(t,n,e)=>{if(t&&t[n])try{return t[n](e)}catch(t){H(t)}},N=t=>t.classList.add("hydrated"),T=(t,n,e)=>{if(n.k){const l=Object.entries(n.k),o=t.prototype;if(l.map((([t,[n]])=>{(31&n||2&e&&32&n)&&Object.defineProperty(o,t,{get(){return((t,n)=>U(this).C.get(n))(0,t)},set(n){((t,n,e)=>{const l=U(t),o=l.C.get(n),i=l.i,c=l.v;e=(t=>(null==t||s(t),t))(e),8&i&&void 0!==o||e===o||Number.isNaN(o)&&Number.isNaN(e)||(l.C.set(n,e),c&&2==(18&i)&&j(l,!1))})(this,t,n)},configurable:!0,enumerable:!0})})),1&e){const n=new Map;o.attributeChangedCallback=function(t,e,l){I.jmp((()=>{const e=n.get(t);if(this.hasOwnProperty(e))l=this[e],delete this[e];else if(o.hasOwnProperty(e)&&"number"==typeof this[e]&&this[e]==l)return;this[e]=(null!==l||"boolean"!=typeof this[e])&&l}))},t.observedAttributes=l.filter((([t,n])=>15&n[0])).map((([t,e])=>{const l=e[1]||t;return n.set(l,t),l}))}}return t},W=(t,n={})=>{var e;const l=[],o=n.exclude||[],s=B.customElements,c=G.head,r=c.querySelector("meta[charset]"),u=G.createElement("style"),a=[];let d,p=!0;Object.assign(I,n),I.P=new URL(n.resourcesUrl||"./",G.baseURI).href,t.map((t=>{t[1].map((n=>{const e={i:n[0],h:n[1],k:n[2],L:n[3]};e.k=n[2];const i=e.h,c=class extends HTMLElement{constructor(t){super(t),D(t=this,e),1&e.i&&t.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),p?a.push(this):I.jmp((()=>(t=>{if(0==(1&I.i)){const n=U(t),e=n.S,l=()=>{};if(!(1&n.i)){n.i|=1;{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){S(n,n.$=e);break}}e.k&&Object.entries(e.k).map((([n,[e]])=>{if(31&e&&t.hasOwnProperty(n)){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e,l,o)=>{if(0==(32&n.i)){n.i|=32;{if((o=_(e)).then){const t=()=>{};o=await o,t()}o.isProxied||(T(o,e,2),o.isProxied=!0);const t=()=>{};n.i|=8;try{new o(n)}catch(t){H(t)}n.i&=-9,t()}if(o.style){let t=o.style;const n=f(e);if(!z.has(n)){const l=()=>{};((t,n,e)=>{let l=z.get(t);K&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,z.set(t,l)})(n,t,!!(1&e.i)),l()}}}const s=n.$,i=()=>j(n,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,n,e)}l()}})(this)))}disconnectedCallback(){I.jmp((()=>{}))}componentOnReady(){return U(this).N}};e.T=t[0],o.includes(i)||s.get(i)||(l.push(i),s.define(i,T(c,e,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const t=null!==(e=I.j)&&void 0!==e?e:i(G);null!=t&&u.setAttribute("nonce",t),c.insertBefore(u,r?r.nextSibling:c.firstChild)}p=!1,a.length?a.map((t=>t.connectedCallback())):I.jmp((()=>d=setTimeout(L,30)))},A=t=>I.j=t,R=new WeakMap,U=t=>R.get(t),q=(t,n)=>R.set(n.v=t,n),D=(t,n)=>{const e={i:0,g:t,S:n,C:new Map};return e.N=new Promise((t=>e.M=t)),t["s-p"]=[],t["s-rc"]=[],R.set(t,e)},F=(t,n)=>n in t,H=(t,n)=>(0,console.error)(t,n),V=new Map,_=t=>{const n=t.h.replace(/-/g,"_"),e=t.T,l=V.get(e);return l?l[n]:import(`./${e}.entry.js`).then((t=>(V.set(e,t),t[n])),H)
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},z=new Map,B="undefined"!=typeof window?window:{},G=B.document||{head:{}},I={i:0,P:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,l)=>t.addEventListener(n,e,l),rel:(t,n,e,l)=>t.removeEventListener(n,e,l),ce:(t,n)=>new CustomEvent(t,n)},J=t=>Promise.resolve(t),K=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),Q=[],X=[],Y=(t,n)=>e=>{t.push(e),l||(l=!0,n&&4&I.i?nt(tt):I.raf(tt))},Z=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){H(t)}t.length=0},tt=()=>{Z(Q),Z(X),(l=Q.length>0)&&I.raf(tt)},nt=t=>J().then(t),et=Y(X,!0);export{W as b,c as h,J as p,q as r,A as s}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,h as e}from"./p-
|
1
|
+
import{r as t,h as e}from"./p-03a6f52a.js";const r=class{constructor(r){t(this,r),this.fields=[{label:"Date",prop:"date"},{label:"List Price",prop:"price"},{label:"% of Market",prop:"market"},{label:"ProfitTime Score",prop:"score"}],this.items=[],this.table=void 0,this.renderDetails=t=>{const{tags:r=[]}=t;return e("div",{class:"detailWrapper"},e("span",null,r.length," details..."),e("ul",null,r.map((t=>e("li",null,t)))))}}componentWillLoad(){this.items=[{date:"08/30/2020",price:"$24,000",market:"98%",score:"No Score",tags:["one","two","three"]},{date:"08/31/2020",price:"$24,000",market:"99%",score:"No Score",tags:["uno","duo"]},{date:"09/01/2020",price:"$27,000",market:"102%",score:"Platinum"},{date:"09/02/2020",price:"$27,423",market:"104%",score:"Platinum",tags:["dog","cat","fish","hamster"]},{date:"09/03/2020",price:"$27,521",market:"106%",score:"Platinum",tags:["4wd","sports"]},{date:"09/04/2020",price:"$27,687",market:"107%",score:"Platinum",tags:["leather","chrome"]}]}componentDidLoad(){const{table:t,items:e,fields:r}=this;t.data=e,t.fields=r,t.details=this.renderDetails}render(){return e("proto-table",{ref:t=>this.table=t})}};r.style=".detailWrapper{font-weight:100;font-size:13px;display:flex;flex-direction:column;justify-items:start;padding:5px;padding-left:30px}";const s={down:"M12 15.4L6.6 10 8 8.6l4 4 4-4 1.4 1.4z",up:"M16 15.4l-4-4-4 4L6.6 14 12 8.6l5.4 5.4z",left:"M14 17.4L8.6 12 14 6.6 15.4 8l-4 4 4 4z",right:"M10 17.4L8.6 16l4-4-4-4L10 6.6l5.4 5.4z",more:"M12 14a2 2 0 100-4 2 2 0 000 4zm-6 0a2 2 0 100-4 2 2 0 000 4zm12 0a2 2 0 100-4 2 2 0 000 4z","arrow-up":"M5.3 10.7l1.4 1.4L11 7.8V20h2V7.8l4.3 4.3 1.4-1.4L12 4z","arrow-down":"M18.7 13.3l-1.4-1.4-4.3 4.3V4h-2v12.2l-4.3-4.3-1.4 1.4L12 20z"},i={right:"show",down:"hide","arrow-up":"sort","arrow-down":"sort"},l=class{constructor(r){t(this,r),this.protoIcon=(t,r,l=24)=>{const o=s[t];return e("svg",{width:l,height:l,viewBox:"0 0 24 24",role:"img","aria-labelledby":"title"},e("title",null,(t=>i[t])(t)),e("g",{fill:r},e("path",{d:o})),e("path",{d:"M0 0h24v24H0z",fill:"none"}))},this.handleCellClick=(t,e)=>()=>{0===t&&(this.expanded=this.expanded===e?void 0:e)},this.handleSortClick=t=>()=>{this.sort===t?2===this.clicks?(this.clicks=0,this.sort=void 0):this.clicks=this.clicks+1:(this.sort=t,this.clicks=1)},this.iconFor=t=>this.sort===t&&2===this.clicks?"arrow-up":"arrow-down",this.header=()=>{const{fields:t,iconFor:r,protoIcon:s}=this;return e("div",{class:"header"},t.map((({label:t},i)=>{const l=i===this.sort?"headerCell sort":"headerCell",o=r(i);return e("div",{class:l,onClick:this.handleSortClick(i)},s(o),e("span",null,t))})))},this.row=(t,r)=>{const{fields:s,protoIcon:i}=this;return e("div",{class:"rowContainer"},e("div",{class:this.expanded===r?"row expanded":"row"},s.map((({prop:s},l)=>e("div",{class:l===this.sort?"cell sort":"cell",onClick:this.handleCellClick(l,r)},i(0===l&&this.details?this.expanded===r?"down":"right":"pad"),t[s])))),this.details&&this.expanded===r&&this.details(t))},this.data=[],this.details=void 0,this.fields=[],this.expanded=void 0,this.sort=void 0,this.clicks=0}render(){const t=this.data||[];return e("div",{class:"table"},this.header(),t.map(((t,e)=>this.row(t,e))))}};l.style=".table{font-weight:400;font-size:13px;display:flex;flex-direction:column;width:100%;border:1px solid var(--clrs-navy);border-radius:2px}.table svg{fill:var(--clrs-navy)}.header{display:flex}.headerCell{flex-basis:100%;display:flex;align-items:center;justify-items:start;border-right:1px solid var(--clrs-navy);border-bottom:1px solid var(--clrs-navy);padding:5px;cursor:pointer}.headerCell svg g{display:none}.headerCell.sort svg g{display:inline}.headerCell:hover svg g{display:inline}.headerCell:hover{background-color:var(--clrs-silver)}.headerCell:last-child{border-right:none}.cell{flex-basis:100%;display:flex;align-items:center;justify-items:start;padding:5px}.cell:first-child svg{cursor:pointer}.sort{background-color:var(--cx-column-sort)}.row{display:flex;justify-items:stretch;width:100%}.row.expanded{background-color:var(--cx-row-expanded)}.row.expanded svg{fill:var(--clrs-red)}.row:hover{background-color:var(--cx-row-hover)}";export{r as demo_table,l as proto_table}
|
@@ -1 +1 @@
|
|
1
|
-
import{p as a,b as e}from"./p-
|
1
|
+
import{p as a,b as e}from"./p-03a6f52a.js";export{s as setNonce}from"./p-03a6f52a.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),a(t)})().then((a=>e([["p-3b833bd3",[[1,"demo-table"],[0,"proto-table",{data:[16],details:[8],fields:[16],expanded:[32],sort:[32],clicks:[32]}]]]],a)));
|
@@ -1131,6 +1131,8 @@ export declare namespace JSXBase {
|
|
1131
1131
|
summary?: string;
|
1132
1132
|
}
|
1133
1133
|
interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
|
1134
|
+
autoComplete?: string;
|
1135
|
+
autocomplete?: string;
|
1134
1136
|
autoFocus?: boolean;
|
1135
1137
|
autofocus?: boolean | string;
|
1136
1138
|
cols?: number;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "proto-table-wc",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.427",
|
4
4
|
"description": "Stencil Component Starter",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.js",
|
@@ -25,11 +25,11 @@
|
|
25
25
|
"format": "prettier --write src"
|
26
26
|
},
|
27
27
|
"dependencies": {
|
28
|
-
"@stencil/core": "3.
|
28
|
+
"@stencil/core": "3.4.0"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
31
|
"cspell": "6.31.1",
|
32
|
-
"eslint": "8.
|
32
|
+
"eslint": "8.42.0",
|
33
33
|
"prettier": "2.8.8",
|
34
34
|
"tslint": "6.1.3",
|
35
35
|
"typescript": "5.1.3"
|
@@ -1,2 +0,0 @@
|
|
1
|
-
let t,e,n=!1,l=!1;const o={},s=t=>"object"==(t=typeof t)||"function"===t;function i(t){var e,n,l;return null!==(l=null===(n=null===(e=t.head)||void 0===e?void 0:e.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==l?l:void 0}const r=(t,e,...n)=>{let l=null,o=!1,i=!1;const r=[],u=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof t&&!s(l))&&(l+=""),o&&i?r[r.length-1].t+=l:r.push(o?c(null,l):l),i=o)};if(u(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const a=c(t,null);return a.l=e,r.length>0&&(a.o=r),a},c=(t,e)=>({i:0,u:t,t:e,h:null,o:null,l:null}),u={},a=new WeakMap,f=t=>"sc-"+t.p,d=(t,e,n,l,o,i)=>{if(n!==l){let r=D(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,o=p(n),s=p(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("ref"===e)l&&l(t);else if(r||"o"!==e[0]||"n"!==e[1]){const c=s(l);if((r||c&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[e]=l;else{const o=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==o||(t[e]=o)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||o)&&!c&&t.setAttribute(e,l=!0===l?"":l)}else e="-"===e[2]?e.slice(3):D(z,c)?c.slice(2):c[2]+e.slice(3),n&&G.rel(t,e,n,!1),l&&G.ael(t,e,l,!1)}},h=/\s/,p=t=>t?t.split(h):[],m=(t,e,n,l)=>{const s=11===e.h.nodeType&&e.h.host?e.h.host:e.h,i=t&&t.l||o,r=e.l||o;for(l in i)l in r||d(s,l,i[l],void 0,n,e.i);for(l in r)d(s,l,i[l],r[l],n,e.i)},$=(e,l,o)=>{const s=l.o[o];let i,r,c=0;if(null!==s.t)i=s.h=B.createTextNode(s.t);else{if(n||(n="svg"===s.u),i=s.h=B.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.u),n&&"foreignObject"===s.u&&(n=!1),m(null,s,n),null!=t&&i["s-si"]!==t&&i.classList.add(i["s-si"]=t),s.o)for(c=0;c<s.o.length;++c)r=$(e,s,c),r&&i.appendChild(r);"svg"===s.u?n=!1:"foreignObject"===i.tagName&&(n=!0)}return i},y=(t,n,l,o,s,i)=>{let r,c=t;for(c.shadowRoot&&c.tagName===e&&(c=c.shadowRoot);s<=i;++s)o[s]&&(r=$(null,l,s),r&&(o[s].h=r,c.insertBefore(r,n)))},w=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.h;g(e),t&&t.remove()}}},b=(t,e)=>t.u===e.u,v=(t,e)=>{const l=e.h=t.h,o=t.o,s=e.o,i=e.u,r=e.t;null===r?(n="svg"===i||"foreignObject"!==i&&n,m(t,e,n),null!==o&&null!==s?((t,e,n,l)=>{let o,s=0,i=0,r=e.length-1,c=e[0],u=e[r],a=l.length-1,f=l[0],d=l[a];for(;s<=r&&i<=a;)null==c?c=e[++s]:null==u?u=e[--r]:null==f?f=l[++i]:null==d?d=l[--a]:b(c,f)?(v(c,f),c=e[++s],f=l[++i]):b(u,d)?(v(u,d),u=e[--r],d=l[--a]):b(c,d)?(v(c,d),t.insertBefore(c.h,u.h.nextSibling),c=e[++s],d=l[--a]):b(u,f)?(v(u,f),t.insertBefore(u.h,c.h),u=e[--r],f=l[++i]):(o=$(e&&e[i],n,i),f=l[++i],o&&c.h.parentNode.insertBefore(o,c.h));s>r?y(t,null==l[a+1]?null:l[a+1].h,n,l,i,a):i>a&&w(e,s,r)})(l,o,e,s):null!==s?(null!==t.t&&(l.textContent=""),y(l,null,e,s,0,s.length-1)):null!==o&&w(o,0,o.length-1),n&&"svg"===i&&(n=!1)):t.t!==r&&(l.data=r)},g=t=>{t.l&&t.l.ref&&t.l.ref(null),t.o&&t.o.map(g)},S=(t,e)=>{e&&!t.m&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.m=e)))},j=(t,e)=>{if(t.i|=16,!(4&t.i))return S(t,t.$),et((()=>O(t,e)));t.i|=512},O=(t,e)=>{const n=t.v;let l;return e&&(l=L(n,"componentWillLoad")),M(l,(()=>k(t,n,e)))},M=(t,e)=>t instanceof Promise?t.then(e):e(),k=async(t,e,n)=>{var l;const o=t.g,s=o["s-rc"];n&&(t=>{const e=t.S,n=t.g,l=e.i,o=((t,e)=>{var n;let l=f(e);const o=_.get(l);if(t=11===t.nodeType?t:B,o)if("string"==typeof o){let e,s=a.get(t=t.head||t);if(s||a.set(t,s=new Set),!s.has(l)){{e=B.createElement("style"),e.innerHTML=o;const l=null!==(n=G.j)&&void 0!==n?n:i(B);null!=l&&e.setAttribute("nonce",l),t.insertBefore(e,t.querySelector("link"))}s&&s.add(l)}}else t.adoptedStyleSheets.includes(o)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);C(t,e),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!==(l=o["s-p"])&&void 0!==l?l:[],n=()=>P(t);0===e.length?n():(Promise.all(e).then(n),t.i|=4,e.length=0)}},C=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const o=n.g,s=n.O||c(null,null),i=(t=>t&&t.u===u)(l)?l:r(null,null,l);e=o.tagName,i.u=null,i.i|=4,n.O=i,i.h=s.h=o.shadowRoot||o,t=o["s-sc"],v(s,i)})(n,l)}catch(t){F(t,n.g)}return null},P=t=>{const e=t.g,n=t.v,l=t.$;64&t.i||(t.i|=64,E(e),L(n,"componentDidLoad"),t.M(e),l||x()),t.m&&(t.m(),t.m=void 0),512&t.i&&tt((()=>j(t,!1))),t.i&=-517},x=()=>{E(B.documentElement),tt((()=>(t=>{const e=G.ce("appload",{detail:{namespace:"proto-table-wc"}});return t.dispatchEvent(e),e})(z)))},L=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){F(t)}},E=t=>t.classList.add("hydrated"),N=(t,e,n)=>{if(e.k){const l=Object.entries(e.k),o=t.prototype;if(l.map((([t,[e]])=>{(31&e||2&n&&32&e)&&Object.defineProperty(o,t,{get(){return((t,e)=>R(this).C.get(e))(0,t)},set(e){((t,e,n)=>{const l=R(t),o=l.C.get(e),i=l.i,r=l.v;n=(t=>(null==t||s(t),t))(n),8&i&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(l.C.set(e,n),r&&2==(18&i)&&j(l,!1))})(this,t,e)},configurable:!0,enumerable:!0})})),1&n){const e=new Map;o.attributeChangedCallback=function(t,n,l){G.jmp((()=>{const n=e.get(t);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(o.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,n])=>{const l=n[1]||t;return e.set(l,t),l}))}}return t},T=(t,e={})=>{var n;const l=[],o=e.exclude||[],s=z.customElements,r=B.head,c=r.querySelector("meta[charset]"),u=B.createElement("style"),a=[];let d,h=!0;Object.assign(G,e),G.P=new URL(e.resourcesUrl||"./",B.baseURI).href,t.map((t=>{t[1].map((e=>{const n={i:e[0],p:e[1],k:e[2],L:e[3]};n.k=e[2];const i=n.p,r=class extends HTMLElement{constructor(t){super(t),q(t=this,n),1&n.i&&t.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),h?a.push(this):G.jmp((()=>(t=>{if(0==(1&G.i)){const e=R(t),n=e.S,l=()=>{};if(!(1&e.i)){e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){S(e,e.$=n);break}}n.k&&Object.entries(n.k).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,o)=>{if(0==(32&e.i)){e.i|=32;{if((o=V(n)).then){const t=()=>{};o=await o,t()}o.isProxied||(N(o,n,2),o.isProxied=!0);const t=()=>{};e.i|=8;try{new o(e)}catch(t){F(t)}e.i&=-9,t()}if(o.style){let t=o.style;const e=f(n);if(!_.has(e)){const l=()=>{};((t,e,n)=>{let l=_.get(t);J&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,_.set(t,l)})(e,t,!!(1&n.i)),l()}}}const s=e.$,i=()=>j(e,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,e,n)}l()}})(this)))}disconnectedCallback(){G.jmp((()=>{}))}componentOnReady(){return R(this).N}};n.T=t[0],o.includes(i)||s.get(i)||(l.push(i),s.define(i,N(r,n,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const t=null!==(n=G.j)&&void 0!==n?n:i(B);null!=t&&u.setAttribute("nonce",t),r.insertBefore(u,c?c.nextSibling:r.firstChild)}h=!1,a.length?a.map((t=>t.connectedCallback())):G.jmp((()=>d=setTimeout(x,30)))},W=t=>G.j=t,A=new WeakMap,R=t=>A.get(t),U=(t,e)=>A.set(e.v=t,e),q=(t,e)=>{const n={i:0,g:t,S:e,C:new Map};return n.N=new Promise((t=>n.M=t)),t["s-p"]=[],t["s-rc"]=[],A.set(t,n)},D=(t,e)=>e in t,F=(t,e)=>(0,console.error)(t,e),H=new Map,V=t=>{const e=t.p.replace(/-/g,"_"),n=t.T,l=H.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(H.set(n,t),t[e])),F)
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},_=new Map,z="undefined"!=typeof window?window:{},B=z.document||{head:{}},G={i:0,P:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},I=t=>Promise.resolve(t),J=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),K=[],Q=[],X=(t,e)=>n=>{t.push(n),l||(l=!0,e&&4&G.i?tt(Z):G.raf(Z))},Y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){F(t)}t.length=0},Z=()=>{Y(K),Y(Q),(l=K.length>0)&&G.raf(Z)},tt=t=>I().then(t),et=X(Q,!0);export{T as b,r as h,I as p,U as r,W as s}
|