@panneau/data 4.0.73 → 4.0.75
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.d.ts +314 -113
- package/dist/index.js +519 -382
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { useQuery, keepPreviousData, useMutation, QueryClient, QueryClientProvid
|
|
|
9
9
|
import isArray from 'lodash-es/isArray';
|
|
10
10
|
import isObject from 'lodash-es/isObject';
|
|
11
11
|
import isString from 'lodash-es/isString';
|
|
12
|
+
import { isObject as isObject$1, isString as isString$1 } from 'lodash-es';
|
|
12
13
|
|
|
13
14
|
function useItem(scope, id, loader, t0) {
|
|
14
15
|
const $ = c(15);
|
|
@@ -447,176 +448,50 @@ function useItems(scope, t0) {
|
|
|
447
448
|
return t32;
|
|
448
449
|
}
|
|
449
450
|
|
|
450
|
-
class AccountApi {
|
|
451
|
-
constructor(api, opts) {
|
|
452
|
-
this.api = api;
|
|
453
|
-
this.options = {
|
|
454
|
-
withCredentials: false,
|
|
455
|
-
...opts
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
update(data) {
|
|
459
|
-
const {
|
|
460
|
-
withCredentials
|
|
461
|
-
} = this.options;
|
|
462
|
-
return this.api.requestPost(this.api.route('account'), data, {
|
|
463
|
-
withSession: !withCredentials,
|
|
464
|
-
withCredentials
|
|
465
|
-
});
|
|
466
|
-
}
|
|
467
|
-
updatePassword(data) {
|
|
468
|
-
const {
|
|
469
|
-
withCredentials
|
|
470
|
-
} = this.options;
|
|
471
|
-
return this.api.requestPost(this.api.route('account.password'), data, {
|
|
472
|
-
withSession: !withCredentials,
|
|
473
|
-
withCredentials
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
|
-
updateTaxes(data) {
|
|
477
|
-
const {
|
|
478
|
-
withCredentials
|
|
479
|
-
} = this.options;
|
|
480
|
-
return this.api.requestPost(this.api.route('account.taxes'), data, {
|
|
481
|
-
withSession: !withCredentials,
|
|
482
|
-
withCredentials
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
delete(data) {
|
|
486
|
-
const {
|
|
487
|
-
withCredentials
|
|
488
|
-
} = this.options;
|
|
489
|
-
return this.api.requestPost(this.api.route('account.delete'), data, {
|
|
490
|
-
withSession: !withCredentials,
|
|
491
|
-
withCredentials
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
class AuthApi {
|
|
497
|
-
constructor(api, opts) {
|
|
498
|
-
this.api = api;
|
|
499
|
-
this.options = {
|
|
500
|
-
withCredentials: true,
|
|
501
|
-
...opts
|
|
502
|
-
};
|
|
503
|
-
}
|
|
504
|
-
check() {
|
|
505
|
-
const {
|
|
506
|
-
withCredentials
|
|
507
|
-
} = this.options;
|
|
508
|
-
return this.api.requestGet(this.api.route('auth.check'), null, {
|
|
509
|
-
withSession: !withCredentials,
|
|
510
|
-
withCredentials
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
login(email, password) {
|
|
514
|
-
const {
|
|
515
|
-
withCredentials
|
|
516
|
-
} = this.options;
|
|
517
|
-
return this.api.requestPost(this.api.route('auth.login'), {
|
|
518
|
-
email,
|
|
519
|
-
password
|
|
520
|
-
}, {
|
|
521
|
-
withSession: !withCredentials,
|
|
522
|
-
withCredentials
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
|
-
register(data) {
|
|
526
|
-
const {
|
|
527
|
-
withCredentials
|
|
528
|
-
} = this.options;
|
|
529
|
-
return this.api.requestPost(this.api.route('auth.register'), data, {
|
|
530
|
-
withSession: !withCredentials,
|
|
531
|
-
withCredentials
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
logout() {
|
|
535
|
-
const url = this.api.getFullUrl(this.api.route('auth.logout'));
|
|
536
|
-
return fetch(url, {
|
|
537
|
-
method: 'POST',
|
|
538
|
-
headers: {
|
|
539
|
-
...getCSRFHeaders()
|
|
540
|
-
},
|
|
541
|
-
credentials: 'include'
|
|
542
|
-
}).catch(err => {
|
|
543
|
-
console.log('logout err', err); // eslint-disable-line
|
|
544
|
-
throw err;
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
requestPassword(email) {
|
|
548
|
-
const {
|
|
549
|
-
withCredentials
|
|
550
|
-
} = this.options;
|
|
551
|
-
return this.api.requestPost(this.api.route('auth.password.email'), {
|
|
552
|
-
email
|
|
553
|
-
}, {
|
|
554
|
-
withSession: !withCredentials,
|
|
555
|
-
withCredentials
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
resetPassword(data) {
|
|
559
|
-
const {
|
|
560
|
-
withCredentials
|
|
561
|
-
} = this.options;
|
|
562
|
-
return this.api.requestPost(this.api.route('auth.password.update'), data, {
|
|
563
|
-
withSession: !withCredentials,
|
|
564
|
-
withCredentials
|
|
565
|
-
});
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
|
|
569
451
|
class Base {
|
|
570
|
-
constructor(opts
|
|
452
|
+
constructor(opts) {
|
|
571
453
|
this.options = {
|
|
572
454
|
routes: {},
|
|
573
455
|
generateUrl: null,
|
|
574
|
-
...opts
|
|
575
|
-
baseUrl: opts.baseUrl,
|
|
576
|
-
onUnauthorized: opts.onUnauthorized || null
|
|
456
|
+
...opts
|
|
577
457
|
};
|
|
578
458
|
}
|
|
579
459
|
requestGet(path, query = null, opts = null) {
|
|
580
|
-
|
|
581
|
-
arrayFormat: 'bracket'
|
|
582
|
-
}) : null;
|
|
583
|
-
return getJSON(`${this.getFullUrl(path)}${finalQuery !== null && finalQuery.length > 0 ? `?${finalQuery}` : ''}`, {
|
|
460
|
+
return getJSON(this.getFullUrl(path, query), {
|
|
584
461
|
credentials: 'include',
|
|
585
462
|
headers: getCSRFHeaders(),
|
|
586
463
|
...opts
|
|
587
|
-
}).catch(error =>
|
|
464
|
+
}).catch(error => {
|
|
465
|
+
this.onError(error);
|
|
466
|
+
return null;
|
|
467
|
+
});
|
|
588
468
|
}
|
|
589
|
-
requestPost(path, data, opts = null) {
|
|
469
|
+
requestPost(path, data = null, opts = null) {
|
|
590
470
|
return postJSON(this.getFullUrl(path), data, {
|
|
591
471
|
credentials: 'include',
|
|
592
472
|
headers: getCSRFHeaders(),
|
|
593
473
|
...opts
|
|
594
|
-
}).catch(error =>
|
|
474
|
+
}).catch(error => {
|
|
475
|
+
this.onError(error);
|
|
476
|
+
return null;
|
|
477
|
+
});
|
|
595
478
|
}
|
|
596
479
|
requestPut(path, data, opts = null) {
|
|
597
|
-
return
|
|
480
|
+
return this.requestPost(path, {
|
|
598
481
|
_method: 'PUT',
|
|
599
482
|
...data
|
|
600
|
-
},
|
|
601
|
-
credentials: 'include',
|
|
602
|
-
headers: getCSRFHeaders(),
|
|
603
|
-
...opts
|
|
604
|
-
}).catch(error => this.onError(error));
|
|
483
|
+
}, opts);
|
|
605
484
|
}
|
|
606
485
|
requestPatch(path, data, opts = null) {
|
|
607
|
-
return
|
|
486
|
+
return this.requestPost(path, {
|
|
608
487
|
_method: 'PATCH',
|
|
609
488
|
...data
|
|
610
|
-
},
|
|
611
|
-
credentials: 'include',
|
|
612
|
-
headers: getCSRFHeaders(),
|
|
613
|
-
...opts
|
|
614
|
-
}).catch(error => this.onError(error));
|
|
489
|
+
}, opts);
|
|
615
490
|
}
|
|
616
|
-
requestDelete(path) {
|
|
617
|
-
return this.requestPost(
|
|
491
|
+
requestDelete(path, opts = null) {
|
|
492
|
+
return this.requestPost(path, {
|
|
618
493
|
_method: 'DELETE'
|
|
619
|
-
}
|
|
494
|
+
}, opts);
|
|
620
495
|
}
|
|
621
496
|
hasRoute(route) {
|
|
622
497
|
const {
|
|
@@ -624,7 +499,7 @@ class Base {
|
|
|
624
499
|
} = this.options;
|
|
625
500
|
return typeof routes[route] !== 'undefined';
|
|
626
501
|
}
|
|
627
|
-
route(route, params) {
|
|
502
|
+
route(route, params = null) {
|
|
628
503
|
const {
|
|
629
504
|
routes,
|
|
630
505
|
generateUrl = null
|
|
@@ -632,14 +507,18 @@ class Base {
|
|
|
632
507
|
if (generateUrl !== null) {
|
|
633
508
|
return generateUrl(route, params);
|
|
634
509
|
}
|
|
635
|
-
return generatePath(routes[route] || route, params);
|
|
510
|
+
return generatePath(routes?.[route] || route, params);
|
|
636
511
|
}
|
|
637
|
-
getFullUrl(path) {
|
|
512
|
+
getFullUrl(path, query = null) {
|
|
638
513
|
const {
|
|
639
514
|
baseUrl = null
|
|
640
515
|
} = this.options;
|
|
641
516
|
const hasProtocol = path.indexOf('://') !== -1;
|
|
642
|
-
|
|
517
|
+
const url = baseUrl !== null && !hasProtocol ? `${baseUrl.replace(/\/$/, '')}/${path.replace(/^\//, '')}` : path;
|
|
518
|
+
const finalQuery = query !== null ? queryString.stringify(query, {
|
|
519
|
+
arrayFormat: 'bracket'
|
|
520
|
+
}) : null;
|
|
521
|
+
return `${url}${finalQuery !== null && finalQuery.length > 0 ? `${url.indexOf('?') === -1 ? '?' : '&'}${finalQuery}` : ''}`;
|
|
643
522
|
}
|
|
644
523
|
onError(err) {
|
|
645
524
|
const {
|
|
@@ -651,16 +530,79 @@ class Base {
|
|
|
651
530
|
const statusCode = parseInt(status, 10);
|
|
652
531
|
// If status is refused and callback exists
|
|
653
532
|
if ((statusCode === 401 || statusCode === 419) && onUnauthorized !== null) {
|
|
654
|
-
|
|
533
|
+
onUnauthorized();
|
|
655
534
|
}
|
|
656
535
|
throw err;
|
|
657
536
|
}
|
|
658
537
|
}
|
|
659
538
|
|
|
539
|
+
class AccountApi extends Base {
|
|
540
|
+
constructor(opts) {
|
|
541
|
+
super({
|
|
542
|
+
...opts,
|
|
543
|
+
routes: {
|
|
544
|
+
account: 'account',
|
|
545
|
+
'account.password': 'account/password',
|
|
546
|
+
'account.delete': 'account/delete',
|
|
547
|
+
...(opts?.routes || null)
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
update(data) {
|
|
552
|
+
return this.requestPost(this.route('account'), data);
|
|
553
|
+
}
|
|
554
|
+
updatePassword(data) {
|
|
555
|
+
return this.requestPost(this.route('account.password'), data);
|
|
556
|
+
}
|
|
557
|
+
delete(data) {
|
|
558
|
+
return this.requestPost(this.route('account.delete'), data);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
class AuthApi extends Base {
|
|
563
|
+
constructor(opts) {
|
|
564
|
+
super({
|
|
565
|
+
...opts,
|
|
566
|
+
routes: {
|
|
567
|
+
'auth.check': 'auth/check',
|
|
568
|
+
'auth.login': 'auth/login',
|
|
569
|
+
'auth.register': 'auth/register',
|
|
570
|
+
'auth.logout': 'auth/logout',
|
|
571
|
+
'auth.password.email': 'auth/password/email',
|
|
572
|
+
'auth.password.update': 'auth/password/update',
|
|
573
|
+
...(opts?.routes || null)
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
check() {
|
|
578
|
+
return this.requestGet(this.route('auth.check'));
|
|
579
|
+
}
|
|
580
|
+
login(email, password) {
|
|
581
|
+
return this.requestPost(this.route('auth.login'), {
|
|
582
|
+
email,
|
|
583
|
+
password
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
register(data) {
|
|
587
|
+
return this.requestPost(this.route('auth.register'), data);
|
|
588
|
+
}
|
|
589
|
+
logout() {
|
|
590
|
+
return this.requestPost(this.route('auth.logout'));
|
|
591
|
+
}
|
|
592
|
+
requestPassword(email) {
|
|
593
|
+
return this.requestPost(this.route('auth.password.email'), {
|
|
594
|
+
email
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
resetPassword(data) {
|
|
598
|
+
return this.requestPost(this.route('auth.password.update'), data);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
|
|
660
602
|
class MediasApi extends Base {
|
|
661
|
-
constructor(opts
|
|
603
|
+
constructor(opts) {
|
|
662
604
|
super({
|
|
663
|
-
|
|
605
|
+
...opts,
|
|
664
606
|
routes: {
|
|
665
607
|
index: 'medias',
|
|
666
608
|
trashed: 'medias/trash',
|
|
@@ -672,7 +614,7 @@ class MediasApi extends Base {
|
|
|
672
614
|
restore: 'medias/restore/:media',
|
|
673
615
|
destroy: 'medias/:media',
|
|
674
616
|
replace: 'medias/replace/:media',
|
|
675
|
-
...(opts
|
|
617
|
+
...(opts?.routes || null)
|
|
676
618
|
}
|
|
677
619
|
});
|
|
678
620
|
}
|
|
@@ -738,29 +680,28 @@ class MediasApi extends Base {
|
|
|
738
680
|
}
|
|
739
681
|
}
|
|
740
682
|
|
|
741
|
-
class ResourcesApi {
|
|
742
|
-
constructor(
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
683
|
+
class ResourcesApi extends Base {
|
|
684
|
+
constructor(opts) {
|
|
685
|
+
super({
|
|
686
|
+
...opts,
|
|
687
|
+
routes: {
|
|
688
|
+
'resources.index': '/:resource',
|
|
689
|
+
'resources.show': '/:resource/:id',
|
|
690
|
+
'resources.store': '/:resource',
|
|
691
|
+
'resources.update': '/:resource/:id',
|
|
692
|
+
'resources.destroy': '/:resource/:id',
|
|
693
|
+
'resources.clone': '/:resource/:id/clone',
|
|
694
|
+
'resources.restore': '/:resource/:id/restore',
|
|
695
|
+
...(opts?.routes || null)
|
|
696
|
+
}
|
|
754
697
|
});
|
|
755
698
|
}
|
|
756
|
-
find(resource, id) {
|
|
757
|
-
return this.
|
|
699
|
+
find(resource, id, opts = null) {
|
|
700
|
+
return this.requestGet(this.resourceRoute(resource, 'show', {
|
|
758
701
|
id
|
|
759
|
-
}), null,
|
|
760
|
-
withCredentials: true
|
|
761
|
-
});
|
|
702
|
+
}), null, opts);
|
|
762
703
|
}
|
|
763
|
-
get(resource, query
|
|
704
|
+
get(resource, query, page = 1, count = 12, opts = null) {
|
|
764
705
|
const finalQuery = {
|
|
765
706
|
...query
|
|
766
707
|
};
|
|
@@ -770,56 +711,48 @@ class ResourcesApi {
|
|
|
770
711
|
if (count !== null) {
|
|
771
712
|
finalQuery.count = count;
|
|
772
713
|
}
|
|
773
|
-
return this.
|
|
774
|
-
withCredentials: true
|
|
775
|
-
});
|
|
714
|
+
return this.requestGet(this.resourceRoute(resource, 'index'), finalQuery, opts);
|
|
776
715
|
}
|
|
777
|
-
store(resource, data) {
|
|
778
|
-
return this.
|
|
779
|
-
withCredentials: true
|
|
780
|
-
});
|
|
716
|
+
store(resource, data, opts = null) {
|
|
717
|
+
return this.requestPost(this.resourceRoute(resource, 'store'), data, opts);
|
|
781
718
|
}
|
|
782
|
-
update(resource, id, data) {
|
|
783
|
-
return this.
|
|
719
|
+
update(resource, id, data, opts = null) {
|
|
720
|
+
return this.requestPatch(this.resourceRoute(resource, 'update', {
|
|
784
721
|
id
|
|
785
|
-
}), data,
|
|
786
|
-
withCredentials: true
|
|
787
|
-
});
|
|
722
|
+
}), data, opts);
|
|
788
723
|
}
|
|
789
|
-
destroy(resource, id) {
|
|
790
|
-
return this.
|
|
724
|
+
destroy(resource, id, opts = null) {
|
|
725
|
+
return this.requestDelete(this.resourceRoute(resource, 'destroy', {
|
|
791
726
|
id
|
|
792
|
-
}),
|
|
793
|
-
withCredentials: true
|
|
794
|
-
});
|
|
727
|
+
}), opts);
|
|
795
728
|
}
|
|
796
|
-
clone(resource, id, data = null) {
|
|
797
|
-
return this.
|
|
729
|
+
clone(resource, id, data = null, opts = null) {
|
|
730
|
+
return this.requestPost(this.resourceRoute(resource, 'clone', {
|
|
798
731
|
id
|
|
799
|
-
}), data,
|
|
800
|
-
withCredentials: true
|
|
801
|
-
});
|
|
732
|
+
}), data, opts);
|
|
802
733
|
}
|
|
803
|
-
restore(resource, id, data = null) {
|
|
804
|
-
return this.
|
|
734
|
+
restore(resource, id, data = null, opts = null) {
|
|
735
|
+
return this.requestPost(this.resourceRoute(resource, 'restore', {
|
|
805
736
|
id
|
|
806
|
-
}), data,
|
|
807
|
-
|
|
737
|
+
}), data, opts);
|
|
738
|
+
}
|
|
739
|
+
resourceRoute({
|
|
740
|
+
id
|
|
741
|
+
}, route, params = null) {
|
|
742
|
+
return this.route(`resources.${id}.${route}`, params) ?? this.route(`resources.${route}`, {
|
|
743
|
+
resource: id,
|
|
744
|
+
...params
|
|
808
745
|
});
|
|
809
746
|
}
|
|
810
747
|
}
|
|
811
748
|
|
|
812
749
|
class Api extends Base {
|
|
813
|
-
constructor(opts
|
|
750
|
+
constructor(opts) {
|
|
814
751
|
super(opts);
|
|
815
|
-
this.auth = new AuthApi(
|
|
816
|
-
|
|
817
|
-
});
|
|
818
|
-
this.account = new AccountApi(this, {
|
|
819
|
-
withCredentials: true
|
|
820
|
-
});
|
|
752
|
+
this.auth = new AuthApi(opts);
|
|
753
|
+
this.account = new AccountApi(opts);
|
|
821
754
|
this.medias = new MediasApi(opts);
|
|
822
|
-
this.resources = new ResourcesApi(
|
|
755
|
+
this.resources = new ResourcesApi(opts);
|
|
823
756
|
}
|
|
824
757
|
}
|
|
825
758
|
|
|
@@ -828,51 +761,54 @@ function useApi() {
|
|
|
828
761
|
return use(ApiContext);
|
|
829
762
|
}
|
|
830
763
|
function ApiProvider(t0) {
|
|
831
|
-
const $ = c(
|
|
764
|
+
const $ = c(11);
|
|
832
765
|
const {
|
|
833
766
|
api: t1,
|
|
834
767
|
baseUrl: t2,
|
|
835
768
|
onUnauthorized: t3,
|
|
769
|
+
routes: t4,
|
|
836
770
|
children
|
|
837
771
|
} = t0;
|
|
838
772
|
const initialApi = t1 === undefined ? null : t1;
|
|
839
773
|
const baseUrl = t2 === undefined ? undefined : t2;
|
|
840
774
|
const onUnauthorized = t3 === undefined ? null : t3;
|
|
775
|
+
const apiRoutes = t4 === undefined ? undefined : t4;
|
|
841
776
|
const generateUrl = useUrlGenerator();
|
|
842
777
|
const previousApi = useApi();
|
|
843
|
-
const
|
|
844
|
-
let
|
|
845
|
-
if ($[0] !==
|
|
846
|
-
|
|
778
|
+
const contextRoutes = useRoutes();
|
|
779
|
+
let t5;
|
|
780
|
+
if ($[0] !== apiRoutes || $[1] !== baseUrl || $[2] !== contextRoutes || $[3] !== generateUrl || $[4] !== initialApi || $[5] !== onUnauthorized || $[6] !== previousApi) {
|
|
781
|
+
t5 = initialApi || previousApi || new Api({
|
|
847
782
|
baseUrl,
|
|
848
783
|
generateUrl,
|
|
849
|
-
routes,
|
|
784
|
+
routes: apiRoutes || contextRoutes,
|
|
850
785
|
onUnauthorized
|
|
851
786
|
});
|
|
852
|
-
$[0] =
|
|
853
|
-
$[1] =
|
|
854
|
-
$[2] =
|
|
855
|
-
$[3] =
|
|
856
|
-
$[4] =
|
|
857
|
-
$[5] =
|
|
858
|
-
$[6] =
|
|
787
|
+
$[0] = apiRoutes;
|
|
788
|
+
$[1] = baseUrl;
|
|
789
|
+
$[2] = contextRoutes;
|
|
790
|
+
$[3] = generateUrl;
|
|
791
|
+
$[4] = initialApi;
|
|
792
|
+
$[5] = onUnauthorized;
|
|
793
|
+
$[6] = previousApi;
|
|
794
|
+
$[7] = t5;
|
|
859
795
|
} else {
|
|
860
|
-
|
|
796
|
+
t5 = $[7];
|
|
861
797
|
}
|
|
862
|
-
const api =
|
|
863
|
-
let
|
|
864
|
-
if ($[
|
|
865
|
-
|
|
798
|
+
const api = t5;
|
|
799
|
+
let t6;
|
|
800
|
+
if ($[8] !== api || $[9] !== children) {
|
|
801
|
+
t6 = /*#__PURE__*/jsx(ApiContext, {
|
|
866
802
|
value: api,
|
|
867
803
|
children: children
|
|
868
804
|
});
|
|
869
|
-
$[
|
|
870
|
-
$[
|
|
871
|
-
$[
|
|
805
|
+
$[8] = api;
|
|
806
|
+
$[9] = children;
|
|
807
|
+
$[10] = t6;
|
|
872
808
|
} else {
|
|
873
|
-
|
|
809
|
+
t6 = $[10];
|
|
874
810
|
}
|
|
875
|
-
return
|
|
811
|
+
return t6;
|
|
876
812
|
}
|
|
877
813
|
|
|
878
814
|
function useResourceDestroy(t0, t1, t2) {
|
|
@@ -895,7 +831,10 @@ function useResourceDestroy(t0, t1, t2) {
|
|
|
895
831
|
const api = useApi();
|
|
896
832
|
let t4;
|
|
897
833
|
if ($[2] !== api || $[3] !== finalId || $[4] !== finalResource) {
|
|
898
|
-
t4 =
|
|
834
|
+
t4 = t5 => {
|
|
835
|
+
const providedId = t5 === undefined ? null : t5;
|
|
836
|
+
return api.resources.destroy(finalResource, providedId ?? finalId);
|
|
837
|
+
};
|
|
899
838
|
$[2] = api;
|
|
900
839
|
$[3] = finalId;
|
|
901
840
|
$[4] = finalResource;
|
|
@@ -1099,161 +1038,355 @@ function useResourceItems(t0, t1, t2, t3, t4) {
|
|
|
1099
1038
|
return useItems(resourceId, t8);
|
|
1100
1039
|
}
|
|
1101
1040
|
|
|
1102
|
-
function
|
|
1103
|
-
const $ = c(
|
|
1104
|
-
|
|
1041
|
+
function useResourceStore(resource, t0) {
|
|
1042
|
+
const $ = c(18);
|
|
1043
|
+
let t1;
|
|
1044
|
+
if ($[0] !== t0) {
|
|
1045
|
+
t1 = t0 === undefined ? {} : t0;
|
|
1046
|
+
$[0] = t0;
|
|
1047
|
+
$[1] = t1;
|
|
1048
|
+
} else {
|
|
1049
|
+
t1 = $[1];
|
|
1050
|
+
}
|
|
1051
|
+
const options = t1;
|
|
1052
|
+
const providedResource = usePanneauResource(resource);
|
|
1053
|
+
const contextResource = useResource();
|
|
1054
|
+
const finalResource = providedResource || contextResource;
|
|
1105
1055
|
const api = useApi();
|
|
1106
|
-
let
|
|
1107
|
-
if ($[
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1056
|
+
let t2;
|
|
1057
|
+
if ($[2] !== api || $[3] !== finalResource) {
|
|
1058
|
+
t2 = data => api.resources.store(finalResource, data);
|
|
1059
|
+
$[2] = api;
|
|
1060
|
+
$[3] = finalResource;
|
|
1061
|
+
$[4] = t2;
|
|
1062
|
+
} else {
|
|
1063
|
+
t2 = $[4];
|
|
1064
|
+
}
|
|
1065
|
+
let t3;
|
|
1066
|
+
if ($[5] !== options || $[6] !== t2) {
|
|
1067
|
+
t3 = {
|
|
1068
|
+
mutationFn: t2,
|
|
1069
|
+
...options
|
|
1117
1070
|
};
|
|
1118
|
-
$[
|
|
1119
|
-
$[
|
|
1120
|
-
$[
|
|
1071
|
+
$[5] = options;
|
|
1072
|
+
$[6] = t2;
|
|
1073
|
+
$[7] = t3;
|
|
1121
1074
|
} else {
|
|
1122
|
-
|
|
1075
|
+
t3 = $[7];
|
|
1123
1076
|
}
|
|
1124
|
-
const
|
|
1125
|
-
let
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1077
|
+
const t4 = useMutation(t3);
|
|
1078
|
+
let isPending;
|
|
1079
|
+
let mutate;
|
|
1080
|
+
let mutateAsync;
|
|
1081
|
+
let other;
|
|
1082
|
+
if ($[8] !== t4) {
|
|
1083
|
+
({
|
|
1084
|
+
mutate,
|
|
1085
|
+
mutateAsync,
|
|
1086
|
+
isPending,
|
|
1087
|
+
...other
|
|
1088
|
+
} = t4);
|
|
1089
|
+
$[8] = t4;
|
|
1090
|
+
$[9] = isPending;
|
|
1091
|
+
$[10] = mutate;
|
|
1092
|
+
$[11] = mutateAsync;
|
|
1093
|
+
$[12] = other;
|
|
1094
|
+
} else {
|
|
1095
|
+
isPending = $[9];
|
|
1096
|
+
mutate = $[10];
|
|
1097
|
+
mutateAsync = $[11];
|
|
1098
|
+
other = $[12];
|
|
1099
|
+
}
|
|
1100
|
+
let t5;
|
|
1101
|
+
if ($[13] !== isPending || $[14] !== mutate || $[15] !== mutateAsync || $[16] !== other) {
|
|
1102
|
+
t5 = {
|
|
1103
|
+
store: mutate,
|
|
1104
|
+
storeAsync: mutateAsync,
|
|
1105
|
+
loading: isPending,
|
|
1106
|
+
mutate,
|
|
1107
|
+
mutateAsync,
|
|
1108
|
+
isPending,
|
|
1109
|
+
...other
|
|
1130
1110
|
};
|
|
1131
|
-
$[
|
|
1132
|
-
$[
|
|
1133
|
-
$[
|
|
1111
|
+
$[13] = isPending;
|
|
1112
|
+
$[14] = mutate;
|
|
1113
|
+
$[15] = mutateAsync;
|
|
1114
|
+
$[16] = other;
|
|
1115
|
+
$[17] = t5;
|
|
1134
1116
|
} else {
|
|
1135
|
-
|
|
1117
|
+
t5 = $[17];
|
|
1136
1118
|
}
|
|
1137
|
-
return
|
|
1119
|
+
return t5;
|
|
1138
1120
|
}
|
|
1139
1121
|
|
|
1140
|
-
function useResourceUpdate(resource,
|
|
1141
|
-
const $ = c(
|
|
1142
|
-
const
|
|
1122
|
+
function useResourceUpdate(resource, t0, t1) {
|
|
1123
|
+
const $ = c(22);
|
|
1124
|
+
const id = t0 === undefined ? null : t0;
|
|
1125
|
+
let t2;
|
|
1126
|
+
if ($[0] !== t1) {
|
|
1127
|
+
t2 = t1 === undefined ? {} : t1;
|
|
1128
|
+
$[0] = t1;
|
|
1129
|
+
$[1] = t2;
|
|
1130
|
+
} else {
|
|
1131
|
+
t2 = $[1];
|
|
1132
|
+
}
|
|
1133
|
+
const options = t2;
|
|
1134
|
+
const providedResource = usePanneauResource(isObject$1(resource) || isString$1(id) ? resource : null);
|
|
1135
|
+
const contextResource = useResource();
|
|
1136
|
+
const finalResource = providedResource || contextResource;
|
|
1137
|
+
const finalId = !isObject$1(id) ? id : resource;
|
|
1138
|
+
let t3;
|
|
1139
|
+
if ($[2] !== id || $[3] !== options) {
|
|
1140
|
+
t3 = isObject$1(id) ? id : options;
|
|
1141
|
+
$[2] = id;
|
|
1142
|
+
$[3] = options;
|
|
1143
|
+
$[4] = t3;
|
|
1144
|
+
} else {
|
|
1145
|
+
t3 = $[4];
|
|
1146
|
+
}
|
|
1147
|
+
const finalOptions = t3;
|
|
1143
1148
|
const api = useApi();
|
|
1144
|
-
let
|
|
1145
|
-
if ($[
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1149
|
+
let t4;
|
|
1150
|
+
if ($[5] !== api || $[6] !== finalId || $[7] !== finalResource) {
|
|
1151
|
+
t4 = data => api.resources.update(finalResource, finalId, data);
|
|
1152
|
+
$[5] = api;
|
|
1153
|
+
$[6] = finalId;
|
|
1154
|
+
$[7] = finalResource;
|
|
1155
|
+
$[8] = t4;
|
|
1156
|
+
} else {
|
|
1157
|
+
t4 = $[8];
|
|
1158
|
+
}
|
|
1159
|
+
let t5;
|
|
1160
|
+
if ($[9] !== finalOptions || $[10] !== t4) {
|
|
1161
|
+
t5 = {
|
|
1162
|
+
mutationFn: t4,
|
|
1163
|
+
...finalOptions
|
|
1155
1164
|
};
|
|
1156
|
-
$[
|
|
1157
|
-
$[
|
|
1158
|
-
$[
|
|
1159
|
-
$[3] = t0;
|
|
1165
|
+
$[9] = finalOptions;
|
|
1166
|
+
$[10] = t4;
|
|
1167
|
+
$[11] = t5;
|
|
1160
1168
|
} else {
|
|
1161
|
-
|
|
1169
|
+
t5 = $[11];
|
|
1162
1170
|
}
|
|
1163
|
-
const
|
|
1164
|
-
let
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1171
|
+
const t6 = useMutation(t5);
|
|
1172
|
+
let isPending;
|
|
1173
|
+
let mutate;
|
|
1174
|
+
let mutateAsync;
|
|
1175
|
+
let other;
|
|
1176
|
+
if ($[12] !== t6) {
|
|
1177
|
+
({
|
|
1178
|
+
mutate,
|
|
1179
|
+
mutateAsync,
|
|
1180
|
+
isPending,
|
|
1181
|
+
...other
|
|
1182
|
+
} = t6);
|
|
1183
|
+
$[12] = t6;
|
|
1184
|
+
$[13] = isPending;
|
|
1185
|
+
$[14] = mutate;
|
|
1186
|
+
$[15] = mutateAsync;
|
|
1187
|
+
$[16] = other;
|
|
1188
|
+
} else {
|
|
1189
|
+
isPending = $[13];
|
|
1190
|
+
mutate = $[14];
|
|
1191
|
+
mutateAsync = $[15];
|
|
1192
|
+
other = $[16];
|
|
1193
|
+
}
|
|
1194
|
+
let t7;
|
|
1195
|
+
if ($[17] !== isPending || $[18] !== mutate || $[19] !== mutateAsync || $[20] !== other) {
|
|
1196
|
+
t7 = {
|
|
1197
|
+
update: mutate,
|
|
1198
|
+
updateAsync: mutateAsync,
|
|
1199
|
+
loading: isPending,
|
|
1200
|
+
mutate,
|
|
1201
|
+
mutateAsync,
|
|
1202
|
+
isPending,
|
|
1203
|
+
...other
|
|
1169
1204
|
};
|
|
1170
|
-
$[
|
|
1171
|
-
$[
|
|
1172
|
-
$[
|
|
1205
|
+
$[17] = isPending;
|
|
1206
|
+
$[18] = mutate;
|
|
1207
|
+
$[19] = mutateAsync;
|
|
1208
|
+
$[20] = other;
|
|
1209
|
+
$[21] = t7;
|
|
1173
1210
|
} else {
|
|
1174
|
-
|
|
1211
|
+
t7 = $[21];
|
|
1175
1212
|
}
|
|
1176
|
-
return
|
|
1213
|
+
return t7;
|
|
1177
1214
|
}
|
|
1178
1215
|
|
|
1179
|
-
function useResourceClone(
|
|
1180
|
-
const $ = c(
|
|
1181
|
-
const
|
|
1182
|
-
const
|
|
1216
|
+
function useResourceClone(t0, t1, t2) {
|
|
1217
|
+
const $ = c(19);
|
|
1218
|
+
const resource = t0 === undefined ? null : t0;
|
|
1219
|
+
const id = t1 === undefined ? null : t1;
|
|
1220
|
+
let t3;
|
|
1221
|
+
if ($[0] !== t2) {
|
|
1222
|
+
t3 = t2 === undefined ? {} : t2;
|
|
1223
|
+
$[0] = t2;
|
|
1224
|
+
$[1] = t3;
|
|
1225
|
+
} else {
|
|
1226
|
+
t3 = $[1];
|
|
1227
|
+
}
|
|
1228
|
+
const options = t3;
|
|
1229
|
+
const providedResource = usePanneauResource(id !== null && !isObject(id) ? resource : null);
|
|
1230
|
+
const contextResource = useResource();
|
|
1231
|
+
const finalResource = providedResource || contextResource;
|
|
1232
|
+
const finalId = providedResource !== null ? id : resource;
|
|
1183
1233
|
const api = useApi();
|
|
1184
|
-
let
|
|
1185
|
-
if ($[
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
return api.resources.clone(
|
|
1189
|
-
setLoading(false);
|
|
1190
|
-
return response;
|
|
1191
|
-
}).catch(e => {
|
|
1192
|
-
setLoading(false);
|
|
1193
|
-
throw e;
|
|
1194
|
-
});
|
|
1234
|
+
let t4;
|
|
1235
|
+
if ($[2] !== api || $[3] !== finalId || $[4] !== finalResource) {
|
|
1236
|
+
t4 = t5 => {
|
|
1237
|
+
const providedId = t5 === undefined ? null : t5;
|
|
1238
|
+
return api.resources.clone(finalResource, providedId ?? finalId);
|
|
1195
1239
|
};
|
|
1196
|
-
$[
|
|
1197
|
-
$[
|
|
1198
|
-
$[
|
|
1199
|
-
$[
|
|
1240
|
+
$[2] = api;
|
|
1241
|
+
$[3] = finalId;
|
|
1242
|
+
$[4] = finalResource;
|
|
1243
|
+
$[5] = t4;
|
|
1200
1244
|
} else {
|
|
1201
|
-
|
|
1245
|
+
t4 = $[5];
|
|
1202
1246
|
}
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
loading
|
|
1247
|
+
let t5;
|
|
1248
|
+
if ($[6] !== options || $[7] !== t4) {
|
|
1249
|
+
t5 = {
|
|
1250
|
+
mutationFn: t4,
|
|
1251
|
+
...options
|
|
1209
1252
|
};
|
|
1210
|
-
$[
|
|
1211
|
-
$[
|
|
1212
|
-
$[
|
|
1253
|
+
$[6] = options;
|
|
1254
|
+
$[7] = t4;
|
|
1255
|
+
$[8] = t5;
|
|
1256
|
+
} else {
|
|
1257
|
+
t5 = $[8];
|
|
1258
|
+
}
|
|
1259
|
+
const t6 = useMutation(t5);
|
|
1260
|
+
let isPending;
|
|
1261
|
+
let mutate;
|
|
1262
|
+
let mutateAsync;
|
|
1263
|
+
let other;
|
|
1264
|
+
if ($[9] !== t6) {
|
|
1265
|
+
({
|
|
1266
|
+
mutate,
|
|
1267
|
+
mutateAsync,
|
|
1268
|
+
isPending,
|
|
1269
|
+
...other
|
|
1270
|
+
} = t6);
|
|
1271
|
+
$[9] = t6;
|
|
1272
|
+
$[10] = isPending;
|
|
1273
|
+
$[11] = mutate;
|
|
1274
|
+
$[12] = mutateAsync;
|
|
1275
|
+
$[13] = other;
|
|
1213
1276
|
} else {
|
|
1214
|
-
|
|
1277
|
+
isPending = $[10];
|
|
1278
|
+
mutate = $[11];
|
|
1279
|
+
mutateAsync = $[12];
|
|
1280
|
+
other = $[13];
|
|
1215
1281
|
}
|
|
1216
|
-
|
|
1282
|
+
let t7;
|
|
1283
|
+
if ($[14] !== isPending || $[15] !== mutate || $[16] !== mutateAsync || $[17] !== other) {
|
|
1284
|
+
t7 = {
|
|
1285
|
+
clone: mutate,
|
|
1286
|
+
cloneAsync: mutateAsync,
|
|
1287
|
+
loading: isPending,
|
|
1288
|
+
mutate,
|
|
1289
|
+
mutateAsync,
|
|
1290
|
+
isPending,
|
|
1291
|
+
...other
|
|
1292
|
+
};
|
|
1293
|
+
$[14] = isPending;
|
|
1294
|
+
$[15] = mutate;
|
|
1295
|
+
$[16] = mutateAsync;
|
|
1296
|
+
$[17] = other;
|
|
1297
|
+
$[18] = t7;
|
|
1298
|
+
} else {
|
|
1299
|
+
t7 = $[18];
|
|
1300
|
+
}
|
|
1301
|
+
return t7;
|
|
1217
1302
|
}
|
|
1218
1303
|
|
|
1219
|
-
function useResourceRestore(
|
|
1220
|
-
const $ = c(
|
|
1221
|
-
const
|
|
1222
|
-
const
|
|
1304
|
+
function useResourceRestore(t0, t1, t2) {
|
|
1305
|
+
const $ = c(19);
|
|
1306
|
+
const resource = t0 === undefined ? null : t0;
|
|
1307
|
+
const id = t1 === undefined ? null : t1;
|
|
1308
|
+
let t3;
|
|
1309
|
+
if ($[0] !== t2) {
|
|
1310
|
+
t3 = t2 === undefined ? {} : t2;
|
|
1311
|
+
$[0] = t2;
|
|
1312
|
+
$[1] = t3;
|
|
1313
|
+
} else {
|
|
1314
|
+
t3 = $[1];
|
|
1315
|
+
}
|
|
1316
|
+
const options = t3;
|
|
1317
|
+
const providedResource = usePanneauResource(id !== null && !isObject(id) ? resource : null);
|
|
1318
|
+
const contextResource = useResource();
|
|
1319
|
+
const finalResource = providedResource || contextResource;
|
|
1320
|
+
const finalId = providedResource !== null ? id : resource;
|
|
1223
1321
|
const api = useApi();
|
|
1224
|
-
let
|
|
1225
|
-
if ($[
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
return api.resources.restore(
|
|
1229
|
-
setLoading(false);
|
|
1230
|
-
return response;
|
|
1231
|
-
}).catch(e => {
|
|
1232
|
-
setLoading(false);
|
|
1233
|
-
throw e;
|
|
1234
|
-
});
|
|
1322
|
+
let t4;
|
|
1323
|
+
if ($[2] !== api || $[3] !== finalId || $[4] !== finalResource) {
|
|
1324
|
+
t4 = t5 => {
|
|
1325
|
+
const providedId = t5 === undefined ? null : t5;
|
|
1326
|
+
return api.resources.restore(finalResource, providedId ?? finalId);
|
|
1235
1327
|
};
|
|
1236
|
-
$[
|
|
1237
|
-
$[
|
|
1238
|
-
$[
|
|
1239
|
-
$[
|
|
1328
|
+
$[2] = api;
|
|
1329
|
+
$[3] = finalId;
|
|
1330
|
+
$[4] = finalResource;
|
|
1331
|
+
$[5] = t4;
|
|
1240
1332
|
} else {
|
|
1241
|
-
|
|
1333
|
+
t4 = $[5];
|
|
1242
1334
|
}
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
loading
|
|
1335
|
+
let t5;
|
|
1336
|
+
if ($[6] !== options || $[7] !== t4) {
|
|
1337
|
+
t5 = {
|
|
1338
|
+
mutationFn: t4,
|
|
1339
|
+
...options
|
|
1249
1340
|
};
|
|
1250
|
-
$[
|
|
1251
|
-
$[
|
|
1252
|
-
$[
|
|
1341
|
+
$[6] = options;
|
|
1342
|
+
$[7] = t4;
|
|
1343
|
+
$[8] = t5;
|
|
1253
1344
|
} else {
|
|
1254
|
-
|
|
1345
|
+
t5 = $[8];
|
|
1255
1346
|
}
|
|
1256
|
-
|
|
1347
|
+
const t6 = useMutation(t5);
|
|
1348
|
+
let isPending;
|
|
1349
|
+
let mutate;
|
|
1350
|
+
let mutateAsync;
|
|
1351
|
+
let other;
|
|
1352
|
+
if ($[9] !== t6) {
|
|
1353
|
+
({
|
|
1354
|
+
mutate,
|
|
1355
|
+
mutateAsync,
|
|
1356
|
+
isPending,
|
|
1357
|
+
...other
|
|
1358
|
+
} = t6);
|
|
1359
|
+
$[9] = t6;
|
|
1360
|
+
$[10] = isPending;
|
|
1361
|
+
$[11] = mutate;
|
|
1362
|
+
$[12] = mutateAsync;
|
|
1363
|
+
$[13] = other;
|
|
1364
|
+
} else {
|
|
1365
|
+
isPending = $[10];
|
|
1366
|
+
mutate = $[11];
|
|
1367
|
+
mutateAsync = $[12];
|
|
1368
|
+
other = $[13];
|
|
1369
|
+
}
|
|
1370
|
+
let t7;
|
|
1371
|
+
if ($[14] !== isPending || $[15] !== mutate || $[16] !== mutateAsync || $[17] !== other) {
|
|
1372
|
+
t7 = {
|
|
1373
|
+
restore: mutate,
|
|
1374
|
+
restoreAsync: mutateAsync,
|
|
1375
|
+
loading: isPending,
|
|
1376
|
+
mutate,
|
|
1377
|
+
mutateAsync,
|
|
1378
|
+
isPending,
|
|
1379
|
+
...other
|
|
1380
|
+
};
|
|
1381
|
+
$[14] = isPending;
|
|
1382
|
+
$[15] = mutate;
|
|
1383
|
+
$[16] = mutateAsync;
|
|
1384
|
+
$[17] = other;
|
|
1385
|
+
$[18] = t7;
|
|
1386
|
+
} else {
|
|
1387
|
+
t7 = $[18];
|
|
1388
|
+
}
|
|
1389
|
+
return t7;
|
|
1257
1390
|
}
|
|
1258
1391
|
|
|
1259
1392
|
const QueryContext = /*#__PURE__*/createContext(null);
|
|
@@ -1307,59 +1440,63 @@ function QueryProvider(t0) {
|
|
|
1307
1440
|
}
|
|
1308
1441
|
|
|
1309
1442
|
function DataProvider(t0) {
|
|
1310
|
-
const $ = c(
|
|
1443
|
+
const $ = c(11);
|
|
1311
1444
|
const {
|
|
1312
1445
|
api: t1,
|
|
1313
1446
|
apiBaseUrl: t2,
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1447
|
+
routes: t3,
|
|
1448
|
+
baseUrl: t4,
|
|
1449
|
+
children: t5,
|
|
1450
|
+
queryConfig: t6,
|
|
1451
|
+
initialQueryKey: t7,
|
|
1452
|
+
initialQueryData: t8,
|
|
1453
|
+
onUnauthorized: t9
|
|
1320
1454
|
} = t0;
|
|
1321
1455
|
const api = t1 === undefined ? null : t1;
|
|
1322
1456
|
const apiBaseUrl = t2 === undefined ? undefined : t2;
|
|
1323
|
-
const
|
|
1324
|
-
const
|
|
1325
|
-
const
|
|
1326
|
-
const
|
|
1327
|
-
const
|
|
1328
|
-
const
|
|
1329
|
-
const
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1457
|
+
const routes = t3 === undefined ? undefined : t3;
|
|
1458
|
+
const baseUrl = t4 === undefined ? undefined : t4;
|
|
1459
|
+
const children = t5 === undefined ? null : t5;
|
|
1460
|
+
const queryConfig = t6 === undefined ? null : t6;
|
|
1461
|
+
const initialQueryKey = t7 === undefined ? null : t7;
|
|
1462
|
+
const initialQueryData = t8 === undefined ? null : t8;
|
|
1463
|
+
const onUnauthorized = t9 === undefined ? null : t9;
|
|
1464
|
+
const t10 = baseUrl ?? apiBaseUrl;
|
|
1465
|
+
let t11;
|
|
1466
|
+
if ($[0] !== api || $[1] !== children || $[2] !== onUnauthorized || $[3] !== routes || $[4] !== t10) {
|
|
1467
|
+
t11 = /*#__PURE__*/jsx(ApiProvider, {
|
|
1333
1468
|
api: api,
|
|
1334
|
-
baseUrl:
|
|
1469
|
+
baseUrl: t10,
|
|
1470
|
+
routes: routes,
|
|
1335
1471
|
onUnauthorized: onUnauthorized,
|
|
1336
1472
|
children: children
|
|
1337
1473
|
});
|
|
1338
1474
|
$[0] = api;
|
|
1339
1475
|
$[1] = children;
|
|
1340
1476
|
$[2] = onUnauthorized;
|
|
1341
|
-
$[3] =
|
|
1477
|
+
$[3] = routes;
|
|
1342
1478
|
$[4] = t10;
|
|
1479
|
+
$[5] = t11;
|
|
1343
1480
|
} else {
|
|
1344
|
-
|
|
1481
|
+
t11 = $[5];
|
|
1345
1482
|
}
|
|
1346
|
-
let
|
|
1347
|
-
if ($[
|
|
1348
|
-
|
|
1483
|
+
let t12;
|
|
1484
|
+
if ($[6] !== initialQueryData || $[7] !== initialQueryKey || $[8] !== queryConfig || $[9] !== t11) {
|
|
1485
|
+
t12 = /*#__PURE__*/jsx(QueryProvider, {
|
|
1349
1486
|
config: queryConfig,
|
|
1350
1487
|
initialKey: initialQueryKey,
|
|
1351
1488
|
initialData: initialQueryData,
|
|
1352
|
-
children:
|
|
1489
|
+
children: t11
|
|
1353
1490
|
});
|
|
1354
|
-
$[
|
|
1355
|
-
$[
|
|
1356
|
-
$[
|
|
1357
|
-
$[8] = t10;
|
|
1491
|
+
$[6] = initialQueryData;
|
|
1492
|
+
$[7] = initialQueryKey;
|
|
1493
|
+
$[8] = queryConfig;
|
|
1358
1494
|
$[9] = t11;
|
|
1495
|
+
$[10] = t12;
|
|
1359
1496
|
} else {
|
|
1360
|
-
|
|
1497
|
+
t12 = $[10];
|
|
1361
1498
|
}
|
|
1362
|
-
return
|
|
1499
|
+
return t12;
|
|
1363
1500
|
}
|
|
1364
1501
|
|
|
1365
|
-
export { Api, ApiProvider, Base as BaseApi, DataProvider, QueryProvider, useApi, useItem, useItems, useQueryContext, useResourceClone, useResourceDestroy, useResourceItem, useResourceItems, useResourceRestore,
|
|
1502
|
+
export { Api, ApiProvider, Base as BaseApi, DataProvider, QueryProvider, useApi, useItem, useItems, useQueryContext, useResourceClone, useResourceDestroy, useResourceItem, useResourceItems, useResourceRestore, useResourceStore, useResourceUpdate };
|