@dimah-s3/ui 0.8.5 → 1.0.0
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/dist/components/dimah-s3/attachment/circle-progress.d.ts +3 -1
- package/dist/components/dimah-s3/attachment/circle-progress.d.ts.map +1 -1
- package/dist/components/dimah-s3/attachment/file-attachment.d.ts.map +1 -1
- package/dist/components/dimah-s3/download/download-button.d.ts +6 -2
- package/dist/components/dimah-s3/download/download-button.d.ts.map +1 -1
- package/dist/components/dimah-s3/download/progress-download-button.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/multi-upload-status.d.ts +3 -1
- package/dist/components/dimah-s3/upload/multi-upload-status.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/upload-button.d.ts +1 -1
- package/dist/components/dimah-s3/upload/upload-button.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/upload-dropzone.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/upload-status-block.d.ts +3 -1
- package/dist/components/dimah-s3/upload/upload-status-block.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/upload-status.d.ts.map +1 -1
- package/dist/components/dimah-s3/upload/upload-wired.d.ts +48 -0
- package/dist/components/dimah-s3/upload/upload-wired.d.ts.map +1 -0
- package/dist/hooks/use-download-toast.d.ts +9 -3
- package/dist/hooks/use-download-toast.d.ts.map +1 -1
- package/dist/index.js +433 -308
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
export declare function CircleProgress({ percent, size, strokeWidth, className, }: {
|
|
1
|
+
export declare function CircleProgress({ percent, size, strokeWidth, className, label, }: {
|
|
2
2
|
percent: number;
|
|
3
3
|
size?: number;
|
|
4
4
|
strokeWidth?: number;
|
|
5
5
|
className?: string;
|
|
6
|
+
/** Accessible name. When omitted the graphic is hidden from AT. */
|
|
7
|
+
label?: string;
|
|
6
8
|
}): import("react").JSX.Element;
|
|
7
9
|
//# sourceMappingURL=circle-progress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circle-progress.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/attachment/circle-progress.tsx"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,IAAS,EACT,WAAiB,EACjB,SAAS,
|
|
1
|
+
{"version":3,"file":"circle-progress.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/attachment/circle-progress.tsx"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,IAAS,EACT,WAAiB,EACjB,SAAS,EACT,KAAK,GACN,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,+BAwCA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/attachment/file-attachment.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AAaxB,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAajC,MAAM,MAAM,mBAAmB,GAAG;IAChC,oBAAoB;IACpB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAW,EACX,WAAW,EACX,KAAK,EACL,QAAQ,EACR,OAAO,EACP,IAAW,EACX,WAA0B,EAC1B,SAAS,GACV,EAAE,mBAAmB,+
|
|
1
|
+
{"version":3,"file":"file-attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/attachment/file-attachment.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AAaxB,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAajC,MAAM,MAAM,mBAAmB,GAAG;IAChC,oBAAoB;IACpB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAW,EACX,WAAW,EACX,KAAK,EACL,QAAQ,EACR,OAAO,EACP,IAAW,EACX,WAA0B,EAC1B,SAAS,GACV,EAAE,mBAAmB,+BAiHrB"}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import type { S3Api } from "@dimah-s3/core";
|
|
3
|
+
import { type DownloadHooks } from "@dimah-s3/react";
|
|
3
4
|
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout";
|
|
4
5
|
import { Button } from "../../../components/ui/button";
|
|
5
6
|
/** Props for {@link DownloadButton}. */
|
|
6
|
-
export type DownloadButtonProps = AttachmentLayoutAliases & {
|
|
7
|
+
export type DownloadButtonProps = DownloadHooks & AttachmentLayoutAliases & {
|
|
7
8
|
/** S3Api. Optional when an `<S3Provider>` is present in the tree. */
|
|
8
9
|
api?: S3Api;
|
|
9
10
|
/** S3 object key to download. */
|
|
10
11
|
objectKey: string;
|
|
11
12
|
/** Download filename for Content-Disposition. */
|
|
12
13
|
fileName?: string;
|
|
14
|
+
/** Target bucket (overrides server default). */
|
|
15
|
+
bucket?: string;
|
|
13
16
|
/** Button label. */
|
|
14
17
|
label?: string;
|
|
15
18
|
/** Custom button content. Replaces default icon + label. */
|
|
16
19
|
children?: ReactNode;
|
|
17
20
|
className?: string;
|
|
18
21
|
disabled?: boolean;
|
|
22
|
+
tooltipText?: string;
|
|
19
23
|
/** Show a toast when download starts. @default true */
|
|
20
24
|
toast?: boolean;
|
|
21
25
|
/**
|
|
@@ -32,5 +36,5 @@ export type DownloadButtonProps = AttachmentLayoutAliases & {
|
|
|
32
36
|
/** Extra classes on the trigger button element. */
|
|
33
37
|
buttonClassName?: string;
|
|
34
38
|
};
|
|
35
|
-
export declare function DownloadButton({ api, objectKey, fileName, label, children, className, disabled, toast: enableToast, status: statusSlot, variant, size, buttonClassName, attachmentSize, attachmentOrientation, }: DownloadButtonProps): import("react").JSX.Element;
|
|
39
|
+
export declare function DownloadButton({ api, objectKey, fileName, bucket, label, children, className, disabled, tooltipText, toast: enableToast, status: statusSlot, variant, size, buttonClassName, attachmentSize, attachmentOrientation, beforeDownload, onInitiated, onError, }: DownloadButtonProps): import("react").JSX.Element;
|
|
36
40
|
//# sourceMappingURL=download-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download-button.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/download/download-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"download-button.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/download/download-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,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"","sources":["../../../../src/components/dimah-s3/download/progress-download-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"progress-download-button.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/download/progress-download-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAG5C,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAShD,gDAAgD;AAChD,MAAM,MAAM,2BAA2B,GAAG,kBAAkB,GAC1D,uBAAuB,GAAG;IACxB,qEAAqE;IACrE,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iDAAiD;IACjD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,yCAAyC;IACzC,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;IACnD,sCAAsC;IACtC,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;IAC7C,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEJ,wBAAgB,sBAAsB,CAAC,EACrC,GAAG,EACH,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,SAAS,EACT,aAAa,EACb,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,KAAK,EAAE,WAAkB,EACzB,MAAM,EAAE,UAAiB,EACzB,OAAmB,EACnB,IAAgB,EAChB,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,UAAU,EACV,SAAS,EACT,OAAO,EACP,QAAQ,GACT,EAAE,2BAA2B,+BAqI7B"}
|
|
@@ -6,7 +6,9 @@ export type MultiUploadStatusProps = AttachmentLayoutProps & {
|
|
|
6
6
|
totalProgress: UploadProgress;
|
|
7
7
|
error: DimahS3Error | null;
|
|
8
8
|
onCancel?: () => void;
|
|
9
|
+
/** When set (typically with an `uploadStore`), shows a pause control. */
|
|
10
|
+
onPause?: () => void;
|
|
9
11
|
className?: string;
|
|
10
12
|
};
|
|
11
|
-
export declare function MultiUploadStatus({ phase, files, totalProgress, error, onCancel, size, orientation, className, }: MultiUploadStatusProps): import("react").JSX.Element | null;
|
|
13
|
+
export declare function MultiUploadStatus({ phase, files, totalProgress, error, onCancel, onPause, size, orientation, className, }: MultiUploadStatusProps): import("react").JSX.Element | null;
|
|
12
14
|
//# sourceMappingURL=multi-upload-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-upload-status.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/multi-upload-status.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EACV,qBAAqB,EAEtB,MAAM,yBAAyB,CAAC;AAQjC,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,GAAG;IAC3D,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,aAAa,EAAE,cAAc,CAAC;IAC9B,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,aAAa,EACb,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,SAAS,GACV,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"multi-upload-status.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/multi-upload-status.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EACV,qBAAqB,EAEtB,MAAM,yBAAyB,CAAC;AAQjC,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,GAAG;IAC3D,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,aAAa,EAAE,cAAc,CAAC;IAC9B,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,aAAa,EACb,KAAK,EACL,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,WAAW,EACX,SAAS,GACV,EAAE,sBAAsB,sCAgHxB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import { type UseUploadOptions, type UseMultiUploadOptions } from "@dimah-s3/react";
|
|
3
|
-
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout";
|
|
4
3
|
import { Button } from "../../../components/ui/button";
|
|
4
|
+
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout";
|
|
5
5
|
/** Props for {@link UploadButton}. Extends {@link UseUploadOptions} or {@link UseMultiUploadOptions}. */
|
|
6
6
|
export type UploadButtonProps = (UseUploadOptions | UseMultiUploadOptions) & AttachmentLayoutAliases & {
|
|
7
7
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-button.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"upload-button.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrE,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAE3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAOhD,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAOjC,yGAAyG;AACzG,MAAM,MAAM,iBAAiB,GAAG,CAAC,gBAAgB,GAAG,qBAAqB,CAAC,GACxE,uBAAuB,GAAG;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yCAAyC;IACzC,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;IACnD,sCAAsC;IACtC,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;IAC7C,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAoKJ,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,+BAerE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-dropzone.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-dropzone.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"upload-dropzone.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-dropzone.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAWjC,2GAA2G;AAC3G,MAAM,MAAM,mBAAmB,GAAG,CAAC,gBAAgB,GAAG,qBAAqB,CAAC,GAC1E,uBAAuB,GAAG;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AA4HJ,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,+BAkBzE"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { DimahS3Error, UploadFileInfo, UploadPhase, UploadProgress, MultiUploadFileState, MultiUploadPhase } from "@dimah-s3/react";
|
|
2
2
|
import type { AttachmentLayoutProps } from "../../../lib/attachment-layout";
|
|
3
|
-
export type UploadStatusBlockProps = AttachmentLayoutProps &
|
|
3
|
+
export type UploadStatusBlockProps = AttachmentLayoutProps & {
|
|
4
|
+
className?: string;
|
|
5
|
+
} & ({
|
|
4
6
|
mode: "single";
|
|
5
7
|
phase: UploadPhase;
|
|
6
8
|
progress: UploadProgress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-status-block.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-status-block.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,
|
|
1
|
+
{"version":3,"file":"upload-status-block.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-status-block.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,GAAG;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,CACE;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,aAAa,EAAE,cAAc,CAAC;IAC9B,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CACJ,CAAC;AAEJ,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,+BA4C9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-status.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-status.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,cAAc,EACf,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,GAAG;IACtD,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,WAAW,EACX,SAAS,GACV,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"upload-status.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-status.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,cAAc,EACf,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,GAAG;IACtD,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,WAAW,EACX,SAAS,GACV,EAAE,iBAAiB,sCA2GnB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { useTranslations } from "@fuma-translate/react";
|
|
3
|
+
import { type UseUploadOptions, type UseMultiUploadOptions, type UseUploadReturn, type UseMultiUploadReturn } from "@dimah-s3/react";
|
|
4
|
+
import { type AttachmentLayoutAliases, type StatusSlot } from "../../../lib/attachment-layout";
|
|
5
|
+
export declare function canPauseUpload(uploadStore: UseUploadOptions["uploadStore"]): boolean;
|
|
6
|
+
export declare function dropzoneHints(options: UseUploadOptions | UseMultiUploadOptions, t: ReturnType<typeof useTranslations>): {
|
|
7
|
+
limitsLine: string | null;
|
|
8
|
+
acceptLine: string | null;
|
|
9
|
+
};
|
|
10
|
+
export declare function DropzoneChrome({ label, limitsLine, acceptLine, isDisabled, children, }: {
|
|
11
|
+
label: string;
|
|
12
|
+
limitsLine: string | null;
|
|
13
|
+
acceptLine: string | null;
|
|
14
|
+
isDisabled: boolean;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
export declare function DropzoneFrame({ getRootProps, getInputProps, isDisabled, isDragReject, isDragAccept, isDragActive, className, hasCustomChrome, ariaLabel, chrome, status, }: {
|
|
18
|
+
getRootProps: UseUploadReturn["getRootProps"];
|
|
19
|
+
getInputProps: UseUploadReturn["getInputProps"];
|
|
20
|
+
isDisabled: boolean;
|
|
21
|
+
isDragReject: boolean;
|
|
22
|
+
isDragAccept: boolean;
|
|
23
|
+
isDragActive: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
hasCustomChrome: boolean;
|
|
26
|
+
ariaLabel: string;
|
|
27
|
+
chrome: ReactNode;
|
|
28
|
+
status: ReactNode;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
type StatusLayout = AttachmentLayoutAliases & {
|
|
31
|
+
toast?: boolean;
|
|
32
|
+
status?: StatusSlot;
|
|
33
|
+
};
|
|
34
|
+
export declare function useSingleUploadUi(ctrl: UseUploadReturn, { toast: enableToast, status: statusSlot, attachmentSize, attachmentOrientation, canPause, }: StatusLayout & {
|
|
35
|
+
canPause: boolean;
|
|
36
|
+
}): {
|
|
37
|
+
statusNode: import("react").JSX.Element | null;
|
|
38
|
+
statusSlot: StatusSlot;
|
|
39
|
+
};
|
|
40
|
+
export declare function useMultiUploadUi(ctrl: UseMultiUploadReturn, { toast: enableToast, status: statusSlot, attachmentSize, attachmentOrientation, canPause, }: StatusLayout & {
|
|
41
|
+
canPause: boolean;
|
|
42
|
+
}): {
|
|
43
|
+
statusNode: import("react").JSX.Element | null;
|
|
44
|
+
statusSlot: StatusSlot;
|
|
45
|
+
};
|
|
46
|
+
export declare function resolveDefaultStatus(statusSlot: StatusSlot, statusNode: ReactNode, wrap?: (node: ReactNode) => ReactNode): ReactNode;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=upload-wired.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-wired.d.ts","sourceRoot":"","sources":["../../../../src/components/dimah-s3/upload/upload-wired.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAKjC,wBAAgB,cAAc,CAC5B,WAAW,EAAE,gBAAgB,CAAC,aAAa,CAAC,GAC3C,OAAO,CAET;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,gBAAgB,GAAG,qBAAqB,EACjD,CAAC,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC;;;EAsCtC;AA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E,KAAK,EAAE,WAAkB,EACzB,MAAM,EAAE,UAAiB,EACzB,cAAc,EACd,qBAAqB,EACrB,QAAQ,GACT,EAAE,YAAY,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE;;;EA6BxC;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,SAAS,EACrB,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,aAMtC"}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
+
import type { FetchDownloadPhase } from "@dimah-s3/react";
|
|
1
2
|
export type DownloadToastOptions = {
|
|
2
3
|
enabled?: boolean;
|
|
3
4
|
objectKey: string;
|
|
4
5
|
fileName?: string;
|
|
5
6
|
fileSize?: number;
|
|
7
|
+
cancel?: () => void;
|
|
6
8
|
};
|
|
7
|
-
export declare function useDownloadToast({ enabled, objectKey, fileName, fileSize, }: DownloadToastOptions): {
|
|
9
|
+
export declare function useDownloadToast({ enabled, objectKey, fileName, fileSize, cancel, }: DownloadToastOptions): {
|
|
8
10
|
onInitiated: () => void;
|
|
11
|
+
onDownloadStart: () => void;
|
|
12
|
+
onProgress: (_key: string, progress: {
|
|
13
|
+
loaded: number;
|
|
14
|
+
total: number;
|
|
15
|
+
}) => void;
|
|
9
16
|
onSuccess: (_key: string, actualFileName: string) => void;
|
|
10
|
-
onError: (_key: string, error: unknown) => void;
|
|
11
|
-
onErrorWithPhase: (_key: string, error: unknown, _phase: string) => void;
|
|
17
|
+
onError: (_key: string, error: unknown, _phase?: FetchDownloadPhase) => void;
|
|
12
18
|
onCancel: (_key: string) => void;
|
|
13
19
|
};
|
|
14
20
|
//# sourceMappingURL=use-download-toast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-download-toast.d.ts","sourceRoot":"","sources":["../../src/hooks/use-download-toast.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-download-toast.d.ts","sourceRoot":"","sources":["../../src/hooks/use-download-toast.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAI1D,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC/B,OAAc,EACd,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,GACP,EAAE,oBAAoB;;;uBAoDb,MAAM,YACF;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;sBAoBpB,MAAM,kBAAkB,MAAM;oBA2B/C,MAAM,SACL,OAAO,WACL,kBAAkB;qBAWL,MAAM;EAkB/B"}
|