@aquera/nile-elements 0.1.31-beta-1.1 → 0.1.32-beta-1.0
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.
- package/README.md +3 -0
- package/dist/nile-table/nile-table.cjs.js +1 -1
- package/dist/nile-table/nile-table.cjs.js.map +1 -1
- package/dist/nile-table/nile-table.esm.js +1 -1
- package/dist/src/nile-table/nile-table.d.ts +2 -1
- package/dist/src/nile-table/nile-table.js +12 -8
- package/dist/src/nile-table/nile-table.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-table/nile-table.ts +13 -8
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"description": "Webcomponent nile-elements following open-wc recommendations",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "nile-elements",
|
6
|
-
"version": "0.1.
|
6
|
+
"version": "0.1.32-beta-1.0",
|
7
7
|
"main": "dist/src/index.js",
|
8
8
|
"type": "module",
|
9
9
|
"module": "dist/src/index.js",
|
@@ -60,6 +60,11 @@ export class NileTable extends NileElement {
|
|
60
60
|
`;
|
61
61
|
}
|
62
62
|
|
63
|
+
repaintTable(){
|
64
|
+
this.realignStructure();
|
65
|
+
this.handleBodyCssUpdate();
|
66
|
+
}
|
67
|
+
|
63
68
|
handleRows(e:CustomEvent){
|
64
69
|
this.rows=[...this.rows,e.detail.comp]
|
65
70
|
}
|
@@ -68,7 +73,6 @@ export class NileTable extends NileElement {
|
|
68
73
|
const tableBodies = this.rows;
|
69
74
|
if (!tableBodies.length) return;
|
70
75
|
const firstEl=tableBodies[0].shadowRoot?.querySelector<HTMLDivElement>('div.base')
|
71
|
-
const lastEl=tableBodies[tableBodies.length - 1].shadowRoot?.querySelector<HTMLDivElement>('div.base')
|
72
76
|
if(firstEl) {
|
73
77
|
firstEl.style.borderTopRightRadius="var(--nile-radius-radius-xl)";
|
74
78
|
firstEl.style.borderTopLeftRadius = 'var(--nile-radius-radius-xl)';
|
@@ -76,12 +80,6 @@ export class NileTable extends NileElement {
|
|
76
80
|
firstEl.style.borderBottomLeftRadius = '0px';
|
77
81
|
firstEl.style.borderBottom = 'none';
|
78
82
|
}
|
79
|
-
if(lastEl){
|
80
|
-
lastEl.style.borderTopRightRadius="0px";
|
81
|
-
lastEl.style.borderTopLeftRadius = '0px';
|
82
|
-
lastEl.style.borderBottomRightRadius="var(--nile-radius-radius-xl)";
|
83
|
-
lastEl.style.borderBottomLeftRadius = 'var(--nile-radius-radius-xl)';
|
84
|
-
}
|
85
83
|
tableBodies.forEach((tb,i)=>{
|
86
84
|
if(i>0 && i<tableBodies.length-1){
|
87
85
|
const el=tb.shadowRoot?.querySelector<HTMLDivElement>('div.base')
|
@@ -94,6 +92,13 @@ export class NileTable extends NileElement {
|
|
94
92
|
}
|
95
93
|
}
|
96
94
|
})
|
95
|
+
const lastEl=tableBodies[tableBodies.length - 1].shadowRoot?.querySelector<HTMLDivElement>('div.base')
|
96
|
+
if(lastEl){
|
97
|
+
lastEl.style.borderTopRightRadius="0px";
|
98
|
+
lastEl.style.borderTopLeftRadius = '0px';
|
99
|
+
lastEl.style.borderBottomRightRadius="var(--nile-radius-radius-xl)";
|
100
|
+
lastEl.style.borderBottomLeftRadius = 'var(--nile-radius-radius-xl)';
|
101
|
+
}
|
97
102
|
}
|
98
103
|
|
99
104
|
getPrimaryColumnWidths(){
|
@@ -102,7 +107,7 @@ export class NileTable extends NileElement {
|
|
102
107
|
return widthArray;
|
103
108
|
}
|
104
109
|
|
105
|
-
|
110
|
+
realignStructure(){
|
106
111
|
const primaryRowWidths=this.getPrimaryColumnWidths();
|
107
112
|
const secondaryRows=this.rows.filter(tb=>tb.type!='primary');
|
108
113
|
secondaryRows.forEach((row)=>{
|