@panneau/app 4.0.85 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/packages.css +1 -1
- package/assets/css/styles.css +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.js +1097 -754
- package/package.json +43 -42
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
1
2
|
import { useMemoryRouter, createPathToRegexpParser } from '@folklore/routes';
|
|
2
|
-
import { useLocation, useSearch, Route,
|
|
3
|
+
import { useLocation, useSearch, Route, Switch, Redirect, Router } from 'wouter';
|
|
3
4
|
import ActionsProvider from '@panneau/actions';
|
|
4
5
|
import { useUser, useLogout, useAuth, AuthProvider } from '@panneau/auth';
|
|
5
|
-
import { useUrlGenerator, usePanneauResources, usePanneau, usePanneauColorScheme, ResourceProvider, useActionsComponentsManager, useRoutes, usePagesComponentsManager,
|
|
6
|
+
import { useUrlGenerator, usePanneauResources, usePanneau, usePanneauColorScheme, ResourceProvider, useActionsComponentsManager, usePanneauAuth, useRoutes, usePagesComponentsManager, ComponentsProvider, ModalProvider, RoutesProvider, PanneauProvider } from '@panneau/core/contexts';
|
|
6
7
|
import { useResourceItem, DataProvider } from '@panneau/data';
|
|
7
8
|
import DisplaysProvider from '@panneau/displays';
|
|
8
9
|
import FieldsProvider from '@panneau/fields';
|
|
@@ -12,12 +13,12 @@ import { useResourceValues, IntlProvider } from '@panneau/intl';
|
|
|
12
13
|
import ListsProvider from '@panneau/lists';
|
|
13
14
|
import ModalsProvider from '@panneau/modals';
|
|
14
15
|
import { UppyProvider } from '@panneau/uppy';
|
|
15
|
-
import { c } from 'react/compiler-runtime';
|
|
16
16
|
import isObject from 'lodash-es/isObject';
|
|
17
17
|
import { useState, useEffect } from 'react';
|
|
18
18
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
19
19
|
import classNames from 'classnames';
|
|
20
20
|
import isString from 'lodash-es/isString';
|
|
21
|
+
import omit from 'lodash-es/omit';
|
|
21
22
|
import queryString from 'query-string';
|
|
22
23
|
import { FormattedMessage } from 'react-intl';
|
|
23
24
|
import { useResourceUrlGenerator, useResourceTypeName } from '@panneau/core/hooks';
|
|
@@ -165,7 +166,7 @@ function ResourcesMenu(t0) {
|
|
|
165
166
|
} else {
|
|
166
167
|
t5 = $[6];
|
|
167
168
|
}
|
|
168
|
-
t4 = resources.filter(_temp$
|
|
169
|
+
t4 = resources.filter(_temp$6).map(t5);
|
|
169
170
|
$[0] = pathname;
|
|
170
171
|
$[1] = resourceRoute;
|
|
171
172
|
$[2] = resources;
|
|
@@ -192,7 +193,7 @@ function ResourcesMenu(t0) {
|
|
|
192
193
|
}
|
|
193
194
|
return t5;
|
|
194
195
|
}
|
|
195
|
-
function _temp$
|
|
196
|
+
function _temp$6(t0) {
|
|
196
197
|
const {
|
|
197
198
|
settings: t1
|
|
198
199
|
} = t0;
|
|
@@ -204,7 +205,7 @@ function _temp$5(t0) {
|
|
|
204
205
|
}
|
|
205
206
|
|
|
206
207
|
function MainNavbar(t0) {
|
|
207
|
-
const $ = c(
|
|
208
|
+
const $ = c(30);
|
|
208
209
|
let className;
|
|
209
210
|
let props;
|
|
210
211
|
let t1;
|
|
@@ -290,7 +291,8 @@ function MainNavbar(t0) {
|
|
|
290
291
|
}, `menu-item-spacer-${index + 1}`)];
|
|
291
292
|
}
|
|
292
293
|
const lastItem = currentItems.length > 0 ? currentItems[currentItems.length - 1] : null;
|
|
293
|
-
|
|
294
|
+
const menuItem = item;
|
|
295
|
+
return isArray(lastItem) ? [...currentItems.slice(0, currentItems.length - 1), [...lastItem, menuItem]] : [...currentItems, [menuItem]];
|
|
294
296
|
};
|
|
295
297
|
$[14] = navClassNames;
|
|
296
298
|
$[15] = t10;
|
|
@@ -310,7 +312,7 @@ function MainNavbar(t0) {
|
|
|
310
312
|
} else {
|
|
311
313
|
t11 = $[17];
|
|
312
314
|
}
|
|
313
|
-
t9 = [!hasResources && user !== null ? "resources" : null, ...menuItems, !hasAccount && menuItems.indexOf("separator") === -1 ? "separator" : null, !hasAccount ? "account" : null].filter(_temp$
|
|
315
|
+
t9 = [!hasResources && user !== null ? "resources" : null, ...menuItems, !hasAccount && menuItems.indexOf("separator") === -1 ? "separator" : null, !hasAccount ? "account" : null].filter(_temp$5).reduce(t10, []).map(t11);
|
|
314
316
|
$[9] = guest;
|
|
315
317
|
$[10] = main;
|
|
316
318
|
$[11] = navClassNames;
|
|
@@ -325,7 +327,6 @@ function MainNavbar(t0) {
|
|
|
325
327
|
t10 = name !== null ? /*#__PURE__*/jsx(Link, {
|
|
326
328
|
href: route("home"),
|
|
327
329
|
className: "navbar-brand",
|
|
328
|
-
withoutTheme: true,
|
|
329
330
|
children: /*#__PURE__*/jsx("span", {
|
|
330
331
|
className: classNames([{
|
|
331
332
|
"text-opacity-75": loading,
|
|
@@ -343,10 +344,9 @@ function MainNavbar(t0) {
|
|
|
343
344
|
t10 = $[22];
|
|
344
345
|
}
|
|
345
346
|
let t11;
|
|
346
|
-
if ($[23] !== background || $[24] !== className || $[25] !== items || $[26] !==
|
|
347
|
+
if ($[23] !== background || $[24] !== className || $[25] !== items || $[26] !== props || $[27] !== t10 || $[28] !== vertical) {
|
|
347
348
|
t11 = /*#__PURE__*/jsxs(Navbar, {
|
|
348
349
|
theme: background,
|
|
349
|
-
loading: loading,
|
|
350
350
|
vertical: vertical,
|
|
351
351
|
className: className,
|
|
352
352
|
...props,
|
|
@@ -355,100 +355,226 @@ function MainNavbar(t0) {
|
|
|
355
355
|
$[23] = background;
|
|
356
356
|
$[24] = className;
|
|
357
357
|
$[25] = items;
|
|
358
|
-
$[26] =
|
|
359
|
-
$[27] =
|
|
360
|
-
$[28] =
|
|
361
|
-
$[29] =
|
|
362
|
-
$[30] = t11;
|
|
358
|
+
$[26] = props;
|
|
359
|
+
$[27] = t10;
|
|
360
|
+
$[28] = vertical;
|
|
361
|
+
$[29] = t11;
|
|
363
362
|
} else {
|
|
364
|
-
t11 = $[
|
|
363
|
+
t11 = $[29];
|
|
365
364
|
}
|
|
366
365
|
return t11;
|
|
367
366
|
}
|
|
368
|
-
function _temp$
|
|
367
|
+
function _temp$5(it) {
|
|
369
368
|
return it !== null;
|
|
370
369
|
}
|
|
371
370
|
|
|
372
|
-
function MainLayout({
|
|
373
|
-
|
|
374
|
-
loading = false,
|
|
375
|
-
children = null
|
|
376
|
-
}) {
|
|
371
|
+
function MainLayout(t0) {
|
|
372
|
+
const $ = c(29);
|
|
377
373
|
const {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
374
|
+
fullscreen: t1,
|
|
375
|
+
loading: t2,
|
|
376
|
+
children: t3
|
|
377
|
+
} = t0;
|
|
378
|
+
const fullscreen = t1 === undefined ? false : t1;
|
|
379
|
+
const loading = t2 === undefined ? false : t2;
|
|
380
|
+
const children = t3 === undefined ? null : t3;
|
|
381
|
+
const {
|
|
382
|
+
theme: t4,
|
|
383
|
+
sidebarPosition: t5,
|
|
384
|
+
background: t6,
|
|
385
|
+
text: t7
|
|
382
386
|
} = usePanneauColorScheme();
|
|
383
|
-
const
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
387
|
+
const theme = t4 === undefined ? null : t4;
|
|
388
|
+
const sidebarPosition = t5 === undefined ? null : t5;
|
|
389
|
+
const background = t6 === undefined ? null : t6;
|
|
390
|
+
const text = t7 === undefined ? null : t7;
|
|
391
|
+
const vertical = sidebarPosition === "left" || sidebarPosition === "right";
|
|
392
|
+
const t8 = !vertical;
|
|
393
|
+
let t9;
|
|
394
|
+
if ($[0] !== t8) {
|
|
395
|
+
t9 = classNames(["d-flex", "min-vh-100", {
|
|
396
|
+
"flex-column": t8
|
|
397
|
+
}]);
|
|
398
|
+
$[0] = t8;
|
|
399
|
+
$[1] = t9;
|
|
400
|
+
} else {
|
|
401
|
+
t9 = $[1];
|
|
402
|
+
}
|
|
403
|
+
const t10 = theme !== null ? theme : undefined;
|
|
404
|
+
const t11 = !vertical;
|
|
405
|
+
const t12 = !vertical;
|
|
406
|
+
const t13 = !vertical;
|
|
407
|
+
const t14 = !vertical;
|
|
408
|
+
const t15 = vertical && sidebarPosition === "left";
|
|
409
|
+
const t16 = vertical && sidebarPosition === "right";
|
|
410
|
+
const t17 = vertical && sidebarPosition === "left";
|
|
411
|
+
const t18 = vertical && sidebarPosition === "right";
|
|
412
|
+
let t19;
|
|
413
|
+
if ($[2] !== t11 || $[3] !== t12 || $[4] !== t13 || $[5] !== t14 || $[6] !== t15 || $[7] !== t16 || $[8] !== t17 || $[9] !== t18) {
|
|
414
|
+
t19 = classNames([{
|
|
415
|
+
"shadow-sm": t11,
|
|
416
|
+
"border-bottom": t12,
|
|
417
|
+
"sticky-top": t13,
|
|
418
|
+
"px-3": t14,
|
|
419
|
+
"pe-3": t15,
|
|
420
|
+
"ps-3": t16,
|
|
421
|
+
"me-2": t17,
|
|
422
|
+
"ms-2": t18
|
|
423
|
+
}]);
|
|
424
|
+
$[2] = t11;
|
|
425
|
+
$[3] = t12;
|
|
426
|
+
$[4] = t13;
|
|
427
|
+
$[5] = t14;
|
|
428
|
+
$[6] = t15;
|
|
429
|
+
$[7] = t16;
|
|
430
|
+
$[8] = t17;
|
|
431
|
+
$[9] = t18;
|
|
432
|
+
$[10] = t19;
|
|
433
|
+
} else {
|
|
434
|
+
t19 = $[10];
|
|
435
|
+
}
|
|
436
|
+
let t20;
|
|
437
|
+
if ($[11] !== loading || $[12] !== t19 || $[13] !== theme || $[14] !== vertical) {
|
|
438
|
+
t20 = /*#__PURE__*/jsx(MainNavbar, {
|
|
439
|
+
className: t19,
|
|
403
440
|
theme: theme,
|
|
404
441
|
loading: loading,
|
|
405
442
|
vertical: vertical
|
|
406
|
-
})
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
443
|
+
});
|
|
444
|
+
$[11] = loading;
|
|
445
|
+
$[12] = t19;
|
|
446
|
+
$[13] = theme;
|
|
447
|
+
$[14] = vertical;
|
|
448
|
+
$[15] = t20;
|
|
449
|
+
} else {
|
|
450
|
+
t20 = $[15];
|
|
451
|
+
}
|
|
452
|
+
let t21;
|
|
453
|
+
if ($[16] !== background || $[17] !== fullscreen || $[18] !== text) {
|
|
454
|
+
t21 = classNames(["flex-grow-1", {
|
|
455
|
+
"d-flex flex-column": fullscreen
|
|
456
|
+
}, background !== null ? `bg-${background}` : null, text !== null ? `text-${text}` : null]);
|
|
457
|
+
$[16] = background;
|
|
458
|
+
$[17] = fullscreen;
|
|
459
|
+
$[18] = text;
|
|
460
|
+
$[19] = t21;
|
|
461
|
+
} else {
|
|
462
|
+
t21 = $[19];
|
|
463
|
+
}
|
|
464
|
+
let t22;
|
|
465
|
+
if ($[20] !== children || $[21] !== t21) {
|
|
466
|
+
t22 = /*#__PURE__*/jsx("div", {
|
|
467
|
+
className: t21,
|
|
412
468
|
children: children
|
|
413
|
-
})
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
469
|
+
});
|
|
470
|
+
$[20] = children;
|
|
471
|
+
$[21] = t21;
|
|
472
|
+
$[22] = t22;
|
|
473
|
+
} else {
|
|
474
|
+
t22 = $[22];
|
|
475
|
+
}
|
|
476
|
+
let t23;
|
|
477
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
478
|
+
t23 = /*#__PURE__*/jsx(Modals, {});
|
|
479
|
+
$[23] = t23;
|
|
480
|
+
} else {
|
|
481
|
+
t23 = $[23];
|
|
482
|
+
}
|
|
483
|
+
let t24;
|
|
484
|
+
if ($[24] !== t10 || $[25] !== t20 || $[26] !== t22 || $[27] !== t9) {
|
|
485
|
+
t24 = /*#__PURE__*/jsxs("div", {
|
|
486
|
+
className: t9,
|
|
487
|
+
"data-bs-theme": t10,
|
|
488
|
+
children: [t20, t22, t23]
|
|
489
|
+
});
|
|
490
|
+
$[24] = t10;
|
|
491
|
+
$[25] = t20;
|
|
492
|
+
$[26] = t22;
|
|
493
|
+
$[27] = t9;
|
|
494
|
+
$[28] = t24;
|
|
495
|
+
} else {
|
|
496
|
+
t24 = $[28];
|
|
497
|
+
}
|
|
498
|
+
return t24;
|
|
417
499
|
}
|
|
418
500
|
|
|
419
|
-
function PageHeader({
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
501
|
+
function PageHeader(t0) {
|
|
502
|
+
const $ = c(20);
|
|
503
|
+
const {
|
|
504
|
+
title: t1,
|
|
505
|
+
actions: t2,
|
|
506
|
+
small: t3,
|
|
507
|
+
className: t4,
|
|
508
|
+
children: t5
|
|
509
|
+
} = t0;
|
|
510
|
+
const title = t1 === undefined ? null : t1;
|
|
511
|
+
const actions = t2 === undefined ? null : t2;
|
|
512
|
+
const small = t3 === undefined ? false : t3;
|
|
513
|
+
const className = t4 === undefined ? null : t4;
|
|
514
|
+
const children = t5 === undefined ? null : t5;
|
|
428
515
|
const {
|
|
429
516
|
text,
|
|
430
517
|
background
|
|
431
518
|
} = usePanneauColorScheme();
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
className: classNames([
|
|
519
|
+
let t6;
|
|
520
|
+
if ($[0] !== title) {
|
|
521
|
+
t6 = title !== null ? /*#__PURE__*/jsx("h1", {
|
|
522
|
+
className: classNames(["mb-0", "h2"]),
|
|
436
523
|
children: /*#__PURE__*/jsx(LabelComponent, {
|
|
437
524
|
children: title
|
|
438
525
|
})
|
|
439
|
-
}) : null
|
|
526
|
+
}) : null;
|
|
527
|
+
$[0] = title;
|
|
528
|
+
$[1] = t6;
|
|
529
|
+
} else {
|
|
530
|
+
t6 = $[1];
|
|
531
|
+
}
|
|
532
|
+
let t7;
|
|
533
|
+
if ($[2] !== actions) {
|
|
534
|
+
t7 = actions !== null ? /*#__PURE__*/jsx("div", {
|
|
440
535
|
className: "ms-auto",
|
|
441
536
|
children: actions
|
|
442
|
-
}) : null
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
537
|
+
}) : null;
|
|
538
|
+
$[2] = actions;
|
|
539
|
+
$[3] = t7;
|
|
540
|
+
} else {
|
|
541
|
+
t7 = $[3];
|
|
542
|
+
}
|
|
543
|
+
let t8;
|
|
544
|
+
if ($[4] !== t6 || $[5] !== t7) {
|
|
545
|
+
t8 = /*#__PURE__*/jsxs("div", {
|
|
546
|
+
className: "d-flex align-items-center flex-wrap",
|
|
547
|
+
children: [t6, t7]
|
|
548
|
+
});
|
|
549
|
+
$[4] = t6;
|
|
550
|
+
$[5] = t7;
|
|
551
|
+
$[6] = t8;
|
|
552
|
+
} else {
|
|
553
|
+
t8 = $[6];
|
|
554
|
+
}
|
|
555
|
+
const inner = t8;
|
|
556
|
+
const t9 = background !== null ? `bg-${background}` : null;
|
|
557
|
+
const t10 = text !== null ? `text-${text}` : null;
|
|
558
|
+
const t11 = background || text !== null;
|
|
559
|
+
const t12 = className !== null;
|
|
560
|
+
let t13;
|
|
561
|
+
if ($[7] !== className || $[8] !== t10 || $[9] !== t11 || $[10] !== t12 || $[11] !== t9) {
|
|
562
|
+
t13 = classNames(["py-4", t9, t10, {
|
|
563
|
+
"border-bottom": t11,
|
|
564
|
+
[className]: t12
|
|
565
|
+
}]);
|
|
566
|
+
$[7] = className;
|
|
567
|
+
$[8] = t10;
|
|
568
|
+
$[9] = t11;
|
|
569
|
+
$[10] = t12;
|
|
570
|
+
$[11] = t9;
|
|
571
|
+
$[12] = t13;
|
|
572
|
+
} else {
|
|
573
|
+
t13 = $[12];
|
|
574
|
+
}
|
|
575
|
+
let t14;
|
|
576
|
+
if ($[13] !== inner || $[14] !== small) {
|
|
577
|
+
t14 = /*#__PURE__*/jsx("div", {
|
|
452
578
|
className: "container-sm",
|
|
453
579
|
children: small ? /*#__PURE__*/jsx("div", {
|
|
454
580
|
className: "row justify-content-center",
|
|
@@ -457,12 +583,31 @@ function PageHeader({
|
|
|
457
583
|
children: inner
|
|
458
584
|
})
|
|
459
585
|
}) : inner
|
|
460
|
-
})
|
|
461
|
-
|
|
586
|
+
});
|
|
587
|
+
$[13] = inner;
|
|
588
|
+
$[14] = small;
|
|
589
|
+
$[15] = t14;
|
|
590
|
+
} else {
|
|
591
|
+
t14 = $[15];
|
|
592
|
+
}
|
|
593
|
+
let t15;
|
|
594
|
+
if ($[16] !== children || $[17] !== t13 || $[18] !== t14) {
|
|
595
|
+
t15 = /*#__PURE__*/jsxs("div", {
|
|
596
|
+
className: t13,
|
|
597
|
+
children: [t14, children]
|
|
598
|
+
});
|
|
599
|
+
$[16] = children;
|
|
600
|
+
$[17] = t13;
|
|
601
|
+
$[18] = t14;
|
|
602
|
+
$[19] = t15;
|
|
603
|
+
} else {
|
|
604
|
+
t15 = $[19];
|
|
605
|
+
}
|
|
606
|
+
return t15;
|
|
462
607
|
}
|
|
463
608
|
|
|
464
609
|
function ResourceCreatePage(t0) {
|
|
465
|
-
const $ = c(
|
|
610
|
+
const $ = c(22);
|
|
466
611
|
const {
|
|
467
612
|
resource
|
|
468
613
|
} = t0;
|
|
@@ -482,89 +627,98 @@ function ResourceCreatePage(t0) {
|
|
|
482
627
|
const {
|
|
483
628
|
type: t2
|
|
484
629
|
} = t1;
|
|
485
|
-
const
|
|
630
|
+
const queryType = t2 === undefined ? null : t2;
|
|
631
|
+
let t3;
|
|
632
|
+
if ($[2] !== queryType) {
|
|
633
|
+
t3 = isString(queryType) ? queryType : null;
|
|
634
|
+
$[2] = queryType;
|
|
635
|
+
$[3] = t3;
|
|
636
|
+
} else {
|
|
637
|
+
t3 = $[3];
|
|
638
|
+
}
|
|
639
|
+
const type = t3;
|
|
486
640
|
const resourceValues = useResourceValues(resource);
|
|
487
641
|
const typeName = useResourceTypeName(resource, type);
|
|
488
|
-
let
|
|
489
|
-
if ($[
|
|
490
|
-
|
|
642
|
+
let t4;
|
|
643
|
+
if ($[4] !== navigate || $[5] !== resourceRoute) {
|
|
644
|
+
t4 = () => {
|
|
491
645
|
navigate(`${resourceRoute("index")}?created=true`);
|
|
492
646
|
};
|
|
493
|
-
$[
|
|
494
|
-
$[
|
|
495
|
-
$[
|
|
647
|
+
$[4] = navigate;
|
|
648
|
+
$[5] = resourceRoute;
|
|
649
|
+
$[6] = t4;
|
|
496
650
|
} else {
|
|
497
|
-
|
|
651
|
+
t4 = $[6];
|
|
498
652
|
}
|
|
499
|
-
const onComplete =
|
|
500
|
-
let
|
|
501
|
-
if ($[
|
|
502
|
-
|
|
653
|
+
const onComplete = t4;
|
|
654
|
+
let t5;
|
|
655
|
+
if ($[7] !== resourceValues) {
|
|
656
|
+
t5 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
503
657
|
id: "6viUpq",
|
|
504
658
|
values: resourceValues
|
|
505
659
|
});
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
660
|
+
$[7] = resourceValues;
|
|
661
|
+
$[8] = t5;
|
|
508
662
|
} else {
|
|
509
|
-
|
|
663
|
+
t5 = $[8];
|
|
510
664
|
}
|
|
511
|
-
let
|
|
512
|
-
if ($[
|
|
513
|
-
|
|
665
|
+
let t6;
|
|
666
|
+
if ($[9] !== typeName) {
|
|
667
|
+
t6 = typeName !== null ? /*#__PURE__*/jsxs("span", {
|
|
514
668
|
className: "text-body-secondary",
|
|
515
669
|
children: [" (", typeName, ")"]
|
|
516
670
|
}) : null;
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
671
|
+
$[9] = typeName;
|
|
672
|
+
$[10] = t6;
|
|
519
673
|
} else {
|
|
520
|
-
|
|
674
|
+
t6 = $[10];
|
|
521
675
|
}
|
|
522
|
-
let
|
|
523
|
-
if ($[
|
|
524
|
-
|
|
676
|
+
let t7;
|
|
677
|
+
if ($[11] !== t5 || $[12] !== t6) {
|
|
678
|
+
t7 = /*#__PURE__*/jsx(PageHeader, {
|
|
525
679
|
title: /*#__PURE__*/jsxs(Fragment, {
|
|
526
|
-
children: [
|
|
680
|
+
children: [t5, t6]
|
|
527
681
|
}),
|
|
528
682
|
small: true
|
|
529
683
|
});
|
|
530
|
-
$[
|
|
531
|
-
$[
|
|
532
|
-
$[
|
|
684
|
+
$[11] = t5;
|
|
685
|
+
$[12] = t6;
|
|
686
|
+
$[13] = t7;
|
|
533
687
|
} else {
|
|
534
|
-
|
|
688
|
+
t7 = $[13];
|
|
535
689
|
}
|
|
536
|
-
let
|
|
537
|
-
if ($[
|
|
538
|
-
|
|
690
|
+
let t8;
|
|
691
|
+
if ($[14] !== onComplete || $[15] !== resource || $[16] !== t7 || $[17] !== type) {
|
|
692
|
+
t8 = /*#__PURE__*/jsx(MainLayout, {
|
|
539
693
|
children: /*#__PURE__*/jsx(ResourceFormWrapper, {
|
|
540
694
|
resource: resource,
|
|
541
695
|
type: type,
|
|
542
696
|
onComplete: onComplete,
|
|
543
697
|
withContainer: true,
|
|
544
|
-
header:
|
|
698
|
+
header: t7
|
|
545
699
|
})
|
|
546
700
|
});
|
|
547
|
-
$[
|
|
548
|
-
$[
|
|
549
|
-
$[14] = t6;
|
|
550
|
-
$[15] = type;
|
|
701
|
+
$[14] = onComplete;
|
|
702
|
+
$[15] = resource;
|
|
551
703
|
$[16] = t7;
|
|
704
|
+
$[17] = type;
|
|
705
|
+
$[18] = t8;
|
|
552
706
|
} else {
|
|
553
|
-
|
|
707
|
+
t8 = $[18];
|
|
554
708
|
}
|
|
555
|
-
let
|
|
556
|
-
if ($[
|
|
557
|
-
|
|
709
|
+
let t9;
|
|
710
|
+
if ($[19] !== resource || $[20] !== t8) {
|
|
711
|
+
t9 = /*#__PURE__*/jsx(ResourceProvider, {
|
|
558
712
|
resource: resource,
|
|
559
|
-
children:
|
|
713
|
+
children: t8
|
|
560
714
|
});
|
|
561
|
-
$[
|
|
562
|
-
$[
|
|
563
|
-
$[
|
|
715
|
+
$[19] = resource;
|
|
716
|
+
$[20] = t8;
|
|
717
|
+
$[21] = t9;
|
|
564
718
|
} else {
|
|
565
|
-
|
|
719
|
+
t9 = $[21];
|
|
566
720
|
}
|
|
567
|
-
return
|
|
721
|
+
return t9;
|
|
568
722
|
}
|
|
569
723
|
|
|
570
724
|
function ResourceDeletePage(t0) {
|
|
@@ -832,7 +986,7 @@ function ResourceCreateButton(t0) {
|
|
|
832
986
|
const onClickDropdown = t4;
|
|
833
987
|
let t5;
|
|
834
988
|
if ($[2] !== className || $[3] !== dropdownOpened || $[4] !== onClickDropdown || $[5] !== resourceRoute || $[6] !== resourceValues || $[7] !== size || $[8] !== types) {
|
|
835
|
-
const finalTypes = types !== null ? types.filter(_temp$
|
|
989
|
+
const finalTypes = types !== null ? types.filter(_temp$4) : null;
|
|
836
990
|
const hasMultipleTypes = finalTypes !== null && finalTypes.length > 1;
|
|
837
991
|
let t6;
|
|
838
992
|
if ($[10] !== dropdownOpened) {
|
|
@@ -922,7 +1076,7 @@ function ResourceCreateButton(t0) {
|
|
|
922
1076
|
}
|
|
923
1077
|
return t5;
|
|
924
1078
|
}
|
|
925
|
-
function _temp$
|
|
1079
|
+
function _temp$4(t0) {
|
|
926
1080
|
const {
|
|
927
1081
|
settings: t1
|
|
928
1082
|
} = t0;
|
|
@@ -981,7 +1135,7 @@ function ResourceItemsList(t0) {
|
|
|
981
1135
|
|
|
982
1136
|
const DEFAULT_ACTIONS = ['create'];
|
|
983
1137
|
function ResourceIndexPage(t0) {
|
|
984
|
-
const $ = c(
|
|
1138
|
+
const $ = c(72);
|
|
985
1139
|
const {
|
|
986
1140
|
resource,
|
|
987
1141
|
defaultActions: t1,
|
|
@@ -1054,7 +1208,7 @@ function ResourceIndexPage(t0) {
|
|
|
1054
1208
|
}
|
|
1055
1209
|
let t14;
|
|
1056
1210
|
if ($[12] !== t13) {
|
|
1057
|
-
t14 = t13.map(_temp$
|
|
1211
|
+
t14 = t13.map(_temp$3);
|
|
1058
1212
|
$[12] = t13;
|
|
1059
1213
|
$[13] = t14;
|
|
1060
1214
|
} else {
|
|
@@ -1076,34 +1230,42 @@ function ResourceIndexPage(t0) {
|
|
|
1076
1230
|
t15 = $[15];
|
|
1077
1231
|
}
|
|
1078
1232
|
const query = t15;
|
|
1079
|
-
const listQuery = query;
|
|
1080
1233
|
let t16;
|
|
1081
1234
|
if ($[16] !== query) {
|
|
1082
|
-
t16 = query
|
|
1235
|
+
t16 = omit(query, ["created", "deleted"]);
|
|
1083
1236
|
$[16] = query;
|
|
1084
1237
|
$[17] = t16;
|
|
1085
1238
|
} else {
|
|
1086
1239
|
t16 = $[17];
|
|
1087
1240
|
}
|
|
1241
|
+
const listQuery = t16;
|
|
1242
|
+
let t17;
|
|
1243
|
+
if ($[18] !== query) {
|
|
1244
|
+
t17 = query || {};
|
|
1245
|
+
$[18] = query;
|
|
1246
|
+
$[19] = t17;
|
|
1247
|
+
} else {
|
|
1248
|
+
t17 = $[19];
|
|
1249
|
+
}
|
|
1088
1250
|
const {
|
|
1089
|
-
created:
|
|
1090
|
-
deleted:
|
|
1091
|
-
} =
|
|
1092
|
-
const created =
|
|
1093
|
-
const deleted =
|
|
1251
|
+
created: t18,
|
|
1252
|
+
deleted: t19
|
|
1253
|
+
} = t17;
|
|
1254
|
+
const created = t18 === undefined ? false : t18;
|
|
1255
|
+
const deleted = t19 === undefined ? false : t19;
|
|
1094
1256
|
const resourceRoute = useResourceUrlGenerator(resource);
|
|
1095
|
-
let
|
|
1096
|
-
if ($[
|
|
1097
|
-
|
|
1098
|
-
$[
|
|
1099
|
-
$[
|
|
1257
|
+
let t20;
|
|
1258
|
+
if ($[20] !== resourceRoute) {
|
|
1259
|
+
t20 = resourceRoute("index");
|
|
1260
|
+
$[20] = resourceRoute;
|
|
1261
|
+
$[21] = t20;
|
|
1100
1262
|
} else {
|
|
1101
|
-
|
|
1263
|
+
t20 = $[21];
|
|
1102
1264
|
}
|
|
1103
|
-
const url =
|
|
1104
|
-
let
|
|
1105
|
-
if ($[
|
|
1106
|
-
|
|
1265
|
+
const url = t20;
|
|
1266
|
+
let t21;
|
|
1267
|
+
if ($[22] !== navigate || $[23] !== url) {
|
|
1268
|
+
t21 = submitQuery => {
|
|
1107
1269
|
const newQuery = submitQuery !== null ? Object.keys(submitQuery).reduce((currentQuery, key) => {
|
|
1108
1270
|
const value = submitQuery[key];
|
|
1109
1271
|
return value !== null ? {
|
|
@@ -1115,57 +1277,57 @@ function ResourceIndexPage(t0) {
|
|
|
1115
1277
|
arrayFormat: "bracket"
|
|
1116
1278
|
})}` : ""}`);
|
|
1117
1279
|
};
|
|
1118
|
-
$[
|
|
1119
|
-
$[
|
|
1120
|
-
$[
|
|
1280
|
+
$[22] = navigate;
|
|
1281
|
+
$[23] = url;
|
|
1282
|
+
$[24] = t21;
|
|
1121
1283
|
} else {
|
|
1122
|
-
|
|
1284
|
+
t21 = $[24];
|
|
1123
1285
|
}
|
|
1124
|
-
const onQueryChange =
|
|
1125
|
-
let
|
|
1126
|
-
if ($[
|
|
1127
|
-
|
|
1286
|
+
const onQueryChange = t21;
|
|
1287
|
+
let t22;
|
|
1288
|
+
if ($[25] !== navigate || $[26] !== url) {
|
|
1289
|
+
t22 = () => {
|
|
1128
1290
|
const resetQuery = queryString.stringify(null, {
|
|
1129
1291
|
arrayFormat: "bracket"
|
|
1130
1292
|
});
|
|
1131
1293
|
navigate(`${url}?${resetQuery}`);
|
|
1132
1294
|
};
|
|
1133
|
-
$[
|
|
1134
|
-
$[
|
|
1135
|
-
$[
|
|
1295
|
+
$[25] = navigate;
|
|
1296
|
+
$[26] = url;
|
|
1297
|
+
$[27] = t22;
|
|
1136
1298
|
} else {
|
|
1137
|
-
|
|
1299
|
+
t22 = $[27];
|
|
1138
1300
|
}
|
|
1139
|
-
const onQueryReset =
|
|
1140
|
-
let
|
|
1141
|
-
if ($[
|
|
1142
|
-
|
|
1301
|
+
const onQueryReset = t22;
|
|
1302
|
+
let t23;
|
|
1303
|
+
if ($[28] !== navigate || $[29] !== url) {
|
|
1304
|
+
t23 = () => {
|
|
1143
1305
|
navigate(url, {
|
|
1144
1306
|
replace: true
|
|
1145
1307
|
});
|
|
1146
1308
|
};
|
|
1147
|
-
$[
|
|
1148
|
-
$[
|
|
1149
|
-
$[
|
|
1309
|
+
$[28] = navigate;
|
|
1310
|
+
$[29] = url;
|
|
1311
|
+
$[30] = t23;
|
|
1150
1312
|
} else {
|
|
1151
|
-
|
|
1313
|
+
t23 = $[30];
|
|
1152
1314
|
}
|
|
1153
|
-
const onClickCloseAlert =
|
|
1154
|
-
let
|
|
1155
|
-
if ($[
|
|
1156
|
-
|
|
1315
|
+
const onClickCloseAlert = t23;
|
|
1316
|
+
let t24;
|
|
1317
|
+
if ($[31] !== actionsComponentsManager || $[32] !== finalActions || $[33] !== onQueryChange || $[34] !== query || $[35] !== resource) {
|
|
1318
|
+
t24 = finalActions.length > 0 ? /*#__PURE__*/jsx("div", {
|
|
1157
1319
|
className: "d-flex align-items-center",
|
|
1158
|
-
children: finalActions.map(
|
|
1320
|
+
children: finalActions.map(t25 => {
|
|
1159
1321
|
const {
|
|
1160
1322
|
id,
|
|
1161
|
-
component:
|
|
1162
|
-
withQuery:
|
|
1163
|
-
href:
|
|
1323
|
+
component: t26,
|
|
1324
|
+
withQuery: t27,
|
|
1325
|
+
href: t28,
|
|
1164
1326
|
...otherProps
|
|
1165
|
-
} =
|
|
1166
|
-
const component =
|
|
1167
|
-
const withQuery =
|
|
1168
|
-
const href =
|
|
1327
|
+
} = t25;
|
|
1328
|
+
const component = t26 === undefined ? Button : t26;
|
|
1329
|
+
const withQuery = t27 === undefined ? false : t27;
|
|
1330
|
+
const href = t28 === undefined ? null : t28;
|
|
1169
1331
|
const ActionComponent = isString(component) ? actionsComponentsManager.getComponent(component) : component;
|
|
1170
1332
|
const isButton = ActionComponent === Button;
|
|
1171
1333
|
let finalHref = href;
|
|
@@ -1185,37 +1347,37 @@ function ResourceIndexPage(t0) {
|
|
|
1185
1347
|
}, `action-${id}`) : null;
|
|
1186
1348
|
})
|
|
1187
1349
|
}) : null;
|
|
1188
|
-
$[
|
|
1189
|
-
$[
|
|
1190
|
-
$[
|
|
1191
|
-
$[
|
|
1192
|
-
$[
|
|
1193
|
-
$[
|
|
1350
|
+
$[31] = actionsComponentsManager;
|
|
1351
|
+
$[32] = finalActions;
|
|
1352
|
+
$[33] = onQueryChange;
|
|
1353
|
+
$[34] = query;
|
|
1354
|
+
$[35] = resource;
|
|
1355
|
+
$[36] = t24;
|
|
1194
1356
|
} else {
|
|
1195
|
-
|
|
1357
|
+
t24 = $[36];
|
|
1196
1358
|
}
|
|
1197
|
-
let
|
|
1198
|
-
if ($[
|
|
1199
|
-
|
|
1359
|
+
let t25;
|
|
1360
|
+
if ($[37] !== name || $[38] !== t24) {
|
|
1361
|
+
t25 = /*#__PURE__*/jsx(PageHeader, {
|
|
1200
1362
|
title: name,
|
|
1201
|
-
actions:
|
|
1363
|
+
actions: t24
|
|
1202
1364
|
});
|
|
1203
|
-
$[
|
|
1204
|
-
$[
|
|
1205
|
-
$[
|
|
1365
|
+
$[37] = name;
|
|
1366
|
+
$[38] = t24;
|
|
1367
|
+
$[39] = t25;
|
|
1206
1368
|
} else {
|
|
1207
|
-
|
|
1369
|
+
t25 = $[39];
|
|
1208
1370
|
}
|
|
1209
|
-
let
|
|
1210
|
-
if ($[
|
|
1211
|
-
|
|
1212
|
-
$[
|
|
1371
|
+
let t26;
|
|
1372
|
+
if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1373
|
+
t26 = classNames(["container-sm py-4"]);
|
|
1374
|
+
$[40] = t26;
|
|
1213
1375
|
} else {
|
|
1214
|
-
|
|
1376
|
+
t26 = $[40];
|
|
1215
1377
|
}
|
|
1216
|
-
let
|
|
1217
|
-
if ($[
|
|
1218
|
-
|
|
1378
|
+
let t27;
|
|
1379
|
+
if ($[41] !== created || $[42] !== onClickCloseAlert || $[43] !== resourceValues) {
|
|
1380
|
+
t27 = created ? /*#__PURE__*/jsx(Alert, {
|
|
1219
1381
|
className: "mb-4",
|
|
1220
1382
|
onClose: onClickCloseAlert,
|
|
1221
1383
|
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
@@ -1223,16 +1385,16 @@ function ResourceIndexPage(t0) {
|
|
|
1223
1385
|
values: resourceValues
|
|
1224
1386
|
})
|
|
1225
1387
|
}) : null;
|
|
1226
|
-
$[
|
|
1227
|
-
$[
|
|
1228
|
-
$[
|
|
1229
|
-
$[
|
|
1388
|
+
$[41] = created;
|
|
1389
|
+
$[42] = onClickCloseAlert;
|
|
1390
|
+
$[43] = resourceValues;
|
|
1391
|
+
$[44] = t27;
|
|
1230
1392
|
} else {
|
|
1231
|
-
|
|
1393
|
+
t27 = $[44];
|
|
1232
1394
|
}
|
|
1233
|
-
let
|
|
1234
|
-
if ($[
|
|
1235
|
-
|
|
1395
|
+
let t28;
|
|
1396
|
+
if ($[45] !== deleted || $[46] !== onClickCloseAlert || $[47] !== resourceValues) {
|
|
1397
|
+
t28 = deleted ? /*#__PURE__*/jsx(Alert, {
|
|
1236
1398
|
className: "mb-4",
|
|
1237
1399
|
onClose: onClickCloseAlert,
|
|
1238
1400
|
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
@@ -1240,35 +1402,35 @@ function ResourceIndexPage(t0) {
|
|
|
1240
1402
|
values: resourceValues
|
|
1241
1403
|
})
|
|
1242
1404
|
}) : null;
|
|
1243
|
-
$[
|
|
1244
|
-
$[
|
|
1245
|
-
$[
|
|
1246
|
-
$[46] = t27;
|
|
1247
|
-
} else {
|
|
1248
|
-
t27 = $[46];
|
|
1249
|
-
}
|
|
1250
|
-
let t28;
|
|
1251
|
-
if ($[47] !== actionsProps) {
|
|
1252
|
-
t28 = actionsProps || {};
|
|
1253
|
-
$[47] = actionsProps;
|
|
1405
|
+
$[45] = deleted;
|
|
1406
|
+
$[46] = onClickCloseAlert;
|
|
1407
|
+
$[47] = resourceValues;
|
|
1254
1408
|
$[48] = t28;
|
|
1255
1409
|
} else {
|
|
1256
1410
|
t28 = $[48];
|
|
1257
1411
|
}
|
|
1258
1412
|
let t29;
|
|
1259
|
-
if ($[49] !==
|
|
1260
|
-
t29 = {
|
|
1261
|
-
|
|
1262
|
-
...t28
|
|
1263
|
-
};
|
|
1264
|
-
$[49] = t28;
|
|
1413
|
+
if ($[49] !== actionsProps) {
|
|
1414
|
+
t29 = actionsProps || {};
|
|
1415
|
+
$[49] = actionsProps;
|
|
1265
1416
|
$[50] = t29;
|
|
1266
1417
|
} else {
|
|
1267
1418
|
t29 = $[50];
|
|
1268
1419
|
}
|
|
1269
1420
|
let t30;
|
|
1270
|
-
if ($[51] !==
|
|
1271
|
-
t30 =
|
|
1421
|
+
if ($[51] !== t29) {
|
|
1422
|
+
t30 = {
|
|
1423
|
+
size: "sm",
|
|
1424
|
+
...t29
|
|
1425
|
+
};
|
|
1426
|
+
$[51] = t29;
|
|
1427
|
+
$[52] = t30;
|
|
1428
|
+
} else {
|
|
1429
|
+
t30 = $[52];
|
|
1430
|
+
}
|
|
1431
|
+
let t31;
|
|
1432
|
+
if ($[53] !== listQuery || $[54] !== onQueryChange || $[55] !== onQueryReset || $[56] !== paginated || $[57] !== resource || $[58] !== t30 || $[59] !== theme || $[60] !== url) {
|
|
1433
|
+
t31 = /*#__PURE__*/jsx(ResourceItemsList, {
|
|
1272
1434
|
resource: resource,
|
|
1273
1435
|
baseUrl: url,
|
|
1274
1436
|
query: listQuery,
|
|
@@ -1276,59 +1438,59 @@ function ResourceIndexPage(t0) {
|
|
|
1276
1438
|
onQueryChange: onQueryChange,
|
|
1277
1439
|
onQueryReset: onQueryReset,
|
|
1278
1440
|
theme: theme,
|
|
1279
|
-
actionsProps:
|
|
1441
|
+
actionsProps: t30
|
|
1280
1442
|
});
|
|
1281
|
-
$[
|
|
1282
|
-
$[
|
|
1283
|
-
$[
|
|
1284
|
-
$[
|
|
1285
|
-
$[
|
|
1286
|
-
$[
|
|
1287
|
-
$[
|
|
1288
|
-
$[
|
|
1289
|
-
$[
|
|
1290
|
-
} else {
|
|
1291
|
-
|
|
1443
|
+
$[53] = listQuery;
|
|
1444
|
+
$[54] = onQueryChange;
|
|
1445
|
+
$[55] = onQueryReset;
|
|
1446
|
+
$[56] = paginated;
|
|
1447
|
+
$[57] = resource;
|
|
1448
|
+
$[58] = t30;
|
|
1449
|
+
$[59] = theme;
|
|
1450
|
+
$[60] = url;
|
|
1451
|
+
$[61] = t31;
|
|
1452
|
+
} else {
|
|
1453
|
+
t31 = $[61];
|
|
1292
1454
|
}
|
|
1293
|
-
let
|
|
1294
|
-
if ($[
|
|
1295
|
-
|
|
1296
|
-
className:
|
|
1297
|
-
children: [
|
|
1455
|
+
let t32;
|
|
1456
|
+
if ($[62] !== t27 || $[63] !== t28 || $[64] !== t31) {
|
|
1457
|
+
t32 = /*#__PURE__*/jsxs("div", {
|
|
1458
|
+
className: t26,
|
|
1459
|
+
children: [t27, t28, t31]
|
|
1298
1460
|
});
|
|
1299
|
-
$[
|
|
1300
|
-
$[
|
|
1301
|
-
$[
|
|
1302
|
-
$[
|
|
1461
|
+
$[62] = t27;
|
|
1462
|
+
$[63] = t28;
|
|
1463
|
+
$[64] = t31;
|
|
1464
|
+
$[65] = t32;
|
|
1303
1465
|
} else {
|
|
1304
|
-
|
|
1466
|
+
t32 = $[65];
|
|
1305
1467
|
}
|
|
1306
|
-
let
|
|
1307
|
-
if ($[
|
|
1308
|
-
|
|
1309
|
-
children: [
|
|
1468
|
+
let t33;
|
|
1469
|
+
if ($[66] !== t25 || $[67] !== t32) {
|
|
1470
|
+
t33 = /*#__PURE__*/jsxs(MainLayout, {
|
|
1471
|
+
children: [t25, t32]
|
|
1310
1472
|
});
|
|
1311
|
-
$[
|
|
1312
|
-
$[
|
|
1313
|
-
$[
|
|
1473
|
+
$[66] = t25;
|
|
1474
|
+
$[67] = t32;
|
|
1475
|
+
$[68] = t33;
|
|
1314
1476
|
} else {
|
|
1315
|
-
|
|
1477
|
+
t33 = $[68];
|
|
1316
1478
|
}
|
|
1317
|
-
let
|
|
1318
|
-
if ($[
|
|
1319
|
-
|
|
1479
|
+
let t34;
|
|
1480
|
+
if ($[69] !== resource || $[70] !== t33) {
|
|
1481
|
+
t34 = /*#__PURE__*/jsx(ResourceProvider, {
|
|
1320
1482
|
resource: resource,
|
|
1321
|
-
children:
|
|
1483
|
+
children: t33
|
|
1322
1484
|
});
|
|
1323
|
-
$[
|
|
1324
|
-
$[
|
|
1325
|
-
$[
|
|
1485
|
+
$[69] = resource;
|
|
1486
|
+
$[70] = t33;
|
|
1487
|
+
$[71] = t34;
|
|
1326
1488
|
} else {
|
|
1327
|
-
|
|
1489
|
+
t34 = $[71];
|
|
1328
1490
|
}
|
|
1329
|
-
return
|
|
1491
|
+
return t34;
|
|
1330
1492
|
}
|
|
1331
|
-
function _temp$
|
|
1493
|
+
function _temp$3(it_0) {
|
|
1332
1494
|
return it_0 === "create" ? {
|
|
1333
1495
|
id: "create",
|
|
1334
1496
|
component: ResourceCreateButton,
|
|
@@ -1597,10 +1759,10 @@ function HomePage() {
|
|
|
1597
1759
|
let t0;
|
|
1598
1760
|
let t1;
|
|
1599
1761
|
if ($[0] !== resources) {
|
|
1600
|
-
const visibleResources = resources.filter(_temp$
|
|
1762
|
+
const visibleResources = resources.filter(_temp$2);
|
|
1601
1763
|
T0 = MainLayout;
|
|
1602
1764
|
t0 = "container-sm py-4";
|
|
1603
|
-
t1 = visibleResources.map(_temp2$
|
|
1765
|
+
t1 = visibleResources.map(_temp2$2);
|
|
1604
1766
|
$[0] = resources;
|
|
1605
1767
|
$[1] = T0;
|
|
1606
1768
|
$[2] = t0;
|
|
@@ -1635,7 +1797,7 @@ function HomePage() {
|
|
|
1635
1797
|
}
|
|
1636
1798
|
return t3;
|
|
1637
1799
|
}
|
|
1638
|
-
function _temp2$
|
|
1800
|
+
function _temp2$2(resource) {
|
|
1639
1801
|
const {
|
|
1640
1802
|
id: resourceId
|
|
1641
1803
|
} = resource || {};
|
|
@@ -1643,7 +1805,7 @@ function _temp2$1(resource) {
|
|
|
1643
1805
|
resource: resource
|
|
1644
1806
|
}, `resource-link-${resourceId}`);
|
|
1645
1807
|
}
|
|
1646
|
-
function _temp$
|
|
1808
|
+
function _temp$2(t0) {
|
|
1647
1809
|
const {
|
|
1648
1810
|
settings: t1
|
|
1649
1811
|
} = t0;
|
|
@@ -1726,67 +1888,197 @@ function LoginForm(t0) {
|
|
|
1726
1888
|
return t5;
|
|
1727
1889
|
}
|
|
1728
1890
|
|
|
1729
|
-
function GuestLayout({
|
|
1730
|
-
|
|
1731
|
-
children
|
|
1732
|
-
}) {
|
|
1891
|
+
function GuestLayout(t0) {
|
|
1892
|
+
const $ = c(19);
|
|
1733
1893
|
const {
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1894
|
+
fullscreen: t1,
|
|
1895
|
+
children
|
|
1896
|
+
} = t0;
|
|
1897
|
+
const fullscreen = t1 === undefined ? false : t1;
|
|
1898
|
+
const {
|
|
1899
|
+
theme: t2,
|
|
1900
|
+
background: t3,
|
|
1901
|
+
text: t4
|
|
1737
1902
|
} = usePanneauColorScheme();
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
})
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
}
|
|
1903
|
+
const theme = t2 === undefined ? null : t2;
|
|
1904
|
+
const background = t3 === undefined ? null : t3;
|
|
1905
|
+
const text = t4 === undefined ? null : t4;
|
|
1906
|
+
let t5;
|
|
1907
|
+
if ($[0] !== fullscreen) {
|
|
1908
|
+
t5 = classNames([{
|
|
1909
|
+
"d-flex flex-column min-vh-100": fullscreen
|
|
1910
|
+
}]);
|
|
1911
|
+
$[0] = fullscreen;
|
|
1912
|
+
$[1] = t5;
|
|
1913
|
+
} else {
|
|
1914
|
+
t5 = $[1];
|
|
1915
|
+
}
|
|
1916
|
+
const t6 = theme !== null ? theme : undefined;
|
|
1917
|
+
let t7;
|
|
1918
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1919
|
+
t7 = /*#__PURE__*/jsx(MainNavbar, {
|
|
1920
|
+
className: classNames(["sticky-top", "px-3"])
|
|
1921
|
+
});
|
|
1922
|
+
$[2] = t7;
|
|
1923
|
+
} else {
|
|
1924
|
+
t7 = $[2];
|
|
1925
|
+
}
|
|
1926
|
+
let t8;
|
|
1927
|
+
if ($[3] !== background || $[4] !== fullscreen || $[5] !== text) {
|
|
1928
|
+
t8 = classNames([{
|
|
1929
|
+
"d-flex flex-column flex-grow-1": fullscreen
|
|
1930
|
+
}, background !== null ? `bg-${background}` : null, text !== null ? `text-${text}` : null]);
|
|
1931
|
+
$[3] = background;
|
|
1932
|
+
$[4] = fullscreen;
|
|
1933
|
+
$[5] = text;
|
|
1934
|
+
$[6] = t8;
|
|
1935
|
+
} else {
|
|
1936
|
+
t8 = $[6];
|
|
1937
|
+
}
|
|
1938
|
+
let t9;
|
|
1939
|
+
if ($[7] !== fullscreen) {
|
|
1940
|
+
t9 = classNames({
|
|
1941
|
+
"w-100 my-auto": fullscreen
|
|
1942
|
+
});
|
|
1943
|
+
$[7] = fullscreen;
|
|
1944
|
+
$[8] = t9;
|
|
1945
|
+
} else {
|
|
1946
|
+
t9 = $[8];
|
|
1947
|
+
}
|
|
1948
|
+
let t10;
|
|
1949
|
+
if ($[9] !== children || $[10] !== t9) {
|
|
1950
|
+
t10 = /*#__PURE__*/jsx("div", {
|
|
1951
|
+
className: t9,
|
|
1952
|
+
children: children
|
|
1953
|
+
});
|
|
1954
|
+
$[9] = children;
|
|
1955
|
+
$[10] = t9;
|
|
1956
|
+
$[11] = t10;
|
|
1957
|
+
} else {
|
|
1958
|
+
t10 = $[11];
|
|
1959
|
+
}
|
|
1960
|
+
let t11;
|
|
1961
|
+
if ($[12] !== t10 || $[13] !== t8) {
|
|
1962
|
+
t11 = /*#__PURE__*/jsx("div", {
|
|
1963
|
+
className: t8,
|
|
1964
|
+
children: t10
|
|
1965
|
+
});
|
|
1966
|
+
$[12] = t10;
|
|
1967
|
+
$[13] = t8;
|
|
1968
|
+
$[14] = t11;
|
|
1969
|
+
} else {
|
|
1970
|
+
t11 = $[14];
|
|
1971
|
+
}
|
|
1972
|
+
let t12;
|
|
1973
|
+
if ($[15] !== t11 || $[16] !== t5 || $[17] !== t6) {
|
|
1974
|
+
t12 = /*#__PURE__*/jsxs("div", {
|
|
1975
|
+
className: t5,
|
|
1976
|
+
"data-bs-theme": t6,
|
|
1977
|
+
children: [t7, t11]
|
|
1978
|
+
});
|
|
1979
|
+
$[15] = t11;
|
|
1980
|
+
$[16] = t5;
|
|
1981
|
+
$[17] = t6;
|
|
1982
|
+
$[18] = t12;
|
|
1983
|
+
} else {
|
|
1984
|
+
t12 = $[18];
|
|
1985
|
+
}
|
|
1986
|
+
return t12;
|
|
1759
1987
|
}
|
|
1760
1988
|
|
|
1989
|
+
function getLink(link, defaultLink) {
|
|
1990
|
+
if (typeof link === 'string') {
|
|
1991
|
+
return link;
|
|
1992
|
+
}
|
|
1993
|
+
return link === true ? defaultLink : null;
|
|
1994
|
+
}
|
|
1761
1995
|
function LoginPage() {
|
|
1762
|
-
const $ = c(
|
|
1996
|
+
const $ = c(15);
|
|
1763
1997
|
const route = useUrlGenerator();
|
|
1998
|
+
const {
|
|
1999
|
+
forgotPassword,
|
|
2000
|
+
register
|
|
2001
|
+
} = usePanneauAuth();
|
|
1764
2002
|
let t0;
|
|
1765
|
-
if ($[0] !==
|
|
1766
|
-
t0 = ()
|
|
1767
|
-
|
|
1768
|
-
};
|
|
1769
|
-
$[0] = route;
|
|
2003
|
+
if ($[0] !== forgotPassword) {
|
|
2004
|
+
t0 = getLink(forgotPassword, "/forgot-password");
|
|
2005
|
+
$[0] = forgotPassword;
|
|
1770
2006
|
$[1] = t0;
|
|
1771
2007
|
} else {
|
|
1772
2008
|
t0 = $[1];
|
|
1773
2009
|
}
|
|
1774
|
-
const
|
|
2010
|
+
const forgotPasswordLink = t0;
|
|
1775
2011
|
let t1;
|
|
1776
|
-
if ($[2]
|
|
1777
|
-
t1 =
|
|
2012
|
+
if ($[2] !== register) {
|
|
2013
|
+
t1 = getLink(register, "/register");
|
|
2014
|
+
$[2] = register;
|
|
2015
|
+
$[3] = t1;
|
|
2016
|
+
} else {
|
|
2017
|
+
t1 = $[3];
|
|
2018
|
+
}
|
|
2019
|
+
const registerLink = t1;
|
|
2020
|
+
let t2;
|
|
2021
|
+
if ($[4] !== route) {
|
|
2022
|
+
t2 = () => {
|
|
2023
|
+
window.location.href = route("home");
|
|
2024
|
+
};
|
|
2025
|
+
$[4] = route;
|
|
2026
|
+
$[5] = t2;
|
|
2027
|
+
} else {
|
|
2028
|
+
t2 = $[5];
|
|
2029
|
+
}
|
|
2030
|
+
const onComplete = t2;
|
|
2031
|
+
let t3;
|
|
2032
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2033
|
+
t3 = /*#__PURE__*/jsx("h1", {
|
|
1778
2034
|
className: "mb-4",
|
|
1779
2035
|
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
1780
2036
|
id: "AeOZq+"
|
|
1781
2037
|
})
|
|
1782
2038
|
});
|
|
1783
|
-
$[
|
|
2039
|
+
$[6] = t3;
|
|
1784
2040
|
} else {
|
|
1785
|
-
|
|
2041
|
+
t3 = $[6];
|
|
1786
2042
|
}
|
|
1787
|
-
let
|
|
1788
|
-
if ($[
|
|
1789
|
-
|
|
2043
|
+
let t4;
|
|
2044
|
+
if ($[7] !== onComplete) {
|
|
2045
|
+
t4 = /*#__PURE__*/jsx(LoginForm, {
|
|
2046
|
+
onComplete: onComplete
|
|
2047
|
+
});
|
|
2048
|
+
$[7] = onComplete;
|
|
2049
|
+
$[8] = t4;
|
|
2050
|
+
} else {
|
|
2051
|
+
t4 = $[8];
|
|
2052
|
+
}
|
|
2053
|
+
let t5;
|
|
2054
|
+
if ($[9] !== forgotPasswordLink || $[10] !== registerLink) {
|
|
2055
|
+
t5 = forgotPasswordLink !== null || registerLink !== null ? /*#__PURE__*/jsxs("div", {
|
|
2056
|
+
className: "d-flex flex-wrap gap-3 mt-4",
|
|
2057
|
+
children: [forgotPasswordLink !== null ? /*#__PURE__*/jsx(Link, {
|
|
2058
|
+
href: forgotPasswordLink,
|
|
2059
|
+
external: true,
|
|
2060
|
+
target: "_self",
|
|
2061
|
+
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
2062
|
+
id: "ZBNqY2"
|
|
2063
|
+
})
|
|
2064
|
+
}) : null, registerLink !== null ? /*#__PURE__*/jsx(Link, {
|
|
2065
|
+
href: registerLink,
|
|
2066
|
+
external: true,
|
|
2067
|
+
target: "_self",
|
|
2068
|
+
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
2069
|
+
id: "PQX/ph"
|
|
2070
|
+
})
|
|
2071
|
+
}) : null]
|
|
2072
|
+
}) : null;
|
|
2073
|
+
$[9] = forgotPasswordLink;
|
|
2074
|
+
$[10] = registerLink;
|
|
2075
|
+
$[11] = t5;
|
|
2076
|
+
} else {
|
|
2077
|
+
t5 = $[11];
|
|
2078
|
+
}
|
|
2079
|
+
let t6;
|
|
2080
|
+
if ($[12] !== t4 || $[13] !== t5) {
|
|
2081
|
+
t6 = /*#__PURE__*/jsx(GuestLayout, {
|
|
1790
2082
|
fullscreen: true,
|
|
1791
2083
|
children: /*#__PURE__*/jsx("div", {
|
|
1792
2084
|
className: "container-sm py-4",
|
|
@@ -1794,19 +2086,18 @@ function LoginPage() {
|
|
|
1794
2086
|
className: "row justify-content-center",
|
|
1795
2087
|
children: /*#__PURE__*/jsxs("div", {
|
|
1796
2088
|
className: "col-12 col-sm-8 col-md-6",
|
|
1797
|
-
children: [
|
|
1798
|
-
onComplete: onComplete
|
|
1799
|
-
})]
|
|
2089
|
+
children: [t3, t4, t5]
|
|
1800
2090
|
})
|
|
1801
2091
|
})
|
|
1802
2092
|
})
|
|
1803
2093
|
});
|
|
1804
|
-
$[
|
|
1805
|
-
$[
|
|
2094
|
+
$[12] = t4;
|
|
2095
|
+
$[13] = t5;
|
|
2096
|
+
$[14] = t6;
|
|
1806
2097
|
} else {
|
|
1807
|
-
|
|
2098
|
+
t6 = $[14];
|
|
1808
2099
|
}
|
|
1809
|
-
return
|
|
2100
|
+
return t6;
|
|
1810
2101
|
}
|
|
1811
2102
|
|
|
1812
2103
|
function ErrorPage(t0) {
|
|
@@ -2016,13 +2307,34 @@ function createResourceRoutes(resource, {
|
|
|
2016
2307
|
pages: resourcePages = {},
|
|
2017
2308
|
extraRoutes = []
|
|
2018
2309
|
} = resource;
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
const
|
|
2024
|
-
const
|
|
2025
|
-
|
|
2310
|
+
|
|
2311
|
+
// Resolution order: resource typed key (`pages.show`), resource legacy key
|
|
2312
|
+
// (`pages.resourceShowPage`), panneau typed key (`pages.show`), panneau legacy key
|
|
2313
|
+
// (`pages.showPage`), then the built-in page
|
|
2314
|
+
const ResourceIndexComponent = componentsManager.getComponent(resourcePages?.index?.component) || componentsManager.getComponent(resourcePages?.resourceIndexPage?.component) || componentsManager.getComponent(pages?.index?.component) || componentsManager.getComponent(pages?.indexPage?.component) || ResourceIndexPage;
|
|
2315
|
+
const ResourceShowComponent = componentsManager.getComponent(resourcePages?.show?.component) || componentsManager.getComponent(resourcePages?.resourceShowPage?.component) || componentsManager.getComponent(pages?.show?.component) || componentsManager.getComponent(pages?.showPage?.component) || ResourceShowPage;
|
|
2316
|
+
const ResourceCreateComponent = componentsManager.getComponent(resourcePages?.create?.component) || componentsManager.getComponent(resourcePages?.resourceCreatePage?.component) || componentsManager.getComponent(pages?.create?.component) || componentsManager.getComponent(pages?.createPage?.component) || ResourceCreatePage;
|
|
2317
|
+
const ResourceEditComponent = componentsManager.getComponent(resourcePages?.edit?.component) || componentsManager.getComponent(resourcePages?.resourceEditPage?.component) || componentsManager.getComponent(pages?.edit?.component) || componentsManager.getComponent(pages?.editPage?.component) || ResourceEditPage;
|
|
2318
|
+
const ResourceDeleteComponent = componentsManager.getComponent(resourcePages?.delete?.component) || componentsManager.getComponent(resourcePages?.resourceDeletePage?.component) || componentsManager.getComponent(pages?.delete?.component) || componentsManager.getComponent(pages?.deletePage?.component) || ResourceDeletePage;
|
|
2319
|
+
const ResourceDuplicateComponent = componentsManager.getComponent(resourcePages?.duplicate?.component) || componentsManager.getComponent(resourcePages?.resourceDuplicatePage?.component) || componentsManager.getComponent(pages?.duplicate?.component) || componentsManager.getComponent(pages?.duplicatePage?.component) || ResourceDuplicatePage;
|
|
2320
|
+
|
|
2321
|
+
// Extra routes are registered first so they are not shadowed by the
|
|
2322
|
+
// generic `/:resource/:id` show route
|
|
2323
|
+
const extraRoutesElements = extraRoutes.map(({
|
|
2324
|
+
path,
|
|
2325
|
+
component,
|
|
2326
|
+
...pageProps
|
|
2327
|
+
}) => {
|
|
2328
|
+
const RouteComponent = componentsManager.getComponent(component);
|
|
2329
|
+
return RouteComponent !== null ? /*#__PURE__*/jsx(Route, {
|
|
2330
|
+
path: path,
|
|
2331
|
+
children: () => /*#__PURE__*/jsx(RouteComponent, {
|
|
2332
|
+
resource: resource,
|
|
2333
|
+
...pageProps
|
|
2334
|
+
})
|
|
2335
|
+
}, `route-${path}`) : null;
|
|
2336
|
+
});
|
|
2337
|
+
return [...extraRoutesElements, /*#__PURE__*/jsx(Route, {
|
|
2026
2338
|
path: route('resources.create', {
|
|
2027
2339
|
resource: resourceId
|
|
2028
2340
|
}),
|
|
@@ -2073,20 +2385,7 @@ function createResourceRoutes(resource, {
|
|
|
2073
2385
|
itemId: id,
|
|
2074
2386
|
resource: resource
|
|
2075
2387
|
})
|
|
2076
|
-
}, `${resourceId}-duplicate`),
|
|
2077
|
-
path,
|
|
2078
|
-
component,
|
|
2079
|
-
...pageProps
|
|
2080
|
-
}) => {
|
|
2081
|
-
const RouteComponent = componentsManager.getComponent(component);
|
|
2082
|
-
return RouteComponent !== null ? /*#__PURE__*/jsx(Route, {
|
|
2083
|
-
path: path,
|
|
2084
|
-
children: () => /*#__PURE__*/jsx(RouteComponent, {
|
|
2085
|
-
resource: resource,
|
|
2086
|
-
...pageProps
|
|
2087
|
-
})
|
|
2088
|
-
}, `route-${path}`) : null;
|
|
2089
|
-
}), /*#__PURE__*/jsx(Route, {
|
|
2388
|
+
}, `${resourceId}-duplicate`), /*#__PURE__*/jsx(Route, {
|
|
2090
2389
|
path: route('resources.index', {
|
|
2091
2390
|
resource: resourceId
|
|
2092
2391
|
}),
|
|
@@ -2097,7 +2396,7 @@ function createResourceRoutes(resource, {
|
|
|
2097
2396
|
}
|
|
2098
2397
|
|
|
2099
2398
|
function PanneauRoutes(t0) {
|
|
2100
|
-
const $ = c(
|
|
2399
|
+
const $ = c(22);
|
|
2101
2400
|
const {
|
|
2102
2401
|
statusCode: t1
|
|
2103
2402
|
} = t0;
|
|
@@ -2148,336 +2447,149 @@ function PanneauRoutes(t0) {
|
|
|
2148
2447
|
useEffect(t3, t4);
|
|
2149
2448
|
const {
|
|
2150
2449
|
pages: t5,
|
|
2151
|
-
routes:
|
|
2152
|
-
} = usePanneau();
|
|
2450
|
+
routes: t6
|
|
2451
|
+
} = usePanneau() || {};
|
|
2153
2452
|
const pages = t5 === undefined ? null : t5;
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2453
|
+
const routesDefinition = t6 === undefined ? null : t6;
|
|
2454
|
+
const builtinPages = ["home", "login", "account", "error", "index", "show", "create", "edit", "delete", "duplicate", "indexPage", "showPage", "createPage", "editPage", "deletePage", "duplicatePage"];
|
|
2455
|
+
const otherPages = Object.keys(pages || {}).filter(key => builtinPages.indexOf(key) === -1).reduce((acc, key_0) => ({
|
|
2456
|
+
...acc,
|
|
2457
|
+
[key_0]: pages[key_0]
|
|
2458
|
+
}), {});
|
|
2459
|
+
const {
|
|
2460
|
+
home: t7,
|
|
2461
|
+
login: t8,
|
|
2462
|
+
account: t9,
|
|
2463
|
+
error: t10
|
|
2464
|
+
} = pages || {};
|
|
2465
|
+
const homePage = t7 === undefined ? null : t7;
|
|
2466
|
+
const loginPage = t8 === undefined ? null : t8;
|
|
2467
|
+
const accountPage = t9 === undefined ? null : t9;
|
|
2468
|
+
const errorPage = t10 === undefined ? null : t10;
|
|
2469
|
+
const customRoutes = [...Object.keys(routesDefinition || {}).filter(_temp$1).filter(key_2 => {
|
|
2470
|
+
const routeDef = routesDefinition[key_2];
|
|
2471
|
+
return isObject(routeDef) && typeof routeDef.component !== "undefined" && typeof routeDef.path !== "undefined";
|
|
2472
|
+
}).map(key_3 => routesDefinition[key_3]), ...Object.keys(otherPages).map(key_4 => otherPages[key_4]).filter(_temp2$1)];
|
|
2473
|
+
const HomeComponent = componentsManager.getComponent(homePage?.component) || HomePage;
|
|
2474
|
+
const LoginComponent = componentsManager.getComponent(loginPage?.component) || LoginPage;
|
|
2475
|
+
const AccountComponent = componentsManager.getComponent(accountPage?.component) || AccountPage;
|
|
2476
|
+
const ErrorComponent = componentsManager.getComponent(errorPage?.component) || ErrorPage;
|
|
2477
|
+
if (statusCode !== null) {
|
|
2478
|
+
return /*#__PURE__*/jsx(ErrorComponent, {
|
|
2479
|
+
statusCode: statusCode,
|
|
2480
|
+
...errorPage
|
|
2481
|
+
});
|
|
2160
2482
|
}
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
}), {});
|
|
2178
|
-
let t12;
|
|
2179
|
-
if ($[26] !== pages) {
|
|
2180
|
-
t12 = pages || {};
|
|
2181
|
-
$[26] = pages;
|
|
2182
|
-
$[27] = t12;
|
|
2183
|
-
} else {
|
|
2184
|
-
t12 = $[27];
|
|
2185
|
-
}
|
|
2186
|
-
const {
|
|
2187
|
-
home: t13,
|
|
2188
|
-
login: t14,
|
|
2189
|
-
account: t15,
|
|
2190
|
-
error: t16
|
|
2191
|
-
} = t12;
|
|
2192
|
-
homePage = t13 === undefined ? null : t13;
|
|
2193
|
-
const loginPage = t14 === undefined ? null : t14;
|
|
2194
|
-
const accountPage = t15 === undefined ? null : t15;
|
|
2195
|
-
const errorPage = t16 === undefined ? null : t16;
|
|
2196
|
-
const customRoutes = [...Object.keys(routesDefinition).filter(_temp).filter(key_2 => {
|
|
2197
|
-
const routeDef = routesDefinition[key_2];
|
|
2198
|
-
return isObject(routeDef) && typeof routeDef.component !== "undefined" && typeof routeDef.path !== "undefined";
|
|
2199
|
-
}).map(key_3 => routesDefinition[key_3]), ...Object.keys(otherPages).map(key_4 => otherPages[key_4]).filter(_temp2)];
|
|
2200
|
-
let t17;
|
|
2201
|
-
if ($[28] !== componentsManager || $[29] !== homePage?.component) {
|
|
2202
|
-
t17 = componentsManager.getComponent(homePage?.component) || HomePage;
|
|
2203
|
-
$[28] = componentsManager;
|
|
2204
|
-
$[29] = homePage?.component;
|
|
2205
|
-
$[30] = t17;
|
|
2206
|
-
} else {
|
|
2207
|
-
t17 = $[30];
|
|
2208
|
-
}
|
|
2209
|
-
HomeComponent = t17;
|
|
2210
|
-
let t18;
|
|
2211
|
-
if ($[31] !== componentsManager || $[32] !== loginPage?.component) {
|
|
2212
|
-
t18 = componentsManager.getComponent(loginPage?.component) || LoginPage;
|
|
2213
|
-
$[31] = componentsManager;
|
|
2214
|
-
$[32] = loginPage?.component;
|
|
2215
|
-
$[33] = t18;
|
|
2216
|
-
} else {
|
|
2217
|
-
t18 = $[33];
|
|
2218
|
-
}
|
|
2219
|
-
const LoginComponent = t18;
|
|
2220
|
-
let t19;
|
|
2221
|
-
if ($[34] !== accountPage?.component || $[35] !== componentsManager) {
|
|
2222
|
-
t19 = componentsManager.getComponent(accountPage?.component) || AccountPage;
|
|
2223
|
-
$[34] = accountPage?.component;
|
|
2224
|
-
$[35] = componentsManager;
|
|
2225
|
-
$[36] = t19;
|
|
2226
|
-
} else {
|
|
2227
|
-
t19 = $[36];
|
|
2228
|
-
}
|
|
2229
|
-
const AccountComponent = t19;
|
|
2230
|
-
let t20;
|
|
2231
|
-
if ($[37] !== componentsManager || $[38] !== errorPage?.component) {
|
|
2232
|
-
t20 = componentsManager.getComponent(errorPage?.component) || ErrorPage;
|
|
2233
|
-
$[37] = componentsManager;
|
|
2234
|
-
$[38] = errorPage?.component;
|
|
2235
|
-
$[39] = t20;
|
|
2236
|
-
} else {
|
|
2237
|
-
t20 = $[39];
|
|
2238
|
-
}
|
|
2239
|
-
ErrorComponent = t20;
|
|
2240
|
-
if (statusCode !== null) {
|
|
2241
|
-
let t21;
|
|
2242
|
-
if ($[40] !== ErrorComponent || $[41] !== errorPage || $[42] !== statusCode) {
|
|
2243
|
-
t21 = /*#__PURE__*/jsx(ErrorComponent, {
|
|
2244
|
-
statusCode: statusCode,
|
|
2245
|
-
...errorPage
|
|
2246
|
-
});
|
|
2247
|
-
$[40] = ErrorComponent;
|
|
2248
|
-
$[41] = errorPage;
|
|
2249
|
-
$[42] = statusCode;
|
|
2250
|
-
$[43] = t21;
|
|
2251
|
-
} else {
|
|
2252
|
-
t21 = $[43];
|
|
2253
|
-
}
|
|
2254
|
-
t11 = t21;
|
|
2255
|
-
break bb0;
|
|
2256
|
-
}
|
|
2257
|
-
if (user === null) {
|
|
2258
|
-
const t21 = routes["auth.login"];
|
|
2259
|
-
let t22;
|
|
2260
|
-
if ($[44] !== LoginComponent || $[45] !== loginPage) {
|
|
2261
|
-
t22 = /*#__PURE__*/jsx(LoginComponent, {
|
|
2262
|
-
...loginPage
|
|
2263
|
-
});
|
|
2264
|
-
$[44] = LoginComponent;
|
|
2265
|
-
$[45] = loginPage;
|
|
2266
|
-
$[46] = t22;
|
|
2267
|
-
} else {
|
|
2268
|
-
t22 = $[46];
|
|
2269
|
-
}
|
|
2270
|
-
let t23;
|
|
2271
|
-
if ($[47] !== t21 || $[48] !== t22) {
|
|
2272
|
-
t23 = /*#__PURE__*/jsx(Route, {
|
|
2273
|
-
path: t21,
|
|
2274
|
-
children: t22
|
|
2275
|
-
});
|
|
2276
|
-
$[47] = t21;
|
|
2277
|
-
$[48] = t22;
|
|
2278
|
-
$[49] = t23;
|
|
2279
|
-
} else {
|
|
2280
|
-
t23 = $[49];
|
|
2281
|
-
}
|
|
2282
|
-
let t24;
|
|
2283
|
-
if ($[50] !== route) {
|
|
2284
|
-
t24 = route("auth.login");
|
|
2285
|
-
$[50] = route;
|
|
2286
|
-
$[51] = t24;
|
|
2287
|
-
} else {
|
|
2288
|
-
t24 = $[51];
|
|
2289
|
-
}
|
|
2290
|
-
const t25 = `${t24}?next=${encodeURIComponent(pathname)}`;
|
|
2291
|
-
let t26;
|
|
2292
|
-
if ($[52] !== t25) {
|
|
2293
|
-
t26 = /*#__PURE__*/jsx(Route, {
|
|
2294
|
-
children: /*#__PURE__*/jsx(Redirect, {
|
|
2295
|
-
to: t25
|
|
2296
|
-
})
|
|
2297
|
-
});
|
|
2298
|
-
$[52] = t25;
|
|
2299
|
-
$[53] = t26;
|
|
2300
|
-
} else {
|
|
2301
|
-
t26 = $[53];
|
|
2302
|
-
}
|
|
2303
|
-
let t27;
|
|
2304
|
-
if ($[54] !== t23 || $[55] !== t26) {
|
|
2305
|
-
t27 = /*#__PURE__*/jsxs(Switch, {
|
|
2306
|
-
children: [t23, t26]
|
|
2307
|
-
});
|
|
2308
|
-
$[54] = t23;
|
|
2309
|
-
$[55] = t26;
|
|
2310
|
-
$[56] = t27;
|
|
2311
|
-
} else {
|
|
2312
|
-
t27 = $[56];
|
|
2313
|
-
}
|
|
2314
|
-
t11 = t27;
|
|
2315
|
-
break bb0;
|
|
2316
|
-
}
|
|
2317
|
-
T0 = Switch;
|
|
2318
|
-
if ($[57] !== routes || $[58] !== user) {
|
|
2319
|
-
t7 = user !== null ? /*#__PURE__*/jsx(Route, {
|
|
2320
|
-
path: routes["auth.login"],
|
|
2321
|
-
children: /*#__PURE__*/jsx(Redirect, {
|
|
2322
|
-
to: routes.home,
|
|
2323
|
-
replace: true
|
|
2324
|
-
})
|
|
2325
|
-
}) : null;
|
|
2326
|
-
$[57] = routes;
|
|
2327
|
-
$[58] = user;
|
|
2328
|
-
$[59] = t7;
|
|
2329
|
-
} else {
|
|
2330
|
-
t7 = $[59];
|
|
2331
|
-
}
|
|
2332
|
-
if ($[60] !== componentsManager || $[61] !== pages || $[62] !== resources || $[63] !== route) {
|
|
2333
|
-
let t21;
|
|
2334
|
-
if ($[65] !== componentsManager || $[66] !== pages || $[67] !== route) {
|
|
2335
|
-
t21 = (acc_0, resource) => [...acc_0, ...createResourceRoutes(resource, {
|
|
2336
|
-
route,
|
|
2337
|
-
componentsManager,
|
|
2338
|
-
pages
|
|
2339
|
-
})];
|
|
2340
|
-
$[65] = componentsManager;
|
|
2341
|
-
$[66] = pages;
|
|
2342
|
-
$[67] = route;
|
|
2343
|
-
$[68] = t21;
|
|
2344
|
-
} else {
|
|
2345
|
-
t21 = $[68];
|
|
2346
|
-
}
|
|
2347
|
-
t8 = resources.reduce(t21, []);
|
|
2348
|
-
$[60] = componentsManager;
|
|
2349
|
-
$[61] = pages;
|
|
2350
|
-
$[62] = resources;
|
|
2351
|
-
$[63] = route;
|
|
2352
|
-
$[64] = t8;
|
|
2353
|
-
} else {
|
|
2354
|
-
t8 = $[64];
|
|
2355
|
-
}
|
|
2356
|
-
let t21;
|
|
2357
|
-
if ($[69] !== AccountComponent || $[70] !== accountPage) {
|
|
2358
|
-
t21 = /*#__PURE__*/jsx(AccountComponent, {
|
|
2359
|
-
...accountPage
|
|
2360
|
-
});
|
|
2361
|
-
$[69] = AccountComponent;
|
|
2362
|
-
$[70] = accountPage;
|
|
2363
|
-
$[71] = t21;
|
|
2364
|
-
} else {
|
|
2365
|
-
t21 = $[71];
|
|
2366
|
-
}
|
|
2367
|
-
if ($[72] !== routes.account || $[73] !== t21) {
|
|
2368
|
-
t9 = /*#__PURE__*/jsx(Route, {
|
|
2369
|
-
path: routes.account,
|
|
2370
|
-
children: t21
|
|
2371
|
-
});
|
|
2372
|
-
$[72] = routes.account;
|
|
2373
|
-
$[73] = t21;
|
|
2374
|
-
$[74] = t9;
|
|
2375
|
-
} else {
|
|
2376
|
-
t9 = $[74];
|
|
2377
|
-
}
|
|
2378
|
-
t10 = customRoutes.map(t22 => {
|
|
2379
|
-
const {
|
|
2380
|
-
path: t23,
|
|
2381
|
-
route: t24,
|
|
2382
|
-
component,
|
|
2383
|
-
...props
|
|
2384
|
-
} = t22;
|
|
2385
|
-
const path_0 = t23 === undefined ? null : t23;
|
|
2386
|
-
const pageRoute_0 = t24 === undefined ? null : t24;
|
|
2387
|
-
const PageComponent = componentsManager.getComponent(component);
|
|
2388
|
-
const finalPath = path_0 || routes[pageRoute_0];
|
|
2389
|
-
return PageComponent !== null ? /*#__PURE__*/jsx(Route, {
|
|
2390
|
-
path: path_0 || routes[pageRoute_0],
|
|
2391
|
-
children: /*#__PURE__*/jsx(PageComponent, {
|
|
2392
|
-
...props
|
|
2393
|
-
})
|
|
2394
|
-
}, `custom-route-${finalPath}`) : null;
|
|
2483
|
+
if (user === null) {
|
|
2484
|
+
let t11;
|
|
2485
|
+
if ($[7] !== route) {
|
|
2486
|
+
t11 = route("auth.login");
|
|
2487
|
+
$[7] = route;
|
|
2488
|
+
$[8] = t11;
|
|
2489
|
+
} else {
|
|
2490
|
+
t11 = $[8];
|
|
2491
|
+
}
|
|
2492
|
+
const t12 = `${t11}?next=${encodeURIComponent(pathname)}`;
|
|
2493
|
+
let t13;
|
|
2494
|
+
if ($[9] !== t12) {
|
|
2495
|
+
t13 = /*#__PURE__*/jsx(Route, {
|
|
2496
|
+
children: /*#__PURE__*/jsx(Redirect, {
|
|
2497
|
+
to: t12
|
|
2498
|
+
})
|
|
2395
2499
|
});
|
|
2500
|
+
$[9] = t12;
|
|
2501
|
+
$[10] = t13;
|
|
2502
|
+
} else {
|
|
2503
|
+
t13 = $[10];
|
|
2396
2504
|
}
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
$[16] = user;
|
|
2406
|
-
$[17] = ErrorComponent;
|
|
2407
|
-
$[18] = HomeComponent;
|
|
2408
|
-
$[19] = T0;
|
|
2409
|
-
$[20] = homePage;
|
|
2410
|
-
$[21] = t10;
|
|
2411
|
-
$[22] = t11;
|
|
2412
|
-
$[23] = t7;
|
|
2413
|
-
$[24] = t8;
|
|
2414
|
-
$[25] = t9;
|
|
2415
|
-
} else {
|
|
2416
|
-
ErrorComponent = $[17];
|
|
2417
|
-
HomeComponent = $[18];
|
|
2418
|
-
T0 = $[19];
|
|
2419
|
-
homePage = $[20];
|
|
2420
|
-
t10 = $[21];
|
|
2421
|
-
t11 = $[22];
|
|
2422
|
-
t7 = $[23];
|
|
2423
|
-
t8 = $[24];
|
|
2424
|
-
t9 = $[25];
|
|
2425
|
-
}
|
|
2426
|
-
if (t11 !== Symbol.for("react.early_return_sentinel")) {
|
|
2427
|
-
return t11;
|
|
2505
|
+
return /*#__PURE__*/jsxs(Switch, {
|
|
2506
|
+
children: [/*#__PURE__*/jsx(Route, {
|
|
2507
|
+
path: routes["auth.login"],
|
|
2508
|
+
children: /*#__PURE__*/jsx(LoginComponent, {
|
|
2509
|
+
...loginPage
|
|
2510
|
+
})
|
|
2511
|
+
}), t13]
|
|
2512
|
+
});
|
|
2428
2513
|
}
|
|
2429
|
-
let
|
|
2430
|
-
if ($[
|
|
2431
|
-
|
|
2514
|
+
let t11;
|
|
2515
|
+
if ($[11] !== routes || $[12] !== user) {
|
|
2516
|
+
t11 = user !== null ? /*#__PURE__*/jsx(Route, {
|
|
2517
|
+
path: routes["auth.login"],
|
|
2518
|
+
children: /*#__PURE__*/jsx(Redirect, {
|
|
2519
|
+
to: routes.home,
|
|
2520
|
+
replace: true
|
|
2521
|
+
})
|
|
2522
|
+
}) : null;
|
|
2523
|
+
$[11] = routes;
|
|
2524
|
+
$[12] = user;
|
|
2525
|
+
$[13] = t11;
|
|
2526
|
+
} else {
|
|
2527
|
+
t11 = $[13];
|
|
2528
|
+
}
|
|
2529
|
+
let t15;
|
|
2530
|
+
if ($[14] !== HomeComponent || $[15] !== homePage) {
|
|
2531
|
+
t15 = /*#__PURE__*/jsx(HomeComponent, {
|
|
2432
2532
|
...homePage
|
|
2433
2533
|
});
|
|
2434
|
-
$[
|
|
2435
|
-
$[
|
|
2436
|
-
$[
|
|
2534
|
+
$[14] = HomeComponent;
|
|
2535
|
+
$[15] = homePage;
|
|
2536
|
+
$[16] = t15;
|
|
2437
2537
|
} else {
|
|
2438
|
-
|
|
2538
|
+
t15 = $[16];
|
|
2439
2539
|
}
|
|
2440
|
-
let
|
|
2441
|
-
if ($[
|
|
2442
|
-
|
|
2540
|
+
let t16;
|
|
2541
|
+
if ($[17] !== routes.home || $[18] !== t15) {
|
|
2542
|
+
t16 = /*#__PURE__*/jsx(Route, {
|
|
2443
2543
|
path: routes.home,
|
|
2444
|
-
children:
|
|
2544
|
+
children: t15
|
|
2445
2545
|
});
|
|
2446
|
-
$[
|
|
2447
|
-
$[
|
|
2448
|
-
$[
|
|
2546
|
+
$[17] = routes.home;
|
|
2547
|
+
$[18] = t15;
|
|
2548
|
+
$[19] = t16;
|
|
2449
2549
|
} else {
|
|
2450
|
-
|
|
2550
|
+
t16 = $[19];
|
|
2451
2551
|
}
|
|
2452
|
-
let
|
|
2453
|
-
if ($[
|
|
2454
|
-
|
|
2552
|
+
let t17;
|
|
2553
|
+
if ($[20] !== ErrorComponent) {
|
|
2554
|
+
t17 = /*#__PURE__*/jsx(Route, {
|
|
2455
2555
|
children: /*#__PURE__*/jsx(ErrorComponent, {})
|
|
2456
2556
|
});
|
|
2457
|
-
$[
|
|
2458
|
-
$[
|
|
2459
|
-
} else {
|
|
2460
|
-
|
|
2461
|
-
}
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2557
|
+
$[20] = ErrorComponent;
|
|
2558
|
+
$[21] = t17;
|
|
2559
|
+
} else {
|
|
2560
|
+
t17 = $[21];
|
|
2561
|
+
}
|
|
2562
|
+
return /*#__PURE__*/jsxs(Switch, {
|
|
2563
|
+
children: [t11, resources.reduce((acc_0, resource) => [...acc_0, ...createResourceRoutes(resource, {
|
|
2564
|
+
route,
|
|
2565
|
+
componentsManager,
|
|
2566
|
+
pages
|
|
2567
|
+
})], []), /*#__PURE__*/jsx(Route, {
|
|
2568
|
+
path: routes.account,
|
|
2569
|
+
children: /*#__PURE__*/jsx(AccountComponent, {
|
|
2570
|
+
...accountPage
|
|
2571
|
+
})
|
|
2572
|
+
}), customRoutes.map(t12 => {
|
|
2573
|
+
const {
|
|
2574
|
+
path: t13,
|
|
2575
|
+
route: t14,
|
|
2576
|
+
component,
|
|
2577
|
+
...props
|
|
2578
|
+
} = t12;
|
|
2579
|
+
const path_0 = t13 === undefined ? null : t13;
|
|
2580
|
+
const pageRoute_0 = t14 === undefined ? null : t14;
|
|
2581
|
+
const PageComponent = componentsManager.getComponent(component);
|
|
2582
|
+
const finalPath = path_0 || routes[pageRoute_0];
|
|
2583
|
+
return PageComponent !== null ? /*#__PURE__*/jsx(Route, {
|
|
2584
|
+
path: path_0 || routes[pageRoute_0],
|
|
2585
|
+
children: /*#__PURE__*/jsx(PageComponent, {
|
|
2586
|
+
...props
|
|
2587
|
+
})
|
|
2588
|
+
}, `custom-route-${finalPath}`) : null;
|
|
2589
|
+
}), t16, t17]
|
|
2590
|
+
});
|
|
2479
2591
|
}
|
|
2480
|
-
function _temp2(t0) {
|
|
2592
|
+
function _temp2$1(t0) {
|
|
2481
2593
|
const {
|
|
2482
2594
|
path: t1,
|
|
2483
2595
|
route: t2
|
|
@@ -2486,115 +2598,346 @@ function _temp2(t0) {
|
|
|
2486
2598
|
const pageRoute = t2 === undefined ? null : t2;
|
|
2487
2599
|
return path !== null || pageRoute !== null;
|
|
2488
2600
|
}
|
|
2489
|
-
function _temp(key_1) {
|
|
2601
|
+
function _temp$1(key_1) {
|
|
2490
2602
|
return key_1.match(/^(resources\.|auth\.)/) === null && key_1 !== "home" && key_1 !== "account";
|
|
2491
2603
|
}
|
|
2492
2604
|
|
|
2493
2605
|
const pathToRegexpParser = createPathToRegexpParser();
|
|
2494
2606
|
const DEFAULT_ROUTES = {};
|
|
2495
2607
|
const DEFAULT_LOCALES = [];
|
|
2496
|
-
function Container({
|
|
2497
|
-
|
|
2498
|
-
forms: providedForms = null,
|
|
2499
|
-
fields: providedFields = null,
|
|
2500
|
-
components = null,
|
|
2501
|
-
user = null,
|
|
2502
|
-
memoryRouter = false,
|
|
2503
|
-
baseUrl = null,
|
|
2504
|
-
uppy = null,
|
|
2505
|
-
statusCode = null
|
|
2506
|
-
}) {
|
|
2608
|
+
function Container(t0) {
|
|
2609
|
+
const $ = c(65);
|
|
2507
2610
|
const {
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2611
|
+
definition,
|
|
2612
|
+
forms: t1,
|
|
2613
|
+
fields: t2,
|
|
2614
|
+
components: t3,
|
|
2615
|
+
user: t4,
|
|
2616
|
+
memoryRouter: t5,
|
|
2617
|
+
baseUrl: t6,
|
|
2618
|
+
uppy: t7,
|
|
2619
|
+
statusCode: t8
|
|
2620
|
+
} = t0;
|
|
2621
|
+
const providedForms = t1 === undefined ? null : t1;
|
|
2622
|
+
const providedFields = t2 === undefined ? null : t2;
|
|
2623
|
+
const components = t3 === undefined ? null : t3;
|
|
2624
|
+
const user = t4 === undefined ? null : t4;
|
|
2625
|
+
const memoryRouter = t5 === undefined ? false : t5;
|
|
2626
|
+
const baseUrl = t6 === undefined ? null : t6;
|
|
2627
|
+
const uppy = t7 === undefined ? null : t7;
|
|
2628
|
+
const statusCode = t8 === undefined ? null : t8;
|
|
2629
|
+
let fields;
|
|
2630
|
+
let forms;
|
|
2631
|
+
let isMemoryRouter;
|
|
2632
|
+
let locale;
|
|
2633
|
+
let locales;
|
|
2634
|
+
let routes;
|
|
2635
|
+
let t10;
|
|
2636
|
+
let t9;
|
|
2637
|
+
if ($[0] !== definition || $[1] !== memoryRouter) {
|
|
2638
|
+
const {
|
|
2639
|
+
intl: t11,
|
|
2640
|
+
routes: t12,
|
|
2641
|
+
resources: t13,
|
|
2642
|
+
settings: t14,
|
|
2643
|
+
forms: t15,
|
|
2644
|
+
fields: t16
|
|
2645
|
+
} = definition || {};
|
|
2646
|
+
forms = t15;
|
|
2647
|
+
fields = t16;
|
|
2648
|
+
const {
|
|
2649
|
+
locale: t17,
|
|
2650
|
+
locales: t18,
|
|
2511
2651
|
messages
|
|
2512
|
-
} = {}
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2652
|
+
} = t11 === undefined ? {} : t11;
|
|
2653
|
+
locale = t17 === undefined ? "en" : t17;
|
|
2654
|
+
locales = t18 === undefined ? DEFAULT_LOCALES : t18;
|
|
2655
|
+
routes = t12 === undefined ? DEFAULT_ROUTES : t12;
|
|
2656
|
+
const resources = t13 === undefined ? [] : t13;
|
|
2657
|
+
const {
|
|
2658
|
+
memoryRouter: t19
|
|
2659
|
+
} = t14 === undefined ? {} : t14;
|
|
2660
|
+
const usesMemoryRouter = t19 === undefined ? false : t19;
|
|
2661
|
+
isMemoryRouter = memoryRouter || usesMemoryRouter || false;
|
|
2662
|
+
t9 = messages;
|
|
2663
|
+
t10 = resources.reduce(_temp, {});
|
|
2664
|
+
$[0] = definition;
|
|
2665
|
+
$[1] = memoryRouter;
|
|
2666
|
+
$[2] = fields;
|
|
2667
|
+
$[3] = forms;
|
|
2668
|
+
$[4] = isMemoryRouter;
|
|
2669
|
+
$[5] = locale;
|
|
2670
|
+
$[6] = locales;
|
|
2671
|
+
$[7] = routes;
|
|
2672
|
+
$[8] = t10;
|
|
2673
|
+
$[9] = t9;
|
|
2674
|
+
} else {
|
|
2675
|
+
fields = $[2];
|
|
2676
|
+
forms = $[3];
|
|
2677
|
+
isMemoryRouter = $[4];
|
|
2678
|
+
locale = $[5];
|
|
2679
|
+
locales = $[6];
|
|
2680
|
+
routes = $[7];
|
|
2681
|
+
t10 = $[8];
|
|
2682
|
+
t9 = $[9];
|
|
2683
|
+
}
|
|
2684
|
+
let t11;
|
|
2685
|
+
if ($[10] !== t10 || $[11] !== t9) {
|
|
2686
|
+
t11 = {
|
|
2687
|
+
...t9,
|
|
2688
|
+
...t10
|
|
2689
|
+
};
|
|
2690
|
+
$[10] = t10;
|
|
2691
|
+
$[11] = t9;
|
|
2692
|
+
$[12] = t11;
|
|
2693
|
+
} else {
|
|
2694
|
+
t11 = $[12];
|
|
2695
|
+
}
|
|
2696
|
+
const extraMessages = t11;
|
|
2697
|
+
let t12;
|
|
2698
|
+
if ($[13] !== baseUrl) {
|
|
2699
|
+
t12 = () => {
|
|
2700
|
+
window.location.href = baseUrl || "/";
|
|
2701
|
+
};
|
|
2702
|
+
$[13] = baseUrl;
|
|
2703
|
+
$[14] = t12;
|
|
2704
|
+
} else {
|
|
2705
|
+
t12 = $[14];
|
|
2706
|
+
}
|
|
2707
|
+
const onUnauthorized = t12;
|
|
2708
|
+
const onLogout = _temp2;
|
|
2543
2709
|
const {
|
|
2544
2710
|
hook: memoryLocationHook,
|
|
2545
2711
|
searchHook: memorySearchHook
|
|
2546
2712
|
} = useMemoryRouter();
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2713
|
+
const t13 = isMemoryRouter ? memoryLocationHook : undefined;
|
|
2714
|
+
const t14 = isMemoryRouter ? memorySearchHook : undefined;
|
|
2715
|
+
let t15;
|
|
2716
|
+
if ($[15] !== fields) {
|
|
2717
|
+
t15 = fields || [];
|
|
2718
|
+
$[15] = fields;
|
|
2719
|
+
$[16] = t15;
|
|
2720
|
+
} else {
|
|
2721
|
+
t15 = $[16];
|
|
2722
|
+
}
|
|
2723
|
+
let t16;
|
|
2724
|
+
if ($[17] !== providedFields) {
|
|
2725
|
+
t16 = providedFields || [];
|
|
2726
|
+
$[17] = providedFields;
|
|
2727
|
+
$[18] = t16;
|
|
2728
|
+
} else {
|
|
2729
|
+
t16 = $[18];
|
|
2730
|
+
}
|
|
2731
|
+
let t17;
|
|
2732
|
+
if ($[19] !== t15 || $[20] !== t16) {
|
|
2733
|
+
t17 = [...t15, ...t16];
|
|
2734
|
+
$[19] = t15;
|
|
2735
|
+
$[20] = t16;
|
|
2736
|
+
$[21] = t17;
|
|
2737
|
+
} else {
|
|
2738
|
+
t17 = $[21];
|
|
2739
|
+
}
|
|
2740
|
+
let t18;
|
|
2741
|
+
if ($[22] !== forms) {
|
|
2742
|
+
t18 = forms || [];
|
|
2743
|
+
$[22] = forms;
|
|
2744
|
+
$[23] = t18;
|
|
2745
|
+
} else {
|
|
2746
|
+
t18 = $[23];
|
|
2747
|
+
}
|
|
2748
|
+
let t19;
|
|
2749
|
+
if ($[24] !== providedForms) {
|
|
2750
|
+
t19 = providedForms || [];
|
|
2751
|
+
$[24] = providedForms;
|
|
2752
|
+
$[25] = t19;
|
|
2753
|
+
} else {
|
|
2754
|
+
t19 = $[25];
|
|
2755
|
+
}
|
|
2756
|
+
let t20;
|
|
2757
|
+
if ($[26] !== t18 || $[27] !== t19) {
|
|
2758
|
+
t20 = [...t18, ...t19];
|
|
2759
|
+
$[26] = t18;
|
|
2760
|
+
$[27] = t19;
|
|
2761
|
+
$[28] = t20;
|
|
2762
|
+
} else {
|
|
2763
|
+
t20 = $[28];
|
|
2764
|
+
}
|
|
2765
|
+
let t21;
|
|
2766
|
+
if ($[29] !== statusCode) {
|
|
2767
|
+
t21 = /*#__PURE__*/jsx(PanneauRoutes, {
|
|
2768
|
+
statusCode: statusCode
|
|
2769
|
+
});
|
|
2770
|
+
$[29] = statusCode;
|
|
2771
|
+
$[30] = t21;
|
|
2772
|
+
} else {
|
|
2773
|
+
t21 = $[30];
|
|
2774
|
+
}
|
|
2775
|
+
let t22;
|
|
2776
|
+
if ($[31] !== components || $[32] !== t21) {
|
|
2777
|
+
t22 = /*#__PURE__*/jsx(ComponentsProvider, {
|
|
2778
|
+
components: components,
|
|
2779
|
+
children: t21
|
|
2780
|
+
});
|
|
2781
|
+
$[31] = components;
|
|
2782
|
+
$[32] = t21;
|
|
2783
|
+
$[33] = t22;
|
|
2784
|
+
} else {
|
|
2785
|
+
t22 = $[33];
|
|
2786
|
+
}
|
|
2787
|
+
let t23;
|
|
2788
|
+
if ($[34] !== t22 || $[35] !== user) {
|
|
2789
|
+
t23 = /*#__PURE__*/jsx(AuthProvider, {
|
|
2790
|
+
user: user,
|
|
2791
|
+
onLogout: onLogout,
|
|
2792
|
+
children: t22
|
|
2793
|
+
});
|
|
2794
|
+
$[34] = t22;
|
|
2795
|
+
$[35] = user;
|
|
2796
|
+
$[36] = t23;
|
|
2797
|
+
} else {
|
|
2798
|
+
t23 = $[36];
|
|
2799
|
+
}
|
|
2800
|
+
let t24;
|
|
2801
|
+
if ($[37] !== baseUrl || $[38] !== onUnauthorized || $[39] !== t23) {
|
|
2802
|
+
t24 = /*#__PURE__*/jsx(ListsProvider, {
|
|
2803
|
+
children: /*#__PURE__*/jsx(DisplaysProvider, {
|
|
2804
|
+
children: /*#__PURE__*/jsx(FiltersProvider, {
|
|
2805
|
+
children: /*#__PURE__*/jsx(ActionsProvider, {
|
|
2806
|
+
children: /*#__PURE__*/jsx(ModalProvider, {
|
|
2807
|
+
children: /*#__PURE__*/jsx(ModalsProvider, {
|
|
2808
|
+
children: /*#__PURE__*/jsx(DataProvider, {
|
|
2809
|
+
baseUrl: baseUrl,
|
|
2810
|
+
onUnauthorized: onUnauthorized,
|
|
2811
|
+
children: t23
|
|
2590
2812
|
})
|
|
2591
2813
|
})
|
|
2592
2814
|
})
|
|
2593
2815
|
})
|
|
2594
2816
|
})
|
|
2595
2817
|
})
|
|
2596
|
-
})
|
|
2597
|
-
|
|
2818
|
+
});
|
|
2819
|
+
$[37] = baseUrl;
|
|
2820
|
+
$[38] = onUnauthorized;
|
|
2821
|
+
$[39] = t23;
|
|
2822
|
+
$[40] = t24;
|
|
2823
|
+
} else {
|
|
2824
|
+
t24 = $[40];
|
|
2825
|
+
}
|
|
2826
|
+
let t25;
|
|
2827
|
+
if ($[41] !== t20 || $[42] !== t24) {
|
|
2828
|
+
t25 = /*#__PURE__*/jsx(FormsProvider, {
|
|
2829
|
+
definitions: t20,
|
|
2830
|
+
children: t24
|
|
2831
|
+
});
|
|
2832
|
+
$[41] = t20;
|
|
2833
|
+
$[42] = t24;
|
|
2834
|
+
$[43] = t25;
|
|
2835
|
+
} else {
|
|
2836
|
+
t25 = $[43];
|
|
2837
|
+
}
|
|
2838
|
+
let t26;
|
|
2839
|
+
if ($[44] !== t17 || $[45] !== t25) {
|
|
2840
|
+
t26 = /*#__PURE__*/jsx(FieldsProvider, {
|
|
2841
|
+
definitions: t17,
|
|
2842
|
+
children: t25
|
|
2843
|
+
});
|
|
2844
|
+
$[44] = t17;
|
|
2845
|
+
$[45] = t25;
|
|
2846
|
+
$[46] = t26;
|
|
2847
|
+
} else {
|
|
2848
|
+
t26 = $[46];
|
|
2849
|
+
}
|
|
2850
|
+
let t27;
|
|
2851
|
+
if ($[47] !== routes || $[48] !== t26) {
|
|
2852
|
+
t27 = /*#__PURE__*/jsx(RoutesProvider, {
|
|
2853
|
+
routes: routes,
|
|
2854
|
+
children: t26
|
|
2855
|
+
});
|
|
2856
|
+
$[47] = routes;
|
|
2857
|
+
$[48] = t26;
|
|
2858
|
+
$[49] = t27;
|
|
2859
|
+
} else {
|
|
2860
|
+
t27 = $[49];
|
|
2861
|
+
}
|
|
2862
|
+
let t28;
|
|
2863
|
+
if ($[50] !== t27 || $[51] !== uppy) {
|
|
2864
|
+
t28 = /*#__PURE__*/jsx(UppyProvider, {
|
|
2865
|
+
...uppy,
|
|
2866
|
+
children: t27
|
|
2867
|
+
});
|
|
2868
|
+
$[50] = t27;
|
|
2869
|
+
$[51] = uppy;
|
|
2870
|
+
$[52] = t28;
|
|
2871
|
+
} else {
|
|
2872
|
+
t28 = $[52];
|
|
2873
|
+
}
|
|
2874
|
+
let t29;
|
|
2875
|
+
if ($[53] !== definition || $[54] !== t28) {
|
|
2876
|
+
t29 = /*#__PURE__*/jsx(PanneauProvider, {
|
|
2877
|
+
definition: definition,
|
|
2878
|
+
children: t28
|
|
2879
|
+
});
|
|
2880
|
+
$[53] = definition;
|
|
2881
|
+
$[54] = t28;
|
|
2882
|
+
$[55] = t29;
|
|
2883
|
+
} else {
|
|
2884
|
+
t29 = $[55];
|
|
2885
|
+
}
|
|
2886
|
+
let t30;
|
|
2887
|
+
if ($[56] !== extraMessages || $[57] !== locale || $[58] !== locales || $[59] !== t29) {
|
|
2888
|
+
t30 = /*#__PURE__*/jsx(IntlProvider, {
|
|
2889
|
+
locale: locale,
|
|
2890
|
+
locales: locales,
|
|
2891
|
+
extraMessages: extraMessages,
|
|
2892
|
+
children: t29
|
|
2893
|
+
});
|
|
2894
|
+
$[56] = extraMessages;
|
|
2895
|
+
$[57] = locale;
|
|
2896
|
+
$[58] = locales;
|
|
2897
|
+
$[59] = t29;
|
|
2898
|
+
$[60] = t30;
|
|
2899
|
+
} else {
|
|
2900
|
+
t30 = $[60];
|
|
2901
|
+
}
|
|
2902
|
+
let t31;
|
|
2903
|
+
if ($[61] !== t13 || $[62] !== t14 || $[63] !== t30) {
|
|
2904
|
+
t31 = /*#__PURE__*/jsx(Router, {
|
|
2905
|
+
hook: t13,
|
|
2906
|
+
searchHook: t14,
|
|
2907
|
+
parser: pathToRegexpParser,
|
|
2908
|
+
children: t30
|
|
2909
|
+
});
|
|
2910
|
+
$[61] = t13;
|
|
2911
|
+
$[62] = t14;
|
|
2912
|
+
$[63] = t30;
|
|
2913
|
+
$[64] = t31;
|
|
2914
|
+
} else {
|
|
2915
|
+
t31 = $[64];
|
|
2916
|
+
}
|
|
2917
|
+
return t31;
|
|
2918
|
+
}
|
|
2919
|
+
function _temp2() {
|
|
2920
|
+
window.location.reload();
|
|
2921
|
+
}
|
|
2922
|
+
function _temp(allMessages, t0) {
|
|
2923
|
+
const {
|
|
2924
|
+
id,
|
|
2925
|
+
intl: t1
|
|
2926
|
+
} = t0;
|
|
2927
|
+
const {
|
|
2928
|
+
messages: t2
|
|
2929
|
+
} = t1 === undefined ? {} : t1;
|
|
2930
|
+
const resourceMessages = t2 === undefined ? {} : t2;
|
|
2931
|
+
return {
|
|
2932
|
+
...allMessages,
|
|
2933
|
+
...Object.keys(resourceMessages).reduce((allResourceMessages, key) => {
|
|
2934
|
+
const messageKey = `resources.${id}.${key}`;
|
|
2935
|
+
return {
|
|
2936
|
+
...allResourceMessages,
|
|
2937
|
+
[messageKey]: resourceMessages[key]
|
|
2938
|
+
};
|
|
2939
|
+
}, {})
|
|
2940
|
+
};
|
|
2598
2941
|
}
|
|
2599
2942
|
|
|
2600
2943
|
function ResourceFilters(props) {
|