proto-table-wc 0.0.433 → 0.0.435

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-c9f1b4c7.js');
5
+ const index = require('./index-758b107e.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
 
@@ -301,6 +301,21 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
301
301
  *
302
302
  * Modified for Stencil's compiler and vdom
303
303
  */
304
+ /**
305
+ * When running a VDom render set properties present on a VDom node onto the
306
+ * corresponding HTML element.
307
+ *
308
+ * Note that this function has special functionality for the `class`,
309
+ * `style`, `key`, and `ref` attributes, as well as event handlers (like
310
+ * `onClick`, etc). All others are just passed through as-is.
311
+ *
312
+ * @param elm the HTMLElement onto which attributes should be set
313
+ * @param memberName the name of the attribute to set
314
+ * @param oldValue the old value for the attribute
315
+ * @param newValue the new value for the attribute
316
+ * @param isSvg whether we're in an svg context or not
317
+ * @param flags bitflags for Vdom variables
318
+ */
304
319
  const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
305
320
  if (oldValue !== newValue) {
306
321
  let isProp = isMemberInElement(elm, memberName);
@@ -813,12 +828,39 @@ const nullifyVNodeRefs = (vNode) => {
813
828
  * @param hostRef data needed to root and render the virtual DOM tree, such as
814
829
  * the DOM node into which it should be rendered.
815
830
  * @param renderFnResults the virtual DOM nodes to be rendered
831
+ * @param isInitialLoad whether or not this is the first call after page load
816
832
  */
817
- const renderVdom = (hostRef, renderFnResults) => {
833
+ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
818
834
  const hostElm = hostRef.$hostElement$;
819
835
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
836
+ // if `renderFnResults` is a Host node then we can use it directly. If not,
837
+ // we need to call `h` again to wrap the children of our component in a
838
+ // 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
839
+ // implicitly that the top-level vdom node is 1) an only child and 2)
840
+ // contains attrs that need to be set on the host element.
820
841
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
821
842
  hostTagName = hostElm.tagName;
843
+ // On the first render and *only* on the first render we want to check for
844
+ // any attributes set on the host element which are also set on the vdom
845
+ // node. If we find them, we override the value on the VDom node attrs with
846
+ // the value from the host element, which allows developers building apps
847
+ // with Stencil components to override e.g. the `role` attribute on a
848
+ // component even if it's already set on the `Host`.
849
+ if (isInitialLoad && rootVnode.$attrs$) {
850
+ for (const key of Object.keys(rootVnode.$attrs$)) {
851
+ // We have a special implementation in `setAccessor` for `style` and
852
+ // `class` which reconciles values coming from the VDom with values
853
+ // already present on the DOM element, so we don't want to override those
854
+ // attributes on the VDom tree with values from the host element if they
855
+ // are present.
856
+ //
857
+ // Likewise, `ref` and `key` are special internal values for the Stencil
858
+ // runtime and we don't want to override those either.
859
+ if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
860
+ rootVnode.$attrs$[key] = hostElm[key];
861
+ }
862
+ }
863
+ }
822
864
  rootVnode.$tag$ = null;
823
865
  rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
824
866
  hostRef.$vnode$ = rootVnode;
@@ -917,6 +959,16 @@ const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.th
917
959
  */
918
960
  const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
919
961
  (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
962
+ /**
963
+ * Update a component given reference to its host elements and so on.
964
+ *
965
+ * @param hostRef an object containing references to the element's host node,
966
+ * VDom nodes, and other metadata
967
+ * @param instance a reference to the underlying host element where it will be
968
+ * rendered
969
+ * @param isInitialLoad whether or not this function is being called as part of
970
+ * the first render cycle
971
+ */
920
972
  const updateComponent = async (hostRef, instance, isInitialLoad) => {
921
973
  var _a;
922
974
  const elm = hostRef.$hostElement$;
@@ -928,7 +980,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
928
980
  }
929
981
  const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
930
982
  {
931
- callRender(hostRef, instance);
983
+ callRender(hostRef, instance, elm, isInitialLoad);
932
984
  }
933
985
  if (rc) {
934
986
  // ok, so turns out there are some child host elements
@@ -952,7 +1004,19 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
952
1004
  }
953
1005
  }
954
1006
  };
955
- const callRender = (hostRef, instance, elm) => {
1007
+ /**
1008
+ * Handle making the call to the VDom renderer with the proper context given
1009
+ * various build variables
1010
+ *
1011
+ * @param hostRef an object containing references to the element's host node,
1012
+ * VDom nodes, and other metadata
1013
+ * @param instance a reference to the underlying host element where it will be
1014
+ * rendered
1015
+ * @param elm the Host element for the component
1016
+ * @param isInitialLoad whether or not this function is being called as part of
1017
+ * @returns an empty promise
1018
+ */
1019
+ const callRender = (hostRef, instance, elm, isInitialLoad) => {
956
1020
  try {
957
1021
  instance = instance.render() ;
958
1022
  {
@@ -967,7 +1031,7 @@ const callRender = (hostRef, instance, elm) => {
967
1031
  // or we need to update the css class/attrs on the host element
968
1032
  // DOM WRITE!
969
1033
  {
970
- renderVdom(hostRef, instance);
1034
+ renderVdom(hostRef, instance, isInitialLoad);
971
1035
  }
972
1036
  }
973
1037
  }
@@ -1234,6 +1298,8 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1234
1298
  schedule();
1235
1299
  }
1236
1300
  };
1301
+ const fireConnectedCallback = (instance) => {
1302
+ };
1237
1303
  const connectedCallback = (elm) => {
1238
1304
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1239
1305
  const hostRef = getHostRef(elm);
@@ -1272,12 +1338,25 @@ const connectedCallback = (elm) => {
1272
1338
  initializeComponent(elm, hostRef, cmpMeta);
1273
1339
  }
1274
1340
  }
1341
+ else {
1342
+ // fire off connectedCallback() on component instance
1343
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1344
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1345
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1346
+ }
1347
+ }
1275
1348
  endConnected();
1276
1349
  }
1277
1350
  };
1278
- const disconnectedCallback = (elm) => {
1351
+ const disconnectInstance = (instance) => {
1352
+ };
1353
+ const disconnectedCallback = async (elm) => {
1279
1354
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1280
- getHostRef(elm);
1355
+ const hostRef = getHostRef(elm);
1356
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1357
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1358
+ hostRef.$onReadyPromise$.then(() => disconnectInstance());
1359
+ }
1281
1360
  }
1282
1361
  };
1283
1362
  const bootstrapLazy = (lazyBundles, options = {}) => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-c9f1b4c7.js');
5
+ const index = require('./index-758b107e.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-c9f1b4c7.js');
5
+ const index = require('./index-758b107e.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Browser v4.0.2 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v4.0.3 | 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));
@@ -5,7 +5,7 @@
5
5
  ],
6
6
  "compiler": {
7
7
  "name": "@stencil/core",
8
- "version": "4.0.2",
8
+ "version": "4.0.3",
9
9
  "typescriptVersion": "5.0.4"
10
10
  },
11
11
  "collections": [],
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-0f81ef28.js';
1
+ import { r as registerInstance, h } from './index-238e1f14.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
 
@@ -279,6 +279,21 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
279
279
  *
280
280
  * Modified for Stencil's compiler and vdom
281
281
  */
282
+ /**
283
+ * When running a VDom render set properties present on a VDom node onto the
284
+ * corresponding HTML element.
285
+ *
286
+ * Note that this function has special functionality for the `class`,
287
+ * `style`, `key`, and `ref` attributes, as well as event handlers (like
288
+ * `onClick`, etc). All others are just passed through as-is.
289
+ *
290
+ * @param elm the HTMLElement onto which attributes should be set
291
+ * @param memberName the name of the attribute to set
292
+ * @param oldValue the old value for the attribute
293
+ * @param newValue the new value for the attribute
294
+ * @param isSvg whether we're in an svg context or not
295
+ * @param flags bitflags for Vdom variables
296
+ */
282
297
  const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
283
298
  if (oldValue !== newValue) {
284
299
  let isProp = isMemberInElement(elm, memberName);
@@ -791,12 +806,39 @@ const nullifyVNodeRefs = (vNode) => {
791
806
  * @param hostRef data needed to root and render the virtual DOM tree, such as
792
807
  * the DOM node into which it should be rendered.
793
808
  * @param renderFnResults the virtual DOM nodes to be rendered
809
+ * @param isInitialLoad whether or not this is the first call after page load
794
810
  */
795
- const renderVdom = (hostRef, renderFnResults) => {
811
+ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
796
812
  const hostElm = hostRef.$hostElement$;
797
813
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
814
+ // if `renderFnResults` is a Host node then we can use it directly. If not,
815
+ // we need to call `h` again to wrap the children of our component in a
816
+ // 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
817
+ // implicitly that the top-level vdom node is 1) an only child and 2)
818
+ // contains attrs that need to be set on the host element.
798
819
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
799
820
  hostTagName = hostElm.tagName;
821
+ // On the first render and *only* on the first render we want to check for
822
+ // any attributes set on the host element which are also set on the vdom
823
+ // node. If we find them, we override the value on the VDom node attrs with
824
+ // the value from the host element, which allows developers building apps
825
+ // with Stencil components to override e.g. the `role` attribute on a
826
+ // component even if it's already set on the `Host`.
827
+ if (isInitialLoad && rootVnode.$attrs$) {
828
+ for (const key of Object.keys(rootVnode.$attrs$)) {
829
+ // We have a special implementation in `setAccessor` for `style` and
830
+ // `class` which reconciles values coming from the VDom with values
831
+ // already present on the DOM element, so we don't want to override those
832
+ // attributes on the VDom tree with values from the host element if they
833
+ // are present.
834
+ //
835
+ // Likewise, `ref` and `key` are special internal values for the Stencil
836
+ // runtime and we don't want to override those either.
837
+ if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
838
+ rootVnode.$attrs$[key] = hostElm[key];
839
+ }
840
+ }
841
+ }
800
842
  rootVnode.$tag$ = null;
801
843
  rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
802
844
  hostRef.$vnode$ = rootVnode;
@@ -895,6 +937,16 @@ const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.th
895
937
  */
896
938
  const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
897
939
  (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
940
+ /**
941
+ * Update a component given reference to its host elements and so on.
942
+ *
943
+ * @param hostRef an object containing references to the element's host node,
944
+ * VDom nodes, and other metadata
945
+ * @param instance a reference to the underlying host element where it will be
946
+ * rendered
947
+ * @param isInitialLoad whether or not this function is being called as part of
948
+ * the first render cycle
949
+ */
898
950
  const updateComponent = async (hostRef, instance, isInitialLoad) => {
899
951
  var _a;
900
952
  const elm = hostRef.$hostElement$;
@@ -906,7 +958,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
906
958
  }
907
959
  const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
908
960
  {
909
- callRender(hostRef, instance);
961
+ callRender(hostRef, instance, elm, isInitialLoad);
910
962
  }
911
963
  if (rc) {
912
964
  // ok, so turns out there are some child host elements
@@ -930,7 +982,19 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
930
982
  }
931
983
  }
932
984
  };
933
- const callRender = (hostRef, instance, elm) => {
985
+ /**
986
+ * Handle making the call to the VDom renderer with the proper context given
987
+ * various build variables
988
+ *
989
+ * @param hostRef an object containing references to the element's host node,
990
+ * VDom nodes, and other metadata
991
+ * @param instance a reference to the underlying host element where it will be
992
+ * rendered
993
+ * @param elm the Host element for the component
994
+ * @param isInitialLoad whether or not this function is being called as part of
995
+ * @returns an empty promise
996
+ */
997
+ const callRender = (hostRef, instance, elm, isInitialLoad) => {
934
998
  try {
935
999
  instance = instance.render() ;
936
1000
  {
@@ -945,7 +1009,7 @@ const callRender = (hostRef, instance, elm) => {
945
1009
  // or we need to update the css class/attrs on the host element
946
1010
  // DOM WRITE!
947
1011
  {
948
- renderVdom(hostRef, instance);
1012
+ renderVdom(hostRef, instance, isInitialLoad);
949
1013
  }
950
1014
  }
951
1015
  }
@@ -1212,6 +1276,8 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1212
1276
  schedule();
1213
1277
  }
1214
1278
  };
1279
+ const fireConnectedCallback = (instance) => {
1280
+ };
1215
1281
  const connectedCallback = (elm) => {
1216
1282
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1217
1283
  const hostRef = getHostRef(elm);
@@ -1250,12 +1316,25 @@ const connectedCallback = (elm) => {
1250
1316
  initializeComponent(elm, hostRef, cmpMeta);
1251
1317
  }
1252
1318
  }
1319
+ else {
1320
+ // fire off connectedCallback() on component instance
1321
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1322
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1323
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1324
+ }
1325
+ }
1253
1326
  endConnected();
1254
1327
  }
1255
1328
  };
1256
- const disconnectedCallback = (elm) => {
1329
+ const disconnectInstance = (instance) => {
1330
+ };
1331
+ const disconnectedCallback = async (elm) => {
1257
1332
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1258
- getHostRef(elm);
1333
+ const hostRef = getHostRef(elm);
1334
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1335
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1336
+ hostRef.$onReadyPromise$.then(() => disconnectInstance());
1337
+ }
1259
1338
  }
1260
1339
  };
1261
1340
  const bootstrapLazy = (lazyBundles, options = {}) => {
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-0f81ef28.js';
2
- export { s as setNonce } from './index-0f81ef28.js';
1
+ import { b as bootstrapLazy } from './index-238e1f14.js';
2
+ export { s as setNonce } from './index-238e1f14.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-0f81ef28.js';
2
- export { s as setNonce } from './index-0f81ef28.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-238e1f14.js';
2
+ export { s as setNonce } from './index-238e1f14.js';
3
3
 
4
4
  /*
5
- Stencil Client Patch Browser v4.0.2 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Browser v4.0.3 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  const patchBrowser = () => {
8
8
  const importMeta = import.meta.url;
@@ -1 +1 @@
1
- import{r as t,h as e}from"./p-c3422e1b.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
+ import{r as t,h as e}from"./p-ab489393.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}
@@ -0,0 +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=p(e),s=p(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/,p=n=>n?n.split(h):[],y=(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),y(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,y(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=E(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.g,s=o["s-rc"];e&&(n=>{const t=n.j,e=n.g,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.S)&&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.g,i=e.O||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.O=a,a.h=i.h=s.shadowRoot||s,n=s["s-sc"],b(i,a)})(e,l,s)}catch(n){H(n,e.g)}return null},x=n=>{const t=n.g,e=n.v,l=n.$;64&n.i||(n.i|=64,N(t),E(e,"componentDidLoad"),n.M(t),l||L()),n.m&&(n.m(),n.m=void 0),512&n.i&&tn((()=>S(n,!1))),n.i&=-517},L=()=>{N(G.documentElement),tn((()=>(n=>{const t=I.ce("appload",{detail:{namespace:"proto-table-wc"}});return n.dispatchEvent(t),t})(B)))},E=(n,t,e)=>{if(n&&n[t])try{return n[t](e)}catch(n){H(n)}},N=n=>n.classList.add("hydrated"),T=(n,t,e)=>{if(t.k){const l=Object.entries(t.k),o=n.prototype;if(l.map((([n,[t]])=>{(31&t||2&e&&32&t)&&Object.defineProperty(o,n,{get(){return((n,t)=>U(this).C.get(t))(0,n)},set(t){((n,t,e)=>{const l=U(n),o=l.C.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.C.set(t,e),c&&2==(18&i)&&S(l,!1))})(this,n,t)},configurable:!0,enumerable:!0})})),1&e){const t=new Map;o.attributeChangedCallback=function(n,e,l){I.jmp((()=>{const e=t.get(n);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}))},n.observedAttributes=l.filter((([n,t])=>15&t[0])).map((([n,e])=>{const l=e[1]||n;return t.set(l,n),l}))}}return n},W=(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.P=new URL(t.resourcesUrl||"./",G.baseURI).href,n.map((n=>{n[1].map((t=>{const e={i:t[0],p:t[1],k:t[2],L:t[3]};e.k=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.j,l=()=>{};if(1&t.i)(null==t?void 0:t.v)||(null==t?void 0:t.N)&&t.N.then((()=>{}));else{t.i|=1;{let e=n;for(;e=e.parentNode||e.host;)if(e["s-p"]){j(t,t.$=e);break}}e.k&&Object.entries(e.k).map((([t,[e]])=>{if(31&e&&n.hasOwnProperty(t)){const e=n[t];delete n[t],n[t]=e}})),(async(n,t,e,l,o)=>{if(0==(32&t.i)){t.i|=32;{if((o=_(e)).then){const n=()=>{};o=await o,n()}o.isProxied||(T(o,e,2),o.isProxied=!0);const n=()=>{};t.i|=8;try{new o(t)}catch(n){H(n)}t.i&=-9,n()}if(o.style){let n=o.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 s=t.$,i=()=>S(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(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.N)&&n.N.then((()=>{}))}})()))}componentOnReady(){return U(this).N}};e.T=n[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 n=null!==(e=I.S)&&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)))},A=n=>I.S=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,g:n,j:t,C:new Map};return e.N=new Promise((n=>e.M=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.T,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,P:"",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{W as b,c as h,J as p,q as r,A as s}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-c3422e1b.js";export{s as setNonce}from"./p-c3422e1b.js";(()=>{const t=import.meta.url,s={};return""!==t&&(s.resourcesUrl=new URL(".",t).href),e(s)})().then((e=>t([["p-fc7284bc",[[1,"demo-table"],[0,"proto-table",{data:[16],details:[8],fields:[16],expanded:[32],sort:[32],clicks:[32]}]]]],e)));
1
+ import{p as e,b as t}from"./p-ab489393.js";export{s as setNonce}from"./p-ab489393.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-8b49b0d9",[[1,"demo-table"],[0,"proto-table",{data:[16],details:[8],fields:[16],expanded:[32],sort:[32],clicks:[32]}]]]],e)));
@@ -432,7 +432,7 @@ export interface QueueApi {
432
432
  /**
433
433
  * Host
434
434
  */
435
- interface HostAttributes {
435
+ export interface HostAttributes {
436
436
  class?: string | {
437
437
  [className: string]: boolean;
438
438
  };
@@ -930,6 +930,8 @@ export declare namespace JSXBase {
930
930
  minlength?: number | string;
931
931
  multiple?: boolean;
932
932
  name?: string;
933
+ onSelect?: (event: Event) => void;
934
+ onselect?: (event: Event) => void;
933
935
  pattern?: string;
934
936
  placeholder?: string;
935
937
  readOnly?: boolean;
@@ -1143,6 +1145,8 @@ export declare namespace JSXBase {
1143
1145
  minLength?: number;
1144
1146
  minlength?: number | string;
1145
1147
  name?: string;
1148
+ onSelect?: (event: Event) => void;
1149
+ onselect?: (event: Event) => void;
1146
1150
  placeholder?: string;
1147
1151
  readOnly?: boolean;
1148
1152
  readonly?: boolean | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proto-table-wc",
3
- "version": "0.0.433",
3
+ "version": "0.0.435",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -25,12 +25,12 @@
25
25
  "format": "prettier --write src"
26
26
  },
27
27
  "dependencies": {
28
- "@stencil/core": "4.0.2"
28
+ "@stencil/core": "4.0.3"
29
29
  },
30
30
  "devDependencies": {
31
31
  "cspell": "6.31.2",
32
32
  "eslint": "8.46.0",
33
- "prettier": "3.0.0",
33
+ "prettier": "3.0.1",
34
34
  "tslint": "6.1.3",
35
35
  "typescript": "5.1.6"
36
36
  },
@@ -1,2 +0,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,p:null,o:null,l:null}),u={},a=new WeakMap,f=n=>"sc-"+n.h,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=h(e),s=h(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)}},p=/\s/,h=n=>n?n.split(p):[],m=(n,t,e,l)=>{const s=11===t.p.nodeType&&t.p.host?t.p.host:t.p,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)},$=(t,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!=n&&i["s-si"]!==n&&i.classList.add(i["s-si"]=n),s.o)for(r=0;r<s.o.length;++r)c=$(t,s,r),c&&i.appendChild(c);"svg"===s.u?e=!1:"foreignObject"===i.tagName&&(e=!0)}return i},y=(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=$(null,l,s),c&&(o[s].p=c,r.insertBefore(c,e)))},w=(n,t,e)=>{for(let l=t;l<=e;++l){const t=n[l];if(t){const n=t.p;g(t),n&&n.remove()}}},b=(n,t)=>n.u===t.u,v=(n,t)=>{const l=t.p=n.p,o=n.o,s=t.o,i=t.u,c=t.t;null===c?(e="svg"===i||"foreignObject"!==i&&e,m(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]:b(r,f)?(v(r,f),r=t[++s],f=l[++i]):b(u,d)?(v(u,d),u=t[--c],d=l[--a]):b(r,d)?(v(r,d),n.insertBefore(r.p,u.p.nextSibling),r=t[++s],d=l[--a]):b(u,f)?(v(u,f),n.insertBefore(u.p,r.p),u=t[--c],f=l[++i]):(o=$(t&&t[i],e,i),f=l[++i],o&&r.p.parentNode.insertBefore(o,r.p));s>c?y(n,null==l[a+1]?null:l[a+1].p,e,l,i,a):i>a&&w(t,s,c)})(l,o,t,s):null!==s?(null!==n.t&&(l.textContent=""),y(l,null,t,s,0,s.length-1)):null!==o&&w(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)},S=(n,t)=>{t&&!n.m&&t["s-p"]&&t["s-p"].push(new Promise((t=>n.m=t)))},j=(n,t)=>{if(n.i|=16,!(4&n.i))return S(n,n.$),en((()=>O(n,t)));n.i|=512},O=(n,t)=>{const e=n.v;let l;return t&&(l=E(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.g,s=o["s-rc"];e&&(n=>{const t=n.S,e=n.g,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.j)&&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),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)=>{try{l=l.render(),e.i&=-17,e.i|=2,((e,l)=>{const o=e.g,s=e.O||r(null,null),i=(n=>n&&n.u===u)(l)?l:c(null,null,l);t=o.tagName,i.u=null,i.i|=4,e.O=i,i.p=s.p=o.shadowRoot||o,n=o["s-sc"],v(s,i)})(e,l)}catch(n){H(n,e.g)}return null},x=n=>{const t=n.g,e=n.v,l=n.$;64&n.i||(n.i|=64,N(t),E(e,"componentDidLoad"),n.M(t),l||L()),n.m&&(n.m(),n.m=void 0),512&n.i&&tn((()=>j(n,!1))),n.i&=-517},L=()=>{N(G.documentElement),tn((()=>(n=>{const t=I.ce("appload",{detail:{namespace:"proto-table-wc"}});return n.dispatchEvent(t),t})(B)))},E=(n,t,e)=>{if(n&&n[t])try{return n[t](e)}catch(n){H(n)}},N=n=>n.classList.add("hydrated"),T=(n,t,e)=>{if(t.k){const l=Object.entries(t.k),o=n.prototype;if(l.map((([n,[t]])=>{(31&t||2&e&&32&t)&&Object.defineProperty(o,n,{get(){return((n,t)=>U(this).C.get(t))(0,n)},set(t){((n,t,e)=>{const l=U(n),o=l.C.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.C.set(t,e),c&&2==(18&i)&&j(l,!1))})(this,n,t)},configurable:!0,enumerable:!0})})),1&e){const t=new Map;o.attributeChangedCallback=function(n,e,l){I.jmp((()=>{const e=t.get(n);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}))},n.observedAttributes=l.filter((([n,t])=>15&t[0])).map((([n,e])=>{const l=e[1]||n;return t.set(l,n),l}))}}return n},W=(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,p=!0;Object.assign(I,t),I.P=new URL(t.resourcesUrl||"./",G.baseURI).href,n.map((n=>{n[1].map((t=>{const e={i:t[0],h:t[1],k:t[2],L:t[3]};e.k=t[2];const i=e.h,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),p?a.push(this):I.jmp((()=>(n=>{if(0==(1&I.i)){const t=U(n),e=t.S,l=()=>{};if(!(1&t.i)){t.i|=1;{let e=n;for(;e=e.parentNode||e.host;)if(e["s-p"]){S(t,t.$=e);break}}e.k&&Object.entries(e.k).map((([t,[e]])=>{if(31&e&&n.hasOwnProperty(t)){const e=n[t];delete n[t],n[t]=e}})),(async(n,t,e,l,o)=>{if(0==(32&t.i)){t.i|=32;{if((o=_(e)).then){const n=()=>{};o=await o,n()}o.isProxied||(T(o,e,2),o.isProxied=!0);const n=()=>{};t.i|=8;try{new o(t)}catch(n){H(n)}t.i&=-9,n()}if(o.style){let n=o.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 s=t.$,i=()=>j(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,e)}l()}})(this)))}disconnectedCallback(){I.jmp((()=>{}))}componentOnReady(){return U(this).N}};e.T=n[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 n=null!==(e=I.j)&&void 0!==e?e:i(G);null!=n&&u.setAttribute("nonce",n),c.insertBefore(u,r?r.nextSibling:c.firstChild)}p=!1,a.length?a.map((n=>n.connectedCallback())):I.jmp((()=>d=setTimeout(L,30)))},A=n=>I.j=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,g:n,S:t,C:new Map};return e.N=new Promise((n=>e.M=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.h.replace(/-/g,"_"),e=n.T,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,P:"",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{W as b,c as h,J as p,q as r,A as s}