solid-ui 2.4.12 → 2.4.14-46ae8b5d

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 (260) hide show
  1. package/LICENSE.md +0 -0
  2. package/README.md +0 -0
  3. package/lib/acl/access-controller.d.ts +0 -0
  4. package/lib/acl/access-controller.d.ts.map +0 -0
  5. package/lib/acl/access-controller.js +0 -0
  6. package/lib/acl/access-controller.js.map +0 -0
  7. package/lib/acl/access-groups.d.ts +0 -0
  8. package/lib/acl/access-groups.d.ts.map +0 -0
  9. package/lib/acl/access-groups.js +0 -0
  10. package/lib/acl/access-groups.js.map +0 -0
  11. package/lib/acl/acl-control.d.ts +0 -0
  12. package/lib/acl/acl-control.d.ts.map +0 -0
  13. package/lib/acl/acl-control.js +0 -0
  14. package/lib/acl/acl-control.js.map +0 -0
  15. package/lib/acl/acl.d.ts +0 -0
  16. package/lib/acl/acl.d.ts.map +0 -0
  17. package/lib/acl/acl.js +0 -0
  18. package/lib/acl/acl.js.map +0 -0
  19. package/lib/acl/add-agent-buttons.d.ts +0 -0
  20. package/lib/acl/add-agent-buttons.d.ts.map +0 -0
  21. package/lib/acl/add-agent-buttons.js +0 -0
  22. package/lib/acl/add-agent-buttons.js.map +0 -0
  23. package/lib/acl/index.d.ts +0 -0
  24. package/lib/acl/index.d.ts.map +0 -0
  25. package/lib/acl/index.js +0 -0
  26. package/lib/acl/index.js.map +0 -0
  27. package/lib/acl/styles.d.ts +0 -0
  28. package/lib/acl/styles.d.ts.map +0 -0
  29. package/lib/acl/styles.js +0 -0
  30. package/lib/acl/styles.js.map +0 -0
  31. package/lib/acl/types.d.ts +0 -0
  32. package/lib/acl/types.d.ts.map +0 -0
  33. package/lib/acl/types.js +0 -0
  34. package/lib/acl/types.js.map +0 -0
  35. package/lib/authn/authSession.d.ts +0 -0
  36. package/lib/authn/authSession.d.ts.map +0 -0
  37. package/lib/authn/authSession.js +0 -0
  38. package/lib/authn/authSession.js.map +0 -0
  39. package/lib/authn/authn.d.ts +0 -0
  40. package/lib/authn/authn.d.ts.map +0 -0
  41. package/lib/authn/authn.js +0 -0
  42. package/lib/authn/authn.js.map +0 -0
  43. package/lib/authn/config-default.js +0 -0
  44. package/lib/authn/config-default.js.map +0 -0
  45. package/lib/authn/index.d.ts +0 -0
  46. package/lib/authn/index.d.ts.map +0 -0
  47. package/lib/authn/index.js +0 -0
  48. package/lib/authn/index.js.map +0 -0
  49. package/lib/authn/signup.js +0 -0
  50. package/lib/authn/signup.js.map +0 -0
  51. package/lib/authn/types.d.ts +0 -0
  52. package/lib/authn/types.d.ts.map +0 -0
  53. package/lib/authn/types.js +0 -0
  54. package/lib/authn/types.js.map +0 -0
  55. package/lib/chat/bookmarks.js +0 -0
  56. package/lib/chat/bookmarks.js.map +0 -0
  57. package/lib/chat/dateFolder.js +0 -0
  58. package/lib/chat/dateFolder.js.map +0 -0
  59. package/lib/chat/infinite.js +0 -0
  60. package/lib/chat/infinite.js.map +0 -0
  61. package/lib/chat/message.js +0 -0
  62. package/lib/chat/message.js.map +0 -0
  63. package/lib/chat/messageTools.js +0 -0
  64. package/lib/chat/messageTools.js.map +0 -0
  65. package/lib/chat/thread.js +0 -0
  66. package/lib/chat/thread.js.map +0 -0
  67. package/lib/create/create.d.ts +0 -0
  68. package/lib/create/create.d.ts.map +0 -0
  69. package/lib/create/create.js +0 -0
  70. package/lib/create/create.js.map +0 -0
  71. package/lib/create/index.d.ts +0 -0
  72. package/lib/create/index.d.ts.map +0 -0
  73. package/lib/create/index.js +0 -0
  74. package/lib/create/index.js.map +0 -0
  75. package/lib/create/types.d.ts +0 -0
  76. package/lib/create/types.d.ts.map +0 -0
  77. package/lib/create/types.js +0 -0
  78. package/lib/create/types.js.map +0 -0
  79. package/lib/debug.d.ts +0 -0
  80. package/lib/debug.d.ts.map +0 -0
  81. package/lib/debug.js +0 -0
  82. package/lib/debug.js.map +0 -0
  83. package/lib/folders.js +0 -0
  84. package/lib/folders.js.map +0 -0
  85. package/lib/footer/index.d.ts +20 -0
  86. package/lib/footer/index.d.ts.map +1 -0
  87. package/lib/footer/index.js +147 -0
  88. package/lib/footer/index.js.map +1 -0
  89. package/lib/footer/styleMap.d.ts +8 -0
  90. package/lib/footer/styleMap.d.ts.map +1 -0
  91. package/lib/footer/styleMap.js +15 -0
  92. package/lib/footer/styleMap.js.map +1 -0
  93. package/lib/header/empty-profile.d.ts +0 -0
  94. package/lib/header/empty-profile.d.ts.map +0 -0
  95. package/lib/header/empty-profile.js +0 -0
  96. package/lib/header/empty-profile.js.map +0 -0
  97. package/lib/header/index.d.ts +11 -8
  98. package/lib/header/index.d.ts.map +1 -1
  99. package/lib/header/index.js +78 -66
  100. package/lib/header/index.js.map +1 -1
  101. package/lib/header/styleMap.d.ts +0 -2
  102. package/lib/header/styleMap.d.ts.map +1 -1
  103. package/lib/header/styleMap.js +1 -5
  104. package/lib/header/styleMap.js.map +1 -1
  105. package/lib/iconBase.d.ts +0 -0
  106. package/lib/iconBase.d.ts.map +0 -0
  107. package/lib/iconBase.js +0 -0
  108. package/lib/iconBase.js.map +0 -0
  109. package/lib/icons/solid_logo.d.ts +0 -0
  110. package/lib/icons/solid_logo.d.ts.map +0 -0
  111. package/lib/icons/solid_logo.js +0 -0
  112. package/lib/icons/solid_logo.js.map +0 -0
  113. package/lib/index.d.ts +2 -1
  114. package/lib/index.d.ts.map +1 -1
  115. package/lib/index.js +10 -1
  116. package/lib/index.js.map +1 -1
  117. package/lib/jss/index.d.ts +0 -0
  118. package/lib/jss/index.d.ts.map +0 -0
  119. package/lib/jss/index.js +0 -0
  120. package/lib/jss/index.js.map +0 -0
  121. package/lib/log.d.ts +0 -0
  122. package/lib/log.d.ts.map +0 -0
  123. package/lib/log.js +0 -0
  124. package/lib/log.js.map +0 -0
  125. package/lib/logic.d.ts +0 -0
  126. package/lib/logic.d.ts.map +0 -0
  127. package/lib/logic.js +0 -0
  128. package/lib/logic.js.map +0 -0
  129. package/lib/matrix/index.d.ts +0 -0
  130. package/lib/matrix/index.d.ts.map +0 -0
  131. package/lib/matrix/index.js +0 -0
  132. package/lib/matrix/index.js.map +0 -0
  133. package/lib/matrix/matrix.d.ts +0 -0
  134. package/lib/matrix/matrix.d.ts.map +0 -0
  135. package/lib/matrix/matrix.js +0 -0
  136. package/lib/matrix/matrix.js.map +0 -0
  137. package/lib/matrix/types.d.ts +0 -0
  138. package/lib/matrix/types.d.ts.map +0 -0
  139. package/lib/matrix/types.js +0 -0
  140. package/lib/matrix/types.js.map +0 -0
  141. package/lib/media/index.d.ts +0 -0
  142. package/lib/media/index.d.ts.map +0 -0
  143. package/lib/media/index.js +0 -0
  144. package/lib/media/index.js.map +0 -0
  145. package/lib/media/media-capture.d.ts +0 -0
  146. package/lib/media/media-capture.d.ts.map +0 -0
  147. package/lib/media/media-capture.js +0 -0
  148. package/lib/media/media-capture.js.map +0 -0
  149. package/lib/messageArea.js +0 -0
  150. package/lib/messageArea.js.map +0 -0
  151. package/lib/noun_Camera_1618446_000000.js +0 -0
  152. package/lib/noun_Camera_1618446_000000.js.map +0 -0
  153. package/lib/ns.js +0 -0
  154. package/lib/ns.js.map +0 -0
  155. package/lib/pad.d.ts +0 -0
  156. package/lib/pad.d.ts.map +0 -0
  157. package/lib/pad.js +4 -2
  158. package/lib/pad.js.map +1 -1
  159. package/lib/participation.d.ts +0 -0
  160. package/lib/participation.d.ts.map +0 -0
  161. package/lib/participation.js +3 -1
  162. package/lib/participation.js.map +1 -1
  163. package/lib/preferences.js +0 -0
  164. package/lib/preferences.js.map +0 -0
  165. package/lib/stories/decorators.js +0 -0
  166. package/lib/stories/decorators.js.map +0 -0
  167. package/lib/style.js +3 -3
  168. package/lib/style.js.map +1 -1
  169. package/lib/table.js +0 -0
  170. package/lib/table.js.map +0 -0
  171. package/lib/tabs.d.ts +0 -0
  172. package/lib/tabs.d.ts.map +0 -0
  173. package/lib/tabs.js +5 -3
  174. package/lib/tabs.js.map +1 -1
  175. package/lib/typings.d.js +0 -0
  176. package/lib/typings.d.js.map +0 -0
  177. package/lib/{header/headerHelpers.d.ts → utils/headerFooterHelpers.d.ts} +11 -3
  178. package/lib/utils/headerFooterHelpers.d.ts.map +1 -0
  179. package/lib/utils/headerFooterHelpers.js +189 -0
  180. package/lib/utils/headerFooterHelpers.js.map +1 -0
  181. package/lib/utils/index.js +0 -0
  182. package/lib/utils/index.js.map +0 -0
  183. package/lib/utils/label.d.ts +0 -0
  184. package/lib/utils/label.d.ts.map +0 -0
  185. package/lib/utils/label.js +0 -0
  186. package/lib/utils/label.js.map +0 -0
  187. package/lib/versionInfo.d.ts +0 -0
  188. package/lib/versionInfo.d.ts.map +0 -0
  189. package/lib/versionInfo.js +10 -10
  190. package/lib/versionInfo.js.map +1 -1
  191. package/lib/webpack-bundle.js +47514 -58256
  192. package/lib/webpack-bundle.js.map +1 -1
  193. package/lib/widgets/buttons/iconLinks.d.ts +0 -0
  194. package/lib/widgets/buttons/iconLinks.d.ts.map +0 -0
  195. package/lib/widgets/buttons/iconLinks.js +0 -0
  196. package/lib/widgets/buttons/iconLinks.js.map +0 -0
  197. package/lib/widgets/buttons.d.ts +0 -0
  198. package/lib/widgets/buttons.d.ts.map +0 -0
  199. package/lib/widgets/buttons.js +0 -0
  200. package/lib/widgets/buttons.js.map +0 -0
  201. package/lib/widgets/dragAndDrop.js +0 -0
  202. package/lib/widgets/dragAndDrop.js.map +0 -0
  203. package/lib/widgets/error.d.ts +0 -0
  204. package/lib/widgets/error.d.ts.map +0 -0
  205. package/lib/widgets/error.js +0 -0
  206. package/lib/widgets/error.js.map +0 -0
  207. package/lib/widgets/forms/autocomplete/autocompleteBar.d.ts +0 -0
  208. package/lib/widgets/forms/autocomplete/autocompleteBar.d.ts.map +0 -0
  209. package/lib/widgets/forms/autocomplete/autocompleteBar.js +0 -0
  210. package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +0 -0
  211. package/lib/widgets/forms/autocomplete/autocompleteField.d.ts +0 -0
  212. package/lib/widgets/forms/autocomplete/autocompleteField.d.ts.map +0 -0
  213. package/lib/widgets/forms/autocomplete/autocompleteField.js +0 -0
  214. package/lib/widgets/forms/autocomplete/autocompleteField.js.map +0 -0
  215. package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts +0 -0
  216. package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts.map +0 -0
  217. package/lib/widgets/forms/autocomplete/autocompletePicker.js +0 -0
  218. package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +0 -0
  219. package/lib/widgets/forms/autocomplete/language.d.ts +0 -0
  220. package/lib/widgets/forms/autocomplete/language.d.ts.map +0 -0
  221. package/lib/widgets/forms/autocomplete/language.js +0 -0
  222. package/lib/widgets/forms/autocomplete/language.js.map +0 -0
  223. package/lib/widgets/forms/autocomplete/publicData.d.ts +0 -0
  224. package/lib/widgets/forms/autocomplete/publicData.d.ts.map +0 -0
  225. package/lib/widgets/forms/autocomplete/publicData.js +0 -0
  226. package/lib/widgets/forms/autocomplete/publicData.js.map +0 -0
  227. package/lib/widgets/forms/basic.d.ts +0 -0
  228. package/lib/widgets/forms/basic.d.ts.map +1 -1
  229. package/lib/widgets/forms/basic.js +9 -20
  230. package/lib/widgets/forms/basic.js.map +1 -1
  231. package/lib/widgets/forms/comment.d.ts +0 -0
  232. package/lib/widgets/forms/comment.d.ts.map +0 -0
  233. package/lib/widgets/forms/comment.js +0 -0
  234. package/lib/widgets/forms/comment.js.map +0 -0
  235. package/lib/widgets/forms/fieldFunction.d.ts +0 -0
  236. package/lib/widgets/forms/fieldFunction.d.ts.map +0 -0
  237. package/lib/widgets/forms/fieldFunction.js +0 -0
  238. package/lib/widgets/forms/fieldFunction.js.map +0 -0
  239. package/lib/widgets/forms/fieldParams.d.ts +0 -0
  240. package/lib/widgets/forms/fieldParams.d.ts.map +1 -1
  241. package/lib/widgets/forms/fieldParams.js +5 -3
  242. package/lib/widgets/forms/fieldParams.js.map +1 -1
  243. package/lib/widgets/forms/formStyle.d.ts +0 -0
  244. package/lib/widgets/forms/formStyle.d.ts.map +0 -0
  245. package/lib/widgets/forms/formStyle.js +0 -0
  246. package/lib/widgets/forms/formStyle.js.map +0 -0
  247. package/lib/widgets/forms.js +6 -12
  248. package/lib/widgets/forms.js.map +1 -1
  249. package/lib/widgets/index.js +0 -0
  250. package/lib/widgets/index.js.map +0 -0
  251. package/lib/widgets/peoplePicker.js +0 -0
  252. package/lib/widgets/peoplePicker.js.map +0 -0
  253. package/lib/widgets/widgetHelpers.d.ts +0 -0
  254. package/lib/widgets/widgetHelpers.d.ts.map +0 -0
  255. package/lib/widgets/widgetHelpers.js +0 -0
  256. package/lib/widgets/widgetHelpers.js.map +0 -0
  257. package/package.json +36 -36
  258. package/lib/header/headerHelpers.d.ts.map +0 -1
  259. package/lib/header/headerHelpers.js +0 -96
  260. package/lib/header/headerHelpers.js.map +0 -1
package/LICENSE.md CHANGED
File without changes
package/README.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/acl/acl.d.ts CHANGED
File without changes
File without changes
package/lib/acl/acl.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/acl/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/lib/acl/styles.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/lib/acl/types.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/debug.d.ts CHANGED
File without changes
File without changes
package/lib/debug.js CHANGED
File without changes
package/lib/debug.js.map CHANGED
File without changes
package/lib/folders.js CHANGED
File without changes
File without changes
@@ -0,0 +1,20 @@
1
+ import { IndexedFormula, NamedNode } from 'rdflib';
2
+ export declare type FooterOptions = {
3
+ solidProjectUrl?: string;
4
+ solidProjectName?: string;
5
+ };
6
+ /**
7
+ * Initialize footer component, the footer object returned depends on whether the user is authenticated.
8
+ * @param store the data store
9
+ * @returns the footer
10
+ */
11
+ export declare function initFooter(store: IndexedFormula, options?: FooterOptions): Promise<void>;
12
+ /**
13
+ * @ignore exporting this only for the unit test
14
+ */
15
+ export declare function rebuildFooter(footer: HTMLElement, store: IndexedFormula, pod: NamedNode | null, podOwner: NamedNode | null, options?: FooterOptions): () => Promise<void>;
16
+ /**
17
+ * @ignore exporting this only for the unit test
18
+ */
19
+ export declare function createControllerInfoBlock(store: IndexedFormula, user: NamedNode | null, pod: NamedNode | null, podOwner: NamedNode | null, options?: FooterOptions): HTMLElement;
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/footer/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAUlD,oBAAY,aAAa,GAAG;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAEH;;;;GAIG;AACH,wBAAsB,UAAU,CAAE,KAAK,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,aAAa,iBAU/E;AACD;;GAEG;AACH,wBAAgB,aAAa,CAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,EAAE,QAAQ,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,aAAa,uBAMpJ;AACD;;GAEG;AACH,wBAAgB,yBAAyB,CAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,EAAE,QAAQ,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,WAAW,CAyCjL"}
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.createControllerInfoBlock = createControllerInfoBlock;
9
+ exports.initFooter = initFooter;
10
+ exports.rebuildFooter = rebuildFooter;
11
+
12
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
13
+
14
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
15
+
16
+ var _authn = require("../authn/authn");
17
+
18
+ var _headerFooterHelpers = require("../utils/headerFooterHelpers");
19
+
20
+ /*
21
+ This file was copied from mashlib/src/global/footer.ts file. It is modified to
22
+ work in solid-ui by adjusting where imported functions are found.
23
+ */
24
+ var DEFAULT_SOLID_PROJECT_URL = 'https://solidproject.org';
25
+ var DEFAULT_SOLID_PROJECT_NAME = 'solidproject.org';
26
+ /*
27
+ FooterOptions allow for customizing the link and name of the link part of the footer.
28
+ */
29
+
30
+ /**
31
+ * Initialize footer component, the footer object returned depends on whether the user is authenticated.
32
+ * @param store the data store
33
+ * @returns the footer
34
+ */
35
+ function initFooter(_x, _x2) {
36
+ return _initFooter.apply(this, arguments);
37
+ }
38
+ /**
39
+ * @ignore exporting this only for the unit test
40
+ */
41
+
42
+
43
+ function _initFooter() {
44
+ _initFooter = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(store, options) {
45
+ var footer, pod, podOwner;
46
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
47
+ while (1) {
48
+ switch (_context2.prev = _context2.next) {
49
+ case 0:
50
+ footer = document.getElementById('PageFooter');
51
+
52
+ if (footer) {
53
+ _context2.next = 3;
54
+ break;
55
+ }
56
+
57
+ return _context2.abrupt("return");
58
+
59
+ case 3:
60
+ pod = (0, _headerFooterHelpers.getPod)();
61
+ _context2.next = 6;
62
+ return (0, _headerFooterHelpers.getPodOwner)(pod, store);
63
+
64
+ case 6:
65
+ podOwner = _context2.sent;
66
+ rebuildFooter(footer, store, pod, podOwner, options)();
67
+
68
+ _authn.authSession.onLogin(rebuildFooter(footer, store, pod, podOwner, options));
69
+
70
+ _authn.authSession.onLogout(rebuildFooter(footer, store, pod, podOwner, options));
71
+
72
+ case 10:
73
+ case "end":
74
+ return _context2.stop();
75
+ }
76
+ }
77
+ }, _callee2);
78
+ }));
79
+ return _initFooter.apply(this, arguments);
80
+ }
81
+
82
+ function rebuildFooter(footer, store, pod, podOwner, options) {
83
+ return /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
84
+ var user;
85
+ return _regenerator["default"].wrap(function _callee$(_context) {
86
+ while (1) {
87
+ switch (_context.prev = _context.next) {
88
+ case 0:
89
+ user = (0, _authn.currentUser)();
90
+ footer.innerHTML = '';
91
+ _context.t0 = footer;
92
+ _context.next = 5;
93
+ return createControllerInfoBlock(store, user, pod, podOwner, options);
94
+
95
+ case 5:
96
+ _context.t1 = _context.sent;
97
+
98
+ _context.t0.appendChild.call(_context.t0, _context.t1);
99
+
100
+ case 7:
101
+ case "end":
102
+ return _context.stop();
103
+ }
104
+ }
105
+ }, _callee);
106
+ }));
107
+ }
108
+ /**
109
+ * @ignore exporting this only for the unit test
110
+ */
111
+
112
+
113
+ function createControllerInfoBlock(store, user, pod, podOwner, options) {
114
+ var profileLinkContainer = document.createElement('div');
115
+
116
+ if (!pod || !podOwner || user && user.equals(podOwner)) {
117
+ return profileLinkContainer;
118
+ }
119
+
120
+ (0, _headerFooterHelpers.addStyleClassToElement)(profileLinkContainer, ['footer-pod-info', 'footer'], 'footer');
121
+ var podLinkPre = document.createElement('span');
122
+ podLinkPre.innerText = "You're visiting ";
123
+ var podLink = document.createElement('a');
124
+ podLink.href = pod.uri;
125
+ podLink.innerText = 'the Pod';
126
+ var profileLinkPre = document.createElement('span');
127
+ profileLinkPre.innerText = ' controlled by ';
128
+ var profileLink = document.createElement('a');
129
+ profileLink.href = podOwner.uri;
130
+ profileLink.innerText = (0, _headerFooterHelpers.getName)(store, podOwner);
131
+ var solidProjectLinkPre = document.createElement('span');
132
+ solidProjectLinkPre.innerText = '. For more info, check out ';
133
+ var solidProjectLink = document.createElement('a');
134
+ solidProjectLink.href = options && options.solidProjectUrl ? options.solidProjectUrl : DEFAULT_SOLID_PROJECT_URL;
135
+ solidProjectLink.innerText = options && options.solidProjectName ? options.solidProjectName : DEFAULT_SOLID_PROJECT_NAME;
136
+ var solidProjectLinkPost = document.createElement('span');
137
+ solidProjectLinkPost.innerText = '.';
138
+ profileLinkContainer.appendChild(podLinkPre);
139
+ profileLinkContainer.appendChild(podLink);
140
+ profileLinkContainer.appendChild(profileLinkPre);
141
+ profileLinkContainer.appendChild(profileLink);
142
+ profileLinkContainer.appendChild(solidProjectLinkPre);
143
+ profileLinkContainer.appendChild(solidProjectLink);
144
+ profileLinkContainer.appendChild(solidProjectLinkPost);
145
+ return profileLinkContainer;
146
+ }
147
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/footer/index.ts"],"names":["DEFAULT_SOLID_PROJECT_URL","DEFAULT_SOLID_PROJECT_NAME","initFooter","store","options","footer","document","getElementById","pod","podOwner","rebuildFooter","authSession","onLogin","onLogout","user","innerHTML","createControllerInfoBlock","appendChild","profileLinkContainer","createElement","equals","podLinkPre","innerText","podLink","href","uri","profileLinkPre","profileLink","solidProjectLinkPre","solidProjectLink","solidProjectUrl","solidProjectName","solidProjectLinkPost"],"mappings":";;;;;;;;;;;;;;;AAKA;;AACA;;AANA;AACA;AACA;AACA;AAKA,IAAMA,yBAAyB,GAAG,0BAAlC;AACA,IAAMC,0BAA0B,GAAG,kBAAnC;AAEA;AACA;AACA;;AAMA;AACA;AACA;A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AC0B,eAA7C,GAA+D9B,yBAAvF;AACA6B,EAAAA,gBAAgB,CAACP,SAAjB,GAA6BlB,OAAO,IAAIA,OAAO,CAAC2B,gBAAnB,GAAsC3B,OAAO,CAAC2B,gBAA9C,GAAiE9B,0BAA9F;AAEA,MAAM+B,oBAAoB,GAAG1B,QAAQ,CAACa,aAAT,CAAuB,MAAvB,CAA7B;AACAa,EAAAA,oBAAoB,CAACV,SAArB,GAAiC,GAAjC;AAEAJ,EAAAA,oBAAoB,CAACD,WAArB,CAAiCI,UAAjC;AACAH,EAAAA,oBAAoB,CAACD,WAArB,CAAiCM,OAAjC;AACAL,EAAAA,oBAAoB,CAACD,WAArB,CAAiCS,cAAjC;AACAR,EAAAA,oBAAoB,CAACD,WAArB,CAAiCU,WAAjC;AACAT,EAAAA,oBAAoB,CAACD,WAArB,CAAiCW,mBAAjC;AACAV,EAAAA,oBAAoB,CAACD,WAArB,CAAiCY,gBAAjC;AACAX,EAAAA,oBAAoB,CAACD,WAArB,CAAiCe,oBAAjC;AAEA,SAAOd,oBAAP;AACD","sourcesContent":["/*\n This file was copied from mashlib/src/global/footer.ts file. It is modified to\n work in solid-ui by adjusting where imported functions are found.\n */\nimport { IndexedFormula, NamedNode } from 'rdflib'\nimport { authSession, currentUser } from '../authn/authn'\nimport { addStyleClassToElement, getName, getPod, getPodOwner } from '../utils/headerFooterHelpers'\n\nconst DEFAULT_SOLID_PROJECT_URL = 'https://solidproject.org'\nconst DEFAULT_SOLID_PROJECT_NAME = 'solidproject.org'\n\n/*\n FooterOptions allow for customizing the link and name of the link part of the footer.\n */\nexport type FooterOptions = {\n solidProjectUrl?: string,\n solidProjectName?: string\n }\n\n/**\n * Initialize footer component, the footer object returned depends on whether the user is authenticated.\n * @param store the data store\n * @returns the footer\n */\nexport async function initFooter (store: IndexedFormula, options?: FooterOptions) {\n const footer = document.getElementById('PageFooter')\n if (!footer) {\n return\n }\n const pod = getPod()\n const podOwner = await getPodOwner(pod, store)\n rebuildFooter(footer, store, pod, podOwner, options)()\n authSession.onLogin(rebuildFooter(footer, store, pod, podOwner, options))\n authSession.onLogout(rebuildFooter(footer, store, pod, podOwner, options))\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function rebuildFooter (footer: HTMLElement, store: IndexedFormula, pod: NamedNode | null, podOwner: NamedNode | null, options?: FooterOptions) {\n return async () => {\n const user = currentUser()\n footer.innerHTML = ''\n footer.appendChild(await createControllerInfoBlock(store, user, pod, podOwner, options))\n }\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createControllerInfoBlock (store: IndexedFormula, user: NamedNode | null, pod: NamedNode | null, podOwner: NamedNode | null, options?: FooterOptions): HTMLElement {\n const profileLinkContainer = document.createElement('div')\n if (!pod || !podOwner || (user && user.equals(podOwner))) {\n return profileLinkContainer\n }\n\n addStyleClassToElement(profileLinkContainer, ['footer-pod-info', 'footer'], 'footer')\n\n const podLinkPre = document.createElement('span')\n podLinkPre.innerText = \"You're visiting \"\n\n const podLink = document.createElement('a')\n podLink.href = pod.uri\n podLink.innerText = 'the Pod'\n\n const profileLinkPre = document.createElement('span')\n profileLinkPre.innerText = ' controlled by '\n\n const profileLink = document.createElement('a')\n profileLink.href = podOwner.uri\n profileLink.innerText = getName(store, podOwner)\n\n const solidProjectLinkPre = document.createElement('span')\n solidProjectLinkPre.innerText = '. For more info, check out '\n\n const solidProjectLink = document.createElement('a')\n solidProjectLink.href = options && options.solidProjectUrl ? options.solidProjectUrl : DEFAULT_SOLID_PROJECT_URL\n solidProjectLink.innerText = options && options.solidProjectName ? options.solidProjectName : DEFAULT_SOLID_PROJECT_NAME\n\n const solidProjectLinkPost = document.createElement('span')\n solidProjectLinkPost.innerText = '.'\n\n profileLinkContainer.appendChild(podLinkPre)\n profileLinkContainer.appendChild(podLink)\n profileLinkContainer.appendChild(profileLinkPre)\n profileLinkContainer.appendChild(profileLink)\n profileLinkContainer.appendChild(solidProjectLinkPre)\n profileLinkContainer.appendChild(solidProjectLink)\n profileLinkContainer.appendChild(solidProjectLinkPost)\n\n return profileLinkContainer\n}\n"],"file":"index.js"}
@@ -0,0 +1,8 @@
1
+ export declare const styleMap: {
2
+ footer: {
3
+ borderTop: string;
4
+ fontSize: string;
5
+ padding: string;
6
+ };
7
+ };
8
+ //# sourceMappingURL=styleMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleMap.d.ts","sourceRoot":"","sources":["../../src/footer/styleMap.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;CAMpB,CAAA"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.styleMap = void 0;
7
+ var styleMap = {
8
+ footer: {
9
+ borderTop: 'solid 1px $divider-color',
10
+ fontSize: '0.9em',
11
+ padding: '0.5em 1.5em'
12
+ }
13
+ };
14
+ exports.styleMap = styleMap;
15
+ //# sourceMappingURL=styleMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/footer/styleMap.ts"],"names":["styleMap","footer","borderTop","fontSize","padding"],"mappings":";;;;;;AAAO,IAAMA,QAAQ,GAAG;AACtBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,SAAS,EAAE,0BADL;AAENC,IAAAA,QAAQ,EAAE,OAFJ;AAGNC,IAAAA,OAAO,EAAE;AAHH;AADc,CAAjB","sourcesContent":["export const styleMap = {\n footer: {\n borderTop: 'solid 1px $divider-color',\n fontSize: '0.9em',\n padding: '0.5em 1.5em'\n }\n}\n"],"file":"styleMap.js"}
File without changes
File without changes
File without changes
File without changes
@@ -2,35 +2,38 @@ import { IndexedFormula, NamedNode } from 'rdflib';
2
2
  export declare type MenuItemLink = {
3
3
  label: string;
4
4
  url: string;
5
+ target?: string;
5
6
  };
6
7
  export declare type MenuItemButton = {
7
8
  label: string;
8
- onclick: () => {};
9
+ onclick: () => void;
9
10
  };
10
11
  export declare type MenuItems = MenuItemLink | MenuItemButton;
11
12
  export declare type HeaderOptions = {
12
13
  logo?: string;
13
- menuList?: MenuItems[];
14
+ helpIcon?: string;
15
+ helpMenuList?: MenuItems[];
14
16
  };
15
17
  /**
16
18
  * Initialize header component, the header object returned depends on whether the user is authenticated.
17
19
  * @param store the data store
18
- * @param options allow the header to be customized with a personalized logo and a menu list of links or buttons.
20
+ * @param userMenuList a list of menu items when the user is logged in
21
+ * @param options allow the header to be customized with a personalized logo, help icon and a help menu list of links or buttons.
19
22
  * @returns a header for an authenticated user with menu items given or a login screen
20
23
  */
21
- export declare function initHeader(store: IndexedFormula, options?: HeaderOptions): Promise<void>;
24
+ export declare function initHeader(store: IndexedFormula, userMenuList: MenuItems[], options?: HeaderOptions): Promise<void>;
22
25
  /**
23
26
  * @ignore exporting this only for the unit test
24
27
  */
25
- export declare function rebuildHeader(header: HTMLElement, store: IndexedFormula, pod: NamedNode, options?: HeaderOptions): () => Promise<void>;
28
+ export declare function rebuildHeader(header: HTMLElement, store: IndexedFormula, pod: NamedNode, userMenuList: MenuItems[], options?: HeaderOptions): () => Promise<void>;
26
29
  /**
27
30
  * @ignore exporting this only for the unit test
28
31
  */
29
- export declare function createBanner(store: IndexedFormula, pod: NamedNode, user: NamedNode | null, options?: HeaderOptions): Promise<HTMLElement>;
32
+ export declare function createBanner(store: IndexedFormula, pod: NamedNode, user: NamedNode | null, userMenuList: MenuItems[], options?: HeaderOptions): Promise<HTMLElement>;
30
33
  /**
31
34
  * @ignore exporting this only for the unit test
32
35
  */
33
- export declare function createHelpMenu(): HTMLDivElement;
36
+ export declare function createHelpMenu(options: HeaderOptions, helpMenuItems: MenuItems[]): HTMLDivElement | undefined;
34
37
  /**
35
38
  * @ignore exporting this only for the unit test
36
39
  */
@@ -46,7 +49,7 @@ export declare function createUserMenuLink(label: string, href: string, target?:
46
49
  /**
47
50
  * @ignore exporting this only for the unit test
48
51
  */
49
- export declare function createUserMenu(store: IndexedFormula, user: NamedNode, options?: HeaderOptions): Promise<HTMLElement>;
52
+ export declare function createUserMenu(store: IndexedFormula, user: NamedNode, userMenuList: MenuItems[]): Promise<HTMLElement>;
50
53
  /**
51
54
  * @ignore exporting this only for the unit test
52
55
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/header/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAOlD,oBAAY,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,oBAAY,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,oBAAY,SAAS,GAAG,YAAY,GAAG,cAAc,CAAA;AAMrD,oBAAY,aAAa,GAAG;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAA;CACvB,CAAA;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAE,KAAK,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,aAAa,iBAU/E;AACD;;GAEG;AACH,wBAAgB,aAAa,CAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,uBAMjH;AACD;;GAEG;AACH,wBAAsB,YAAY,CAAE,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,WAAW,CAAC,CA6BhJ;AACD;;GAEG;AACH,wBAAgB,cAAc,mBAyC7B;AACD;;GAEG;AACH,wBAAgB,wBAAwB,mBAKvC;AACD;;GAEG;AACH,wBAAgB,oBAAoB,CAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,kCAAkC,GAAG,WAAW,CAM7G;AACD;;GAEG;A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