solid-panes 3.5.15 → 3.5.16-alpha
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/lib/outline/manager.js +193 -162
- package/lib/outline/manager.js.map +1 -1
- package/lib/versionInfo.js +3 -3
- package/lib/versionInfo.js.map +1 -1
- package/package.json +3 -3
- package/src/outline/manager.js +29 -13
- package/src/versionInfo.ts +3 -3
package/lib/outline/manager.js
CHANGED
|
@@ -428,23 +428,23 @@ function _default(context) {
|
|
|
428
428
|
}
|
|
429
429
|
|
|
430
430
|
function _getDashboardItems() {
|
|
431
|
-
_getDashboardItems = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
431
|
+
_getDashboardItems = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
|
|
432
432
|
var me, div, _yield$Promise$all, _yield$Promise$all2, books, pods, getPods, _getPods, getAddressBooks, _getAddressBooks;
|
|
433
433
|
|
|
434
|
-
return regeneratorRuntime.wrap(function
|
|
434
|
+
return regeneratorRuntime.wrap(function _callee7$(_context8) {
|
|
435
435
|
while (1) {
|
|
436
|
-
switch (
|
|
436
|
+
switch (_context8.prev = _context8.next) {
|
|
437
437
|
case 0:
|
|
438
438
|
_getAddressBooks = function _getAddressBooks3() {
|
|
439
|
-
_getAddressBooks = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
440
|
-
var
|
|
439
|
+
_getAddressBooks = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
440
|
+
var _context6;
|
|
441
441
|
|
|
442
|
-
return regeneratorRuntime.wrap(function
|
|
442
|
+
return regeneratorRuntime.wrap(function _callee6$(_context7) {
|
|
443
443
|
while (1) {
|
|
444
|
-
switch (
|
|
444
|
+
switch (_context7.prev = _context7.next) {
|
|
445
445
|
case 0:
|
|
446
|
-
|
|
447
|
-
|
|
446
|
+
_context7.prev = 0;
|
|
447
|
+
_context7.next = 3;
|
|
448
448
|
return UI.authn.findAppInstances({
|
|
449
449
|
me: me,
|
|
450
450
|
div: div,
|
|
@@ -452,8 +452,8 @@ function _default(context) {
|
|
|
452
452
|
}, ns.vcard('AddressBook'));
|
|
453
453
|
|
|
454
454
|
case 3:
|
|
455
|
-
|
|
456
|
-
return
|
|
455
|
+
_context6 = _context7.sent;
|
|
456
|
+
return _context7.abrupt("return", (_context6.instances || []).map(function (book, index) {
|
|
457
457
|
return {
|
|
458
458
|
paneName: 'contact',
|
|
459
459
|
tabName: "contact-".concat(index),
|
|
@@ -464,19 +464,19 @@ function _default(context) {
|
|
|
464
464
|
}));
|
|
465
465
|
|
|
466
466
|
case 7:
|
|
467
|
-
|
|
468
|
-
|
|
467
|
+
_context7.prev = 7;
|
|
468
|
+
_context7.t0 = _context7["catch"](0);
|
|
469
469
|
console.error('oops in globalAppTabs AddressBook');
|
|
470
470
|
|
|
471
471
|
case 10:
|
|
472
|
-
return
|
|
472
|
+
return _context7.abrupt("return", []);
|
|
473
473
|
|
|
474
474
|
case 11:
|
|
475
475
|
case "end":
|
|
476
|
-
return
|
|
476
|
+
return _context7.stop();
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
},
|
|
479
|
+
}, _callee6, null, [[0, 7]]);
|
|
480
480
|
}));
|
|
481
481
|
return _getAddressBooks.apply(this, arguments);
|
|
482
482
|
};
|
|
@@ -486,142 +486,173 @@ function _default(context) {
|
|
|
486
486
|
};
|
|
487
487
|
|
|
488
488
|
_getPods = function _getPods3() {
|
|
489
|
-
_getPods = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
490
|
-
var
|
|
489
|
+
_getPods = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
490
|
+
var addPodStorage, _addPodStorage, addPodStorageFromUrl, _addPodStorageFromUrl, pods, uri, podUrl, uniques;
|
|
491
491
|
|
|
492
|
-
return regeneratorRuntime.wrap(function
|
|
492
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
493
493
|
while (1) {
|
|
494
|
-
switch (
|
|
494
|
+
switch (_context5.prev = _context5.next) {
|
|
495
495
|
case 0:
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
496
|
+
uniques = function _uniques(nodes) {
|
|
497
|
+
var uniqueNodes = [];
|
|
498
|
+
nodes.forEach(function (node) {
|
|
499
|
+
if (!uniqueNodes.find(function (uniqueNode) {
|
|
500
|
+
return uniqueNode.equals(node);
|
|
501
|
+
})) uniqueNodes.push(node);
|
|
502
|
+
});
|
|
503
|
+
return uniqueNodes;
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
_addPodStorageFromUrl = function _addPodStorageFromUrl3() {
|
|
507
|
+
_addPodStorageFromUrl = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(url) {
|
|
508
|
+
var podStorage, pathStorage;
|
|
509
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
500
510
|
while (1) {
|
|
501
|
-
switch (
|
|
511
|
+
switch (_context4.prev = _context4.next) {
|
|
502
512
|
case 0:
|
|
503
|
-
podStorage = new URL(url); // check
|
|
504
|
-
|
|
505
|
-
if (pods.some(function (pod) {
|
|
506
|
-
return pod.uri.includes(podStorage.origin);
|
|
507
|
-
})) {
|
|
508
|
-
_context3.next = 10;
|
|
509
|
-
break;
|
|
510
|
-
}
|
|
513
|
+
podStorage = new URL(url); // check for predicate pim:Storage in containers up the path tree
|
|
511
514
|
|
|
512
|
-
|
|
515
|
+
pathStorage = podStorage.pathname;
|
|
513
516
|
|
|
514
|
-
|
|
515
|
-
|
|
517
|
+
case 2:
|
|
518
|
+
if (!pathStorage.length) {
|
|
519
|
+
_context4.next = 10;
|
|
516
520
|
break;
|
|
517
521
|
}
|
|
518
522
|
|
|
519
|
-
|
|
520
|
-
|
|
523
|
+
pathStorage = pathStorage.substring(0, pathStorage.lastIndexOf('/'));
|
|
524
|
+
_context4.next = 6;
|
|
525
|
+
return addPodStorage(kb.sym("".concat(podStorage.origin).concat(pathStorage, "/")));
|
|
521
526
|
|
|
522
527
|
case 6:
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
case 7:
|
|
526
|
-
if (!_context3.t0) {
|
|
527
|
-
_context3.next = 10;
|
|
528
|
+
if (!_context4.sent) {
|
|
529
|
+
_context4.next = 8;
|
|
528
530
|
break;
|
|
529
531
|
}
|
|
530
532
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
+
return _context4.abrupt("return");
|
|
534
|
+
|
|
535
|
+
case 8:
|
|
536
|
+
_context4.next = 2;
|
|
537
|
+
break;
|
|
533
538
|
|
|
534
539
|
case 10:
|
|
535
540
|
case "end":
|
|
536
|
-
return
|
|
541
|
+
return _context4.stop();
|
|
537
542
|
}
|
|
538
543
|
}
|
|
539
|
-
},
|
|
544
|
+
}, _callee4);
|
|
540
545
|
}));
|
|
541
|
-
return
|
|
546
|
+
return _addPodStorageFromUrl.apply(this, arguments);
|
|
542
547
|
};
|
|
543
548
|
|
|
544
|
-
|
|
545
|
-
return
|
|
549
|
+
addPodStorageFromUrl = function _addPodStorageFromUrl2(_x8) {
|
|
550
|
+
return _addPodStorageFromUrl.apply(this, arguments);
|
|
546
551
|
};
|
|
547
552
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
return regeneratorRuntime.wrap(function
|
|
553
|
+
_addPodStorage = function _addPodStorage3() {
|
|
554
|
+
_addPodStorage = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(pod) {
|
|
555
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
551
556
|
while (1) {
|
|
552
|
-
switch (
|
|
557
|
+
switch (_context3.prev = _context3.next) {
|
|
553
558
|
case 0:
|
|
554
|
-
|
|
555
|
-
return
|
|
559
|
+
_context3.next = 2;
|
|
560
|
+
return loadContainerRepresentation(pod);
|
|
556
561
|
|
|
557
562
|
case 2:
|
|
558
563
|
if (!kb.holds(pod, ns.rdf('type'), ns.space('Storage'), pod.doc())) {
|
|
559
|
-
|
|
564
|
+
_context3.next = 5;
|
|
560
565
|
break;
|
|
561
566
|
}
|
|
562
567
|
|
|
563
568
|
pods.push(pod);
|
|
564
|
-
return
|
|
569
|
+
return _context3.abrupt("return", true);
|
|
565
570
|
|
|
566
571
|
case 5:
|
|
567
|
-
return
|
|
572
|
+
return _context3.abrupt("return", false);
|
|
568
573
|
|
|
569
574
|
case 6:
|
|
570
575
|
case "end":
|
|
571
|
-
return
|
|
576
|
+
return _context3.stop();
|
|
572
577
|
}
|
|
573
578
|
}
|
|
574
|
-
},
|
|
579
|
+
}, _callee3);
|
|
575
580
|
}));
|
|
576
|
-
return
|
|
581
|
+
return _addPodStorage.apply(this, arguments);
|
|
577
582
|
};
|
|
578
583
|
|
|
579
|
-
|
|
580
|
-
return
|
|
584
|
+
addPodStorage = function _addPodStorage2(_x7) {
|
|
585
|
+
return _addPodStorage.apply(this, arguments);
|
|
581
586
|
};
|
|
582
587
|
|
|
583
|
-
|
|
584
|
-
|
|
588
|
+
_context5.prev = 5;
|
|
589
|
+
_context5.next = 8;
|
|
585
590
|
return kb.fetcher.load(me.doc());
|
|
586
591
|
|
|
587
|
-
case
|
|
588
|
-
|
|
592
|
+
case 8:
|
|
593
|
+
_context5.next = 14;
|
|
589
594
|
break;
|
|
590
595
|
|
|
591
|
-
case
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
console.error('Unable to load profile',
|
|
595
|
-
return
|
|
596
|
+
case 10:
|
|
597
|
+
_context5.prev = 10;
|
|
598
|
+
_context5.t0 = _context5["catch"](5);
|
|
599
|
+
console.error('Unable to load profile', _context5.t0);
|
|
600
|
+
return _context5.abrupt("return", []);
|
|
596
601
|
|
|
597
|
-
case
|
|
602
|
+
case 14:
|
|
603
|
+
// load pod's storages from profile
|
|
598
604
|
pods = kb.each(me, ns.space('storage'), null, me.doc());
|
|
599
|
-
|
|
605
|
+
pods.map( /*#__PURE__*/function () {
|
|
606
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(pod) {
|
|
607
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
608
|
+
while (1) {
|
|
609
|
+
switch (_context2.prev = _context2.next) {
|
|
610
|
+
case 0:
|
|
611
|
+
_context2.next = 2;
|
|
612
|
+
return loadContainerRepresentation(pod);
|
|
613
|
+
|
|
614
|
+
case 2:
|
|
615
|
+
case "end":
|
|
616
|
+
return _context2.stop();
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}, _callee2);
|
|
620
|
+
}));
|
|
621
|
+
|
|
622
|
+
return function (_x9) {
|
|
623
|
+
return _ref.apply(this, arguments);
|
|
624
|
+
};
|
|
625
|
+
}());
|
|
626
|
+
_context5.prev = 16;
|
|
600
627
|
// if uri then SolidOS is a browse.html web app
|
|
601
628
|
uri = new URL(window.location.href).searchParams.get('uri');
|
|
602
629
|
podUrl = uri || window.location.href;
|
|
603
|
-
|
|
604
|
-
return
|
|
630
|
+
_context5.next = 21;
|
|
631
|
+
return addPodStorageFromUrl(podUrl);
|
|
605
632
|
|
|
606
|
-
case
|
|
607
|
-
|
|
633
|
+
case 21:
|
|
634
|
+
_context5.next = 26;
|
|
608
635
|
break;
|
|
609
636
|
|
|
610
|
-
case
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
console.error('cannot load container',
|
|
637
|
+
case 23:
|
|
638
|
+
_context5.prev = 23;
|
|
639
|
+
_context5.t1 = _context5["catch"](16);
|
|
640
|
+
console.error('cannot load container', _context5.t1);
|
|
641
|
+
|
|
642
|
+
case 26:
|
|
643
|
+
pods = uniques(pods);
|
|
644
|
+
console.log('return pods');
|
|
645
|
+
console.log(pods);
|
|
614
646
|
|
|
615
|
-
case 24:
|
|
616
647
|
if (pods.length) {
|
|
617
|
-
|
|
648
|
+
_context5.next = 31;
|
|
618
649
|
break;
|
|
619
650
|
}
|
|
620
651
|
|
|
621
|
-
return
|
|
652
|
+
return _context5.abrupt("return", []);
|
|
622
653
|
|
|
623
|
-
case
|
|
624
|
-
return
|
|
654
|
+
case 31:
|
|
655
|
+
return _context5.abrupt("return", pods.map(function (pod, index) {
|
|
625
656
|
function split(item) {
|
|
626
657
|
return item.uri.split('//')[1].slice(0, -1);
|
|
627
658
|
}
|
|
@@ -636,12 +667,12 @@ function _default(context) {
|
|
|
636
667
|
};
|
|
637
668
|
}));
|
|
638
669
|
|
|
639
|
-
case
|
|
670
|
+
case 32:
|
|
640
671
|
case "end":
|
|
641
|
-
return
|
|
672
|
+
return _context5.stop();
|
|
642
673
|
}
|
|
643
674
|
}
|
|
644
|
-
},
|
|
675
|
+
}, _callee5, null, [[5, 10], [16, 23]]);
|
|
645
676
|
}));
|
|
646
677
|
return _getPods.apply(this, arguments);
|
|
647
678
|
};
|
|
@@ -653,23 +684,23 @@ function _default(context) {
|
|
|
653
684
|
me = UI.authn.currentUser();
|
|
654
685
|
|
|
655
686
|
if (me) {
|
|
656
|
-
|
|
687
|
+
_context8.next = 7;
|
|
657
688
|
break;
|
|
658
689
|
}
|
|
659
690
|
|
|
660
|
-
return
|
|
691
|
+
return _context8.abrupt("return", []);
|
|
661
692
|
|
|
662
693
|
case 7:
|
|
663
694
|
div = dom.createElement('div');
|
|
664
|
-
|
|
695
|
+
_context8.next = 10;
|
|
665
696
|
return Promise.all([getAddressBooks(), getPods()]);
|
|
666
697
|
|
|
667
698
|
case 10:
|
|
668
|
-
_yield$Promise$all =
|
|
699
|
+
_yield$Promise$all = _context8.sent;
|
|
669
700
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
|
|
670
701
|
books = _yield$Promise$all2[0];
|
|
671
702
|
pods = _yield$Promise$all2[1];
|
|
672
|
-
return
|
|
703
|
+
return _context8.abrupt("return", [{
|
|
673
704
|
paneName: 'home',
|
|
674
705
|
label: 'Your stuff',
|
|
675
706
|
icon: UI.icons.iconBase + 'noun_547570.svg'
|
|
@@ -685,10 +716,10 @@ function _default(context) {
|
|
|
685
716
|
|
|
686
717
|
case 15:
|
|
687
718
|
case "end":
|
|
688
|
-
return
|
|
719
|
+
return _context8.stop();
|
|
689
720
|
}
|
|
690
721
|
}
|
|
691
|
-
},
|
|
722
|
+
}, _callee7);
|
|
692
723
|
}));
|
|
693
724
|
return _getDashboardItems.apply(this, arguments);
|
|
694
725
|
}
|
|
@@ -707,7 +738,7 @@ function _default(context) {
|
|
|
707
738
|
}
|
|
708
739
|
|
|
709
740
|
function _showDashboard() {
|
|
710
|
-
_showDashboard = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
741
|
+
_showDashboard = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
711
742
|
var options,
|
|
712
743
|
dashboardContainer,
|
|
713
744
|
outlineContainer,
|
|
@@ -715,23 +746,23 @@ function _default(context) {
|
|
|
715
746
|
dashboard,
|
|
716
747
|
tab,
|
|
717
748
|
closeDashboard,
|
|
718
|
-
|
|
749
|
+
_args8 = arguments;
|
|
719
750
|
|
|
720
|
-
return regeneratorRuntime.wrap(function
|
|
751
|
+
return regeneratorRuntime.wrap(function _callee8$(_context9) {
|
|
721
752
|
while (1) {
|
|
722
|
-
switch (
|
|
753
|
+
switch (_context9.prev = _context9.next) {
|
|
723
754
|
case 0:
|
|
724
755
|
closeDashboard = function _closeDashboard() {
|
|
725
756
|
dashboardContainer.style.display = 'none';
|
|
726
757
|
outlineContainer.style.display = 'inherit';
|
|
727
758
|
};
|
|
728
759
|
|
|
729
|
-
options =
|
|
760
|
+
options = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
730
761
|
dashboardContainer = getDashboardContainer();
|
|
731
762
|
outlineContainer = getOutlineContainer(); // reuse dashboard if already children already is inserted
|
|
732
763
|
|
|
733
764
|
if (!(dashboardContainer.childNodes.length > 0 && options.pane)) {
|
|
734
|
-
|
|
765
|
+
_context9.next = 12;
|
|
735
766
|
break;
|
|
736
767
|
}
|
|
737
768
|
|
|
@@ -740,26 +771,26 @@ function _default(context) {
|
|
|
740
771
|
_tab = dashboardContainer.querySelector("[data-global-pane-name=\"".concat(options.pane, "\"]"));
|
|
741
772
|
|
|
742
773
|
if (!_tab) {
|
|
743
|
-
|
|
774
|
+
_context9.next = 11;
|
|
744
775
|
break;
|
|
745
776
|
}
|
|
746
777
|
|
|
747
778
|
_tab.click();
|
|
748
779
|
|
|
749
|
-
return
|
|
780
|
+
return _context9.abrupt("return");
|
|
750
781
|
|
|
751
782
|
case 11:
|
|
752
783
|
console.warn('Did not find the referred tab in global dashboard, will open first one');
|
|
753
784
|
|
|
754
785
|
case 12:
|
|
755
|
-
|
|
786
|
+
_context9.next = 14;
|
|
756
787
|
return globalAppTabs({
|
|
757
788
|
selectedTab: options.pane,
|
|
758
789
|
onClose: closeDashboard
|
|
759
790
|
});
|
|
760
791
|
|
|
761
792
|
case 14:
|
|
762
|
-
dashboard =
|
|
793
|
+
dashboard = _context9.sent;
|
|
763
794
|
// close the dashboard if user log out
|
|
764
795
|
UI.authn.authSession.onLogout(closeDashboard); // finally - switch to showing dashboard
|
|
765
796
|
|
|
@@ -773,10 +804,10 @@ function _default(context) {
|
|
|
773
804
|
|
|
774
805
|
case 20:
|
|
775
806
|
case "end":
|
|
776
|
-
return
|
|
807
|
+
return _context9.stop();
|
|
777
808
|
}
|
|
778
809
|
}
|
|
779
|
-
},
|
|
810
|
+
}, _callee8);
|
|
780
811
|
}));
|
|
781
812
|
return _showDashboard.apply(this, arguments);
|
|
782
813
|
}
|
|
@@ -807,23 +838,23 @@ function _default(context) {
|
|
|
807
838
|
}();
|
|
808
839
|
}
|
|
809
840
|
|
|
810
|
-
function
|
|
811
|
-
return
|
|
841
|
+
function loadContainerRepresentation(_x) {
|
|
842
|
+
return _loadContainerRepresentation.apply(this, arguments);
|
|
812
843
|
}
|
|
813
844
|
|
|
814
|
-
function
|
|
815
|
-
|
|
845
|
+
function _loadContainerRepresentation() {
|
|
846
|
+
_loadContainerRepresentation = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(subject) {
|
|
816
847
|
var response, containerTurtle;
|
|
817
|
-
return regeneratorRuntime.wrap(function
|
|
848
|
+
return regeneratorRuntime.wrap(function _callee9$(_context10) {
|
|
818
849
|
while (1) {
|
|
819
|
-
switch (
|
|
850
|
+
switch (_context10.prev = _context10.next) {
|
|
820
851
|
case 0:
|
|
821
852
|
if (kb.any(subject, ns.ldp('contains'), undefined, subject.doc())) {
|
|
822
|
-
|
|
853
|
+
_context10.next = 6;
|
|
823
854
|
break;
|
|
824
855
|
}
|
|
825
856
|
|
|
826
|
-
|
|
857
|
+
_context10.next = 3;
|
|
827
858
|
return kb.fetcher.webOperation('GET', subject.uri, kb.fetcher.initFetchOptions(subject.uri, {
|
|
828
859
|
headers: {
|
|
829
860
|
accept: 'text/turtle'
|
|
@@ -831,18 +862,18 @@ function _default(context) {
|
|
|
831
862
|
}));
|
|
832
863
|
|
|
833
864
|
case 3:
|
|
834
|
-
response =
|
|
865
|
+
response = _context10.sent;
|
|
835
866
|
containerTurtle = response.responseText;
|
|
836
867
|
$rdf.parse(containerTurtle, kb, subject.uri, 'text/turtle');
|
|
837
868
|
|
|
838
869
|
case 6:
|
|
839
870
|
case "end":
|
|
840
|
-
return
|
|
871
|
+
return _context10.stop();
|
|
841
872
|
}
|
|
842
873
|
}
|
|
843
|
-
},
|
|
874
|
+
}, _callee9);
|
|
844
875
|
}));
|
|
845
|
-
return
|
|
876
|
+
return _loadContainerRepresentation.apply(this, arguments);
|
|
846
877
|
}
|
|
847
878
|
|
|
848
879
|
function getRelevantPanes(_x2, _x3) {
|
|
@@ -850,19 +881,19 @@ function _default(context) {
|
|
|
850
881
|
}
|
|
851
882
|
|
|
852
883
|
function _getRelevantPanes() {
|
|
853
|
-
_getRelevantPanes = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
884
|
+
_getRelevantPanes = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(subject, context) {
|
|
854
885
|
var panes, relevantPanes, filteredPanes, firstRelevantPaneIndex, firstFilteredPaneIndex;
|
|
855
|
-
return regeneratorRuntime.wrap(function
|
|
886
|
+
return regeneratorRuntime.wrap(function _callee10$(_context11) {
|
|
856
887
|
while (1) {
|
|
857
|
-
switch (
|
|
888
|
+
switch (_context11.prev = _context11.next) {
|
|
858
889
|
case 0:
|
|
859
890
|
if (!subject.uri.endsWith('/')) {
|
|
860
|
-
|
|
891
|
+
_context11.next = 3;
|
|
861
892
|
break;
|
|
862
893
|
}
|
|
863
894
|
|
|
864
|
-
|
|
865
|
-
return
|
|
895
|
+
_context11.next = 3;
|
|
896
|
+
return loadContainerRepresentation(subject);
|
|
866
897
|
|
|
867
898
|
case 3:
|
|
868
899
|
panes = context.session.paneRegistry;
|
|
@@ -871,38 +902,38 @@ function _default(context) {
|
|
|
871
902
|
});
|
|
872
903
|
|
|
873
904
|
if (!(relevantPanes.length === 0)) {
|
|
874
|
-
|
|
905
|
+
_context11.next = 7;
|
|
875
906
|
break;
|
|
876
907
|
}
|
|
877
908
|
|
|
878
|
-
return
|
|
909
|
+
return _context11.abrupt("return", [panes.byName('internal')]);
|
|
879
910
|
|
|
880
911
|
case 7:
|
|
881
|
-
|
|
912
|
+
_context11.next = 9;
|
|
882
913
|
return UI.authn.filterAvailablePanes(relevantPanes);
|
|
883
914
|
|
|
884
915
|
case 9:
|
|
885
|
-
filteredPanes =
|
|
916
|
+
filteredPanes = _context11.sent;
|
|
886
917
|
|
|
887
918
|
if (!(filteredPanes.length === 0)) {
|
|
888
|
-
|
|
919
|
+
_context11.next = 12;
|
|
889
920
|
break;
|
|
890
921
|
}
|
|
891
922
|
|
|
892
|
-
return
|
|
923
|
+
return _context11.abrupt("return", [relevantPanes[0]]);
|
|
893
924
|
|
|
894
925
|
case 12:
|
|
895
926
|
firstRelevantPaneIndex = panes.list.indexOf(relevantPanes[0]);
|
|
896
927
|
firstFilteredPaneIndex = panes.list.indexOf(filteredPanes[0]); // if the first relevant pane is loaded before the panes available wrt role, we still want to offer the most relevant pane
|
|
897
928
|
|
|
898
|
-
return
|
|
929
|
+
return _context11.abrupt("return", firstRelevantPaneIndex < firstFilteredPaneIndex ? [relevantPanes[0]].concat(filteredPanes) : filteredPanes);
|
|
899
930
|
|
|
900
931
|
case 15:
|
|
901
932
|
case "end":
|
|
902
|
-
return
|
|
933
|
+
return _context11.stop();
|
|
903
934
|
}
|
|
904
935
|
}
|
|
905
|
-
},
|
|
936
|
+
}, _callee10);
|
|
906
937
|
}));
|
|
907
938
|
return _getRelevantPanes.apply(this, arguments);
|
|
908
939
|
}
|
|
@@ -940,50 +971,50 @@ function _default(context) {
|
|
|
940
971
|
|
|
941
972
|
|
|
942
973
|
function _expandedHeaderTR() {
|
|
943
|
-
_expandedHeaderTR = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
974
|
+
_expandedHeaderTR = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(subject, requiredPane, options) {
|
|
944
975
|
var renderPaneIconTray, _renderPaneIconTray, tr, td, header, showHeader, icon, strong;
|
|
945
976
|
|
|
946
|
-
return regeneratorRuntime.wrap(function
|
|
977
|
+
return regeneratorRuntime.wrap(function _callee12$(_context13) {
|
|
947
978
|
while (1) {
|
|
948
|
-
switch (
|
|
979
|
+
switch (_context13.prev = _context13.next) {
|
|
949
980
|
case 0:
|
|
950
981
|
_renderPaneIconTray = function _renderPaneIconTray3() {
|
|
951
|
-
_renderPaneIconTray = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
982
|
+
_renderPaneIconTray = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(td) {
|
|
952
983
|
var options,
|
|
953
984
|
paneShownStyle,
|
|
954
985
|
paneHiddenStyle,
|
|
955
986
|
paneIconTray,
|
|
956
987
|
relevantPanes,
|
|
957
988
|
paneNumber,
|
|
958
|
-
|
|
959
|
-
return regeneratorRuntime.wrap(function
|
|
989
|
+
_args11 = arguments;
|
|
990
|
+
return regeneratorRuntime.wrap(function _callee11$(_context12) {
|
|
960
991
|
while (1) {
|
|
961
|
-
switch (
|
|
992
|
+
switch (_context12.prev = _context12.next) {
|
|
962
993
|
case 0:
|
|
963
|
-
options =
|
|
994
|
+
options = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
|
|
964
995
|
paneShownStyle = 'width: 24px; border-radius: 0.5em; border-top: solid #222 1px; border-left: solid #222 0.1em; border-bottom: solid #eee 0.1em; border-right: solid #eee 0.1em; margin-left: 1em; padding: 3px; background-color: #ffd;';
|
|
965
996
|
paneHiddenStyle = 'width: 24px; border-radius: 0.5em; margin-left: 1em; padding: 3px';
|
|
966
997
|
paneIconTray = td.appendChild(dom.createElement('nav'));
|
|
967
998
|
paneIconTray.style = 'display:flex; justify-content: flex-start; align-items: center;';
|
|
968
999
|
|
|
969
1000
|
if (!options.hideList) {
|
|
970
|
-
|
|
1001
|
+
_context12.next = 9;
|
|
971
1002
|
break;
|
|
972
1003
|
}
|
|
973
1004
|
|
|
974
|
-
|
|
975
|
-
|
|
1005
|
+
_context12.t0 = [];
|
|
1006
|
+
_context12.next = 12;
|
|
976
1007
|
break;
|
|
977
1008
|
|
|
978
1009
|
case 9:
|
|
979
|
-
|
|
1010
|
+
_context12.next = 11;
|
|
980
1011
|
return getRelevantPanes(subject, context);
|
|
981
1012
|
|
|
982
1013
|
case 11:
|
|
983
|
-
|
|
1014
|
+
_context12.t0 = _context12.sent;
|
|
984
1015
|
|
|
985
1016
|
case 12:
|
|
986
|
-
relevantPanes =
|
|
1017
|
+
relevantPanes = _context12.t0;
|
|
987
1018
|
tr.firstPane = requiredPane || getPane(relevantPanes, subject);
|
|
988
1019
|
paneNumber = relevantPanes.indexOf(tr.firstPane);
|
|
989
1020
|
|
|
@@ -1100,19 +1131,19 @@ function _default(context) {
|
|
|
1100
1131
|
});
|
|
1101
1132
|
}
|
|
1102
1133
|
|
|
1103
|
-
return
|
|
1134
|
+
return _context12.abrupt("return", paneIconTray);
|
|
1104
1135
|
|
|
1105
1136
|
case 17:
|
|
1106
1137
|
case "end":
|
|
1107
|
-
return
|
|
1138
|
+
return _context12.stop();
|
|
1108
1139
|
}
|
|
1109
1140
|
}
|
|
1110
|
-
},
|
|
1141
|
+
}, _callee11);
|
|
1111
1142
|
}));
|
|
1112
1143
|
return _renderPaneIconTray.apply(this, arguments);
|
|
1113
1144
|
};
|
|
1114
1145
|
|
|
1115
|
-
renderPaneIconTray = function _renderPaneIconTray2(
|
|
1146
|
+
renderPaneIconTray = function _renderPaneIconTray2(_x10) {
|
|
1116
1147
|
return _renderPaneIconTray.apply(this, arguments);
|
|
1117
1148
|
};
|
|
1118
1149
|
|
|
@@ -1144,16 +1175,16 @@ function _default(context) {
|
|
|
1144
1175
|
UI.widgets.makeDraggable(strong, subject);
|
|
1145
1176
|
}
|
|
1146
1177
|
|
|
1147
|
-
|
|
1148
|
-
|
|
1178
|
+
_context13.t0 = header;
|
|
1179
|
+
_context13.next = 16;
|
|
1149
1180
|
return renderPaneIconTray(td, {
|
|
1150
1181
|
hideList: showHeader
|
|
1151
1182
|
});
|
|
1152
1183
|
|
|
1153
1184
|
case 16:
|
|
1154
|
-
|
|
1185
|
+
_context13.t1 = _context13.sent;
|
|
1155
1186
|
|
|
1156
|
-
|
|
1187
|
+
_context13.t0.appendChild.call(_context13.t0, _context13.t1);
|
|
1157
1188
|
|
|
1158
1189
|
// set DOM methods
|
|
1159
1190
|
tr.firstChild.tabulatorSelect = function () {
|
|
@@ -1164,14 +1195,14 @@ function _default(context) {
|
|
|
1164
1195
|
setSelected(this, false);
|
|
1165
1196
|
};
|
|
1166
1197
|
|
|
1167
|
-
return
|
|
1198
|
+
return _context13.abrupt("return", tr);
|
|
1168
1199
|
|
|
1169
1200
|
case 21:
|
|
1170
1201
|
case "end":
|
|
1171
|
-
return
|
|
1202
|
+
return _context13.stop();
|
|
1172
1203
|
}
|
|
1173
1204
|
}
|
|
1174
|
-
},
|
|
1205
|
+
}, _callee12);
|
|
1175
1206
|
}));
|
|
1176
1207
|
return _expandedHeaderTR.apply(this, arguments);
|
|
1177
1208
|
}
|