@fluid-topics/ft-filterable-table 1.1.48 → 1.1.49
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.
|
@@ -130,7 +130,7 @@ class FtFilterableTable extends FtLitElement {
|
|
|
130
130
|
renderColumnSort(column, index) {
|
|
131
131
|
var _a;
|
|
132
132
|
const isSorted = this.currentSort && this.currentSort.column === index;
|
|
133
|
-
const sortIcon = isSorted ? (this.currentSort.order === "asc" ? "
|
|
133
|
+
const sortIcon = isSorted ? (this.currentSort.order === "asc" ? "expand_less" : "expand_more") : "unfold_more";
|
|
134
134
|
const sort = () => {
|
|
135
135
|
var _a;
|
|
136
136
|
this.currentSort = {
|
|
@@ -428,7 +428,7 @@ const P=Symbol.for(""),j=t=>{if(t?.r===P)return t?._$litStatic$},M=t=>({_$litSta
|
|
|
428
428
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
429
429
|
<slot ?hidden=${o}></slot>
|
|
430
430
|
</i>
|
|
431
|
-
`}get textContent(){var t,o;return null!==(o=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==o?o:""}update(t){super.update(t),["value","variant"].some((o=>t.has(o)))&&this.resolveIcon()}resolveIcon(){var t,o;let i=this.value||this.textContent;switch(this.variant){case ko.file_format:this.resolvedIcon=null!==(t=So[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case ko.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(o=$o[i.replace("-","_").toUpperCase()])&&void 0!==o?o:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Uo.elementDefinitions={},Uo.styles=Eo,Wo([i.property()],Uo.prototype,"variant",void 0),Wo([i.property()],Uo.prototype,"value",void 0),Wo([i.state()],Uo.prototype,"resolvedIcon",void 0),Wo([i.query("slot")],Uo.prototype,"slottedContent",void 0),o.customElement("ft-icon")(Uo);const Ro={labelSize:o.FtCssVariableFactory.create("--ft-select-label-size","","SIZE","11px"),selectedOptionSize:o.FtCssVariableFactory.create("--ft-select-selected-option-size","","SIZE","14px"),verticalSpacing:o.FtCssVariableFactory.create("--ft-select-vertical-spacing","","SIZE","4px"),horizontalSpacing:o.FtCssVariableFactory.create("--ft-select-horizontal-spacing","","SIZE","16px"),optionsHeight:o.FtCssVariableFactory.create("--ft-select-options-height","","SIZE","
|
|
431
|
+
`}get textContent(){var t,o;return null!==(o=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==o?o:""}update(t){super.update(t),["value","variant"].some((o=>t.has(o)))&&this.resolveIcon()}resolveIcon(){var t,o;let i=this.value||this.textContent;switch(this.variant){case ko.file_format:this.resolvedIcon=null!==(t=So[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case ko.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(o=$o[i.replace("-","_").toUpperCase()])&&void 0!==o?o:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Uo.elementDefinitions={},Uo.styles=Eo,Wo([i.property()],Uo.prototype,"variant",void 0),Wo([i.property()],Uo.prototype,"value",void 0),Wo([i.state()],Uo.prototype,"resolvedIcon",void 0),Wo([i.query("slot")],Uo.prototype,"slottedContent",void 0),o.customElement("ft-icon")(Uo);const Ro={labelSize:o.FtCssVariableFactory.create("--ft-select-label-size","","SIZE","11px"),selectedOptionSize:o.FtCssVariableFactory.create("--ft-select-selected-option-size","","SIZE","14px"),verticalSpacing:o.FtCssVariableFactory.create("--ft-select-vertical-spacing","","SIZE","4px"),horizontalSpacing:o.FtCssVariableFactory.create("--ft-select-horizontal-spacing","","SIZE","16px"),optionsHeight:o.FtCssVariableFactory.create("--ft-select-options-height","","SIZE","70vh"),selectedOptionColor:o.FtCssVariableFactory.extend("--ft-select-selected-option-color","",o.designSystemVariables.colorOnSurface),helperColor:o.FtCssVariableFactory.extend("--ft-select-helper-color","",o.designSystemVariables.colorOnSurfaceMedium),optionsColor:o.FtCssVariableFactory.extend("--ft-select-options-color","",o.designSystemVariables.colorOnSurface),optionsZIndex:o.FtCssVariableFactory.create("--ft-select-options-z-index","","NUMBER","3"),colorSurface:o.FtCssVariableFactory.external(o.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:o.FtCssVariableFactory.external(o.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:o.FtCssVariableFactory.external(o.designSystemVariables.borderRadiusS,"Design system"),elevation02:o.FtCssVariableFactory.external(o.designSystemVariables.elevation02,"Design system"),colorError:o.FtCssVariableFactory.external(o.designSystemVariables.colorError,"Design system")},zo=e.css`
|
|
432
432
|
*:focus {
|
|
433
433
|
outline: none;
|
|
434
434
|
}
|
|
@@ -1474,10 +1474,6 @@ const Be={fontSize:o.FtCssVariableFactory.create("--ft-text-field-font-size","",
|
|
|
1474
1474
|
.row:last-of-type .cell:last-of-type {
|
|
1475
1475
|
border-radius: 0 0 .5rem 0;
|
|
1476
1476
|
}
|
|
1477
|
-
|
|
1478
|
-
.hidden {
|
|
1479
|
-
visibility: hidden;
|
|
1480
|
-
}
|
|
1481
1477
|
`;var wi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};const Ci=t=>e.html`${t}`,Ii=(t,o)=>t-o,Ei=t=>""+t;class ki extends o.FtLitElement{constructor(){super(...arguments),this.data=[],this.columns=[],this.stickyHeaders=!1,this.disableDataManipulation=!1,this.filters=[],this.filterOptions=[]}init(t,o,e){this.data=t,this.columns=o,this.sort=e}render(){let t=this.sortData(this.filterData());return e.html`
|
|
1482
1478
|
<style>
|
|
1483
1479
|
.table {
|
|
@@ -1507,7 +1503,7 @@ const Be={fontSize:o.FtCssVariableFactory.create("--ft-text-field-font-size","",
|
|
|
1507
1503
|
</div>
|
|
1508
1504
|
${this.renderColumnFilter(t,o)}
|
|
1509
1505
|
</div>
|
|
1510
|
-
`}renderColumnSort(t,o){var i;const r=this.currentSort&&this.currentSort.column===o,n=r?"asc"===this.currentSort.order?"
|
|
1506
|
+
`}renderColumnSort(t,o){var i;const r=this.currentSort&&this.currentSort.column===o,n=r?"asc"===this.currentSort.order?"expand_less":"expand_more":"unfold_more";return null===(i=t.sortable)||void 0===i||i?e.html`
|
|
1511
1507
|
<ft-button
|
|
1512
1508
|
round
|
|
1513
1509
|
dense
|
|
@@ -596,7 +596,7 @@ const sl=Symbol.for(""),cl=t=>{if(t?.r===sl)return t?._$litStatic$},fl=t=>({_$li
|
|
|
596
596
|
${Je(this.resolvedIcon)}
|
|
597
597
|
<slot ?hidden=${e}></slot>
|
|
598
598
|
</i>
|
|
599
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case Ds.file_format:this.resolvedIcon=null!==(t=Fs[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Ds.material:this.resolvedIcon=this.value||te;break;default:this.resolvedIcon=null!==(e=Bs[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ks.elementDefinitions={},Ks.styles=_s,Ps([we()],Ks.prototype,"variant",void 0),Ps([we()],Ks.prototype,"value",void 0),Ps([Se()],Ks.prototype,"resolvedIcon",void 0),Ps([$e("slot")],Ks.prototype,"slottedContent",void 0),uo("ft-icon")(Ks);const Ms={labelSize:xo.create("--ft-select-label-size","","SIZE","11px"),selectedOptionSize:xo.create("--ft-select-selected-option-size","","SIZE","14px"),verticalSpacing:xo.create("--ft-select-vertical-spacing","","SIZE","4px"),horizontalSpacing:xo.create("--ft-select-horizontal-spacing","","SIZE","16px"),optionsHeight:xo.create("--ft-select-options-height","","SIZE","
|
|
599
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case Ds.file_format:this.resolvedIcon=null!==(t=Fs[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Ds.material:this.resolvedIcon=this.value||te;break;default:this.resolvedIcon=null!==(e=Bs[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ks.elementDefinitions={},Ks.styles=_s,Ps([we()],Ks.prototype,"variant",void 0),Ps([we()],Ks.prototype,"value",void 0),Ps([Se()],Ks.prototype,"resolvedIcon",void 0),Ps([$e("slot")],Ks.prototype,"slottedContent",void 0),uo("ft-icon")(Ks);const Ms={labelSize:xo.create("--ft-select-label-size","","SIZE","11px"),selectedOptionSize:xo.create("--ft-select-selected-option-size","","SIZE","14px"),verticalSpacing:xo.create("--ft-select-vertical-spacing","","SIZE","4px"),horizontalSpacing:xo.create("--ft-select-horizontal-spacing","","SIZE","16px"),optionsHeight:xo.create("--ft-select-options-height","","SIZE","70vh"),selectedOptionColor:xo.extend("--ft-select-selected-option-color","",vi.colorOnSurface),helperColor:xo.extend("--ft-select-helper-color","",vi.colorOnSurfaceMedium),optionsColor:xo.extend("--ft-select-options-color","",vi.colorOnSurface),optionsZIndex:xo.create("--ft-select-options-z-index","","NUMBER","3"),colorSurface:xo.external(vi.colorSurface,"Design system"),colorOnSurfaceDisabled:xo.external(vi.colorOnSurfaceDisabled,"Design system"),colorPrimary:xo.external(vi.colorPrimary,"Design system"),borderRadiusS:xo.external(vi.borderRadiusS,"Design system"),elevation02:xo.external(vi.elevation02,"Design system"),colorError:xo.external(vi.colorError,"Design system")},Hs=dt`
|
|
600
600
|
*:focus {
|
|
601
601
|
outline: none;
|
|
602
602
|
}
|
|
@@ -1642,10 +1642,6 @@ const qs={fontSize:xo.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1642
1642
|
.row:last-of-type .cell:last-of-type {
|
|
1643
1643
|
border-radius: 0 0 .5rem 0;
|
|
1644
1644
|
}
|
|
1645
|
-
|
|
1646
|
-
.hidden {
|
|
1647
|
-
visibility: hidden;
|
|
1648
|
-
}
|
|
1649
1645
|
`;var Bc=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const Fc=t=>Jt`${t}`,Ac=(t,e)=>t-e,jc=t=>""+t;class Zc extends jr{constructor(){super(...arguments),this.data=[],this.columns=[],this.stickyHeaders=!1,this.disableDataManipulation=!1,this.filters=[],this.filterOptions=[]}init(t,e,o){this.data=t,this.columns=e,this.sort=o}render(){let t=this.sortData(this.filterData());return Jt`
|
|
1650
1646
|
<style>
|
|
1651
1647
|
.table {
|
|
@@ -1675,7 +1671,7 @@ const qs={fontSize:xo.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1675
1671
|
</div>
|
|
1676
1672
|
${this.renderColumnFilter(t,e)}
|
|
1677
1673
|
</div>
|
|
1678
|
-
`}renderColumnSort(t,e){var o;const i=this.currentSort&&this.currentSort.column===e,r=i?"asc"===this.currentSort.order?"
|
|
1674
|
+
`}renderColumnSort(t,e){var o;const i=this.currentSort&&this.currentSort.column===e,r=i?"asc"===this.currentSort.order?"expand_less":"expand_more":"unfold_more";return null===(o=t.sortable)||void 0===o||o?Jt`
|
|
1679
1675
|
<ft-button
|
|
1680
1676
|
round
|
|
1681
1677
|
dense
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-filterable-table",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.49",
|
|
4
4
|
"description": "A dynamic table with filters",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@fluid-topics/ft-button": "1.1.
|
|
26
|
-
"@fluid-topics/ft-select": "1.1.
|
|
27
|
-
"@fluid-topics/ft-text-field": "1.1.
|
|
28
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
25
|
+
"@fluid-topics/ft-button": "1.1.49",
|
|
26
|
+
"@fluid-topics/ft-select": "1.1.49",
|
|
27
|
+
"@fluid-topics/ft-text-field": "1.1.49",
|
|
28
|
+
"@fluid-topics/ft-wc-utils": "1.1.49",
|
|
29
29
|
"lit": "3.1.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "a9a24ee2e555e948170f6ebb5cb3759a8d5b9a14"
|
|
32
32
|
}
|