@rpcbase/ui 0.190.0 → 0.192.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/FilesUploadField/index.d.ts.map +1 -1
- package/dist/index107.js +36 -36
- package/dist/index119.js +6 -6
- package/dist/index126.js +1 -1
- package/dist/index128.js +2 -2
- package/dist/index130.js +1 -1
- package/dist/index15.js +55 -54
- package/dist/index15.js.map +1 -1
- package/dist/index151.js +1 -1
- package/dist/index152.js +1 -1
- package/dist/index154.js +1 -1
- package/dist/index155.js +1 -1
- package/dist/index157.js +13 -13
- package/dist/index179.js +57 -15
- package/dist/index179.js.map +1 -1
- package/dist/index180.js +8 -5
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +65 -4
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +18 -57
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +14 -64
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +5 -6
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +5 -4
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +6 -7
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +4 -17
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +7 -5
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +17 -5
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +5 -13
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +5 -10
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +13 -14
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +10 -14
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +14 -5
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +14 -6
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +5 -7
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +5 -5
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +7 -9
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +6 -5
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +9 -5
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +5 -9
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +5 -5
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +9 -5
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +5 -4
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +5 -11
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +4 -10
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +9 -8
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +10 -11
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +10 -11
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +11 -10
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +10 -6
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +10 -6
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +7 -5
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +5 -5
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +5 -7
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +6 -6
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +7 -55
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +6 -8
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +54 -18
- package/dist/index219.js.map +1 -1
- package/dist/index224.js +3 -3
- package/dist/index231.js +1 -1
- package/dist/index242.js +2 -2
- package/dist/index243.js +9 -9
- package/dist/index244.js +1 -1
- package/dist/index274.js +1 -1
- package/dist/index276.js +4 -4
- package/dist/index289.js +2 -2
- package/dist/index292.js +1 -1
- package/dist/index293.js +2 -2
- package/dist/index295.js +1 -1
- package/dist/index296.js +1 -1
- package/dist/index297.js +1 -1
- package/dist/index298.js +1 -1
- package/dist/index299.js +69 -65
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +8 -68
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +14 -9
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +66 -14
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +64 -65
- package/dist/index303.js.map +1 -1
- package/dist/index31.js +5 -5
- package/dist/index41.js +20 -20
- package/dist/index51.js +6 -6
- package/dist/index52.js +6 -3
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +33 -6
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +25 -46
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +7 -26
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +10 -49
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +3 -7
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +47 -14
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +46 -129
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +7 -10
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +13 -215
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +133 -12
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +10 -33
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +214 -44
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +13 -8
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +44 -47
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +50 -4
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +4 -6
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +6 -28
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +28 -50
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +50 -9
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +8 -11
- package/dist/index72.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FilesUploadField/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FilesUploadField/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAkB5E,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAwbD,KAAK,YAAY,GAAG,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;AAExE,KAAK,aAAa,GAAG,CACnB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,EACtC,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,KACnD,YAAY,CAAA;AAEjB,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,oBAAoB,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAA;IAC1C,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACrC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAA;IAClD,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAA;IAClD,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,SAAS,CAAA;IAC9B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,+BAA+B,KAAK,SAAS,CAAA;IAClE,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC/B,CAAA;AAaD,wBAAgB,gBAAgB,CAAC,EAC/B,YAAiB,EACjB,QAAQ,EACR,MAAsB,EACtB,cAAsB,EACtB,QAAgB,EAChB,iBAAiB,EACjB,MAAM,EACN,YAAY,EACZ,UAAU,EACV,kBAAyC,EACzC,qBAA8C,GAC/C,EAAE,qBAAqB,2CA6oBvB"}
|
package/dist/index107.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { TZDate as a } from "./
|
|
2
|
-
import "./
|
|
3
|
-
import { endOfBroadcastWeek as f } from "./
|
|
4
|
-
import { startOfBroadcastWeek as d } from "./
|
|
1
|
+
import { TZDate as a } from "./index179.js";
|
|
2
|
+
import "./index181.js";
|
|
3
|
+
import { endOfBroadcastWeek as f } from "./index186.js";
|
|
4
|
+
import { startOfBroadcastWeek as d } from "./index187.js";
|
|
5
5
|
import { enUS as m } from "./index130.js";
|
|
6
|
-
import { addDays as v } from "./
|
|
7
|
-
import { addMonths as p } from "./
|
|
8
|
-
import { addWeeks as O } from "./
|
|
9
|
-
import { addYears as c } from "./
|
|
10
|
-
import { differenceInCalendarDays as u } from "./
|
|
11
|
-
import { differenceInCalendarMonths as l } from "./
|
|
12
|
-
import { eachMonthOfInterval as M } from "./
|
|
13
|
-
import { eachYearOfInterval as k } from "./
|
|
14
|
-
import { endOfISOWeek as W } from "./
|
|
15
|
-
import { endOfMonth as D } from "./
|
|
16
|
-
import { endOfWeek as Y } from "./
|
|
17
|
-
import { endOfYear as S } from "./
|
|
18
|
-
import { getISOWeek as y } from "./
|
|
19
|
-
import { getMonth as g } from "./
|
|
20
|
-
import { getYear as I } from "./
|
|
21
|
-
import { getWeek as w } from "./
|
|
22
|
-
import { isAfter as B } from "./
|
|
23
|
-
import { isBefore as L } from "./
|
|
24
|
-
import { isDate as C } from "./
|
|
25
|
-
import { isSameDay as z } from "./
|
|
26
|
-
import { isSameMonth as Z } from "./
|
|
27
|
-
import { isSameYear as b } from "./
|
|
28
|
-
import { max as A } from "./
|
|
29
|
-
import { min as F } from "./
|
|
30
|
-
import { setMonth as N } from "./
|
|
31
|
-
import { setYear as _ } from "./
|
|
32
|
-
import { startOfDay as j } from "./
|
|
33
|
-
import { startOfISOWeek as x } from "./
|
|
34
|
-
import { startOfMonth as H } from "./
|
|
35
|
-
import { startOfWeek as K } from "./
|
|
36
|
-
import { startOfYear as T } from "./
|
|
37
|
-
import { formatDate as U } from "./
|
|
6
|
+
import { addDays as v } from "./index188.js";
|
|
7
|
+
import { addMonths as p } from "./index189.js";
|
|
8
|
+
import { addWeeks as O } from "./index190.js";
|
|
9
|
+
import { addYears as c } from "./index191.js";
|
|
10
|
+
import { differenceInCalendarDays as u } from "./index192.js";
|
|
11
|
+
import { differenceInCalendarMonths as l } from "./index193.js";
|
|
12
|
+
import { eachMonthOfInterval as M } from "./index194.js";
|
|
13
|
+
import { eachYearOfInterval as k } from "./index195.js";
|
|
14
|
+
import { endOfISOWeek as W } from "./index196.js";
|
|
15
|
+
import { endOfMonth as D } from "./index197.js";
|
|
16
|
+
import { endOfWeek as Y } from "./index198.js";
|
|
17
|
+
import { endOfYear as S } from "./index199.js";
|
|
18
|
+
import { getISOWeek as y } from "./index200.js";
|
|
19
|
+
import { getMonth as g } from "./index201.js";
|
|
20
|
+
import { getYear as I } from "./index202.js";
|
|
21
|
+
import { getWeek as w } from "./index203.js";
|
|
22
|
+
import { isAfter as B } from "./index204.js";
|
|
23
|
+
import { isBefore as L } from "./index205.js";
|
|
24
|
+
import { isDate as C } from "./index206.js";
|
|
25
|
+
import { isSameDay as z } from "./index207.js";
|
|
26
|
+
import { isSameMonth as Z } from "./index208.js";
|
|
27
|
+
import { isSameYear as b } from "./index209.js";
|
|
28
|
+
import { max as A } from "./index210.js";
|
|
29
|
+
import { min as F } from "./index211.js";
|
|
30
|
+
import { setMonth as N } from "./index212.js";
|
|
31
|
+
import { setYear as _ } from "./index213.js";
|
|
32
|
+
import { startOfDay as j } from "./index214.js";
|
|
33
|
+
import { startOfISOWeek as x } from "./index215.js";
|
|
34
|
+
import { startOfMonth as H } from "./index216.js";
|
|
35
|
+
import { startOfWeek as K } from "./index217.js";
|
|
36
|
+
import { startOfYear as T } from "./index218.js";
|
|
37
|
+
import { formatDate as U } from "./index219.js";
|
|
38
38
|
class n {
|
|
39
39
|
/**
|
|
40
40
|
* Creates an instance of `DateLib`.
|
package/dist/index119.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { TZDate as c } from "./
|
|
2
|
-
import "./
|
|
3
|
-
import { differenceInCalendarMonths as h } from "./
|
|
4
|
-
import { differenceInCalendarDays as O } from "./
|
|
5
|
-
import { getISOWeek as k } from "./
|
|
6
|
-
import { getWeek as w } from "./
|
|
1
|
+
import { TZDate as c } from "./index179.js";
|
|
2
|
+
import "./index181.js";
|
|
3
|
+
import { differenceInCalendarMonths as h } from "./index193.js";
|
|
4
|
+
import { differenceInCalendarDays as O } from "./index192.js";
|
|
5
|
+
import { getISOWeek as k } from "./index200.js";
|
|
6
|
+
import { getWeek as w } from "./index203.js";
|
|
7
7
|
function W(o, D = {}) {
|
|
8
8
|
const { weekStartsOn: d, locale: g } = D, l = d ?? g?.options?.weekStartsOn ?? 0, r = (t) => {
|
|
9
9
|
const e = typeof t == "number" || typeof t == "string" ? new Date(t) : t;
|
package/dist/index126.js
CHANGED
package/dist/index128.js
CHANGED
package/dist/index130.js
CHANGED
package/dist/index15.js
CHANGED
|
@@ -2,12 +2,13 @@ import { j as s } from "./index30.js";
|
|
|
2
2
|
import { c as Rt } from "./index28.js";
|
|
3
3
|
import { useRef as T, useState as Ee, useEffect as Y } from "react";
|
|
4
4
|
import { createPortal as Ct } from "react-dom";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { DismissableLayerBranch as Tt } from "./index31.js";
|
|
6
|
+
import { useSensors as Kt, useSensor as Nt, PointerSensor as Ft, KeyboardSensor as $t, DragOverlay as Ot, DndContext as Ht, closestCenter as Bt } from "@dnd-kit/core";
|
|
7
|
+
import { useSortable as _t, sortableKeyboardCoordinates as Xt, arrayMove as Vt, SortableContext as Jt, rectSortingStrategy as Wt } from "@dnd-kit/sortable";
|
|
8
|
+
import { CSS as qt } from "@dnd-kit/utilities";
|
|
9
|
+
import { X as Lt, Maximize2 as Gt, Loader2 as Qt, Plus as Yt } from "lucide-react";
|
|
9
10
|
import { cn as pt } from "./index2.js";
|
|
10
|
-
const At = "rb-tenant-id",
|
|
11
|
+
const At = "rb-tenant-id", Zt = async (n) => {
|
|
11
12
|
if (typeof crypto > "u" || typeof crypto.subtle > "u") return null;
|
|
12
13
|
try {
|
|
13
14
|
const e = await crypto.subtle.digest("SHA-256", n);
|
|
@@ -15,7 +16,7 @@ const At = "rb-tenant-id", Yt = async (n) => {
|
|
|
15
16
|
} catch {
|
|
16
17
|
return null;
|
|
17
18
|
}
|
|
18
|
-
},
|
|
19
|
+
}, er = () => {
|
|
19
20
|
if (typeof window > "u") return null;
|
|
20
21
|
const e = new URLSearchParams(window.location.search || "").get(At)?.trim() ?? "";
|
|
21
22
|
return e || null;
|
|
@@ -39,7 +40,7 @@ const At = "rb-tenant-id", Yt = async (n) => {
|
|
|
39
40
|
status: c.status,
|
|
40
41
|
data: f
|
|
41
42
|
};
|
|
42
|
-
},
|
|
43
|
+
}, tr = async (n, e) => {
|
|
43
44
|
const r = await fetch(n, {
|
|
44
45
|
credentials: "include",
|
|
45
46
|
headers: e?.headers,
|
|
@@ -50,7 +51,7 @@ const At = "rb-tenant-id", Yt = async (n) => {
|
|
|
50
51
|
status: r.status,
|
|
51
52
|
data: c
|
|
52
53
|
};
|
|
53
|
-
},
|
|
54
|
+
}, rr = async ({
|
|
54
55
|
url: n,
|
|
55
56
|
body: e,
|
|
56
57
|
sha256: r,
|
|
@@ -72,8 +73,8 @@ const At = "rb-tenant-id", Yt = async (n) => {
|
|
|
72
73
|
ok: v.ok,
|
|
73
74
|
status: v.status
|
|
74
75
|
};
|
|
75
|
-
},
|
|
76
|
-
const c =
|
|
76
|
+
}, nr = async (n, e, r) => {
|
|
77
|
+
const c = er(), f = await It(Ke("/api/rb/file-uploads", c), {
|
|
77
78
|
filename: n.name,
|
|
78
79
|
mimeType: n.type || "application/octet-stream",
|
|
79
80
|
...typeof r?.isPublic == "boolean" ? {
|
|
@@ -89,7 +90,7 @@ const At = "rb-tenant-id", Yt = async (n) => {
|
|
|
89
90
|
if (!N || !I || !A)
|
|
90
91
|
throw new Error("Upload init missing required fields");
|
|
91
92
|
const q = async (l) => {
|
|
92
|
-
const y = l * I, h = Math.min(n.size, y + I), P = await n.slice(y, h).arrayBuffer(), D = await
|
|
93
|
+
const y = l * I, h = Math.min(n.size, y + I), P = await n.slice(y, h).arrayBuffer(), D = await Zt(P), j = await rr({
|
|
93
94
|
url: Ke(`/api/rb/file-uploads/${encodeURIComponent(N)}/chunks/${l}`, c),
|
|
94
95
|
body: P,
|
|
95
96
|
sha256: D ?? void 0,
|
|
@@ -124,7 +125,7 @@ const At = "rb-tenant-id", Yt = async (n) => {
|
|
|
124
125
|
const y = String(l.data?.error ?? "");
|
|
125
126
|
if (l.status !== 409 || y !== "missing_chunks")
|
|
126
127
|
throw new Error(y || `Complete failed (${l.status})`);
|
|
127
|
-
const h = await
|
|
128
|
+
const h = await tr(Ke(`/api/rb/file-uploads/${encodeURIComponent(N)}/status`, c), {
|
|
128
129
|
headers: v ? {
|
|
129
130
|
"X-Upload-Key": v
|
|
130
131
|
} : void 0,
|
|
@@ -148,7 +149,7 @@ const At = "rb-tenant-id", Yt = async (n) => {
|
|
|
148
149
|
} : {}
|
|
149
150
|
};
|
|
150
151
|
};
|
|
151
|
-
function
|
|
152
|
+
function sr(n) {
|
|
152
153
|
const e = Rt.c(79), {
|
|
153
154
|
item: r,
|
|
154
155
|
isHovered: c,
|
|
@@ -178,7 +179,7 @@ function nr(n) {
|
|
|
178
179
|
transform: se,
|
|
179
180
|
transition: o,
|
|
180
181
|
isDragging: E
|
|
181
|
-
} =
|
|
182
|
+
} = _t(u), ze = T(null), ve = T(null), [F, G] = Ee(null);
|
|
182
183
|
let le;
|
|
183
184
|
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (le = () => {
|
|
184
185
|
const g = ze.current;
|
|
@@ -209,7 +210,7 @@ function nr(n) {
|
|
|
209
210
|
};
|
|
210
211
|
}, Z = [f, c], e[4] = f, e[5] = c, e[6] = R, e[7] = Z) : (R = e[6], Z = e[7]), Y(R, Z);
|
|
211
212
|
let $;
|
|
212
|
-
e[8] !== se ? ($ =
|
|
213
|
+
e[8] !== se ? ($ = qt.Transform.toString(se), e[8] = se, e[9] = $) : $ = e[9];
|
|
213
214
|
let oe;
|
|
214
215
|
e[10] !== $ || e[11] !== o ? (oe = {
|
|
215
216
|
transform: $,
|
|
@@ -256,7 +257,7 @@ function nr(n) {
|
|
|
256
257
|
e[44] !== l || e[45] !== h || e[46] !== w ? (V = /* @__PURE__ */ s.jsx("button", { type: "button", onClick: w, disabled: l, className: "absolute right-1 top-1 inline-flex size-6 items-center justify-center rounded-full bg-white text-slate-700 shadow-sm transition hover:scale-105 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary dark:bg-slate-900 dark:text-slate-200", "aria-label": h, children: te }), e[44] = l, e[45] = h, e[46] = w, e[47] = V) : V = e[47];
|
|
257
258
|
let de;
|
|
258
259
|
e[48] !== f || e[49] !== c || e[50] !== r.alt || e[51] !== r.id || e[52] !== r.url || e[53] !== v || e[54] !== I || e[55] !== F || e[56] !== k ? (de = f && c && F && (() => {
|
|
259
|
-
const g = /* @__PURE__ */ s.jsx("div", { ref: ve, className: "fixed z-[60] w-52 -translate-x-1/2 -translate-y-full rounded-xl border border-slate-200 bg-white/95 p-3 shadow-2xl backdrop-blur dark:border-slate-700 dark:bg-slate-900/95", style: {
|
|
260
|
+
const g = /* @__PURE__ */ s.jsx(Tt, { children: /* @__PURE__ */ s.jsx("div", { ref: ve, className: "pointer-events-auto fixed z-[60] w-52 -translate-x-1/2 -translate-y-full rounded-xl border border-slate-200 bg-white/95 p-3 shadow-2xl backdrop-blur dark:border-slate-700 dark:bg-slate-900/95", style: {
|
|
260
261
|
left: F.left,
|
|
261
262
|
top: F.top
|
|
262
263
|
}, onMouseEnter: () => {
|
|
@@ -266,13 +267,13 @@ function nr(n) {
|
|
|
266
267
|
he instanceof Node && ze.current?.contains(he) || I();
|
|
267
268
|
}, children: /* @__PURE__ */ s.jsxs("div", { className: "relative overflow-hidden rounded-lg", children: [
|
|
268
269
|
/* @__PURE__ */ s.jsx("img", { src: r.url, alt: r.alt ?? "Preview", className: "h-40 w-full object-cover" }),
|
|
269
|
-
/* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => k(r.id), className: "absolute right-2 top-2 inline-flex items-center justify-center rounded-full bg-black/70 p-2 text-white transition hover:bg-black", "aria-label": "Plein écran", children: /* @__PURE__ */ s.jsx(
|
|
270
|
-
] }) });
|
|
270
|
+
/* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => k(r.id), className: "absolute right-2 top-2 inline-flex items-center justify-center rounded-full bg-black/70 p-2 text-white transition hover:bg-black", "aria-label": "Plein écran", children: /* @__PURE__ */ s.jsx(Gt, { className: "h-3.5 w-3.5" }) })
|
|
271
|
+
] }) }) });
|
|
271
272
|
return typeof document > "u" ? g : Ct(g, document.body);
|
|
272
273
|
})(), e[48] = f, e[49] = c, e[50] = r.alt, e[51] = r.id, e[52] = r.url, e[53] = v, e[54] = I, e[55] = F, e[56] = k, e[57] = de) : de = e[57];
|
|
273
274
|
let J;
|
|
274
275
|
e[58] !== H || e[59] !== r.progress ? (J = H && /* @__PURE__ */ s.jsxs("div", { className: "absolute inset-0 z-20 flex flex-col items-center justify-center gap-2 rounded-lg bg-black/40 text-white", children: [
|
|
275
|
-
/* @__PURE__ */ s.jsx(
|
|
276
|
+
/* @__PURE__ */ s.jsx(Qt, { className: "h-5 w-5 animate-spin" }),
|
|
276
277
|
/* @__PURE__ */ s.jsx("div", { className: "h-1.5 w-5/6 rounded-full bg-white/20", children: /* @__PURE__ */ s.jsx("div", { className: "h-full rounded-full bg-primary", style: {
|
|
277
278
|
width: `${r.progress}%`
|
|
278
279
|
} }) }),
|
|
@@ -295,10 +296,10 @@ function nr(n) {
|
|
|
295
296
|
W
|
|
296
297
|
] }), e[66] = D, e[67] = j, e[68] = ae, e[69] = _, e[70] = b, e[71] = X, e[72] = V, e[73] = de, e[74] = J, e[75] = W, e[76] = ee, e[77] = we, e[78] = re) : re = e[78], re;
|
|
297
298
|
}
|
|
298
|
-
function
|
|
299
|
+
function lr(n) {
|
|
299
300
|
return URL.createObjectURL(n);
|
|
300
301
|
}
|
|
301
|
-
function
|
|
302
|
+
function Rr(n) {
|
|
302
303
|
const e = Rt.c(125), {
|
|
303
304
|
initialFiles: r,
|
|
304
305
|
onChange: c,
|
|
@@ -314,9 +315,9 @@ function Nr(n) {
|
|
|
314
315
|
} = n;
|
|
315
316
|
let B;
|
|
316
317
|
e[0] !== r ? (B = r === void 0 ? [] : r, e[0] = r, e[1] = B) : B = e[1];
|
|
317
|
-
const l = B, y = f === void 0 ?
|
|
318
|
+
const l = B, y = f === void 0 ? nr : f, h = N === void 0 ? !1 : N, u = v === void 0 ? !1 : v, P = H === void 0 ? "Ajouter un fichier" : H, D = K === void 0 ? "Supprimer le fichier" : K, j = T(null);
|
|
318
319
|
let se;
|
|
319
|
-
e[2] !== l ? (se = () => l.map(
|
|
320
|
+
e[2] !== l ? (se = () => l.map(br), e[2] = l, e[3] = se) : se = e[3];
|
|
320
321
|
const [o, E] = Ee(se), [ze, ve] = Ee(!1), [F, G] = Ee(null), [le, pe] = Ee(null), [R, Z] = Ee(null), $ = T(null), oe = T(!0);
|
|
321
322
|
let ae;
|
|
322
323
|
e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ae = [], e[4] = ae) : ae = e[4];
|
|
@@ -341,9 +342,9 @@ function Nr(n) {
|
|
|
341
342
|
}, e[9] = te) : te = e[9];
|
|
342
343
|
let V;
|
|
343
344
|
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (V = {
|
|
344
|
-
coordinateGetter:
|
|
345
|
+
coordinateGetter: Xt
|
|
345
346
|
}, e[10] = V) : V = e[10];
|
|
346
|
-
const de =
|
|
347
|
+
const de = Kt(Nt(Ft, te), Nt($t, V));
|
|
347
348
|
let J, W;
|
|
348
349
|
e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (J = () => () => {
|
|
349
350
|
for (const t of b.current.values())
|
|
@@ -364,7 +365,7 @@ function Nr(n) {
|
|
|
364
365
|
e[13] !== R ? (re = () => {
|
|
365
366
|
if (!(typeof document > "u")) {
|
|
366
367
|
if (R)
|
|
367
|
-
return document.body.style.cursor = "grabbing",
|
|
368
|
+
return document.body.style.cursor = "grabbing", gr;
|
|
368
369
|
document.body.style.cursor = "";
|
|
369
370
|
}
|
|
370
371
|
}, g = [R], e[13] = R, e[14] = re, e[15] = g) : (re = e[14], g = e[15]), Y(re, g);
|
|
@@ -389,16 +390,16 @@ function Nr(n) {
|
|
|
389
390
|
}))
|
|
390
391
|
return;
|
|
391
392
|
we.current = l;
|
|
392
|
-
const a = l.map(
|
|
393
|
+
const a = l.map(hr), S = new Set(a.map(pr));
|
|
393
394
|
for (const [m, p] of Q.current.entries())
|
|
394
395
|
S.has(p) && Q.current.delete(m);
|
|
395
|
-
const z = new Set(ie.current.map(
|
|
396
|
+
const z = new Set(ie.current.map(mr));
|
|
396
397
|
if (a.some((m) => {
|
|
397
398
|
const p = Q.current.get(m.id);
|
|
398
399
|
return p ? z.has(p) : !1;
|
|
399
400
|
}))
|
|
400
401
|
return;
|
|
401
|
-
const U = new Set(a.map(
|
|
402
|
+
const U = new Set(a.map(fr));
|
|
402
403
|
for (const m of ie.current) {
|
|
403
404
|
if (U.has(m.id))
|
|
404
405
|
continue;
|
|
@@ -431,11 +432,11 @@ function Nr(n) {
|
|
|
431
432
|
oe.current = !1;
|
|
432
433
|
return;
|
|
433
434
|
}
|
|
434
|
-
ee.current?.(o.map(
|
|
435
|
+
ee.current?.(o.map(dr));
|
|
435
436
|
}, Ve = [o], e[28] = o, e[29] = Xe, e[30] = Ve) : (Xe = e[29], Ve = e[30]), Y(Xe, Ve);
|
|
436
437
|
let Je, We;
|
|
437
438
|
e[31] !== o ? (Je = () => {
|
|
438
|
-
ye.current?.(o.some(
|
|
439
|
+
ye.current?.(o.some(ur));
|
|
439
440
|
}, We = [o], e[31] = o, e[32] = Je, e[33] = We) : (Je = e[32], We = e[33]), Y(Je, We);
|
|
440
441
|
let qe, Ge;
|
|
441
442
|
e[34] !== F || e[35] !== o.length ? (qe = () => {
|
|
@@ -459,7 +460,7 @@ function Nr(n) {
|
|
|
459
460
|
if (u)
|
|
460
461
|
return;
|
|
461
462
|
const a = Array.from(t).map((S) => {
|
|
462
|
-
const z =
|
|
463
|
+
const z = lr(S), i = crypto.randomUUID();
|
|
463
464
|
w.current.set(i, z), O.current.set(i, S);
|
|
464
465
|
const U = {
|
|
465
466
|
id: i,
|
|
@@ -648,7 +649,7 @@ function Nr(n) {
|
|
|
648
649
|
const S = String(d.id), z = String(a.id);
|
|
649
650
|
S !== z && E((i) => {
|
|
650
651
|
const U = i.findIndex((p) => p.id === S), m = i.findIndex((p) => p.id === z);
|
|
651
|
-
return U === -1 || m === -1 ? i :
|
|
652
|
+
return U === -1 || m === -1 ? i : Vt(i, U, m);
|
|
652
653
|
}), Z(null);
|
|
653
654
|
}, e[54] = st) : st = e[54];
|
|
654
655
|
const zt = st;
|
|
@@ -699,17 +700,17 @@ function Nr(n) {
|
|
|
699
700
|
be = !1;
|
|
700
701
|
break e;
|
|
701
702
|
}
|
|
702
|
-
const t = ge.split(",").map(
|
|
703
|
+
const t = ge.split(",").map(cr).filter(Boolean);
|
|
703
704
|
if (!t.length) {
|
|
704
705
|
be = !1;
|
|
705
706
|
break e;
|
|
706
707
|
}
|
|
707
|
-
be = t.every(
|
|
708
|
+
be = t.every(ir);
|
|
708
709
|
}
|
|
709
710
|
e[62] = ge, e[63] = k, e[64] = be;
|
|
710
711
|
} else
|
|
711
712
|
be = e[64];
|
|
712
|
-
const ne = be, Mt =
|
|
713
|
+
const ne = be, Mt = ar;
|
|
713
714
|
let ct;
|
|
714
715
|
e[65] !== R || e[66] !== ne || e[67] !== o || e[68] !== k ? (ct = R ? (() => {
|
|
715
716
|
const t = o.find((d) => d.id === R);
|
|
@@ -736,11 +737,11 @@ function Nr(n) {
|
|
|
736
737
|
e[75] !== q ? (Se = q ? /* @__PURE__ */ s.jsx("div", { className: "mb-3", children: q() }) : null, e[75] = q, e[76] = Se) : Se = e[76];
|
|
737
738
|
const St = u ? void 0 : de;
|
|
738
739
|
let Ue;
|
|
739
|
-
e[77] !== o ? (Ue = o.map(
|
|
740
|
+
e[77] !== o ? (Ue = o.map(or), e[77] = o, e[78] = Ue) : Ue = e[78];
|
|
740
741
|
let Ne;
|
|
741
742
|
e[79] !== R || e[80] !== u || e[81] !== ne || e[82] !== jt || e[83] !== le || e[84] !== o || e[85] !== D || e[86] !== k || e[87] !== bt || e[88] !== vt ? (Ne = o.map((t) => {
|
|
742
743
|
const d = t.status === "uploading", a = t.status === "error";
|
|
743
|
-
return /* @__PURE__ */ s.jsx(
|
|
744
|
+
return /* @__PURE__ */ s.jsx(sr, { item: t, isHovered: le === t.id, enableImagePreview: ne, renderItem: k, onHoverEnter: () => {
|
|
744
745
|
Ut(), pe(t.id);
|
|
745
746
|
}, onHoverLeave: () => {
|
|
746
747
|
Ut(), $.current = window.setTimeout(() => {
|
|
@@ -752,7 +753,7 @@ function Nr(n) {
|
|
|
752
753
|
e[90] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (dt = pt("group relative size-20 overflow-visible rounded-lg border border-slate-200 bg-slate-50 shadow-inner transition hover:shadow md:size-24 dark:border-slate-700 dark:bg-slate-800", "flex items-center justify-center border-dashed bg-white text-slate-500 hover:border-slate-300 dark:bg-slate-900"), e[90] = dt) : dt = e[90];
|
|
753
754
|
let ft;
|
|
754
755
|
e[91] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ft = /* @__PURE__ */ s.jsxs("div", { className: "flex flex-col items-center gap-1", children: [
|
|
755
|
-
/* @__PURE__ */ s.jsx("div", { className: "flex size-9 items-center justify-center rounded-full border border-slate-300 bg-slate-100 text-slate-600 shadow-inner dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200", children: /* @__PURE__ */ s.jsx(
|
|
756
|
+
/* @__PURE__ */ s.jsx("div", { className: "flex size-9 items-center justify-center rounded-full border border-slate-300 bg-slate-100 text-slate-600 shadow-inner dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200", children: /* @__PURE__ */ s.jsx(Yt, { className: "h-5 w-5" }) }),
|
|
756
757
|
/* @__PURE__ */ s.jsx("span", { className: "text-xs font-medium", children: "Ajouter" })
|
|
757
758
|
] }), e[91] = ft) : ft = e[91];
|
|
758
759
|
let Ie;
|
|
@@ -763,11 +764,11 @@ function Nr(n) {
|
|
|
763
764
|
Ie
|
|
764
765
|
] }), e[96] = Ne, e[97] = Ie, e[98] = Re) : Re = e[98];
|
|
765
766
|
let Ce;
|
|
766
|
-
e[99] !== Ue || e[100] !== Re ? (Ce = /* @__PURE__ */ s.jsx(
|
|
767
|
+
e[99] !== Ue || e[100] !== Re ? (Ce = /* @__PURE__ */ s.jsx(Jt, { items: Ue, strategy: Wt, children: Re }), e[99] = Ue, e[100] = Re, e[101] = Ce) : Ce = e[101];
|
|
767
768
|
let Te;
|
|
768
769
|
e: {
|
|
769
770
|
let t;
|
|
770
|
-
e[102] !== Me ? (t = /* @__PURE__ */ s.jsx(
|
|
771
|
+
e[102] !== Me ? (t = /* @__PURE__ */ s.jsx(Ot, { children: Me }), e[102] = Me, e[103] = t) : t = e[103];
|
|
771
772
|
const d = t;
|
|
772
773
|
if (typeof document > "u") {
|
|
773
774
|
Te = d;
|
|
@@ -777,7 +778,7 @@ function Nr(n) {
|
|
|
777
778
|
e[104] !== d ? (a = Ct(d, document.body), e[104] = d, e[105] = a) : a = e[105], Te = a;
|
|
778
779
|
}
|
|
779
780
|
let Le;
|
|
780
|
-
e[106] !== St || e[107] !== Ce || e[108] !== Te ? (Le = /* @__PURE__ */ s.jsxs(
|
|
781
|
+
e[106] !== St || e[107] !== Ce || e[108] !== Te ? (Le = /* @__PURE__ */ s.jsxs(Ht, { sensors: St, collisionDetection: Bt, onDragStart: Et, onDragEnd: zt, onDragCancel: Dt, children: [
|
|
781
782
|
Ce,
|
|
782
783
|
Te
|
|
783
784
|
] }), e[106] = St, e[107] = Ce, e[108] = Te, e[109] = Le) : Le = e[109];
|
|
@@ -800,10 +801,10 @@ function Nr(n) {
|
|
|
800
801
|
Pe
|
|
801
802
|
] }), e[117] = kt, e[118] = ke, e[119] = je, e[120] = Se, e[121] = Le, e[122] = Ae, e[123] = Pe, e[124] = mt) : mt = e[124], mt;
|
|
802
803
|
}
|
|
803
|
-
function
|
|
804
|
+
function or(n) {
|
|
804
805
|
return n.id;
|
|
805
806
|
}
|
|
806
|
-
function
|
|
807
|
+
function ar(n) {
|
|
807
808
|
return {
|
|
808
809
|
file: {
|
|
809
810
|
id: n.id,
|
|
@@ -817,16 +818,16 @@ function or(n) {
|
|
|
817
818
|
fileName: n.fileName
|
|
818
819
|
};
|
|
819
820
|
}
|
|
820
|
-
function
|
|
821
|
+
function ir(n) {
|
|
821
822
|
return n === "image/*" || n.startsWith("image/");
|
|
822
823
|
}
|
|
823
|
-
function
|
|
824
|
+
function cr(n) {
|
|
824
825
|
return n.trim();
|
|
825
826
|
}
|
|
826
|
-
function
|
|
827
|
+
function ur(n) {
|
|
827
828
|
return n.status === "uploading";
|
|
828
829
|
}
|
|
829
|
-
function
|
|
830
|
+
function dr(n) {
|
|
830
831
|
const {
|
|
831
832
|
id: e,
|
|
832
833
|
url: r,
|
|
@@ -840,9 +841,6 @@ function ur(n) {
|
|
|
840
841
|
uploadKey: f
|
|
841
842
|
};
|
|
842
843
|
}
|
|
843
|
-
function dr(n) {
|
|
844
|
-
return n.id;
|
|
845
|
-
}
|
|
846
844
|
function fr(n) {
|
|
847
845
|
return n.id;
|
|
848
846
|
}
|
|
@@ -850,6 +848,9 @@ function mr(n) {
|
|
|
850
848
|
return n.id;
|
|
851
849
|
}
|
|
852
850
|
function pr(n) {
|
|
851
|
+
return n.id;
|
|
852
|
+
}
|
|
853
|
+
function hr(n) {
|
|
853
854
|
return {
|
|
854
855
|
...n,
|
|
855
856
|
previewUrl: n.url,
|
|
@@ -857,10 +858,10 @@ function pr(n) {
|
|
|
857
858
|
progress: 100
|
|
858
859
|
};
|
|
859
860
|
}
|
|
860
|
-
function
|
|
861
|
+
function gr() {
|
|
861
862
|
document.body.style.cursor = "";
|
|
862
863
|
}
|
|
863
|
-
function
|
|
864
|
+
function br(n) {
|
|
864
865
|
return {
|
|
865
866
|
...n,
|
|
866
867
|
previewUrl: n.url,
|
|
@@ -869,6 +870,6 @@ function gr(n) {
|
|
|
869
870
|
};
|
|
870
871
|
}
|
|
871
872
|
export {
|
|
872
|
-
|
|
873
|
+
Rr as FilesUploadField
|
|
873
874
|
};
|
|
874
875
|
//# sourceMappingURL=index15.js.map
|