solid-ui 2.4.27 → 2.4.28

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 (91) 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} +7906 -20465
  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/chatLogic.js +63 -26
  33. package/lib/chat/chatLogic.js.map +1 -1
  34. package/lib/chat/keys.d.ts +13 -0
  35. package/lib/chat/keys.d.ts.map +1 -0
  36. package/lib/chat/keys.js +233 -0
  37. package/lib/chat/keys.js.map +1 -0
  38. package/lib/chat/message.js +67 -8
  39. package/lib/chat/message.js.map +1 -1
  40. package/lib/chat/signature.d.ts +24 -0
  41. package/lib/chat/signature.d.ts.map +1 -0
  42. package/lib/chat/signature.js +112 -0
  43. package/lib/chat/signature.js.map +1 -0
  44. package/lib/footer/index.d.ts.map +1 -1
  45. package/lib/footer/index.js +5 -1
  46. package/lib/footer/index.js.map +1 -1
  47. package/lib/header/index.d.ts.map +1 -1
  48. package/lib/header/index.js +41 -20
  49. package/lib/header/index.js.map +1 -1
  50. package/lib/login/login.d.ts.map +1 -1
  51. package/lib/login/login.js +39 -37
  52. package/lib/login/login.js.map +1 -1
  53. package/lib/style.js +60 -2
  54. package/lib/style.js.map +1 -1
  55. package/lib/utils/headerFooterHelpers.d.ts +0 -4
  56. package/lib/utils/headerFooterHelpers.d.ts.map +1 -1
  57. package/lib/utils/headerFooterHelpers.js +0 -27
  58. package/lib/utils/headerFooterHelpers.js.map +1 -1
  59. package/lib/utils/keyHelpers/accessData.d.ts +10 -0
  60. package/lib/utils/keyHelpers/accessData.d.ts.map +1 -0
  61. package/lib/utils/keyHelpers/accessData.js +232 -0
  62. package/lib/utils/keyHelpers/accessData.js.map +1 -0
  63. package/lib/utils/keyHelpers/acl.d.ts +20 -0
  64. package/lib/utils/keyHelpers/acl.d.ts.map +1 -0
  65. package/lib/utils/keyHelpers/acl.js +93 -0
  66. package/lib/utils/keyHelpers/acl.js.map +1 -0
  67. package/lib/versionInfo.js +6 -6
  68. package/lib/versionInfo.js.map +1 -1
  69. package/lib/widgets/buttons.d.ts.map +1 -1
  70. package/lib/widgets/buttons.js +43 -49
  71. package/lib/widgets/buttons.js.map +1 -1
  72. package/lib/widgets/forms.js +8 -4
  73. package/lib/widgets/forms.js.map +1 -1
  74. package/package.json +13 -10
  75. package/dist/main.js.map +0 -1
  76. package/lib/acl/styles.d.ts +0 -90
  77. package/lib/acl/styles.d.ts.map +0 -1
  78. package/lib/acl/styles.js +0 -98
  79. package/lib/acl/styles.js.map +0 -1
  80. package/lib/footer/styleMap.d.ts +0 -8
  81. package/lib/footer/styleMap.d.ts.map +0 -1
  82. package/lib/footer/styleMap.js +0 -15
  83. package/lib/footer/styleMap.js.map +0 -1
  84. package/lib/header/styleMap.d.ts +0 -117
  85. package/lib/header/styleMap.d.ts.map +0 -1
  86. package/lib/header/styleMap.js +0 -139
  87. package/lib/header/styleMap.js.map +0 -1
  88. package/lib/jss/index.d.ts +0 -20
  89. package/lib/jss/index.d.ts.map +0 -1
  90. package/lib/jss/index.js +0 -47
  91. package/lib/jss/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","names":["_rdflib","require","_solidLogic","debug","_interopRequireWildcard","_log","ns","_signup","_style","utils","widgets","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","step","next","_e2","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","arr","len","arr2","store","solidLogicSingleton","_solidLogicSingleton$","profile","loadPreferences","loadProfile","_solidLogicSingleton$2","typeIndex","getScopedAppInstances","getRegistrations","loadAllTypeIndexes","getScopedAppsFromIndex","deleteTypeIndexRegistration","ensureLoggedIn","context","me","authn","currentUser","saveUser","Promise","resolve","checkUser","then","webId","log","concat","div","dom","box","loginStatusBox","webIdUri","appendChild","ensureLoadedPreferences","_x","_ensureLoadedPreferences","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee4","statusArea","progressDisplay","complain","preferencesFile","m2","wrap","_callee4$","_context4","prev","_complain","message","errorMessageBlock","abrupt","ensureLoadedProfile","sent","parentNode","removeChild","t0","UnauthorizedError","alert","CrossOriginForbiddenError","window","location","origin","preferencesFileError","SameOriginForbiddenError","warn","NotEditableError","WebOperationError","FetchError","status","Error","stop","_x2","_ensureLoadedProfile","_callee5","logInContext","_callee5$","_context5","publicProfile","findAppInstances","_x3","_x4","_x5","_findAppInstances","_callee6","theClass","isPublic","items","_callee6$","_context6","filter","item","scope","label","instances","map","instance","scopeLabel","mine","sameTerm","agent","registrationControl","_x6","_x7","_x8","_registrationControl","_callee7","registrationStatements","renderScopeCheckbox","scopes","msg","tbody","form","_iterator","_step","row","_callee7$","_context7","_renderScopeCheckbox","statements","index","noun","buildCheckboxForm","_registrationStatemen","registrations","reg","newThing","st","solid","createElement","innerHTML","textContent","setAttribute","children","BlankNode","renderScopeHeadingRow","backgroundColor","cell","style","backgoundColor","header","textAlign","registrationList","_x9","_x10","_registrationList","_callee9","options","table","_iterator2","_step2","headingRow","_iterator3","_step3","_loop","_callee9$","_context10","firstChild","type","display","_loop$","_context9","personTR","deleteFunction","_deleteFunction","_callee8","_callee8$","_context8","paddingLeft","delegateYield","t1","finish","t2","getDefaultSignInButtonStyle","signInOrSignUpBox","setUserCallback","undefined","signInButtonStyle","buttonStyle","magicClassName","signInPopUpButton","authSession","onLogin","webIdURI","uri","divs","getElementsByClassName","parent","addEventListener","offline","offlineTestID","renderSignInPopup","signupButton","_event","signupMgr","Signup","signup","issuerPopup","body","issuerPopupBox","issuerPopupBoxTopMenu","issuerPopupBoxLabel","innerText","issuerPopupBoxCloseButton","remove","loginToIssuer","_ref","_callee","issuerUri","preLoginRedirectHash","locationUrl","_callee$","_context","URL","href","hash","localStorage","setItem","login","redirectUrl","oidcIssuer","_x11","issuerTextContainer","issuerTextInputContainer","issuerTextLabel","issuerTextInput","getItem","issuerTextGoButton","issuerButtonContainer","issuerBottonLabel","getSuggestedIssuers","forEach","issuerInfo","issuerButton","listener","setIt","newidURI","refresh","logoutButtonHandler","oldMe","logout","logoutButton","logoutLabel","nick","any","foaf","signOutButton","sessionInfo","info","isLoggedIn","sym","clearElement","trackSession","onLogout","_callee2","issuer","wellKnownUri","wellKnownResult","openidConfiguration","_callee2$","_context2","pathname","fetch","json","end_session_endpoint","credentials","reload","selectWorkspace","appDetails","callbackWS","appPathSegment","say","background","figureOutBase","ws","newBaseNode","space","newBaseString","split","now","Date","getTime","displayOptions","makeNewWorkspace","_x12","_makeNewWorkspace","_callee3","newBase","newWs","newData","_callee3$","_context3","padding","encodeURI","askName","updater","update","id","w","each","storages","ldp","file","includes","toLowerCase","p","commentStyle","baseField","textInputStyle","size","autocomplete","button","replace","x","holds","rdf","col1","col2","col3","tr","comment","cellStyle","deselectedStyle","anyValue","ui","reduce","a","b","charCodeAt","bgcolor","target","rdfs","disabled","trLast","newAppInstance","callback","gotWS","base","getUserRoles","_getUserRoles","_callee10","_yield$ensureLoadedPr","_callee10$","_context11","doc","filterAvailablePanes","_x13","_filterAvailablePanes","_callee11","panes","userRoles","_callee11$","_context12","pane","isMatchingAudience","audience","isMatch","audienceRole","find","role","equals"],"sources":["../../src/login/login.ts"],"sourcesContent":["/* eslint-disable camelcase */\n/**\n * Signing in, signing up, profile and preferences reloading\n * Type index management\n *\n * Many functions in this module take a context object which\n * holds various RDF symbols, add to it, and return a promise of it.\n *\n * * `me` RDF symbol for the user's WebID\n * * `publicProfile` The user's public profile, iff loaded\n * * `preferencesFile` The user's personal preference file, iff loaded\n * * `index.public` The user's public type index file\n * * `index.private` The user's private type index file\n *\n * Not RDF symbols:\n * * `noun` A string in english for the type of thing -- like \"address book\"\n * * `instance` An array of nodes which are existing instances\n * * `containers` An array of nodes of containers of instances\n * * `div` A DOM element where UI can be displayed\n * * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages\n * *\n * * Vocabulary: \"load\" loads a file if it exists;\n * * 'Ensure\" CREATES the file if it does not exist (if it can) and then loads it.\n * @packageDocumentation\n */\nimport { PaneDefinition } from 'pane-registry'\nimport { BlankNode, NamedNode, st } from 'rdflib'\n// eslint-disable-next-line camelcase\nimport { Quad_Object } from 'rdflib/lib/tf-types'\nimport {\n AppDetails,\n AuthenticationContext,\n authn,\n authSession,\n CrossOriginForbiddenError,\n FetchError,\n getSuggestedIssuers,\n NotEditableError,\n offlineTestID,\n SameOriginForbiddenError,\n solidLogicSingleton,\n UnauthorizedError,\n WebOperationError\n} from 'solid-logic'\nimport * as debug from '../debug'\nimport { alert } from '../log'\nimport * as ns from '../ns.js'\nimport { Signup } from '../signup/signup.js'\nimport { buttonStyle, commentStyle, textInputStyle } from '../style'\nimport * as utils from '../utils'\nimport * as widgets from '../widgets'\n\nconst store = solidLogicSingleton.store\n\nconst {\n loadPreferences,\n loadProfile\n} = solidLogicSingleton.profile\n\nconst {\n getScopedAppInstances,\n getRegistrations,\n loadAllTypeIndexes,\n getScopedAppsFromIndex,\n deleteTypeIndexRegistration\n} = solidLogicSingleton.typeIndex\n\n/**\n * Resolves with the logged in user's WebID\n *\n * @param context\n */\n// used to be logIn\nexport function ensureLoggedIn (context: AuthenticationContext): Promise<AuthenticationContext> {\n const me = authn.currentUser()\n if (me) {\n authn.saveUser(me, context)\n return Promise.resolve(context)\n }\n\n return new Promise((resolve) => {\n authn.checkUser().then((webId) => {\n // Already logged in?\n if (webId) {\n debug.log(`logIn: Already logged in as ${webId}`)\n return resolve(context)\n }\n if (!context.div || !context.dom) {\n return resolve(context)\n }\n const box = loginStatusBox(context.dom, (webIdUri) => {\n authn.saveUser(webIdUri, context)\n resolve(context) // always pass growing context\n })\n context.div.appendChild(box)\n })\n })\n}\n\n/**\n * Loads preference file\n * Do this after having done log in and load profile\n *\n * @private\n *\n * @param context\n */\n// used to be logInLoadPreferences\nexport async function ensureLoadedPreferences (\n context: AuthenticationContext\n): Promise<AuthenticationContext> {\n if (context.preferencesFile) return Promise.resolve(context) // already done\n\n const statusArea = context.statusArea || context.div || null\n let progressDisplay\n function complain (message) {\n message = `ensureLoadedPreferences: ${message}`\n if (statusArea) {\n // statusArea.innerHTML = ''\n statusArea.appendChild(widgets.errorMessageBlock(context.dom, message))\n }\n debug.log(message)\n // reject(new Error(message))\n }\n try {\n context = await ensureLoadedProfile(context)\n\n // console.log('back in Solid UI after logInLoadProfile', context)\n const preferencesFile = await loadPreferences(context.me as NamedNode)\n if (progressDisplay) {\n progressDisplay.parentNode.removeChild(progressDisplay)\n }\n context.preferencesFile = preferencesFile\n } catch (err) {\n let m2: string\n if (err instanceof UnauthorizedError) {\n m2 =\n 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?'\n alert(m2)\n } else if (err instanceof CrossOriginForbiddenError) {\n m2 = `Unauthorized: Assuming preference file blocked for origin ${window.location.origin}`\n context.preferencesFileError = m2\n return context\n } else if (err instanceof SameOriginForbiddenError) {\n m2 =\n 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.'\n debug.warn(m2)\n return context\n } else if (err instanceof NotEditableError) {\n m2 =\n 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.'\n debug.warn(m2)\n return context\n } else if (err instanceof WebOperationError) {\n m2 =\n 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.'\n debug.warn(m2)\n } else if (err instanceof FetchError) {\n m2 = `Strange: Error ${err.status} trying to read your preference file.${err.message}`\n alert(m2)\n } else {\n throw new Error(`(via loadPrefs) ${err}`)\n }\n }\n return context\n}\n\n/**\n * Logs the user in and loads their WebID profile document into the store\n *\n * @param context\n *\n * @returns Resolves with the context after login / fetch\n */\n// used to be logInLoadProfile\nexport async function ensureLoadedProfile (\n context: AuthenticationContext\n): Promise<AuthenticationContext> {\n if (context.publicProfile) {\n return context\n } // already done\n try {\n const logInContext = await ensureLoggedIn(context)\n if (!logInContext.me) {\n throw new Error('Could not log in')\n }\n context.publicProfile = await loadProfile(logInContext.me)\n } catch (err) {\n if (context.div && context.dom) {\n context.div.appendChild(widgets.errorMessageBlock(context.dom, err.message))\n }\n throw new Error(`Can't log in: ${err}`)\n }\n return context\n}\n\n/**\n * Returns promise of context with arrays of symbols\n *\n * leaving the `isPublic` param undefined will bring in community index things, too\n */\nexport async function findAppInstances (\n context: AuthenticationContext,\n theClass: NamedNode,\n isPublic?: boolean\n): Promise<AuthenticationContext> {\n let items = context.me ? await getScopedAppInstances(theClass, context.me) : []\n if (isPublic === true) { // old API - not recommended!\n items = items.filter(item => item.scope.label === 'public')\n } else if (isPublic === false) {\n items = items.filter(item => item.scope.label === 'private')\n }\n context.instances = items.map(item => item.instance)\n return context\n}\n\nexport function scopeLabel (context, scope) {\n const mine = context.me && context.me.sameTerm(scope.agent)\n const name = mine ? '' : utils.label(scope.agent) + ' '\n return `${name}${scope.label}`\n}\n/**\n * UI to control registration of instance\n */\nexport async function registrationControl (\n context: AuthenticationContext,\n instance,\n theClass\n): Promise<AuthenticationContext | void> {\n function registrationStatements (index) {\n const registrations = getRegistrations(instance, theClass)\n const reg = registrations.length ? registrations[0] : widgets.newThing(index)\n return [\n st(reg, ns.solid('instance'), instance, index),\n st(reg, ns.solid('forClass'), theClass, index)\n ]\n }\n\n function renderScopeCheckbox (scope) {\n const statements = registrationStatements(scope.index)\n const name = scopeLabel(context, scope)\n const label = `${name} link to this ${context.noun}`\n return widgets.buildCheckboxForm(\n context.dom,\n solidLogicSingleton.store,\n label,\n null,\n statements,\n form,\n scope.index\n )\n }\n /// / body of registrationControl\n const dom = context.dom\n if (!dom || !context.div) {\n throw new Error('registrationControl: need dom and div')\n }\n const box = dom.createElement('div')\n context.div.appendChild(box)\n context.me = authn.currentUser() // @@\n const me = context.me\n if (!me) {\n box.innerHTML = '<p style=\"margin:2em;\">(Log in to save a link to this)</p>'\n return context\n }\n\n let scopes // @@ const\n try {\n scopes = await loadAllTypeIndexes(me)\n } catch (e) {\n let msg\n if (context.div && context.preferencesFileError) {\n msg = '(Lists of stuff not available)'\n context.div.appendChild(dom.createElement('p')).textContent = msg\n } else if (context.div) {\n msg = `registrationControl: Type indexes not available: ${e}`\n context.div.appendChild(widgets.errorMessageBlock(context.dom, e))\n }\n debug.log(msg)\n return context\n }\n\n box.innerHTML = '<table><tbody></tbody></table>' // tbody will be inserted anyway\n box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;')\n const tbody = box.children[0].children[0]\n const form = new BlankNode() // @@ say for now\n\n for (const scope of scopes) {\n const row = tbody.appendChild(dom.createElement('tr'))\n row.appendChild(renderScopeCheckbox(scope)) // @@ index\n }\n return context\n}\n\nexport function renderScopeHeadingRow (context, store, scope) {\n const backgroundColor = { private: '#fee', public: '#efe' }\n const { dom } = context\n const name = scopeLabel(context, scope)\n const row = dom.createElement('tr')\n const cell = row.appendChild(dom.createElement('td'))\n cell.setAttribute('colspan', '3')\n cell.style.backgoundColor = backgroundColor[scope.label] || 'white'\n const header = cell.appendChild(dom.createElement('h3'))\n header.textContent = name + ' links'\n header.style.textAlign = 'left'\n return row\n}\n/**\n * UI to List at all registered things\n */\nexport async function registrationList (context: AuthenticationContext, options: {\n private?: boolean\n public?: boolean\n type?: NamedNode\n}): Promise<AuthenticationContext> {\n const dom = context.dom as HTMLDocument\n const div = context.div as HTMLElement\n\n const box = dom.createElement('div')\n div.appendChild(box)\n context.me = authn.currentUser() // @@\n if (!context.me) {\n box.innerHTML = '<p style=\"margin:2em;\">(Log in list your stuff)</p>'\n return context\n }\n\n const scopes = await loadAllTypeIndexes(context.me) // includes community indexes\n\n // console.log('@@ registrationList ', scopes)\n box.innerHTML = '<table><tbody></tbody></table>' // tbody will be inserted anyway\n box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;')\n const table = box.firstChild as HTMLElement\n const tbody = table.firstChild as HTMLElement\n\n for (const scope of scopes) { // need some predicate for listing/adding agents\n const headingRow = renderScopeHeadingRow(context, store, scope)\n tbody.appendChild(headingRow)\n const items = await getScopedAppsFromIndex(scope, options.type || null) // any class\n if (items.length === 0) headingRow.style.display = 'none'\n // console.log(`registrationList: @@ instance items for class ${options.type || 'undefined' }:`, items)\n for (const item of items) {\n const row = widgets.personTR(dom, ns.solid('instance'), item.instance, {\n deleteFunction: async () => {\n await deleteTypeIndexRegistration(item)\n tbody.removeChild(row)\n }\n })\n row.children[0].style.paddingLeft = '3em'\n\n tbody.appendChild(row)\n }\n }\n return context\n} // registrationList\n\nfunction getDefaultSignInButtonStyle (): string {\n return 'padding: 1em; border-radius:0.5em; font-size: 100%;'\n}\n\n/**\n * Bootstrapping identity\n * (Called by `loginStatusBox()`)\n *\n * @param dom\n * @param setUserCallback\n *\n * @returns\n */\nfunction signInOrSignUpBox (\n dom: HTMLDocument,\n setUserCallback: (user: string) => void,\n options: {\n buttonStyle?: string;\n } = {}\n): HTMLElement {\n options = options || {}\n const signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle()\n\n // @@ TODO Remove the need to cast HTML element to any\n const box: any = dom.createElement('div')\n const magicClassName = 'SolidSignInOrSignUpBox'\n debug.log('widgets.signInOrSignUpBox')\n box.setUserCallback = setUserCallback\n box.setAttribute('class', magicClassName);\n (box as any).style = 'display:flex;' // @@ fix all typecasts like this\n\n // Sign in button with PopUP\n const signInPopUpButton = dom.createElement('input') // multi\n box.appendChild(signInPopUpButton)\n signInPopUpButton.setAttribute('type', 'button')\n signInPopUpButton.setAttribute('value', 'Log in')\n signInPopUpButton.setAttribute('style', `${signInButtonStyle}background-color: #eef;`)\n\n authSession.onLogin(() => {\n const me = authn.currentUser()\n // const sessionInfo = authSession.info\n // if (sessionInfo && sessionInfo.isLoggedIn) {\n if (me) {\n // const webIdURI = sessionInfo.webId\n const webIdURI = me.uri\n // setUserCallback(webIdURI)\n const divs = dom.getElementsByClassName(magicClassName)\n debug.log(`Logged in, ${divs.length} panels to be serviced`)\n // At the same time, satisfy all the other login boxes\n for (let i = 0; i < divs.length; i++) {\n const div: any = divs[i]\n // @@ TODO Remove the need to manipulate HTML elements\n if (div.setUserCallback) {\n try {\n div.setUserCallback(webIdURI)\n const parent = div.parentNode\n if (parent) {\n parent.removeChild(div)\n }\n } catch (e) {\n debug.log(`## Error satisfying login box: ${e}`)\n div.appendChild(widgets.errorMessageBlock(dom, e))\n }\n }\n }\n }\n })\n\n signInPopUpButton.addEventListener(\n 'click',\n () => {\n const offline = offlineTestID()\n if (offline) return setUserCallback(offline.uri)\n\n renderSignInPopup(dom)\n },\n false\n )\n\n // Sign up button\n const signupButton = dom.createElement('input')\n box.appendChild(signupButton)\n signupButton.setAttribute('type', 'button')\n signupButton.setAttribute('value', 'Sign Up for Solid')\n signupButton.setAttribute('style', `${signInButtonStyle}background-color: #efe;`)\n\n signupButton.addEventListener(\n 'click',\n function (_event) {\n const signupMgr = new Signup()\n signupMgr.signup().then(function (uri) {\n debug.log('signInOrSignUpBox signed up ' + uri)\n setUserCallback(uri)\n })\n },\n false\n )\n return box\n}\n\nexport function renderSignInPopup (dom: HTMLDocument) {\n /**\n * Issuer Menu\n */\n const issuerPopup = dom.createElement('div')\n issuerPopup.setAttribute(\n 'style',\n 'position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center;'\n )\n dom.body.appendChild(issuerPopup)\n const issuerPopupBox = dom.createElement('div')\n issuerPopupBox.setAttribute(\n 'style',\n `\n background-color: white;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -moz-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -o-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n min-width: 400px;\n padding: 10px;\n z-index : 10;\n `\n )\n issuerPopup.appendChild(issuerPopupBox)\n const issuerPopupBoxTopMenu = dom.createElement('div')\n issuerPopupBoxTopMenu.setAttribute(\n 'style',\n `\n border-bottom: 1px solid #DDD;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n `\n )\n issuerPopupBox.appendChild(issuerPopupBoxTopMenu)\n const issuerPopupBoxLabel = dom.createElement('label')\n issuerPopupBoxLabel.setAttribute('style', 'margin-right: 5px; font-weight: 800')\n issuerPopupBoxLabel.innerText = 'Select an identity provider'\n const issuerPopupBoxCloseButton = dom.createElement('button')\n issuerPopupBoxCloseButton.innerHTML =\n '<img src=\"https://solidos.github.io/solid-ui/src/icons/noun_1180156.svg\" style=\"width: 2em; height: 2em;\" title=\"Cancel\">'\n issuerPopupBoxCloseButton.setAttribute('style', 'background-color: transparent; border: none;')\n issuerPopupBoxCloseButton.addEventListener('click', () => {\n issuerPopup.remove()\n })\n issuerPopupBoxTopMenu.appendChild(issuerPopupBoxLabel)\n issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton)\n\n const loginToIssuer = async (issuerUri: string) => {\n try {\n // Save hash\n const preLoginRedirectHash = new URL(window.location.href).hash\n if (preLoginRedirectHash) {\n window.localStorage.setItem('preLoginRedirectHash', preLoginRedirectHash)\n }\n window.localStorage.setItem('loginIssuer', issuerUri)\n // Login\n const locationUrl = new URL(window.location.href)\n locationUrl.hash = '' // remove hash part\n await authSession.login({\n redirectUrl: locationUrl.href,\n oidcIssuer: issuerUri\n })\n } catch (err) {\n alert(err.message)\n }\n }\n\n /**\n * Text-based idp selection\n */\n const issuerTextContainer = dom.createElement('div')\n issuerTextContainer.setAttribute(\n 'style',\n `\n border-bottom: 1px solid #DDD;\n display: flex;\n flex-direction: column;\n padding-top: 10px;\n `\n )\n const issuerTextInputContainer = dom.createElement('div')\n issuerTextInputContainer.setAttribute(\n 'style',\n `\n display: flex;\n flex-direction: row;\n `\n )\n const issuerTextLabel = dom.createElement('label')\n issuerTextLabel.innerText = 'Enter the URL of your identity provider:'\n issuerTextLabel.setAttribute('style', 'color: #888')\n const issuerTextInput = dom.createElement('input')\n issuerTextInput.setAttribute('type', 'text')\n issuerTextInput.setAttribute(\n 'style',\n 'margin-left: 0 !important; flex: 1; margin-right: 5px !important'\n )\n issuerTextInput.setAttribute('placeholder', 'https://example.com')\n issuerTextInput.value = localStorage.getItem('loginIssuer') || ''\n const issuerTextGoButton = dom.createElement('button')\n issuerTextGoButton.innerText = 'Go'\n issuerTextGoButton.setAttribute('style', 'margin-top: 12px; margin-bottom: 12px;')\n issuerTextGoButton.addEventListener('click', () => {\n loginToIssuer(issuerTextInput.value)\n })\n issuerTextContainer.appendChild(issuerTextLabel)\n issuerTextInputContainer.appendChild(issuerTextInput)\n issuerTextInputContainer.appendChild(issuerTextGoButton)\n issuerTextContainer.appendChild(issuerTextInputContainer)\n issuerPopupBox.appendChild(issuerTextContainer)\n\n /**\n * Button-based idp selection\n */\n const issuerButtonContainer = dom.createElement('div')\n issuerButtonContainer.setAttribute(\n 'style',\n `\n display: flex;\n flex-direction: column;\n padding-top: 10px;\n `\n )\n const issuerBottonLabel = dom.createElement('label')\n issuerBottonLabel.innerText = 'Or pick an identity provider from the list below:'\n issuerBottonLabel.setAttribute('style', 'color: #888')\n issuerButtonContainer.appendChild(issuerBottonLabel)\n getSuggestedIssuers().forEach((issuerInfo) => {\n const issuerButton = dom.createElement('button')\n issuerButton.innerText = issuerInfo.name\n issuerButton.setAttribute('style', 'height: 38px; margin-top: 10px')\n issuerButton.addEventListener('click', () => {\n loginToIssuer(issuerInfo.uri)\n })\n issuerButtonContainer.appendChild(issuerButton)\n })\n issuerPopupBox.appendChild(issuerButtonContainer)\n}\n\n/**\n * Login status box\n *\n * A big sign-up/sign in box or a logout box depending on the state\n *\n * @param dom\n * @param listener\n *\n * @returns\n */\nexport function loginStatusBox (\n dom: HTMLDocument,\n listener: ((uri: string | null) => void) | null = null,\n options: {\n buttonStyle?: string;\n } = {}\n): HTMLElement {\n // 20190630\n let me = offlineTestID()\n // @@ TODO Remove the need to cast HTML element to any\n const box: any = dom.createElement('div')\n\n function setIt (newidURI) {\n if (!newidURI) {\n return\n }\n\n // const uri = newidURI.uri || newidURI\n // me = sym(uri)\n me = authn.saveUser(newidURI)\n box.refresh()\n if (listener) listener(me!.uri)\n }\n\n function logoutButtonHandler (_event) {\n const oldMe = me\n authSession.logout().then(\n function () {\n const message = `Your WebID was ${oldMe}. It has been forgotten.`\n me = null\n try {\n alert(message)\n } catch (e) {\n window.alert(message)\n }\n box.refresh()\n if (listener) listener(null)\n },\n (err) => {\n alert('Fail to log out:' + err)\n }\n )\n }\n\n function logoutButton (me, options) {\n const signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle()\n let logoutLabel = 'WebID logout'\n if (me) {\n const nick =\n solidLogicSingleton.store.any(me, ns.foaf('nick')) ||\n solidLogicSingleton.store.any(me, ns.foaf('name'))\n if (nick) {\n logoutLabel = 'Logout ' + nick.value\n }\n }\n const signOutButton = dom.createElement('input')\n // signOutButton.className = 'WebIDCancelButton'\n signOutButton.setAttribute('type', 'button')\n signOutButton.setAttribute('value', logoutLabel)\n signOutButton.setAttribute('style', `${signInButtonStyle}background-color: #eee;`)\n signOutButton.addEventListener('click', logoutButtonHandler, false)\n return signOutButton\n }\n\n box.refresh = function () {\n const sessionInfo = authSession.info\n if (sessionInfo && sessionInfo.webId && sessionInfo.isLoggedIn) {\n me = solidLogicSingleton.store.sym(sessionInfo.webId)\n } else {\n me = null\n }\n if ((me && box.me !== me.uri) || (!me && box.me)) {\n widgets.clearElement(box)\n if (me) {\n box.appendChild(logoutButton(me, options))\n } else {\n box.appendChild(signInOrSignUpBox(dom, setIt, options))\n }\n }\n box.me = me ? me.uri : null\n }\n box.refresh()\n\n function trackSession () {\n me = authn.currentUser()\n box.refresh()\n }\n trackSession()\n\n authSession.onLogin(trackSession)\n authSession.onLogout(trackSession)\n box.me = '99999' // Force refresh\n box.refresh()\n return box\n}\n\nauthSession.onLogout(async () => {\n const issuer = window.localStorage.getItem('loginIssuer')\n if (issuer) {\n try {\n const wellKnownUri = new URL(issuer)\n wellKnownUri.pathname = '/.well-known/openid-configuration'\n const wellKnownResult = await fetch(wellKnownUri.toString())\n if (wellKnownResult.status === 200) {\n const openidConfiguration = await wellKnownResult.json()\n if (openidConfiguration && openidConfiguration.end_session_endpoint) {\n await fetch(openidConfiguration.end_session_endpoint, { credentials: 'include' })\n }\n }\n } catch (err) {\n // Do nothing\n }\n }\n window.location.reload()\n})\n\n/**\n * Workspace selection etc\n * See https://github.com/solidos/userguide/issues/16\n */\n\n/**\n * Returns a UI object which, if it selects a workspace,\n * will callback(workspace, newBase).\n * See https://github.com/solidos/userguide/issues/16 for more info on workspaces.\n *\n * If necessary, will get an account, preference file, etc. In sequence:\n *\n * - If not logged in, log in.\n * - Load preference file\n * - Prompt user for workspaces\n * - Allows the user to just type in a URI by hand\n *\n * Calls back with the workspace and the base URI\n *\n * @param dom\n * @param appDetails\n * @param callbackWS\n */\nexport function selectWorkspace (\n dom: HTMLDocument,\n appDetails: AppDetails,\n callbackWS: (workspace: string | null, newBase: string) => void\n): HTMLElement {\n const noun = appDetails.noun\n const appPathSegment = appDetails.appPathSegment\n\n const me = offlineTestID()\n const box = dom.createElement('div')\n const context: AuthenticationContext = { me, dom, div: box }\n\n function say (s, background) {\n box.appendChild(widgets.errorMessageBlock(dom, s, background))\n }\n\n function figureOutBase (ws) {\n const newBaseNode: NamedNode = solidLogicSingleton.store.any(\n ws,\n ns.space('uriPrefix')\n ) as NamedNode\n let newBaseString: string\n if (!newBaseNode) {\n newBaseString = ws.uri.split('#')[0]\n } else {\n newBaseString = newBaseNode.value\n }\n if (newBaseString.slice(-1) !== '/') {\n debug.log(`${appPathSegment}: No / at end of uriPrefix ${newBaseString}`) // @@ paramater?\n newBaseString = `${newBaseString}/`\n }\n const now = new Date()\n newBaseString += `${appPathSegment}/id${now.getTime()}/` // unique id\n return newBaseString\n }\n\n function displayOptions (context) {\n // console.log('displayOptions!', context)\n async function makeNewWorkspace (_event) {\n const row = table.appendChild(dom.createElement('tr'))\n const cell = row.appendChild(dom.createElement('td'))\n cell.setAttribute('colspan', '3')\n cell.style.padding = '0.5em'\n const newBase = encodeURI(\n await widgets.askName(\n dom,\n solidLogicSingleton.store,\n cell,\n ns.solid('URL'),\n ns.space('Workspace'),\n 'Workspace'\n )\n )\n const newWs = widgets.newThing(context.preferencesFile)\n const newData = [\n st(context.me, ns.space('workspace'), newWs, context.preferencesFile),\n // eslint-disable-next-line camelcase\n st(\n newWs,\n ns.space('uriPrefix'),\n newBase as unknown as Quad_Object,\n context.preferencesFile\n )\n ]\n if (!solidLogicSingleton.store.updater) {\n throw new Error('store has no updater')\n }\n await solidLogicSingleton.store.updater.update([], newData)\n // @@ now refresh list of workspaces\n }\n\n // const status = ''\n const id = context.me\n const preferencesFile = context.preferencesFile\n let newBase: any = null\n\n // A workspace specifically defined in the private preference file:\n let w: any = solidLogicSingleton.store.each(\n id,\n ns.space('workspace'),\n undefined,\n preferencesFile\n ) // Only trust preference file here\n\n // A workspace in a storage in the public profile:\n const storages = solidLogicSingleton.store.each(id, ns.space('storage')) // @@ No provenance requirement at the moment\n if (w.length === 0 && storages) {\n say(\n `You don't seem to have any workspaces. You have ${storages.length} storage spaces.`,\n 'white'\n )\n storages\n .map(function (s: any) {\n w = w.concat(solidLogicSingleton.store.each(s, ns.ldp('contains')))\n return w\n })\n .filter((file) => {\n return file.id ? ['public', 'private'].includes(file.id().toLowerCase()) : ''\n })\n }\n\n if (w.length === 1) {\n say(`Workspace used: ${w[0].uri}`, 'white') // @@ allow user to see URI\n newBase = figureOutBase(w[0])\n // callbackWS(w[0], newBase)\n // } else if (w.length === 0) {\n }\n\n // Prompt for ws selection or creation\n // say( w.length + \" workspaces for \" + id + \"Choose one.\");\n const table = dom.createElement('table')\n table.setAttribute('style', 'border-collapse:separate; border-spacing: 0.5em;')\n\n // const popup = window.open(undefined, '_blank', { height: 300, width:400 }, false)\n box.appendChild(table)\n\n // Add a field for directly adding the URI yourself\n\n // const hr = box.appendChild(dom.createElement('hr')) // @@\n box.appendChild(dom.createElement('hr')) // @@\n\n const p = box.appendChild(dom.createElement('p'));\n (p as any).style = commentStyle\n p.textContent = `Where would you like to store the data for the ${noun}?\n Give the URL of the folder where you would like the data stored.\n It can be anywhere in solid world - this URI is just an idea.`\n // @@ TODO Remove the need to cast baseField to any\n const baseField: any = box.appendChild(dom.createElement('input'))\n baseField.setAttribute('type', 'text');\n (baseField as any).style = textInputStyle\n baseField.size = 80 // really a string\n baseField.label = 'base URL'\n baseField.autocomplete = 'on'\n if (newBase) {\n // set to default\n baseField.value = newBase\n }\n\n context.baseField = baseField\n\n box.appendChild(dom.createElement('br')) // @@\n\n const button = box.appendChild(dom.createElement('button'));\n (button as any).style = buttonStyle\n button.textContent = `Start new ${noun} at this URI`\n button.addEventListener('click', function (_event) {\n let newBase = baseField.value.replace(' ', '%20') // do not re-encode in general, as % encodings may exist\n if (newBase.slice(-1) !== '/') {\n newBase += '/'\n }\n callbackWS(null, newBase)\n })\n\n // Now go set up the table of spaces\n\n // const row = 0\n w = w.filter(function (x) {\n return !solidLogicSingleton.store.holds(\n x,\n ns.rdf('type'), // Ignore master workspaces\n ns.space('MasterWorkspace')\n )\n })\n let col1, col2, col3, tr, ws, style, comment\n const cellStyle = 'height: 3em; margin: 1em; padding: 1em white; border-radius: 0.3em;'\n const deselectedStyle = `${cellStyle}border: 0px;`\n // const selectedStyle = cellStyle + 'border: 1px solid black;'\n for (let i = 0; i < w.length; i++) {\n ws = w[i]\n tr = dom.createElement('tr')\n if (i === 0) {\n col1 = dom.createElement('td')\n col1.setAttribute('rowspan', `${w.length}`)\n col1.textContent = 'Choose a workspace for this:'\n col1.setAttribute('style', 'vertical-align:middle;')\n tr.appendChild(col1)\n }\n col2 = dom.createElement('td')\n style = solidLogicSingleton.store.anyValue(ws, ns.ui('style'))\n if (!style) {\n // Otherwise make up arbitrary colour\n const hash = function (x) {\n return x.split('').reduce(function (a, b) {\n a = (a << 5) - a + b.charCodeAt(0)\n return a & a\n }, 0)\n }\n const bgcolor = `#${((hash(ws.uri) & 0xffffff) | 0xc0c0c0).toString(16)}` // c0c0c0 forces pale\n style = `color: black ; background-color: ${bgcolor};`\n }\n col2.setAttribute('style', deselectedStyle + style)\n tr.target = ws.uri\n let label = solidLogicSingleton.store.any(ws, ns.rdfs('label'))\n if (!label) {\n label = ws.uri.split('/').slice(-1)[0] || ws.uri.split('/').slice(-2)[0]\n }\n col2.textContent = label || '???'\n tr.appendChild(col2)\n if (i === 0) {\n col3 = dom.createElement('td')\n col3.setAttribute('rowspan', `${w.length}1`)\n // col3.textContent = '@@@@@ remove';\n col3.setAttribute('style', 'width:50%;')\n tr.appendChild(col3)\n }\n table.appendChild(tr)\n\n comment = solidLogicSingleton.store.any(ws, ns.rdfs('comment'))\n comment = comment ? comment.value : 'Use this workspace'\n col2.addEventListener(\n 'click',\n function (_event) {\n col3.textContent = comment ? comment.value : ''\n col3.setAttribute('style', deselectedStyle + style)\n const button = dom.createElement('button')\n button.textContent = 'Continue'\n // button.setAttribute('style', style);\n const newBase = figureOutBase(ws)\n baseField.value = newBase // show user proposed URI\n\n button.addEventListener(\n 'click',\n function (_event) {\n button.disabled = true\n callbackWS(ws, newBase)\n button.textContent = '---->'\n },\n true\n ) // capture vs bubble\n col3.appendChild(button)\n },\n true\n ) // capture vs bubble\n }\n\n // last line with \"Make new workspace\"\n const trLast = dom.createElement('tr')\n col2 = dom.createElement('td')\n col2.setAttribute('style', cellStyle)\n col2.textContent = '+ Make a new workspace'\n col2.addEventListener('click', makeNewWorkspace)\n trLast.appendChild(col2)\n table.appendChild(trLast)\n } // displayOptions\n\n // console.log('kicking off async operation')\n ensureLoadedPreferences(context) // kick off async operation\n .then(displayOptions)\n .catch((err) => {\n // console.log(\"err from async op\")\n box.appendChild(widgets.errorMessageBlock(context.dom, err))\n })\n\n return box // return the box element, while login proceeds\n} // selectWorkspace\n\n/**\n * Creates a new instance of an app.\n *\n * An instance of an app could be e.g. an issue tracker for a given project,\n * or a chess game, or calendar, or a health/fitness record for a person.\n *\n * Note that this use of the term 'app' refers more to entries in the user's\n * type index than to actual software applications that use the personal data\n * to which these entries point.\n *\n * @param dom\n * @param appDetails\n * @param callback\n *\n * @returns A div with a button in it for making a new app instance\n */\nexport function newAppInstance (\n dom: HTMLDocument,\n appDetails: AppDetails,\n callback: (workspace: string | null, newBase: string) => void\n): HTMLElement {\n const gotWS = function (ws, base) {\n // log.debug(\"newAppInstance: Selected workspace = \" + (ws? ws.uri : 'none'))\n callback(ws, base)\n }\n const div = dom.createElement('div')\n const b = dom.createElement('button')\n b.setAttribute('type', 'button')\n div.appendChild(b)\n b.innerHTML = `Make new ${appDetails.noun}`\n b.addEventListener(\n 'click',\n (_event) => {\n div.appendChild(selectWorkspace(dom, appDetails, gotWS))\n },\n false\n )\n div.appendChild(b)\n return div\n}\n/**\n * Retrieves whether the currently logged in user is a power user\n * and/or a developer\n */\nexport async function getUserRoles (): Promise<Array<NamedNode>> {\n try {\n const { me, preferencesFile, preferencesFileError } = await ensureLoadedPreferences({})\n if (!preferencesFile || preferencesFileError) {\n throw new Error(preferencesFileError)\n }\n return solidLogicSingleton.store.each(\n me,\n ns.rdf('type'),\n null,\n preferencesFile.doc()\n ) as NamedNode[]\n } catch (error) {\n debug.warn('Unable to fetch your preferences - this was the error: ', error)\n }\n return []\n}\n\n/**\n * Filters which panes should be available, based on the result of [[getUserRoles]]\n */\nexport async function filterAvailablePanes (\n panes: Array<PaneDefinition>\n): Promise<Array<PaneDefinition>> {\n const userRoles = await getUserRoles()\n return panes.filter((pane) => isMatchingAudience(pane, userRoles))\n}\n\nfunction isMatchingAudience (pane: PaneDefinition, userRoles: Array<NamedNode>): boolean {\n const audience = pane.audience || []\n return audience.reduce(\n (isMatch, audienceRole) => isMatch && !!userRoles.find((role) => role.equals(audienceRole)),\n true as boolean\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAAA,OAAA,GAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAeA,IAAAE,KAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,EAAA,GAAAF,uBAAA,CAAAH,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAL,uBAAA,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U,kBAAkBA,CAAED,IAAoB,EAAEH,SAA2B,EAAW;EACvF,IAAMK,QAAQ,GAAGF,IAAI,CAACE,QAAQ,IAAI,EAAE;EACpC,OAAOA,QAAQ,CAAC9B,MAAM,CACpB,UAAC+B,OAAO,EAAEC,YAAY;IAAA,OAAKD,OAAO,IAAI,CAAC,CAACN,SAAS,CAACQ,IAAI,CAAC,UAACC,IAAI;MAAA,OAAKA,IAAI,CAACC,MAAM,CAACH,YAAY,CAAC;IAAA,EAAC;EAAA,GAC3F,IAAI,CACL;AACH"}
1
+ {"version":3,"file":"login.js","names":["_rdflib","require","_solidLogic","debug","_interopRequireWildcard","style","_log","ns","_signup","utils","widgets","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","step","next","_e2","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","arr","len","arr2","store","solidLogicSingleton","_solidLogicSingleton$","profile","loadPreferences","loadProfile","_solidLogicSingleton$2","typeIndex","getScopedAppInstances","getRegistrations","loadAllTypeIndexes","getScopedAppsFromIndex","deleteTypeIndexRegistration","ensureLoggedIn","context","me","authn","currentUser","saveUser","Promise","resolve","checkUser","then","webId","log","concat","div","dom","box","loginStatusBox","webIdUri","appendChild","ensureLoadedPreferences","_x","_ensureLoadedPreferences","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee4","statusArea","progressDisplay","complain","preferencesFile","m2","wrap","_callee4$","_context4","prev","_complain","message","errorMessageBlock","abrupt","ensureLoadedProfile","sent","parentNode","removeChild","t0","UnauthorizedError","alert","CrossOriginForbiddenError","window","location","origin","preferencesFileError","SameOriginForbiddenError","warn","NotEditableError","WebOperationError","FetchError","status","Error","stop","_x2","_ensureLoadedProfile","_callee5","logInContext","_callee5$","_context5","publicProfile","findAppInstances","_x3","_x4","_x5","_findAppInstances","_callee6","theClass","isPublic","items","_callee6$","_context6","filter","item","scope","label","instances","map","instance","scopeLabel","mine","sameTerm","agent","registrationControl","_x6","_x7","_x8","_registrationControl","_callee7","registrationStatements","renderScopeCheckbox","scopes","msg","tbody","form","_iterator","_step","row","_callee7$","_context7","_renderScopeCheckbox","statements","index","noun","buildCheckboxForm","_registrationStatemen","registrations","reg","newThing","st","solid","createElement","innerHTML","textContent","setAttribute","children","BlankNode","renderScopeHeadingRow","backgroundColor","cell","backgoundColor","header","textAlign","registrationList","_x9","_x10","_registrationList","_callee9","options","table","_iterator2","_step2","headingRow","_iterator3","_step3","_loop","_callee9$","_context10","firstChild","type","display","_loop$","_context9","personTR","deleteFunction","_deleteFunction","_callee8","_callee8$","_context8","paddingLeft","delegateYield","t1","finish","t2","getDefaultSignInButtonStyle","signInOrSignUpBox","setUserCallback","undefined","signInButtonStyle","buttonStyle","magicClassName","signInPopUpButton","headerBannerLoginInput","authSession","onLogin","webIdURI","uri","divs","getElementsByClassName","parent","addEventListener","offline","offlineTestID","renderSignInPopup","signupButton","_event","signupMgr","Signup","signup","issuerPopup","body","issuerPopupBox","issuerPopupBoxTopMenu","issuerPopupBoxLabel","innerText","issuerPopupBoxCloseButton","remove","loginToIssuer","_ref","_callee","issuerUri","preLoginRedirectHash","locationUrl","_callee$","_context","updater","flagAuthorizationMetadata","URL","href","hash","localStorage","setItem","login","redirectUrl","oidcIssuer","_x11","issuerTextContainer","issuerTextInputContainer","issuerTextLabel","issuerTextInput","getItem","issuerTextGoButton","issuerButtonContainer","issuerBottonLabel","getSuggestedIssuers","forEach","issuerInfo","issuerButton","listener","setIt","newidURI","refresh","logoutButtonHandler","oldMe","logout","logoutButton","logoutLabel","nick","any","foaf","signOutButton","sessionInfo","info","isLoggedIn","sym","clearElement","trackSession","onLogout","_callee2","issuer","wellKnownUri","wellKnownResult","openidConfiguration","_callee2$","_context2","pathname","fetch","json","end_session_endpoint","credentials","reload","selectWorkspace","appDetails","callbackWS","appPathSegment","say","background","figureOutBase","ws","newBaseNode","space","newBaseString","split","now","Date","getTime","displayOptions","makeNewWorkspace","_x12","_makeNewWorkspace","_callee3","newBase","newWs","newData","_callee3$","_context3","padding","encodeURI","askName","update","id","w","each","storages","ldp","file","includes","toLowerCase","p","commentStyle","baseField","textInputStyle","size","autocomplete","button","replace","x","holds","rdf","col1","col2","col3","tr","localStyle","comment","cellStyle","deselectedStyle","anyValue","ui","reduce","a","b","charCodeAt","bgcolor","target","rdfs","disabled","trLast","newAppInstance","callback","gotWS","base","getUserRoles","_getUserRoles","_callee10","_yield$ensureLoadedPr","_callee10$","_context11","doc","filterAvailablePanes","_x13","_filterAvailablePanes","_callee11","panes","userRoles","_callee11$","_context12","pane","isMatchingAudience","audience","isMatch","audienceRole","find","role","equals"],"sources":["../../src/login/login.ts"],"sourcesContent":["/* eslint-disable camelcase */\n/**\n * Signing in, signing up, profile and preferences reloading\n * Type index management\n *\n * Many functions in this module take a context object which\n * holds various RDF symbols, add to it, and return a promise of it.\n *\n * * `me` RDF symbol for the user's WebID\n * * `publicProfile` The user's public profile, iff loaded\n * * `preferencesFile` The user's personal preference file, iff loaded\n * * `index.public` The user's public type index file\n * * `index.private` The user's private type index file\n *\n * Not RDF symbols:\n * * `noun` A string in english for the type of thing -- like \"address book\"\n * * `instance` An array of nodes which are existing instances\n * * `containers` An array of nodes of containers of instances\n * * `div` A DOM element where UI can be displayed\n * * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages\n * *\n * * Vocabulary: \"load\" loads a file if it exists;\n * * 'Ensure\" CREATES the file if it does not exist (if it can) and then loads it.\n * @packageDocumentation\n */\nimport { PaneDefinition } from 'pane-registry'\nimport { BlankNode, NamedNode, st } from 'rdflib'\n// eslint-disable-next-line camelcase\nimport { Quad_Object } from 'rdflib/lib/tf-types'\nimport {\n AppDetails,\n AuthenticationContext,\n authn,\n authSession,\n CrossOriginForbiddenError,\n FetchError,\n getSuggestedIssuers,\n NotEditableError,\n offlineTestID,\n SameOriginForbiddenError,\n solidLogicSingleton,\n UnauthorizedError,\n WebOperationError\n} from 'solid-logic'\nimport * as debug from '../debug'\nimport * as style from '../style'\nimport { alert } from '../log'\nimport * as ns from '../ns.js'\nimport { Signup } from '../signup/signup.js'\nimport * as utils from '../utils'\nimport * as widgets from '../widgets'\n\nconst store = solidLogicSingleton.store\n\nconst {\n loadPreferences,\n loadProfile\n} = solidLogicSingleton.profile\n\nconst {\n getScopedAppInstances,\n getRegistrations,\n loadAllTypeIndexes,\n getScopedAppsFromIndex,\n deleteTypeIndexRegistration\n} = solidLogicSingleton.typeIndex\n\n/**\n * Resolves with the logged in user's WebID\n *\n * @param context\n */\n// used to be logIn\nexport function ensureLoggedIn (context: AuthenticationContext): Promise<AuthenticationContext> {\n const me = authn.currentUser()\n if (me) {\n authn.saveUser(me, context)\n return Promise.resolve(context)\n }\n\n return new Promise((resolve) => {\n authn.checkUser().then((webId) => {\n // Already logged in?\n if (webId) {\n debug.log(`logIn: Already logged in as ${webId}`)\n return resolve(context)\n }\n if (!context.div || !context.dom) {\n return resolve(context)\n }\n const box = loginStatusBox(context.dom, (webIdUri) => {\n authn.saveUser(webIdUri, context)\n resolve(context) // always pass growing context\n })\n context.div.appendChild(box)\n })\n })\n}\n\n/**\n * Loads preference file\n * Do this after having done log in and load profile\n *\n * @private\n *\n * @param context\n */\n// used to be logInLoadPreferences\nexport async function ensureLoadedPreferences (\n context: AuthenticationContext\n): Promise<AuthenticationContext> {\n if (context.preferencesFile) return Promise.resolve(context) // already done\n\n const statusArea = context.statusArea || context.div || null\n let progressDisplay\n function complain (message) {\n message = `ensureLoadedPreferences: ${message}`\n if (statusArea) {\n // statusArea.innerHTML = ''\n statusArea.appendChild(widgets.errorMessageBlock(context.dom, message))\n }\n debug.log(message)\n // reject(new Error(message))\n }\n try {\n context = await ensureLoadedProfile(context)\n\n // console.log('back in Solid UI after logInLoadProfile', context)\n const preferencesFile = await loadPreferences(context.me as NamedNode)\n if (progressDisplay) {\n progressDisplay.parentNode.removeChild(progressDisplay)\n }\n context.preferencesFile = preferencesFile\n } catch (err) {\n let m2: string\n if (err instanceof UnauthorizedError) {\n m2 =\n 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?'\n alert(m2)\n } else if (err instanceof CrossOriginForbiddenError) {\n m2 = `Unauthorized: Assuming preference file blocked for origin ${window.location.origin}`\n context.preferencesFileError = m2\n return context\n } else if (err instanceof SameOriginForbiddenError) {\n m2 =\n 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.'\n debug.warn(m2)\n return context\n } else if (err instanceof NotEditableError) {\n m2 =\n 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.'\n debug.warn(m2)\n return context\n } else if (err instanceof WebOperationError) {\n m2 =\n 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.'\n debug.warn(m2)\n } else if (err instanceof FetchError) {\n m2 = `Strange: Error ${err.status} trying to read your preference file.${err.message}`\n alert(m2)\n } else {\n throw new Error(`(via loadPrefs) ${err}`)\n }\n }\n return context\n}\n\n/**\n * Logs the user in and loads their WebID profile document into the store\n *\n * @param context\n *\n * @returns Resolves with the context after login / fetch\n */\n// used to be logInLoadProfile\nexport async function ensureLoadedProfile (\n context: AuthenticationContext\n): Promise<AuthenticationContext> {\n if (context.publicProfile) {\n return context\n } // already done\n try {\n const logInContext = await ensureLoggedIn(context)\n if (!logInContext.me) {\n throw new Error('Could not log in')\n }\n context.publicProfile = await loadProfile(logInContext.me)\n } catch (err) {\n if (context.div && context.dom) {\n context.div.appendChild(widgets.errorMessageBlock(context.dom, err.message))\n }\n throw new Error(`Can't log in: ${err}`)\n }\n return context\n}\n\n/**\n * Returns promise of context with arrays of symbols\n *\n * leaving the `isPublic` param undefined will bring in community index things, too\n */\nexport async function findAppInstances (\n context: AuthenticationContext,\n theClass: NamedNode,\n isPublic?: boolean\n): Promise<AuthenticationContext> {\n let items = context.me ? await getScopedAppInstances(theClass, context.me) : []\n if (isPublic === true) { // old API - not recommended!\n items = items.filter(item => item.scope.label === 'public')\n } else if (isPublic === false) {\n items = items.filter(item => item.scope.label === 'private')\n }\n context.instances = items.map(item => item.instance)\n return context\n}\n\nexport function scopeLabel (context, scope) {\n const mine = context.me && context.me.sameTerm(scope.agent)\n const name = mine ? '' : utils.label(scope.agent) + ' '\n return `${name}${scope.label}`\n}\n/**\n * UI to control registration of instance\n */\nexport async function registrationControl (\n context: AuthenticationContext,\n instance,\n theClass\n): Promise<AuthenticationContext | void> {\n function registrationStatements (index) {\n const registrations = getRegistrations(instance, theClass)\n const reg = registrations.length ? registrations[0] : widgets.newThing(index)\n return [\n st(reg, ns.solid('instance'), instance, index),\n st(reg, ns.solid('forClass'), theClass, index)\n ]\n }\n\n function renderScopeCheckbox (scope) {\n const statements = registrationStatements(scope.index)\n const name = scopeLabel(context, scope)\n const label = `${name} link to this ${context.noun}`\n return widgets.buildCheckboxForm(\n context.dom,\n solidLogicSingleton.store,\n label,\n null,\n statements,\n form,\n scope.index\n )\n }\n /// / body of registrationControl\n const dom = context.dom\n if (!dom || !context.div) {\n throw new Error('registrationControl: need dom and div')\n }\n const box = dom.createElement('div')\n context.div.appendChild(box)\n context.me = authn.currentUser() // @@\n const me = context.me\n if (!me) {\n box.innerHTML = '<p style=\"margin:2em;\">(Log in to save a link to this)</p>'\n return context\n }\n\n let scopes // @@ const\n try {\n scopes = await loadAllTypeIndexes(me)\n } catch (e) {\n let msg\n if (context.div && context.preferencesFileError) {\n msg = '(Lists of stuff not available)'\n context.div.appendChild(dom.createElement('p')).textContent = msg\n } else if (context.div) {\n msg = `registrationControl: Type indexes not available: ${e}`\n context.div.appendChild(widgets.errorMessageBlock(context.dom, e))\n }\n debug.log(msg)\n return context\n }\n\n box.innerHTML = '<table><tbody></tbody></table>' // tbody will be inserted anyway\n box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;')\n const tbody = box.children[0].children[0]\n const form = new BlankNode() // @@ say for now\n\n for (const scope of scopes) {\n const row = tbody.appendChild(dom.createElement('tr'))\n row.appendChild(renderScopeCheckbox(scope)) // @@ index\n }\n return context\n}\n\nexport function renderScopeHeadingRow (context, store, scope) {\n const backgroundColor = { private: '#fee', public: '#efe' }\n const { dom } = context\n const name = scopeLabel(context, scope)\n const row = dom.createElement('tr')\n const cell = row.appendChild(dom.createElement('td'))\n cell.setAttribute('colspan', '3')\n cell.style.backgoundColor = backgroundColor[scope.label] || 'white'\n const header = cell.appendChild(dom.createElement('h3'))\n header.textContent = name + ' links'\n header.style.textAlign = 'left'\n return row\n}\n/**\n * UI to List at all registered things\n */\nexport async function registrationList (context: AuthenticationContext, options: {\n private?: boolean\n public?: boolean\n type?: NamedNode\n}): Promise<AuthenticationContext> {\n const dom = context.dom as HTMLDocument\n const div = context.div as HTMLElement\n\n const box = dom.createElement('div')\n div.appendChild(box)\n context.me = authn.currentUser() // @@\n if (!context.me) {\n box.innerHTML = '<p style=\"margin:2em;\">(Log in list your stuff)</p>'\n return context\n }\n\n const scopes = await loadAllTypeIndexes(context.me) // includes community indexes\n\n // console.log('@@ registrationList ', scopes)\n box.innerHTML = '<table><tbody></tbody></table>' // tbody will be inserted anyway\n box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;')\n const table = box.firstChild as HTMLElement\n const tbody = table.firstChild as HTMLElement\n\n for (const scope of scopes) { // need some predicate for listing/adding agents\n const headingRow = renderScopeHeadingRow(context, store, scope)\n tbody.appendChild(headingRow)\n const items = await getScopedAppsFromIndex(scope, options.type || null) // any class\n if (items.length === 0) headingRow.style.display = 'none'\n // console.log(`registrationList: @@ instance items for class ${options.type || 'undefined' }:`, items)\n for (const item of items) {\n const row = widgets.personTR(dom, ns.solid('instance'), item.instance, {\n deleteFunction: async () => {\n await deleteTypeIndexRegistration(item)\n tbody.removeChild(row)\n }\n })\n row.children[0].style.paddingLeft = '3em'\n\n tbody.appendChild(row)\n }\n }\n return context\n} // registrationList\n\nfunction getDefaultSignInButtonStyle (): string {\n return 'padding: 1em; border-radius:0.5em; font-size: 100%;'\n}\n\n/**\n * Bootstrapping identity\n * (Called by `loginStatusBox()`)\n *\n * @param dom\n * @param setUserCallback\n *\n * @returns\n */\nfunction signInOrSignUpBox (\n dom: HTMLDocument,\n setUserCallback: (user: string) => void,\n options: {\n buttonStyle?: string;\n } = {}\n): HTMLElement {\n options = options || {}\n const signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle()\n\n const box: any = dom.createElement('div')\n const magicClassName = 'SolidSignInOrSignUpBox'\n debug.log('widgets.signInOrSignUpBox')\n box.setUserCallback = setUserCallback\n box.setAttribute('class', magicClassName)\n box.setAttribute('style', 'display:flex;')\n\n // Sign in button with PopUP\n const signInPopUpButton = dom.createElement('input') // multi\n box.appendChild(signInPopUpButton)\n signInPopUpButton.setAttribute('type', 'button')\n signInPopUpButton.setAttribute('value', 'Log in')\n signInPopUpButton.setAttribute('style', `${signInButtonStyle}background-color: #eef;${style.headerBannerLoginInput}`)\n\n authSession.onLogin(() => {\n const me = authn.currentUser()\n // const sessionInfo = authSession.info\n // if (sessionInfo && sessionInfo.isLoggedIn) {\n if (me) {\n // const webIdURI = sessionInfo.webId\n const webIdURI = me.uri\n // setUserCallback(webIdURI)\n const divs = dom.getElementsByClassName(magicClassName)\n debug.log(`Logged in, ${divs.length} panels to be serviced`)\n // At the same time, satisfy all the other login boxes\n for (let i = 0; i < divs.length; i++) {\n const div: any = divs[i]\n // @@ TODO Remove the need to manipulate HTML elements\n if (div.setUserCallback) {\n try {\n div.setUserCallback(webIdURI)\n const parent = div.parentNode\n if (parent) {\n parent.removeChild(div)\n }\n } catch (e) {\n debug.log(`## Error satisfying login box: ${e}`)\n div.appendChild(widgets.errorMessageBlock(dom, e))\n }\n }\n }\n }\n })\n\n signInPopUpButton.addEventListener(\n 'click',\n () => {\n const offline = offlineTestID()\n if (offline) return setUserCallback(offline.uri)\n\n renderSignInPopup(dom)\n },\n false\n )\n\n // Sign up button\n const signupButton = dom.createElement('input')\n box.appendChild(signupButton)\n signupButton.setAttribute('type', 'button')\n signupButton.setAttribute('value', 'Sign Up for Solid')\n signupButton.setAttribute('style', `${signInButtonStyle}background-color: #efe;${style.headerBannerLoginInput}`)\n\n signupButton.addEventListener(\n 'click',\n function (_event) {\n const signupMgr = new Signup()\n signupMgr.signup().then(function (uri) {\n debug.log('signInOrSignUpBox signed up ' + uri)\n setUserCallback(uri)\n })\n },\n false\n )\n return box\n}\n\nexport function renderSignInPopup (dom: HTMLDocument) {\n /**\n * Issuer Menu\n */\n const issuerPopup = dom.createElement('div')\n issuerPopup.setAttribute(\n 'style',\n 'position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center;'\n )\n dom.body.appendChild(issuerPopup)\n const issuerPopupBox = dom.createElement('div')\n issuerPopupBox.setAttribute(\n 'style',\n `\n background-color: white;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -moz-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n -o-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n min-width: 400px;\n padding: 10px;\n z-index : 10;\n `\n )\n issuerPopup.appendChild(issuerPopupBox)\n const issuerPopupBoxTopMenu = dom.createElement('div')\n issuerPopupBoxTopMenu.setAttribute(\n 'style',\n `\n border-bottom: 1px solid #DDD;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n `\n )\n issuerPopupBox.appendChild(issuerPopupBoxTopMenu)\n const issuerPopupBoxLabel = dom.createElement('label')\n issuerPopupBoxLabel.setAttribute('style', 'margin-right: 5px; font-weight: 800')\n issuerPopupBoxLabel.innerText = 'Select an identity provider'\n const issuerPopupBoxCloseButton = dom.createElement('button')\n issuerPopupBoxCloseButton.innerHTML =\n '<img src=\"https://solidos.github.io/solid-ui/src/icons/noun_1180156.svg\" style=\"width: 2em; height: 2em;\" title=\"Cancel\">'\n issuerPopupBoxCloseButton.setAttribute('style', 'background-color: transparent; border: none;')\n issuerPopupBoxCloseButton.addEventListener('click', () => {\n issuerPopup.remove()\n })\n issuerPopupBoxTopMenu.appendChild(issuerPopupBoxLabel)\n issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton)\n\n const loginToIssuer = async (issuerUri: string) => {\n try {\n // clear authorization metadata from store\n solidLogicSingleton.store.updater.flagAuthorizationMetadata() as any\n // Save hash\n const preLoginRedirectHash = new URL(window.location.href).hash\n if (preLoginRedirectHash) {\n window.localStorage.setItem('preLoginRedirectHash', preLoginRedirectHash)\n }\n window.localStorage.setItem('loginIssuer', issuerUri)\n // Login\n const locationUrl = new URL(window.location.href)\n locationUrl.hash = '' // remove hash part\n await authSession.login({\n redirectUrl: locationUrl.href,\n oidcIssuer: issuerUri\n })\n } catch (err) {\n alert(err.message)\n }\n }\n\n /**\n * Text-based idp selection\n */\n const issuerTextContainer = dom.createElement('div')\n issuerTextContainer.setAttribute(\n 'style',\n `\n border-bottom: 1px solid #DDD;\n display: flex;\n flex-direction: column;\n padding-top: 10px;\n `\n )\n const issuerTextInputContainer = dom.createElement('div')\n issuerTextInputContainer.setAttribute(\n 'style',\n `\n display: flex;\n flex-direction: row;\n `\n )\n const issuerTextLabel = dom.createElement('label')\n issuerTextLabel.innerText = 'Enter the URL of your identity provider:'\n issuerTextLabel.setAttribute('style', 'color: #888')\n const issuerTextInput = dom.createElement('input')\n issuerTextInput.setAttribute('type', 'text')\n issuerTextInput.setAttribute(\n 'style',\n 'margin-left: 0 !important; flex: 1; margin-right: 5px !important'\n )\n issuerTextInput.setAttribute('placeholder', 'https://example.com')\n issuerTextInput.value = localStorage.getItem('loginIssuer') || ''\n const issuerTextGoButton = dom.createElement('button')\n issuerTextGoButton.innerText = 'Go'\n issuerTextGoButton.setAttribute('style', 'margin-top: 12px; margin-bottom: 12px;')\n issuerTextGoButton.addEventListener('click', () => {\n loginToIssuer(issuerTextInput.value)\n })\n issuerTextContainer.appendChild(issuerTextLabel)\n issuerTextInputContainer.appendChild(issuerTextInput)\n issuerTextInputContainer.appendChild(issuerTextGoButton)\n issuerTextContainer.appendChild(issuerTextInputContainer)\n issuerPopupBox.appendChild(issuerTextContainer)\n\n /**\n * Button-based idp selection\n */\n const issuerButtonContainer = dom.createElement('div')\n issuerButtonContainer.setAttribute(\n 'style',\n `\n display: flex;\n flex-direction: column;\n padding-top: 10px;\n `\n )\n const issuerBottonLabel = dom.createElement('label')\n issuerBottonLabel.innerText = 'Or pick an identity provider from the list below:'\n issuerBottonLabel.setAttribute('style', 'color: #888')\n issuerButtonContainer.appendChild(issuerBottonLabel)\n getSuggestedIssuers().forEach((issuerInfo) => {\n const issuerButton = dom.createElement('button')\n issuerButton.innerText = issuerInfo.name\n issuerButton.setAttribute('style', 'height: 38px; margin-top: 10px')\n issuerButton.addEventListener('click', () => {\n loginToIssuer(issuerInfo.uri)\n })\n issuerButtonContainer.appendChild(issuerButton)\n })\n issuerPopupBox.appendChild(issuerButtonContainer)\n}\n\n/**\n * Login status box\n *\n * A big sign-up/sign in box or a logout box depending on the state\n *\n * @param dom\n * @param listener\n *\n * @returns\n */\nexport function loginStatusBox (\n dom: HTMLDocument,\n listener: ((uri: string | null) => void) | null = null,\n options: {\n buttonStyle?: string;\n } = {}\n): HTMLElement {\n // 20190630\n let me = offlineTestID()\n // @@ TODO Remove the need to cast HTML element to any\n const box: any = dom.createElement('div')\n\n function setIt (newidURI) {\n if (!newidURI) {\n return\n }\n\n // const uri = newidURI.uri || newidURI\n // me = sym(uri)\n me = authn.saveUser(newidURI)\n box.refresh()\n if (listener) listener(me!.uri)\n }\n\n function logoutButtonHandler (_event) {\n const oldMe = me\n authSession.logout().then(\n function () {\n const message = `Your WebID was ${oldMe}. It has been forgotten.`\n me = null\n try {\n alert(message)\n } catch (e) {\n window.alert(message)\n }\n box.refresh()\n if (listener) listener(null)\n },\n (err) => {\n alert('Fail to log out:' + err)\n }\n )\n }\n\n function logoutButton (me, options) {\n const signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle()\n let logoutLabel = 'WebID logout'\n if (me) {\n const nick =\n solidLogicSingleton.store.any(me, ns.foaf('nick')) ||\n solidLogicSingleton.store.any(me, ns.foaf('name'))\n if (nick) {\n logoutLabel = 'Logout ' + nick.value\n }\n }\n const signOutButton = dom.createElement('input')\n // signOutButton.className = 'WebIDCancelButton'\n signOutButton.setAttribute('type', 'button')\n signOutButton.setAttribute('value', logoutLabel)\n signOutButton.setAttribute('style', `${signInButtonStyle}background-color: #eee;`)\n signOutButton.addEventListener('click', logoutButtonHandler, false)\n return signOutButton\n }\n\n box.refresh = function () {\n const sessionInfo = authSession.info\n if (sessionInfo && sessionInfo.webId && sessionInfo.isLoggedIn) {\n me = solidLogicSingleton.store.sym(sessionInfo.webId)\n } else {\n me = null\n }\n if ((me && box.me !== me.uri) || (!me && box.me)) {\n widgets.clearElement(box)\n if (me) {\n box.appendChild(logoutButton(me, options))\n } else {\n box.appendChild(signInOrSignUpBox(dom, setIt, options))\n }\n }\n box.me = me ? me.uri : null\n }\n box.refresh()\n\n function trackSession () {\n me = authn.currentUser()\n box.refresh()\n }\n trackSession()\n\n authSession.onLogin(trackSession)\n authSession.onLogout(trackSession)\n box.me = '99999' // Force refresh\n box.refresh()\n return box\n}\n\nauthSession.onLogout(async () => {\n const issuer = window.localStorage.getItem('loginIssuer')\n if (issuer) {\n try {\n // clear authorization metadata from store\n solidLogicSingleton.store.updater.flagAuthorizationMetadata() as any\n\n const wellKnownUri = new URL(issuer)\n wellKnownUri.pathname = '/.well-known/openid-configuration'\n const wellKnownResult = await fetch(wellKnownUri.toString())\n if (wellKnownResult.status === 200) {\n const openidConfiguration = await wellKnownResult.json()\n if (openidConfiguration && openidConfiguration.end_session_endpoint) {\n await fetch(openidConfiguration.end_session_endpoint, { credentials: 'include' })\n }\n }\n } catch (err) {\n // Do nothing\n }\n }\n window.location.reload()\n})\n\n/**\n * Workspace selection etc\n * See https://github.com/solidos/userguide/issues/16\n */\n\n/**\n * Returns a UI object which, if it selects a workspace,\n * will callback(workspace, newBase).\n * See https://github.com/solidos/userguide/issues/16 for more info on workspaces.\n *\n * If necessary, will get an account, preference file, etc. In sequence:\n *\n * - If not logged in, log in.\n * - Load preference file\n * - Prompt user for workspaces\n * - Allows the user to just type in a URI by hand\n *\n * Calls back with the workspace and the base URI\n *\n * @param dom\n * @param appDetails\n * @param callbackWS\n */\nexport function selectWorkspace (\n dom: HTMLDocument,\n appDetails: AppDetails,\n callbackWS: (workspace: string | null, newBase: string) => void\n): HTMLElement {\n const noun = appDetails.noun\n const appPathSegment = appDetails.appPathSegment\n\n const me = offlineTestID()\n const box = dom.createElement('div')\n const context: AuthenticationContext = { me, dom, div: box }\n\n function say (s, background) {\n box.appendChild(widgets.errorMessageBlock(dom, s, background))\n }\n\n function figureOutBase (ws) {\n const newBaseNode: NamedNode = solidLogicSingleton.store.any(\n ws,\n ns.space('uriPrefix')\n ) as NamedNode\n let newBaseString: string\n if (!newBaseNode) {\n newBaseString = ws.uri.split('#')[0]\n } else {\n newBaseString = newBaseNode.value\n }\n if (newBaseString.slice(-1) !== '/') {\n debug.log(`${appPathSegment}: No / at end of uriPrefix ${newBaseString}`) // @@ paramater?\n newBaseString = `${newBaseString}/`\n }\n const now = new Date()\n newBaseString += `${appPathSegment}/id${now.getTime()}/` // unique id\n return newBaseString\n }\n\n function displayOptions (context) {\n // console.log('displayOptions!', context)\n async function makeNewWorkspace (_event) {\n const row = table.appendChild(dom.createElement('tr'))\n const cell = row.appendChild(dom.createElement('td'))\n cell.setAttribute('colspan', '3')\n cell.style.padding = '0.5em'\n const newBase = encodeURI(\n await widgets.askName(\n dom,\n solidLogicSingleton.store,\n cell,\n ns.solid('URL'),\n ns.space('Workspace'),\n 'Workspace'\n )\n )\n const newWs = widgets.newThing(context.preferencesFile)\n const newData = [\n st(context.me, ns.space('workspace'), newWs, context.preferencesFile),\n // eslint-disable-next-line camelcase\n st(\n newWs,\n ns.space('uriPrefix'),\n newBase as unknown as Quad_Object,\n context.preferencesFile\n )\n ]\n if (!solidLogicSingleton.store.updater) {\n throw new Error('store has no updater')\n }\n await solidLogicSingleton.store.updater.update([], newData)\n // @@ now refresh list of workspaces\n }\n\n // const status = ''\n const id = context.me\n const preferencesFile = context.preferencesFile\n let newBase: any = null\n\n // A workspace specifically defined in the private preference file:\n let w: any = solidLogicSingleton.store.each(\n id,\n ns.space('workspace'),\n undefined,\n preferencesFile\n ) // Only trust preference file here\n\n // A workspace in a storage in the public profile:\n const storages = solidLogicSingleton.store.each(id, ns.space('storage')) // @@ No provenance requirement at the moment\n if (w.length === 0 && storages) {\n say(\n `You don't seem to have any workspaces. You have ${storages.length} storage spaces.`,\n 'white'\n )\n storages\n .map(function (s: any) {\n w = w.concat(solidLogicSingleton.store.each(s, ns.ldp('contains')))\n return w\n })\n .filter((file) => {\n return file.id ? ['public', 'private'].includes(file.id().toLowerCase()) : ''\n })\n }\n\n if (w.length === 1) {\n say(`Workspace used: ${w[0].uri}`, 'white') // @@ allow user to see URI\n newBase = figureOutBase(w[0])\n // callbackWS(w[0], newBase)\n // } else if (w.length === 0) {\n }\n\n // Prompt for ws selection or creation\n // say( w.length + \" workspaces for \" + id + \"Choose one.\");\n const table = dom.createElement('table')\n table.setAttribute('style', 'border-collapse:separate; border-spacing: 0.5em;')\n\n // const popup = window.open(undefined, '_blank', { height: 300, width:400 }, false)\n box.appendChild(table)\n\n // Add a field for directly adding the URI yourself\n\n // const hr = box.appendChild(dom.createElement('hr')) // @@\n box.appendChild(dom.createElement('hr')) // @@\n\n const p = box.appendChild(dom.createElement('p'))\n p.setAttribute('style', style.commentStyle)\n p.textContent = `Where would you like to store the data for the ${noun}?\n Give the URL of the folder where you would like the data stored.\n It can be anywhere in solid world - this URI is just an idea.`\n // @@ TODO Remove the need to cast baseField to any\n const baseField: any = box.appendChild(dom.createElement('input'))\n baseField.setAttribute('type', 'text')\n baseField.setAttribute('style', style.textInputStyle)\n baseField.size = 80 // really a string\n baseField.label = 'base URL'\n baseField.autocomplete = 'on'\n if (newBase) {\n // set to default\n baseField.value = newBase\n }\n\n context.baseField = baseField\n\n box.appendChild(dom.createElement('br')) // @@\n\n const button = box.appendChild(dom.createElement('button'))\n button.setAttribute('style', style.buttonStyle)\n button.textContent = `Start new ${noun} at this URI`\n button.addEventListener('click', function (_event) {\n let newBase = baseField.value.replace(' ', '%20') // do not re-encode in general, as % encodings may exist\n if (newBase.slice(-1) !== '/') {\n newBase += '/'\n }\n callbackWS(null, newBase)\n })\n\n // Now go set up the table of spaces\n\n // const row = 0\n w = w.filter(function (x) {\n return !solidLogicSingleton.store.holds(\n x,\n ns.rdf('type'), // Ignore master workspaces\n ns.space('MasterWorkspace')\n )\n })\n let col1, col2, col3, tr, ws, localStyle, comment\n const cellStyle = 'height: 3em; margin: 1em; padding: 1em white; border-radius: 0.3em;'\n const deselectedStyle = `${cellStyle}border: 0px;`\n // const selectedStyle = cellStyle + 'border: 1px solid black;'\n for (let i = 0; i < w.length; i++) {\n ws = w[i]\n tr = dom.createElement('tr')\n if (i === 0) {\n col1 = dom.createElement('td')\n col1.setAttribute('rowspan', `${w.length}`)\n col1.textContent = 'Choose a workspace for this:'\n col1.setAttribute('style', 'vertical-align:middle;')\n tr.appendChild(col1)\n }\n col2 = dom.createElement('td')\n localStyle = solidLogicSingleton.store.anyValue(ws, ns.ui('style'))\n if (!localStyle) {\n // Otherwise make up arbitrary colour\n const hash = function (x) {\n return x.split('').reduce(function (a, b) {\n a = (a << 5) - a + b.charCodeAt(0)\n return a & a\n }, 0)\n }\n const bgcolor = `#${((hash(ws.uri) & 0xffffff) | 0xc0c0c0).toString(16)}` // c0c0c0 forces pale\n localStyle = `color: black ; background-color: ${bgcolor};`\n }\n col2.setAttribute('style', deselectedStyle + localStyle)\n tr.target = ws.uri\n let label = solidLogicSingleton.store.any(ws, ns.rdfs('label'))\n if (!label) {\n label = ws.uri.split('/').slice(-1)[0] || ws.uri.split('/').slice(-2)[0]\n }\n col2.textContent = label || '???'\n tr.appendChild(col2)\n if (i === 0) {\n col3 = dom.createElement('td')\n col3.setAttribute('rowspan', `${w.length}1`)\n // col3.textContent = '@@@@@ remove';\n col3.setAttribute('style', 'width:50%;')\n tr.appendChild(col3)\n }\n table.appendChild(tr)\n\n comment = solidLogicSingleton.store.any(ws, ns.rdfs('comment'))\n comment = comment ? comment.value : 'Use this workspace'\n col2.addEventListener(\n 'click',\n function (_event) {\n col3.textContent = comment ? comment.value : ''\n col3.setAttribute('style', deselectedStyle + localStyle)\n const button = dom.createElement('button')\n button.textContent = 'Continue'\n // button.setAttribute('style', style);\n const newBase = figureOutBase(ws)\n baseField.value = newBase // show user proposed URI\n\n button.addEventListener(\n 'click',\n function (_event) {\n button.disabled = true\n callbackWS(ws, newBase)\n button.textContent = '---->'\n },\n true\n ) // capture vs bubble\n col3.appendChild(button)\n },\n true\n ) // capture vs bubble\n }\n\n // last line with \"Make new workspace\"\n const trLast = dom.createElement('tr')\n col2 = dom.createElement('td')\n col2.setAttribute('style', cellStyle)\n col2.textContent = '+ Make a new workspace'\n col2.addEventListener('click', makeNewWorkspace)\n trLast.appendChild(col2)\n table.appendChild(trLast)\n } // displayOptions\n\n // console.log('kicking off async operation')\n ensureLoadedPreferences(context) // kick off async operation\n .then(displayOptions)\n .catch((err) => {\n // console.log(\"err from async op\")\n box.appendChild(widgets.errorMessageBlock(context.dom, err))\n })\n\n return box // return the box element, while login proceeds\n} // selectWorkspace\n\n/**\n * Creates a new instance of an app.\n *\n * An instance of an app could be e.g. an issue tracker for a given project,\n * or a chess game, or calendar, or a health/fitness record for a person.\n *\n * Note that this use of the term 'app' refers more to entries in the user's\n * type index than to actual software applications that use the personal data\n * to which these entries point.\n *\n * @param dom\n * @param appDetails\n * @param callback\n *\n * @returns A div with a button in it for making a new app instance\n */\nexport function newAppInstance (\n dom: HTMLDocument,\n appDetails: AppDetails,\n callback: (workspace: string | null, newBase: string) => void\n): HTMLElement {\n const gotWS = function (ws, base) {\n // log.debug(\"newAppInstance: Selected workspace = \" + (ws? ws.uri : 'none'))\n callback(ws, base)\n }\n const div = dom.createElement('div')\n const b = dom.createElement('button')\n b.setAttribute('type', 'button')\n div.appendChild(b)\n b.innerHTML = `Make new ${appDetails.noun}`\n b.addEventListener(\n 'click',\n (_event) => {\n div.appendChild(selectWorkspace(dom, appDetails, gotWS))\n },\n false\n )\n div.appendChild(b)\n return div\n}\n/**\n * Retrieves whether the currently logged in user is a power user\n * and/or a developer\n */\nexport async function getUserRoles (): Promise<Array<NamedNode>> {\n try {\n const { me, preferencesFile, preferencesFileError } = await ensureLoadedPreferences({})\n if (!preferencesFile || preferencesFileError) {\n throw new Error(preferencesFileError)\n }\n return solidLogicSingleton.store.each(\n me,\n ns.rdf('type'),\n null,\n preferencesFile.doc()\n ) as NamedNode[]\n } catch (error) {\n debug.warn('Unable to fetch your preferences - this was the error: ', error)\n }\n return []\n}\n\n/**\n * Filters which panes should be available, based on the result of [[getUserRoles]]\n */\nexport async function filterAvailablePanes (\n panes: Array<PaneDefinition>\n): Promise<Array<PaneDefinition>> {\n const userRoles = await getUserRoles()\n return panes.filter((pane) => isMatchingAudience(pane, userRoles))\n}\n\nfunction isMatchingAudience (pane: PaneDefinition, userRoles: Array<NamedNode>): boolean {\n const audience = pane.audience || []\n return audience.reduce(\n (isMatch, audienceRole) => isMatch && !!userRoles.find((role) => role.equals(audienceRole)),\n true as boolean\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAAA,OAAA,GAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAeA,IAAAE,KAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAD,uBAAA,CAAAH,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AACA,IAAAM,EAAA,GAAAH,uBAA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iX,UAAA,CAAAjX,IAAA;UAAA,OAEJmW,YAAY,EAAE;QAAA;UAAhCY,SAAS,GAAAE,UAAA,CAAA7S,IAAA;UAAA,OAAA6S,UAAA,CAAA/S,MAAA,WACR4S,KAAK,CAACrQ,MAAM,CAAC,UAACyQ,IAAI;YAAA,OAAKC,kBAAkB,CAACD,IAAI,EAAEH,SAAS,CAAC;UAAA,EAAC;QAAA;QAAA;UAAA,OAAAE,UAAA,CAAA3R,IAAA;MAAA;IAAA,GAAAuR,SAAA;EAAA,CACnE;EAAA,OAAAD,qBAAA,CAAA5T,KAAA,OAAAC,SAAA;AAAA;AAED,SAASkU,kBAAkBA,CAAED,IAAoB,EAAEH,SAA2B,EAAW;EACvF,IAAMK,QAAQ,GAAGF,IAAI,CAACE,QAAQ,IAAI,EAAE;EACpC,OAAOA,QAAQ,CAAC9B,MAAM,CACpB,UAAC+B,OAAO,EAAEC,YAAY;IAAA,OAAKD,OAAO,IAAI,CAAC,CAACN,SAAS,CAACQ,IAAI,CAAC,UAACC,IAAI;MAAA,OAAKA,IAAI,CAACC,MAAM,CAACH,YAAY,CAAC;IAAA,EAAC;EAAA,GAC3F,IAAI,CACL;AACH"}
package/lib/style.js CHANGED
@@ -19,7 +19,7 @@ var formFieldNameBoxWidth = '8em'; // The fixed amount to get form fields to lin
19
19
  var style = {
20
20
  // styleModule
21
21
 
22
- checkboxStyle: 'colour: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',
22
+ checkboxStyle: 'color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',
23
23
  checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',
24
24
  fieldLabelStyle: 'color: #3B5998; text-decoration: none;',
25
25
  formSelectSTyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
@@ -83,7 +83,65 @@ var style = {
83
83
  // Buttons
84
84
  renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',
85
85
  imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',
86
- linkDivStyle: 'width:2em; padding:0.5em; height: 4em;'
86
+ linkDivStyle: 'width:2em; padding:0.5em; height: 4em;',
87
+ // ACL
88
+ aclControlBoxContainer: 'margin: 1em',
89
+ aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem',
90
+ aclControlBoxStatus: 'display: none; margin: 1rem 0',
91
+ aclControlBoxStatusRevealed: 'display: block',
92
+ aclGroupContent: 'maxWidth: 650',
93
+ accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%',
94
+ accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%',
95
+ defaultsController: 'display: flex',
96
+ defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%',
97
+ bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em',
98
+ group: 'color: #888',
99
+ group1: 'color: green',
100
+ group2: 'color: #cc0',
101
+ group3: 'color: orange',
102
+ group5: 'color: red',
103
+ group9: 'color: blue',
104
+ group13: 'color: purple',
105
+ trustedAppAddApplicationsTable: 'background-color: #eee',
106
+ trustedAppCancelButton: 'float: right',
107
+ trustedAppControllerI: 'border-color: orange; borderRadius: 1em; borderWidth: 0.1em',
108
+ temporaryStatusInit: 'background: green',
109
+ temporaryStatusEnd: 'background: transparent; transition: background 5s linear',
110
+ // header
111
+ headerUserMenuLink: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none',
112
+ headerUserMenuLinkHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',
113
+ headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px',
114
+ headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important',
115
+ headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%',
116
+ headerUserMenuButtonHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',
117
+ headerUserMenuList: 'list-style: none; margin: 0; padding: 0',
118
+ headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true',
119
+ headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true',
120
+ headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none',
121
+ headerUserMenuListItem: 'border-bottom: solid 1px #000000',
122
+ headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px',
123
+ headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px',
124
+ headerBannerLink: 'display: block',
125
+ headerBannerRightMenu: 'display: flex',
126
+ headerBannerLogin: 'margin-left: auto',
127
+ allChildrenVisible: 'display:true',
128
+ headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important',
129
+ headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto',
130
+ headerBannerHelpMenu: 'border-left: solid 1px #000000; margin.left: auto',
131
+ headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important',
132
+ // may just be 65px round($icon-size * 352 / 322);
133
+
134
+ // footer
135
+ footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em',
136
+ // buttons
137
+ primaryButton: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
138
+ primaryButtonHover: 'background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
139
+ primaryButtonNoBorder: 'background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
140
+ primaryButtonNoBorderHover: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
141
+ secondaryButton: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
142
+ secondaryButtonHover: 'background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
143
+ secondaryButtonNoBorder: 'background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
144
+ secondaryButtonNoBorderHover: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out'
87
145
  };
88
146
  exports.style = style;
89
147
  style.setStyle = function setStyle(ele, styleName) {
package/lib/style.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","names":["formBorderColor","lowProfileLinkColor","formFieldNameBoxWidth","style","checkboxStyle","checkboxInputStyle","fieldLabelStyle","formSelectSTyle","textInputStyle","textInputStyleUneditable","textInputSize","buttonStyle","commentStyle","iconStyle","smallButtonStyle","classIconStyle","confirmPopupStyle","tabBorderRadius","messageBodyStyle","pendingeditModifier","highlightColor","personaBarStyle","searchInputStyle","autocompleteRowStyle","signInButtonStyle","heading1Style","heading2Style","heading3Style","heading4Style","formHeadingColor","formHeadingStyle","formTextInput","formGroupStyle","concat","formFieldLabelStyle","formFieldNameBoxStyle","textInputBackgroundColor","textInputBackgroundColorUneditable","textInputColor","textInputColorPending","multilineTextInputStyle","renderAsDivStyle","imageDivStyle","linkDivStyle","exports","setStyle","ele","styleName","module"],"sources":["../src/style.js"],"sourcesContent":["// Common readable consistent stylesheet\n// to avoid using style sheets which are document-global\n// and make programmable style toggling with selection, drag over, etc easier\n\n// These must all end with semicolon so they can be appended to.\n\nconst formBorderColor = '#888888' // Mid-grey\nconst lowProfileLinkColor = '#3B5998' // Grey-blue, e.g., for field labels linking to ontology\nconst formFieldNameBoxWidth = '8em' // The fixed amount to get form fields to line up\n// The latter we put in when switching awy from using tables. Getting allignment between\n// fields in different groups though is hard problem.\n\nexport const style = { // styleModule\n\n checkboxStyle: 'colour: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',\n checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',\n\n fieldLabelStyle: 'color: #3B5998; text-decoration: none;',\n formSelectSTyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyleUneditable: // Color difference only\n 'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputSize: 20, // Default text input size in characters roughly\n buttonStyle:\n 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;', // 'background-color: #eef;\n commentStyle: 'padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;',\n iconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;',\n smallButtonStyle: 'margin: 0.2em; width: 1em; height:1em;',\n classIconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 0.2em; border: 0.1em solid green; padding: 0.2em; background-color: #efe;', // combine with buttonStyle\n confirmPopupStyle: 'padding: 0.7em; border-radius: 0.2em; border: 0.1em solid orange; background-color: white; box-shadow: 0.5em 0.9em #888;',\n tabBorderRadius: '0.2em',\n messageBodyStyle:\n 'white-space: pre-wrap; width: 99%; font-size:100%; border: 0.07em solid #eee; border-radius:0.2em; padding: .3em 0.5em; margin: 0.1em;',\n pendingeditModifier: 'color: #bbb;',\n highlightColor: '#7C4DFF', // Solid lavendar https://design.inrupt.com/atomic-core/?cat=Core\n\n // Contacts\n personaBarStyle: 'width: 100%; height: 4em; background-color: #eee; vertical-align: middle;',\n searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',\n autocompleteRowStyle: 'border: 0.2em solid straw;',\n\n // Login buttons\n signInButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;', // was 0.5em radius\n\n // Forms\n heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;', // originally was brown; now grey\n heading2Style: 'font-size: 130%; font-weight: bold; color: #888888; padding: 0.4em; margin: 0.7em 0.0em;', // originally was brown; now grey\n heading3Style: 'font-size: 120%; font-weight: bold; color: #888888; padding: 0.3em; margin: 0.7em 0.0em;', // For example, in large forms or before a small form\n heading4Style: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // Lowest level used by default in small things\n\n formBorderColor, // originally was brown; now grey\n formHeadingColor: '#888888', // originally was brown; now grey\n formHeadingStyle: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // originally was brown; now grey\n formTextInput: 'font-size: 100%; margin: 0.1em; padding: 0.1em;', // originally used this\n formGroupStyle: [`padding-left: 0em; border: 0.0em solid ${formBorderColor}; border-radius: 0.2em;`, // weight 0\n `padding-left: 2em; border: 0.05em solid ${formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.1em solid ${formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.2em solid ${formBorderColor}; border-radius: 0.2em;` // @@ pink\n ],\n\n formFieldLabelStyle: `'color: ${lowProfileLinkColor}; text-decoration: none;'`,\n formFieldNameBoxWidth,\n formFieldNameBoxStyle: `padding: 0.3em; vertical-align: middle; width:${formFieldNameBoxWidth};`,\n textInputBackgroundColor: '#eef',\n textInputBackgroundColorUneditable: '#fff',\n textInputColor: '#000',\n textInputColorPending: '#888',\n multilineTextInputStyle: 'font-size:100%; white-space: pre-wrap; background-color: #eef;' +\n ' border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;',\n\n // Buttons\n renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',\n imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',\n linkDivStyle: 'width:2em; padding:0.5em; height: 4em;'\n}\n\nstyle.setStyle = function setStyle (ele, styleName) {\n ele.style = style[styleName]\n}\n\nmodule.exports = style // @@ No way to do this in ESM\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEA;;AAEA,IAAMA,eAAe,GAAG,SAAS,EAAC;AAClC,IAAMC,mBAAmB,GAAG,SAAS,EAAC;AACtC,IAAMC,qBAAqB,GAAG,KAAK,EAAC;AACpC;AACA;;AAEO,IAAMC,KAAK,GAAG;EAAE;;EAErBC,aAAa,EAAE,8EAA8E;EAC7FC,kBAAkB,EAAE,0GAA0G;EAE9HC,eAAe,EAAE,wCAAwC;EACzDC,eAAe,EACb,yHAAyH;EAC3HC,cAAc,EACZ,yHAAyH;EAC3HC,wBAAwB;EAAE;EACxB,2HAA2H;EAC7HC,aAAa,EAAE,EAAE;EAAE;EACnBC,WAAW,EACP,2HAA2H;EAAE;EACjIC,YAAY,EAAE,wEAAwE;EACtFC,SAAS,EAAE,6DAA6D;EACxEC,gBAAgB,EAAE,wCAAwC;EAC1DC,cAAc,EAAE,kIAAkI;EAAE;EACpJC,iBAAiB,EAAE,0HAA0H;EAC7IC,eAAe,EAAE,OAAO;EACxBC,gBAAgB,EACd,wIAAwI;EAC1IC,mBAAmB,EAAE,cAAc;EACnCC,cAAc,EAAE,SAAS;EAAE;;EAE3B;EACAC,eAAe,EAAE,2EAA2E;EAC5FC,gBAAgB,EAAE,mHAAmH;EACrIC,oBAAoB,EAAE,4BAA4B;EAElD;EACAC,iBAAiB,EAAE,qDAAqD;EAAE;;EAE1E;EACAC,aAAa,EAAE,yFAAyF;EAAE;EAC1GC,aAAa,EAAE,0FAA0F;EAAE;EAC3GC,aAAa,EAAE,0FAA0F;EAAE;EAC3GC,aAAa,EAAE,0FAA0F;EAAE;;EAE3G5B,eAAe,EAAfA,eAAe;EAAE;EACjB6B,gBAAgB,EAAE,SAAS;EAAE;EAC7BC,gBAAgB,EAAE,2FAA2F;EAAE;EAC/GC,aAAa,EAAE,iDAAiD;EAAE;EAClEC,cAAc,EAAE,2CAAAC,MAAA,CAA2CjC,eAAe,8BAA2B;EAAA,2CAAAiC,MAAA,CACxDjC,eAAe,wEAAAiC,MAAA,CAChBjC,eAAe,wEAAAiC,MAAA,CACfjC,eAAe,6BAA0B;EAAA,CACpF;EAEDkC,mBAAmB,aAAAD,MAAA,CAAahC,mBAAmB,8BAA2B;EAC9EC,qBAAqB,EAArBA,qBAAqB;EACrBiC,qBAAqB,mDAAAF,MAAA,CAAmD/B,qBAAqB,MAAG;EAChGkC,wBAAwB,EAAE,MAAM;EAChCC,kCAAkC,EAAE,MAAM;EAC1CC,cAAc,EAAE,MAAM;EACtBC,qBAAqB,EAAE,MAAM;EAC7BC,uBAAuB,EAAE,gEAAgE,GACzF,kEAAkE;EAElE;EACAC,gBAAgB,EAAE,kGAAkG;EACpHC,aAAa,EAAE,4CAA4C;EAC3DC,YAAY,EAAE;AAChB,CAAC;AAAAC,OAAA,CAAAzC,KAAA,GAAAA,KAAA;AAEDA,KAAK,CAAC0C,QAAQ,GAAG,SAASA,QAAQA,CAAEC,GAAG,EAAEC,SAAS,EAAE;EAClDD,GAAG,CAAC3C,KAAK,GAAGA,KAAK,CAAC4C,SAAS,CAAC;AAC9B,CAAC;AAEDC,MAAM,CAACJ,OAAO,GAAGzC,KAAK,EAAC"}
1
+ {"version":3,"file":"style.js","names":["formBorderColor","lowProfileLinkColor","formFieldNameBoxWidth","style","checkboxStyle","checkboxInputStyle","fieldLabelStyle","formSelectSTyle","textInputStyle","textInputStyleUneditable","textInputSize","buttonStyle","commentStyle","iconStyle","smallButtonStyle","classIconStyle","confirmPopupStyle","tabBorderRadius","messageBodyStyle","pendingeditModifier","highlightColor","personaBarStyle","searchInputStyle","autocompleteRowStyle","signInButtonStyle","heading1Style","heading2Style","heading3Style","heading4Style","formHeadingColor","formHeadingStyle","formTextInput","formGroupStyle","concat","formFieldLabelStyle","formFieldNameBoxStyle","textInputBackgroundColor","textInputBackgroundColorUneditable","textInputColor","textInputColorPending","multilineTextInputStyle","renderAsDivStyle","imageDivStyle","linkDivStyle","aclControlBoxContainer","aclControlBoxHeader","aclControlBoxStatus","aclControlBoxStatusRevealed","aclGroupContent","accessGroupList","accessGroupListItem","defaultsController","defaultsControllerNotice","bigButton","group","group1","group2","group3","group5","group9","group13","trustedAppAddApplicationsTable","trustedAppCancelButton","trustedAppControllerI","temporaryStatusInit","temporaryStatusEnd","headerUserMenuLink","headerUserMenuLinkHover","headerUserMenuTrigger","headerUserMenuTriggerImg","headerUserMenuButton","headerUserMenuButtonHover","headerUserMenuList","headerUserMenuListDisplay","headerUserMenuNavigationMenu","headerUserMenuNavigationMenuNotDisplayed","headerUserMenuListItem","headerUserMenuPhoto","headerBanner","headerBannerLink","headerBannerRightMenu","headerBannerLogin","allChildrenVisible","headerBannerLoginInput","headerBannerUserMenu","headerBannerHelpMenu","headerBannerIcon","footer","primaryButton","primaryButtonHover","primaryButtonNoBorder","primaryButtonNoBorderHover","secondaryButton","secondaryButtonHover","secondaryButtonNoBorder","secondaryButtonNoBorderHover","exports","setStyle","ele","styleName","module"],"sources":["../src/style.js"],"sourcesContent":["// Common readable consistent stylesheet\n// to avoid using style sheets which are document-global\n// and make programmable style toggling with selection, drag over, etc easier\n\n// These must all end with semicolon so they can be appended to.\n\nconst formBorderColor = '#888888' // Mid-grey\nconst lowProfileLinkColor = '#3B5998' // Grey-blue, e.g., for field labels linking to ontology\nconst formFieldNameBoxWidth = '8em' // The fixed amount to get form fields to line up\n// The latter we put in when switching awy from using tables. Getting allignment between\n// fields in different groups though is hard problem.\n\nexport const style = { // styleModule\n\n checkboxStyle: 'color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',\n checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',\n\n fieldLabelStyle: 'color: #3B5998; text-decoration: none;',\n formSelectSTyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyleUneditable: // Color difference only\n 'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputSize: 20, // Default text input size in characters roughly\n buttonStyle:\n 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;', // 'background-color: #eef;\n commentStyle: 'padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;',\n iconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;',\n smallButtonStyle: 'margin: 0.2em; width: 1em; height:1em;',\n classIconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 0.2em; border: 0.1em solid green; padding: 0.2em; background-color: #efe;', // combine with buttonStyle\n confirmPopupStyle: 'padding: 0.7em; border-radius: 0.2em; border: 0.1em solid orange; background-color: white; box-shadow: 0.5em 0.9em #888;',\n tabBorderRadius: '0.2em',\n messageBodyStyle:\n 'white-space: pre-wrap; width: 99%; font-size:100%; border: 0.07em solid #eee; border-radius:0.2em; padding: .3em 0.5em; margin: 0.1em;',\n pendingeditModifier: 'color: #bbb;',\n highlightColor: '#7C4DFF', // Solid lavendar https://design.inrupt.com/atomic-core/?cat=Core\n\n // Contacts\n personaBarStyle: 'width: 100%; height: 4em; background-color: #eee; vertical-align: middle;',\n searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',\n autocompleteRowStyle: 'border: 0.2em solid straw;',\n\n // Login buttons\n signInButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;', // was 0.5em radius\n\n // Forms\n heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;', // originally was brown; now grey\n heading2Style: 'font-size: 130%; font-weight: bold; color: #888888; padding: 0.4em; margin: 0.7em 0.0em;', // originally was brown; now grey\n heading3Style: 'font-size: 120%; font-weight: bold; color: #888888; padding: 0.3em; margin: 0.7em 0.0em;', // For example, in large forms or before a small form\n heading4Style: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // Lowest level used by default in small things\n\n formBorderColor, // originally was brown; now grey\n formHeadingColor: '#888888', // originally was brown; now grey\n formHeadingStyle: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // originally was brown; now grey\n formTextInput: 'font-size: 100%; margin: 0.1em; padding: 0.1em;', // originally used this\n formGroupStyle: [`padding-left: 0em; border: 0.0em solid ${formBorderColor}; border-radius: 0.2em;`, // weight 0\n `padding-left: 2em; border: 0.05em solid ${formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.1em solid ${formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.2em solid ${formBorderColor}; border-radius: 0.2em;` // @@ pink\n ],\n\n formFieldLabelStyle: `'color: ${lowProfileLinkColor}; text-decoration: none;'`,\n formFieldNameBoxWidth,\n formFieldNameBoxStyle: `padding: 0.3em; vertical-align: middle; width:${formFieldNameBoxWidth};`,\n textInputBackgroundColor: '#eef',\n textInputBackgroundColorUneditable: '#fff',\n textInputColor: '#000',\n textInputColorPending: '#888',\n multilineTextInputStyle: 'font-size:100%; white-space: pre-wrap; background-color: #eef;' +\n ' border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;',\n\n // Buttons\n renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',\n imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',\n linkDivStyle: 'width:2em; padding:0.5em; height: 4em;',\n\n // ACL\n aclControlBoxContainer: 'margin: 1em',\n aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem',\n aclControlBoxStatus: 'display: none; margin: 1rem 0',\n aclControlBoxStatusRevealed: 'display: block',\n aclGroupContent: 'maxWidth: 650',\n accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%',\n accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%',\n defaultsController: 'display: flex',\n defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%',\n bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em',\n group: 'color: #888',\n group1: 'color: green',\n group2: 'color: #cc0',\n group3: 'color: orange',\n group5: 'color: red',\n group9: 'color: blue',\n group13: 'color: purple',\n\n trustedAppAddApplicationsTable: 'background-color: #eee',\n trustedAppCancelButton: 'float: right',\n trustedAppControllerI: 'border-color: orange; borderRadius: 1em; borderWidth: 0.1em',\n temporaryStatusInit: 'background: green',\n temporaryStatusEnd: 'background: transparent; transition: background 5s linear',\n\n // header\n headerUserMenuLink: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none',\n headerUserMenuLinkHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',\n headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px',\n headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important',\n headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%',\n headerUserMenuButtonHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',\n headerUserMenuList: 'list-style: none; margin: 0; padding: 0',\n headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true',\n headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true',\n headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none',\n headerUserMenuListItem: 'border-bottom: solid 1px #000000',\n headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px',\n headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px',\n headerBannerLink: 'display: block',\n headerBannerRightMenu: 'display: flex',\n headerBannerLogin: 'margin-left: auto',\n allChildrenVisible: 'display:true',\n headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important',\n headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto',\n headerBannerHelpMenu: 'border-left: solid 1px #000000; margin.left: auto',\n headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important', // may just be 65px round($icon-size * 352 / 322);\n\n // footer\n footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em',\n\n // buttons\n primaryButton: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',\n\n primaryButtonHover: 'background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',\n\n primaryButtonNoBorder: 'background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',\n\n primaryButtonNoBorderHover: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',\n\n secondaryButton: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',\n\n secondaryButtonHover: 'background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',\n\n secondaryButtonNoBorder: 'background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',\n\n secondaryButtonNoBorderHover: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out'\n\n}\n\nstyle.setStyle = function setStyle (ele, styleName) {\n ele.style = style[styleName]\n}\n\nmodule.exports = style // @@ No way to do this in ESM\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEA;;AAEA,IAAMA,eAAe,GAAG,SAAS,EAAC;AAClC,IAAMC,mBAAmB,GAAG,SAAS,EAAC;AACtC,IAAMC,qBAAqB,GAAG,KAAK,EAAC;AACpC;AACA;;AAEO,IAAMC,KAAK,G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EAAE,kCAAkC;EAC1DC,mBAAmB,EAAE,kIAAkI;EACvJC,YAAY,EAAE,sHAAsH;EACpIC,gBAAgB,EAAE,gBAAgB;EAClCC,qBAAqB,EAAE,eAAe;EACtCC,iBAAiB,EAAE,mBAAmB;EACtCC,kBAAkB,EAAE,cAAc;EAClCC,sBAAsB,EAAE,qEAAqE;EAC7FC,oBAAoB,EAAE,mDAAmD;EACzEC,oBAAoB,EAAE,mDAAmD;EACzEC,gBAAgB,EAAE,wFAAwF;EAAE;;EAE5G;EACAC,MAAM,EAAE,8EAA8E;EAEtF;EACAC,aAAa,EAAE,oRAAoR;EAEnSC,kBAAkB,EAAE,sTAAsT;EAE1UC,qBAAqB,EAAE,mRAAmR;EAE1SC,0BAA0B,EAAE,wTAAwT;EAEpVC,eAAe,EAAE,mRAAmR;EAEpSC,oBAAoB,EAAE,sTAAsT;EAE5UC,uBAAuB,EAAE,qRAAqR;EAE9SC,4BAA4B,EAAE;AAEhC,CAAC;AAAAC,OAAA,CAAA7F,KAAA,GAAAA,KAAA;AAEDA,KAAK,CAAC8F,QAAQ,GAAG,SAASA,QAAQA,CAAEC,GAAG,EAAEC,SAAS,EAAE;EAClDD,GAAG,CAAC/F,KAAK,GAAGA,KAAK,CAACgG,SAAS,CAAC;AAC9B,CAAC;AAEDC,MAAM,CAACJ,OAAO,GAAG7F,KAAK,EAAC"}
@@ -4,10 +4,6 @@ type ThrottleOptions = {
4
4
  throttling?: boolean;
5
5
  trailing?: boolean;
6
6
  };
7
- /**
8
- * @ignore exporting this only for the unit test
9
- */
10
- export declare function addStyleClassToElement(element: any, styleClasses: string[], type?: string): void;
11
7
  /**
12
8
  * @ignore exporting this only for the unit test
13
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"headerFooterHelpers.d.ts","sourceRoot":"","sources":["../../src/utils/headerFooterHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAc,MAAM,QAAQ,CAAA;AA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