@pathscale/ui 0.0.101 → 0.0.103

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,10 +1,10 @@
1
- import { type EnhancedTableProps } from "../table/EnhancedTable";
1
+ import type { TableProps } from "../table";
2
2
  import type { StreamingColumnDef, StreamingConfig } from "./types";
3
3
  export type StreamingTableProps<TData> = {
4
4
  data: TData[];
5
5
  columns: StreamingColumnDef<TData>[];
6
6
  getRowId?: (row: TData) => string;
7
7
  streamingConfig?: StreamingConfig;
8
- } & Omit<EnhancedTableProps<TData>, "data" | "columns">;
8
+ } & Omit<TableProps, "children">;
9
9
  declare const StreamingTable: <TData>(props: StreamingTableProps<TData>) => import("solid-js").JSX.Element;
10
10
  export default StreamingTable;
package/dist/index.js CHANGED
@@ -11998,8 +11998,9 @@ function createStreamingTableStore() {
11998
11998
  truncateToSize
11999
11999
  };
12000
12000
  }
12001
+ var StreamingTable_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<tbody>");
12001
12002
  const StreamingTable_StreamingTable = (props)=>{
12002
- const [local, enhancedProps] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
12003
+ const [local, tableProps] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
12003
12004
  "data",
12004
12005
  "columns",
12005
12006
  "getRowId",
@@ -12034,27 +12035,53 @@ const StreamingTable_StreamingTable = (props)=>{
12034
12035
  });
12035
12036
  }
12036
12037
  });
12037
- const tableData = ()=>store.rows().map((rowStore)=>rowStore.data());
12038
- const enhancedColumns = ()=>local.columns.map((col)=>{
12039
- const colDef = {
12040
- header: col.header,
12041
- meta: col.meta,
12042
- enableColumnFilter: col.enableColumnFilter,
12043
- enableSorting: col.enableSorting
12044
- };
12045
- if (col.accessorKey) colDef.accessorKey = col.accessorKey;
12046
- if (col.accessorFn) colDef.accessorFn = col.accessorFn;
12047
- if (col.cell) colDef.cell = col.cell;
12048
- return colDef;
12049
- });
12050
- return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(EnhancedTable, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
12051
- get data () {
12052
- return tableData();
12053
- },
12054
- get columns () {
12055
- return enhancedColumns();
12038
+ return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(tableProps, {
12039
+ get children () {
12040
+ return [
12041
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Head, {
12042
+ get children () {
12043
+ return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.For, {
12044
+ get each () {
12045
+ return local.columns;
12046
+ },
12047
+ children: (col)=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.HeadCell, {
12048
+ get children () {
12049
+ return col.header;
12050
+ }
12051
+ })
12052
+ });
12053
+ }
12054
+ }),
12055
+ (()=>{
12056
+ var _el$ = StreamingTable_tmpl$();
12057
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.For, {
12058
+ get each () {
12059
+ return store.rows();
12060
+ },
12061
+ children: (rowStore)=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Row, {
12062
+ get children () {
12063
+ return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.For, {
12064
+ get each () {
12065
+ return local.columns;
12066
+ },
12067
+ children: (col)=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Cell, {
12068
+ get children () {
12069
+ return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!col.cell)() ? col.cell({
12070
+ row: {
12071
+ original: rowStore.data()
12072
+ }
12073
+ }) : (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!col.accessorKey)() ? rowStore.data()[col.accessorKey] : (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!col.accessorFn)() ? col.accessorFn(rowStore.data()) : "";
12074
+ }
12075
+ })
12076
+ });
12077
+ }
12078
+ })
12079
+ }));
12080
+ return _el$;
12081
+ })()
12082
+ ];
12056
12083
  }
12057
- }, enhancedProps));
12084
+ }));
12058
12085
  };
12059
12086
  const StreamingTable = StreamingTable_StreamingTable;
12060
12087
  var Tab_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<a role=tab>");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "0.0.101",
3
+ "version": "0.0.103",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",