Skip to content

Commit

Permalink
Merge pull request #59 from bryanmylee/feat/render-events
Browse files Browse the repository at this point in the history
Migrate `Render` to `svelte-render`
  • Loading branch information
bryanmylee committed Sep 28, 2022
2 parents 4e8adb7 + 08dc9bb commit 2b1544b
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 77 deletions.
33 changes: 25 additions & 8 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "svelte-headless-table",
"description": "Unopinionated and extensible data tables for Svelte",
"version": "0.14.4",
"version": "0.15.0",
"scripts": {
"dev": "vite dev",
"build": "vite build",
Expand Down 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

1 comment on commit 2b1544b

@vercel
Copy link

@vercel vercel bot commented on 2b1544b Sep 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.