solid-panes 3.5.11 → 3.5.14-bbf45639
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 +1 -1
- package/README.md +4 -0
- package/lib/dashboard/basicPreferences.js +193 -264
- package/lib/dashboard/basicPreferences.js.map +1 -1
- package/lib/dashboard/dashboardPane.d.ts.map +1 -1
- package/lib/dashboard/dashboardPane.js +57 -75
- package/lib/dashboard/dashboardPane.js.map +1 -1
- package/lib/dashboard/homepage.js +98 -100
- package/lib/dashboard/homepage.js.map +1 -1
- package/lib/form/pane.js +1 -1
- package/lib/form/pane.js.map +1 -1
- package/lib/home/homePane.js +112 -103
- package/lib/home/homePane.js.map +1 -1
- package/lib/humanReadablePane.js +55 -23
- package/lib/humanReadablePane.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +49 -89
- package/lib/index.js.map +1 -1
- package/lib/internal/internalPane.js +180 -200
- package/lib/internal/internalPane.js.map +1 -1
- package/lib/mainPage/footer.d.ts +3 -0
- package/lib/mainPage/footer.d.ts.map +1 -0
- package/lib/mainPage/footer.js +20 -0
- package/lib/mainPage/footer.js.map +1 -0
- package/lib/mainPage/header.d.ts +2 -0
- package/lib/mainPage/header.d.ts.map +1 -0
- package/lib/mainPage/header.js +142 -0
- package/lib/mainPage/header.js.map +1 -0
- package/lib/mainPage/index.d.ts +3 -0
- package/lib/mainPage/index.d.ts.map +1 -0
- package/lib/mainPage/index.js +63 -0
- package/lib/mainPage/index.js.map +1 -0
- package/lib/microblogPane/microblogPane.js +1 -1
- package/lib/outline/context.d.ts +2 -1
- package/lib/outline/context.d.ts.map +1 -1
- package/lib/outline/context.js +13 -17
- package/lib/outline/context.js.map +1 -1
- package/lib/outline/manager.js +178 -150
- package/lib/outline/manager.js.map +1 -1
- package/lib/outline/propertyViews.js +32 -46
- package/lib/outline/propertyViews.js.map +1 -1
- package/lib/outline/userInput.js +1 -1
- package/lib/outline/viewAsImage.js +22 -19
- package/lib/outline/viewAsImage.js.map +1 -1
- package/lib/outline/viewAsMbox.js +5 -15
- package/lib/outline/viewAsMbox.js.map +1 -1
- package/lib/pad/padPane.js +406 -451
- package/lib/pad/padPane.js.map +1 -1
- package/lib/profile/editProfile.view.js +101 -124
- package/lib/profile/editProfile.view.js.map +1 -1
- package/lib/profile/profile.dom.js +12 -17
- package/lib/profile/profile.dom.js.map +1 -1
- package/lib/registerPanes.js +1 -1
- package/lib/registerPanes.js.map +1 -1
- package/lib/sharing/sharingPane.js +33 -45
- package/lib/sharing/sharingPane.js.map +1 -1
- package/lib/tabbed/tabbedPane.js +87 -77
- package/lib/tabbed/tabbedPane.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.dom.js +173 -182
- package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.test.js +1 -1
- package/lib/trustedApplications/trustedApplications.utils.js +30 -36
- package/lib/trustedApplications/trustedApplications.utils.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.view.js +91 -99
- package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
- package/lib/types.js +1 -4
- package/lib/types.js.map +1 -1
- package/lib/versionInfo.d.ts +0 -1
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +23 -29
- package/lib/versionInfo.js.map +1 -1
- package/package.json +29 -29
- package/src/dashboard/dashboardPane.ts +5 -3
- package/src/form/pane.js +1 -1
- package/src/humanReadablePane.js +38 -14
- package/src/index.ts +4 -3
- package/src/mainPage/footer.ts +19 -0
- package/src/mainPage/header.ts +75 -0
- package/src/mainPage/index.ts +20 -0
- package/src/outline/context.ts +2 -1
- package/src/outline/manager.js +26 -16
- package/src/registerPanes.js +2 -2
- package/src/versionInfo.ts +18 -19
- package/webpack.config.js +1 -1
package/lib/outline/manager.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -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 _callee6() {
|
|
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 _callee6$(_context7) {
|
|
435
435
|
while (1) {
|
|
436
|
-
switch (
|
|
436
|
+
switch (_context7.prev = _context7.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 _callee5() {
|
|
440
|
+
var _context5;
|
|
441
441
|
|
|
442
|
-
return regeneratorRuntime.wrap(function
|
|
442
|
+
return regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
443
443
|
while (1) {
|
|
444
|
-
switch (
|
|
444
|
+
switch (_context6.prev = _context6.next) {
|
|
445
445
|
case 0:
|
|
446
|
-
|
|
447
|
-
|
|
446
|
+
_context6.prev = 0;
|
|
447
|
+
_context6.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
|
+
_context5 = _context6.sent;
|
|
456
|
+
return _context6.abrupt("return", (_context5.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
|
+
_context6.prev = 7;
|
|
468
|
+
_context6.t0 = _context6["catch"](0);
|
|
469
469
|
console.error('oops in globalAppTabs AddressBook');
|
|
470
470
|
|
|
471
471
|
case 10:
|
|
472
|
-
return
|
|
472
|
+
return _context6.abrupt("return", []);
|
|
473
473
|
|
|
474
474
|
case 11:
|
|
475
475
|
case "end":
|
|
476
|
-
return
|
|
476
|
+
return _context6.stop();
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
},
|
|
479
|
+
}, _callee5, null, [[0, 7]]);
|
|
480
480
|
}));
|
|
481
481
|
return _getAddressBooks.apply(this, arguments);
|
|
482
482
|
};
|
|
@@ -486,183 +486,147 @@ function _default(context) {
|
|
|
486
486
|
};
|
|
487
487
|
|
|
488
488
|
_getPods = function _getPods3() {
|
|
489
|
-
_getPods = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
490
|
-
var addPodRoot, _addPodRoot, addPodRootFromUrl, _addPodRootFromUrl, pods;
|
|
489
|
+
_getPods = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
490
|
+
var addPodRoot, _addPodRoot, addPodRootFromUrl, _addPodRootFromUrl, pods, uri, podUrl;
|
|
491
491
|
|
|
492
|
-
return regeneratorRuntime.wrap(function
|
|
492
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
493
493
|
while (1) {
|
|
494
|
-
switch (
|
|
494
|
+
switch (_context4.prev = _context4.next) {
|
|
495
495
|
case 0:
|
|
496
496
|
_addPodRootFromUrl = function _addPodRootFromUrl3() {
|
|
497
|
-
_addPodRootFromUrl = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
497
|
+
_addPodRootFromUrl = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(url) {
|
|
498
498
|
var podStorage;
|
|
499
|
-
return regeneratorRuntime.wrap(function
|
|
499
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
500
500
|
while (1) {
|
|
501
|
-
switch (
|
|
501
|
+
switch (_context3.prev = _context3.next) {
|
|
502
502
|
case 0:
|
|
503
503
|
podStorage = new URL(url); // check that origin is not included in pods array
|
|
504
504
|
|
|
505
505
|
if (pods.some(function (pod) {
|
|
506
506
|
return pod.uri.includes(podStorage.origin);
|
|
507
507
|
})) {
|
|
508
|
-
|
|
508
|
+
_context3.next = 10;
|
|
509
509
|
break;
|
|
510
510
|
}
|
|
511
511
|
|
|
512
|
-
|
|
512
|
+
_context3.t0 = podStorage.pathname === '/';
|
|
513
513
|
|
|
514
|
-
if (
|
|
515
|
-
|
|
514
|
+
if (_context3.t0) {
|
|
515
|
+
_context3.next = 7;
|
|
516
516
|
break;
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
-
|
|
519
|
+
_context3.next = 6;
|
|
520
520
|
return addPodRoot(kb.sym("".concat(podStorage.origin, "/").concat(podStorage.pathname.split('/')[1], "/")));
|
|
521
521
|
|
|
522
522
|
case 6:
|
|
523
|
-
|
|
523
|
+
_context3.t0 = !_context3.sent;
|
|
524
524
|
|
|
525
525
|
case 7:
|
|
526
|
-
if (!
|
|
527
|
-
|
|
526
|
+
if (!_context3.t0) {
|
|
527
|
+
_context3.next = 10;
|
|
528
528
|
break;
|
|
529
529
|
}
|
|
530
530
|
|
|
531
|
-
|
|
531
|
+
_context3.next = 10;
|
|
532
532
|
return addPodRoot(kb.sym("".concat(podStorage.origin, "/")));
|
|
533
533
|
|
|
534
534
|
case 10:
|
|
535
535
|
case "end":
|
|
536
|
-
return
|
|
536
|
+
return _context3.stop();
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
},
|
|
539
|
+
}, _callee3);
|
|
540
540
|
}));
|
|
541
541
|
return _addPodRootFromUrl.apply(this, arguments);
|
|
542
542
|
};
|
|
543
543
|
|
|
544
|
-
addPodRootFromUrl = function _addPodRootFromUrl2(
|
|
544
|
+
addPodRootFromUrl = function _addPodRootFromUrl2(_x8) {
|
|
545
545
|
return _addPodRootFromUrl.apply(this, arguments);
|
|
546
546
|
};
|
|
547
547
|
|
|
548
548
|
_addPodRoot = function _addPodRoot3() {
|
|
549
|
-
_addPodRoot = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
550
|
-
return regeneratorRuntime.wrap(function
|
|
549
|
+
_addPodRoot = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(pod) {
|
|
550
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
551
551
|
while (1) {
|
|
552
|
-
switch (
|
|
552
|
+
switch (_context2.prev = _context2.next) {
|
|
553
553
|
case 0:
|
|
554
|
-
|
|
555
|
-
return
|
|
556
|
-
headers: {
|
|
557
|
-
accept: 'text/turtle'
|
|
558
|
-
}
|
|
559
|
-
});
|
|
554
|
+
_context2.next = 2;
|
|
555
|
+
return checkForContainerRepresentation(pod);
|
|
560
556
|
|
|
561
557
|
case 2:
|
|
562
558
|
if (!kb.holds(pod, ns.rdf('type'), ns.space('Storage'), pod.doc())) {
|
|
563
|
-
|
|
559
|
+
_context2.next = 5;
|
|
564
560
|
break;
|
|
565
561
|
}
|
|
566
562
|
|
|
567
563
|
pods.push(pod);
|
|
568
|
-
return
|
|
564
|
+
return _context2.abrupt("return", true);
|
|
569
565
|
|
|
570
566
|
case 5:
|
|
571
|
-
return
|
|
567
|
+
return _context2.abrupt("return", false);
|
|
572
568
|
|
|
573
569
|
case 6:
|
|
574
570
|
case "end":
|
|
575
|
-
return
|
|
571
|
+
return _context2.stop();
|
|
576
572
|
}
|
|
577
573
|
}
|
|
578
|
-
},
|
|
574
|
+
}, _callee2);
|
|
579
575
|
}));
|
|
580
576
|
return _addPodRoot.apply(this, arguments);
|
|
581
577
|
};
|
|
582
578
|
|
|
583
|
-
addPodRoot = function _addPodRoot2(
|
|
579
|
+
addPodRoot = function _addPodRoot2(_x7) {
|
|
584
580
|
return _addPodRoot.apply(this, arguments);
|
|
585
581
|
};
|
|
586
582
|
|
|
587
|
-
|
|
588
|
-
|
|
583
|
+
_context4.prev = 4;
|
|
584
|
+
_context4.next = 7;
|
|
589
585
|
return kb.fetcher.load(me.doc());
|
|
590
586
|
|
|
591
587
|
case 7:
|
|
592
|
-
|
|
588
|
+
_context4.next = 13;
|
|
593
589
|
break;
|
|
594
590
|
|
|
595
591
|
case 9:
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
console.error('Unable to load profile',
|
|
599
|
-
return
|
|
592
|
+
_context4.prev = 9;
|
|
593
|
+
_context4.t0 = _context4["catch"](4);
|
|
594
|
+
console.error('Unable to load profile', _context4.t0);
|
|
595
|
+
return _context4.abrupt("return", []);
|
|
600
596
|
|
|
601
597
|
case 13:
|
|
602
598
|
pods = kb.each(me, ns.space('storage'), null, me.doc());
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
// make sure container representation is loaded (when server returns index.html)
|
|
611
|
-
// TODO reorder to have 'me' in first position
|
|
612
|
-
pods.map( /*#__PURE__*/function () {
|
|
613
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(pod) {
|
|
614
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
615
|
-
while (1) {
|
|
616
|
-
switch (_context2.prev = _context2.next) {
|
|
617
|
-
case 0:
|
|
618
|
-
if (kb.any(pod, ns.ldp('contains'), undefined, pod.doc())) {
|
|
619
|
-
_context2.next = 3;
|
|
620
|
-
break;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
_context2.next = 3;
|
|
624
|
-
return kb.fetcher.load(pod, {
|
|
625
|
-
headers: {
|
|
626
|
-
accept: 'text/turtle'
|
|
627
|
-
}
|
|
628
|
-
});
|
|
629
|
-
|
|
630
|
-
case 3:
|
|
631
|
-
case "end":
|
|
632
|
-
return _context2.stop();
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
}, _callee2);
|
|
636
|
-
}));
|
|
637
|
-
|
|
638
|
-
return function (_x8) {
|
|
639
|
-
return _ref.apply(this, arguments);
|
|
640
|
-
};
|
|
641
|
-
}());
|
|
642
|
-
_context5.next = 21;
|
|
643
|
-
break;
|
|
599
|
+
_context4.prev = 14;
|
|
600
|
+
// if uri then SolidOS is a browse.html web app
|
|
601
|
+
uri = new URL(window.location.href).searchParams.get('uri');
|
|
602
|
+
podUrl = uri || window.location.href;
|
|
603
|
+
_context4.next = 19;
|
|
604
|
+
return addPodRootFromUrl(podUrl.substring(0, podUrl.lastIndexOf('/') + 1));
|
|
644
605
|
|
|
645
606
|
case 19:
|
|
646
|
-
|
|
647
|
-
|
|
607
|
+
_context4.next = 24;
|
|
608
|
+
break;
|
|
648
609
|
|
|
649
610
|
case 21:
|
|
650
|
-
|
|
651
|
-
|
|
611
|
+
_context4.prev = 21;
|
|
612
|
+
_context4.t1 = _context4["catch"](14);
|
|
613
|
+
console.error('cannot load container', _context4.t1);
|
|
652
614
|
|
|
653
|
-
case
|
|
654
|
-
|
|
655
|
-
|
|
615
|
+
case 24:
|
|
616
|
+
if (pods.length) {
|
|
617
|
+
_context4.next = 26;
|
|
618
|
+
break;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
return _context4.abrupt("return", []);
|
|
656
622
|
|
|
657
|
-
case
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
623
|
+
case 26:
|
|
624
|
+
return _context4.abrupt("return", pods.map(function (pod, index) {
|
|
625
|
+
function split(item) {
|
|
626
|
+
return item.uri.split('//')[1].slice(0, -1);
|
|
627
|
+
}
|
|
662
628
|
|
|
663
|
-
|
|
664
|
-
return _context5.abrupt("return", pods.map(function (pod, index) {
|
|
665
|
-
var label = pods.length > 1 ? pod.uri.split('//')[1].slice(0, -1) : 'Your storage';
|
|
629
|
+
var label = split(me).startsWith(split(pod)) ? 'Your storage' : split(pod);
|
|
666
630
|
return {
|
|
667
631
|
paneName: 'folder',
|
|
668
632
|
tabName: "folder-".concat(index),
|
|
@@ -672,12 +636,12 @@ function _default(context) {
|
|
|
672
636
|
};
|
|
673
637
|
}));
|
|
674
638
|
|
|
675
|
-
case
|
|
639
|
+
case 27:
|
|
676
640
|
case "end":
|
|
677
|
-
return
|
|
641
|
+
return _context4.stop();
|
|
678
642
|
}
|
|
679
643
|
}
|
|
680
|
-
},
|
|
644
|
+
}, _callee4, null, [[4, 9], [14, 21]]);
|
|
681
645
|
}));
|
|
682
646
|
return _getPods.apply(this, arguments);
|
|
683
647
|
};
|
|
@@ -687,16 +651,25 @@ function _default(context) {
|
|
|
687
651
|
};
|
|
688
652
|
|
|
689
653
|
me = UI.authn.currentUser();
|
|
654
|
+
|
|
655
|
+
if (me) {
|
|
656
|
+
_context7.next = 7;
|
|
657
|
+
break;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
return _context7.abrupt("return", []);
|
|
661
|
+
|
|
662
|
+
case 7:
|
|
690
663
|
div = dom.createElement('div');
|
|
691
|
-
|
|
664
|
+
_context7.next = 10;
|
|
692
665
|
return Promise.all([getAddressBooks(), getPods()]);
|
|
693
666
|
|
|
694
|
-
case
|
|
695
|
-
_yield$Promise$all =
|
|
667
|
+
case 10:
|
|
668
|
+
_yield$Promise$all = _context7.sent;
|
|
696
669
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
|
|
697
670
|
books = _yield$Promise$all2[0];
|
|
698
671
|
pods = _yield$Promise$all2[1];
|
|
699
|
-
return
|
|
672
|
+
return _context7.abrupt("return", [{
|
|
700
673
|
paneName: 'home',
|
|
701
674
|
label: 'Your stuff',
|
|
702
675
|
icon: UI.icons.iconBase + 'noun_547570.svg'
|
|
@@ -710,12 +683,12 @@ function _default(context) {
|
|
|
710
683
|
icon: UI.icons.iconBase + 'noun_492246.svg'
|
|
711
684
|
}].concat(books).concat(pods));
|
|
712
685
|
|
|
713
|
-
case
|
|
686
|
+
case 15:
|
|
714
687
|
case "end":
|
|
715
|
-
return
|
|
688
|
+
return _context7.stop();
|
|
716
689
|
}
|
|
717
690
|
}
|
|
718
|
-
},
|
|
691
|
+
}, _callee6);
|
|
719
692
|
}));
|
|
720
693
|
return _getDashboardItems.apply(this, arguments);
|
|
721
694
|
}
|
|
@@ -734,68 +707,76 @@ function _default(context) {
|
|
|
734
707
|
}
|
|
735
708
|
|
|
736
709
|
function _showDashboard() {
|
|
737
|
-
_showDashboard = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
710
|
+
_showDashboard = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
|
|
738
711
|
var options,
|
|
739
712
|
dashboardContainer,
|
|
740
713
|
outlineContainer,
|
|
741
|
-
|
|
714
|
+
_tab,
|
|
742
715
|
dashboard,
|
|
716
|
+
tab,
|
|
743
717
|
closeDashboard,
|
|
744
|
-
|
|
745
|
-
|
|
718
|
+
_args7 = arguments;
|
|
719
|
+
|
|
720
|
+
return regeneratorRuntime.wrap(function _callee7$(_context8) {
|
|
746
721
|
while (1) {
|
|
747
|
-
switch (
|
|
722
|
+
switch (_context8.prev = _context8.next) {
|
|
748
723
|
case 0:
|
|
749
724
|
closeDashboard = function _closeDashboard() {
|
|
750
725
|
dashboardContainer.style.display = 'none';
|
|
751
726
|
outlineContainer.style.display = 'inherit';
|
|
752
727
|
};
|
|
753
728
|
|
|
754
|
-
options =
|
|
729
|
+
options = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
|
755
730
|
dashboardContainer = getDashboardContainer();
|
|
756
731
|
outlineContainer = getOutlineContainer(); // reuse dashboard if already children already is inserted
|
|
757
732
|
|
|
758
733
|
if (!(dashboardContainer.childNodes.length > 0 && options.pane)) {
|
|
759
|
-
|
|
734
|
+
_context8.next = 12;
|
|
760
735
|
break;
|
|
761
736
|
}
|
|
762
737
|
|
|
763
738
|
outlineContainer.style.display = 'none';
|
|
764
739
|
dashboardContainer.style.display = 'inherit';
|
|
765
|
-
|
|
740
|
+
_tab = dashboardContainer.querySelector("[data-global-pane-name=\"".concat(options.pane, "\"]"));
|
|
766
741
|
|
|
767
|
-
if (!
|
|
768
|
-
|
|
742
|
+
if (!_tab) {
|
|
743
|
+
_context8.next = 11;
|
|
769
744
|
break;
|
|
770
745
|
}
|
|
771
746
|
|
|
772
|
-
|
|
773
|
-
|
|
747
|
+
_tab.click();
|
|
748
|
+
|
|
749
|
+
return _context8.abrupt("return");
|
|
774
750
|
|
|
775
751
|
case 11:
|
|
776
752
|
console.warn('Did not find the referred tab in global dashboard, will open first one');
|
|
777
753
|
|
|
778
754
|
case 12:
|
|
779
|
-
|
|
755
|
+
_context8.next = 14;
|
|
780
756
|
return globalAppTabs({
|
|
781
757
|
selectedTab: options.pane,
|
|
782
758
|
onClose: closeDashboard
|
|
783
759
|
});
|
|
784
760
|
|
|
785
761
|
case 14:
|
|
786
|
-
dashboard =
|
|
762
|
+
dashboard = _context8.sent;
|
|
787
763
|
// close the dashboard if user log out
|
|
788
764
|
UI.authn.authSession.onLogout(closeDashboard); // finally - switch to showing dashboard
|
|
789
765
|
|
|
790
766
|
outlineContainer.style.display = 'none';
|
|
791
767
|
dashboardContainer.appendChild(dashboard);
|
|
768
|
+
tab = dashboardContainer.querySelector("[data-global-pane-name=\"".concat(options.pane, "\"]"));
|
|
769
|
+
|
|
770
|
+
if (tab) {
|
|
771
|
+
tab.click();
|
|
772
|
+
}
|
|
792
773
|
|
|
793
|
-
case
|
|
774
|
+
case 20:
|
|
794
775
|
case "end":
|
|
795
|
-
return
|
|
776
|
+
return _context8.stop();
|
|
796
777
|
}
|
|
797
778
|
}
|
|
798
|
-
},
|
|
779
|
+
}, _callee7);
|
|
799
780
|
}));
|
|
800
781
|
return _showDashboard.apply(this, arguments);
|
|
801
782
|
}
|
|
@@ -826,7 +807,45 @@ function _default(context) {
|
|
|
826
807
|
}();
|
|
827
808
|
}
|
|
828
809
|
|
|
829
|
-
function
|
|
810
|
+
function checkForContainerRepresentation(_x) {
|
|
811
|
+
return _checkForContainerRepresentation.apply(this, arguments);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
function _checkForContainerRepresentation() {
|
|
815
|
+
_checkForContainerRepresentation = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(subject) {
|
|
816
|
+
var response, containerTurtle;
|
|
817
|
+
return regeneratorRuntime.wrap(function _callee8$(_context9) {
|
|
818
|
+
while (1) {
|
|
819
|
+
switch (_context9.prev = _context9.next) {
|
|
820
|
+
case 0:
|
|
821
|
+
if (kb.any(subject, ns.ldp('contains'), undefined, subject.doc())) {
|
|
822
|
+
_context9.next = 6;
|
|
823
|
+
break;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
_context9.next = 3;
|
|
827
|
+
return kb.fetcher.webOperation('GET', subject.uri, kb.fetcher.initFetchOptions(subject.uri, {
|
|
828
|
+
headers: {
|
|
829
|
+
accept: 'text/turtle'
|
|
830
|
+
}
|
|
831
|
+
}));
|
|
832
|
+
|
|
833
|
+
case 3:
|
|
834
|
+
response = _context9.sent;
|
|
835
|
+
containerTurtle = response.responseText;
|
|
836
|
+
$rdf.parse(containerTurtle, kb, subject.uri, 'text/turtle');
|
|
837
|
+
|
|
838
|
+
case 6:
|
|
839
|
+
case "end":
|
|
840
|
+
return _context9.stop();
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
}, _callee8);
|
|
844
|
+
}));
|
|
845
|
+
return _checkForContainerRepresentation.apply(this, arguments);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
function getRelevantPanes(_x2, _x3) {
|
|
830
849
|
return _getRelevantPanes.apply(this, arguments);
|
|
831
850
|
}
|
|
832
851
|
|
|
@@ -837,39 +856,48 @@ function _default(context) {
|
|
|
837
856
|
while (1) {
|
|
838
857
|
switch (_context10.prev = _context10.next) {
|
|
839
858
|
case 0:
|
|
859
|
+
if (!subject.uri.endsWith('/')) {
|
|
860
|
+
_context10.next = 3;
|
|
861
|
+
break;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
_context10.next = 3;
|
|
865
|
+
return checkForContainerRepresentation(subject);
|
|
866
|
+
|
|
867
|
+
case 3:
|
|
840
868
|
panes = context.session.paneRegistry;
|
|
841
869
|
relevantPanes = panes.list.filter(function (pane) {
|
|
842
870
|
return pane.label(subject, context) && !pane.global;
|
|
843
871
|
});
|
|
844
872
|
|
|
845
873
|
if (!(relevantPanes.length === 0)) {
|
|
846
|
-
_context10.next =
|
|
874
|
+
_context10.next = 7;
|
|
847
875
|
break;
|
|
848
876
|
}
|
|
849
877
|
|
|
850
878
|
return _context10.abrupt("return", [panes.byName('internal')]);
|
|
851
879
|
|
|
852
|
-
case
|
|
853
|
-
_context10.next =
|
|
880
|
+
case 7:
|
|
881
|
+
_context10.next = 9;
|
|
854
882
|
return UI.authn.filterAvailablePanes(relevantPanes);
|
|
855
883
|
|
|
856
|
-
case
|
|
884
|
+
case 9:
|
|
857
885
|
filteredPanes = _context10.sent;
|
|
858
886
|
|
|
859
887
|
if (!(filteredPanes.length === 0)) {
|
|
860
|
-
_context10.next =
|
|
888
|
+
_context10.next = 12;
|
|
861
889
|
break;
|
|
862
890
|
}
|
|
863
891
|
|
|
864
892
|
return _context10.abrupt("return", [relevantPanes[0]]);
|
|
865
893
|
|
|
866
|
-
case
|
|
894
|
+
case 12:
|
|
867
895
|
firstRelevantPaneIndex = panes.list.indexOf(relevantPanes[0]);
|
|
868
896
|
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
|
|
869
897
|
|
|
870
898
|
return _context10.abrupt("return", firstRelevantPaneIndex < firstFilteredPaneIndex ? [relevantPanes[0]].concat(filteredPanes) : filteredPanes);
|
|
871
899
|
|
|
872
|
-
case
|
|
900
|
+
case 15:
|
|
873
901
|
case "end":
|
|
874
902
|
return _context10.stop();
|
|
875
903
|
}
|
|
@@ -885,7 +913,7 @@ function _default(context) {
|
|
|
885
913
|
}) || relevantPanes[0];
|
|
886
914
|
}
|
|
887
915
|
|
|
888
|
-
function expandedHeaderTR(
|
|
916
|
+
function expandedHeaderTR(_x4, _x5, _x6) {
|
|
889
917
|
return _expandedHeaderTR.apply(this, arguments);
|
|
890
918
|
} // expandedHeaderTR
|
|
891
919
|
// / //////////////////////////////////////////////////////////////////////////
|