@jfvilas/react-file-manager 1.0.11 → 1.0.13
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/react-file-manager.es.js +174 -199
- package/package.json +1 -1
|
@@ -592,7 +592,7 @@ class Ke extends Je {
|
|
|
592
592
|
}
|
|
593
593
|
const p = this.resolve(t, e);
|
|
594
594
|
let f = p == null ? void 0 : p.res;
|
|
595
|
-
const
|
|
595
|
+
const m = (p == null ? void 0 : p.usedKey) || a, h = (p == null ? void 0 : p.exactUsedKey) || a, v = ["[object Number]", "[object Function]", "[object RegExp]"], S = e.joinArrays !== void 0 ? e.joinArrays : this.options.joinArrays, N = !this.i18nFormat || this.i18nFormat.handleAsObject, M = e.count !== void 0 && !W(e.count), F = Ke.hasDefaultValue(e), A = M ? this.pluralResolver.getSuffix(d, e.count, e) : "", g = e.ordinal && M ? this.pluralResolver.getSuffix(d, e.count, {
|
|
596
596
|
ordinal: !1
|
|
597
597
|
}) : "", L = M && !e.ordinal && e.count === 0, b = L && e[`defaultValue${this.options.pluralSeparator}zero`] || e[`defaultValue${A}`] || e[`defaultValue${g}`] || e.defaultValue;
|
|
598
598
|
let w = f;
|
|
@@ -601,14 +601,14 @@ class Ke extends Je {
|
|
|
601
601
|
if (N && w && $ && v.indexOf(x) < 0 && !(W(S) && Array.isArray(w))) {
|
|
602
602
|
if (!e.returnObjects && !this.options.returnObjects) {
|
|
603
603
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
604
|
-
const C = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(
|
|
604
|
+
const C = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(m, w, {
|
|
605
605
|
...e,
|
|
606
606
|
ns: l
|
|
607
607
|
}) : `key '${a} (${this.language})' returned an object instead of string.`;
|
|
608
608
|
return s ? (p.res = C, p.usedParams = this.getUsedParamsDetails(e), p) : C;
|
|
609
609
|
}
|
|
610
610
|
if (i) {
|
|
611
|
-
const C = Array.isArray(w), P = C ? [] : {}, k = C ?
|
|
611
|
+
const C = Array.isArray(w), P = C ? [] : {}, k = C ? h : m;
|
|
612
612
|
for (const T in w)
|
|
613
613
|
if (Object.prototype.hasOwnProperty.call(w, T)) {
|
|
614
614
|
const U = `${k}${i}${T}`;
|
|
@@ -682,19 +682,19 @@ class Ke extends Je {
|
|
|
682
682
|
const p = W(t) && (((u = o == null ? void 0 : o.interpolation) == null ? void 0 : u.skipOnVariables) !== void 0 ? o.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
683
683
|
let f;
|
|
684
684
|
if (p) {
|
|
685
|
-
const
|
|
686
|
-
f =
|
|
685
|
+
const h = t.match(this.interpolator.nestingRegexp);
|
|
686
|
+
f = h && h.length;
|
|
687
687
|
}
|
|
688
|
-
let
|
|
689
|
-
if (this.options.interpolation.defaultVariables && (
|
|
688
|
+
let m = o.replace && !W(o.replace) ? o.replace : o;
|
|
689
|
+
if (this.options.interpolation.defaultVariables && (m = {
|
|
690
690
|
...this.options.interpolation.defaultVariables,
|
|
691
|
-
...
|
|
692
|
-
}), t = this.interpolator.interpolate(t,
|
|
693
|
-
const
|
|
691
|
+
...m
|
|
692
|
+
}), t = this.interpolator.interpolate(t, m, o.lng || this.language || s.usedLng, o), p) {
|
|
693
|
+
const h = t.match(this.interpolator.nestingRegexp), v = h && h.length;
|
|
694
694
|
f < v && (o.nest = !1);
|
|
695
695
|
}
|
|
696
696
|
!o.lng && s && s.res && (o.lng = this.language || s.usedLng), o.nest !== !1 && (t = this.interpolator.nest(t, function() {
|
|
697
|
-
for (var
|
|
697
|
+
for (var h = arguments.length, v = new Array(h), S = 0; S < h; S++)
|
|
698
698
|
v[S] = arguments[S];
|
|
699
699
|
return (i == null ? void 0 : i[0]) === v[0] && !o.context ? (a.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${e[0]}`), null) : a.translate(...v, e);
|
|
700
700
|
}, o)), o.interpolation && this.interpolator.reset();
|
|
@@ -716,7 +716,7 @@ class Ke extends Je {
|
|
|
716
716
|
s = u;
|
|
717
717
|
let p = d.namespaces;
|
|
718
718
|
this.options.fallbackNS && (p = p.concat(this.options.fallbackNS));
|
|
719
|
-
const f = e.count !== void 0 && !W(e.count),
|
|
719
|
+
const f = e.count !== void 0 && !W(e.count), m = f && !e.ordinal && e.count === 0, h = e.context !== void 0 && (W(e.context) || typeof e.context == "number") && e.context !== "", v = e.lngs ? e.lngs : this.languageUtils.toResolveHierarchy(e.lng || this.language, e.fallbackLng);
|
|
720
720
|
p.forEach((S) => {
|
|
721
721
|
var N, M;
|
|
722
722
|
this.isValidLookup(o) || (l = S, !Ot[`${v[0]}-${S}`] && ((N = this.utils) != null && N.hasLoadedNamespace) && !((M = this.utils) != null && M.hasLoadedNamespace(l)) && (Ot[`${v[0]}-${S}`] = !0, this.logger.warn(`key "${s}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), v.forEach((F) => {
|
|
@@ -730,9 +730,9 @@ class Ke extends Je {
|
|
|
730
730
|
let b;
|
|
731
731
|
f && (b = this.pluralResolver.getSuffix(F, e.count, e));
|
|
732
732
|
const w = `${this.options.pluralSeparator}zero`, $ = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
733
|
-
if (f && (A.push(u + b), e.ordinal && b.indexOf($) === 0 && A.push(u + b.replace($, this.options.pluralSeparator)),
|
|
733
|
+
if (f && (A.push(u + b), e.ordinal && b.indexOf($) === 0 && A.push(u + b.replace($, this.options.pluralSeparator)), m && A.push(u + w)), h) {
|
|
734
734
|
const x = `${u}${this.options.contextSeparator}${e.context}`;
|
|
735
|
-
A.push(x), f && (A.push(x + b), e.ordinal && b.indexOf($) === 0 && A.push(x + b.replace($, this.options.pluralSeparator)),
|
|
735
|
+
A.push(x), f && (A.push(x + b), e.ordinal && b.indexOf($) === 0 && A.push(x + b.replace($, this.options.pluralSeparator)), m && A.push(x + w));
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
738
|
let g;
|
|
@@ -935,14 +935,14 @@ class Eo {
|
|
|
935
935
|
unescapeSuffix: u,
|
|
936
936
|
unescapePrefix: p,
|
|
937
937
|
nestingPrefix: f,
|
|
938
|
-
nestingPrefixEscaped:
|
|
939
|
-
nestingSuffix:
|
|
938
|
+
nestingPrefixEscaped: m,
|
|
939
|
+
nestingSuffix: h,
|
|
940
940
|
nestingSuffixEscaped: v,
|
|
941
941
|
nestingOptionsSeparator: S,
|
|
942
942
|
maxReplaces: N,
|
|
943
943
|
alwaysFormat: M
|
|
944
944
|
} = t.interpolation;
|
|
945
|
-
this.escape = e !== void 0 ? e : wo, this.escapeValue = o !== void 0 ? o : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = i ? Se(i) : a || "{{", this.suffix = l ? Se(l) : r || "}}", this.formatSeparator = d || ",", this.unescapePrefix = u ? "" : p || "-", this.unescapeSuffix = this.unescapePrefix ? "" : u || "", this.nestingPrefix = f ? Se(f) :
|
|
945
|
+
this.escape = e !== void 0 ? e : wo, this.escapeValue = o !== void 0 ? o : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = i ? Se(i) : a || "{{", this.suffix = l ? Se(l) : r || "}}", this.formatSeparator = d || ",", this.unescapePrefix = u ? "" : p || "-", this.unescapeSuffix = this.unescapePrefix ? "" : u || "", this.nestingPrefix = f ? Se(f) : m || Se("$t("), this.nestingSuffix = h ? Se(h) : v || Se(")"), this.nestingOptionsSeparator = S || ",", this.maxReplaces = N || 1e3, this.alwaysFormat = M !== void 0 ? M : !1, this.resetRegExp();
|
|
946
946
|
}
|
|
947
947
|
reset() {
|
|
948
948
|
this.options && this.init(this.options);
|
|
@@ -952,18 +952,18 @@ class Eo {
|
|
|
952
952
|
this.regexp = t(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = t(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = t(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
|
|
953
953
|
}
|
|
954
954
|
interpolate(t, e, o, s) {
|
|
955
|
-
var
|
|
955
|
+
var m;
|
|
956
956
|
let i, a, l;
|
|
957
|
-
const r = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, d = (
|
|
958
|
-
if (
|
|
959
|
-
const M = jt(e, r,
|
|
957
|
+
const r = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, d = (h) => {
|
|
958
|
+
if (h.indexOf(this.formatSeparator) < 0) {
|
|
959
|
+
const M = jt(e, r, h, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
960
960
|
return this.alwaysFormat ? this.format(M, void 0, o, {
|
|
961
961
|
...s,
|
|
962
962
|
...e,
|
|
963
|
-
interpolationkey:
|
|
963
|
+
interpolationkey: h
|
|
964
964
|
}) : M;
|
|
965
965
|
}
|
|
966
|
-
const v =
|
|
966
|
+
const v = h.split(this.formatSeparator), S = v.shift().trim(), N = v.join(this.formatSeparator).trim();
|
|
967
967
|
return this.format(jt(e, r, S, this.options.keySeparator, this.options.ignoreJSONStructure), N, o, {
|
|
968
968
|
...s,
|
|
969
969
|
...e,
|
|
@@ -971,15 +971,15 @@ class Eo {
|
|
|
971
971
|
});
|
|
972
972
|
};
|
|
973
973
|
this.resetRegExp();
|
|
974
|
-
const u = (s == null ? void 0 : s.missingInterpolationHandler) || this.options.missingInterpolationHandler, p = ((
|
|
974
|
+
const u = (s == null ? void 0 : s.missingInterpolationHandler) || this.options.missingInterpolationHandler, p = ((m = s == null ? void 0 : s.interpolation) == null ? void 0 : m.skipOnVariables) !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
975
975
|
return [{
|
|
976
976
|
regex: this.regexpUnescape,
|
|
977
|
-
safeValue: (
|
|
977
|
+
safeValue: (h) => tt(h)
|
|
978
978
|
}, {
|
|
979
979
|
regex: this.regexp,
|
|
980
|
-
safeValue: (
|
|
981
|
-
}].forEach((
|
|
982
|
-
for (l = 0; i =
|
|
980
|
+
safeValue: (h) => this.escapeValue ? tt(this.escape(h)) : tt(h)
|
|
981
|
+
}].forEach((h) => {
|
|
982
|
+
for (l = 0; i = h.regex.exec(t); ) {
|
|
983
983
|
const v = i[1].trim();
|
|
984
984
|
if (a = d(v), a === void 0)
|
|
985
985
|
if (typeof u == "function") {
|
|
@@ -993,8 +993,8 @@ class Eo {
|
|
|
993
993
|
} else
|
|
994
994
|
this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`), a = "";
|
|
995
995
|
else !W(a) && !this.useRawValueToEscape && (a = zt(a));
|
|
996
|
-
const S =
|
|
997
|
-
if (t = t.replace(i[0], S), p ? (
|
|
996
|
+
const S = h.safeValue(a);
|
|
997
|
+
if (t = t.replace(i[0], S), p ? (h.regex.lastIndex += a.length, h.regex.lastIndex -= i[0].length) : h.regex.lastIndex = 0, l++, l >= this.maxReplaces)
|
|
998
998
|
break;
|
|
999
999
|
}
|
|
1000
1000
|
}), t;
|
|
@@ -1007,8 +1007,8 @@ class Eo {
|
|
|
1007
1007
|
const p = r.split(new RegExp(`${u}[ ]*{`));
|
|
1008
1008
|
let f = `{${p[1]}`;
|
|
1009
1009
|
r = p[0], f = this.interpolate(f, a);
|
|
1010
|
-
const
|
|
1011
|
-
(((
|
|
1010
|
+
const m = f.match(/'/g), h = f.match(/"/g);
|
|
1011
|
+
(((m == null ? void 0 : m.length) ?? 0) % 2 === 0 && !h || h.length % 2 !== 0) && (f = f.replace(/'/g, '"'));
|
|
1012
1012
|
try {
|
|
1013
1013
|
a = JSON.parse(f), d && (a = {
|
|
1014
1014
|
...d,
|
|
@@ -1134,14 +1134,14 @@ class To {
|
|
|
1134
1134
|
if (this.formats[d]) {
|
|
1135
1135
|
let f = l;
|
|
1136
1136
|
try {
|
|
1137
|
-
const
|
|
1138
|
-
f = this.formats[d](l,
|
|
1137
|
+
const m = ((p = s == null ? void 0 : s.formatParams) == null ? void 0 : p[s.interpolationkey]) || {}, h = m.locale || m.lng || s.locale || s.lng || o;
|
|
1138
|
+
f = this.formats[d](l, h, {
|
|
1139
1139
|
...u,
|
|
1140
1140
|
...s,
|
|
1141
|
-
...
|
|
1141
|
+
...m
|
|
1142
1142
|
});
|
|
1143
|
-
} catch (
|
|
1144
|
-
this.logger.warn(
|
|
1143
|
+
} catch (m) {
|
|
1144
|
+
this.logger.warn(m);
|
|
1145
1145
|
}
|
|
1146
1146
|
return f;
|
|
1147
1147
|
} else
|
|
@@ -1272,19 +1272,19 @@ class Lo extends Je {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
if (!(o == null || o === "")) {
|
|
1274
1274
|
if ((f = this.backend) != null && f.create) {
|
|
1275
|
-
const
|
|
1275
|
+
const m = {
|
|
1276
1276
|
...a,
|
|
1277
1277
|
isUpdate: i
|
|
1278
|
-
},
|
|
1279
|
-
if (
|
|
1278
|
+
}, h = this.backend.create.bind(this.backend);
|
|
1279
|
+
if (h.length < 6)
|
|
1280
1280
|
try {
|
|
1281
1281
|
let v;
|
|
1282
|
-
|
|
1282
|
+
h.length === 5 ? v = h(t, e, o, s, m) : v = h(t, e, o, s), v && typeof v.then == "function" ? v.then((S) => l(null, S)).catch(l) : l(null, v);
|
|
1283
1283
|
} catch (v) {
|
|
1284
1284
|
l(v);
|
|
1285
1285
|
}
|
|
1286
1286
|
else
|
|
1287
|
-
|
|
1287
|
+
h(t, e, o, s, l, m);
|
|
1288
1288
|
}
|
|
1289
1289
|
!t || !t[0] || this.store.addResource(t[0], e, o, s);
|
|
1290
1290
|
}
|
|
@@ -1394,16 +1394,16 @@ class ke extends Je {
|
|
|
1394
1394
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1395
1395
|
}), u && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (f.formatter = i(u), f.formatter.init(f, this.options), this.options.interpolation.format = f.formatter.format.bind(f.formatter)), f.interpolator = new Eo(this.options), f.utils = {
|
|
1396
1396
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1397
|
-
}, f.backendConnector = new Lo(i(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", function(
|
|
1398
|
-
for (var
|
|
1397
|
+
}, f.backendConnector = new Lo(i(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", function(m) {
|
|
1398
|
+
for (var h = arguments.length, v = new Array(h > 1 ? h - 1 : 0), S = 1; S < h; S++)
|
|
1399
1399
|
v[S - 1] = arguments[S];
|
|
1400
|
-
t.emit(
|
|
1401
|
-
}), this.modules.languageDetector && (f.languageDetector = i(this.modules.languageDetector), f.languageDetector.init && f.languageDetector.init(f, this.options.detection, this.options)), this.modules.i18nFormat && (f.i18nFormat = i(this.modules.i18nFormat), f.i18nFormat.init && f.i18nFormat.init(this)), this.translator = new Ke(this.services, this.options), this.translator.on("*", function(
|
|
1402
|
-
for (var
|
|
1400
|
+
t.emit(m, ...v);
|
|
1401
|
+
}), this.modules.languageDetector && (f.languageDetector = i(this.modules.languageDetector), f.languageDetector.init && f.languageDetector.init(f, this.options.detection, this.options)), this.modules.i18nFormat && (f.i18nFormat = i(this.modules.i18nFormat), f.i18nFormat.init && f.i18nFormat.init(this)), this.translator = new Ke(this.services, this.options), this.translator.on("*", function(m) {
|
|
1402
|
+
for (var h = arguments.length, v = new Array(h > 1 ? h - 1 : 0), S = 1; S < h; S++)
|
|
1403
1403
|
v[S - 1] = arguments[S];
|
|
1404
|
-
t.emit(
|
|
1405
|
-
}), this.modules.external.forEach((
|
|
1406
|
-
|
|
1404
|
+
t.emit(m, ...v);
|
|
1405
|
+
}), this.modules.external.forEach((m) => {
|
|
1406
|
+
m.init && m.init(this);
|
|
1407
1407
|
});
|
|
1408
1408
|
}
|
|
1409
1409
|
if (this.format = this.options.interpolation.format, o || (o = Me), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
@@ -1504,8 +1504,8 @@ class ke extends Je {
|
|
|
1504
1504
|
};
|
|
1505
1505
|
r.lng = r.lng || i.lng, r.lngs = r.lngs || i.lngs, r.ns = r.ns || i.ns, r.keyPrefix !== "" && (r.keyPrefix = r.keyPrefix || o || i.keyPrefix);
|
|
1506
1506
|
const f = s.options.keySeparator || ".";
|
|
1507
|
-
let
|
|
1508
|
-
return r.keyPrefix && Array.isArray(a) ?
|
|
1507
|
+
let m;
|
|
1508
|
+
return r.keyPrefix && Array.isArray(a) ? m = a.map((h) => `${r.keyPrefix}${f}${h}`) : m = r.keyPrefix ? `${r.keyPrefix}${f}${a}` : a, s.t(m, r);
|
|
1509
1509
|
};
|
|
1510
1510
|
return W(t) ? i.lng = t : i.lngs = t, i.ns = e, i.keyPrefix = o, i;
|
|
1511
1511
|
}
|
|
@@ -2717,8 +2717,8 @@ const Ro = "مجلد جديد", ko = "رفع", Oo = "لصق", Mo = "تغيير
|
|
|
2717
2717
|
u = p - f;
|
|
2718
2718
|
break;
|
|
2719
2719
|
case "modified":
|
|
2720
|
-
const
|
|
2721
|
-
u =
|
|
2720
|
+
const m = r.updatedAt ? new Date(r.updatedAt).getTime() : 0, h = d.updatedAt ? new Date(d.updatedAt).getTime() : 0;
|
|
2721
|
+
u = m - h;
|
|
2722
2722
|
break;
|
|
2723
2723
|
default:
|
|
2724
2724
|
u = r.name.localeCompare(d.name);
|
|
@@ -2730,13 +2730,13 @@ const Ro = "مجلد جديد", ko = "رفع", Oo = "لصق", Mo = "تغيير
|
|
|
2730
2730
|
const { files: o } = Ze(), s = ae(!1), [i, a] = O(""), [l, r] = O(null), [d, u] = O([]), [p, f] = O({ key: "name", direction: "asc" });
|
|
2731
2731
|
return ee(() => {
|
|
2732
2732
|
Array.isArray(o) && o.length > 0 ? (u(() => {
|
|
2733
|
-
const
|
|
2734
|
-
return n$(
|
|
2735
|
-
}), r(() => o.find((
|
|
2733
|
+
const m = o.filter((h) => h.path === `${i}/${h.name}`);
|
|
2734
|
+
return n$(m, p.key, p.direction);
|
|
2735
|
+
}), r(() => o.find((m) => m.path === i) ?? null)) : (u([]), r(null));
|
|
2736
2736
|
}, [o, i, p]), ee(() => {
|
|
2737
2737
|
if (!s.current && Array.isArray(o) && o.length > 0) {
|
|
2738
|
-
const
|
|
2739
|
-
a(
|
|
2738
|
+
const m = o.some((h) => h.isDirectory && h.path === t) ? t : "";
|
|
2739
|
+
a(m), s.current = !0;
|
|
2740
2740
|
}
|
|
2741
2741
|
}, [o]), /* @__PURE__ */ c(
|
|
2742
2742
|
Pn.Provider,
|
|
@@ -2789,7 +2789,7 @@ const Ro = "مجلد جديد", ko = "رفع", Oo = "لصق", Mo = "تغيير
|
|
|
2789
2789
|
return /* @__PURE__ */ c(zn.Provider, { value: { clipBoard: s, setClipBoard: i, handleCutCopy: r, handlePasting: d }, children: n });
|
|
2790
2790
|
}, Xe = () => Te(zn), Ln = ({ onLayoutChange: n, onRefresh: t, triggerAction: e, permissions: o }) => {
|
|
2791
2791
|
var A;
|
|
2792
|
-
const [s, i] = O(!1), { currentFolder: a } = he(), { selectedFiles: l, setSelectedFiles: r, handleDownload: d } = $e(), { clipBoard: u, setClipBoard: p, handleCutCopy: f, handlePasting:
|
|
2792
|
+
const [s, i] = O(!1), { currentFolder: a } = he(), { selectedFiles: l, setSelectedFiles: r, handleDownload: d } = $e(), { clipBoard: u, setClipBoard: p, handleCutCopy: f, handlePasting: m } = Xe(), { activeLayout: h } = we(), v = ce(), S = [
|
|
2793
2793
|
{
|
|
2794
2794
|
icon: /* @__PURE__ */ c(mn, { size: 17, strokeWidth: 0.3 }),
|
|
2795
2795
|
text: v("newFolder"),
|
|
@@ -2810,7 +2810,7 @@ const Ro = "مجلد جديد", ko = "رفع", Oo = "لصق", Mo = "تغيير
|
|
|
2810
2810
|
}
|
|
2811
2811
|
], N = [
|
|
2812
2812
|
{
|
|
2813
|
-
icon:
|
|
2813
|
+
icon: h === "grid" ? /* @__PURE__ */ c(gn, { size: 16 }) : /* @__PURE__ */ c(He, { size: 16 }),
|
|
2814
2814
|
title: v("changeView"),
|
|
2815
2815
|
onClick: () => i((g) => !g)
|
|
2816
2816
|
},
|
|
@@ -2823,7 +2823,7 @@ const Ro = "مجلد جديد", ko = "رفع", Oo = "لصق", Mo = "تغيير
|
|
|
2823
2823
|
}
|
|
2824
2824
|
];
|
|
2825
2825
|
function M() {
|
|
2826
|
-
|
|
2826
|
+
m(a);
|
|
2827
2827
|
}
|
|
2828
2828
|
const F = () => {
|
|
2829
2829
|
d(), r([]);
|
|
@@ -3087,7 +3087,7 @@ function C$({
|
|
|
3087
3087
|
const r = An(e), d = v$(a ? `${a}` : void 0), [u, p] = c$(
|
|
3088
3088
|
o,
|
|
3089
3089
|
s
|
|
3090
|
-
), f = ae(u), [
|
|
3090
|
+
), f = ae(u), [m, h] = O(!1), v = u$(), S = i ?? v, N = ae(), M = ae(), F = ae(null), [A, g] = O(null);
|
|
3091
3091
|
b$(F);
|
|
3092
3092
|
const L = `${l.collapsedHeight || 0}px`;
|
|
3093
3093
|
function b(w) {
|
|
@@ -3113,11 +3113,11 @@ function C$({
|
|
|
3113
3113
|
overflow: "",
|
|
3114
3114
|
transition: "",
|
|
3115
3115
|
display: ""
|
|
3116
|
-
}), r("expandEnd")) : (b({ transition: "" }), r("collapseEnd")),
|
|
3116
|
+
}), r("expandEnd")) : (b({ transition: "" }), r("collapseEnd")), h(!1);
|
|
3117
3117
|
}
|
|
3118
3118
|
M.current && Wt(M.current), M.current = $$(k, P);
|
|
3119
3119
|
};
|
|
3120
|
-
return
|
|
3120
|
+
return h(!0), u ? N.current = requestAnimationFrame(() => {
|
|
3121
3121
|
r("expandStart"), b({
|
|
3122
3122
|
display: "block",
|
|
3123
3123
|
overflow: "hidden",
|
|
@@ -3193,7 +3193,7 @@ function C$({
|
|
|
3193
3193
|
[x || "ref"]: Kt(F, C),
|
|
3194
3194
|
style: {
|
|
3195
3195
|
boxSizing: "border-box",
|
|
3196
|
-
...!
|
|
3196
|
+
...!m && !u ? {
|
|
3197
3197
|
// collapsed and not animating
|
|
3198
3198
|
display: L === "0px" ? "none" : "block",
|
|
3199
3199
|
height: L,
|
|
@@ -3231,51 +3231,26 @@ const Rn = ({ folder: n, onFileOpen: t, icons: e }) => {
|
|
|
3231
3231
|
const [o, s] = O(!1), [i, a] = O(!1), { currentPath: l, setCurrentPath: r, onFolderChange: d } = he(), u = () => {
|
|
3232
3232
|
a(!0), t(n), r(n.path), d == null || d(n.path);
|
|
3233
3233
|
}, p = (f) => {
|
|
3234
|
-
f.stopPropagation(), s((
|
|
3234
|
+
f.stopPropagation(), s((m) => !m);
|
|
3235
3235
|
};
|
|
3236
3236
|
return ee(() => {
|
|
3237
|
-
a(l === n.path);
|
|
3238
|
-
const f = l.split("/");
|
|
3239
|
-
f.pop(), f.join("/") === n.path && s(!0);
|
|
3237
|
+
a(l === n.path), l.split("/").pop(), l.startsWith(n.path) && s(!0);
|
|
3240
3238
|
}, [l]), n.subDirectories.length > 0 ? /* @__PURE__ */ R(pe, { children: [
|
|
3241
|
-
/* @__PURE__ */ R(
|
|
3242
|
-
"
|
|
3243
|
-
{
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
//{isOpen || isActive ? (
|
|
3257
|
-
n.class && e && e.get(n.class) ? e.get(n.class).open || e.get(n.class).default : /* @__PURE__ */ c(qt, { size: 20, className: "folder-open-icon" })
|
|
3258
|
-
) : n.class && e && e.get(n.class) ? e.get(n.class).closed || e.get(n.class).default : /* @__PURE__ */ c(_t, { size: 17, className: "folder-close-icon" }),
|
|
3259
|
-
/* @__PURE__ */ c("span", { className: "sb-folder-name", title: n.name, children: n.name })
|
|
3260
|
-
] })
|
|
3261
|
-
]
|
|
3262
|
-
}
|
|
3263
|
-
),
|
|
3264
|
-
/* @__PURE__ */ c(S$, { open: o, children: /* @__PURE__ */ c("div", { className: "folder-collapsible", children: n.subDirectories.map((f, h) => /* @__PURE__ */ c(Rn, { folder: f, onFileOpen: t, icons: e }, h)) }) })
|
|
3265
|
-
] }) : /* @__PURE__ */ R(
|
|
3266
|
-
"div",
|
|
3267
|
-
{
|
|
3268
|
-
className: `sb-folders-list-item ${i ? "active-list-item" : ""}`,
|
|
3269
|
-
onClick: u,
|
|
3270
|
-
children: [
|
|
3271
|
-
/* @__PURE__ */ c("span", { className: "non-expanable" }),
|
|
3272
|
-
/* @__PURE__ */ R("div", { className: "sb-folder-details", children: [
|
|
3273
|
-
i ? n.class && e && e.get(n.class) ? e.get(n.class).open || e.get(n.class).default : /* @__PURE__ */ c(qt, { size: 20, className: "folder-open-icon" }) : n.class && e && e.get(n.class) ? e.get(n.class).closed || e.get(n.class).default : /* @__PURE__ */ c(_t, { size: 17, className: "folder-close-icon" }),
|
|
3274
|
-
/* @__PURE__ */ c("span", { className: "sb-folder-name", title: n.name, children: n.name })
|
|
3275
|
-
] })
|
|
3276
|
-
]
|
|
3277
|
-
}
|
|
3278
|
-
);
|
|
3239
|
+
/* @__PURE__ */ R("div", { onClick: u, className: `sb-folders-list-item ${i ? "active-list-item" : ""}`, children: [
|
|
3240
|
+
/* @__PURE__ */ c("span", { onClick: p, children: /* @__PURE__ */ c(no, { size: 20, className: `folder-icon-default ${o ? "folder-rotate-down" : ""}` }) }),
|
|
3241
|
+
/* @__PURE__ */ R("div", { className: "sb-folder-details", children: [
|
|
3242
|
+
o ? n.class && e && e.get(n.class) ? e.get(n.class).open || e.get(n.class).default : /* @__PURE__ */ c(qt, { size: 20, className: "folder-open-icon" }) : n.class && e && e.get(n.class) ? e.get(n.class).closed || e.get(n.class).default : /* @__PURE__ */ c(_t, { size: 17, className: "folder-close-icon" }),
|
|
3243
|
+
/* @__PURE__ */ c("span", { className: "sb-folder-name", title: n.name, children: n.name })
|
|
3244
|
+
] })
|
|
3245
|
+
] }),
|
|
3246
|
+
/* @__PURE__ */ c(S$, { open: o, children: /* @__PURE__ */ c("div", { className: "folder-collapsible", children: n.subDirectories.map((f, m) => /* @__PURE__ */ c(Rn, { folder: f, onFileOpen: t, icons: e }, m)) }) })
|
|
3247
|
+
] }) : /* @__PURE__ */ R("div", { onClick: u, className: `sb-folders-list-item ${i ? "active-list-item" : ""}`, children: [
|
|
3248
|
+
/* @__PURE__ */ c("span", { className: "non-expanable" }),
|
|
3249
|
+
/* @__PURE__ */ R("div", { className: "sb-folder-details", children: [
|
|
3250
|
+
i ? n.class && e && e.get(n.class) ? e.get(n.class).open || e.get(n.class).default : /* @__PURE__ */ c(qt, { size: 20, className: "folder-open-icon" }) : n.class && e && e.get(n.class) ? e.get(n.class).closed || e.get(n.class).default : /* @__PURE__ */ c(_t, { size: 17, className: "folder-close-icon" }),
|
|
3251
|
+
/* @__PURE__ */ c("span", { className: "sb-folder-name", title: n.name, children: n.name })
|
|
3252
|
+
] })
|
|
3253
|
+
] });
|
|
3279
3254
|
}, E$ = (n) => n == null ? void 0 : n.split("/").slice(0, -1).join("/"), kn = ({ onFileOpen: n, icons: t }) => {
|
|
3280
3255
|
const [e, o] = O([]), { files: s } = Ze(), i = ce(), a = (l, r) => {
|
|
3281
3256
|
var d;
|
|
@@ -3308,7 +3283,7 @@ var Gt;
|
|
|
3308
3283
|
function T$() {
|
|
3309
3284
|
if (Gt) return te;
|
|
3310
3285
|
Gt = 1;
|
|
3311
|
-
var n = typeof Symbol == "function" && Symbol.for, t = n ? Symbol.for("react.element") : 60103, e = n ? Symbol.for("react.portal") : 60106, o = n ? Symbol.for("react.fragment") : 60107, s = n ? Symbol.for("react.strict_mode") : 60108, i = n ? Symbol.for("react.profiler") : 60114, a = n ? Symbol.for("react.provider") : 60109, l = n ? Symbol.for("react.context") : 60110, r = n ? Symbol.for("react.async_mode") : 60111, d = n ? Symbol.for("react.concurrent_mode") : 60111, u = n ? Symbol.for("react.forward_ref") : 60112, p = n ? Symbol.for("react.suspense") : 60113, f = n ? Symbol.for("react.suspense_list") : 60120,
|
|
3286
|
+
var n = typeof Symbol == "function" && Symbol.for, t = n ? Symbol.for("react.element") : 60103, e = n ? Symbol.for("react.portal") : 60106, o = n ? Symbol.for("react.fragment") : 60107, s = n ? Symbol.for("react.strict_mode") : 60108, i = n ? Symbol.for("react.profiler") : 60114, a = n ? Symbol.for("react.provider") : 60109, l = n ? Symbol.for("react.context") : 60110, r = n ? Symbol.for("react.async_mode") : 60111, d = n ? Symbol.for("react.concurrent_mode") : 60111, u = n ? Symbol.for("react.forward_ref") : 60112, p = n ? Symbol.for("react.suspense") : 60113, f = n ? Symbol.for("react.suspense_list") : 60120, m = n ? Symbol.for("react.memo") : 60115, h = n ? Symbol.for("react.lazy") : 60116, v = n ? Symbol.for("react.block") : 60121, S = n ? Symbol.for("react.fundamental") : 60117, N = n ? Symbol.for("react.responder") : 60118, M = n ? Symbol.for("react.scope") : 60119;
|
|
3312
3287
|
function F(g) {
|
|
3313
3288
|
if (typeof g == "object" && g !== null) {
|
|
3314
3289
|
var L = g.$$typeof;
|
|
@@ -3326,8 +3301,8 @@ function T$() {
|
|
|
3326
3301
|
switch (g = g && g.$$typeof, g) {
|
|
3327
3302
|
case l:
|
|
3328
3303
|
case u:
|
|
3329
|
-
case m:
|
|
3330
3304
|
case h:
|
|
3305
|
+
case m:
|
|
3331
3306
|
case a:
|
|
3332
3307
|
return g;
|
|
3333
3308
|
default:
|
|
@@ -3342,7 +3317,7 @@ function T$() {
|
|
|
3342
3317
|
function A(g) {
|
|
3343
3318
|
return F(g) === d;
|
|
3344
3319
|
}
|
|
3345
|
-
return te.AsyncMode = r, te.ConcurrentMode = d, te.ContextConsumer = l, te.ContextProvider = a, te.Element = t, te.ForwardRef = u, te.Fragment = o, te.Lazy =
|
|
3320
|
+
return te.AsyncMode = r, te.ConcurrentMode = d, te.ContextConsumer = l, te.ContextProvider = a, te.Element = t, te.ForwardRef = u, te.Fragment = o, te.Lazy = h, te.Memo = m, te.Portal = e, te.Profiler = i, te.StrictMode = s, te.Suspense = p, te.isAsyncMode = function(g) {
|
|
3346
3321
|
return A(g) || F(g) === r;
|
|
3347
3322
|
}, te.isConcurrentMode = A, te.isContextConsumer = function(g) {
|
|
3348
3323
|
return F(g) === l;
|
|
@@ -3355,9 +3330,9 @@ function T$() {
|
|
|
3355
3330
|
}, te.isFragment = function(g) {
|
|
3356
3331
|
return F(g) === o;
|
|
3357
3332
|
}, te.isLazy = function(g) {
|
|
3358
|
-
return F(g) === m;
|
|
3359
|
-
}, te.isMemo = function(g) {
|
|
3360
3333
|
return F(g) === h;
|
|
3334
|
+
}, te.isMemo = function(g) {
|
|
3335
|
+
return F(g) === m;
|
|
3361
3336
|
}, te.isPortal = function(g) {
|
|
3362
3337
|
return F(g) === e;
|
|
3363
3338
|
}, te.isProfiler = function(g) {
|
|
@@ -3367,7 +3342,7 @@ function T$() {
|
|
|
3367
3342
|
}, te.isSuspense = function(g) {
|
|
3368
3343
|
return F(g) === p;
|
|
3369
3344
|
}, te.isValidElementType = function(g) {
|
|
3370
|
-
return typeof g == "string" || typeof g == "function" || g === o || g === d || g === i || g === s || g === p || g === f || typeof g == "object" && g !== null && (g.$$typeof ===
|
|
3345
|
+
return typeof g == "string" || typeof g == "function" || g === o || g === d || g === i || g === s || g === p || g === f || typeof g == "object" && g !== null && (g.$$typeof === h || g.$$typeof === m || g.$$typeof === a || g.$$typeof === l || g.$$typeof === u || g.$$typeof === S || g.$$typeof === N || g.$$typeof === M || g.$$typeof === v);
|
|
3371
3346
|
}, te.typeOf = F, te;
|
|
3372
3347
|
}
|
|
3373
3348
|
var ne = {};
|
|
@@ -3382,10 +3357,10 @@ var ne = {};
|
|
|
3382
3357
|
var Jt;
|
|
3383
3358
|
function z$() {
|
|
3384
3359
|
return Jt || (Jt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
3385
|
-
var n = typeof Symbol == "function" && Symbol.for, t = n ? Symbol.for("react.element") : 60103, e = n ? Symbol.for("react.portal") : 60106, o = n ? Symbol.for("react.fragment") : 60107, s = n ? Symbol.for("react.strict_mode") : 60108, i = n ? Symbol.for("react.profiler") : 60114, a = n ? Symbol.for("react.provider") : 60109, l = n ? Symbol.for("react.context") : 60110, r = n ? Symbol.for("react.async_mode") : 60111, d = n ? Symbol.for("react.concurrent_mode") : 60111, u = n ? Symbol.for("react.forward_ref") : 60112, p = n ? Symbol.for("react.suspense") : 60113, f = n ? Symbol.for("react.suspense_list") : 60120,
|
|
3360
|
+
var n = typeof Symbol == "function" && Symbol.for, t = n ? Symbol.for("react.element") : 60103, e = n ? Symbol.for("react.portal") : 60106, o = n ? Symbol.for("react.fragment") : 60107, s = n ? Symbol.for("react.strict_mode") : 60108, i = n ? Symbol.for("react.profiler") : 60114, a = n ? Symbol.for("react.provider") : 60109, l = n ? Symbol.for("react.context") : 60110, r = n ? Symbol.for("react.async_mode") : 60111, d = n ? Symbol.for("react.concurrent_mode") : 60111, u = n ? Symbol.for("react.forward_ref") : 60112, p = n ? Symbol.for("react.suspense") : 60113, f = n ? Symbol.for("react.suspense_list") : 60120, m = n ? Symbol.for("react.memo") : 60115, h = n ? Symbol.for("react.lazy") : 60116, v = n ? Symbol.for("react.block") : 60121, S = n ? Symbol.for("react.fundamental") : 60117, N = n ? Symbol.for("react.responder") : 60118, M = n ? Symbol.for("react.scope") : 60119;
|
|
3386
3361
|
function F(E) {
|
|
3387
3362
|
return typeof E == "string" || typeof E == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
3388
|
-
E === o || E === d || E === i || E === s || E === p || E === f || typeof E == "object" && E !== null && (E.$$typeof ===
|
|
3363
|
+
E === o || E === d || E === i || E === s || E === p || E === f || typeof E == "object" && E !== null && (E.$$typeof === h || E.$$typeof === m || E.$$typeof === a || E.$$typeof === l || E.$$typeof === u || E.$$typeof === S || E.$$typeof === N || E.$$typeof === M || E.$$typeof === v);
|
|
3389
3364
|
}
|
|
3390
3365
|
function A(E) {
|
|
3391
3366
|
if (typeof E == "object" && E !== null) {
|
|
@@ -3406,8 +3381,8 @@ function z$() {
|
|
|
3406
3381
|
switch (ze) {
|
|
3407
3382
|
case l:
|
|
3408
3383
|
case u:
|
|
3409
|
-
case m:
|
|
3410
3384
|
case h:
|
|
3385
|
+
case m:
|
|
3411
3386
|
case a:
|
|
3412
3387
|
return ze;
|
|
3413
3388
|
default:
|
|
@@ -3419,7 +3394,7 @@ function z$() {
|
|
|
3419
3394
|
}
|
|
3420
3395
|
}
|
|
3421
3396
|
}
|
|
3422
|
-
var g = r, L = d, b = l, w = a, $ = t, x = u, C = o, P =
|
|
3397
|
+
var g = r, L = d, b = l, w = a, $ = t, x = u, C = o, P = h, k = m, T = e, U = i, q = s, Q = p, ie = !1;
|
|
3423
3398
|
function _(E) {
|
|
3424
3399
|
return ie || (ie = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), y(E) || A(E) === r;
|
|
3425
3400
|
}
|
|
@@ -3442,10 +3417,10 @@ function z$() {
|
|
|
3442
3417
|
return A(E) === o;
|
|
3443
3418
|
}
|
|
3444
3419
|
function Y(E) {
|
|
3445
|
-
return A(E) ===
|
|
3420
|
+
return A(E) === h;
|
|
3446
3421
|
}
|
|
3447
3422
|
function K(E) {
|
|
3448
|
-
return A(E) ===
|
|
3423
|
+
return A(E) === m;
|
|
3449
3424
|
}
|
|
3450
3425
|
function J(E) {
|
|
3451
3426
|
return A(E) === e;
|
|
@@ -3558,16 +3533,16 @@ function A$() {
|
|
|
3558
3533
|
throw f.name = "Invariant Violation", f;
|
|
3559
3534
|
}
|
|
3560
3535
|
p = i[u](a, u, r, l, null, t);
|
|
3561
|
-
} catch (
|
|
3562
|
-
p =
|
|
3536
|
+
} catch (h) {
|
|
3537
|
+
p = h;
|
|
3563
3538
|
}
|
|
3564
3539
|
if (p && !(p instanceof Error) && n(
|
|
3565
3540
|
(r || "React class") + ": type specification of " + l + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof p + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
3566
3541
|
), p instanceof Error && !(p.message in e)) {
|
|
3567
3542
|
e[p.message] = !0;
|
|
3568
|
-
var
|
|
3543
|
+
var m = d ? d() : "";
|
|
3569
3544
|
n(
|
|
3570
|
-
"Failed " + l + " type: " + p.message + (
|
|
3545
|
+
"Failed " + l + " type: " + p.message + (m ?? "")
|
|
3571
3546
|
);
|
|
3572
3547
|
}
|
|
3573
3548
|
}
|
|
@@ -3601,7 +3576,7 @@ function R$() {
|
|
|
3601
3576
|
if (typeof z == "function")
|
|
3602
3577
|
return z;
|
|
3603
3578
|
}
|
|
3604
|
-
var f = "<<anonymous>>",
|
|
3579
|
+
var f = "<<anonymous>>", m = {
|
|
3605
3580
|
array: N("array"),
|
|
3606
3581
|
bigint: N("bigint"),
|
|
3607
3582
|
bool: N("boolean"),
|
|
@@ -3622,7 +3597,7 @@ function R$() {
|
|
|
3622
3597
|
shape: P,
|
|
3623
3598
|
exact: k
|
|
3624
3599
|
};
|
|
3625
|
-
function
|
|
3600
|
+
function h(y, z) {
|
|
3626
3601
|
return y === z ? y !== 0 || 1 / y === 1 / z : y !== y && z !== z;
|
|
3627
3602
|
}
|
|
3628
3603
|
function v(y, z) {
|
|
@@ -3726,7 +3701,7 @@ function R$() {
|
|
|
3726
3701
|
) : i("Invalid argument supplied to oneOf, expected an array.")), a;
|
|
3727
3702
|
function z(B, j, V, G, Y) {
|
|
3728
3703
|
for (var K = B[j], J = 0; J < y.length; J++)
|
|
3729
|
-
if (
|
|
3704
|
+
if (h(K, y[J]))
|
|
3730
3705
|
return null;
|
|
3731
3706
|
var Z = JSON.stringify(y, function(oe, E) {
|
|
3732
3707
|
var re = Q(E);
|
|
@@ -3895,7 +3870,7 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
|
|
|
3895
3870
|
function _(y) {
|
|
3896
3871
|
return !y.constructor || !y.constructor.name ? f : y.constructor.name;
|
|
3897
3872
|
}
|
|
3898
|
-
return
|
|
3873
|
+
return m.checkPropTypes = s, m.resetWarningCache = s.resetWarningCache, m.PropTypes = m, m;
|
|
3899
3874
|
}, rt;
|
|
3900
3875
|
}
|
|
3901
3876
|
var lt, on;
|
|
@@ -3965,7 +3940,7 @@ function D$(n) {
|
|
|
3965
3940
|
return H({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" }, child: [] }, { tag: "path", attr: { d: "M9 4v16" }, child: [] }, { tag: "path", attr: { d: "M14 10l2 2l-2 2" }, child: [] }] })(n);
|
|
3966
3941
|
}
|
|
3967
3942
|
const gt = ({ collapsibleNav: n, isNavigationPaneOpen: t, setNavigationPaneOpen: e }) => {
|
|
3968
|
-
const [o, s] = O([]), [i, a] = O([]), [l, r] = O([]), [d, u] = O(!1), { currentPath: p, setCurrentPath: f, onFolderChange:
|
|
3943
|
+
const [o, s] = O([]), [i, a] = O([]), [l, r] = O([]), [d, u] = O(!1), { currentPath: p, setCurrentPath: f, onFolderChange: m } = he(), h = ae(null), v = ae([]), S = ae(null), N = Oe(() => {
|
|
3969
3944
|
u(!1);
|
|
3970
3945
|
}), M = ce(), F = ae(null);
|
|
3971
3946
|
ee(() => {
|
|
@@ -3978,16 +3953,16 @@ const gt = ({ collapsibleNav: n, isNavigationPaneOpen: t, setNavigationPaneOpen:
|
|
|
3978
3953
|
}), a([]), r([]);
|
|
3979
3954
|
}, [p, M]);
|
|
3980
3955
|
const A = (w) => {
|
|
3981
|
-
f(w),
|
|
3956
|
+
f(w), m == null || m(w);
|
|
3982
3957
|
}, g = () => {
|
|
3983
3958
|
var q;
|
|
3984
|
-
const w =
|
|
3959
|
+
const w = h.current.clientWidth, $ = getComputedStyle(h.current), x = parseFloat($.paddingLeft), C = n ? 2 : 0, k = n ? ((q = F.current) == null ? void 0 : q.clientWidth) + 1 : 0, T = i.length > 0 ? 1 : 0, U = parseFloat($.gap) * (o.length + T + C);
|
|
3985
3960
|
return w - (x + U + k);
|
|
3986
3961
|
}, L = () => {
|
|
3987
3962
|
var C;
|
|
3988
3963
|
const w = g(), $ = v.current.reduce((P, k) => k ? P + k.clientWidth : P, 0), x = ((C = S.current) == null ? void 0 : C.clientWidth) || 0;
|
|
3989
3964
|
return w - ($ + x);
|
|
3990
|
-
}, b = () =>
|
|
3965
|
+
}, b = () => h.current.scrollWidth > h.current.clientWidth;
|
|
3991
3966
|
return ee(() => {
|
|
3992
3967
|
var w;
|
|
3993
3968
|
if (b()) {
|
|
@@ -3998,7 +3973,7 @@ const gt = ({ collapsibleNav: n, isNavigationPaneOpen: t, setNavigationPaneOpen:
|
|
|
3998
3973
|
s($), a((x) => x.slice(0, -1)), r((x) => x.slice(0, -1));
|
|
3999
3974
|
}
|
|
4000
3975
|
}, [b]), /* @__PURE__ */ R("div", { className: "bread-crumb-container", children: [
|
|
4001
|
-
/* @__PURE__ */ R("div", { className: "breadcrumb", ref:
|
|
3976
|
+
/* @__PURE__ */ R("div", { className: "breadcrumb", ref: h, children: [
|
|
4002
3977
|
n && /* @__PURE__ */ R(pe, { children: [
|
|
4003
3978
|
/* @__PURE__ */ c(
|
|
4004
3979
|
"div",
|
|
@@ -4125,7 +4100,7 @@ const _e = (n) => ({
|
|
|
4125
4100
|
rows: l
|
|
4126
4101
|
}
|
|
4127
4102
|
), Un = ({ message: n, xPlacement: t, yPlacement: e }) => /* @__PURE__ */ c("p", { className: `error-tooltip ${t} ${e}`, children: n }), U$ = 220, j$ = ({ filesViewRef: n, file: t, onCreateFolder: e, triggerAction: o }) => {
|
|
4128
|
-
const [s, i] = O(t.name), [a, l] = O(!1), [r, d] = O(""), [u, p] = O("right"), [f,
|
|
4103
|
+
const [s, i] = O(t.name), [a, l] = O(!1), [r, d] = O(""), [u, p] = O("right"), [f, m] = O("bottom"), h = Oe((b) => {
|
|
4129
4104
|
b.preventDefault(), b.stopPropagation();
|
|
4130
4105
|
}), { currentFolder: v, currentPathFiles: S, setCurrentPathFiles: N } = he(), { activeLayout: M } = we(), F = ce(), A = (b) => {
|
|
4131
4106
|
i(b.target.value), l(!1);
|
|
@@ -4153,25 +4128,25 @@ const _e = (n) => ({
|
|
|
4153
4128
|
let b = s.trim();
|
|
4154
4129
|
const w = S.filter((P) => !(P.key && P.key === t.key));
|
|
4155
4130
|
if (w.find((P) => P.name.toLowerCase() === b.toLowerCase())) {
|
|
4156
|
-
d(F("folderExists", { renameFile: b })), l(!0), (x =
|
|
4131
|
+
d(F("folderExists", { renameFile: b })), l(!0), (x = h.ref.current) == null || x.focus(), (C = h.ref.current) == null || C.select(), h.setIsClicked(!1);
|
|
4157
4132
|
return;
|
|
4158
4133
|
}
|
|
4159
4134
|
b === "" && (b = In("New Folder", !0, w)), xe(e, "onCreateFolder", b, v), N((P) => P.filter((k) => k.key !== t.key)), o.close();
|
|
4160
4135
|
}
|
|
4161
4136
|
return ee(() => {
|
|
4162
4137
|
var b, w, $;
|
|
4163
|
-
if ((b =
|
|
4164
|
-
const k = n.current.getBoundingClientRect(), T =
|
|
4165
|
-
k.right - U.left > 313 ? p("right") : p("left"), k.bottom - (U.top + T.clientHeight) > 88 ?
|
|
4138
|
+
if ((b = h.ref.current) == null || b.focus(), (w = h.ref.current) == null || w.select(), ($ = h.ref) != null && $.current) {
|
|
4139
|
+
const k = n.current.getBoundingClientRect(), T = h.ref.current, U = T.getBoundingClientRect();
|
|
4140
|
+
k.right - U.left > 313 ? p("right") : p("left"), k.bottom - (U.top + T.clientHeight) > 88 ? m("bottom") : m("top");
|
|
4166
4141
|
}
|
|
4167
4142
|
}, []), ee(() => {
|
|
4168
|
-
|
|
4169
|
-
}, [
|
|
4143
|
+
h.isClicked && L();
|
|
4144
|
+
}, [h.isClicked]), /* @__PURE__ */ R(pe, { children: [
|
|
4170
4145
|
/* @__PURE__ */ c(
|
|
4171
4146
|
Dn,
|
|
4172
4147
|
{
|
|
4173
4148
|
id: "newFolder",
|
|
4174
|
-
nameInputRef:
|
|
4149
|
+
nameInputRef: h.ref,
|
|
4175
4150
|
maxLength: U$,
|
|
4176
4151
|
value: s,
|
|
4177
4152
|
onChange: A,
|
|
@@ -4241,7 +4216,7 @@ const jn = ({
|
|
|
4241
4216
|
}
|
|
4242
4217
|
);
|
|
4243
4218
|
}, Ne = (n) => n.split(".").pop(), V$ = 220, B$ = ({ filesViewRef: n, file: t, onRename: e, triggerAction: o }) => {
|
|
4244
|
-
const [s, i] = O(t == null ? void 0 : t.name), [a, l] = O(!1), [r, d] = O(!1), [u, p] = O(""), [f,
|
|
4219
|
+
const [s, i] = O(t == null ? void 0 : t.name), [a, l] = O(!1), [r, d] = O(!1), [u, p] = O(""), [f, m] = O("right"), [h, v] = O("bottom"), { currentPathFiles: S, setCurrentPathFiles: N } = he(), { activeLayout: M } = we(), F = ce(), A = ae(null), g = Oe(($) => {
|
|
4245
4220
|
var x;
|
|
4246
4221
|
(x = A.current) != null && x.contains($.target) || ($.preventDefault(), $.stopPropagation());
|
|
4247
4222
|
}), L = ($) => {
|
|
@@ -4296,7 +4271,7 @@ const jn = ({
|
|
|
4296
4271
|
var $;
|
|
4297
4272
|
if (w(), ($ = g.ref) != null && $.current) {
|
|
4298
4273
|
const k = n.current.getBoundingClientRect(), T = g.ref.current, U = T.getBoundingClientRect();
|
|
4299
|
-
k.right - U.left > 313 ?
|
|
4274
|
+
k.right - U.left > 313 ? m("right") : m("left"), k.bottom - (U.top + T.clientHeight) > 88 ? v("bottom") : v("top");
|
|
4300
4275
|
}
|
|
4301
4276
|
}, []), ee(() => {
|
|
4302
4277
|
g.isClicked && b(!1), w();
|
|
@@ -4321,7 +4296,7 @@ const jn = ({
|
|
|
4321
4296
|
{
|
|
4322
4297
|
message: u,
|
|
4323
4298
|
xPlacement: f,
|
|
4324
|
-
yPlacement:
|
|
4299
|
+
yPlacement: h
|
|
4325
4300
|
}
|
|
4326
4301
|
),
|
|
4327
4302
|
/* @__PURE__ */ c(
|
|
@@ -4401,10 +4376,10 @@ const jn = ({
|
|
|
4401
4376
|
handleContextMenu: u,
|
|
4402
4377
|
setLastSelectedFile: p,
|
|
4403
4378
|
draggable: f,
|
|
4404
|
-
formatDate:
|
|
4379
|
+
formatDate: m
|
|
4405
4380
|
}) => {
|
|
4406
4381
|
var ze, vt, $t, yt;
|
|
4407
|
-
const [
|
|
4382
|
+
const [h, v] = O(!1), [S, N] = O(0), [M, F] = O("hidden"), [A, g] = O(""), [L, b] = O(null), { activeLayout: w } = we(), $ = w === "grid" ? 48 : 20, x = _e($), { setCurrentPath: C, currentPathFiles: P, onFolderChange: k } = he(), { setSelectedFiles: T } = $e(), { clipBoard: U, handleCutCopy: q, setClipBoard: Q, handlePasting: ie } = Xe(), _ = ae(null), y = _e(ct), z = (U == null ? void 0 : U.isMoving) && U.files.find((X) => X.name === e.name && X.path === e.path), B = () => {
|
|
4408
4383
|
a(e), e.isDirectory ? (C(e.path), k == null || k(e.path), T([])) : i && d.show("previewFile");
|
|
4409
4384
|
}, j = (X, fe) => {
|
|
4410
4385
|
if (r.length > 0 && X) {
|
|
@@ -4431,28 +4406,28 @@ const jn = ({
|
|
|
4431
4406
|
}, G = (X) => {
|
|
4432
4407
|
X.key === "Enter" && (X.stopPropagation(), T([e]), B());
|
|
4433
4408
|
}, Y = (X) => {
|
|
4434
|
-
X.stopPropagation(), X.preventDefault(), !e.isEditing && (
|
|
4409
|
+
X.stopPropagation(), X.preventDefault(), !e.isEditing && (h || T([e]), p(e), u(X, !0));
|
|
4435
4410
|
}, K = () => {
|
|
4436
4411
|
F("visible");
|
|
4437
4412
|
}, J = () => {
|
|
4438
|
-
!
|
|
4413
|
+
!h && F("hidden");
|
|
4439
4414
|
}, Z = (X) => {
|
|
4440
4415
|
X.target.checked ? T((fe) => [...fe, e]) : T((fe) => fe.filter((ge) => ge.name !== e.name && ge.path !== e.path)), v(X.target.checked);
|
|
4441
4416
|
}, D = (X) => {
|
|
4442
4417
|
X.dataTransfer.setDragImage(_.current, 30, 50), X.dataTransfer.effectAllowed = "copy", q(!0);
|
|
4443
4418
|
}, oe = () => Q(null), E = (X) => {
|
|
4444
|
-
X.preventDefault(),
|
|
4419
|
+
X.preventDefault(), h || !e.isDirectory ? X.dataTransfer.dropEffect = "none" : (b({ x: X.clientX, y: X.clientY + 12 }), X.dataTransfer.dropEffect = "copy", g("file-drop-zone"));
|
|
4445
4420
|
}, re = (X) => {
|
|
4446
4421
|
X.currentTarget.contains(X.relatedTarget) || (g((fe) => fe && ""), b(null));
|
|
4447
4422
|
}, ye = (X) => {
|
|
4448
|
-
X.preventDefault(), !(
|
|
4423
|
+
X.preventDefault(), !(h || !e.isDirectory) && (ie(e), g((fe) => fe && ""), b(null));
|
|
4449
4424
|
};
|
|
4450
4425
|
return ee(() => {
|
|
4451
4426
|
v(r.includes(t)), F(r.includes(t) ? "visible" : "hidden");
|
|
4452
|
-
}, [r]),
|
|
4427
|
+
}, [r]), /* @__PURE__ */ R(
|
|
4453
4428
|
"div",
|
|
4454
4429
|
{
|
|
4455
|
-
className: `file-item-container ${A} ${
|
|
4430
|
+
className: `file-item-container ${A} ${h || e.isEditing ? "file-selected" : ""} ${z ? "file-moving" : ""}`,
|
|
4456
4431
|
tabIndex: 0,
|
|
4457
4432
|
title: e.name,
|
|
4458
4433
|
onClick: V,
|
|
@@ -4460,7 +4435,7 @@ const jn = ({
|
|
|
4460
4435
|
onContextMenu: Y,
|
|
4461
4436
|
onMouseOver: K,
|
|
4462
4437
|
onMouseLeave: J,
|
|
4463
|
-
draggable:
|
|
4438
|
+
draggable: h && f,
|
|
4464
4439
|
onDragStart: D,
|
|
4465
4440
|
onDragEnd: oe,
|
|
4466
4441
|
onDragEnter: E,
|
|
@@ -4474,7 +4449,7 @@ const jn = ({
|
|
|
4474
4449
|
{
|
|
4475
4450
|
name: e.name,
|
|
4476
4451
|
id: e.name,
|
|
4477
|
-
checked:
|
|
4452
|
+
checked: h,
|
|
4478
4453
|
className: `selection-checkbox ${M}`,
|
|
4479
4454
|
onChange: Z,
|
|
4480
4455
|
onClick: (X) => X.stopPropagation()
|
|
@@ -4504,7 +4479,7 @@ const jn = ({
|
|
|
4504
4479
|
) }) : /* @__PURE__ */ c("span", { className: "text-truncate file-name", children: e.name })
|
|
4505
4480
|
] }),
|
|
4506
4481
|
w === "list" && /* @__PURE__ */ R(pe, { children: [
|
|
4507
|
-
/* @__PURE__ */ c("div", { className: "modified-date", children:
|
|
4482
|
+
/* @__PURE__ */ c("div", { className: "modified-date", children: m(e.updatedAt) }),
|
|
4508
4483
|
/* @__PURE__ */ c("div", { className: "size", children: (e == null ? void 0 : e.size) > 0 ? Qe(e == null ? void 0 : e.size) : "" })
|
|
4509
4484
|
] }),
|
|
4510
4485
|
L && /* @__PURE__ */ R(
|
|
@@ -4530,7 +4505,7 @@ const jn = ({
|
|
|
4530
4505
|
o.icon,
|
|
4531
4506
|
/* @__PURE__ */ c("span", { children: o.title })
|
|
4532
4507
|
] }, o.title)) }), K$ = ({ filesViewRef: n, contextMenuRef: t, menuItems: e, visible: o, clickPosition: s }) => {
|
|
4533
|
-
const [i, a] = O(0), [l, r] = O(0), [d, u] = O(null), [p, f] = O("right"),
|
|
4508
|
+
const [i, a] = O(0), [l, r] = O(0), [d, u] = O(null), [p, f] = O("right"), m = ae(null), h = () => {
|
|
4534
4509
|
const { clickX: N, clickY: M } = s, F = n.current, A = F.getBoundingClientRect(), g = F.offsetWidth - F.clientWidth, L = t.current.getBoundingClientRect(), b = L.width, w = L.height, $ = N - A.left, x = A.width - ($ + g) > b, C = !x, P = M - A.top, k = A.height - P > w, T = !k;
|
|
4535
4510
|
x ? (a(`${$}px`), f("right")) : C && (a(`${$ - b}px`), f("left")), k ? r(`${P + F.scrollTop}px`) : T && r(`${P + F.scrollTop - w}px`);
|
|
4536
4511
|
}, v = (N) => {
|
|
@@ -4539,7 +4514,7 @@ const jn = ({
|
|
|
4539
4514
|
u(N);
|
|
4540
4515
|
};
|
|
4541
4516
|
if (ee(() => {
|
|
4542
|
-
o && t.current ?
|
|
4517
|
+
o && t.current ? h() : (r(0), a(0), u(null));
|
|
4543
4518
|
}, [o]), o)
|
|
4544
4519
|
return /* @__PURE__ */ c(
|
|
4545
4520
|
"div",
|
|
@@ -4569,7 +4544,7 @@ const jn = ({
|
|
|
4569
4544
|
A && /* @__PURE__ */ c(
|
|
4570
4545
|
Y$,
|
|
4571
4546
|
{
|
|
4572
|
-
subMenuRef:
|
|
4547
|
+
subMenuRef: m,
|
|
4573
4548
|
list: N.children,
|
|
4574
4549
|
position: p
|
|
4575
4550
|
}
|
|
@@ -4588,12 +4563,12 @@ function q$(n) {
|
|
|
4588
4563
|
return H({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z" }, child: [] }] })(n);
|
|
4589
4564
|
}
|
|
4590
4565
|
const _$ = (n, t, e, o, s) => {
|
|
4591
|
-
const [i, a] = O([]), [l, r] = O(!1), [d, u] = O(!1), [p, f] = O({ clickX: 0, clickY: 0 }), [
|
|
4592
|
-
s(
|
|
4566
|
+
const [i, a] = O([]), [l, r] = O(!1), [d, u] = O(!1), [p, f] = O({ clickX: 0, clickY: 0 }), [m, h] = O(null), { clipBoard: v, setClipBoard: S, handleCutCopy: N, handlePasting: M } = Xe(), { selectedFiles: F, setSelectedFiles: A, handleDownload: g } = $e(), { currentPath: L, setCurrentPath: b, currentPathFiles: w, setCurrentPathFiles: $, onFolderChange: x } = he(), { activeLayout: C, setActiveLayout: P } = we(), k = ce(), T = () => {
|
|
4567
|
+
s(m), m.isDirectory ? (b(m.path), x == null || x(m.path), a([]), A([])) : t && e.show("previewFile"), r(!1);
|
|
4593
4568
|
}, U = (D) => {
|
|
4594
4569
|
N(D), r(!1);
|
|
4595
4570
|
}, q = () => {
|
|
4596
|
-
M(
|
|
4571
|
+
M(m), r(!1);
|
|
4597
4572
|
}, Q = () => {
|
|
4598
4573
|
r(!1), e.show("rename");
|
|
4599
4574
|
}, ie = () => {
|
|
@@ -4661,7 +4636,7 @@ const _$ = (n, t, e, o, s) => {
|
|
|
4661
4636
|
], G = [
|
|
4662
4637
|
{
|
|
4663
4638
|
title: k("open"),
|
|
4664
|
-
icon:
|
|
4639
|
+
icon: m != null && m.isDirectory ? /* @__PURE__ */ c(q$, { size: 20 }) : /* @__PURE__ */ c(Ve, { size: 16 }),
|
|
4665
4640
|
onClick: T,
|
|
4666
4641
|
divider: !0
|
|
4667
4642
|
},
|
|
@@ -4669,14 +4644,14 @@ const _$ = (n, t, e, o, s) => {
|
|
|
4669
4644
|
title: k("cut"),
|
|
4670
4645
|
icon: /* @__PURE__ */ c(vn, { size: 19 }),
|
|
4671
4646
|
onClick: () => U(!0),
|
|
4672
|
-
divider: !(
|
|
4647
|
+
divider: !(m != null && m.isDirectory) && !o.copy,
|
|
4673
4648
|
hidden: !o.move
|
|
4674
4649
|
},
|
|
4675
4650
|
{
|
|
4676
4651
|
title: k("copy"),
|
|
4677
4652
|
icon: /* @__PURE__ */ c(hn, { strokeWidth: 0.1, size: 17 }),
|
|
4678
4653
|
onClick: () => U(!1),
|
|
4679
|
-
divider: !(
|
|
4654
|
+
divider: !(m != null && m.isDirectory),
|
|
4680
4655
|
hidden: !o.copy
|
|
4681
4656
|
},
|
|
4682
4657
|
{
|
|
@@ -4684,7 +4659,7 @@ const _$ = (n, t, e, o, s) => {
|
|
|
4684
4659
|
icon: /* @__PURE__ */ c(ut, { size: 18 }),
|
|
4685
4660
|
onClick: q,
|
|
4686
4661
|
className: `${v ? "" : "disable-paste"}`,
|
|
4687
|
-
hidden: !(
|
|
4662
|
+
hidden: !(m != null && m.isDirectory) || !o.move && !o.copy,
|
|
4688
4663
|
divider: !0
|
|
4689
4664
|
},
|
|
4690
4665
|
{
|
|
@@ -4750,7 +4725,7 @@ const _$ = (n, t, e, o, s) => {
|
|
|
4750
4725
|
unselectFiles: J,
|
|
4751
4726
|
visible: l,
|
|
4752
4727
|
setVisible: r,
|
|
4753
|
-
setLastSelectedFile:
|
|
4728
|
+
setLastSelectedFile: h,
|
|
4754
4729
|
selectedFileIndexes: i,
|
|
4755
4730
|
clickPosition: p,
|
|
4756
4731
|
isSelectionCtx: d
|
|
@@ -4826,7 +4801,7 @@ const _$ = (n, t, e, o, s) => {
|
|
|
4826
4801
|
permissions: r,
|
|
4827
4802
|
formatDate: d
|
|
4828
4803
|
}) => {
|
|
4829
|
-
const { currentPathFiles: u, sortConfig: p, setSortConfig: f } = he(),
|
|
4804
|
+
const { currentPathFiles: u, sortConfig: p, setSortConfig: f } = he(), m = ae(null), { activeLayout: h } = we(), v = ce(), {
|
|
4830
4805
|
emptySelecCtxItems: S,
|
|
4831
4806
|
selecCtxItems: N,
|
|
4832
4807
|
handleContextMenu: M,
|
|
@@ -4866,12 +4841,12 @@ const _$ = (n, t, e, o, s) => {
|
|
|
4866
4841
|
return /* @__PURE__ */ R(
|
|
4867
4842
|
"div",
|
|
4868
4843
|
{
|
|
4869
|
-
ref:
|
|
4870
|
-
className: `files ${
|
|
4844
|
+
ref: m,
|
|
4845
|
+
className: `files ${h}`,
|
|
4871
4846
|
onContextMenu: M,
|
|
4872
4847
|
onClick: F,
|
|
4873
4848
|
children: [
|
|
4874
|
-
|
|
4849
|
+
h === "list" && /* @__PURE__ */ c(G$, { unselectFiles: F, onSort: C, sortConfig: p }),
|
|
4875
4850
|
(u == null ? void 0 : u.length) > 0 ? /* @__PURE__ */ c(pe, { children: u.map((T, U) => /* @__PURE__ */ c(
|
|
4876
4851
|
W$,
|
|
4877
4852
|
{
|
|
@@ -4883,7 +4858,7 @@ const _$ = (n, t, e, o, s) => {
|
|
|
4883
4858
|
onFileOpen: s,
|
|
4884
4859
|
enableFilePreview: a,
|
|
4885
4860
|
triggerAction: l,
|
|
4886
|
-
filesViewRef:
|
|
4861
|
+
filesViewRef: m,
|
|
4887
4862
|
selectedFileIndexes: b,
|
|
4888
4863
|
handleContextMenu: M,
|
|
4889
4864
|
setVisible: g,
|
|
@@ -4896,7 +4871,7 @@ const _$ = (n, t, e, o, s) => {
|
|
|
4896
4871
|
/* @__PURE__ */ c(
|
|
4897
4872
|
K$,
|
|
4898
4873
|
{
|
|
4899
|
-
filesViewRef:
|
|
4874
|
+
filesViewRef: m,
|
|
4900
4875
|
contextMenuRef: x.ref,
|
|
4901
4876
|
menuItems: $ ? k : S,
|
|
4902
4877
|
visible: A,
|
|
@@ -4956,7 +4931,7 @@ const t6 = ({
|
|
|
4956
4931
|
handleFileRemove: a
|
|
4957
4932
|
}) => {
|
|
4958
4933
|
var b, w, $, x;
|
|
4959
|
-
const [l, r] = O(0), [d, u] = O(!1), [p, f] = O(!1), [
|
|
4934
|
+
const [l, r] = O(0), [d, u] = O(!1), [p, f] = O(!1), [m, h] = O(!1), v = _e(33), S = ae(), { onError: N } = Ze(), M = ce(), F = (C) => {
|
|
4960
4935
|
r(0), o((k) => ({
|
|
4961
4936
|
...k,
|
|
4962
4937
|
[n]: !1
|
|
@@ -4975,7 +4950,7 @@ const t6 = ({
|
|
|
4975
4950
|
...T,
|
|
4976
4951
|
error: P.message
|
|
4977
4952
|
} : T)
|
|
4978
|
-
),
|
|
4953
|
+
), h(!0), N(P, t.file);
|
|
4979
4954
|
}, A = (C) => {
|
|
4980
4955
|
if (!C.error)
|
|
4981
4956
|
return new Promise((P, k) => {
|
|
@@ -5021,7 +4996,7 @@ const t6 = ({
|
|
|
5021
4996
|
...P,
|
|
5022
4997
|
error: !1
|
|
5023
4998
|
} : P)
|
|
5024
|
-
), A({ ...t, error: !1 }), f(!1),
|
|
4999
|
+
), A({ ...t, error: !1 }), f(!1), h(!1));
|
|
5025
5000
|
};
|
|
5026
5001
|
return t.removed ? null : /* @__PURE__ */ R("li", { children: [
|
|
5027
5002
|
/* @__PURE__ */ c("div", { className: "file-icon", children: v[Ne((b = t.file) == null ? void 0 : b.name)] ?? /* @__PURE__ */ c(Ve, { size: 33 }) }),
|
|
@@ -5031,7 +5006,7 @@ const t6 = ({
|
|
|
5031
5006
|
/* @__PURE__ */ c("span", { className: "file-name text-truncate", title: (w = t.file) == null ? void 0 : w.name, children: ($ = t.file) == null ? void 0 : $.name }),
|
|
5032
5007
|
/* @__PURE__ */ c("span", { className: "file-size", children: Qe((x = t.file) == null ? void 0 : x.size) })
|
|
5033
5008
|
] }),
|
|
5034
|
-
d ? /* @__PURE__ */ c(F$, { title: M("uploaded"), className: "upload-success" }) : p ||
|
|
5009
|
+
d ? /* @__PURE__ */ c(F$, { title: M("uploaded"), className: "upload-success" }) : p || m ? /* @__PURE__ */ c(e6, { className: "retry-upload", title: "Retry", onClick: L }) : /* @__PURE__ */ c(
|
|
5035
5010
|
"div",
|
|
5036
5011
|
{
|
|
5037
5012
|
className: "rm-file",
|
|
@@ -5059,8 +5034,8 @@ const t6 = ({
|
|
|
5059
5034
|
onFileUploading: o,
|
|
5060
5035
|
onFileUploaded: s
|
|
5061
5036
|
}) => {
|
|
5062
|
-
const [i, a] = O([]), [l, r] = O(!1), [d, u] = O({}), { currentFolder: p, currentPathFiles: f } = he(), { onError:
|
|
5063
|
-
L.key === "Enter" &&
|
|
5037
|
+
const [i, a] = O([]), [l, r] = O(!1), [d, u] = O({}), { currentFolder: p, currentPathFiles: f } = he(), { onError: m } = Ze(), h = ae(null), v = ce(), S = (L) => {
|
|
5038
|
+
L.key === "Enter" && h.current.click();
|
|
5064
5039
|
}, N = (L) => {
|
|
5065
5040
|
if (e && !e.includes(Ne(L.name)))
|
|
5066
5041
|
return v("fileTypeNotAllowed");
|
|
@@ -5074,7 +5049,7 @@ const t6 = ({
|
|
|
5074
5049
|
), L.length > 0) {
|
|
5075
5050
|
const b = L.map((w) => {
|
|
5076
5051
|
const $ = o(w, p), x = N(w);
|
|
5077
|
-
return x &&
|
|
5052
|
+
return x && m({ type: "upload", message: x }, w), {
|
|
5078
5053
|
file: w,
|
|
5079
5054
|
appendData: $,
|
|
5080
5055
|
...x && { error: x }
|
|
@@ -5119,7 +5094,7 @@ const t6 = ({
|
|
|
5119
5094
|
/* @__PURE__ */ c(
|
|
5120
5095
|
"input",
|
|
5121
5096
|
{
|
|
5122
|
-
ref:
|
|
5097
|
+
ref: h,
|
|
5123
5098
|
type: "file",
|
|
5124
5099
|
id: "chooseFile",
|
|
5125
5100
|
className: "choose-file-input",
|
|
@@ -5157,9 +5132,9 @@ const t6 = ({
|
|
|
5157
5132
|
[t]
|
|
5158
5133
|
), f = () => {
|
|
5159
5134
|
o(!1), i(!1);
|
|
5160
|
-
}, h = () => {
|
|
5161
|
-
o(!1), i(!0);
|
|
5162
5135
|
}, m = () => {
|
|
5136
|
+
o(!1), i(!0);
|
|
5137
|
+
}, h = () => {
|
|
5163
5138
|
window.location.href = d;
|
|
5164
5139
|
};
|
|
5165
5140
|
return ve.isValidElement(p) ? p : /* @__PURE__ */ R("section", { className: `file-previewer ${r === "pdf" ? "pdf-previewer" : ""}`, children: [
|
|
@@ -5176,7 +5151,7 @@ const t6 = ({
|
|
|
5176
5151
|
a[0].size && /* @__PURE__ */ c("span", { children: "-" }),
|
|
5177
5152
|
/* @__PURE__ */ c("span", { className: "file-size", children: Qe(a[0].size) })
|
|
5178
5153
|
] }),
|
|
5179
|
-
/* @__PURE__ */ c(Ee, { onClick:
|
|
5154
|
+
/* @__PURE__ */ c(Ee, { onClick: h, padding: "0.45rem .9rem", children: /* @__PURE__ */ R("div", { className: "download-btn", children: [
|
|
5180
5155
|
/* @__PURE__ */ c(ht, { size: 18 }),
|
|
5181
5156
|
/* @__PURE__ */ c("span", { children: u("download") })
|
|
5182
5157
|
] }) })
|
|
@@ -5190,7 +5165,7 @@ const t6 = ({
|
|
|
5190
5165
|
alt: "Preview Unavailable",
|
|
5191
5166
|
className: `photo-popup-image ${e ? "img-loading" : ""}`,
|
|
5192
5167
|
onLoad: f,
|
|
5193
|
-
onError:
|
|
5168
|
+
onError: m,
|
|
5194
5169
|
loading: "lazy"
|
|
5195
5170
|
}
|
|
5196
5171
|
)
|
|
@@ -5202,7 +5177,7 @@ const t6 = ({
|
|
|
5202
5177
|
{
|
|
5203
5178
|
src: d,
|
|
5204
5179
|
onLoad: f,
|
|
5205
|
-
onError:
|
|
5180
|
+
onError: m,
|
|
5206
5181
|
frameBorder: "0",
|
|
5207
5182
|
className: `photo-popup-iframe ${e ? "img-loading" : ""}`
|
|
5208
5183
|
}
|
|
@@ -5243,9 +5218,9 @@ const t6 = ({
|
|
|
5243
5218
|
}, s6 = (n, t, e) => {
|
|
5244
5219
|
const { setClipBoard: o, handleCutCopy: s, handlePasting: i } = Xe(), { currentFolder: a, currentPathFiles: l } = he(), { selectedFiles: r, setSelectedFiles: d, handleDownload: u } = $e(), { setActiveLayout: p } = we(), f = () => {
|
|
5245
5220
|
e.create && n.show("createFolder");
|
|
5246
|
-
}, h = () => {
|
|
5247
|
-
e.upload && n.show("uploadFile");
|
|
5248
5221
|
}, m = () => {
|
|
5222
|
+
e.upload && n.show("uploadFile");
|
|
5223
|
+
}, h = () => {
|
|
5249
5224
|
e.move && s(!0);
|
|
5250
5225
|
}, v = () => {
|
|
5251
5226
|
e.copy && s(!1);
|
|
@@ -5272,7 +5247,7 @@ const t6 = ({
|
|
|
5272
5247
|
}, x = () => {
|
|
5273
5248
|
p("list");
|
|
5274
5249
|
};
|
|
5275
|
-
de(ue.createFolder, f, n.isActive), de(ue.uploadFiles,
|
|
5250
|
+
de(ue.createFolder, f, n.isActive), de(ue.uploadFiles, m, n.isActive), de(ue.cut, h, n.isActive), de(ue.copy, v, n.isActive), de(ue.paste, S, n.isActive), de(ue.rename, N, n.isActive), de(ue.download, M, n.isActive), de(ue.delete, F, n.isActive), de(ue.jumpToFirst, A, n.isActive), de(ue.jumpToLast, g, n.isActive), de(ue.selectAll, L, n.isActive), de(ue.clearSelection, b, n.isActive), de(ue.refresh, w, n.isActive), de(ue.gridLayout, $, n.isActive), de(ue.listLayout, x, n.isActive);
|
|
5276
5251
|
}, i6 = ({
|
|
5277
5252
|
fileUploadConfig: n,
|
|
5278
5253
|
onFileUploading: t,
|
|
@@ -5286,11 +5261,11 @@ const t6 = ({
|
|
|
5286
5261
|
triggerAction: d,
|
|
5287
5262
|
permissions: u
|
|
5288
5263
|
}) => {
|
|
5289
|
-
const [p, f] = O(null), { selectedFiles:
|
|
5264
|
+
const [p, f] = O(null), { selectedFiles: m } = $e(), h = ce();
|
|
5290
5265
|
s6(d, s, u);
|
|
5291
5266
|
const v = {
|
|
5292
5267
|
uploadFile: {
|
|
5293
|
-
title:
|
|
5268
|
+
title: h("upload"),
|
|
5294
5269
|
component: /* @__PURE__ */ c(
|
|
5295
5270
|
n6,
|
|
5296
5271
|
{
|
|
@@ -5304,12 +5279,12 @@ const t6 = ({
|
|
|
5304
5279
|
width: "35%"
|
|
5305
5280
|
},
|
|
5306
5281
|
delete: {
|
|
5307
|
-
title:
|
|
5282
|
+
title: h("delete"),
|
|
5308
5283
|
component: /* @__PURE__ */ c(J$, { triggerAction: d, onDelete: o }),
|
|
5309
5284
|
width: "25%"
|
|
5310
5285
|
},
|
|
5311
5286
|
previewFile: {
|
|
5312
|
-
title:
|
|
5287
|
+
title: h("preview"),
|
|
5313
5288
|
component: /* @__PURE__ */ c(
|
|
5314
5289
|
o6,
|
|
5315
5290
|
{
|
|
@@ -5323,7 +5298,7 @@ const t6 = ({
|
|
|
5323
5298
|
if (ee(() => {
|
|
5324
5299
|
if (d.isActive) {
|
|
5325
5300
|
const S = d.actionType;
|
|
5326
|
-
S === "previewFile" && (v[S].title = (
|
|
5301
|
+
S === "previewFile" && (v[S].title = (m == null ? void 0 : m.name) ?? h("preview")), f(v[S]);
|
|
5327
5302
|
} else
|
|
5328
5303
|
f(null);
|
|
5329
5304
|
}, [d.isActive]), p)
|
|
@@ -5365,8 +5340,8 @@ const t6 = ({
|
|
|
5365
5340
|
handleMouseMove: (u) => {
|
|
5366
5341
|
if (!s) return;
|
|
5367
5342
|
u.preventDefault();
|
|
5368
|
-
const f = a.current.getBoundingClientRect(),
|
|
5369
|
-
|
|
5343
|
+
const f = a.current.getBoundingClientRect(), m = (u.clientX - f.left) / f.width * 100;
|
|
5344
|
+
m >= 15 && m <= 60 && o({ col1: m, col2: 100 - m });
|
|
5370
5345
|
}
|
|
5371
5346
|
};
|
|
5372
5347
|
}, l6 = (n, t, e) => {
|
|
@@ -5417,8 +5392,8 @@ const t6 = ({
|
|
|
5417
5392
|
onPaste: u,
|
|
5418
5393
|
onRename: p,
|
|
5419
5394
|
onDownload: f,
|
|
5420
|
-
onDelete:
|
|
5421
|
-
onLayoutChange:
|
|
5395
|
+
onDelete: m = () => null,
|
|
5396
|
+
onLayoutChange: h = () => {
|
|
5422
5397
|
},
|
|
5423
5398
|
onRefresh: v,
|
|
5424
5399
|
onFileOpen: S = () => {
|
|
@@ -5475,7 +5450,7 @@ const t6 = ({
|
|
|
5475
5450
|
/* @__PURE__ */ c(
|
|
5476
5451
|
Ln,
|
|
5477
5452
|
{
|
|
5478
|
-
onLayoutChange:
|
|
5453
|
+
onLayoutChange: h,
|
|
5479
5454
|
onRefresh: v,
|
|
5480
5455
|
triggerAction: G,
|
|
5481
5456
|
permissions: re
|
|
@@ -5549,7 +5524,7 @@ const t6 = ({
|
|
|
5549
5524
|
fileUploadConfig: e,
|
|
5550
5525
|
onFileUploading: a,
|
|
5551
5526
|
onFileUploaded: l,
|
|
5552
|
-
onDelete:
|
|
5527
|
+
onDelete: m,
|
|
5553
5528
|
onRefresh: v,
|
|
5554
5529
|
maxFileSize: b,
|
|
5555
5530
|
filePreviewPath: w,
|