solid-ui 2.4.22-fd0ccabe → 2.4.22-fd705c8d
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.
- package/dist/main.js +2059 -1163
- package/dist/main.js.map +1 -1
- package/lib/acl/access-controller.js +9 -14
- package/lib/acl/access-controller.js.map +1 -1
- package/lib/acl/access-groups.js +10 -15
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.js +9 -13
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.js +7 -11
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.js +13 -19
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/acl/index.js.map +1 -1
- package/lib/acl/styles.js.map +1 -1
- package/lib/acl/types.js.map +1 -1
- package/lib/chat/bookmarks.js +14 -19
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +9 -15
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js +12 -17
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js +29 -37
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/message.js +14 -14
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js +10 -23
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/thread.js +4 -9
- package/lib/chat/thread.js.map +1 -1
- package/lib/create/create.js.map +1 -1
- package/lib/create/index.js.map +1 -1
- package/lib/create/types.js.map +1 -1
- package/lib/debug.js.map +1 -1
- package/lib/folders.js.map +1 -1
- package/lib/footer/index.js +8 -10
- package/lib/footer/index.js.map +1 -1
- package/lib/footer/styleMap.js.map +1 -1
- package/lib/header/empty-profile.js.map +1 -1
- package/lib/header/index.js +9 -17
- package/lib/header/index.js.map +1 -1
- package/lib/header/styleMap.js.map +1 -1
- package/lib/iconBase.js.map +1 -1
- package/lib/icons/solid_logo.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/jss/index.js.map +1 -1
- package/lib/log.js.map +1 -1
- package/lib/login/login.js +21 -63
- package/lib/login/login.js.map +1 -1
- package/lib/matrix/index.js.map +1 -1
- package/lib/matrix/matrix.js.map +1 -1
- package/lib/matrix/types.js.map +1 -1
- package/lib/media/index.js.map +1 -1
- package/lib/media/media-capture.js +4 -20
- package/lib/media/media-capture.js.map +1 -1
- package/lib/messageArea.js.map +1 -1
- package/lib/noun_Camera_1618446_000000.js.map +1 -1
- package/lib/ns.js.map +1 -1
- package/lib/pad.js.map +1 -1
- package/lib/participation.js.map +1 -1
- package/lib/preferences.js.map +1 -1
- package/lib/signup/config-default.js.map +1 -1
- package/lib/signup/signup.js.map +1 -1
- package/lib/stories/decorators.js.map +1 -1
- package/lib/style.js.map +1 -1
- package/lib/style_multiSelect.js +67 -0
- package/lib/style_multiSelect.js.map +1 -0
- package/lib/table.js.map +1 -1
- package/lib/tabs.d.ts +1 -1
- package/lib/tabs.d.ts.map +1 -1
- package/lib/tabs.js +38 -22
- package/lib/tabs.js.map +1 -1
- package/lib/typings.d.js.map +1 -1
- package/lib/utils/headerFooterHelpers.js +5 -7
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/label.js +1 -1
- package/lib/utils/label.js.map +1 -1
- package/lib/versionInfo.js +5 -5
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons/iconLinks.js.map +1 -1
- package/lib/widgets/buttons.js.map +1 -1
- package/lib/widgets/dragAndDrop.js.map +1 -1
- package/lib/widgets/error.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteBar.js +17 -15
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteField.js +5 -8
- package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +21 -19
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js +8 -15
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js +22 -27
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/lib/widgets/forms/basic.js.map +1 -1
- package/lib/widgets/forms/comment.js.map +1 -1
- package/lib/widgets/forms/fieldFunction.js.map +1 -1
- package/lib/widgets/forms/fieldParams.js.map +1 -1
- package/lib/widgets/forms/formStyle.js.map +1 -1
- package/lib/widgets/forms.js +504 -203
- package/lib/widgets/forms.js.map +1 -1
- package/lib/widgets/index.js.map +1 -1
- package/lib/widgets/multiSelect.js +784 -0
- package/lib/widgets/multiSelect.js.map +1 -0
- package/lib/widgets/peoplePicker.js.map +1 -1
- package/lib/widgets/widgetHelpers.js.map +1 -1
- package/package.json +5 -3
package/lib/header/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/header/index.ts"],"names":["DEFAULT_HELP_MENU_ICON","icons","iconBase","DEFAUL_SOLID_ICON_URL","initHeader","store","userMenuList","options","header","document","getElementById","pod","rebuildHeader","authSession","onLogout","onLogin","user","authn","currentUser","innerHTML","createBanner","appendChild","podLink","createElement","href","uri","image","src","logo","createUserMenu","createLoginSignUpButtons","userMenu","banner","leftSideOfHeader","helpMenuList","helpMenu","createHelpMenu","helpMenuItems","forEach","menuItem","menuItemType","url","createUserMenuItem","createUserMenuLink","label","target","createUserMenuButton","onclick","setAttribute","helpMenuContainer","helpMenuTrigger","type","helpMenuIcon","helpIcon","throttledMenuToggle","event","toggleMenu","addEventListener","timer","setTimeout","clearTimeout","profileLoginButtonPre","onClick","button","innerText","link","fetcher","load","loggedInMenuList","loggedInMenu","loggedInMenuTrigger","profileImg","getProfileImg","loggedInMenuContainer","child","menuProfileItem","profileUrl","widgets","findImage","emptyProfile","profileImage","style","backgroundImage","trigger","menu","isExpanded","getAttribute","expand","close","toString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA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A,MAAMC,MAAM,GAAGhC,KAAK,CAACJ,IAAN,KAAe,WAA9B;AACA,MAAMqC,KAAK,GAAGjC,KAAK,CAACJ,IAAN,KAAe,UAA7B;;AACA,MAAKkC,UAAU,IAAIE,MAAf,IAA2B,CAACF,UAAD,IAAeG,KAA9C,EAAsD;AACpD;AACD;;AACDL,EAAAA,OAAO,CAACnC,YAAR,CAAqB,eAArB,EAAsC,CAAC,CAACqC,UAAF,EAAcI,QAAd,EAAtC;AACAL,EAAAA,IAAI,CAACpC,YAAL,CAAkB,aAAlB,EAAiCqC,UAAU,CAACI,QAAX,EAAjC;AACD","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"],"file":"index.js"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["DEFAULT_HELP_MENU_ICON","icons","iconBase","DEFAUL_SOLID_ICON_URL","initHeader","store","userMenuList","options","header","document","getElementById","pod","getPod","rebuildHeader","authSession","onLogout","onLogin","user","authn","currentUser","innerHTML","createBanner","appendChild","podLink","createElement","href","uri","addStyleClassToElement","image","src","logo","createUserMenu","createLoginSignUpButtons","userMenu","banner","leftSideOfHeader","helpMenuList","helpMenu","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","fetcher","load","loggedInMenuList","loggedInMenu","loggedInMenuTrigger","profileImg","getProfileImg","loggedInMenuContainer","child","menuProfileItem","profileUrl","widgets","findImage","emptyProfile","profileImage","style","backgroundImage","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;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;+CAXA,oJ;;AAaA;AACA;AACA;AACA,IAAMA,sBAAsB,GAAGC,YAAA,CAAMC,QAAN,GAAiB,eAAhD;AACA,IAAMC,qBAAqB,GAAG,sDAA9B;;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;SACsBC,U;;;AAWtB;AACA;AACA;;;;4FAbO,kBAA2BC,KAA3B,EAAkDC,YAAlD,EAA6EC,OAA7E;IAAA;IAAA;MAAA;QAAA;UAAA;YACCC,MADD,GACUC,QAAQ,CAACC,cAAT,CAAwB,YAAxB,CADV;;YAAA,IAEAF,MAFA;cAAA;cAAA;YAAA;;YAAA;;UAAA;YAMCG,GAND,GAMO,IAAAC,2BAAA,GANP;YAOLC,aAAa,CAACL,MAAD,EAASH,KAAT,EAAgBM,GAAhB,EAAqBL,YAArB,EAAmCC,OAAnC,CAAb;;YACAO,uBAAA,CAAYC,QAAZ,CAAqBF,aAAa,CAACL,MAAD,EAASH,KAAT,EAAgBM,GAAhB,EAAqBL,YAArB,EAAmCC,OAAnC,CAAlC;;YACAO,uBAAA,CAAYE,OAAZ,CAAoBH,aAAa,CAACL,MAAD,EAASH,KAAT,EAAgBM,GAAhB,EAAqBL,YAArB,EAAmCC,OAAnC,CAAjC;;UATK;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,C;;;;AAcA,SAASM,aAAT,CAAwBL,MAAxB,EAA6CH,KAA7C,EAAoEM,GAApE,EAAoFL,YAApF,EAA+GC,OAA/G,EAAwI;EAC7I,gGAAO;IAAA;IAAA;MAAA;QAAA;UAAA;YACCU,IADD,GACQC,iB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,UAAU,GAAGF,OAAO,CAACG,YAAR,CAAqB,eAArB,MAA0C,MAA7D;EACA,IAAMC,MAAM,GAAGjC,KAAK,CAACL,IAAN,KAAe,WAA9B;EACA,IAAMuC,KAAK,GAAGlC,KAAK,CAACL,IAAN,KAAe,UAA7B;;EACA,IAAKoC,UAAU,IAAIE,MAAf,IAA2B,CAACF,UAAD,IAAeG,KAA9C,EAAsD;IACpD;EACD;;EACDL,OAAO,CAACrC,YAAR,CAAqB,eAArB,EAAsC,CAAC,CAACuC,UAAF,EAAcI,QAAd,EAAtC;EACAL,IAAI,CAACtC,YAAL,CAAkB,aAAlB,EAAiCuC,UAAU,CAACI,QAAX,EAAjC;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"styleMap.js","names":["styleMap","background","border","color","cursor","display","fontFamily","fontSize","textAlign","padding","width","backgroundColor","a","textDecoration","height","img","borderRadius","listStyle","margin","borderRight","position","right","top","borderBottom","backgroundPosition","backgroundRepeat","backgroundSize","boxShadow","justifyContent","marginBottom","marginLeft","input","borderLeft"],"sources":["../../src/header/styleMap.ts"],"sourcesContent":["export const styleMap = {\n 'header-user-menu': {\n },\n 'header-user-menu__link': {\n background: 'none',\n border: '0',\n color: 'black',\n cursor: 'pointer',\n display: 'block',\n fontFamily: 'Arial',\n fontSize: '1em',\n textAlign: 'left',\n padding: '1em',\n width: '100%',\n '&:focus, &:hover': {\n backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'\n // backgroundColor: '#eee'\n },\n a: {\n textDecoration: 'none'\n }\n },\n 'header-user-menu__trigger': {\n background: 'none',\n border: '0',\n cursor: 'pointer',\n width: '60px', // defined in mashlib as a SASS variable $icon_size\n height: '60px', // defined in mashlib as a SASS variable $icon_size\n img: {\n borderRadius: '50%',\n height: '56px', // defined in mashlib as a SASS variable $icon_size - 4px\n width: '56px'\n }\n },\n 'header-user-menu__button': {\n background: 'none',\n border: '0',\n color: 'black',\n cursor: 'pointer',\n display: 'block',\n fontFamily: 'Arial',\n fontSize: '1em',\n textAlign: 'left',\n padding: '1em',\n width: '100%',\n '&:focus, &:hover': {\n backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'\n }\n },\n 'header-user-menu__list': {\n listStyle: 'none',\n margin: '0',\n padding: '0'\n },\n 'header-user-menu__navigation-menu': {\n background: 'white',\n border: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n borderRight: '0',\n position: 'absolute',\n right: '0',\n top: '60px', // defined in mashlib as a SASS variable $icon_size\n width: '200px',\n 'z-index': '1',\n '&[aria-hidden = true]': {\n display: 'none'\n }\n },\n 'header-user-menu__list-item': {\n borderBottom: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n '&:last-child': {\n border: '0'\n }\n },\n 'header-user-menu__photo': {\n borderRadius: '50%',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n height: '50px', // $icon-size - $image-margin * 2 image-margin was 5px in mashlib and icon size 60px\n width: '50px'\n },\n 'header-banner': {\n boxShadow: '0px 1px 4px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n display: 'flex',\n justifyContent: 'space-between',\n padding: '0 1.5em',\n marginBottom: '4px'\n },\n 'header-banner__link': {\n display: 'block'\n },\n 'header-banner__right-menu': {\n display: 'flex'\n },\n 'header-banner__login': {\n marginLeft: 'auto',\n input: {\n // hacks to override the default style of login and signup button from solid-ui\n margin: '0.75em 0 0.75em 0.5em !important',\n padding: '0.5em !important'\n }\n },\n 'header-banner__user-menu': {\n borderLeft: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n marginLeft: 'auto'\n },\n 'header-banner__help-menu': {\n borderLeft: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n marginLeft: 'auto'\n },\n 'header-banner__icon': {\n backgroundSize: '65px 60px',\n height: '60px !important', // this is the icon size\n width: '65px !important' // may just be 65px round($icon-size * 352 / 322);\n },\n 'header-banner__help-icon': {\n width: '28px !important'\n }\n}\n"],"mappings":";;;;;;AAAO,IAAMA,QAAQ,GAAG;EACtB,oBAAoB,EADE;EAGtB,0BAA0B;IACxBC,UAAU,EAAE,MADY;IAExBC,MAAM,EAAE,GAFgB;IAGxBC,KAAK,EAAE,OAHiB;IAIxBC,MAAM,EAAE,SAJgB;IAKxBC,OAAO,EAAE,OALe;IAMxBC,UAAU,EAAE,OANY;IAOxBC,QAAQ,EAAE,KAPc;IAQxBC,SAAS,EAAE,MARa;IASxBC,OAAO,EAAE,KATe;IAUxBC,KAAK,EAAE,MAViB;IAWxB,oBAAoB;MAClBC,eAAe,EAAE,kEADC,CAElB;;IAFkB,CAXI;IAexBC,CAAC,EAAE;MACDC,cAAc,EAAE;IADf;EAfqB,CAHJ;EAsBtB,6BAA6B;IAC3BZ,UAAU,EAAE,MADe;IAE3BC,MAAM,EAAE,GAFmB;IAG3BE,MAAM,EAAE,SAHmB;IAI3BM,KAAK,EAAE,MAJoB;IAIZ;IACfI,MAAM,EAAE,MALmB;IAKX;IAChBC,GAAG,EAAE;MACHC,YAAY,EAAE,KADX;MAEHF,MAAM,EAAE,MAFL;MAEa;MAChBJ,KAAK,EAAE;IAHJ;EANsB,CAtBP;EAkCtB,4BAA4B;IAC1BT,UAAU,EAAE,MADc;IAE1BC,MAAM,EAAE,GAFkB;IAG1BC,KAAK,EAAE,OAHmB;IAI1BC,MAAM,EAAE,SAJkB;IAK1BC,OAAO,EAAE,OALiB;IAM1BC,UAAU,EAAE,OANc;IAO1BC,QAAQ,EAAE,KAPgB;IAQ1BC,SAAS,EAAE,MARe;IAS1BC,OAAO,EAAE,KATiB;IAU1BC,KAAK,EAAE,MAVmB;IAW1B,oBAAoB;MAClBC,eAAe,EAAE;IADC;EAXM,CAlCN;EAiDtB,0BAA0B;IACxBM,SAAS,EAAE,MADa;IAExBC,MAAM,EAAE,GAFgB;IAGxBT,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Fa;IAEM;IAC3BJ,KAAK,EAAE,iBAHc,CAGI;;EAHJ,CA9GD;EAmHtB,4BAA4B;IAC1BA,KAAK,EAAE;EADmB;AAnHN,CAAjB"}
|
package/lib/iconBase.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"iconBase.js","names":["iconsOnGithub","icons","module","scriptURI","iconBase","slice","lastIndexOf","originalIconBase","$SolidTestEnvironment","log"],"sources":["../src/iconBase.ts"],"sourcesContent":["// Works in FF extension - what about browserify??\n// 2021-04-08 Convert to TS\n\n/* The Firefox case is left for historical record, as we don't currenly\n * have a FF extension for mashlib, but we could. This is sthepoint to\n * hack the place it can find its icons internally\n *\n * The $SolidTestEnvironment is important and is used for\n * example when testing on localhost to specify a place the icons be found\n * in your test set up.\n *\n * You can also use it if you want to just run a mashlib whhich takes its\n * icons seved by other than github.\n */\n/* eslint-disable multiline-ternary */\n\nimport { log } from './debug'\n\ndeclare let $SolidTestEnvironment\n\n// Do not export. lways us this module to find the icons, as it varies\nconst iconsOnGithub = 'https://solidos.github.io/solid-ui/src'\n\nexport const icons = (module as any).scriptURI // Firefox extension\n ? {\n iconBase:\n (module as any).scriptURI.slice(0, (module as any).scriptURI.lastIndexOf('/')) + '/icons/',\n originalIconBase:\n (module as any).scriptURI.slice(0, (module as any).scriptURI.lastIndexOf('/')) +\n '/originalIcons/'\n }\n : typeof $SolidTestEnvironment !== 'undefined' && $SolidTestEnvironment.iconBase // Test environemnt\n ? {\n iconBase: $SolidTestEnvironment.iconBase,\n originalIconBase: $SolidTestEnvironment.originalIconBase\n }\n : {\n // Normal case:\n iconBase: iconsOnGithub + '/icons/',\n originalIconBase: iconsOnGithub + '/originalIcons/'\n }\n\nlog(' icons.iconBase is set to : ' + icons.iconBase)\n\n// allow tests etc named-import this directly from this module\nexport const iconBase = icons.iconBase\nexport const originalIconBase = icons.originalIconBase\n"],"mappings":";;;;;;;AAgBA;;AAhBA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AAMA;AACA,IAAMA,aAAa,GAAG,wCAAtB;AAEO,IAAMC,KAAK,GAAIC,MAAD,CAAgBC,SAAhB,CAA0B;AAA1B,EACjB;EACEC,QAAQ,EACLF,MAAD,CAAgBC,SAAhB,CAA0BE,KAA1B,CAAgC,CAAhC,EAAoCH,MAAD,CAAgBC,SAAhB,CAA0BG,WAA1B,CAAsC,GAAtC,CAAnC,IAAiF,SAFrF;EAGEC,gBAAgB,EACbL,MAAD,CAAgBC,SAAhB,CAA0BE,KAA1B,CAAgC,CAAhC,EAAoCH,MAAD,CAAgBC,SAAhB,CAA0BG,WAA1B,CAAsC,GAAtC,CAAnC,IACA;AALJ,CADiB,GAQjB,OAAOE,qBAAP,KAAiC,WAAjC,IAAgDA,qBAAqB,CAACJ,QAAtE,CAA+E;AAA/E,EACE;EACEA,QAAQ,EAAEI,qBAAqB,CAACJ,QADlC;EAEEG,gBAAgB,EAAEC,qBAAqB,CAACD;AAF1C,CADF,GAKE;EACA;EACEH,QAAQ,EAAEJ,aAAa,GAAG,SAF5B;EAGEO,gBAAgB,EAAEP,aAAa,GAAG;AAHpC,CAbC;;AAmBP,IAAAS,UAAA,EAAI,mCAAmCR,KAAK,CAACG,QAA7C,E,CAEA;;AACO,IAAMA,QAAQ,GAAGH,KAAK,CAACG,QAAvB;;AACA,IAAMG,gBAAgB,GAAGN,KAAK,CAACM,gBAA/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"solid_logo.js","names":[],"sources":["../../src/icons/solid_logo.ts"],"sourcesContent":[""],"mappings":""}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;;;AAEA;;;;AACA;;AACA;;AAEA;;AACA;;;;AACA;;;;AACA;;AACA;;AAEA;;AAEA;;AAEA;;;;AAEA;;;;AAEA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1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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,GAAJ,EAAvB;AAEA;AACA;AACA;AACA;AACA;;AACO,SAASC,UAAT,CAAqBC,cAArB,EAAkDC,MAAlD,EAAuF;EAC5F,IAAMC,UAAU,GAAGC,aAAa,CAACH,cAAD,CAAhC;EACA,OAAOE,UAAU,CAACE,gBAAX,CAA4BH,MAA5B,EAAoCI,MAApC,EAAP;AACD;AAED;AACA;AACA;AACA;AACA;;;AACO,SAASF,aAAT,CAAwBH,cAAxB,EAA0D;EAC/D,IAAMM,gBAAgB,GAAGT,cAAc,CAACU,GAAf,CAAmBP,cAAnB,CAAzB;;EACA,IAAIM,gBAAJ,EAAsB;IACpB,OAAOA,gBAAP;EACD;;EACD,IAAMJ,UAAU,GAAG,IAAAM,WAAA,EAAO;IACxBR,cAAc,EAAdA,cADwB;IAExBS,OAAO,EAAE,IAAAC,4BAAA,IAASD;EAFM,CAAP,CAAnB;EAIAZ,cAAc,CAACc,GAAf,CAAmBX,cAAnB,EAAmCE,UAAnC;EACA,OAAOA,UAAP;AACD"}
|
package/lib/log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\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,CAAf;AACA;;AACA,IAAMC,KAAK,GAAG,CAAd;AACA;;AACA,IAAMC,KAAK,GAAG,CAAd;AACA;;AACA,IAAMC,QAAQ,GAAG,CAAjB;AACA;;AACA,IAAMC,KAAK,GAAG,EAAd;AACA;;AACA,IAAMC,MAAM,GAAG,EAAf;AACA;;AACA,IAAMC,IAAI,GAAG,EAAb;AAEA;;IACYC,Q;AAUZ;;;;WAVYA,Q;EAAAA,Q,CAAAA,Q,YACFP,M;EADEO,Q,CAAAA,Q,cAEAN,K;EAFAM,Q,CAAAA,Q,cAGAL,K;EAHAK,Q,CAAAA,Q,cAIAJ,Q;EAJAI,Q,CAAAA,Q,WAKHH,K;EALGG,Q,CAAA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AACA;AACA;AACA;;;AACO,SAASkB,QAAT,CAAmBC,KAAnB,EAAwC;EAC7CpC,MAAM,GAAGF,IAAT;EACA+B,KAAK,CAAC,sBAAsBO,KAAvB,CAAL;EACApC,MAAM,GAAGoC,KAAT;AACD;AAED;AACA;AACA;;;AACO,SAASC,QAAT,GAA2B;EAAA;;EAChC,IAAI,CAACnC,IAAL,EAAW;EACX,IAAMkC,KAAK,GAAGpC,MAAd;EACAA,MAAM,GAAGF,IAAT;EACA+B,KAAK,CAAC,UAAA3B,IAAI,UAAJ,oDAAMoC,IAAN,0DAAYrB,SAAZ,KAAyB,EAA1B,CAAL;EACAjB,MAAM,GAAGoC,KAAT;AACD;AAED;AACA;AACA;;;AACO,SAASG,YAAT,GAAyB;EAC9BtC,UAAU,GAAG,IAAb;AACD;AAED;AACA;AACA;AACA;;;AACO,SAASuC,aAAT,GAA0B;EAC/BvC,UAAU,GAAG,KAAb;AACD;AAED;;;AACO,SAASoB,YAAT,CAAuBd,GAAvB,EAA4C;EACjD;EACA,OAAOA,GAAG,CACPkC,OADI,CACI,IADJ,EACU,OADV,EAEJA,OAFI,CAEI,IAFJ,EAEU,MAFV,EAGJA,OAHI,CAGI,IAHJ,EAGU,MAHV,CAAP;AAID;AAED;;;AACO,SAASC,YAAT,CAAuBrC,MAAvB,EAA+BF,QAA/B,EAAyC;EAC9CC,OAAO,GAAGC,MAAV;EACAH,IAAI,GAAGC,QAAP;AACD"}
|
package/lib/login/login.js
CHANGED
|
@@ -20,8 +20,6 @@ exports.registrationList = registrationList;
|
|
|
20
20
|
exports.renderSignInPopup = renderSignInPopup;
|
|
21
21
|
exports.selectWorkspace = selectWorkspace;
|
|
22
22
|
|
|
23
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
24
|
-
|
|
25
23
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
26
24
|
|
|
27
25
|
var _rdflib = require("rdflib");
|
|
@@ -46,32 +44,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
46
44
|
|
|
47
45
|
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; }
|
|
48
46
|
|
|
49
|
-
/* eslint-disable camelcase */
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Signing in, signing up, profile and preferences reloading
|
|
53
|
-
* Type index management
|
|
54
|
-
*
|
|
55
|
-
* Many functions in this module take a context object which
|
|
56
|
-
* holds various RDF symbols, add to it, and return a promise of it.
|
|
57
|
-
*
|
|
58
|
-
* * `me` RDF symbol for the user's WebID
|
|
59
|
-
* * `publicProfile` The user's public profile, iff loaded
|
|
60
|
-
* * `preferencesFile` The user's personal preference file, iff loaded
|
|
61
|
-
* * `index.public` The user's public type index file
|
|
62
|
-
* * `index.private` The user's private type index file
|
|
63
|
-
*
|
|
64
|
-
* Not RDF symbols:
|
|
65
|
-
* * `noun` A string in english for the type of thing -- like "address book"
|
|
66
|
-
* * `instance` An array of nodes which are existing instances
|
|
67
|
-
* * `containers` An array of nodes of containers of instances
|
|
68
|
-
* * `div` A DOM element where UI can be displayed
|
|
69
|
-
* * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages
|
|
70
|
-
* *
|
|
71
|
-
* * Vocabulary: "load" loads a file if it exists;
|
|
72
|
-
* * 'Ensure" CREATES the file if it does not exist (if it can) and then loads it.
|
|
73
|
-
* @packageDocumentation
|
|
74
|
-
*/
|
|
47
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
75
48
|
|
|
76
49
|
/**
|
|
77
50
|
* Resolves with the logged in user's WebID
|
|
@@ -134,9 +107,9 @@ function ensureLoadedPreferences(_x2) {
|
|
|
134
107
|
|
|
135
108
|
|
|
136
109
|
function _ensureLoadedPreferences() {
|
|
137
|
-
_ensureLoadedPreferences = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
110
|
+
_ensureLoadedPreferences = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(context) {
|
|
138
111
|
var statusArea, progressDisplay, complain, preferencesFile, m2;
|
|
139
|
-
return
|
|
112
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
140
113
|
while (1) {
|
|
141
114
|
switch (_context4.prev = _context4.next) {
|
|
142
115
|
case 0:
|
|
@@ -279,9 +252,9 @@ function ensureLoadedProfile(_x3) {
|
|
|
279
252
|
|
|
280
253
|
|
|
281
254
|
function _ensureLoadedProfile() {
|
|
282
|
-
_ensureLoadedProfile = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
255
|
+
_ensureLoadedProfile = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(context) {
|
|
283
256
|
var logInContext;
|
|
284
|
-
return
|
|
257
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
285
258
|
while (1) {
|
|
286
259
|
switch (_context5.prev = _context5.next) {
|
|
287
260
|
case 0:
|
|
@@ -348,9 +321,9 @@ function findAppInstances(_x4, _x5, _x6) {
|
|
|
348
321
|
|
|
349
322
|
|
|
350
323
|
function _findAppInstances() {
|
|
351
|
-
_findAppInstances = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
324
|
+
_findAppInstances = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(context, theClass, isPublic) {
|
|
352
325
|
var visibility, index, thisIndex, registrations, instances, containers, unique, e, i, cont;
|
|
353
|
-
return
|
|
326
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
354
327
|
while (1) {
|
|
355
328
|
switch (_context6.prev = _context6.next) {
|
|
356
329
|
case 0:
|
|
@@ -498,10 +471,10 @@ function registrationControl(_x7, _x8, _x9) {
|
|
|
498
471
|
|
|
499
472
|
|
|
500
473
|
function _registrationControl() {
|
|
501
|
-
_registrationControl = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
474
|
+
_registrationControl = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(context, instance, theClass) {
|
|
502
475
|
var dom, box, context2, msg, tbody, form, registrationStatements, index, statements, _msg;
|
|
503
476
|
|
|
504
|
-
return
|
|
477
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
505
478
|
while (1) {
|
|
506
479
|
switch (_context7.prev = _context7.next) {
|
|
507
480
|
case 0:
|
|
@@ -604,9 +577,9 @@ function registrationList(_x10, _x11) {
|
|
|
604
577
|
}
|
|
605
578
|
|
|
606
579
|
function _registrationList() {
|
|
607
|
-
_registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
580
|
+
_registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(context0, options) {
|
|
608
581
|
var dom, div, box;
|
|
609
|
-
return
|
|
582
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
610
583
|
while (1) {
|
|
611
584
|
switch (_context8.prev = _context8.next) {
|
|
612
585
|
case 0:
|
|
@@ -628,7 +601,6 @@ function _registrationList() {
|
|
|
628
601
|
return _context8.abrupt("return", (0, _solidLogic.ensureTypeIndexes)(context0).then(function (context) {
|
|
629
602
|
box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
|
|
630
603
|
|
|
631
|
-
// tbody will be inserted anyway
|
|
632
604
|
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;');
|
|
633
605
|
var table = box.firstChild;
|
|
634
606
|
var ix = [];
|
|
@@ -652,7 +624,6 @@ function _registrationList() {
|
|
|
652
624
|
} // const cla = statement.subject
|
|
653
625
|
|
|
654
626
|
|
|
655
|
-
// const cla = statement.subject
|
|
656
627
|
var inst = statement.object;
|
|
657
628
|
table.appendChild(widgets.personTR(dom, ns.solid('instance'), inst, {
|
|
658
629
|
deleteFunction: function deleteFunction(_x) {
|
|
@@ -690,19 +661,6 @@ function _registrationList() {
|
|
|
690
661
|
*/
|
|
691
662
|
|
|
692
663
|
|
|
693
|
-
// registrationList
|
|
694
|
-
|
|
695
|
-
/*
|
|
696
|
-
//const containers = solidLogicSingleton.store.each(theClass, ns.solid('instanceContainer'));
|
|
697
|
-
if (containers.length) {
|
|
698
|
-
fetcher.load(containers).then(function(xhrs){
|
|
699
|
-
for (const i=0; i<containers.length; i++) {
|
|
700
|
-
const cont = containers[i];
|
|
701
|
-
instances = instances.concat(solidLogicSingleton.store.each(cont, ns.ldp('contains')));
|
|
702
|
-
}
|
|
703
|
-
});
|
|
704
|
-
}
|
|
705
|
-
*/
|
|
706
664
|
return context;
|
|
707
665
|
}));
|
|
708
666
|
|
|
@@ -829,9 +787,9 @@ function renderSignInPopup(dom) {
|
|
|
829
787
|
issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton);
|
|
830
788
|
|
|
831
789
|
var loginToIssuer = /*#__PURE__*/function () {
|
|
832
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
790
|
+
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(issuerUri) {
|
|
833
791
|
var preLoginRedirectHash;
|
|
834
|
-
return
|
|
792
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
835
793
|
while (1) {
|
|
836
794
|
switch (_context.prev = _context.next) {
|
|
837
795
|
case 0:
|
|
@@ -1029,9 +987,9 @@ function loginStatusBox(dom) {
|
|
|
1029
987
|
return box;
|
|
1030
988
|
}
|
|
1031
989
|
|
|
1032
|
-
_solidLogic.authSession.onLogout( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
990
|
+
_solidLogic.authSession.onLogout( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
1033
991
|
var issuer, wellKnownUri, wellKnownResult, openidConfiguration;
|
|
1034
|
-
return
|
|
992
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1035
993
|
while (1) {
|
|
1036
994
|
switch (_context2.prev = _context2.next) {
|
|
1037
995
|
case 0:
|
|
@@ -1161,9 +1119,9 @@ function selectWorkspace(dom, appDetails, callbackWS) {
|
|
|
1161
1119
|
|
|
1162
1120
|
|
|
1163
1121
|
function _makeNewWorkspace() {
|
|
1164
|
-
_makeNewWorkspace = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
1122
|
+
_makeNewWorkspace = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_event) {
|
|
1165
1123
|
var row, cell, newBase, newWs, newData;
|
|
1166
|
-
return
|
|
1124
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
1167
1125
|
while (1) {
|
|
1168
1126
|
switch (_context3.prev = _context3.next) {
|
|
1169
1127
|
case 0:
|
|
@@ -1424,10 +1382,10 @@ function getUserRoles() {
|
|
|
1424
1382
|
|
|
1425
1383
|
|
|
1426
1384
|
function _getUserRoles() {
|
|
1427
|
-
_getUserRoles = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
1385
|
+
_getUserRoles = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
1428
1386
|
var _yield$ensureLoadedPr, me, preferencesFile, preferencesFileError;
|
|
1429
1387
|
|
|
1430
|
-
return
|
|
1388
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
1431
1389
|
while (1) {
|
|
1432
1390
|
switch (_context9.prev = _context9.next) {
|
|
1433
1391
|
case 0:
|
|
@@ -1474,9 +1432,9 @@ function filterAvailablePanes(_x14) {
|
|
|
1474
1432
|
}
|
|
1475
1433
|
|
|
1476
1434
|
function _filterAvailablePanes() {
|
|
1477
|
-
_filterAvailablePanes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
1435
|
+
_filterAvailablePanes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(panes) {
|
|
1478
1436
|
var userRoles;
|
|
1479
|
-
return
|
|
1437
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
1480
1438
|
while (1) {
|
|
1481
1439
|
switch (_context10.prev = _context10.next) {
|
|
1482
1440
|
case 0:
|