@rozie-ui/data-table-solid 0.3.1 → 0.4.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/dist/index.d.cts CHANGED
@@ -12,6 +12,14 @@ interface SelectAllSlotCtx {
12
12
  indeterminate: any;
13
13
  toggle: any;
14
14
  }
15
+ interface SelectCellSlotCtx {
16
+ row: any;
17
+ checked: any;
18
+ toggle: any;
19
+ }
20
+ interface DetailSlotCtx {
21
+ row: any;
22
+ }
15
23
  interface ColHeaderSlotCtx {
16
24
  columnId: any;
17
25
  column: any;
@@ -24,11 +32,6 @@ interface FilterSlotCtx {
24
32
  minMax: any;
25
33
  setFilter: any;
26
34
  }
27
- interface SelectCellSlotCtx {
28
- row: any;
29
- checked: any;
30
- toggle: any;
31
- }
32
35
  interface CellSlotCtx {
33
36
  columnId: any;
34
37
  column: any;
@@ -44,9 +47,6 @@ interface EditorSlotCtx {
44
47
  cancel: any;
45
48
  autofocus: any;
46
49
  }
47
- interface DetailSlotCtx {
48
- row: any;
49
- }
50
50
  interface DataTableProps {
51
51
  /**
52
52
  * The row data — `model: true`, so a committed cell/row edit writes a **fresh** array back through `r-model:data` (uncontrolled fallback `dataDefault`). A stable reference per Rozie's setup-once model — fed directly into table-core (never map/cloned in the watcher).
@@ -208,13 +208,42 @@ interface DataTableProps {
208
208
  children?: JSX.Element;
209
209
  groupBarSlot?: (ctx: GroupBarSlotCtx) => JSX.Element;
210
210
  selectAllSlot?: (ctx: SelectAllSlotCtx) => JSX.Element;
211
+ selectCellSlot?: (ctx: SelectCellSlotCtx) => JSX.Element;
212
+ detailSlot?: (ctx: DetailSlotCtx) => JSX.Element;
211
213
  colHeaderSlot?: (ctx: ColHeaderSlotCtx) => JSX.Element;
212
214
  filterSlot?: (ctx: FilterSlotCtx) => JSX.Element;
213
- selectCellSlot?: (ctx: SelectCellSlotCtx) => JSX.Element;
214
215
  cellSlot?: (ctx: CellSlotCtx) => JSX.Element;
215
216
  editorSlot?: (ctx: EditorSlotCtx) => JSX.Element;
216
- detailSlot?: (ctx: DetailSlotCtx) => JSX.Element;
217
- slots?: Record<string, (ctx: any) => JSX.Element>;
217
+ slots?: {
218
+ [key: `colHeader-${string}`]: ((ctx: {
219
+ columnId: any;
220
+ column: any;
221
+ label: any;
222
+ }) => JSX.Element) | undefined;
223
+ [key: `filter-${string}`]: ((ctx: {
224
+ columnId: any;
225
+ value: any;
226
+ uniqueValues: any;
227
+ minMax: any;
228
+ setFilter: any;
229
+ }) => JSX.Element) | undefined;
230
+ [key: `cell-${string}`]: ((ctx: {
231
+ columnId: any;
232
+ column: any;
233
+ row: any;
234
+ value: any;
235
+ }) => JSX.Element) | undefined;
236
+ [key: `editor-${string}`]: ((ctx: {
237
+ columnId: any;
238
+ column: any;
239
+ row: any;
240
+ value: any;
241
+ commit: any;
242
+ cancel: any;
243
+ autofocus: any;
244
+ }) => JSX.Element) | undefined;
245
+ [key: string]: ((...args: any[]) => JSX.Element) | undefined;
246
+ };
218
247
  ref?: (h: DataTableHandle) => void;
219
248
  }
220
249
  interface DataTableHandle {
package/dist/index.d.mts CHANGED
@@ -12,6 +12,14 @@ interface SelectAllSlotCtx {
12
12
  indeterminate: any;
13
13
  toggle: any;
14
14
  }
15
+ interface SelectCellSlotCtx {
16
+ row: any;
17
+ checked: any;
18
+ toggle: any;
19
+ }
20
+ interface DetailSlotCtx {
21
+ row: any;
22
+ }
15
23
  interface ColHeaderSlotCtx {
16
24
  columnId: any;
17
25
  column: any;
@@ -24,11 +32,6 @@ interface FilterSlotCtx {
24
32
  minMax: any;
25
33
  setFilter: any;
26
34
  }
27
- interface SelectCellSlotCtx {
28
- row: any;
29
- checked: any;
30
- toggle: any;
31
- }
32
35
  interface CellSlotCtx {
33
36
  columnId: any;
34
37
  column: any;
@@ -44,9 +47,6 @@ interface EditorSlotCtx {
44
47
  cancel: any;
45
48
  autofocus: any;
46
49
  }
47
- interface DetailSlotCtx {
48
- row: any;
49
- }
50
50
  interface DataTableProps {
51
51
  /**
52
52
  * The row data — `model: true`, so a committed cell/row edit writes a **fresh** array back through `r-model:data` (uncontrolled fallback `dataDefault`). A stable reference per Rozie's setup-once model — fed directly into table-core (never map/cloned in the watcher).
@@ -208,13 +208,42 @@ interface DataTableProps {
208
208
  children?: JSX.Element;
209
209
  groupBarSlot?: (ctx: GroupBarSlotCtx) => JSX.Element;
210
210
  selectAllSlot?: (ctx: SelectAllSlotCtx) => JSX.Element;
211
+ selectCellSlot?: (ctx: SelectCellSlotCtx) => JSX.Element;
212
+ detailSlot?: (ctx: DetailSlotCtx) => JSX.Element;
211
213
  colHeaderSlot?: (ctx: ColHeaderSlotCtx) => JSX.Element;
212
214
  filterSlot?: (ctx: FilterSlotCtx) => JSX.Element;
213
- selectCellSlot?: (ctx: SelectCellSlotCtx) => JSX.Element;
214
215
  cellSlot?: (ctx: CellSlotCtx) => JSX.Element;
215
216
  editorSlot?: (ctx: EditorSlotCtx) => JSX.Element;
216
- detailSlot?: (ctx: DetailSlotCtx) => JSX.Element;
217
- slots?: Record<string, (ctx: any) => JSX.Element>;
217
+ slots?: {
218
+ [key: `colHeader-${string}`]: ((ctx: {
219
+ columnId: any;
220
+ column: any;
221
+ label: any;
222
+ }) => JSX.Element) | undefined;
223
+ [key: `filter-${string}`]: ((ctx: {
224
+ columnId: any;
225
+ value: any;
226
+ uniqueValues: any;
227
+ minMax: any;
228
+ setFilter: any;
229
+ }) => JSX.Element) | undefined;
230
+ [key: `cell-${string}`]: ((ctx: {
231
+ columnId: any;
232
+ column: any;
233
+ row: any;
234
+ value: any;
235
+ }) => JSX.Element) | undefined;
236
+ [key: `editor-${string}`]: ((ctx: {
237
+ columnId: any;
238
+ column: any;
239
+ row: any;
240
+ value: any;
241
+ commit: any;
242
+ cancel: any;
243
+ autofocus: any;
244
+ }) => JSX.Element) | undefined;
245
+ [key: string]: ((...args: any[]) => JSX.Element) | undefined;
246
+ };
218
247
  ref?: (h: DataTableHandle) => void;
219
248
  }
220
249
  interface DataTableHandle {