@timlassiter11/yatl 1.2.1 → 1.2.3
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/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -5
- package/dist/index.mjs.map +1 -1
- package/dist/theme.css +47 -34
- package/dist/yatl.min.global.js +25 -20
- package/dist/yatl.min.global.js.map +1 -1
- package/package.json +3 -6
package/dist/index.d.mts
CHANGED
|
@@ -72,7 +72,7 @@ type ColumnRole = 'display' | 'internal';
|
|
|
72
72
|
* @param field - The field of the column.
|
|
73
73
|
* @param row - The row data.
|
|
74
74
|
*/
|
|
75
|
-
type CellPartsCallback<T> = (value: unknown, field: NestedKeyOf<T>, row: T) => string | string[];
|
|
75
|
+
type CellPartsCallback<T> = (value: unknown, field: NestedKeyOf<T>, row: T) => string | string[] | undefined;
|
|
76
76
|
/**
|
|
77
77
|
* Callback for providing the full contents of a rendered cell.
|
|
78
78
|
* @param value - The value of the cell.
|
|
@@ -234,7 +234,7 @@ type RowSelectionMethod = 'single' | 'multi';
|
|
|
234
234
|
* @param row - The row data.
|
|
235
235
|
* @returns the part string or list of part strings that should be added to this row.
|
|
236
236
|
*/
|
|
237
|
-
type RowPartsCallback<T> = (row: T) => string | string[];
|
|
237
|
+
type RowPartsCallback<T> = (row: T) => string | string[] | undefined;
|
|
238
238
|
/**
|
|
239
239
|
* Options used to configure what state information
|
|
240
240
|
* should be saved and restored automatically.
|
package/dist/index.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ type ColumnRole = 'display' | 'internal';
|
|
|
72
72
|
* @param field - The field of the column.
|
|
73
73
|
* @param row - The row data.
|
|
74
74
|
*/
|
|
75
|
-
type CellPartsCallback<T> = (value: unknown, field: NestedKeyOf<T>, row: T) => string | string[];
|
|
75
|
+
type CellPartsCallback<T> = (value: unknown, field: NestedKeyOf<T>, row: T) => string | string[] | undefined;
|
|
76
76
|
/**
|
|
77
77
|
* Callback for providing the full contents of a rendered cell.
|
|
78
78
|
* @param value - The value of the cell.
|
|
@@ -234,7 +234,7 @@ type RowSelectionMethod = 'single' | 'multi';
|
|
|
234
234
|
* @param row - The row data.
|
|
235
235
|
* @returns the part string or list of part strings that should be added to this row.
|
|
236
236
|
*/
|
|
237
|
-
type RowPartsCallback<T> = (row: T) => string | string[];
|
|
237
|
+
type RowPartsCallback<T> = (row: T) => string | string[] | undefined;
|
|
238
238
|
/**
|
|
239
239
|
* Options used to configure what state information
|
|
240
240
|
* should be saved and restored automatically.
|
package/dist/index.js
CHANGED
|
@@ -1668,10 +1668,15 @@ var table_styles_default = import_lit2.css`
|
|
|
1668
1668
|
.row {
|
|
1669
1669
|
position: relative;
|
|
1670
1670
|
background-color: var(--table-row-bg);
|
|
1671
|
-
|
|
1671
|
+
/** Use box-shadow to mimic borders. It works better when virtualized */
|
|
1672
|
+
box-shadow: inset 0 -1px 0 0 var(--table-border-color);
|
|
1672
1673
|
transition: background-color 50ms;
|
|
1673
1674
|
}
|
|
1674
1675
|
|
|
1676
|
+
.row-number-cell {
|
|
1677
|
+
box-shadow: inset 0 -1px 0 0 var(--table-border-color);
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1675
1680
|
.row.header-row {
|
|
1676
1681
|
background-color: var(--table-header-bg);
|
|
1677
1682
|
border-bottom: 1px solid var(--table-border-color);
|
|
@@ -1684,7 +1689,7 @@ var table_styles_default = import_lit2.css`
|
|
|
1684
1689
|
}
|
|
1685
1690
|
|
|
1686
1691
|
.row:last-child {
|
|
1687
|
-
|
|
1692
|
+
box-shadow: none;
|
|
1688
1693
|
}
|
|
1689
1694
|
|
|
1690
1695
|
.table:not(.resizing) .row {
|
|
@@ -1730,7 +1735,7 @@ var table_styles_default = import_lit2.css`
|
|
|
1730
1735
|
}
|
|
1731
1736
|
|
|
1732
1737
|
@layer striped {
|
|
1733
|
-
:host([striped]) .
|
|
1738
|
+
:host([striped]) .row-even {
|
|
1734
1739
|
background-color: var(--table-row-stripe-bg);
|
|
1735
1740
|
}
|
|
1736
1741
|
}
|
|
@@ -2709,7 +2714,12 @@ var YatlTable = class extends import_lit3.LitElement {
|
|
|
2709
2714
|
if (Array.isArray(userParts)) {
|
|
2710
2715
|
userParts = userParts.join(" ");
|
|
2711
2716
|
}
|
|
2712
|
-
const classes = {
|
|
2717
|
+
const classes = {
|
|
2718
|
+
row: true,
|
|
2719
|
+
selected,
|
|
2720
|
+
"row-even": renderIndex % 2 === 0,
|
|
2721
|
+
"row-odd": renderIndex % 2 !== 0
|
|
2722
|
+
};
|
|
2713
2723
|
const rowIndex = renderIndex + 1;
|
|
2714
2724
|
return import_lit3.html`
|
|
2715
2725
|
<div
|
|
@@ -2954,7 +2964,7 @@ __decorateClass([
|
|
|
2954
2964
|
(0, import_decorators.property)({ type: Boolean, attribute: "enable-column-reorder" })
|
|
2955
2965
|
], YatlTable.prototype, "enableColumnReorder", 2);
|
|
2956
2966
|
__decorateClass([
|
|
2957
|
-
(0, import_decorators.property)({ type: Boolean })
|
|
2967
|
+
(0, import_decorators.property)({ type: Boolean, attribute: "enable-row-number-column" })
|
|
2958
2968
|
], YatlTable.prototype, "enableRowNumberColumn", 2);
|
|
2959
2969
|
__decorateClass([
|
|
2960
2970
|
(0, import_decorators.property)({ type: Boolean, attribute: "enable-footer" })
|