solid-ui 2.4.27 → 2.4.28-11faa597

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 (121) hide show
  1. package/README.md +6 -1
  2. package/dist/670.solid-ui.min.js +1 -0
  3. package/dist/805.solid-ui.min.js +3 -0
  4. package/dist/805.solid-ui.min.js.LICENSE.txt +58 -0
  5. package/dist/805.solid-ui.min.js.map +1 -0
  6. package/dist/_2b19.solid-ui.js +14 -0
  7. package/dist/_2b19.solid-ui.js.map +1 -0
  8. package/dist/index.html +1 -9
  9. package/dist/{main.js → solid-ui.js} +9676 -21517
  10. package/dist/solid-ui.js.map +1 -0
  11. package/dist/solid-ui.min.js +3 -0
  12. package/dist/solid-ui.min.js.LICENSE.txt +54 -0
  13. package/dist/solid-ui.min.js.map +1 -0
  14. package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js +12134 -0
  15. package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js.map +1 -0
  16. package/lib/acl/access-controller.d.ts +2 -3
  17. package/lib/acl/access-controller.d.ts.map +1 -1
  18. package/lib/acl/access-controller.js +17 -15
  19. package/lib/acl/access-controller.js.map +1 -1
  20. package/lib/acl/access-groups.d.ts.map +1 -1
  21. package/lib/acl/access-groups.js +78 -8
  22. package/lib/acl/access-groups.js.map +1 -1
  23. package/lib/acl/acl-control.d.ts.map +1 -1
  24. package/lib/acl/acl-control.js +10 -11
  25. package/lib/acl/acl-control.js.map +1 -1
  26. package/lib/acl/acl.d.ts +1 -1
  27. package/lib/acl/acl.js +1 -1
  28. package/lib/acl/acl.js.map +1 -1
  29. package/lib/acl/add-agent-buttons.d.ts.map +1 -1
  30. package/lib/acl/add-agent-buttons.js +4 -3
  31. package/lib/acl/add-agent-buttons.js.map +1 -1
  32. package/lib/chat/bookmarks.js +6 -7
  33. package/lib/chat/bookmarks.js.map +1 -1
  34. package/lib/chat/chatLogic.js +288 -67
  35. package/lib/chat/chatLogic.js.map +1 -1
  36. package/lib/chat/dateFolder.js +129 -126
  37. package/lib/chat/dateFolder.js.map +1 -1
  38. package/lib/chat/infinite.js +637 -423
  39. package/lib/chat/infinite.js.map +1 -1
  40. package/lib/chat/keys.d.ts +13 -0
  41. package/lib/chat/keys.d.ts.map +1 -0
  42. package/lib/chat/keys.js +233 -0
  43. package/lib/chat/keys.js.map +1 -0
  44. package/lib/chat/message.js +361 -163
  45. package/lib/chat/message.js.map +1 -1
  46. package/lib/chat/messageTools.js +463 -277
  47. package/lib/chat/messageTools.js.map +1 -1
  48. package/lib/chat/signature.d.ts +24 -0
  49. package/lib/chat/signature.d.ts.map +1 -0
  50. package/lib/chat/signature.js +112 -0
  51. package/lib/chat/signature.js.map +1 -0
  52. package/lib/chat/thread.js +299 -209
  53. package/lib/chat/thread.js.map +1 -1
  54. package/lib/footer/index.d.ts.map +1 -1
  55. package/lib/footer/index.js +5 -1
  56. package/lib/footer/index.js.map +1 -1
  57. package/lib/header/index.d.ts.map +1 -1
  58. package/lib/header/index.js +46 -20
  59. package/lib/header/index.js.map +1 -1
  60. package/lib/log.js +5 -5
  61. package/lib/log.js.map +1 -1
  62. package/lib/login/login.d.ts.map +1 -1
  63. package/lib/login/login.js +63 -38
  64. package/lib/login/login.js.map +1 -1
  65. package/lib/pad.js +4 -1
  66. package/lib/pad.js.map +1 -1
  67. package/lib/participation.js +2 -1
  68. package/lib/participation.js.map +1 -1
  69. package/lib/preferences.js +4 -0
  70. package/lib/preferences.js.map +1 -1
  71. package/lib/style.js +60 -2
  72. package/lib/style.js.map +1 -1
  73. package/lib/utils/headerFooterHelpers.d.ts +0 -4
  74. package/lib/utils/headerFooterHelpers.d.ts.map +1 -1
  75. package/lib/utils/headerFooterHelpers.js +1 -26
  76. package/lib/utils/headerFooterHelpers.js.map +1 -1
  77. package/lib/utils/keyHelpers/accessData.d.ts +9 -0
  78. package/lib/utils/keyHelpers/accessData.d.ts.map +1 -0
  79. package/lib/utils/keyHelpers/accessData.js +134 -0
  80. package/lib/utils/keyHelpers/accessData.js.map +1 -0
  81. package/lib/utils/keyHelpers/acl.d.ts +20 -0
  82. package/lib/utils/keyHelpers/acl.d.ts.map +1 -0
  83. package/lib/utils/keyHelpers/acl.js +93 -0
  84. package/lib/utils/keyHelpers/acl.js.map +1 -0
  85. package/lib/utils/keyHelpers/otherHelpers.d.ts +3 -0
  86. package/lib/utils/keyHelpers/otherHelpers.d.ts.map +1 -0
  87. package/lib/utils/keyHelpers/otherHelpers.js +23 -0
  88. package/lib/utils/keyHelpers/otherHelpers.js.map +1 -0
  89. package/lib/versionInfo.js +6 -6
  90. package/lib/versionInfo.js.map +1 -1
  91. package/lib/widgets/buttons.d.ts.map +1 -1
  92. package/lib/widgets/buttons.js +43 -51
  93. package/lib/widgets/buttons.js.map +1 -1
  94. package/lib/widgets/forms/autocomplete/autocompleteBar.js +8 -1
  95. package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
  96. package/lib/widgets/forms/autocomplete/autocompletePicker.js +8 -3
  97. package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
  98. package/lib/widgets/forms/autocomplete/language.js +5 -0
  99. package/lib/widgets/forms/autocomplete/language.js.map +1 -1
  100. package/lib/widgets/forms.js +12 -5
  101. package/lib/widgets/forms.js.map +1 -1
  102. package/lib/widgets/peoplePicker.js +11 -0
  103. package/lib/widgets/peoplePicker.js.map +1 -1
  104. package/package.json +15 -11
  105. package/dist/main.js.map +0 -1
  106. package/lib/acl/styles.d.ts +0 -90
  107. package/lib/acl/styles.d.ts.map +0 -1
  108. package/lib/acl/styles.js +0 -98
  109. package/lib/acl/styles.js.map +0 -1
  110. package/lib/footer/styleMap.d.ts +0 -8
  111. package/lib/footer/styleMap.d.ts.map +0 -1
  112. package/lib/footer/styleMap.js +0 -15
  113. package/lib/footer/styleMap.js.map +0 -1
  114. package/lib/header/styleMap.d.ts +0 -117
  115. package/lib/header/styleMap.d.ts.map +0 -1
  116. package/lib/header/styleMap.js +0 -139
  117. package/lib/header/styleMap.js.map +0 -1
  118. package/lib/jss/index.d.ts +0 -20
  119. package/lib/jss/index.d.ts.map +0 -1
  120. package/lib/jss/index.js +0 -47
  121. package/lib/jss/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_index","require","_solidLogic","_login","widgets","_interopRequireWildcard","_emptyProfile","_headerFooterHelpers","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","DEFAULT_HELP_MENU_ICON","icons","iconBase","DEFAUL_SOLID_ICON_URL","initHeader","_x","_x2","_x3","_initHeader","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee2","store","userMenuList","options","header","pod","wrap","_callee2$","_context2","prev","next","document","getElementById","abrupt","getPod","rebuildHeader","authSession","onLogout","onLogin","stop","_callee","user","_callee$","_context","authn","currentUser","innerHTML","t0","createBanner","t1","sent","appendChild","_x4","_x5","_x6","_x7","_x8","_createBanner","_callee3","podLink","image","userMenu","banner","leftSideOfHeader","helpMenu","_callee3$","_context3","createElement","href","uri","addStyleClassToElement","src","logo","createUserMenu","createLoginSignUpButtons","helpMenuList","createHelpMenu","helpMenuItems","forEach","menuItem","menuItemType","url","createUserMenuItem","createUserMenuLink","label","target","createUserMenuButton","onclick","setAttribute","helpMenuContainer","helpMenuTrigger","type","helpMenuIcon","helpIcon","throttledMenuToggle","throttle","event","toggleMenu","addEventListener","timer","setTimeout","clearTimeout","profileLoginButtonPre","loginStatusBox","onClick","button","innerText","link","_x9","_x10","_x11","_createUserMenu","_callee4","fetcher","loggedInMenuList","loggedInMenu","loggedInMenuTrigger","profileImg","loggedInMenuContainer","_callee4$","_context4","load","getProfileImg","child","menuProfileItem","profileUrl","findImage","emptyProfile","_unused","profileImage","style","backgroundImage","concat","trigger","menu","isExpanded","getAttribute","expand","close","toString"],"sources":["../../src/header/index.ts"],"sourcesContent":["/* global EventListenerOrEventListenerObject */\n/*\n This file was copied from mashlib/src/global/header.ts file. It is modified to\n work in solid-ui by adjusting where imported functions are found.\n */\nimport { IndexedFormula, NamedNode } from 'rdflib'\nimport { icons } from '../index'\nimport { authn, authSession } from 'solid-logic'\nimport { loginStatusBox } from '../login/login'\n// import { loginStatusBox, authSession, currentUser } from '../authn/authn'\nimport * as widgets from '../widgets'\nimport { emptyProfile } from './empty-profile'\nimport { addStyleClassToElement, getPod, throttle } from '../utils/headerFooterHelpers'\n\n/**\n * menu icons\n*/\nconst DEFAULT_HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst DEFAUL_SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\nexport type MenuItemLink = {\n label: string,\n url: string,\n target?: string\n}\n\nexport type MenuItemButton = {\n label: string,\n onclick: () => void\n}\n\nexport type MenuItems = MenuItemLink | MenuItemButton\n\n/*\n HeaderOptions allow for customizing the logo and menu list. If a logo is not provided the default\n is solid. Menulist will always show a link to logout and to the users profile.\n */\nexport type HeaderOptions = {\n logo?: string,\n helpIcon?: string,\n helpMenuList?: MenuItems[]\n}\n\n/**\n * Initialize header component, the header object returned depends on whether the user is authenticated.\n * @param store the data store\n * @param userMenuList a list of menu items when the user is logged in\n * @param options allow the header to be customized with a personalized logo, help icon and a help menu list of links or buttons.\n * @returns a header for an authenticated user with menu items given or a login screen\n */\nexport async function initHeader (store: IndexedFormula, userMenuList: MenuItems[], options?: HeaderOptions) {\n const header = document.getElementById('PageHeader')\n if (!header) {\n return\n }\n\n const pod = getPod()\n rebuildHeader(header, store, pod, userMenuList, options)()\n authSession.onLogout(rebuildHeader(header, store, pod, userMenuList, options))\n authSession.onLogin(rebuildHeader(header, store, pod, userMenuList, options))\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function rebuildHeader (header: HTMLElement, store: IndexedFormula, pod: NamedNode, userMenuList: MenuItems[], options?: HeaderOptions) {\n return async () => {\n const user = authn.currentUser()\n header.innerHTML = ''\n header.appendChild(await createBanner(store, pod, user, userMenuList, options))\n }\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createBanner (store: IndexedFormula, pod: NamedNode, user: NamedNode | null, userMenuList: MenuItems[], options?: HeaderOptions): Promise<HTMLElement> {\n const podLink = document.createElement('a')\n podLink.href = pod.uri\n addStyleClassToElement(podLink, ['header-banner__link'])\n const image = document.createElement('img')\n if (options) {\n image.src = options.logo ? options.logo : DEFAUL_SOLID_ICON_URL\n }\n addStyleClassToElement(image, ['header-banner__icon'])\n podLink.appendChild(image)\n\n const userMenu = user\n ? await createUserMenu(store, user, userMenuList)\n : createLoginSignUpButtons()\n\n const banner = document.createElement('div')\n addStyleClassToElement(banner, ['header-banner'])\n banner.appendChild(podLink)\n\n const leftSideOfHeader = document.createElement('div')\n addStyleClassToElement(leftSideOfHeader, ['header-banner__right-menu'])\n leftSideOfHeader.appendChild(userMenu)\n\n if (options && options.helpMenuList) {\n const helpMenu = createHelpMenu(options, options.helpMenuList)\n leftSideOfHeader.appendChild(helpMenu as HTMLDivElement)\n }\n\n banner.appendChild(leftSideOfHeader)\n\n return banner\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createHelpMenu (options: HeaderOptions, helpMenuItems: MenuItems[]) {\n if (!helpMenuItems) return\n const helpMenuList = document.createElement('ul')\n addStyleClassToElement(helpMenuList, ['header-user-menu__list'])\n helpMenuItems.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n\n const helpMenu = document.createElement('nav')\n\n addStyleClassToElement(helpMenu, ['header-user-menu__navigation-menu'])\n helpMenu.setAttribute('aria-hidden', 'true')\n helpMenu.appendChild(helpMenuList)\n\n const helpMenuContainer = document.createElement('div')\n addStyleClassToElement(helpMenuContainer, ['header-banner__user-menu'])\n addStyleClassToElement(helpMenuContainer, ['header-user-menu'])\n helpMenuContainer.appendChild(helpMenu)\n\n const helpMenuTrigger = document.createElement('button')\n addStyleClassToElement(helpMenuTrigger, ['header-user-menu__trigger'])\n helpMenuTrigger.type = 'button'\n\n const helpMenuIcon = document.createElement('img')\n helpMenuIcon.src = (options && options.helpIcon) ? options.helpIcon : icons.iconBase + DEFAULT_HELP_MENU_ICON\n addStyleClassToElement(helpMenuIcon, ['header-banner__help-icon'])\n helpMenuContainer.appendChild(helpMenuTrigger)\n helpMenuTrigger.appendChild(helpMenuIcon)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, helpMenuTrigger, helpMenu), 50)\n helpMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n helpMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n })\n helpMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n })\n\n return helpMenuContainer\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createLoginSignUpButtons () {\n const profileLoginButtonPre = document.createElement('div')\n addStyleClassToElement(profileLoginButtonPre, ['header-banner__login'])\n profileLoginButtonPre.appendChild(loginStatusBox(document, null, {}))\n return profileLoginButtonPre\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuButton (label: string, onClick: EventListenerOrEventListenerObject): HTMLElement {\n const button = document.createElement('button')\n addStyleClassToElement(button, ['header-user-menu__button'])\n button.addEventListener('click', onClick)\n button.innerText = label\n return button\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuLink (label: string, href: string, target?: string): HTMLElement {\n const link = document.createElement('a')\n addStyleClassToElement(link, ['header-user-menu__link'])\n link.href = href\n link.innerText = label\n if (target) link.target = target\n return link\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createUserMenu (store: IndexedFormula, user: NamedNode, userMenuList: MenuItems[]): Promise<HTMLElement> {\n const fetcher = (<any>store).fetcher\n if (fetcher) {\n // Making sure that Profile is loaded before building menu\n await fetcher.load(user)\n }\n\n const loggedInMenuList = document.createElement('ul')\n addStyleClassToElement(loggedInMenuList, ['header-user-menu__list'])\n if (userMenuList) {\n userMenuList.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n }\n const loggedInMenu = document.createElement('nav')\n\n addStyleClassToElement(loggedInMenu, ['header-user-menu__navigation-menu'])\n loggedInMenu.setAttribute('aria-hidden', 'true')\n loggedInMenu.appendChild(loggedInMenuList)\n\n const loggedInMenuTrigger = document.createElement('button')\n addStyleClassToElement(loggedInMenuTrigger, ['header-user-menu__trigger'])\n loggedInMenuTrigger.type = 'button'\n const profileImg = getProfileImg(store, user)\n if (typeof profileImg === 'string') {\n loggedInMenuTrigger.innerHTML = profileImg\n } else {\n loggedInMenuTrigger.appendChild(profileImg)\n }\n\n const loggedInMenuContainer = document.createElement('div')\n addStyleClassToElement(loggedInMenuContainer, ['header-banner__user-menu'])\n addStyleClassToElement(loggedInMenuContainer, ['header-user-menu'])\n loggedInMenuContainer.appendChild(loggedInMenuTrigger)\n loggedInMenuContainer.appendChild(loggedInMenu)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, loggedInMenuTrigger, loggedInMenu), 50)\n loggedInMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n loggedInMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n })\n loggedInMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n })\n\n return loggedInMenuContainer\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuItem (child: HTMLElement): HTMLElement {\n const menuProfileItem = document.createElement('li')\n addStyleClassToElement(menuProfileItem, ['header-user-menu__list-item'])\n menuProfileItem.appendChild(child)\n return menuProfileItem\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getProfileImg (store: IndexedFormula, user: NamedNode): string | HTMLElement {\n let profileUrl = null\n try {\n profileUrl = widgets.findImage(user)\n if (!profileUrl) {\n return emptyProfile\n }\n } catch {\n return emptyProfile\n }\n\n const profileImage = document.createElement('div')\n addStyleClassToElement(profileImage, ['header-user-menu__photo'])\n profileImage.style.backgroundImage = `url(${profileUrl})`\n return profileImage\n}\n\n/**\n * @internal\n */\nfunction toggleMenu (event: Event, trigger: HTMLButtonElement, menu: HTMLElement): void {\n const isExpanded = trigger.getAttribute('aria-expanded') === 'true'\n const expand = event.type === 'mouseover'\n const close = event.type === 'mouseout'\n if ((isExpanded && expand) || (!isExpanded && close)) {\n return\n }\n trigger.setAttribute('aria-expanded', (!isExpanded).toString())\n menu.setAttribute('aria-hidden', isExpanded.toString())\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AAAuF,SAAAO,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,W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B;EAEA,IAAME,YAAY,GAAGlG,QAAQ,CAACoC,aAAa,CAAC,KAAK,CAAC;EAClD,IAAAG,2CAAsB,EAAC2D,YAAY,EAAE,CAAC,yBAAyB,CAAC,CAAC;EACjEA,YAAY,CAACC,KAAK,CAACC,eAAe,UAAAC,MAAA,CAAUP,UAAU,MAAG;EACzD,OAAOI,YAAY;AACrB;;AAEA;AACA;AACA;AACA,SAAShC,UAAUA,CAAED,KAAY,EAAEqC,OAA0B,EAAEC,IAAiB,EAAQ;EACtF,IAAMC,UAAU,GAAGF,OAAO,CAACG,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM;EACnE,IAAMC,MAAM,GAAGzC,KAAK,CAACL,IAAI,KAAK,WAAW;EACzC,IAAM+C,KAAK,GAAG1C,KAAK,CAACL,IAAI,KAAK,UAAU;EACvC,IAAK4C,UAAU,IAAIE,MAAM,IAAM,CAACF,UAAU,IAAIG,KAAM,EAAE;IACpD;EACF;EACAL,OAAO,CAAC7C,YAAY,CAAC,eAAe,EAAE,CAAC,CAAC+C,UAAU,EAAEI,QAAQ,EAAE,CAAC;EAC/DL,IAAI,CAAC9C,YAAY,CAAC,aAAa,EAAE+C,UAAU,CAACI,QAAQ,EAAE,CAAC;AACzD"}
1
+ {"version":3,"file":"index.js","names":["_index","require","_solidLogic","_login","widgets","_interopRequireWildcard","style","_emptyProfile","_headerFooterHelpers","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","DEFAULT_HELP_MENU_ICON","icons","iconBase","DEFAUL_SOLID_ICON_URL","initHeader","_x","_x2","_x3","_initHeader","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee2","store","userMenuList","options","header","pod","wrap","_callee2$","_context2","prev","next","document","getElementById","abrupt","getPod","rebuildHeader","authSession","onLogout","onLogin","stop","_callee","user","_callee$","_context","authn","currentUser","innerHTML","t0","createBanner","t1","sent","appendChild","_x4","_x5","_x6","_x7","_x8","_createBanner","_callee3","podLink","image","userMenu","banner","leftSideOfHeader","helpMenu","_callee3$","_context3","createElement","href","uri","setAttribute","headerBannerLink","src","logo","headerBannerIcon","createUserMenu","createLoginSignUpButtons","headerBanner","headerBannerRightMenu","helpMenuList","createHelpMenu","helpMenuItems","headerUserMenuList","forEach","menuItem","menuItemType","url","createUserMenuItem","createUserMenuLink","label","target","createUserMenuButton","onclick","headerUserMenuNavigationMenuNotDisplayed","helpMenuContainer","headerBannerUserMenu","helpMenuTrigger","headerUserMenuTrigger","type","helpMenuIcon","helpIcon","headerUserMenuTriggerImg","throttledMenuToggle","throttle","event","toggleMenu","addEventListener","timer","setTimeout","clearTimeout","nav","headerUserMenuNavigationMenu","profileLoginButtonPre","headerBannerLogin","loginStatusBox","onClick","button","headerUserMenuButton","onmouseover","headerUserMenuButtonHover","onmouseout","innerText","link","headerUserMenuLink","headerUserMenuLinkHover","_x9","_x10","_x11","_createUserMenu","_callee4","fetcher","loggedInMenuList","loggedInMenu","loggedInMenuTrigger","profileImg","loggedInMenuContainer","_callee4$","_context4","load","getProfileImg","headerBannerUserMenuNotDisplayed","child","menuProfileItem","headerUserMenuListItem","profileUrl","findImage","emptyProfile","_unused","profileImage","headerUserMenuPhoto","backgroundImage","concat","trigger","menu","isExpanded","getAttribute","expand","close","toString"],"sources":["../../src/header/index.ts"],"sourcesContent":["/* global EventListenerOrEventListenerObject */\n/*\n This file was copied from mashlib/src/global/header.ts file. It is modified to\n work in solid-ui by adjusting where imported functions are found.\n */\nimport { IndexedFormula, NamedNode } from 'rdflib'\nimport { icons } from '../index'\nimport { authn, authSession } from 'solid-logic'\nimport { loginStatusBox } from '../login/login'\n// import { loginStatusBox, authSession, currentUser } from '../authn/authn'\nimport * as widgets from '../widgets'\nimport * as style from '../style'\nimport { emptyProfile } from './empty-profile'\nimport { getPod, throttle } from '../utils/headerFooterHelpers'\n\n/**\n * menu icons\n*/\nconst DEFAULT_HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst DEFAUL_SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\nexport type MenuItemLink = {\n label: string,\n url: string,\n target?: string\n}\n\nexport type MenuItemButton = {\n label: string,\n onclick: () => void\n}\n\nexport type MenuItems = MenuItemLink | MenuItemButton\n\n/*\n HeaderOptions allow for customizing the logo and menu list. If a logo is not provided the default\n is solid. Menulist will always show a link to logout and to the users profile.\n */\nexport type HeaderOptions = {\n logo?: string,\n helpIcon?: string,\n helpMenuList?: MenuItems[]\n}\n\n/**\n * Initialize header component, the header object returned depends on whether the user is authenticated.\n * @param store the data store\n * @param userMenuList a list of menu items when the user is logged in\n * @param options allow the header to be customized with a personalized logo, help icon and a help menu list of links or buttons.\n * @returns a header for an authenticated user with menu items given or a login screen\n */\nexport async function initHeader (store: IndexedFormula, userMenuList: MenuItems[], options?: HeaderOptions) {\n const header = document.getElementById('PageHeader')\n if (!header) {\n return\n }\n\n const pod = getPod()\n rebuildHeader(header, store, pod, userMenuList, options)()\n authSession.onLogout(rebuildHeader(header, store, pod, userMenuList, options))\n authSession.onLogin(rebuildHeader(header, store, pod, userMenuList, options))\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function rebuildHeader (header: HTMLElement, store: IndexedFormula, pod: NamedNode, userMenuList: MenuItems[], options?: HeaderOptions) {\n return async () => {\n const user = authn.currentUser()\n header.innerHTML = ''\n header.appendChild(await createBanner(store, pod, user, userMenuList, options))\n }\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createBanner (store: IndexedFormula, pod: NamedNode, user: NamedNode | null, userMenuList: MenuItems[], options?: HeaderOptions): Promise<HTMLElement> {\n const podLink = document.createElement('a')\n podLink.href = pod.uri\n podLink.setAttribute('style', style.headerBannerLink)\n const image = document.createElement('img')\n if (options) {\n image.src = options.logo ? options.logo : DEFAUL_SOLID_ICON_URL\n }\n image.setAttribute('style', style.headerBannerIcon)\n podLink.appendChild(image)\n\n const userMenu = user\n ? await createUserMenu(store, user, userMenuList)\n : createLoginSignUpButtons()\n\n const banner = document.createElement('div')\n banner.setAttribute('style', style.headerBanner)\n banner.appendChild(podLink)\n\n const leftSideOfHeader = document.createElement('div')\n leftSideOfHeader.setAttribute('style', style.headerBannerRightMenu)\n leftSideOfHeader.appendChild(userMenu)\n\n if (options && options.helpMenuList) {\n const helpMenu = createHelpMenu(options, options.helpMenuList)\n leftSideOfHeader.appendChild(helpMenu as HTMLDivElement)\n }\n\n banner.appendChild(leftSideOfHeader)\n\n return banner\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createHelpMenu (options: HeaderOptions, helpMenuItems: MenuItems[]) {\n if (!helpMenuItems) return\n const helpMenuList = document.createElement('ul')\n helpMenuList.setAttribute('style', style.headerUserMenuList)\n helpMenuItems.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n\n const helpMenu = document.createElement('nav')\n\n helpMenu.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n helpMenu.setAttribute('aria-hidden', 'true')\n helpMenu.setAttribute('id', 'helperNav')\n helpMenu.appendChild(helpMenuList)\n\n const helpMenuContainer = document.createElement('div')\n helpMenuContainer.setAttribute('style', style.headerBannerUserMenu)\n helpMenuContainer.appendChild(helpMenu)\n\n const helpMenuTrigger = document.createElement('button')\n helpMenuTrigger.setAttribute('style', style.headerUserMenuTrigger)\n helpMenuTrigger.type = 'button'\n\n const helpMenuIcon = document.createElement('img')\n helpMenuIcon.src = (options && options.helpIcon) ? options.helpIcon : icons.iconBase + DEFAULT_HELP_MENU_ICON\n helpMenuIcon.setAttribute('style', style.headerUserMenuTriggerImg)\n helpMenuContainer.appendChild(helpMenuTrigger)\n helpMenuTrigger.appendChild(helpMenuIcon)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, helpMenuTrigger, helpMenu), 50)\n helpMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n helpMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n const nav = document.getElementById('helperNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenu)\n })\n helpMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n const nav = document.getElementById('helperNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n })\n\n return helpMenuContainer\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createLoginSignUpButtons () {\n const profileLoginButtonPre = document.createElement('div')\n profileLoginButtonPre.setAttribute('style', style.headerBannerLogin)\n profileLoginButtonPre.appendChild(loginStatusBox(document, null, {}))\n return profileLoginButtonPre\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuButton (label: string, onClick: EventListenerOrEventListenerObject): HTMLElement {\n const button = document.createElement('button')\n button.setAttribute('style', style.headerUserMenuButton)\n button.onmouseover = function () {\n button.setAttribute('style', style.headerUserMenuButtonHover)\n }\n button.onmouseout = function () {\n button.setAttribute('style', style.headerUserMenuButton)\n }\n button.addEventListener('click', onClick)\n button.innerText = label\n return button\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuLink (label: string, href: string, target?: string): HTMLElement {\n const link = document.createElement('a')\n link.setAttribute('style', style.headerUserMenuLink)\n link.onmouseover = function () {\n link.setAttribute('style', style.headerUserMenuLinkHover)\n }\n link.onmouseout = function () {\n link.setAttribute('style', style.headerUserMenuLink)\n }\n link.href = href\n link.innerText = label\n if (target) link.target = target\n return link\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createUserMenu (store: IndexedFormula, user: NamedNode, userMenuList: MenuItems[]): Promise<HTMLElement> {\n const fetcher = (<any>store).fetcher\n if (fetcher) {\n // Making sure that Profile is loaded before building menu\n await fetcher.load(user)\n }\n\n const loggedInMenuList = document.createElement('ul')\n loggedInMenuList.setAttribute('style', style.headerUserMenuList)\n if (userMenuList) {\n userMenuList.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n }\n const loggedInMenu = document.createElement('nav')\n\n loggedInMenu.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n loggedInMenu.setAttribute('aria-hidden', 'true')\n loggedInMenu.setAttribute('id', 'loggedInNav')\n loggedInMenu.appendChild(loggedInMenuList)\n\n const loggedInMenuTrigger = document.createElement('button')\n loggedInMenuTrigger.setAttribute('style', style.headerUserMenuTrigger)\n loggedInMenuTrigger.type = 'button'\n const profileImg = getProfileImg(store, user)\n if (typeof profileImg === 'string') {\n loggedInMenuTrigger.innerHTML = profileImg\n } else {\n loggedInMenuTrigger.appendChild(profileImg)\n }\n\n const loggedInMenuContainer = document.createElement('div')\n loggedInMenuContainer.setAttribute('style', style.headerBannerUserMenuNotDisplayed)\n loggedInMenuContainer.appendChild(loggedInMenuTrigger)\n loggedInMenuContainer.appendChild(loggedInMenu)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, loggedInMenuTrigger, loggedInMenu), 50)\n loggedInMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n loggedInMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n const nav = document.getElementById('loggedInNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenu)\n })\n loggedInMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n const nav = document.getElementById('loggedInNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n })\n\n return loggedInMenuContainer\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuItem (child: HTMLElement): HTMLElement {\n const menuProfileItem = document.createElement('li')\n menuProfileItem.setAttribute('style', style.headerUserMenuListItem)\n menuProfileItem.appendChild(child)\n return menuProfileItem\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getProfileImg (store: IndexedFormula, user: NamedNode): string | HTMLElement {\n let profileUrl = null\n try {\n profileUrl = widgets.findImage(user)\n if (!profileUrl) {\n return emptyProfile\n }\n } catch {\n return emptyProfile\n }\n\n const profileImage = document.createElement('div')\n profileImage.setAttribute('style', style.headerUserMenuPhoto)\n profileImage.style.backgroundImage = `url(${profileUrl})`\n return profileImage\n}\n\n/**\n * @internal\n */\nfunction toggleMenu (event: Event, trigger: HTMLButtonElement, menu: HTMLElement): void {\n const isExpanded = trigger.getAttribute('aria-expanded') === 'true'\n const expand = event.type === 'mouseover'\n const close = event.type === 'mouseout'\n if ((isExpanded && expand) || (!isExpanded && close)) {\n return\n }\n trigger.setAttribute('aria-expanded', (!isExpanded).toString())\n menu.setAttribute('aria-hidden', isExpanded.toString())\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAD,uBAAA,CAAAJ,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AAA+D,SAAAQ,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OA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F,IAAIuG,UAAU,GAAG,IAAI;EACrB,IAAI;IACFA,UAAU,GAAGrK,OAAO,CAACsK,SAAS,CAACxG,IAAI,CAAC;IACpC,IAAI,CAACuG,UAAU,EAAE;MACf,OAAOE,0BAAY;IACrB;EACF,CAAC,CAAC,OAAAC,OAAA,EAAM;IACN,OAAOD,0BAAY;EACrB;EAEA,IAAME,YAAY,GAAGrH,QAAQ,CAACoC,aAAa,CAAC,KAAK,CAAC;EAClDiF,YAAY,CAAC9E,YAAY,CAAC,OAAO,EAAEzF,KAAK,CAACwK,mBAAmB,CAAC;EAC7DD,YAAY,CAACvK,KAAK,CAACyK,eAAe,UAAAC,MAAA,CAAUP,UAAU,MAAG;EACzD,OAAOI,YAAY;AACrB;;AAEA;AACA;AACA;AACA,SAAS3C,UAAUA,CAAED,KAAY,EAAEgD,OAA0B,EAAEC,IAAiB,EAAQ;EACtF,IAAMC,UAAU,GAAGF,OAAO,CAACG,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM;EACnE,IAAMC,MAAM,GAAGpD,KAAK,CAACN,IAAI,KAAK,WAAW;EACzC,IAAM2D,KAAK,GAAGrD,KAAK,CAACN,IAAI,KAAK,UAAU;EACvC,IAAKwD,UAAU,IAAIE,MAAM,IAAM,CAACF,UAAU,IAAIG,KAAM,EAAE;IACpD;EACF;EACAL,OAAO,CAAClF,YAAY,CAAC,eAAe,EAAE,CAAC,CAACoF,UAAU,EAAEI,QAAQ,EAAE,CAAC;EAC/DL,IAAI,CAACnF,YAAY,CAAC,aAAa,EAAEoF,UAAU,CAACI,QAAQ,EAAE,CAAC;AACzD"}
package/lib/log.js CHANGED
@@ -38,10 +38,7 @@ var TDEBUG = 32;
38
38
  var TALL = 63;
39
39
 
40
40
  /** @internal */
41
- var LogLevel;
42
- /** @internal */
43
- exports.LogLevel = LogLevel;
44
- (function (LogLevel) {
41
+ var LogLevel = /*#__PURE__*/function (LogLevel) {
45
42
  LogLevel[LogLevel["Error"] = 1] = "Error";
46
43
  LogLevel[LogLevel["Warning"] = 2] = "Warning";
47
44
  LogLevel[LogLevel["Message"] = 4] = "Message";
@@ -49,7 +46,10 @@ exports.LogLevel = LogLevel;
49
46
  LogLevel[LogLevel["Info"] = 16] = "Info";
50
47
  LogLevel[LogLevel["Debug"] = 32] = "Debug";
51
48
  LogLevel[LogLevel["All"] = 63] = "All";
52
- })(LogLevel || (exports.LogLevel = LogLevel = {}));
49
+ return LogLevel;
50
+ }({});
51
+ /** @internal */
52
+ exports.LogLevel = LogLevel;
53
53
  var _level = TERROR + TWARN + TMESG;
54
54
  /** @internal */
55
55
  var _ascending = false;
package/lib/log.js.map CHANGED
@@ -1 +1 @@
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,Q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,SAASC,YAAYA,CAAE5C,MAAM,EAAEF,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,0BAARA,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;EAAA,OAARA,QAAQ;AAAA;AAUpB;AAAAC,OAAA,CAAAD,QAAA,GAAAA,QAAA;AACA,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,GAAGC,MAAM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,UAAU,EACtB,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAC9D,WAAW,CA0Pb;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAC5D,WAAW,CAmBb;AACD;;;GAGG;AACH,wBAAsB,YAAY,IAAK,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAgB/D;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,GAC3B,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAGhC"}
@@ -24,17 +24,40 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
24
24
  var _rdflib = require("rdflib");
25
25
  var _solidLogic = require("solid-logic");
26
26
  var debug = _interopRequireWildcard(require("../debug"));
27
+ var style = _interopRequireWildcard(require("../style"));
27
28
  var _log = require("../log");
28
29
  var ns = _interopRequireWildcard(require("../ns.js"));
29
30
  var _signup = require("../signup/signup.js");
30
- var _style = require("../style");
31
31
  var utils = _interopRequireWildcard(require("../utils"));
32
32
  var widgets = _interopRequireWildcard(require("../widgets"));
33
33
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
34
34
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
35
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
36
36
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
37
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
37
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } /* eslint-disable camelcase */ /**
38
+ * Signing in, signing up, profile and preferences reloading
39
+ * Type index management
40
+ *
41
+ * Many functions in this module take a context object which
42
+ * holds various RDF symbols, add to it, and return a promise of it.
43
+ *
44
+ * * `me` RDF symbol for the user's WebID
45
+ * * `publicProfile` The user's public profile, iff loaded
46
+ * * `preferencesFile` The user's personal preference file, iff loaded
47
+ * * `index.public` The user's public type index file
48
+ * * `index.private` The user's private type index file
49
+ *
50
+ * Not RDF symbols:
51
+ * * `noun` A string in english for the type of thing -- like "address book"
52
+ * * `instance` An array of nodes which are existing instances
53
+ * * `containers` An array of nodes of containers of instances
54
+ * * `div` A DOM element where UI can be displayed
55
+ * * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages
56
+ * *
57
+ * * Vocabulary: "load" loads a file if it exists;
58
+ * * 'Ensure" CREATES the file if it does not exist (if it can) and then loads it.
59
+ * @packageDocumentation
60
+ */ // eslint-disable-next-line camelcase
38
61
  var store = _solidLogic.solidLogicSingleton.store;
39
62
  var _solidLogicSingleton$ = _solidLogic.solidLogicSingleton.profile,
40
63
  loadPreferences = _solidLogicSingleton$.loadPreferences,
@@ -562,21 +585,19 @@ function signInOrSignUpBox(dom, setUserCallback) {
562
585
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
563
586
  options = options || {};
564
587
  var signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle();
565
-
566
- // @@ TODO Remove the need to cast HTML element to any
567
588
  var box = dom.createElement('div');
568
589
  var magicClassName = 'SolidSignInOrSignUpBox';
569
590
  debug.log('widgets.signInOrSignUpBox');
570
591
  box.setUserCallback = setUserCallback;
571
592
  box.setAttribute('class', magicClassName);
572
- box.style = 'display:flex;'; // @@ fix all typecasts like this
593
+ box.setAttribute('style', 'display:flex;');
573
594
 
574
595
  // Sign in button with PopUP
575
596
  var signInPopUpButton = dom.createElement('input'); // multi
576
597
  box.appendChild(signInPopUpButton);
577
598
  signInPopUpButton.setAttribute('type', 'button');
578
599
  signInPopUpButton.setAttribute('value', 'Log in');
579
- signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #eef;"));
600
+ signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #eef;").concat(style.headerBannerLoginInput));
580
601
  _solidLogic.authSession.onLogin(function () {
581
602
  var me = _solidLogic.authn.currentUser();
582
603
  // const sessionInfo = authSession.info
@@ -617,7 +638,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
617
638
  box.appendChild(signupButton);
618
639
  signupButton.setAttribute('type', 'button');
619
640
  signupButton.setAttribute('value', 'Sign Up for Solid');
620
- signupButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #efe;"));
641
+ signupButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #efe;").concat(style.headerBannerLoginInput));
621
642
  signupButton.addEventListener('click', function (_event) {
622
643
  var signupMgr = new _signup.Signup();
623
644
  signupMgr.signup().then(function (uri) {
@@ -658,6 +679,8 @@ function renderSignInPopup(dom) {
658
679
  while (1) switch (_context.prev = _context.next) {
659
680
  case 0:
660
681
  _context.prev = 0;
682
+ // clear authorization metadata from store
683
+ _solidLogic.solidLogicSingleton.store.updater.flagAuthorizationMetadata();
661
684
  // Save hash
662
685
  preLoginRedirectHash = new URL(window.location.href).hash;
663
686
  if (preLoginRedirectHash) {
@@ -667,23 +690,23 @@ function renderSignInPopup(dom) {
667
690
  // Login
668
691
  locationUrl = new URL(window.location.href);
669
692
  locationUrl.hash = ''; // remove hash part
670
- _context.next = 8;
693
+ _context.next = 9;
671
694
  return _solidLogic.authSession.login({
672
695
  redirectUrl: locationUrl.href,
673
696
  oidcIssuer: issuerUri
674
697
  });
675
- case 8:
676
- _context.next = 13;
698
+ case 9:
699
+ _context.next = 14;
677
700
  break;
678
- case 10:
679
- _context.prev = 10;
701
+ case 11:
702
+ _context.prev = 11;
680
703
  _context.t0 = _context["catch"](0);
681
704
  (0, _log.alert)(_context.t0.message);
682
- case 13:
705
+ case 14:
683
706
  case "end":
684
707
  return _context.stop();
685
708
  }
686
- }, _callee, null, [[0, 10]]);
709
+ }, _callee, null, [[0, 11]]);
687
710
  }));
688
711
  return function loginToIssuer(_x11) {
689
712
  return _ref.apply(this, arguments);
@@ -835,45 +858,47 @@ _solidLogic.authSession.onLogout( /*#__PURE__*/(0, _asyncToGenerator2["default"]
835
858
  case 0:
836
859
  issuer = window.localStorage.getItem('loginIssuer');
837
860
  if (!issuer) {
838
- _context2.next = 19;
861
+ _context2.next = 20;
839
862
  break;
840
863
  }
841
864
  _context2.prev = 2;
865
+ // clear authorization metadata from store
866
+ _solidLogic.solidLogicSingleton.store.updater.flagAuthorizationMetadata();
842
867
  wellKnownUri = new URL(issuer);
843
868
  wellKnownUri.pathname = '/.well-known/openid-configuration';
844
- _context2.next = 7;
869
+ _context2.next = 8;
845
870
  return fetch(wellKnownUri.toString());
846
- case 7:
871
+ case 8:
847
872
  wellKnownResult = _context2.sent;
848
873
  if (!(wellKnownResult.status === 200)) {
849
- _context2.next = 15;
874
+ _context2.next = 16;
850
875
  break;
851
876
  }
852
- _context2.next = 11;
877
+ _context2.next = 12;
853
878
  return wellKnownResult.json();
854
- case 11:
879
+ case 12:
855
880
  openidConfiguration = _context2.sent;
856
881
  if (!(openidConfiguration && openidConfiguration.end_session_endpoint)) {
857
- _context2.next = 15;
882
+ _context2.next = 16;
858
883
  break;
859
884
  }
860
- _context2.next = 15;
885
+ _context2.next = 16;
861
886
  return fetch(openidConfiguration.end_session_endpoint, {
862
887
  credentials: 'include'
863
888
  });
864
- case 15:
865
- _context2.next = 19;
889
+ case 16:
890
+ _context2.next = 20;
866
891
  break;
867
- case 17:
868
- _context2.prev = 17;
892
+ case 18:
893
+ _context2.prev = 18;
869
894
  _context2.t0 = _context2["catch"](2);
870
- case 19:
871
- window.location.reload();
872
895
  case 20:
896
+ window.location.reload();
897
+ case 21:
873
898
  case "end":
874
899
  return _context2.stop();
875
900
  }
876
- }, _callee2, null, [[2, 17]]);
901
+ }, _callee2, null, [[2, 18]]);
877
902
  })));
878
903
 
879
904
  /**
@@ -1008,12 +1033,12 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1008
1033
  box.appendChild(dom.createElement('hr')); // @@
1009
1034
 
1010
1035
  var p = box.appendChild(dom.createElement('p'));
1011
- p.style = _style.commentStyle;
1036
+ p.setAttribute('style', style.commentStyle);
1012
1037
  p.textContent = "Where would you like to store the data for the ".concat(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.");
1013
1038
  // @@ TODO Remove the need to cast baseField to any
1014
1039
  var baseField = box.appendChild(dom.createElement('input'));
1015
1040
  baseField.setAttribute('type', 'text');
1016
- baseField.style = _style.textInputStyle;
1041
+ baseField.setAttribute('style', style.textInputStyle);
1017
1042
  baseField.size = 80; // really a string
1018
1043
  baseField.label = 'base URL';
1019
1044
  baseField.autocomplete = 'on';
@@ -1025,7 +1050,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1025
1050
  box.appendChild(dom.createElement('br')); // @@
1026
1051
 
1027
1052
  var button = box.appendChild(dom.createElement('button'));
1028
- button.style = _style.buttonStyle;
1053
+ button.setAttribute('style', style.buttonStyle);
1029
1054
  button.textContent = "Start new ".concat(noun, " at this URI");
1030
1055
  button.addEventListener('click', function (_event) {
1031
1056
  var newBase = baseField.value.replace(' ', '%20'); // do not re-encode in general, as % encodings may exist
@@ -1043,7 +1068,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1043
1068
  // Ignore master workspaces
1044
1069
  ns.space('MasterWorkspace'));
1045
1070
  });
1046
- var col1, col2, col3, tr, ws, style, comment;
1071
+ var col1, col2, col3, tr, ws, localStyle, comment;
1047
1072
  var cellStyle = 'height: 3em; margin: 1em; padding: 1em white; border-radius: 0.3em;';
1048
1073
  var deselectedStyle = "".concat(cellStyle, "border: 0px;");
1049
1074
  // const selectedStyle = cellStyle + 'border: 1px solid black;'
@@ -1058,8 +1083,8 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1058
1083
  tr.appendChild(col1);
1059
1084
  }
1060
1085
  col2 = dom.createElement('td');
1061
- style = _solidLogic.solidLogicSingleton.store.anyValue(ws, ns.ui('style'));
1062
- if (!style) {
1086
+ localStyle = _solidLogic.solidLogicSingleton.store.anyValue(ws, ns.ui('style'));
1087
+ if (!localStyle) {
1063
1088
  // Otherwise make up arbitrary colour
1064
1089
  var hash = function hash(x) {
1065
1090
  return x.split('').reduce(function (a, b) {
@@ -1068,9 +1093,9 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1068
1093
  }, 0);
1069
1094
  };
1070
1095
  var bgcolor = "#".concat((hash(ws.uri) & 0xffffff | 0xc0c0c0).toString(16)); // c0c0c0 forces pale
1071
- style = "color: black ; background-color: ".concat(bgcolor, ";");
1096
+ localStyle = "color: black ; background-color: ".concat(bgcolor, ";");
1072
1097
  }
1073
- col2.setAttribute('style', deselectedStyle + style);
1098
+ col2.setAttribute('style', deselectedStyle + localStyle);
1074
1099
  tr.target = ws.uri;
1075
1100
  var label = _solidLogic.solidLogicSingleton.store.any(ws, ns.rdfs('label'));
1076
1101
  if (!label) {
@@ -1090,7 +1115,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1090
1115
  comment = comment ? comment.value : 'Use this workspace';
1091
1116
  col2.addEventListener('click', function (_event) {
1092
1117
  col3.textContent = comment ? comment.value : '';
1093
- col3.setAttribute('style', deselectedStyle + style);
1118
+ col3.setAttribute('style', deselectedStyle + localStyle);
1094
1119
  var button = dom.createElement('button');
1095
1120
  button.textContent = 'Continue';
1096
1121
  // button.setAttribute('style', style);