solid-ui 3.0.4-31cdaaf → 3.0.4-37fd944
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/login/login.d.ts.map +1 -1
- package/dist/login/login.js +151 -12
- package/dist/login/login.js.map +1 -1
- package/dist/solid-ui.esm.js +370 -178
- package/dist/solid-ui.esm.js.map +1 -1
- package/dist/solid-ui.esm.min.js +1 -1
- package/dist/solid-ui.esm.min.js.map +1 -1
- package/dist/solid-ui.js +370 -178
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +7 -7
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/versionInfo.js +13 -13
- package/package.json +4 -4
package/dist/solid-ui.esm.js
CHANGED
|
@@ -1611,13 +1611,150 @@ var _solidLogicSingleton$2 = solid_logic__WEBPACK_IMPORTED_MODULE_3__.solidLogic
|
|
|
1611
1611
|
loadAllTypeIndexes = _solidLogicSingleton$2.loadAllTypeIndexes,
|
|
1612
1612
|
getScopedAppsFromIndex = _solidLogicSingleton$2.getScopedAppsFromIndex,
|
|
1613
1613
|
deleteTypeIndexRegistration = _solidLogicSingleton$2.deleteTypeIndexRegistration;
|
|
1614
|
-
|
|
1614
|
+
function formatDynamicError(error, contextLabel) {
|
|
1615
|
+
var e = error;
|
|
1616
|
+
var name = (e === null || e === void 0 ? void 0 : e.name) || 'Error';
|
|
1617
|
+
var status = typeof (e === null || e === void 0 ? void 0 : e.status) === 'number' ? " (HTTP ".concat(e.status, ")") : '';
|
|
1618
|
+
var message = e !== null && e !== void 0 && e.message ? String(e.message) : typeof error === 'string' ? error : 'No additional details provided';
|
|
1619
|
+
return "".concat(contextLabel, ": ").concat(name).concat(status, " - ").concat(message);
|
|
1620
|
+
}
|
|
1621
|
+
function guessPreferencesFileUri(me) {
|
|
1622
|
+
return me.uri.replace('/profile/', '/').replace('/public/', '/').split('/').slice(0, -1).join('/') + '/settings/prefs.ttl';
|
|
1623
|
+
}
|
|
1624
|
+
function getMissingPreferencesFileUri(context, err) {
|
|
1625
|
+
var _response;
|
|
1626
|
+
var responseUrl = err === null || err === void 0 || (_response = err.response) === null || _response === void 0 ? void 0 : _response.url;
|
|
1627
|
+
if (typeof responseUrl === 'string' && responseUrl) {
|
|
1628
|
+
return responseUrl;
|
|
1629
|
+
}
|
|
1630
|
+
if (context.me) {
|
|
1631
|
+
var pointer = store.any(context.me, _ns__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A.space('preferencesFile'), undefined, context.me.doc ? context.me.doc() : undefined);
|
|
1632
|
+
if (pointer !== null && pointer !== void 0 && pointer.uri) {
|
|
1633
|
+
return pointer.uri;
|
|
1634
|
+
}
|
|
1635
|
+
return guessPreferencesFileUri(context.me);
|
|
1636
|
+
}
|
|
1637
|
+
return null;
|
|
1638
|
+
}
|
|
1639
|
+
function ensurePreferencesFileRowInProfile(_x, _x2, _x3) {
|
|
1640
|
+
return _ensurePreferencesFileRowInProfile.apply(this, arguments);
|
|
1641
|
+
}
|
|
1642
|
+
function _ensurePreferencesFileRowInProfile() {
|
|
1643
|
+
_ensurePreferencesFileRowInProfile = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee4(me, prefsNode, profileDoc) {
|
|
1644
|
+
var existingPreferencesFile, deletions, insertions;
|
|
1645
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context4) {
|
|
1646
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
1647
|
+
case 0:
|
|
1648
|
+
existingPreferencesFile = store.any(me, _ns__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A.space('preferencesFile'), undefined, profileDoc);
|
|
1649
|
+
if (!(existingPreferencesFile && existingPreferencesFile.equals(prefsNode))) {
|
|
1650
|
+
_context4.next = 1;
|
|
1651
|
+
break;
|
|
1652
|
+
}
|
|
1653
|
+
return _context4.abrupt("return");
|
|
1654
|
+
case 1:
|
|
1655
|
+
if (store.updater) {
|
|
1656
|
+
_context4.next = 2;
|
|
1657
|
+
break;
|
|
1658
|
+
}
|
|
1659
|
+
throw new Error('Cannot create preferences file: store has no updater');
|
|
1660
|
+
case 2:
|
|
1661
|
+
deletions = existingPreferencesFile ? [(0,rdflib__WEBPACK_IMPORTED_MODULE_2__.st)(me, _ns__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A.space('preferencesFile'), existingPreferencesFile, profileDoc)] : [];
|
|
1662
|
+
insertions = [(0,rdflib__WEBPACK_IMPORTED_MODULE_2__.st)(me, _ns__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A.space('preferencesFile'), prefsNode, profileDoc)];
|
|
1663
|
+
_context4.next = 3;
|
|
1664
|
+
return new Promise(function (resolve, reject) {
|
|
1665
|
+
store.updater.update(deletions, insertions, function (_uri, ok, body) {
|
|
1666
|
+
if (ok) {
|
|
1667
|
+
resolve();
|
|
1668
|
+
} else {
|
|
1669
|
+
reject(new Error(body || 'Unable to update preferencesFile in WebID profile'));
|
|
1670
|
+
}
|
|
1671
|
+
});
|
|
1672
|
+
});
|
|
1673
|
+
case 3:
|
|
1674
|
+
case "end":
|
|
1675
|
+
return _context4.stop();
|
|
1676
|
+
}
|
|
1677
|
+
}, _callee4);
|
|
1678
|
+
}));
|
|
1679
|
+
return _ensurePreferencesFileRowInProfile.apply(this, arguments);
|
|
1680
|
+
}
|
|
1681
|
+
function buildPreferencesFileTurtle(me) {
|
|
1682
|
+
var mbox = store.any(me, _ns__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A.foaf('mbox'));
|
|
1683
|
+
var mboxLine = mbox ? "\n<".concat(me.uri, "> foaf:mbox <").concat(mbox.value, "> .\n") : '\n';
|
|
1684
|
+
return '@prefix dct: <http://purl.org/dc/terms/>.\n' + '@prefix pim: <http://www.w3.org/ns/pim/space#>.\n' + '@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n' + '@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n\n' + '<>\n' + ' a pim:ConfigurationFile;\n\n' + ' dct:title "Preferences file" .\n' + mboxLine + "<".concat(me.uri, ">\n") + ' solid:publicTypeIndex <publicTypeIndex.ttl> ;\n' + ' solid:privateTypeIndex <privateTypeIndex.ttl> .\n';
|
|
1685
|
+
}
|
|
1686
|
+
function writePreferencesFileDocument(_x4, _x5) {
|
|
1687
|
+
return _writePreferencesFileDocument.apply(this, arguments);
|
|
1688
|
+
}
|
|
1689
|
+
function _writePreferencesFileDocument() {
|
|
1690
|
+
_writePreferencesFileDocument = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee5(uri, data) {
|
|
1691
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context5) {
|
|
1692
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
1693
|
+
case 0:
|
|
1694
|
+
if (store.fetcher) {
|
|
1695
|
+
_context5.next = 1;
|
|
1696
|
+
break;
|
|
1697
|
+
}
|
|
1698
|
+
throw new Error('Cannot create preferences file: store has no fetcher');
|
|
1699
|
+
case 1:
|
|
1700
|
+
_context5.next = 2;
|
|
1701
|
+
return store.fetcher.webOperation('PUT', uri, {
|
|
1702
|
+
data: data,
|
|
1703
|
+
contentType: 'text/turtle'
|
|
1704
|
+
});
|
|
1705
|
+
case 2:
|
|
1706
|
+
case "end":
|
|
1707
|
+
return _context5.stop();
|
|
1708
|
+
}
|
|
1709
|
+
}, _callee5);
|
|
1710
|
+
}));
|
|
1711
|
+
return _writePreferencesFileDocument.apply(this, arguments);
|
|
1712
|
+
}
|
|
1713
|
+
function createPreferencesFile(_x6, _x7) {
|
|
1714
|
+
return _createPreferencesFile.apply(this, arguments);
|
|
1715
|
+
}
|
|
1615
1716
|
/**
|
|
1616
1717
|
* Resolves with the logged in user's WebID
|
|
1617
1718
|
*
|
|
1618
1719
|
* @param context
|
|
1619
1720
|
*/
|
|
1620
1721
|
// used to be logIn
|
|
1722
|
+
function _createPreferencesFile() {
|
|
1723
|
+
_createPreferencesFile = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee6(context, uri) {
|
|
1724
|
+
var me, profileDoc, prefsNode, prefsTurtle;
|
|
1725
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context6) {
|
|
1726
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
1727
|
+
case 0:
|
|
1728
|
+
me = context.me || solid_logic__WEBPACK_IMPORTED_MODULE_3__.authn.currentUser();
|
|
1729
|
+
if (me) {
|
|
1730
|
+
_context6.next = 1;
|
|
1731
|
+
break;
|
|
1732
|
+
}
|
|
1733
|
+
throw new Error('Cannot create preferences file: no logged-in WebID');
|
|
1734
|
+
case 1:
|
|
1735
|
+
context.me = me;
|
|
1736
|
+
profileDoc = me.doc();
|
|
1737
|
+
prefsNode = store.sym(uri);
|
|
1738
|
+
_context6.next = 2;
|
|
1739
|
+
return ensurePreferencesFileRowInProfile(me, prefsNode, profileDoc);
|
|
1740
|
+
case 2:
|
|
1741
|
+
prefsTurtle = buildPreferencesFileTurtle(me);
|
|
1742
|
+
_context6.next = 3;
|
|
1743
|
+
return writePreferencesFileDocument(uri, prefsTurtle);
|
|
1744
|
+
case 3:
|
|
1745
|
+
_context6.next = 4;
|
|
1746
|
+
return loadPreferences(me);
|
|
1747
|
+
case 4:
|
|
1748
|
+
context.preferencesFile = _context6.sent;
|
|
1749
|
+
context.preferencesFileError = undefined;
|
|
1750
|
+
case 5:
|
|
1751
|
+
case "end":
|
|
1752
|
+
return _context6.stop();
|
|
1753
|
+
}
|
|
1754
|
+
}, _callee6);
|
|
1755
|
+
}));
|
|
1756
|
+
return _createPreferencesFile.apply(this, arguments);
|
|
1757
|
+
}
|
|
1621
1758
|
function ensureLoggedIn(context) {
|
|
1622
1759
|
var me = solid_logic__WEBPACK_IMPORTED_MODULE_3__.authn.currentUser();
|
|
1623
1760
|
if (me) {
|
|
@@ -1652,7 +1789,7 @@ function ensureLoggedIn(context) {
|
|
|
1652
1789
|
* @param context
|
|
1653
1790
|
*/
|
|
1654
1791
|
// used to be logInLoadPreferences
|
|
1655
|
-
function ensureLoadedPreferences(
|
|
1792
|
+
function ensureLoadedPreferences(_x8) {
|
|
1656
1793
|
return _ensureLoadedPreferences.apply(this, arguments);
|
|
1657
1794
|
}
|
|
1658
1795
|
|
|
@@ -1665,98 +1802,143 @@ function ensureLoadedPreferences(_x) {
|
|
|
1665
1802
|
*/
|
|
1666
1803
|
// used to be logInLoadProfile
|
|
1667
1804
|
function _ensureLoadedPreferences() {
|
|
1668
|
-
_ensureLoadedPreferences = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function
|
|
1669
|
-
var progressDisplay, preferencesFile, m2, _t4;
|
|
1670
|
-
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (
|
|
1671
|
-
while (1) switch (
|
|
1805
|
+
_ensureLoadedPreferences = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee7(context) {
|
|
1806
|
+
var progressDisplay, preferencesFile, m2, missingPreferencesFileUri, message, _t4, _t5;
|
|
1807
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context7) {
|
|
1808
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
1672
1809
|
case 0:
|
|
1673
1810
|
if (!context.preferencesFile) {
|
|
1674
|
-
|
|
1811
|
+
_context7.next = 1;
|
|
1675
1812
|
break;
|
|
1676
1813
|
}
|
|
1677
|
-
return
|
|
1814
|
+
return _context7.abrupt("return", Promise.resolve(context));
|
|
1678
1815
|
case 1:
|
|
1679
|
-
|
|
1680
|
-
|
|
1816
|
+
_context7.prev = 1;
|
|
1817
|
+
_context7.next = 2;
|
|
1681
1818
|
return ensureLoadedProfile(context);
|
|
1682
1819
|
case 2:
|
|
1683
|
-
context =
|
|
1684
|
-
|
|
1685
|
-
|
|
1820
|
+
context = _context7.sent;
|
|
1821
|
+
if (context.me) {
|
|
1822
|
+
_context7.next = 3;
|
|
1823
|
+
break;
|
|
1824
|
+
}
|
|
1825
|
+
context.preferencesFileError = 'Not logged in, so preferences were not loaded.';
|
|
1826
|
+
_debug__WEBPACK_IMPORTED_MODULE_4__/* .log */ .Rm('not logged in, no preferences loaded');
|
|
1827
|
+
return _context7.abrupt("return", context);
|
|
1686
1828
|
case 3:
|
|
1687
|
-
|
|
1829
|
+
_context7.next = 4;
|
|
1830
|
+
return loadPreferences(context.me);
|
|
1831
|
+
case 4:
|
|
1832
|
+
preferencesFile = _context7.sent;
|
|
1688
1833
|
if (progressDisplay) {
|
|
1689
1834
|
progressDisplay.parentNode.removeChild(progressDisplay);
|
|
1690
1835
|
}
|
|
1691
1836
|
context.preferencesFile = preferencesFile;
|
|
1692
|
-
|
|
1837
|
+
_context7.next = 17;
|
|
1693
1838
|
break;
|
|
1694
|
-
case
|
|
1695
|
-
|
|
1696
|
-
_t4 =
|
|
1839
|
+
case 5:
|
|
1840
|
+
_context7.prev = 5;
|
|
1841
|
+
_t4 = _context7["catch"](1);
|
|
1697
1842
|
if (!(_t4 instanceof solid_logic__WEBPACK_IMPORTED_MODULE_3__.UnauthorizedError)) {
|
|
1698
|
-
|
|
1843
|
+
_context7.next = 6;
|
|
1699
1844
|
break;
|
|
1700
1845
|
}
|
|
1701
1846
|
m2 = 'Oops — you are not authenticated (properly logged in), so SolidOS cannot read your preferences file. Try logging out and then logging back in.';
|
|
1847
|
+
context.preferencesFileError = m2;
|
|
1702
1848
|
(0,_log__WEBPACK_IMPORTED_MODULE_6__.alert)(m2);
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
case 5:
|
|
1849
|
+
return _context7.abrupt("return", context);
|
|
1850
|
+
case 6:
|
|
1706
1851
|
if (!(_t4 instanceof solid_logic__WEBPACK_IMPORTED_MODULE_3__.CrossOriginForbiddenError)) {
|
|
1707
|
-
|
|
1852
|
+
_context7.next = 7;
|
|
1708
1853
|
break;
|
|
1709
1854
|
}
|
|
1710
|
-
m2 = "
|
|
1855
|
+
m2 = "Blocked by origin: preference file request from ".concat(window.location.origin, " was forbidden. Ensure this app origin is trusted/allowed for your preferences file.");
|
|
1711
1856
|
context.preferencesFileError = m2;
|
|
1712
|
-
return
|
|
1713
|
-
case
|
|
1857
|
+
return _context7.abrupt("return", context);
|
|
1858
|
+
case 7:
|
|
1714
1859
|
if (!(_t4 instanceof solid_logic__WEBPACK_IMPORTED_MODULE_3__.SameOriginForbiddenError)) {
|
|
1715
|
-
|
|
1860
|
+
_context7.next = 8;
|
|
1716
1861
|
break;
|
|
1717
1862
|
}
|
|
1718
|
-
m2 = 'You are not authorized to read your preference file
|
|
1863
|
+
m2 = 'You are not authorized to read your preference file from this app context.';
|
|
1864
|
+
context.preferencesFileError = m2;
|
|
1719
1865
|
_debug__WEBPACK_IMPORTED_MODULE_4__/* .warn */ .R8(m2);
|
|
1720
|
-
return
|
|
1721
|
-
case
|
|
1866
|
+
return _context7.abrupt("return", context);
|
|
1867
|
+
case 8:
|
|
1722
1868
|
if (!(_t4 instanceof solid_logic__WEBPACK_IMPORTED_MODULE_3__.NotEditableError)) {
|
|
1723
|
-
|
|
1869
|
+
_context7.next = 9;
|
|
1724
1870
|
break;
|
|
1725
1871
|
}
|
|
1726
|
-
m2 = 'You are not authorized to edit your preference file
|
|
1872
|
+
m2 = 'You are not authorized to edit your preference file from this app context.';
|
|
1873
|
+
context.preferencesFileError = m2;
|
|
1727
1874
|
_debug__WEBPACK_IMPORTED_MODULE_4__/* .warn */ .R8(m2);
|
|
1728
|
-
return
|
|
1729
|
-
case
|
|
1875
|
+
return _context7.abrupt("return", context);
|
|
1876
|
+
case 9:
|
|
1730
1877
|
if (!(_t4 instanceof solid_logic__WEBPACK_IMPORTED_MODULE_3__.WebOperationError)) {
|
|
1731
|
-
|
|
1878
|
+
_context7.next = 10;
|
|
1732
1879
|
break;
|
|
1733
1880
|
}
|
|
1734
|
-
m2 = '
|
|
1881
|
+
m2 = formatDynamicError(_t4, 'Preference file web operation failed');
|
|
1882
|
+
context.preferencesFileError = m2;
|
|
1735
1883
|
_debug__WEBPACK_IMPORTED_MODULE_4__/* .warn */ .R8(m2);
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
case 9:
|
|
1884
|
+
return _context7.abrupt("return", context);
|
|
1885
|
+
case 10:
|
|
1739
1886
|
if (!(_t4 instanceof solid_logic__WEBPACK_IMPORTED_MODULE_3__.FetchError)) {
|
|
1740
|
-
|
|
1887
|
+
_context7.next = 16;
|
|
1741
1888
|
break;
|
|
1742
1889
|
}
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1890
|
+
if (!(_t4.status === 404)) {
|
|
1891
|
+
_context7.next = 15;
|
|
1892
|
+
break;
|
|
1893
|
+
}
|
|
1894
|
+
m2 = 'Your preferences file was not found (404). It may not exist yet.';
|
|
1895
|
+
_debug__WEBPACK_IMPORTED_MODULE_4__/* .warn */ .R8(m2);
|
|
1896
|
+
missingPreferencesFileUri = getMissingPreferencesFileUri(context, _t4);
|
|
1897
|
+
if (!missingPreferencesFileUri) {
|
|
1898
|
+
_context7.next = 14;
|
|
1899
|
+
break;
|
|
1900
|
+
}
|
|
1901
|
+
_context7.prev = 11;
|
|
1902
|
+
_context7.next = 12;
|
|
1903
|
+
return createPreferencesFile(context, missingPreferencesFileUri);
|
|
1751
1904
|
case 12:
|
|
1905
|
+
_debug__WEBPACK_IMPORTED_MODULE_4__/* .log */ .Rm("Preferences file created automatically: ".concat(missingPreferencesFileUri));
|
|
1906
|
+
return _context7.abrupt("return", context);
|
|
1907
|
+
case 13:
|
|
1908
|
+
_context7.prev = 13;
|
|
1909
|
+
_t5 = _context7["catch"](11);
|
|
1910
|
+
message = formatDynamicError(_t5, 'Failed to create preferences file automatically');
|
|
1911
|
+
context.preferencesFileError = message;
|
|
1912
|
+
_debug__WEBPACK_IMPORTED_MODULE_4__/* .error */ .z3(message);
|
|
1913
|
+
if (context.div && context.dom) {
|
|
1914
|
+
context.div.appendChild(_widgets__WEBPACK_IMPORTED_MODULE_11__/* .errorMessageBlock */ .F(context.dom, message));
|
|
1915
|
+
}
|
|
1916
|
+
return _context7.abrupt("return", context);
|
|
1917
|
+
case 14:
|
|
1918
|
+
context.preferencesFileError = m2;
|
|
1919
|
+
return _context7.abrupt("return", context);
|
|
1920
|
+
case 15:
|
|
1921
|
+
m2 = formatDynamicError(_t4, 'Error reading your preferences file');
|
|
1922
|
+
context.preferencesFileError = m2;
|
|
1923
|
+
_debug__WEBPACK_IMPORTED_MODULE_4__/* .warn */ .R8(m2);
|
|
1924
|
+
(0,_log__WEBPACK_IMPORTED_MODULE_6__.alert)(m2);
|
|
1925
|
+
return _context7.abrupt("return", context);
|
|
1926
|
+
case 16:
|
|
1927
|
+
m2 = formatDynamicError(_t4, 'Unexpected error while loading preferences');
|
|
1928
|
+
context.preferencesFileError = m2;
|
|
1929
|
+
_debug__WEBPACK_IMPORTED_MODULE_4__/* .error */ .z3(m2);
|
|
1930
|
+
return _context7.abrupt("return", context);
|
|
1931
|
+
case 17:
|
|
1932
|
+
return _context7.abrupt("return", context);
|
|
1933
|
+
case 18:
|
|
1752
1934
|
case "end":
|
|
1753
|
-
return
|
|
1935
|
+
return _context7.stop();
|
|
1754
1936
|
}
|
|
1755
|
-
},
|
|
1937
|
+
}, _callee7, null, [[1, 5], [11, 13]]);
|
|
1756
1938
|
}));
|
|
1757
1939
|
return _ensureLoadedPreferences.apply(this, arguments);
|
|
1758
1940
|
}
|
|
1759
|
-
function ensureLoadedProfile(
|
|
1941
|
+
function ensureLoadedProfile(_x9) {
|
|
1760
1942
|
return _ensureLoadedProfile.apply(this, arguments);
|
|
1761
1943
|
}
|
|
1762
1944
|
|
|
@@ -1766,74 +1948,77 @@ function ensureLoadedProfile(_x2) {
|
|
|
1766
1948
|
* leaving the `isPublic` param undefined will bring in community index things, too
|
|
1767
1949
|
*/
|
|
1768
1950
|
function _ensureLoadedProfile() {
|
|
1769
|
-
_ensureLoadedProfile = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function
|
|
1770
|
-
var logInContext,
|
|
1771
|
-
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (
|
|
1772
|
-
while (1) switch (
|
|
1951
|
+
_ensureLoadedProfile = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee8(context) {
|
|
1952
|
+
var logInContext, message, _message, _t6;
|
|
1953
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context8) {
|
|
1954
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
1773
1955
|
case 0:
|
|
1774
1956
|
if (!context.publicProfile) {
|
|
1775
|
-
|
|
1957
|
+
_context8.next = 1;
|
|
1776
1958
|
break;
|
|
1777
1959
|
}
|
|
1778
|
-
return
|
|
1960
|
+
return _context8.abrupt("return", context);
|
|
1779
1961
|
case 1:
|
|
1780
|
-
|
|
1781
|
-
|
|
1962
|
+
_context8.prev = 1;
|
|
1963
|
+
_context8.next = 2;
|
|
1782
1964
|
return ensureLoggedIn(context);
|
|
1783
1965
|
case 2:
|
|
1784
|
-
logInContext =
|
|
1966
|
+
logInContext = _context8.sent;
|
|
1785
1967
|
if (logInContext.me) {
|
|
1786
|
-
|
|
1968
|
+
_context8.next = 3;
|
|
1787
1969
|
break;
|
|
1788
1970
|
}
|
|
1789
|
-
|
|
1971
|
+
message = 'Could not log in; skipping profile load.';
|
|
1972
|
+
_debug__WEBPACK_IMPORTED_MODULE_4__/* .log */ .Rm(message);
|
|
1973
|
+
throw new Error(message);
|
|
1790
1974
|
case 3:
|
|
1791
|
-
|
|
1975
|
+
_context8.next = 4;
|
|
1792
1976
|
return loadProfile(logInContext.me);
|
|
1793
1977
|
case 4:
|
|
1794
|
-
context.publicProfile =
|
|
1795
|
-
|
|
1978
|
+
context.publicProfile = _context8.sent;
|
|
1979
|
+
_context8.next = 6;
|
|
1796
1980
|
break;
|
|
1797
1981
|
case 5:
|
|
1798
|
-
|
|
1799
|
-
|
|
1982
|
+
_context8.prev = 5;
|
|
1983
|
+
_t6 = _context8["catch"](1);
|
|
1984
|
+
_message = formatDynamicError(_t6, 'Unable to load your profile');
|
|
1800
1985
|
if (context.div && context.dom) {
|
|
1801
|
-
context.div.appendChild(_widgets__WEBPACK_IMPORTED_MODULE_11__/* .errorMessageBlock */ .F(context.dom,
|
|
1986
|
+
context.div.appendChild(_widgets__WEBPACK_IMPORTED_MODULE_11__/* .errorMessageBlock */ .F(context.dom, _message));
|
|
1802
1987
|
}
|
|
1803
|
-
throw new Error(
|
|
1988
|
+
throw new Error(_message);
|
|
1804
1989
|
case 6:
|
|
1805
|
-
return
|
|
1990
|
+
return _context8.abrupt("return", context);
|
|
1806
1991
|
case 7:
|
|
1807
1992
|
case "end":
|
|
1808
|
-
return
|
|
1993
|
+
return _context8.stop();
|
|
1809
1994
|
}
|
|
1810
|
-
},
|
|
1995
|
+
}, _callee8, null, [[1, 5]]);
|
|
1811
1996
|
}));
|
|
1812
1997
|
return _ensureLoadedProfile.apply(this, arguments);
|
|
1813
1998
|
}
|
|
1814
|
-
function findAppInstances(
|
|
1999
|
+
function findAppInstances(_x0, _x1, _x10) {
|
|
1815
2000
|
return _findAppInstances.apply(this, arguments);
|
|
1816
2001
|
}
|
|
1817
2002
|
function _findAppInstances() {
|
|
1818
|
-
_findAppInstances = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function
|
|
1819
|
-
var items,
|
|
1820
|
-
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (
|
|
1821
|
-
while (1) switch (
|
|
2003
|
+
_findAppInstances = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee9(context, theClass, isPublic) {
|
|
2004
|
+
var items, _t7;
|
|
2005
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context9) {
|
|
2006
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
1822
2007
|
case 0:
|
|
1823
2008
|
if (!context.me) {
|
|
1824
|
-
|
|
2009
|
+
_context9.next = 2;
|
|
1825
2010
|
break;
|
|
1826
2011
|
}
|
|
1827
|
-
|
|
2012
|
+
_context9.next = 1;
|
|
1828
2013
|
return getScopedAppInstances(theClass, context.me);
|
|
1829
2014
|
case 1:
|
|
1830
|
-
|
|
1831
|
-
|
|
2015
|
+
_t7 = _context9.sent;
|
|
2016
|
+
_context9.next = 3;
|
|
1832
2017
|
break;
|
|
1833
2018
|
case 2:
|
|
1834
|
-
|
|
2019
|
+
_t7 = [];
|
|
1835
2020
|
case 3:
|
|
1836
|
-
items =
|
|
2021
|
+
items = _t7;
|
|
1837
2022
|
if (isPublic === true) {
|
|
1838
2023
|
// old API - not recommended!
|
|
1839
2024
|
items = items.filter(function (item) {
|
|
@@ -1847,12 +2032,12 @@ function _findAppInstances() {
|
|
|
1847
2032
|
context.instances = items.map(function (item) {
|
|
1848
2033
|
return item.instance;
|
|
1849
2034
|
});
|
|
1850
|
-
return
|
|
2035
|
+
return _context9.abrupt("return", context);
|
|
1851
2036
|
case 4:
|
|
1852
2037
|
case "end":
|
|
1853
|
-
return
|
|
2038
|
+
return _context9.stop();
|
|
1854
2039
|
}
|
|
1855
|
-
},
|
|
2040
|
+
}, _callee9);
|
|
1856
2041
|
}));
|
|
1857
2042
|
return _findAppInstances.apply(this, arguments);
|
|
1858
2043
|
}
|
|
@@ -1864,14 +2049,14 @@ function scopeLabel(context, scope) {
|
|
|
1864
2049
|
/**
|
|
1865
2050
|
* UI to control registration of instance
|
|
1866
2051
|
*/
|
|
1867
|
-
function registrationControl(
|
|
2052
|
+
function registrationControl(_x11, _x12, _x13) {
|
|
1868
2053
|
return _registrationControl.apply(this, arguments);
|
|
1869
2054
|
}
|
|
1870
2055
|
function _registrationControl() {
|
|
1871
|
-
_registrationControl = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function
|
|
1872
|
-
var registrationStatements, renderScopeCheckbox, dom, box, me, scopes, msg, tbody, form, _iterator, _step, scope, row,
|
|
1873
|
-
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (
|
|
1874
|
-
while (1) switch (
|
|
2056
|
+
_registrationControl = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee0(context, instance, theClass) {
|
|
2057
|
+
var registrationStatements, renderScopeCheckbox, dom, box, me, scopes, msg, tbody, form, _iterator, _step, scope, row, _t8;
|
|
2058
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context0) {
|
|
2059
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
1875
2060
|
case 0:
|
|
1876
2061
|
renderScopeCheckbox = function _renderScopeCheckbox(scope) {
|
|
1877
2062
|
var statements = registrationStatements(scope.index);
|
|
@@ -1887,7 +2072,7 @@ function _registrationControl() {
|
|
|
1887
2072
|
/// / body of registrationControl
|
|
1888
2073
|
dom = context.dom;
|
|
1889
2074
|
if (!(!dom || !context.div)) {
|
|
1890
|
-
|
|
2075
|
+
_context0.next = 1;
|
|
1891
2076
|
break;
|
|
1892
2077
|
}
|
|
1893
2078
|
throw new Error('registrationControl: need dom and div');
|
|
@@ -1897,31 +2082,31 @@ function _registrationControl() {
|
|
|
1897
2082
|
context.me = solid_logic__WEBPACK_IMPORTED_MODULE_3__.authn.currentUser(); // @@
|
|
1898
2083
|
me = context.me;
|
|
1899
2084
|
if (me) {
|
|
1900
|
-
|
|
2085
|
+
_context0.next = 2;
|
|
1901
2086
|
break;
|
|
1902
2087
|
}
|
|
1903
2088
|
box.innerHTML = '<p style="margin:2em;">(Log in to save a link to this)</p>';
|
|
1904
|
-
return
|
|
2089
|
+
return _context0.abrupt("return", context);
|
|
1905
2090
|
case 2:
|
|
1906
|
-
|
|
1907
|
-
|
|
2091
|
+
_context0.prev = 2;
|
|
2092
|
+
_context0.next = 3;
|
|
1908
2093
|
return loadAllTypeIndexes(me);
|
|
1909
2094
|
case 3:
|
|
1910
|
-
scopes =
|
|
1911
|
-
|
|
2095
|
+
scopes = _context0.sent;
|
|
2096
|
+
_context0.next = 5;
|
|
1912
2097
|
break;
|
|
1913
2098
|
case 4:
|
|
1914
|
-
|
|
1915
|
-
|
|
2099
|
+
_context0.prev = 4;
|
|
2100
|
+
_t8 = _context0["catch"](2);
|
|
1916
2101
|
if (context.div && context.preferencesFileError) {
|
|
1917
2102
|
msg = '(Lists of stuff not available)';
|
|
1918
2103
|
context.div.appendChild(dom.createElement('p')).textContent = msg;
|
|
1919
2104
|
} else if (context.div) {
|
|
1920
|
-
msg = "registrationControl: Type indexes not available: ".concat(
|
|
1921
|
-
context.div.appendChild(_widgets__WEBPACK_IMPORTED_MODULE_11__/* .errorMessageBlock */ .F(context.dom,
|
|
2105
|
+
msg = "registrationControl: Type indexes not available: ".concat(_t8);
|
|
2106
|
+
context.div.appendChild(_widgets__WEBPACK_IMPORTED_MODULE_11__/* .errorMessageBlock */ .F(context.dom, _t8));
|
|
1922
2107
|
}
|
|
1923
2108
|
_debug__WEBPACK_IMPORTED_MODULE_4__/* .log */ .Rm(msg);
|
|
1924
|
-
return
|
|
2109
|
+
return _context0.abrupt("return", context);
|
|
1925
2110
|
case 5:
|
|
1926
2111
|
box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
|
|
1927
2112
|
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;');
|
|
@@ -1939,12 +2124,12 @@ function _registrationControl() {
|
|
|
1939
2124
|
} finally {
|
|
1940
2125
|
_iterator.f();
|
|
1941
2126
|
}
|
|
1942
|
-
return
|
|
2127
|
+
return _context0.abrupt("return", context);
|
|
1943
2128
|
case 6:
|
|
1944
2129
|
case "end":
|
|
1945
|
-
return
|
|
2130
|
+
return _context0.stop();
|
|
1946
2131
|
}
|
|
1947
|
-
},
|
|
2132
|
+
}, _callee0, null, [[2, 4]]);
|
|
1948
2133
|
}));
|
|
1949
2134
|
return _registrationControl.apply(this, arguments);
|
|
1950
2135
|
}
|
|
@@ -1967,7 +2152,7 @@ function renderScopeHeadingRow(context, store, scope) {
|
|
|
1967
2152
|
/**
|
|
1968
2153
|
* UI to List at all registered things
|
|
1969
2154
|
*/
|
|
1970
|
-
function registrationList(
|
|
2155
|
+
function registrationList(_x14, _x15) {
|
|
1971
2156
|
return _registrationList.apply(this, arguments);
|
|
1972
2157
|
} // registrationList
|
|
1973
2158
|
|
|
@@ -1981,10 +2166,10 @@ function registrationList(_x9, _x0) {
|
|
|
1981
2166
|
* @returns
|
|
1982
2167
|
*/
|
|
1983
2168
|
function _registrationList() {
|
|
1984
|
-
_registrationList = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function
|
|
1985
|
-
var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop,
|
|
1986
|
-
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (
|
|
1987
|
-
while (1) switch (
|
|
2169
|
+
_registrationList = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee10(context, options) {
|
|
2170
|
+
var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop, _t9, _t0;
|
|
2171
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context11) {
|
|
2172
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1988
2173
|
case 0:
|
|
1989
2174
|
dom = context.dom;
|
|
1990
2175
|
div = context.div;
|
|
@@ -1992,16 +2177,16 @@ function _registrationList() {
|
|
|
1992
2177
|
div.appendChild(box);
|
|
1993
2178
|
context.me = solid_logic__WEBPACK_IMPORTED_MODULE_3__.authn.currentUser(); // @@
|
|
1994
2179
|
if (context.me) {
|
|
1995
|
-
|
|
2180
|
+
_context11.next = 1;
|
|
1996
2181
|
break;
|
|
1997
2182
|
}
|
|
1998
2183
|
box.innerHTML = '<p style="margin:2em;">(Log in list your stuff)</p>';
|
|
1999
|
-
return
|
|
2184
|
+
return _context11.abrupt("return", context);
|
|
2000
2185
|
case 1:
|
|
2001
|
-
|
|
2186
|
+
_context11.next = 2;
|
|
2002
2187
|
return loadAllTypeIndexes(context.me);
|
|
2003
2188
|
case 2:
|
|
2004
|
-
scopes =
|
|
2189
|
+
scopes = _context11.sent;
|
|
2005
2190
|
// includes community indexes
|
|
2006
2191
|
|
|
2007
2192
|
// console.log('@@ registrationList ', scopes)
|
|
@@ -2010,47 +2195,47 @@ function _registrationList() {
|
|
|
2010
2195
|
table = box.firstChild;
|
|
2011
2196
|
tbody = table.firstChild;
|
|
2012
2197
|
_iterator2 = _createForOfIteratorHelper(scopes);
|
|
2013
|
-
|
|
2198
|
+
_context11.prev = 3;
|
|
2014
2199
|
_iterator2.s();
|
|
2015
2200
|
case 4:
|
|
2016
2201
|
if ((_step2 = _iterator2.n()).done) {
|
|
2017
|
-
|
|
2202
|
+
_context11.next = 13;
|
|
2018
2203
|
break;
|
|
2019
2204
|
}
|
|
2020
2205
|
scope = _step2.value;
|
|
2021
2206
|
// need some predicate for listing/adding agents
|
|
2022
2207
|
headingRow = renderScopeHeadingRow(context, store, scope);
|
|
2023
2208
|
tbody.appendChild(headingRow);
|
|
2024
|
-
|
|
2209
|
+
_context11.next = 5;
|
|
2025
2210
|
return getScopedAppsFromIndex(scope, options.type || null);
|
|
2026
2211
|
case 5:
|
|
2027
|
-
items =
|
|
2212
|
+
items = _context11.sent;
|
|
2028
2213
|
// any class
|
|
2029
2214
|
if (items.length === 0) headingRow.style.display = 'none';
|
|
2030
2215
|
// console.log(`registrationList: @@ instance items for class ${options.type || 'undefined' }:`, items)
|
|
2031
2216
|
_iterator3 = _createForOfIteratorHelper(items);
|
|
2032
|
-
|
|
2217
|
+
_context11.prev = 6;
|
|
2033
2218
|
_loop = /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _loop() {
|
|
2034
2219
|
var item, row;
|
|
2035
|
-
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (
|
|
2036
|
-
while (1) switch (
|
|
2220
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context10) {
|
|
2221
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
2037
2222
|
case 0:
|
|
2038
2223
|
item = _step3.value;
|
|
2039
2224
|
row = _widgets__WEBPACK_IMPORTED_MODULE_10__/* .personTR */ .Cl(dom, _ns__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A.solid('instance'), item.instance, {
|
|
2040
2225
|
deleteFunction: function () {
|
|
2041
|
-
var _deleteFunction = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function
|
|
2042
|
-
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (
|
|
2043
|
-
while (1) switch (
|
|
2226
|
+
var _deleteFunction = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee1() {
|
|
2227
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context1) {
|
|
2228
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
2044
2229
|
case 0:
|
|
2045
|
-
|
|
2230
|
+
_context1.next = 1;
|
|
2046
2231
|
return deleteTypeIndexRegistration(item);
|
|
2047
2232
|
case 1:
|
|
2048
2233
|
tbody.removeChild(row);
|
|
2049
2234
|
case 2:
|
|
2050
2235
|
case "end":
|
|
2051
|
-
return
|
|
2236
|
+
return _context1.stop();
|
|
2052
2237
|
}
|
|
2053
|
-
},
|
|
2238
|
+
}, _callee1);
|
|
2054
2239
|
}));
|
|
2055
2240
|
function deleteFunction() {
|
|
2056
2241
|
return _deleteFunction.apply(this, arguments);
|
|
@@ -2062,52 +2247,52 @@ function _registrationList() {
|
|
|
2062
2247
|
tbody.appendChild(row);
|
|
2063
2248
|
case 1:
|
|
2064
2249
|
case "end":
|
|
2065
|
-
return
|
|
2250
|
+
return _context10.stop();
|
|
2066
2251
|
}
|
|
2067
2252
|
}, _loop);
|
|
2068
2253
|
});
|
|
2069
2254
|
_iterator3.s();
|
|
2070
2255
|
case 7:
|
|
2071
2256
|
if ((_step3 = _iterator3.n()).done) {
|
|
2072
|
-
|
|
2257
|
+
_context11.next = 9;
|
|
2073
2258
|
break;
|
|
2074
2259
|
}
|
|
2075
|
-
return
|
|
2260
|
+
return _context11.delegateYield(_loop(), "t0", 8);
|
|
2076
2261
|
case 8:
|
|
2077
|
-
|
|
2262
|
+
_context11.next = 7;
|
|
2078
2263
|
break;
|
|
2079
2264
|
case 9:
|
|
2080
|
-
|
|
2265
|
+
_context11.next = 11;
|
|
2081
2266
|
break;
|
|
2082
2267
|
case 10:
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
_iterator3.e(
|
|
2268
|
+
_context11.prev = 10;
|
|
2269
|
+
_t9 = _context11["catch"](6);
|
|
2270
|
+
_iterator3.e(_t9);
|
|
2086
2271
|
case 11:
|
|
2087
|
-
|
|
2272
|
+
_context11.prev = 11;
|
|
2088
2273
|
_iterator3.f();
|
|
2089
|
-
return
|
|
2274
|
+
return _context11.finish(11);
|
|
2090
2275
|
case 12:
|
|
2091
|
-
|
|
2276
|
+
_context11.next = 4;
|
|
2092
2277
|
break;
|
|
2093
2278
|
case 13:
|
|
2094
|
-
|
|
2279
|
+
_context11.next = 15;
|
|
2095
2280
|
break;
|
|
2096
2281
|
case 14:
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
_iterator2.e(
|
|
2282
|
+
_context11.prev = 14;
|
|
2283
|
+
_t0 = _context11["catch"](3);
|
|
2284
|
+
_iterator2.e(_t0);
|
|
2100
2285
|
case 15:
|
|
2101
|
-
|
|
2286
|
+
_context11.prev = 15;
|
|
2102
2287
|
_iterator2.f();
|
|
2103
|
-
return
|
|
2288
|
+
return _context11.finish(15);
|
|
2104
2289
|
case 16:
|
|
2105
|
-
return
|
|
2290
|
+
return _context11.abrupt("return", context);
|
|
2106
2291
|
case 17:
|
|
2107
2292
|
case "end":
|
|
2108
|
-
return
|
|
2293
|
+
return _context11.stop();
|
|
2109
2294
|
}
|
|
2110
|
-
},
|
|
2295
|
+
}, _callee10, null, [[3, 14, 15, 16], [6, 10, 11, 12]]);
|
|
2111
2296
|
}));
|
|
2112
2297
|
return _registrationList.apply(this, arguments);
|
|
2113
2298
|
}
|
|
@@ -2238,7 +2423,7 @@ function renderSignInPopup(dom) {
|
|
|
2238
2423
|
}
|
|
2239
2424
|
}, _callee, null, [[0, 2]]);
|
|
2240
2425
|
}));
|
|
2241
|
-
return function loginToIssuer(
|
|
2426
|
+
return function loginToIssuer(_x16) {
|
|
2242
2427
|
return _ref.apply(this, arguments);
|
|
2243
2428
|
};
|
|
2244
2429
|
}();
|
|
@@ -2485,7 +2670,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
|
|
|
2485
2670
|
}
|
|
2486
2671
|
function displayOptions(context) {
|
|
2487
2672
|
// console.log('displayOptions!', context)
|
|
2488
|
-
function makeNewWorkspace(
|
|
2673
|
+
function makeNewWorkspace(_x17) {
|
|
2489
2674
|
return _makeNewWorkspace.apply(this, arguments);
|
|
2490
2675
|
} // const status = ''
|
|
2491
2676
|
function _makeNewWorkspace() {
|
|
@@ -2721,60 +2906,67 @@ function getUserRoles() {
|
|
|
2721
2906
|
* Filters which panes should be available, based on the result of [[getUserRoles]]
|
|
2722
2907
|
*/
|
|
2723
2908
|
function _getUserRoles() {
|
|
2724
|
-
_getUserRoles = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function
|
|
2725
|
-
var _yield$ensureLoadedPr, me, preferencesFile, preferencesFileError,
|
|
2726
|
-
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (
|
|
2727
|
-
while (1) switch (
|
|
2909
|
+
_getUserRoles = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee11() {
|
|
2910
|
+
var _yield$ensureLoadedPr, me, preferencesFile, preferencesFileError, authState, _t1;
|
|
2911
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context12) {
|
|
2912
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
2728
2913
|
case 0:
|
|
2729
|
-
|
|
2730
|
-
|
|
2914
|
+
_context12.prev = 0;
|
|
2915
|
+
_context12.next = 1;
|
|
2731
2916
|
return ensureLoadedPreferences({});
|
|
2732
2917
|
case 1:
|
|
2733
|
-
_yield$ensureLoadedPr =
|
|
2918
|
+
_yield$ensureLoadedPr = _context12.sent;
|
|
2734
2919
|
me = _yield$ensureLoadedPr.me;
|
|
2735
2920
|
preferencesFile = _yield$ensureLoadedPr.preferencesFile;
|
|
2736
2921
|
preferencesFileError = _yield$ensureLoadedPr.preferencesFileError;
|
|
2737
|
-
if (!
|
|
2738
|
-
|
|
2922
|
+
if (!preferencesFileError) {
|
|
2923
|
+
_context12.next = 2;
|
|
2739
2924
|
break;
|
|
2740
2925
|
}
|
|
2741
2926
|
throw new Error(preferencesFileError);
|
|
2742
2927
|
case 2:
|
|
2743
|
-
|
|
2928
|
+
if (preferencesFile) {
|
|
2929
|
+
_context12.next = 3;
|
|
2930
|
+
break;
|
|
2931
|
+
}
|
|
2932
|
+
authState = me ? "logged in as ".concat(me.value || me.uri) : 'not logged in';
|
|
2933
|
+
throw new Error("Preferences file unavailable (".concat(authState, ")"));
|
|
2744
2934
|
case 3:
|
|
2745
|
-
|
|
2746
|
-
_t0 = _context1["catch"](0);
|
|
2747
|
-
_debug__WEBPACK_IMPORTED_MODULE_4__/* .warn */ .R8('Unable to fetch your preferences - this was the error: ', _t0);
|
|
2748
|
-
return _context1.abrupt("return", []);
|
|
2935
|
+
return _context12.abrupt("return", solid_logic__WEBPACK_IMPORTED_MODULE_3__.solidLogicSingleton.store.each(me, _ns__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A.rdf('type'), null, preferencesFile.doc()));
|
|
2749
2936
|
case 4:
|
|
2937
|
+
_context12.prev = 4;
|
|
2938
|
+
_t1 = _context12["catch"](0);
|
|
2939
|
+
_debug__WEBPACK_IMPORTED_MODULE_4__/* .warn */ .R8(formatDynamicError(_t1, 'Unable to fetch your preferences'));
|
|
2940
|
+
return _context12.abrupt("return", []);
|
|
2941
|
+
case 5:
|
|
2750
2942
|
case "end":
|
|
2751
|
-
return
|
|
2943
|
+
return _context12.stop();
|
|
2752
2944
|
}
|
|
2753
|
-
},
|
|
2945
|
+
}, _callee11, null, [[0, 4]]);
|
|
2754
2946
|
}));
|
|
2755
2947
|
return _getUserRoles.apply(this, arguments);
|
|
2756
2948
|
}
|
|
2757
|
-
function filterAvailablePanes(
|
|
2949
|
+
function filterAvailablePanes(_x18) {
|
|
2758
2950
|
return _filterAvailablePanes.apply(this, arguments);
|
|
2759
2951
|
}
|
|
2760
2952
|
function _filterAvailablePanes() {
|
|
2761
|
-
_filterAvailablePanes = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function
|
|
2953
|
+
_filterAvailablePanes = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee12(panes) {
|
|
2762
2954
|
var userRoles;
|
|
2763
|
-
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (
|
|
2764
|
-
while (1) switch (
|
|
2955
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context13) {
|
|
2956
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
2765
2957
|
case 0:
|
|
2766
|
-
|
|
2958
|
+
_context13.next = 1;
|
|
2767
2959
|
return getUserRoles();
|
|
2768
2960
|
case 1:
|
|
2769
|
-
userRoles =
|
|
2770
|
-
return
|
|
2961
|
+
userRoles = _context13.sent;
|
|
2962
|
+
return _context13.abrupt("return", panes.filter(function (pane) {
|
|
2771
2963
|
return isMatchingAudience(pane, userRoles);
|
|
2772
2964
|
}));
|
|
2773
2965
|
case 2:
|
|
2774
2966
|
case "end":
|
|
2775
|
-
return
|
|
2967
|
+
return _context13.stop();
|
|
2776
2968
|
}
|
|
2777
|
-
},
|
|
2969
|
+
}, _callee12);
|
|
2778
2970
|
}));
|
|
2779
2971
|
return _filterAvailablePanes.apply(this, arguments);
|
|
2780
2972
|
}
|
|
@@ -10983,7 +11175,7 @@ function attachmentList(dom, subject, div) {
|
|
|
10983
11175
|
var attachmentRight = attachmentOne.appendChild(dom.createElement('td'));
|
|
10984
11176
|
var attachmentTable = attachmentRight.appendChild(dom.createElement('table'));
|
|
10985
11177
|
attachmentTable.appendChild(dom.createElement('tr')) // attachmentTableTop
|
|
10986
|
-
|
|
11178
|
+
;
|
|
10987
11179
|
attachmentOuter.refresh = refresh; // Participate in downstream changes
|
|
10988
11180
|
// ;(attachmentTable as any).refresh = refresh <- outer should be best?
|
|
10989
11181
|
|
|
@@ -18408,7 +18600,7 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
|
|
|
18408
18600
|
}
|
|
18409
18601
|
if (!kb.updater.editable(doc.uri)) {
|
|
18410
18602
|
field.readOnly = true // was: disabled. readOnly is better
|
|
18411
|
-
|
|
18603
|
+
;
|
|
18412
18604
|
field.style = _style__WEBPACK_IMPORTED_MODULE_3__/* .style */ .i.textInputStyleUneditable + paramStyle;
|
|
18413
18605
|
if (suppressEmptyUneditable && field.value === '') {
|
|
18414
18606
|
box.style.display = 'none'; // clutter
|
|
@@ -20221,7 +20413,7 @@ function cameraCaptureControl(dom, store, getImageDoc, doneCallback) {
|
|
|
20221
20413
|
// if (!confirm('Save picture to ' + destination + ' ?')) return
|
|
20222
20414
|
_debug__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm('Putting ' + blob.size + ' bytes of ' + contentType + ' to ' + destination)
|
|
20223
20415
|
// @@ TODO Remove casting
|
|
20224
|
-
|
|
20416
|
+
;
|
|
20225
20417
|
store.fetcher.webOperation('PUT', destination.uri, {
|
|
20226
20418
|
data: blob,
|
|
20227
20419
|
contentType: contentType
|