proto-table-wc 0.1.18 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-IY-rJh72.js');
3
+ var index = require('./index-Cpz43elO.js');
4
4
 
5
5
  const demoTableCss = ".detailWrapper{font-weight:100;font-size:13px;display:flex;flex-direction:column;justify-items:start;padding:5px;padding-left:30px}";
6
6
 
@@ -4,7 +4,7 @@ const NAMESPACE = 'proto-table-wc';
4
4
  const BUILD = /* proto-table-wc */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true, watchCallback: false };
5
5
 
6
6
  /*
7
- Stencil Client Platform v4.29.3 | MIT Licensed | https://stenciljs.com
7
+ Stencil Client Platform v4.30.0 | MIT Licensed | https://stenciljs.com
8
8
  */
9
9
  var __defProp = Object.defineProperty;
10
10
  var __export = (target, all) => {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-IY-rJh72.js');
3
+ var index = require('./index-Cpz43elO.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  const defineCustomElements = async (win, options) => {
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-IY-rJh72.js');
3
+ var index = require('./index-Cpz43elO.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
7
7
  /*
8
- Stencil Client Patch Browser v4.29.3 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v4.30.0 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
 
11
11
  var patchBrowser = () => {
@@ -5,7 +5,7 @@
5
5
  ],
6
6
  "compiler": {
7
7
  "name": "@stencil/core",
8
- "version": "4.29.3",
8
+ "version": "4.30.0",
9
9
  "typescriptVersion": "5.5.4"
10
10
  },
11
11
  "collections": [],
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-h8oc2ck3.js';
1
+ import { r as registerInstance, h } from './index-QJYsr_gj.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
 
@@ -2,7 +2,7 @@ const NAMESPACE = 'proto-table-wc';
2
2
  const BUILD = /* proto-table-wc */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true, watchCallback: false };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.29.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.30.0 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-h8oc2ck3.js';
2
- export { s as setNonce } from './index-h8oc2ck3.js';
1
+ import { b as bootstrapLazy } from './index-QJYsr_gj.js';
2
+ export { s as setNonce } from './index-QJYsr_gj.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-h8oc2ck3.js';
2
- export { s as setNonce } from './index-h8oc2ck3.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-QJYsr_gj.js';
2
+ export { s as setNonce } from './index-QJYsr_gj.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.29.3 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.30.0 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
 
9
9
  var patchBrowser = () => {
@@ -1 +1 @@
1
- import{r as e,h as t}from"./p-h8oc2ck3.js";const r=class{constructor(r){e(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=e=>{const{tags:r=[]}=e;return t("div",{class:"detailWrapper"},t("span",null,r.length," details..."),t("ul",null,r.map((e=>t("li",null,e)))))}}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:e,items:t,fields:r}=this;e.data=t,e.fields=r,e.details=this.renderDetails}render(){return t("proto-table",{key:"aa5f26287b85073afb5bbd3c133f9ad388fc8138",ref:e=>this.table=e})}};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){e(this,r),this.data=[],this.details=void 0,this.fields=[],this.expanded=void 0,this.sort=void 0,this.clicks=0,this.protoIcon=(e,r,l=24)=>{const o=s[e];return t("svg",{width:l,height:l,viewBox:"0 0 24 24",role:"img","aria-labelledby":"title"},t("title",null,(e=>i[e])(e)),t("g",{fill:r},t("path",{d:o})),t("path",{d:"M0 0h24v24H0z",fill:"none"}))},this.handleCellClick=(e,t)=>()=>{0===e&&(this.expanded=this.expanded===t?void 0:t)},this.handleSortClick=e=>()=>{this.sort===e?2===this.clicks?(this.clicks=0,this.sort=void 0):this.clicks=this.clicks+1:(this.sort=e,this.clicks=1)},this.iconFor=e=>this.sort===e&&2===this.clicks?"arrow-up":"arrow-down",this.header=()=>{const{fields:e,iconFor:r,protoIcon:s}=this;return t("div",{class:"header"},e.map((({label:e},i)=>{const l=i===this.sort?"headerCell sort":"headerCell",o=r(i);return t("div",{class:l,onClick:this.handleSortClick(i)},s(o),t("span",null,e))})))},this.row=(e,r)=>{const{fields:s,protoIcon:i}=this;return t("div",{class:"rowContainer"},t("div",{class:this.expanded===r?"row expanded":"row"},s.map((({prop:s},l)=>t("div",{class:l===this.sort?"cell sort":"cell",onClick:this.handleCellClick(l,r)},i(0===l&&this.details?this.expanded===r?"down":"right":"pad"),e[s])))),this.details&&this.expanded===r&&this.details(e))}}render(){const e=this.data||[];return t("div",{key:"c30742fde0de976c553234528a7bfb6ce10d3ef5",class:"table"},this.header(),e.map(((e,t)=>this.row(e,t))))}};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 e,h as t}from"./p-QJYsr_gj.js";const r=class{constructor(r){e(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=e=>{const{tags:r=[]}=e;return t("div",{class:"detailWrapper"},t("span",null,r.length," details..."),t("ul",null,r.map((e=>t("li",null,e)))))}}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:e,items:t,fields:r}=this;e.data=t,e.fields=r,e.details=this.renderDetails}render(){return t("proto-table",{key:"aa5f26287b85073afb5bbd3c133f9ad388fc8138",ref:e=>this.table=e})}};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){e(this,r),this.data=[],this.details=void 0,this.fields=[],this.expanded=void 0,this.sort=void 0,this.clicks=0,this.protoIcon=(e,r,l=24)=>{const o=s[e];return t("svg",{width:l,height:l,viewBox:"0 0 24 24",role:"img","aria-labelledby":"title"},t("title",null,(e=>i[e])(e)),t("g",{fill:r},t("path",{d:o})),t("path",{d:"M0 0h24v24H0z",fill:"none"}))},this.handleCellClick=(e,t)=>()=>{0===e&&(this.expanded=this.expanded===t?void 0:t)},this.handleSortClick=e=>()=>{this.sort===e?2===this.clicks?(this.clicks=0,this.sort=void 0):this.clicks=this.clicks+1:(this.sort=e,this.clicks=1)},this.iconFor=e=>this.sort===e&&2===this.clicks?"arrow-up":"arrow-down",this.header=()=>{const{fields:e,iconFor:r,protoIcon:s}=this;return t("div",{class:"header"},e.map((({label:e},i)=>{const l=i===this.sort?"headerCell sort":"headerCell",o=r(i);return t("div",{class:l,onClick:this.handleSortClick(i)},s(o),t("span",null,e))})))},this.row=(e,r)=>{const{fields:s,protoIcon:i}=this;return t("div",{class:"rowContainer"},t("div",{class:this.expanded===r?"row expanded":"row"},s.map((({prop:s},l)=>t("div",{class:l===this.sort?"cell sort":"cell",onClick:this.handleCellClick(l,r)},i(0===l&&this.details?this.expanded===r?"down":"right":"pad"),e[s])))),this.details&&this.expanded===r&&this.details(e))}}render(){const e=this.data||[];return t("div",{key:"c30742fde0de976c553234528a7bfb6ce10d3ef5",class:"table"},this.header(),e.map(((e,t)=>this.row(e,t))))}};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 e,b as o}from"./p-h8oc2ck3.js";export{s as setNonce}from"./p-h8oc2ck3.js";import{g as t}from"./p-DQuL1Twl.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((async e=>(await t(),o([["p-9ecf9e8d",[[1,"demo-table"],[0,"proto-table",{data:[16],details:[8],fields:[16],expanded:[32],sort:[32],clicks:[32]}]]]],e))));
1
+ import{p as t,b as a}from"./p-QJYsr_gj.js";export{s as setNonce}from"./p-QJYsr_gj.js";import{g as e}from"./p-DQuL1Twl.js";(()=>{const s=import.meta.url,a={};return""!==s&&(a.resourcesUrl=new URL(".",s).href),t(a)})().then((async s=>(await e(),a([["p-10568fd8",[[1,"demo-table"],[0,"proto-table",{data:[16],details:[8],fields:[16],expanded:[32],sort:[32],clicks:[32]}]]]],s))));
@@ -260,6 +260,25 @@ export declare function setPlatformHelpers(helpers: {
260
260
  * @returns the base path
261
261
  */
262
262
  export declare function getAssetPath(path: string): string;
263
+ /**
264
+ * Method to render a virtual DOM tree to a container element.
265
+ *
266
+ * @example
267
+ * ```tsx
268
+ * import { render } from '@stencil/core';
269
+ *
270
+ * const vnode = (
271
+ * <div>
272
+ * <h1>Hello, world!</h1>
273
+ * </div>
274
+ * );
275
+ * render(vnode, document.body);
276
+ * ```
277
+ *
278
+ * @param vnode - The virtual DOM tree to render
279
+ * @param container - The container element to render the virtual DOM tree to
280
+ */
281
+ export declare function render(vnode: VNode, container: Element): void;
263
282
  /**
264
283
  * Used to manually set the base path where assets can be found. For lazy-loaded
265
284
  * builds the asset path is automatically set and assets copied to the correct
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proto-table-wc",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
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.29.3"
28
+ "@stencil/core": "4.30.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "cspell": "8.19.2",
32
- "eslint": "9.25.0",
32
+ "eslint": "9.25.1",
33
33
  "prettier": "3.5.3",
34
34
  "typescript": "5.8.3"
35
35
  },