solid-panes 3.5.16 → 3.5.18
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/.github/workflows/ci.yml +45 -6
- package/lib/outline/manager.js +191 -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 +1 -1
- package/src/outline/manager.js +27 -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,171 @@ 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);
|
|
614
644
|
|
|
615
|
-
case 24:
|
|
616
645
|
if (pods.length) {
|
|
617
|
-
|
|
646
|
+
_context5.next = 29;
|
|
618
647
|
break;
|
|
619
648
|
}
|
|
620
649
|
|
|
621
|
-
return
|
|
650
|
+
return _context5.abrupt("return", []);
|
|
622
651
|
|
|
623
|
-
case
|
|
624
|
-
return
|
|
652
|
+
case 29:
|
|
653
|
+
return _context5.abrupt("return", pods.map(function (pod, index) {
|
|
625
654
|
function split(item) {
|
|
626
655
|
return item.uri.split('//')[1].slice(0, -1);
|
|
627
656
|
}
|
|
@@ -636,12 +665,12 @@ function _default(context) {
|
|
|
636
665
|
};
|
|
637
666
|
}));
|
|
638
667
|
|
|
639
|
-
case
|
|
668
|
+
case 30:
|
|
640
669
|
case "end":
|
|
641
|
-
return
|
|
670
|
+
return _context5.stop();
|
|
642
671
|
}
|
|
643
672
|
}
|
|
644
|
-
},
|
|
673
|
+
}, _callee5, null, [[5, 10], [16, 23]]);
|
|
645
674
|
}));
|
|
646
675
|
return _getPods.apply(this, arguments);
|
|
647
676
|
};
|
|
@@ -653,23 +682,23 @@ function _default(context) {
|
|
|
653
682
|
me = UI.authn.currentUser();
|
|
654
683
|
|
|
655
684
|
if (me) {
|
|
656
|
-
|
|
685
|
+
_context8.next = 7;
|
|
657
686
|
break;
|
|
658
687
|
}
|
|
659
688
|
|
|
660
|
-
return
|
|
689
|
+
return _context8.abrupt("return", []);
|
|
661
690
|
|
|
662
691
|
case 7:
|
|
663
692
|
div = dom.createElement('div');
|
|
664
|
-
|
|
693
|
+
_context8.next = 10;
|
|
665
694
|
return Promise.all([getAddressBooks(), getPods()]);
|
|
666
695
|
|
|
667
696
|
case 10:
|
|
668
|
-
_yield$Promise$all =
|
|
697
|
+
_yield$Promise$all = _context8.sent;
|
|
669
698
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
|
|
670
699
|
books = _yield$Promise$all2[0];
|
|
671
700
|
pods = _yield$Promise$all2[1];
|
|
672
|
-
return
|
|
701
|
+
return _context8.abrupt("return", [{
|
|
673
702
|
paneName: 'home',
|
|
674
703
|
label: 'Your stuff',
|
|
675
704
|
icon: UI.icons.iconBase + 'noun_547570.svg'
|
|
@@ -685,10 +714,10 @@ function _default(context) {
|
|
|
685
714
|
|
|
686
715
|
case 15:
|
|
687
716
|
case "end":
|
|
688
|
-
return
|
|
717
|
+
return _context8.stop();
|
|
689
718
|
}
|
|
690
719
|
}
|
|
691
|
-
},
|
|
720
|
+
}, _callee7);
|
|
692
721
|
}));
|
|
693
722
|
return _getDashboardItems.apply(this, arguments);
|
|
694
723
|
}
|
|
@@ -707,7 +736,7 @@ function _default(context) {
|
|
|
707
736
|
}
|
|
708
737
|
|
|
709
738
|
function _showDashboard() {
|
|
710
|
-
_showDashboard = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
739
|
+
_showDashboard = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
711
740
|
var options,
|
|
712
741
|
dashboardContainer,
|
|
713
742
|
outlineContainer,
|
|
@@ -715,23 +744,23 @@ function _default(context) {
|
|
|
715
744
|
dashboard,
|
|
716
745
|
tab,
|
|
717
746
|
closeDashboard,
|
|
718
|
-
|
|
747
|
+
_args8 = arguments;
|
|
719
748
|
|
|
720
|
-
return regeneratorRuntime.wrap(function
|
|
749
|
+
return regeneratorRuntime.wrap(function _callee8$(_context9) {
|
|
721
750
|
while (1) {
|
|
722
|
-
switch (
|
|
751
|
+
switch (_context9.prev = _context9.next) {
|
|
723
752
|
case 0:
|
|
724
753
|
closeDashboard = function _closeDashboard() {
|
|
725
754
|
dashboardContainer.style.display = 'none';
|
|
726
755
|
outlineContainer.style.display = 'inherit';
|
|
727
756
|
};
|
|
728
757
|
|
|
729
|
-
options =
|
|
758
|
+
options = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
730
759
|
dashboardContainer = getDashboardContainer();
|
|
731
760
|
outlineContainer = getOutlineContainer(); // reuse dashboard if already children already is inserted
|
|
732
761
|
|
|
733
762
|
if (!(dashboardContainer.childNodes.length > 0 && options.pane)) {
|
|
734
|
-
|
|
763
|
+
_context9.next = 12;
|
|
735
764
|
break;
|
|
736
765
|
}
|
|
737
766
|
|
|
@@ -740,26 +769,26 @@ function _default(context) {
|
|
|
740
769
|
_tab = dashboardContainer.querySelector("[data-global-pane-name=\"".concat(options.pane, "\"]"));
|
|
741
770
|
|
|
742
771
|
if (!_tab) {
|
|
743
|
-
|
|
772
|
+
_context9.next = 11;
|
|
744
773
|
break;
|
|
745
774
|
}
|
|
746
775
|
|
|
747
776
|
_tab.click();
|
|
748
777
|
|
|
749
|
-
return
|
|
778
|
+
return _context9.abrupt("return");
|
|
750
779
|
|
|
751
780
|
case 11:
|
|
752
781
|
console.warn('Did not find the referred tab in global dashboard, will open first one');
|
|
753
782
|
|
|
754
783
|
case 12:
|
|
755
|
-
|
|
784
|
+
_context9.next = 14;
|
|
756
785
|
return globalAppTabs({
|
|
757
786
|
selectedTab: options.pane,
|
|
758
787
|
onClose: closeDashboard
|
|
759
788
|
});
|
|
760
789
|
|
|
761
790
|
case 14:
|
|
762
|
-
dashboard =
|
|
791
|
+
dashboard = _context9.sent;
|
|
763
792
|
// close the dashboard if user log out
|
|
764
793
|
UI.authn.authSession.onLogout(closeDashboard); // finally - switch to showing dashboard
|
|
765
794
|
|
|
@@ -773,10 +802,10 @@ function _default(context) {
|
|
|
773
802
|
|
|
774
803
|
case 20:
|
|
775
804
|
case "end":
|
|
776
|
-
return
|
|
805
|
+
return _context9.stop();
|
|
777
806
|
}
|
|
778
807
|
}
|
|
779
|
-
},
|
|
808
|
+
}, _callee8);
|
|
780
809
|
}));
|
|
781
810
|
return _showDashboard.apply(this, arguments);
|
|
782
811
|
}
|
|
@@ -807,23 +836,23 @@ function _default(context) {
|
|
|
807
836
|
}();
|
|
808
837
|
}
|
|
809
838
|
|
|
810
|
-
function
|
|
811
|
-
return
|
|
839
|
+
function loadContainerRepresentation(_x) {
|
|
840
|
+
return _loadContainerRepresentation.apply(this, arguments);
|
|
812
841
|
}
|
|
813
842
|
|
|
814
|
-
function
|
|
815
|
-
|
|
843
|
+
function _loadContainerRepresentation() {
|
|
844
|
+
_loadContainerRepresentation = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(subject) {
|
|
816
845
|
var response, containerTurtle;
|
|
817
|
-
return regeneratorRuntime.wrap(function
|
|
846
|
+
return regeneratorRuntime.wrap(function _callee9$(_context10) {
|
|
818
847
|
while (1) {
|
|
819
|
-
switch (
|
|
848
|
+
switch (_context10.prev = _context10.next) {
|
|
820
849
|
case 0:
|
|
821
850
|
if (kb.any(subject, ns.ldp('contains'), undefined, subject.doc())) {
|
|
822
|
-
|
|
851
|
+
_context10.next = 6;
|
|
823
852
|
break;
|
|
824
853
|
}
|
|
825
854
|
|
|
826
|
-
|
|
855
|
+
_context10.next = 3;
|
|
827
856
|
return kb.fetcher.webOperation('GET', subject.uri, kb.fetcher.initFetchOptions(subject.uri, {
|
|
828
857
|
headers: {
|
|
829
858
|
accept: 'text/turtle'
|
|
@@ -831,18 +860,18 @@ function _default(context) {
|
|
|
831
860
|
}));
|
|
832
861
|
|
|
833
862
|
case 3:
|
|
834
|
-
response =
|
|
863
|
+
response = _context10.sent;
|
|
835
864
|
containerTurtle = response.responseText;
|
|
836
865
|
$rdf.parse(containerTurtle, kb, subject.uri, 'text/turtle');
|
|
837
866
|
|
|
838
867
|
case 6:
|
|
839
868
|
case "end":
|
|
840
|
-
return
|
|
869
|
+
return _context10.stop();
|
|
841
870
|
}
|
|
842
871
|
}
|
|
843
|
-
},
|
|
872
|
+
}, _callee9);
|
|
844
873
|
}));
|
|
845
|
-
return
|
|
874
|
+
return _loadContainerRepresentation.apply(this, arguments);
|
|
846
875
|
}
|
|
847
876
|
|
|
848
877
|
function getRelevantPanes(_x2, _x3) {
|
|
@@ -850,19 +879,19 @@ function _default(context) {
|
|
|
850
879
|
}
|
|
851
880
|
|
|
852
881
|
function _getRelevantPanes() {
|
|
853
|
-
_getRelevantPanes = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
882
|
+
_getRelevantPanes = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(subject, context) {
|
|
854
883
|
var panes, relevantPanes, filteredPanes, firstRelevantPaneIndex, firstFilteredPaneIndex;
|
|
855
|
-
return regeneratorRuntime.wrap(function
|
|
884
|
+
return regeneratorRuntime.wrap(function _callee10$(_context11) {
|
|
856
885
|
while (1) {
|
|
857
|
-
switch (
|
|
886
|
+
switch (_context11.prev = _context11.next) {
|
|
858
887
|
case 0:
|
|
859
888
|
if (!subject.uri.endsWith('/')) {
|
|
860
|
-
|
|
889
|
+
_context11.next = 3;
|
|
861
890
|
break;
|
|
862
891
|
}
|
|
863
892
|
|
|
864
|
-
|
|
865
|
-
return
|
|
893
|
+
_context11.next = 3;
|
|
894
|
+
return loadContainerRepresentation(subject);
|
|
866
895
|
|
|
867
896
|
case 3:
|
|
868
897
|
panes = context.session.paneRegistry;
|
|
@@ -871,38 +900,38 @@ function _default(context) {
|
|
|
871
900
|
});
|
|
872
901
|
|
|
873
902
|
if (!(relevantPanes.length === 0)) {
|
|
874
|
-
|
|
903
|
+
_context11.next = 7;
|
|
875
904
|
break;
|
|
876
905
|
}
|
|
877
906
|
|
|
878
|
-
return
|
|
907
|
+
return _context11.abrupt("return", [panes.byName('internal')]);
|
|
879
908
|
|
|
880
909
|
case 7:
|
|
881
|
-
|
|
910
|
+
_context11.next = 9;
|
|
882
911
|
return UI.authn.filterAvailablePanes(relevantPanes);
|
|
883
912
|
|
|
884
913
|
case 9:
|
|
885
|
-
filteredPanes =
|
|
914
|
+
filteredPanes = _context11.sent;
|
|
886
915
|
|
|
887
916
|
if (!(filteredPanes.length === 0)) {
|
|
888
|
-
|
|
917
|
+
_context11.next = 12;
|
|
889
918
|
break;
|
|
890
919
|
}
|
|
891
920
|
|
|
892
|
-
return
|
|
921
|
+
return _context11.abrupt("return", [relevantPanes[0]]);
|
|
893
922
|
|
|
894
923
|
case 12:
|
|
895
924
|
firstRelevantPaneIndex = panes.list.indexOf(relevantPanes[0]);
|
|
896
925
|
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
926
|
|
|
898
|
-
return
|
|
927
|
+
return _context11.abrupt("return", firstRelevantPaneIndex < firstFilteredPaneIndex ? [relevantPanes[0]].concat(filteredPanes) : filteredPanes);
|
|
899
928
|
|
|
900
929
|
case 15:
|
|
901
930
|
case "end":
|
|
902
|
-
return
|
|
931
|
+
return _context11.stop();
|
|
903
932
|
}
|
|
904
933
|
}
|
|
905
|
-
},
|
|
934
|
+
}, _callee10);
|
|
906
935
|
}));
|
|
907
936
|
return _getRelevantPanes.apply(this, arguments);
|
|
908
937
|
}
|
|
@@ -940,50 +969,50 @@ function _default(context) {
|
|
|
940
969
|
|
|
941
970
|
|
|
942
971
|
function _expandedHeaderTR() {
|
|
943
|
-
_expandedHeaderTR = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
972
|
+
_expandedHeaderTR = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(subject, requiredPane, options) {
|
|
944
973
|
var renderPaneIconTray, _renderPaneIconTray, tr, td, header, showHeader, icon, strong;
|
|
945
974
|
|
|
946
|
-
return regeneratorRuntime.wrap(function
|
|
975
|
+
return regeneratorRuntime.wrap(function _callee12$(_context13) {
|
|
947
976
|
while (1) {
|
|
948
|
-
switch (
|
|
977
|
+
switch (_context13.prev = _context13.next) {
|
|
949
978
|
case 0:
|
|
950
979
|
_renderPaneIconTray = function _renderPaneIconTray3() {
|
|
951
|
-
_renderPaneIconTray = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
980
|
+
_renderPaneIconTray = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(td) {
|
|
952
981
|
var options,
|
|
953
982
|
paneShownStyle,
|
|
954
983
|
paneHiddenStyle,
|
|
955
984
|
paneIconTray,
|
|
956
985
|
relevantPanes,
|
|
957
986
|
paneNumber,
|
|
958
|
-
|
|
959
|
-
return regeneratorRuntime.wrap(function
|
|
987
|
+
_args11 = arguments;
|
|
988
|
+
return regeneratorRuntime.wrap(function _callee11$(_context12) {
|
|
960
989
|
while (1) {
|
|
961
|
-
switch (
|
|
990
|
+
switch (_context12.prev = _context12.next) {
|
|
962
991
|
case 0:
|
|
963
|
-
options =
|
|
992
|
+
options = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
|
|
964
993
|
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
994
|
paneHiddenStyle = 'width: 24px; border-radius: 0.5em; margin-left: 1em; padding: 3px';
|
|
966
995
|
paneIconTray = td.appendChild(dom.createElement('nav'));
|
|
967
996
|
paneIconTray.style = 'display:flex; justify-content: flex-start; align-items: center;';
|
|
968
997
|
|
|
969
998
|
if (!options.hideList) {
|
|
970
|
-
|
|
999
|
+
_context12.next = 9;
|
|
971
1000
|
break;
|
|
972
1001
|
}
|
|
973
1002
|
|
|
974
|
-
|
|
975
|
-
|
|
1003
|
+
_context12.t0 = [];
|
|
1004
|
+
_context12.next = 12;
|
|
976
1005
|
break;
|
|
977
1006
|
|
|
978
1007
|
case 9:
|
|
979
|
-
|
|
1008
|
+
_context12.next = 11;
|
|
980
1009
|
return getRelevantPanes(subject, context);
|
|
981
1010
|
|
|
982
1011
|
case 11:
|
|
983
|
-
|
|
1012
|
+
_context12.t0 = _context12.sent;
|
|
984
1013
|
|
|
985
1014
|
case 12:
|
|
986
|
-
relevantPanes =
|
|
1015
|
+
relevantPanes = _context12.t0;
|
|
987
1016
|
tr.firstPane = requiredPane || getPane(relevantPanes, subject);
|
|
988
1017
|
paneNumber = relevantPanes.indexOf(tr.firstPane);
|
|
989
1018
|
|
|
@@ -1100,19 +1129,19 @@ function _default(context) {
|
|
|
1100
1129
|
});
|
|
1101
1130
|
}
|
|
1102
1131
|
|
|
1103
|
-
return
|
|
1132
|
+
return _context12.abrupt("return", paneIconTray);
|
|
1104
1133
|
|
|
1105
1134
|
case 17:
|
|
1106
1135
|
case "end":
|
|
1107
|
-
return
|
|
1136
|
+
return _context12.stop();
|
|
1108
1137
|
}
|
|
1109
1138
|
}
|
|
1110
|
-
},
|
|
1139
|
+
}, _callee11);
|
|
1111
1140
|
}));
|
|
1112
1141
|
return _renderPaneIconTray.apply(this, arguments);
|
|
1113
1142
|
};
|
|
1114
1143
|
|
|
1115
|
-
renderPaneIconTray = function _renderPaneIconTray2(
|
|
1144
|
+
renderPaneIconTray = function _renderPaneIconTray2(_x10) {
|
|
1116
1145
|
return _renderPaneIconTray.apply(this, arguments);
|
|
1117
1146
|
};
|
|
1118
1147
|
|
|
@@ -1144,16 +1173,16 @@ function _default(context) {
|
|
|
1144
1173
|
UI.widgets.makeDraggable(strong, subject);
|
|
1145
1174
|
}
|
|
1146
1175
|
|
|
1147
|
-
|
|
1148
|
-
|
|
1176
|
+
_context13.t0 = header;
|
|
1177
|
+
_context13.next = 16;
|
|
1149
1178
|
return renderPaneIconTray(td, {
|
|
1150
1179
|
hideList: showHeader
|
|
1151
1180
|
});
|
|
1152
1181
|
|
|
1153
1182
|
case 16:
|
|
1154
|
-
|
|
1183
|
+
_context13.t1 = _context13.sent;
|
|
1155
1184
|
|
|
1156
|
-
|
|
1185
|
+
_context13.t0.appendChild.call(_context13.t0, _context13.t1);
|
|
1157
1186
|
|
|
1158
1187
|
// set DOM methods
|
|
1159
1188
|
tr.firstChild.tabulatorSelect = function () {
|
|
@@ -1164,14 +1193,14 @@ function _default(context) {
|
|
|
1164
1193
|
setSelected(this, false);
|
|
1165
1194
|
};
|
|
1166
1195
|
|
|
1167
|
-
return
|
|
1196
|
+
return _context13.abrupt("return", tr);
|
|
1168
1197
|
|
|
1169
1198
|
case 21:
|
|
1170
1199
|
case "end":
|
|
1171
|
-
return
|
|
1200
|
+
return _context13.stop();
|
|
1172
1201
|
}
|
|
1173
1202
|
}
|
|
1174
|
-
},
|
|
1203
|
+
}, _callee12);
|
|
1175
1204
|
}));
|
|
1176
1205
|
return _expandedHeaderTR.apply(this, arguments);
|
|
1177
1206
|
}
|