proto-table-wc 0.0.444 → 0.0.446

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-758b107e.js');
5
+ const index = require('./index-9d4ffb71.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
 
@@ -126,6 +126,7 @@ const h = (nodeName, vnodeData, ...children) => {
126
126
  };
127
127
  walk(children);
128
128
  if (vnodeData) {
129
+ // normalize class / className attributes
129
130
  {
130
131
  const classData = vnodeData.className || vnodeData.class;
131
132
  if (classData) {
@@ -1188,12 +1189,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1188
1189
  // customElements.define('my-component', MyComponent);
1189
1190
  // </script>
1190
1191
  // ```
1191
- // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1192
+ // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
1192
1193
  // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1193
1194
  // to the value that was set inline i.e. "some-value" from above example. When
1194
- // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1195
+ // the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
1195
1196
  //
1196
- // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1197
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
1197
1198
  // by connectedCallback as this attributeChangedCallback will not fire.
1198
1199
  //
1199
1200
  // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-758b107e.js');
5
+ const index = require('./index-9d4ffb71.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-758b107e.js');
5
+ const index = require('./index-9d4ffb71.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Browser v4.1.0 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v4.2.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));
@@ -5,8 +5,8 @@
5
5
  ],
6
6
  "compiler": {
7
7
  "name": "@stencil/core",
8
- "version": "4.1.0",
9
- "typescriptVersion": "5.0.4"
8
+ "version": "4.2.1",
9
+ "typescriptVersion": "5.1.6"
10
10
  },
11
11
  "collections": [],
12
12
  "bundles": []
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-238e1f14.js';
1
+ import { r as registerInstance, h } from './index-7fa32593.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
 
@@ -104,6 +104,7 @@ const h = (nodeName, vnodeData, ...children) => {
104
104
  };
105
105
  walk(children);
106
106
  if (vnodeData) {
107
+ // normalize class / className attributes
107
108
  {
108
109
  const classData = vnodeData.className || vnodeData.class;
109
110
  if (classData) {
@@ -1166,12 +1167,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1166
1167
  // customElements.define('my-component', MyComponent);
1167
1168
  // </script>
1168
1169
  // ```
1169
- // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1170
+ // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
1170
1171
  // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1171
1172
  // to the value that was set inline i.e. "some-value" from above example. When
1172
- // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1173
+ // the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
1173
1174
  //
1174
- // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1175
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
1175
1176
  // by connectedCallback as this attributeChangedCallback will not fire.
1176
1177
  //
1177
1178
  // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-238e1f14.js';
2
- export { s as setNonce } from './index-238e1f14.js';
1
+ import { b as bootstrapLazy } from './index-7fa32593.js';
2
+ export { s as setNonce } from './index-7fa32593.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-238e1f14.js';
2
- export { s as setNonce } from './index-238e1f14.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-7fa32593.js';
2
+ export { s as setNonce } from './index-7fa32593.js';
3
3
 
4
4
  /*
5
- Stencil Client Patch Browser v4.1.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Browser v4.2.1 | 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-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}
1
+ import{r as t,h as e}from"./p-5147a6d3.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 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)));
1
+ import{p as e,b as t}from"./p-5147a6d3.js";export{s as setNonce}from"./p-5147a6d3.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-8ede764c",[[1,"demo-table"],[0,"proto-table",{data:[16],details:[8],fields:[16],expanded:[32],sort:[32],clicks:[32]}]]]],e)));
@@ -62,7 +62,7 @@ export interface PropOptions {
62
62
  /**
63
63
  * The name of the associated DOM attribute.
64
64
  * Stencil uses different heuristics to determine the default name of the attribute,
65
- * but using this property, you can override the default behaviour.
65
+ * but using this property, you can override the default behavior.
66
66
  */
67
67
  attribute?: string | null;
68
68
  /**
@@ -128,7 +128,7 @@ export interface ListenOptions {
128
128
  * By default, Stencil uses several heuristics to determine if
129
129
  * it must attach a `passive` event listener or not.
130
130
  *
131
- * Using the `passive` option can be used to change the default behaviour.
131
+ * Using the `passive` option can be used to change the default behavior.
132
132
  * Please see https://developers.google.com/web/updates/2016/06/passive-event-listeners for further information.
133
133
  */
134
134
  passive?: boolean;
@@ -471,7 +471,7 @@ export interface FunctionalUtilities {
471
471
  /**
472
472
  * Utility for reading the children of a functional component at runtime.
473
473
  * Since the Stencil runtime uses a different interface for children it is
474
- * not recommendeded to read the children directly, and is preferable to use
474
+ * not recommended to read the children directly, and is preferable to use
475
475
  * this utility to, for instance, perform a side effect for each child.
476
476
  */
477
477
  forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proto-table-wc",
3
- "version": "0.0.444",
3
+ "version": "0.0.446",
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.1.0"
28
+ "@stencil/core": "4.2.1"
29
29
  },
30
30
  "devDependencies": {
31
- "cspell": "7.3.2",
32
- "eslint": "8.48.0",
31
+ "cspell": "7.3.5",
32
+ "eslint": "8.49.0",
33
33
  "prettier": "3.0.3",
34
34
  "tslint": "6.1.3",
35
35
  "typescript": "5.2.2"