@instantdb/components 0.22.111 → 0.22.112

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.111",
4
+ "version": "0.22.112",
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.111",
97
- "@instantdb/react": "0.22.111",
98
- "@instantdb/core": "0.22.111",
99
- "@instantdb/platform": "0.22.111",
100
- "@instantdb/version": "0.22.111"
96
+ "@instantdb/core": "0.22.112",
97
+ "@instantdb/platform": "0.22.112",
98
+ "@instantdb/version": "0.22.112",
99
+ "@instantdb/admin": "0.22.112",
100
+ "@instantdb/react": "0.22.112"
101
101
  },
102
102
  "scripts": {
103
103
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -867,23 +867,11 @@ export const InnerExplorer: React.FC<{
867
867
  }
868
868
  onClick={async () => {
869
869
  try {
870
- if (selectedNamespace.name === '$files') {
871
- const filenames = allItems
872
- .filter((i) => i.id in checkedIds)
873
- .map((i) => i.path as string);
874
- await bulkDeleteFiles(
875
- explorerProps.adminToken,
876
- explorerProps.appId,
877
- filenames,
878
- explorerProps.apiURI,
879
- );
880
- } else {
881
- await db.transact(
882
- Object.keys(checkedIds).map((id) =>
883
- tx[selectedNamespace.name][id].delete(),
884
- ),
885
- );
886
- }
870
+ await db.transact(
871
+ Object.keys(checkedIds).map((id) =>
872
+ tx[selectedNamespace.name][id].delete(),
873
+ ),
874
+ );
887
875
  } catch (error: any) {
888
876
  const errorMessage = error.message;
889
877
  errorToast(
@@ -1483,24 +1471,3 @@ async function upload(
1483
1471
 
1484
1472
  return data;
1485
1473
  }
1486
-
1487
- async function bulkDeleteFiles(
1488
- token: string,
1489
- appId: string,
1490
- filenames: string[],
1491
- apiUri: string,
1492
- ): Promise<any> {
1493
- const { data } = await jsonFetch(
1494
- `${apiUri}/dash/apps/${appId}/storage/files/delete`,
1495
- {
1496
- method: 'POST',
1497
- headers: {
1498
- 'content-type': 'application/json',
1499
- authorization: `Bearer ${token}`,
1500
- },
1501
- body: JSON.stringify({ filenames }),
1502
- },
1503
- );
1504
-
1505
- return data;
1506
- }