proto-table-wc 0.0.448 → 0.0.450
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-cee97aa3.js → index-955d8089.js} +61 -9
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/proto-table-wc.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/esm/demo-table_2.entry.js +1 -1
- package/dist/esm/{index-587ac352.js → index-89b90415.js} +61 -9
- package/dist/esm/loader.js +2 -2
- package/dist/esm/proto-table-wc.js +3 -3
- package/dist/proto-table-wc/{p-84920540.js → p-569a1d33.js} +2 -2
- package/dist/proto-table-wc/{p-382dba28.entry.js → p-80a6126c.entry.js} +1 -1
- package/dist/proto-table-wc/proto-table-wc.esm.js +1 -1
- package/package.json +4 -4
@@ -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-955d8089.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
|
|
@@ -806,9 +806,9 @@ const patch = (oldVNode, newVNode) => {
|
|
806
806
|
}
|
807
807
|
};
|
808
808
|
/**
|
809
|
-
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
|
810
|
-
*
|
811
|
-
*
|
809
|
+
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
|
810
|
+
* them with `null`. This signals that the DOM element corresponding to the VDom
|
811
|
+
* node has been removed from the DOM.
|
812
812
|
*
|
813
813
|
* @param vNode a virtual DOM node
|
814
814
|
*/
|
@@ -1019,6 +1019,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
1019
1019
|
*/
|
1020
1020
|
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
1021
1021
|
try {
|
1022
|
+
/**
|
1023
|
+
* minification optimization: `allRenderFn` is `true` if all components have a `render`
|
1024
|
+
* method, so we can call the method immediately. If not, check before calling it.
|
1025
|
+
*/
|
1022
1026
|
instance = instance.render() ;
|
1023
1027
|
{
|
1024
1028
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
@@ -1092,6 +1096,16 @@ const appDidLoad = (who) => {
|
|
1092
1096
|
}
|
1093
1097
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
1094
1098
|
};
|
1099
|
+
/**
|
1100
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
1101
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
1102
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
1103
|
+
* output bundle and this function returns `undefined`.
|
1104
|
+
* @param instance any object that may or may not contain methods
|
1105
|
+
* @param method method name
|
1106
|
+
* @param arg single arbitrary argument
|
1107
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
1108
|
+
*/
|
1095
1109
|
const safeCall = (instance, method, arg) => {
|
1096
1110
|
if (instance && instance[method]) {
|
1097
1111
|
try {
|
@@ -1259,7 +1273,18 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1259
1273
|
}
|
1260
1274
|
return Cstr;
|
1261
1275
|
};
|
1262
|
-
|
1276
|
+
/**
|
1277
|
+
* Initialize a Stencil component given a reference to its host element, its
|
1278
|
+
* runtime bookkeeping data structure, runtime metadata about the component,
|
1279
|
+
* and (optionally) an HMR version ID.
|
1280
|
+
*
|
1281
|
+
* @param elm a host element
|
1282
|
+
* @param hostRef the element's runtime bookkeeping object
|
1283
|
+
* @param cmpMeta runtime metadata for the Stencil component
|
1284
|
+
* @param hmrVersionId an (optional) HMR version ID
|
1285
|
+
*/
|
1286
|
+
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
1287
|
+
let Cstr;
|
1263
1288
|
// initializeComponent
|
1264
1289
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
1265
1290
|
// Let the runtime know that the component has been initialized
|
@@ -1491,22 +1516,49 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1491
1516
|
* @returns void
|
1492
1517
|
*/
|
1493
1518
|
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
1519
|
+
/**
|
1520
|
+
* A WeakMap mapping runtime component references to their corresponding host reference
|
1521
|
+
* instances.
|
1522
|
+
*/
|
1494
1523
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
1524
|
+
/**
|
1525
|
+
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
1526
|
+
*
|
1527
|
+
* @param ref the runtime ref of interest
|
1528
|
+
* @returns the Host reference (if found) or undefined
|
1529
|
+
*/
|
1495
1530
|
const getHostRef = (ref) => hostRefs.get(ref);
|
1531
|
+
/**
|
1532
|
+
* Register a lazy instance with the {@link hostRefs} object so it's
|
1533
|
+
* corresponding {@link d.HostRef} can be retrieved later.
|
1534
|
+
*
|
1535
|
+
* @param lazyInstance the lazy instance of interest
|
1536
|
+
* @param hostRef that instances `HostRef` object
|
1537
|
+
* @returns a reference to the host ref WeakMap
|
1538
|
+
*/
|
1496
1539
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
1497
|
-
|
1540
|
+
/**
|
1541
|
+
* Register a host element for a Stencil component, setting up various metadata
|
1542
|
+
* and callbacks based on {@link BUILD} flags as well as the component's runtime
|
1543
|
+
* metadata.
|
1544
|
+
*
|
1545
|
+
* @param hostElement the host element to register
|
1546
|
+
* @param cmpMeta runtime metadata for that component
|
1547
|
+
* @returns a reference to the host ref WeakMap
|
1548
|
+
*/
|
1549
|
+
const registerHost = (hostElement, cmpMeta) => {
|
1498
1550
|
const hostRef = {
|
1499
1551
|
$flags$: 0,
|
1500
|
-
$hostElement$:
|
1552
|
+
$hostElement$: hostElement,
|
1501
1553
|
$cmpMeta$: cmpMeta,
|
1502
1554
|
$instanceValues$: new Map(),
|
1503
1555
|
};
|
1504
1556
|
{
|
1505
1557
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
1506
|
-
|
1507
|
-
|
1558
|
+
hostElement['s-p'] = [];
|
1559
|
+
hostElement['s-rc'] = [];
|
1508
1560
|
}
|
1509
|
-
return hostRefs.set(
|
1561
|
+
return hostRefs.set(hostElement, hostRef);
|
1510
1562
|
};
|
1511
1563
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
1512
1564
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
package/dist/cjs/loader.cjs.js
CHANGED
@@ -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-955d8089.js');
|
6
6
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
@@ -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-955d8089.js');
|
6
6
|
|
7
7
|
/*
|
8
|
-
Stencil Client Patch Browser v4.
|
8
|
+
Stencil Client Patch Browser v4.4.1 | 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-89b90415.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
|
|
@@ -784,9 +784,9 @@ const patch = (oldVNode, newVNode) => {
|
|
784
784
|
}
|
785
785
|
};
|
786
786
|
/**
|
787
|
-
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
|
788
|
-
*
|
789
|
-
*
|
787
|
+
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
|
788
|
+
* them with `null`. This signals that the DOM element corresponding to the VDom
|
789
|
+
* node has been removed from the DOM.
|
790
790
|
*
|
791
791
|
* @param vNode a virtual DOM node
|
792
792
|
*/
|
@@ -997,6 +997,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
997
997
|
*/
|
998
998
|
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
999
999
|
try {
|
1000
|
+
/**
|
1001
|
+
* minification optimization: `allRenderFn` is `true` if all components have a `render`
|
1002
|
+
* method, so we can call the method immediately. If not, check before calling it.
|
1003
|
+
*/
|
1000
1004
|
instance = instance.render() ;
|
1001
1005
|
{
|
1002
1006
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
@@ -1070,6 +1074,16 @@ const appDidLoad = (who) => {
|
|
1070
1074
|
}
|
1071
1075
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
1072
1076
|
};
|
1077
|
+
/**
|
1078
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
1079
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
1080
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
1081
|
+
* output bundle and this function returns `undefined`.
|
1082
|
+
* @param instance any object that may or may not contain methods
|
1083
|
+
* @param method method name
|
1084
|
+
* @param arg single arbitrary argument
|
1085
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
1086
|
+
*/
|
1073
1087
|
const safeCall = (instance, method, arg) => {
|
1074
1088
|
if (instance && instance[method]) {
|
1075
1089
|
try {
|
@@ -1237,7 +1251,18 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1237
1251
|
}
|
1238
1252
|
return Cstr;
|
1239
1253
|
};
|
1240
|
-
|
1254
|
+
/**
|
1255
|
+
* Initialize a Stencil component given a reference to its host element, its
|
1256
|
+
* runtime bookkeeping data structure, runtime metadata about the component,
|
1257
|
+
* and (optionally) an HMR version ID.
|
1258
|
+
*
|
1259
|
+
* @param elm a host element
|
1260
|
+
* @param hostRef the element's runtime bookkeeping object
|
1261
|
+
* @param cmpMeta runtime metadata for the Stencil component
|
1262
|
+
* @param hmrVersionId an (optional) HMR version ID
|
1263
|
+
*/
|
1264
|
+
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
1265
|
+
let Cstr;
|
1241
1266
|
// initializeComponent
|
1242
1267
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
1243
1268
|
// Let the runtime know that the component has been initialized
|
@@ -1469,22 +1494,49 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1469
1494
|
* @returns void
|
1470
1495
|
*/
|
1471
1496
|
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
1497
|
+
/**
|
1498
|
+
* A WeakMap mapping runtime component references to their corresponding host reference
|
1499
|
+
* instances.
|
1500
|
+
*/
|
1472
1501
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
1502
|
+
/**
|
1503
|
+
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
1504
|
+
*
|
1505
|
+
* @param ref the runtime ref of interest
|
1506
|
+
* @returns the Host reference (if found) or undefined
|
1507
|
+
*/
|
1473
1508
|
const getHostRef = (ref) => hostRefs.get(ref);
|
1509
|
+
/**
|
1510
|
+
* Register a lazy instance with the {@link hostRefs} object so it's
|
1511
|
+
* corresponding {@link d.HostRef} can be retrieved later.
|
1512
|
+
*
|
1513
|
+
* @param lazyInstance the lazy instance of interest
|
1514
|
+
* @param hostRef that instances `HostRef` object
|
1515
|
+
* @returns a reference to the host ref WeakMap
|
1516
|
+
*/
|
1474
1517
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
1475
|
-
|
1518
|
+
/**
|
1519
|
+
* Register a host element for a Stencil component, setting up various metadata
|
1520
|
+
* and callbacks based on {@link BUILD} flags as well as the component's runtime
|
1521
|
+
* metadata.
|
1522
|
+
*
|
1523
|
+
* @param hostElement the host element to register
|
1524
|
+
* @param cmpMeta runtime metadata for that component
|
1525
|
+
* @returns a reference to the host ref WeakMap
|
1526
|
+
*/
|
1527
|
+
const registerHost = (hostElement, cmpMeta) => {
|
1476
1528
|
const hostRef = {
|
1477
1529
|
$flags$: 0,
|
1478
|
-
$hostElement$:
|
1530
|
+
$hostElement$: hostElement,
|
1479
1531
|
$cmpMeta$: cmpMeta,
|
1480
1532
|
$instanceValues$: new Map(),
|
1481
1533
|
};
|
1482
1534
|
{
|
1483
1535
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
1484
|
-
|
1485
|
-
|
1536
|
+
hostElement['s-p'] = [];
|
1537
|
+
hostElement['s-rc'] = [];
|
1486
1538
|
}
|
1487
|
-
return hostRefs.set(
|
1539
|
+
return hostRefs.set(hostElement, hostRef);
|
1488
1540
|
};
|
1489
1541
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
1490
1542
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
package/dist/esm/loader.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
2
|
-
export { s as setNonce } from './index-
|
1
|
+
import { b as bootstrapLazy } from './index-89b90415.js';
|
2
|
+
export { s as setNonce } from './index-89b90415.js';
|
3
3
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
@@ -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-89b90415.js';
|
2
|
+
export { s as setNonce } from './index-89b90415.js';
|
3
3
|
|
4
4
|
/*
|
5
|
-
Stencil Client Patch Browser v4.
|
5
|
+
Stencil Client Patch Browser v4.4.1 | MIT Licensed | https://stenciljs.com
|
6
6
|
*/
|
7
7
|
const patchBrowser = () => {
|
8
8
|
const importMeta = import.meta.url;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
let n,t,e=!1,l=!1;const o={},s=n=>"object"==(n=typeof n)||"function"===n;function i(n){var t,e,l;return null!==(l=null===(e=null===(t=n.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===e?void 0:e.getAttribute("content"))&&void 0!==l?l:void 0}const c=(n,t,...e)=>{let l=null,o=!1,i=!1;const c=[],u=t=>{for(let e=0;e<t.length;e++)l=t[e],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof n&&!s(l))&&(l+=""),o&&i?c[c.length-1].t+=l:c.push(o?r(null,l):l),i=o)};if(u(e),t){const n=t.className||t.class;n&&(t.class="object"!=typeof n?n:Object.keys(n).filter((t=>n[t])).join(" "))}const a=r(n,null);return a.l=t,c.length>0&&(a.o=c),a},r=(n,t)=>({i:0,u:n,t,h:null,o:null,l:null}),u={},a=new WeakMap,f=n=>"sc-"+n.p,d=(n,t,e,l,o,i)=>{if(e!==l){let c=F(n,t),r=t.toLowerCase();if("class"===t){const t=n.classList,o=y(e),s=y(l);t.remove(...o.filter((n=>n&&!s.includes(n)))),t.add(...s.filter((n=>n&&!o.includes(n))))}else if("ref"===t)l&&l(n);else if(c||"o"!==t[0]||"n"!==t[1]){const r=s(l);if((c||r&&null!==l)&&!o)try{if(n.tagName.includes("-"))n[t]=l;else{const o=null==l?"":l;"list"===t?c=!1:null!=e&&n[t]==o||(n[t]=o)}}catch(n){}null==l||!1===l?!1===l&&""!==n.getAttribute(t)||n.removeAttribute(t):(!c||4&i||o)&&!r&&n.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):F(B,r)?r.slice(2):r[2]+t.slice(3),e&&I.rel(n,t,e,!1),l&&I.ael(n,t,l,!1)}},h=/\s/,y=n=>n?n.split(h):[],p=(n,t,e,l)=>{const s=11===t.h.nodeType&&t.h.host?t.h.host:t.h,i=n&&n.l||o,c=t.l||o;for(l in i)l in c||d(s,l,i[l],void 0,e,t.i);for(l in c)d(s,l,i[l],c[l],e,t.i)},m=(t,l,o)=>{const s=l.o[o];let i,c,r=0;if(null!==s.t)i=s.h=G.createTextNode(s.t);else{if(e||(e="svg"===s.u),i=s.h=G.createElementNS(e?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.u),e&&"foreignObject"===s.u&&(e=!1),p(null,s,e),null!=n&&i["s-si"]!==n&&i.classList.add(i["s-si"]=n),s.o)for(r=0;r<s.o.length;++r)c=m(t,s,r),c&&i.appendChild(c);"svg"===s.u?e=!1:"foreignObject"===i.tagName&&(e=!0)}return i},$=(n,e,l,o,s,i)=>{let c,r=n;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=m(null,l,s),c&&(o[s].h=c,r.insertBefore(c,e)))},v=(n,t,e)=>{for(let l=t;l<=e;++l){const t=n[l];if(t){const n=t.h;g(t),n&&n.remove()}}},w=(n,t)=>n.u===t.u,b=(n,t)=>{const l=t.h=n.h,o=n.o,s=t.o,i=t.u,c=t.t;null===c?(e="svg"===i||"foreignObject"!==i&&e,p(n,t,e),null!==o&&null!==s?((n,t,e,l)=>{let o,s=0,i=0,c=t.length-1,r=t[0],u=t[c],a=l.length-1,f=l[0],d=l[a];for(;s<=c&&i<=a;)null==r?r=t[++s]:null==u?u=t[--c]:null==f?f=l[++i]:null==d?d=l[--a]:w(r,f)?(b(r,f),r=t[++s],f=l[++i]):w(u,d)?(b(u,d),u=t[--c],d=l[--a]):w(r,d)?(b(r,d),n.insertBefore(r.h,u.h.nextSibling),r=t[++s],d=l[--a]):w(u,f)?(b(u,f),n.insertBefore(u.h,r.h),u=t[--c],f=l[++i]):(o=m(t&&t[i],e,i),f=l[++i],o&&r.h.parentNode.insertBefore(o,r.h));s>c?$(n,null==l[a+1]?null:l[a+1].h,e,l,i,a):i>a&&v(t,s,c)})(l,o,t,s):null!==s?(null!==n.t&&(l.textContent=""),$(l,null,t,s,0,s.length-1)):null!==o&&v(o,0,o.length-1),e&&"svg"===i&&(e=!1)):n.t!==c&&(l.data=c)},g=n=>{n.l&&n.l.ref&&n.l.ref(null),n.o&&n.o.map(g)},j=(n,t)=>{t&&!n.m&&t["s-p"]&&t["s-p"].push(new Promise((t=>n.m=t)))},S=(n,t)=>{if(n.i|=16,!(4&n.i))return j(n,n.$),en((()=>O(n,t)));n.i|=512},O=(n,t)=>{const e=n.v;let l;return t&&(l=A(e,"componentWillLoad")),M(l,(()=>C(n,e,t)))},M=(n,t)=>k(n)?n.then(t):t(),k=n=>n instanceof Promise||n&&n.then&&"function"==typeof n.then,C=async(n,t,e)=>{var l;const o=n.
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},z=new Map,B="undefined"!=typeof window?window:{},G=B.document||{head:{}},I={i:0,
|
1
|
+
let n,t,e=!1,l=!1;const o={},s=n=>"object"==(n=typeof n)||"function"===n;function i(n){var t,e,l;return null!==(l=null===(e=null===(t=n.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===e?void 0:e.getAttribute("content"))&&void 0!==l?l:void 0}const c=(n,t,...e)=>{let l=null,o=!1,i=!1;const c=[],u=t=>{for(let e=0;e<t.length;e++)l=t[e],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof n&&!s(l))&&(l+=""),o&&i?c[c.length-1].t+=l:c.push(o?r(null,l):l),i=o)};if(u(e),t){const n=t.className||t.class;n&&(t.class="object"!=typeof n?n:Object.keys(n).filter((t=>n[t])).join(" "))}const a=r(n,null);return a.l=t,c.length>0&&(a.o=c),a},r=(n,t)=>({i:0,u:n,t,h:null,o:null,l:null}),u={},a=new WeakMap,f=n=>"sc-"+n.p,d=(n,t,e,l,o,i)=>{if(e!==l){let c=F(n,t),r=t.toLowerCase();if("class"===t){const t=n.classList,o=y(e),s=y(l);t.remove(...o.filter((n=>n&&!s.includes(n)))),t.add(...s.filter((n=>n&&!o.includes(n))))}else if("ref"===t)l&&l(n);else if(c||"o"!==t[0]||"n"!==t[1]){const r=s(l);if((c||r&&null!==l)&&!o)try{if(n.tagName.includes("-"))n[t]=l;else{const o=null==l?"":l;"list"===t?c=!1:null!=e&&n[t]==o||(n[t]=o)}}catch(n){}null==l||!1===l?!1===l&&""!==n.getAttribute(t)||n.removeAttribute(t):(!c||4&i||o)&&!r&&n.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):F(B,r)?r.slice(2):r[2]+t.slice(3),e&&I.rel(n,t,e,!1),l&&I.ael(n,t,l,!1)}},h=/\s/,y=n=>n?n.split(h):[],p=(n,t,e,l)=>{const s=11===t.h.nodeType&&t.h.host?t.h.host:t.h,i=n&&n.l||o,c=t.l||o;for(l in i)l in c||d(s,l,i[l],void 0,e,t.i);for(l in c)d(s,l,i[l],c[l],e,t.i)},m=(t,l,o)=>{const s=l.o[o];let i,c,r=0;if(null!==s.t)i=s.h=G.createTextNode(s.t);else{if(e||(e="svg"===s.u),i=s.h=G.createElementNS(e?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.u),e&&"foreignObject"===s.u&&(e=!1),p(null,s,e),null!=n&&i["s-si"]!==n&&i.classList.add(i["s-si"]=n),s.o)for(r=0;r<s.o.length;++r)c=m(t,s,r),c&&i.appendChild(c);"svg"===s.u?e=!1:"foreignObject"===i.tagName&&(e=!0)}return i},$=(n,e,l,o,s,i)=>{let c,r=n;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=m(null,l,s),c&&(o[s].h=c,r.insertBefore(c,e)))},v=(n,t,e)=>{for(let l=t;l<=e;++l){const t=n[l];if(t){const n=t.h;g(t),n&&n.remove()}}},w=(n,t)=>n.u===t.u,b=(n,t)=>{const l=t.h=n.h,o=n.o,s=t.o,i=t.u,c=t.t;null===c?(e="svg"===i||"foreignObject"!==i&&e,p(n,t,e),null!==o&&null!==s?((n,t,e,l)=>{let o,s=0,i=0,c=t.length-1,r=t[0],u=t[c],a=l.length-1,f=l[0],d=l[a];for(;s<=c&&i<=a;)null==r?r=t[++s]:null==u?u=t[--c]:null==f?f=l[++i]:null==d?d=l[--a]:w(r,f)?(b(r,f),r=t[++s],f=l[++i]):w(u,d)?(b(u,d),u=t[--c],d=l[--a]):w(r,d)?(b(r,d),n.insertBefore(r.h,u.h.nextSibling),r=t[++s],d=l[--a]):w(u,f)?(b(u,f),n.insertBefore(u.h,r.h),u=t[--c],f=l[++i]):(o=m(t&&t[i],e,i),f=l[++i],o&&r.h.parentNode.insertBefore(o,r.h));s>c?$(n,null==l[a+1]?null:l[a+1].h,e,l,i,a):i>a&&v(t,s,c)})(l,o,t,s):null!==s?(null!==n.t&&(l.textContent=""),$(l,null,t,s,0,s.length-1)):null!==o&&v(o,0,o.length-1),e&&"svg"===i&&(e=!1)):n.t!==c&&(l.data=c)},g=n=>{n.l&&n.l.ref&&n.l.ref(null),n.o&&n.o.map(g)},j=(n,t)=>{t&&!n.m&&t["s-p"]&&t["s-p"].push(new Promise((t=>n.m=t)))},S=(n,t)=>{if(n.i|=16,!(4&n.i))return j(n,n.$),en((()=>O(n,t)));n.i|=512},O=(n,t)=>{const e=n.v;let l;return t&&(l=A(e,"componentWillLoad")),M(l,(()=>C(n,e,t)))},M=(n,t)=>k(n)?n.then(t):t(),k=n=>n instanceof Promise||n&&n.then&&"function"==typeof n.then,C=async(n,t,e)=>{var l;const o=n.j,s=o["s-rc"];e&&(n=>{const t=n.S,e=n.j,l=t.i,o=((n,t)=>{var e;const l=f(t),o=z.get(l);if(n=11===n.nodeType?n:G,o)if("string"==typeof o){let t,s=a.get(n=n.head||n);if(s||a.set(n,s=new Set),!s.has(l)){{t=G.createElement("style"),t.innerHTML=o;const l=null!==(e=I.O)&&void 0!==e?e:i(G);null!=l&&t.setAttribute("nonce",l),n.insertBefore(t,n.querySelector("link"))}s&&s.add(l)}}else n.adoptedStyleSheets.includes(o)||(n.adoptedStyleSheets=[...n.adoptedStyleSheets,o]);return l})(e.shadowRoot?e.shadowRoot:e.getRootNode(),t);10&l&&(e["s-sc"]=o,e.classList.add(o+"-h"))})(n);P(n,t,o,e),s&&(s.map((n=>n())),o["s-rc"]=void 0);{const t=null!==(l=o["s-p"])&&void 0!==l?l:[],e=()=>x(n);0===t.length?e():(Promise.all(t).then(e),n.i|=4,t.length=0)}},P=(e,l,o,s)=>{try{l=l.render(),e.i&=-17,e.i|=2,((e,l,o=!1)=>{const s=e.j,i=e.M||r(null,null),a=(n=>n&&n.u===u)(l)?l:c(null,null,l);if(t=s.tagName,o&&a.l)for(const n of Object.keys(a.l))s.hasAttribute(n)&&!["key","ref","style","class"].includes(n)&&(a.l[n]=s[n]);a.u=null,a.i|=4,e.M=a,a.h=i.h=s.shadowRoot||s,n=s["s-sc"],b(i,a)})(e,l,s)}catch(n){H(n,e.j)}return null},x=n=>{const t=n.j,e=n.v,l=n.$;64&n.i||(n.i|=64,E(t),A(e,"componentDidLoad"),n.k(t),l||L()),n.m&&(n.m(),n.m=void 0),512&n.i&&tn((()=>S(n,!1))),n.i&=-517},L=()=>{E(G.documentElement),tn((()=>(n=>{const t=I.ce("appload",{detail:{namespace:"proto-table-wc"}});return n.dispatchEvent(t),t})(B)))},A=(n,t,e)=>{if(n&&n[t])try{return n[t](e)}catch(n){H(n)}},E=n=>n.classList.add("hydrated"),N=(n,t,e)=>{var l;if(t.C){const o=Object.entries(t.C),i=n.prototype;if(o.map((([n,[t]])=>{(31&t||2&e&&32&t)&&Object.defineProperty(i,n,{get(){return((n,t)=>U(this).P.get(t))(0,n)},set(t){((n,t,e)=>{const l=U(n),o=l.P.get(t),i=l.i,c=l.v;e=(n=>(null==n||s(n),n))(e),8&i&&void 0!==o||e===o||Number.isNaN(o)&&Number.isNaN(e)||(l.P.set(t,e),c&&2==(18&i)&&S(l,!1))})(this,n,t)},configurable:!0,enumerable:!0})})),1&e){const e=new Map;i.attributeChangedCallback=function(n,l,o){I.jmp((()=>{const s=e.get(n);if(this.hasOwnProperty(s))o=this[s],delete this[s];else{if(i.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==o)return;if(null==s){const e=U(this),s=null==e?void 0:e.i;if(!(8&s)&&128&s&&o!==l){const s=e.v,i=t.L[n];null==i||i.forEach((t=>{null!=s[t]&&s[t].call(s,o,l,n)}))}return}}this[s]=(null!==o||"boolean"!=typeof this[s])&&o}))},n.observedAttributes=Array.from(new Set([...Object.keys(null!==(l=t.L)&&void 0!==l?l:{}),...o.filter((([n,t])=>15&t[0])).map((([n,t])=>{const l=t[1]||n;return e.set(l,n),l}))]))}}return n},T=(n,t={})=>{var e;const l=[],o=t.exclude||[],s=B.customElements,c=G.head,r=c.querySelector("meta[charset]"),u=G.createElement("style"),a=[];let d,h=!0;Object.assign(I,t),I.A=new URL(t.resourcesUrl||"./",G.baseURI).href,n.map((n=>{n[1].map((t=>{const e={i:t[0],p:t[1],C:t[2],N:t[3]};e.C=t[2];const i=e.p,c=class extends HTMLElement{constructor(n){super(n),D(n=this,e),1&e.i&&n.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),h?a.push(this):I.jmp((()=>(n=>{if(0==(1&I.i)){const t=U(n),e=t.S,l=()=>{};if(1&t.i)(null==t?void 0:t.v)||(null==t?void 0:t.T)&&t.T.then((()=>{}));else{t.i|=1;{let e=n;for(;e=e.parentNode||e.host;)if(e["s-p"]){j(t,t.$=e);break}}e.C&&Object.entries(e.C).map((([t,[e]])=>{if(31&e&&n.hasOwnProperty(t)){const e=n[t];delete n[t],n[t]=e}})),(async(n,t,e)=>{let l;if(0==(32&t.i)){t.i|=32;{if(l=_(e),l.then){const n=()=>{};l=await l,n()}l.isProxied||(N(l,e,2),l.isProxied=!0);const n=()=>{};t.i|=8;try{new l(t)}catch(n){H(n)}t.i&=-9,n()}if(l.style){let n=l.style;const t=f(e);if(!z.has(t)){const l=()=>{};((n,t,e)=>{let l=z.get(n);K&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,z.set(n,l)})(t,n,!!(1&e.i)),l()}}}const o=t.$,s=()=>S(t,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(0,t,e)}l()}})(this)))}disconnectedCallback(){I.jmp((()=>(async()=>{if(0==(1&I.i)){const n=U(this);(null==n?void 0:n.v)||(null==n?void 0:n.T)&&n.T.then((()=>{}))}})()))}componentOnReady(){return U(this).T}};e.W=n[0],o.includes(i)||s.get(i)||(l.push(i),s.define(i,N(c,e,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const n=null!==(e=I.O)&&void 0!==e?e:i(G);null!=n&&u.setAttribute("nonce",n),c.insertBefore(u,r?r.nextSibling:c.firstChild)}h=!1,a.length?a.map((n=>n.connectedCallback())):I.jmp((()=>d=setTimeout(L,30)))},W=n=>I.O=n,R=new WeakMap,U=n=>R.get(n),q=(n,t)=>R.set(t.v=n,t),D=(n,t)=>{const e={i:0,j:n,S:t,P:new Map};return e.T=new Promise((n=>e.k=n)),n["s-p"]=[],n["s-rc"]=[],R.set(n,e)},F=(n,t)=>t in n,H=(n,t)=>(0,console.error)(n,t),V=new Map,_=n=>{const t=n.p.replace(/-/g,"_"),e=n.W,l=V.get(e);return l?l[t]:import(`./${e}.entry.js`).then((n=>(V.set(e,n),n[t])),H)
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},z=new Map,B="undefined"!=typeof window?window:{},G=B.document||{head:{}},I={i:0,A:"",jmp:n=>n(),raf:n=>requestAnimationFrame(n),ael:(n,t,e,l)=>n.addEventListener(t,e,l),rel:(n,t,e,l)=>n.removeEventListener(t,e,l),ce:(n,t)=>new CustomEvent(n,t)},J=n=>Promise.resolve(n),K=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(n){}return!1})(),Q=[],X=[],Y=(n,t)=>e=>{n.push(e),l||(l=!0,t&&4&I.i?tn(nn):I.raf(nn))},Z=n=>{for(let t=0;t<n.length;t++)try{n[t](performance.now())}catch(n){H(n)}n.length=0},nn=()=>{Z(Q),Z(X),(l=Q.length>0)&&I.raf(nn)},tn=n=>J().then(n),en=Y(X,!0);export{T as b,c as h,J as p,q as r,W as s}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,h as e}from"./p-
|
1
|
+
import{r as t,h as e}from"./p-569a1d33.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
|
1
|
+
import{p as a,b as e}from"./p-569a1d33.js";export{s as setNonce}from"./p-569a1d33.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),a(t)})().then((a=>e([["p-80a6126c",[[1,"demo-table"],[0,"proto-table",{data:[16],details:[8],fields:[16],expanded:[32],sort:[32],clicks:[32]}]]]],a)));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "proto-table-wc",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.450",
|
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": "4.
|
28
|
+
"@stencil/core": "4.4.1"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
|
-
"cspell": "7.3.
|
32
|
-
"eslint": "8.
|
31
|
+
"cspell": "7.3.7",
|
32
|
+
"eslint": "8.51.0",
|
33
33
|
"prettier": "3.0.3",
|
34
34
|
"tslint": "6.1.3",
|
35
35
|
"typescript": "5.2.2"
|