aa-geuthur-react 1.6.0 → 1.8.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/README.md +12 -0
- package/dist/Api/Api.d.ts +3 -0
- package/dist/Api/errors.d.ts +12 -0
- package/dist/Api/query.d.ts +18 -0
- package/dist/index.js +650 -617
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,59 +1,74 @@
|
|
|
1
1
|
import e from "js-cookie";
|
|
2
2
|
import t from "openapi-fetch";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import Ae from "
|
|
11
|
-
import
|
|
3
|
+
import { QueryClient as n, useMutation as r, useQuery as i, useQueryClient as a } from "@tanstack/react-query";
|
|
4
|
+
import { Link as o, Outlet as s, useLocation as c } from "react-router-dom";
|
|
5
|
+
import { columnFacetingFeature as l, columnFilteringFeature as u, columnSizingFeature as d, columnVisibilityFeature as f, createColumnHelper as p, createFacetedMinMaxValues as m, createFacetedRowModel as h, createFacetedUniqueValues as g, createFilteredRowModel as _, createPaginatedRowModel as v, createSortedRowModel as y, filterFns as b, flexRender as x, functionalUpdate as ee, rowPaginationFeature as te, rowSelectionFeature as S, rowSortingFeature as C, sortFns as ne, tableFeatures as w, useTable as re } from "@tanstack/react-table";
|
|
6
|
+
import { AlertCircle as T, AlertTriangle as E, ArrowUpDown as ie, Building2 as ae, CheckCircle2 as oe, ChevronDown as D, ChevronFirst as se, ChevronLast as ce, ChevronLeft as O, ChevronRight as k, ChevronUp as le, Clock as A, ExternalLink as j, Plus as M, RotateCw as N, Search as ue, Shield as P, ShieldAlert as de, SlidersHorizontal as F, Trash2 as I, User as L, UserRoundX as fe, Users as pe, X as me } from "lucide-react";
|
|
7
|
+
import { Alert as he, Badge as ge, Button as R, ButtonGroup as z, ButtonToolbar as _e, Card as B, Col as V, Dropdown as H, Form as U, InputGroup as ve, Modal as ye, Nav as W, OverlayTrigger as be, Popover as xe, Tooltip as Se } from "react-bootstrap";
|
|
8
|
+
import { I18nContext as Ce, getI18n as we, initReactI18next as Te, useTranslation as G, withTranslation as Ee } from "react-i18next";
|
|
9
|
+
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
10
|
+
import { Component as De, createContext as Oe, useCallback as Y, useContext as ke, useEffect as Ae, useMemo as je, useRef as Me, useState as X } from "react";
|
|
11
|
+
import Ne from "i18next";
|
|
12
12
|
import { useQueryState as Pe } from "nuqs";
|
|
13
13
|
import Fe from "i18next-http-backend";
|
|
14
14
|
import Ie from "react-dom";
|
|
15
|
+
// src/Api/errors.ts
|
|
16
|
+
function Le(e, t) {
|
|
17
|
+
if (typeof e != "object" || !e) return t;
|
|
18
|
+
let n = e;
|
|
19
|
+
for (let e of [n.error, n.detail]) if (typeof e == "string" && e.trim() !== "") return e;
|
|
20
|
+
return t;
|
|
21
|
+
}
|
|
22
|
+
var Re = [
|
|
23
|
+
502,
|
|
24
|
+
503,
|
|
25
|
+
504
|
|
26
|
+
], ze = class extends Error {
|
|
27
|
+
status;
|
|
28
|
+
constructor(e) {
|
|
29
|
+
super(`The server is temporarily unavailable (${e})`), this.name = "ServiceUnavailableError", this.status = e;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
15
32
|
// src/Api/Api.ts
|
|
16
|
-
function
|
|
33
|
+
function Be(n) {
|
|
17
34
|
let r = t({
|
|
18
35
|
baseUrl: "/",
|
|
19
36
|
credentials: "same-origin",
|
|
20
37
|
...n
|
|
21
38
|
});
|
|
22
|
-
return r.use({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
for (let e of [n.error, n.detail]) if (typeof e == "string" && e.trim() !== "") return e;
|
|
32
|
-
return t;
|
|
39
|
+
return r.use({
|
|
40
|
+
async onRequest({ request: t }) {
|
|
41
|
+
let n = e.get("csrftoken");
|
|
42
|
+
return n && t.headers.set("X-CSRFToken", n), t;
|
|
43
|
+
},
|
|
44
|
+
async onResponse({ response: e }) {
|
|
45
|
+
if (Re.includes(e.status)) throw new ze(e.status);
|
|
46
|
+
}
|
|
47
|
+
}), r;
|
|
33
48
|
}
|
|
34
49
|
// src/Api/calls.ts
|
|
35
|
-
var
|
|
36
|
-
async function
|
|
37
|
-
let { data: t, error: n } = await
|
|
38
|
-
if (n || !t) throw Error(
|
|
50
|
+
var Ve = Be();
|
|
51
|
+
async function He(e) {
|
|
52
|
+
let { data: t, error: n } = await Ve.GET("/{project}/api/menu/", { params: { path: { project: e } } });
|
|
53
|
+
if (n || !t) throw Error(Le(n, "Failed to load menu"));
|
|
39
54
|
return t;
|
|
40
55
|
}
|
|
41
|
-
async function
|
|
42
|
-
let { data: t, error: n } = await
|
|
43
|
-
if (n || !t) throw Error(
|
|
56
|
+
async function Ue(e) {
|
|
57
|
+
let { data: t, error: n } = await Ve.GET("/{project}/api/user/", { params: { path: { project: e } } });
|
|
58
|
+
if (n || !t) throw Error(Le(n, "Failed to load user data"));
|
|
44
59
|
return { user: t };
|
|
45
60
|
}
|
|
46
|
-
async function
|
|
47
|
-
let { data: t, error: n } = await
|
|
48
|
-
if (n || !t) throw Error(
|
|
61
|
+
async function We(e) {
|
|
62
|
+
let { data: t, error: n } = await Ve.GET("/{project}/api/settings/", { params: { path: { project: e } } });
|
|
63
|
+
if (n || !t) throw Error(Le(n, "Failed to load user settings"));
|
|
49
64
|
return t;
|
|
50
65
|
}
|
|
51
|
-
async function
|
|
52
|
-
let { data: n, error: r } = await
|
|
66
|
+
async function Ge(e, t) {
|
|
67
|
+
let { data: n, error: r } = await Ve.PUT("/{project}/api/settings/", {
|
|
53
68
|
params: { path: { project: e } },
|
|
54
69
|
body: t
|
|
55
70
|
});
|
|
56
|
-
if (r || !n) throw Error(
|
|
71
|
+
if (r || !n) throw Error(Le(r, "Failed to update user settings"));
|
|
57
72
|
return n;
|
|
58
73
|
}
|
|
59
74
|
// src/Api/query.ts
|
|
@@ -61,7 +76,25 @@ var Z = {
|
|
|
61
76
|
Menu: ["Menu"],
|
|
62
77
|
User: ["User"],
|
|
63
78
|
UserSettings: ["UserSettings"]
|
|
64
|
-
},
|
|
79
|
+
}, Ke = 3;
|
|
80
|
+
function qe(e, t) {
|
|
81
|
+
return (t instanceof TypeError || t instanceof ze) && e < 3;
|
|
82
|
+
}
|
|
83
|
+
function Je(e = {}) {
|
|
84
|
+
let { defaultOptions: t, ...r } = e;
|
|
85
|
+
return new n({
|
|
86
|
+
...r,
|
|
87
|
+
defaultOptions: {
|
|
88
|
+
...t,
|
|
89
|
+
queries: {
|
|
90
|
+
retry: qe,
|
|
91
|
+
...t?.queries
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
// src/i18nResources.ts
|
|
97
|
+
var Ye = /* #__PURE__ */ Object.assign({
|
|
65
98
|
"../i18n/cs/aa-geuthur-react.json": {
|
|
66
99
|
Close: "Zavřít",
|
|
67
100
|
Confirm: "Potvrdit",
|
|
@@ -595,42 +628,42 @@ var Z = {
|
|
|
595
628
|
Corporation: "军团",
|
|
596
629
|
Alliance: "联盟"
|
|
597
630
|
}
|
|
598
|
-
}),
|
|
599
|
-
for (let [e, t] of Object.entries(
|
|
631
|
+
}), Xe = {};
|
|
632
|
+
for (let [e, t] of Object.entries(Ye)) {
|
|
600
633
|
let n = e.split("/").at(-2);
|
|
601
|
-
n && (
|
|
634
|
+
n && (Xe[n] = t);
|
|
602
635
|
}
|
|
603
636
|
// src/i18n.ts
|
|
604
|
-
var Q = "aa-geuthur-react",
|
|
605
|
-
function
|
|
606
|
-
if (e && typeof e.addResourceBundle == "function" && !
|
|
607
|
-
|
|
608
|
-
for (let [t, n] of Object.entries(
|
|
637
|
+
var Q = "aa-geuthur-react", Ze = "translation", Qe = /* @__PURE__ */ new WeakSet();
|
|
638
|
+
function $e(e) {
|
|
639
|
+
if (e && typeof e.addResourceBundle == "function" && !Qe.has(e)) {
|
|
640
|
+
Qe.add(e);
|
|
641
|
+
for (let [t, n] of Object.entries(Xe)) e.addResourceBundle(t, Q, n, !0, !1);
|
|
609
642
|
}
|
|
610
643
|
}
|
|
611
644
|
// src/Components/Base/BaseTable/BaseTableFilter.tsx
|
|
612
|
-
var
|
|
613
|
-
let { t } =
|
|
614
|
-
return /* @__PURE__ */
|
|
645
|
+
var et = "position-relative w-100", tt = "position-absolute top-50 end-0 translate-middle-y me-2 pe-none text-muted", nt = ({ onClick: e }) => {
|
|
646
|
+
let { t } = G(Q);
|
|
647
|
+
return /* @__PURE__ */ q("button", {
|
|
615
648
|
type: "button",
|
|
616
649
|
className: "aa-table-filter-clear position-absolute top-50 end-0 translate-middle-y me-1 d-flex align-items-center justify-content-center border-0 bg-transparent p-0",
|
|
617
650
|
onClick: e,
|
|
618
651
|
title: t("Clear"),
|
|
619
|
-
children: /* @__PURE__ */
|
|
652
|
+
children: /* @__PURE__ */ q(me, { size: 12 })
|
|
620
653
|
});
|
|
621
|
-
},
|
|
622
|
-
let { t } =
|
|
654
|
+
}, rt = RegExp.prototype.test.bind(/(<([^>]+)>)/i), it = ({ column: e }) => {
|
|
655
|
+
let { t } = G(Q), n = e.getFilterValue(), r = n?.[0] !== void 0 && n?.[0] !== "" || n?.[1] !== void 0 && n?.[1] !== "", i = /* @__PURE__ */ q(xe, {
|
|
623
656
|
id: "popover-number-range",
|
|
624
657
|
className: "aa-table-filter-popover",
|
|
625
|
-
children: /* @__PURE__ */
|
|
658
|
+
children: /* @__PURE__ */ q(xe.Body, {
|
|
626
659
|
className: "p-3",
|
|
627
|
-
children: /* @__PURE__ */
|
|
660
|
+
children: /* @__PURE__ */ J("div", {
|
|
628
661
|
className: "d-flex flex-column gap-2",
|
|
629
662
|
children: [
|
|
630
|
-
/* @__PURE__ */
|
|
663
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(U.Label, {
|
|
631
664
|
className: "small text-muted mb-1",
|
|
632
665
|
children: t("Min")
|
|
633
|
-
}), /* @__PURE__ */
|
|
666
|
+
}), /* @__PURE__ */ q(U.Control, {
|
|
634
667
|
size: "sm",
|
|
635
668
|
type: "number",
|
|
636
669
|
value: n?.[0] ?? "",
|
|
@@ -638,10 +671,10 @@ var Je = "position-relative w-100", Ye = "position-absolute top-50 end-0 transla
|
|
|
638
671
|
placeholder: t("Min"),
|
|
639
672
|
className: "aa-table-filter-input"
|
|
640
673
|
})] }),
|
|
641
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(U.Label, {
|
|
642
675
|
className: "small text-muted mb-1",
|
|
643
676
|
children: t("Max")
|
|
644
|
-
}), /* @__PURE__ */
|
|
677
|
+
}), /* @__PURE__ */ q(U.Control, {
|
|
645
678
|
size: "sm",
|
|
646
679
|
type: "number",
|
|
647
680
|
value: n?.[1] ?? "",
|
|
@@ -649,9 +682,9 @@ var Je = "position-relative w-100", Ye = "position-absolute top-50 end-0 transla
|
|
|
649
682
|
placeholder: t("Max"),
|
|
650
683
|
className: "aa-table-filter-input"
|
|
651
684
|
})] }),
|
|
652
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ J("div", {
|
|
653
686
|
className: "d-flex gap-2 mt-2",
|
|
654
|
-
children: [/* @__PURE__ */
|
|
687
|
+
children: [/* @__PURE__ */ q(R, {
|
|
655
688
|
variant: "outline-secondary",
|
|
656
689
|
size: "sm",
|
|
657
690
|
className: "w-50",
|
|
@@ -659,7 +692,7 @@ var Je = "position-relative w-100", Ye = "position-absolute top-50 end-0 transla
|
|
|
659
692
|
e.setFilterValue(() => [void 0, void 0]), document.body.click();
|
|
660
693
|
},
|
|
661
694
|
children: t("Reset")
|
|
662
|
-
}), /* @__PURE__ */
|
|
695
|
+
}), /* @__PURE__ */ q(R, {
|
|
663
696
|
variant: "primary",
|
|
664
697
|
size: "sm",
|
|
665
698
|
className: "w-50",
|
|
@@ -671,54 +704,54 @@ var Je = "position-relative w-100", Ye = "position-absolute top-50 end-0 transla
|
|
|
671
704
|
})
|
|
672
705
|
})
|
|
673
706
|
});
|
|
674
|
-
return /* @__PURE__ */
|
|
707
|
+
return /* @__PURE__ */ q(be, {
|
|
675
708
|
trigger: "click",
|
|
676
709
|
placement: "bottom",
|
|
677
710
|
rootClose: !0,
|
|
678
711
|
overlay: i,
|
|
679
|
-
children: /* @__PURE__ */
|
|
680
|
-
className:
|
|
681
|
-
children: [/* @__PURE__ */
|
|
712
|
+
children: /* @__PURE__ */ J("div", {
|
|
713
|
+
className: et,
|
|
714
|
+
children: [/* @__PURE__ */ q(U.Control, {
|
|
682
715
|
size: "sm",
|
|
683
716
|
className: "aa-table-filter-input",
|
|
684
717
|
readOnly: !0,
|
|
685
718
|
type: "text",
|
|
686
719
|
placeholder: t("Range…"),
|
|
687
720
|
value: r ? `${n?.[0] || "Min"} → ${n?.[1] || "Max"}` : ""
|
|
688
|
-
}), r ? /* @__PURE__ */
|
|
721
|
+
}), r ? /* @__PURE__ */ q(nt, { onClick: (t) => {
|
|
689
722
|
t.stopPropagation(), e.setFilterValue(() => [void 0, void 0]);
|
|
690
|
-
} }) : /* @__PURE__ */
|
|
723
|
+
} }) : /* @__PURE__ */ q(F, {
|
|
691
724
|
size: 12,
|
|
692
|
-
className:
|
|
725
|
+
className: tt
|
|
693
726
|
})]
|
|
694
727
|
})
|
|
695
728
|
});
|
|
696
|
-
},
|
|
697
|
-
let { t } =
|
|
698
|
-
return /* @__PURE__ */
|
|
729
|
+
}, at = ({ column: e }) => {
|
|
730
|
+
let { t } = G(Q), n = e.getFilterValue(), r = n !== void 0;
|
|
731
|
+
return /* @__PURE__ */ q(be, {
|
|
699
732
|
trigger: "click",
|
|
700
733
|
placement: "bottom-start",
|
|
701
734
|
rootClose: !0,
|
|
702
|
-
overlay: /* @__PURE__ */
|
|
735
|
+
overlay: /* @__PURE__ */ q(H, {
|
|
703
736
|
show: !0,
|
|
704
737
|
drop: "down-centered",
|
|
705
|
-
children: /* @__PURE__ */
|
|
738
|
+
children: /* @__PURE__ */ J(H.Menu, {
|
|
706
739
|
className: "aa-table-filter-dropdown overflow-y-auto",
|
|
707
740
|
children: [
|
|
708
|
-
/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ q(H.Item, {
|
|
709
742
|
onClick: () => {
|
|
710
743
|
e.setFilterValue(!0), document.body.click();
|
|
711
744
|
},
|
|
712
745
|
children: t("True")
|
|
713
746
|
}),
|
|
714
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ q(H.Item, {
|
|
715
748
|
onClick: () => {
|
|
716
749
|
e.setFilterValue(!1), document.body.click();
|
|
717
750
|
},
|
|
718
751
|
children: t("False")
|
|
719
752
|
}),
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ q(H.Divider, {}),
|
|
754
|
+
/* @__PURE__ */ q(H.Item, {
|
|
722
755
|
onClick: () => {
|
|
723
756
|
e.setFilterValue(void 0), document.body.click();
|
|
724
757
|
},
|
|
@@ -727,28 +760,28 @@ var Je = "position-relative w-100", Ye = "position-absolute top-50 end-0 transla
|
|
|
727
760
|
]
|
|
728
761
|
})
|
|
729
762
|
}),
|
|
730
|
-
children: /* @__PURE__ */
|
|
731
|
-
className:
|
|
732
|
-
children: [/* @__PURE__ */
|
|
763
|
+
children: /* @__PURE__ */ J("div", {
|
|
764
|
+
className: et,
|
|
765
|
+
children: [/* @__PURE__ */ q(U.Control, {
|
|
733
766
|
size: "sm",
|
|
734
767
|
className: "aa-table-filter-input",
|
|
735
768
|
readOnly: !0,
|
|
736
769
|
type: "text",
|
|
737
770
|
placeholder: t("All"),
|
|
738
771
|
value: r ? t(n ? "True" : "False") : ""
|
|
739
|
-
}), r ? /* @__PURE__ */
|
|
772
|
+
}), r ? /* @__PURE__ */ q(nt, { onClick: (t) => {
|
|
740
773
|
t.stopPropagation(), e.setFilterValue(() => void 0);
|
|
741
|
-
} }) : /* @__PURE__ */
|
|
774
|
+
} }) : /* @__PURE__ */ q(D, {
|
|
742
775
|
size: 12,
|
|
743
|
-
className:
|
|
776
|
+
className: tt
|
|
744
777
|
})]
|
|
745
778
|
})
|
|
746
779
|
});
|
|
747
|
-
},
|
|
748
|
-
let { t } =
|
|
749
|
-
return /* @__PURE__ */
|
|
750
|
-
className:
|
|
751
|
-
children: [/* @__PURE__ */
|
|
780
|
+
}, ot = ({ column: e }) => {
|
|
781
|
+
let { t } = G(Q), n = e.getFilterValue() ?? "";
|
|
782
|
+
return /* @__PURE__ */ J("div", {
|
|
783
|
+
className: et,
|
|
784
|
+
children: [/* @__PURE__ */ q(U.Control, {
|
|
752
785
|
size: "sm",
|
|
753
786
|
className: "aa-table-filter-input",
|
|
754
787
|
type: "text",
|
|
@@ -757,40 +790,40 @@ var Je = "position-relative w-100", Ye = "position-absolute top-50 end-0 transla
|
|
|
757
790
|
onChange: (t) => {
|
|
758
791
|
e.setFilterValue(t.target.value ? t.target.value : "");
|
|
759
792
|
}
|
|
760
|
-
}), n ? /* @__PURE__ */
|
|
793
|
+
}), n ? /* @__PURE__ */ q(nt, { onClick: () => e.setFilterValue("") }) : /* @__PURE__ */ q(ue, {
|
|
761
794
|
size: 12,
|
|
762
|
-
className:
|
|
795
|
+
className: tt
|
|
763
796
|
})]
|
|
764
797
|
});
|
|
765
|
-
},
|
|
766
|
-
let { t } =
|
|
798
|
+
}, st = ({ column: e }) => {
|
|
799
|
+
let { t } = G(Q), [n, r] = X(!1), i = Array.from(e.getFacetedUniqueValues().keys()).filter((e) => e != null).sort(), a = e.getFilterValue(), o = rt(i?.[0]) || typeof i?.[0] == "object", s = e.columnDef.meta?.filterOptionLabel ?? ((e) => e?.replaceAll("_", " ") ?? e), c = i.reduce((e, t) => (t != null && (o || (a === void 0 || t?.toLowerCase().includes(a?.toLowerCase())) && e.push({
|
|
767
800
|
value: t,
|
|
768
801
|
label: s(t)
|
|
769
802
|
})), e), []);
|
|
770
|
-
return /* @__PURE__ */
|
|
803
|
+
return /* @__PURE__ */ q(be, {
|
|
771
804
|
trigger: "click",
|
|
772
805
|
placement: "bottom-start",
|
|
773
806
|
rootClose: !0,
|
|
774
|
-
overlay: /* @__PURE__ */
|
|
807
|
+
overlay: /* @__PURE__ */ q(H, {
|
|
775
808
|
show: !0,
|
|
776
809
|
drop: "down-centered",
|
|
777
|
-
children: /* @__PURE__ */
|
|
810
|
+
children: /* @__PURE__ */ q(H.Menu, {
|
|
778
811
|
className: "aa-table-filter-dropdown overflow-y-auto",
|
|
779
|
-
children: c.length > 0 ? c.map((t) => /* @__PURE__ */
|
|
812
|
+
children: c.length > 0 ? c.map((t) => /* @__PURE__ */ q(H.Item, {
|
|
780
813
|
className: "text-capitalize",
|
|
781
814
|
onClick: () => {
|
|
782
815
|
e.setFilterValue(t.value ? t.value : ""), document.body.click();
|
|
783
816
|
},
|
|
784
817
|
children: t.label
|
|
785
|
-
}, t.value)) : /* @__PURE__ */
|
|
818
|
+
}, t.value)) : /* @__PURE__ */ q(H.Item, {
|
|
786
819
|
disabled: !0,
|
|
787
820
|
children: t("No matching options")
|
|
788
821
|
})
|
|
789
822
|
})
|
|
790
823
|
}),
|
|
791
|
-
children: /* @__PURE__ */
|
|
792
|
-
className:
|
|
793
|
-
children: [/* @__PURE__ */
|
|
824
|
+
children: /* @__PURE__ */ J("div", {
|
|
825
|
+
className: et,
|
|
826
|
+
children: [/* @__PURE__ */ q(U.Control, {
|
|
794
827
|
size: "sm",
|
|
795
828
|
className: "aa-table-filter-input",
|
|
796
829
|
type: "text",
|
|
@@ -803,39 +836,39 @@ var Je = "position-relative w-100", Ye = "position-absolute top-50 end-0 transla
|
|
|
803
836
|
onChange: (t) => {
|
|
804
837
|
e.setFilterValue(t.target.value ? t.target.value : "");
|
|
805
838
|
}
|
|
806
|
-
}), a ? /* @__PURE__ */
|
|
839
|
+
}), a ? /* @__PURE__ */ q(nt, { onClick: (t) => {
|
|
807
840
|
t.stopPropagation(), r(!1), e.setFilterValue(() => void 0);
|
|
808
|
-
} }) : /* @__PURE__ */
|
|
841
|
+
} }) : /* @__PURE__ */ q(D, {
|
|
809
842
|
size: 12,
|
|
810
|
-
className:
|
|
843
|
+
className: tt
|
|
811
844
|
})]
|
|
812
845
|
})
|
|
813
846
|
});
|
|
814
|
-
},
|
|
847
|
+
}, ct = ({ column: e, table: t }) => {
|
|
815
848
|
let n = t.getPreFilteredRowModel().flatRows[0]?.getValue(e.id);
|
|
816
|
-
return
|
|
849
|
+
return q(typeof n == "number" ? it : typeof n == "boolean" ? at : typeof n == "object" ? ot : st, { column: e });
|
|
817
850
|
};
|
|
818
851
|
// src/Components/Base/BaseTable/BaseTableHeader.tsx
|
|
819
|
-
function
|
|
820
|
-
return /* @__PURE__ */ K
|
|
852
|
+
function lt({ table: e, enableFilters: t = !0 }) {
|
|
853
|
+
return /* @__PURE__ */ q(K, { children: e.getHeaderGroups().map((n) => {
|
|
821
854
|
let r = t !== !1 && n.headers.some((e) => e.column.getCanFilter());
|
|
822
|
-
return /* @__PURE__ */
|
|
855
|
+
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("tr", { children: n.headers.map((e) => {
|
|
823
856
|
let t = e.column.getCanSort(), n = e.column.getIsSorted(), r = e.column.columnDef.meta?.align === "right";
|
|
824
|
-
return /* @__PURE__ */
|
|
857
|
+
return /* @__PURE__ */ q("th", {
|
|
825
858
|
colSpan: e.colSpan,
|
|
826
859
|
onClick: t ? e.column.getToggleSortingHandler() : void 0,
|
|
827
860
|
className: `aa-table-heading-cell ${t ? "aa-table-sortable user-select-none" : ""} ${r ? "text-end" : ""}`,
|
|
828
|
-
children: e.isPlaceholder ? null : /* @__PURE__ */
|
|
861
|
+
children: e.isPlaceholder ? null : /* @__PURE__ */ J("div", {
|
|
829
862
|
className: `d-flex align-items-center gap-2 ${r ? "justify-content-end text-end" : ""}`,
|
|
830
|
-
children: [
|
|
863
|
+
children: [x(e.column.columnDef.header, e.getContext()), t && /* @__PURE__ */ q("span", { children: n === "asc" ? /* @__PURE__ */ q(le, { className: "aa-table-sort-icon aa-table-sort-icon-active" }) : n === "desc" ? /* @__PURE__ */ q(D, { className: "aa-table-sort-icon aa-table-sort-icon-active" }) : /* @__PURE__ */ q(ie, { className: "aa-table-sort-icon" }) })]
|
|
831
864
|
})
|
|
832
865
|
}, e.id);
|
|
833
|
-
}) }), r && /* @__PURE__ */
|
|
866
|
+
}) }), r && /* @__PURE__ */ q("tr", {
|
|
834
867
|
className: "aa-table-filter-row",
|
|
835
|
-
children: n.headers.map((t) => /* @__PURE__ */
|
|
868
|
+
children: n.headers.map((t) => /* @__PURE__ */ q("th", {
|
|
836
869
|
colSpan: t.colSpan,
|
|
837
870
|
className: "aa-table-filter-cell px-3 py-1",
|
|
838
|
-
children: t.column.getCanFilter() ? /* @__PURE__ */
|
|
871
|
+
children: t.column.getCanFilter() ? /* @__PURE__ */ q(ct, {
|
|
839
872
|
column: t.column,
|
|
840
873
|
table: e
|
|
841
874
|
}) : null
|
|
@@ -844,7 +877,7 @@ function rt({ table: e, enableFilters: t = !0 }) {
|
|
|
844
877
|
}) });
|
|
845
878
|
}
|
|
846
879
|
// src/Components/Base/BaseTable/tableHelper.tsx
|
|
847
|
-
var
|
|
880
|
+
var ut = (e, t) => {
|
|
848
881
|
let { rows: n } = e.getFilteredRowModel(), r = t ?? "ExportedData.csv", i = e.getHeaderGroups().map((e) => e.headers.map((e) => typeof e.column.columnDef.header == "function" ? e.column.columnDef.accessorKey : e.column.columnDef.header)), a = n.map((e) => e.getVisibleCells().map((e) => e.getValue())), o = (e) => {
|
|
849
882
|
if (e == null) return "";
|
|
850
883
|
let t = String(e);
|
|
@@ -853,17 +886,17 @@ var it = (e, t) => {
|
|
|
853
886
|
l.download = r, l.href = URL.createObjectURL(c), l.style.visibility = "hidden", document.body.appendChild(l), l.click(), document.body.removeChild(l);
|
|
854
887
|
};
|
|
855
888
|
// src/Utils/bootsTrap.tsx
|
|
856
|
-
function
|
|
857
|
-
return /* @__PURE__ */
|
|
889
|
+
function dt(e) {
|
|
890
|
+
return /* @__PURE__ */ q("div", {
|
|
858
891
|
className: "aa-tooltip-container",
|
|
859
|
-
children: /* @__PURE__ */
|
|
892
|
+
children: /* @__PURE__ */ q("span", { children: e })
|
|
860
893
|
});
|
|
861
894
|
}
|
|
862
|
-
function
|
|
863
|
-
return /* @__PURE__ */
|
|
895
|
+
function ft(e, t) {
|
|
896
|
+
return /* @__PURE__ */ q(be, {
|
|
864
897
|
placement: "auto",
|
|
865
898
|
trigger: ["hover", "focus"],
|
|
866
|
-
overlay: /* @__PURE__ */
|
|
899
|
+
overlay: /* @__PURE__ */ q(Se, {
|
|
867
900
|
id: "aa-react-tooltip",
|
|
868
901
|
className: "aa-tooltip",
|
|
869
902
|
children: e
|
|
@@ -872,9 +905,9 @@ function ot(e, t) {
|
|
|
872
905
|
});
|
|
873
906
|
}
|
|
874
907
|
// src/Utils/format.ts
|
|
875
|
-
function
|
|
908
|
+
function pt(e, t) {
|
|
876
909
|
if (!e) return "N/A";
|
|
877
|
-
let n =
|
|
910
|
+
let n = Ne.language || "en", r = t && ("hour" in t || "minute" in t || "second" in t || "timeStyle" in t), i = t && ("year" in t || "month" in t || "day" in t || "dateStyle" in t), a = {
|
|
878
911
|
...r || i ? {} : {
|
|
879
912
|
dateStyle: "medium",
|
|
880
913
|
timeStyle: "short"
|
|
@@ -883,7 +916,7 @@ function st(e, t) {
|
|
|
883
916
|
};
|
|
884
917
|
return new Intl.DateTimeFormat(n, a).format(new Date(e));
|
|
885
918
|
}
|
|
886
|
-
function
|
|
919
|
+
function mt(e) {
|
|
887
920
|
if (!e) return "N/A";
|
|
888
921
|
let t = e instanceof Date ? e : new Date(e);
|
|
889
922
|
if (isNaN(t.getTime())) return "N/A";
|
|
@@ -912,33 +945,33 @@ function ct(e) {
|
|
|
912
945
|
unit: "second",
|
|
913
946
|
seconds: 1
|
|
914
947
|
}
|
|
915
|
-
], i = r.find((e) => Math.abs(n) >= e.seconds) ?? r[r.length - 1], a = Math.round(n / i.seconds), o =
|
|
948
|
+
], i = r.find((e) => Math.abs(n) >= e.seconds) ?? r[r.length - 1], a = Math.round(n / i.seconds), o = Ne.language || "en";
|
|
916
949
|
return new Intl.RelativeTimeFormat(o, { numeric: "auto" }).format(a, i.unit);
|
|
917
950
|
}
|
|
918
|
-
function
|
|
951
|
+
function ht(e, t = "Done") {
|
|
919
952
|
if (!e) return "N/A";
|
|
920
953
|
let n = e instanceof Date ? e : new Date(e);
|
|
921
|
-
return isNaN(n.getTime()) ? "N/A" : n.getTime() <= Date.now() ? t :
|
|
954
|
+
return isNaN(n.getTime()) ? "N/A" : n.getTime() <= Date.now() ? t : mt(n);
|
|
922
955
|
}
|
|
923
|
-
function
|
|
924
|
-
let r = t ||
|
|
956
|
+
function gt(e, t, n) {
|
|
957
|
+
let r = t || Ne.language || "en";
|
|
925
958
|
return new Intl.NumberFormat(r, n).format(e);
|
|
926
959
|
}
|
|
927
|
-
function
|
|
960
|
+
function _t(e, t = "", n, r) {
|
|
928
961
|
let i = t ? ` ${t}` : "";
|
|
929
|
-
return e >= 1e9 ? `${(e / 1e9).toFixed(2)}B${i}` : e >= 1e6 ? `${(e / 1e6).toFixed(1)}M${i}` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}K${i}` : `${
|
|
962
|
+
return e >= 1e9 ? `${(e / 1e9).toFixed(2)}B${i}` : e >= 1e6 ? `${(e / 1e6).toFixed(1)}M${i}` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}K${i}` : `${gt(e, n, r)}${i}`;
|
|
930
963
|
}
|
|
931
|
-
function
|
|
932
|
-
return `${
|
|
964
|
+
function vt(e) {
|
|
965
|
+
return `${gt(Math.round(e), void 0, { maximumFractionDigits: 0 })} ISK`;
|
|
933
966
|
}
|
|
934
967
|
// src/Components/Base/BaseTable/BaseTablePages.tsx
|
|
935
|
-
var
|
|
936
|
-
let { t: a } =
|
|
937
|
-
return /* @__PURE__ */
|
|
968
|
+
var yt = ({ table: e, isFetching: t = !1, fileName: n, showPageNumber: r = !1, showExport: i = !0 }) => {
|
|
969
|
+
let { t: a } = G(Q), o = Math.max(1, e.getPageCount());
|
|
970
|
+
return /* @__PURE__ */ q("div", { children: /* @__PURE__ */ J(z, {
|
|
938
971
|
size: "sm",
|
|
939
972
|
className: "z-0",
|
|
940
973
|
children: [
|
|
941
|
-
r && /* @__PURE__ */
|
|
974
|
+
r && /* @__PURE__ */ q(R, {
|
|
942
975
|
size: "sm",
|
|
943
976
|
variant: "primary",
|
|
944
977
|
children: a("Page {{page}} of {{total}}", {
|
|
@@ -946,80 +979,80 @@ var pt = ({ table: e, isFetching: t = !1, fileName: n, showPageNumber: r = !1, s
|
|
|
946
979
|
total: o
|
|
947
980
|
})
|
|
948
981
|
}),
|
|
949
|
-
t ?
|
|
982
|
+
t ? ft(a("Refreshing Data"), /* @__PURE__ */ q(R, {
|
|
950
983
|
size: "sm",
|
|
951
984
|
variant: "primary",
|
|
952
|
-
children: /* @__PURE__ */
|
|
953
|
-
})) :
|
|
985
|
+
children: /* @__PURE__ */ q("i", { className: "fas fa-sync fa-spin" })
|
|
986
|
+
})) : ft(a("Data Loaded: {{date}}", { date: pt((/* @__PURE__ */ new Date()).toISOString()) }), /* @__PURE__ */ q(R, {
|
|
954
987
|
size: "sm",
|
|
955
988
|
variant: "primary",
|
|
956
|
-
children: /* @__PURE__ */
|
|
989
|
+
children: /* @__PURE__ */ q("i", { className: "far fa-check-circle" })
|
|
957
990
|
})),
|
|
958
|
-
i && /* @__PURE__ */
|
|
991
|
+
i && /* @__PURE__ */ q(R, {
|
|
959
992
|
size: "sm",
|
|
960
993
|
variant: "primary",
|
|
961
|
-
onClick: () =>
|
|
994
|
+
onClick: () => ut(e, n ?? "ExportedData.csv"),
|
|
962
995
|
children: a("Export Table to CSV")
|
|
963
996
|
})
|
|
964
997
|
]
|
|
965
998
|
}) });
|
|
966
|
-
},
|
|
967
|
-
columnFilteringFeature:
|
|
968
|
-
columnFacetingFeature:
|
|
969
|
-
columnSizingFeature:
|
|
970
|
-
columnVisibilityFeature:
|
|
971
|
-
rowSortingFeature:
|
|
972
|
-
rowPaginationFeature:
|
|
973
|
-
rowSelectionFeature:
|
|
974
|
-
filteredRowModel:
|
|
975
|
-
sortedRowModel:
|
|
976
|
-
paginatedRowModel:
|
|
977
|
-
facetedRowModel:
|
|
978
|
-
facetedUniqueValues:
|
|
979
|
-
facetedMinMaxValues:
|
|
980
|
-
filterFns:
|
|
981
|
-
sortFns:
|
|
982
|
-
}),
|
|
999
|
+
}, bt = w({
|
|
1000
|
+
columnFilteringFeature: u,
|
|
1001
|
+
columnFacetingFeature: l,
|
|
1002
|
+
columnSizingFeature: d,
|
|
1003
|
+
columnVisibilityFeature: f,
|
|
1004
|
+
rowSortingFeature: C,
|
|
1005
|
+
rowPaginationFeature: te,
|
|
1006
|
+
rowSelectionFeature: S,
|
|
1007
|
+
filteredRowModel: _(),
|
|
1008
|
+
sortedRowModel: y(),
|
|
1009
|
+
paginatedRowModel: v(),
|
|
1010
|
+
facetedRowModel: h(),
|
|
1011
|
+
facetedUniqueValues: g(),
|
|
1012
|
+
facetedMinMaxValues: m(),
|
|
1013
|
+
filterFns: b,
|
|
1014
|
+
sortFns: ne
|
|
1015
|
+
}), xt = () => p(), St = ({ message: e, className: t = "", spinnerClassName: n = "" } = {}) => /* @__PURE__ */ J("div", {
|
|
983
1016
|
className: `d-flex flex-column align-items-center justify-content-center ${t}`,
|
|
984
|
-
children: [/* @__PURE__ */
|
|
1017
|
+
children: [/* @__PURE__ */ q("div", {
|
|
985
1018
|
className: `spinner-border text-info ${n}`,
|
|
986
1019
|
role: "status",
|
|
987
|
-
children: /* @__PURE__ */
|
|
1020
|
+
children: /* @__PURE__ */ q("span", {
|
|
988
1021
|
className: "visually-hidden",
|
|
989
1022
|
children: "Loading..."
|
|
990
1023
|
})
|
|
991
|
-
}), e && /* @__PURE__ */
|
|
992
|
-
}),
|
|
1024
|
+
}), e && /* @__PURE__ */ q("span", { children: e })]
|
|
1025
|
+
}), Ct = "aa-table-message text-center py-5 px-3", wt = ({ isFetching: e = !1, isLoading: t = !1, loadingText: n, serverPagination: r, isError: i = !1, debugTable: a = !1, data: o = [], columns: s, initialState: l = void 0, exportFileName: u = void 0, variant: d = "default", emptyText: f, emptyState: p, toolbar: m, footer: h, showFooter: g = !1, className: _, tableClassName: v, headerClassName: y, bodyClassName: b, rowClassName: te, footClassName: S, footerClassName: C, pageSizeOptions: ne = [
|
|
993
1026
|
10,
|
|
994
1027
|
25,
|
|
995
1028
|
50,
|
|
996
1029
|
100
|
|
997
|
-
], getRowClassName:
|
|
998
|
-
let
|
|
1030
|
+
], getRowClassName: w, enableFilters: T = !0, rowSelection: E, onRowSelectionChange: ie, enableRowSelection: ae, getRowId: oe, onRowClick: D }) => {
|
|
1031
|
+
let le = c(), { t: A } = G(Q), j = r && {
|
|
999
1032
|
pageIndex: r.page - 1,
|
|
1000
1033
|
pageSize: r.pageSize
|
|
1001
|
-
},
|
|
1002
|
-
features:
|
|
1003
|
-
data:
|
|
1004
|
-
columns:
|
|
1005
|
-
getRowId:
|
|
1034
|
+
}, M = re({
|
|
1035
|
+
features: bt,
|
|
1036
|
+
data: o,
|
|
1037
|
+
columns: s,
|
|
1038
|
+
getRowId: oe,
|
|
1006
1039
|
state: {
|
|
1007
1040
|
...E === void 0 ? {} : { rowSelection: E },
|
|
1008
|
-
...
|
|
1041
|
+
...j ? { pagination: j } : {}
|
|
1009
1042
|
},
|
|
1010
|
-
...r &&
|
|
1043
|
+
...r && j ? {
|
|
1011
1044
|
manualPagination: !0,
|
|
1012
1045
|
pageCount: Math.max(1, Math.ceil(r.total / r.pageSize)),
|
|
1013
1046
|
enableSorting: !1,
|
|
1014
1047
|
enableColumnFilters: !1,
|
|
1015
1048
|
onPaginationChange: (e) => {
|
|
1016
|
-
let t =
|
|
1017
|
-
t.pageSize ===
|
|
1049
|
+
let t = ee(e, j);
|
|
1050
|
+
t.pageSize === j.pageSize ? t.pageIndex !== j.pageIndex && r.onPageChange(t.pageIndex + 1) : r.onPageSizeChange(t.pageSize);
|
|
1018
1051
|
}
|
|
1019
1052
|
} : {},
|
|
1020
|
-
onRowSelectionChange:
|
|
1021
|
-
enableRowSelection:
|
|
1022
|
-
debugTable:
|
|
1053
|
+
onRowSelectionChange: ie,
|
|
1054
|
+
enableRowSelection: ae,
|
|
1055
|
+
debugTable: a,
|
|
1023
1056
|
initialState: {
|
|
1024
1057
|
...l,
|
|
1025
1058
|
pagination: {
|
|
@@ -1028,165 +1061,165 @@ var pt = ({ table: e, isFetching: t = !1, fileName: n, showPageNumber: r = !1, s
|
|
|
1028
1061
|
...l?.pagination
|
|
1029
1062
|
}
|
|
1030
1063
|
}
|
|
1031
|
-
}), { rows:
|
|
1032
|
-
return /* @__PURE__ */
|
|
1033
|
-
className: `aa-table-shell mt-2 ${
|
|
1064
|
+
}), { rows: N } = M.getRowModel(), ue = u === void 0 ? `ExportedData_${le.pathname}` : u, P = d === "light", { pageIndex: de, pageSize: F } = M.state.pagination, I = M.getPageCount(), L = M.getVisibleLeafColumns().length;
|
|
1065
|
+
return /* @__PURE__ */ J("div", {
|
|
1066
|
+
className: `aa-table-shell mt-2 ${P ? "aa-table-shell-light aa-table-light" : ""} ${_ ?? ""}`,
|
|
1034
1067
|
children: [
|
|
1035
1068
|
m,
|
|
1036
|
-
/* @__PURE__ */
|
|
1037
|
-
className: `aa-table-scroll ${t &&
|
|
1069
|
+
/* @__PURE__ */ q("div", {
|
|
1070
|
+
className: `aa-table-scroll ${t && N.length > 0 ? "opacity-50 pe-none" : ""}`,
|
|
1038
1071
|
"aria-busy": t,
|
|
1039
|
-
children: /* @__PURE__ */
|
|
1040
|
-
className: `aa-table w-100 text-start ${
|
|
1072
|
+
children: /* @__PURE__ */ J("table", {
|
|
1073
|
+
className: `aa-table w-100 text-start ${P ? "aa-table-light" : ""} ${v ?? ""}`,
|
|
1041
1074
|
children: [
|
|
1042
|
-
/* @__PURE__ */
|
|
1043
|
-
className: `aa-table-head ${
|
|
1044
|
-
children: /* @__PURE__ */
|
|
1045
|
-
table:
|
|
1046
|
-
enableFilters:
|
|
1075
|
+
/* @__PURE__ */ q("thead", {
|
|
1076
|
+
className: `aa-table-head ${y ?? ""}`,
|
|
1077
|
+
children: /* @__PURE__ */ q(lt, {
|
|
1078
|
+
table: M,
|
|
1079
|
+
enableFilters: T
|
|
1047
1080
|
})
|
|
1048
1081
|
}),
|
|
1049
|
-
/* @__PURE__ */
|
|
1050
|
-
className: `aa-table-body ${
|
|
1051
|
-
children:
|
|
1052
|
-
colSpan:
|
|
1053
|
-
className:
|
|
1054
|
-
children:
|
|
1055
|
-
}) }) : t &&
|
|
1056
|
-
colSpan:
|
|
1057
|
-
className:
|
|
1058
|
-
children: /* @__PURE__ */
|
|
1059
|
-
}) }) :
|
|
1060
|
-
colSpan:
|
|
1061
|
-
className:
|
|
1062
|
-
children: p ?? f ??
|
|
1063
|
-
}) }) :
|
|
1064
|
-
onClick:
|
|
1065
|
-
className: `aa-table-row ${
|
|
1082
|
+
/* @__PURE__ */ q("tbody", {
|
|
1083
|
+
className: `aa-table-body ${b ?? ""}`,
|
|
1084
|
+
children: i ? /* @__PURE__ */ q("tr", { children: /* @__PURE__ */ q("td", {
|
|
1085
|
+
colSpan: L,
|
|
1086
|
+
className: Ct,
|
|
1087
|
+
children: A("Something went wrong.")
|
|
1088
|
+
}) }) : t && N.length === 0 ? /* @__PURE__ */ q("tr", { children: /* @__PURE__ */ q("td", {
|
|
1089
|
+
colSpan: L,
|
|
1090
|
+
className: Ct,
|
|
1091
|
+
children: /* @__PURE__ */ q(St, { message: n })
|
|
1092
|
+
}) }) : N.length === 0 ? /* @__PURE__ */ q("tr", { children: /* @__PURE__ */ q("td", {
|
|
1093
|
+
colSpan: L,
|
|
1094
|
+
className: Ct,
|
|
1095
|
+
children: p ?? f ?? A("No Data Available")
|
|
1096
|
+
}) }) : N.map((e) => /* @__PURE__ */ q("tr", {
|
|
1097
|
+
onClick: D ? () => D(e) : void 0,
|
|
1098
|
+
className: `aa-table-row ${w ? w(e) : "aa-table-row-hover"} ${te ?? ""}`,
|
|
1066
1099
|
children: e.getVisibleCells().map((e) => {
|
|
1067
1100
|
let t = e.column.columnDef.meta?.align === "right";
|
|
1068
|
-
return /* @__PURE__ */
|
|
1101
|
+
return /* @__PURE__ */ q("td", {
|
|
1069
1102
|
className: `aa-table-cell align-middle ${t ? "text-end" : ""}`,
|
|
1070
|
-
children:
|
|
1103
|
+
children: x(e.column.columnDef.cell, e.getContext())
|
|
1071
1104
|
}, e.id);
|
|
1072
1105
|
})
|
|
1073
1106
|
}, e.id))
|
|
1074
1107
|
}),
|
|
1075
|
-
g && !
|
|
1076
|
-
className: `aa-table-foot ${
|
|
1077
|
-
children:
|
|
1108
|
+
g && !i && N.length > 0 && /* @__PURE__ */ q("tfoot", {
|
|
1109
|
+
className: `aa-table-foot ${S ?? ""}`,
|
|
1110
|
+
children: M.getFooterGroups().map((e) => /* @__PURE__ */ q("tr", { children: e.headers.map((e) => {
|
|
1078
1111
|
let t = e.column.columnDef.meta?.align === "right";
|
|
1079
|
-
return /* @__PURE__ */
|
|
1112
|
+
return /* @__PURE__ */ q("td", {
|
|
1080
1113
|
colSpan: e.colSpan,
|
|
1081
1114
|
className: `aa-table-cell align-middle ${t ? "text-end" : ""}`,
|
|
1082
|
-
children: e.isPlaceholder ? null :
|
|
1115
|
+
children: e.isPlaceholder ? null : x(e.column.columnDef.footer, e.getContext())
|
|
1083
1116
|
}, e.id);
|
|
1084
1117
|
}) }, e.id))
|
|
1085
1118
|
})
|
|
1086
1119
|
]
|
|
1087
1120
|
})
|
|
1088
1121
|
}),
|
|
1089
|
-
/* @__PURE__ */
|
|
1090
|
-
className: `aa-table-footer d-flex flex-column flex-md-row align-items-center justify-content-between gap-3 p-3 ${
|
|
1122
|
+
/* @__PURE__ */ J("div", {
|
|
1123
|
+
className: `aa-table-footer d-flex flex-column flex-md-row align-items-center justify-content-between gap-3 p-3 ${C ?? ""}`,
|
|
1091
1124
|
children: [
|
|
1092
|
-
/* @__PURE__ */
|
|
1125
|
+
/* @__PURE__ */ J("div", {
|
|
1093
1126
|
className: "d-flex align-items-center justify-content-between gap-3 align-self-stretch align-self-md-auto",
|
|
1094
|
-
children: [/* @__PURE__ */
|
|
1127
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1095
1128
|
className: "d-flex align-items-center gap-3",
|
|
1096
|
-
children: [/* @__PURE__ */
|
|
1129
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1097
1130
|
className: "d-flex align-items-center gap-2",
|
|
1098
|
-
children: [/* @__PURE__ */
|
|
1131
|
+
children: [/* @__PURE__ */ q("span", { children: A("Page Size:") }), /* @__PURE__ */ J(U.Select, {
|
|
1099
1132
|
size: "sm",
|
|
1100
|
-
value:
|
|
1133
|
+
value: F,
|
|
1101
1134
|
disabled: t,
|
|
1102
|
-
onChange: (e) =>
|
|
1135
|
+
onChange: (e) => M.setPageSize(Number(e.target.value)),
|
|
1103
1136
|
className: "aa-table-select w-auto",
|
|
1104
|
-
children: [ne.map((e) => /* @__PURE__ */
|
|
1137
|
+
children: [ne.map((e) => /* @__PURE__ */ q("option", {
|
|
1105
1138
|
value: e,
|
|
1106
1139
|
children: e
|
|
1107
|
-
}, e)), !r && /* @__PURE__ */
|
|
1140
|
+
}, e)), !r && /* @__PURE__ */ q("option", {
|
|
1108
1141
|
value: 1e6,
|
|
1109
|
-
children:
|
|
1142
|
+
children: A("Show All")
|
|
1110
1143
|
})]
|
|
1111
1144
|
})]
|
|
1112
|
-
}), r && /* @__PURE__ */
|
|
1145
|
+
}), r && /* @__PURE__ */ q("span", {
|
|
1113
1146
|
className: "aa-table-total",
|
|
1114
|
-
children: r.totalText ??
|
|
1147
|
+
children: r.totalText ?? A("Total: {{total}}", { total: r.total.toLocaleString() })
|
|
1115
1148
|
})]
|
|
1116
|
-
}), /* @__PURE__ */
|
|
1117
|
-
table:
|
|
1149
|
+
}), /* @__PURE__ */ q(yt, {
|
|
1150
|
+
table: M,
|
|
1118
1151
|
isFetching: e,
|
|
1119
|
-
fileName:
|
|
1152
|
+
fileName: ue,
|
|
1120
1153
|
showPageNumber: !0,
|
|
1121
1154
|
showExport: !r
|
|
1122
1155
|
})]
|
|
1123
1156
|
}),
|
|
1124
|
-
|
|
1157
|
+
I > 1 && /* @__PURE__ */ J("div", {
|
|
1125
1158
|
className: "d-flex align-items-center gap-2",
|
|
1126
1159
|
children: [
|
|
1127
|
-
/* @__PURE__ */
|
|
1160
|
+
/* @__PURE__ */ q(R, {
|
|
1128
1161
|
size: "sm",
|
|
1129
|
-
disabled: t || !
|
|
1130
|
-
onClick: () =>
|
|
1162
|
+
disabled: t || !M.getCanPreviousPage(),
|
|
1163
|
+
onClick: () => M.setPageIndex(0),
|
|
1131
1164
|
className: "aa-table-page-button",
|
|
1132
|
-
title:
|
|
1133
|
-
children: /* @__PURE__ */
|
|
1165
|
+
title: A("First Page"),
|
|
1166
|
+
children: /* @__PURE__ */ q(se, { className: "aa-table-page-icon" })
|
|
1134
1167
|
}),
|
|
1135
|
-
/* @__PURE__ */
|
|
1168
|
+
/* @__PURE__ */ q(R, {
|
|
1136
1169
|
size: "sm",
|
|
1137
|
-
disabled: t || !
|
|
1138
|
-
onClick: () =>
|
|
1170
|
+
disabled: t || !M.getCanPreviousPage(),
|
|
1171
|
+
onClick: () => M.previousPage(),
|
|
1139
1172
|
className: "aa-table-page-button",
|
|
1140
|
-
title:
|
|
1141
|
-
children: /* @__PURE__ */
|
|
1173
|
+
title: A("Previous Page"),
|
|
1174
|
+
children: /* @__PURE__ */ q(O, { className: "aa-table-page-icon" })
|
|
1142
1175
|
}),
|
|
1143
|
-
/* @__PURE__ */
|
|
1176
|
+
/* @__PURE__ */ q("span", {
|
|
1144
1177
|
className: "aa-table-page-number px-2 fw-bold",
|
|
1145
|
-
children:
|
|
1146
|
-
page:
|
|
1147
|
-
total:
|
|
1178
|
+
children: A("Page {{page}} of {{total}}", {
|
|
1179
|
+
page: de + 1,
|
|
1180
|
+
total: I
|
|
1148
1181
|
})
|
|
1149
1182
|
}),
|
|
1150
|
-
/* @__PURE__ */
|
|
1183
|
+
/* @__PURE__ */ q(R, {
|
|
1151
1184
|
size: "sm",
|
|
1152
|
-
disabled: t || !
|
|
1153
|
-
onClick: () =>
|
|
1185
|
+
disabled: t || !M.getCanNextPage(),
|
|
1186
|
+
onClick: () => M.nextPage(),
|
|
1154
1187
|
className: "aa-table-page-button",
|
|
1155
|
-
title:
|
|
1156
|
-
children: /* @__PURE__ */
|
|
1188
|
+
title: A("Next Page"),
|
|
1189
|
+
children: /* @__PURE__ */ q(k, { className: "aa-table-page-icon" })
|
|
1157
1190
|
}),
|
|
1158
|
-
/* @__PURE__ */
|
|
1191
|
+
/* @__PURE__ */ q(R, {
|
|
1159
1192
|
size: "sm",
|
|
1160
|
-
disabled: t || !
|
|
1161
|
-
onClick: () =>
|
|
1193
|
+
disabled: t || !M.getCanNextPage(),
|
|
1194
|
+
onClick: () => M.setPageIndex(I - 1),
|
|
1162
1195
|
className: "aa-table-page-button",
|
|
1163
|
-
title:
|
|
1164
|
-
children: /* @__PURE__ */
|
|
1196
|
+
title: A("Last Page"),
|
|
1197
|
+
children: /* @__PURE__ */ q(ce, { className: "aa-table-page-icon" })
|
|
1165
1198
|
})
|
|
1166
1199
|
]
|
|
1167
1200
|
}),
|
|
1168
|
-
h && /* @__PURE__ */
|
|
1201
|
+
h && /* @__PURE__ */ q("div", {
|
|
1169
1202
|
className: "w-100",
|
|
1170
1203
|
children: h
|
|
1171
1204
|
})
|
|
1172
1205
|
]
|
|
1173
1206
|
}),
|
|
1174
|
-
|
|
1207
|
+
a && /* @__PURE__ */ J("div", {
|
|
1175
1208
|
className: "p-3",
|
|
1176
|
-
children: [/* @__PURE__ */
|
|
1209
|
+
children: [/* @__PURE__ */ q("div", { children: A("{{count}} Rows", { count: M.getRowModel().rows.length }) }), /* @__PURE__ */ q("pre", { children: JSON.stringify(M.state, null, 2) })]
|
|
1177
1210
|
})
|
|
1178
1211
|
]
|
|
1179
1212
|
});
|
|
1180
1213
|
};
|
|
1181
1214
|
// src/Components/Base/BaseTable/BaseTableForm.tsx
|
|
1182
|
-
function
|
|
1183
|
-
let { t } =
|
|
1184
|
-
return /* @__PURE__ */
|
|
1215
|
+
function Tt({ table: e }) {
|
|
1216
|
+
let { t } = G(Q);
|
|
1217
|
+
return /* @__PURE__ */ J("div", {
|
|
1185
1218
|
className: "d-flex align-items-center ms-2",
|
|
1186
|
-
children: [/* @__PURE__ */
|
|
1219
|
+
children: [/* @__PURE__ */ q(U.Label, {
|
|
1187
1220
|
className: "m-0 me-2 text-nowrap",
|
|
1188
1221
|
children: t("Page Size:")
|
|
1189
|
-
}), /* @__PURE__ */
|
|
1222
|
+
}), /* @__PURE__ */ q(U.Select, {
|
|
1190
1223
|
className: "w-auto",
|
|
1191
1224
|
value: e.atoms.pagination.get().pageSize,
|
|
1192
1225
|
onChange: (t) => e.setPageSize(Number(t.target.value)),
|
|
@@ -1196,7 +1229,7 @@ function yt({ table: e }) {
|
|
|
1196
1229
|
60,
|
|
1197
1230
|
100,
|
|
1198
1231
|
1e6
|
|
1199
|
-
].map((e) => /* @__PURE__ */
|
|
1232
|
+
].map((e) => /* @__PURE__ */ q("option", {
|
|
1200
1233
|
value: e,
|
|
1201
1234
|
children: e === 1e6 ? t("Show All") : t("Show {{pageSize}}", { pageSize: e })
|
|
1202
1235
|
}, e))
|
|
@@ -1204,41 +1237,41 @@ function yt({ table: e }) {
|
|
|
1204
1237
|
});
|
|
1205
1238
|
}
|
|
1206
1239
|
// src/Components/Base/BaseTable/BaseTableToolbar.tsx
|
|
1207
|
-
var
|
|
1240
|
+
var Et = ({ table: e }) => /* @__PURE__ */ J(_e, { children: [/* @__PURE__ */ J(z, {
|
|
1208
1241
|
className: "z-0",
|
|
1209
1242
|
children: [
|
|
1210
|
-
/* @__PURE__ */
|
|
1243
|
+
/* @__PURE__ */ q(R, {
|
|
1211
1244
|
variant: "success",
|
|
1212
1245
|
onClick: () => e.setPageIndex(0),
|
|
1213
1246
|
disabled: !e.getCanPreviousPage(),
|
|
1214
|
-
children: /* @__PURE__ */
|
|
1247
|
+
children: /* @__PURE__ */ q("i", { className: "fas fa-angle-double-left" })
|
|
1215
1248
|
}),
|
|
1216
|
-
/* @__PURE__ */
|
|
1249
|
+
/* @__PURE__ */ q(R, {
|
|
1217
1250
|
variant: "success",
|
|
1218
1251
|
onClick: () => e.previousPage(),
|
|
1219
1252
|
disabled: !e.getCanPreviousPage(),
|
|
1220
|
-
children: /* @__PURE__ */
|
|
1253
|
+
children: /* @__PURE__ */ q("i", { className: "fas fa-caret-left" })
|
|
1221
1254
|
}),
|
|
1222
|
-
/* @__PURE__ */
|
|
1255
|
+
/* @__PURE__ */ q(R, {
|
|
1223
1256
|
variant: "success",
|
|
1224
1257
|
onClick: () => e.nextPage(),
|
|
1225
1258
|
disabled: !e.getCanNextPage(),
|
|
1226
|
-
children: /* @__PURE__ */
|
|
1259
|
+
children: /* @__PURE__ */ q("i", { className: "fas fa-caret-right" })
|
|
1227
1260
|
}),
|
|
1228
|
-
/* @__PURE__ */
|
|
1261
|
+
/* @__PURE__ */ q(R, {
|
|
1229
1262
|
variant: "success",
|
|
1230
1263
|
onClick: () => e.setPageIndex(e.getPageCount() - 1),
|
|
1231
1264
|
disabled: !e.getCanNextPage(),
|
|
1232
|
-
children: /* @__PURE__ */
|
|
1265
|
+
children: /* @__PURE__ */ q("i", { className: "fas fa-angle-double-right" })
|
|
1233
1266
|
})
|
|
1234
1267
|
]
|
|
1235
|
-
}), /* @__PURE__ */
|
|
1268
|
+
}), /* @__PURE__ */ q(Tt, { table: e })] }), Dt = {
|
|
1236
1269
|
small: "sm",
|
|
1237
1270
|
medium: void 0,
|
|
1238
1271
|
large: "lg",
|
|
1239
1272
|
extraLarge: "xl"
|
|
1240
1273
|
}, $ = {
|
|
1241
|
-
size:
|
|
1274
|
+
size: Dt.large,
|
|
1242
1275
|
centered: !0,
|
|
1243
1276
|
scrollable: !1,
|
|
1244
1277
|
backdrop: !0,
|
|
@@ -1248,8 +1281,8 @@ var bt = ({ table: e }) => /* @__PURE__ */ q(L, { children: [/* @__PURE__ */ q(I
|
|
|
1248
1281
|
confirmVariant: "success"
|
|
1249
1282
|
};
|
|
1250
1283
|
// src/Components/Base/BaseModal/BaseModal.tsx
|
|
1251
|
-
function
|
|
1252
|
-
let [_, v] =
|
|
1284
|
+
function Ot({ show: e, onHide: t, onEnter: n, onShow: r, onExited: i, title: a, footer: o, children: s, size: c = $.size, centered: l = $.centered, scrollable: u = $.scrollable, backdrop: d = $.backdrop, restoreFocus: f = $.restoreFocus, closeButton: p = $.closeButton, className: m, bodyClassName: h, titleClassName: g }) {
|
|
1285
|
+
let [_, v] = X({
|
|
1253
1286
|
title: a,
|
|
1254
1287
|
children: s,
|
|
1255
1288
|
footer: o
|
|
@@ -1260,7 +1293,7 @@ function St({ show: e, onHide: t, onEnter: n, onShow: r, onExited: i, title: a,
|
|
|
1260
1293
|
footer: o === void 0 ? _.footer : o
|
|
1261
1294
|
});
|
|
1262
1295
|
let y = e ? a : _.title ?? a, b = e ? s : _.children ?? s, x = e ? o : _.footer ?? o;
|
|
1263
|
-
return /* @__PURE__ */
|
|
1296
|
+
return /* @__PURE__ */ J(ye, {
|
|
1264
1297
|
show: e,
|
|
1265
1298
|
size: c,
|
|
1266
1299
|
onHide: t,
|
|
@@ -1274,28 +1307,28 @@ function St({ show: e, onHide: t, onEnter: n, onShow: r, onExited: i, title: a,
|
|
|
1274
1307
|
dialogClassName: m,
|
|
1275
1308
|
contentClassName: "aa-react",
|
|
1276
1309
|
children: [
|
|
1277
|
-
/* @__PURE__ */
|
|
1310
|
+
/* @__PURE__ */ q(ye.Header, {
|
|
1278
1311
|
closeButton: p,
|
|
1279
|
-
children: /* @__PURE__ */
|
|
1312
|
+
children: /* @__PURE__ */ q(ye.Title, {
|
|
1280
1313
|
className: g,
|
|
1281
1314
|
children: y
|
|
1282
1315
|
})
|
|
1283
1316
|
}),
|
|
1284
|
-
/* @__PURE__ */
|
|
1317
|
+
/* @__PURE__ */ q(ye.Body, {
|
|
1285
1318
|
className: h,
|
|
1286
1319
|
children: b
|
|
1287
1320
|
}),
|
|
1288
|
-
x !== null && /* @__PURE__ */
|
|
1321
|
+
x !== null && /* @__PURE__ */ q(ye.Footer, { children: x })
|
|
1289
1322
|
]
|
|
1290
1323
|
});
|
|
1291
1324
|
}
|
|
1292
|
-
function
|
|
1293
|
-
let { t: l } =
|
|
1325
|
+
function kt({ show: e, onHide: t, title: n, children: r, footer: i, hideFooter: a = !1, closeText: o, closeVariant: s = $.closeVariant, ...c }) {
|
|
1326
|
+
let { t: l } = G(Q), u = /* @__PURE__ */ q(R, {
|
|
1294
1327
|
variant: s,
|
|
1295
1328
|
onClick: t,
|
|
1296
1329
|
children: o ?? l("Close")
|
|
1297
1330
|
});
|
|
1298
|
-
return /* @__PURE__ */
|
|
1331
|
+
return /* @__PURE__ */ q(Ot, {
|
|
1299
1332
|
...c,
|
|
1300
1333
|
show: e,
|
|
1301
1334
|
onHide: t,
|
|
@@ -1304,17 +1337,17 @@ function Ct({ show: e, onHide: t, title: n, children: r, footer: i, hideFooter:
|
|
|
1304
1337
|
children: r
|
|
1305
1338
|
});
|
|
1306
1339
|
}
|
|
1307
|
-
function
|
|
1308
|
-
let { t: g } =
|
|
1340
|
+
function At({ data: e, showModal: t, setShowModal: n, onApprove: r, isPending: i = !1, validate: a, initialFormData: o, title: s, confirmText: c, confirmVariant: l, closeText: u, closeVariant: d = $.closeVariant, children: f, onEnter: p, onExited: m, ...h }) {
|
|
1341
|
+
let { t: g } = G(Q), [_, v] = X(null), [y, b] = X(o ?? {}), [x, ee] = X(!1), [te, S] = X(e);
|
|
1309
1342
|
t && e && e !== te && S(e);
|
|
1310
|
-
let C = t ? e : e ?? te,
|
|
1343
|
+
let C = t ? e : e ?? te, ne = () => {
|
|
1311
1344
|
v(null), b(o ?? {}), ee(!1);
|
|
1312
|
-
},
|
|
1345
|
+
}, w = () => {
|
|
1313
1346
|
n(!1);
|
|
1314
|
-
}, T = () => {
|
|
1315
|
-
w(), p?.();
|
|
1316
1347
|
}, re = () => {
|
|
1317
|
-
|
|
1348
|
+
ne(), p?.();
|
|
1349
|
+
}, T = () => {
|
|
1350
|
+
ne(), m?.();
|
|
1318
1351
|
}, E = async () => {
|
|
1319
1352
|
if (a && !a(y)) ee(!0);
|
|
1320
1353
|
else try {
|
|
@@ -1328,57 +1361,57 @@ function wt({ data: e, showModal: t, setShowModal: n, onApprove: r, isPending: i
|
|
|
1328
1361
|
}, ie = typeof f == "function" ? f({
|
|
1329
1362
|
formData: y,
|
|
1330
1363
|
onChange: b
|
|
1331
|
-
}) : f, ae = /* @__PURE__ */
|
|
1364
|
+
}) : f, ae = /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(R, {
|
|
1332
1365
|
variant: l ?? C.color ?? $.confirmVariant,
|
|
1333
1366
|
disabled: i,
|
|
1334
1367
|
onClick: E,
|
|
1335
1368
|
children: i ? g("Loading…") : c || C.buttonText || g("Confirm")
|
|
1336
|
-
}), /* @__PURE__ */
|
|
1369
|
+
}), /* @__PURE__ */ q(R, {
|
|
1337
1370
|
variant: d,
|
|
1338
|
-
onClick:
|
|
1371
|
+
onClick: w,
|
|
1339
1372
|
children: u ?? g("Close")
|
|
1340
1373
|
})] });
|
|
1341
|
-
return /* @__PURE__ */
|
|
1374
|
+
return /* @__PURE__ */ J(Ot, {
|
|
1342
1375
|
...h,
|
|
1343
1376
|
show: t,
|
|
1344
|
-
onHide:
|
|
1345
|
-
onEnter:
|
|
1346
|
-
onExited:
|
|
1377
|
+
onHide: w,
|
|
1378
|
+
onEnter: re,
|
|
1379
|
+
onExited: T,
|
|
1347
1380
|
title: s ?? C.title,
|
|
1348
1381
|
footer: ae,
|
|
1349
|
-
children: [_ && /* @__PURE__ */
|
|
1382
|
+
children: [_ && /* @__PURE__ */ q(he, {
|
|
1350
1383
|
variant: "danger",
|
|
1351
1384
|
onClose: () => v(null),
|
|
1352
1385
|
dismissible: !0,
|
|
1353
1386
|
children: _
|
|
1354
|
-
}), /* @__PURE__ */
|
|
1387
|
+
}), /* @__PURE__ */ q("div", {
|
|
1355
1388
|
className: x ? "was-validated" : "",
|
|
1356
1389
|
children: ie
|
|
1357
1390
|
})]
|
|
1358
1391
|
});
|
|
1359
1392
|
}
|
|
1360
|
-
function
|
|
1361
|
-
return e.variant === "confirm" || "showModal" in e || "data" in e ? /* @__PURE__ */
|
|
1393
|
+
function jt(e) {
|
|
1394
|
+
return e.variant === "confirm" || "showModal" in e || "data" in e ? /* @__PURE__ */ q(At, { ...e }) : /* @__PURE__ */ q(kt, { ...e });
|
|
1362
1395
|
}
|
|
1363
1396
|
// src/Components/Base/BaseModal/BaseModalQuery.tsx
|
|
1364
|
-
function
|
|
1397
|
+
function Mt() {
|
|
1365
1398
|
let t = e.get("csrftoken");
|
|
1366
1399
|
return t ? { "X-CSRFToken": t } : {};
|
|
1367
1400
|
}
|
|
1368
|
-
function
|
|
1401
|
+
function Nt(e) {
|
|
1369
1402
|
let t = e?.message;
|
|
1370
|
-
return
|
|
1403
|
+
return Le(e, typeof t == "string" && t.trim() !== "" ? t : "Unknown error");
|
|
1371
1404
|
}
|
|
1372
|
-
function
|
|
1373
|
-
let t =
|
|
1374
|
-
return
|
|
1405
|
+
function Pt(e) {
|
|
1406
|
+
let t = a();
|
|
1407
|
+
return r({
|
|
1375
1408
|
mutationFn: async (e) => {
|
|
1376
1409
|
let t = await fetch(e, {
|
|
1377
1410
|
method: "POST",
|
|
1378
1411
|
credentials: "same-origin",
|
|
1379
|
-
headers:
|
|
1412
|
+
headers: Mt()
|
|
1380
1413
|
}), n = await t.json();
|
|
1381
|
-
if (!t.ok || n.success !== !0) throw Error(
|
|
1414
|
+
if (!t.ok || n.success !== !0) throw Error(Nt(n));
|
|
1382
1415
|
return n;
|
|
1383
1416
|
},
|
|
1384
1417
|
onSuccess: async () => {
|
|
@@ -1392,9 +1425,9 @@ function Ot(e) {
|
|
|
1392
1425
|
}
|
|
1393
1426
|
});
|
|
1394
1427
|
}
|
|
1395
|
-
function
|
|
1396
|
-
let t =
|
|
1397
|
-
return
|
|
1428
|
+
function Ft(e) {
|
|
1429
|
+
let t = a();
|
|
1430
|
+
return r({
|
|
1398
1431
|
mutationFn: async ({ url: e, formData: t = {} }) => {
|
|
1399
1432
|
let n = new URLSearchParams();
|
|
1400
1433
|
for (let [e, r] of Object.entries(t)) typeof r == "boolean" ? r && n.append(e, "on") : n.append(e, r);
|
|
@@ -1402,12 +1435,12 @@ function kt(e) {
|
|
|
1402
1435
|
method: "POST",
|
|
1403
1436
|
credentials: "same-origin",
|
|
1404
1437
|
headers: {
|
|
1405
|
-
...
|
|
1438
|
+
...Mt(),
|
|
1406
1439
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
1407
1440
|
},
|
|
1408
1441
|
body: n.toString()
|
|
1409
1442
|
}), i = await r.json();
|
|
1410
|
-
if (!r.ok || i.success !== !0) throw Error(
|
|
1443
|
+
if (!r.ok || i.success !== !0) throw Error(Nt(i));
|
|
1411
1444
|
return i;
|
|
1412
1445
|
},
|
|
1413
1446
|
onSuccess: async () => {
|
|
@@ -1422,16 +1455,16 @@ function kt(e) {
|
|
|
1422
1455
|
});
|
|
1423
1456
|
}
|
|
1424
1457
|
// src/Components/Base/BaseModal/useModalState.ts
|
|
1425
|
-
function
|
|
1458
|
+
function It(e = "modal", t = "id") {
|
|
1426
1459
|
let [n, r] = Pe(e, {
|
|
1427
1460
|
clearOnDefault: !0,
|
|
1428
1461
|
defaultValue: ""
|
|
1429
1462
|
}), [i, a] = Pe(t, {
|
|
1430
1463
|
clearOnDefault: !0,
|
|
1431
1464
|
defaultValue: ""
|
|
1432
|
-
}), o =
|
|
1465
|
+
}), o = Y((e, t) => {
|
|
1433
1466
|
r(e), t !== void 0 && a(t);
|
|
1434
|
-
}, [r, a]), s =
|
|
1467
|
+
}, [r, a]), s = Y(() => {
|
|
1435
1468
|
r(""), a("");
|
|
1436
1469
|
}, [r, a]);
|
|
1437
1470
|
return {
|
|
@@ -1443,17 +1476,17 @@ function At(e = "modal", t = "id") {
|
|
|
1443
1476
|
};
|
|
1444
1477
|
}
|
|
1445
1478
|
// src/Components/Base/Loader/ErrorLoader.tsx
|
|
1446
|
-
var
|
|
1479
|
+
var Lt = ({ message: e, title: t, className: n = "", iconClassName: r = "" } = {}) => /* @__PURE__ */ J("div", {
|
|
1447
1480
|
className: `d-flex flex-column align-items-center justify-content-center ${n}`,
|
|
1448
1481
|
children: [
|
|
1449
|
-
/* @__PURE__ */
|
|
1482
|
+
/* @__PURE__ */ q("span", {
|
|
1450
1483
|
className: "aa-shake d-inline-block",
|
|
1451
|
-
children: /* @__PURE__ */
|
|
1484
|
+
children: /* @__PURE__ */ q("i", { className: `fas fa-exclamation-triangle text-danger display-1 ${r}` })
|
|
1452
1485
|
}),
|
|
1453
|
-
t && /* @__PURE__ */
|
|
1454
|
-
e && /* @__PURE__ */
|
|
1486
|
+
t && /* @__PURE__ */ q("h3", { children: t }),
|
|
1487
|
+
e && /* @__PURE__ */ q("p", { children: e })
|
|
1455
1488
|
]
|
|
1456
|
-
}),
|
|
1489
|
+
}), Rt = class extends De {
|
|
1457
1490
|
constructor(e) {
|
|
1458
1491
|
super(e), this.state = {
|
|
1459
1492
|
hasError: !1,
|
|
@@ -1472,15 +1505,15 @@ var jt = ({ message: e, title: t, className: n = "", iconClassName: r = "" } = {
|
|
|
1472
1505
|
render() {
|
|
1473
1506
|
if (this.state.hasError) {
|
|
1474
1507
|
let { t: e, traceClassName: t = "" } = this.props;
|
|
1475
|
-
return /* @__PURE__ */
|
|
1476
|
-
/* @__PURE__ */
|
|
1508
|
+
return /* @__PURE__ */ J(K, { children: [
|
|
1509
|
+
/* @__PURE__ */ q(Lt, {
|
|
1477
1510
|
title: this.state.title,
|
|
1478
1511
|
message: this.state.message
|
|
1479
1512
|
}),
|
|
1480
|
-
/* @__PURE__ */
|
|
1481
|
-
/* @__PURE__ */
|
|
1513
|
+
/* @__PURE__ */ q("h1", { children: e("Something went wrong.") }),
|
|
1514
|
+
/* @__PURE__ */ q("div", {
|
|
1482
1515
|
className: "d-flex justify-content-center",
|
|
1483
|
-
children: /* @__PURE__ */
|
|
1516
|
+
children: /* @__PURE__ */ q("pre", {
|
|
1484
1517
|
className: `border mw-100 overflow-auto p-2 ${t}`,
|
|
1485
1518
|
"data-testid": "error-boundary-trace",
|
|
1486
1519
|
children: this.state.trace
|
|
@@ -1490,18 +1523,18 @@ var jt = ({ message: e, title: t, className: n = "", iconClassName: r = "" } = {
|
|
|
1490
1523
|
}
|
|
1491
1524
|
return this.props.children;
|
|
1492
1525
|
}
|
|
1493
|
-
},
|
|
1526
|
+
}, zt = Ee(Q)(Rt);
|
|
1494
1527
|
// src/Components/Base/BaseHeader.tsx
|
|
1495
|
-
function
|
|
1496
|
-
return /* @__PURE__ */
|
|
1528
|
+
function Bt({ name: e = "Header", children: t }) {
|
|
1529
|
+
return /* @__PURE__ */ q(B, {
|
|
1497
1530
|
className: "bg-dark border-secondary mb-3 shadow-sm",
|
|
1498
|
-
children: /* @__PURE__ */
|
|
1531
|
+
children: /* @__PURE__ */ J(B.Body, {
|
|
1499
1532
|
className: "d-flex flex-wrap align-items-center justify-content-between p-3",
|
|
1500
|
-
children: [/* @__PURE__ */
|
|
1533
|
+
children: [/* @__PURE__ */ q("h3", {
|
|
1501
1534
|
id: "section-heading",
|
|
1502
1535
|
className: "h4 mb-0 fw-bold",
|
|
1503
1536
|
children: e
|
|
1504
|
-
}), t && /* @__PURE__ */
|
|
1537
|
+
}), t && /* @__PURE__ */ q("div", {
|
|
1505
1538
|
className: "d-flex flex-wrap align-items-center gap-2",
|
|
1506
1539
|
children: t
|
|
1507
1540
|
})]
|
|
@@ -1509,16 +1542,16 @@ function Pt({ name: e = "Header", children: t }) {
|
|
|
1509
1542
|
});
|
|
1510
1543
|
}
|
|
1511
1544
|
// src/Components/Base/FilterButtonGroup/FilterButtonGroup.tsx
|
|
1512
|
-
function
|
|
1513
|
-
return /* @__PURE__ */
|
|
1545
|
+
function Vt({ options: e, value: t, onChange: n, ariaLabel: r }) {
|
|
1546
|
+
return /* @__PURE__ */ q("div", {
|
|
1514
1547
|
className: "mw-100 overflow-x-auto",
|
|
1515
|
-
children: /* @__PURE__ */
|
|
1548
|
+
children: /* @__PURE__ */ q(z, {
|
|
1516
1549
|
size: "sm",
|
|
1517
1550
|
"aria-label": r,
|
|
1518
1551
|
className: "border border-black",
|
|
1519
1552
|
children: e.map((e) => {
|
|
1520
1553
|
let r = t === e.value;
|
|
1521
|
-
return /* @__PURE__ */
|
|
1554
|
+
return /* @__PURE__ */ J(R, {
|
|
1522
1555
|
variant: r ? "primary" : "secondary",
|
|
1523
1556
|
"aria-pressed": r,
|
|
1524
1557
|
className: "d-inline-flex align-items-center gap-1",
|
|
@@ -1526,7 +1559,7 @@ function Ft({ options: e, value: t, onChange: n, ariaLabel: r }) {
|
|
|
1526
1559
|
children: [
|
|
1527
1560
|
e.icon,
|
|
1528
1561
|
e.label,
|
|
1529
|
-
e.count !== void 0 && /* @__PURE__ */
|
|
1562
|
+
e.count !== void 0 && /* @__PURE__ */ J(K, { children: [" ", /* @__PURE__ */ q(ge, {
|
|
1530
1563
|
bg: "secondary",
|
|
1531
1564
|
className: "ms-1",
|
|
1532
1565
|
children: e.count
|
|
@@ -1538,14 +1571,14 @@ function Ft({ options: e, value: t, onChange: n, ariaLabel: r }) {
|
|
|
1538
1571
|
});
|
|
1539
1572
|
}
|
|
1540
1573
|
// src/Components/Base/OwnerPortrait/OwnerPortrait.tsx
|
|
1541
|
-
var
|
|
1542
|
-
corporation:
|
|
1543
|
-
alliance:
|
|
1544
|
-
},
|
|
1574
|
+
var Ht = {
|
|
1575
|
+
corporation: ae,
|
|
1576
|
+
alliance: P
|
|
1577
|
+
}, Ut = {
|
|
1545
1578
|
sm: 16,
|
|
1546
1579
|
md: 20,
|
|
1547
1580
|
lg: 24
|
|
1548
|
-
},
|
|
1581
|
+
}, Wt = ({ src: e, alt: t = "", type: n = "character", size: r = "lg", shape: i = "circle", bordered: a = !1, className: o = "" }) => {
|
|
1549
1582
|
let s = [
|
|
1550
1583
|
`aa-owner-portrait-${r}`,
|
|
1551
1584
|
i === "circle" ? "rounded-circle" : "rounded",
|
|
@@ -1553,122 +1586,122 @@ var It = {
|
|
|
1553
1586
|
"flex-shrink-0",
|
|
1554
1587
|
o
|
|
1555
1588
|
].filter(Boolean).join(" ");
|
|
1556
|
-
if (e) return /* @__PURE__ */
|
|
1589
|
+
if (e) return /* @__PURE__ */ q("img", {
|
|
1557
1590
|
src: e,
|
|
1558
1591
|
alt: t,
|
|
1559
1592
|
className: `${s} object-fit-cover`,
|
|
1560
1593
|
loading: "lazy"
|
|
1561
1594
|
});
|
|
1562
|
-
let c =
|
|
1563
|
-
return /* @__PURE__ */
|
|
1595
|
+
let c = Ht[n] ?? L;
|
|
1596
|
+
return /* @__PURE__ */ q("div", {
|
|
1564
1597
|
className: `${s} bg-secondary text-light d-flex align-items-center justify-content-center`,
|
|
1565
1598
|
role: "img",
|
|
1566
1599
|
"aria-label": t || void 0,
|
|
1567
1600
|
"aria-hidden": !t || void 0,
|
|
1568
|
-
children: /* @__PURE__ */
|
|
1601
|
+
children: /* @__PURE__ */ q(c, { size: Ut[r] })
|
|
1569
1602
|
});
|
|
1570
1603
|
};
|
|
1571
1604
|
// src/Components/Base/OwnerSettings/BaseOwnerCard.tsx
|
|
1572
|
-
function
|
|
1573
|
-
let { t: c } =
|
|
1574
|
-
let e = "aa-owner-status-incomplete", t = c("Incomplete"), n =
|
|
1575
|
-
return l === "ok" ? (e = "aa-owner-status-ok", t = c("OK"), n =
|
|
1605
|
+
function Gt({ owner: e, isUpdating: t = !1, cooldown: n = 0, onTriggerUpdate: r, onDeleteClick: i, className: a = "", renderCustomContent: o, renderActions: s }) {
|
|
1606
|
+
let { t: c } = G(Q), l = (e.status || "incomplete").toLowerCase(), u = l === "error", d = l === "token_error", f = u ? "aa-owner-card-error" : d ? "aa-owner-card-token-error" : "", p = () => {
|
|
1607
|
+
let e = "aa-owner-status-incomplete", t = c("Incomplete"), n = E;
|
|
1608
|
+
return l === "ok" ? (e = "aa-owner-status-ok", t = c("OK"), n = oe) : u ? (e = "aa-owner-status-error", t = c("Error"), n = E) : d ? (e = "aa-owner-status-token-error", t = c("Token Error"), n = T) : l === "disabled" && (e = "aa-owner-status-disabled", t = c("Disabled"), n = T), /* @__PURE__ */ J("span", {
|
|
1576
1609
|
className: `aa-owner-status-badge d-inline-flex align-items-center gap-1 px-2 py-1 fw-semibold text-capitalize ${e}`,
|
|
1577
1610
|
children: [
|
|
1578
|
-
(u || d) && /* @__PURE__ */
|
|
1611
|
+
(u || d) && /* @__PURE__ */ J("span", {
|
|
1579
1612
|
className: "aa-pending-dot-container me-1",
|
|
1580
1613
|
"aria-hidden": "true",
|
|
1581
|
-
children: [/* @__PURE__ */
|
|
1614
|
+
children: [/* @__PURE__ */ q("span", { className: d ? "aa-danger-dot-ping" : "aa-pending-dot-ping" }), /* @__PURE__ */ q("span", { className: d ? "aa-danger-dot-core" : "aa-pending-dot-core" })]
|
|
1582
1615
|
}),
|
|
1583
|
-
/* @__PURE__ */
|
|
1616
|
+
/* @__PURE__ */ q(n, {
|
|
1584
1617
|
size: 12,
|
|
1585
1618
|
"aria-hidden": "true"
|
|
1586
1619
|
}),
|
|
1587
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ q("span", { children: t })
|
|
1588
1621
|
]
|
|
1589
1622
|
});
|
|
1590
|
-
}, m = (e.owner_type ?? "").toLowerCase(), h = m === "corporation" ?
|
|
1591
|
-
return /* @__PURE__ */
|
|
1623
|
+
}, m = (e.owner_type ?? "").toLowerCase(), h = m === "corporation" ? ae : m === "alliance" ? P : L, g = c(m === "corporation" ? "Corporation" : m === "alliance" ? "Alliance" : "Character"), _ = m === "corporation" ? "bg-primary text-white border-black" : m === "alliance" ? "bg-success text-white border-black" : "bg-info text-white border-black";
|
|
1624
|
+
return /* @__PURE__ */ J("article", {
|
|
1592
1625
|
className: `aa-owner-card d-flex flex-column gap-3 p-3 ${f} ${a}`.trim(),
|
|
1593
1626
|
children: [
|
|
1594
|
-
/* @__PURE__ */
|
|
1627
|
+
/* @__PURE__ */ J("div", {
|
|
1595
1628
|
className: "d-flex align-items-center gap-3",
|
|
1596
|
-
children: [/* @__PURE__ */
|
|
1629
|
+
children: [/* @__PURE__ */ q(Wt, {
|
|
1597
1630
|
src: e.avatar_url,
|
|
1598
1631
|
alt: e.name,
|
|
1599
1632
|
type: m,
|
|
1600
1633
|
shape: m === "corporation" ? "rounded" : "circle",
|
|
1601
1634
|
bordered: !0
|
|
1602
|
-
}), /* @__PURE__ */
|
|
1635
|
+
}), /* @__PURE__ */ J("div", {
|
|
1603
1636
|
className: "aa-owner-info flex-grow-1",
|
|
1604
|
-
children: [/* @__PURE__ */
|
|
1637
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1605
1638
|
className: "d-flex align-items-center justify-content-between gap-2",
|
|
1606
|
-
children: [/* @__PURE__ */
|
|
1639
|
+
children: [/* @__PURE__ */ q("h3", {
|
|
1607
1640
|
className: "aa-owner-name m-0 fs-6 fw-semibold text-truncate",
|
|
1608
1641
|
title: e.name,
|
|
1609
1642
|
children: e.name
|
|
1610
|
-
}), /* @__PURE__ */
|
|
1643
|
+
}), /* @__PURE__ */ J("span", {
|
|
1611
1644
|
className: `badge border d-inline-flex align-items-center gap-1 flex-shrink-0 ${_}`,
|
|
1612
|
-
children: [/* @__PURE__ */
|
|
1645
|
+
children: [/* @__PURE__ */ q(h, { size: 11 }), g]
|
|
1613
1646
|
})]
|
|
1614
|
-
}), e.subtitle && /* @__PURE__ */
|
|
1647
|
+
}), e.subtitle && /* @__PURE__ */ q("p", {
|
|
1615
1648
|
className: "aa-owner-subtitle m-0 text-truncate",
|
|
1616
1649
|
children: e.subtitle
|
|
1617
1650
|
})]
|
|
1618
1651
|
})]
|
|
1619
1652
|
}),
|
|
1620
|
-
e.error_message && /* @__PURE__ */
|
|
1653
|
+
e.error_message && /* @__PURE__ */ q("div", {
|
|
1621
1654
|
className: "aa-owner-error-banner px-2 py-1 text-break",
|
|
1622
1655
|
role: "alert",
|
|
1623
1656
|
children: e.error_message
|
|
1624
1657
|
}),
|
|
1625
|
-
e.sections && e.sections.length > 0 && /* @__PURE__ */
|
|
1658
|
+
e.sections && e.sections.length > 0 && /* @__PURE__ */ q("div", {
|
|
1626
1659
|
className: "aa-owner-sections d-flex flex-column gap-1 p-2",
|
|
1627
1660
|
children: e.sections.map((e) => {
|
|
1628
1661
|
let t = "aa-owner-dot-muted";
|
|
1629
|
-
return e.is_success === !0 && (t = "aa-owner-dot-ok"), e.is_success === !1 && (t = "aa-owner-dot-warning"), e.has_token_error && (t = "aa-owner-dot-error"), /* @__PURE__ */
|
|
1662
|
+
return e.is_success === !0 && (t = "aa-owner-dot-ok"), e.is_success === !1 && (t = "aa-owner-dot-warning"), e.has_token_error && (t = "aa-owner-dot-error"), /* @__PURE__ */ J("div", {
|
|
1630
1663
|
className: "aa-owner-section-item d-flex align-items-center justify-content-between",
|
|
1631
|
-
children: [/* @__PURE__ */
|
|
1664
|
+
children: [/* @__PURE__ */ J("span", {
|
|
1632
1665
|
className: "d-inline-flex align-items-center gap-2",
|
|
1633
|
-
children: [/* @__PURE__ */
|
|
1666
|
+
children: [/* @__PURE__ */ q("span", {
|
|
1634
1667
|
className: `aa-owner-section-dot flex-shrink-0 rounded-circle ${t}`,
|
|
1635
1668
|
"aria-hidden": "true"
|
|
1636
|
-
}), /* @__PURE__ */
|
|
1637
|
-
}), /* @__PURE__ */
|
|
1669
|
+
}), /* @__PURE__ */ q("span", { children: e.section_name })]
|
|
1670
|
+
}), /* @__PURE__ */ q("span", { children: e.has_token_error ? c("Token Error") : e.is_success === !0 ? c("OK") : e.is_success === !1 ? c("Failed") : c("Pending") })]
|
|
1638
1671
|
}, e.section);
|
|
1639
1672
|
})
|
|
1640
1673
|
}),
|
|
1641
1674
|
o?.(e),
|
|
1642
|
-
/* @__PURE__ */
|
|
1675
|
+
/* @__PURE__ */ J("div", {
|
|
1643
1676
|
className: "aa-owner-badge-row d-flex align-items-center justify-content-between gap-2 mt-auto pt-2",
|
|
1644
|
-
children: [p(), /* @__PURE__ */
|
|
1677
|
+
children: [p(), /* @__PURE__ */ J("span", {
|
|
1645
1678
|
className: "aa-owner-last-sync d-inline-flex align-items-center gap-1",
|
|
1646
1679
|
title: e.last_sync ? `${c("Last sync")}: ${e.last_sync}` : void 0,
|
|
1647
|
-
children: [/* @__PURE__ */
|
|
1680
|
+
children: [/* @__PURE__ */ q(A, {
|
|
1648
1681
|
size: 12,
|
|
1649
1682
|
"aria-hidden": "true"
|
|
1650
|
-
}), /* @__PURE__ */
|
|
1683
|
+
}), /* @__PURE__ */ q("span", { children: e.last_sync ? e.last_sync.slice(5) : c("Never") })]
|
|
1651
1684
|
})]
|
|
1652
1685
|
}),
|
|
1653
|
-
(r || i || s) && /* @__PURE__ */
|
|
1686
|
+
(r || i || s) && /* @__PURE__ */ J("div", {
|
|
1654
1687
|
className: "d-flex align-items-center justify-content-between gap-2 mt-2 pt-2 border-top border-secondary flex-wrap",
|
|
1655
|
-
children: [/* @__PURE__ */
|
|
1688
|
+
children: [/* @__PURE__ */ q("div", { children: s?.(e) }), /* @__PURE__ */ J("div", {
|
|
1656
1689
|
className: "d-flex align-items-center gap-2 ms-auto",
|
|
1657
|
-
children: [r && /* @__PURE__ */
|
|
1690
|
+
children: [r && /* @__PURE__ */ J(R, {
|
|
1658
1691
|
variant: "secondary",
|
|
1659
1692
|
size: "sm",
|
|
1660
1693
|
className: "d-flex align-items-center gap-1",
|
|
1661
1694
|
disabled: t || n > 0,
|
|
1662
1695
|
onClick: () => r(e.id),
|
|
1663
1696
|
"aria-label": c("Update Owner"),
|
|
1664
|
-
children: [t ? /* @__PURE__ */
|
|
1665
|
-
}), i && /* @__PURE__ */
|
|
1697
|
+
children: [t ? /* @__PURE__ */ q("span", { className: "spinner-border spinner-border-sm" }) : /* @__PURE__ */ q(N, { size: 13 }), /* @__PURE__ */ q("span", { children: n > 0 ? `${n}s` : c("Update") })]
|
|
1698
|
+
}), i && /* @__PURE__ */ J(R, {
|
|
1666
1699
|
variant: "danger",
|
|
1667
1700
|
size: "sm",
|
|
1668
1701
|
className: "d-flex align-items-center gap-1",
|
|
1669
1702
|
onClick: () => i(e),
|
|
1670
1703
|
"aria-label": c("Delete Owner"),
|
|
1671
|
-
children: [/* @__PURE__ */
|
|
1704
|
+
children: [/* @__PURE__ */ q(I, { size: 13 }), /* @__PURE__ */ q("span", { children: c("Delete") })]
|
|
1672
1705
|
})]
|
|
1673
1706
|
})]
|
|
1674
1707
|
})
|
|
@@ -1676,62 +1709,62 @@ function zt({ owner: e, isUpdating: t = !1, cooldown: n = 0, onTriggerUpdate: r,
|
|
|
1676
1709
|
});
|
|
1677
1710
|
}
|
|
1678
1711
|
// src/Components/Base/OwnerSettings/MissingOwnerCard.tsx
|
|
1679
|
-
function
|
|
1680
|
-
let { t: i } =
|
|
1681
|
-
return /* @__PURE__ */
|
|
1712
|
+
function Kt({ missing: e, appName: t = "Alliance Auth", actionUrl: n, actionLabel: r }) {
|
|
1713
|
+
let { t: i } = G(Q);
|
|
1714
|
+
return /* @__PURE__ */ J("article", {
|
|
1682
1715
|
className: "aa-owner-card aa-owner-card-missing d-flex flex-column gap-3 p-3",
|
|
1683
1716
|
children: [
|
|
1684
|
-
/* @__PURE__ */
|
|
1717
|
+
/* @__PURE__ */ J("div", {
|
|
1685
1718
|
className: "d-flex align-items-center gap-3",
|
|
1686
|
-
children: [/* @__PURE__ */
|
|
1719
|
+
children: [/* @__PURE__ */ q(Wt, {
|
|
1687
1720
|
src: e.avatar_url,
|
|
1688
1721
|
alt: e.name,
|
|
1689
1722
|
type: e.owner_type,
|
|
1690
1723
|
shape: e.owner_type === "corporation" ? "rounded" : "circle",
|
|
1691
1724
|
bordered: !0
|
|
1692
|
-
}), /* @__PURE__ */
|
|
1725
|
+
}), /* @__PURE__ */ J("div", {
|
|
1693
1726
|
className: "aa-owner-info flex-grow-1",
|
|
1694
|
-
children: [/* @__PURE__ */
|
|
1727
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1695
1728
|
className: "d-flex align-items-center justify-content-between gap-2",
|
|
1696
|
-
children: [/* @__PURE__ */
|
|
1729
|
+
children: [/* @__PURE__ */ q("h3", {
|
|
1697
1730
|
className: "aa-owner-name m-0 fs-6 fw-semibold text-truncate",
|
|
1698
1731
|
children: e.name
|
|
1699
|
-
}), /* @__PURE__ */
|
|
1732
|
+
}), /* @__PURE__ */ J("span", {
|
|
1700
1733
|
className: "aa-owner-status-badge aa-owner-status-missing d-inline-flex align-items-center gap-1 px-2 py-1 fw-semibold text-capitalize",
|
|
1701
|
-
children: [/* @__PURE__ */
|
|
1734
|
+
children: [/* @__PURE__ */ q(T, {
|
|
1702
1735
|
size: 11,
|
|
1703
1736
|
"aria-hidden": "true"
|
|
1704
|
-
}), /* @__PURE__ */
|
|
1737
|
+
}), /* @__PURE__ */ q("span", { children: i("Not Registered") })]
|
|
1705
1738
|
})]
|
|
1706
|
-
}), e.subtitle && /* @__PURE__ */
|
|
1739
|
+
}), e.subtitle && /* @__PURE__ */ q("p", {
|
|
1707
1740
|
className: "aa-owner-subtitle m-0 text-truncate",
|
|
1708
1741
|
children: e.subtitle
|
|
1709
1742
|
})]
|
|
1710
1743
|
})]
|
|
1711
1744
|
}),
|
|
1712
|
-
/* @__PURE__ */
|
|
1745
|
+
/* @__PURE__ */ q("p", {
|
|
1713
1746
|
className: "small text-muted mb-0",
|
|
1714
1747
|
children: i("{{name}} is not registered in {{app}}.", {
|
|
1715
1748
|
name: e.name,
|
|
1716
1749
|
app: t
|
|
1717
1750
|
})
|
|
1718
1751
|
}),
|
|
1719
|
-
n && /* @__PURE__ */
|
|
1752
|
+
n && /* @__PURE__ */ q("div", {
|
|
1720
1753
|
className: "d-flex justify-content-end mt-auto pt-2 border-top border-secondary",
|
|
1721
|
-
children: /* @__PURE__ */
|
|
1754
|
+
children: /* @__PURE__ */ J(R, {
|
|
1722
1755
|
href: n,
|
|
1723
1756
|
variant: "primary",
|
|
1724
1757
|
size: "sm",
|
|
1725
1758
|
className: "d-flex align-items-center gap-1",
|
|
1726
|
-
children: [/* @__PURE__ */
|
|
1759
|
+
children: [/* @__PURE__ */ q(M, { size: 13 }), /* @__PURE__ */ q("span", { children: r ?? i("Add to {{app}}", { app: t }) })]
|
|
1727
1760
|
})
|
|
1728
1761
|
})
|
|
1729
1762
|
]
|
|
1730
1763
|
});
|
|
1731
1764
|
}
|
|
1732
1765
|
// src/Components/Base/OwnerSettings/OwnerFilterBar.tsx
|
|
1733
|
-
function
|
|
1734
|
-
let { t: o } =
|
|
1766
|
+
function qt({ search: e, onSearchChange: t, typeFilter: n, onTypeChange: r, counts: i, searchPlaceholder: a }) {
|
|
1767
|
+
let { t: o } = G(Q), s = [
|
|
1735
1768
|
{
|
|
1736
1769
|
value: "all",
|
|
1737
1770
|
label: o("All"),
|
|
@@ -1753,20 +1786,20 @@ function Vt({ search: e, onSearchChange: t, typeFilter: n, onTypeChange: r, coun
|
|
|
1753
1786
|
count: i.alliance
|
|
1754
1787
|
}
|
|
1755
1788
|
].filter((e) => e.value === "all" || (e.count ?? 0) > 0 || e.value === n);
|
|
1756
|
-
return /* @__PURE__ */
|
|
1789
|
+
return /* @__PURE__ */ J("div", {
|
|
1757
1790
|
className: "d-flex align-items-center justify-content-between flex-wrap gap-3 mb-3",
|
|
1758
|
-
children: [/* @__PURE__ */
|
|
1791
|
+
children: [/* @__PURE__ */ q(Vt, {
|
|
1759
1792
|
options: s,
|
|
1760
1793
|
value: n,
|
|
1761
1794
|
onChange: r,
|
|
1762
1795
|
ariaLabel: o("Filter by owner type")
|
|
1763
|
-
}), /* @__PURE__ */
|
|
1796
|
+
}), /* @__PURE__ */ J(ve, {
|
|
1764
1797
|
size: "sm",
|
|
1765
1798
|
className: "aa-owner-filter-search",
|
|
1766
|
-
children: [/* @__PURE__ */
|
|
1799
|
+
children: [/* @__PURE__ */ q(ve.Text, { children: /* @__PURE__ */ q(ue, {
|
|
1767
1800
|
size: 14,
|
|
1768
1801
|
"aria-hidden": "true"
|
|
1769
|
-
}) }), /* @__PURE__ */
|
|
1802
|
+
}) }), /* @__PURE__ */ q(U.Control, {
|
|
1770
1803
|
type: "search",
|
|
1771
1804
|
value: e,
|
|
1772
1805
|
placeholder: a ?? o("Search owners…"),
|
|
@@ -1777,9 +1810,9 @@ function Vt({ search: e, onSearchChange: t, typeFilter: n, onTypeChange: r, coun
|
|
|
1777
1810
|
});
|
|
1778
1811
|
}
|
|
1779
1812
|
// src/Components/Base/OwnerSettings/BaseOwnerSettingsSection.tsx
|
|
1780
|
-
var
|
|
1781
|
-
function
|
|
1782
|
-
let { t:
|
|
1813
|
+
var Jt = (e) => e.owner_type ?? "character";
|
|
1814
|
+
function Yt({ title: e, description: t, icon: n, owners: r, missingOwners: i, isLoading: a = !1, isError: o = !1, errorMessage: s, emptyMessage: c, appName: l = "Alliance Auth", className: u = "", bodyClassName: d = "bg-dark text-light", enableFilters: f = !1, searchPlaceholder: p, onUpdateAll: m, isUpdatingAll: h = !1, globalCooldown: g = 0, feedbackMessage: _, onDismissFeedback: v, onTriggerSingleUpdate: y, isUpdatable: b, isDeletable: x, updatingOwnerId: ee = null, ownerCooldowns: te = {}, onDeleteOwner: S, isDeleting: C = !1, deleteModalTitle: ne, deleteModalDescription: w, deleteModalBodyClassName: re, cardClassName: T, renderCustomCardContent: ie, renderCardActions: ae, missingSectionTitle: oe, missingSectionDescription: D, missingActionUrl: se, missingActionLabel: ce }) {
|
|
1815
|
+
let { t: O } = G(Q), [k, le] = X(null), [A, j] = X(""), [M, ue] = X("all"), P = (r?.length ?? 0) > 0, de = (i?.length ?? 0) > 0, F = f ? A.trim().toLowerCase() : "", L = f ? M : "all", me = F !== "" || L !== "all", ge = je(() => {
|
|
1783
1816
|
let e = {
|
|
1784
1817
|
all: 0,
|
|
1785
1818
|
character: 0,
|
|
@@ -1789,192 +1822,192 @@ function Ut({ title: e, description: t, icon: n, owners: r, missingOwners: i, is
|
|
|
1789
1822
|
e.all += 1, t && t !== "all" && t in e && (e[t] += 1);
|
|
1790
1823
|
};
|
|
1791
1824
|
for (let e of r ?? []) t(e.owner_type);
|
|
1792
|
-
for (let e of i ?? []) t(
|
|
1825
|
+
for (let e of i ?? []) t(Jt(e));
|
|
1793
1826
|
return e;
|
|
1794
|
-
}, [r, i]),
|
|
1827
|
+
}, [r, i]), z = je(() => (r ?? []).filter((e) => (L === "all" || e.owner_type === L) && (!F || e.name.toLowerCase().includes(F) || (e.subtitle ?? "").toLowerCase().includes(F))), [
|
|
1795
1828
|
r,
|
|
1796
1829
|
L,
|
|
1797
|
-
|
|
1798
|
-
]),
|
|
1830
|
+
F
|
|
1831
|
+
]), _e = je(() => (i ?? []).filter((e) => (L === "all" || Jt(e) === L) && (!F || e.name.toLowerCase().includes(F) || (e.subtitle ?? "").toLowerCase().includes(F))), [
|
|
1799
1832
|
i,
|
|
1800
1833
|
L,
|
|
1801
|
-
|
|
1802
|
-
]),
|
|
1803
|
-
return /* @__PURE__ */
|
|
1834
|
+
F
|
|
1835
|
+
]), V = !a && !o, H = z.length > 0 || _e.length > 0;
|
|
1836
|
+
return /* @__PURE__ */ q(B, {
|
|
1804
1837
|
className: `mt-4 border-0 ${u}`.trim(),
|
|
1805
|
-
children: /* @__PURE__ */
|
|
1838
|
+
children: /* @__PURE__ */ J(B.Body, {
|
|
1806
1839
|
className: d,
|
|
1807
1840
|
children: [
|
|
1808
|
-
/* @__PURE__ */
|
|
1841
|
+
/* @__PURE__ */ J(B.Header, {
|
|
1809
1842
|
className: "mb-3 bg-secondary d-flex justify-content-between align-items-center flex-wrap gap-2 rounded",
|
|
1810
|
-
children: [/* @__PURE__ */
|
|
1843
|
+
children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
|
|
1811
1844
|
className: "aa-owner-section-title-wrap d-flex align-items-center gap-2",
|
|
1812
1845
|
children: [
|
|
1813
|
-
n ?? /* @__PURE__ */
|
|
1846
|
+
n ?? /* @__PURE__ */ q(pe, {
|
|
1814
1847
|
size: 20,
|
|
1815
1848
|
"aria-hidden": "true"
|
|
1816
1849
|
}),
|
|
1817
|
-
/* @__PURE__ */
|
|
1850
|
+
/* @__PURE__ */ q("h2", {
|
|
1818
1851
|
className: "aa-owner-section-title m-0 fs-5 fw-bold",
|
|
1819
|
-
children: e ??
|
|
1852
|
+
children: e ?? O("Owner Status")
|
|
1820
1853
|
}),
|
|
1821
|
-
r && /* @__PURE__ */
|
|
1854
|
+
r && /* @__PURE__ */ J("span", {
|
|
1822
1855
|
className: "aa-owner-section-count small",
|
|
1823
1856
|
children: [
|
|
1824
1857
|
"(",
|
|
1825
|
-
|
|
1858
|
+
me ? `${z.length} / ${r.length}` : r.length,
|
|
1826
1859
|
")"
|
|
1827
1860
|
]
|
|
1828
1861
|
})
|
|
1829
1862
|
]
|
|
1830
|
-
}), /* @__PURE__ */
|
|
1863
|
+
}), /* @__PURE__ */ q("p", {
|
|
1831
1864
|
className: "aa-owner-section-description mt-1 mb-0 small w-100 text-light",
|
|
1832
|
-
children: t ??
|
|
1833
|
-
})] }), m && P && /* @__PURE__ */
|
|
1865
|
+
children: t ?? O("ESI synchronization status of your linked owners.")
|
|
1866
|
+
})] }), m && P && /* @__PURE__ */ J(R, {
|
|
1834
1867
|
variant: "secondary",
|
|
1835
1868
|
size: "sm",
|
|
1836
1869
|
className: "d-flex align-items-center gap-1",
|
|
1837
1870
|
disabled: h || g > 0,
|
|
1838
1871
|
onClick: m,
|
|
1839
|
-
children: [h ? /* @__PURE__ */
|
|
1872
|
+
children: [h ? /* @__PURE__ */ q("span", { className: "spinner-border spinner-border-sm" }) : /* @__PURE__ */ q(N, { size: 14 }), /* @__PURE__ */ q("span", { children: g > 0 ? O("Update All ({{seconds}}s)", { seconds: g }) : O("Update All") })]
|
|
1840
1873
|
})]
|
|
1841
1874
|
}),
|
|
1842
|
-
_ && /* @__PURE__ */
|
|
1875
|
+
_ && /* @__PURE__ */ q(he, {
|
|
1843
1876
|
variant: _.variant,
|
|
1844
1877
|
className: "py-2 mb-3",
|
|
1845
1878
|
dismissible: !!v,
|
|
1846
1879
|
onClose: v,
|
|
1847
1880
|
children: _.text
|
|
1848
1881
|
}),
|
|
1849
|
-
f &&
|
|
1882
|
+
f && V && (P || de) && /* @__PURE__ */ q(qt, {
|
|
1850
1883
|
search: A,
|
|
1851
1884
|
onSearchChange: j,
|
|
1852
1885
|
typeFilter: M,
|
|
1853
|
-
onTypeChange:
|
|
1854
|
-
counts:
|
|
1886
|
+
onTypeChange: ue,
|
|
1887
|
+
counts: ge,
|
|
1855
1888
|
searchPlaceholder: p
|
|
1856
1889
|
}),
|
|
1857
|
-
a && /* @__PURE__ */
|
|
1890
|
+
a && /* @__PURE__ */ J("div", {
|
|
1858
1891
|
className: "aa-loader-container",
|
|
1859
|
-
children: [/* @__PURE__ */
|
|
1892
|
+
children: [/* @__PURE__ */ q("span", { className: "spinner-border" }), /* @__PURE__ */ q("span", { children: O("Loading update statuses…") })]
|
|
1860
1893
|
}),
|
|
1861
|
-
o && /* @__PURE__ */
|
|
1894
|
+
o && /* @__PURE__ */ q(B, {
|
|
1862
1895
|
className: "bg-secondary border-0 shadow-sm",
|
|
1863
1896
|
role: "alert",
|
|
1864
|
-
children: /* @__PURE__ */
|
|
1897
|
+
children: /* @__PURE__ */ q(B.Body, {
|
|
1865
1898
|
className: "aa-owner-error",
|
|
1866
|
-
children: s ??
|
|
1899
|
+
children: s ?? O("Failed to load update status.")
|
|
1867
1900
|
})
|
|
1868
1901
|
}),
|
|
1869
|
-
|
|
1902
|
+
V && !P && !de && /* @__PURE__ */ q(B, {
|
|
1870
1903
|
className: "bg-secondary text-light border-0 shadow-sm",
|
|
1871
|
-
children: /* @__PURE__ */
|
|
1904
|
+
children: /* @__PURE__ */ q(B.Body, {
|
|
1872
1905
|
className: "aa-owner-empty py-4 px-3 text-center small",
|
|
1873
|
-
children: c ??
|
|
1906
|
+
children: c ?? O("Nothing to show.")
|
|
1874
1907
|
})
|
|
1875
1908
|
}),
|
|
1876
|
-
|
|
1909
|
+
V && (P || de) && !H && /* @__PURE__ */ q(B, {
|
|
1877
1910
|
className: "bg-secondary text-light border-0 shadow-sm",
|
|
1878
|
-
children: /* @__PURE__ */
|
|
1911
|
+
children: /* @__PURE__ */ J(B.Body, {
|
|
1879
1912
|
className: "aa-owner-empty py-4 px-3 text-center small",
|
|
1880
|
-
children: [/* @__PURE__ */
|
|
1913
|
+
children: [/* @__PURE__ */ q("p", {
|
|
1881
1914
|
className: "mb-2",
|
|
1882
|
-
children:
|
|
1883
|
-
}), /* @__PURE__ */
|
|
1915
|
+
children: O("No matching owners found.")
|
|
1916
|
+
}), /* @__PURE__ */ q(R, {
|
|
1884
1917
|
variant: "outline-light",
|
|
1885
1918
|
size: "sm",
|
|
1886
1919
|
onClick: () => {
|
|
1887
|
-
j(""),
|
|
1920
|
+
j(""), ue("all");
|
|
1888
1921
|
},
|
|
1889
|
-
children:
|
|
1922
|
+
children: O("Reset filters")
|
|
1890
1923
|
})]
|
|
1891
1924
|
})
|
|
1892
1925
|
}),
|
|
1893
|
-
|
|
1926
|
+
V && z.length > 0 && /* @__PURE__ */ q("div", {
|
|
1894
1927
|
className: "aa-owner-grid d-grid gap-3",
|
|
1895
|
-
children:
|
|
1928
|
+
children: z.map((e) => /* @__PURE__ */ q(Gt, {
|
|
1896
1929
|
owner: e,
|
|
1897
1930
|
isUpdating: ee === e.id,
|
|
1898
1931
|
cooldown: te[e.id] ?? 0,
|
|
1899
1932
|
onTriggerUpdate: !b || b(e) ? y : void 0,
|
|
1900
|
-
onDeleteClick: S && (!x || x(e)) ?
|
|
1901
|
-
className:
|
|
1933
|
+
onDeleteClick: S && (!x || x(e)) ? le : void 0,
|
|
1934
|
+
className: T,
|
|
1902
1935
|
renderCustomContent: ie,
|
|
1903
1936
|
renderActions: ae
|
|
1904
1937
|
}, `${e.owner_type ?? "owner"}-${e.id}`))
|
|
1905
1938
|
}),
|
|
1906
|
-
|
|
1939
|
+
V && _e.length > 0 && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(B.Header, {
|
|
1907
1940
|
className: "aa-owner-section-title-wrap mt-4 mb-2 rounded d-flex align-items-center gap-2",
|
|
1908
|
-
children: /* @__PURE__ */
|
|
1941
|
+
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
|
|
1909
1942
|
className: "aa-owner-section-title-wrap d-flex align-items-center gap-2",
|
|
1910
1943
|
children: [
|
|
1911
|
-
/* @__PURE__ */
|
|
1944
|
+
/* @__PURE__ */ q(fe, {
|
|
1912
1945
|
size: 20,
|
|
1913
1946
|
"aria-hidden": "true"
|
|
1914
1947
|
}),
|
|
1915
|
-
/* @__PURE__ */
|
|
1948
|
+
/* @__PURE__ */ q("h2", {
|
|
1916
1949
|
className: "aa-owner-section-title m-0 fs-5 fw-bold",
|
|
1917
|
-
children: oe ??
|
|
1950
|
+
children: oe ?? O("Missing in {{app}}", { app: l })
|
|
1918
1951
|
}),
|
|
1919
|
-
/* @__PURE__ */
|
|
1952
|
+
/* @__PURE__ */ J("span", {
|
|
1920
1953
|
className: "aa-owner-section-count small",
|
|
1921
1954
|
children: [
|
|
1922
1955
|
"(",
|
|
1923
|
-
|
|
1956
|
+
_e.length,
|
|
1924
1957
|
")"
|
|
1925
1958
|
]
|
|
1926
1959
|
})
|
|
1927
1960
|
]
|
|
1928
|
-
}), /* @__PURE__ */
|
|
1961
|
+
}), /* @__PURE__ */ q("p", {
|
|
1929
1962
|
className: "aa-owner-section-description mt-1 mb-0 small w-100 text-light",
|
|
1930
|
-
children:
|
|
1963
|
+
children: D ?? O("The following characters belong to you but are not registered.")
|
|
1931
1964
|
})] })
|
|
1932
|
-
}), /* @__PURE__ */
|
|
1965
|
+
}), /* @__PURE__ */ q("div", {
|
|
1933
1966
|
className: "aa-owner-grid d-grid gap-3",
|
|
1934
|
-
children:
|
|
1967
|
+
children: _e.map((e) => /* @__PURE__ */ q(Kt, {
|
|
1935
1968
|
missing: e,
|
|
1936
1969
|
appName: l,
|
|
1937
|
-
actionUrl:
|
|
1938
|
-
actionLabel:
|
|
1939
|
-
}, `${
|
|
1970
|
+
actionUrl: se,
|
|
1971
|
+
actionLabel: ce
|
|
1972
|
+
}, `${Jt(e)}-${e.id}`))
|
|
1940
1973
|
})] }),
|
|
1941
|
-
S && /* @__PURE__ */
|
|
1942
|
-
show: !!
|
|
1943
|
-
onHide: () => !C &&
|
|
1974
|
+
S && /* @__PURE__ */ q(jt, {
|
|
1975
|
+
show: !!k,
|
|
1976
|
+
onHide: () => !C && le(null),
|
|
1944
1977
|
centered: !0,
|
|
1945
1978
|
bodyClassName: re,
|
|
1946
|
-
title: /* @__PURE__ */
|
|
1979
|
+
title: /* @__PURE__ */ J("div", {
|
|
1947
1980
|
className: "d-flex align-items-center gap-2 text-danger",
|
|
1948
|
-
children: [/* @__PURE__ */
|
|
1981
|
+
children: [/* @__PURE__ */ q(I, { size: 20 }), /* @__PURE__ */ q("span", { children: ne ?? O("Delete Owner") })]
|
|
1949
1982
|
}),
|
|
1950
|
-
footer: /* @__PURE__ */
|
|
1983
|
+
footer: /* @__PURE__ */ J("div", {
|
|
1951
1984
|
className: "d-flex align-items-center justify-content-end gap-2 w-100",
|
|
1952
|
-
children: [/* @__PURE__ */
|
|
1985
|
+
children: [/* @__PURE__ */ q(R, {
|
|
1953
1986
|
variant: "secondary",
|
|
1954
|
-
onClick: () =>
|
|
1987
|
+
onClick: () => le(null),
|
|
1955
1988
|
disabled: C,
|
|
1956
|
-
children:
|
|
1957
|
-
}), /* @__PURE__ */
|
|
1989
|
+
children: O("Cancel")
|
|
1990
|
+
}), /* @__PURE__ */ J(R, {
|
|
1958
1991
|
variant: "danger",
|
|
1959
1992
|
onClick: async () => {
|
|
1960
|
-
|
|
1993
|
+
k && S && (await S(k), le(null));
|
|
1961
1994
|
},
|
|
1962
1995
|
disabled: C,
|
|
1963
1996
|
className: "d-flex align-items-center gap-1",
|
|
1964
|
-
children: [/* @__PURE__ */
|
|
1997
|
+
children: [/* @__PURE__ */ q(I, { size: 14 }), /* @__PURE__ */ q("span", { children: O(C ? "Deleting…" : "Confirm Delete") })]
|
|
1965
1998
|
})]
|
|
1966
1999
|
}),
|
|
1967
|
-
children: /* @__PURE__ */
|
|
2000
|
+
children: /* @__PURE__ */ J("div", {
|
|
1968
2001
|
className: "p-3 d-flex align-items-start gap-3",
|
|
1969
|
-
children: [/* @__PURE__ */
|
|
2002
|
+
children: [/* @__PURE__ */ q(E, {
|
|
1970
2003
|
className: "text-danger flex-shrink-0 mt-1",
|
|
1971
2004
|
size: 24
|
|
1972
|
-
}), /* @__PURE__ */
|
|
2005
|
+
}), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
1973
2006
|
className: "fw-semibold mb-1",
|
|
1974
|
-
children:
|
|
1975
|
-
}), /* @__PURE__ */
|
|
2007
|
+
children: O("Are you sure you want to delete owner '{{name}}'?", { name: k?.name })
|
|
2008
|
+
}), /* @__PURE__ */ q("div", {
|
|
1976
2009
|
className: "small text-muted",
|
|
1977
|
-
children:
|
|
2010
|
+
children: k && w ? w(k) : O("This action cannot be undone.")
|
|
1978
2011
|
})] })]
|
|
1979
2012
|
})
|
|
1980
2013
|
})
|
|
@@ -1983,12 +2016,12 @@ function Ut({ title: e, description: t, icon: n, owners: r, missingOwners: i, is
|
|
|
1983
2016
|
});
|
|
1984
2017
|
}
|
|
1985
2018
|
// src/Components/Base/OwnerSettings/UnregisteredModal.tsx
|
|
1986
|
-
function
|
|
1987
|
-
let { t: f } =
|
|
2019
|
+
function Xt({ show: e, onHide: t, title: n, description: r, items: i = [], isLoading: a = !1, isError: o = !1, errorMessage: s, emptyMessage: c, searchPlaceholder: l, searchLabel: u, noMatchMessage: d }) {
|
|
2020
|
+
let { t: f } = G(Q), [p, m] = X(""), h = je(() => {
|
|
1988
2021
|
let e = p.trim().toLowerCase();
|
|
1989
2022
|
return e ? i.filter((t) => t.name.toLowerCase().includes(e) || (t.subtitle ?? "").toLowerCase().includes(e)) : i;
|
|
1990
2023
|
}, [i, p]);
|
|
1991
|
-
return /* @__PURE__ */
|
|
2024
|
+
return /* @__PURE__ */ J(jt, {
|
|
1992
2025
|
show: e,
|
|
1993
2026
|
onHide: t,
|
|
1994
2027
|
onExited: () => m(""),
|
|
@@ -1997,31 +2030,31 @@ function Wt({ show: e, onHide: t, title: n, description: r, items: i = [], isLoa
|
|
|
1997
2030
|
scrollable: !0,
|
|
1998
2031
|
title: n,
|
|
1999
2032
|
children: [
|
|
2000
|
-
r && /* @__PURE__ */
|
|
2033
|
+
r && /* @__PURE__ */ q("p", {
|
|
2001
2034
|
className: "small text-muted",
|
|
2002
2035
|
children: r
|
|
2003
2036
|
}),
|
|
2004
|
-
a && /* @__PURE__ */
|
|
2037
|
+
a && /* @__PURE__ */ J("div", {
|
|
2005
2038
|
className: "aa-loader-container",
|
|
2006
|
-
children: [/* @__PURE__ */
|
|
2039
|
+
children: [/* @__PURE__ */ q("span", { className: "spinner-border" }), /* @__PURE__ */ q("span", { children: f("Loading…") })]
|
|
2007
2040
|
}),
|
|
2008
|
-
o && /* @__PURE__ */
|
|
2041
|
+
o && /* @__PURE__ */ q("div", {
|
|
2009
2042
|
className: "aa-owner-error-banner px-2 py-1 text-break",
|
|
2010
2043
|
role: "alert",
|
|
2011
2044
|
children: s ?? f("Failed to load data.")
|
|
2012
2045
|
}),
|
|
2013
|
-
!a && !o && i.length === 0 && /* @__PURE__ */
|
|
2046
|
+
!a && !o && i.length === 0 && /* @__PURE__ */ q("div", {
|
|
2014
2047
|
className: "aa-owner-empty py-4 px-3 text-center small",
|
|
2015
2048
|
children: c ?? f("Nothing to show.")
|
|
2016
2049
|
}),
|
|
2017
|
-
!a && !o && i.length > 0 && /* @__PURE__ */
|
|
2018
|
-
/* @__PURE__ */
|
|
2050
|
+
!a && !o && i.length > 0 && /* @__PURE__ */ J(K, { children: [
|
|
2051
|
+
/* @__PURE__ */ J(ve, {
|
|
2019
2052
|
size: "sm",
|
|
2020
2053
|
className: "mb-3",
|
|
2021
|
-
children: [/* @__PURE__ */
|
|
2054
|
+
children: [/* @__PURE__ */ q(ve.Text, { children: /* @__PURE__ */ q(ue, {
|
|
2022
2055
|
size: 14,
|
|
2023
2056
|
"aria-hidden": "true"
|
|
2024
|
-
}) }), /* @__PURE__ */
|
|
2057
|
+
}) }), /* @__PURE__ */ q(U.Control, {
|
|
2025
2058
|
type: "search",
|
|
2026
2059
|
value: p,
|
|
2027
2060
|
placeholder: l ?? f("Search owners…"),
|
|
@@ -2029,30 +2062,30 @@ function Wt({ show: e, onHide: t, title: n, description: r, items: i = [], isLoa
|
|
|
2029
2062
|
onChange: (e) => m(e.target.value)
|
|
2030
2063
|
})]
|
|
2031
2064
|
}),
|
|
2032
|
-
/* @__PURE__ */
|
|
2065
|
+
/* @__PURE__ */ q("p", {
|
|
2033
2066
|
className: "small text-muted mb-2",
|
|
2034
2067
|
children: f("{{count}} unregistered", { count: h.length })
|
|
2035
2068
|
}),
|
|
2036
|
-
h.length === 0 ? /* @__PURE__ */
|
|
2069
|
+
h.length === 0 ? /* @__PURE__ */ q("div", {
|
|
2037
2070
|
className: "aa-owner-empty py-4 px-3 text-center small",
|
|
2038
2071
|
children: d ?? f("No matching owners found.")
|
|
2039
|
-
}) : /* @__PURE__ */
|
|
2072
|
+
}) : /* @__PURE__ */ q("ul", {
|
|
2040
2073
|
className: "list-unstyled d-flex flex-column gap-2 mb-0",
|
|
2041
|
-
children: h.map((e) => /* @__PURE__ */
|
|
2074
|
+
children: h.map((e) => /* @__PURE__ */ J("li", {
|
|
2042
2075
|
className: "d-flex align-items-center gap-3",
|
|
2043
|
-
children: [e.avatar_url && /* @__PURE__ */
|
|
2076
|
+
children: [e.avatar_url && /* @__PURE__ */ q(Wt, {
|
|
2044
2077
|
src: e.avatar_url,
|
|
2045
2078
|
alt: e.name,
|
|
2046
2079
|
type: e.owner_type,
|
|
2047
2080
|
size: "sm",
|
|
2048
2081
|
shape: e.owner_type === "corporation" ? "rounded" : "circle",
|
|
2049
2082
|
bordered: !0
|
|
2050
|
-
}), /* @__PURE__ */
|
|
2083
|
+
}), /* @__PURE__ */ J("div", {
|
|
2051
2084
|
className: "min-w-0",
|
|
2052
|
-
children: [/* @__PURE__ */
|
|
2085
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2053
2086
|
className: "fw-semibold",
|
|
2054
2087
|
children: e.name
|
|
2055
|
-
}), e.subtitle && /* @__PURE__ */
|
|
2088
|
+
}), e.subtitle && /* @__PURE__ */ q("div", {
|
|
2056
2089
|
className: "small text-muted",
|
|
2057
2090
|
children: e.subtitle
|
|
2058
2091
|
})]
|
|
@@ -2064,48 +2097,48 @@ function Wt({ show: e, onHide: t, title: n, description: r, items: i = [], isLoa
|
|
|
2064
2097
|
});
|
|
2065
2098
|
}
|
|
2066
2099
|
// src/Utils/eveOnline.tsx
|
|
2067
|
-
function
|
|
2100
|
+
function Zt(e, t = 512) {
|
|
2068
2101
|
return `https://images.evetech.net/types/${e}/render?size=${t}`;
|
|
2069
2102
|
}
|
|
2070
|
-
function
|
|
2103
|
+
function Qt(e, t = 512) {
|
|
2071
2104
|
return `https://images.evetech.net/characters/${e}/portrait?size=${t}`;
|
|
2072
2105
|
}
|
|
2073
|
-
function
|
|
2106
|
+
function $t(e, t = 128) {
|
|
2074
2107
|
return `https://images.evetech.net/corporations/${e}/logo?size=${t}`;
|
|
2075
2108
|
}
|
|
2076
|
-
function
|
|
2109
|
+
function en(e, t = 128) {
|
|
2077
2110
|
return `https://images.evetech.net/alliances/${e}/logo?size=${t}`;
|
|
2078
2111
|
}
|
|
2079
|
-
function
|
|
2112
|
+
function tn(e, t = 32) {
|
|
2080
2113
|
return `https://images.evetech.net/types/${e}/icon?size=${t}`;
|
|
2081
2114
|
}
|
|
2082
|
-
var
|
|
2115
|
+
var nn = (e) => e >= .5 ? "aa-badge-hisec" : e > 0 ? "aa-badge-lowsec" : "aa-badge-nullsec", rn = (e = /* @__PURE__ */ new Date()) => {
|
|
2083
2116
|
let t = (e) => String(e).padStart(2, "0");
|
|
2084
2117
|
return `${t(e.getUTCHours())}:${t(e.getUTCMinutes())}:${t(e.getUTCSeconds())} EVE`;
|
|
2085
2118
|
};
|
|
2086
|
-
function
|
|
2119
|
+
function an({ id: e, name: t, size: n = 12, className: r = "", externalLink: i = !1 }) {
|
|
2087
2120
|
let a = `https://zkillboard.com/kill/${e}/`;
|
|
2088
|
-
return
|
|
2121
|
+
return ft(t, /* @__PURE__ */ J("a", {
|
|
2089
2122
|
href: a,
|
|
2090
2123
|
target: "_blank",
|
|
2091
2124
|
rel: "noopener noreferrer",
|
|
2092
2125
|
className: r,
|
|
2093
|
-
children: [t, i && /* @__PURE__ */
|
|
2126
|
+
children: [t, i && /* @__PURE__ */ q(j, { size: n })]
|
|
2094
2127
|
}));
|
|
2095
2128
|
}
|
|
2096
|
-
function
|
|
2097
|
-
return /* @__PURE__ */
|
|
2098
|
-
src:
|
|
2129
|
+
function on(e, t = 32) {
|
|
2130
|
+
return /* @__PURE__ */ q("img", {
|
|
2131
|
+
src: Qt(e, t),
|
|
2099
2132
|
className: "rounded"
|
|
2100
2133
|
});
|
|
2101
2134
|
}
|
|
2102
2135
|
// src/Components/Base/Badges/liveStatusHelper.ts
|
|
2103
|
-
function
|
|
2104
|
-
return e ?
|
|
2136
|
+
function sn(e) {
|
|
2137
|
+
return e ? rn(new Date(e)) : "";
|
|
2105
2138
|
}
|
|
2106
|
-
function
|
|
2107
|
-
let [r, i] =
|
|
2108
|
-
return
|
|
2139
|
+
function cn(e, t = !1, n = 2e3) {
|
|
2140
|
+
let [r, i] = X(!1);
|
|
2141
|
+
return Ae(() => {
|
|
2109
2142
|
if (t) return;
|
|
2110
2143
|
let e = setTimeout(() => i(!0), 0), r = setTimeout(() => i(!1), n);
|
|
2111
2144
|
return () => {
|
|
@@ -2118,34 +2151,34 @@ function tn(e, t = !1, n = 2e3) {
|
|
|
2118
2151
|
]), r;
|
|
2119
2152
|
}
|
|
2120
2153
|
// src/Components/Base/Badges/LiveStatusIndicator.tsx
|
|
2121
|
-
function
|
|
2122
|
-
let { t: f } =
|
|
2123
|
-
return
|
|
2154
|
+
function ln({ isError: e = !1, error: t, isLoading: n = !1, isFetching: r = !1, dataUpdatedAt: i, showTimestamp: a = !1, timestampPrefix: o = "↻", pingDuration: s = 2e3, className: c = "aa-status-indicator", dotClassName: l = "", textClassName: u = "aa-status-text", children: d }) {
|
|
2155
|
+
let { t: f } = G(Q), p = n || r, m = cn(i, p || e, s), h = t instanceof Error ? t.message : typeof t == "string" ? t : f("Failed to load");
|
|
2156
|
+
return ft(e ? h : p ? f("Loading…") : i ? `${f("Last Fetch")}: ${sn(i)}` : f("No fetch yet"), /* @__PURE__ */ J("span", {
|
|
2124
2157
|
className: c,
|
|
2125
2158
|
children: [
|
|
2126
|
-
/* @__PURE__ */
|
|
2159
|
+
/* @__PURE__ */ q("span", {
|
|
2127
2160
|
className: `aa-status-dot ${l}`.trim(),
|
|
2128
|
-
children: e ? /* @__PURE__ */
|
|
2161
|
+
children: e ? /* @__PURE__ */ q("span", { className: "aa-status-dot-fill aa-status-dot-error" }) : p ? /* @__PURE__ */ q("span", { className: "aa-status-dot-fill aa-status-dot-busy" }) : /* @__PURE__ */ J(K, { children: [m && /* @__PURE__ */ q("span", { className: "aa-status-ping" }), /* @__PURE__ */ q("span", { className: "aa-status-dot-fill aa-status-dot-ready" })] })
|
|
2129
2162
|
}),
|
|
2130
2163
|
d,
|
|
2131
|
-
a && /* @__PURE__ */
|
|
2164
|
+
a && /* @__PURE__ */ q("span", {
|
|
2132
2165
|
className: e ? "aa-status-text aa-status-text-error" : u,
|
|
2133
|
-
children: e ? f("Error") : p ? f("Loading…") : i ? `${o} ${
|
|
2166
|
+
children: e ? f("Error") : p ? f("Loading…") : i ? `${o} ${sn(i)}` : f("No fetch yet")
|
|
2134
2167
|
})
|
|
2135
2168
|
]
|
|
2136
2169
|
}));
|
|
2137
2170
|
}
|
|
2138
2171
|
// src/Components/Base/Badges/SecurityBadge.tsx
|
|
2139
|
-
function
|
|
2140
|
-
return /* @__PURE__ */
|
|
2141
|
-
className: `sec-badge ${
|
|
2172
|
+
function un({ sec: e, className: t = "" }) {
|
|
2173
|
+
return /* @__PURE__ */ q("span", {
|
|
2174
|
+
className: `sec-badge ${nn(e)} ${t}`.trim(),
|
|
2142
2175
|
children: e.toFixed(1)
|
|
2143
2176
|
});
|
|
2144
2177
|
}
|
|
2145
2178
|
// src/Hooks/useCooldown.ts
|
|
2146
|
-
function
|
|
2147
|
-
let [e, t] =
|
|
2148
|
-
return
|
|
2179
|
+
function dn() {
|
|
2180
|
+
let [e, t] = X(0);
|
|
2181
|
+
return Ae(() => {
|
|
2149
2182
|
if (e <= 0) return;
|
|
2150
2183
|
let n = setInterval(() => {
|
|
2151
2184
|
t((e) => e > 0 ? e - 1 : 0);
|
|
@@ -2153,12 +2186,12 @@ function an() {
|
|
|
2153
2186
|
return () => clearInterval(n);
|
|
2154
2187
|
}, [e]), {
|
|
2155
2188
|
seconds: e,
|
|
2156
|
-
start:
|
|
2189
|
+
start: Y((e) => t(e), [])
|
|
2157
2190
|
};
|
|
2158
2191
|
}
|
|
2159
|
-
function
|
|
2160
|
-
let [e, t] =
|
|
2161
|
-
return
|
|
2192
|
+
function fn() {
|
|
2193
|
+
let [e, t] = X({});
|
|
2194
|
+
return Ae(() => {
|
|
2162
2195
|
if (!Object.values(e).some((e) => e > 0)) return;
|
|
2163
2196
|
let n = setInterval(() => {
|
|
2164
2197
|
t((e) => {
|
|
@@ -2170,23 +2203,23 @@ function on() {
|
|
|
2170
2203
|
return () => clearInterval(n);
|
|
2171
2204
|
}, [e]), {
|
|
2172
2205
|
cooldowns: e,
|
|
2173
|
-
start:
|
|
2206
|
+
start: Y((e, n) => t((t) => ({
|
|
2174
2207
|
...t,
|
|
2175
2208
|
[e]: n
|
|
2176
2209
|
})), [])
|
|
2177
2210
|
};
|
|
2178
2211
|
}
|
|
2179
2212
|
// src/Hooks/useFeedback.ts
|
|
2180
|
-
function
|
|
2181
|
-
let [t, n] =
|
|
2213
|
+
function pn(e = 5e3) {
|
|
2214
|
+
let [t, n] = X(null), r = Me(null), i = Y(() => {
|
|
2182
2215
|
r.current && clearTimeout(r.current), r.current = null, n(null);
|
|
2183
|
-
}, []), a =
|
|
2216
|
+
}, []), a = Y((t, i) => {
|
|
2184
2217
|
r.current && clearTimeout(r.current), n({
|
|
2185
2218
|
variant: t,
|
|
2186
2219
|
text: i
|
|
2187
2220
|
}), r.current = setTimeout(() => n(null), e);
|
|
2188
2221
|
}, [e]);
|
|
2189
|
-
return
|
|
2222
|
+
return Ae(() => () => {
|
|
2190
2223
|
r.current && clearTimeout(r.current);
|
|
2191
2224
|
}, []), {
|
|
2192
2225
|
feedback: t,
|
|
@@ -2195,11 +2228,11 @@ function sn(e = 5e3) {
|
|
|
2195
2228
|
};
|
|
2196
2229
|
}
|
|
2197
2230
|
// src/Provider.tsx
|
|
2198
|
-
var
|
|
2199
|
-
function
|
|
2200
|
-
let i =
|
|
2201
|
-
|
|
2202
|
-
let a =
|
|
2231
|
+
var mn = Oe(null);
|
|
2232
|
+
function hn({ projectName: e, appName: t, menuRefetchInterval: n, children: r }) {
|
|
2233
|
+
let i = ke(Ce)?.i18n ?? we();
|
|
2234
|
+
X(() => $e(i));
|
|
2235
|
+
let a = je(() => ({
|
|
2203
2236
|
projectName: e,
|
|
2204
2237
|
appName: t,
|
|
2205
2238
|
menuRefetchInterval: n
|
|
@@ -2208,32 +2241,32 @@ function ln({ projectName: e, appName: t, menuRefetchInterval: n, children: r })
|
|
|
2208
2241
|
t,
|
|
2209
2242
|
n
|
|
2210
2243
|
]);
|
|
2211
|
-
return /* @__PURE__ */
|
|
2244
|
+
return /* @__PURE__ */ q(mn.Provider, {
|
|
2212
2245
|
value: a,
|
|
2213
2246
|
children: r
|
|
2214
2247
|
});
|
|
2215
2248
|
}
|
|
2216
|
-
function
|
|
2217
|
-
let e =
|
|
2249
|
+
function gn() {
|
|
2250
|
+
let e = ke(mn);
|
|
2218
2251
|
if (!e) throw Error("useAaReact must be used inside <AaReactProvider projectName appName>.");
|
|
2219
2252
|
return e;
|
|
2220
2253
|
}
|
|
2221
2254
|
// src/Hooks/useUserData.ts
|
|
2222
|
-
function
|
|
2223
|
-
let { projectName: e } =
|
|
2224
|
-
return
|
|
2255
|
+
function _n() {
|
|
2256
|
+
let { projectName: e } = gn();
|
|
2257
|
+
return i({
|
|
2225
2258
|
queryKey: Z.User,
|
|
2226
|
-
queryFn: () =>
|
|
2259
|
+
queryFn: () => Ue(e),
|
|
2227
2260
|
staleTime: 3e5
|
|
2228
2261
|
});
|
|
2229
2262
|
}
|
|
2230
2263
|
// src/Hooks/useUserSettings.ts
|
|
2231
|
-
function
|
|
2232
|
-
let { projectName: e } =
|
|
2264
|
+
function vn() {
|
|
2265
|
+
let { projectName: e } = gn(), t = a(), n = i({
|
|
2233
2266
|
queryKey: Z.UserSettings,
|
|
2234
|
-
queryFn: () =>
|
|
2235
|
-
}),
|
|
2236
|
-
mutationFn: (t) =>
|
|
2267
|
+
queryFn: () => We(e)
|
|
2268
|
+
}), o = r({
|
|
2269
|
+
mutationFn: (t) => Ge(e, t),
|
|
2237
2270
|
onMutate: async (e) => {
|
|
2238
2271
|
await t.cancelQueries({ queryKey: Z.UserSettings });
|
|
2239
2272
|
let n = t.getQueryData(Z.UserSettings);
|
|
@@ -2251,17 +2284,17 @@ function fn() {
|
|
|
2251
2284
|
});
|
|
2252
2285
|
return {
|
|
2253
2286
|
...n,
|
|
2254
|
-
updateMutation:
|
|
2287
|
+
updateMutation: o
|
|
2255
2288
|
};
|
|
2256
2289
|
}
|
|
2257
2290
|
// src/i18nInit.ts
|
|
2258
|
-
function
|
|
2291
|
+
function yn(e, t) {
|
|
2259
2292
|
let n = typeof document < "u" ? document.getElementById(t)?.getAttribute("lang") ?? "en" : "en";
|
|
2260
|
-
return
|
|
2293
|
+
return Ne.use(Fe).use(Te).init({
|
|
2261
2294
|
lng: n,
|
|
2262
2295
|
fallbackLng: "en",
|
|
2263
|
-
ns: [
|
|
2264
|
-
defaultNS:
|
|
2296
|
+
ns: [Ze],
|
|
2297
|
+
defaultNS: Ze,
|
|
2265
2298
|
returnEmptyString: !1,
|
|
2266
2299
|
keySeparator: !1,
|
|
2267
2300
|
nsSeparator: !1,
|
|
@@ -2271,76 +2304,76 @@ function pn(e, t) {
|
|
|
2271
2304
|
});
|
|
2272
2305
|
}
|
|
2273
2306
|
// src/Menu/BaseMenu.tsx
|
|
2274
|
-
var
|
|
2307
|
+
var bn = (e, t) => {
|
|
2275
2308
|
let n = t.replace(/^\/+|\/+$/g, "");
|
|
2276
2309
|
return n ? `/${e}/${n}/` : `/${e}/`;
|
|
2277
|
-
},
|
|
2278
|
-
let { t:
|
|
2279
|
-
return /* @__PURE__ */
|
|
2310
|
+
}, xn = (e, t, n) => t === n ? e === n : e.startsWith(t), Sn = [Q, Ze], Cn = ({ link: e, toPath: t }) => {
|
|
2311
|
+
let { t: n } = G(Q), r = c(), i = xn(r.pathname, t(e.link ?? ""), t(""));
|
|
2312
|
+
return /* @__PURE__ */ q(W.Item, {
|
|
2280
2313
|
as: "li",
|
|
2281
|
-
children: /* @__PURE__ */
|
|
2282
|
-
as:
|
|
2314
|
+
children: /* @__PURE__ */ J(W.Link, {
|
|
2315
|
+
as: o,
|
|
2283
2316
|
to: {
|
|
2284
2317
|
pathname: t(e.link ?? ""),
|
|
2285
|
-
search:
|
|
2318
|
+
search: r.search
|
|
2286
2319
|
},
|
|
2287
2320
|
id: e.name,
|
|
2288
|
-
active:
|
|
2321
|
+
active: i,
|
|
2289
2322
|
className: "aa-nav-danger d-flex align-items-center gap-1",
|
|
2290
2323
|
"data-testid": "administration-nav-link",
|
|
2291
|
-
children: [/* @__PURE__ */
|
|
2324
|
+
children: [/* @__PURE__ */ q(de, {
|
|
2292
2325
|
size: 15,
|
|
2293
2326
|
className: "text-danger flex-shrink-0"
|
|
2294
|
-
}), /* @__PURE__ */
|
|
2295
|
-
ns:
|
|
2327
|
+
}), /* @__PURE__ */ q("span", { children: n(e.name, {
|
|
2328
|
+
ns: Sn,
|
|
2296
2329
|
defaultValue: e.name
|
|
2297
2330
|
}) })]
|
|
2298
2331
|
}, e.name)
|
|
2299
2332
|
});
|
|
2300
|
-
},
|
|
2301
|
-
let { t:
|
|
2302
|
-
ns:
|
|
2333
|
+
}, wn = ({ link: e, toPath: t }) => {
|
|
2334
|
+
let { t: n } = G(Q), r = c(), i = xn(r.pathname, t(e.link ?? ""), t("")), a = n(e.name, {
|
|
2335
|
+
ns: Sn,
|
|
2303
2336
|
defaultValue: e.name
|
|
2304
2337
|
});
|
|
2305
|
-
return e.is_external || e.link?.startsWith("http://") || e.link?.startsWith("https://") ? /* @__PURE__ */
|
|
2338
|
+
return e.is_external || e.link?.startsWith("http://") || e.link?.startsWith("https://") ? /* @__PURE__ */ q(W.Item, {
|
|
2306
2339
|
as: "li",
|
|
2307
|
-
children: /* @__PURE__ */
|
|
2340
|
+
children: /* @__PURE__ */ q(W.Link, {
|
|
2308
2341
|
href: e.link ?? "#",
|
|
2309
2342
|
id: e.name,
|
|
2310
|
-
children:
|
|
2343
|
+
children: a
|
|
2311
2344
|
}, e.name)
|
|
2312
|
-
}) : e.link?.replace(/^\/+|\/+$/g, "") === "administration" || e.name.toLowerCase() === "administration" ? /* @__PURE__ */
|
|
2345
|
+
}) : e.link?.replace(/^\/+|\/+$/g, "") === "administration" || e.name.toLowerCase() === "administration" ? /* @__PURE__ */ q(Cn, {
|
|
2313
2346
|
link: e,
|
|
2314
2347
|
toPath: t
|
|
2315
|
-
}) : /* @__PURE__ */
|
|
2348
|
+
}) : /* @__PURE__ */ q(W.Item, {
|
|
2316
2349
|
as: "li",
|
|
2317
|
-
children: /* @__PURE__ */
|
|
2318
|
-
as:
|
|
2350
|
+
children: /* @__PURE__ */ J(W.Link, {
|
|
2351
|
+
as: o,
|
|
2319
2352
|
to: {
|
|
2320
2353
|
pathname: t(e.link ?? ""),
|
|
2321
|
-
search:
|
|
2354
|
+
search: r.search
|
|
2322
2355
|
},
|
|
2323
2356
|
id: e.name,
|
|
2324
|
-
active:
|
|
2325
|
-
children: [
|
|
2357
|
+
active: i,
|
|
2358
|
+
children: [a, e.badge ? /* @__PURE__ */ q("span", {
|
|
2326
2359
|
className: `badge bg-danger ms-1 ${e.has_errors ? "aa-menu-badge-pulse" : ""}`,
|
|
2327
2360
|
children: e.badge
|
|
2328
2361
|
}) : null]
|
|
2329
2362
|
}, e.name)
|
|
2330
2363
|
});
|
|
2331
|
-
},
|
|
2332
|
-
let { projectName: t } =
|
|
2333
|
-
return /* @__PURE__ */ K
|
|
2364
|
+
}, Tn = ({ data: e }) => {
|
|
2365
|
+
let { projectName: t } = gn(), n = (e) => bn(t, e), r = Array.isArray(e) ? e.filter((e) => !!e.link) : [];
|
|
2366
|
+
return /* @__PURE__ */ q(K, { children: r.map((e) => /* @__PURE__ */ q(wn, {
|
|
2334
2367
|
link: e,
|
|
2335
2368
|
toPath: n
|
|
2336
2369
|
}, e.link)) });
|
|
2337
|
-
},
|
|
2370
|
+
}, En = (e) => /* @__PURE__ */ q(Tn, { ...e }), Dn = (e) => /* @__PURE__ */ q(Tn, { ...e });
|
|
2338
2371
|
// src/Menu/Hooks/useMenu.ts
|
|
2339
|
-
function
|
|
2340
|
-
let { projectName: e, menuRefetchInterval: t } =
|
|
2341
|
-
return
|
|
2372
|
+
function On() {
|
|
2373
|
+
let { projectName: e, menuRefetchInterval: t } = gn();
|
|
2374
|
+
return i({
|
|
2342
2375
|
queryKey: Z.Menu,
|
|
2343
|
-
queryFn: () =>
|
|
2376
|
+
queryFn: () => He(e),
|
|
2344
2377
|
staleTime: 3e5,
|
|
2345
2378
|
retry: 1,
|
|
2346
2379
|
refetchOnWindowFocus: !1,
|
|
@@ -2348,58 +2381,58 @@ function Sn() {
|
|
|
2348
2381
|
});
|
|
2349
2382
|
}
|
|
2350
2383
|
// src/Menu/AuthLeftMenuAsync.tsx
|
|
2351
|
-
var
|
|
2352
|
-
let e = typeof document < "u" ? document.getElementById("nav-left") : null, { data: t, isLoading: n, isError: r } =
|
|
2353
|
-
return !e || !t?.left_links ? /* @__PURE__ */ K
|
|
2384
|
+
var kn = () => {
|
|
2385
|
+
let e = typeof document < "u" ? document.getElementById("nav-left") : null, { data: t, isLoading: n, isError: r } = On();
|
|
2386
|
+
return !e || !t?.left_links ? /* @__PURE__ */ q(K, {}) : Ie.createPortal(/* @__PURE__ */ q(En, {
|
|
2354
2387
|
error: r,
|
|
2355
2388
|
isLoading: n,
|
|
2356
2389
|
data: t.left_links
|
|
2357
2390
|
}), e);
|
|
2358
|
-
},
|
|
2359
|
-
let e = typeof document < "u" ? document.getElementById("nav-right") : null, { data: t, isLoading: n, isError: r } =
|
|
2360
|
-
return !e || !t?.right_links ? /* @__PURE__ */ K
|
|
2391
|
+
}, An = () => {
|
|
2392
|
+
let e = typeof document < "u" ? document.getElementById("nav-right") : null, { data: t, isLoading: n, isError: r } = On();
|
|
2393
|
+
return !e || !t?.right_links ? /* @__PURE__ */ q(K, {}) : Ie.createPortal(/* @__PURE__ */ q(Dn, {
|
|
2361
2394
|
error: r,
|
|
2362
2395
|
isLoading: n,
|
|
2363
2396
|
data: t.right_links
|
|
2364
2397
|
}), e);
|
|
2365
|
-
},
|
|
2366
|
-
/* @__PURE__ */
|
|
2367
|
-
/* @__PURE__ */
|
|
2368
|
-
/* @__PURE__ */
|
|
2398
|
+
}, jn = ({ className: e = "", fluidOnSmallScreens: t = !1, children: n }) => /* @__PURE__ */ J(K, { children: [
|
|
2399
|
+
/* @__PURE__ */ q(kn, {}),
|
|
2400
|
+
/* @__PURE__ */ q(An, {}),
|
|
2401
|
+
/* @__PURE__ */ q(V, { children: /* @__PURE__ */ q("div", {
|
|
2369
2402
|
className: `aa-react container mt-4${t ? " aa-container-fluid-small" : ""} ${e}`,
|
|
2370
|
-
children: /* @__PURE__ */
|
|
2403
|
+
children: /* @__PURE__ */ q(zt, { children: n ?? /* @__PURE__ */ q(s, {}) })
|
|
2371
2404
|
}) })
|
|
2372
2405
|
] });
|
|
2373
2406
|
// src/Pages/404.tsx
|
|
2374
|
-
function
|
|
2375
|
-
let { t: e } =
|
|
2376
|
-
return /* @__PURE__ */
|
|
2407
|
+
function Mn() {
|
|
2408
|
+
let { t: e } = G(Q);
|
|
2409
|
+
return /* @__PURE__ */ q(B, { children: /* @__PURE__ */ q(B.Body, {
|
|
2377
2410
|
className: "p-0",
|
|
2378
|
-
children: /* @__PURE__ */
|
|
2411
|
+
children: /* @__PURE__ */ q(Lt, {
|
|
2379
2412
|
title: e("Error 404"),
|
|
2380
2413
|
message: e("The page you are looking for does not exist.")
|
|
2381
2414
|
})
|
|
2382
2415
|
}) });
|
|
2383
2416
|
}
|
|
2384
2417
|
// src/Utils/general.tsx
|
|
2385
|
-
var
|
|
2418
|
+
var Nn = ({ url: e, text: t, children: n, external: r, className: i }) => /* @__PURE__ */ J("a", {
|
|
2386
2419
|
href: e,
|
|
2387
2420
|
className: `${i ?? ""}`,
|
|
2388
2421
|
target: r ? "_blank" : void 0,
|
|
2389
2422
|
rel: r ? "noopener noreferrer" : void 0,
|
|
2390
2423
|
children: [t, n]
|
|
2391
|
-
}),
|
|
2392
|
-
src:
|
|
2424
|
+
}), Pn = (e, t, n) => /* @__PURE__ */ q("img", {
|
|
2425
|
+
src: Zt(e, 128),
|
|
2393
2426
|
alt: t,
|
|
2394
2427
|
className: `${n ?? ""}`,
|
|
2395
2428
|
loading: "lazy",
|
|
2396
2429
|
onError: (t) => {
|
|
2397
|
-
t.target.src =
|
|
2430
|
+
t.target.src = tn(e, 64);
|
|
2398
2431
|
}
|
|
2399
2432
|
});
|
|
2400
|
-
function
|
|
2401
|
-
return /* @__PURE__ */
|
|
2433
|
+
function Fn(e) {
|
|
2434
|
+
return /* @__PURE__ */ q("span", { dangerouslySetInnerHTML: { __html: e } });
|
|
2402
2435
|
}
|
|
2403
|
-
export {
|
|
2436
|
+
export { hn as AaReactProvider, Cn as AdministrationMenuItem, jn as AuthBase, En as AuthLeftMenu, kn as AuthLeftMenuAsync, Dn as AuthRightMenu, An as AuthRightMenuAsync, jt as BaseModal, Gt as BaseOwnerCard, Yt as BaseOwnerSettingsSection, Bt as BaseSectionHeader, wt as BaseTable, Tt as BaseTableForm, lt as BaseTableHeader, yt as BaseTablePages, Et as BaseToolbar, at as BoolFilter, zt as ErrorBoundary, Lt as ErrorLoader, Mn as ErrorPage, St as FetchingLoader, ct as Filter, Vt as FilterButtonGroup, Ze as I18N_FALLBACK_NAMESPACE, Q as I18N_NAMESPACE, ln as LiveStatusIndicator, $ as MODAL_DEFAULTS, wn as MenuItem, Tn as MenuList, Kt as MissingOwnerCard, Dt as ModalSize, it as NumberFilter, qt as OwnerFilterBar, Wt as OwnerPortrait, Ke as QUERY_NETWORK_RETRIES, Re as SERVICE_UNAVAILABLE_STATUSES, un as SecurityBadge, st as SelectFilter, ze as ServiceUnavailableError, ot as TextFilter, Xt as UnregisteredModal, en as allianceImageUrl, Le as apiErrorMessage, Ve as baseApiClient, bt as baseTableFeatures, Qt as characterImageUrl, $t as corporationImageUrl, Be as createApiClient, xt as createBaseColumnHelper, Je as createQueryClient, ut as exportToCSV, _t as formatCompactNumber, pt as formatDate, ht as formatEta, rn as formatEveTime, vt as formatIsk, sn as formatLastFetch, gt as formatNumber, mt as formatRelativeTime, nn as getSecColor, yn as initI18n, xn as isActivePath, tn as itemImageUrl, He as loadMenu, Ue as loadUserData, We as loadUserSettings, Z as queryKeys, $e as registerI18nResources, on as renderCharacterPortrait, Fn as renderHtml, Nn as renderLink, Pn as renderShipImage, ft as renderTooltip, Zt as shipImageUrl, qe as shouldRetryQuery, bn as toProjectPath, dt as toolTipContainer, Ge as updateUserSettings, gn as useAaReact, Pt as useApproveMutation, dn as useCooldown, pn as useFeedback, Ft as useFormApproveMutation, cn as useLivePing, On as useMenu, It as useModalQueryState, fn as useOwnerCooldowns, _n as useUserData, vn as useUserSettings, an as zKillboardLink };
|
|
2404
2437
|
|
|
2405
2438
|
//# sourceMappingURL=index.js.map
|