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