aa-geuthur-react 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/dist/Provider.d.ts +4 -1
- package/dist/i18n.d.ts +13 -1
- package/dist/i18nResources.d.ts +2 -0
- package/dist/index.js +747 -314
- package/dist/index.js.map +1 -1
- package/i18n/cs/aa-geuthur-react.json +1 -0
- package/i18n/de/aa-geuthur-react.json +32 -32
- package/i18n/es/aa-geuthur-react.json +33 -33
- package/i18n/fr-FR/aa-geuthur-react.json +33 -33
- package/i18n/it-IT/aa-geuthur-react.json +33 -33
- package/i18n/ja/aa-geuthur-react.json +31 -31
- package/i18n/ko-KR/aa-geuthur-react.json +31 -31
- package/i18n/nl-NL/aa-geuthur-react.json +32 -32
- package/i18n/pl-PL/aa-geuthur-react.json +34 -34
- package/i18n/ru/aa-geuthur-react.json +34 -34
- package/i18n/sk/aa-geuthur-react.json +1 -0
- package/i18n/uk/aa-geuthur-react.json +34 -34
- package/i18n/zh-Hans/aa-geuthur-react.json +31 -31
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,17 +2,17 @@ import e from "js-cookie";
|
|
|
2
2
|
import t from "openapi-fetch";
|
|
3
3
|
import { Link as n, Outlet as r, useLocation as i } from "react-router-dom";
|
|
4
4
|
import { columnFacetingFeature as a, columnFilteringFeature as o, columnSizingFeature as s, columnVisibilityFeature as c, createColumnHelper as l, createFacetedMinMaxValues as u, createFacetedRowModel as d, createFacetedUniqueValues as f, createFilteredRowModel as p, createPaginatedRowModel as m, createSortedRowModel as h, filterFns as g, flexRender as _, functionalUpdate as v, rowPaginationFeature as y, rowSelectionFeature as b, rowSortingFeature as x, sortFns as S, tableFeatures as C, useTable as ee } from "@tanstack/react-table";
|
|
5
|
-
import { ArrowUpDown as w, ChevronDown as T, ChevronFirst as
|
|
6
|
-
import { Alert as ce, Button as k, ButtonGroup as A, ButtonToolbar as le, Card as j, Col as M, Dropdown as N, Form as P, Modal as F, Nav as I, OverlayTrigger as L, Popover as
|
|
7
|
-
import { useTranslation as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { Component as fe, createContext as pe, useCallback as
|
|
10
|
-
import
|
|
11
|
-
import { useMutation as
|
|
12
|
-
import { useQueryState as
|
|
13
|
-
import
|
|
5
|
+
import { ArrowUpDown as w, ChevronDown as T, ChevronFirst as E, ChevronLast as te, ChevronLeft as ne, ChevronRight as re, ChevronUp as ie, ExternalLink as D, Search as ae, ShieldAlert as O, SlidersHorizontal as oe, X as se } from "lucide-react";
|
|
6
|
+
import { Alert as ce, Button as k, ButtonGroup as A, ButtonToolbar as le, Card as j, Col as M, Dropdown as N, Form as P, Modal as F, Nav as I, OverlayTrigger as L, Popover as R, Tooltip as ue } from "react-bootstrap";
|
|
7
|
+
import { I18nContext as z, getI18n as B, useTranslation as V, withTranslation as de } from "react-i18next";
|
|
8
|
+
import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
9
|
+
import { Component as fe, createContext as pe, useCallback as G, useContext as me, useEffect as he, useMemo as ge, useRef as _e, useState as K } from "react";
|
|
10
|
+
import ve from "i18next";
|
|
11
|
+
import { useMutation as ye, useQuery as be, useQueryClient as xe } from "@tanstack/react-query";
|
|
12
|
+
import { useQueryState as Se } from "nuqs";
|
|
13
|
+
import Ce from "react-dom";
|
|
14
14
|
// src/Api/Api.ts
|
|
15
|
-
function
|
|
15
|
+
function we(n) {
|
|
16
16
|
let r = t({
|
|
17
17
|
baseUrl: "/",
|
|
18
18
|
credentials: "same-origin",
|
|
@@ -24,44 +24,475 @@ function Se(n) {
|
|
|
24
24
|
} }), r;
|
|
25
25
|
}
|
|
26
26
|
// src/Api/calls.ts
|
|
27
|
-
var
|
|
28
|
-
async function
|
|
29
|
-
let { data: t, error: n } = await
|
|
27
|
+
var Te = we();
|
|
28
|
+
async function Ee(e) {
|
|
29
|
+
let { data: t, error: n } = await Te.GET("/{project}/api/menu/", { params: { path: { project: e } } });
|
|
30
30
|
if (n || !t) throw Error("Failed to load menu");
|
|
31
31
|
return t;
|
|
32
32
|
}
|
|
33
|
-
async function
|
|
34
|
-
let { data: t, error: n } = await
|
|
33
|
+
async function De(e) {
|
|
34
|
+
let { data: t, error: n } = await Te.GET("/{project}/api/user/", { params: { path: { project: e } } });
|
|
35
35
|
if (n || !t) throw Error("Failed to load user data");
|
|
36
36
|
return { user: t };
|
|
37
37
|
}
|
|
38
38
|
// src/Api/query.ts
|
|
39
|
-
var
|
|
39
|
+
var Oe = {
|
|
40
40
|
Menu: ["Menu"],
|
|
41
41
|
User: ["User"],
|
|
42
42
|
UserSettings: ["UserSettings"]
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
}, ke = /* #__PURE__ */ Object.assign({
|
|
44
|
+
"../i18n/cs/aa-geuthur-react.json": {},
|
|
45
|
+
"../i18n/de/aa-geuthur-react.json": {
|
|
46
|
+
Close: "Schließen",
|
|
47
|
+
"Loading…": "Lädt…",
|
|
48
|
+
Confirm: "Bestätigen",
|
|
49
|
+
"Something went wrong.": "Etwas ist schiefgelaufen.",
|
|
50
|
+
"No Data Available": "Keine Daten verfügbar",
|
|
51
|
+
"Page Size:": "Seitengröße:",
|
|
52
|
+
"Show All": "Alle anzeigen",
|
|
53
|
+
"Total: {{total}}": "Gesamt: {{total}}",
|
|
54
|
+
"First Page": "Erste Seite",
|
|
55
|
+
"Previous Page": "Vorherige Seite",
|
|
56
|
+
"Page {{page}} of {{total}}": "Seite {{page}} von {{total}}",
|
|
57
|
+
"Next Page": "Nächste Seite",
|
|
58
|
+
"Last Page": "Letzte Seite",
|
|
59
|
+
"{{count}} Rows_one": "{{count}} Zeile",
|
|
60
|
+
"{{count}} Rows_other": "{{count}} Zeilen",
|
|
61
|
+
Clear: "Zurücksetzen",
|
|
62
|
+
Min: "Min",
|
|
63
|
+
Max: "Max",
|
|
64
|
+
Reset: "Zurücksetzen",
|
|
65
|
+
Done: "Fertig",
|
|
66
|
+
"Range…": "Bereich…",
|
|
67
|
+
True: "Wahr",
|
|
68
|
+
False: "Falsch",
|
|
69
|
+
All: "Alle",
|
|
70
|
+
"Filter…": "Filtern…",
|
|
71
|
+
"No matching options": "Keine passenden Optionen",
|
|
72
|
+
"Show {{pageSize}}": "{{pageSize}} anzeigen",
|
|
73
|
+
"Refreshing Data": "Daten werden aktualisiert",
|
|
74
|
+
"Data Loaded: {{date}}": "Daten geladen: {{date}}",
|
|
75
|
+
"Export Table to CSV": "Tabelle als CSV exportieren",
|
|
76
|
+
"Error 404": "Fehler 404",
|
|
77
|
+
"The page you are looking for does not exist.": "Die gesuchte Seite existiert nicht."
|
|
78
|
+
},
|
|
79
|
+
"../i18n/en/aa-geuthur-react.json": {
|
|
80
|
+
Close: "Close",
|
|
81
|
+
"Loading…": "Loading…",
|
|
82
|
+
Confirm: "Confirm",
|
|
83
|
+
"Something went wrong.": "Something went wrong.",
|
|
84
|
+
"No Data Available": "No Data Available",
|
|
85
|
+
"Page Size:": "Page Size:",
|
|
86
|
+
"Show All": "Show All",
|
|
87
|
+
"Total: {{total}}": "Total: {{total}}",
|
|
88
|
+
"First Page": "First Page",
|
|
89
|
+
"Previous Page": "Previous Page",
|
|
90
|
+
"Page {{page}} of {{total}}": "Page {{page}} of {{total}}",
|
|
91
|
+
"Next Page": "Next Page",
|
|
92
|
+
"Last Page": "Last Page",
|
|
93
|
+
"{{count}} Rows_one": "{{count}} Rows",
|
|
94
|
+
"{{count}} Rows_other": "{{count}} Rows",
|
|
95
|
+
Clear: "Clear",
|
|
96
|
+
Min: "Min",
|
|
97
|
+
Max: "Max",
|
|
98
|
+
Reset: "Reset",
|
|
99
|
+
Done: "Done",
|
|
100
|
+
"Range…": "Range…",
|
|
101
|
+
True: "True",
|
|
102
|
+
False: "False",
|
|
103
|
+
All: "All",
|
|
104
|
+
"Filter…": "Filter…",
|
|
105
|
+
"No matching options": "No matching options",
|
|
106
|
+
"Show {{pageSize}}": "Show {{pageSize}}",
|
|
107
|
+
"Refreshing Data": "Refreshing Data",
|
|
108
|
+
"Data Loaded: {{date}}": "Data Loaded: {{date}}",
|
|
109
|
+
"Export Table to CSV": "Export Table to CSV",
|
|
110
|
+
"Error 404": "Error 404",
|
|
111
|
+
"The page you are looking for does not exist.": "The page you are looking for does not exist."
|
|
112
|
+
},
|
|
113
|
+
"../i18n/es/aa-geuthur-react.json": {
|
|
114
|
+
Close: "",
|
|
115
|
+
"Loading…": "",
|
|
116
|
+
Confirm: "",
|
|
117
|
+
"Something went wrong.": "",
|
|
118
|
+
"No Data Available": "",
|
|
119
|
+
"Page Size:": "",
|
|
120
|
+
"Show All": "",
|
|
121
|
+
"Total: {{total}}": "",
|
|
122
|
+
"First Page": "",
|
|
123
|
+
"Previous Page": "",
|
|
124
|
+
"Page {{page}} of {{total}}": "",
|
|
125
|
+
"Next Page": "",
|
|
126
|
+
"Last Page": "",
|
|
127
|
+
"{{count}} Rows_one": "",
|
|
128
|
+
"{{count}} Rows_many": "",
|
|
129
|
+
"{{count}} Rows_other": "",
|
|
130
|
+
Clear: "",
|
|
131
|
+
Min: "",
|
|
132
|
+
Max: "",
|
|
133
|
+
Reset: "",
|
|
134
|
+
Done: "",
|
|
135
|
+
"Range…": "",
|
|
136
|
+
True: "",
|
|
137
|
+
False: "",
|
|
138
|
+
All: "",
|
|
139
|
+
"Filter…": "",
|
|
140
|
+
"No matching options": "",
|
|
141
|
+
"Show {{pageSize}}": "",
|
|
142
|
+
"Refreshing Data": "",
|
|
143
|
+
"Data Loaded: {{date}}": "",
|
|
144
|
+
"Export Table to CSV": "",
|
|
145
|
+
"Error 404": "",
|
|
146
|
+
"The page you are looking for does not exist.": ""
|
|
147
|
+
},
|
|
148
|
+
"../i18n/fr-FR/aa-geuthur-react.json": {
|
|
149
|
+
Close: "",
|
|
150
|
+
"Loading…": "",
|
|
151
|
+
Confirm: "",
|
|
152
|
+
"Something went wrong.": "",
|
|
153
|
+
"No Data Available": "",
|
|
154
|
+
"Page Size:": "",
|
|
155
|
+
"Show All": "",
|
|
156
|
+
"Total: {{total}}": "",
|
|
157
|
+
"First Page": "",
|
|
158
|
+
"Previous Page": "",
|
|
159
|
+
"Page {{page}} of {{total}}": "",
|
|
160
|
+
"Next Page": "",
|
|
161
|
+
"Last Page": "",
|
|
162
|
+
"{{count}} Rows_one": "",
|
|
163
|
+
"{{count}} Rows_many": "",
|
|
164
|
+
"{{count}} Rows_other": "",
|
|
165
|
+
Clear: "",
|
|
166
|
+
Min: "",
|
|
167
|
+
Max: "",
|
|
168
|
+
Reset: "",
|
|
169
|
+
Done: "",
|
|
170
|
+
"Range…": "",
|
|
171
|
+
True: "",
|
|
172
|
+
False: "",
|
|
173
|
+
All: "",
|
|
174
|
+
"Filter…": "",
|
|
175
|
+
"No matching options": "",
|
|
176
|
+
"Show {{pageSize}}": "",
|
|
177
|
+
"Refreshing Data": "",
|
|
178
|
+
"Data Loaded: {{date}}": "",
|
|
179
|
+
"Export Table to CSV": "",
|
|
180
|
+
"Error 404": "",
|
|
181
|
+
"The page you are looking for does not exist.": ""
|
|
182
|
+
},
|
|
183
|
+
"../i18n/it-IT/aa-geuthur-react.json": {
|
|
184
|
+
Close: "",
|
|
185
|
+
"Loading…": "",
|
|
186
|
+
Confirm: "",
|
|
187
|
+
"Something went wrong.": "",
|
|
188
|
+
"No Data Available": "",
|
|
189
|
+
"Page Size:": "",
|
|
190
|
+
"Show All": "",
|
|
191
|
+
"Total: {{total}}": "",
|
|
192
|
+
"First Page": "",
|
|
193
|
+
"Previous Page": "",
|
|
194
|
+
"Page {{page}} of {{total}}": "",
|
|
195
|
+
"Next Page": "",
|
|
196
|
+
"Last Page": "",
|
|
197
|
+
"{{count}} Rows_one": "",
|
|
198
|
+
"{{count}} Rows_many": "",
|
|
199
|
+
"{{count}} Rows_other": "",
|
|
200
|
+
Clear: "",
|
|
201
|
+
Min: "",
|
|
202
|
+
Max: "",
|
|
203
|
+
Reset: "",
|
|
204
|
+
Done: "",
|
|
205
|
+
"Range…": "",
|
|
206
|
+
True: "",
|
|
207
|
+
False: "",
|
|
208
|
+
All: "",
|
|
209
|
+
"Filter…": "",
|
|
210
|
+
"No matching options": "",
|
|
211
|
+
"Show {{pageSize}}": "",
|
|
212
|
+
"Refreshing Data": "",
|
|
213
|
+
"Data Loaded: {{date}}": "",
|
|
214
|
+
"Export Table to CSV": "",
|
|
215
|
+
"Error 404": "",
|
|
216
|
+
"The page you are looking for does not exist.": ""
|
|
217
|
+
},
|
|
218
|
+
"../i18n/ja/aa-geuthur-react.json": {
|
|
219
|
+
Close: "",
|
|
220
|
+
"Loading…": "",
|
|
221
|
+
Confirm: "",
|
|
222
|
+
"Something went wrong.": "",
|
|
223
|
+
"No Data Available": "",
|
|
224
|
+
"Page Size:": "",
|
|
225
|
+
"Show All": "",
|
|
226
|
+
"Total: {{total}}": "",
|
|
227
|
+
"First Page": "",
|
|
228
|
+
"Previous Page": "",
|
|
229
|
+
"Page {{page}} of {{total}}": "",
|
|
230
|
+
"Next Page": "",
|
|
231
|
+
"Last Page": "",
|
|
232
|
+
"{{count}} Rows_other": "",
|
|
233
|
+
Clear: "",
|
|
234
|
+
Min: "",
|
|
235
|
+
Max: "",
|
|
236
|
+
Reset: "",
|
|
237
|
+
Done: "",
|
|
238
|
+
"Range…": "",
|
|
239
|
+
True: "",
|
|
240
|
+
False: "",
|
|
241
|
+
All: "",
|
|
242
|
+
"Filter…": "",
|
|
243
|
+
"No matching options": "",
|
|
244
|
+
"Show {{pageSize}}": "",
|
|
245
|
+
"Refreshing Data": "",
|
|
246
|
+
"Data Loaded: {{date}}": "",
|
|
247
|
+
"Export Table to CSV": "",
|
|
248
|
+
"Error 404": "",
|
|
249
|
+
"The page you are looking for does not exist.": ""
|
|
250
|
+
},
|
|
251
|
+
"../i18n/ko-KR/aa-geuthur-react.json": {
|
|
252
|
+
Close: "",
|
|
253
|
+
"Loading…": "",
|
|
254
|
+
Confirm: "",
|
|
255
|
+
"Something went wrong.": "",
|
|
256
|
+
"No Data Available": "",
|
|
257
|
+
"Page Size:": "",
|
|
258
|
+
"Show All": "",
|
|
259
|
+
"Total: {{total}}": "",
|
|
260
|
+
"First Page": "",
|
|
261
|
+
"Previous Page": "",
|
|
262
|
+
"Page {{page}} of {{total}}": "",
|
|
263
|
+
"Next Page": "",
|
|
264
|
+
"Last Page": "",
|
|
265
|
+
"{{count}} Rows_other": "",
|
|
266
|
+
Clear: "",
|
|
267
|
+
Min: "",
|
|
268
|
+
Max: "",
|
|
269
|
+
Reset: "",
|
|
270
|
+
Done: "",
|
|
271
|
+
"Range…": "",
|
|
272
|
+
True: "",
|
|
273
|
+
False: "",
|
|
274
|
+
All: "",
|
|
275
|
+
"Filter…": "",
|
|
276
|
+
"No matching options": "",
|
|
277
|
+
"Show {{pageSize}}": "",
|
|
278
|
+
"Refreshing Data": "",
|
|
279
|
+
"Data Loaded: {{date}}": "",
|
|
280
|
+
"Export Table to CSV": "",
|
|
281
|
+
"Error 404": "",
|
|
282
|
+
"The page you are looking for does not exist.": ""
|
|
283
|
+
},
|
|
284
|
+
"../i18n/nl-NL/aa-geuthur-react.json": {
|
|
285
|
+
Close: "",
|
|
286
|
+
"Loading…": "",
|
|
287
|
+
Confirm: "",
|
|
288
|
+
"Something went wrong.": "",
|
|
289
|
+
"No Data Available": "",
|
|
290
|
+
"Page Size:": "",
|
|
291
|
+
"Show All": "",
|
|
292
|
+
"Total: {{total}}": "",
|
|
293
|
+
"First Page": "",
|
|
294
|
+
"Previous Page": "",
|
|
295
|
+
"Page {{page}} of {{total}}": "",
|
|
296
|
+
"Next Page": "",
|
|
297
|
+
"Last Page": "",
|
|
298
|
+
"{{count}} Rows_one": "",
|
|
299
|
+
"{{count}} Rows_other": "",
|
|
300
|
+
Clear: "",
|
|
301
|
+
Min: "",
|
|
302
|
+
Max: "",
|
|
303
|
+
Reset: "",
|
|
304
|
+
Done: "",
|
|
305
|
+
"Range…": "",
|
|
306
|
+
True: "",
|
|
307
|
+
False: "",
|
|
308
|
+
All: "",
|
|
309
|
+
"Filter…": "",
|
|
310
|
+
"No matching options": "",
|
|
311
|
+
"Show {{pageSize}}": "",
|
|
312
|
+
"Refreshing Data": "",
|
|
313
|
+
"Data Loaded: {{date}}": "",
|
|
314
|
+
"Export Table to CSV": "",
|
|
315
|
+
"Error 404": "",
|
|
316
|
+
"The page you are looking for does not exist.": ""
|
|
317
|
+
},
|
|
318
|
+
"../i18n/pl-PL/aa-geuthur-react.json": {
|
|
319
|
+
Close: "",
|
|
320
|
+
"Loading…": "",
|
|
321
|
+
Confirm: "",
|
|
322
|
+
"Something went wrong.": "",
|
|
323
|
+
"No Data Available": "",
|
|
324
|
+
"Page Size:": "",
|
|
325
|
+
"Show All": "",
|
|
326
|
+
"Total: {{total}}": "",
|
|
327
|
+
"First Page": "",
|
|
328
|
+
"Previous Page": "",
|
|
329
|
+
"Page {{page}} of {{total}}": "",
|
|
330
|
+
"Next Page": "",
|
|
331
|
+
"Last Page": "",
|
|
332
|
+
"{{count}} Rows_one": "",
|
|
333
|
+
"{{count}} Rows_few": "",
|
|
334
|
+
"{{count}} Rows_many": "",
|
|
335
|
+
"{{count}} Rows_other": "",
|
|
336
|
+
Clear: "",
|
|
337
|
+
Min: "",
|
|
338
|
+
Max: "",
|
|
339
|
+
Reset: "",
|
|
340
|
+
Done: "",
|
|
341
|
+
"Range…": "",
|
|
342
|
+
True: "",
|
|
343
|
+
False: "",
|
|
344
|
+
All: "",
|
|
345
|
+
"Filter…": "",
|
|
346
|
+
"No matching options": "",
|
|
347
|
+
"Show {{pageSize}}": "",
|
|
348
|
+
"Refreshing Data": "",
|
|
349
|
+
"Data Loaded: {{date}}": "",
|
|
350
|
+
"Export Table to CSV": "",
|
|
351
|
+
"Error 404": "",
|
|
352
|
+
"The page you are looking for does not exist.": ""
|
|
353
|
+
},
|
|
354
|
+
"../i18n/ru/aa-geuthur-react.json": {
|
|
355
|
+
Close: "",
|
|
356
|
+
"Loading…": "",
|
|
357
|
+
Confirm: "",
|
|
358
|
+
"Something went wrong.": "",
|
|
359
|
+
"No Data Available": "",
|
|
360
|
+
"Page Size:": "",
|
|
361
|
+
"Show All": "",
|
|
362
|
+
"Total: {{total}}": "",
|
|
363
|
+
"First Page": "",
|
|
364
|
+
"Previous Page": "",
|
|
365
|
+
"Page {{page}} of {{total}}": "",
|
|
366
|
+
"Next Page": "",
|
|
367
|
+
"Last Page": "",
|
|
368
|
+
"{{count}} Rows_one": "",
|
|
369
|
+
"{{count}} Rows_few": "",
|
|
370
|
+
"{{count}} Rows_many": "",
|
|
371
|
+
"{{count}} Rows_other": "",
|
|
372
|
+
Clear: "",
|
|
373
|
+
Min: "",
|
|
374
|
+
Max: "",
|
|
375
|
+
Reset: "",
|
|
376
|
+
Done: "",
|
|
377
|
+
"Range…": "",
|
|
378
|
+
True: "",
|
|
379
|
+
False: "",
|
|
380
|
+
All: "",
|
|
381
|
+
"Filter…": "",
|
|
382
|
+
"No matching options": "",
|
|
383
|
+
"Show {{pageSize}}": "",
|
|
384
|
+
"Refreshing Data": "",
|
|
385
|
+
"Data Loaded: {{date}}": "",
|
|
386
|
+
"Export Table to CSV": "",
|
|
387
|
+
"Error 404": "",
|
|
388
|
+
"The page you are looking for does not exist.": ""
|
|
389
|
+
},
|
|
390
|
+
"../i18n/sk/aa-geuthur-react.json": {},
|
|
391
|
+
"../i18n/uk/aa-geuthur-react.json": {
|
|
392
|
+
Close: "",
|
|
393
|
+
"Loading…": "",
|
|
394
|
+
Confirm: "",
|
|
395
|
+
"Something went wrong.": "",
|
|
396
|
+
"No Data Available": "",
|
|
397
|
+
"Page Size:": "",
|
|
398
|
+
"Show All": "",
|
|
399
|
+
"Total: {{total}}": "",
|
|
400
|
+
"First Page": "",
|
|
401
|
+
"Previous Page": "",
|
|
402
|
+
"Page {{page}} of {{total}}": "",
|
|
403
|
+
"Next Page": "",
|
|
404
|
+
"Last Page": "",
|
|
405
|
+
"{{count}} Rows_one": "",
|
|
406
|
+
"{{count}} Rows_few": "",
|
|
407
|
+
"{{count}} Rows_many": "",
|
|
408
|
+
"{{count}} Rows_other": "",
|
|
409
|
+
Clear: "",
|
|
410
|
+
Min: "",
|
|
411
|
+
Max: "",
|
|
412
|
+
Reset: "",
|
|
413
|
+
Done: "",
|
|
414
|
+
"Range…": "",
|
|
415
|
+
True: "",
|
|
416
|
+
False: "",
|
|
417
|
+
All: "",
|
|
418
|
+
"Filter…": "",
|
|
419
|
+
"No matching options": "",
|
|
420
|
+
"Show {{pageSize}}": "",
|
|
421
|
+
"Refreshing Data": "",
|
|
422
|
+
"Data Loaded: {{date}}": "",
|
|
423
|
+
"Export Table to CSV": "",
|
|
424
|
+
"Error 404": "",
|
|
425
|
+
"The page you are looking for does not exist.": ""
|
|
426
|
+
},
|
|
427
|
+
"../i18n/zh-Hans/aa-geuthur-react.json": {
|
|
428
|
+
Close: "",
|
|
429
|
+
"Loading…": "",
|
|
430
|
+
Confirm: "",
|
|
431
|
+
"Something went wrong.": "",
|
|
432
|
+
"No Data Available": "",
|
|
433
|
+
"Page Size:": "",
|
|
434
|
+
"Show All": "",
|
|
435
|
+
"Total: {{total}}": "",
|
|
436
|
+
"First Page": "",
|
|
437
|
+
"Previous Page": "",
|
|
438
|
+
"Page {{page}} of {{total}}": "",
|
|
439
|
+
"Next Page": "",
|
|
440
|
+
"Last Page": "",
|
|
441
|
+
"{{count}} Rows_other": "",
|
|
442
|
+
Clear: "",
|
|
443
|
+
Min: "",
|
|
444
|
+
Max: "",
|
|
445
|
+
Reset: "",
|
|
446
|
+
Done: "",
|
|
447
|
+
"Range…": "",
|
|
448
|
+
True: "",
|
|
449
|
+
False: "",
|
|
450
|
+
All: "",
|
|
451
|
+
"Filter…": "",
|
|
452
|
+
"No matching options": "",
|
|
453
|
+
"Show {{pageSize}}": "",
|
|
454
|
+
"Refreshing Data": "",
|
|
455
|
+
"Data Loaded: {{date}}": "",
|
|
456
|
+
"Export Table to CSV": "",
|
|
457
|
+
"Error 404": "",
|
|
458
|
+
"The page you are looking for does not exist.": ""
|
|
459
|
+
}
|
|
460
|
+
}), Ae = {};
|
|
461
|
+
for (let [e, t] of Object.entries(ke)) {
|
|
462
|
+
let n = e.split("/").at(-2);
|
|
463
|
+
n && (Ae[n] = t);
|
|
464
|
+
}
|
|
465
|
+
// src/i18n.ts
|
|
466
|
+
var q = "aa-geuthur-react", je = "translation", Me = /* @__PURE__ */ new WeakSet();
|
|
467
|
+
function Ne(e) {
|
|
468
|
+
if (e && typeof e.addResourceBundle == "function" && !Me.has(e)) {
|
|
469
|
+
Me.add(e);
|
|
470
|
+
for (let [t, n] of Object.entries(Ae)) e.addResourceBundle(t, q, n, !0, !1);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
// src/Components/Base/BaseTable/BaseTableFilter.tsx
|
|
474
|
+
var J = "position-relative w-100", Y = "position-absolute top-50 end-0 translate-middle-y me-2 pe-none text-muted", X = ({ onClick: e }) => {
|
|
475
|
+
let { t } = V(q);
|
|
476
|
+
return /* @__PURE__ */ U("button", {
|
|
46
477
|
type: "button",
|
|
47
478
|
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",
|
|
48
479
|
onClick: e,
|
|
49
480
|
title: t("Clear"),
|
|
50
|
-
children: /* @__PURE__ */
|
|
481
|
+
children: /* @__PURE__ */ U(se, { size: 12 })
|
|
51
482
|
});
|
|
52
|
-
},
|
|
53
|
-
let { t } =
|
|
483
|
+
}, Pe = RegExp.prototype.test.bind(/(<([^>]+)>)/i), Fe = ({ column: e }) => {
|
|
484
|
+
let { t } = V(q), n = e.getFilterValue(), r = n?.[0] !== void 0 && n?.[0] !== "" || n?.[1] !== void 0 && n?.[1] !== "", i = /* @__PURE__ */ U(R, {
|
|
54
485
|
id: "popover-number-range",
|
|
55
486
|
className: "aa-table-filter-popover",
|
|
56
|
-
children: /* @__PURE__ */
|
|
487
|
+
children: /* @__PURE__ */ U(R.Body, {
|
|
57
488
|
className: "p-3",
|
|
58
|
-
children: /* @__PURE__ */
|
|
489
|
+
children: /* @__PURE__ */ W("div", {
|
|
59
490
|
className: "d-flex flex-column gap-2",
|
|
60
491
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U(P.Label, {
|
|
62
493
|
className: "small text-muted mb-1",
|
|
63
494
|
children: t("Min")
|
|
64
|
-
}), /* @__PURE__ */
|
|
495
|
+
}), /* @__PURE__ */ U(P.Control, {
|
|
65
496
|
size: "sm",
|
|
66
497
|
type: "number",
|
|
67
498
|
value: n?.[0] ?? "",
|
|
@@ -69,10 +500,10 @@ var Ee = {
|
|
|
69
500
|
placeholder: t("Min"),
|
|
70
501
|
className: "aa-table-filter-input"
|
|
71
502
|
})] }),
|
|
72
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U(P.Label, {
|
|
73
504
|
className: "small text-muted mb-1",
|
|
74
505
|
children: t("Max")
|
|
75
|
-
}), /* @__PURE__ */
|
|
506
|
+
}), /* @__PURE__ */ U(P.Control, {
|
|
76
507
|
size: "sm",
|
|
77
508
|
type: "number",
|
|
78
509
|
value: n?.[1] ?? "",
|
|
@@ -80,9 +511,9 @@ var Ee = {
|
|
|
80
511
|
placeholder: t("Max"),
|
|
81
512
|
className: "aa-table-filter-input"
|
|
82
513
|
})] }),
|
|
83
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ W("div", {
|
|
84
515
|
className: "d-flex gap-2 mt-2",
|
|
85
|
-
children: [/* @__PURE__ */
|
|
516
|
+
children: [/* @__PURE__ */ U(k, {
|
|
86
517
|
variant: "outline-secondary",
|
|
87
518
|
size: "sm",
|
|
88
519
|
className: "w-50",
|
|
@@ -90,7 +521,7 @@ var Ee = {
|
|
|
90
521
|
e.setFilterValue(() => [void 0, void 0]), document.body.click();
|
|
91
522
|
},
|
|
92
523
|
children: t("Reset")
|
|
93
|
-
}), /* @__PURE__ */
|
|
524
|
+
}), /* @__PURE__ */ U(k, {
|
|
94
525
|
variant: "primary",
|
|
95
526
|
size: "sm",
|
|
96
527
|
className: "w-50",
|
|
@@ -102,54 +533,54 @@ var Ee = {
|
|
|
102
533
|
})
|
|
103
534
|
})
|
|
104
535
|
});
|
|
105
|
-
return /* @__PURE__ */
|
|
536
|
+
return /* @__PURE__ */ U(L, {
|
|
106
537
|
trigger: "click",
|
|
107
538
|
placement: "bottom",
|
|
108
539
|
rootClose: !0,
|
|
109
540
|
overlay: i,
|
|
110
|
-
children: /* @__PURE__ */
|
|
541
|
+
children: /* @__PURE__ */ W("div", {
|
|
111
542
|
className: J,
|
|
112
|
-
children: [/* @__PURE__ */
|
|
543
|
+
children: [/* @__PURE__ */ U(P.Control, {
|
|
113
544
|
size: "sm",
|
|
114
545
|
className: "aa-table-filter-input",
|
|
115
546
|
readOnly: !0,
|
|
116
547
|
type: "text",
|
|
117
548
|
placeholder: t("Range…"),
|
|
118
549
|
value: r ? `${n?.[0] || "Min"} → ${n?.[1] || "Max"}` : ""
|
|
119
|
-
}), r ? /* @__PURE__ */
|
|
550
|
+
}), r ? /* @__PURE__ */ U(X, { onClick: (t) => {
|
|
120
551
|
t.stopPropagation(), e.setFilterValue(() => [void 0, void 0]);
|
|
121
|
-
} }) : /* @__PURE__ */
|
|
552
|
+
} }) : /* @__PURE__ */ U(oe, {
|
|
122
553
|
size: 12,
|
|
123
554
|
className: Y
|
|
124
555
|
})]
|
|
125
556
|
})
|
|
126
557
|
});
|
|
127
|
-
},
|
|
128
|
-
let { t } =
|
|
129
|
-
return /* @__PURE__ */
|
|
558
|
+
}, Ie = ({ column: e }) => {
|
|
559
|
+
let { t } = V(q), n = e.getFilterValue(), r = n !== void 0;
|
|
560
|
+
return /* @__PURE__ */ U(L, {
|
|
130
561
|
trigger: "click",
|
|
131
562
|
placement: "bottom-start",
|
|
132
563
|
rootClose: !0,
|
|
133
|
-
overlay: /* @__PURE__ */
|
|
564
|
+
overlay: /* @__PURE__ */ U(N, {
|
|
134
565
|
show: !0,
|
|
135
566
|
drop: "down-centered",
|
|
136
|
-
children: /* @__PURE__ */
|
|
567
|
+
children: /* @__PURE__ */ W(N.Menu, {
|
|
137
568
|
className: "aa-table-filter-dropdown overflow-y-auto",
|
|
138
569
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ U(N.Item, {
|
|
140
571
|
onClick: () => {
|
|
141
572
|
e.setFilterValue(!0), document.body.click();
|
|
142
573
|
},
|
|
143
574
|
children: t("True")
|
|
144
575
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ U(N.Item, {
|
|
146
577
|
onClick: () => {
|
|
147
578
|
e.setFilterValue(!1), document.body.click();
|
|
148
579
|
},
|
|
149
580
|
children: t("False")
|
|
150
581
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ U(N.Divider, {}),
|
|
583
|
+
/* @__PURE__ */ U(N.Item, {
|
|
153
584
|
onClick: () => {
|
|
154
585
|
e.setFilterValue(void 0), document.body.click();
|
|
155
586
|
},
|
|
@@ -158,28 +589,28 @@ var Ee = {
|
|
|
158
589
|
]
|
|
159
590
|
})
|
|
160
591
|
}),
|
|
161
|
-
children: /* @__PURE__ */
|
|
592
|
+
children: /* @__PURE__ */ W("div", {
|
|
162
593
|
className: J,
|
|
163
|
-
children: [/* @__PURE__ */
|
|
594
|
+
children: [/* @__PURE__ */ U(P.Control, {
|
|
164
595
|
size: "sm",
|
|
165
596
|
className: "aa-table-filter-input",
|
|
166
597
|
readOnly: !0,
|
|
167
598
|
type: "text",
|
|
168
599
|
placeholder: t("All"),
|
|
169
600
|
value: r ? t(n ? "True" : "False") : ""
|
|
170
|
-
}), r ? /* @__PURE__ */
|
|
601
|
+
}), r ? /* @__PURE__ */ U(X, { onClick: (t) => {
|
|
171
602
|
t.stopPropagation(), e.setFilterValue(() => void 0);
|
|
172
|
-
} }) : /* @__PURE__ */
|
|
603
|
+
} }) : /* @__PURE__ */ U(T, {
|
|
173
604
|
size: 12,
|
|
174
605
|
className: Y
|
|
175
606
|
})]
|
|
176
607
|
})
|
|
177
608
|
});
|
|
178
|
-
},
|
|
179
|
-
let { t } =
|
|
180
|
-
return /* @__PURE__ */
|
|
609
|
+
}, Le = ({ column: e }) => {
|
|
610
|
+
let { t } = V(q), n = e.getFilterValue() ?? "";
|
|
611
|
+
return /* @__PURE__ */ W("div", {
|
|
181
612
|
className: J,
|
|
182
|
-
children: [/* @__PURE__ */
|
|
613
|
+
children: [/* @__PURE__ */ U(P.Control, {
|
|
183
614
|
size: "sm",
|
|
184
615
|
className: "aa-table-filter-input",
|
|
185
616
|
type: "text",
|
|
@@ -188,40 +619,40 @@ var Ee = {
|
|
|
188
619
|
onChange: (t) => {
|
|
189
620
|
e.setFilterValue(t.target.value ? t.target.value : "");
|
|
190
621
|
}
|
|
191
|
-
}), n ? /* @__PURE__ */
|
|
622
|
+
}), n ? /* @__PURE__ */ U(X, { onClick: () => e.setFilterValue("") }) : /* @__PURE__ */ U(ae, {
|
|
192
623
|
size: 12,
|
|
193
624
|
className: Y
|
|
194
625
|
})]
|
|
195
626
|
});
|
|
196
|
-
},
|
|
197
|
-
let { t } =
|
|
627
|
+
}, Re = ({ column: e }) => {
|
|
628
|
+
let { t } = V(q), [n, r] = K(!1), i = Array.from(e.getFacetedUniqueValues().keys()).filter((e) => e != null).sort(), a = e.getFilterValue(), o = Pe(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({
|
|
198
629
|
value: t,
|
|
199
630
|
label: s(t)
|
|
200
631
|
})), e), []);
|
|
201
|
-
return /* @__PURE__ */
|
|
632
|
+
return /* @__PURE__ */ U(L, {
|
|
202
633
|
trigger: "click",
|
|
203
634
|
placement: "bottom-start",
|
|
204
635
|
rootClose: !0,
|
|
205
|
-
overlay: /* @__PURE__ */
|
|
636
|
+
overlay: /* @__PURE__ */ U(N, {
|
|
206
637
|
show: !0,
|
|
207
638
|
drop: "down-centered",
|
|
208
|
-
children: /* @__PURE__ */
|
|
639
|
+
children: /* @__PURE__ */ U(N.Menu, {
|
|
209
640
|
className: "aa-table-filter-dropdown overflow-y-auto",
|
|
210
|
-
children: c.length > 0 ? c.map((t) => /* @__PURE__ */
|
|
641
|
+
children: c.length > 0 ? c.map((t) => /* @__PURE__ */ U(N.Item, {
|
|
211
642
|
className: "text-capitalize",
|
|
212
643
|
onClick: () => {
|
|
213
644
|
e.setFilterValue(t.value ? t.value : ""), document.body.click();
|
|
214
645
|
},
|
|
215
646
|
children: t.label
|
|
216
|
-
}, t.value)) : /* @__PURE__ */
|
|
647
|
+
}, t.value)) : /* @__PURE__ */ U(N.Item, {
|
|
217
648
|
disabled: !0,
|
|
218
649
|
children: t("No matching options")
|
|
219
650
|
})
|
|
220
651
|
})
|
|
221
652
|
}),
|
|
222
|
-
children: /* @__PURE__ */
|
|
653
|
+
children: /* @__PURE__ */ W("div", {
|
|
223
654
|
className: J,
|
|
224
|
-
children: [/* @__PURE__ */
|
|
655
|
+
children: [/* @__PURE__ */ U(P.Control, {
|
|
225
656
|
size: "sm",
|
|
226
657
|
className: "aa-table-filter-input",
|
|
227
658
|
type: "text",
|
|
@@ -234,39 +665,39 @@ var Ee = {
|
|
|
234
665
|
onChange: (t) => {
|
|
235
666
|
e.setFilterValue(t.target.value ? t.target.value : "");
|
|
236
667
|
}
|
|
237
|
-
}), a ? /* @__PURE__ */
|
|
668
|
+
}), a ? /* @__PURE__ */ U(X, { onClick: (t) => {
|
|
238
669
|
t.stopPropagation(), r(!1), e.setFilterValue(() => void 0);
|
|
239
|
-
} }) : /* @__PURE__ */
|
|
670
|
+
} }) : /* @__PURE__ */ U(T, {
|
|
240
671
|
size: 12,
|
|
241
672
|
className: Y
|
|
242
673
|
})]
|
|
243
674
|
})
|
|
244
675
|
});
|
|
245
|
-
},
|
|
676
|
+
}, ze = ({ column: e, table: t }) => {
|
|
246
677
|
let n = t.getPreFilteredRowModel().flatRows[0]?.getValue(e.id);
|
|
247
|
-
return
|
|
678
|
+
return U(typeof n == "number" ? Fe : typeof n == "boolean" ? Ie : typeof n == "object" ? Le : Re, { column: e });
|
|
248
679
|
};
|
|
249
680
|
// src/Components/Base/BaseTable/BaseTableHeader.tsx
|
|
250
|
-
function
|
|
251
|
-
return /* @__PURE__ */
|
|
681
|
+
function Be({ table: e, enableFilters: t = !0 }) {
|
|
682
|
+
return /* @__PURE__ */ U(H, { children: e.getHeaderGroups().map((n) => {
|
|
252
683
|
let r = t !== !1 && n.headers.some((e) => e.column.getCanFilter());
|
|
253
|
-
return /* @__PURE__ */ H
|
|
684
|
+
return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("tr", { children: n.headers.map((e) => {
|
|
254
685
|
let t = e.column.getCanSort(), n = e.column.getIsSorted(), r = e.column.columnDef.meta?.align === "right";
|
|
255
|
-
return /* @__PURE__ */
|
|
686
|
+
return /* @__PURE__ */ U("th", {
|
|
256
687
|
colSpan: e.colSpan,
|
|
257
688
|
onClick: t ? e.column.getToggleSortingHandler() : void 0,
|
|
258
689
|
className: `aa-table-heading-cell ${t ? "aa-table-sortable user-select-none" : ""} ${r ? "text-end" : ""}`,
|
|
259
|
-
children: e.isPlaceholder ? null : /* @__PURE__ */
|
|
690
|
+
children: e.isPlaceholder ? null : /* @__PURE__ */ W("div", {
|
|
260
691
|
className: `d-flex align-items-center gap-2 ${r ? "justify-content-end text-end" : ""}`,
|
|
261
|
-
children: [_(e.column.columnDef.header, e.getContext()), t && /* @__PURE__ */
|
|
692
|
+
children: [_(e.column.columnDef.header, e.getContext()), t && /* @__PURE__ */ U("span", { children: n === "asc" ? /* @__PURE__ */ U(ie, { className: "aa-table-sort-icon aa-table-sort-icon-active" }) : n === "desc" ? /* @__PURE__ */ U(T, { className: "aa-table-sort-icon aa-table-sort-icon-active" }) : /* @__PURE__ */ U(w, { className: "aa-table-sort-icon" }) })]
|
|
262
693
|
})
|
|
263
694
|
}, e.id);
|
|
264
|
-
}) }), r && /* @__PURE__ */
|
|
695
|
+
}) }), r && /* @__PURE__ */ U("tr", {
|
|
265
696
|
className: "aa-table-filter-row",
|
|
266
|
-
children: n.headers.map((t) => /* @__PURE__ */
|
|
697
|
+
children: n.headers.map((t) => /* @__PURE__ */ U("th", {
|
|
267
698
|
colSpan: t.colSpan,
|
|
268
699
|
className: "aa-table-filter-cell px-3 py-1",
|
|
269
|
-
children: t.column.getCanFilter() ? /* @__PURE__ */
|
|
700
|
+
children: t.column.getCanFilter() ? /* @__PURE__ */ U(ze, {
|
|
270
701
|
column: t.column,
|
|
271
702
|
table: e
|
|
272
703
|
}) : null
|
|
@@ -275,7 +706,7 @@ function Pe({ table: e, enableFilters: t = !0 }) {
|
|
|
275
706
|
}) });
|
|
276
707
|
}
|
|
277
708
|
// src/Components/Base/BaseTable/tableHelper.tsx
|
|
278
|
-
var
|
|
709
|
+
var Ve = (e, t) => {
|
|
279
710
|
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) => {
|
|
280
711
|
if (e == null) return "";
|
|
281
712
|
let t = String(e);
|
|
@@ -284,17 +715,17 @@ var Fe = (e, t) => {
|
|
|
284
715
|
l.download = r, l.href = URL.createObjectURL(c), l.style.visibility = "hidden", document.body.appendChild(l), l.click(), document.body.removeChild(l);
|
|
285
716
|
};
|
|
286
717
|
// src/Utils/bootsTrap.tsx
|
|
287
|
-
function
|
|
288
|
-
return /* @__PURE__ */
|
|
718
|
+
function He(e) {
|
|
719
|
+
return /* @__PURE__ */ U("div", {
|
|
289
720
|
className: "aa-tooltip-container",
|
|
290
|
-
children: /* @__PURE__ */
|
|
721
|
+
children: /* @__PURE__ */ U("span", { children: e })
|
|
291
722
|
});
|
|
292
723
|
}
|
|
293
724
|
function Z(e, t) {
|
|
294
|
-
return /* @__PURE__ */
|
|
725
|
+
return /* @__PURE__ */ U(L, {
|
|
295
726
|
placement: "auto",
|
|
296
727
|
trigger: ["hover", "focus"],
|
|
297
|
-
overlay: /* @__PURE__ */
|
|
728
|
+
overlay: /* @__PURE__ */ U(ue, {
|
|
298
729
|
id: "aa-react-tooltip",
|
|
299
730
|
className: "aa-tooltip",
|
|
300
731
|
children: e
|
|
@@ -303,9 +734,9 @@ function Z(e, t) {
|
|
|
303
734
|
});
|
|
304
735
|
}
|
|
305
736
|
// src/Utils/format.ts
|
|
306
|
-
function
|
|
737
|
+
function Ue(e, t) {
|
|
307
738
|
if (!e) return "N/A";
|
|
308
|
-
let n =
|
|
739
|
+
let n = ve.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 = {
|
|
309
740
|
...r || i ? {} : {
|
|
310
741
|
dateStyle: "medium",
|
|
311
742
|
timeStyle: "short"
|
|
@@ -314,7 +745,7 @@ function Le(e, t) {
|
|
|
314
745
|
};
|
|
315
746
|
return new Intl.DateTimeFormat(n, a).format(new Date(e));
|
|
316
747
|
}
|
|
317
|
-
function
|
|
748
|
+
function We(e) {
|
|
318
749
|
if (!e) return "N/A";
|
|
319
750
|
let t = e instanceof Date ? e : new Date(e);
|
|
320
751
|
if (isNaN(t.getTime())) return "N/A";
|
|
@@ -343,33 +774,33 @@ function Re(e) {
|
|
|
343
774
|
unit: "second",
|
|
344
775
|
seconds: 1
|
|
345
776
|
}
|
|
346
|
-
], i = r.find((e) => Math.abs(n) >= e.seconds) ?? r[r.length - 1], a = Math.round(n / i.seconds), o =
|
|
777
|
+
], i = r.find((e) => Math.abs(n) >= e.seconds) ?? r[r.length - 1], a = Math.round(n / i.seconds), o = ve.language || "en";
|
|
347
778
|
return new Intl.RelativeTimeFormat(o, { numeric: "auto" }).format(a, i.unit);
|
|
348
779
|
}
|
|
349
|
-
function
|
|
780
|
+
function Ge(e, t = "Done") {
|
|
350
781
|
if (!e) return "N/A";
|
|
351
782
|
let n = e instanceof Date ? e : new Date(e);
|
|
352
|
-
return isNaN(n.getTime()) ? "N/A" : n.getTime() <= Date.now() ? t :
|
|
783
|
+
return isNaN(n.getTime()) ? "N/A" : n.getTime() <= Date.now() ? t : We(n);
|
|
353
784
|
}
|
|
354
|
-
function
|
|
355
|
-
let r = t ||
|
|
785
|
+
function Ke(e, t, n) {
|
|
786
|
+
let r = t || ve.language || "en";
|
|
356
787
|
return new Intl.NumberFormat(r, n).format(e);
|
|
357
788
|
}
|
|
358
|
-
function
|
|
789
|
+
function qe(e, t = "", n, r) {
|
|
359
790
|
let i = t ? ` ${t}` : "";
|
|
360
|
-
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}` : `${
|
|
791
|
+
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}` : `${Ke(e, n, r)}${i}`;
|
|
361
792
|
}
|
|
362
|
-
function
|
|
363
|
-
return `${
|
|
793
|
+
function Je(e) {
|
|
794
|
+
return `${Ke(Math.round(e), void 0, { maximumFractionDigits: 0 })} ISK`;
|
|
364
795
|
}
|
|
365
796
|
// src/Components/Base/BaseTable/BaseTablePages.tsx
|
|
366
|
-
var
|
|
367
|
-
let { t: a } =
|
|
368
|
-
return /* @__PURE__ */
|
|
797
|
+
var Ye = ({ table: e, isFetching: t = !1, fileName: n, showPageNumber: r = !1, showExport: i = !0 }) => {
|
|
798
|
+
let { t: a } = V(q), o = Math.max(1, e.getPageCount());
|
|
799
|
+
return /* @__PURE__ */ U("div", { children: /* @__PURE__ */ W(A, {
|
|
369
800
|
size: "sm",
|
|
370
801
|
className: "z-0",
|
|
371
802
|
children: [
|
|
372
|
-
r && /* @__PURE__ */
|
|
803
|
+
r && /* @__PURE__ */ U(k, {
|
|
373
804
|
size: "sm",
|
|
374
805
|
variant: "primary",
|
|
375
806
|
children: a("Page {{page}} of {{total}}", {
|
|
@@ -377,24 +808,24 @@ var Ue = ({ table: e, isFetching: t = !1, fileName: n, showPageNumber: r = !1, s
|
|
|
377
808
|
total: o
|
|
378
809
|
})
|
|
379
810
|
}),
|
|
380
|
-
t ? Z(a("Refreshing Data"), /* @__PURE__ */
|
|
811
|
+
t ? Z(a("Refreshing Data"), /* @__PURE__ */ U(k, {
|
|
381
812
|
size: "sm",
|
|
382
813
|
variant: "primary",
|
|
383
|
-
children: /* @__PURE__ */
|
|
384
|
-
})) : Z(a("Data Loaded: {{date}}", { date:
|
|
814
|
+
children: /* @__PURE__ */ U("i", { className: "fas fa-sync fa-spin" })
|
|
815
|
+
})) : Z(a("Data Loaded: {{date}}", { date: Ue((/* @__PURE__ */ new Date()).toISOString()) }), /* @__PURE__ */ U(k, {
|
|
385
816
|
size: "sm",
|
|
386
817
|
variant: "primary",
|
|
387
|
-
children: /* @__PURE__ */
|
|
818
|
+
children: /* @__PURE__ */ U("i", { className: "far fa-check-circle" })
|
|
388
819
|
})),
|
|
389
|
-
i && /* @__PURE__ */
|
|
820
|
+
i && /* @__PURE__ */ U(k, {
|
|
390
821
|
size: "sm",
|
|
391
822
|
variant: "primary",
|
|
392
|
-
onClick: () =>
|
|
823
|
+
onClick: () => Ve(e, n ?? "ExportedData.csv"),
|
|
393
824
|
children: a("Export Table to CSV")
|
|
394
825
|
})
|
|
395
826
|
]
|
|
396
827
|
}) });
|
|
397
|
-
},
|
|
828
|
+
}, Xe = C({
|
|
398
829
|
columnFilteringFeature: o,
|
|
399
830
|
columnFacetingFeature: a,
|
|
400
831
|
columnSizingFeature: s,
|
|
@@ -410,27 +841,27 @@ var Ue = ({ table: e, isFetching: t = !1, fileName: n, showPageNumber: r = !1, s
|
|
|
410
841
|
facetedMinMaxValues: u(),
|
|
411
842
|
filterFns: g,
|
|
412
843
|
sortFns: S
|
|
413
|
-
}),
|
|
844
|
+
}), Ze = () => l(), Qe = ({ message: e, className: t = "", spinnerClassName: n = "" } = {}) => /* @__PURE__ */ W("div", {
|
|
414
845
|
className: `d-flex flex-column align-items-center justify-content-center ${t}`,
|
|
415
|
-
children: [/* @__PURE__ */
|
|
846
|
+
children: [/* @__PURE__ */ U("div", {
|
|
416
847
|
className: `spinner-border text-info ${n}`,
|
|
417
848
|
role: "status",
|
|
418
|
-
children: /* @__PURE__ */
|
|
849
|
+
children: /* @__PURE__ */ U("span", {
|
|
419
850
|
className: "visually-hidden",
|
|
420
851
|
children: "Loading..."
|
|
421
852
|
})
|
|
422
|
-
}), e && /* @__PURE__ */
|
|
423
|
-
}),
|
|
853
|
+
}), e && /* @__PURE__ */ U("span", { children: e })]
|
|
854
|
+
}), $e = "aa-table-message text-center py-5 px-3", et = ({ isFetching: e = !1, isLoading: t = !1, loadingText: n, serverPagination: r, isError: a = !1, debugTable: o = !1, data: s = [], columns: c, initialState: l = void 0, exportFileName: u = void 0, variant: d = "default", emptyText: f, emptyState: p, toolbar: m, footer: h, showFooter: g = !1, className: y, tableClassName: b, headerClassName: x, bodyClassName: S, rowClassName: C, footClassName: w, footerClassName: T, pageSizeOptions: ie = [
|
|
424
855
|
10,
|
|
425
856
|
25,
|
|
426
857
|
50,
|
|
427
858
|
100
|
|
428
859
|
], getRowClassName: D, enableFilters: ae = !0, rowSelection: O, onRowSelectionChange: oe, enableRowSelection: se, getRowId: ce, onRowClick: A }) => {
|
|
429
|
-
let le = i(), { t: j } =
|
|
860
|
+
let le = i(), { t: j } = V(q), M = r && {
|
|
430
861
|
pageIndex: r.page - 1,
|
|
431
862
|
pageSize: r.pageSize
|
|
432
863
|
}, N = ee({
|
|
433
|
-
features:
|
|
864
|
+
features: Xe,
|
|
434
865
|
data: s,
|
|
435
866
|
columns: c,
|
|
436
867
|
getRowId: ce,
|
|
@@ -459,55 +890,55 @@ var Ue = ({ table: e, isFetching: t = !1, fileName: n, showPageNumber: r = !1, s
|
|
|
459
890
|
...l?.pagination
|
|
460
891
|
}
|
|
461
892
|
}
|
|
462
|
-
}), { rows: F } = N.getRowModel(), I = u === void 0 ? `ExportedData_${le.pathname}` : u, L = d === "light", { pageIndex:
|
|
463
|
-
return /* @__PURE__ */
|
|
893
|
+
}), { rows: F } = N.getRowModel(), I = u === void 0 ? `ExportedData_${le.pathname}` : u, L = d === "light", { pageIndex: R, pageSize: ue } = N.state.pagination, z = N.getPageCount(), B = N.getVisibleLeafColumns().length;
|
|
894
|
+
return /* @__PURE__ */ W("div", {
|
|
464
895
|
className: `aa-table-shell mt-2 ${L ? "aa-table-shell-light aa-table-light" : ""} ${y ?? ""}`,
|
|
465
896
|
children: [
|
|
466
897
|
m,
|
|
467
|
-
/* @__PURE__ */
|
|
898
|
+
/* @__PURE__ */ U("div", {
|
|
468
899
|
className: `aa-table-scroll ${t && F.length > 0 ? "opacity-50 pe-none" : ""}`,
|
|
469
900
|
"aria-busy": t,
|
|
470
|
-
children: /* @__PURE__ */
|
|
901
|
+
children: /* @__PURE__ */ W("table", {
|
|
471
902
|
className: `aa-table w-100 text-start ${L ? "aa-table-light" : ""} ${b ?? ""}`,
|
|
472
903
|
children: [
|
|
473
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ U("thead", {
|
|
474
905
|
className: `aa-table-head ${x ?? ""}`,
|
|
475
|
-
children: /* @__PURE__ */
|
|
906
|
+
children: /* @__PURE__ */ U(Be, {
|
|
476
907
|
table: N,
|
|
477
908
|
enableFilters: ae
|
|
478
909
|
})
|
|
479
910
|
}),
|
|
480
|
-
/* @__PURE__ */
|
|
911
|
+
/* @__PURE__ */ U("tbody", {
|
|
481
912
|
className: `aa-table-body ${S ?? ""}`,
|
|
482
|
-
children: a ? /* @__PURE__ */
|
|
913
|
+
children: a ? /* @__PURE__ */ U("tr", { children: /* @__PURE__ */ U("td", {
|
|
483
914
|
colSpan: B,
|
|
484
|
-
className:
|
|
915
|
+
className: $e,
|
|
485
916
|
children: j("Something went wrong.")
|
|
486
|
-
}) }) : t && F.length === 0 ? /* @__PURE__ */
|
|
917
|
+
}) }) : t && F.length === 0 ? /* @__PURE__ */ U("tr", { children: /* @__PURE__ */ U("td", {
|
|
487
918
|
colSpan: B,
|
|
488
|
-
className:
|
|
489
|
-
children: /* @__PURE__ */
|
|
490
|
-
}) }) : F.length === 0 ? /* @__PURE__ */
|
|
919
|
+
className: $e,
|
|
920
|
+
children: /* @__PURE__ */ U(Qe, { message: n })
|
|
921
|
+
}) }) : F.length === 0 ? /* @__PURE__ */ U("tr", { children: /* @__PURE__ */ U("td", {
|
|
491
922
|
colSpan: B,
|
|
492
|
-
className:
|
|
923
|
+
className: $e,
|
|
493
924
|
children: p ?? f ?? j("No Data Available")
|
|
494
|
-
}) }) : F.map((e) => /* @__PURE__ */
|
|
925
|
+
}) }) : F.map((e) => /* @__PURE__ */ U("tr", {
|
|
495
926
|
onClick: A ? () => A(e) : void 0,
|
|
496
927
|
className: `aa-table-row ${D ? D(e) : "aa-table-row-hover"} ${C ?? ""}`,
|
|
497
928
|
children: e.getVisibleCells().map((e) => {
|
|
498
929
|
let t = e.column.columnDef.meta?.align === "right";
|
|
499
|
-
return /* @__PURE__ */
|
|
930
|
+
return /* @__PURE__ */ U("td", {
|
|
500
931
|
className: `aa-table-cell align-middle ${t ? "text-end" : ""}`,
|
|
501
932
|
children: _(e.column.columnDef.cell, e.getContext())
|
|
502
933
|
}, e.id);
|
|
503
934
|
})
|
|
504
935
|
}, e.id))
|
|
505
936
|
}),
|
|
506
|
-
g && !a && F.length > 0 && /* @__PURE__ */
|
|
937
|
+
g && !a && F.length > 0 && /* @__PURE__ */ U("tfoot", {
|
|
507
938
|
className: `aa-table-foot ${w ?? ""}`,
|
|
508
|
-
children: N.getFooterGroups().map((e) => /* @__PURE__ */
|
|
939
|
+
children: N.getFooterGroups().map((e) => /* @__PURE__ */ U("tr", { children: e.headers.map((e) => {
|
|
509
940
|
let t = e.column.columnDef.meta?.align === "right";
|
|
510
|
-
return /* @__PURE__ */
|
|
941
|
+
return /* @__PURE__ */ U("td", {
|
|
511
942
|
colSpan: e.colSpan,
|
|
512
943
|
className: `aa-table-cell align-middle ${t ? "text-end" : ""}`,
|
|
513
944
|
children: e.isPlaceholder ? null : _(e.column.columnDef.footer, e.getContext())
|
|
@@ -517,34 +948,34 @@ var Ue = ({ table: e, isFetching: t = !1, fileName: n, showPageNumber: r = !1, s
|
|
|
517
948
|
]
|
|
518
949
|
})
|
|
519
950
|
}),
|
|
520
|
-
/* @__PURE__ */
|
|
951
|
+
/* @__PURE__ */ W("div", {
|
|
521
952
|
className: `aa-table-footer d-flex flex-column flex-md-row align-items-center justify-content-between gap-3 p-3 ${T ?? ""}`,
|
|
522
953
|
children: [
|
|
523
|
-
/* @__PURE__ */
|
|
954
|
+
/* @__PURE__ */ W("div", {
|
|
524
955
|
className: "d-flex align-items-center justify-content-between gap-3 align-self-stretch align-self-md-auto",
|
|
525
|
-
children: [/* @__PURE__ */
|
|
956
|
+
children: [/* @__PURE__ */ W("div", {
|
|
526
957
|
className: "d-flex align-items-center gap-3",
|
|
527
|
-
children: [/* @__PURE__ */
|
|
958
|
+
children: [/* @__PURE__ */ W("div", {
|
|
528
959
|
className: "d-flex align-items-center gap-2",
|
|
529
|
-
children: [/* @__PURE__ */
|
|
960
|
+
children: [/* @__PURE__ */ U("span", { children: j("Page Size:") }), /* @__PURE__ */ W(P.Select, {
|
|
530
961
|
size: "sm",
|
|
531
|
-
value:
|
|
962
|
+
value: ue,
|
|
532
963
|
disabled: t,
|
|
533
964
|
onChange: (e) => N.setPageSize(Number(e.target.value)),
|
|
534
965
|
className: "aa-table-select w-auto",
|
|
535
|
-
children: [
|
|
966
|
+
children: [ie.map((e) => /* @__PURE__ */ U("option", {
|
|
536
967
|
value: e,
|
|
537
968
|
children: e
|
|
538
|
-
}, e)), !r && /* @__PURE__ */
|
|
969
|
+
}, e)), !r && /* @__PURE__ */ U("option", {
|
|
539
970
|
value: 1e6,
|
|
540
971
|
children: j("Show All")
|
|
541
972
|
})]
|
|
542
973
|
})]
|
|
543
|
-
}), r && /* @__PURE__ */
|
|
974
|
+
}), r && /* @__PURE__ */ U("span", {
|
|
544
975
|
className: "aa-table-total",
|
|
545
976
|
children: r.totalText ?? j("Total: {{total}}", { total: r.total.toLocaleString() })
|
|
546
977
|
})]
|
|
547
|
-
}), /* @__PURE__ */
|
|
978
|
+
}), /* @__PURE__ */ U(Ye, {
|
|
548
979
|
table: N,
|
|
549
980
|
isFetching: e,
|
|
550
981
|
fileName: I,
|
|
@@ -552,72 +983,72 @@ var Ue = ({ table: e, isFetching: t = !1, fileName: n, showPageNumber: r = !1, s
|
|
|
552
983
|
showExport: !r
|
|
553
984
|
})]
|
|
554
985
|
}),
|
|
555
|
-
z > 1 && /* @__PURE__ */
|
|
986
|
+
z > 1 && /* @__PURE__ */ W("div", {
|
|
556
987
|
className: "d-flex align-items-center gap-2",
|
|
557
988
|
children: [
|
|
558
|
-
/* @__PURE__ */
|
|
989
|
+
/* @__PURE__ */ U(k, {
|
|
559
990
|
size: "sm",
|
|
560
991
|
disabled: t || !N.getCanPreviousPage(),
|
|
561
992
|
onClick: () => N.setPageIndex(0),
|
|
562
993
|
className: "aa-table-page-button",
|
|
563
994
|
title: j("First Page"),
|
|
564
|
-
children: /* @__PURE__ */
|
|
995
|
+
children: /* @__PURE__ */ U(E, { className: "aa-table-page-icon" })
|
|
565
996
|
}),
|
|
566
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ U(k, {
|
|
567
998
|
size: "sm",
|
|
568
999
|
disabled: t || !N.getCanPreviousPage(),
|
|
569
1000
|
onClick: () => N.previousPage(),
|
|
570
1001
|
className: "aa-table-page-button",
|
|
571
1002
|
title: j("Previous Page"),
|
|
572
|
-
children: /* @__PURE__ */
|
|
1003
|
+
children: /* @__PURE__ */ U(ne, { className: "aa-table-page-icon" })
|
|
573
1004
|
}),
|
|
574
|
-
/* @__PURE__ */
|
|
1005
|
+
/* @__PURE__ */ U("span", {
|
|
575
1006
|
className: "aa-table-page-number px-2 fw-bold",
|
|
576
1007
|
children: j("Page {{page}} of {{total}}", {
|
|
577
|
-
page:
|
|
1008
|
+
page: R + 1,
|
|
578
1009
|
total: z
|
|
579
1010
|
})
|
|
580
1011
|
}),
|
|
581
|
-
/* @__PURE__ */
|
|
1012
|
+
/* @__PURE__ */ U(k, {
|
|
582
1013
|
size: "sm",
|
|
583
1014
|
disabled: t || !N.getCanNextPage(),
|
|
584
1015
|
onClick: () => N.nextPage(),
|
|
585
1016
|
className: "aa-table-page-button",
|
|
586
1017
|
title: j("Next Page"),
|
|
587
|
-
children: /* @__PURE__ */
|
|
1018
|
+
children: /* @__PURE__ */ U(re, { className: "aa-table-page-icon" })
|
|
588
1019
|
}),
|
|
589
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ U(k, {
|
|
590
1021
|
size: "sm",
|
|
591
1022
|
disabled: t || !N.getCanNextPage(),
|
|
592
1023
|
onClick: () => N.setPageIndex(z - 1),
|
|
593
1024
|
className: "aa-table-page-button",
|
|
594
1025
|
title: j("Last Page"),
|
|
595
|
-
children: /* @__PURE__ */
|
|
1026
|
+
children: /* @__PURE__ */ U(te, { className: "aa-table-page-icon" })
|
|
596
1027
|
})
|
|
597
1028
|
]
|
|
598
1029
|
}),
|
|
599
|
-
h && /* @__PURE__ */
|
|
1030
|
+
h && /* @__PURE__ */ U("div", {
|
|
600
1031
|
className: "w-100",
|
|
601
1032
|
children: h
|
|
602
1033
|
})
|
|
603
1034
|
]
|
|
604
1035
|
}),
|
|
605
|
-
o && /* @__PURE__ */
|
|
1036
|
+
o && /* @__PURE__ */ W("div", {
|
|
606
1037
|
className: "p-3",
|
|
607
|
-
children: [/* @__PURE__ */
|
|
1038
|
+
children: [/* @__PURE__ */ U("div", { children: j("{{count}} Rows", { count: N.getRowModel().rows.length }) }), /* @__PURE__ */ U("pre", { children: JSON.stringify(N.state, null, 2) })]
|
|
608
1039
|
})
|
|
609
1040
|
]
|
|
610
1041
|
});
|
|
611
1042
|
};
|
|
612
1043
|
// src/Components/Base/BaseTable/BaseTableForm.tsx
|
|
613
|
-
function
|
|
614
|
-
let { t } =
|
|
615
|
-
return /* @__PURE__ */
|
|
1044
|
+
function tt({ table: e }) {
|
|
1045
|
+
let { t } = V(q);
|
|
1046
|
+
return /* @__PURE__ */ W("div", {
|
|
616
1047
|
className: "d-flex align-items-center ms-2",
|
|
617
|
-
children: [/* @__PURE__ */
|
|
1048
|
+
children: [/* @__PURE__ */ U(P.Label, {
|
|
618
1049
|
className: "m-0 me-2 text-nowrap",
|
|
619
1050
|
children: t("Page Size:")
|
|
620
|
-
}), /* @__PURE__ */
|
|
1051
|
+
}), /* @__PURE__ */ U(P.Select, {
|
|
621
1052
|
className: "w-auto",
|
|
622
1053
|
value: e.atoms.pagination.get().pageSize,
|
|
623
1054
|
onChange: (t) => e.setPageSize(Number(t.target.value)),
|
|
@@ -627,7 +1058,7 @@ function Ye({ table: e }) {
|
|
|
627
1058
|
60,
|
|
628
1059
|
100,
|
|
629
1060
|
1e6
|
|
630
|
-
].map((e) => /* @__PURE__ */
|
|
1061
|
+
].map((e) => /* @__PURE__ */ U("option", {
|
|
631
1062
|
value: e,
|
|
632
1063
|
children: e === 1e6 ? t("Show All") : t("Show {{pageSize}}", { pageSize: e })
|
|
633
1064
|
}, e))
|
|
@@ -635,41 +1066,41 @@ function Ye({ table: e }) {
|
|
|
635
1066
|
});
|
|
636
1067
|
}
|
|
637
1068
|
// src/Components/Base/BaseTable/BaseTableToolbar.tsx
|
|
638
|
-
var
|
|
1069
|
+
var nt = ({ table: e }) => /* @__PURE__ */ W(le, { children: [/* @__PURE__ */ W(A, {
|
|
639
1070
|
className: "z-0",
|
|
640
1071
|
children: [
|
|
641
|
-
/* @__PURE__ */
|
|
1072
|
+
/* @__PURE__ */ U(k, {
|
|
642
1073
|
variant: "success",
|
|
643
1074
|
onClick: () => e.setPageIndex(0),
|
|
644
1075
|
disabled: !e.getCanPreviousPage(),
|
|
645
|
-
children: /* @__PURE__ */
|
|
1076
|
+
children: /* @__PURE__ */ U("i", { className: "fas fa-angle-double-left" })
|
|
646
1077
|
}),
|
|
647
|
-
/* @__PURE__ */
|
|
1078
|
+
/* @__PURE__ */ U(k, {
|
|
648
1079
|
variant: "success",
|
|
649
1080
|
onClick: () => e.previousPage(),
|
|
650
1081
|
disabled: !e.getCanPreviousPage(),
|
|
651
|
-
children: /* @__PURE__ */
|
|
1082
|
+
children: /* @__PURE__ */ U("i", { className: "fas fa-caret-left" })
|
|
652
1083
|
}),
|
|
653
|
-
/* @__PURE__ */
|
|
1084
|
+
/* @__PURE__ */ U(k, {
|
|
654
1085
|
variant: "success",
|
|
655
1086
|
onClick: () => e.nextPage(),
|
|
656
1087
|
disabled: !e.getCanNextPage(),
|
|
657
|
-
children: /* @__PURE__ */
|
|
1088
|
+
children: /* @__PURE__ */ U("i", { className: "fas fa-caret-right" })
|
|
658
1089
|
}),
|
|
659
|
-
/* @__PURE__ */
|
|
1090
|
+
/* @__PURE__ */ U(k, {
|
|
660
1091
|
variant: "success",
|
|
661
1092
|
onClick: () => e.setPageIndex(e.getPageCount() - 1),
|
|
662
1093
|
disabled: !e.getCanNextPage(),
|
|
663
|
-
children: /* @__PURE__ */
|
|
1094
|
+
children: /* @__PURE__ */ U("i", { className: "fas fa-angle-double-right" })
|
|
664
1095
|
})
|
|
665
1096
|
]
|
|
666
|
-
}), /* @__PURE__ */
|
|
1097
|
+
}), /* @__PURE__ */ U(tt, { table: e })] }), rt = {
|
|
667
1098
|
small: "sm",
|
|
668
1099
|
medium: void 0,
|
|
669
1100
|
large: "lg",
|
|
670
1101
|
extraLarge: "xl"
|
|
671
1102
|
}, Q = {
|
|
672
|
-
size:
|
|
1103
|
+
size: rt.large,
|
|
673
1104
|
centered: !0,
|
|
674
1105
|
scrollable: !1,
|
|
675
1106
|
backdrop: !0,
|
|
@@ -679,8 +1110,8 @@ var Xe = ({ table: e }) => /* @__PURE__ */ H(le, { children: [/* @__PURE__ */ H(
|
|
|
679
1110
|
confirmVariant: "success"
|
|
680
1111
|
};
|
|
681
1112
|
// src/Components/Base/BaseModal/BaseModal.tsx
|
|
682
|
-
function
|
|
683
|
-
let [_, v] =
|
|
1113
|
+
function it({ show: e, onHide: t, onEnter: n, onShow: r, onExited: i, title: a, footer: o, children: s, size: c = Q.size, centered: l = Q.centered, scrollable: u = Q.scrollable, backdrop: d = Q.backdrop, restoreFocus: f = Q.restoreFocus, closeButton: p = Q.closeButton, className: m, bodyClassName: h, titleClassName: g }) {
|
|
1114
|
+
let [_, v] = K({
|
|
684
1115
|
title: a,
|
|
685
1116
|
children: s,
|
|
686
1117
|
footer: o
|
|
@@ -691,7 +1122,7 @@ function Qe({ show: e, onHide: t, onEnter: n, onShow: r, onExited: i, title: a,
|
|
|
691
1122
|
footer: o === void 0 ? _.footer : o
|
|
692
1123
|
});
|
|
693
1124
|
let y = e ? a : _.title ?? a, b = e ? s : _.children ?? s, x = e ? o : _.footer ?? o;
|
|
694
|
-
return /* @__PURE__ */
|
|
1125
|
+
return /* @__PURE__ */ W(F, {
|
|
695
1126
|
show: e,
|
|
696
1127
|
size: c,
|
|
697
1128
|
onHide: t,
|
|
@@ -705,28 +1136,28 @@ function Qe({ show: e, onHide: t, onEnter: n, onShow: r, onExited: i, title: a,
|
|
|
705
1136
|
dialogClassName: m,
|
|
706
1137
|
contentClassName: "aa-react",
|
|
707
1138
|
children: [
|
|
708
|
-
/* @__PURE__ */
|
|
1139
|
+
/* @__PURE__ */ U(F.Header, {
|
|
709
1140
|
closeButton: p,
|
|
710
|
-
children: /* @__PURE__ */
|
|
1141
|
+
children: /* @__PURE__ */ U(F.Title, {
|
|
711
1142
|
className: g,
|
|
712
1143
|
children: y
|
|
713
1144
|
})
|
|
714
1145
|
}),
|
|
715
|
-
/* @__PURE__ */
|
|
1146
|
+
/* @__PURE__ */ U(F.Body, {
|
|
716
1147
|
className: h,
|
|
717
1148
|
children: b
|
|
718
1149
|
}),
|
|
719
|
-
x !== null && /* @__PURE__ */
|
|
1150
|
+
x !== null && /* @__PURE__ */ U(F.Footer, { children: x })
|
|
720
1151
|
]
|
|
721
1152
|
});
|
|
722
1153
|
}
|
|
723
|
-
function
|
|
724
|
-
let { t: l } =
|
|
1154
|
+
function at({ show: e, onHide: t, title: n, children: r, footer: i, hideFooter: a = !1, closeText: o, closeVariant: s = Q.closeVariant, ...c }) {
|
|
1155
|
+
let { t: l } = V(q), u = /* @__PURE__ */ U(k, {
|
|
725
1156
|
variant: s,
|
|
726
1157
|
onClick: t,
|
|
727
1158
|
children: o ?? l("Close")
|
|
728
1159
|
});
|
|
729
|
-
return /* @__PURE__ */
|
|
1160
|
+
return /* @__PURE__ */ U(it, {
|
|
730
1161
|
...c,
|
|
731
1162
|
show: e,
|
|
732
1163
|
onHide: t,
|
|
@@ -735,18 +1166,18 @@ function $e({ show: e, onHide: t, title: n, children: r, footer: i, hideFooter:
|
|
|
735
1166
|
children: r
|
|
736
1167
|
});
|
|
737
1168
|
}
|
|
738
|
-
function
|
|
739
|
-
let { t: g } =
|
|
1169
|
+
function ot({ 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 = Q.closeVariant, children: f, onEnter: p, onExited: m, ...h }) {
|
|
1170
|
+
let { t: g } = V(q), [_, v] = K(null), [y, b] = K(o ?? {}), [x, S] = K(!1), [C, ee] = K(e);
|
|
740
1171
|
t && e && e !== C && ee(e);
|
|
741
1172
|
let w = t ? e : e ?? C, T = () => {
|
|
742
1173
|
v(null), b(o ?? {}), S(!1);
|
|
743
|
-
},
|
|
1174
|
+
}, E = () => {
|
|
744
1175
|
n(!1);
|
|
745
|
-
},
|
|
1176
|
+
}, te = () => {
|
|
746
1177
|
T(), p?.();
|
|
747
|
-
},
|
|
1178
|
+
}, ne = () => {
|
|
748
1179
|
T(), m?.();
|
|
749
|
-
},
|
|
1180
|
+
}, re = async () => {
|
|
750
1181
|
if (a && !a(y)) S(!0);
|
|
751
1182
|
else try {
|
|
752
1183
|
await r({
|
|
@@ -756,54 +1187,54 @@ function et({ data: e, showModal: t, setShowModal: n, onApprove: r, isPending: i
|
|
|
756
1187
|
} catch (e) {
|
|
757
1188
|
v(e instanceof Error ? e.message : "An unexpected error occurred.");
|
|
758
1189
|
}
|
|
759
|
-
},
|
|
1190
|
+
}, ie = typeof f == "function" ? f({
|
|
760
1191
|
formData: y,
|
|
761
1192
|
onChange: b
|
|
762
|
-
}) : f, D = /* @__PURE__ */ H
|
|
1193
|
+
}) : f, D = /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(k, {
|
|
763
1194
|
variant: l ?? w.color ?? Q.confirmVariant,
|
|
764
1195
|
disabled: i,
|
|
765
|
-
onClick:
|
|
1196
|
+
onClick: re,
|
|
766
1197
|
children: i ? g("Loading…") : c || w.buttonText || g("Confirm")
|
|
767
|
-
}), /* @__PURE__ */
|
|
1198
|
+
}), /* @__PURE__ */ U(k, {
|
|
768
1199
|
variant: d,
|
|
769
|
-
onClick:
|
|
1200
|
+
onClick: E,
|
|
770
1201
|
children: u ?? g("Close")
|
|
771
1202
|
})] });
|
|
772
|
-
return /* @__PURE__ */
|
|
1203
|
+
return /* @__PURE__ */ W(it, {
|
|
773
1204
|
...h,
|
|
774
1205
|
show: t,
|
|
775
|
-
onHide:
|
|
776
|
-
onEnter:
|
|
777
|
-
onExited:
|
|
1206
|
+
onHide: E,
|
|
1207
|
+
onEnter: te,
|
|
1208
|
+
onExited: ne,
|
|
778
1209
|
title: s ?? w.title,
|
|
779
1210
|
footer: D,
|
|
780
|
-
children: [_ && /* @__PURE__ */
|
|
1211
|
+
children: [_ && /* @__PURE__ */ U(ce, {
|
|
781
1212
|
variant: "danger",
|
|
782
1213
|
onClose: () => v(null),
|
|
783
1214
|
dismissible: !0,
|
|
784
1215
|
children: _
|
|
785
|
-
}), /* @__PURE__ */
|
|
1216
|
+
}), /* @__PURE__ */ U("div", {
|
|
786
1217
|
className: x ? "was-validated" : "",
|
|
787
|
-
children:
|
|
1218
|
+
children: ie
|
|
788
1219
|
})]
|
|
789
1220
|
});
|
|
790
1221
|
}
|
|
791
|
-
function
|
|
792
|
-
return e.variant === "confirm" || "showModal" in e || "data" in e ? /* @__PURE__ */
|
|
1222
|
+
function st(e) {
|
|
1223
|
+
return e.variant === "confirm" || "showModal" in e || "data" in e ? /* @__PURE__ */ U(ot, { ...e }) : /* @__PURE__ */ U(at, { ...e });
|
|
793
1224
|
}
|
|
794
1225
|
// src/Components/Base/BaseModal/BaseModalQuery.tsx
|
|
795
|
-
function
|
|
1226
|
+
function ct() {
|
|
796
1227
|
let t = e.get("csrftoken");
|
|
797
1228
|
return t ? { "X-CSRFToken": t } : {};
|
|
798
1229
|
}
|
|
799
|
-
function
|
|
800
|
-
let t =
|
|
801
|
-
return
|
|
1230
|
+
function lt(e) {
|
|
1231
|
+
let t = xe();
|
|
1232
|
+
return ye({
|
|
802
1233
|
mutationFn: async (e) => {
|
|
803
1234
|
let t = await fetch(e, {
|
|
804
1235
|
method: "POST",
|
|
805
1236
|
credentials: "same-origin",
|
|
806
|
-
headers:
|
|
1237
|
+
headers: ct()
|
|
807
1238
|
}), n = await t.json();
|
|
808
1239
|
if (!t.ok || n.success !== !0) throw Error(n.message ?? "Unknown error");
|
|
809
1240
|
return n;
|
|
@@ -819,9 +1250,9 @@ function rt(e) {
|
|
|
819
1250
|
}
|
|
820
1251
|
});
|
|
821
1252
|
}
|
|
822
|
-
function
|
|
823
|
-
let t =
|
|
824
|
-
return
|
|
1253
|
+
function ut(e) {
|
|
1254
|
+
let t = xe();
|
|
1255
|
+
return ye({
|
|
825
1256
|
mutationFn: async ({ url: e, formData: t = {} }) => {
|
|
826
1257
|
let n = new URLSearchParams();
|
|
827
1258
|
for (let [e, r] of Object.entries(t)) typeof r == "boolean" ? r && n.append(e, "on") : n.append(e, r);
|
|
@@ -829,7 +1260,7 @@ function it(e) {
|
|
|
829
1260
|
method: "POST",
|
|
830
1261
|
credentials: "same-origin",
|
|
831
1262
|
headers: {
|
|
832
|
-
...
|
|
1263
|
+
...ct(),
|
|
833
1264
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
834
1265
|
},
|
|
835
1266
|
body: n.toString()
|
|
@@ -849,16 +1280,16 @@ function it(e) {
|
|
|
849
1280
|
});
|
|
850
1281
|
}
|
|
851
1282
|
// src/Components/Base/BaseModal/useModalState.ts
|
|
852
|
-
function
|
|
853
|
-
let [n, r] =
|
|
1283
|
+
function dt(e = "modal", t = "id") {
|
|
1284
|
+
let [n, r] = Se(e, {
|
|
854
1285
|
clearOnDefault: !0,
|
|
855
1286
|
defaultValue: ""
|
|
856
|
-
}), [i, a] =
|
|
1287
|
+
}), [i, a] = Se(t, {
|
|
857
1288
|
clearOnDefault: !0,
|
|
858
1289
|
defaultValue: ""
|
|
859
|
-
}), o =
|
|
1290
|
+
}), o = G((e, t) => {
|
|
860
1291
|
r(e), t !== void 0 && a(t);
|
|
861
|
-
}, [r, a]), s =
|
|
1292
|
+
}, [r, a]), s = G(() => {
|
|
862
1293
|
r(""), a("");
|
|
863
1294
|
}, [r, a]);
|
|
864
1295
|
return {
|
|
@@ -870,17 +1301,17 @@ function at(e = "modal", t = "id") {
|
|
|
870
1301
|
};
|
|
871
1302
|
}
|
|
872
1303
|
// src/Components/Base/Loader/ErrorLoader.tsx
|
|
873
|
-
var
|
|
1304
|
+
var ft = ({ message: e, title: t, className: n = "", iconClassName: r = "" } = {}) => /* @__PURE__ */ W("div", {
|
|
874
1305
|
className: `d-flex flex-column align-items-center justify-content-center ${n}`,
|
|
875
1306
|
children: [
|
|
876
|
-
/* @__PURE__ */
|
|
1307
|
+
/* @__PURE__ */ U("span", {
|
|
877
1308
|
className: "aa-shake d-inline-block",
|
|
878
|
-
children: /* @__PURE__ */
|
|
1309
|
+
children: /* @__PURE__ */ U("i", { className: `fas fa-exclamation-triangle text-danger display-1 ${r}` })
|
|
879
1310
|
}),
|
|
880
|
-
t && /* @__PURE__ */
|
|
881
|
-
e && /* @__PURE__ */
|
|
1311
|
+
t && /* @__PURE__ */ U("h3", { children: t }),
|
|
1312
|
+
e && /* @__PURE__ */ U("p", { children: e })
|
|
882
1313
|
]
|
|
883
|
-
}),
|
|
1314
|
+
}), pt = class extends fe {
|
|
884
1315
|
constructor(e) {
|
|
885
1316
|
super(e), this.state = {
|
|
886
1317
|
hasError: !1,
|
|
@@ -899,15 +1330,15 @@ var ot = ({ message: e, title: t, className: n = "", iconClassName: r = "" } = {
|
|
|
899
1330
|
render() {
|
|
900
1331
|
if (this.state.hasError) {
|
|
901
1332
|
let { t: e, traceClassName: t = "" } = this.props;
|
|
902
|
-
return /* @__PURE__ */ H
|
|
903
|
-
/* @__PURE__ */
|
|
1333
|
+
return /* @__PURE__ */ W(H, { children: [
|
|
1334
|
+
/* @__PURE__ */ U(ft, {
|
|
904
1335
|
title: this.state.title,
|
|
905
1336
|
message: this.state.message
|
|
906
1337
|
}),
|
|
907
|
-
/* @__PURE__ */
|
|
908
|
-
/* @__PURE__ */
|
|
1338
|
+
/* @__PURE__ */ U("h1", { children: e("Something went wrong.") }),
|
|
1339
|
+
/* @__PURE__ */ U("div", {
|
|
909
1340
|
className: "d-flex justify-content-center",
|
|
910
|
-
children: /* @__PURE__ */
|
|
1341
|
+
children: /* @__PURE__ */ U("pre", {
|
|
911
1342
|
className: `border mw-100 overflow-auto p-2 ${t}`,
|
|
912
1343
|
"data-testid": "error-boundary-trace",
|
|
913
1344
|
children: this.state.trace
|
|
@@ -917,18 +1348,18 @@ var ot = ({ message: e, title: t, className: n = "", iconClassName: r = "" } = {
|
|
|
917
1348
|
}
|
|
918
1349
|
return this.props.children;
|
|
919
1350
|
}
|
|
920
|
-
},
|
|
1351
|
+
}, mt = de(q)(pt);
|
|
921
1352
|
// src/Components/Base/BaseHeader.tsx
|
|
922
|
-
function
|
|
923
|
-
return /* @__PURE__ */
|
|
1353
|
+
function ht({ name: e = "Header", children: t }) {
|
|
1354
|
+
return /* @__PURE__ */ U(j, {
|
|
924
1355
|
className: "bg-dark border-secondary mb-3 shadow-sm",
|
|
925
|
-
children: /* @__PURE__ */
|
|
1356
|
+
children: /* @__PURE__ */ W(j.Body, {
|
|
926
1357
|
className: "d-flex flex-wrap align-items-center justify-content-between p-3",
|
|
927
|
-
children: [/* @__PURE__ */
|
|
1358
|
+
children: [/* @__PURE__ */ U("h3", {
|
|
928
1359
|
id: "section-heading",
|
|
929
1360
|
className: "h4 mb-0 fw-bold",
|
|
930
1361
|
children: e
|
|
931
|
-
}), t && /* @__PURE__ */
|
|
1362
|
+
}), t && /* @__PURE__ */ U("div", {
|
|
932
1363
|
className: "d-flex flex-wrap align-items-center gap-2",
|
|
933
1364
|
children: t
|
|
934
1365
|
})]
|
|
@@ -936,9 +1367,9 @@ function lt({ name: e = "Header", children: t }) {
|
|
|
936
1367
|
});
|
|
937
1368
|
}
|
|
938
1369
|
// src/Hooks/useCooldown.ts
|
|
939
|
-
function
|
|
940
|
-
let [e, t] =
|
|
941
|
-
return
|
|
1370
|
+
function gt() {
|
|
1371
|
+
let [e, t] = K(0);
|
|
1372
|
+
return he(() => {
|
|
942
1373
|
if (e <= 0) return;
|
|
943
1374
|
let n = setInterval(() => {
|
|
944
1375
|
t((e) => e > 0 ? e - 1 : 0);
|
|
@@ -946,12 +1377,12 @@ function ut() {
|
|
|
946
1377
|
return () => clearInterval(n);
|
|
947
1378
|
}, [e]), {
|
|
948
1379
|
seconds: e,
|
|
949
|
-
start:
|
|
1380
|
+
start: G((e) => t(e), [])
|
|
950
1381
|
};
|
|
951
1382
|
}
|
|
952
|
-
function
|
|
953
|
-
let [e, t] =
|
|
954
|
-
return
|
|
1383
|
+
function _t() {
|
|
1384
|
+
let [e, t] = K({});
|
|
1385
|
+
return he(() => {
|
|
955
1386
|
if (!Object.values(e).some((e) => e > 0)) return;
|
|
956
1387
|
let n = setInterval(() => {
|
|
957
1388
|
t((e) => {
|
|
@@ -963,23 +1394,23 @@ function dt() {
|
|
|
963
1394
|
return () => clearInterval(n);
|
|
964
1395
|
}, [e]), {
|
|
965
1396
|
cooldowns: e,
|
|
966
|
-
start:
|
|
1397
|
+
start: G((e, n) => t((t) => ({
|
|
967
1398
|
...t,
|
|
968
1399
|
[e]: n
|
|
969
1400
|
})), [])
|
|
970
1401
|
};
|
|
971
1402
|
}
|
|
972
1403
|
// src/Hooks/useFeedback.ts
|
|
973
|
-
function
|
|
974
|
-
let [t, n] =
|
|
1404
|
+
function vt(e = 5e3) {
|
|
1405
|
+
let [t, n] = K(null), r = _e(null), i = G(() => {
|
|
975
1406
|
r.current && clearTimeout(r.current), r.current = null, n(null);
|
|
976
|
-
}, []), a =
|
|
1407
|
+
}, []), a = G((t, i) => {
|
|
977
1408
|
r.current && clearTimeout(r.current), n({
|
|
978
1409
|
variant: t,
|
|
979
1410
|
text: i
|
|
980
1411
|
}), r.current = setTimeout(() => n(null), e);
|
|
981
1412
|
}, [e]);
|
|
982
|
-
return
|
|
1413
|
+
return he(() => () => {
|
|
983
1414
|
r.current && clearTimeout(r.current);
|
|
984
1415
|
}, []), {
|
|
985
1416
|
feedback: t,
|
|
@@ -988,9 +1419,11 @@ function ft(e = 5e3) {
|
|
|
988
1419
|
};
|
|
989
1420
|
}
|
|
990
1421
|
// src/Provider.tsx
|
|
991
|
-
var
|
|
992
|
-
function
|
|
993
|
-
let i =
|
|
1422
|
+
var yt = pe(null);
|
|
1423
|
+
function bt({ projectName: e, appName: t, menuRefetchInterval: n, children: r }) {
|
|
1424
|
+
let i = me(z)?.i18n ?? B();
|
|
1425
|
+
K(() => Ne(i));
|
|
1426
|
+
let a = ge(() => ({
|
|
994
1427
|
projectName: e,
|
|
995
1428
|
appName: t,
|
|
996
1429
|
menuRefetchInterval: n
|
|
@@ -999,34 +1432,34 @@ function mt({ projectName: e, appName: t, menuRefetchInterval: n, children: r })
|
|
|
999
1432
|
t,
|
|
1000
1433
|
n
|
|
1001
1434
|
]);
|
|
1002
|
-
return /* @__PURE__ */
|
|
1003
|
-
value:
|
|
1435
|
+
return /* @__PURE__ */ U(yt.Provider, {
|
|
1436
|
+
value: a,
|
|
1004
1437
|
children: r
|
|
1005
1438
|
});
|
|
1006
1439
|
}
|
|
1007
1440
|
function $() {
|
|
1008
|
-
let e = me(
|
|
1441
|
+
let e = me(yt);
|
|
1009
1442
|
if (!e) throw Error("useAaReact must be used inside <AaReactProvider projectName appName>.");
|
|
1010
1443
|
return e;
|
|
1011
1444
|
}
|
|
1012
1445
|
// src/Hooks/useUserData.ts
|
|
1013
|
-
function
|
|
1446
|
+
function xt() {
|
|
1014
1447
|
let { projectName: e } = $();
|
|
1015
|
-
return
|
|
1016
|
-
queryKey:
|
|
1017
|
-
queryFn: () =>
|
|
1448
|
+
return be({
|
|
1449
|
+
queryKey: Oe.User,
|
|
1450
|
+
queryFn: () => De(e),
|
|
1018
1451
|
staleTime: 3e5
|
|
1019
1452
|
});
|
|
1020
1453
|
}
|
|
1021
1454
|
// src/Menu/BaseMenu.tsx
|
|
1022
|
-
var
|
|
1455
|
+
var St = (e, t) => {
|
|
1023
1456
|
let n = t.replace(/^\/+|\/+$/g, "");
|
|
1024
1457
|
return n ? `/${e}/${n}/` : `/${e}/`;
|
|
1025
|
-
},
|
|
1026
|
-
let { t: r } =
|
|
1027
|
-
return /* @__PURE__ */
|
|
1458
|
+
}, Ct = (e, t, n) => t === n ? e === n : e.startsWith(t), wt = [q, je], Tt = ({ link: e, toPath: t }) => {
|
|
1459
|
+
let { t: r } = V(q), a = i(), o = Ct(a.pathname, t(e.link ?? ""), t(""));
|
|
1460
|
+
return /* @__PURE__ */ U(I.Item, {
|
|
1028
1461
|
as: "li",
|
|
1029
|
-
children: /* @__PURE__ */
|
|
1462
|
+
children: /* @__PURE__ */ W(I.Link, {
|
|
1030
1463
|
as: n,
|
|
1031
1464
|
to: {
|
|
1032
1465
|
pathname: t(e.link ?? ""),
|
|
@@ -1036,33 +1469,33 @@ var gt = (e, t) => {
|
|
|
1036
1469
|
active: o,
|
|
1037
1470
|
className: "aa-nav-danger d-flex align-items-center gap-1",
|
|
1038
1471
|
"data-testid": "administration-nav-link",
|
|
1039
|
-
children: [/* @__PURE__ */
|
|
1472
|
+
children: [/* @__PURE__ */ U(O, {
|
|
1040
1473
|
size: 15,
|
|
1041
1474
|
className: "text-danger flex-shrink-0"
|
|
1042
|
-
}), /* @__PURE__ */
|
|
1043
|
-
ns:
|
|
1475
|
+
}), /* @__PURE__ */ U("span", { children: r(e.name, {
|
|
1476
|
+
ns: wt,
|
|
1044
1477
|
defaultValue: e.name
|
|
1045
1478
|
}) })]
|
|
1046
1479
|
}, e.name)
|
|
1047
1480
|
});
|
|
1048
|
-
},
|
|
1049
|
-
let { t: r } =
|
|
1050
|
-
ns:
|
|
1481
|
+
}, Et = ({ link: e, toPath: t }) => {
|
|
1482
|
+
let { t: r } = V(q), a = i(), o = Ct(a.pathname, t(e.link ?? ""), t("")), s = r(e.name, {
|
|
1483
|
+
ns: wt,
|
|
1051
1484
|
defaultValue: e.name
|
|
1052
1485
|
});
|
|
1053
|
-
return e.is_external || e.link?.startsWith("http://") || e.link?.startsWith("https://") ? /* @__PURE__ */
|
|
1486
|
+
return e.is_external || e.link?.startsWith("http://") || e.link?.startsWith("https://") ? /* @__PURE__ */ U(I.Item, {
|
|
1054
1487
|
as: "li",
|
|
1055
|
-
children: /* @__PURE__ */
|
|
1488
|
+
children: /* @__PURE__ */ U(I.Link, {
|
|
1056
1489
|
href: e.link ?? "#",
|
|
1057
1490
|
id: e.name,
|
|
1058
1491
|
children: s
|
|
1059
1492
|
}, e.name)
|
|
1060
|
-
}) : e.link?.replace(/^\/+|\/+$/g, "") === "administration" || e.name.toLowerCase() === "administration" ? /* @__PURE__ */
|
|
1493
|
+
}) : e.link?.replace(/^\/+|\/+$/g, "") === "administration" || e.name.toLowerCase() === "administration" ? /* @__PURE__ */ U(Tt, {
|
|
1061
1494
|
link: e,
|
|
1062
1495
|
toPath: t
|
|
1063
|
-
}) : /* @__PURE__ */
|
|
1496
|
+
}) : /* @__PURE__ */ U(I.Item, {
|
|
1064
1497
|
as: "li",
|
|
1065
|
-
children: /* @__PURE__ */
|
|
1498
|
+
children: /* @__PURE__ */ W(I.Link, {
|
|
1066
1499
|
as: n,
|
|
1067
1500
|
to: {
|
|
1068
1501
|
pathname: t(e.link ?? ""),
|
|
@@ -1070,25 +1503,25 @@ var gt = (e, t) => {
|
|
|
1070
1503
|
},
|
|
1071
1504
|
id: e.name,
|
|
1072
1505
|
active: o,
|
|
1073
|
-
children: [s, e.badge ? /* @__PURE__ */
|
|
1506
|
+
children: [s, e.badge ? /* @__PURE__ */ U("span", {
|
|
1074
1507
|
className: `badge bg-danger ms-1 ${e.has_errors ? "aa-menu-badge-pulse" : ""}`,
|
|
1075
1508
|
children: e.badge
|
|
1076
1509
|
}) : null]
|
|
1077
1510
|
}, e.name)
|
|
1078
1511
|
});
|
|
1079
|
-
},
|
|
1080
|
-
let { projectName: t } = $(), n = (e) =>
|
|
1081
|
-
return /* @__PURE__ */
|
|
1512
|
+
}, Dt = ({ data: e }) => {
|
|
1513
|
+
let { projectName: t } = $(), n = (e) => St(t, e), r = Array.isArray(e) ? e.filter((e) => !!e.link) : [];
|
|
1514
|
+
return /* @__PURE__ */ U(H, { children: r.map((e) => /* @__PURE__ */ U(Et, {
|
|
1082
1515
|
link: e,
|
|
1083
1516
|
toPath: n
|
|
1084
1517
|
}, e.link)) });
|
|
1085
|
-
},
|
|
1518
|
+
}, Ot = (e) => /* @__PURE__ */ U(Dt, { ...e }), kt = (e) => /* @__PURE__ */ U(Dt, { ...e });
|
|
1086
1519
|
// src/Menu/Hooks/useMenu.ts
|
|
1087
|
-
function
|
|
1520
|
+
function At() {
|
|
1088
1521
|
let { projectName: e, menuRefetchInterval: t } = $();
|
|
1089
|
-
return
|
|
1090
|
-
queryKey:
|
|
1091
|
-
queryFn: () =>
|
|
1522
|
+
return be({
|
|
1523
|
+
queryKey: Oe.Menu,
|
|
1524
|
+
queryFn: () => Ee(e),
|
|
1092
1525
|
staleTime: 3e5,
|
|
1093
1526
|
retry: 1,
|
|
1094
1527
|
refetchOnWindowFocus: !1,
|
|
@@ -1096,94 +1529,94 @@ function wt() {
|
|
|
1096
1529
|
});
|
|
1097
1530
|
}
|
|
1098
1531
|
// src/Menu/AuthLeftMenuAsync.tsx
|
|
1099
|
-
var
|
|
1100
|
-
let e = typeof document < "u" ? document.getElementById("nav-left") : null, { data: t, isLoading: n, isError: r } =
|
|
1101
|
-
return !e || !t?.left_links ? /* @__PURE__ */
|
|
1532
|
+
var jt = () => {
|
|
1533
|
+
let e = typeof document < "u" ? document.getElementById("nav-left") : null, { data: t, isLoading: n, isError: r } = At();
|
|
1534
|
+
return !e || !t?.left_links ? /* @__PURE__ */ U(H, {}) : Ce.createPortal(/* @__PURE__ */ U(Ot, {
|
|
1102
1535
|
error: r,
|
|
1103
1536
|
isLoading: n,
|
|
1104
1537
|
data: t.left_links
|
|
1105
1538
|
}), e);
|
|
1106
|
-
},
|
|
1107
|
-
let e = typeof document < "u" ? document.getElementById("nav-right") : null, { data: t, isLoading: n, isError: r } =
|
|
1108
|
-
return !e || !t?.right_links ? /* @__PURE__ */
|
|
1539
|
+
}, Mt = () => {
|
|
1540
|
+
let e = typeof document < "u" ? document.getElementById("nav-right") : null, { data: t, isLoading: n, isError: r } = At();
|
|
1541
|
+
return !e || !t?.right_links ? /* @__PURE__ */ U(H, {}) : Ce.createPortal(/* @__PURE__ */ U(kt, {
|
|
1109
1542
|
error: r,
|
|
1110
1543
|
isLoading: n,
|
|
1111
1544
|
data: t.right_links
|
|
1112
1545
|
}), e);
|
|
1113
|
-
},
|
|
1114
|
-
/* @__PURE__ */
|
|
1115
|
-
/* @__PURE__ */
|
|
1116
|
-
/* @__PURE__ */
|
|
1546
|
+
}, Nt = ({ className: e = "", fluidOnSmallScreens: t = !1, children: n }) => /* @__PURE__ */ W(H, { children: [
|
|
1547
|
+
/* @__PURE__ */ U(jt, {}),
|
|
1548
|
+
/* @__PURE__ */ U(Mt, {}),
|
|
1549
|
+
/* @__PURE__ */ U(M, { children: /* @__PURE__ */ U("div", {
|
|
1117
1550
|
className: `aa-react container mt-4${t ? " aa-container-fluid-small" : ""} ${e}`,
|
|
1118
|
-
children: /* @__PURE__ */
|
|
1551
|
+
children: /* @__PURE__ */ U(mt, { children: n ?? /* @__PURE__ */ U(r, {}) })
|
|
1119
1552
|
}) })
|
|
1120
1553
|
] });
|
|
1121
1554
|
// src/Pages/404.tsx
|
|
1122
|
-
function
|
|
1123
|
-
let { t: e } =
|
|
1124
|
-
return /* @__PURE__ */
|
|
1555
|
+
function Pt() {
|
|
1556
|
+
let { t: e } = V(q);
|
|
1557
|
+
return /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(j.Body, {
|
|
1125
1558
|
className: "p-0",
|
|
1126
|
-
children: /* @__PURE__ */
|
|
1559
|
+
children: /* @__PURE__ */ U(ft, {
|
|
1127
1560
|
title: e("Error 404"),
|
|
1128
1561
|
message: e("The page you are looking for does not exist.")
|
|
1129
1562
|
})
|
|
1130
1563
|
}) });
|
|
1131
1564
|
}
|
|
1132
1565
|
// src/Utils/eveOnline.tsx
|
|
1133
|
-
function
|
|
1566
|
+
function Ft(e, t = 512) {
|
|
1134
1567
|
return `https://images.evetech.net/types/${e}/render?size=${t}`;
|
|
1135
1568
|
}
|
|
1136
|
-
function
|
|
1569
|
+
function It(e, t = 512) {
|
|
1137
1570
|
return `https://images.evetech.net/characters/${e}/portrait?size=${t}`;
|
|
1138
1571
|
}
|
|
1139
|
-
function
|
|
1572
|
+
function Lt(e, t = 128) {
|
|
1140
1573
|
return `https://images.evetech.net/corporations/${e}/logo?size=${t}`;
|
|
1141
1574
|
}
|
|
1142
|
-
function
|
|
1575
|
+
function Rt(e, t = 128) {
|
|
1143
1576
|
return `https://images.evetech.net/alliances/${e}/logo?size=${t}`;
|
|
1144
1577
|
}
|
|
1145
|
-
function
|
|
1578
|
+
function zt(e, t = 32) {
|
|
1146
1579
|
return `https://images.evetech.net/types/${e}/icon?size=${t}`;
|
|
1147
1580
|
}
|
|
1148
|
-
var
|
|
1581
|
+
var Bt = (e) => e >= .5 ? "aa-badge-hisec" : e > 0 ? "aa-badge-lowsec" : "aa-badge-nullsec", Vt = (e = /* @__PURE__ */ new Date()) => {
|
|
1149
1582
|
let t = (e) => String(e).padStart(2, "0");
|
|
1150
1583
|
return `${t(e.getUTCHours())}:${t(e.getUTCMinutes())}:${t(e.getUTCSeconds())} EVE`;
|
|
1151
1584
|
};
|
|
1152
|
-
function
|
|
1585
|
+
function Ht({ id: e, name: t, size: n = 12, className: r = "", externalLink: i = !1 }) {
|
|
1153
1586
|
let a = `https://zkillboard.com/kill/${e}/`;
|
|
1154
|
-
return Z(t, /* @__PURE__ */
|
|
1587
|
+
return Z(t, /* @__PURE__ */ W("a", {
|
|
1155
1588
|
href: a,
|
|
1156
1589
|
target: "_blank",
|
|
1157
1590
|
rel: "noopener noreferrer",
|
|
1158
1591
|
className: r,
|
|
1159
|
-
children: [t, i && /* @__PURE__ */
|
|
1592
|
+
children: [t, i && /* @__PURE__ */ U(D, { size: n })]
|
|
1160
1593
|
}));
|
|
1161
1594
|
}
|
|
1162
|
-
function
|
|
1163
|
-
return /* @__PURE__ */
|
|
1164
|
-
src:
|
|
1595
|
+
function Ut(e, t = 32) {
|
|
1596
|
+
return /* @__PURE__ */ U("img", {
|
|
1597
|
+
src: It(e, t),
|
|
1165
1598
|
className: "rounded"
|
|
1166
1599
|
});
|
|
1167
1600
|
}
|
|
1168
1601
|
// src/Utils/general.tsx
|
|
1169
|
-
var
|
|
1602
|
+
var Wt = ({ url: e, text: t, children: n, external: r, className: i }) => /* @__PURE__ */ W("a", {
|
|
1170
1603
|
href: e,
|
|
1171
1604
|
className: `${i ?? ""}`,
|
|
1172
1605
|
target: r ? "_blank" : void 0,
|
|
1173
1606
|
rel: r ? "noopener noreferrer" : void 0,
|
|
1174
1607
|
children: [t, n]
|
|
1175
|
-
}),
|
|
1176
|
-
src:
|
|
1608
|
+
}), Gt = (e, t, n) => /* @__PURE__ */ U("img", {
|
|
1609
|
+
src: Ft(e, 128),
|
|
1177
1610
|
alt: t,
|
|
1178
1611
|
className: `${n ?? ""}`,
|
|
1179
1612
|
loading: "lazy",
|
|
1180
1613
|
onError: (t) => {
|
|
1181
|
-
t.target.src =
|
|
1614
|
+
t.target.src = zt(e, 64);
|
|
1182
1615
|
}
|
|
1183
1616
|
});
|
|
1184
|
-
function
|
|
1185
|
-
return /* @__PURE__ */
|
|
1617
|
+
function Kt(e) {
|
|
1618
|
+
return /* @__PURE__ */ U("span", { dangerouslySetInnerHTML: { __html: e } });
|
|
1186
1619
|
}
|
|
1187
|
-
export {
|
|
1620
|
+
export { bt as AaReactProvider, Tt as AdministrationMenuItem, Nt as AuthBase, Ot as AuthLeftMenu, jt as AuthLeftMenuAsync, kt as AuthRightMenu, Mt as AuthRightMenuAsync, st as BaseModal, ht as BaseSectionHeader, et as BaseTable, tt as BaseTableForm, Be as BaseTableHeader, Ye as BaseTablePages, nt as BaseToolbar, Ie as BoolFilter, mt as ErrorBoundary, ft as ErrorLoader, Pt as ErrorPage, Qe as FetchingLoader, ze as Filter, je as I18N_FALLBACK_NAMESPACE, q as I18N_NAMESPACE, Q as MODAL_DEFAULTS, Et as MenuItem, Dt as MenuList, rt as ModalSize, Fe as NumberFilter, Re as SelectFilter, Le as TextFilter, Rt as allianceImageUrl, Te as baseApiClient, Xe as baseTableFeatures, It as characterImageUrl, Lt as corporationImageUrl, we as createApiClient, Ze as createBaseColumnHelper, Ve as exportToCSV, qe as formatCompactNumber, Ue as formatDate, Ge as formatEta, Vt as formatEveTime, Je as formatIsk, Ke as formatNumber, We as formatRelativeTime, Bt as getSecColor, Ct as isActivePath, zt as itemImageUrl, Ee as loadMenu, De as loadUserData, Oe as queryKeys, Ne as registerI18nResources, Ut as renderCharacterPortrait, Kt as renderHtml, Wt as renderLink, Gt as renderShipImage, Z as renderTooltip, Ft as shipImageUrl, St as toProjectPath, He as toolTipContainer, $ as useAaReact, lt as useApproveMutation, gt as useCooldown, vt as useFeedback, ut as useFormApproveMutation, At as useMenu, dt as useModalQueryState, _t as useOwnerCooldowns, xt as useUserData, Ht as zKillboardLink };
|
|
1188
1621
|
|
|
1189
1622
|
//# sourceMappingURL=index.js.map
|