Skip to content

Commit

Permalink
feat: use svelte-render
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanmylee committed Sep 28, 2022
1 parent 4e8adb7 commit 71f7b68
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 74 deletions.
29 changes: 23 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -71,6 +71,7 @@
},
"dependencies": {
"svelte-keyed": "^1.1.5",
"svelte-render": "^1.5.0",
"svelte-subscribe": "^1.0.4"
},
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bodyCells.ts
Expand Up @@ -4,7 +4,7 @@ import type { DataColumn, DisplayColumn, FlatColumn } from './columns';
import { TableComponent } from './tableComponent';
import type { DataLabel, DisplayLabel } from './types/Label';
import type { AnyPlugins } from './types/TablePlugin';
import type { RenderConfig } from './render';
import type { RenderConfig } from 'svelte-render';

export type BodyCellInit<Item, Plugins extends AnyPlugins = AnyPlugins> = {
id: string;
Expand Down
24 changes: 0 additions & 24 deletions src/lib/components/Render.svelte

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib/headerCells.ts
Expand Up @@ -3,7 +3,7 @@ import { NBSP } from './constants';
import { TableComponent } from './tableComponent';
import type { HeaderLabel } from './types/Label';
import type { AnyPlugins } from './types/TablePlugin';
import type { RenderConfig } from './render';
import type { RenderConfig } from 'svelte-render';

export type HeaderCellInit<Item, Plugins extends AnyPlugins = AnyPlugins> = {
id: string;
Expand Down
3 changes: 1 addition & 2 deletions src/lib/index.ts
@@ -1,9 +1,8 @@
// components
export { default as Render } from '$lib/components/Render.svelte';
export * from 'svelte-render';
export { Subscribe } from 'svelte-subscribe';
// table core
export { createTable } from '$lib/createTable';
export { createRender, type RenderConfig } from '$lib/render';
// models
export { Table } from '$lib/createTable';
export { HeaderRow } from '$lib/headerRows';
Expand Down
2 changes: 1 addition & 1 deletion src/lib/plugins/addColumnFilters.ts
@@ -1,8 +1,8 @@
import { keyed } from 'svelte-keyed';
import type { RenderConfig } from 'svelte-render';
import type { BodyRow } from '$lib/bodyRows';
import type { TablePlugin, NewTablePropSet, DeriveRowsFn } from '$lib/types/TablePlugin';
import { derived, writable, type Readable, type Writable } from 'svelte/store';
import type { RenderConfig } from '$lib/render';
import type { PluginInitTableState } from '$lib/createViewModel';
import type { DataBodyCell } from '$lib/bodyCells';

Expand Down
38 changes: 0 additions & 38 deletions src/lib/render.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib/types/Label.ts
@@ -1,7 +1,7 @@
import type { RenderConfig } from 'svelte-render';
import type { DataBodyCell, DisplayBodyCell } from '$lib/bodyCells';
import type { TableState } from '$lib/createViewModel';
import type { HeaderCell } from '$lib/headerCells';
import type { RenderConfig } from '$lib/render';
import type { AnyPlugins } from './TablePlugin';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down

0 comments on commit 71f7b68

Please sign in to comment.