@ethersphere/bee-dashboard 0.34.0 → 0.35.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/build/assets/__vite-browser-external-BmZ7Lxtg.js +2 -0
- package/build/assets/{download.browser-C9Uz7OzH.js → download.browser-BISIRUf5.js} +1 -1
- package/build/assets/{download.node-tVxxcrzZ.js → download.node-C7FKEca1.js} +1 -1
- package/build/assets/fs.node-DO9PavmO.js +2 -0
- package/build/assets/index-BmV9k6jK.js +116 -0
- package/build/assets/index-DMp5phAM.css +1 -0
- package/build/assets/vendor-ethers-BjcsqZe1.js +25 -0
- package/build/assets/{vendor-react-mui-CMfvLA_U.js → vendor-react-mui-Dv6xxk4a.js} +1 -1
- package/build/index.html +4 -4
- package/lib/{App-DJxgFkgf.js → App-BsgbFuqW.js} +663 -456
- package/lib/{App-CyZvPEkk.mjs → App-CtEEza9I.mjs} +663 -456
- package/lib/App.cjs.js +1 -1
- package/lib/App.css +51 -51
- package/lib/App.js +1 -1
- package/lib/components/StampExtensionModal.d.ts +10 -4
- package/lib/constants.d.ts +2 -0
- package/lib/{download.browser-Bp7NWws0.js → download.browser-BhXh2eCY.js} +1 -1
- package/lib/{download.browser-Cta85Yx2.mjs → download.browser-JHhkjxaR.mjs} +1 -1
- package/lib/{download.node-B-ryR03L.mjs → download.node-Bf2R_PzI.mjs} +1 -1
- package/lib/{download.node-C_IiKmHA.js → download.node-CzhxALxQ.js} +1 -1
- package/lib/{fs.node-l47yAJ14.mjs → fs.node-CR5kFsrm.mjs} +1 -1
- package/lib/{fs.node-DOrfMQwF.js → fs.node-DrM1ewLt.js} +1 -1
- package/lib/modules/filemanager/components/ConfirmModal/ConfirmModal.d.ts +1 -1
- package/lib/modules/filemanager/components/ExpiringNotificationModal/ExpiringNotificationModal.d.ts +4 -2
- package/lib/pages/files/AssetPreview.d.ts +1 -0
- package/lib/{upload.node-D_XLym_5.mjs → upload.node-BUOo237h.mjs} +3 -3
- package/lib/{upload.node-DUSvlJwc.js → upload.node-DRiLZjhW.js} +3 -3
- package/lib/utils/chain.d.ts +6 -0
- package/lib/utils/file.d.ts +11 -0
- package/lib/utils/index.d.ts +0 -7
- package/lib/utils/stamp.d.ts +8 -0
- package/package.json +1 -1
- package/build/assets/fs.node-B2ZMKqzu.js +0 -2
- package/build/assets/index-BTuZ_M-A.js +0 -116
- package/build/assets/index-CPiKID9h.css +0 -1
- package/build/assets/upload.node-W5QYw_5j.js +0 -2
- package/build/assets/vendor-ethers-DTkFbbYN.js +0 -16
- package/lib/modules/filemanager/utils/view.d.ts +0 -11
package/lib/App.cjs.js
CHANGED
package/lib/App.css
CHANGED
|
@@ -1,54 +1,4 @@
|
|
|
1
|
-
@charset "UTF-8";.fm-
|
|
2
|
-
position: relative;
|
|
3
|
-
border-left: 1px solid rgb(146, 146, 146);
|
|
4
|
-
min-height: 100vh;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.fm-main-content {
|
|
9
|
-
display: flex;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.fm-main-content-file-browser {
|
|
13
|
-
width: 100%;
|
|
14
|
-
background-color: rgb(255, 255, 255) !important;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.fm-loading {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
align-items: center;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
height: 100vh;
|
|
23
|
-
gap: 12px;
|
|
24
|
-
background: rgb(255, 255, 255);
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.fm-spinner {
|
|
29
|
-
width: 32px;
|
|
30
|
-
height: 32px;
|
|
31
|
-
border-radius: 9999px;
|
|
32
|
-
border: 3px solid rgb(229, 231, 235);
|
|
33
|
-
border-top-color: rgb(255, 140, 0);
|
|
34
|
-
animation: fm-spin 0.8s linear infinite;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@keyframes fm-spin {
|
|
38
|
-
to {
|
|
39
|
-
transform: rotate(360deg);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
.fm-loading-title {
|
|
43
|
-
font-size: 16px;
|
|
44
|
-
font-weight: 600;
|
|
45
|
-
color: rgb(17, 24, 39);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.fm-loading-subtitle {
|
|
49
|
-
font-size: 13px;
|
|
50
|
-
color: rgb(107, 114, 128);
|
|
51
|
-
}.fm-button {
|
|
1
|
+
@charset "UTF-8";.fm-button {
|
|
52
2
|
border-radius: 0px;
|
|
53
3
|
text-align: center;
|
|
54
4
|
font-size: 14px;
|
|
@@ -2733,6 +2683,56 @@
|
|
|
2733
2683
|
to {
|
|
2734
2684
|
transform: rotate(360deg);
|
|
2735
2685
|
}
|
|
2686
|
+
}.fm-main {
|
|
2687
|
+
position: relative;
|
|
2688
|
+
border-left: 1px solid rgb(146, 146, 146);
|
|
2689
|
+
min-height: 100vh;
|
|
2690
|
+
overflow: hidden;
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
.fm-main-content {
|
|
2694
|
+
display: flex;
|
|
2695
|
+
}
|
|
2696
|
+
|
|
2697
|
+
.fm-main-content-file-browser {
|
|
2698
|
+
width: 100%;
|
|
2699
|
+
background-color: rgb(255, 255, 255) !important;
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
.fm-loading {
|
|
2703
|
+
display: flex;
|
|
2704
|
+
flex-direction: column;
|
|
2705
|
+
align-items: center;
|
|
2706
|
+
justify-content: center;
|
|
2707
|
+
height: 100vh;
|
|
2708
|
+
gap: 12px;
|
|
2709
|
+
background: rgb(255, 255, 255);
|
|
2710
|
+
overflow: hidden;
|
|
2711
|
+
}
|
|
2712
|
+
|
|
2713
|
+
.fm-spinner {
|
|
2714
|
+
width: 32px;
|
|
2715
|
+
height: 32px;
|
|
2716
|
+
border-radius: 9999px;
|
|
2717
|
+
border: 3px solid rgb(229, 231, 235);
|
|
2718
|
+
border-top-color: rgb(255, 140, 0);
|
|
2719
|
+
animation: fm-spin 0.8s linear infinite;
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2722
|
+
@keyframes fm-spin {
|
|
2723
|
+
to {
|
|
2724
|
+
transform: rotate(360deg);
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
.fm-loading-title {
|
|
2728
|
+
font-size: 16px;
|
|
2729
|
+
font-weight: 600;
|
|
2730
|
+
color: rgb(17, 24, 39);
|
|
2731
|
+
}
|
|
2732
|
+
|
|
2733
|
+
.fm-loading-subtitle {
|
|
2734
|
+
font-size: 13px;
|
|
2735
|
+
color: rgb(107, 114, 128);
|
|
2736
2736
|
}@font-face {
|
|
2737
2737
|
font-family: 'iAWriterQuattroV';
|
|
2738
2738
|
font-style: normal;
|
package/lib/App.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bee, PostageBatch } from '@ethersphere/bee-js';
|
|
2
2
|
import { ReactElement, ReactNode } from 'react';
|
|
3
|
+
import { CheckState } from '../providers/Bee';
|
|
4
|
+
export declare enum StampExtensionType {
|
|
5
|
+
Topup = "Topup",
|
|
6
|
+
Dilute = "Dilute"
|
|
7
|
+
}
|
|
3
8
|
interface Props {
|
|
4
|
-
type:
|
|
9
|
+
type: StampExtensionType;
|
|
5
10
|
icon: ReactNode;
|
|
6
11
|
bee: Bee;
|
|
7
|
-
stamp:
|
|
12
|
+
stamp: PostageBatch;
|
|
13
|
+
status: CheckState;
|
|
8
14
|
}
|
|
9
|
-
export default function StampExtensionModal({ type, icon, bee, stamp }: Props): ReactElement;
|
|
15
|
+
export default function StampExtensionModal({ type, icon, bee, stamp, status }: Props): ReactElement;
|
|
10
16
|
export {};
|
package/lib/constants.d.ts
CHANGED
|
@@ -14,3 +14,5 @@ export declare const BEE_DESKTOP_LATEST_RELEASE_PAGE = "https://github.com/ether
|
|
|
14
14
|
export declare const BEE_DESKTOP_LATEST_RELEASE_PAGE_API = "https://api.github.com/repos/ethersphere/bee-desktop/releases/latest";
|
|
15
15
|
export declare const DEFAULT_BEE_API_HOST = "http://localhost:1633";
|
|
16
16
|
export declare const DEFAULT_RPC_URL = "https://xdai.fairdatasociety.org";
|
|
17
|
+
export declare const MIN_STAMP_DEPTH = 17;
|
|
18
|
+
export declare const MAX_STAMP_DEPTH = 255;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const App = require("./App-
|
|
3
|
+
const App = require("./App-BsgbFuqW.js");
|
|
4
4
|
async function downloadReadableFetch(resource, apiUrl, endpoint, options, requestOptions) {
|
|
5
5
|
if (options) {
|
|
6
6
|
options = prepareDownloadOptions(options);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Types, R as Reference, P as PublicKey } from "./App-
|
|
1
|
+
import { T as Types, R as Reference, P as PublicKey } from "./App-CtEEza9I.mjs";
|
|
2
2
|
async function downloadReadableFetch(resource, apiUrl, endpoint, options, requestOptions) {
|
|
3
3
|
if (options) {
|
|
4
4
|
options = prepareDownloadOptions(options);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const App = require("./App-
|
|
3
|
+
const App = require("./App-BsgbFuqW.js");
|
|
4
4
|
async function downloadNode(bee, resources, options, requestOptions) {
|
|
5
5
|
const dataPromises = [];
|
|
6
6
|
for (const resource of resources) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const App = require("./App-
|
|
3
|
+
const App = require("./App-BsgbFuqW.js");
|
|
4
4
|
const contentTypes = /* @__PURE__ */ new Map([
|
|
5
5
|
[".mp4", "video/mp4"],
|
|
6
6
|
[".webm", "video/webm"],
|
package/lib/modules/filemanager/components/ExpiringNotificationModal/ExpiringNotificationModal.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { PostageBatch } from '@ethersphere/bee-js';
|
|
1
|
+
import { Bee, PostageBatch } from '@ethersphere/bee-js';
|
|
2
2
|
import { DriveInfo, FileInfo } from '@solarpunkltd/file-manager-lib';
|
|
3
3
|
import { ReactElement } from 'react';
|
|
4
4
|
interface ExpiringNotificationModalProps {
|
|
5
|
+
bee: Bee;
|
|
5
6
|
stamps: PostageBatch[];
|
|
6
7
|
drives: DriveInfo[];
|
|
7
8
|
files: FileInfo[];
|
|
8
9
|
onCancelClick: () => void;
|
|
9
10
|
setErrorMessage?: (error: string) => void;
|
|
11
|
+
setShowError: (show: boolean) => void;
|
|
10
12
|
}
|
|
11
|
-
export declare function ExpiringNotificationModal({ stamps, drives, files, onCancelClick, setErrorMessage, }: ExpiringNotificationModalProps): ReactElement;
|
|
13
|
+
export declare function ExpiringNotificationModal({ bee, stamps, drives, files, onCancelClick, setErrorMessage, setShowError, }: ExpiringNotificationModalProps): ReactElement;
|
|
12
14
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BatchId, F as FileError } from "./App-
|
|
1
|
+
import { B as BatchId, F as FileError } from "./App-CtEEza9I.mjs";
|
|
2
2
|
async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptions) {
|
|
3
3
|
const uploadFilesRes = await uploadFileOrDirectory(bee, new BatchId(batchId), nodeOptions.path, { ...uploadOptions, act: false }, requestOptions);
|
|
4
4
|
let uploadPreviewRes;
|
|
@@ -12,7 +12,7 @@ async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptio
|
|
|
12
12
|
return await bee.uploadData(batchId, JSON.stringify(wrappedData), { ...uploadOptions, act: true }, requestOptions);
|
|
13
13
|
}
|
|
14
14
|
async function uploadFileOrDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
|
|
15
|
-
const { isDir } = await import("./fs.node-
|
|
15
|
+
const { isDir } = await import("./fs.node-CR5kFsrm.mjs");
|
|
16
16
|
const isPathDir = await isDir(resolvedPath);
|
|
17
17
|
if (isPathDir) {
|
|
18
18
|
return uploadDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions);
|
|
@@ -21,7 +21,7 @@ async function uploadFileOrDirectory(bee, batchId, resolvedPath, uploadOptions,
|
|
|
21
21
|
}
|
|
22
22
|
async function uploadFile(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
|
|
23
23
|
try {
|
|
24
|
-
const { readFile } = await import("./fs.node-
|
|
24
|
+
const { readFile } = await import("./fs.node-CR5kFsrm.mjs");
|
|
25
25
|
const { data, name, contentType } = await readFile(resolvedPath);
|
|
26
26
|
return await bee.uploadFile(batchId, data, name, {
|
|
27
27
|
...uploadOptions,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const App = require("./App-
|
|
3
|
+
const App = require("./App-BsgbFuqW.js");
|
|
4
4
|
async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptions) {
|
|
5
5
|
const uploadFilesRes = await uploadFileOrDirectory(bee, new App.BatchId(batchId), nodeOptions.path, { ...uploadOptions, act: false }, requestOptions);
|
|
6
6
|
let uploadPreviewRes;
|
|
@@ -14,7 +14,7 @@ async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptio
|
|
|
14
14
|
return await bee.uploadData(batchId, JSON.stringify(wrappedData), { ...uploadOptions, act: true }, requestOptions);
|
|
15
15
|
}
|
|
16
16
|
async function uploadFileOrDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
|
|
17
|
-
const { isDir } = await Promise.resolve().then(() => require("./fs.node-
|
|
17
|
+
const { isDir } = await Promise.resolve().then(() => require("./fs.node-DrM1ewLt.js"));
|
|
18
18
|
const isPathDir = await isDir(resolvedPath);
|
|
19
19
|
if (isPathDir) {
|
|
20
20
|
return uploadDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions);
|
|
@@ -23,7 +23,7 @@ async function uploadFileOrDirectory(bee, batchId, resolvedPath, uploadOptions,
|
|
|
23
23
|
}
|
|
24
24
|
async function uploadFile(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
|
|
25
25
|
try {
|
|
26
|
-
const { readFile } = await Promise.resolve().then(() => require("./fs.node-
|
|
26
|
+
const { readFile } = await Promise.resolve().then(() => require("./fs.node-DrM1ewLt.js"));
|
|
27
27
|
const { data, name, contentType } = await readFile(resolvedPath);
|
|
28
28
|
return await bee.uploadFile(batchId, data, name, {
|
|
29
29
|
...uploadOptions,
|
package/lib/utils/chain.d.ts
CHANGED
|
@@ -5,3 +5,9 @@ export declare const GnosisNetwork: Networkish;
|
|
|
5
5
|
export declare function chainIdToName(chainId: number): string;
|
|
6
6
|
export declare function ethAddressString(address: EthAddress | string): string;
|
|
7
7
|
export declare function newGnosisProvider(url: string): JsonRpcProvider;
|
|
8
|
+
/**
|
|
9
|
+
* Provider for RPC validation only — no staticNetwork so getNetwork() actually
|
|
10
|
+
* calls eth_chainId, but still uses FixedIdJsonRpcProvider to handle endpoints
|
|
11
|
+
* that return a fixed/wrong id in their responses.
|
|
12
|
+
*/
|
|
13
|
+
export declare function newGnosisProviderForValidation(url: string): JsonRpcProvider;
|
package/lib/utils/file.d.ts
CHANGED
|
@@ -11,4 +11,15 @@ export declare function getPath(file: FilePath): string;
|
|
|
11
11
|
* Utility function that is needed to have correct directory structure as webkitRelativePath is read only
|
|
12
12
|
*/
|
|
13
13
|
export declare function packageFile(file: FilePath, pathOverwrite?: string): FilePath;
|
|
14
|
+
export declare function getExtensionFromName(name: string): string;
|
|
15
|
+
export declare function guessMime(name: string, mtdt?: Record<string, string> | undefined): {
|
|
16
|
+
mime: string;
|
|
17
|
+
ext: string;
|
|
18
|
+
};
|
|
19
|
+
export type Viewer = {
|
|
20
|
+
name: string;
|
|
21
|
+
test: (mime: string) => boolean;
|
|
22
|
+
render: (win: Window, url: string, mime: string, name: string) => void;
|
|
23
|
+
};
|
|
24
|
+
export declare const VIEWERS: Viewer[];
|
|
14
25
|
export {};
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { BatchId, Bee, PostageBatch } from '@ethersphere/bee-js';
|
|
2
1
|
/**
|
|
3
2
|
* Test if value is an integer
|
|
4
3
|
*
|
|
@@ -58,9 +57,3 @@ export declare function uuidV4(): string;
|
|
|
58
57
|
export declare function formatEnum(string: string): string;
|
|
59
58
|
export declare function secondsToTimeString(seconds: number | bigint): string;
|
|
60
59
|
export declare function shortenText(text: string, length?: number, separator?: string): string;
|
|
61
|
-
interface Options {
|
|
62
|
-
pollingFrequency?: number;
|
|
63
|
-
timeout?: number;
|
|
64
|
-
}
|
|
65
|
-
export declare function waitUntilStampUsable(batchId: BatchId | string, bee: Bee, options?: Options): Promise<PostageBatch>;
|
|
66
|
-
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BatchId, Bee, PostageBatch } from '@ethersphere/bee-js';
|
|
2
|
+
export declare function validateDepthInput(depthInput: string, onError: (v: any) => void, onSuccess: (v: any) => void): void;
|
|
3
|
+
interface Options {
|
|
4
|
+
pollingFrequency?: number;
|
|
5
|
+
timeout?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function waitUntilStampUsable(batchId: BatchId | string, bee: Bee, options?: Options): Promise<PostageBatch>;
|
|
8
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-ethers-DTkFbbYN.js","assets/vendor-react-mui-CMfvLA_U.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{aj as i}from"./vendor-react-mui-CMfvLA_U.js";import{F as m}from"./index-BTuZ_M-A.js";import"./vendor-ethers-DTkFbbYN.js";const p=new Map([[".mp4","video/mp4"],[".webm","video/webm"],[".ogv","video/ogg"],[".mp3","audio/mpeg"],[".m4a","audio/mp4"],[".aac","audio/aac"],[".wav","audio/wav"],[".ogg","audio/ogg"],[".png","image/png"],[".jpg","image/jpeg"],[".jpeg","image/jpeg"],[".gif","image/gif"],[".webp","image/webp"],[".avif","image/avif"],[".svg","image/svg+xml"],[".pdf","application/pdf"],[".txt","text/plain"],[".md","text/markdown"],[".json","application/json"],[".csv","text/csv"],[".html","text/html"],[".htm","text/html"]]);async function g(t){const{extname:e}=await i(async()=>{const{extname:n}=await import("./vendor-ethers-DTkFbbYN.js").then(o=>o._);return{extname:n}},__vite__mapDeps([0,1])),a=e(t).toLowerCase();return p.get(a)||"application/octet-stream"}async function u(t){const{existsSync:e,lstatSync:a}=await i(async()=>{const{existsSync:n,lstatSync:o}=await import("./vendor-ethers-DTkFbbYN.js").then(r=>r._);return{existsSync:n,lstatSync:o}},__vite__mapDeps([0,1]));if(!e(t))throw new m(`Path ${t} does not exist!`);return a(t).isDirectory()}async function v(t){const{createReadStream:e}=await i(async()=>{const{createReadStream:s}=await import("./vendor-ethers-DTkFbbYN.js").then(c=>c._);return{createReadStream:s}},__vite__mapDeps([0,1])),{basename:a}=await i(async()=>{const{basename:s}=await import("./vendor-ethers-DTkFbbYN.js").then(c=>c._);return{basename:s}},__vite__mapDeps([0,1])),n=e(t),o=a(t),r=await g(t);return{data:n,name:o,contentType:r}}export{g as getContentType,u as isDir,v as readFile};
|