@panneau/app 4.0.84 → 4.1.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/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, Redirect, Switch, Router } from 'wouter';
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, PanneauProvider, RoutesProvider, ModalProvider, ComponentsProvider } from '@panneau/core/contexts';
6
+ import { useUrlGenerator, usePanneauResources, usePanneau, usePanneauColorScheme, ResourceProvider, useActionsComponentsManager, 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$5).map(t5);
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$5(t0) {
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(31);
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
- return isArray(lastItem) ? [...currentItems.slice(0, currentItems.length - 1), [...lastItem, item]] : [...currentItems, [item]];
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$4).reduce(t10, []).map(t11);
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] !== loading || $[27] !== props || $[28] !== t10 || $[29] !== vertical) {
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] = loading;
359
- $[27] = props;
360
- $[28] = t10;
361
- $[29] = vertical;
362
- $[30] = t11;
358
+ $[26] = props;
359
+ $[27] = t10;
360
+ $[28] = vertical;
361
+ $[29] = t11;
363
362
  } else {
364
- t11 = $[30];
363
+ t11 = $[29];
365
364
  }
366
365
  return t11;
367
366
  }
368
- function _temp$4(it) {
367
+ function _temp$5(it) {
369
368
  return it !== null;
370
369
  }
371
370
 
372
- function MainLayout({
373
- fullscreen = false,
374
- loading = false,
375
- children = null
376
- }) {
371
+ function MainLayout(t0) {
372
+ const $ = c(29);
373
+ const {
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;
377
381
  const {
378
- theme = null,
379
- sidebarPosition = null,
380
- background = null,
381
- text = null
382
+ theme: t4,
383
+ sidebarPosition: t5,
384
+ background: t6,
385
+ text: t7
382
386
  } = usePanneauColorScheme();
383
- const vertical = sidebarPosition === 'left' || sidebarPosition === 'right';
384
- return /*#__PURE__*/jsxs("div", {
385
- className: classNames(['d-flex', 'min-vh-100', {
386
- 'flex-column': !vertical
387
- }]),
388
- "data-bs-theme": theme !== null ? theme : undefined,
389
- children: [/*#__PURE__*/jsx(MainNavbar, {
390
- className: classNames([{
391
- 'shadow-sm': !vertical,
392
- 'border-bottom': !vertical,
393
- 'sticky-top': !vertical,
394
- 'px-3': !vertical,
395
- 'pe-3': vertical && sidebarPosition === 'left',
396
- 'ps-3': vertical && sidebarPosition === 'right',
397
- 'me-2': vertical && sidebarPosition === 'left',
398
- 'ms-2': vertical && sidebarPosition === 'right'
399
- // [styles.navbar]: true,
400
- // [styles[sidebarPosition]]: sidebarPosition !== null,
401
- // [styles.verticalNav]: vertical,
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
- }), /*#__PURE__*/jsx("div", {
407
- className: classNames(['flex-grow-1', {
408
- 'd-flex flex-column': fullscreen,
409
- [`bg-${background}`]: background !== null,
410
- [`text-${text}`]: text !== null
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
- }), /*#__PURE__*/jsx(Modals, {
414
- theme: theme
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
- title = null,
421
- actions = null,
422
- small = false,
423
- className = null,
424
- children = null
425
- }) {
426
- // TODO: fix page header components
427
- // const { components } = usePanneau();
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
- const inner = /*#__PURE__*/jsxs("div", {
433
- className: "d-flex align-items-center flex-wrap",
434
- children: [title !== null ? /*#__PURE__*/jsx("h1", {
435
- className: classNames(['mb-0', 'h2']),
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, actions !== null ? /*#__PURE__*/jsx("div", {
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
- return /*#__PURE__*/jsxs("div", {
445
- className: classNames(['py-4', {
446
- [`bg-${background}`]: background !== null,
447
- [`text-${text}`]: text !== null,
448
- [`border-bottom`]: background || text !== null,
449
- [className]: className !== null
450
- }]),
451
- children: [/*#__PURE__*/jsx("div", {
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
- }), children]
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(20);
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 type = t2 === undefined ? null : t2;
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 t3;
489
- if ($[2] !== navigate || $[3] !== resourceRoute) {
490
- t3 = () => {
642
+ let t4;
643
+ if ($[4] !== navigate || $[5] !== resourceRoute) {
644
+ t4 = () => {
491
645
  navigate(`${resourceRoute("index")}?created=true`);
492
646
  };
493
- $[2] = navigate;
494
- $[3] = resourceRoute;
495
- $[4] = t3;
647
+ $[4] = navigate;
648
+ $[5] = resourceRoute;
649
+ $[6] = t4;
496
650
  } else {
497
- t3 = $[4];
651
+ t4 = $[6];
498
652
  }
499
- const onComplete = t3;
500
- let t4;
501
- if ($[5] !== resourceValues) {
502
- t4 = /*#__PURE__*/jsx(FormattedMessage, {
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
- $[5] = resourceValues;
507
- $[6] = t4;
660
+ $[7] = resourceValues;
661
+ $[8] = t5;
508
662
  } else {
509
- t4 = $[6];
663
+ t5 = $[8];
510
664
  }
511
- let t5;
512
- if ($[7] !== typeName) {
513
- t5 = typeName !== null ? /*#__PURE__*/jsxs("span", {
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
- $[7] = typeName;
518
- $[8] = t5;
671
+ $[9] = typeName;
672
+ $[10] = t6;
519
673
  } else {
520
- t5 = $[8];
674
+ t6 = $[10];
521
675
  }
522
- let t6;
523
- if ($[9] !== t4 || $[10] !== t5) {
524
- t6 = /*#__PURE__*/jsx(PageHeader, {
676
+ let t7;
677
+ if ($[11] !== t5 || $[12] !== t6) {
678
+ t7 = /*#__PURE__*/jsx(PageHeader, {
525
679
  title: /*#__PURE__*/jsxs(Fragment, {
526
- children: [t4, t5]
680
+ children: [t5, t6]
527
681
  }),
528
682
  small: true
529
683
  });
530
- $[9] = t4;
531
- $[10] = t5;
532
- $[11] = t6;
684
+ $[11] = t5;
685
+ $[12] = t6;
686
+ $[13] = t7;
533
687
  } else {
534
- t6 = $[11];
688
+ t7 = $[13];
535
689
  }
536
- let t7;
537
- if ($[12] !== onComplete || $[13] !== resource || $[14] !== t6 || $[15] !== type) {
538
- t7 = /*#__PURE__*/jsx(MainLayout, {
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: t6
698
+ header: t7
545
699
  })
546
700
  });
547
- $[12] = onComplete;
548
- $[13] = resource;
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
- t7 = $[16];
707
+ t8 = $[18];
554
708
  }
555
- let t8;
556
- if ($[17] !== resource || $[18] !== t7) {
557
- t8 = /*#__PURE__*/jsx(ResourceProvider, {
709
+ let t9;
710
+ if ($[19] !== resource || $[20] !== t8) {
711
+ t9 = /*#__PURE__*/jsx(ResourceProvider, {
558
712
  resource: resource,
559
- children: t7
713
+ children: t8
560
714
  });
561
- $[17] = resource;
562
- $[18] = t7;
563
- $[19] = t8;
715
+ $[19] = resource;
716
+ $[20] = t8;
717
+ $[21] = t9;
564
718
  } else {
565
- t8 = $[19];
719
+ t9 = $[21];
566
720
  }
567
- return t8;
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$3) : null;
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$3(t0) {
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(70);
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$2);
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: t17,
1090
- deleted: t18
1091
- } = t16;
1092
- const created = t17 === undefined ? false : t17;
1093
- const deleted = t18 === undefined ? false : t18;
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 t19;
1096
- if ($[18] !== resourceRoute) {
1097
- t19 = resourceRoute("index");
1098
- $[18] = resourceRoute;
1099
- $[19] = t19;
1257
+ let t20;
1258
+ if ($[20] !== resourceRoute) {
1259
+ t20 = resourceRoute("index");
1260
+ $[20] = resourceRoute;
1261
+ $[21] = t20;
1100
1262
  } else {
1101
- t19 = $[19];
1263
+ t20 = $[21];
1102
1264
  }
1103
- const url = t19;
1104
- let t20;
1105
- if ($[20] !== navigate || $[21] !== url) {
1106
- t20 = submitQuery => {
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
- $[20] = navigate;
1119
- $[21] = url;
1120
- $[22] = t20;
1280
+ $[22] = navigate;
1281
+ $[23] = url;
1282
+ $[24] = t21;
1121
1283
  } else {
1122
- t20 = $[22];
1284
+ t21 = $[24];
1123
1285
  }
1124
- const onQueryChange = t20;
1125
- let t21;
1126
- if ($[23] !== navigate || $[24] !== url) {
1127
- t21 = () => {
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
- $[23] = navigate;
1134
- $[24] = url;
1135
- $[25] = t21;
1295
+ $[25] = navigate;
1296
+ $[26] = url;
1297
+ $[27] = t22;
1136
1298
  } else {
1137
- t21 = $[25];
1299
+ t22 = $[27];
1138
1300
  }
1139
- const onQueryReset = t21;
1140
- let t22;
1141
- if ($[26] !== navigate || $[27] !== url) {
1142
- t22 = () => {
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
- $[26] = navigate;
1148
- $[27] = url;
1149
- $[28] = t22;
1309
+ $[28] = navigate;
1310
+ $[29] = url;
1311
+ $[30] = t23;
1150
1312
  } else {
1151
- t22 = $[28];
1313
+ t23 = $[30];
1152
1314
  }
1153
- const onClickCloseAlert = t22;
1154
- let t23;
1155
- if ($[29] !== actionsComponentsManager || $[30] !== finalActions || $[31] !== onQueryChange || $[32] !== query || $[33] !== resource) {
1156
- t23 = finalActions.length > 0 ? /*#__PURE__*/jsx("div", {
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(t24 => {
1320
+ children: finalActions.map(t25 => {
1159
1321
  const {
1160
1322
  id,
1161
- component: t25,
1162
- withQuery: t26,
1163
- href: t27,
1323
+ component: t26,
1324
+ withQuery: t27,
1325
+ href: t28,
1164
1326
  ...otherProps
1165
- } = t24;
1166
- const component = t25 === undefined ? Button : t25;
1167
- const withQuery = t26 === undefined ? false : t26;
1168
- const href = t27 === undefined ? null : t27;
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
- $[29] = actionsComponentsManager;
1189
- $[30] = finalActions;
1190
- $[31] = onQueryChange;
1191
- $[32] = query;
1192
- $[33] = resource;
1193
- $[34] = t23;
1350
+ $[31] = actionsComponentsManager;
1351
+ $[32] = finalActions;
1352
+ $[33] = onQueryChange;
1353
+ $[34] = query;
1354
+ $[35] = resource;
1355
+ $[36] = t24;
1194
1356
  } else {
1195
- t23 = $[34];
1357
+ t24 = $[36];
1196
1358
  }
1197
- let t24;
1198
- if ($[35] !== name || $[36] !== t23) {
1199
- t24 = /*#__PURE__*/jsx(PageHeader, {
1359
+ let t25;
1360
+ if ($[37] !== name || $[38] !== t24) {
1361
+ t25 = /*#__PURE__*/jsx(PageHeader, {
1200
1362
  title: name,
1201
- actions: t23
1363
+ actions: t24
1202
1364
  });
1203
- $[35] = name;
1204
- $[36] = t23;
1205
- $[37] = t24;
1365
+ $[37] = name;
1366
+ $[38] = t24;
1367
+ $[39] = t25;
1206
1368
  } else {
1207
- t24 = $[37];
1369
+ t25 = $[39];
1208
1370
  }
1209
- let t25;
1210
- if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
1211
- t25 = classNames(["container-sm py-4"]);
1212
- $[38] = t25;
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
- t25 = $[38];
1376
+ t26 = $[40];
1215
1377
  }
1216
- let t26;
1217
- if ($[39] !== created || $[40] !== onClickCloseAlert || $[41] !== resourceValues) {
1218
- t26 = created ? /*#__PURE__*/jsx(Alert, {
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
- $[39] = created;
1227
- $[40] = onClickCloseAlert;
1228
- $[41] = resourceValues;
1229
- $[42] = t26;
1388
+ $[41] = created;
1389
+ $[42] = onClickCloseAlert;
1390
+ $[43] = resourceValues;
1391
+ $[44] = t27;
1230
1392
  } else {
1231
- t26 = $[42];
1393
+ t27 = $[44];
1232
1394
  }
1233
- let t27;
1234
- if ($[43] !== deleted || $[44] !== onClickCloseAlert || $[45] !== resourceValues) {
1235
- t27 = deleted ? /*#__PURE__*/jsx(Alert, {
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
- $[43] = deleted;
1244
- $[44] = onClickCloseAlert;
1245
- $[45] = resourceValues;
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] !== t28) {
1260
- t29 = {
1261
- size: "sm",
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] !== listQuery || $[52] !== onQueryChange || $[53] !== onQueryReset || $[54] !== paginated || $[55] !== resource || $[56] !== t29 || $[57] !== theme || $[58] !== url) {
1271
- t30 = /*#__PURE__*/jsx(ResourceItemsList, {
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: t29
1441
+ actionsProps: t30
1280
1442
  });
1281
- $[51] = listQuery;
1282
- $[52] = onQueryChange;
1283
- $[53] = onQueryReset;
1284
- $[54] = paginated;
1285
- $[55] = resource;
1286
- $[56] = t29;
1287
- $[57] = theme;
1288
- $[58] = url;
1289
- $[59] = t30;
1290
- } else {
1291
- t30 = $[59];
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 t31;
1294
- if ($[60] !== t26 || $[61] !== t27 || $[62] !== t30) {
1295
- t31 = /*#__PURE__*/jsxs("div", {
1296
- className: t25,
1297
- children: [t26, t27, t30]
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
- $[60] = t26;
1300
- $[61] = t27;
1301
- $[62] = t30;
1302
- $[63] = t31;
1461
+ $[62] = t27;
1462
+ $[63] = t28;
1463
+ $[64] = t31;
1464
+ $[65] = t32;
1303
1465
  } else {
1304
- t31 = $[63];
1466
+ t32 = $[65];
1305
1467
  }
1306
- let t32;
1307
- if ($[64] !== t24 || $[65] !== t31) {
1308
- t32 = /*#__PURE__*/jsxs(MainLayout, {
1309
- children: [t24, t31]
1468
+ let t33;
1469
+ if ($[66] !== t25 || $[67] !== t32) {
1470
+ t33 = /*#__PURE__*/jsxs(MainLayout, {
1471
+ children: [t25, t32]
1310
1472
  });
1311
- $[64] = t24;
1312
- $[65] = t31;
1313
- $[66] = t32;
1473
+ $[66] = t25;
1474
+ $[67] = t32;
1475
+ $[68] = t33;
1314
1476
  } else {
1315
- t32 = $[66];
1477
+ t33 = $[68];
1316
1478
  }
1317
- let t33;
1318
- if ($[67] !== resource || $[68] !== t32) {
1319
- t33 = /*#__PURE__*/jsx(ResourceProvider, {
1479
+ let t34;
1480
+ if ($[69] !== resource || $[70] !== t33) {
1481
+ t34 = /*#__PURE__*/jsx(ResourceProvider, {
1320
1482
  resource: resource,
1321
- children: t32
1483
+ children: t33
1322
1484
  });
1323
- $[67] = resource;
1324
- $[68] = t32;
1325
- $[69] = t33;
1485
+ $[69] = resource;
1486
+ $[70] = t33;
1487
+ $[71] = t34;
1326
1488
  } else {
1327
- t33 = $[69];
1489
+ t34 = $[71];
1328
1490
  }
1329
- return t33;
1491
+ return t34;
1330
1492
  }
1331
- function _temp$2(it_0) {
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$1);
1762
+ const visibleResources = resources.filter(_temp$2);
1601
1763
  T0 = MainLayout;
1602
1764
  t0 = "container-sm py-4";
1603
- t1 = visibleResources.map(_temp2$1);
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$1(resource) {
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$1(t0) {
1808
+ function _temp$2(t0) {
1647
1809
  const {
1648
1810
  settings: t1
1649
1811
  } = t0;
@@ -1726,36 +1888,102 @@ function LoginForm(t0) {
1726
1888
  return t5;
1727
1889
  }
1728
1890
 
1729
- function GuestLayout({
1730
- fullscreen = false,
1731
- children
1732
- }) {
1891
+ function GuestLayout(t0) {
1892
+ const $ = c(19);
1893
+ const {
1894
+ fullscreen: t1,
1895
+ children
1896
+ } = t0;
1897
+ const fullscreen = t1 === undefined ? false : t1;
1733
1898
  const {
1734
- theme = null,
1735
- background = null,
1736
- text = null
1899
+ theme: t2,
1900
+ background: t3,
1901
+ text: t4
1737
1902
  } = usePanneauColorScheme();
1738
- return /*#__PURE__*/jsxs("div", {
1739
- className: classNames([{
1740
- 'd-flex flex-column min-vh-100': fullscreen
1741
- }]),
1742
- "data-bs-theme": theme !== null ? theme : undefined,
1743
- children: [/*#__PURE__*/jsx(MainNavbar, {
1744
- className: classNames(['sticky-top', 'px-3'])
1745
- }), /*#__PURE__*/jsx("div", {
1746
- className: classNames({
1747
- 'd-flex flex-column flex-grow-1': fullscreen,
1748
- [`bg-${background}`]: background !== null,
1749
- [`text-${text}`]: text !== null
1750
- }),
1751
- children: /*#__PURE__*/jsx("div", {
1752
- className: classNames({
1753
- 'w-100 my-auto': fullscreen
1754
- }),
1755
- children: children
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
 
1761
1989
  function LoginPage() {
@@ -2097,7 +2325,7 @@ function createResourceRoutes(resource, {
2097
2325
  }
2098
2326
 
2099
2327
  function PanneauRoutes(t0) {
2100
- const $ = c(91);
2328
+ const $ = c(22);
2101
2329
  const {
2102
2330
  statusCode: t1
2103
2331
  } = t0;
@@ -2148,336 +2376,149 @@ function PanneauRoutes(t0) {
2148
2376
  useEffect(t3, t4);
2149
2377
  const {
2150
2378
  pages: t5,
2151
- routes: routesDefinition
2152
- } = usePanneau();
2379
+ routes: t6
2380
+ } = usePanneau() || {};
2153
2381
  const pages = t5 === undefined ? null : t5;
2154
- let t6;
2155
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
2156
- t6 = ["home", "login", "account", "error", "index", "show", "create", "edit", "delete", "duplicate"];
2157
- $[7] = t6;
2158
- } else {
2159
- t6 = $[7];
2382
+ const routesDefinition = t6 === undefined ? null : t6;
2383
+ const builtinPages = ["home", "login", "account", "error", "index", "show", "create", "edit", "delete", "duplicate"];
2384
+ const otherPages = Object.keys(pages || {}).filter(key => builtinPages.indexOf(key) === -1).reduce((acc, key_0) => ({
2385
+ ...acc,
2386
+ [key_0]: pages[key_0]
2387
+ }), {});
2388
+ const {
2389
+ home: t7,
2390
+ login: t8,
2391
+ account: t9,
2392
+ error: t10
2393
+ } = pages || {};
2394
+ const homePage = t7 === undefined ? null : t7;
2395
+ const loginPage = t8 === undefined ? null : t8;
2396
+ const accountPage = t9 === undefined ? null : t9;
2397
+ const errorPage = t10 === undefined ? null : t10;
2398
+ const customRoutes = [...Object.keys(routesDefinition || {}).filter(_temp$1).filter(key_2 => {
2399
+ const routeDef = routesDefinition[key_2];
2400
+ return isObject(routeDef) && typeof routeDef.component !== "undefined" && typeof routeDef.path !== "undefined";
2401
+ }).map(key_3 => routesDefinition[key_3]), ...Object.keys(otherPages).map(key_4 => otherPages[key_4]).filter(_temp2$1)];
2402
+ const HomeComponent = componentsManager.getComponent(homePage?.component) || HomePage;
2403
+ const LoginComponent = componentsManager.getComponent(loginPage?.component) || LoginPage;
2404
+ const AccountComponent = componentsManager.getComponent(accountPage?.component) || AccountPage;
2405
+ const ErrorComponent = componentsManager.getComponent(errorPage?.component) || ErrorPage;
2406
+ if (statusCode !== null) {
2407
+ return /*#__PURE__*/jsx(ErrorComponent, {
2408
+ statusCode: statusCode,
2409
+ ...errorPage
2410
+ });
2160
2411
  }
2161
- const builtinPages = t6;
2162
- let ErrorComponent;
2163
- let HomeComponent;
2164
- let T0;
2165
- let homePage;
2166
- let t10;
2167
- let t11;
2168
- let t7;
2169
- let t8;
2170
- let t9;
2171
- if ($[8] !== componentsManager || $[9] !== pages || $[10] !== pathname || $[11] !== resources || $[12] !== route || $[13] !== routes || $[14] !== routesDefinition || $[15] !== statusCode || $[16] !== user) {
2172
- t11 = Symbol.for("react.early_return_sentinel");
2173
- bb0: {
2174
- const otherPages = Object.keys(pages || {}).filter(key => builtinPages.indexOf(key) === -1).reduce((acc, key_0) => ({
2175
- ...acc,
2176
- [key_0]: pages[key_0]
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;
2412
+ if (user === null) {
2413
+ let t11;
2414
+ if ($[7] !== route) {
2415
+ t11 = route("auth.login");
2416
+ $[7] = route;
2417
+ $[8] = t11;
2418
+ } else {
2419
+ t11 = $[8];
2420
+ }
2421
+ const t12 = `${t11}?next=${encodeURIComponent(pathname)}`;
2422
+ let t13;
2423
+ if ($[9] !== t12) {
2424
+ t13 = /*#__PURE__*/jsx(Route, {
2425
+ children: /*#__PURE__*/jsx(Redirect, {
2426
+ to: t12
2427
+ })
2395
2428
  });
2429
+ $[9] = t12;
2430
+ $[10] = t13;
2431
+ } else {
2432
+ t13 = $[10];
2396
2433
  }
2397
- $[8] = componentsManager;
2398
- $[9] = pages;
2399
- $[10] = pathname;
2400
- $[11] = resources;
2401
- $[12] = route;
2402
- $[13] = routes;
2403
- $[14] = routesDefinition;
2404
- $[15] = statusCode;
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;
2434
+ return /*#__PURE__*/jsxs(Switch, {
2435
+ children: [/*#__PURE__*/jsx(Route, {
2436
+ path: routes["auth.login"],
2437
+ children: /*#__PURE__*/jsx(LoginComponent, {
2438
+ ...loginPage
2439
+ })
2440
+ }), t13]
2441
+ });
2428
2442
  }
2429
- let t12;
2430
- if ($[75] !== HomeComponent || $[76] !== homePage) {
2431
- t12 = /*#__PURE__*/jsx(HomeComponent, {
2443
+ let t11;
2444
+ if ($[11] !== routes || $[12] !== user) {
2445
+ t11 = user !== null ? /*#__PURE__*/jsx(Route, {
2446
+ path: routes["auth.login"],
2447
+ children: /*#__PURE__*/jsx(Redirect, {
2448
+ to: routes.home,
2449
+ replace: true
2450
+ })
2451
+ }) : null;
2452
+ $[11] = routes;
2453
+ $[12] = user;
2454
+ $[13] = t11;
2455
+ } else {
2456
+ t11 = $[13];
2457
+ }
2458
+ let t15;
2459
+ if ($[14] !== HomeComponent || $[15] !== homePage) {
2460
+ t15 = /*#__PURE__*/jsx(HomeComponent, {
2432
2461
  ...homePage
2433
2462
  });
2434
- $[75] = HomeComponent;
2435
- $[76] = homePage;
2436
- $[77] = t12;
2463
+ $[14] = HomeComponent;
2464
+ $[15] = homePage;
2465
+ $[16] = t15;
2437
2466
  } else {
2438
- t12 = $[77];
2467
+ t15 = $[16];
2439
2468
  }
2440
- let t13;
2441
- if ($[78] !== routes.home || $[79] !== t12) {
2442
- t13 = /*#__PURE__*/jsx(Route, {
2469
+ let t16;
2470
+ if ($[17] !== routes.home || $[18] !== t15) {
2471
+ t16 = /*#__PURE__*/jsx(Route, {
2443
2472
  path: routes.home,
2444
- children: t12
2473
+ children: t15
2445
2474
  });
2446
- $[78] = routes.home;
2447
- $[79] = t12;
2448
- $[80] = t13;
2475
+ $[17] = routes.home;
2476
+ $[18] = t15;
2477
+ $[19] = t16;
2449
2478
  } else {
2450
- t13 = $[80];
2479
+ t16 = $[19];
2451
2480
  }
2452
- let t14;
2453
- if ($[81] !== ErrorComponent) {
2454
- t14 = /*#__PURE__*/jsx(Route, {
2481
+ let t17;
2482
+ if ($[20] !== ErrorComponent) {
2483
+ t17 = /*#__PURE__*/jsx(Route, {
2455
2484
  children: /*#__PURE__*/jsx(ErrorComponent, {})
2456
2485
  });
2457
- $[81] = ErrorComponent;
2458
- $[82] = t14;
2459
- } else {
2460
- t14 = $[82];
2461
- }
2462
- let t15;
2463
- if ($[83] !== T0 || $[84] !== t10 || $[85] !== t13 || $[86] !== t14 || $[87] !== t7 || $[88] !== t8 || $[89] !== t9) {
2464
- t15 = /*#__PURE__*/jsxs(T0, {
2465
- children: [t7, t8, t9, t10, t13, t14]
2466
- });
2467
- $[83] = T0;
2468
- $[84] = t10;
2469
- $[85] = t13;
2470
- $[86] = t14;
2471
- $[87] = t7;
2472
- $[88] = t8;
2473
- $[89] = t9;
2474
- $[90] = t15;
2475
- } else {
2476
- t15 = $[90];
2477
- }
2478
- return t15;
2486
+ $[20] = ErrorComponent;
2487
+ $[21] = t17;
2488
+ } else {
2489
+ t17 = $[21];
2490
+ }
2491
+ return /*#__PURE__*/jsxs(Switch, {
2492
+ children: [t11, resources.reduce((acc_0, resource) => [...acc_0, ...createResourceRoutes(resource, {
2493
+ route,
2494
+ componentsManager,
2495
+ pages
2496
+ })], []), /*#__PURE__*/jsx(Route, {
2497
+ path: routes.account,
2498
+ children: /*#__PURE__*/jsx(AccountComponent, {
2499
+ ...accountPage
2500
+ })
2501
+ }), customRoutes.map(t12 => {
2502
+ const {
2503
+ path: t13,
2504
+ route: t14,
2505
+ component,
2506
+ ...props
2507
+ } = t12;
2508
+ const path_0 = t13 === undefined ? null : t13;
2509
+ const pageRoute_0 = t14 === undefined ? null : t14;
2510
+ const PageComponent = componentsManager.getComponent(component);
2511
+ const finalPath = path_0 || routes[pageRoute_0];
2512
+ return PageComponent !== null ? /*#__PURE__*/jsx(Route, {
2513
+ path: path_0 || routes[pageRoute_0],
2514
+ children: /*#__PURE__*/jsx(PageComponent, {
2515
+ ...props
2516
+ })
2517
+ }, `custom-route-${finalPath}`) : null;
2518
+ }), t16, t17]
2519
+ });
2479
2520
  }
2480
- function _temp2(t0) {
2521
+ function _temp2$1(t0) {
2481
2522
  const {
2482
2523
  path: t1,
2483
2524
  route: t2
@@ -2486,115 +2527,346 @@ function _temp2(t0) {
2486
2527
  const pageRoute = t2 === undefined ? null : t2;
2487
2528
  return path !== null || pageRoute !== null;
2488
2529
  }
2489
- function _temp(key_1) {
2530
+ function _temp$1(key_1) {
2490
2531
  return key_1.match(/^(resources\.|auth\.)/) === null && key_1 !== "home" && key_1 !== "account";
2491
2532
  }
2492
2533
 
2493
2534
  const pathToRegexpParser = createPathToRegexpParser();
2494
2535
  const DEFAULT_ROUTES = {};
2495
2536
  const DEFAULT_LOCALES = [];
2496
- function Container({
2497
- definition,
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
- }) {
2537
+ function Container(t0) {
2538
+ const $ = c(65);
2507
2539
  const {
2508
- intl: {
2509
- locale = 'en',
2510
- locales = DEFAULT_LOCALES,
2540
+ definition,
2541
+ forms: t1,
2542
+ fields: t2,
2543
+ components: t3,
2544
+ user: t4,
2545
+ memoryRouter: t5,
2546
+ baseUrl: t6,
2547
+ uppy: t7,
2548
+ statusCode: t8
2549
+ } = t0;
2550
+ const providedForms = t1 === undefined ? null : t1;
2551
+ const providedFields = t2 === undefined ? null : t2;
2552
+ const components = t3 === undefined ? null : t3;
2553
+ const user = t4 === undefined ? null : t4;
2554
+ const memoryRouter = t5 === undefined ? false : t5;
2555
+ const baseUrl = t6 === undefined ? null : t6;
2556
+ const uppy = t7 === undefined ? null : t7;
2557
+ const statusCode = t8 === undefined ? null : t8;
2558
+ let fields;
2559
+ let forms;
2560
+ let isMemoryRouter;
2561
+ let locale;
2562
+ let locales;
2563
+ let routes;
2564
+ let t10;
2565
+ let t9;
2566
+ if ($[0] !== definition || $[1] !== memoryRouter) {
2567
+ const {
2568
+ intl: t11,
2569
+ routes: t12,
2570
+ resources: t13,
2571
+ settings: t14,
2572
+ forms: t15,
2573
+ fields: t16
2574
+ } = definition || {};
2575
+ forms = t15;
2576
+ fields = t16;
2577
+ const {
2578
+ locale: t17,
2579
+ locales: t18,
2511
2580
  messages
2512
- } = {},
2513
- routes = DEFAULT_ROUTES,
2514
- resources = [],
2515
- settings: {
2516
- memoryRouter: usesMemoryRouter = false
2517
- } = {},
2518
- forms,
2519
- fields
2520
- } = definition || {};
2521
- const isMemoryRouter = memoryRouter || usesMemoryRouter || false;
2522
- const extraMessages = {
2523
- ...messages,
2524
- ...resources.reduce((allMessages, {
2525
- id,
2526
- intl: {
2527
- messages: resourceMessages = {}
2528
- } = {}
2529
- }) => ({
2530
- ...allMessages,
2531
- ...Object.keys(resourceMessages).reduce((allResourceMessages, key) => ({
2532
- ...allResourceMessages,
2533
- [`resources.${id}.${key}`]: resourceMessages[key]
2534
- }), {})
2535
- }), {})
2536
- };
2537
- const onUnauthorized = () => {
2538
- window.location.href = baseUrl || '/';
2539
- };
2540
- const onLogout = () => {
2541
- window.location.reload();
2542
- };
2581
+ } = t11 === undefined ? {} : t11;
2582
+ locale = t17 === undefined ? "en" : t17;
2583
+ locales = t18 === undefined ? DEFAULT_LOCALES : t18;
2584
+ routes = t12 === undefined ? DEFAULT_ROUTES : t12;
2585
+ const resources = t13 === undefined ? [] : t13;
2586
+ const {
2587
+ memoryRouter: t19
2588
+ } = t14 === undefined ? {} : t14;
2589
+ const usesMemoryRouter = t19 === undefined ? false : t19;
2590
+ isMemoryRouter = memoryRouter || usesMemoryRouter || false;
2591
+ t9 = messages;
2592
+ t10 = resources.reduce(_temp, {});
2593
+ $[0] = definition;
2594
+ $[1] = memoryRouter;
2595
+ $[2] = fields;
2596
+ $[3] = forms;
2597
+ $[4] = isMemoryRouter;
2598
+ $[5] = locale;
2599
+ $[6] = locales;
2600
+ $[7] = routes;
2601
+ $[8] = t10;
2602
+ $[9] = t9;
2603
+ } else {
2604
+ fields = $[2];
2605
+ forms = $[3];
2606
+ isMemoryRouter = $[4];
2607
+ locale = $[5];
2608
+ locales = $[6];
2609
+ routes = $[7];
2610
+ t10 = $[8];
2611
+ t9 = $[9];
2612
+ }
2613
+ let t11;
2614
+ if ($[10] !== t10 || $[11] !== t9) {
2615
+ t11 = {
2616
+ ...t9,
2617
+ ...t10
2618
+ };
2619
+ $[10] = t10;
2620
+ $[11] = t9;
2621
+ $[12] = t11;
2622
+ } else {
2623
+ t11 = $[12];
2624
+ }
2625
+ const extraMessages = t11;
2626
+ let t12;
2627
+ if ($[13] !== baseUrl) {
2628
+ t12 = () => {
2629
+ window.location.href = baseUrl || "/";
2630
+ };
2631
+ $[13] = baseUrl;
2632
+ $[14] = t12;
2633
+ } else {
2634
+ t12 = $[14];
2635
+ }
2636
+ const onUnauthorized = t12;
2637
+ const onLogout = _temp2;
2543
2638
  const {
2544
2639
  hook: memoryLocationHook,
2545
2640
  searchHook: memorySearchHook
2546
2641
  } = useMemoryRouter();
2547
- return /*#__PURE__*/jsx(Router, {
2548
- hook: isMemoryRouter ? memoryLocationHook : undefined,
2549
- searchHook: isMemoryRouter ? memorySearchHook : undefined,
2550
- parser: pathToRegexpParser,
2551
- children: /*#__PURE__*/jsx(IntlProvider, {
2552
- locale: locale,
2553
- locales: locales,
2554
- extraMessages: extraMessages,
2555
- children: /*#__PURE__*/jsx(PanneauProvider, {
2556
- definition: definition,
2557
- children: /*#__PURE__*/jsx(UppyProvider, {
2558
- ...uppy,
2559
- children: /*#__PURE__*/jsx(RoutesProvider, {
2560
- routes: routes,
2561
- children: /*#__PURE__*/jsx(FieldsProvider, {
2562
- definitions: [...(fields || []), ...(providedFields || [])],
2563
- children: /*#__PURE__*/jsx(FormsProvider, {
2564
- definitions: [...(forms || []), ...(providedForms || [])],
2565
- children: /*#__PURE__*/jsx(ListsProvider, {
2566
- children: /*#__PURE__*/jsx(DisplaysProvider, {
2567
- children: /*#__PURE__*/jsx(FiltersProvider, {
2568
- children: /*#__PURE__*/jsx(ActionsProvider, {
2569
- children: /*#__PURE__*/jsx(ModalProvider, {
2570
- children: /*#__PURE__*/jsx(ModalsProvider, {
2571
- children: /*#__PURE__*/jsx(DataProvider, {
2572
- baseUrl: baseUrl,
2573
- onUnauthorized: onUnauthorized,
2574
- children: /*#__PURE__*/jsx(AuthProvider, {
2575
- user: user,
2576
- onLogout: onLogout,
2577
- children: /*#__PURE__*/jsx(ComponentsProvider, {
2578
- components: components,
2579
- children: /*#__PURE__*/jsx(PanneauRoutes, {
2580
- statusCode: statusCode
2581
- })
2582
- })
2583
- })
2584
- })
2585
- })
2586
- })
2587
- })
2588
- })
2589
- })
2642
+ const t13 = isMemoryRouter ? memoryLocationHook : undefined;
2643
+ const t14 = isMemoryRouter ? memorySearchHook : undefined;
2644
+ let t15;
2645
+ if ($[15] !== fields) {
2646
+ t15 = fields || [];
2647
+ $[15] = fields;
2648
+ $[16] = t15;
2649
+ } else {
2650
+ t15 = $[16];
2651
+ }
2652
+ let t16;
2653
+ if ($[17] !== providedFields) {
2654
+ t16 = providedFields || [];
2655
+ $[17] = providedFields;
2656
+ $[18] = t16;
2657
+ } else {
2658
+ t16 = $[18];
2659
+ }
2660
+ let t17;
2661
+ if ($[19] !== t15 || $[20] !== t16) {
2662
+ t17 = [...t15, ...t16];
2663
+ $[19] = t15;
2664
+ $[20] = t16;
2665
+ $[21] = t17;
2666
+ } else {
2667
+ t17 = $[21];
2668
+ }
2669
+ let t18;
2670
+ if ($[22] !== forms) {
2671
+ t18 = forms || [];
2672
+ $[22] = forms;
2673
+ $[23] = t18;
2674
+ } else {
2675
+ t18 = $[23];
2676
+ }
2677
+ let t19;
2678
+ if ($[24] !== providedForms) {
2679
+ t19 = providedForms || [];
2680
+ $[24] = providedForms;
2681
+ $[25] = t19;
2682
+ } else {
2683
+ t19 = $[25];
2684
+ }
2685
+ let t20;
2686
+ if ($[26] !== t18 || $[27] !== t19) {
2687
+ t20 = [...t18, ...t19];
2688
+ $[26] = t18;
2689
+ $[27] = t19;
2690
+ $[28] = t20;
2691
+ } else {
2692
+ t20 = $[28];
2693
+ }
2694
+ let t21;
2695
+ if ($[29] !== statusCode) {
2696
+ t21 = /*#__PURE__*/jsx(PanneauRoutes, {
2697
+ statusCode: statusCode
2698
+ });
2699
+ $[29] = statusCode;
2700
+ $[30] = t21;
2701
+ } else {
2702
+ t21 = $[30];
2703
+ }
2704
+ let t22;
2705
+ if ($[31] !== components || $[32] !== t21) {
2706
+ t22 = /*#__PURE__*/jsx(ComponentsProvider, {
2707
+ components: components,
2708
+ children: t21
2709
+ });
2710
+ $[31] = components;
2711
+ $[32] = t21;
2712
+ $[33] = t22;
2713
+ } else {
2714
+ t22 = $[33];
2715
+ }
2716
+ let t23;
2717
+ if ($[34] !== t22 || $[35] !== user) {
2718
+ t23 = /*#__PURE__*/jsx(AuthProvider, {
2719
+ user: user,
2720
+ onLogout: onLogout,
2721
+ children: t22
2722
+ });
2723
+ $[34] = t22;
2724
+ $[35] = user;
2725
+ $[36] = t23;
2726
+ } else {
2727
+ t23 = $[36];
2728
+ }
2729
+ let t24;
2730
+ if ($[37] !== baseUrl || $[38] !== onUnauthorized || $[39] !== t23) {
2731
+ t24 = /*#__PURE__*/jsx(ListsProvider, {
2732
+ children: /*#__PURE__*/jsx(DisplaysProvider, {
2733
+ children: /*#__PURE__*/jsx(FiltersProvider, {
2734
+ children: /*#__PURE__*/jsx(ActionsProvider, {
2735
+ children: /*#__PURE__*/jsx(ModalProvider, {
2736
+ children: /*#__PURE__*/jsx(ModalsProvider, {
2737
+ children: /*#__PURE__*/jsx(DataProvider, {
2738
+ baseUrl: baseUrl,
2739
+ onUnauthorized: onUnauthorized,
2740
+ children: t23
2590
2741
  })
2591
2742
  })
2592
2743
  })
2593
2744
  })
2594
2745
  })
2595
2746
  })
2596
- })
2597
- });
2747
+ });
2748
+ $[37] = baseUrl;
2749
+ $[38] = onUnauthorized;
2750
+ $[39] = t23;
2751
+ $[40] = t24;
2752
+ } else {
2753
+ t24 = $[40];
2754
+ }
2755
+ let t25;
2756
+ if ($[41] !== t20 || $[42] !== t24) {
2757
+ t25 = /*#__PURE__*/jsx(FormsProvider, {
2758
+ definitions: t20,
2759
+ children: t24
2760
+ });
2761
+ $[41] = t20;
2762
+ $[42] = t24;
2763
+ $[43] = t25;
2764
+ } else {
2765
+ t25 = $[43];
2766
+ }
2767
+ let t26;
2768
+ if ($[44] !== t17 || $[45] !== t25) {
2769
+ t26 = /*#__PURE__*/jsx(FieldsProvider, {
2770
+ definitions: t17,
2771
+ children: t25
2772
+ });
2773
+ $[44] = t17;
2774
+ $[45] = t25;
2775
+ $[46] = t26;
2776
+ } else {
2777
+ t26 = $[46];
2778
+ }
2779
+ let t27;
2780
+ if ($[47] !== routes || $[48] !== t26) {
2781
+ t27 = /*#__PURE__*/jsx(RoutesProvider, {
2782
+ routes: routes,
2783
+ children: t26
2784
+ });
2785
+ $[47] = routes;
2786
+ $[48] = t26;
2787
+ $[49] = t27;
2788
+ } else {
2789
+ t27 = $[49];
2790
+ }
2791
+ let t28;
2792
+ if ($[50] !== t27 || $[51] !== uppy) {
2793
+ t28 = /*#__PURE__*/jsx(UppyProvider, {
2794
+ ...uppy,
2795
+ children: t27
2796
+ });
2797
+ $[50] = t27;
2798
+ $[51] = uppy;
2799
+ $[52] = t28;
2800
+ } else {
2801
+ t28 = $[52];
2802
+ }
2803
+ let t29;
2804
+ if ($[53] !== definition || $[54] !== t28) {
2805
+ t29 = /*#__PURE__*/jsx(PanneauProvider, {
2806
+ definition: definition,
2807
+ children: t28
2808
+ });
2809
+ $[53] = definition;
2810
+ $[54] = t28;
2811
+ $[55] = t29;
2812
+ } else {
2813
+ t29 = $[55];
2814
+ }
2815
+ let t30;
2816
+ if ($[56] !== extraMessages || $[57] !== locale || $[58] !== locales || $[59] !== t29) {
2817
+ t30 = /*#__PURE__*/jsx(IntlProvider, {
2818
+ locale: locale,
2819
+ locales: locales,
2820
+ extraMessages: extraMessages,
2821
+ children: t29
2822
+ });
2823
+ $[56] = extraMessages;
2824
+ $[57] = locale;
2825
+ $[58] = locales;
2826
+ $[59] = t29;
2827
+ $[60] = t30;
2828
+ } else {
2829
+ t30 = $[60];
2830
+ }
2831
+ let t31;
2832
+ if ($[61] !== t13 || $[62] !== t14 || $[63] !== t30) {
2833
+ t31 = /*#__PURE__*/jsx(Router, {
2834
+ hook: t13,
2835
+ searchHook: t14,
2836
+ parser: pathToRegexpParser,
2837
+ children: t30
2838
+ });
2839
+ $[61] = t13;
2840
+ $[62] = t14;
2841
+ $[63] = t30;
2842
+ $[64] = t31;
2843
+ } else {
2844
+ t31 = $[64];
2845
+ }
2846
+ return t31;
2847
+ }
2848
+ function _temp2() {
2849
+ window.location.reload();
2850
+ }
2851
+ function _temp(allMessages, t0) {
2852
+ const {
2853
+ id,
2854
+ intl: t1
2855
+ } = t0;
2856
+ const {
2857
+ messages: t2
2858
+ } = t1 === undefined ? {} : t1;
2859
+ const resourceMessages = t2 === undefined ? {} : t2;
2860
+ return {
2861
+ ...allMessages,
2862
+ ...Object.keys(resourceMessages).reduce((allResourceMessages, key) => {
2863
+ const messageKey = `resources.${id}.${key}`;
2864
+ return {
2865
+ ...allResourceMessages,
2866
+ [messageKey]: resourceMessages[key]
2867
+ };
2868
+ }, {})
2869
+ };
2598
2870
  }
2599
2871
 
2600
2872
  function ResourceFilters(props) {