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.
@@ -428,23 +428,23 @@ function _default(context) {
428
428
  }
429
429
 
430
430
  function _getDashboardItems() {
431
- _getDashboardItems = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
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 _callee6$(_context7) {
434
+ return regeneratorRuntime.wrap(function _callee7$(_context8) {
435
435
  while (1) {
436
- switch (_context7.prev = _context7.next) {
436
+ switch (_context8.prev = _context8.next) {
437
437
  case 0:
438
438
  _getAddressBooks = function _getAddressBooks3() {
439
- _getAddressBooks = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
440
- var _context5;
439
+ _getAddressBooks = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
440
+ var _context6;
441
441
 
442
- return regeneratorRuntime.wrap(function _callee5$(_context6) {
442
+ return regeneratorRuntime.wrap(function _callee6$(_context7) {
443
443
  while (1) {
444
- switch (_context6.prev = _context6.next) {
444
+ switch (_context7.prev = _context7.next) {
445
445
  case 0:
446
- _context6.prev = 0;
447
- _context6.next = 3;
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
- _context5 = _context6.sent;
456
- return _context6.abrupt("return", (_context5.instances || []).map(function (book, index) {
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
- _context6.prev = 7;
468
- _context6.t0 = _context6["catch"](0);
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 _context6.abrupt("return", []);
472
+ return _context7.abrupt("return", []);
473
473
 
474
474
  case 11:
475
475
  case "end":
476
- return _context6.stop();
476
+ return _context7.stop();
477
477
  }
478
478
  }
479
- }, _callee5, null, [[0, 7]]);
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 _callee4() {
490
- var addPodRoot, _addPodRoot, addPodRootFromUrl, _addPodRootFromUrl, pods, uri, podUrl;
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 _callee4$(_context4) {
492
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
493
493
  while (1) {
494
- switch (_context4.prev = _context4.next) {
494
+ switch (_context5.prev = _context5.next) {
495
495
  case 0:
496
- _addPodRootFromUrl = function _addPodRootFromUrl3() {
497
- _addPodRootFromUrl = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(url) {
498
- var podStorage;
499
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
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 (_context3.prev = _context3.next) {
511
+ switch (_context4.prev = _context4.next) {
502
512
  case 0:
503
- podStorage = new URL(url); // check that origin is not included in pods array
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
- _context3.t0 = podStorage.pathname === '/';
515
+ pathStorage = podStorage.pathname;
513
516
 
514
- if (_context3.t0) {
515
- _context3.next = 7;
517
+ case 2:
518
+ if (!pathStorage.length) {
519
+ _context4.next = 10;
516
520
  break;
517
521
  }
518
522
 
519
- _context3.next = 6;
520
- return addPodRoot(kb.sym("".concat(podStorage.origin, "/").concat(podStorage.pathname.split('/')[1], "/")));
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
- _context3.t0 = !_context3.sent;
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
- _context3.next = 10;
532
- return addPodRoot(kb.sym("".concat(podStorage.origin, "/")));
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 _context3.stop();
541
+ return _context4.stop();
537
542
  }
538
543
  }
539
- }, _callee3);
544
+ }, _callee4);
540
545
  }));
541
- return _addPodRootFromUrl.apply(this, arguments);
546
+ return _addPodStorageFromUrl.apply(this, arguments);
542
547
  };
543
548
 
544
- addPodRootFromUrl = function _addPodRootFromUrl2(_x8) {
545
- return _addPodRootFromUrl.apply(this, arguments);
549
+ addPodStorageFromUrl = function _addPodStorageFromUrl2(_x8) {
550
+ return _addPodStorageFromUrl.apply(this, arguments);
546
551
  };
547
552
 
548
- _addPodRoot = function _addPodRoot3() {
549
- _addPodRoot = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(pod) {
550
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
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 (_context2.prev = _context2.next) {
557
+ switch (_context3.prev = _context3.next) {
553
558
  case 0:
554
- _context2.next = 2;
555
- return checkForContainerRepresentation(pod);
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
- _context2.next = 5;
564
+ _context3.next = 5;
560
565
  break;
561
566
  }
562
567
 
563
568
  pods.push(pod);
564
- return _context2.abrupt("return", true);
569
+ return _context3.abrupt("return", true);
565
570
 
566
571
  case 5:
567
- return _context2.abrupt("return", false);
572
+ return _context3.abrupt("return", false);
568
573
 
569
574
  case 6:
570
575
  case "end":
571
- return _context2.stop();
576
+ return _context3.stop();
572
577
  }
573
578
  }
574
- }, _callee2);
579
+ }, _callee3);
575
580
  }));
576
- return _addPodRoot.apply(this, arguments);
581
+ return _addPodStorage.apply(this, arguments);
577
582
  };
578
583
 
579
- addPodRoot = function _addPodRoot2(_x7) {
580
- return _addPodRoot.apply(this, arguments);
584
+ addPodStorage = function _addPodStorage2(_x7) {
585
+ return _addPodStorage.apply(this, arguments);
581
586
  };
582
587
 
583
- _context4.prev = 4;
584
- _context4.next = 7;
588
+ _context5.prev = 5;
589
+ _context5.next = 8;
585
590
  return kb.fetcher.load(me.doc());
586
591
 
587
- case 7:
588
- _context4.next = 13;
592
+ case 8:
593
+ _context5.next = 14;
589
594
  break;
590
595
 
591
- case 9:
592
- _context4.prev = 9;
593
- _context4.t0 = _context4["catch"](4);
594
- console.error('Unable to load profile', _context4.t0);
595
- return _context4.abrupt("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 13:
602
+ case 14:
603
+ // load pod's storages from profile
598
604
  pods = kb.each(me, ns.space('storage'), null, me.doc());
599
- _context4.prev = 14;
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
- _context4.next = 19;
604
- return addPodRootFromUrl(podUrl.substring(0, podUrl.lastIndexOf('/') + 1));
630
+ _context5.next = 21;
631
+ return addPodStorageFromUrl(podUrl);
605
632
 
606
- case 19:
607
- _context4.next = 24;
633
+ case 21:
634
+ _context5.next = 26;
608
635
  break;
609
636
 
610
- case 21:
611
- _context4.prev = 21;
612
- _context4.t1 = _context4["catch"](14);
613
- console.error('cannot load container', _context4.t1);
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
- _context4.next = 26;
648
+ _context5.next = 31;
618
649
  break;
619
650
  }
620
651
 
621
- return _context4.abrupt("return", []);
652
+ return _context5.abrupt("return", []);
622
653
 
623
- case 26:
624
- return _context4.abrupt("return", pods.map(function (pod, index) {
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 27:
670
+ case 32:
640
671
  case "end":
641
- return _context4.stop();
672
+ return _context5.stop();
642
673
  }
643
674
  }
644
- }, _callee4, null, [[4, 9], [14, 21]]);
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
- _context7.next = 7;
687
+ _context8.next = 7;
657
688
  break;
658
689
  }
659
690
 
660
- return _context7.abrupt("return", []);
691
+ return _context8.abrupt("return", []);
661
692
 
662
693
  case 7:
663
694
  div = dom.createElement('div');
664
- _context7.next = 10;
695
+ _context8.next = 10;
665
696
  return Promise.all([getAddressBooks(), getPods()]);
666
697
 
667
698
  case 10:
668
- _yield$Promise$all = _context7.sent;
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 _context7.abrupt("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 _context7.stop();
719
+ return _context8.stop();
689
720
  }
690
721
  }
691
- }, _callee6);
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 _callee7() {
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
- _args7 = arguments;
749
+ _args8 = arguments;
719
750
 
720
- return regeneratorRuntime.wrap(function _callee7$(_context8) {
751
+ return regeneratorRuntime.wrap(function _callee8$(_context9) {
721
752
  while (1) {
722
- switch (_context8.prev = _context8.next) {
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 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
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
- _context8.next = 12;
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
- _context8.next = 11;
774
+ _context9.next = 11;
744
775
  break;
745
776
  }
746
777
 
747
778
  _tab.click();
748
779
 
749
- return _context8.abrupt("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
- _context8.next = 14;
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 = _context8.sent;
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 _context8.stop();
807
+ return _context9.stop();
777
808
  }
778
809
  }
779
- }, _callee7);
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 checkForContainerRepresentation(_x) {
811
- return _checkForContainerRepresentation.apply(this, arguments);
841
+ function loadContainerRepresentation(_x) {
842
+ return _loadContainerRepresentation.apply(this, arguments);
812
843
  }
813
844
 
814
- function _checkForContainerRepresentation() {
815
- _checkForContainerRepresentation = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(subject) {
845
+ function _loadContainerRepresentation() {
846
+ _loadContainerRepresentation = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(subject) {
816
847
  var response, containerTurtle;
817
- return regeneratorRuntime.wrap(function _callee8$(_context9) {
848
+ return regeneratorRuntime.wrap(function _callee9$(_context10) {
818
849
  while (1) {
819
- switch (_context9.prev = _context9.next) {
850
+ switch (_context10.prev = _context10.next) {
820
851
  case 0:
821
852
  if (kb.any(subject, ns.ldp('contains'), undefined, subject.doc())) {
822
- _context9.next = 6;
853
+ _context10.next = 6;
823
854
  break;
824
855
  }
825
856
 
826
- _context9.next = 3;
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 = _context9.sent;
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 _context9.stop();
871
+ return _context10.stop();
841
872
  }
842
873
  }
843
- }, _callee8);
874
+ }, _callee9);
844
875
  }));
845
- return _checkForContainerRepresentation.apply(this, arguments);
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 _callee9(subject, context) {
884
+ _getRelevantPanes = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(subject, context) {
854
885
  var panes, relevantPanes, filteredPanes, firstRelevantPaneIndex, firstFilteredPaneIndex;
855
- return regeneratorRuntime.wrap(function _callee9$(_context10) {
886
+ return regeneratorRuntime.wrap(function _callee10$(_context11) {
856
887
  while (1) {
857
- switch (_context10.prev = _context10.next) {
888
+ switch (_context11.prev = _context11.next) {
858
889
  case 0:
859
890
  if (!subject.uri.endsWith('/')) {
860
- _context10.next = 3;
891
+ _context11.next = 3;
861
892
  break;
862
893
  }
863
894
 
864
- _context10.next = 3;
865
- return checkForContainerRepresentation(subject);
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
- _context10.next = 7;
905
+ _context11.next = 7;
875
906
  break;
876
907
  }
877
908
 
878
- return _context10.abrupt("return", [panes.byName('internal')]);
909
+ return _context11.abrupt("return", [panes.byName('internal')]);
879
910
 
880
911
  case 7:
881
- _context10.next = 9;
912
+ _context11.next = 9;
882
913
  return UI.authn.filterAvailablePanes(relevantPanes);
883
914
 
884
915
  case 9:
885
- filteredPanes = _context10.sent;
916
+ filteredPanes = _context11.sent;
886
917
 
887
918
  if (!(filteredPanes.length === 0)) {
888
- _context10.next = 12;
919
+ _context11.next = 12;
889
920
  break;
890
921
  }
891
922
 
892
- return _context10.abrupt("return", [relevantPanes[0]]);
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 _context10.abrupt("return", firstRelevantPaneIndex < firstFilteredPaneIndex ? [relevantPanes[0]].concat(filteredPanes) : filteredPanes);
929
+ return _context11.abrupt("return", firstRelevantPaneIndex < firstFilteredPaneIndex ? [relevantPanes[0]].concat(filteredPanes) : filteredPanes);
899
930
 
900
931
  case 15:
901
932
  case "end":
902
- return _context10.stop();
933
+ return _context11.stop();
903
934
  }
904
935
  }
905
- }, _callee9);
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 _callee11(subject, requiredPane, options) {
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 _callee11$(_context12) {
977
+ return regeneratorRuntime.wrap(function _callee12$(_context13) {
947
978
  while (1) {
948
- switch (_context12.prev = _context12.next) {
979
+ switch (_context13.prev = _context13.next) {
949
980
  case 0:
950
981
  _renderPaneIconTray = function _renderPaneIconTray3() {
951
- _renderPaneIconTray = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(td) {
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
- _args10 = arguments;
959
- return regeneratorRuntime.wrap(function _callee10$(_context11) {
989
+ _args11 = arguments;
990
+ return regeneratorRuntime.wrap(function _callee11$(_context12) {
960
991
  while (1) {
961
- switch (_context11.prev = _context11.next) {
992
+ switch (_context12.prev = _context12.next) {
962
993
  case 0:
963
- options = _args10.length > 1 && _args10[1] !== undefined ? _args10[1] : {};
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
- _context11.next = 9;
1001
+ _context12.next = 9;
971
1002
  break;
972
1003
  }
973
1004
 
974
- _context11.t0 = [];
975
- _context11.next = 12;
1005
+ _context12.t0 = [];
1006
+ _context12.next = 12;
976
1007
  break;
977
1008
 
978
1009
  case 9:
979
- _context11.next = 11;
1010
+ _context12.next = 11;
980
1011
  return getRelevantPanes(subject, context);
981
1012
 
982
1013
  case 11:
983
- _context11.t0 = _context11.sent;
1014
+ _context12.t0 = _context12.sent;
984
1015
 
985
1016
  case 12:
986
- relevantPanes = _context11.t0;
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 _context11.abrupt("return", paneIconTray);
1134
+ return _context12.abrupt("return", paneIconTray);
1104
1135
 
1105
1136
  case 17:
1106
1137
  case "end":
1107
- return _context11.stop();
1138
+ return _context12.stop();
1108
1139
  }
1109
1140
  }
1110
- }, _callee10);
1141
+ }, _callee11);
1111
1142
  }));
1112
1143
  return _renderPaneIconTray.apply(this, arguments);
1113
1144
  };
1114
1145
 
1115
- renderPaneIconTray = function _renderPaneIconTray2(_x9) {
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
- _context12.t0 = header;
1148
- _context12.next = 16;
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
- _context12.t1 = _context12.sent;
1185
+ _context13.t1 = _context13.sent;
1155
1186
 
1156
- _context12.t0.appendChild.call(_context12.t0, _context12.t1);
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 _context12.abrupt("return", tr);
1198
+ return _context13.abrupt("return", tr);
1168
1199
 
1169
1200
  case 21:
1170
1201
  case "end":
1171
- return _context12.stop();
1202
+ return _context13.stop();
1172
1203
  }
1173
1204
  }
1174
- }, _callee11);
1205
+ }, _callee12);
1175
1206
  }));
1176
1207
  return _expandedHeaderTR.apply(this, arguments);
1177
1208
  }