@instantdb/components 0.22.96 → 0.22.97
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instantdb/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.22.
|
|
4
|
+
"version": "0.22.97",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Instant's UI components",
|
|
7
7
|
"homepage": "https://github.com/instantdb/instant/tree/main/client/packages/components",
|
|
@@ -93,11 +93,11 @@
|
|
|
93
93
|
"swr": "^2.2.4",
|
|
94
94
|
"tailwind-merge": "^2.2.1",
|
|
95
95
|
"uuid": "^11.1.0",
|
|
96
|
-
"@instantdb/admin": "0.22.
|
|
97
|
-
"@instantdb/
|
|
98
|
-
"@instantdb/
|
|
99
|
-
"@instantdb/
|
|
100
|
-
"@instantdb/
|
|
96
|
+
"@instantdb/admin": "0.22.97",
|
|
97
|
+
"@instantdb/react": "0.22.97",
|
|
98
|
+
"@instantdb/version": "0.22.97",
|
|
99
|
+
"@instantdb/platform": "0.22.97",
|
|
100
|
+
"@instantdb/core": "0.22.97"
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|
|
103
103
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -1352,73 +1352,77 @@ export const InnerExplorer: React.FC<{
|
|
|
1352
1352
|
}}
|
|
1353
1353
|
/>
|
|
1354
1354
|
<div ref={tableRef} className="h-full w-full overflow-auto">
|
|
1355
|
-
<div
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
<
|
|
1365
|
-
items={columnOrder}
|
|
1366
|
-
strategy={horizontalListSortingStrategy}
|
|
1367
|
-
>
|
|
1368
|
-
{headerGroup.headers.map((header, i) => (
|
|
1369
|
-
<TableHeader
|
|
1370
|
-
key={header.id}
|
|
1371
|
-
header={header}
|
|
1372
|
-
table={table}
|
|
1373
|
-
headerGroup={headerGroup}
|
|
1374
|
-
index={i}
|
|
1375
|
-
setMinViableColWidth={setMinViableColWidth}
|
|
1376
|
-
onSort={(attrName, currentAttr, currentAsc) => {
|
|
1377
|
-
history.push((prev) => ({
|
|
1378
|
-
...prev,
|
|
1379
|
-
sortAttr: attrName,
|
|
1380
|
-
sortAsc:
|
|
1381
|
-
currentAttr !== attrName ? true : !currentAsc,
|
|
1382
|
-
}));
|
|
1383
|
-
}}
|
|
1384
|
-
currentSortAttr={currentNav?.sortAttr}
|
|
1385
|
-
currentSortAsc={currentNav?.sortAsc}
|
|
1386
|
-
/>
|
|
1387
|
-
))}
|
|
1388
|
-
</SortableContext>
|
|
1389
|
-
</div>
|
|
1390
|
-
))}
|
|
1391
|
-
</div>
|
|
1392
|
-
<div>
|
|
1393
|
-
{table.getRowModel().rows.map((row) => (
|
|
1394
|
-
<div
|
|
1395
|
-
className="group flex border-r border-b border-r-gray-200 border-b-gray-200 bg-white dark:border-neutral-700 dark:border-r-neutral-700 dark:bg-neutral-800"
|
|
1396
|
-
key={row.id}
|
|
1397
|
-
>
|
|
1398
|
-
{row.getVisibleCells().map((cell) => (
|
|
1355
|
+
<div className="flex w-max items-start">
|
|
1356
|
+
<div
|
|
1357
|
+
style={{
|
|
1358
|
+
width: table.getCenterTotalSize(),
|
|
1359
|
+
}}
|
|
1360
|
+
className="z-0 text-left font-mono text-xs text-neutral-500 dark:text-neutral-400"
|
|
1361
|
+
>
|
|
1362
|
+
<div className="sticky top-0 z-10 border-r border-b border-gray-200 border-r-gray-200 bg-white text-neutral-700 shadow-sm dark:border-r-neutral-700 dark:border-b-neutral-600 dark:bg-[#303030] dark:text-neutral-300">
|
|
1363
|
+
{table.getHeaderGroups().map((headerGroup) => (
|
|
1364
|
+
<div className={'flex w-full'} key={headerGroup.id}>
|
|
1399
1365
|
<SortableContext
|
|
1400
|
-
key={cell.id}
|
|
1401
1366
|
items={columnOrder}
|
|
1402
1367
|
strategy={horizontalListSortingStrategy}
|
|
1403
1368
|
>
|
|
1404
|
-
|
|
1369
|
+
{headerGroup.headers.map((header, i) => (
|
|
1370
|
+
<TableHeader
|
|
1371
|
+
key={header.id}
|
|
1372
|
+
header={header}
|
|
1373
|
+
table={table}
|
|
1374
|
+
headerGroup={headerGroup}
|
|
1375
|
+
index={i}
|
|
1376
|
+
setMinViableColWidth={setMinViableColWidth}
|
|
1377
|
+
onSort={(attrName, currentAttr, currentAsc) => {
|
|
1378
|
+
history.push((prev) => ({
|
|
1379
|
+
...prev,
|
|
1380
|
+
sortAttr: attrName,
|
|
1381
|
+
sortAsc:
|
|
1382
|
+
currentAttr !== attrName
|
|
1383
|
+
? true
|
|
1384
|
+
: !currentAsc,
|
|
1385
|
+
}));
|
|
1386
|
+
}}
|
|
1387
|
+
currentSortAttr={currentNav?.sortAttr}
|
|
1388
|
+
currentSortAsc={currentNav?.sortAsc}
|
|
1389
|
+
/>
|
|
1390
|
+
))}
|
|
1405
1391
|
</SortableContext>
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1392
|
+
</div>
|
|
1393
|
+
))}
|
|
1394
|
+
</div>
|
|
1395
|
+
<div>
|
|
1396
|
+
{table.getRowModel().rows.map((row) => (
|
|
1397
|
+
<div
|
|
1398
|
+
className="group flex border-r border-b border-r-gray-200 border-b-gray-200 bg-white dark:border-neutral-700 dark:border-r-neutral-700 dark:bg-neutral-800"
|
|
1399
|
+
key={row.id}
|
|
1400
|
+
>
|
|
1401
|
+
{row.getVisibleCells().map((cell) => (
|
|
1402
|
+
<SortableContext
|
|
1403
|
+
key={cell.id}
|
|
1404
|
+
items={columnOrder}
|
|
1405
|
+
strategy={horizontalListSortingStrategy}
|
|
1406
|
+
>
|
|
1407
|
+
<TableCell key={cell.id} cell={cell} />
|
|
1408
|
+
</SortableContext>
|
|
1409
|
+
))}
|
|
1410
|
+
</div>
|
|
1411
|
+
))}
|
|
1412
|
+
</div>
|
|
1409
1413
|
</div>
|
|
1414
|
+
{tableSmallerThanViewport && (
|
|
1415
|
+
<div className="sticky top-0">
|
|
1416
|
+
<IconButton
|
|
1417
|
+
className="opacity-60"
|
|
1418
|
+
labelDirection="bottom"
|
|
1419
|
+
label="Fill Width"
|
|
1420
|
+
icon={<ArrowRightFromLine />}
|
|
1421
|
+
onClick={distributeRemainingWidth}
|
|
1422
|
+
/>
|
|
1423
|
+
</div>
|
|
1424
|
+
)}
|
|
1410
1425
|
</div>
|
|
1411
|
-
{tableSmallerThanViewport && (
|
|
1412
|
-
<div className="sticky top-0 inline-block align-top">
|
|
1413
|
-
<IconButton
|
|
1414
|
-
className="opacity-60"
|
|
1415
|
-
labelDirection="bottom"
|
|
1416
|
-
label="Fill Width"
|
|
1417
|
-
icon={<ArrowRightFromLine />}
|
|
1418
|
-
onClick={distributeRemainingWidth}
|
|
1419
|
-
/>
|
|
1420
|
-
</div>
|
|
1421
|
-
)}
|
|
1422
1426
|
</div>
|
|
1423
1427
|
</div>
|
|
1424
1428
|
</DndContext>
|