solid-panes 3.5.28-alpha → 3.5.29-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.
Files changed (119) hide show
  1. package/README.md +0 -2
  2. package/lib/RDFXMLPane.js +6 -8
  3. package/lib/RDFXMLPane.js.map +1 -1
  4. package/lib/argument/argumentPane.js +10 -11
  5. package/lib/argument/argumentPane.js.map +1 -1
  6. package/lib/attach/attachPane.js +47 -85
  7. package/lib/attach/attachPane.js.map +1 -1
  8. package/lib/audio/audioPane.js +11 -36
  9. package/lib/audio/audioPane.js.map +1 -1
  10. package/lib/classInstancePane.js +11 -20
  11. package/lib/classInstancePane.js.map +1 -1
  12. package/lib/dashboard/basicPreferences.js +3 -53
  13. package/lib/dashboard/basicPreferences.js.map +1 -1
  14. package/lib/dashboard/dashboardPane.js +2 -18
  15. package/lib/dashboard/dashboardPane.js.map +1 -1
  16. package/lib/dashboard/homepage.js +1 -19
  17. package/lib/dashboard/homepage.js.map +1 -1
  18. package/lib/dataContentPane.js +15 -58
  19. package/lib/dataContentPane.js.map +1 -1
  20. package/lib/defaultPane.js +13 -21
  21. package/lib/defaultPane.js.map +1 -1
  22. package/lib/dokieli/dokieliPane.js +19 -28
  23. package/lib/dokieli/dokieliPane.js.map +1 -1
  24. package/lib/dokieli/new.js.map +1 -1
  25. package/lib/form/pane.js +26 -40
  26. package/lib/form/pane.js.map +1 -1
  27. package/lib/home/homePane.js +7 -23
  28. package/lib/home/homePane.js.map +1 -1
  29. package/lib/humanReadablePane.js +14 -28
  30. package/lib/humanReadablePane.js.map +1 -1
  31. package/lib/imagePane.js +9 -13
  32. package/lib/imagePane.js.map +1 -1
  33. package/lib/index.js +4 -18
  34. package/lib/index.js.map +1 -1
  35. package/lib/internal/internalPane.js +10 -41
  36. package/lib/internal/internalPane.js.map +1 -1
  37. package/lib/mainPage/footer.js +0 -4
  38. package/lib/mainPage/footer.js.map +1 -1
  39. package/lib/mainPage/header.js +2 -28
  40. package/lib/mainPage/header.js.map +1 -1
  41. package/lib/mainPage/index.js +1 -12
  42. package/lib/mainPage/index.js.map +1 -1
  43. package/lib/microblogPane/microblogPane.js +100 -237
  44. package/lib/microblogPane/microblogPane.js.map +1 -1
  45. package/lib/n3Pane.js +2 -7
  46. package/lib/n3Pane.js.map +1 -1
  47. package/lib/outline/context.js +0 -2
  48. package/lib/outline/context.js.map +1 -1
  49. package/lib/outline/licenseOptions.js +9 -25
  50. package/lib/outline/licenseOptions.js.map +1 -1
  51. package/lib/outline/manager.js +178 -580
  52. package/lib/outline/manager.js.map +1 -1
  53. package/lib/outline/manager.test.js +1 -11
  54. package/lib/outline/manager.test.js.map +1 -1
  55. package/lib/outline/outlineIcons.js +30 -25
  56. package/lib/outline/outlineIcons.js.map +1 -1
  57. package/lib/outline/propertyViews.js +0 -10
  58. package/lib/outline/propertyViews.js.map +1 -1
  59. package/lib/outline/propertyViews.test.js +1 -3
  60. package/lib/outline/propertyViews.test.js.map +1 -1
  61. package/lib/outline/queryByExample.js +24 -76
  62. package/lib/outline/queryByExample.js.map +1 -1
  63. package/lib/outline/userInput.js +214 -454
  64. package/lib/outline/userInput.js.map +1 -1
  65. package/lib/outline/viewAsImage.js +0 -6
  66. package/lib/outline/viewAsImage.js.map +1 -1
  67. package/lib/outline/viewAsMbox.js +3 -4
  68. package/lib/outline/viewAsMbox.js.map +1 -1
  69. package/lib/pad/padPane.js +45 -93
  70. package/lib/pad/padPane.js.map +1 -1
  71. package/lib/playlist/playlistPane.js +3 -20
  72. package/lib/playlist/playlistPane.js.map +1 -1
  73. package/lib/profile/editProfile.view.js +7 -24
  74. package/lib/profile/editProfile.view.js.map +1 -1
  75. package/lib/profile/profile.dom.js +0 -3
  76. package/lib/profile/profile.dom.js.map +1 -1
  77. package/lib/registerPanes.js +29 -27
  78. package/lib/registerPanes.js.map +1 -1
  79. package/lib/schedule/formsForSchedule.js.map +1 -1
  80. package/lib/schedule/schedulePane.js +62 -122
  81. package/lib/schedule/schedulePane.js.map +1 -1
  82. package/lib/sharing/sharingPane.js +2 -10
  83. package/lib/sharing/sharingPane.js.map +1 -1
  84. package/lib/slideshow/slideshowPane.js +9 -14
  85. package/lib/slideshow/slideshowPane.js.map +1 -1
  86. package/lib/socialPane.js +43 -124
  87. package/lib/socialPane.js.map +1 -1
  88. package/lib/tabbed/tabbedPane.js +1 -15
  89. package/lib/tabbed/tabbedPane.js.map +1 -1
  90. package/lib/tableViewPane.js +4 -7
  91. package/lib/tableViewPane.js.map +1 -1
  92. package/lib/test-import-export/common.js +2 -1
  93. package/lib/test-import-export/common.js.map +1 -1
  94. package/lib/test-import-export/edit-importer.js +7 -9
  95. package/lib/test-import-export/edit-importer.js.map +1 -1
  96. package/lib/transaction/pane.js +31 -90
  97. package/lib/transaction/pane.js.map +1 -1
  98. package/lib/transaction/period.js +20 -71
  99. package/lib/transaction/period.js.map +1 -1
  100. package/lib/trip/tripPane.js +30 -34
  101. package/lib/trip/tripPane.js.map +1 -1
  102. package/lib/trustedApplications/trustedApplications.dom.js +8 -34
  103. package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
  104. package/lib/trustedApplications/trustedApplications.test.js +3 -8
  105. package/lib/trustedApplications/trustedApplications.test.js.map +1 -1
  106. package/lib/trustedApplications/trustedApplications.utils.js +0 -10
  107. package/lib/trustedApplications/trustedApplications.utils.js.map +1 -1
  108. package/lib/trustedApplications/trustedApplications.view.js +1 -22
  109. package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
  110. package/lib/ui/pane.js +22 -28
  111. package/lib/ui/pane.js.map +1 -1
  112. package/lib/versionInfo.d.ts +2 -0
  113. package/lib/versionInfo.d.ts.map +1 -1
  114. package/lib/versionInfo.js +18 -16
  115. package/lib/versionInfo.js.map +1 -1
  116. package/lib/video/videoPane.js +2 -5
  117. package/lib/video/videoPane.js.map +1 -1
  118. package/package.json +24 -24
  119. package/src/versionInfo.ts +18 -16
@@ -1,20 +1,14 @@
1
1
  "use strict";
2
2
 
3
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
-
5
4
  var $rdf = _interopRequireWildcard(require("rdflib"));
6
-
7
5
  var _solidNamespace = _interopRequireDefault(require("solid-namespace"));
8
-
9
6
  var _trustedApplications = require("./trustedApplications.utils");
10
-
11
7
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
-
13
8
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
-
15
9
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
-
17
10
  /* eslint-env jest */
11
+
18
12
  var ns = (0, _solidNamespace["default"])($rdf);
19
13
  describe('generateRandomString', function () {
20
14
  it('generates a random string five characters long', function () {
@@ -48,7 +42,8 @@ describe('getStatementsToDelete', function () {
48
42
  mockStore.add(mockApplication, ns.acl('origin'), mockOrigin);
49
43
  mockStore.add(mockApplication, ns.acl('mode'), ns.acl('Read'));
50
44
  mockStore.add(mockProfile, ns.acl('trustedApp'), mockApplication);
51
- var statementsToDelete = (0, _trustedApplications.getStatementsToDelete)($rdf.lit('A different origin'), // @@ TODO Remove casting
45
+ var statementsToDelete = (0, _trustedApplications.getStatementsToDelete)($rdf.lit('A different origin'),
46
+ // @@ TODO Remove casting
52
47
  mockProfile, mockStore, ns);
53
48
  expect(statementsToDelete.length).toBe(0);
54
49
  expect(statementsToDelete).toEqual([]);
@@ -1 +1 @@
1
- {"version":3,"file":"trustedApplications.test.js","names":["ns","solidNamespace","$rdf","describe","it","expect","generateRandomString","length","toBe","mockStore","graph","mockOrigin","sym","mockProfile","getStatementsToDelete","toEqual","mockApplication","add","acl","statementsToDelete","toMatchSnapshot","lit","modes","value","statementsToAdd","getStatementsToAdd"],"sources":["../../src/trustedApplications/trustedApplications.test.ts"],"sourcesContent":["/* eslint-env jest */\nimport * as $rdf from 'rdflib'\nimport solidNamespace from 'solid-namespace'\nimport { generateRandomString, getStatementsToDelete, getStatementsToAdd } from './trustedApplications.utils'\n\nconst ns = solidNamespace($rdf)\n\ndescribe('generateRandomString', () => {\n it('generates a random string five characters long', () => {\n expect(generateRandomString().length).toBe(5)\n })\n})\n\ndescribe('getStatementsToDelete', () => {\n it('should return an empty array when there are no statements', () => {\n const mockStore = $rdf.graph()\n const mockOrigin = $rdf.sym('https://origin.example')\n const mockProfile = $rdf.sym('https://profile.example#me')\n expect(\n getStatementsToDelete(mockOrigin, mockProfile, mockStore, ns)\n ).toEqual([])\n })\n\n it('should return all statements for the given origin', () => {\n const mockStore = $rdf.graph()\n const mockApplication = $rdf.sym('https://app.example')\n const mockOrigin = $rdf.sym('https://origin.example')\n const mockProfile = $rdf.sym('https://profile.example#me')\n mockStore.add(mockApplication, ns.acl('origin'), mockOrigin)\n mockStore.add(mockApplication, ns.acl('mode'), ns.acl('Read'))\n mockStore.add(mockProfile, ns.acl('trustedApp'), mockApplication)\n const statementsToDelete = getStatementsToDelete(\n mockOrigin,\n mockProfile,\n mockStore,\n ns\n )\n expect(statementsToDelete.length).toBe(3)\n expect(statementsToDelete).toMatchSnapshot()\n })\n\n it('should not return statements for a different origin', () => {\n const mockStore = $rdf.graph()\n const mockApplication = $rdf.sym('https://app.example')\n const mockOrigin = $rdf.sym('https://origin.example')\n const mockProfile = $rdf.sym('https://profile.example#me')\n mockStore.add(mockApplication, ns.acl('origin'), mockOrigin)\n mockStore.add(mockApplication, ns.acl('mode'), ns.acl('Read'))\n mockStore.add(mockProfile, ns.acl('trustedApp'), mockApplication)\n\n const statementsToDelete = getStatementsToDelete(\n $rdf.lit('A different origin'), // @@ TODO Remove casting\n mockProfile,\n mockStore,\n ns\n )\n expect(statementsToDelete.length).toBe(0)\n expect(statementsToDelete).toEqual([])\n })\n})\n\ndescribe('getStatementsToAdd', () => {\n it('should return all required statements to add the given permissions for a given origin', () => {\n const mockOrigin = $rdf.sym('https://origin.example')\n const mockProfile = $rdf.sym('https://profile.example#me')\n const modes = [ns.acl('Read').value, ns.acl('Write').value]\n\n const statementsToAdd = getStatementsToAdd(\n mockOrigin,\n 'mock_app_id',\n modes,\n mockProfile,\n ns\n )\n expect(statementsToAdd.length).toBe(4)\n expect(statementsToAdd).toMatchSnapshot()\n })\n})\n"],"mappings":";;;;AACA;;AACA;;AACA;;;;;;;;AAHA;AAKA,IAAMA,EAAE,GAAG,IAAAC,0BAAA,EAAeC,IAAf,CAAX;AAEAC,QAAQ,CAAC,sBAAD,EAAyB,YAAM;EACrCC,EAAE,CAAC,gDAAD,EAAmD,YAAM;IACzDC,MAAM,CAAC,IAAAC,yCAAA,IAAuBC,MAAxB,CAAN,CAAsCC,IAAtC,CAA2C,CAA3C;EACD,CAFC,CAAF;AAGD,CAJO,CAAR;AAMAL,QAAQ,CAAC,uBAAD,EAA0B,YAAM;EACtCC,EAAE,CAAC,2DAAD,EAA8D,YAAM;IACpE,IAAMK,SAAS,GAAGP,IAAI,CAACQ,KAAL,EAAlB;IACA,IAAM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GAAG,IAAAC,uCAAA,EACtBd,UADsB,EAEtB,aAFsB,EAGtBW,KAHsB,EAItBT,WAJsB,EAKtBb,EALsB,CAAxB;IAOAK,MAAM,CAACmB,eAAe,CAACjB,MAAjB,CAAN,CAA+BC,IAA/B,CAAoC,CAApC;IACAH,MAAM,CAACmB,eAAD,CAAN,CAAwBJ,eAAxB;EACD,CAdC,CAAF;AAeD,CAhBO,CAAR"}
1
+ {"version":3,"file":"trustedApplications.test.js","names":["ns","solidNamespace","$rdf","describe","it","expect","generateRandomString","length","toBe","mockStore","graph","mockOrigin","sym","mockProfile","getStatementsToDelete","toEqual","mockApplication","add","acl","statementsToDelete","toMatchSnapshot","lit","modes","value","statementsToAdd","getStatementsToAdd"],"sources":["../../src/trustedApplications/trustedApplications.test.ts"],"sourcesContent":["/* eslint-env jest */\nimport * as $rdf from 'rdflib'\nimport solidNamespace from 'solid-namespace'\nimport { generateRandomString, getStatementsToDelete, getStatementsToAdd } from './trustedApplications.utils'\n\nconst ns = solidNamespace($rdf)\n\ndescribe('generateRandomString', () => {\n it('generates a random string five characters long', () => {\n expect(generateRandomString().length).toBe(5)\n })\n})\n\ndescribe('getStatementsToDelete', () => {\n it('should return an empty array when there are no statements', () => {\n const mockStore = $rdf.graph()\n const mockOrigin = $rdf.sym('https://origin.example')\n const mockProfile = $rdf.sym('https://profile.example#me')\n expect(\n getStatementsToDelete(mockOrigin, mockProfile, mockStore, ns)\n ).toEqual([])\n })\n\n it('should return all statements for the given origin', () => {\n const mockStore = $rdf.graph()\n const mockApplication = $rdf.sym('https://app.example')\n const mockOrigin = $rdf.sym('https://origin.example')\n const mockProfile = $rdf.sym('https://profile.example#me')\n mockStore.add(mockApplication, ns.acl('origin'), mockOrigin)\n mockStore.add(mockApplication, ns.acl('mode'), ns.acl('Read'))\n mockStore.add(mockProfile, ns.acl('trustedApp'), mockApplication)\n const statementsToDelete = getStatementsToDelete(\n mockOrigin,\n mockProfile,\n mockStore,\n ns\n )\n expect(statementsToDelete.length).toBe(3)\n expect(statementsToDelete).toMatchSnapshot()\n })\n\n it('should not return statements for a different origin', () => {\n const mockStore = $rdf.graph()\n const mockApplication = $rdf.sym('https://app.example')\n const mockOrigin = $rdf.sym('https://origin.example')\n const mockProfile = $rdf.sym('https://profile.example#me')\n mockStore.add(mockApplication, ns.acl('origin'), mockOrigin)\n mockStore.add(mockApplication, ns.acl('mode'), ns.acl('Read'))\n mockStore.add(mockProfile, ns.acl('trustedApp'), mockApplication)\n\n const statementsToDelete = getStatementsToDelete(\n $rdf.lit('A different origin'), // @@ TODO Remove casting\n mockProfile,\n mockStore,\n ns\n )\n expect(statementsToDelete.length).toBe(0)\n expect(statementsToDelete).toEqual([])\n })\n})\n\ndescribe('getStatementsToAdd', () => {\n it('should return all required statements to add the given permissions for a given origin', () => {\n const mockOrigin = $rdf.sym('https://origin.example')\n const mockProfile = $rdf.sym('https://profile.example#me')\n const modes = [ns.acl('Read').value, ns.acl('Write').value]\n\n const statementsToAdd = getStatementsToAdd(\n mockOrigin,\n 'mock_app_id',\n modes,\n mockProfile,\n ns\n )\n expect(statementsToAdd.length).toBe(4)\n expect(statementsToAdd).toMatchSnapshot()\n })\n})\n"],"mappings":";;;AACA;AACA;AACA;AAA6G;AAAA;AAAA;AAH7G;;AAKA,IAAMA,EAAE,GAAG,IAAAC,0BAAc,EAACC,IAAI,CAAC;AAE/BC,QAAQ,CAAC,sBAAsB,EAAE,YAAM;EACrCC,EAAE,CAAC,gDAAgD,EAAE,YAAM;IACzDC,MAAM,CAAC,IAAAC,yCAAoB,GAAE,CAACC,MAAM,CAAC,CAACC,IAAI,CAAC,CAAC,CAAC;EAC/C,CAAC,CAAC;AACJ,CAAC,CAAC;AAEFL,QAAQ,CAAC,uBAAuB,EAAE,YAAM;EACtCC,EAAE,CAAC,2DAA2D,EAAE,YAAM;IACpE,IAAMK,SAAS,GAAGP,IAAI,CAACQ,KAAK,EAAE;IAC9B,IAAMC,UAAU,GAAGT,IAAI,CAACU,GAAG,CA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AAkB,EACxCd,UAAU,EACV,aAAa,EACbW,KAAK,EACLT,WAAW,EACXb,EAAE,CACH;IACDK,MAAM,CAACmB,eAAe,CAACjB,MAAM,CAAC,CAACC,IAAI,CAAC,CAAC,CAAC;IACtCH,MAAM,CAACmB,eAAe,CAAC,CAACJ,eAAe,EAAE;EAC3C,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -6,21 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.generateRandomString = generateRandomString;
7
7
  exports.getStatementsToAdd = getStatementsToAdd;
8
8
  exports.getStatementsToDelete = getStatementsToDelete;
9
-
10
9
  var _rdflib = require("rdflib");
11
-
12
10
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
13
-
14
11
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
-
16
12
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
17
-
18
13
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
19
-
20
14
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
21
-
22
15
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
23
-
24
16
  function getStatementsToDelete(origin, person, kb, ns) {
25
17
  var applicationStatements = kb.statementsMatching(null, ns.acl('origin'), origin);
26
18
  var statementsToDelete = applicationStatements.reduce(function (memo, st) {
@@ -28,7 +20,6 @@ function getStatementsToDelete(origin, person, kb, ns) {
28
20
  }, []);
29
21
  return statementsToDelete;
30
22
  }
31
-
32
23
  function getStatementsToAdd(origin, nodeName, modes, person, ns) {
33
24
  var application = new _rdflib.BlankNode("bn_".concat(nodeName));
34
25
  return [(0, _rdflib.st)(person, ns.acl('trustedApp'), application, person.doc()), (0, _rdflib.st)(application, ns.acl('origin'), origin, person.doc())].concat(_toConsumableArray(modes.map(function (mode) {
@@ -37,7 +28,6 @@ function getStatementsToAdd(origin, nodeName, modes, person, ns) {
37
28
  return (0, _rdflib.st)(application, ns.acl('mode'), mode, person.doc());
38
29
  })));
39
30
  }
40
-
41
31
  function generateRandomString() {
42
32
  return Math.random().toString(36).substr(2, 5);
43
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"trustedApplications.utils.js","names":["getStatementsToDelete","origin","person","kb","ns","applicationStatements","statementsMatching","acl","statementsToDelete","reduce","memo","st","concat","subject","getStatementsToAdd","nodeName","modes","application","BlankNode","doc","map","mode","sym","generateRandomString","Math","random","toString","substr"],"sources":["../../src/trustedApplications/trustedApplications.utils.ts"],"sourcesContent":["import { BlankNode, IndexedFormula, NamedNode, st, Literal, sym, Statement } from 'rdflib'\nimport { Namespaces } from 'solid-namespace'\n\nexport function getStatementsToDelete (\n origin: NamedNode | Literal,\n person: NamedNode,\n kb: IndexedFormula,\n ns: Namespaces\n): any {\n const applicationStatements = kb.statementsMatching(\n null,\n ns.acl('origin'),\n origin\n )\n const statementsToDelete = applicationStatements.reduce(\n (memo, st) => {\n return memo\n .concat(\n kb.statementsMatching(\n person,\n ns.acl('trustedApp'),\n st.subject as NamedNode\n )\n )\n .concat(kb.statementsMatching(st.subject))\n },\n [] as Array<Statement>\n )\n return statementsToDelete\n}\n\nexport function getStatementsToAdd (\n origin: NamedNode,\n nodeName: string,\n modes: string[],\n person: NamedNode,\n ns: Namespaces\n): any {\n const application = new BlankNode(`bn_${nodeName}`)\n return [\n st(person, ns.acl('trustedApp'), application, person.doc()),\n st(application, ns.acl('origin'), origin, person.doc()),\n ...modes\n .map(mode => sym(mode))\n .map(mode => st(application, ns.acl('mode'), mode, person.doc()))\n ]\n}\n\nexport function generateRandomString () {\n return Math.random().toString(36).substr(2, 5)\n}\n"],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;AAGO,SAASA,qBAAT,CACLC,MADK,EAELC,MAFK,EAGLC,EAHK,EAILC,EAJK,EAKA;EACL,IAAMC,qBAAqB,GAAGF,EAAE,CAACG,kBAAH,CAC5B,IAD4B,EAE5BF,EAAE,CAACG,GAAH,CAAO,QAAP,CAF4B,EAG5BN,MAH4B,CAA9B;EAKA,IAAMO,kBAAkB,GAAGH,qBAAqB,CAACI,MAAtB,CACzB,UAACC,IAAD,EAAOC,EAAP,EAAc;IACZ,OAAOD,IAAI,CACRE,MADI,CAEHT,EAAE,CAACG,kBAAH,CACEJ,MADF,EAEEE,EAAE,CAACG,GAAH,CAAO,YAAP,CAFF,EAGEI,EAAE,CAACE,OAHL,CAFG,EAQJD,MARI,CAQGT,EAAE,CAACG,kBAAH,CAAsBK,EAAE,CAACE,OAAzB,CARH,CAAP;EASD,CAXwB,EAYzB,EAZyB,CAA3B;EAcA,OAAOL,kBAAP;AACD;;AAEM,SAASM,kBAAT,CACLb,MADK,EAELc,QAFK,EAGLC,KAHK,EAILd,MAJK,EAKLE,EALK,EAMA;EACL,IAAMa,WAAW,GAAG,IAAIC,iBAAJ,cAAoBH,QAApB,EAApB;EACA,QACE,IAAAJ,UAAA,EAAGT,MAAH,EAAWE,EAAE,CAACG,GAAH,CAAO,YAAP,CAAX,EAAiCU,WAAjC,EAA8Cf,MAAM,CAACiB,GAAP,EAA9C,CADF,EAEE,IAAAR,UAAA,EAAGM,WAAH,EAAgBb,EAAE,CAACG,GAAH,CAAO,QAAP,CAAhB,EAAkCN,MAAlC,EAA0CC,MAAM,CAACiB,GAAP,EAA1C,CAFF,4BAGKH,KAAK,CACLI,GADA,CACI,UAAAC,IAAI;IAAA,OAAI,IAAAC,WAAA,EAAID,IAAJ,CAAJ;EAAA,CADR,EAEAD,GAFA,CAEI,UAAAC,IAAI;IAAA,OAAI,IAAAV,UAAA,EAAGM,WAAH,EAAgBb,EAAE,CAACG,GAAH,CAAO,MAAP,CAAhB,EAAgCc,IAAhC,EAAsCnB,MAAM,CAACiB,GAAP,EAAtC,CAAJ;EAAA,CAFR,CAHL;AAOD;;AAEM,SAASI,oBAAT,GAAiC;EACtC,OAAOC,IAAI,CAACC,MAAL,GAAcC,QAAd,CAAuB,EAAvB,EAA2BC,MAA3B,CAAkC,CAAlC,EAAqC,CAArC,CAAP;AACD"}
1
+ {"version":3,"file":"trustedApplications.utils.js","names":["getStatementsToDelete","origin","person","kb","ns","applicationStatements","statementsMatching","acl","statementsToDelete","reduce","memo","st","concat","subject","getStatementsToAdd","nodeName","modes","application","BlankNode","doc","map","mode","sym","generateRandomString","Math","random","toString","substr"],"sources":["../../src/trustedApplications/trustedApplications.utils.ts"],"sourcesContent":["import { BlankNode, IndexedFormula, NamedNode, st, Literal, sym, Statement } from 'rdflib'\nimport { Namespaces } from 'solid-namespace'\n\nexport function getStatementsToDelete (\n origin: NamedNode | Literal,\n person: NamedNode,\n kb: IndexedFormula,\n ns: Namespaces\n): any {\n const applicationStatements = kb.statementsMatching(\n null,\n ns.acl('origin'),\n origin\n )\n const statementsToDelete = applicationStatements.reduce(\n (memo, st) => {\n return memo\n .concat(\n kb.statementsMatching(\n person,\n ns.acl('trustedApp'),\n st.subject as NamedNode\n )\n )\n .concat(kb.statementsMatching(st.subject))\n },\n [] as Array<Statement>\n )\n return statementsToDelete\n}\n\nexport function getStatementsToAdd (\n origin: NamedNode,\n nodeName: string,\n modes: string[],\n person: NamedNode,\n ns: Namespaces\n): any {\n const application = new BlankNode(`bn_${nodeName}`)\n return [\n st(person, ns.acl('trustedApp'), application, person.doc()),\n st(application, ns.acl('origin'), origin, person.doc()),\n ...modes\n .map(mode => sym(mode))\n .map(mode => st(application, ns.acl('mode'), mode, person.doc()))\n ]\n}\n\nexport function generateRandomString () {\n return Math.random().toString(36).substr(2, 5)\n}\n"],"mappings":";;;;;;;;AAAA;AAA0F;AAAA;AAAA;AAAA;AAAA;AAAA;AAGnF,SAASA,qBAAqB,CACnCC,MAA2B,EAC3BC,MAAiB,EACjBC,EAAkB,EAClBC,EAAc,EACT;EACL,IAAMC,qBAAqB,GAAGF,EAAE,CAACG,kBAAkB,CACjD,IAAI,EACJF,EAAE,CAACG,GAAG,CAAC,QAAQ,CAAC,EAChBN,MAAM,CACP;EACD,IAAMO,kBAAkB,GAAGH,qBAAqB,CAACI,MAAM,CACrD,UAACC,IAAI,EAAEC,EAAE,EAAK;IACZ,OAAOD,IAAI,CACRE,MAAM,CACLT,EAAE,CAACG,kBAAkB,CACnBJ,MAAM,EACNE,EAAE,CAACG,GAAG,CAAC,YAAY,CAAC,EACpBI,EAAE,CAACE,OAAO,CACX,CACF,CACAD,MAAM,CAACT,EAAE,CAACG,kBAAkB,CAACK,EAAE,CAACE,OAAO,CAAC,CAAC;EAC9C,CAAC,EACD,EAAE,CACH;EACD,OAAOL,kBAAkB;AAC3B;AAEO,SAASM,kBAAkB,CAChCb,MAAiB,EACjBc,QAAgB,EAChBC,KAAe,EACfd,MAAiB,EACjBE,EAAc,EACT;EACL,IAAMa,WAAW,GAAG,IAAIC,iBAAS,cAAOH,QAAQ,EAAG;EACnD,QACE,IAAAJ,UAAE,EAACT,MAAM,EAAEE,EAAE,CAACG,GAAG,CAAC,YAAY,CAAC,EAAEU,WAAW,EAAEf,MAAM,CAACiB,GAAG,EAAE,CAAC,EAC3D,IAAAR,UAAE,EAACM,WAAW,EAAEb,EAAE,CAACG,GAAG,CAAC,QAAQ,CAAC,EAAEN,MAAM,EAAEC,MAAM,CAACiB,GAAG,EAAE,CAAC,4BACpDH,KAAK,CACLI,GAAG,CAAC,UAAAC,IAAI;IAAA,OAAI,IAAAC,WAAG,EAACD,IAAI,CAAC;EAAA,EAAC,CACtBD,GAAG,CAAC,UAAAC,IAAI;IAAA,OAAI,IAAAV,UAAE,EAACM,WAAW,EAAEb,EAAE,CAACG,GAAG,CAAC,MAAM,CAAC,EAAEc,IAAI,EAAEnB,MAAM,CAACiB,GAAG,EAAE,CAAC;EAAA,EAAC;AAEvE;AAEO,SAASI,oBAAoB,GAAI;EACtC,OAAOC,IAAI,CAACC,MAAM,EAAE,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;AAChD"}
@@ -4,21 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _solidUi = require("solid-ui");
9
-
10
8
  var _solidLogic = require("solid-logic");
11
-
12
9
  var _trustedApplications = require("./trustedApplications.dom");
13
-
14
10
  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); }
15
-
16
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
17
-
11
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
18
12
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
19
-
20
13
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
21
-
22
14
  var thisColor = '#418d99';
23
15
  var trustedApplicationView = {
24
16
  global: true,
@@ -37,19 +29,15 @@ var trustedApplicationView = {
37
29
  var bottom = table.appendChild(dom.createElement('tr'));
38
30
  var statusArea = bottom.appendChild(dom.createElement('div'));
39
31
  statusArea.setAttribute('style', 'padding: 0.7em;');
40
-
41
32
  _render(dom, main, statusArea)["catch"](function (err) {
42
33
  return statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, err));
43
34
  });
44
-
45
35
  return div;
46
36
  }
47
37
  };
48
-
49
38
  function _render(_x, _x2, _x3) {
50
39
  return _render2.apply(this, arguments);
51
40
  }
52
-
53
41
  function _render2() {
54
42
  _render2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dom, main, statusArea) {
55
43
  var authContext, subject, profile, editable, applicationsTable;
@@ -64,31 +52,24 @@ function _render2() {
64
52
  statusArea: statusArea,
65
53
  me: null
66
54
  });
67
-
68
55
  case 2:
69
56
  authContext = _context.sent;
70
57
  subject = authContext.me;
71
58
  profile = subject.doc();
72
-
73
59
  if (_solidLogic.store.updater) {
74
60
  _context.next = 7;
75
61
  break;
76
62
  }
77
-
78
63
  throw new Error('Store has no updater');
79
-
80
64
  case 7:
81
65
  editable = _solidLogic.store.updater.editable(profile.uri, _solidLogic.store);
82
66
  main.appendChild((0, _trustedApplications.createText)('h3', 'Manage your trusted applications'));
83
-
84
67
  if (editable) {
85
68
  _context.next = 12;
86
69
  break;
87
70
  }
88
-
89
71
  main.appendChild(_solidUi.widgets.errorMessageBlock(dom, "Your profile ".concat(subject.doc().uri, " is not editable, so we cannot do much here.")));
90
72
  return _context.abrupt("return");
91
-
92
73
  case 12:
93
74
  main.appendChild((0, _trustedApplications.createText)('p', 'Here you can manage the applications you trust.'));
94
75
  applicationsTable = (0, _trustedApplications.createApplicationTable)(subject);
@@ -96,7 +77,6 @@ function _render2() {
96
77
  main.appendChild((0, _trustedApplications.createText)('h4', 'Notes'));
97
78
  main.appendChild((0, _trustedApplications.createContainer)('ol', [main.appendChild((0, _trustedApplications.createText)('li', 'Trusted applications will get access to all resources that you have access to.')), main.appendChild((0, _trustedApplications.createText)('li', 'You can limit which modes they have by default.')), main.appendChild((0, _trustedApplications.createText)('li', 'They will not gain more access than you have.'))]));
98
79
  main.appendChild((0, _trustedApplications.createText)('p', 'Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.'));
99
-
100
80
  case 18:
101
81
  case "end":
102
82
  return _context.stop();
@@ -106,7 +86,6 @@ function _render2() {
106
86
  }));
107
87
  return _render2.apply(this, arguments);
108
88
  }
109
-
110
89
  var _default = trustedApplicationView;
111
90
  exports["default"] = _default;
112
91
  //# sourceMappingURL=trustedApplications.view.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"trustedApplications.view.js","names":["thisColor","trustedApplicationView","global","icon","icons","iconBase","name","label","render","subject","context","dom","div","createElement","classList","add","setAttribute","table","appendChild","main","bottom","statusArea","err","widgets","errorMessageBlock","login","ensureLoadedProfile","me","authContext","profile","doc","store","updater","Error","editable","uri","createText","applicationsTable","createApplicationTable","createContainer"],"sources":["../../src/trustedApplications/trustedApplications.view.ts"],"sourcesContent":["import { PaneDefinition } from 'pane-registry'\nimport { NamedNode } from 'rdflib'\nimport { icons, login, widgets } from 'solid-ui'\nimport { store } from 'solid-logic'\nimport { createApplicationTable, createContainer, createText } from './trustedApplications.dom'\n\nconst thisColor = '#418d99'\n\nconst trustedApplicationView: PaneDefinition = {\n global: true,\n icon: `${icons.iconBase}noun_15177.svg`,\n name: 'trustedApplications',\n label: () => null,\n render: (subject, context) => {\n const dom = context.dom\n const div = dom.createElement('div')\n div.classList.add('trusted-applications-pane')\n div.setAttribute(\n 'style',\n 'border: 0.3em solid ' +\n thisColor +\n '; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;'\n )\n const table = div.appendChild(dom.createElement('table'))\n const main = table.appendChild(dom.createElement('tr'))\n const bottom = table.appendChild(dom.createElement('tr'))\n const statusArea = bottom.appendChild(dom.createElement('div'))\n statusArea.setAttribute('style', 'padding: 0.7em;')\n render(dom, main, statusArea).catch(err => statusArea.appendChild(widgets.errorMessageBlock(dom, err)))\n return div\n }\n}\n\nasync function render (dom, main, statusArea): Promise<void> {\n const authContext = await login.ensureLoadedProfile({ dom: dom, div: main, statusArea: statusArea, me: null })\n const subject = authContext.me as NamedNode\n\n const profile = subject.doc()\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n const editable = store.updater.editable(profile.uri, store)\n\n main.appendChild(createText('h3', 'Manage your trusted applications'))\n\n if (!editable) {\n main.appendChild(\n widgets.errorMessageBlock(dom, `Your profile ${subject.doc().uri} is not editable, so we cannot do much here.`)\n )\n return\n }\n\n main.appendChild(createText('p', 'Here you can manage the applications you trust.'))\n\n const applicationsTable = createApplicationTable(subject)\n main.appendChild(applicationsTable)\n\n main.appendChild(createText('h4', 'Notes'))\n main.appendChild(\n createContainer('ol', [\n main.appendChild(\n createText(\n 'li',\n 'Trusted applications will get access to all resources that you have access to.'\n )\n ),\n main.appendChild(\n createText('li', 'You can limit which modes they have by default.')\n ),\n main.appendChild(\n createText('li', 'They will not gain more access than you have.')\n )\n ])\n )\n main.appendChild(\n createText('p', 'Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.')\n )\n}\n\nexport default trustedApplicationView\n"],"mappings":";;;;;;;AAEA;;AACA;;AACA;;;;+CAHA,oJ;;;;;;AAKA,IAAMA,SAAS,GAAG,SAAlB;AAEA,IAAMC,sBAAsC,GAAG;EAC7CC,MAAM,EAAE,IADqC;EAE7CC,IAAI,YAAKC,cAAA,CAAMC,QAAX,mBAFyC;EAG7CC,IAAI,EAAE,qBAHuC;EAI7CC,KAAK,EAAE;IAAA,OAAM,IAAN;EAAA,CAJsC;EAK7CC,MAAM,EAAE,gBAACC,OAAD,EAAUC,OAAV,EAAsB;IAC5B,IAAMC,GAAG,GAAGD,OAAO,CAACC,GAApB;IACA,IAAMC,GAAG,GAAGD,GAAG,CAACE,aAAJ,CAAkB,KAAlB,CAAZ;IACAD,GAAG,CAACE,SAAJ,CAAcC,GAAd,CAAkB,2BAAlB;IACAH,GAAG,CAACI,YAAJ,CACE,OADF,EAEE,yBACAhB,SADA,GAEA,2DAJF;IAMA,IAAMiB,KAAK,GAAGL,GAAG,CAACM,WAAJ,CAAgBP,GAAG,CAACE,aAAJ,CAAkB,OAAlB,CAAhB,CAAd;IACA,IAAMM,IAAI,GAAGF,KAAK,CAACC,WAAN,CAAkBP,GAAG,CAACE,aAAJ,CAAkB,IAAlB,CAAlB,CAAb;IACA,IAAMO,MAAM,GAAGH,KAAK,CAACC,WAAN,CAAkBP,GAAG,CAACE,aAAJ,CAAkB,IAAlB,CAAlB,CAAf;IACA,IAAMQ,UAAU,GAAGD,MAAM,CAACF,WAAP,CAAmBP,GAAG,CAACE,aAAJ,CAAkB,KAAlB,CAAnB,CAAnB;IACAQ,UAAU,CAACL,YAAX,CAAwB,OAAxB,EAAiC,iBAAjC;;IACAR,OAAM,CAACG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,IAAI,CAACD,WAAL,CAAiBmB,iBAAjB;YAEAlB,IAAI,CAACD,WAAL,CAAiB,IAAAkB,+BAAA,EAAW,IAAX,EAAiB,OAAjB,CAAjB;YACAjB,IAAI,CAACD,WAAL,CACE,IAAAqB,oCAAA,EAAgB,IAAhB,EAAsB,CACpBpB,IAAI,CAACD,WAAL,CACE,IAAAkB,+BAAA,EACE,IADF,EAEE,gFAFF,CADF,CADoB,EAOpBjB,IAAI,CAACD,WAAL,CACE,IAAAkB,+BAAA,EAAW,IAAX,EAAiB,iDAAjB,CADF,CAPoB,EAUpBjB,IAAI,CAACD,WAAL,CACE,IAAAkB,+BAAA,EAAW,IAAX,EAAiB,+CAAjB,CADF,CAVoB,CAAtB,CADF;YAgBAjB,IAAI,CAACD,WAAL,CACE,IAAAkB,+BAAA,EAAW,GAAX,EAAgB,2HAAhB,CADF;;UAzCF;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,C;;;;eA8CenC,sB"}
1
+ {"version":3,"file":"trustedApplications.view.js","names":["thisColor","trustedApplicationView","global","icon","icons","iconBase","name","label","render","subject","context","dom","div","createElement","classList","add","setAttribute","table","appendChild","main","bottom","statusArea","err","widgets","errorMessageBlock","login","ensureLoadedProfile","me","authContext","profile","doc","store","updater","Error","editable","uri","createText","applicationsTable","createApplicationTable","createContainer"],"sources":["../../src/trustedApplications/trustedApplications.view.ts"],"sourcesContent":["import { PaneDefinition } from 'pane-registry'\nimport { NamedNode } from 'rdflib'\nimport { icons, login, widgets } from 'solid-ui'\nimport { store } from 'solid-logic'\nimport { createApplicationTable, createContainer, createText } from './trustedApplications.dom'\n\nconst thisColor = '#418d99'\n\nconst trustedApplicationView: PaneDefinition = {\n global: true,\n icon: `${icons.iconBase}noun_15177.svg`,\n name: 'trustedApplications',\n label: () => null,\n render: (subject, context) => {\n const dom = context.dom\n const div = dom.createElement('div')\n div.classList.add('trusted-applications-pane')\n div.setAttribute(\n 'style',\n 'border: 0.3em solid ' +\n thisColor +\n '; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;'\n )\n const table = div.appendChild(dom.createElement('table'))\n const main = table.appendChild(dom.createElement('tr'))\n const bottom = table.appendChild(dom.createElement('tr'))\n const statusArea = bottom.appendChild(dom.createElement('div'))\n statusArea.setAttribute('style', 'padding: 0.7em;')\n render(dom, main, statusArea).catch(err => statusArea.appendChild(widgets.errorMessageBlock(dom, err)))\n return div\n }\n}\n\nasync function render (dom, main, statusArea): Promise<void> {\n const authContext = await login.ensureLoadedProfile({ dom: dom, div: main, statusArea: statusArea, me: null })\n const subject = authContext.me as NamedNode\n\n const profile = subject.doc()\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n const editable = store.updater.editable(profile.uri, store)\n\n main.appendChild(createText('h3', 'Manage your trusted applications'))\n\n if (!editable) {\n main.appendChild(\n widgets.errorMessageBlock(dom, `Your profile ${subject.doc().uri} is not editable, so we cannot do much here.`)\n )\n return\n }\n\n main.appendChild(createText('p', 'Here you can manage the applications you trust.'))\n\n const applicationsTable = createApplicationTable(subject)\n main.appendChild(applicationsTable)\n\n main.appendChild(createText('h4', 'Notes'))\n main.appendChild(\n createContainer('ol', [\n main.appendChild(\n createText(\n 'li',\n 'Trusted applications will get access to all resources that you have access to.'\n )\n ),\n main.appendChild(\n createText('li', 'You can limit which modes they have by default.')\n ),\n main.appendChild(\n createText('li', 'They will not gain more access than you have.')\n )\n ])\n )\n main.appendChild(\n createText('p', 'Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.')\n )\n}\n\nexport default trustedApplicationView\n"],"mappings":";;;;;;AAEA;AACA;AACA;AAA+F;AAAA,+CAH/F;AAAA;AAAA;AAKA,IAAMA,SAAS,GAAG,SAAS;AAE3B,IAAMC,sBAAsC,GAAG;EAC7CC,MAAM,EAAE,IAAI;EACZC,IAAI,YAAKC,cAAK,CAACC,QAAQ,mBAAgB;EACvCC,IAAI,EAAE,qBAAqB;EAC3BC,KAAK,EAAE;IAAA,OAAM,IAAI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W,CACd,IAAAkB,+BAAU,EAAC,GAAG,EAAE,2HAA2H,CAAC,CAC7I;UAAA;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,CACF;EAAA;AAAA;AAAA,eAEcnC,sBAAsB;AAAA"}
package/lib/ui/pane.js CHANGED
@@ -3,10 +3,9 @@
3
3
  /* Form building/editing Pane
4
4
  **
5
5
  */
6
- var UI = require('solid-ui');
7
6
 
7
+ var UI = require('solid-ui');
8
8
  var $rdf = require('rdflib');
9
-
10
9
  var ns = UI.ns;
11
10
  module.exports = {
12
11
  // noun_170702.svg' builder noun_122196.svg form
@@ -18,110 +17,102 @@ module.exports = {
18
17
  var ns = UI.ns;
19
18
  var kb = context.session.store;
20
19
  var t = kb.findTypeURIs(subject);
21
- if (t[ns.rdfs('Class').uri]) return 'creation forms'; // if (t[ns.rdf('Property').uri]) return "user interface";
22
-
20
+ if (t[ns.rdfs('Class').uri]) return 'creation forms';
21
+ // if (t[ns.rdf('Property').uri]) return "user interface";
23
22
  if (t[ns.ui('Form').uri]) return 'edit form';
24
23
  return null; // No under other circumstances (while testing at least!)
25
24
  },
25
+
26
26
  render: function render(subject, context) {
27
27
  var dom = context.dom;
28
28
  var kb = context.session.store;
29
29
  var ns = UI.ns;
30
30
  var box = dom.createElement('div');
31
31
  box.setAttribute('class', 'formPane'); // Share styles
32
-
33
32
  var label = UI.utils.label(subject);
34
-
35
33
  var mention = function complain(message, style) {
36
34
  var pre = dom.createElement('p');
37
35
  pre.setAttribute('style', style || 'color: grey; background-color: white');
38
36
  box.appendChild(pre).textContent = message;
39
37
  return pre;
40
38
  };
41
-
42
39
  var complain = function complain(message, style) {
43
40
  mention(message, 'style', style || 'color: grey; background-color: #fdd');
44
41
  };
45
-
46
42
  var complainIfBad = function complainIfBad(ok, body) {
47
- if (ok) {// setModifiedDate(store, kb, store);
43
+ if (ok) {
44
+ // setModifiedDate(store, kb, store);
48
45
  // rerender(box); // Deleted forms at the moment
49
46
  } else complain('Sorry, failed to save your change:\n' + body);
50
- }; // //////////////////////////////////////////////////////////////////////////////
47
+ };
51
48
 
49
+ // //////////////////////////////////////////////////////////////////////////////
52
50
 
53
51
  var t = kb.findTypeURIs(subject);
54
52
  var store = null;
55
53
  var docuri;
56
-
57
54
  if (subject.uri) {
58
55
  docuri = $rdf.Util.uri.docpart(subject.uri);
59
-
60
56
  if (subject.uri !== docuri && kb.updater.editable(docuri)) {
61
57
  store = kb.sym($rdf.Util.uri.docpart(subject.uri));
62
58
  } // an editable ontology with hash
63
-
64
59
  }
65
60
 
66
61
  if (!store) store = kb.any(kb.sym(docuri), ns.link('annotationStore'));
67
62
  if (!store) store = UI.widgets.defaultAnnotationStore(subject);
68
-
69
63
  if (!store) {
70
64
  store = kb.sym('https://formsregistry.solid.community/public/formRegistry/'); // fallback
71
- } // if (!store) store = kb.sym('http://tabulator.org/wiki/ontologyAnnotation/common') // fallback
72
- // A fallback which gives a different store page for each ontology would be good @@
65
+ }
66
+ // if (!store) store = kb.sym('http://tabulator.org/wiki/ontologyAnnotation/common') // fallback
73
67
 
68
+ // A fallback which gives a different store page for each ontology would be good @@
74
69
 
75
70
  var pred;
76
-
77
- if (t[ns.rdfs('Class').uri]) {// Stuff we can do before we load the store
71
+ if (t[ns.rdfs('Class').uri]) {
72
+ // Stuff we can do before we load the store
78
73
  }
79
-
80
74
  var wait = mention('(Loading data from: ' + store + ')');
81
75
  kb.fetcher.nowOrWhenFetched(store.uri, subject, function (ok, body) {
82
76
  if (!ok) {
83
77
  complain('Cannot load store ' + store + ' :' + body);
84
78
  return;
85
79
  }
80
+ box.removeChild(wait);
86
81
 
87
- box.removeChild(wait); // Render a Class -- the forms associated with it
82
+ // Render a Class -- the forms associated with it
88
83
 
89
84
  if (t[ns.rdfs('Class').uri]) {
90
85
  // For each creation form, allow one to create a new object with it, and also to edit the form.
91
86
  var displayFormsForRelation = function displayFormsForRelation(pred, allowCreation) {
92
87
  var sts = kb.statementsMatching(subject, pred);
93
88
  var outliner = context.getOutliner(dom);
94
-
95
89
  if (sts.length) {
96
90
  for (var i = 0; i < sts.length; i++) {
97
91
  outliner.appendPropertyTRs(box, [sts[i]]);
98
92
  var form = sts[i].object;
99
93
  var cell = dom.createElement('td');
100
94
  box.lastChild.appendChild(cell);
101
-
102
95
  if (allowCreation) {
103
96
  cell.appendChild(UI.widgets.newButton(dom, kb, null, null, subject, form, store, function (ok, body) {
104
- if (ok) {// dom.outlineManager.GotoSubject(newThing@@, true, undefined, true, undefined);
97
+ if (ok) {
98
+ // dom.outlineManager.GotoSubject(newThing@@, true, undefined, true, undefined);
105
99
  // rerender(box); // Deleted forms at the moment
106
100
  } else {
107
101
  complain('Sorry, failed to save your change:\n' + body);
108
102
  }
109
103
  }));
110
104
  }
111
-
112
105
  var formdef = kb.statementsMatching(form, ns.rdf('type'));
113
106
  if (!formdef.length) formdef = kb.statementsMatching(form);
114
107
  if (!formdef.length) complain('No data about form');else {
115
108
  UI.widgets.editFormButton(dom, box, form, formdef[0].why, complainIfBad);
116
109
  }
117
110
  }
118
-
119
111
  box.appendChild(dom.createElement('hr'));
120
112
  } else {
121
113
  mention('There are currently no known forms to make a ' + label + '.');
122
114
  }
123
115
  };
124
-
125
116
  pred = ns.ui('creationForm');
126
117
  box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(pred);
127
118
  mention('Creation forms allow you to add information about a new thing,' + ' in this case a new ' + label + '.');
@@ -137,7 +128,9 @@ module.exports = {
137
128
  box.appendChild(dom.createElement('hr'));
138
129
  mention('You can make a new annotation form:');
139
130
  box.appendChild(UI.widgets.newButton(dom, kb, subject, pred, ns.ui('Form'), null, store, complainIfBad));
140
- mention('(Storing new forms in: ' + store + ')'); // Render a Form
131
+ mention('(Storing new forms in: ' + store + ')');
132
+
133
+ // Render a Form
141
134
  } else if (t[ns.ui('Form').uri]) {
142
135
  UI.widgets.appendForm(dom, box, kb, subject, ns.ui('FormForm'), store, complainIfBad);
143
136
  } else {
@@ -147,5 +140,6 @@ module.exports = {
147
140
 
148
141
  return box;
149
142
  }
150
- }; // ends
143
+ };
144
+ // ends
151
145
  //# sourceMappingURL=pane.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pane.js","names":["UI","require","$rdf","ns","module","exports","icon","icons","iconBase","name","audience","solid","label","subject","context","kb","session","store","t","findTypeURIs","rdfs","uri","ui","render","dom","box","createElement","setAttribute","utils","mention","complain","message","style","pre","appendChild","textContent","complainIfBad","ok","body","docuri","Util","docpart","updater","editable","sym","any","link","widgets","defaultAnnotationStore","pred","wait","fetcher","nowOrWhenFetched","removeChild","displayFormsForRelation","allowCreation","sts","statementsMatching","outliner","getOutliner","length","i","appendPropertyTRs","form","object","cell","lastChild","newButton","formdef","rdf","editFormButton","why","appendForm"],"sources":["../../src/ui/pane.js"],"sourcesContent":["/* Form building/editing Pane\n **\n */\n\nconst UI = require('solid-ui')\nconst $rdf = require('rdflib')\nconst ns = UI.ns\n\nmodule.exports = {\n // noun_170702.svg' builder noun_122196.svg form\n icon: UI.icons.iconBase + 'noun_170702.svg',\n\n name: 'ui',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve this pane?\n label: function (subject, context) {\n const ns = UI.ns\n const kb = context.session.store\n const t = kb.findTypeURIs(subject)\n if (t[ns.rdfs('Class').uri]) return 'creation forms'\n // if (t[ns.rdf('Property').uri]) return \"user interface\";\n if (t[ns.ui('Form').uri]) return 'edit form'\n\n return null // No under other circumstances (while testing at least!)\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const kb = context.session.store\n const ns = UI.ns\n\n const box = dom.createElement('div')\n box.setAttribute('class', 'formPane') // Share styles\n const label = UI.utils.label(subject)\n\n const mention = function complain (message, style) {\n const pre = dom.createElement('p')\n pre.setAttribute('style', style || 'color: grey; background-color: white')\n box.appendChild(pre).textContent = message\n return pre\n }\n\n const complain = function complain (message, style) {\n mention(message, 'style', style || 'color: grey; background-color: #fdd')\n }\n\n const complainIfBad = function (ok, body) {\n if (ok) {\n // setModifiedDate(store, kb, store);\n // rerender(box); // Deleted forms at the moment\n } else complain('Sorry, failed to save your change:\\n' + body)\n }\n\n // //////////////////////////////////////////////////////////////////////////////\n\n const t = kb.findTypeURIs(subject)\n\n let store = null\n let docuri\n if (subject.uri) {\n docuri = $rdf.Util.uri.docpart(subject.uri)\n if (subject.uri !== docuri && kb.updater.editable(docuri)) {\n store = kb.sym($rdf.Util.uri.docpart(subject.uri))\n } // an editable ontology with hash\n }\n if (!store) store = kb.any(kb.sym(docuri), ns.link('annotationStore'))\n if (!store) store = UI.widgets.defaultAnnotationStore(subject)\n\n if (!store) {\n store = kb.sym(\n 'https://formsregistry.solid.community/public/formRegistry/'\n ) // fallback\n }\n // if (!store) store = kb.sym('http://tabulator.org/wiki/ontologyAnnotation/common') // fallback\n\n // A fallback which gives a different store page for each ontology would be good @@\n\n let pred\n if (t[ns.rdfs('Class').uri]) {\n // Stuff we can do before we load the store\n }\n\n const wait = mention('(Loading data from: ' + store + ')')\n\n kb.fetcher.nowOrWhenFetched(store.uri, subject, function (ok, body) {\n if (!ok) {\n complain('Cannot load store ' + store + ' :' + body)\n return\n }\n box.removeChild(wait)\n\n // Render a Class -- the forms associated with it\n\n if (t[ns.rdfs('Class').uri]) {\n // For each creation form, allow one to create a new object with it, and also to edit the form.\n const displayFormsForRelation = function displayFormsForRelation (\n pred,\n allowCreation\n ) {\n const sts = kb.statementsMatching(subject, pred)\n const outliner = context.getOutliner(dom)\n if (sts.length) {\n for (let i = 0; i < sts.length; i++) {\n outliner.appendPropertyTRs(box, [sts[i]])\n const form = sts[i].object\n const cell = dom.createElement('td')\n box.lastChild.appendChild(cell)\n if (allowCreation) {\n cell.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n null,\n null,\n subject,\n form,\n store,\n function (ok, body) {\n if (ok) {\n // dom.outlineManager.GotoSubject(newThing@@, true, undefined, true, undefined);\n // rerender(box); // Deleted forms at the moment\n } else {\n complain('Sorry, failed to save your change:\\n' + body)\n }\n }\n )\n )\n }\n let formdef = kb.statementsMatching(form, ns.rdf('type'))\n if (!formdef.length) formdef = kb.statementsMatching(form)\n if (!formdef.length) complain('No data about form')\n else {\n UI.widgets.editFormButton(\n dom,\n box,\n form,\n formdef[0].why,\n complainIfBad\n )\n }\n }\n box.appendChild(dom.createElement('hr'))\n } else {\n mention(\n 'There are currently no known forms to make a ' + label + '.'\n )\n }\n }\n\n pred = ns.ui('creationForm')\n box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(\n pred\n )\n mention(\n 'Creation forms allow you to add information about a new thing,' +\n ' in this case a new ' +\n label +\n '.'\n )\n displayFormsForRelation(pred, true)\n box.appendChild(dom.createElement('hr'))\n mention('You can make a new creation form:')\n box.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n subject,\n pred,\n ns.ui('Form'),\n null,\n store,\n complainIfBad\n )\n )\n\n box.appendChild(dom.createElement('hr'))\n\n pred = ns.ui('annotationForm')\n box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(\n pred\n )\n mention(\n 'Annotaion forms allow you to add extra information about a ,' +\n label +\n ' we already know about.'\n )\n displayFormsForRelation(pred, false)\n box.appendChild(dom.createElement('hr'))\n mention('You can make a new annotation form:')\n box.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n subject,\n pred,\n ns.ui('Form'),\n null,\n store,\n complainIfBad\n )\n )\n\n mention('(Storing new forms in: ' + store + ')')\n\n // Render a Form\n } else if (t[ns.ui('Form').uri]) {\n UI.widgets.appendForm(\n dom,\n box,\n kb,\n subject,\n ns.ui('FormForm'),\n store,\n complainIfBad\n )\n } else {\n complain('ui/pane internal error -- Eh?')\n }\n }) // end: when store loded\n\n return box\n }\n}\n// ends\n"],"mappings":";;AAAA;AACA;AACA;AAEA,IAAMA,EAAE,GAAGC,OAAO,CAAC,UAAD,CAAlB;;AACA,IAAMC,IAAI,GAAGD,OAAO,CAAC,QAAD,CAApB;;AACA,IAAME,EAAE,GAAGH,EAAE,CAACG,EAAd;AAEAC,MAAM,CAACC,OAAP,GAAiB;EACf;EACAC,IA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,EAIEoC,IAJF,EAKE9C,EAAE,CAACmB,EAAH,CAAM,MAAN,CALF,EAME,IANF,EAOEL,KAPF,EAQEmB,aARF,CADF;QAaAP,OAAO,CAAC,4BAA4BZ,KAA5B,GAAoC,GAArC,CAAP,CA7G2B,CA+G3B;MACD,CAhHD,MAgHO,IAAIC,CAAC,CAACf,EAAE,CAACmB,EAAH,CAAM,MAAN,EAAcD,GAAf,CAAL,EAA0B;QAC/BrB,EAAE,CAAC+C,OAAH,CAAWyB,UAAX,CACEhD,GADF,EAEEC,GAFF,EAGEV,EAHF,EAIEF,OAJF,EAKEV,EAAE,CAACmB,EAAH,CAAM,UAAN,CALF,EAMEL,KANF,EAOEmB,aAPF;MASD,CAVM,MAUA;QACLN,QAAQ,CAAC,+BAAD,CAAR;MACD;IACF,CAtID,EA1DkC,CAgM/B;;IAEH,OAAOL,GAAP;EACD;AAvNc,CAAjB,C,CAyNA"}
1
+ {"version":3,"file":"pane.js","names":["UI","require","$rdf","ns","module","exports","icon","icons","iconBase","name","audience","solid","label","subject","context","kb","session","store","t","findTypeURIs","rdfs","uri","ui","render","dom","box","createElement","setAttribute","utils","mention","complain","message","style","pre","appendChild","textContent","complainIfBad","ok","body","docuri","Util","docpart","updater","editable","sym","any","link","widgets","defaultAnnotationStore","pred","wait","fetcher","nowOrWhenFetched","removeChild","displayFormsForRelation","allowCreation","sts","statementsMatching","outliner","getOutliner","length","i","appendPropertyTRs","form","object","cell","lastChild","newButton","formdef","rdf","editFormButton","why","appendForm"],"sources":["../../src/ui/pane.js"],"sourcesContent":["/* Form building/editing Pane\n **\n */\n\nconst UI = require('solid-ui')\nconst $rdf = require('rdflib')\nconst ns = UI.ns\n\nmodule.exports = {\n // noun_170702.svg' builder noun_122196.svg form\n icon: UI.icons.iconBase + 'noun_170702.svg',\n\n name: 'ui',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve this pane?\n label: function (subject, context) {\n const ns = UI.ns\n const kb = context.session.store\n const t = kb.findTypeURIs(subject)\n if (t[ns.rdfs('Class').uri]) return 'creation forms'\n // if (t[ns.rdf('Property').uri]) return \"user interface\";\n if (t[ns.ui('Form').uri]) return 'edit form'\n\n return null // No under other circumstances (while testing at least!)\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const kb = context.session.store\n const ns = UI.ns\n\n const box = dom.createElement('div')\n box.setAttribute('class', 'formPane') // Share styles\n const label = UI.utils.label(subject)\n\n const mention = function complain (message, style) {\n const pre = dom.createElement('p')\n pre.setAttribute('style', style || 'color: grey; background-color: white')\n box.appendChild(pre).textContent = message\n return pre\n }\n\n const complain = function complain (message, style) {\n mention(message, 'style', style || 'color: grey; background-color: #fdd')\n }\n\n const complainIfBad = function (ok, body) {\n if (ok) {\n // setModifiedDate(store, kb, store);\n // rerender(box); // Deleted forms at the moment\n } else complain('Sorry, failed to save your change:\\n' + body)\n }\n\n // //////////////////////////////////////////////////////////////////////////////\n\n const t = kb.findTypeURIs(subject)\n\n let store = null\n let docuri\n if (subject.uri) {\n docuri = $rdf.Util.uri.docpart(subject.uri)\n if (subject.uri !== docuri && kb.updater.editable(docuri)) {\n store = kb.sym($rdf.Util.uri.docpart(subject.uri))\n } // an editable ontology with hash\n }\n if (!store) store = kb.any(kb.sym(docuri), ns.link('annotationStore'))\n if (!store) store = UI.widgets.defaultAnnotationStore(subject)\n\n if (!store) {\n store = kb.sym(\n 'https://formsregistry.solid.community/public/formRegistry/'\n ) // fallback\n }\n // if (!store) store = kb.sym('http://tabulator.org/wiki/ontologyAnnotation/common') // fallback\n\n // A fallback which gives a different store page for each ontology would be good @@\n\n let pred\n if (t[ns.rdfs('Class').uri]) {\n // Stuff we can do before we load the store\n }\n\n const wait = mention('(Loading data from: ' + store + ')')\n\n kb.fetcher.nowOrWhenFetched(store.uri, subject, function (ok, body) {\n if (!ok) {\n complain('Cannot load store ' + store + ' :' + body)\n return\n }\n box.removeChild(wait)\n\n // Render a Class -- the forms associated with it\n\n if (t[ns.rdfs('Class').uri]) {\n // For each creation form, allow one to create a new object with it, and also to edit the form.\n const displayFormsForRelation = function displayFormsForRelation (\n pred,\n allowCreation\n ) {\n const sts = kb.statementsMatching(subject, pred)\n const outliner = context.getOutliner(dom)\n if (sts.length) {\n for (let i = 0; i < sts.length; i++) {\n outliner.appendPropertyTRs(box, [sts[i]])\n const form = sts[i].object\n const cell = dom.createElement('td')\n box.lastChild.appendChild(cell)\n if (allowCreation) {\n cell.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n null,\n null,\n subject,\n form,\n store,\n function (ok, body) {\n if (ok) {\n // dom.outlineManager.GotoSubject(newThing@@, true, undefined, true, undefined);\n // rerender(box); // Deleted forms at the moment\n } else {\n complain('Sorry, failed to save your change:\\n' + body)\n }\n }\n )\n )\n }\n let formdef = kb.statementsMatching(form, ns.rdf('type'))\n if (!formdef.length) formdef = kb.statementsMatching(form)\n if (!formdef.length) complain('No data about form')\n else {\n UI.widgets.editFormButton(\n dom,\n box,\n form,\n formdef[0].why,\n complainIfBad\n )\n }\n }\n box.appendChild(dom.createElement('hr'))\n } else {\n mention(\n 'There are currently no known forms to make a ' + label + '.'\n )\n }\n }\n\n pred = ns.ui('creationForm')\n box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(\n pred\n )\n mention(\n 'Creation forms allow you to add information about a new thing,' +\n ' in this case a new ' +\n label +\n '.'\n )\n displayFormsForRelation(pred, true)\n box.appendChild(dom.createElement('hr'))\n mention('You can make a new creation form:')\n box.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n subject,\n pred,\n ns.ui('Form'),\n null,\n store,\n complainIfBad\n )\n )\n\n box.appendChild(dom.createElement('hr'))\n\n pred = ns.ui('annotationForm')\n box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(\n pred\n )\n mention(\n 'Annotaion forms allow you to add extra information about a ,' +\n label +\n ' we already know about.'\n )\n displayFormsForRelation(pred, false)\n box.appendChild(dom.createElement('hr'))\n mention('You can make a new annotation form:')\n box.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n subject,\n pred,\n ns.ui('Form'),\n null,\n store,\n complainIfBad\n )\n )\n\n mention('(Storing new forms in: ' + store + ')')\n\n // Render a Form\n } else if (t[ns.ui('Form').uri]) {\n UI.widgets.appendForm(\n dom,\n box,\n kb,\n subject,\n ns.ui('FormForm'),\n store,\n complainIfBad\n )\n } else {\n complain('ui/pane internal error -- Eh?')\n }\n }) // end: when store loded\n\n return box\n }\n}\n// ends\n"],"mappings":";;AAAA;AACA;AACA;;AAEA,IAAMA,EAAE,GAAGC,OAAO,CAAC,UAAU,CAAC;AAC9B,IAAMC,IAAI,GAAGD,OAAO,CAAC,QAAQ,CAAC;AAC9B,IAAME,EAAE,GAAGH,EAAE,CAACG,EAAE;AAEhBC,MAAM,CAACC,OAAO,GAAG;EACf;EACAC,IAAI,EAAEN,EAAE,CAACO,KAAK,CAACC,QAAQ,GAAG,iBAAiB;EAE3CC,IAAI,EAAE,IAAI;EAEVC,QAAQ,EAAE,CAACP,EAAE,CAACQ,KAAK,CAAC,WAAW,CAAC,CAAC;EAEjC;EACAC,KAAK,EAAE,eAAUC,OAAO,EAAEC,OAAO,EAAE;IACjC,IAAMX,EAAE,GAAGH,EAAE,CAACG,EAAE;IAChB,IAAMY,EAAE,GAAGD,OAAO,CAACE,OAAO,CAACC,KAAK;IAChC,IAAMC,CAAC,GAAGH,EAAE,CAACI,YAAY,CAACN,OAAO,CAAC;IAClC,IAAIK,CAAC,CAACf,EAAE,CAACiB,IAAI,CAAC,OAAO,CAAC,CAACC,GAAG,CAAC,EAAE,OAAO,gBAAgB;IACpD;IACA,IAAIH,CAAC,CAACf,EAAE,CAACmB,EAAE,CAAC,MAAM,CAAC,CAACD,GAAG,CAAC,EAAE,OAAO,WAAW;IAE5C,OAAO,IAAI,EAAC;EACd,CAAC;;EAEDE,MAAM,EAAE,gBAAUV,OAAO,EAAEC,OAAO,EAAE;IAClC,IAAMU,GAAG,GAAGV,OAAO,CAACU,GAAG;IACvB,IAAMT,EAAE,GAAGD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E,CAAC4B,KAAK,CAAChB,KAAK,CACnEqC,IAAI,CACL;QACDpB,OAAO,CACL,8DAA8D,GAC5DjB,KAAK,GACL,yBAAyB,CAC5B;QACD0C,uBAAuB,CAACL,IAAI,EAAE,KAAK,CAAC;QACpCxB,GAAG,CAACS,WAAW,CAACV,GAAG,CAACE,aAAa,CAAC,IAAI,CAAC,CAAC;QACxCG,OAAO,CAAC,qCAAqC,CAAC;QAC9CJ,GAAG,CAACS,WAAW,CACblC,EAAE,CAAC+C,OAAO,CAACoB,SAAS,CAClB3C,GAAG,EACHT,EAAE,EACFF,OAAO,EACPoC,IAAI,EACJ9C,EAAE,CAACmB,EAAE,CAAC,MAAM,CAAC,EACb,IAAI,EACJL,KAAK,EACLmB,aAAa,CACd,CACF;QAEDP,OAAO,CAAC,yBAAyB,GAAGZ,KAAK,GAAG,GAAG,CAAC;;QAEhD;MACF,CAAC,MAAM,IAAIC,CAAC,CAACf,EAAE,CAACmB,EAAE,CAAC,MAAM,CAAC,CAACD,GAAG,CAAC,EAAE;QAC/BrB,EAAE,CAAC+C,OAAO,CAACyB,UAAU,CACnBhD,GAAG,EACHC,GAAG,EACHV,EAAE,EACFF,OAAO,EACPV,EAAE,CAACmB,EAAE,CAAC,UAAU,CAAC,EACjBL,KAAK,EACLmB,aAAa,CACd;MACH,CAAC,MAAM;QACLN,QAAQ,CAAC,+BAA+B,CAAC;MAC3C;IACF,CAAC,CAAC,EAAC;;IAEH,OAAOL,GAAG;EACZ;AACF,CAAC;AACD"}
@@ -19,6 +19,8 @@ declare const _default: {
19
19
  icu: string;
20
20
  tz: string;
21
21
  unicode: string;
22
+ ngtcp2: string;
23
+ nghttp3: string;
22
24
  };
23
25
  };
24
26
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"versionInfo.d.ts","sourceRoot":"","sources":["../src/versionInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAuBE"}
1
+ {"version":3,"file":"versionInfo.d.ts","sourceRoot":"","sources":["../src/versionInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAyBE"}