@kayord/ui 0.9.21 → 0.10.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.
@@ -1,109 +1,137 @@
1
- <script lang="ts">
2
- import ArrowDown from "lucide-svelte/icons/arrow-down";
3
- import ArrowUp from "lucide-svelte/icons/arrow-up";
1
+ <script lang="ts" generics="T">
2
+ import { FlexRender, type ColumnDef, type Table as TypeType, renderComponent } from "@tanstack/svelte-table";
3
+ import { Skeleton, Table } from "../../ui";
4
+ import Pagination from "./Pagination.svelte";
5
+ import type { Snippet } from "svelte";
4
6
  import { fade } from "svelte/transition";
7
+ import { ProgressLoading } from "../progress-loading";
8
+ import DataTableCheckbox from "./DataTableCheckbox.svelte";
9
+ import VisibilitySelect from "./VisibilitySelect.svelte";
10
+ import FullscreenModeToggle from "./FullscreenModeToggle.svelte";
11
+ import { cn } from "../../../utils";
12
+ import { tableStore } from "./table.svelte";
5
13
 
6
- import { Button, ProgressLoading, Skeleton } from "../../..";
7
- import { Subscribe, Render, type TableViewModel } from "svelte-headless-table";
8
- import * as Table from "../../ui/table";
9
- import DataTablePagination from "./DataTablePagination.svelte";
14
+ interface Props<T> {
15
+ table: TypeType<T>;
16
+ columns: ColumnDef<T>[];
17
+ isLoading?: boolean;
18
+ header?: Snippet;
19
+ subHeader?: Snippet;
20
+ footer?: Snippet;
21
+ leftToolbar?: Snippet;
22
+ rightToolbar?: Snippet;
23
+ noDataMessage?: string;
24
+ hideHeader?: boolean;
25
+ enableVisibility?: boolean;
26
+ enableFullscreen?: boolean;
27
+ }
10
28
 
11
- type RowData = Record<string, any>;
12
- type T = $$Generic<RowData>;
13
- export let tableViewModel: TableViewModel<T>;
29
+ let {
30
+ table,
31
+ columns,
32
+ isLoading = false,
33
+ header,
34
+ subHeader,
35
+ footer,
36
+ leftToolbar,
37
+ rightToolbar,
38
+ noDataMessage = "No data",
39
+ hideHeader = false,
40
+ enableVisibility = false,
41
+ enableFullscreen = false,
42
+ }: Props<T> = $props();
14
43
 
15
- export let title: string = "";
16
- export let isLoading: boolean = false;
17
- export let hideHeader: boolean = false;
44
+ const isPaginationEnabled = table.options.getPaginationRowModel !== undefined;
45
+ const enableRowSelection = table.options.enableRowSelection;
18
46
 
19
- export let noDataMessage: string | undefined = "No Data";
20
- export let serverItemCount: number | undefined = undefined;
21
-
22
- export let rowAction: ((row: T | undefined) => void) | undefined = undefined;
23
-
24
- export let showSelected: boolean = true;
25
- export let showRowsPerPage: boolean = false;
26
-
27
- const { headerRows, pageRows, tableAttrs, tableBodyAttrs, pluginStates, rows, flatColumns } = tableViewModel;
28
-
29
- // Sorting
30
- const isSortEnabled = pluginStates.sort != undefined;
31
- const sortKeys = isSortEnabled ? pluginStates.sort.sortKeys : undefined;
32
-
33
- // Paging
34
- const isPagingEnabled = pluginStates.page != undefined;
35
- const pageIndex = isPagingEnabled ? pluginStates.page.pageIndex : undefined;
36
- const pageSize = isPagingEnabled ? pluginStates.page.pageSize : undefined;
37
-
38
- // Select
39
- const isSelectEnabled = pluginStates.select != undefined;
40
- const selectedDataIds = isSelectEnabled ? pluginStates.select.selectedDataIds : undefined;
41
-
42
- const getOriginalData = (id: any) => {
43
- const data = $pageRows[id] as unknown as { original: T };
44
- return data.original;
45
- };
47
+ if (enableRowSelection) {
48
+ const rowSelectionColumn: ColumnDef<T> = {
49
+ id: "select",
50
+ // cell: (info) => "[]",
51
+ header: () =>
52
+ renderComponent(DataTableCheckbox, {
53
+ checked: table.getIsAllPageRowsSelected(),
54
+ onCheckedChange: () => table.toggleAllPageRowsSelected(),
55
+ }),
56
+ cell: (r) =>
57
+ renderComponent(DataTableCheckbox, {
58
+ checked: r.row.getIsSelected(),
59
+ onCheckedChange: () => r.row.toggleSelected(),
60
+ }),
61
+ enableResizing: false,
62
+ };
63
+ columns.unshift(rowSelectionColumn);
64
+ }
46
65
  </script>
47
66
 
48
- <div class="w-full">
49
- <div class="m-2 rounded-md border">
67
+ <div
68
+ class={cn(
69
+ "w-full",
70
+ tableStore.isFullscreen ? "absolute left-0 top-0 z-10 h-screen bg-background transition-all" : "w-full"
71
+ )}
72
+ >
73
+ <div class="py-2">
74
+ {#if header}
75
+ {@render header()}
76
+ {:else}
77
+ <div class="flex items-center justify-between gap-2">
78
+ <div>
79
+ {#if leftToolbar}
80
+ {@render leftToolbar()}
81
+ {/if}
82
+ </div>
83
+ <div></div>
84
+ <div class="flex items-center justify-between gap-2">
85
+ {#if rightToolbar}
86
+ {@render rightToolbar()}
87
+ {/if}
88
+ {#if enableVisibility}
89
+ <div>
90
+ <VisibilitySelect {table} />
91
+ </div>
92
+ {/if}
93
+ {#if enableFullscreen}
94
+ <div>
95
+ <FullscreenModeToggle />
96
+ </div>
97
+ {/if}
98
+ </div>
99
+ </div>
100
+ {/if}
101
+ </div>
102
+
103
+ <div class="rounded-md border">
50
104
  {#if isLoading}
51
105
  <span in:fade={{ duration: 300 }}>
52
106
  <ProgressLoading class="h-1" />
53
107
  </span>
54
- {:else}
55
- <div class="h-1"></div>
56
108
  {/if}
57
- {#if $$slots.header || title.length > 0}
58
- <div class="overflow-hidden rounded-t-md">
59
- {#if $$slots.header}
60
- <slot name="header" />
61
- {:else}
62
- <h1 class="p-2 text-center text-lg">
63
- {title}
64
- </h1>
65
- {/if}
66
- </div>
67
- {/if}
68
- {#if $$slots.subHeader}
69
- <slot name="subHeader" />
109
+
110
+ {#if subHeader}
111
+ {@render subHeader()}
70
112
  {/if}
71
- <Table.Root {...$tableAttrs} class="table-auto">
113
+
114
+ <Table.Root class="table-auto">
72
115
  {#if !hideHeader}
73
116
  <Table.Header>
74
- {#each $headerRows as headerRow}
75
- <Subscribe rowAttrs={headerRow.attrs()}>
76
- <Table.Row>
77
- {#each headerRow.cells as cell (cell.id)}
78
- <Subscribe attrs={cell.attrs()} let:attrs props={cell.props()} let:props>
79
- <Table.Head {...attrs} class="[&:has([role=checkbox])]:pl-4">
80
- {#if isSortEnabled}
81
- <Button variant="ghost" on:click={props.sort.toggle}>
82
- <Render of={cell.render()} />
83
- {#each $sortKeys as sortKey}
84
- {#if sortKey?.id === cell.id && sortKey?.order == "desc"}
85
- <ArrowDown class="ml-2 h-4 w-4" />
86
- {:else if sortKey?.id === cell.id && sortKey?.order === "asc"}
87
- <ArrowUp class="ml-2 h-4 w-4" />
88
- {/if}
89
- {/each}
90
- </Button>
91
- {:else}
92
- <Render of={cell.render()} />
93
- {/if}
94
- </Table.Head>
95
- </Subscribe>
96
- {/each}
97
- </Table.Row>
98
- </Subscribe>
117
+ {#each table.getHeaderGroups() as headerGroup}
118
+ <Table.Row>
119
+ {#each headerGroup.headers as header}
120
+ <Table.Head colspan={header.colSpan}>
121
+ {#if !header.isPlaceholder}
122
+ <FlexRender content={header.column.columnDef.header} context={header.getContext()} />
123
+ {/if}
124
+ </Table.Head>
125
+ {/each}
126
+ </Table.Row>
99
127
  {/each}
100
128
  </Table.Header>
101
129
  {/if}
102
- <Table.Body {...$tableBodyAttrs}>
103
- {#if isLoading && $rows.length == 0}
130
+ <Table.Body>
131
+ {#if isLoading && table.getRowModel().rows.length == 0}
104
132
  {#each { length: 5 } as _, i}
105
133
  <Table.Row>
106
- {#each flatColumns as cell}
134
+ {#each columns as _cell}
107
135
  <Table.Cell>
108
136
  <Skeleton class="h-4" />
109
137
  </Table.Cell>
@@ -111,30 +139,21 @@
111
139
  </Table.Row>
112
140
  {/each}
113
141
  {:else}
114
- {#if $rows.length == 0}
142
+ {#if table.getRowModel().rows.length == 0}
115
143
  <Table.Row>
116
- <Table.Cell colspan={flatColumns.length}>
144
+ <Table.Cell colspan={table.getAllColumns().length}>
117
145
  <div class="text-center">{noDataMessage}</div>
118
146
  </Table.Cell>
119
147
  </Table.Row>
120
148
  {/if}
121
- {#each $pageRows as row (row.id)}
122
- <Subscribe rowAttrs={row.attrs()} let:rowAttrs rowProps={row.props()} let:rowProps>
123
- <Table.Row
124
- {...rowAttrs}
125
- data-state={isSelectEnabled && rowProps.select.selected ? "selected" : "false"}
126
- class={rowAction == undefined ? "" : "hover:cursor-pointer"}
127
- on:click={() => (rowAction != undefined ? rowAction(getOriginalData(row.id)) : undefined)}
128
- >
129
- {#each row.cells as cell (cell.id)}
130
- <Subscribe attrs={cell.attrs()} let:attrs>
131
- <Table.Cell {...attrs}>
132
- <Render of={cell.render()} />
133
- </Table.Cell>
134
- </Subscribe>
135
- {/each}
136
- </Table.Row>
137
- </Subscribe>
149
+ {#each table.getRowModel().rows as row}
150
+ <Table.Row data-state={row.getIsSelected() && "selected"}>
151
+ {#each row.getVisibleCells() as cell}
152
+ <Table.Cell style={`width: ${cell.getContext().column.getSize()}px;`}>
153
+ <FlexRender content={cell.column.columnDef.cell} context={cell.getContext()} />
154
+ </Table.Cell>
155
+ {/each}
156
+ </Table.Row>
138
157
  {/each}
139
158
  {/if}
140
159
  </Table.Body>
@@ -145,20 +164,13 @@
145
164
  </span>
146
165
  {/if}
147
166
  </div>
148
- <div class="flex items-center">
149
- <div class="flex-1 px-2 text-sm text-muted-foreground">
150
- {#if isSelectEnabled && showSelected}
151
- {Object.keys($selectedDataIds).length} of {serverItemCount ?? $rows.length} row(s) selected.
152
- {/if}
153
- </div>
154
- {#if isPagingEnabled}
155
- <DataTablePagination tableModel={tableViewModel} {showRowsPerPage} />
156
- {/if}
157
- </div>
167
+ {#if isPaginationEnabled}
168
+ <Pagination {table} />
169
+ {/if}
158
170
 
159
- {#if $$slots.footer}
171
+ {#if footer}
160
172
  <div class="overflow-hidden rounded-b-md">
161
- <slot name="footer" />
173
+ {@render footer()}
162
174
  </div>
163
175
  {/if}
164
176
  </div>
@@ -1,41 +1,36 @@
1
- import { type TableViewModel } from "svelte-headless-table";
2
- type RowData = Record<string, any>;
3
- declare class __sveltets_Render<T extends RowData> {
1
+ import { type ColumnDef, type Table as TypeType } from "@tanstack/svelte-table";
2
+ import type { Snippet } from "svelte";
3
+ declare class __sveltets_Render<T> {
4
4
  props(): {
5
- tableViewModel: TableViewModel<T, import("svelte-headless-table/dist/types/TablePlugin").AnyPlugins>;
6
- title?: string;
5
+ table: TypeType<T>;
6
+ columns: ColumnDef<T>[];
7
7
  isLoading?: boolean;
8
+ header?: Snippet;
9
+ subHeader?: Snippet;
10
+ footer?: Snippet;
11
+ leftToolbar?: Snippet;
12
+ rightToolbar?: Snippet;
13
+ noDataMessage?: string;
8
14
  hideHeader?: boolean;
9
- noDataMessage?: string | undefined;
10
- serverItemCount?: number | undefined;
11
- rowAction?: ((row: T | undefined) => void) | undefined;
12
- showSelected?: boolean;
13
- showRowsPerPage?: boolean;
15
+ enableVisibility?: boolean;
16
+ enableFullscreen?: boolean;
14
17
  };
15
18
  events(): {} & {
16
19
  [evt: string]: CustomEvent<any>;
17
20
  };
18
- slots(): {
19
- header: {};
20
- subHeader: {};
21
- footer: {};
22
- };
23
- bindings(): string;
21
+ slots(): {};
22
+ bindings(): "";
24
23
  exports(): {};
25
24
  }
26
25
  interface $$IsomorphicComponent {
27
- new <T extends RowData>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']> & {
28
- children?: any;
29
- }>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
26
+ new <T>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
30
27
  $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
31
28
  } & ReturnType<__sveltets_Render<T>['exports']>;
32
- <T extends RowData>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {
29
+ <T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {
33
30
  $$events?: ReturnType<__sveltets_Render<T>['events']>;
34
- $$slots?: ReturnType<__sveltets_Render<T>['slots']>;
35
- children?: any;
36
31
  }): ReturnType<__sveltets_Render<T>['exports']>;
37
32
  z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
38
33
  }
39
34
  declare const DataTable: $$IsomorphicComponent;
40
- type DataTable<T extends RowData> = InstanceType<typeof DataTable<T>>;
35
+ type DataTable<T> = InstanceType<typeof DataTable<T>>;
41
36
  export default DataTable;
@@ -2,16 +2,13 @@
2
2
  import { Checkbox } from "../../ui/checkbox";
3
3
  import { cn } from "../../../utils";
4
4
  import type { ComponentProps } from "svelte";
5
- import type { Writable } from "svelte/store";
6
5
 
7
- interface DataTableCheckboxProps extends Omit<ComponentProps<Checkbox>, "checked"> {
8
- checked: Writable<boolean>;
6
+ interface Props extends Omit<ComponentProps<Checkbox>, "checked"> {
7
+ checked?: boolean | "indeterminate";
8
+ class?: string;
9
9
  }
10
10
 
11
- type $$Props = DataTableCheckboxProps;
12
- let className: $$Props["class"] = undefined;
13
- export { className as class };
14
- export let checked: $$Props["checked"];
11
+ let { checked, class: className, ...rest }: Props = $props();
15
12
  </script>
16
13
 
17
- <Checkbox bind:checked={$checked} class={cn(className)} />
14
+ <Checkbox bind:checked class={cn(className)} {...rest} />
@@ -1,4 +1,3 @@
1
- import type { Writable } from "svelte/store";
2
1
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
2
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
3
  $$bindings?: Bindings;
@@ -13,9 +12,10 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
13
12
  z_$$bindings?: Bindings;
14
13
  }
15
14
  declare const DataTableCheckbox: $$__sveltets_2_IsomorphicComponent<Omit<import("bits-ui").CheckboxProps, "checked"> & {
16
- checked: Writable<boolean>;
15
+ checked?: boolean | "indeterminate";
16
+ class?: string;
17
17
  }, {
18
18
  [evt: string]: CustomEvent<any>;
19
- }, {}, {}, string>;
19
+ }, {}, {}, "">;
20
20
  type DataTableCheckbox = InstanceType<typeof DataTableCheckbox>;
21
21
  export default DataTableCheckbox;
@@ -0,0 +1,25 @@
1
+ <script lang="ts">
2
+ import Button from "../../ui/button/button.svelte";
3
+ import { Maximize, Minimize } from "lucide-svelte";
4
+ import { tableStore } from "./table.svelte";
5
+ </script>
6
+
7
+ <Button
8
+ class="grow"
9
+ variant="outline"
10
+ size="sm"
11
+ on:click={() => {
12
+ tableStore.isFullscreen = !tableStore.isFullscreen;
13
+ // if ($target == "body") {
14
+ // $target = "#tableContent";
15
+ // } else {
16
+ // $target = "body";
17
+ // }
18
+ }}
19
+ >
20
+ {#if tableStore.isFullscreen}
21
+ <Minimize class="size-5" />
22
+ {:else}
23
+ <Maximize class="size-5" />
24
+ {/if}
25
+ </Button>
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const FullscreenModeToggle: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type FullscreenModeToggle = InstanceType<typeof FullscreenModeToggle>;
18
+ export default FullscreenModeToggle;
@@ -0,0 +1,89 @@
1
+ <script lang="ts" generics="T">
2
+ import type { Table } from "@tanstack/svelte-table";
3
+ import ChevronLeft from "lucide-svelte/icons/chevron-left";
4
+ import ChevronRight from "lucide-svelte/icons/chevron-right";
5
+ import DoubleArrowLeft from "lucide-svelte/icons/arrow-left";
6
+ import DoubleArrowRight from "lucide-svelte/icons/arrow-right";
7
+ import * as Select from "../../ui/select/index.js";
8
+ import { Button } from "../../ui/button/index.js";
9
+
10
+ interface Props<T> {
11
+ table: Table<T>;
12
+ canChangePageSize?: boolean;
13
+ }
14
+
15
+ let { table, canChangePageSize = false }: Props<T> = $props();
16
+ </script>
17
+
18
+ <div class="flex items-center justify-between p-2">
19
+ <div class="flex-1 text-sm text-muted-foreground">
20
+ {#if table.options.enableRowSelection}
21
+ {table.getFilteredSelectedRowModel().rows.length} of
22
+ {table.getFilteredRowModel().rows.length} row(s) selected.
23
+ {/if}
24
+ </div>
25
+ <div class="flex items-center space-x-6 lg:space-x-8">
26
+ <div class="flex items-center space-x-2">
27
+ {#if canChangePageSize}
28
+ <p class="text-sm font-medium">Rows per page</p>
29
+ <Select.Root
30
+ selected={{
31
+ value: table.getState().pagination.pageSize,
32
+ label: `${table.getState().pagination.pageSize}`,
33
+ }}
34
+ onSelectedChange={(selected) => {
35
+ table.setPageSize(Number(selected?.value));
36
+ }}
37
+ >
38
+ <Select.Trigger class="h-8 w-[70px]">
39
+ <Select.Value placeholder="Select page size" />
40
+ </Select.Trigger>
41
+ <Select.Content side="top">
42
+ {#each [10, 20, 30, 40, 50] as pageSize}
43
+ <Select.Item value={pageSize}>
44
+ {pageSize}
45
+ </Select.Item>
46
+ {/each}
47
+ </Select.Content>
48
+ </Select.Root>
49
+ {/if}
50
+ </div>
51
+ <div class="flex w-[100px] items-center justify-center text-sm font-medium">
52
+ Page {table.getState().pagination.pageIndex + 1} of
53
+ {table.getPageCount()}
54
+ </div>
55
+ <div class="flex items-center space-x-2">
56
+ <Button
57
+ variant="outline"
58
+ class="hidden size-8 p-0 lg:flex"
59
+ on:click={() => table.setPageIndex(0)}
60
+ disabled={!table.getCanPreviousPage()}
61
+ >
62
+ <span class="sr-only">Go to first page</span>
63
+ <DoubleArrowLeft class="size-4" />
64
+ </Button>
65
+ <Button
66
+ variant="outline"
67
+ class="size-8 p-0"
68
+ on:click={() => table.previousPage()}
69
+ disabled={!table.getCanPreviousPage()}
70
+ >
71
+ <span class="sr-only">Go to previous page</span>
72
+ <ChevronLeft class="size-4" />
73
+ </Button>
74
+ <Button variant="outline" class="size-8 p-0" on:click={() => table.nextPage()} disabled={!table.getCanNextPage()}>
75
+ <span class="sr-only">Go to next page</span>
76
+ <ChevronRight class="size-4" />
77
+ </Button>
78
+ <Button
79
+ variant="outline"
80
+ class="hidden size-8 p-0 lg:flex"
81
+ on:click={() => table.setPageIndex(table.getPageCount() - 1)}
82
+ disabled={!table.getCanNextPage()}
83
+ >
84
+ <span class="sr-only">Go to last page</span>
85
+ <DoubleArrowRight class="size-4" />
86
+ </Button>
87
+ </div>
88
+ </div>
89
+ </div>
@@ -1,14 +1,14 @@
1
- import type { TableViewModel } from "svelte-headless-table";
1
+ import type { Table } from "@tanstack/svelte-table";
2
2
  declare class __sveltets_Render<T> {
3
3
  props(): {
4
- tableModel: TableViewModel<T, AnyPlugins>;
5
- showRowsPerPage?: boolean;
4
+ table: Table<T>;
5
+ canChangePageSize?: boolean;
6
6
  };
7
7
  events(): {} & {
8
8
  [evt: string]: CustomEvent<any>;
9
9
  };
10
10
  slots(): {};
11
- bindings(): string;
11
+ bindings(): "";
12
12
  exports(): {};
13
13
  }
14
14
  interface $$IsomorphicComponent {
@@ -20,6 +20,6 @@ interface $$IsomorphicComponent {
20
20
  }): ReturnType<__sveltets_Render<T>['exports']>;
21
21
  z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
22
22
  }
23
- declare const DataTablePagination: $$IsomorphicComponent;
24
- type DataTablePagination<T> = InstanceType<typeof DataTablePagination<T>>;
25
- export default DataTablePagination;
23
+ declare const Pagination: $$IsomorphicComponent;
24
+ type Pagination<T> = InstanceType<typeof Pagination<T>>;
25
+ export default Pagination;
@@ -0,0 +1,29 @@
1
+ <script lang="ts" generics="T">
2
+ import * as DropdownMenu from "../../ui/dropdown-menu";
3
+ import { Button } from "../../ui/button";
4
+ import { Settings2Icon } from "lucide-svelte";
5
+ import type { Table } from "@tanstack/svelte-table";
6
+
7
+ interface Props<T> {
8
+ table: Table<T>;
9
+ }
10
+
11
+ let { table }: Props<T> = $props();
12
+ </script>
13
+
14
+ <DropdownMenu.Root closeOnItemClick={false}>
15
+ <DropdownMenu.Trigger asChild let:builder>
16
+ <Button variant="outline" builders={[builder]} size="sm">
17
+ <Settings2Icon class="mr-2 h-4 w-4" /> View
18
+ </Button>
19
+ </DropdownMenu.Trigger>
20
+ <DropdownMenu.Content>
21
+ <DropdownMenu.Label>Toggle columns</DropdownMenu.Label>
22
+ <DropdownMenu.Separator />
23
+ {#each table.getAllLeafColumns() as column}
24
+ <DropdownMenu.CheckboxItem checked={column.getIsVisible()} onCheckedChange={() => column.toggleVisibility()}>
25
+ {column.id}
26
+ </DropdownMenu.CheckboxItem>
27
+ {/each}
28
+ </DropdownMenu.Content>
29
+ </DropdownMenu.Root>
@@ -0,0 +1,24 @@
1
+ import type { Table } from "@tanstack/svelte-table";
2
+ declare class __sveltets_Render<T> {
3
+ props(): {
4
+ table: Table<T>;
5
+ };
6
+ events(): {} & {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots(): {};
10
+ bindings(): "";
11
+ exports(): {};
12
+ }
13
+ interface $$IsomorphicComponent {
14
+ new <T>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
15
+ $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
16
+ } & ReturnType<__sveltets_Render<T>['exports']>;
17
+ <T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {
18
+ $$events?: ReturnType<__sveltets_Render<T>['events']>;
19
+ }): ReturnType<__sveltets_Render<T>['exports']>;
20
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
21
+ }
22
+ declare const VisibilitySelect: $$IsomorphicComponent;
23
+ type VisibilitySelect<T> = InstanceType<typeof VisibilitySelect<T>>;
24
+ export default VisibilitySelect;
@@ -1,2 +1 @@
1
1
  export { default as DataTable } from "./DataTable.svelte";
2
- export { default as DataTableCheckbox } from "./DataTableCheckbox.svelte";
@@ -1,2 +1 @@
1
1
  export { default as DataTable } from "./DataTable.svelte";
2
- export { default as DataTableCheckbox } from "./DataTableCheckbox.svelte";
@@ -0,0 +1,5 @@
1
+ interface TableStoreProps {
2
+ isFullscreen: boolean;
3
+ }
4
+ export declare let tableStore: TableStoreProps;
5
+ export {};
@@ -0,0 +1,3 @@
1
+ export let tableStore = $state({
2
+ isFullscreen: false,
3
+ });
@@ -0,0 +1,49 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
+ default: any;
16
+ } ? Props extends Record<string, never> ? any : {
17
+ children?: any;
18
+ } : {});
19
+ declare const CommandDialog: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
+ preventScroll?: boolean | undefined;
21
+ closeOnEscape?: boolean | undefined;
22
+ closeOnOutsideClick?: boolean | undefined;
23
+ onOutsideClick?: ((event: PointerEvent | MouseEvent | TouchEvent) => void) | undefined;
24
+ portal?: (HTMLElement | string | null) | undefined;
25
+ open?: ((boolean | undefined) & {}) | undefined;
26
+ onOpenChange?: import("bits-ui/dist/internal").OnChangeFn<boolean> | undefined;
27
+ openFocus?: import("bits-ui").FocusProp | undefined;
28
+ closeFocus?: import("bits-ui").FocusProp | undefined;
29
+ } & {
30
+ state?: import("svelte/store").Writable<import("cmdk-sv").State> | undefined;
31
+ label?: string | undefined;
32
+ shouldFilter?: boolean | undefined;
33
+ filter?: ((value: string, search: string) => number) | undefined;
34
+ value?: string | undefined;
35
+ onValueChange?: ((value: string) => void) | undefined;
36
+ loop?: boolean | undefined;
37
+ ids?: Partial<import("cmdk-sv").CommandIds> | undefined;
38
+ } & import("cmdk-sv/dist/internal").HTMLDivAttributes & {
39
+ onKeydown?: (e: KeyboardEvent) => void;
40
+ asChild?: boolean;
41
+ }, {
42
+ default: {};
43
+ }>, {
44
+ [evt: string]: CustomEvent<any>;
45
+ }, {
46
+ default: {};
47
+ }, {}, string>;
48
+ type CommandDialog = InstanceType<typeof CommandDialog>;
49
+ export default CommandDialog;
@@ -0,0 +1,32 @@
1
+ import type { Label as LabelPrimitive } from "bits-ui";
2
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
+ $$bindings?: Bindings;
5
+ } & Exports;
6
+ (internal: unknown, props: Props & {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports & {
10
+ $set?: any;
11
+ $on?: any;
12
+ };
13
+ z_$$bindings?: Bindings;
14
+ }
15
+ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
16
+ default: any;
17
+ } ? Props extends Record<string, never> ? any : {
18
+ children?: any;
19
+ } : {});
20
+ declare const FormLabel: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<LabelPrimitive.Props, {
21
+ default: {
22
+ labelAttrs: import("svelte/store").Writable<import("formsnap").LabelAttrs>;
23
+ };
24
+ }>, {
25
+ [evt: string]: CustomEvent<any>;
26
+ }, {
27
+ default: {
28
+ labelAttrs: import("svelte/store").Writable<import("formsnap").LabelAttrs>;
29
+ };
30
+ }, {}, string>;
31
+ type FormLabel = InstanceType<typeof FormLabel>;
32
+ export default FormLabel;
@@ -22,9 +22,9 @@ declare const PaginationLink: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_
22
22
  } & {
23
23
  asChild?: boolean | undefined;
24
24
  el?: HTMLButtonElement | undefined;
25
- } & (import("svelte/elements").HTMLButtonAttributes & Props & {
25
+ } & (import("svelte/elements").HTMLButtonAttributes & (Props & {
26
26
  isActive: boolean;
27
- }), {
27
+ })), {
28
28
  default: {};
29
29
  }>, {
30
30
  click: import("bits-ui").CustomEventHandler<MouseEvent, HTMLDivElement>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kayord/ui",
3
3
  "private": false,
4
- "version": "0.9.21",
4
+ "version": "0.10.0",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -26,6 +26,7 @@
26
26
  "!dist/**/*.spec.*"
27
27
  ],
28
28
  "peerDependencies": {
29
+ "@tanstack/svelte-table": "^9.0.0-alpha.10",
29
30
  "lucide-svelte": ">= 0.400.0 < 1.0.0",
30
31
  "svelte": "^4.0.0 || ^5.0.0-next.1",
31
32
  "sveltekit-superforms": "^2.15.1",
@@ -36,43 +37,43 @@
36
37
  "bits-ui": "^0.21.13",
37
38
  "clsx": "^2.1.1",
38
39
  "cmdk-sv": "^0.0.18",
39
- "embla-carousel-svelte": "8.2.1",
40
+ "embla-carousel-svelte": "8.3.0",
40
41
  "formsnap": "^1.0.1",
41
42
  "mode-watcher": "^0.4.1",
42
43
  "paneforge": "^0.0.5",
43
- "svelte-headless-table": "^0.18.2",
44
- "svelte-sonner": "^0.3.27",
44
+ "svelte-sonner": "^0.3.28",
45
45
  "tailwind-merge": "^2.5.2",
46
46
  "tailwind-variants": "^0.2.1",
47
47
  "vaul-svelte": "^0.3.2"
48
48
  },
49
49
  "devDependencies": {
50
- "@sveltejs/adapter-auto": "^3.2.4",
51
- "@sveltejs/kit": "^2.5.26",
52
- "@sveltejs/package": "^2.3.4",
50
+ "@sveltejs/adapter-auto": "^3.2.5",
51
+ "@sveltejs/kit": "^2.5.28",
52
+ "@sveltejs/package": "^2.3.5",
53
53
  "@sveltejs/vite-plugin-svelte": "^4.0.0-next.6",
54
+ "@tanstack/svelte-table": "9.0.0-alpha.10",
54
55
  "@testing-library/jest-dom": "^6.5.0",
55
56
  "@testing-library/svelte": "^5.2.1",
56
- "@typescript-eslint/eslint-plugin": "^8.4.0",
57
- "@typescript-eslint/parser": "^8.4.0",
57
+ "@typescript-eslint/eslint-plugin": "^8.6.0",
58
+ "@typescript-eslint/parser": "^8.6.0",
58
59
  "autoprefixer": "^10.4.20",
59
60
  "eslint": "^9.10.0",
60
61
  "eslint-config-prettier": "^9.1.0",
61
- "eslint-plugin-svelte": "^2.43.0",
62
- "happy-dom": "^15.7.3",
63
- "lucide-svelte": "^0.439.0",
64
- "postcss": "^8.4.45",
62
+ "eslint-plugin-svelte": "^2.44.0",
63
+ "happy-dom": "^15.7.4",
64
+ "lucide-svelte": "^0.441.0",
65
+ "postcss": "^8.4.47",
65
66
  "prettier": "^3.3.3",
66
67
  "prettier-plugin-svelte": "^3.2.6",
67
68
  "prettier-plugin-tailwindcss": "^0.6.6",
68
- "publint": "^0.2.10",
69
+ "publint": "^0.2.11",
69
70
  "svelte": "^5.0.0-next.238",
70
- "svelte-check": "^4.0.1",
71
- "tailwindcss": "^3.4.10",
71
+ "svelte-check": "^4.0.2",
72
+ "tailwindcss": "^3.4.12",
72
73
  "tslib": "^2.7.0",
73
- "typescript": "^5.5.4",
74
- "vite": "^5.4.3",
75
- "vitest": "^2.0.5"
74
+ "typescript": "^5.6.2",
75
+ "vite": "^5.4.6",
76
+ "vitest": "^2.1.1"
76
77
  },
77
78
  "svelte": "./dist/index.js",
78
79
  "types": "./dist/index.d.ts",
@@ -1,77 +0,0 @@
1
- <script lang="ts" generics="T">
2
- import { Button, Select } from "../../..";
3
- import { ChevronLeftIcon, ChevronRightIcon, ChevronsLeftIcon, ChevronsRightIcon } from "lucide-svelte";
4
- import type { TableViewModel } from "svelte-headless-table";
5
- import type { AnyPlugins } from "svelte-headless-table/plugins";
6
-
7
- export let tableModel: TableViewModel<T, AnyPlugins>;
8
- export let showRowsPerPage: boolean = false;
9
-
10
- const { pageRows, pluginStates, rows } = tableModel;
11
-
12
- const { hasNextPage, hasPreviousPage, pageIndex, pageCount, pageSize } = pluginStates.page;
13
- </script>
14
-
15
- <div class="flex items-center justify-end space-x-6 px-2 lg:space-x-8">
16
- {#if showRowsPerPage}
17
- <div class="flex items-center space-x-2">
18
- <p class="text-sm font-medium">Rows per page</p>
19
- <Select.Root
20
- onSelectedChange={(selected) => pageSize.set(Number(selected?.value))}
21
- selected={{ value: 10, label: "10" }}
22
- >
23
- <Select.Trigger class="h-8 w-[70px]">
24
- <Select.Value placeholder="Select page size" />
25
- </Select.Trigger>
26
- <Select.Content>
27
- <Select.Item value="10">10</Select.Item>
28
- <Select.Item value="20">20</Select.Item>
29
- <Select.Item value="30">30</Select.Item>
30
- <Select.Item value="40">40</Select.Item>
31
- <Select.Item value="50">50</Select.Item>
32
- </Select.Content>
33
- </Select.Root>
34
- </div>
35
- {/if}
36
- <div class="flex w-[100px] items-center justify-center text-sm font-medium">
37
- Page {$pageIndex + 1} of {$pageCount}
38
- </div>
39
- <div class="flex items-center space-x-2">
40
- <Button
41
- variant="outline"
42
- class="hidden h-8 w-8 p-0 lg:flex"
43
- on:click={() => ($pageIndex = 0)}
44
- disabled={!$hasPreviousPage}
45
- >
46
- <span class="sr-only">Go to first page</span>
47
- <ChevronsLeftIcon size={15} />
48
- </Button>
49
- <Button
50
- variant="outline"
51
- class="h-8 w-8 p-0"
52
- on:click={() => ($pageIndex = $pageIndex - 1)}
53
- disabled={!$hasPreviousPage}
54
- >
55
- <span class="sr-only">Go to previous page</span>
56
- <ChevronLeftIcon size={15} />
57
- </Button>
58
- <Button
59
- variant="outline"
60
- class="h-8 w-8 p-0"
61
- disabled={!$hasNextPage}
62
- on:click={() => ($pageIndex = $pageIndex + 1)}
63
- >
64
- <span class="sr-only">Go to next page</span>
65
- <ChevronRightIcon size={15} />
66
- </Button>
67
- <Button
68
- variant="outline"
69
- class="hidden h-8 w-8 p-0 lg:flex"
70
- disabled={!$hasNextPage}
71
- on:click={() => ($pageIndex = Math.ceil($rows.length / $pageRows.length) - 1)}
72
- >
73
- <span class="sr-only">Go to last page</span>
74
- <ChevronsRightIcon size={15} />
75
- </Button>
76
- </div>
77
- </div>
@@ -1,7 +0,0 @@
1
- export type Payment = {
2
- id: string;
3
- amount: number;
4
- status: "pending" | "processing" | "success" | "failed";
5
- email: string;
6
- };
7
- export declare const data: Array<Payment>;
@@ -1,410 +0,0 @@
1
- export const data = [
2
- {
3
- id: "6571688d9f0abce385f90f19",
4
- amount: 3251.85,
5
- status: "processing",
6
- email: "booneellis@hydrocom.com",
7
- },
8
- {
9
- id: "6571688d16c5c39d87365775",
10
- amount: 3990.8,
11
- status: "pending",
12
- email: "booneellis@hydrocom.com",
13
- },
14
- {
15
- id: "6571688dabee1f8960a07e79",
16
- amount: 3802.42,
17
- status: "success",
18
- email: "booneellis@hydrocom.com",
19
- },
20
- {
21
- id: "6571688d806e36ee570c326c",
22
- amount: 3823.47,
23
- status: "success",
24
- email: "booneellis@hydrocom.com",
25
- },
26
- {
27
- id: "6571688ddcf972ded016aeca",
28
- amount: 3355.74,
29
- status: "failed",
30
- email: "booneellis@hydrocom.com",
31
- },
32
- {
33
- id: "6571688da322842d9f5b675e",
34
- amount: 2530.82,
35
- status: "processing",
36
- email: "booneellis@hydrocom.com",
37
- },
38
- {
39
- id: "6571688d810ec3fcb8e66c50",
40
- amount: 1056.29,
41
- status: "failed",
42
- email: "booneellis@hydrocom.com",
43
- },
44
- {
45
- id: "6571688d84b2863f0550c31e",
46
- amount: 1319.59,
47
- status: "processing",
48
- email: "booneellis@hydrocom.com",
49
- },
50
- {
51
- id: "6571688de4d06ba36da0b2b1",
52
- amount: 2289.99,
53
- status: "failed",
54
- email: "booneellis@hydrocom.com",
55
- },
56
- {
57
- id: "6571688dd3d4930e83e980bb",
58
- amount: 1511.24,
59
- status: "pending",
60
- email: "booneellis@hydrocom.com",
61
- },
62
- {
63
- id: "6571688d9b2850305cbf9806",
64
- amount: 1819.05,
65
- status: "failed",
66
- email: "booneellis@hydrocom.com",
67
- },
68
- {
69
- id: "6571688d0e2c8d403d9415a0",
70
- amount: 1951.76,
71
- status: "processing",
72
- email: "booneellis@hydrocom.com",
73
- },
74
- {
75
- id: "6571688df69ff77326a893f5",
76
- amount: 2148.92,
77
- status: "failed",
78
- email: "booneellis@hydrocom.com",
79
- },
80
- {
81
- id: "6571688deccddaa29de2f440",
82
- amount: 2012.9,
83
- status: "pending",
84
- email: "booneellis@hydrocom.com",
85
- },
86
- {
87
- id: "6571688d448edf3bbdbc5c75",
88
- amount: 1943.19,
89
- status: "processing",
90
- email: "booneellis@hydrocom.com",
91
- },
92
- {
93
- id: "6571688d81dd591cf6938d1b",
94
- amount: 3879.18,
95
- status: "failed",
96
- email: "booneellis@hydrocom.com",
97
- },
98
- {
99
- id: "6571688d8f6e9c3423e785b7",
100
- amount: 2079.08,
101
- status: "failed",
102
- email: "booneellis@hydrocom.com",
103
- },
104
- {
105
- id: "6571688d84bfe2b4524cef0c",
106
- amount: 2327.12,
107
- status: "processing",
108
- email: "booneellis@hydrocom.com",
109
- },
110
- {
111
- id: "6571688d0c506227be2ed29e",
112
- amount: 3005.73,
113
- status: "success",
114
- email: "booneellis@hydrocom.com",
115
- },
116
- {
117
- id: "6571688d3558512f453741e5",
118
- amount: 3759.09,
119
- status: "processing",
120
- email: "booneellis@hydrocom.com",
121
- },
122
- {
123
- id: "6571688d861e5902ca9c81ce",
124
- amount: 1348.46,
125
- status: "pending",
126
- email: "booneellis@hydrocom.com",
127
- },
128
- {
129
- id: "6571688dd14ec6fb48d51555",
130
- amount: 2155.21,
131
- status: "failed",
132
- email: "booneellis@hydrocom.com",
133
- },
134
- {
135
- id: "6571688ddab7f441f3b3b707",
136
- amount: 2456.19,
137
- status: "processing",
138
- email: "booneellis@hydrocom.com",
139
- },
140
- {
141
- id: "6571688d5e9513b4e88c2d22",
142
- amount: 2923.2,
143
- status: "processing",
144
- email: "booneellis@hydrocom.com",
145
- },
146
- {
147
- id: "6571688d516b86893e68018c",
148
- amount: 3191.41,
149
- status: "failed",
150
- email: "booneellis@hydrocom.com",
151
- },
152
- {
153
- id: "6571688ddb067254dac9ab2b",
154
- amount: 3847.64,
155
- status: "processing",
156
- email: "booneellis@hydrocom.com",
157
- },
158
- {
159
- id: "6571688d39328a179413e29a",
160
- amount: 3104.91,
161
- status: "failed",
162
- email: "booneellis@hydrocom.com",
163
- },
164
- {
165
- id: "6571688d41c9c2a44423f21e",
166
- amount: 2295.64,
167
- status: "failed",
168
- email: "booneellis@hydrocom.com",
169
- },
170
- {
171
- id: "6571688dbe4e3344e7095a5f",
172
- amount: 1036.06,
173
- status: "success",
174
- email: "booneellis@hydrocom.com",
175
- },
176
- {
177
- id: "6571688df832d2beefc2d4b8",
178
- amount: 3391.3,
179
- status: "pending",
180
- email: "booneellis@hydrocom.com",
181
- },
182
- {
183
- id: "6571688d27d143c06cf7d538",
184
- amount: 3109.48,
185
- status: "success",
186
- email: "booneellis@hydrocom.com",
187
- },
188
- {
189
- id: "6571688df2823cc7272da879",
190
- amount: 3822.19,
191
- status: "failed",
192
- email: "booneellis@hydrocom.com",
193
- },
194
- {
195
- id: "6571688de4eb5e94cf60bcd2",
196
- amount: 2526.2,
197
- status: "success",
198
- email: "booneellis@hydrocom.com",
199
- },
200
- {
201
- id: "6571688df199424fd086ff48",
202
- amount: 3775.85,
203
- status: "failed",
204
- email: "booneellis@hydrocom.com",
205
- },
206
- {
207
- id: "6571688d70ecf0e6272da909",
208
- amount: 3522.49,
209
- status: "failed",
210
- email: "booneellis@hydrocom.com",
211
- },
212
- {
213
- id: "6571688d6d31ec3cb133046b",
214
- amount: 1738.86,
215
- status: "pending",
216
- email: "booneellis@hydrocom.com",
217
- },
218
- {
219
- id: "6571688d0e957b5f897ed8ce",
220
- amount: 3362.06,
221
- status: "processing",
222
- email: "booneellis@hydrocom.com",
223
- },
224
- {
225
- id: "6571688d06d065921d92c32e",
226
- amount: 1311.72,
227
- status: "success",
228
- email: "booneellis@hydrocom.com",
229
- },
230
- {
231
- id: "6571688d45b2c5e27d04cf40",
232
- amount: 3831.03,
233
- status: "pending",
234
- email: "booneellis@hydrocom.com",
235
- },
236
- {
237
- id: "6571688d2cbf8c51474eb602",
238
- amount: 1850.78,
239
- status: "success",
240
- email: "booneellis@hydrocom.com",
241
- },
242
- {
243
- id: "6571688d16290d3f20d4daee",
244
- amount: 1732.43,
245
- status: "pending",
246
- email: "booneellis@hydrocom.com",
247
- },
248
- {
249
- id: "6571688dcda116e6798d4bae",
250
- amount: 3852.99,
251
- status: "failed",
252
- email: "booneellis@hydrocom.com",
253
- },
254
- {
255
- id: "6571688d5996339d8c18205b",
256
- amount: 2717.96,
257
- status: "success",
258
- email: "booneellis@hydrocom.com",
259
- },
260
- {
261
- id: "6571688d7a3f16b9aec84fa6",
262
- amount: 2731.06,
263
- status: "pending",
264
- email: "booneellis@hydrocom.com",
265
- },
266
- {
267
- id: "6571688d97b853eb9d7736ac",
268
- amount: 1856.39,
269
- status: "failed",
270
- email: "booneellis@hydrocom.com",
271
- },
272
- {
273
- id: "6571688d1d714ee82c096662",
274
- amount: 2853.75,
275
- status: "success",
276
- email: "booneellis@hydrocom.com",
277
- },
278
- {
279
- id: "6571688dfe47c72110657d3b",
280
- amount: 2532.9,
281
- status: "success",
282
- email: "booneellis@hydrocom.com",
283
- },
284
- {
285
- id: "6571688d3e4ce96490c3bad6",
286
- amount: 2962.35,
287
- status: "failed",
288
- email: "booneellis@hydrocom.com",
289
- },
290
- {
291
- id: "6571688d77af0b83c0d3f7c6",
292
- amount: 3024.45,
293
- status: "success",
294
- email: "booneellis@hydrocom.com",
295
- },
296
- {
297
- id: "6571688d3e1920bb93ac12a2",
298
- amount: 2292.58,
299
- status: "pending",
300
- email: "booneellis@hydrocom.com",
301
- },
302
- {
303
- id: "6571688d2183f305b6cbed72",
304
- amount: 1820.61,
305
- status: "failed",
306
- email: "booneellis@hydrocom.com",
307
- },
308
- {
309
- id: "6571688da48439ee80d276cd",
310
- amount: 2544.19,
311
- status: "success",
312
- email: "booneellis@hydrocom.com",
313
- },
314
- {
315
- id: "6571688d15c1368942e23e3a",
316
- amount: 2054.55,
317
- status: "processing",
318
- email: "booneellis@hydrocom.com",
319
- },
320
- {
321
- id: "6571688d0170dc46f4fcbfe6",
322
- amount: 3567.82,
323
- status: "processing",
324
- email: "booneellis@hydrocom.com",
325
- },
326
- {
327
- id: "6571688d3c68bef4bca4c670",
328
- amount: 2842.55,
329
- status: "processing",
330
- email: "booneellis@hydrocom.com",
331
- },
332
- {
333
- id: "6571688d09de886493b05ee0",
334
- amount: 3123.12,
335
- status: "success",
336
- email: "booneellis@hydrocom.com",
337
- },
338
- {
339
- id: "6571688d2c572aaa292b6c3f",
340
- amount: 1849.11,
341
- status: "success",
342
- email: "booneellis@hydrocom.com",
343
- },
344
- {
345
- id: "6571688d6e4d00a58e20c090",
346
- amount: 1010.01,
347
- status: "pending",
348
- email: "booneellis@hydrocom.com",
349
- },
350
- {
351
- id: "6571688df71c1c1f9b472f68",
352
- amount: 2064.62,
353
- status: "pending",
354
- email: "booneellis@hydrocom.com",
355
- },
356
- {
357
- id: "6571688de159964144606d23",
358
- amount: 1073.91,
359
- status: "success",
360
- email: "booneellis@hydrocom.com",
361
- },
362
- {
363
- id: "6571688d6fe0fa01f2d75bdf",
364
- amount: 2239.24,
365
- status: "processing",
366
- email: "booneellis@hydrocom.com",
367
- },
368
- {
369
- id: "6571688de6d27c9852528f3f",
370
- amount: 2447.85,
371
- status: "success",
372
- email: "booneellis@hydrocom.com",
373
- },
374
- {
375
- id: "6571688d40ae4820a039d25e",
376
- amount: 2019.19,
377
- status: "failed",
378
- email: "booneellis@hydrocom.com",
379
- },
380
- {
381
- id: "6571688d5da2eb24dc22673f",
382
- amount: 1115.44,
383
- status: "processing",
384
- email: "booneellis@hydrocom.com",
385
- },
386
- {
387
- id: "6571688d39c99eb24989b518",
388
- amount: 3345.75,
389
- status: "failed",
390
- email: "booneellis@hydrocom.com",
391
- },
392
- {
393
- id: "6571688d6884c37efcca0e29",
394
- amount: 2341.32,
395
- status: "processing",
396
- email: "booneellis@hydrocom.com",
397
- },
398
- {
399
- id: "6571688d1ed1c61ba1d4fc93",
400
- amount: 2288.04,
401
- status: "pending",
402
- email: "booneellis@hydrocom.com",
403
- },
404
- {
405
- id: "6571688d19b99bb0bcff11bd",
406
- amount: 1493.28,
407
- status: "pending",
408
- email: "booneellis@hydrocom.com",
409
- },
410
- ];