@mikestools/usetable 0.0.2 → 0.0.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.ts +76 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -244,11 +244,35 @@ export declare interface PaginationState {
|
|
|
244
244
|
readonly visibleRows: Ref<number[]>;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
|
|
247
|
+
/**
|
|
248
|
+
* Reactive wrapper for table cells.
|
|
249
|
+
*/
|
|
250
|
+
export declare interface ReactiveCellCollection {
|
|
251
|
+
/** All cell elements */
|
|
252
|
+
readonly cells: Readonly<Ref<readonly HTMLTableCellElement[]>>;
|
|
253
|
+
/** Number of cells */
|
|
254
|
+
readonly cellCount: Readonly<Ref<number>>;
|
|
255
|
+
}
|
|
248
256
|
|
|
249
|
-
|
|
257
|
+
/**
|
|
258
|
+
* Reactive wrapper for table rows.
|
|
259
|
+
*/
|
|
260
|
+
export declare interface ReactiveRowCollection {
|
|
261
|
+
/** All row elements */
|
|
262
|
+
readonly rows: Readonly<Ref<readonly HTMLTableRowElement[]>>;
|
|
263
|
+
/** Number of rows */
|
|
264
|
+
readonly rowCount: Readonly<Ref<number>>;
|
|
265
|
+
}
|
|
250
266
|
|
|
251
|
-
|
|
267
|
+
/**
|
|
268
|
+
* Reactive wrapper for tbody elements.
|
|
269
|
+
*/
|
|
270
|
+
export declare interface ReactiveTBodyCollection {
|
|
271
|
+
/** All tbody elements */
|
|
272
|
+
readonly tBodies: Readonly<Ref<readonly HTMLTableSectionElement[]>>;
|
|
273
|
+
/** Number of tbody elements */
|
|
274
|
+
readonly tBodyCount: Readonly<Ref<number>>;
|
|
275
|
+
}
|
|
252
276
|
|
|
253
277
|
/**
|
|
254
278
|
* Column definition for record-based tables.
|
|
@@ -346,11 +370,57 @@ export declare function stripGeneratedId<T extends {
|
|
|
346
370
|
id: string;
|
|
347
371
|
}>(record: T): Omit<T, 'id'> | T;
|
|
348
372
|
|
|
349
|
-
|
|
373
|
+
/**
|
|
374
|
+
* Table cell composable.
|
|
375
|
+
*/
|
|
376
|
+
export declare interface TableCell {
|
|
377
|
+
/** The cell element */
|
|
378
|
+
readonly element: Readonly<Ref<HTMLTableCellElement>>;
|
|
379
|
+
/** Cell index within row */
|
|
380
|
+
readonly cellIndex: Readonly<Ref<number>>;
|
|
381
|
+
/** Column span */
|
|
382
|
+
readonly columnSpan: Ref<number>;
|
|
383
|
+
/** Row span */
|
|
384
|
+
readonly rowSpan: Ref<number>;
|
|
385
|
+
/** Header IDs */
|
|
386
|
+
readonly headers: Ref<string>;
|
|
387
|
+
/** Abbreviated text */
|
|
388
|
+
readonly abbr: Ref<string>;
|
|
389
|
+
/** Scope (for th elements) */
|
|
390
|
+
readonly scope: Ref<string>;
|
|
391
|
+
}
|
|
350
392
|
|
|
351
|
-
|
|
393
|
+
/**
|
|
394
|
+
* Table row composable.
|
|
395
|
+
*/
|
|
396
|
+
export declare interface TableRow extends ReactiveCellCollection {
|
|
397
|
+
/** The row element */
|
|
398
|
+
readonly element: Readonly<Ref<HTMLTableRowElement>>;
|
|
399
|
+
/** Row index in table */
|
|
400
|
+
readonly rowIndex: Readonly<Ref<number>>;
|
|
401
|
+
/** Row index in parent section */
|
|
402
|
+
readonly sectionRowIndex: Readonly<Ref<number>>;
|
|
403
|
+
/** Insert a cell at index */
|
|
404
|
+
insertCell(index?: number): HTMLTableCellElement;
|
|
405
|
+
/** Delete a cell at index */
|
|
406
|
+
deleteCell(index: number): void;
|
|
407
|
+
/** Get TableCell composable for cell at index */
|
|
408
|
+
getCell(index: number): TableCell | undefined;
|
|
409
|
+
}
|
|
352
410
|
|
|
353
|
-
|
|
411
|
+
/**
|
|
412
|
+
* Table section composable.
|
|
413
|
+
*/
|
|
414
|
+
export declare interface TableSection extends ReactiveRowCollection {
|
|
415
|
+
/** The section element */
|
|
416
|
+
readonly element: Readonly<Ref<HTMLTableSectionElement>>;
|
|
417
|
+
/** Insert a row at index */
|
|
418
|
+
insertRow(index?: number): HTMLTableRowElement;
|
|
419
|
+
/** Delete a row at index */
|
|
420
|
+
deleteRow(index: number): void;
|
|
421
|
+
/** Get TableRow composable for row at index */
|
|
422
|
+
getRow(index: number): TableRow | undefined;
|
|
423
|
+
}
|
|
354
424
|
|
|
355
425
|
/**
|
|
356
426
|
* A comprehensive Vue composable for direct HTML table DOM manipulation.
|