@instantdb/components 0.22.111 → 0.22.112-experimental.client-file-deletes.21303763436.1
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.112-experimental.client-file-deletes.21303763436.1",
|
|
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/
|
|
97
|
-
"@instantdb/
|
|
98
|
-
"@instantdb/
|
|
99
|
-
"@instantdb/platform": "0.22.
|
|
100
|
-
"@instantdb/
|
|
96
|
+
"@instantdb/core": "0.22.112-experimental.client-file-deletes.21303763436.1",
|
|
97
|
+
"@instantdb/version": "0.22.112-experimental.client-file-deletes.21303763436.1",
|
|
98
|
+
"@instantdb/react": "0.22.112-experimental.client-file-deletes.21303763436.1",
|
|
99
|
+
"@instantdb/platform": "0.22.112-experimental.client-file-deletes.21303763436.1",
|
|
100
|
+
"@instantdb/admin": "0.22.112-experimental.client-file-deletes.21303763436.1"
|
|
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
|
-
|
|
871
|
-
|
|
872
|
-
.
|
|
873
|
-
|
|
874
|
-
|
|
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
|
-
}
|