solid-ui 2.4.15 → 2.4.16-6c2c9ed7

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 +6 -11
  2. package/lib/acl/acl.d.ts.map +1 -1
  3. package/lib/acl/acl.js +2 -4
  4. package/lib/acl/acl.js.map +1 -1
  5. package/lib/acl/add-agent-buttons.d.ts.map +1 -1
  6. package/lib/acl/add-agent-buttons.js +5 -5
  7. package/lib/acl/add-agent-buttons.js.map +1 -1
  8. package/lib/chat/bookmarks.js +23 -24
  9. package/lib/chat/bookmarks.js.map +1 -1
  10. package/lib/chat/chatLogic.js +338 -0
  11. package/lib/chat/chatLogic.js.map +1 -0
  12. package/lib/chat/dateFolder.js +13 -13
  13. package/lib/chat/dateFolder.js.map +1 -1
  14. package/lib/chat/infinite.js +287 -669
  15. package/lib/chat/infinite.js.map +1 -1
  16. package/lib/chat/message.js +444 -74
  17. package/lib/chat/message.js.map +1 -1
  18. package/lib/chat/messageTools.js +163 -106
  19. package/lib/chat/messageTools.js.map +1 -1
  20. package/lib/chat/thread.js +171 -41
  21. package/lib/chat/thread.js.map +1 -1
  22. package/lib/create/create.d.ts.map +1 -1
  23. package/lib/create/create.js +9 -9
  24. package/lib/create/create.js.map +1 -1
  25. package/lib/folders.js +2 -6
  26. package/lib/folders.js.map +1 -1
  27. package/lib/footer/index.js +4 -4
  28. package/lib/footer/index.js.map +1 -1
  29. package/lib/header/index.d.ts.map +1 -1
  30. package/lib/header/index.js +11 -8
  31. package/lib/header/index.js.map +1 -1
  32. package/lib/index.d.ts +3 -8
  33. package/lib/index.d.ts.map +1 -1
  34. package/lib/index.js +27 -42
  35. package/lib/index.js.map +1 -1
  36. package/lib/login/login.d.ts +130 -0
  37. package/lib/login/login.d.ts.map +1 -0
  38. package/lib/login/login.js +1415 -0
  39. package/lib/login/login.js.map +1 -0
  40. package/lib/matrix/matrix.js +2 -2
  41. package/lib/matrix/matrix.js.map +1 -1
  42. package/lib/messageArea.js +9 -10
  43. package/lib/messageArea.js.map +1 -1
  44. package/lib/pad.js +2 -2
  45. package/lib/pad.js.map +1 -1
  46. package/lib/participation.js +4 -5
  47. package/lib/participation.js.map +1 -1
  48. package/lib/preferences.js +8 -8
  49. package/lib/preferences.js.map +1 -1
  50. package/lib/{authn → signup}/config-default.js +0 -0
  51. package/lib/signup/config-default.js.map +1 -0
  52. package/lib/{authn → signup}/signup.js +0 -0
  53. package/lib/signup/signup.js.map +1 -0
  54. package/lib/table.js +2 -3
  55. package/lib/table.js.map +1 -1
  56. package/lib/tabs.js +3 -3
  57. package/lib/tabs.js.map +1 -1
  58. package/lib/utils/index.js +6 -6
  59. package/lib/utils/index.js.map +1 -1
  60. package/lib/utils/label.js +4 -4
  61. package/lib/utils/label.js.map +1 -1
  62. package/lib/versionInfo.js +3 -3
  63. package/lib/versionInfo.js.map +1 -1
  64. package/lib/webpack-bundle.js +6426 -22389
  65. package/lib/webpack-bundle.js.map +1 -1
  66. package/lib/widgets/buttons.d.ts.map +1 -1
  67. package/lib/widgets/buttons.js +24 -17
  68. package/lib/widgets/buttons.js.map +1 -1
  69. package/lib/widgets/forms/autocomplete/autocompleteBar.js +2 -2
  70. package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
  71. package/lib/widgets/forms/autocomplete/autocompleteField.js +2 -2
  72. package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
  73. package/lib/widgets/forms/autocomplete/autocompletePicker.js +2 -2
  74. package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
  75. package/lib/widgets/forms/autocomplete/language.d.ts.map +1 -1
  76. package/lib/widgets/forms/autocomplete/language.js +7 -10
  77. package/lib/widgets/forms/autocomplete/language.js.map +1 -1
  78. package/lib/widgets/forms/autocomplete/publicData.d.ts +2 -1
  79. package/lib/widgets/forms/autocomplete/publicData.d.ts.map +1 -1
  80. package/lib/widgets/forms/autocomplete/publicData.js +16 -16
  81. package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
  82. package/lib/widgets/forms/basic.d.ts +1 -1
  83. package/lib/widgets/forms/basic.d.ts.map +1 -1
  84. package/lib/widgets/forms/basic.js +2 -2
  85. package/lib/widgets/forms/basic.js.map +1 -1
  86. package/lib/widgets/forms/comment.d.ts +1 -1
  87. package/lib/widgets/forms/comment.js +3 -3
  88. package/lib/widgets/forms/comment.js.map +1 -1
  89. package/lib/widgets/forms/fieldFunction.js +2 -2
  90. package/lib/widgets/forms/fieldFunction.js.map +1 -1
  91. package/lib/widgets/forms/formStyle.js +3 -3
  92. package/lib/widgets/forms/formStyle.js.map +1 -1
  93. package/lib/widgets/forms.js +11 -11
  94. package/lib/widgets/forms.js.map +1 -1
  95. package/lib/widgets/peoplePicker.js +2 -2
  96. package/lib/widgets/peoplePicker.js.map +1 -1
  97. package/package.json +3 -3
  98. package/lib/authn/authSession.d.ts +0 -4
  99. package/lib/authn/authSession.d.ts.map +0 -1
  100. package/lib/authn/authSession.js +0 -25
  101. package/lib/authn/authSession.js.map +0 -1
  102. package/lib/authn/authn.d.ts +0 -193
  103. package/lib/authn/authn.d.ts.map +0 -1
  104. package/lib/authn/authn.js +0 -2238
  105. package/lib/authn/authn.js.map +0 -1
  106. package/lib/authn/config-default.js.map +0 -1
  107. package/lib/authn/index.d.ts +0 -35
  108. package/lib/authn/index.d.ts.map +0 -1
  109. package/lib/authn/index.js +0 -44
  110. package/lib/authn/index.js.map +0 -1
  111. package/lib/authn/signup.js.map +0 -1
  112. package/lib/authn/types.d.ts +0 -25
  113. package/lib/authn/types.d.ts.map +0 -1
  114. package/lib/authn/types.js +0 -6
  115. package/lib/authn/types.js.map +0 -1
  116. package/lib/logic.d.ts +0 -8
  117. package/lib/logic.d.ts.map +0 -1
  118. package/lib/logic.js +0 -79
  119. package/lib/logic.js.map +0 -1
package/lib/index.js CHANGED
@@ -30,11 +30,6 @@ https://github.com/solid/solid
30
30
  * @module solidUi.js
31
31
  * @main solidUi.js
32
32
  */
33
-
34
- /**
35
- * @class SolidUi
36
- * @static
37
- */
38
33
  // REMOVE @ts-ignore as you migrate files to TypeScript
39
34
 
40
35
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -56,19 +51,13 @@ Object.defineProperty(exports, "aclControl", {
56
51
  return _index.aclControl;
57
52
  }
58
53
  });
59
- Object.defineProperty(exports, "authn", {
60
- enumerable: true,
61
- get: function get() {
62
- return _index2.authn;
63
- }
64
- });
65
54
  Object.defineProperty(exports, "create", {
66
55
  enumerable: true,
67
56
  get: function get() {
68
- return _index3.create;
57
+ return _index2.create;
69
58
  }
70
59
  });
71
- exports.dom = void 0;
60
+ exports.dom = exports.createTypes = void 0;
72
61
  Object.defineProperty(exports, "icons", {
73
62
  enumerable: true,
74
63
  get: function get() {
@@ -93,17 +82,17 @@ Object.defineProperty(exports, "initHeader", {
93
82
  return _header.initHeader;
94
83
  }
95
84
  });
96
- exports.log = exports.language = void 0;
85
+ exports.login = exports.log = exports.language = void 0;
97
86
  Object.defineProperty(exports, "matrix", {
98
87
  enumerable: true,
99
88
  get: function get() {
100
- return _index4.matrix;
89
+ return _index3.matrix;
101
90
  }
102
91
  });
103
92
  Object.defineProperty(exports, "media", {
104
93
  enumerable: true,
105
94
  get: function get() {
106
- return _index5.media;
95
+ return _index4.media;
107
96
  }
108
97
  });
109
98
  Object.defineProperty(exports, "messageArea", {
@@ -112,14 +101,7 @@ Object.defineProperty(exports, "messageArea", {
112
101
  return _messageArea.messageArea;
113
102
  }
114
103
  });
115
- exports.rdf = exports.preferences = exports.participation = exports.pad = exports.ns = void 0;
116
- Object.defineProperty(exports, "solidLogicSingleton", {
117
- enumerable: true,
118
- get: function get() {
119
- return _logic.solidLogicSingleton;
120
- }
121
- });
122
- exports.style = exports.store = void 0;
104
+ exports.style = exports.rdf = exports.preferences = exports.participation = exports.pad = exports.ns = void 0;
123
105
  Object.defineProperty(exports, "table", {
124
106
  enumerable: true,
125
107
  get: function get() {
@@ -145,9 +127,7 @@ exports.ns = ns;
145
127
 
146
128
  var _index = require("./acl/index");
147
129
 
148
- var _index2 = require("./authn/index");
149
-
150
- var _index3 = require("./create/index");
130
+ var _index2 = require("./create/index");
151
131
 
152
132
  var _iconBase = require("./iconBase");
153
133
 
@@ -159,9 +139,9 @@ var log = _interopRequireWildcard(require("./log"));
159
139
 
160
140
  exports.log = log;
161
141
 
162
- var _index4 = require("./matrix/index");
142
+ var _index3 = require("./matrix/index");
163
143
 
164
- var _index5 = require("./media/index");
144
+ var _index4 = require("./media/index");
165
145
 
166
146
  var _messageArea = require("./messageArea");
167
147
 
@@ -179,8 +159,6 @@ var preferences = _interopRequireWildcard(require("./preferences"));
179
159
 
180
160
  exports.preferences = preferences;
181
161
 
182
- var _logic = require("./logic");
183
-
184
162
  var style = _interopRequireWildcard(require("./style"));
185
163
 
186
164
  exports.style = style;
@@ -195,6 +173,10 @@ var utils = _interopRequireWildcard(require("./utils"));
195
173
 
196
174
  exports.utils = utils;
197
175
 
176
+ var login = _interopRequireWildcard(require("./login/login"));
177
+
178
+ exports.login = login;
179
+
198
180
  var widgets = _interopRequireWildcard(require("./widgets/index"));
199
181
 
200
182
  exports.widgets = widgets;
@@ -205,6 +187,12 @@ var _header = require("./header");
205
187
 
206
188
  var _footer = require("./footer");
207
189
 
190
+ var createTypes = _interopRequireWildcard(require("./create/types"));
191
+
192
+ exports.createTypes = createTypes;
193
+
194
+ var _solidLogic = require("solid-logic");
195
+
208
196
  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); }
209
197
 
210
198
  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; }
@@ -212,9 +200,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
212
200
  // pull in first avoid cross-refs
213
201
  // @ts-ignore
214
202
  // @ts-ignore
215
- // import * as debug from '../debug'
216
- // @ts-ignore
217
- // @ts-ignore
218
203
  // @ts-ignore
219
204
  // @ts-ignore
220
205
  // @ts-ignore
@@ -226,31 +211,31 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
226
211
  var dom = window ? window.document : null; // Idea that UI.dom can be adapted in non-browser environments
227
212
 
228
213
  exports.dom = dom;
229
- var store = _logic.solidLogicSingleton.store;
230
- exports.store = store;
231
214
 
232
215
  if (typeof window !== 'undefined') {
233
216
  ;
234
217
  window.UI = {
218
+ authn: _solidLogic.authn,
219
+ store: _solidLogic.store,
220
+ authSession: _solidLogic.authSession,
235
221
  ns: ns,
236
222
  rdf: rdf,
237
223
  acl: _index.acl,
238
224
  aclControl: _index.aclControl,
239
- authn: _index2.authn,
240
- create: _index3.create,
225
+ create: _index2.create,
226
+ createTypes: createTypes,
241
227
  dom: dom,
242
228
  icons: _iconBase.icons,
243
229
  language: language,
244
230
  log: log,
245
- matrix: _index4.matrix,
246
- media: _index5.media,
231
+ login: login,
232
+ matrix: _index3.matrix,
233
+ media: _index4.media,
247
234
  messageArea: _messageArea.messageArea,
248
235
  infiniteMessageArea: _infinite.infiniteMessageArea,
249
236
  pad: pad,
250
237
  participation: participation,
251
238
  preferences: preferences,
252
- solidLogicSingleton: _logic.solidLogicSingleton,
253
- store: store,
254
239
  style: style,
255
240
  table: _table.renderTableViewPane,
256
241
  tabs: tabs,
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["dom","window","document","store","solidLogicSingleton","UI","ns","rdf","acl","aclControl","authn","create","icons","language","log","matrix","media","messageArea","infiniteMessageArea","pad","participation","preferences","style","table","tabs","utils","widgets","versionInfo","initHeader","initFooter"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;;;AAEA;;;;AACA;;AACA;;AACA;;AAIA;;AACA;;;;AACA;;;;AACA;;AACA;;AAEA;;AAEA;;AAEA;;;;AAEA;;;;AAEA;;;;AAEA;;AAEA;;;;AAEA;;AACA;;;;AAEA;;;;AACA;;;;AACA;;AACA;;AACA;;;;;;AApC8B;AAC9B;AAKA;AACA;AACA;AAMA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAGA;AAOA,IAAMA,GAAG,GAAGC,MAAM,GAAGA,MAAM,CAACC,QAAV,GAAqB,IAAvC,C,CAA4C;;;AAC5C,IAAMC,KAAK,GAAGC,2BAAoBD,KAAlC;;;AAEA,IAAI,OAAOF,MAAP,KAAkB,WAAtB,EAAmC;AACjC;AAAOA,EAAAA,MAAN,CAAcI,EAAd,GAAmB;AAClBC,IAAAA,EAAE,EAAFA,EADkB;AAElBC,IAAAA,GAAG,EAAHA,GAFkB;AAGlBC,IAAAA,GAAG,EAAHA,UAHkB;AAIlBC,IAAAA,UAAU,EAAVA,iBAJkB;AAKlBC,IAAAA,KAAK,EAALA,aALkB;AAMlBC,IAAAA,MAAM,EAANA,cANkB;AAOlBX,IAAAA,GAAG,EAAHA,GAPkB;AAQlBY,IAAAA,KAAK,EAALA,eARkB;AASlBC,IAAAA,QAAQ,EAARA,QATkB;AAUlBC,IAAAA,GAAG,EAAHA,GAVkB;AAWlBC,IAAAA,MAAM,EAANA,cAXkB;AAYlBC,IAAAA,KAAK,EAALA,aAZkB;AAalBC,IAAAA,WAAW,EAAXA,wBAbkB;AAclBC,IAAAA,mBAAmB,EAAnBA,6BAdkB;AAelBC,IAAAA,GAAG,EAAHA,GAfkB;AAgBlBC,IAAAA,aAAa,EAAbA,aAhBkB;AAiBlBC,IAAAA,WAAW,EAAXA,WAjBkB;AAkBlBjB,IAAAA,mBAAmB,EAAnBA,0BAlBkB;AAmBlBD,IAAAA,KAAK,EAALA,KAnBkB;AAoBlBmB,IAAAA,KAAK,EAALA,KApBkB;AAqBlBC,IAAAA,KAAK,EAALA,0BArBkB;AAsBlBC,IAAAA,IAAI,EAAJA,IAtBkB;AAuBlBC,IAAAA,KAAK,EAALA,KAvBkB;AAwBlBC,IAAAA,OAAO,EAAPA,OAxBkB;AAyBlBC,IAAAA,WAAW,EAAXA,uBAzBkB;AA0BlBC,IAAAA,UAAU,EAAVA,kBA1BkB;AA2BlBC,IAAAA,UAAU,EAAVA;AA3BkB,GAAnB,CADgC,CA6B/B;AACH","sourcesContent":["/*\nThe MIT License (MIT)\n\nCopyright (c) 2015-2016 Solid\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nIf you would like to know more about the solid Solid project, please see\nhttps://github.com/solid/solid\n*/\n'use strict'\n/**\n * Provides a Solid client helper object (which exposes various static modules).\n * @module solidUi.js\n * @main solidUi.js\n */\n\n/**\n * @class SolidUi\n * @static\n */\n\n// REMOVE @ts-ignore as you migrate files to TypeScript\nimport * as rdf from 'rdflib' // pull in first avoid cross-refs\n// @ts-ignore\nimport * as ns from './ns'\nimport { acl, aclControl } from './acl/index'\nimport { authn } from './authn/index'\nimport { create } from './create/index'\n// @ts-ignore\n// import * as debug from '../debug'\n// @ts-ignore\nimport { icons } from './iconBase'\nimport * as language from './widgets/forms/autocomplete/language'\nimport * as log from './log'\nimport { matrix } from './matrix/index'\nimport { media } from './media/index'\n// @ts-ignore\nimport { messageArea } from './messageArea'\n// @ts-ignore\nimport { infiniteMessageArea } from './chat/infinite'\n// @ts-ignore\nimport * as pad from './pad'\n// @ts-ignore\nimport * as participation from './participation'\n// @ts-ignore\nimport * as preferences from './preferences'\n// @ts-ignore\nimport { solidLogicSingleton } from './logic'\n// @ts-ignore\nimport * as style from './style'\n// @ts-ignore\nimport { renderTableViewPane as table } from './table'\nimport * as tabs from './tabs'\n// @ts-ignore\nimport * as utils from './utils'\nimport * as widgets from './widgets/index'\nimport versionInfo from './versionInfo'\nimport { initHeader } from './header'\nimport { initFooter } from './footer'\n\nconst dom = window ? window.document : null // Idea that UI.dom can be adapted in non-browser environments\nconst store = solidLogicSingleton.store\n\nif (typeof window !== 'undefined') {\n ;(<any>window).UI = {\n ns,\n rdf,\n acl,\n aclControl,\n authn,\n create,\n dom,\n icons,\n language,\n log,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n solidLogicSingleton,\n store,\n style,\n table,\n tabs,\n utils,\n widgets,\n versionInfo,\n initHeader,\n initFooter\n } // Simpler access by non-node scripts\n}\n\nexport {\n ns,\n rdf,\n acl,\n aclControl,\n authn,\n create,\n dom,\n icons,\n language,\n log,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n solidLogicSingleton,\n store,\n style,\n table,\n tabs,\n utils,\n widgets,\n versionInfo,\n initHeader,\n initFooter\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["dom","window","document","UI","authn","store","authSession","ns","rdf","acl","aclControl","create","createTypes","icons","language","log","login","matrix","media","messageArea","infiniteMessageArea","pad","participation","preferences","style","table","tabs","utils","widgets","versionInfo","initHeader","initFooter"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;;;AAEA;;;;AACA;;AACA;;AAEA;;AACA;;;;AACA;;;;AACA;;AACA;;AAEA;;AAEA;;AAEA;;;;AAEA;;;;AAEA;;;;AAEA;;;;AAEA;;AACA;;;;AAEA;;;;AACA;;;;AACA;;;;AACA;;AACA;;AACA;;AACA;;;;AACA;;;;;;AAlC8B;AAC9B;AAIA;AAMA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAGA;AAUA,IAAMA,GAAG,GAAGC,MAAM,GAAGA,MAAM,CAACC,QAAV,GAAqB,IAAvC,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n\nCopyright (c) 2015-2016 Solid\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nIf you would like to know more about the solid Solid project, please see\nhttps://github.com/solid/solid\n*/\n'use strict'\n/**\n * Provides a Solid client helper object (which exposes various static modules).\n * @module solidUi.js\n * @main solidUi.js\n */\n\n// REMOVE @ts-ignore as you migrate files to TypeScript\nimport * as rdf from 'rdflib' // pull in first avoid cross-refs\n// @ts-ignore\nimport * as ns from './ns'\nimport { acl, aclControl } from './acl/index'\nimport { create } from './create/index'\n// @ts-ignore\nimport { icons } from './iconBase'\nimport * as language from './widgets/forms/autocomplete/language'\nimport * as log from './log'\nimport { matrix } from './matrix/index'\nimport { media } from './media/index'\n// @ts-ignore\nimport { messageArea } from './messageArea'\n// @ts-ignore\nimport { infiniteMessageArea } from './chat/infinite'\n// @ts-ignore\nimport * as pad from './pad'\n// @ts-ignore\nimport * as participation from './participation'\n// @ts-ignore\nimport * as preferences from './preferences'\n// @ts-ignore\nimport * as style from './style'\n// @ts-ignore\nimport { renderTableViewPane as table } from './table'\nimport * as tabs from './tabs'\n// @ts-ignore\nimport * as utils from './utils'\nimport * as login from './login/login'\nimport * as widgets from './widgets/index'\nimport versionInfo from './versionInfo'\nimport { initHeader } from './header'\nimport { initFooter } from './footer'\nimport * as createTypes from './create/types'\nimport { authn, store, authSession } from 'solid-logic'\n\nconst dom = window ? window.document : null // Idea that UI.dom can be adapted in non-browser environments\n\nif (typeof window !== 'undefined') {\n ;(<any>window).UI = {\n authn,\n store,\n authSession,\n ns,\n rdf,\n acl,\n aclControl,\n create,\n createTypes,\n dom,\n icons,\n language,\n log,\n login,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n style,\n table,\n tabs,\n utils,\n widgets,\n versionInfo,\n initHeader,\n initFooter\n } // Simpler access by non-node scripts\n}\n\nexport {\n ns,\n rdf,\n acl,\n aclControl,\n create,\n createTypes,\n dom,\n icons,\n language,\n log,\n login,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n style,\n table,\n tabs,\n utils,\n widgets,\n versionInfo,\n initHeader,\n initFooter\n}\n"],"file":"index.js"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Signing in, signing up, profile and preferences reloading
3
+ * Type index management
4
+ *
5
+ * Many functions in this module take a context object which
6
+ * holds various RDF symbols, add to it, and return a promise of it.
7
+ *
8
+ * * `me` RDF symbol for the user's WebID
9
+ * * `publicProfile` The user's public profile, iff loaded
10
+ * * `preferencesFile` The user's personal preference file, iff loaded
11
+ * * `index.public` The user's public type index file
12
+ * * `index.private` The user's private type index file
13
+ *
14
+ * Not RDF symbols:
15
+ * * `noun` A string in english for the type of thing -- like "address book"
16
+ * * `instance` An array of nodes which are existing instances
17
+ * * `containers` An array of nodes of containers of instances
18
+ * * `div` A DOM element where UI can be displayed
19
+ * * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages
20
+ * @packageDocumentation
21
+ */
22
+ import { PaneDefinition } from 'pane-registry';
23
+ import { NamedNode } from 'rdflib';
24
+ import { AppDetails, AuthenticationContext } from 'solid-logic';
25
+ /**
26
+ * Resolves with the logged in user's WebID
27
+ *
28
+ * @param context
29
+ */
30
+ export declare function ensureLoggedIn(context: AuthenticationContext): Promise<AuthenticationContext>;
31
+ /**
32
+ * Loads preference file
33
+ * Do this after having done log in and load profile
34
+ *
35
+ * @private
36
+ *
37
+ * @param context
38
+ */
39
+ export declare function ensureLoadedPreferences(context: AuthenticationContext): Promise<AuthenticationContext>;
40
+ /**
41
+ * Logs the user in and loads their WebID profile document into the store
42
+ *
43
+ * @param context
44
+ *
45
+ * @returns Resolves with the context after login / fetch
46
+ */
47
+ export declare function ensureLoadedProfile(context: AuthenticationContext): Promise<AuthenticationContext>;
48
+ /**
49
+ * Returns promise of context with arrays of symbols
50
+ *
51
+ * 2016-12-11 change to include forClass arc a la
52
+ * https://github.com/solid/solid/blob/main/proposals/data-discovery.md
53
+ */
54
+ export declare function findAppInstances(context: AuthenticationContext, theClass: NamedNode, isPublic?: boolean): Promise<AuthenticationContext>;
55
+ /**
56
+ * UI to control registration of instance
57
+ */
58
+ export declare function registrationControl(context: AuthenticationContext, instance: any, theClass: any): Promise<AuthenticationContext | void>;
59
+ /**
60
+ * UI to List at all registered things
61
+ */
62
+ export declare function registrationList(context: AuthenticationContext, options: {
63
+ private?: boolean;
64
+ public?: boolean;
65
+ type?: NamedNode;
66
+ }): Promise<AuthenticationContext>;
67
+ export declare function renderSignInPopup(dom: HTMLDocument): void;
68
+ /**
69
+ * Login status box
70
+ *
71
+ * A big sign-up/sign in box or a logout box depending on the state
72
+ *
73
+ * @param dom
74
+ * @param listener
75
+ *
76
+ * @returns
77
+ */
78
+ export declare function loginStatusBox(dom: HTMLDocument, listener?: ((uri: string | null) => void) | null, options?: {
79
+ buttonStyle?: string;
80
+ }): HTMLElement;
81
+ /**
82
+ * Workspace selection etc
83
+ * See https://github.com/solid/userguide/issues/16
84
+ */
85
+ /**
86
+ * Returns a UI object which, if it selects a workspace,
87
+ * will callback(workspace, newBase).
88
+ * See https://github.com/solid/userguide/issues/16 for more info on workspaces.
89
+ *
90
+ * If necessary, will get an account, preference file, etc. In sequence:
91
+ *
92
+ * - If not logged in, log in.
93
+ * - Load preference file
94
+ * - Prompt user for workspaces
95
+ * - Allows the user to just type in a URI by hand
96
+ *
97
+ * Calls back with the workspace and the base URI
98
+ *
99
+ * @param dom
100
+ * @param appDetails
101
+ * @param callbackWS
102
+ */
103
+ export declare function selectWorkspace(dom: HTMLDocument, appDetails: AppDetails, callbackWS: (workspace: string | null, newBase: string) => void): HTMLElement;
104
+ /**
105
+ * Creates a new instance of an app.
106
+ *
107
+ * An instance of an app could be e.g. an issue tracker for a given project,
108
+ * or a chess game, or calendar, or a health/fitness record for a person.
109
+ *
110
+ * Note that this use of the term 'app' refers more to entries in the user's
111
+ * type index than to actual software applications that use the personal data
112
+ * to which these entries point.
113
+ *
114
+ * @param dom
115
+ * @param appDetails
116
+ * @param callback
117
+ *
118
+ * @returns A div with a button in it for making a new app instance
119
+ */
120
+ export declare function newAppInstance(dom: HTMLDocument, appDetails: AppDetails, callback: (workspace: string | null, newBase: string) => void): HTMLElement;
121
+ /**
122
+ * Retrieves whether the currently logged in user is a power user
123
+ * and/or a developer
124
+ */
125
+ export declare function getUserRoles(): Promise<Array<NamedNode>>;
126
+ /**
127
+ * Filters which panes should be available, based on the result of [[getUserRoles]]
128
+ */
129
+ export declare function filterAvailablePanes(panes: Array<PaneDefinition>): Promise<Array<PaneDefinition>>;
130
+ //# sourceMappingURL=login.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/login/login.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAA6B,SAAS,EAAiB,MAAM,QAAQ,CAAA;AAG5E,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAgN,MAAM,aAAa,CA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