@corvina/web-components-library 1.0.0-beta.2 → 1.0.0-beta.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/CHANGELOG.md +3 -0
- package/index.d.ts +13 -2
- package/package.json +1 -1
- package/web-components-library.cjs.js +1 -1
- package/web-components-library.es.js +158 -148
- package/web-components-library.umd.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -31,6 +31,9 @@ Breaking changes:
|
|
|
31
31
|
Added:
|
|
32
32
|
|
|
33
33
|
- `./settings.scss` export (Vuetify Sass settings of the library).
|
|
34
|
+
- `CorvinaTable` cell slots `item.<key>` (as in Vuetify's tables): a column's cells written in the template,
|
|
35
|
+
with `item`, `value`, `index` and `column` (`CORVINA.TABLE.CellSlotProps`). The slot replaces the content of the
|
|
36
|
+
column's `type`, now optional in `TableHeaderEntry`. Columns without a slot render as before.
|
|
34
37
|
|
|
35
38
|
Fixed:
|
|
36
39
|
|
package/index.d.ts
CHANGED
|
@@ -180,6 +180,17 @@ export declare namespace CORVINA {
|
|
|
180
180
|
/** Name of the prop that will contain the row item */
|
|
181
181
|
itemPropName?: string;
|
|
182
182
|
}
|
|
183
|
+
/** Props of the `item.<key>` cell slot */
|
|
184
|
+
interface CellSlotProps {
|
|
185
|
+
/** The row item */
|
|
186
|
+
item: any;
|
|
187
|
+
/** `item[key]` */
|
|
188
|
+
value: any;
|
|
189
|
+
/** Index of the row in the page */
|
|
190
|
+
index: number;
|
|
191
|
+
/** The column's header entry */
|
|
192
|
+
column: TableHeaderEntry;
|
|
193
|
+
}
|
|
183
194
|
/** Use it with `HEADER_CELL_TYPE.VUE_COMPONENT` */
|
|
184
195
|
interface HeaderVueComponent {
|
|
185
196
|
/** Name of the Vue component or Vue component definition */
|
|
@@ -221,8 +232,8 @@ export declare namespace CORVINA {
|
|
|
221
232
|
customHeaderCellGeneratorFunction?: () => HTMLElement;
|
|
222
233
|
/** The `HeaderVueComponent` describing the vuejs component to use */
|
|
223
234
|
headerVueComponent?: HeaderVueComponent;
|
|
224
|
-
/** Type of the row cells */
|
|
225
|
-
type
|
|
235
|
+
/** Type of the row cells. Not needed when the table has the column's `item.<key>` slot. */
|
|
236
|
+
type?: CELL_TYPE;
|
|
226
237
|
/** Function that generates the cell virtual dom */
|
|
227
238
|
customCellGeneratorFunction?: (item: any, header: TableHeaderEntry) => HTMLElement;
|
|
228
239
|
/** Name of the property of the item object containing the `VueComponent` data */
|
package/package.json
CHANGED