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