solid-ui 2.4.25 → 2.4.26-068520ea

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 (82) hide show
  1. package/dist/main.js +1866 -1158
  2. package/dist/main.js.map +1 -1
  3. package/lib/acl/access-controller.js.map +1 -1
  4. package/lib/acl/access-groups.js.map +1 -1
  5. package/lib/acl/acl-control.js.map +1 -1
  6. package/lib/acl/acl.js.map +1 -1
  7. package/lib/acl/add-agent-buttons.js.map +1 -1
  8. package/lib/acl/index.js.map +1 -1
  9. package/lib/acl/styles.js.map +1 -1
  10. package/lib/chat/bookmarks.js +6 -7
  11. package/lib/chat/bookmarks.js.map +1 -1
  12. package/lib/chat/chatLogic.js +250 -61
  13. package/lib/chat/chatLogic.js.map +1 -1
  14. package/lib/chat/dateFolder.js.map +1 -1
  15. package/lib/chat/infinite.js +604 -426
  16. package/lib/chat/infinite.js.map +1 -1
  17. package/lib/chat/message.js +286 -158
  18. package/lib/chat/message.js.map +1 -1
  19. package/lib/chat/messageTools.js +464 -276
  20. package/lib/chat/messageTools.js.map +1 -1
  21. package/lib/chat/thread.js +166 -144
  22. package/lib/chat/thread.js.map +1 -1
  23. package/lib/create/create.js.map +1 -1
  24. package/lib/create/index.js.map +1 -1
  25. package/lib/debug.js.map +1 -1
  26. package/lib/folders.js.map +1 -1
  27. package/lib/footer/index.js.map +1 -1
  28. package/lib/footer/styleMap.js.map +1 -1
  29. package/lib/header/empty-profile.js.map +1 -1
  30. package/lib/header/index.js.map +1 -1
  31. package/lib/header/styleMap.js.map +1 -1
  32. package/lib/iconBase.js.map +1 -1
  33. package/lib/index.js.map +1 -1
  34. package/lib/jss/index.js.map +1 -1
  35. package/lib/log.js +7 -7
  36. package/lib/log.js.map +1 -1
  37. package/lib/login/login.js.map +1 -1
  38. package/lib/matrix/index.js.map +1 -1
  39. package/lib/matrix/matrix.js.map +1 -1
  40. package/lib/media/index.js.map +1 -1
  41. package/lib/media/media-capture.js.map +1 -1
  42. package/lib/messageArea.js.map +1 -1
  43. package/lib/noun_Camera_1618446_000000.js.map +1 -1
  44. package/lib/ns.js.map +1 -1
  45. package/lib/pad.js.map +1 -1
  46. package/lib/participation.js.map +1 -1
  47. package/lib/preferences.js +4 -0
  48. package/lib/preferences.js.map +1 -1
  49. package/lib/signup/config-default.js.map +1 -1
  50. package/lib/signup/signup.js.map +1 -1
  51. package/lib/stories/decorators.js.map +1 -1
  52. package/lib/style.js.map +1 -1
  53. package/lib/style_multiSelect.js.map +1 -1
  54. package/lib/table.js.map +1 -1
  55. package/lib/tabs.js.map +1 -1
  56. package/lib/utils/headerFooterHelpers.js.map +1 -1
  57. package/lib/utils/index.js.map +1 -1
  58. package/lib/utils/label.js.map +1 -1
  59. package/lib/versionInfo.d.ts +2 -0
  60. package/lib/versionInfo.d.ts.map +1 -1
  61. package/lib/versionInfo.js +17 -15
  62. package/lib/versionInfo.js.map +1 -1
  63. package/lib/widgets/buttons/iconLinks.js.map +1 -1
  64. package/lib/widgets/buttons.js.map +1 -1
  65. package/lib/widgets/dragAndDrop.js.map +1 -1
  66. package/lib/widgets/error.js.map +1 -1
  67. package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
  68. package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
  69. package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
  70. package/lib/widgets/forms/autocomplete/language.js.map +1 -1
  71. package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
  72. package/lib/widgets/forms/basic.js.map +1 -1
  73. package/lib/widgets/forms/comment.js.map +1 -1
  74. package/lib/widgets/forms/fieldFunction.js.map +1 -1
  75. package/lib/widgets/forms/fieldParams.js.map +1 -1
  76. package/lib/widgets/forms/formStyle.js.map +1 -1
  77. package/lib/widgets/forms.js.map +1 -1
  78. package/lib/widgets/index.js.map +1 -1
  79. package/lib/widgets/multiSelect.js.map +1 -1
  80. package/lib/widgets/peoplePicker.js.map +1 -1
  81. package/lib/widgets/widgetHelpers.js.map +1 -1
  82. package/package.json +20 -19
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["dom","window","document","UI","authn","store","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"],"sources":["../src/index.ts"],"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/solidos/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 { 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 } 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 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\n// this variables are directly used in the storybook\nexport {\n authn,\n store,\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"],"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,YAAY;;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AAAA;AAAA;EAAA;AA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AAXA,WAAW;IACXX,GAAG,EAAHA,GAAG;IACHY,KAAK,EAALA,eAAK;IACLC,QAAQ,EAARA,QAAQ;IACRC,GAAG,EAAHA,GAAG;IACHC,KAAK,EAALA,KAAK;IACLC,MAAM,EAANA,cAAM;IACNC,KAAK,EAALA,aAAK;IACLC,WAAW,EAAXA,wBAAW;IACXC,mBAAmB,EAAnBA,6BAAmB;IACnBC,GAAG,EAAHA,GAAG;IACHC,aAAa,EAAbA,aAAa;IACbC,WAAW,EAAXA,WAAW;IACXC,KAAK,EAALA,KAAK;IACLC,KAAK,EAALA,0BAAK;IACLC,IAAI,EAAJA,IAAI;IACJC,KAAK,EAALA,KAAK;IACLC,OAAO,EAAPA,OAAO;IACPC,WAAW,EAAXA,wBAAW;IACXC,UAAU,EAAVA,kBAAU;IACVC,UAAU,EAAVA;EACF,CAAC,EAAC;AACJ;;AAEA"}
1
+ {"version":3,"file":"index.js","names":["_typeof","require","Object","defineProperty","exports","value","enumerable","get","_index","acl","aclControl","_solidLogic","authn","_index2","create","dom","createTypes","_iconBase","icons","_infinite","infiniteMessageArea","_footer","initFooter","_header","initHeader","login","log","language","_index3","matrix","_index4","media","_messageArea","messageArea","rdf","preferences","participation","pad","ns","store","style","_table","renderTableViewPane","utils","tabs","_versionInfo","versionInfo","widgets","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","window","document","UI","table"],"sources":["../src/index.ts"],"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/solidos/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 { 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 } 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 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\n// this variables are directly used in the storybook\nexport {\n authn,\n store,\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"],"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,YAAY;;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAH,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAE,UAAA;EAAAC,GAAA,WAAAA,IAAA;IAAA,OAAAC,MAAA,CAAAC,GAAA;EAAA;AAAA;AAAAP,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAE,UAAA;EAAAC,GAAA,WAAAA,IAAA;IAAA,OAAAC,MAAA,CAAAE,UAAA;EAAA;AAAA;AAAAR,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAE,UAAA;EAAAC,GAAA,WAAAA,IAAA;IAAA,OAAAI,WAAA,CAAAC,KAAA;EAAA;AAAA;AAAAV,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAE,UAAA;EAAAC,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K,EAALA,eAAK;IACLS,QAAQ,EAARA,QAAQ;IACRD,GAAG,EAAHA,GAAG;IACHD,KAAK,EAALA,KAAK;IACLI,MAAM,EAANA,cAAM;IACNE,KAAK,EAALA,aAAK;IACLE,WAAW,EAAXA,wBAAW;IACXb,mBAAmB,EAAnBA,6BAAmB;IACnBiB,GAAG,EAAHA,GAAG;IACHD,aAAa,EAAbA,aAAa;IACbD,WAAW,EAAXA,WAAW;IACXK,KAAK,EAALA,KAAK;IACL8B,KAAK,EAALA,0BAAK;IACL1B,IAAI,EAAJA,IAAI;IACJD,KAAK,EAALA,KAAK;IACLI,OAAO,EAAPA,OAAO;IACPD,WAAW,EAAXA,wBAAW;IACXtB,UAAU,EAAVA,kBAAU;IACVF,UAAU,EAAVA;EACF,CAAC,EAAC;AACJ;;AAEA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["stylesheetsMap","Map","getClasses","insertionPoint","styles","stylesheet","getStylesheet","createStyleSheet","attach","cachedStylesheet","get","create","plugins","preset","set"],"sources":["../../src/jss/index.ts"],"sourcesContent":["/**\n * Contains [[getClasses]] and [[getStylesheet]] functions,\n * usable as wrappers around JSS (A CSS authoring tool).\n * See https://cssinjs.org/\n * @packageDocumentation\n */\n\nimport { create, Jss, Styles, StyleSheet } from 'jss'\nimport preset from 'jss-preset-default'\n\nconst stylesheetsMap = new Map<HTMLElement, Jss>()\n\n/**\n * returns a StyleSheet object.\n * See https://cssinjs.org/ for more info about JSS.\n * (despite the name, see https://github.com/solidos/solid-ui/issues/199)\n */\nexport function getClasses (insertionPoint: HTMLElement, styles: Partial<Styles>): StyleSheet {\n const stylesheet = getStylesheet(insertionPoint)\n return stylesheet.createStyleSheet(styles).attach()\n}\n\n/**\n * returns a JSS object.\n * See https://cssinjs.org/ for more info about JSS.\n * (despite the name, see https://github.com/solidos/solid-ui/issues/199)\n */\nexport function getStylesheet (insertionPoint: HTMLElement): Jss {\n const cachedStylesheet = stylesheetsMap.get(insertionPoint)\n if (cachedStylesheet) {\n return cachedStylesheet\n }\n const stylesheet = create({\n insertionPoint,\n plugins: preset().plugins\n })\n stylesheetsMap.set(insertionPoint, stylesheet)\n return stylesheet\n}\n"],"mappings":";;;;;;;;AAOA;AACA;AARA;AACA;AACA;AACA;AACA;AACA;;AAKA,IAAMA,cAAc,GAAG,IAAIC,GAAG,EAAoB;;AAElD;AACA;AACA;AACA;AACA;AACO,SAASC,UAAU,CAAEC,cAA2B,EAAEC,MAAuB,EAAc;EAC5F,IAAMC,UAAU,GAAGC,aAAa,CAACH,cAAc,CAAC;EAChD,OAAOE,UAAU,CAACE,gBAAgB,CAACH,MAAM,CAAC,CAACI,MAAM,EAAE;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASF,aAAa,CAAEH,cAA2B,EAAO;EAC/D,IAAMM,gBAAgB,GAAGT,cAAc,CAACU,GAAG,CAACP,cAAc,CAAC;EAC3D,IAAIM,gBAAgB,EAAE;IACpB,OAAOA,gBAAgB;EACzB;EACA,IAAMJ,UAAU,GAAG,IAAAM,WAAM,EAAC;IACxBR,cAAc,EAAdA,cAAc;IACdS,OAAO,EAAE,IAAAC,4BAAM,GAAE,CAACD;EACpB,CAAC,CAAC;EACFZ,cAAc,CAACc,GAAG,CAACX,cAAc,EAAEE,UAAU,CAAC;EAC9C,OAAOA,UAAU;AACnB"}
1
+ {"version":3,"file":"index.js","names":["_jss","require","_jssPresetDefault","_interopRequireDefault","stylesheetsMap","Map","getClasses","insertionPoint","styles","stylesheet","getStylesheet","createStyleSheet","attach","cachedStylesheet","get","create","plugins","preset","set"],"sources":["../../src/jss/index.ts"],"sourcesContent":["/**\n * Contains [[getClasses]] and [[getStylesheet]] functions,\n * usable as wrappers around JSS (A CSS authoring tool).\n * See https://cssinjs.org/\n * @packageDocumentation\n */\n\nimport { create, Jss, Styles, StyleSheet } from 'jss'\nimport preset from 'jss-preset-default'\n\nconst stylesheetsMap = new Map<HTMLElement, Jss>()\n\n/**\n * returns a StyleSheet object.\n * See https://cssinjs.org/ for more info about JSS.\n * (despite the name, see https://github.com/solidos/solid-ui/issues/199)\n */\nexport function getClasses (insertionPoint: HTMLElement, styles: Partial<Styles>): StyleSheet {\n const stylesheet = getStylesheet(insertionPoint)\n return stylesheet.createStyleSheet(styles).attach()\n}\n\n/**\n * returns a JSS object.\n * See https://cssinjs.org/ for more info about JSS.\n * (despite the name, see https://github.com/solidos/solid-ui/issues/199)\n */\nexport function getStylesheet (insertionPoint: HTMLElement): Jss {\n const cachedStylesheet = stylesheetsMap.get(insertionPoint)\n if (cachedStylesheet) {\n return cachedStylesheet\n }\n const stylesheet = create({\n insertionPoint,\n plugins: preset().plugins\n })\n stylesheetsMap.set(insertionPoint, stylesheet)\n return stylesheet\n}\n"],"mappings":";;;;;;;;AAOA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;AACA;AACA;AACA;;AAKA,IAAMG,cAAc,GAAG,IAAIC,GAAG,EAAoB;;AAElD;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAAEC,cAA2B,EAAEC,MAAuB,EAAc;EAC5F,IAAMC,UAAU,GAAGC,aAAa,CAACH,cAAc,CAAC;EAChD,OAAOE,UAAU,CAACE,gBAAgB,CAACH,MAAM,CAAC,CAACI,MAAM,EAAE;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASF,aAAaA,CAAEH,cAA2B,EAAO;EAC/D,IAAMM,gBAAgB,GAAGT,cAAc,CAACU,GAAG,CAACP,cAAc,CAAC;EAC3D,IAAIM,gBAAgB,EAAE;IACpB,OAAOA,gBAAgB;EACzB;EACA,IAAMJ,UAAU,GAAG,IAAAM,WAAM,EAAC;IACxBR,cAAc,EAAdA,cAAc;IACdS,OAAO,EAAE,IAAAC,4BAAM,GAAE,CAACD;EACpB,CAAC,CAAC;EACFZ,cAAc,CAACc,GAAG,CAACX,cAAc,EAAEE,UAAU,CAAC;EAC9C,OAAOA,UAAU;AACnB"}
package/lib/log.js CHANGED
@@ -42,13 +42,13 @@ var LogLevel;
42
42
  /** @internal */
43
43
  exports.LogLevel = LogLevel;
44
44
  (function (LogLevel) {
45
- LogLevel[LogLevel["Error"] = TERROR] = "Error";
46
- LogLevel[LogLevel["Warning"] = TWARN] = "Warning";
47
- LogLevel[LogLevel["Message"] = TMESG] = "Message";
48
- LogLevel[LogLevel["Success"] = TSUCCESS] = "Success";
49
- LogLevel[LogLevel["Info"] = TINFO] = "Info";
50
- LogLevel[LogLevel["Debug"] = TDEBUG] = "Debug";
51
- LogLevel[LogLevel["All"] = TALL] = "All";
45
+ LogLevel[LogLevel["Error"] = 1] = "Error";
46
+ LogLevel[LogLevel["Warning"] = 2] = "Warning";
47
+ LogLevel[LogLevel["Message"] = 4] = "Message";
48
+ LogLevel[LogLevel["Success"] = 8] = "Success";
49
+ LogLevel[LogLevel["Info"] = 16] = "Info";
50
+ LogLevel[LogLevel["Debug"] = 32] = "Debug";
51
+ LogLevel[LogLevel["All"] = 63] = "All";
52
52
  })(LogLevel || (exports.LogLevel = LogLevel = {}));
53
53
  var _level = TERROR + TWARN + TMESG;
54
54
  /** @internal */
package/lib/log.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"log.js","names":["TERROR","TWARN","TMESG","TSUCCESS","TINFO","TDEBUG","TALL","LogLevel","_level","_ascending","_dom","document","_window","window","log","str","type","typestr","logArea","getElementById","addendum","createElement","setAttribute","now","Date","innerHTML","getHours","getMinutes","getSeconds","escapeForXML","insertBefore","firstChild","appendChild","console","msg","message","warn","debug","info","error","success","alert","clear","setLevel","level","dumpHTML","body","logAscending","logDescending","replace","setInternals"],"sources":["../src/log.ts"],"sourcesContent":["// /////////////////////// Logging\n//\n// bitmask levels\n// const TNONE = 0\n/** @internal */\nconst TERROR = 1\n/** @internal */\nconst TWARN = 2\n/** @internal */\nconst TMESG = 4\n/** @internal */\nconst TSUCCESS = 8\n/** @internal */\nconst TINFO = 16\n/** @internal */\nconst TDEBUG = 32\n/** @internal */\nconst TALL = 63\n\n/** @internal */\nexport enum LogLevel {\n Error = TERROR,\n Warning = TWARN,\n Message = TMESG,\n Success = TSUCCESS,\n Info = TINFO,\n Debug = TDEBUG,\n All = TALL\n}\n\n/** @internal */\nlet _level: number = TERROR + TWARN + TMESG\n/** @internal */\nlet _ascending: boolean = false\n/** @internal */\nlet _dom: HTMLDocument = document // must be able to override for tests\n/** @internal */\nlet _window: Window = window // must be able to override for tests\n\n/** @internal */\nfunction log (str: string, type: number = TMESG, typestr: string = 'mesg') {\n if (!(_level & type)) return // bitmask\n\n if (typeof _dom !== 'undefined') {\n const logArea = _dom.getElementById('status')\n if (!logArea) return\n\n const addendum = _dom.createElement('span')\n addendum.setAttribute('class', typestr)\n const now = new Date()\n addendum.innerHTML = `${now.getHours()}:${now.getMinutes()}:${now.getSeconds()} [${typestr}] ${escapeForXML(str)}<br/>`\n if (_ascending) {\n logArea.insertBefore(addendum, logArea.firstChild)\n } else {\n logArea.appendChild(addendum)\n }\n } else if (typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.log(str)\n }\n}\n\n/**\n * Adds a message to the element with id \"status\". The messages are prepended with\n * time and type of message, in this case [mesg].\n */\nexport function msg (message: string) {\n log(message)\n}\n\n/**\n * Adds a warning message to the element with id \"status\". The messages are\n * prepended with time and type of message, in this case [warn].\n */\nexport function warn (message: string): void {\n log(message, TWARN, 'warn')\n}\n\n/**\n * Adds a debugging message to the element with id \"status\". The messages are\n * prepended with time and type of message, in this case [dbug].\n */\nexport function debug (message: string): void {\n log(message, TDEBUG, 'dbug')\n}\n\n/**\n * Adds a info message to the element with id \"status\". The messages are\n * prepended with time and type of message, in this case [info].\n */\nexport function info (message: string): void {\n log(message, TINFO, 'info')\n}\n\n/**\n * Adds a error to the element with id \"status\". The messages are\n * prepended with time and type of message, in this case [eror].\n */\nexport function error (message: string): void {\n log(message, TERROR, 'eror')\n}\n\n/**\n * Adds a success message to the element with id \"status\". The messages are\n * prepended with time and type of message, in this case [good].\n */\nexport function success (message: string): void {\n log(message, TSUCCESS, 'good')\n}\n\n/**\n * Uses the global alert to send an alert. If global alert is not available, it\n * will output the message using the method [[warning]]s.\n */\nexport function alert (message: string): void {\n if (_window && typeof _window.alert !== 'undefined') {\n _window.alert(message)\n } else {\n warn(message)\n }\n}\n\n/**\n * Will clear the content of the element with id \"status\".\n */\nexport function clear (): void {\n const logArea = _dom?.getElementById('status')\n if (!logArea) return\n logArea.innerHTML = ''\n}\n\n/**\n * Lets you configure which types of messages will be shown. The module uses\n * [bitmask](https://en.wikipedia.org/wiki/Mask_(computing)) to filter which\n * types of messages should be shown. E.g. if you only want warning messages\n * to be shown, pass 2 to the function, if you want warning and success to be\n * shown, pass 10 (2+8). By passing the sum of all, 63, you'll show all\n * types of messages.\n *\n * - Error: 1\n * - Warning: 2\n * - Message: 4\n * - Success: 8\n * - Info: 16\n * - Debug: 32\n */\nexport function setLevel (level: number): void {\n _level = TALL\n debug('Log level is now ' + level)\n _level = level\n}\n\n/**\n * Will dump the current HTML using the [[debug]] method.\n */\nexport function dumpHTML (): void {\n if (!_dom) return\n const level = _level\n _level = TALL\n debug(_dom?.body?.innerHTML || '')\n _level = level\n}\n\n/**\n * Will start prepending messages the list of log messages.\n */\nexport function logAscending () {\n _ascending = true\n}\n\n/**\n * Will start appending messages the list of log messages. (This is default\n * behavior.)\n */\nexport function logDescending () {\n _ascending = false\n}\n\n/** @internal */\nexport function escapeForXML (str: string): string {\n // can be replaced with function utils module when migrating\n return str\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n}\n\n/** @internal */\nexport function setInternals (window, document) {\n _window = window\n _dom = document\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA,IAAMA,MAAM,GAAG,CAAC;AAChB;AACA,IAAMC,KAAK,GAAG,CAAC;AACf;AACA,IAAMC,KAAK,GAAG,CAAC;AACf;AACA,IAAMC,Q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,QAAQ,EAAE;EAC9CC,OAAO,GAAGC,MAAM;EAChBH,IAAI,GAAGC,QAAQ;AACjB"}
1
+ {"version":3,"file":"log.js","names":["TERROR","TWARN","TMESG","TSUCCESS","TINFO","TDEBUG","TALL","LogLevel","exports","_level","_ascending","_dom","document","_window","window","log","str","type","arguments","length","undefined","typestr","logArea","getElementById","addendum","createElement","setAttribute","now","Date","innerHTML","concat","getHours","getMinutes","getSeconds","escapeForXML","insertBefore","firstChild","appendChild","console","msg","message","warn","debug","info","error","success","alert","clear","_dom2","setLevel","level","dumpHTML","_dom3","_dom3$body","body","logAscending","logDescending","replace","setInternals"],"sources":["../src/log.ts"],"sourcesContent":["// /////////////////////// Logging\n//\n// bitmask levels\n// const TNONE = 0\n/** @internal */\nconst TERROR = 1\n/** @internal */\nconst TWARN = 2\n/** @internal */\nconst TMESG = 4\n/** @internal */\nconst TSUCCESS = 8\n/** @internal */\nconst TINFO = 16\n/** @internal */\nconst TDEBUG = 32\n/** @internal */\nconst TALL = 63\n\n/** @internal */\nexport enum LogLevel {\n Error = TERROR,\n Warning = TWARN,\n Message = TMESG,\n Success = TSUCCESS,\n Info = TINFO,\n Debug = TDEBUG,\n All = TALL\n}\n\n/** @internal */\nlet _level: number = TERROR + TWARN + TMESG\n/** @internal */\nlet _ascending: boolean = false\n/** @internal */\nlet _dom: HTMLDocument = document // must be able to override for tests\n/** @internal */\nlet _window: Window = window // must be able to override for tests\n\n/** @internal */\nfunction log (str: string, type: number = TMESG, typestr: string = 'mesg') {\n if (!(_level & type)) return // bitmask\n\n if (typeof _dom !== 'undefined') {\n const logArea = _dom.getElementById('status')\n if (!logArea) return\n\n const addendum = _dom.createElement('span')\n addendum.setAttribute('class', typestr)\n const now = new Date()\n addendum.innerHTML = `${now.getHours()}:${now.getMinutes()}:${now.getSeconds()} [${typestr}] ${escapeForXML(str)}<br/>`\n if (_ascending) {\n logArea.insertBefore(addendum, logArea.firstChild)\n } else {\n logArea.appendChild(addendum)\n }\n } else if (typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.log(str)\n }\n}\n\n/**\n * Adds a message to the element with id \"status\". The messages are prepended with\n * time and type of message, in this case [mesg].\n */\nexport function msg (message: string) {\n log(message)\n}\n\n/**\n * Adds a warning message to the element with id \"status\". The messages are\n * prepended with time and type of message, in this case [warn].\n */\nexport function warn (message: string): void {\n log(message, TWARN, 'warn')\n}\n\n/**\n * Adds a debugging message to the element with id \"status\". The messages are\n * prepended with time and type of message, in this case [dbug].\n */\nexport function debug (message: string): void {\n log(message, TDEBUG, 'dbug')\n}\n\n/**\n * Adds a info message to the element with id \"status\". The messages are\n * prepended with time and type of message, in this case [info].\n */\nexport function info (message: string): void {\n log(message, TINFO, 'info')\n}\n\n/**\n * Adds a error to the element with id \"status\". The messages are\n * prepended with time and type of message, in this case [eror].\n */\nexport function error (message: string): void {\n log(message, TERROR, 'eror')\n}\n\n/**\n * Adds a success message to the element with id \"status\". The messages are\n * prepended with time and type of message, in this case [good].\n */\nexport function success (message: string): void {\n log(message, TSUCCESS, 'good')\n}\n\n/**\n * Uses the global alert to send an alert. If global alert is not available, it\n * will output the message using the method [[warning]]s.\n */\nexport function alert (message: string): void {\n if (_window && typeof _window.alert !== 'undefined') {\n _window.alert(message)\n } else {\n warn(message)\n }\n}\n\n/**\n * Will clear the content of the element with id \"status\".\n */\nexport function clear (): void {\n const logArea = _dom?.getElementById('status')\n if (!logArea) return\n logArea.innerHTML = ''\n}\n\n/**\n * Lets you configure which types of messages will be shown. The module uses\n * [bitmask](https://en.wikipedia.org/wiki/Mask_(computing)) to filter which\n * types of messages should be shown. E.g. if you only want warning messages\n * to be shown, pass 2 to the function, if you want warning and success to be\n * shown, pass 10 (2+8). By passing the sum of all, 63, you'll show all\n * types of messages.\n *\n * - Error: 1\n * - Warning: 2\n * - Message: 4\n * - Success: 8\n * - Info: 16\n * - Debug: 32\n */\nexport function setLevel (level: number): void {\n _level = TALL\n debug('Log level is now ' + level)\n _level = level\n}\n\n/**\n * Will dump the current HTML using the [[debug]] method.\n */\nexport function dumpHTML (): void {\n if (!_dom) return\n const level = _level\n _level = TALL\n debug(_dom?.body?.innerHTML || '')\n _level = level\n}\n\n/**\n * Will start prepending messages the list of log messages.\n */\nexport function logAscending () {\n _ascending = true\n}\n\n/**\n * Will start appending messages the list of log messages. (This is default\n * behavior.)\n */\nexport function logDescending () {\n _ascending = false\n}\n\n/** @internal */\nexport function escapeForXML (str: string): string {\n // can be replaced with function utils module when migrating\n return str\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n}\n\n/** @internal */\nexport function setInternals (window, document) {\n _window = window\n _dom = document\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA,IAAMA,MAAM,GAAG,CAAC;AAChB;AACA,IAAMC,KAAK,GAAG,CAAC;AACf;AACA,IAAMC,KAAK,GAAG,CAAC;AACf;AACA,IAAMC,QAAQ,GAAG,CAAC;AAClB;AACA,IAAMC,KAAK,GAAG,EAAE;AAChB;AACA,IAAMC,MAAM,GAAG,EAAE;AACjB;AACA,IAAMC,IAAI,GAAG,EAAE;;AAEf;AAAA,IACYC,QAAQ;AAUpB;AAAAC,OAAA,CAAAD,QAAA,GAAAA,QAAA;AAAA,WAVYA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;AAAA,GAARA,QAAQ,KAAAC,OAAA,CAAAD,QAAA,GAARA,QAAQ;AAWpB,IAAIE,MAAc,GAAGT,MAAM,GAAGC,KAAK,GAAGC,KAAK;AAC3C;AACA,IAAIQ,UAAmB,GAAG,KAAK;AAC/B;AACA,IAAIC,IAAkB,GAAGC,QAAQ,EAAC;AAClC;AACA,IAAIC,OAAe,GAAG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SAASoB,QAAQA,CAAEC,KAAa,EAAQ;EAC7CzC,MAAM,GAAGH,IAAI;EACboC,KAAK,CAAC,mBAAmB,GAAGQ,KAAK,CAAC;EAClCzC,MAAM,GAAGyC,KAAK;AAChB;;AAEA;AACA;AACA;AACO,SAASC,QAAQA,CAAA,EAAU;EAAA,IAAAC,KAAA,EAAAC,UAAA;EAChC,IAAI,CAAC1C,IAAI,EAAE;EACX,IAAMuC,KAAK,GAAGzC,MAAM;EACpBA,MAAM,GAAGH,IAAI;EACboC,KAAK,CAAC,EAAAU,KAAA,GAAAzC,IAAI,cAAAyC,KAAA,wBAAAC,UAAA,GAAJD,KAAA,CAAME,IAAI,cAAAD,UAAA,uBAAVA,UAAA,CAAYxB,SAAS,KAAI,EAAE,CAAC;EAClCpB,MAAM,GAAGyC,KAAK;AAChB;;AAEA;AACA;AACA;AACO,SAASK,YAAYA,CAAA,EAAI;EAC9B7C,UAAU,GAAG,IAAI;AACnB;;AAEA;AACA;AACA;AACA;AACO,SAAS8C,aAAaA,CAAA,EAAI;EAC/B9C,UAAU,GAAG,KAAK;AACpB;;AAEA;AACO,SAASwB,YAAYA,CAAElB,GAAW,EAAU;EACjD;EACA,OAAOA,GAAG,CACPyC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CACtBA,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CACrBA,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;AAC1B;;AAEA;AACO,SAASC,YAAYA,CAAE5C,MAAM,EAAEF,QAAQ,EAAE;EAC9CC,OAAO,GAAGC,MAAM;EAChBH,IAAI,GAAGC,QAAQ;AACjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","names":["store","solidLogicSingleton","profile","loadPreferences","loadProfile","typeIndex","getScopedAppInstances","getRegistrations","loadAllTypeIndexes","getScopedAppsFromIndex","deleteTypeIndexRegistration","ensureLoggedIn","context","me","authn","currentUser","saveUser","Promise","resolve","checkUser","then","webId","debug","log","div","dom","box","loginStatusBox","webIdUri","appendChild","ensureLoadedPreferences","complain","message","statusArea","widgets","errorMessageBlock","preferencesFile","ensureLoadedProfile","progressDisplay","parentNode","removeChild","UnauthorizedError","m2","alert","CrossOriginForbiddenError","window","location","origin","preferencesFileError","SameOriginForbiddenError","warn","NotEditableError","WebOperationError","FetchError","status","Error","publicProfile","logInContext","findAppInstances","theClass","isPublic","items","filter","item","scope","label","instances","map","instance","scopeLabel","mine","sameTerm","agent","name","utils","registrationControl","registrationStatements","renderScopeCheckbox","statements","index","noun","buildCheckboxForm","form","registrations","reg","length","newThing","st","ns","solid","createElement","innerHTML","scopes","msg","textContent","setAttribute","tbody","children","BlankNode","row","renderScopeHeadingRow","backgroundColor","cell","style","backgoundColor","header","textAlign","registrationList","options","table","firstChild","headingRow","type","display","personTR","deleteFunction","paddingLeft","getDefaultSignInButtonStyle","signInOrSignUpBox","setUserCallback","signInButtonStyle","buttonStyle","magicClassName","signInPopUpButton","authSession","onLogin","webIdURI","uri","divs","getElementsByClassName","i","parent","e","addEventListener","offline","offlineTestID","renderSignInPopup","signupButton","_event","signupMgr","Signup","signup","issuerPopup","body","issuerPopupBox","issuerPopupBoxTopMenu","issuerPopupBoxLabel","innerText","issuerPopupBoxCloseButton","remove","loginToIssuer","issuerUri","preLoginRedirectHash","URL","href","hash","localStorage","setItem","login","redirectUrl","oidcIssuer","issuerTextContainer","issuerTextInputContainer","issuerTextLabel","issuerTextInput","value","getItem","issuerTextGoButton","issuerButtonContainer","issuerBottonLabel","getSuggestedIssuers","forEach","issuerInfo","issuerButton","listener","setIt","newidURI","refresh","logoutButtonHandler","oldMe","logout","err","logoutButton","logoutLabel","nick","any","foaf","signOutButton","sessionInfo","info","isLoggedIn","sym","clearElement","trackSession","onLogout","issuer","wellKnownUri","pathname","fetch","toString","wellKnownResult","json","openidConfiguration","end_session_endpoint","credentials","reload","selectWorkspace","appDetails","callbackWS","appPathSegment","say","s","background","figureOutBase","ws","newBaseNode","space","newBaseString","split","slice","now","Date","getTime","displayOptions","makeNewWorkspace","padding","encodeURI","askName","newBase","newWs","newData","updater","update","id","w","each","undefined","storages","concat","ldp","file","includes","toLowerCase","p","commentStyle","baseField","textInputStyle","size","autocomplete","button","replace","x","holds","rdf","col1","col2","col3","tr","comment","cellStyle","deselectedStyle","anyValue","ui","reduce","a","b","charCodeAt","bgcolor","target","rdfs","disabled","trLast","newAppInstance","callback","gotWS","base","getUserRoles","doc","filterAvailablePanes","panes","userRoles","pane","isMatchingAudience","audience","isMatch","audienceRole","find","role","equals"],"sources":["../../src/login/login.ts"],"sourcesContent":["/* eslint-disable camelcase */\n/**\n * Signing in, signing up, profile and preferences reloading\n * Type index management\n *\n * Many functions in this module take a context object which\n * holds various RDF symbols, add to it, and return a promise of it.\n *\n * * `me` RDF symbol for the user's WebID\n * * `publicProfile` The user's public profile, iff loaded\n * * `preferencesFile` The user's personal preference file, iff loaded\n * * `index.public` The user's public type index file\n * * `index.private` The user's private type index file\n *\n * Not RDF symbols:\n * * `noun` A string in english for the type of thing -- like \"address book\"\n * * `instance` An array of nodes which are existing instances\n * * `containers` An array of nodes of containers of instances\n * * `div` A DOM element where UI can be displayed\n * * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages\n * *\n * * Vocabulary: \"load\" loads a file if it exists;\n * * 'Ensure\" CREATES the file if it does not exist (if it can) and then loads it.\n * @packageDocumentation\n */\nimport { PaneDefinition } from 'pane-registry'\nimport { BlankNode, NamedNode, st } from 'rdflib'\n// eslint-disable-next-line camelcase\nimport { Quad_Object } from 'rdflib/lib/tf-types'\nimport {\n AppDetails,\n AuthenticationContext,\n authn,\n authSession,\n CrossOriginForbiddenError,\n FetchError,\n getSuggestedIssuers,\n NotEditableError,\n offlineTestID,\n SameOriginForbiddenError,\n solidLogicSingleton,\n UnauthorizedError,\n WebOperationError\n} from 'solid-logic'\nimport * as debug from '../debug'\nimport { alert } from '../log'\nimport * as ns from '../ns.js'\nimport { Signup } from '../signup/signup.js'\nimport { buttonStyle, commentStyle, textInputStyle } from '../style'\nimport * as utils from '../utils'\nimport * as widgets from '../widgets'\n\nconst store = solidLogicSingleton.store\n\nconst {\n loadPreferences,\n loadProfile\n} = solidLogicSingleton.profile\n\nconst {\n getScopedAppInstances,\n getRegistrations,\n loadAllTypeIndexes,\n getScopedAppsFromIndex,\n deleteTypeIndexRegistration\n} = solidLogicSingleton.typeIndex\n\n/**\n * Resolves with the logged in user's WebID\n *\n * @param context\n */\n// used to be logIn\nexport function ensureLoggedIn (context: AuthenticationContext): Promise<AuthenticationContext> {\n const me = authn.currentUser()\n if (me) {\n authn.saveUser(me, context)\n return Promise.resolve(context)\n }\n\n return new Promise((resolve) => {\n authn.checkUser().then((webId) => {\n // Already logged in?\n if (webId) {\n debug.log(`logIn: Already logged in as ${webId}`)\n return resolve(context)\n }\n if (!context.div || !context.dom) {\n return resolve(context)\n }\n const box = loginStatusBox(context.dom, (webIdUri) => {\n authn.saveUser(webIdUri, context)\n resolve(context) // always pass growing context\n })\n context.div.appendChild(box)\n })\n })\n}\n\n/**\n * Loads preference file\n * Do this after having done log in and load profile\n *\n * @private\n *\n * @param context\n */\n// used to be logInLoadPreferences\nexport async function ensureLoadedPreferences (\n context: AuthenticationContext\n): Promise<AuthenticationContext> {\n if (context.preferencesFile) return Promise.resolve(context) // already done\n\n const statusArea = context.statusArea || context.div || null\n let progressDisplay\n function complain (message) {\n message = `ensureLoadedPreferences: ${message}`\n if (statusArea) {\n // statusArea.innerHTML = ''\n statusArea.appendChild(widgets.errorMessageBlock(context.dom, message))\n }\n debug.log(message)\n // reject(new Error(message))\n }\n try {\n context = await ensureLoadedProfile(context)\n\n // console.log('back in Solid UI after logInLoadProfile', context)\n const preferencesFile = await loadPreferences(context.me as NamedNode)\n if (progressDisplay) {\n progressDisplay.parentNode.removeChild(progressDisplay)\n }\n context.preferencesFile = preferencesFile\n } catch (err) {\n let m2: string\n if (err instanceof UnauthorizedError) {\n m2 =\n 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?'\n alert(m2)\n } else if (err instanceof CrossOriginForbiddenError) {\n m2 = `Unauthorized: Assuming preference file blocked for origin ${window.location.origin}`\n context.preferencesFileError = m2\n return context\n } else if (err instanceof SameOriginForbiddenError) {\n m2 =\n 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.'\n debug.warn(m2)\n return context\n } else if (err instanceof NotEditableError) {\n m2 =\n 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.'\n debug.warn(m2)\n return context\n } else if (err instanceof WebOperationError) {\n m2 =\n 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.'\n debug.warn(m2)\n } else if (err instanceof FetchError) {\n m2 = `Strange: Error ${err.status} trying to read your preference file.${err.message}`\n alert(m2)\n } else {\n throw new Error(`(via loadPrefs) ${err}`)\n }\n }\n return context\n}\n\n/**\n * Logs the user in and loads their WebID profile document into the store\n *\n * @param context\n *\n * @returns Resolves with the context after login / fetch\n */\n// used to be logInLoadProfile\nexport async function ensureLoadedProfile (\n context: AuthenticationContext\n): Promise<AuthenticationContext> {\n if (context.publicProfile) {\n return context\n } // already done\n try {\n const logInContext = await ensureLoggedIn(context)\n if (!logInContext.me) {\n throw new Error('Could not log in')\n }\n context.publicProfile = await loadProfile(logInContext.me)\n } catch (err) {\n if (context.div && context.dom) {\n context.div.appendChild(widgets.errorMessageBlock(context.dom, err.message))\n }\n throw new Error(`Can't log in: ${err}`)\n }\n return context\n}\n\n/**\n * Returns promise of context with arrays of symbols\n *\n * leaving the `isPublic` param undefined will bring in community index things, too\n */\nexport async function findAppInstances (\n context: AuthenticationContext,\n theClass: NamedNode,\n isPublic?: boolean\n): Promise<AuthenticationContext> {\n let items = context.me ? await getScopedAppInstances(theClass, context.me) : []\n if (isPublic === true) { // old API - not recommended!\n items = items.filter(item => item.scope.label === 'public')\n } else if (isPublic === false) {\n items = items.filter(item => item.scope.label === 'private')\n }\n context.instances = items.map(item => item.instance)\n return context\n}\n\nexport function scopeLabel (context, scope) {\n const mine = context.me && context.me.sameTerm(scope.agent)\n const name = mine ? '' : utils.label(scope.agent) + ' '\n return `${name}${scope.label}`\n}\n/**\n * UI to control registration of instance\n */\nexport async function registrationControl (\n context: AuthenticationContext,\n instance,\n theClass\n): Promise<AuthenticationContext | void> {\n function registrationStatements (index) {\n const registrations = getRegistrations(instance, theClass)\n const reg = registrations.length ? registrations[0] : widgets.newThing(index)\n return [\n st(reg, ns.solid('instance'), instance, index),\n st(reg, ns.solid('forClass'), theClass, index)\n ]\n }\n\n function renderScopeCheckbox (scope) {\n const statements = registrationStatements(scope.index)\n const name = scopeLabel(context, scope)\n const label = `${name} link to this ${context.noun}`\n return widgets.buildCheckboxForm(\n context.dom,\n solidLogicSingleton.store,\n label,\n null,\n statements,\n form,\n scope.index\n )\n }\n /// / body of registrationControl\n const dom = context.dom\n if (!dom || !context.div) {\n throw new Error('registrationControl: need dom and div')\n }\n const box = dom.createElement('div')\n context.div.appendChild(box)\n context.me = authn.currentUser() // @@\n const me = context.me\n if (!me) {\n box.innerHTML = '<p style=\"margin:2em;\">(Log in to save a link to this)</p>'\n return context\n }\n\n let scopes // @@ const\n try {\n scopes = await loadAllTypeIndexes(me)\n } catch (e) {\n let msg\n if (context.div && context.preferencesFileError) {\n msg = '(Lists of stuff not available)'\n context.div.appendChild(dom.createElement('p')).textContent = msg\n } else if (context.div) {\n msg = `registrationControl: Type indexes not available: ${e}`\n context.div.appendChild(widgets.errorMessageBlock(context.dom, e))\n }\n debug.log(msg)\n return context\n }\n\n box.innerHTML = '<table><tbody></tbody></table>' // tbody will be inserted anyway\n box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;')\n const tbody = box.children[0].children[0]\n const form = new BlankNode() // @@ say for now\n\n for (const scope of scopes) {\n const row = tbody.appendChild(dom.createElement('tr'))\n row.appendChild(renderScopeCheckbox(scope)) // @@ index\n }\n return context\n}\n\nexport function renderScopeHeadingRow (context, store, scope) {\n const backgroundColor = { private: '#fee', public: '#efe' }\n const { dom } = context\n const name = scopeLabel(context, scope)\n const row = dom.createElement('tr')\n const cell = row.appendChild(dom.createElement('td'))\n cell.setAttribute('colspan', '3')\n cell.style.backgoundColor = backgroundColor[scope.label] || 'white'\n const header = cell.appendChild(dom.createElement('h3'))\n header.textContent = name + ' links'\n header.style.textAlign = 'left'\n return row\n}\n/**\n * UI to List at all registered things\n */\nexport async function registrationList (context: AuthenticationContext, options: {\n private?: boolean\n public?: boolean\n type?: NamedNode\n}): Promise<AuthenticationContext> {\n const dom = context.dom as HTMLDocument\n const div = context.div as HTMLElement\n\n const box = dom.createElement('div')\n div.appendChild(box)\n context.me = authn.currentUser() // @@\n if (!context.me) {\n box.innerHTML = '<p style=\"margin:2em;\">(Log in list your stuff)</p>'\n return context\n }\n\n const scopes = await loadAllTypeIndexes(context.me) // includes community indexes\n\n // console.log('@@ registrationList ', scopes)\n box.innerHTML = '<table><tbody></tbody></table>' // tbody will be inserted anyway\n box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;')\n const table = box.firstChild as HTMLElement\n const tbody = table.firstChild as HTMLElement\n\n for (const scope of scopes) { // need some predicate for listing/adding agents\n const headingRow = renderScopeHeadingRow(context, store, scope)\n tbody.appendChild(headingRow)\n const items = await getScopedAppsFromIndex(scope, options.type || null) // any class\n if (items.length === 0) headingRow.style.display = 'none'\n // console.log(`registrationList: @@ instance items for class ${options.type || 'undefined' }:`, items)\n for (const item of items) {\n const row = widgets.personTR(dom, ns.solid('instance'), item.instance, {\n deleteFunction: async () => {\n await deleteTypeIndexRegistration(item)\n tbody.removeChild(row)\n }\n })\n row.children[0].style.paddingLeft = '3em'\n\n tbody.appendChild(row)\n }\n }\n return context\n} // registrationList\n\nfunction getDefaultSignInButtonStyle (): string {\n return 'padding: 1em; border-radius:0.5em; font-size: 100%;'\n}\n\n/**\n * Bootstrapping identity\n * (Called by `loginStatusBox()`)\n *\n * @param dom\n * @param setUserCallback\n *\n * @returns\n */\nfunction signInOrSignUpBox (\n dom: HTMLDocument,\n setUserCallback: (user: string) => void,\n options: {\n buttonStyle?: string;\n } = {}\n): HTMLElement {\n options = options || {}\n const signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle()\n\n // @@ TODO Remove the need to cast HTML element to any\n const box: any = dom.createElement('div')\n const magicClassName = 'SolidSignInOrSignUpBox'\n debug.log('widgets.signInOrSignUpBox')\n box.setUserCallback = setUserCallback\n box.setAttribute('class', magicClassName);\n (box as any).style = 'display:flex;' // @@ fix all typecasts like this\n\n // Sign in button with PopUP\n const signInPopUpButton = dom.createElement('input') // multi\n box.appendChild(signInPopUpButton)\n signInPopUpButton.setAttribute('type', 'button')\n signInPopUpButton.setAttribute('value', 'Log in')\n signInPopUpButton.setAttribute('style', `${signInButtonStyle}background-color: #eef;`)\n\n authSession.onLogin(() => {\n const me = authn.currentUser()\n // const sessionInfo = authSession.info\n // if (sessionInfo && sessionInfo.isLoggedIn) {\n if (me) {\n // const webIdURI = sessionInfo.webId\n const webIdURI = me.uri\n // setUserCallback(webIdURI)\n const divs = dom.getElementsByClassName(magicClassName)\n debug.log(`Logged in, ${divs.length} panels to be serviced`)\n // At the same time, satisfy all the other login boxes\n for (let i = 0; i < divs.length; i++) {\n const div: any = divs[i]\n // @@ TODO Remove the need to manipulate HTML elements\n if (div.setUserCallback) {\n try {\n div.setUserCallback(webIdURI)\n const parent = div.parentNode\n if (parent) {\n parent.removeChild(div)\n }\n } catch (e) {\n debug.log(`## Error satisfying login box: ${e}`)\n div.appendChild(widgets.errorMessageBlock(dom, e))\n }\n }\n }\n }\n })\n\n signInPopUpButton.addEventListener(\n 'click',\n () => {\n const offline = offlineTestID()\n if (offline) return setUserCallback(offline.uri)\n\n renderSignInPopup(dom)\n },\n false\n )\n\n // Sign up button\n const signupButton = dom.createElement('input')\n box.appendChild(signupButton)\n signupButton.setAttribute('type', 'button')\n signupButton.setAttribute('value', 'Sign Up for Solid')\n signupButton.setAttribute('style', `${signInButtonStyle}background-color: #efe;`)\n\n signupButton.addEventListener(\n 'click',\n function (_event) {\n const signupMgr = new Signup()\n signupMgr.signup().then(function (uri) {\n debug.log('signInOrSignUpBox signed up ' + uri)\n setUserCallback(uri)\n })\n },\n false\n )\n return box\n}\n\nexport function renderSignInPopup (dom: HTMLDocument) {\n /**\n * Issuer Menu\n */\n const issuerPopup = dom.createElement('div')\n issuerPopup.setAttribute(\n 'style',\n 'position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center;'\n )\n dom.body.appendChild(issuerPopup)\n const issuerPopupBox = dom.createElement('div')\n issuerPopupBox.setAttribute(\n 'style',\n `\n background-color: white;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -moz-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -o-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n min-width: 400px;\n padding: 10px;\n z-index : 10;\n `\n )\n issuerPopup.appendChild(issuerPopupBox)\n const issuerPopupBoxTopMenu = dom.createElement('div')\n issuerPopupBoxTopMenu.setAttribute(\n 'style',\n `\n border-bottom: 1px solid #DDD;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n `\n )\n issuerPopupBox.appendChild(issuerPopupBoxTopMenu)\n const issuerPopupBoxLabel = dom.createElement('label')\n issuerPopupBoxLabel.setAttribute('style', 'margin-right: 5px; font-weight: 800')\n issuerPopupBoxLabel.innerText = 'Select an identity provider'\n const issuerPopupBoxCloseButton = dom.createElement('button')\n issuerPopupBoxCloseButton.innerHTML =\n '<img src=\"https://solidos.github.io/solid-ui/src/icons/noun_1180156.svg\" style=\"width: 2em; height: 2em;\" title=\"Cancel\">'\n issuerPopupBoxCloseButton.setAttribute('style', 'background-color: transparent; border: none;')\n issuerPopupBoxCloseButton.addEventListener('click', () => {\n issuerPopup.remove()\n })\n issuerPopupBoxTopMenu.appendChild(issuerPopupBoxLabel)\n issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton)\n\n const loginToIssuer = async (issuerUri: string) => {\n try {\n // Save hash\n const preLoginRedirectHash = new URL(window.location.href).hash\n if (preLoginRedirectHash) {\n window.localStorage.setItem('preLoginRedirectHash', preLoginRedirectHash)\n }\n window.localStorage.setItem('loginIssuer', issuerUri)\n // Login\n await authSession.login({\n redirectUrl: window.location.href,\n oidcIssuer: issuerUri\n })\n } catch (err) {\n alert(err.message)\n }\n }\n\n /**\n * Text-based idp selection\n */\n const issuerTextContainer = dom.createElement('div')\n issuerTextContainer.setAttribute(\n 'style',\n `\n border-bottom: 1px solid #DDD;\n display: flex;\n flex-direction: column;\n padding-top: 10px;\n `\n )\n const issuerTextInputContainer = dom.createElement('div')\n issuerTextInputContainer.setAttribute(\n 'style',\n `\n display: flex;\n flex-direction: row;\n `\n )\n const issuerTextLabel = dom.createElement('label')\n issuerTextLabel.innerText = 'Enter the URL of your identity provider:'\n issuerTextLabel.setAttribute('style', 'color: #888')\n const issuerTextInput = dom.createElement('input')\n issuerTextInput.setAttribute('type', 'text')\n issuerTextInput.setAttribute(\n 'style',\n 'margin-left: 0 !important; flex: 1; margin-right: 5px !important'\n )\n issuerTextInput.setAttribute('placeholder', 'https://example.com')\n issuerTextInput.value = localStorage.getItem('loginIssuer') || ''\n const issuerTextGoButton = dom.createElement('button')\n issuerTextGoButton.innerText = 'Go'\n issuerTextGoButton.setAttribute('style', 'margin-top: 12px; margin-bottom: 12px;')\n issuerTextGoButton.addEventListener('click', () => {\n loginToIssuer(issuerTextInput.value)\n })\n issuerTextContainer.appendChild(issuerTextLabel)\n issuerTextInputContainer.appendChild(issuerTextInput)\n issuerTextInputContainer.appendChild(issuerTextGoButton)\n issuerTextContainer.appendChild(issuerTextInputContainer)\n issuerPopupBox.appendChild(issuerTextContainer)\n\n /**\n * Button-based idp selection\n */\n const issuerButtonContainer = dom.createElement('div')\n issuerButtonContainer.setAttribute(\n 'style',\n `\n display: flex;\n flex-direction: column;\n padding-top: 10px;\n `\n )\n const issuerBottonLabel = dom.createElement('label')\n issuerBottonLabel.innerText = 'Or pick an identity provider from the list below:'\n issuerBottonLabel.setAttribute('style', 'color: #888')\n issuerButtonContainer.appendChild(issuerBottonLabel)\n getSuggestedIssuers().forEach((issuerInfo) => {\n const issuerButton = dom.createElement('button')\n issuerButton.innerText = issuerInfo.name\n issuerButton.setAttribute('style', 'height: 38px; margin-top: 10px')\n issuerButton.addEventListener('click', () => {\n loginToIssuer(issuerInfo.uri)\n })\n issuerButtonContainer.appendChild(issuerButton)\n })\n issuerPopupBox.appendChild(issuerButtonContainer)\n}\n\n/**\n * Login status box\n *\n * A big sign-up/sign in box or a logout box depending on the state\n *\n * @param dom\n * @param listener\n *\n * @returns\n */\nexport function loginStatusBox (\n dom: HTMLDocument,\n listener: ((uri: string | null) => void) | null = null,\n options: {\n buttonStyle?: string;\n } = {}\n): HTMLElement {\n // 20190630\n let me = offlineTestID()\n // @@ TODO Remove the need to cast HTML element to any\n const box: any = dom.createElement('div')\n\n function setIt (newidURI) {\n if (!newidURI) {\n return\n }\n\n // const uri = newidURI.uri || newidURI\n // me = sym(uri)\n me = authn.saveUser(newidURI)\n box.refresh()\n if (listener) listener(me!.uri)\n }\n\n function logoutButtonHandler (_event) {\n const oldMe = me\n authSession.logout().then(\n function () {\n const message = `Your WebID was ${oldMe}. It has been forgotten.`\n me = null\n try {\n alert(message)\n } catch (e) {\n window.alert(message)\n }\n box.refresh()\n if (listener) listener(null)\n },\n (err) => {\n alert('Fail to log out:' + err)\n }\n )\n }\n\n function logoutButton (me, options) {\n const signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle()\n let logoutLabel = 'WebID logout'\n if (me) {\n const nick =\n solidLogicSingleton.store.any(me, ns.foaf('nick')) ||\n solidLogicSingleton.store.any(me, ns.foaf('name'))\n if (nick) {\n logoutLabel = 'Logout ' + nick.value\n }\n }\n const signOutButton = dom.createElement('input')\n // signOutButton.className = 'WebIDCancelButton'\n signOutButton.setAttribute('type', 'button')\n signOutButton.setAttribute('value', logoutLabel)\n signOutButton.setAttribute('style', `${signInButtonStyle}background-color: #eee;`)\n signOutButton.addEventListener('click', logoutButtonHandler, false)\n return signOutButton\n }\n\n box.refresh = function () {\n const sessionInfo = authSession.info\n if (sessionInfo && sessionInfo.webId && sessionInfo.isLoggedIn) {\n me = solidLogicSingleton.store.sym(sessionInfo.webId)\n } else {\n me = null\n }\n if ((me && box.me !== me.uri) || (!me && box.me)) {\n widgets.clearElement(box)\n if (me) {\n box.appendChild(logoutButton(me, options))\n } else {\n box.appendChild(signInOrSignUpBox(dom, setIt, options))\n }\n }\n box.me = me ? me.uri : null\n }\n box.refresh()\n\n function trackSession () {\n me = authn.currentUser()\n box.refresh()\n }\n trackSession()\n\n authSession.onLogin(trackSession)\n authSession.onLogout(trackSession)\n box.me = '99999' // Force refresh\n box.refresh()\n return box\n}\n\nauthSession.onLogout(async () => {\n const issuer = window.localStorage.getItem('loginIssuer')\n if (issuer) {\n try {\n const wellKnownUri = new URL(issuer)\n wellKnownUri.pathname = '/.well-known/openid-configuration'\n const wellKnownResult = await fetch(wellKnownUri.toString())\n if (wellKnownResult.status === 200) {\n const openidConfiguration = await wellKnownResult.json()\n if (openidConfiguration && openidConfiguration.end_session_endpoint) {\n await fetch(openidConfiguration.end_session_endpoint, { credentials: 'include' })\n }\n }\n } catch (err) {\n // Do nothing\n }\n }\n window.location.reload()\n})\n\n/**\n * Workspace selection etc\n * See https://github.com/solidos/userguide/issues/16\n */\n\n/**\n * Returns a UI object which, if it selects a workspace,\n * will callback(workspace, newBase).\n * See https://github.com/solidos/userguide/issues/16 for more info on workspaces.\n *\n * If necessary, will get an account, preference file, etc. In sequence:\n *\n * - If not logged in, log in.\n * - Load preference file\n * - Prompt user for workspaces\n * - Allows the user to just type in a URI by hand\n *\n * Calls back with the workspace and the base URI\n *\n * @param dom\n * @param appDetails\n * @param callbackWS\n */\nexport function selectWorkspace (\n dom: HTMLDocument,\n appDetails: AppDetails,\n callbackWS: (workspace: string | null, newBase: string) => void\n): HTMLElement {\n const noun = appDetails.noun\n const appPathSegment = appDetails.appPathSegment\n\n const me = offlineTestID()\n const box = dom.createElement('div')\n const context: AuthenticationContext = { me, dom, div: box }\n\n function say (s, background) {\n box.appendChild(widgets.errorMessageBlock(dom, s, background))\n }\n\n function figureOutBase (ws) {\n const newBaseNode: NamedNode = solidLogicSingleton.store.any(\n ws,\n ns.space('uriPrefix')\n ) as NamedNode\n let newBaseString: string\n if (!newBaseNode) {\n newBaseString = ws.uri.split('#')[0]\n } else {\n newBaseString = newBaseNode.value\n }\n if (newBaseString.slice(-1) !== '/') {\n debug.log(`${appPathSegment}: No / at end of uriPrefix ${newBaseString}`) // @@ paramater?\n newBaseString = `${newBaseString}/`\n }\n const now = new Date()\n newBaseString += `${appPathSegment}/id${now.getTime()}/` // unique id\n return newBaseString\n }\n\n function displayOptions (context) {\n // console.log('displayOptions!', context)\n async function makeNewWorkspace (_event) {\n const row = table.appendChild(dom.createElement('tr'))\n const cell = row.appendChild(dom.createElement('td'))\n cell.setAttribute('colspan', '3')\n cell.style.padding = '0.5em'\n const newBase = encodeURI(\n await widgets.askName(\n dom,\n solidLogicSingleton.store,\n cell,\n ns.solid('URL'),\n ns.space('Workspace'),\n 'Workspace'\n )\n )\n const newWs = widgets.newThing(context.preferencesFile)\n const newData = [\n st(context.me, ns.space('workspace'), newWs, context.preferencesFile),\n // eslint-disable-next-line camelcase\n st(\n newWs,\n ns.space('uriPrefix'),\n newBase as unknown as Quad_Object,\n context.preferencesFile\n )\n ]\n if (!solidLogicSingleton.store.updater) {\n throw new Error('store has no updater')\n }\n await solidLogicSingleton.store.updater.update([], newData)\n // @@ now refresh list of workspaces\n }\n\n // const status = ''\n const id = context.me\n const preferencesFile = context.preferencesFile\n let newBase: any = null\n\n // A workspace specifically defined in the private preference file:\n let w: any = solidLogicSingleton.store.each(\n id,\n ns.space('workspace'),\n undefined,\n preferencesFile\n ) // Only trust preference file here\n\n // A workspace in a storage in the public profile:\n const storages = solidLogicSingleton.store.each(id, ns.space('storage')) // @@ No provenance requirement at the moment\n if (w.length === 0 && storages) {\n say(\n `You don't seem to have any workspaces. You have ${storages.length} storage spaces.`,\n 'white'\n )\n storages\n .map(function (s: any) {\n w = w.concat(solidLogicSingleton.store.each(s, ns.ldp('contains')))\n return w\n })\n .filter((file) => {\n return file.id ? ['public', 'private'].includes(file.id().toLowerCase()) : ''\n })\n }\n\n if (w.length === 1) {\n say(`Workspace used: ${w[0].uri}`, 'white') // @@ allow user to see URI\n newBase = figureOutBase(w[0])\n // callbackWS(w[0], newBase)\n // } else if (w.length === 0) {\n }\n\n // Prompt for ws selection or creation\n // say( w.length + \" workspaces for \" + id + \"Choose one.\");\n const table = dom.createElement('table')\n table.setAttribute('style', 'border-collapse:separate; border-spacing: 0.5em;')\n\n // const popup = window.open(undefined, '_blank', { height: 300, width:400 }, false)\n box.appendChild(table)\n\n // Add a field for directly adding the URI yourself\n\n // const hr = box.appendChild(dom.createElement('hr')) // @@\n box.appendChild(dom.createElement('hr')) // @@\n\n const p = box.appendChild(dom.createElement('p'));\n (p as any).style = commentStyle\n p.textContent = `Where would you like to store the data for the ${noun}?\n Give the URL of the folder where you would like the data stored.\n It can be anywhere in solid world - this URI is just an idea.`\n // @@ TODO Remove the need to cast baseField to any\n const baseField: any = box.appendChild(dom.createElement('input'))\n baseField.setAttribute('type', 'text');\n (baseField as any).style = textInputStyle\n baseField.size = 80 // really a string\n baseField.label = 'base URL'\n baseField.autocomplete = 'on'\n if (newBase) {\n // set to default\n baseField.value = newBase\n }\n\n context.baseField = baseField\n\n box.appendChild(dom.createElement('br')) // @@\n\n const button = box.appendChild(dom.createElement('button'));\n (button as any).style = buttonStyle\n button.textContent = `Start new ${noun} at this URI`\n button.addEventListener('click', function (_event) {\n let newBase = baseField.value.replace(' ', '%20') // do not re-encode in general, as % encodings may exist\n if (newBase.slice(-1) !== '/') {\n newBase += '/'\n }\n callbackWS(null, newBase)\n })\n\n // Now go set up the table of spaces\n\n // const row = 0\n w = w.filter(function (x) {\n return !solidLogicSingleton.store.holds(\n x,\n ns.rdf('type'), // Ignore master workspaces\n ns.space('MasterWorkspace')\n )\n })\n let col1, col2, col3, tr, ws, style, comment\n const cellStyle = 'height: 3em; margin: 1em; padding: 1em white; border-radius: 0.3em;'\n const deselectedStyle = `${cellStyle}border: 0px;`\n // const selectedStyle = cellStyle + 'border: 1px solid black;'\n for (let i = 0; i < w.length; i++) {\n ws = w[i]\n tr = dom.createElement('tr')\n if (i === 0) {\n col1 = dom.createElement('td')\n col1.setAttribute('rowspan', `${w.length}`)\n col1.textContent = 'Choose a workspace for this:'\n col1.setAttribute('style', 'vertical-align:middle;')\n tr.appendChild(col1)\n }\n col2 = dom.createElement('td')\n style = solidLogicSingleton.store.anyValue(ws, ns.ui('style'))\n if (!style) {\n // Otherwise make up arbitrary colour\n const hash = function (x) {\n return x.split('').reduce(function (a, b) {\n a = (a << 5) - a + b.charCodeAt(0)\n return a & a\n }, 0)\n }\n const bgcolor = `#${((hash(ws.uri) & 0xffffff) | 0xc0c0c0).toString(16)}` // c0c0c0 forces pale\n style = `color: black ; background-color: ${bgcolor};`\n }\n col2.setAttribute('style', deselectedStyle + style)\n tr.target = ws.uri\n let label = solidLogicSingleton.store.any(ws, ns.rdfs('label'))\n if (!label) {\n label = ws.uri.split('/').slice(-1)[0] || ws.uri.split('/').slice(-2)[0]\n }\n col2.textContent = label || '???'\n tr.appendChild(col2)\n if (i === 0) {\n col3 = dom.createElement('td')\n col3.setAttribute('rowspan', `${w.length}1`)\n // col3.textContent = '@@@@@ remove';\n col3.setAttribute('style', 'width:50%;')\n tr.appendChild(col3)\n }\n table.appendChild(tr)\n\n comment = solidLogicSingleton.store.any(ws, ns.rdfs('comment'))\n comment = comment ? comment.value : 'Use this workspace'\n col2.addEventListener(\n 'click',\n function (_event) {\n col3.textContent = comment ? comment.value : ''\n col3.setAttribute('style', deselectedStyle + style)\n const button = dom.createElement('button')\n button.textContent = 'Continue'\n // button.setAttribute('style', style);\n const newBase = figureOutBase(ws)\n baseField.value = newBase // show user proposed URI\n\n button.addEventListener(\n 'click',\n function (_event) {\n button.disabled = true\n callbackWS(ws, newBase)\n button.textContent = '---->'\n },\n true\n ) // capture vs bubble\n col3.appendChild(button)\n },\n true\n ) // capture vs bubble\n }\n\n // last line with \"Make new workspace\"\n const trLast = dom.createElement('tr')\n col2 = dom.createElement('td')\n col2.setAttribute('style', cellStyle)\n col2.textContent = '+ Make a new workspace'\n col2.addEventListener('click', makeNewWorkspace)\n trLast.appendChild(col2)\n table.appendChild(trLast)\n } // displayOptions\n\n // console.log('kicking off async operation')\n ensureLoadedPreferences(context) // kick off async operation\n .then(displayOptions)\n .catch((err) => {\n // console.log(\"err from async op\")\n box.appendChild(widgets.errorMessageBlock(context.dom, err))\n })\n\n return box // return the box element, while login proceeds\n} // selectWorkspace\n\n/**\n * Creates a new instance of an app.\n *\n * An instance of an app could be e.g. an issue tracker for a given project,\n * or a chess game, or calendar, or a health/fitness record for a person.\n *\n * Note that this use of the term 'app' refers more to entries in the user's\n * type index than to actual software applications that use the personal data\n * to which these entries point.\n *\n * @param dom\n * @param appDetails\n * @param callback\n *\n * @returns A div with a button in it for making a new app instance\n */\nexport function newAppInstance (\n dom: HTMLDocument,\n appDetails: AppDetails,\n callback: (workspace: string | null, newBase: string) => void\n): HTMLElement {\n const gotWS = function (ws, base) {\n // log.debug(\"newAppInstance: Selected workspace = \" + (ws? ws.uri : 'none'))\n callback(ws, base)\n }\n const div = dom.createElement('div')\n const b = dom.createElement('button')\n b.setAttribute('type', 'button')\n div.appendChild(b)\n b.innerHTML = `Make new ${appDetails.noun}`\n b.addEventListener(\n 'click',\n (_event) => {\n div.appendChild(selectWorkspace(dom, appDetails, gotWS))\n },\n false\n )\n div.appendChild(b)\n return div\n}\n/**\n * Retrieves whether the currently logged in user is a power user\n * and/or a developer\n */\nexport async function getUserRoles (): Promise<Array<NamedNode>> {\n try {\n const { me, preferencesFile, preferencesFileError } = await ensureLoadedPreferences({})\n if (!preferencesFile || preferencesFileError) {\n throw new Error(preferencesFileError)\n }\n return solidLogicSingleton.store.each(\n me,\n ns.rdf('type'),\n null,\n preferencesFile.doc()\n ) as NamedNode[]\n } catch (error) {\n debug.warn('Unable to fetch your preferences - this was the error: ', error)\n }\n return []\n}\n\n/**\n * Filters which panes should be available, based on the result of [[getUserRoles]]\n */\nexport async function filterAvailablePanes (\n panes: Array<PaneDefinition>\n): Promise<Array<PaneDefinition>> {\n const userRoles = await getUserRoles()\n return panes.filter((pane) => isMatchingAudience(pane, userRoles))\n}\n\nfunction isMatchingAudience (pane: PaneDefinition, userRoles: Array<NamedNode>): boolean {\n const audience = pane.audience || []\n return audience.reduce(\n (isMatch, audienceRole) => isMatch && !!userRoles.find((role) => role.equals(audienceRole)),\n true as boolean\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA;AAGA;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AAAqC;AAAA;AAAA;AAAA;AAAA;AAErC,IAAMA,KAAK,GAAGC,+BAAmB,CAACD,KAAK;AAEvC,4BAGIC,+BAAmB,CAACC,OAAO;EAF7BC,eAAe,yBAAfA,eAAe;EACfC,WAAW,yBAAXA,WAAW;AAGb,6BAMIH,+BAAmB,CAACI,SAAS;EAL/BC,qBAAqB,0BAArBA,qBAAqB;EACrBC,gBAAgB,0BAAhBA,gBAAgB;EAChBC,kBAAkB,0BAAlBA,kBAAkB;EAClBC,sBAAsB,0BAAtBA,sBAAsB;EACtBC,2BAA2B,0BAA3BA,2BAA2B;;AAG7B;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,cAAc,CAAEC,OAA8B,EAAkC;EAC9F,IAAMC,EAAE,GAAGC,iBAAK,CAACC,WAAW,EAAE;EAC9B,IAAIF,EAAE,EAAE;IACNC,iBAAK,CAACE,QAAQ,CAACH,EAAE,EAAED,OAAO,CAAC;IAC3B,OAAOK,OAAO,CAACC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UAAA,MACpC,IAAIO,KAAK,CAACP,oBAAoB,CAAC;QAAA;UAAA,mCAEhC/C,+BAAmB,CAACD,KAAK,CAAC2O,IAAI,CACnC9N,EAAE,EACF2E,EAAE,CAACqK,GAAG,CAAC,MAAM,CAAC,EACd,IAAI,EACJzN,eAAe,CAACiP,GAAG,EAAE,CACtB;QAAA;UAAA;UAAA;UAED/P,KAAK,CAAC4B,IAAI,CAAC,yDAAyD,gBAAQ;QAAA;UAAA,mCAEvE,EAAE;QAAA;QAAA;UAAA;MAAA;IAAA;EAAA,CACV;EAAA;AAAA;AAAA,SAKqBoO,oBAAoB;EAAA;AAAA;AAAA;EAAA,sGAAnC,mBACLC,KAA4B;IAAA;IAAA;MAAA;QAAA;UAAA;UAAA,OAEJH,YAAY,EAAE;QAAA;UAAhCI,SAAS;UAAA,mCACRD,KAAK,CAACzN,MAAM,CAAC,UAAC2N,IAAI;YAAA,OAAKC,kBAAkB,CAACD,IAAI,EAAED,SAAS,CAAC;UAAA,EAAC;QAAA;QAAA;UAAA;MAAA;IAAA;EAAA,CACnE;EAAA;AAAA;AAED,SAASE,kBAAkB,CAAED,IAAoB,EAAED,SAA2B,EAAW;EACvF,IAAMG,QAAQ,GAAGF,IAAI,CAACE,QAAQ,IAAI,EAAE;EACpC,OAAOA,QAAQ,CAACpB,MAAM,CACpB,UAACqB,OAAO,EAAEC,YAAY;IAAA,OAAKD,OAAO,IAAI,CAAC,CAACJ,SAAS,CAACM,IAAI,CAAC,UAACC,IAAI;MAAA,OAAKA,IAAI,CAACC,MAAM,CAACH,YAAY,CAAC;IAAA,EAAC;EAAA,GAC3F,IAAI,CACL;AACH"}
1
+ {"version":3,"file":"login.js","names":["_rdflib","require","_solidLogic","debug","_interopRequireWildcard","_log","ns","_signup","_style","utils","widgets","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","step","next","_e2","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","arr","len","arr2","store","solidLogicSingleton","_solidLogicSingleton$","profile","loadPreferences","loadProfile","_solidLogicSingleton$2","typeIndex","getScopedAppInstances","getRegistrations","loadAllTypeIndexes","getScopedAppsFromIndex","deleteTypeIndexRegistration","ensureLoggedIn","context","me","authn","currentUser","saveUser","Promise","resolve","checkUser","then","webId","log","concat","div","dom","box","loginStatusBox","webIdUri","appendChild","ensureLoadedPreferences","_x","_ensureLoadedPreferences","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee4","statusArea","progressDisplay","complain","preferencesFile","m2","wrap","_callee4$","_context4","prev","_complain","message","errorMessageBlock","abrupt","ensureLoadedProfile","sent","parentNode","removeChild","t0","UnauthorizedError","alert","CrossOriginForbiddenError","window","location","origin","preferencesFileError","SameOriginForbiddenError","warn","NotEditableError","WebOperationError","FetchError","status","Error","stop","_x2","_ensureLoadedProfile","_callee5","logInContext","_callee5$","_context5","publicProfile","findAppInstances","_x3","_x4","_x5","_findAppInstances","_callee6","theClass","isPublic","items","_callee6$","_context6","filter","item","scope","label","instances","map","instance","scopeLabel","mine","sameTerm","agent","registrationControl","_x6","_x7","_x8","_registrationControl","_callee7","registrationStatements","renderScopeCheckbox","scopes","msg","tbody","form","_iterator","_step","row","_callee7$","_context7","_renderScopeCheckbox","statements","index","noun","buildCheckboxForm","_registrationStatemen","registrations","reg","newThing","st","solid","createElement","innerHTML","textContent","setAttribute","children","BlankNode","renderScopeHeadingRow","backgroundColor","cell","style","backgoundColor","header","textAlign","registrationList","_x9","_x10","_registrationList","_callee9","options","table","_iterator2","_step2","headingRow","_iterator3","_step3","_loop","_callee9$","_context10","firstChild","type","display","_loop$","_context9","personTR","deleteFunction","_deleteFunction","_callee8","_callee8$","_context8","paddingLeft","delegateYield","t1","finish","t2","getDefaultSignInButtonStyle","signInOrSignUpBox","setUserCallback","undefined","signInButtonStyle","buttonStyle","magicClassName","signInPopUpButton","authSession","onLogin","webIdURI","uri","divs","getElementsByClassName","parent","addEventListener","offline","offlineTestID","renderSignInPopup","signupButton","_event","signupMgr","Signup","signup","issuerPopup","body","issuerPopupBox","issuerPopupBoxTopMenu","issuerPopupBoxLabel","innerText","issuerPopupBoxCloseButton","remove","loginToIssuer","_ref","_callee","issuerUri","preLoginRedirectHash","_callee$","_context","URL","href","hash","localStorage","setItem","login","redirectUrl","oidcIssuer","_x11","issuerTextContainer","issuerTextInputContainer","issuerTextLabel","issuerTextInput","getItem","issuerTextGoButton","issuerButtonContainer","issuerBottonLabel","getSuggestedIssuers","forEach","issuerInfo","issuerButton","listener","setIt","newidURI","refresh","logoutButtonHandler","oldMe","logout","logoutButton","logoutLabel","nick","any","foaf","signOutButton","sessionInfo","info","isLoggedIn","sym","clearElement","trackSession","onLogout","_callee2","issuer","wellKnownUri","wellKnownResult","openidConfiguration","_callee2$","_context2","pathname","fetch","json","end_session_endpoint","credentials","reload","selectWorkspace","appDetails","callbackWS","appPathSegment","say","background","figureOutBase","ws","newBaseNode","space","newBaseString","split","now","Date","getTime","displayOptions","makeNewWorkspace","_x12","_makeNewWorkspace","_callee3","newBase","newWs","newData","_callee3$","_context3","padding","encodeURI","askName","updater","update","id","w","each","storages","ldp","file","includes","toLowerCase","p","commentStyle","baseField","textInputStyle","size","autocomplete","button","replace","x","holds","rdf","col1","col2","col3","tr","comment","cellStyle","deselectedStyle","anyValue","ui","reduce","a","b","charCodeAt","bgcolor","target","rdfs","disabled","trLast","newAppInstance","callback","gotWS","base","getUserRoles","_getUserRoles","_callee10","_yield$ensureLoadedPr","_callee10$","_context11","doc","filterAvailablePanes","_x13","_filterAvailablePanes","_callee11","panes","userRoles","_callee11$","_context12","pane","isMatchingAudience","audience","isMatch","audienceRole","find","role","equals"],"sources":["../../src/login/login.ts"],"sourcesContent":["/* eslint-disable camelcase */\n/**\n * Signing in, signing up, profile and preferences reloading\n * Type index management\n *\n * Many functions in this module take a context object which\n * holds various RDF symbols, add to it, and return a promise of it.\n *\n * * `me` RDF symbol for the user's WebID\n * * `publicProfile` The user's public profile, iff loaded\n * * `preferencesFile` The user's personal preference file, iff loaded\n * * `index.public` The user's public type index file\n * * `index.private` The user's private type index file\n *\n * Not RDF symbols:\n * * `noun` A string in english for the type of thing -- like \"address book\"\n * * `instance` An array of nodes which are existing instances\n * * `containers` An array of nodes of containers of instances\n * * `div` A DOM element where UI can be displayed\n * * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages\n * *\n * * Vocabulary: \"load\" loads a file if it exists;\n * * 'Ensure\" CREATES the file if it does not exist (if it can) and then loads it.\n * @packageDocumentation\n */\nimport { PaneDefinition } from 'pane-registry'\nimport { BlankNode, NamedNode, st } from 'rdflib'\n// eslint-disable-next-line camelcase\nimport { Quad_Object } from 'rdflib/lib/tf-types'\nimport {\n AppDetails,\n AuthenticationContext,\n authn,\n authSession,\n CrossOriginForbiddenError,\n FetchError,\n getSuggestedIssuers,\n NotEditableError,\n offlineTestID,\n SameOriginForbiddenError,\n solidLogicSingleton,\n UnauthorizedError,\n WebOperationError\n} from 'solid-logic'\nimport * as debug from '../debug'\nimport { alert } from '../log'\nimport * as ns from '../ns.js'\nimport { Signup } from '../signup/signup.js'\nimport { buttonStyle, commentStyle, textInputStyle } from '../style'\nimport * as utils from '../utils'\nimport * as widgets from '../widgets'\n\nconst store = solidLogicSingleton.store\n\nconst {\n loadPreferences,\n loadProfile\n} = solidLogicSingleton.profile\n\nconst {\n getScopedAppInstances,\n getRegistrations,\n loadAllTypeIndexes,\n getScopedAppsFromIndex,\n deleteTypeIndexRegistration\n} = solidLogicSingleton.typeIndex\n\n/**\n * Resolves with the logged in user's WebID\n *\n * @param context\n */\n// used to be logIn\nexport function ensureLoggedIn (context: AuthenticationContext): Promise<AuthenticationContext> {\n const me = authn.currentUser()\n if (me) {\n authn.saveUser(me, context)\n return Promise.resolve(context)\n }\n\n return new Promise((resolve) => {\n authn.checkUser().then((webId) => {\n // Already logged in?\n if (webId) {\n debug.log(`logIn: Already logged in as ${webId}`)\n return resolve(context)\n }\n if (!context.div || !context.dom) {\n return resolve(context)\n }\n const box = loginStatusBox(context.dom, (webIdUri) => {\n authn.saveUser(webIdUri, context)\n resolve(context) // always pass growing context\n })\n context.div.appendChild(box)\n })\n })\n}\n\n/**\n * Loads preference file\n * Do this after having done log in and load profile\n *\n * @private\n *\n * @param context\n */\n// used to be logInLoadPreferences\nexport async function ensureLoadedPreferences (\n context: AuthenticationContext\n): Promise<AuthenticationContext> {\n if (context.preferencesFile) return Promise.resolve(context) // already done\n\n const statusArea = context.statusArea || context.div || null\n let progressDisplay\n function complain (message) {\n message = `ensureLoadedPreferences: ${message}`\n if (statusArea) {\n // statusArea.innerHTML = ''\n statusArea.appendChild(widgets.errorMessageBlock(context.dom, message))\n }\n debug.log(message)\n // reject(new Error(message))\n }\n try {\n context = await ensureLoadedProfile(context)\n\n // console.log('back in Solid UI after logInLoadProfile', context)\n const preferencesFile = await loadPreferences(context.me as NamedNode)\n if (progressDisplay) {\n progressDisplay.parentNode.removeChild(progressDisplay)\n }\n context.preferencesFile = preferencesFile\n } catch (err) {\n let m2: string\n if (err instanceof UnauthorizedError) {\n m2 =\n 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?'\n alert(m2)\n } else if (err instanceof CrossOriginForbiddenError) {\n m2 = `Unauthorized: Assuming preference file blocked for origin ${window.location.origin}`\n context.preferencesFileError = m2\n return context\n } else if (err instanceof SameOriginForbiddenError) {\n m2 =\n 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.'\n debug.warn(m2)\n return context\n } else if (err instanceof NotEditableError) {\n m2 =\n 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.'\n debug.warn(m2)\n return context\n } else if (err instanceof WebOperationError) {\n m2 =\n 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.'\n debug.warn(m2)\n } else if (err instanceof FetchError) {\n m2 = `Strange: Error ${err.status} trying to read your preference file.${err.message}`\n alert(m2)\n } else {\n throw new Error(`(via loadPrefs) ${err}`)\n }\n }\n return context\n}\n\n/**\n * Logs the user in and loads their WebID profile document into the store\n *\n * @param context\n *\n * @returns Resolves with the context after login / fetch\n */\n// used to be logInLoadProfile\nexport async function ensureLoadedProfile (\n context: AuthenticationContext\n): Promise<AuthenticationContext> {\n if (context.publicProfile) {\n return context\n } // already done\n try {\n const logInContext = await ensureLoggedIn(context)\n if (!logInContext.me) {\n throw new Error('Could not log in')\n }\n context.publicProfile = await loadProfile(logInContext.me)\n } catch (err) {\n if (context.div && context.dom) {\n context.div.appendChild(widgets.errorMessageBlock(context.dom, err.message))\n }\n throw new Error(`Can't log in: ${err}`)\n }\n return context\n}\n\n/**\n * Returns promise of context with arrays of symbols\n *\n * leaving the `isPublic` param undefined will bring in community index things, too\n */\nexport async function findAppInstances (\n context: AuthenticationContext,\n theClass: NamedNode,\n isPublic?: boolean\n): Promise<AuthenticationContext> {\n let items = context.me ? await getScopedAppInstances(theClass, context.me) : []\n if (isPublic === true) { // old API - not recommended!\n items = items.filter(item => item.scope.label === 'public')\n } else if (isPublic === false) {\n items = items.filter(item => item.scope.label === 'private')\n }\n context.instances = items.map(item => item.instance)\n return context\n}\n\nexport function scopeLabel (context, scope) {\n const mine = context.me && context.me.sameTerm(scope.agent)\n const name = mine ? '' : utils.label(scope.agent) + ' '\n return `${name}${scope.label}`\n}\n/**\n * UI to control registration of instance\n */\nexport async function registrationControl (\n context: AuthenticationContext,\n instance,\n theClass\n): Promise<AuthenticationContext | void> {\n function registrationStatements (index) {\n const registrations = getRegistrations(instance, theClass)\n const reg = registrations.length ? registrations[0] : widgets.newThing(index)\n return [\n st(reg, ns.solid('instance'), instance, index),\n st(reg, ns.solid('forClass'), theClass, index)\n ]\n }\n\n function renderScopeCheckbox (scope) {\n const statements = registrationStatements(scope.index)\n const name = scopeLabel(context, scope)\n const label = `${name} link to this ${context.noun}`\n return widgets.buildCheckboxForm(\n context.dom,\n solidLogicSingleton.store,\n label,\n null,\n statements,\n form,\n scope.index\n )\n }\n /// / body of registrationControl\n const dom = context.dom\n if (!dom || !context.div) {\n throw new Error('registrationControl: need dom and div')\n }\n const box = dom.createElement('div')\n context.div.appendChild(box)\n context.me = authn.currentUser() // @@\n const me = context.me\n if (!me) {\n box.innerHTML = '<p style=\"margin:2em;\">(Log in to save a link to this)</p>'\n return context\n }\n\n let scopes // @@ const\n try {\n scopes = await loadAllTypeIndexes(me)\n } catch (e) {\n let msg\n if (context.div && context.preferencesFileError) {\n msg = '(Lists of stuff not available)'\n context.div.appendChild(dom.createElement('p')).textContent = msg\n } else if (context.div) {\n msg = `registrationControl: Type indexes not available: ${e}`\n context.div.appendChild(widgets.errorMessageBlock(context.dom, e))\n }\n debug.log(msg)\n return context\n }\n\n box.innerHTML = '<table><tbody></tbody></table>' // tbody will be inserted anyway\n box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;')\n const tbody = box.children[0].children[0]\n const form = new BlankNode() // @@ say for now\n\n for (const scope of scopes) {\n const row = tbody.appendChild(dom.createElement('tr'))\n row.appendChild(renderScopeCheckbox(scope)) // @@ index\n }\n return context\n}\n\nexport function renderScopeHeadingRow (context, store, scope) {\n const backgroundColor = { private: '#fee', public: '#efe' }\n const { dom } = context\n const name = scopeLabel(context, scope)\n const row = dom.createElement('tr')\n const cell = row.appendChild(dom.createElement('td'))\n cell.setAttribute('colspan', '3')\n cell.style.backgoundColor = backgroundColor[scope.label] || 'white'\n const header = cell.appendChild(dom.createElement('h3'))\n header.textContent = name + ' links'\n header.style.textAlign = 'left'\n return row\n}\n/**\n * UI to List at all registered things\n */\nexport async function registrationList (context: AuthenticationContext, options: {\n private?: boolean\n public?: boolean\n type?: NamedNode\n}): Promise<AuthenticationContext> {\n const dom = context.dom as HTMLDocument\n const div = context.div as HTMLElement\n\n const box = dom.createElement('div')\n div.appendChild(box)\n context.me = authn.currentUser() // @@\n if (!context.me) {\n box.innerHTML = '<p style=\"margin:2em;\">(Log in list your stuff)</p>'\n return context\n }\n\n const scopes = await loadAllTypeIndexes(context.me) // includes community indexes\n\n // console.log('@@ registrationList ', scopes)\n box.innerHTML = '<table><tbody></tbody></table>' // tbody will be inserted anyway\n box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;')\n const table = box.firstChild as HTMLElement\n const tbody = table.firstChild as HTMLElement\n\n for (const scope of scopes) { // need some predicate for listing/adding agents\n const headingRow = renderScopeHeadingRow(context, store, scope)\n tbody.appendChild(headingRow)\n const items = await getScopedAppsFromIndex(scope, options.type || null) // any class\n if (items.length === 0) headingRow.style.display = 'none'\n // console.log(`registrationList: @@ instance items for class ${options.type || 'undefined' }:`, items)\n for (const item of items) {\n const row = widgets.personTR(dom, ns.solid('instance'), item.instance, {\n deleteFunction: async () => {\n await deleteTypeIndexRegistration(item)\n tbody.removeChild(row)\n }\n })\n row.children[0].style.paddingLeft = '3em'\n\n tbody.appendChild(row)\n }\n }\n return context\n} // registrationList\n\nfunction getDefaultSignInButtonStyle (): string {\n return 'padding: 1em; border-radius:0.5em; font-size: 100%;'\n}\n\n/**\n * Bootstrapping identity\n * (Called by `loginStatusBox()`)\n *\n * @param dom\n * @param setUserCallback\n *\n * @returns\n */\nfunction signInOrSignUpBox (\n dom: HTMLDocument,\n setUserCallback: (user: string) => void,\n options: {\n buttonStyle?: string;\n } = {}\n): HTMLElement {\n options = options || {}\n const signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle()\n\n // @@ TODO Remove the need to cast HTML element to any\n const box: any = dom.createElement('div')\n const magicClassName = 'SolidSignInOrSignUpBox'\n debug.log('widgets.signInOrSignUpBox')\n box.setUserCallback = setUserCallback\n box.setAttribute('class', magicClassName);\n (box as any).style = 'display:flex;' // @@ fix all typecasts like this\n\n // Sign in button with PopUP\n const signInPopUpButton = dom.createElement('input') // multi\n box.appendChild(signInPopUpButton)\n signInPopUpButton.setAttribute('type', 'button')\n signInPopUpButton.setAttribute('value', 'Log in')\n signInPopUpButton.setAttribute('style', `${signInButtonStyle}background-color: #eef;`)\n\n authSession.onLogin(() => {\n const me = authn.currentUser()\n // const sessionInfo = authSession.info\n // if (sessionInfo && sessionInfo.isLoggedIn) {\n if (me) {\n // const webIdURI = sessionInfo.webId\n const webIdURI = me.uri\n // setUserCallback(webIdURI)\n const divs = dom.getElementsByClassName(magicClassName)\n debug.log(`Logged in, ${divs.length} panels to be serviced`)\n // At the same time, satisfy all the other login boxes\n for (let i = 0; i < divs.length; i++) {\n const div: any = divs[i]\n // @@ TODO Remove the need to manipulate HTML elements\n if (div.setUserCallback) {\n try {\n div.setUserCallback(webIdURI)\n const parent = div.parentNode\n if (parent) {\n parent.removeChild(div)\n }\n } catch (e) {\n debug.log(`## Error satisfying login box: ${e}`)\n div.appendChild(widgets.errorMessageBlock(dom, e))\n }\n }\n }\n }\n })\n\n signInPopUpButton.addEventListener(\n 'click',\n () => {\n const offline = offlineTestID()\n if (offline) return setUserCallback(offline.uri)\n\n renderSignInPopup(dom)\n },\n false\n )\n\n // Sign up button\n const signupButton = dom.createElement('input')\n box.appendChild(signupButton)\n signupButton.setAttribute('type', 'button')\n signupButton.setAttribute('value', 'Sign Up for Solid')\n signupButton.setAttribute('style', `${signInButtonStyle}background-color: #efe;`)\n\n signupButton.addEventListener(\n 'click',\n function (_event) {\n const signupMgr = new Signup()\n signupMgr.signup().then(function (uri) {\n debug.log('signInOrSignUpBox signed up ' + uri)\n setUserCallback(uri)\n })\n },\n false\n )\n return box\n}\n\nexport function renderSignInPopup (dom: HTMLDocument) {\n /**\n * Issuer Menu\n */\n const issuerPopup = dom.createElement('div')\n issuerPopup.setAttribute(\n 'style',\n 'position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center;'\n )\n dom.body.appendChild(issuerPopup)\n const issuerPopupBox = dom.createElement('div')\n issuerPopupBox.setAttribute(\n 'style',\n `\n background-color: white;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -moz-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -o-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n min-width: 400px;\n padding: 10px;\n z-index : 10;\n `\n )\n issuerPopup.appendChild(issuerPopupBox)\n const issuerPopupBoxTopMenu = dom.createElement('div')\n issuerPopupBoxTopMenu.setAttribute(\n 'style',\n `\n border-bottom: 1px solid #DDD;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n `\n )\n issuerPopupBox.appendChild(issuerPopupBoxTopMenu)\n const issuerPopupBoxLabel = dom.createElement('label')\n issuerPopupBoxLabel.setAttribute('style', 'margin-right: 5px; font-weight: 800')\n issuerPopupBoxLabel.innerText = 'Select an identity provider'\n const issuerPopupBoxCloseButton = dom.createElement('button')\n issuerPopupBoxCloseButton.innerHTML =\n '<img src=\"https://solidos.github.io/solid-ui/src/icons/noun_1180156.svg\" style=\"width: 2em; height: 2em;\" title=\"Cancel\">'\n issuerPopupBoxCloseButton.setAttribute('style', 'background-color: transparent; border: none;')\n issuerPopupBoxCloseButton.addEventListener('click', () => {\n issuerPopup.remove()\n })\n issuerPopupBoxTopMenu.appendChild(issuerPopupBoxLabel)\n issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton)\n\n const loginToIssuer = async (issuerUri: string) => {\n try {\n // Save hash\n const preLoginRedirectHash = new URL(window.location.href).hash\n if (preLoginRedirectHash) {\n window.localStorage.setItem('preLoginRedirectHash', preLoginRedirectHash)\n }\n window.localStorage.setItem('loginIssuer', issuerUri)\n // Login\n await authSession.login({\n redirectUrl: window.location.href,\n oidcIssuer: issuerUri\n })\n } catch (err) {\n alert(err.message)\n }\n }\n\n /**\n * Text-based idp selection\n */\n const issuerTextContainer = dom.createElement('div')\n issuerTextContainer.setAttribute(\n 'style',\n `\n border-bottom: 1px solid #DDD;\n display: flex;\n flex-direction: column;\n padding-top: 10px;\n `\n )\n const issuerTextInputContainer = dom.createElement('div')\n issuerTextInputContainer.setAttribute(\n 'style',\n `\n display: flex;\n flex-direction: row;\n `\n )\n const issuerTextLabel = dom.createElement('label')\n issuerTextLabel.innerText = 'Enter the URL of your identity provider:'\n issuerTextLabel.setAttribute('style', 'color: #888')\n const issuerTextInput = dom.createElement('input')\n issuerTextInput.setAttribute('type', 'text')\n issuerTextInput.setAttribute(\n 'style',\n 'margin-left: 0 !important; flex: 1; margin-right: 5px !important'\n )\n issuerTextInput.setAttribute('placeholder', 'https://example.com')\n issuerTextInput.value = localStorage.getItem('loginIssuer') || ''\n const issuerTextGoButton = dom.createElement('button')\n issuerTextGoButton.innerText = 'Go'\n issuerTextGoButton.setAttribute('style', 'margin-top: 12px; margin-bottom: 12px;')\n issuerTextGoButton.addEventListener('click', () => {\n loginToIssuer(issuerTextInput.value)\n })\n issuerTextContainer.appendChild(issuerTextLabel)\n issuerTextInputContainer.appendChild(issuerTextInput)\n issuerTextInputContainer.appendChild(issuerTextGoButton)\n issuerTextContainer.appendChild(issuerTextInputContainer)\n issuerPopupBox.appendChild(issuerTextContainer)\n\n /**\n * Button-based idp selection\n */\n const issuerButtonContainer = dom.createElement('div')\n issuerButtonContainer.setAttribute(\n 'style',\n `\n display: flex;\n flex-direction: column;\n padding-top: 10px;\n `\n )\n const issuerBottonLabel = dom.createElement('label')\n issuerBottonLabel.innerText = 'Or pick an identity provider from the list below:'\n issuerBottonLabel.setAttribute('style', 'color: #888')\n issuerButtonContainer.appendChild(issuerBottonLabel)\n getSuggestedIssuers().forEach((issuerInfo) => {\n const issuerButton = dom.createElement('button')\n issuerButton.innerText = issuerInfo.name\n issuerButton.setAttribute('style', 'height: 38px; margin-top: 10px')\n issuerButton.addEventListener('click', () => {\n loginToIssuer(issuerInfo.uri)\n })\n issuerButtonContainer.appendChild(issuerButton)\n })\n issuerPopupBox.appendChild(issuerButtonContainer)\n}\n\n/**\n * Login status box\n *\n * A big sign-up/sign in box or a logout box depending on the state\n *\n * @param dom\n * @param listener\n *\n * @returns\n */\nexport function loginStatusBox (\n dom: HTMLDocument,\n listener: ((uri: string | null) => void) | null = null,\n options: {\n buttonStyle?: string;\n } = {}\n): HTMLElement {\n // 20190630\n let me = offlineTestID()\n // @@ TODO Remove the need to cast HTML element to any\n const box: any = dom.createElement('div')\n\n function setIt (newidURI) {\n if (!newidURI) {\n return\n }\n\n // const uri = newidURI.uri || newidURI\n // me = sym(uri)\n me = authn.saveUser(newidURI)\n box.refresh()\n if (listener) listener(me!.uri)\n }\n\n function logoutButtonHandler (_event) {\n const oldMe = me\n authSession.logout().then(\n function () {\n const message = `Your WebID was ${oldMe}. It has been forgotten.`\n me = null\n try {\n alert(message)\n } catch (e) {\n window.alert(message)\n }\n box.refresh()\n if (listener) listener(null)\n },\n (err) => {\n alert('Fail to log out:' + err)\n }\n )\n }\n\n function logoutButton (me, options) {\n const signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle()\n let logoutLabel = 'WebID logout'\n if (me) {\n const nick =\n solidLogicSingleton.store.any(me, ns.foaf('nick')) ||\n solidLogicSingleton.store.any(me, ns.foaf('name'))\n if (nick) {\n logoutLabel = 'Logout ' + nick.value\n }\n }\n const signOutButton = dom.createElement('input')\n // signOutButton.className = 'WebIDCancelButton'\n signOutButton.setAttribute('type', 'button')\n signOutButton.setAttribute('value', logoutLabel)\n signOutButton.setAttribute('style', `${signInButtonStyle}background-color: #eee;`)\n signOutButton.addEventListener('click', logoutButtonHandler, false)\n return signOutButton\n }\n\n box.refresh = function () {\n const sessionInfo = authSession.info\n if (sessionInfo && sessionInfo.webId && sessionInfo.isLoggedIn) {\n me = solidLogicSingleton.store.sym(sessionInfo.webId)\n } else {\n me = null\n }\n if ((me && box.me !== me.uri) || (!me && box.me)) {\n widgets.clearElement(box)\n if (me) {\n box.appendChild(logoutButton(me, options))\n } else {\n box.appendChild(signInOrSignUpBox(dom, setIt, options))\n }\n }\n box.me = me ? me.uri : null\n }\n box.refresh()\n\n function trackSession () {\n me = authn.currentUser()\n box.refresh()\n }\n trackSession()\n\n authSession.onLogin(trackSession)\n authSession.onLogout(trackSession)\n box.me = '99999' // Force refresh\n box.refresh()\n return box\n}\n\nauthSession.onLogout(async () => {\n const issuer = window.localStorage.getItem('loginIssuer')\n if (issuer) {\n try {\n const wellKnownUri = new URL(issuer)\n wellKnownUri.pathname = '/.well-known/openid-configuration'\n const wellKnownResult = await fetch(wellKnownUri.toString())\n if (wellKnownResult.status === 200) {\n const openidConfiguration = await wellKnownResult.json()\n if (openidConfiguration && openidConfiguration.end_session_endpoint) {\n await fetch(openidConfiguration.end_session_endpoint, { credentials: 'include' })\n }\n }\n } catch (err) {\n // Do nothing\n }\n }\n window.location.reload()\n})\n\n/**\n * Workspace selection etc\n * See https://github.com/solidos/userguide/issues/16\n */\n\n/**\n * Returns a UI object which, if it selects a workspace,\n * will callback(workspace, newBase).\n * See https://github.com/solidos/userguide/issues/16 for more info on workspaces.\n *\n * If necessary, will get an account, preference file, etc. In sequence:\n *\n * - If not logged in, log in.\n * - Load preference file\n * - Prompt user for workspaces\n * - Allows the user to just type in a URI by hand\n *\n * Calls back with the workspace and the base URI\n *\n * @param dom\n * @param appDetails\n * @param callbackWS\n */\nexport function selectWorkspace (\n dom: HTMLDocument,\n appDetails: AppDetails,\n callbackWS: (workspace: string | null, newBase: string) => void\n): HTMLElement {\n const noun = appDetails.noun\n const appPathSegment = appDetails.appPathSegment\n\n const me = offlineTestID()\n const box = dom.createElement('div')\n const context: AuthenticationContext = { me, dom, div: box }\n\n function say (s, background) {\n box.appendChild(widgets.errorMessageBlock(dom, s, background))\n }\n\n function figureOutBase (ws) {\n const newBaseNode: NamedNode = solidLogicSingleton.store.any(\n ws,\n ns.space('uriPrefix')\n ) as NamedNode\n let newBaseString: string\n if (!newBaseNode) {\n newBaseString = ws.uri.split('#')[0]\n } else {\n newBaseString = newBaseNode.value\n }\n if (newBaseString.slice(-1) !== '/') {\n debug.log(`${appPathSegment}: No / at end of uriPrefix ${newBaseString}`) // @@ paramater?\n newBaseString = `${newBaseString}/`\n }\n const now = new Date()\n newBaseString += `${appPathSegment}/id${now.getTime()}/` // unique id\n return newBaseString\n }\n\n function displayOptions (context) {\n // console.log('displayOptions!', context)\n async function makeNewWorkspace (_event) {\n const row = table.appendChild(dom.createElement('tr'))\n const cell = row.appendChild(dom.createElement('td'))\n cell.setAttribute('colspan', '3')\n cell.style.padding = '0.5em'\n const newBase = encodeURI(\n await widgets.askName(\n dom,\n solidLogicSingleton.store,\n cell,\n ns.solid('URL'),\n ns.space('Workspace'),\n 'Workspace'\n )\n )\n const newWs = widgets.newThing(context.preferencesFile)\n const newData = [\n st(context.me, ns.space('workspace'), newWs, context.preferencesFile),\n // eslint-disable-next-line camelcase\n st(\n newWs,\n ns.space('uriPrefix'),\n newBase as unknown as Quad_Object,\n context.preferencesFile\n )\n ]\n if (!solidLogicSingleton.store.updater) {\n throw new Error('store has no updater')\n }\n await solidLogicSingleton.store.updater.update([], newData)\n // @@ now refresh list of workspaces\n }\n\n // const status = ''\n const id = context.me\n const preferencesFile = context.preferencesFile\n let newBase: any = null\n\n // A workspace specifically defined in the private preference file:\n let w: any = solidLogicSingleton.store.each(\n id,\n ns.space('workspace'),\n undefined,\n preferencesFile\n ) // Only trust preference file here\n\n // A workspace in a storage in the public profile:\n const storages = solidLogicSingleton.store.each(id, ns.space('storage')) // @@ No provenance requirement at the moment\n if (w.length === 0 && storages) {\n say(\n `You don't seem to have any workspaces. You have ${storages.length} storage spaces.`,\n 'white'\n )\n storages\n .map(function (s: any) {\n w = w.concat(solidLogicSingleton.store.each(s, ns.ldp('contains')))\n return w\n })\n .filter((file) => {\n return file.id ? ['public', 'private'].includes(file.id().toLowerCase()) : ''\n })\n }\n\n if (w.length === 1) {\n say(`Workspace used: ${w[0].uri}`, 'white') // @@ allow user to see URI\n newBase = figureOutBase(w[0])\n // callbackWS(w[0], newBase)\n // } else if (w.length === 0) {\n }\n\n // Prompt for ws selection or creation\n // say( w.length + \" workspaces for \" + id + \"Choose one.\");\n const table = dom.createElement('table')\n table.setAttribute('style', 'border-collapse:separate; border-spacing: 0.5em;')\n\n // const popup = window.open(undefined, '_blank', { height: 300, width:400 }, false)\n box.appendChild(table)\n\n // Add a field for directly adding the URI yourself\n\n // const hr = box.appendChild(dom.createElement('hr')) // @@\n box.appendChild(dom.createElement('hr')) // @@\n\n const p = box.appendChild(dom.createElement('p'));\n (p as any).style = commentStyle\n p.textContent = `Where would you like to store the data for the ${noun}?\n Give the URL of the folder where you would like the data stored.\n It can be anywhere in solid world - this URI is just an idea.`\n // @@ TODO Remove the need to cast baseField to any\n const baseField: any = box.appendChild(dom.createElement('input'))\n baseField.setAttribute('type', 'text');\n (baseField as any).style = textInputStyle\n baseField.size = 80 // really a string\n baseField.label = 'base URL'\n baseField.autocomplete = 'on'\n if (newBase) {\n // set to default\n baseField.value = newBase\n }\n\n context.baseField = baseField\n\n box.appendChild(dom.createElement('br')) // @@\n\n const button = box.appendChild(dom.createElement('button'));\n (button as any).style = buttonStyle\n button.textContent = `Start new ${noun} at this URI`\n button.addEventListener('click', function (_event) {\n let newBase = baseField.value.replace(' ', '%20') // do not re-encode in general, as % encodings may exist\n if (newBase.slice(-1) !== '/') {\n newBase += '/'\n }\n callbackWS(null, newBase)\n })\n\n // Now go set up the table of spaces\n\n // const row = 0\n w = w.filter(function (x) {\n return !solidLogicSingleton.store.holds(\n x,\n ns.rdf('type'), // Ignore master workspaces\n ns.space('MasterWorkspace')\n )\n })\n let col1, col2, col3, tr, ws, style, comment\n const cellStyle = 'height: 3em; margin: 1em; padding: 1em white; border-radius: 0.3em;'\n const deselectedStyle = `${cellStyle}border: 0px;`\n // const selectedStyle = cellStyle + 'border: 1px solid black;'\n for (let i = 0; i < w.length; i++) {\n ws = w[i]\n tr = dom.createElement('tr')\n if (i === 0) {\n col1 = dom.createElement('td')\n col1.setAttribute('rowspan', `${w.length}`)\n col1.textContent = 'Choose a workspace for this:'\n col1.setAttribute('style', 'vertical-align:middle;')\n tr.appendChild(col1)\n }\n col2 = dom.createElement('td')\n style = solidLogicSingleton.store.anyValue(ws, ns.ui('style'))\n if (!style) {\n // Otherwise make up arbitrary colour\n const hash = function (x) {\n return x.split('').reduce(function (a, b) {\n a = (a << 5) - a + b.charCodeAt(0)\n return a & a\n }, 0)\n }\n const bgcolor = `#${((hash(ws.uri) & 0xffffff) | 0xc0c0c0).toString(16)}` // c0c0c0 forces pale\n style = `color: black ; background-color: ${bgcolor};`\n }\n col2.setAttribute('style', deselectedStyle + style)\n tr.target = ws.uri\n let label = solidLogicSingleton.store.any(ws, ns.rdfs('label'))\n if (!label) {\n label = ws.uri.split('/').slice(-1)[0] || ws.uri.split('/').slice(-2)[0]\n }\n col2.textContent = label || '???'\n tr.appendChild(col2)\n if (i === 0) {\n col3 = dom.createElement('td')\n col3.setAttribute('rowspan', `${w.length}1`)\n // col3.textContent = '@@@@@ remove';\n col3.setAttribute('style', 'width:50%;')\n tr.appendChild(col3)\n }\n table.appendChild(tr)\n\n comment = solidLogicSingleton.store.any(ws, ns.rdfs('comment'))\n comment = comment ? comment.value : 'Use this workspace'\n col2.addEventListener(\n 'click',\n function (_event) {\n col3.textContent = comment ? comment.value : ''\n col3.setAttribute('style', deselectedStyle + style)\n const button = dom.createElement('button')\n button.textContent = 'Continue'\n // button.setAttribute('style', style);\n const newBase = figureOutBase(ws)\n baseField.value = newBase // show user proposed URI\n\n button.addEventListener(\n 'click',\n function (_event) {\n button.disabled = true\n callbackWS(ws, newBase)\n button.textContent = '---->'\n },\n true\n ) // capture vs bubble\n col3.appendChild(button)\n },\n true\n ) // capture vs bubble\n }\n\n // last line with \"Make new workspace\"\n const trLast = dom.createElement('tr')\n col2 = dom.createElement('td')\n col2.setAttribute('style', cellStyle)\n col2.textContent = '+ Make a new workspace'\n col2.addEventListener('click', makeNewWorkspace)\n trLast.appendChild(col2)\n table.appendChild(trLast)\n } // displayOptions\n\n // console.log('kicking off async operation')\n ensureLoadedPreferences(context) // kick off async operation\n .then(displayOptions)\n .catch((err) => {\n // console.log(\"err from async op\")\n box.appendChild(widgets.errorMessageBlock(context.dom, err))\n })\n\n return box // return the box element, while login proceeds\n} // selectWorkspace\n\n/**\n * Creates a new instance of an app.\n *\n * An instance of an app could be e.g. an issue tracker for a given project,\n * or a chess game, or calendar, or a health/fitness record for a person.\n *\n * Note that this use of the term 'app' refers more to entries in the user's\n * type index than to actual software applications that use the personal data\n * to which these entries point.\n *\n * @param dom\n * @param appDetails\n * @param callback\n *\n * @returns A div with a button in it for making a new app instance\n */\nexport function newAppInstance (\n dom: HTMLDocument,\n appDetails: AppDetails,\n callback: (workspace: string | null, newBase: string) => void\n): HTMLElement {\n const gotWS = function (ws, base) {\n // log.debug(\"newAppInstance: Selected workspace = \" + (ws? ws.uri : 'none'))\n callback(ws, base)\n }\n const div = dom.createElement('div')\n const b = dom.createElement('button')\n b.setAttribute('type', 'button')\n div.appendChild(b)\n b.innerHTML = `Make new ${appDetails.noun}`\n b.addEventListener(\n 'click',\n (_event) => {\n div.appendChild(selectWorkspace(dom, appDetails, gotWS))\n },\n false\n )\n div.appendChild(b)\n return div\n}\n/**\n * Retrieves whether the currently logged in user is a power user\n * and/or a developer\n */\nexport async function getUserRoles (): Promise<Array<NamedNode>> {\n try {\n const { me, preferencesFile, preferencesFileError } = await ensureLoadedPreferences({})\n if (!preferencesFile || preferencesFileError) {\n throw new Error(preferencesFileError)\n }\n return solidLogicSingleton.store.each(\n me,\n ns.rdf('type'),\n null,\n preferencesFile.doc()\n ) as NamedNode[]\n } catch (error) {\n debug.warn('Unable to fetch your preferences - this was the error: ', error)\n }\n return []\n}\n\n/**\n * Filters which panes should be available, based on the result of [[getUserRoles]]\n */\nexport async function filterAvailablePanes (\n panes: Array<PaneDefinition>\n): Promise<Array<PaneDefinition>> {\n const userRoles = await getUserRoles()\n return panes.filter((pane) => isMatchingAudience(pane, userRoles))\n}\n\nfunction isMatchingAudience (pane: PaneDefinition, userRoles: Array<NamedNode>): boolean {\n const audience = pane.audience || []\n return audience.reduce(\n (isMatch, audienceRole) => isMatch && !!userRoles.find((role) => role.equals(audienceRole)),\n true as boolean\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAAA,OAAA,GAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAeA,IAAAE,KAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,EAAA,GAAAF,uBAAA,CAAAH,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAL,uBAAA,CAAAH,OAAA;AACA,IAAAS,OAAA,GAAAN,uBAAA,CAAAH,OAAA;AAAqC,SAAAU,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAY,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,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IAAA;QAAA;UAAA8W,UAAA,CAAA9W,IAAA;UAAA,OAEJgW,YAAY,EAAE;QAAA;UAAhCY,SAAS,GAAAE,UAAA,CAAA1S,IAAA;UAAA,OAAA0S,UAAA,CAAA5S,MAAA,WACRyS,KAAK,CAAClQ,MAAM,CAAC,UAACsQ,IAAI;YAAA,OAAKC,kBAAkB,CAACD,IAAI,EAAEH,SAAS,CAAC;UAAA,EAAC;QAAA;QAAA;UAAA,OAAAE,UAAA,CAAAxR,IAAA;MAAA;IAAA,GAAAoR,SAAA;EAAA,CACnE;EAAA,OAAAD,qBAAA,CAAAzT,KAAA,OAAAC,SAAA;AAAA;AAED,SAAS+T,kBAAkBA,CAAED,IAAoB,EAAEH,SAA2B,EAAW;EACvF,IAAMK,QAAQ,GAAGF,IAAI,CAACE,QAAQ,IAAI,EAAE;EACpC,OAAOA,QAAQ,CAAC9B,MAAM,CACpB,UAAC+B,OAAO,EAAEC,YAAY;IAAA,OAAKD,OAAO,IAAI,CAAC,CAACN,SAAS,CAACQ,IAAI,CAAC,UAACC,IAAI;MAAA,OAAKA,IAAI,CAACC,MAAM,CAACH,YAAY,CAAC;IAAA,EAAC;EAAA,GAC3F,IAAI,CACL;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["matrix","matrixForQuery"],"sources":["../../src/matrix/index.ts"],"sourcesContent":["import {\n matrixForQuery\n} from './matrix'\n\nexport const matrix = {\n matrixForQuery\n}\n"],"mappings":";;;;;;AAAA;AAIO,IAAMA,MAAM,GAAG;EACpBC,cAAc,EAAdA;AACF,CAAC;AAAA"}
1
+ {"version":3,"file":"index.js","names":["_matrix","require","matrix","matrixForQuery","exports"],"sources":["../../src/matrix/index.ts"],"sourcesContent":["import {\n matrixForQuery\n} from './matrix'\n\nexport const matrix = {\n matrixForQuery\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAIO,IAAMC,MAAM,GAAG;EACpBC,cAAc,EAAdA;AACF,CAAC;AAAAC,OAAA,CAAAF,MAAA,GAAAA,MAAA"}