From efcb2ee26a0b1e193890f1f604510bd940bc9c74 Mon Sep 17 00:00:00 2001 From: Stijn Taelemans Date: Thu, 7 Oct 2021 10:53:25 +0200 Subject: [PATCH] feat: add fixed issuers to authenticate component (#62) * feat: moved models from uitransfer to shared * feat: moved services from uitransfer to shared * feat: moved auth components from uitransfer to shared * feat: added provider list above the webid component * fix: show components on correct machine state * fix: updated coverage * chore: center components in demo view Co-authored-by: Arne Vandoorslaer --- .../demo/demo-authenticate.component.ts | 43 + packages/dgt-components/demo/demo.ts | 18 +- packages/dgt-components/demo/index.html | 2 +- .../dgt-components/demo/styles.module.css | 2 + .../alerts/alert.component.spec.ts | 0 .../alerts/alert.component.ts | 0 .../lib/{ => components}/alerts/alert.ts | 0 .../authentication/authenticate.component.ts | 115 ++ .../authentication/authenticate.machine.ts | 193 +++ .../authentication/webid.component.ts | 87 ++ .../{ => components}/base/base.component.ts | 0 .../cards/card.component.spec.ts | 0 .../{ => components}/cards/card.component.ts | 0 .../consent/consent-request.component.ts | 151 +++ .../consent/consent-result.component.ts | 111 ++ .../forms/form-element.component.spec.ts | 0 .../forms/form-element.component.ts | 0 .../{ => components}/forms/form-submitter.ts | 0 .../forms/form-validator-result.ts | 0 .../{ => components}/forms/form-validator.ts | 0 .../forms/form.events.spec.ts | 0 .../lib/{ => components}/forms/form.events.ts | 0 .../forms/form.machine.spec.ts | 0 .../{ => components}/forms/form.machine.ts | 0 .../header/content-header.component.spec.ts | 0 .../header/content-header.component.ts | 0 .../list-item/list-item.component.spec.ts | 0 .../list-item/list-item.component.ts | 0 .../components/loading/loading.component.ts | 56 + .../profile/credential.component.ts | 0 .../profile/profile-contact.component.ts | 0 .../profile/profile-name.component.ts | 0 .../profile/profile-payslip.component.ts | 0 .../provider/provider-list-item.component.ts | 66 ++ .../provider/provider-list.component.ts | 59 + .../separator/separator.component.ts | 0 .../sidebar/sidebar-component.spec.ts | 0 .../sidebar/sidebar-item-component.spec.ts | 0 .../sidebar/sidebar-item.component.ts | 0 .../sidebar/sidebar-list-component.spec.ts | 0 .../sidebar-list-item-component.spec.ts | 0 .../sidebar/sidebar-list-item.component.ts | 0 .../sidebar/sidebar-list.component.ts | 0 .../sidebar/sidebar.component.ts | 0 .../source/source-list.component.ts | 95 ++ .../lib/components/source/source.component.ts | 71 ++ .../lib/{ => components}/state/event.ts | 0 .../lib/{ => components}/state/schema.ts | 0 .../lib/{ => components}/state/state.ts | 0 packages/dgt-components/lib/index.ts | 50 +- .../dgt-components/lib/models/holder.model.ts | 8 + .../dgt-components/lib/models/invite.model.ts | 15 + .../dgt-components/lib/models/issuer.model.ts | 5 + .../dgt-components/lib/models/node.model.ts | 17 + .../lib/models/predicate-translations.ts | 27 + .../lib/models/profile.model.ts | 5 + .../lib/models/purpose.model.ts | 12 + .../lib/models/session.model.ts | 4 + .../dgt-components/lib/models/source.model.ts | 13 + .../dgt-components/lib/models/triple.model.ts | 7 + .../lib/services/solid-sdk.service.ts | 268 +++++ .../lib/services/solid.service.ts | 63 + packages/dgt-components/package-lock.json | 1046 ++++++++++++++++- packages/dgt-components/package.json | 13 +- packages/dgt-components/tests/setup.ts | 18 +- packages/dgt-components/vite.config.ts | 2 +- packages/dgt-theme/lib/icons/Location.svg | 3 + packages/dgt-theme/lib/index.ts | 1 + 68 files changed, 2567 insertions(+), 79 deletions(-) create mode 100644 packages/dgt-components/demo/demo-authenticate.component.ts rename packages/dgt-components/lib/{ => components}/alerts/alert.component.spec.ts (100%) rename packages/dgt-components/lib/{ => components}/alerts/alert.component.ts (100%) rename packages/dgt-components/lib/{ => components}/alerts/alert.ts (100%) create mode 100644 packages/dgt-components/lib/components/authentication/authenticate.component.ts create mode 100644 packages/dgt-components/lib/components/authentication/authenticate.machine.ts create mode 100644 packages/dgt-components/lib/components/authentication/webid.component.ts rename packages/dgt-components/lib/{ => components}/base/base.component.ts (100%) rename packages/dgt-components/lib/{ => components}/cards/card.component.spec.ts (100%) rename packages/dgt-components/lib/{ => components}/cards/card.component.ts (100%) create mode 100644 packages/dgt-components/lib/components/consent/consent-request.component.ts create mode 100644 packages/dgt-components/lib/components/consent/consent-result.component.ts rename packages/dgt-components/lib/{ => components}/forms/form-element.component.spec.ts (100%) rename packages/dgt-components/lib/{ => components}/forms/form-element.component.ts (100%) rename packages/dgt-components/lib/{ => components}/forms/form-submitter.ts (100%) rename packages/dgt-components/lib/{ => components}/forms/form-validator-result.ts (100%) rename packages/dgt-components/lib/{ => components}/forms/form-validator.ts (100%) rename packages/dgt-components/lib/{ => components}/forms/form.events.spec.ts (100%) rename packages/dgt-components/lib/{ => components}/forms/form.events.ts (100%) rename packages/dgt-components/lib/{ => components}/forms/form.machine.spec.ts (100%) rename packages/dgt-components/lib/{ => components}/forms/form.machine.ts (100%) rename packages/dgt-components/lib/{ => components}/header/content-header.component.spec.ts (100%) rename packages/dgt-components/lib/{ => components}/header/content-header.component.ts (100%) rename packages/dgt-components/lib/{ => components}/list-item/list-item.component.spec.ts (100%) rename packages/dgt-components/lib/{ => components}/list-item/list-item.component.ts (100%) create mode 100644 packages/dgt-components/lib/components/loading/loading.component.ts rename packages/dgt-components/lib/{ => components}/profile/credential.component.ts (100%) rename packages/dgt-components/lib/{ => components}/profile/profile-contact.component.ts (100%) rename packages/dgt-components/lib/{ => components}/profile/profile-name.component.ts (100%) rename packages/dgt-components/lib/{ => components}/profile/profile-payslip.component.ts (100%) create mode 100644 packages/dgt-components/lib/components/provider/provider-list-item.component.ts create mode 100644 packages/dgt-components/lib/components/provider/provider-list.component.ts rename packages/dgt-components/lib/{ => components}/separator/separator.component.ts (100%) rename packages/dgt-components/lib/{ => components}/sidebar/sidebar-component.spec.ts (100%) rename packages/dgt-components/lib/{ => components}/sidebar/sidebar-item-component.spec.ts (100%) rename packages/dgt-components/lib/{ => components}/sidebar/sidebar-item.component.ts (100%) rename packages/dgt-components/lib/{ => components}/sidebar/sidebar-list-component.spec.ts (100%) rename packages/dgt-components/lib/{ => components}/sidebar/sidebar-list-item-component.spec.ts (100%) rename packages/dgt-components/lib/{ => components}/sidebar/sidebar-list-item.component.ts (100%) rename packages/dgt-components/lib/{ => components}/sidebar/sidebar-list.component.ts (100%) rename packages/dgt-components/lib/{ => components}/sidebar/sidebar.component.ts (100%) create mode 100644 packages/dgt-components/lib/components/source/source-list.component.ts create mode 100644 packages/dgt-components/lib/components/source/source.component.ts rename packages/dgt-components/lib/{ => components}/state/event.ts (100%) rename packages/dgt-components/lib/{ => components}/state/schema.ts (100%) rename packages/dgt-components/lib/{ => components}/state/state.ts (100%) create mode 100644 packages/dgt-components/lib/models/holder.model.ts create mode 100644 packages/dgt-components/lib/models/invite.model.ts create mode 100644 packages/dgt-components/lib/models/issuer.model.ts create mode 100644 packages/dgt-components/lib/models/node.model.ts create mode 100644 packages/dgt-components/lib/models/predicate-translations.ts create mode 100644 packages/dgt-components/lib/models/profile.model.ts create mode 100644 packages/dgt-components/lib/models/purpose.model.ts create mode 100644 packages/dgt-components/lib/models/session.model.ts create mode 100644 packages/dgt-components/lib/models/source.model.ts create mode 100644 packages/dgt-components/lib/models/triple.model.ts create mode 100644 packages/dgt-components/lib/services/solid-sdk.service.ts create mode 100644 packages/dgt-components/lib/services/solid.service.ts create mode 100644 packages/dgt-theme/lib/icons/Location.svg diff --git a/packages/dgt-components/demo/demo-authenticate.component.ts b/packages/dgt-components/demo/demo-authenticate.component.ts new file mode 100644 index 00000000..2c218b0b --- /dev/null +++ b/packages/dgt-components/demo/demo-authenticate.component.ts @@ -0,0 +1,43 @@ +import { css, html, unsafeCSS } from 'lit-element'; +import { RxLitElement } from 'rx-lit'; +import { Theme } from '@digita-ai/dgt-theme'; +import { SolidSDKService } from '../lib/services/solid-sdk.service' +import { AuthenticateComponent } from '../lib/components/authentication/authenticate.component'; + +export class DemoAuthenticateComponent extends RxLitElement { + private solidService = new SolidSDKService('UI Transfer'); + + onAuthenticated = (event: CustomEvent): void => { }; + + + constructor() { + super(); + customElements.define('auth-flow', AuthenticateComponent); + + } + /** + * Renders the component as HTML. + * + * @returns The rendered HTML of the component. + */ + render() { + + return html` + + `; + + } + + /** + * The styles associated with the component. + */ + static get styles() { + + return [ + unsafeCSS(Theme), + css``, + ]; + + } + +} diff --git a/packages/dgt-components/demo/demo.ts b/packages/dgt-components/demo/demo.ts index 6b4c2232..81e3d5ea 100644 --- a/packages/dgt-components/demo/demo.ts +++ b/packages/dgt-components/demo/demo.ts @@ -1,13 +1,17 @@ import { Parser } from 'n3'; import { ComponentEventType, ComponentReadEvent, ComponentResponseEvent, ComponentWriteEvent } from '@digita-ai/semcom-sdk'; -import {ProfileNameComponent} from '../lib/profile/profile-name.component'; -import {FormElementComponent} from '../lib/forms/form-element.component'; -import {ContentHeaderComponent} from '../lib/header/content-header.component'; -import {CardComponent} from '../lib/cards/card.component'; -import { ProfileContactComponent } from '../lib/profile/profile-contact.component'; -import { ProfilePayslipComponent } from '../lib/profile/profile-payslip.component'; -import { ListItemComponent } from '../lib/list-item/list-item.component'; +import {ProfileNameComponent} from '../lib/components/profile/profile-name.component'; +import {FormElementComponent} from '../lib/components/forms/form-element.component'; +import {ContentHeaderComponent} from '../lib/components/header/content-header.component'; +import {CardComponent} from '../lib/components/cards/card.component'; +import { ProfileContactComponent } from '../lib/components/profile/profile-contact.component'; +import { ProfilePayslipComponent } from '../lib/components/profile/profile-payslip.component'; +import { DemoAuthenticateComponent } from './demo-authenticate.component'; +import { ListItemComponent } from '../lib/components/list-item/list-item.component'; + + +customElements.define('demo-auth', DemoAuthenticateComponent); customElements.define('nde-form-element', FormElementComponent); customElements.define('nde-content-header', ContentHeaderComponent); customElements.define('nde-card', CardComponent); diff --git a/packages/dgt-components/demo/index.html b/packages/dgt-components/demo/index.html index 632f439c..19f1a3a9 100644 --- a/packages/dgt-components/demo/index.html +++ b/packages/dgt-components/demo/index.html @@ -13,6 +13,7 @@ +
@@ -22,6 +23,5 @@ - diff --git a/packages/dgt-components/demo/styles.module.css b/packages/dgt-components/demo/styles.module.css index 767619aa..67be5a83 100644 --- a/packages/dgt-components/demo/styles.module.css +++ b/packages/dgt-components/demo/styles.module.css @@ -5,6 +5,8 @@ html { } body { + margin: auto; + width: 550px; height: 100%; background-color: var(--colors-background-normal); display: flex; diff --git a/packages/dgt-components/lib/alerts/alert.component.spec.ts b/packages/dgt-components/lib/components/alerts/alert.component.spec.ts similarity index 100% rename from packages/dgt-components/lib/alerts/alert.component.spec.ts rename to packages/dgt-components/lib/components/alerts/alert.component.spec.ts diff --git a/packages/dgt-components/lib/alerts/alert.component.ts b/packages/dgt-components/lib/components/alerts/alert.component.ts similarity index 100% rename from packages/dgt-components/lib/alerts/alert.component.ts rename to packages/dgt-components/lib/components/alerts/alert.component.ts diff --git a/packages/dgt-components/lib/alerts/alert.ts b/packages/dgt-components/lib/components/alerts/alert.ts similarity index 100% rename from packages/dgt-components/lib/alerts/alert.ts rename to packages/dgt-components/lib/components/alerts/alert.ts diff --git a/packages/dgt-components/lib/components/authentication/authenticate.component.ts b/packages/dgt-components/lib/components/authentication/authenticate.component.ts new file mode 100644 index 00000000..28705c5c --- /dev/null +++ b/packages/dgt-components/lib/components/authentication/authenticate.component.ts @@ -0,0 +1,115 @@ +import { html, internalProperty, TemplateResult, property, PropertyValues, unsafeCSS, CSSResultArray, css } from 'lit-element'; +import { createMachine, DoneEvent, interpret, Interpreter, State, StateMachine } from 'xstate'; +import { RxLitElement } from 'rx-lit'; +import { from } from 'rxjs'; +import { map } from 'rxjs/operators'; +import { Theme } from '@digita-ai/dgt-theme'; +import { SolidSDKService } from '../../services/solid-sdk.service'; +import { Issuer } from '../../models/issuer.model'; +import { ProviderListComponent } from '../provider/provider-list.component'; +import { SeparatorComponent } from '../separator/separator.component'; +import { LoadingComponent } from '../loading/loading.component'; +import { WebIdComponent } from './webid.component'; +import { AuthenticateContext, AuthenticateEvent, authenticateMachine, AuthenticateState, AuthenticateStates, AuthenticateStateSchema, SelectedIssuerEvent, WebIdEnteredEvent } from './authenticate.machine'; + +export class AuthenticateComponent extends RxLitElement { + + private actor: Interpreter; + private machine: StateMachine; + private predifinedIssuers: Issuer[] = [ + { description: 'Solid Community', icon: 'data:image/png;base64,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', uri: 'https://solidcommunity.net' }, + { description: 'Inrupt', icon: 'https://inrupt.com/static/inrupt-social_0-372b94bf42bea86a81cc362e0c99d115.jpg', uri: 'https://inrupt.net/' }, + ]; + + @internalProperty() + state?: State; + + @internalProperty() + issuers?: Issuer[]; + + @property({ type: Object }) solidService: SolidSDKService; + + @property({ type: Boolean }) hideWebId = false; + + @property({ type: Boolean }) hideIssuers = false; + + constructor() { + + super(); + + this.define('provider-list', ProviderListComponent); + this.define('webid-form', WebIdComponent); + this.define('separator-component', SeparatorComponent); + this.define('loading-component', LoadingComponent); + + } + + updated(changed: PropertyValues): void { + + super.updated(changed); + + if (changed.has('solidService')) { + + if (this.actor) this.actor.stop(); + + this.machine = createMachine(authenticateMachine(this.solidService)); + + // eslint-disable-next-line no-console + this.actor = interpret(this.machine, { devTools: true }).onTransition((state) => console.log(state.value)); + + this.subscribe('state', from(this.actor)); + this.subscribe('issuers', from(this.actor).pipe(map((state) => state.context.issuers))); + + this.actor.onDone((event: DoneEvent) => { this.dispatchEvent(new CustomEvent('authenticated', { detail: event.data.session })); }); + + this.actor.start(); + + } + + } + + onSubmit = (event: CustomEvent): void => { + + event.preventDefault(); + this.actor.send(new WebIdEnteredEvent(event.detail)); + + }; + + onButtonCreateWebIDClick = (): void => { this.dispatchEvent(new CustomEvent('create-webid')); }; + + render(): TemplateResult { + + return html` + ${ this.state?.matches(AuthenticateStates.AWAITING_WEBID) ? html` + ${ !this.hideIssuers ? html`` : html``} + ${ !this.hideWebId && !this.hideIssuers ? html`of` : html`` } + ${ !this.hideWebId ? html`` : html``} + ` : html` ${ this.state?.matches(AuthenticateStates.SELECTING_ISSUER) ? html` + ` + : html`` } + `}`; + + } + + define(tag: string, module: CustomElementConstructor): void { + + if (!customElements.get(tag)) customElements.define(tag, module); + + } + static get styles(): CSSResultArray { + + return [ + unsafeCSS(Theme), + css` + + separator-component { + margin: var(--gap-large) 0; + } + `, + ]; + + } + +} + +export default AuthenticateComponent; diff --git a/packages/dgt-components/lib/components/authentication/authenticate.machine.ts b/packages/dgt-components/lib/components/authentication/authenticate.machine.ts new file mode 100644 index 00000000..93ed6e62 --- /dev/null +++ b/packages/dgt-components/lib/components/authentication/authenticate.machine.ts @@ -0,0 +1,193 @@ +import { EventObject, MachineConfig, StateSchema } from 'xstate'; +import { send, assign, log } from 'xstate/lib/actions'; +import { Issuer } from '../../models/issuer.model'; +import { Session } from '../../models/session.model'; +import { SolidService } from '../../services/solid.service'; + +/* CONTEXT */ + +export interface AuthenticateContext { + webId?: string; + session?: Session; + issuers?: Issuer[]; + issuer?: Issuer; +} + +export interface WithWebId extends AuthenticateContext { + webId: string; +} + +export interface WithIssuer extends AuthenticateContext { + issuer: Issuer; +} + +export interface WithIssuers extends AuthenticateContext { + issuers: Issuer[]; +} + +export interface WithSession extends AuthenticateContext { + session: Session; +} + +/* STATES */ + +export enum AuthenticateStates { + CHECKING_SESSION = '[AuthenticateState: Checking session]', + AWAITING_WEBID = '[AuthenticateState: Awaiting WebId]', + CHECKING_WEBID = '[AuthenticateState: Checking WebId]', + SELECTING_ISSUER = '[AuthenticateState: Selecting Issuer]', + AUTHENTICATING = '[AuthenticateState: Authenticating]', + AUTHENTICATED = '[AuthenticateState: Authenticated]', + REDIRECTING = '[AuthenticateState: Redirecting]', +} + +export interface AuthenticateStateSchema extends StateSchema { + states: { + [key in AuthenticateStates]?: StateSchema; + }; +} + +export type AuthenticateState = + { value: AuthenticateStates.CHECKING_SESSION | AuthenticateStates.AWAITING_WEBID; + context: AuthenticateContext; + } | { + value: AuthenticateStates.CHECKING_WEBID; + context: AuthenticateContext & WithWebId; + } | { + value: AuthenticateStates.SELECTING_ISSUER; + context: AuthenticateContext & WithWebId & WithIssuers; + } | { + value: AuthenticateStates.AUTHENTICATING; + context: AuthenticateContext & WithWebId & WithIssuer; + } | { + value: AuthenticateStates.AUTHENTICATED; + context: AuthenticateContext & WithWebId & WithSession; + }; + +/* EVENTS */ + +export enum AuthenticateEvents { + WEBID_ENTERED = '[AuthenticateEvent: WebID entered]', + SELECTED_ISSUER = '[AuthenticateEvent: Selected Issuer]', + LOGIN_SUCCESS = '[AuthenticateEvent: Login success]', + LOGIN_ERROR = '[AuthenticateEvent: Login error]', +} + +export class WebIdEnteredEvent implements EventObject { + + public type: AuthenticateEvents.WEBID_ENTERED = AuthenticateEvents.WEBID_ENTERED; + constructor(public webId: string) {} + +} + +export class LoginSuccessEvent implements EventObject { + + public type: AuthenticateEvents.LOGIN_SUCCESS = AuthenticateEvents.LOGIN_SUCCESS; + +} + +export class LoginErrorEvent implements EventObject { + + public type: AuthenticateEvents.LOGIN_ERROR = AuthenticateEvents.LOGIN_ERROR; + constructor(public message: string) {} + +} + +export class SelectedIssuerEvent implements EventObject { + + public type: AuthenticateEvents.SELECTED_ISSUER = AuthenticateEvents.SELECTED_ISSUER; + constructor(public issuer: Issuer) {} + +} + +export type AuthenticateEvent = LoginSuccessEvent | WebIdEnteredEvent | LoginErrorEvent | SelectedIssuerEvent; + +/* MACHINE */ + +export const authenticateMachine = (solid: SolidService): +MachineConfig => ({ + + initial: AuthenticateStates.CHECKING_SESSION, + + context: { + webId: undefined, + session: undefined, + issuers: [ + { description: 'Solid Community', icon: 'data:image/png;base64,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', uri: 'https://solidcommunity.net' }, + { description: 'Inrupt', icon: 'https://inrupt.com/static/inrupt-social_0-372b94bf42bea86a81cc362e0c99d115.jpg', uri: 'https://inrupt.net/' }, + ], + }, + + on: { + [AuthenticateEvents.LOGIN_ERROR]: { + actions: [ + log((context, event) => `Login error:`), + log((context, event) => event), + ], + target: AuthenticateStates.AWAITING_WEBID, + }, + }, + + states: { + + [AuthenticateStates.CHECKING_SESSION]: { + invoke: { + src: () => solid.getSession(), + onDone: { + actions: assign({ session: (context, event) => event.data }), + target: AuthenticateStates.AUTHENTICATED, + }, + onError: AuthenticateStates.AWAITING_WEBID, + }, + }, + + [AuthenticateStates.AWAITING_WEBID]: { + on: { + [AuthenticateEvents.WEBID_ENTERED]: { + actions: assign({ webId: (context, event) => event.webId }), + target: AuthenticateStates.CHECKING_WEBID, + }, + [AuthenticateEvents.SELECTED_ISSUER]: { + actions: assign({ issuer: (context, event) => event.issuer }), + target: AuthenticateStates.AUTHENTICATING, + }, + }, + }, + + [AuthenticateStates.CHECKING_WEBID]: { + invoke: { + src: (context) => solid.getIssuers(context.webId), + onDone: { + actions: assign({ issuers: (context, event) => event.data.concat(context.issuers) }), + target: AuthenticateStates.SELECTING_ISSUER, + }, + onError: { actions: send((context, event) => new LoginErrorEvent('Invalid WebID')) }, + }, + }, + + [AuthenticateStates.SELECTING_ISSUER]: { + on: { + [AuthenticateEvents.SELECTED_ISSUER]: { + actions: assign({ issuer: (context, event) => event.issuer }), + target: AuthenticateStates.AUTHENTICATING, + }, + }, + }, + + [AuthenticateStates.AUTHENTICATING]: { + invoke: { + src: (context) => solid.loginWithIssuer(context.issuer), + onError: { + actions: send((context, event) => new LoginErrorEvent('Login failed')), + }, + }, + }, + + [AuthenticateStates.AUTHENTICATED]: { + data: { session: (context: AuthenticateContext) => context.session }, + type: 'final', + }, + + }, + +}); diff --git a/packages/dgt-components/lib/components/authentication/webid.component.ts b/packages/dgt-components/lib/components/authentication/webid.component.ts new file mode 100644 index 00000000..79c5a499 --- /dev/null +++ b/packages/dgt-components/lib/components/authentication/webid.component.ts @@ -0,0 +1,87 @@ +import { html, unsafeCSS, css, TemplateResult, CSSResultArray, property } from 'lit-element'; +import { RxLitElement } from 'rx-lit'; +import { Theme } from '@digita-ai/dgt-theme'; +import { SolidSDKService } from '../../services/solid-sdk.service'; + +export class WebIdComponent extends RxLitElement { + + @property() textEnterYourWebID = 'Enter your WebID'; + @property() textWebID = 'WebID'; + @property() textWebIDFieldPlaceholder = 'Please enter your WebID ...'; + @property() textNoWebIDYet = 'No WebID yet?'; + @property() textConnect = 'Connect'; + @property({ type: Object }) solidService: SolidSDKService; + + constructor() { + + super(); + + } + + onSubmit = (event: Event & { target: HTMLFormElement }): void => { + + event.preventDefault(); + this.dispatchEvent(new CustomEvent('submit-webid', { detail: event.target.querySelector('input[name=webid]').value })); + + }; + + onButtonCreateWebIDClick = (): void => { this.dispatchEvent(new CustomEvent('create-webid')); }; + + render(): TemplateResult { + + return html` +

${this.textEnterYourWebID}

+
+ + + ${this.textNoWebIDYet} + +
+ `; + + } + + static get styles(): CSSResultArray { + + return [ + unsafeCSS(Theme), + css` + button { + width: 100%; + margin: var(--gap-large) 0; + border-radius: var(--border-large); + } + + input { + margin: var(--gap-small) 0; + padding: var(--gap-normal); + } + + span { + font-size: var(--font-size-small); + padding: var(--gap-tiny); + text-decoration: underline; + color: var(--colors-primary-normal); + text-align: right; + } + + span:hover { + color: var(--colors-primary-dark); + } + + h1 { + margin: var(--gap-large) var(--gap-normal); + font-size: var(--font-size-header-normal); + font-style: normal; + font-weight: bold; + text-align: center; + } + + `, + ]; + + } + +} + +export default WebIdComponent; diff --git a/packages/dgt-components/lib/base/base.component.ts b/packages/dgt-components/lib/components/base/base.component.ts similarity index 100% rename from packages/dgt-components/lib/base/base.component.ts rename to packages/dgt-components/lib/components/base/base.component.ts diff --git a/packages/dgt-components/lib/cards/card.component.spec.ts b/packages/dgt-components/lib/components/cards/card.component.spec.ts similarity index 100% rename from packages/dgt-components/lib/cards/card.component.spec.ts rename to packages/dgt-components/lib/components/cards/card.component.spec.ts diff --git a/packages/dgt-components/lib/cards/card.component.ts b/packages/dgt-components/lib/components/cards/card.component.ts similarity index 100% rename from packages/dgt-components/lib/cards/card.component.ts rename to packages/dgt-components/lib/components/cards/card.component.ts diff --git a/packages/dgt-components/lib/components/consent/consent-request.component.ts b/packages/dgt-components/lib/components/consent/consent-request.component.ts new file mode 100644 index 00000000..d34cba37 --- /dev/null +++ b/packages/dgt-components/lib/components/consent/consent-request.component.ts @@ -0,0 +1,151 @@ +import { css, CSSResultArray, html, internalProperty, LitElement, property, TemplateResult, unsafeCSS } from 'lit-element'; +import { unsafeSVG } from 'lit-html/directives/unsafe-svg'; +import { Location, Edit, Theme } from '@digita-ai/dgt-theme'; +import { Purpose } from '../../models/purpose.model'; +import { predicateTranslations } from '../../models/predicate-translations'; + +export class ConsentRequestComponent extends LitElement { + + @property({ type: Object }) + public purpose: Purpose; + + @internalProperty() + public checked = false; + + @property() textYourData = 'Your data'; + @property() textYourConsent = 'Your consent'; + @property() textIAgree = 'I agree'; + @property() textContinue = 'Continue'; + + onButtonClick = (): void => { this.dispatchEvent(new CustomEvent('consent-given')); }; + + onConsentCheck = (): void => { this.checked = !this.checked; }; + + render(): TemplateResult { + + const hiddenPredicates = [ + 'https://schema.org/uri', + 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type', + 'http://www.w3.org/2006/vcard/ns#value', + ]; + + const predicatesToShow = this.purpose.predicates.filter((pred) => !hiddenPredicates.includes(pred)); + const translatedPredicates = predicatesToShow.map((pred) => predicateTranslations[pred] ?? pred); + const uniqueTranslatedPredicates = Array.from(new Set(translatedPredicates)); + + return html` +
+

${this.textYourData}

+

${this.purpose.description}

+ ${ uniqueTranslatedPredicates.map((predicate) => html` +
+ ${ unsafeSVG(Location) } + ${ predicate } + ${ unsafeSVG(Edit) } +
+ `)} +
+ + + + + `; + + } + + static get styles(): CSSResultArray { + + return [ + unsafeCSS(Theme), + css` + .data-container, .consent-container { + width: 100%; + box-shadow: 0px 2px 4px rgba(26, 32, 44, 0.1); + background-color: white; + align-items: center; + background-color: var(--colors-background-light); + border-radius: 5px; + padding-bottom: var(--gap-normal); + padding-top: var(--gap-normal); + margin-bottom: var(--gap-normal); + } + .grey-block { + background-color: var(--colors-background-normal); + display: flex; + flex-direction: row; + align-items: center; + margin: var(--gap-normal); + } + + .predicate { + flex: 1 1; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .edit{ + cursor: pointer; + } + + .grey-block svg { + margin: var(--gap-small); + width: var(--font-size-normal); + height: var(--font-size-normal); + } + + .consent-box { + display: flex; + align-items: center; + } + + .consent-box label { + margin-left: var(--gap-small) + } + + button { + border-radius: 5px; + width: 100%; + margin-top: var(--gap-large); + display: flex; + align-items: center; + } + + button div { + text-align: center; + width: 100%; + } + + .consent-box label { + justify-content: center; + text-align: center; + } + + .consent-box input { + display: block; + } + + h1, p, .consent-box { + margin: var(--gap-large) var(--gap-normal); + } + h1 { + font-size: var(--font-size-header-normal); + } + p { + font-size: var(--font-size-small); + }`, + ]; + + } + +} + +export default ConsentRequestComponent; diff --git a/packages/dgt-components/lib/components/consent/consent-result.component.ts b/packages/dgt-components/lib/components/consent/consent-result.component.ts new file mode 100644 index 00000000..9b6e62a5 --- /dev/null +++ b/packages/dgt-components/lib/components/consent/consent-result.component.ts @@ -0,0 +1,111 @@ +import { css, CSSResultArray, html, LitElement, property, TemplateResult, unsafeCSS } from 'lit-element'; +import { unsafeSVG } from 'lit-html/directives/unsafe-svg'; +import { Theme, Location } from '@digita-ai/dgt-theme'; +import { predicateTranslations } from '../../models/predicate-translations'; +import { Purpose } from '../../models/purpose.model'; + +export class ConsentResultComponent extends LitElement { + + @property({ type: String }) + public title: string; + + @property({ type: String }) + public bodyText: string; + + @property({ type: String }) + public buttonText: string; + + @property({ type: Object }) + public purpose: Purpose; + + onButtonClick = (): boolean => this.dispatchEvent(new CustomEvent('button-clicked')); + + render(): TemplateResult { + + const hiddenPredicates = [ + 'https://schema.org/uri', + 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type', + 'http://www.w3.org/2006/vcard/ns#value', + ]; + + const predicatesToShow = this.purpose.predicates.filter((pred) => !hiddenPredicates.includes(pred)); + const translatedPredicates = predicatesToShow.map((pred) => predicateTranslations[pred] ?? pred); + const uniqueTranslatedPredicates = Array.from(new Set(translatedPredicates)); + + return html` +
+

${this.title}

+

${this.bodyText}

+ ${ uniqueTranslatedPredicates.map((predicate) => html` +
+ ${ unsafeSVG(Location) } + ${ predicate } +
+ `)} +
+ + `; + + } + + static get styles(): CSSResultArray { + + return [ + unsafeCSS(Theme), + css` + .result-container { + box-shadow: 0px 2px 4px rgba(26, 32, 44, 0.1); + background-color: white; + width: 100%; + align-items: center; + background-color: var(--colors-background-light); + border-radius: 5px; + padding-bottom: var(--gap-normal); + padding-top: var(--gap-normal); + margin-bottom: var(--gap-normal); + } + .grey-block { + background-color: var(--colors-background-normal); + display: flex; + flex-direction: row; + align-items: center; + margin: var(--gap-normal); + } + + .grey-block svg { + margin: var(--gap-small); + width: var(--font-size-normal); + height: var(--font-size-normal); + } + + .predicate { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + button { + width: 100%; + border-radius: 5px; + margin-top: var(--gap-large); + } + + h1, p { + margin: var(--gap-large) var(--gap-normal); + } + h1 { + font-size: var(--font-size-header-normal); + } + p { + font-size: var(--font-size-small); + } + `, + ]; + + } + +} + +export default ConsentResultComponent; diff --git a/packages/dgt-components/lib/forms/form-element.component.spec.ts b/packages/dgt-components/lib/components/forms/form-element.component.spec.ts similarity index 100% rename from packages/dgt-components/lib/forms/form-element.component.spec.ts rename to packages/dgt-components/lib/components/forms/form-element.component.spec.ts diff --git a/packages/dgt-components/lib/forms/form-element.component.ts b/packages/dgt-components/lib/components/forms/form-element.component.ts similarity index 100% rename from packages/dgt-components/lib/forms/form-element.component.ts rename to packages/dgt-components/lib/components/forms/form-element.component.ts diff --git a/packages/dgt-components/lib/forms/form-submitter.ts b/packages/dgt-components/lib/components/forms/form-submitter.ts similarity index 100% rename from packages/dgt-components/lib/forms/form-submitter.ts rename to packages/dgt-components/lib/components/forms/form-submitter.ts diff --git a/packages/dgt-components/lib/forms/form-validator-result.ts b/packages/dgt-components/lib/components/forms/form-validator-result.ts similarity index 100% rename from packages/dgt-components/lib/forms/form-validator-result.ts rename to packages/dgt-components/lib/components/forms/form-validator-result.ts diff --git a/packages/dgt-components/lib/forms/form-validator.ts b/packages/dgt-components/lib/components/forms/form-validator.ts similarity index 100% rename from packages/dgt-components/lib/forms/form-validator.ts rename to packages/dgt-components/lib/components/forms/form-validator.ts diff --git a/packages/dgt-components/lib/forms/form.events.spec.ts b/packages/dgt-components/lib/components/forms/form.events.spec.ts similarity index 100% rename from packages/dgt-components/lib/forms/form.events.spec.ts rename to packages/dgt-components/lib/components/forms/form.events.spec.ts diff --git a/packages/dgt-components/lib/forms/form.events.ts b/packages/dgt-components/lib/components/forms/form.events.ts similarity index 100% rename from packages/dgt-components/lib/forms/form.events.ts rename to packages/dgt-components/lib/components/forms/form.events.ts diff --git a/packages/dgt-components/lib/forms/form.machine.spec.ts b/packages/dgt-components/lib/components/forms/form.machine.spec.ts similarity index 100% rename from packages/dgt-components/lib/forms/form.machine.spec.ts rename to packages/dgt-components/lib/components/forms/form.machine.spec.ts diff --git a/packages/dgt-components/lib/forms/form.machine.ts b/packages/dgt-components/lib/components/forms/form.machine.ts similarity index 100% rename from packages/dgt-components/lib/forms/form.machine.ts rename to packages/dgt-components/lib/components/forms/form.machine.ts diff --git a/packages/dgt-components/lib/header/content-header.component.spec.ts b/packages/dgt-components/lib/components/header/content-header.component.spec.ts similarity index 100% rename from packages/dgt-components/lib/header/content-header.component.spec.ts rename to packages/dgt-components/lib/components/header/content-header.component.spec.ts diff --git a/packages/dgt-components/lib/header/content-header.component.ts b/packages/dgt-components/lib/components/header/content-header.component.ts similarity index 100% rename from packages/dgt-components/lib/header/content-header.component.ts rename to packages/dgt-components/lib/components/header/content-header.component.ts diff --git a/packages/dgt-components/lib/list-item/list-item.component.spec.ts b/packages/dgt-components/lib/components/list-item/list-item.component.spec.ts similarity index 100% rename from packages/dgt-components/lib/list-item/list-item.component.spec.ts rename to packages/dgt-components/lib/components/list-item/list-item.component.spec.ts diff --git a/packages/dgt-components/lib/list-item/list-item.component.ts b/packages/dgt-components/lib/components/list-item/list-item.component.ts similarity index 100% rename from packages/dgt-components/lib/list-item/list-item.component.ts rename to packages/dgt-components/lib/components/list-item/list-item.component.ts diff --git a/packages/dgt-components/lib/components/loading/loading.component.ts b/packages/dgt-components/lib/components/loading/loading.component.ts new file mode 100644 index 00000000..17b429f7 --- /dev/null +++ b/packages/dgt-components/lib/components/loading/loading.component.ts @@ -0,0 +1,56 @@ +import { html, property, unsafeCSS, css, CSSResult, TemplateResult, LitElement } from 'lit-element'; +import { unsafeSVG } from 'lit-html/directives/unsafe-svg'; +import { Theme, Loading } from '@digita-ai/dgt-theme'; + +export class LoadingComponent extends LitElement { + + @property({ type: String }) + message: string; + + constructor() { + + super(); + + } + + render(): TemplateResult { + + return html` +
+ ${unsafeSVG(Loading)} + ${this.message ? html`

${this.message}

` : undefined} +
+ `; + + } + + static get styles(): CSSResult[] { + + return [ + unsafeCSS(Theme), + css` + .loading-container { + width: var(--form-large); + height: 100%; + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + } + .loading-container svg { + width: 150px; + height: 150px; + } + .loading-container svg { + stroke: var(--colors-foreground-normal); + } + `, + ]; + + } + +} + +export default LoadingComponent; + diff --git a/packages/dgt-components/lib/profile/credential.component.ts b/packages/dgt-components/lib/components/profile/credential.component.ts similarity index 100% rename from packages/dgt-components/lib/profile/credential.component.ts rename to packages/dgt-components/lib/components/profile/credential.component.ts diff --git a/packages/dgt-components/lib/profile/profile-contact.component.ts b/packages/dgt-components/lib/components/profile/profile-contact.component.ts similarity index 100% rename from packages/dgt-components/lib/profile/profile-contact.component.ts rename to packages/dgt-components/lib/components/profile/profile-contact.component.ts diff --git a/packages/dgt-components/lib/profile/profile-name.component.ts b/packages/dgt-components/lib/components/profile/profile-name.component.ts similarity index 100% rename from packages/dgt-components/lib/profile/profile-name.component.ts rename to packages/dgt-components/lib/components/profile/profile-name.component.ts diff --git a/packages/dgt-components/lib/profile/profile-payslip.component.ts b/packages/dgt-components/lib/components/profile/profile-payslip.component.ts similarity index 100% rename from packages/dgt-components/lib/profile/profile-payslip.component.ts rename to packages/dgt-components/lib/components/profile/profile-payslip.component.ts diff --git a/packages/dgt-components/lib/components/provider/provider-list-item.component.ts b/packages/dgt-components/lib/components/provider/provider-list-item.component.ts new file mode 100644 index 00000000..78d50d24 --- /dev/null +++ b/packages/dgt-components/lib/components/provider/provider-list-item.component.ts @@ -0,0 +1,66 @@ +import { html, internalProperty, property, unsafeCSS, css, CSSResult, TemplateResult } from 'lit-element'; +import { RxLitElement } from 'rx-lit'; +import { Theme } from '@digita-ai/dgt-theme'; + +export class ProviderListItemComponent extends RxLitElement { + + @property({ type: String }) + public icon: string; + @property({ type: String }) + public description: string; + + @internalProperty() + buttonEnabled = true; + onButtonClick = (): void => { + + this.buttonEnabled = false; + this.dispatchEvent(new Event('button-clicked')); + + }; + render(): TemplateResult { + + return html` +
+ +

${ this.description }

+
+ `; + + } + static get styles(): CSSResult[] { + + return [ + unsafeCSS(Theme), + css` + .card-container { + display: flex; + align-items: center; + background: var(--colors-background-light); + box-shadow: 0px 2px 4px rgba(26, 32, 44, 0.1); + border-radius: var(--border-large); + margin: var(--gap-small) var(--gap-normal); + padding: var(--gap-small); + height: var(--gap-large); + cursor: pointer; + } + + h1 { + font-weight: bold; + font-style: normal; + font-size: var(--font-size-small); + width: 100%; + } + + img { + background-color: transparent; + margin-right: var(--gap-small); + width: var(--gap-large); + } + `, + ]; + + } + +} diff --git a/packages/dgt-components/lib/components/provider/provider-list.component.ts b/packages/dgt-components/lib/components/provider/provider-list.component.ts new file mode 100644 index 00000000..6c2ab543 --- /dev/null +++ b/packages/dgt-components/lib/components/provider/provider-list.component.ts @@ -0,0 +1,59 @@ +import { css, CSSResultArray, html, internalProperty, LitElement, property, TemplateResult, unsafeCSS } from 'lit-element'; +import { Theme } from '@digita-ai/dgt-theme'; +import { Issuer } from '../../models/issuer.model'; +import { ProviderListItemComponent } from './provider-list-item.component'; + +export class ProviderListComponent extends LitElement { + + @property({ type: Array }) + public providers: Issuer[]; + + @internalProperty() + public buttonsEnabled = true; + + constructor() { + + super(); + + if (!customElements.get('provider-list-item')) customElements.define('provider-list-item', ProviderListItemComponent); + + } + + onIssuerSelected = (issuer: Issuer) => (): void => { + + this.buttonsEnabled = false; + this.dispatchEvent(new CustomEvent('issuer-selected', { detail: issuer })); + + }; + + render(): TemplateResult { + + return html` +

Select an identity provider to log in

+
+ ${ this.providers.map((provider) => html` + + `)}
`; + + } + + static get styles(): CSSResultArray { + + return [ + unsafeCSS(Theme), + css` + h1 { + margin: var(--gap-large) var(--gap-normal); + font-size: var(--font-size-header-normal); + font-style: normal; + font-weight: bold; + text-align: center; + } + `, + ]; + + } + +} + +export default ProviderListComponent; diff --git a/packages/dgt-components/lib/separator/separator.component.ts b/packages/dgt-components/lib/components/separator/separator.component.ts similarity index 100% rename from packages/dgt-components/lib/separator/separator.component.ts rename to packages/dgt-components/lib/components/separator/separator.component.ts diff --git a/packages/dgt-components/lib/sidebar/sidebar-component.spec.ts b/packages/dgt-components/lib/components/sidebar/sidebar-component.spec.ts similarity index 100% rename from packages/dgt-components/lib/sidebar/sidebar-component.spec.ts rename to packages/dgt-components/lib/components/sidebar/sidebar-component.spec.ts diff --git a/packages/dgt-components/lib/sidebar/sidebar-item-component.spec.ts b/packages/dgt-components/lib/components/sidebar/sidebar-item-component.spec.ts similarity index 100% rename from packages/dgt-components/lib/sidebar/sidebar-item-component.spec.ts rename to packages/dgt-components/lib/components/sidebar/sidebar-item-component.spec.ts diff --git a/packages/dgt-components/lib/sidebar/sidebar-item.component.ts b/packages/dgt-components/lib/components/sidebar/sidebar-item.component.ts similarity index 100% rename from packages/dgt-components/lib/sidebar/sidebar-item.component.ts rename to packages/dgt-components/lib/components/sidebar/sidebar-item.component.ts diff --git a/packages/dgt-components/lib/sidebar/sidebar-list-component.spec.ts b/packages/dgt-components/lib/components/sidebar/sidebar-list-component.spec.ts similarity index 100% rename from packages/dgt-components/lib/sidebar/sidebar-list-component.spec.ts rename to packages/dgt-components/lib/components/sidebar/sidebar-list-component.spec.ts diff --git a/packages/dgt-components/lib/sidebar/sidebar-list-item-component.spec.ts b/packages/dgt-components/lib/components/sidebar/sidebar-list-item-component.spec.ts similarity index 100% rename from packages/dgt-components/lib/sidebar/sidebar-list-item-component.spec.ts rename to packages/dgt-components/lib/components/sidebar/sidebar-list-item-component.spec.ts diff --git a/packages/dgt-components/lib/sidebar/sidebar-list-item.component.ts b/packages/dgt-components/lib/components/sidebar/sidebar-list-item.component.ts similarity index 100% rename from packages/dgt-components/lib/sidebar/sidebar-list-item.component.ts rename to packages/dgt-components/lib/components/sidebar/sidebar-list-item.component.ts diff --git a/packages/dgt-components/lib/sidebar/sidebar-list.component.ts b/packages/dgt-components/lib/components/sidebar/sidebar-list.component.ts similarity index 100% rename from packages/dgt-components/lib/sidebar/sidebar-list.component.ts rename to packages/dgt-components/lib/components/sidebar/sidebar-list.component.ts diff --git a/packages/dgt-components/lib/sidebar/sidebar.component.ts b/packages/dgt-components/lib/components/sidebar/sidebar.component.ts similarity index 100% rename from packages/dgt-components/lib/sidebar/sidebar.component.ts rename to packages/dgt-components/lib/components/sidebar/sidebar.component.ts diff --git a/packages/dgt-components/lib/components/source/source-list.component.ts b/packages/dgt-components/lib/components/source/source-list.component.ts new file mode 100644 index 00000000..db37e4c3 --- /dev/null +++ b/packages/dgt-components/lib/components/source/source-list.component.ts @@ -0,0 +1,95 @@ +import { css, CSSResultArray, html, internalProperty, LitElement, property, PropertyValues, TemplateResult, unsafeCSS } from 'lit-element'; +import { Theme } from '@digita-ai/dgt-theme'; +import { Source } from '../../models/source.model'; +import { SourceComponent } from './source.component'; + +export class SourceListComponent extends LitElement { + + @property({ type: Array }) + public sources: Source[]; + + @internalProperty() + public query = ''; + + @internalProperty() + public filteredSources: Source[]; + + @internalProperty() + public buttonsEnabled = true; + + @property() textSearchFieldPlaceholder = 'Type here to search...'; + @property() textNoSearchResults = 'No search results!'; + + constructor() { + + super(); + + customElements.define('source-item', SourceComponent); + + } + + updated(changed: PropertyValues): void { + + super.updated(changed); + + if (changed.has('sources') || changed.has('query')) { + + this.filteredSources = this.sources?.filter( + (source) => source.description.toLowerCase().includes(this.query.trim().toLowerCase()) + ); + + } + + } + + onQueryUpdate = (e: Event & { target: HTMLInputElement }): void => { this.query = e.target.value; }; + + onSourceSelected = (e: CustomEvent & { detail: { source: Source } }): void => { + + this.buttonsEnabled = false; + this.dispatchEvent(new CustomEvent('source-selected', { detail: e.detail })); + + }; + + render(): TemplateResult { + + return html` + +
+ ${ this.filteredSources?.length ? this.filteredSources.map((source) => html` + + `) : html`

${this.textNoSearchResults}

` +} +
+`; + + } + + static get styles(): CSSResultArray { + + return [ + unsafeCSS(Theme), + css` + .sources { + width: calc(100% - ( 2 * var(--gap-small))); + display: flex; + flex-direction: column; + gap: var(--gap-normal); + align-items: center; + } + input { + width: calc(100% - ( 2 * ( var(--border-normal) + var(--gap-normal)))); + padding: var(--gap-normal); + margin: var(--gap-normal) 0; + } + source-item { + width: 100%; + } + `, + ]; + + } + +} + +export default SourceListComponent; diff --git a/packages/dgt-components/lib/components/source/source.component.ts b/packages/dgt-components/lib/components/source/source.component.ts new file mode 100644 index 00000000..0f774d38 --- /dev/null +++ b/packages/dgt-components/lib/components/source/source.component.ts @@ -0,0 +1,71 @@ +import { css, html, property, LitElement, unsafeCSS, TemplateResult, CSSResultArray } from 'lit-element'; +import { Theme } from '@digita-ai/dgt-theme'; +import { Source } from '../../models/source.model'; + +/** + * An Invite Source renders a source with which a user can connect. + */ +export class SourceComponent extends LitElement { + + @property({ type: Object }) + private source: Source; + + @property({ type: Boolean }) + private buttonEnabled: boolean; + + onSourceSelected = (): void => { + + this.dispatchEvent(new CustomEvent('source-selected', { detail: this.source })); + + }; + + render(): TemplateResult { + + return html` +
+ + ${this.source?.description} +
+ `; + + } + + static get styles(): CSSResultArray { + + return [ + unsafeCSS(Theme), + css` + .source-container { + box-shadow: 0px 2px 4px rgba(26, 32, 44, 0.1); + background-color: white; + display: flex; + flex-direction: row; + align-items: center; + width: 100%; + border-radius: var(--border-large); + padding: var(--gap-small); + } + + .source-container:hover { + cursor: pointer; + } + + img { + margin: var(--gap-small); + height: var(--font-size-header-normal); + width: var(--font-size-header-normal); + border-radius: 50%; + } + + span { + flex-grow: 1; + font-size: var(--font-size-header-normal); + } + `, + ]; + + } + +} + +export default SourceComponent; diff --git a/packages/dgt-components/lib/state/event.ts b/packages/dgt-components/lib/components/state/event.ts similarity index 100% rename from packages/dgt-components/lib/state/event.ts rename to packages/dgt-components/lib/components/state/event.ts diff --git a/packages/dgt-components/lib/state/schema.ts b/packages/dgt-components/lib/components/state/schema.ts similarity index 100% rename from packages/dgt-components/lib/state/schema.ts rename to packages/dgt-components/lib/components/state/schema.ts diff --git a/packages/dgt-components/lib/state/state.ts b/packages/dgt-components/lib/components/state/state.ts similarity index 100% rename from packages/dgt-components/lib/state/state.ts rename to packages/dgt-components/lib/components/state/state.ts diff --git a/packages/dgt-components/lib/index.ts b/packages/dgt-components/lib/index.ts index a8b92beb..96f00078 100644 --- a/packages/dgt-components/lib/index.ts +++ b/packages/dgt-components/lib/index.ts @@ -1,28 +1,28 @@ /** * Exports the modules of the package. */ -export * from './alerts/alert'; -export * from './alerts/alert.component'; -export * from './alerts/alert.component'; -export * from './base/base.component'; -export * from './cards/card.component'; -export * from './forms/form-element.component'; -export * from './forms/form-submitter'; -export * from './forms/form-validator-result'; -export * from './forms/form-validator'; -export * from './forms/form.machine'; -export * from './forms/form.events'; -export * from './list-item/list-item.component'; -export * from './profile/profile-contact.component'; -export * from './profile/profile-name.component'; -export * from './profile/profile-payslip.component'; -export * from './profile/credential.component'; -export * from './sidebar/sidebar.component'; -export * from './sidebar/sidebar-list-item.component'; -export * from './sidebar/sidebar-list.component'; -export * from './sidebar/sidebar-item.component'; -export * from './state/event'; -export * from './state/schema'; -export * from './state/state'; -export * from './header/content-header.component'; -export * from './separator/separator.component'; +export * from './components/alerts/alert'; +export * from './components/alerts/alert.component'; +export * from './components/alerts/alert.component'; +export * from './components/base/base.component'; +export * from './components/cards/card.component'; +export * from './components/forms/form-element.component'; +export * from './components/forms/form-submitter'; +export * from './components/forms/form-validator-result'; +export * from './components/forms/form-validator'; +export * from './components/forms/form.machine'; +export * from './components/forms/form.events'; +export * from './components/profile/profile-contact.component'; +export * from './components/profile/profile-name.component'; +export * from './components/profile/profile-payslip.component'; +export * from './components/profile/credential.component'; +export * from './components/sidebar/sidebar.component'; +export * from './components/sidebar/sidebar-list-item.component'; +export * from './components/sidebar/sidebar-list.component'; +export * from './components/sidebar/sidebar-item.component'; +export * from './components/state/event'; +export * from './components/state/schema'; +export * from './components/state/state'; +export * from './components/header/content-header.component'; +export * from './components/separator/separator.component'; +export * from './components/list-item/list-item.component'; diff --git a/packages/dgt-components/lib/models/holder.model.ts b/packages/dgt-components/lib/models/holder.model.ts new file mode 100644 index 00000000..7c0a4695 --- /dev/null +++ b/packages/dgt-components/lib/models/holder.model.ts @@ -0,0 +1,8 @@ +import { LDTriple } from './triple.model'; + +export interface Holder { + uri: string; + exchange?: string; + triples?: LDTriple[]; + shape?: string; +} diff --git a/packages/dgt-components/lib/models/invite.model.ts b/packages/dgt-components/lib/models/invite.model.ts new file mode 100644 index 00000000..094f1860 --- /dev/null +++ b/packages/dgt-components/lib/models/invite.model.ts @@ -0,0 +1,15 @@ +import { LDTriple } from './triple.model'; + +export interface Invite { + holder: string; + purpose: string; + state: 'not linked' | 'linking' | 'linked'; + created: string; + expires: string; + uri: string; + connection?: string; + accepted?: string; + shape?: string; + exchange?: string; + triples?: LDTriple[]; +} diff --git a/packages/dgt-components/lib/models/issuer.model.ts b/packages/dgt-components/lib/models/issuer.model.ts new file mode 100644 index 00000000..764446ad --- /dev/null +++ b/packages/dgt-components/lib/models/issuer.model.ts @@ -0,0 +1,5 @@ +export interface Issuer { + icon: string; + description: string; + uri: string; +} diff --git a/packages/dgt-components/lib/models/node.model.ts b/packages/dgt-components/lib/models/node.model.ts new file mode 100644 index 00000000..732616d9 --- /dev/null +++ b/packages/dgt-components/lib/models/node.model.ts @@ -0,0 +1,17 @@ + +export enum LDTermType { + LITERAL = 'literal', + REFERENCE = 'uri', +} + +export enum LDDataType { + DATETIME = 'http://www.w3.org/2001/XMLSchema#dateTime', + STRING = 'http://www.w3.org/2001/XMLSchema#string', + DECIMAL = 'http://www.w3.org/2001/XMLSchema#decimal', +} + +export interface LDNode { + dataType?: LDDataType; + termType: LDTermType; + value: any; +} diff --git a/packages/dgt-components/lib/models/predicate-translations.ts b/packages/dgt-components/lib/models/predicate-translations.ts new file mode 100644 index 00000000..224e0d43 --- /dev/null +++ b/packages/dgt-components/lib/models/predicate-translations.ts @@ -0,0 +1,27 @@ + +export const predicateTranslations: { [key: string]: string } = { + 'http://www.w3.org/2006/vcard/ns#hasAddress': 'Adress', + 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type': 'Type', + 'http://www.w3.org/2006/vcard/ns#street-address': 'Street Adress', + 'http://www.w3.org/2006/vcard/ns#postal-code': 'Postal Code', + 'http://www.w3.org/2006/vcard/ns#locality': 'Locality (city or town)', + 'http://xmlns.com/foaf/0.1/name': 'Name', + 'http://www.w3.org/2006/vcard/ns#fn': 'Formatted Name', + 'http://www.shopr.be/ns#points': 'Points', + 'http://www.w3.org/2006/vcard/ns#hasEmail': 'Email address', + 'http://www.w3.org/2006/vcard/ns#email': 'Email address', + 'http://www.w3.org/2006/vcard/ns#hasTelephone': 'Telephone number', + 'http://www.w3.org/2006/vcard/ns#telephone': 'Telephone number', + 'http://www.w3.org/2006/vcard/ns#value': 'Value', + 'https://schema.org/uri': 'Uri', + 'https://schema.org/hasCredential': 'Credential', + 'https://schema.org/EducationalOccupationalCredential': 'Educational or Occupational Credential', + 'http://digita.ai/voc/example#Certificate': 'Certificate', + 'http://digita.ai/voc/example#Diploma': 'Diploma', + 'http://xmlns.com/foaf/0.1/Document': 'Document', + 'http://xmlns.com/foaf/0.1/PersonalProfileDocument': 'Personal Profile Document', + 'http://xmlns.com/foaf/0.1/Image': 'Image', + 'http://www.w3.org/2006/vcard/ns#honorific-prefix': 'Honorific Prefix', + 'http://xmlns.com/foaf/0.1/nick': 'Nickname', + 'http://digita.ai/voc/events#event': 'Event', +}; diff --git a/packages/dgt-components/lib/models/profile.model.ts b/packages/dgt-components/lib/models/profile.model.ts new file mode 100644 index 00000000..6a152a5a --- /dev/null +++ b/packages/dgt-components/lib/models/profile.model.ts @@ -0,0 +1,5 @@ + +export interface Profile { + uri: string; + name: string; +} diff --git a/packages/dgt-components/lib/models/purpose.model.ts b/packages/dgt-components/lib/models/purpose.model.ts new file mode 100644 index 00000000..eff169c0 --- /dev/null +++ b/packages/dgt-components/lib/models/purpose.model.ts @@ -0,0 +1,12 @@ +import { LDTriple } from './triple.model'; + +export interface Purpose { + icon: string; + description: string; + predicates: string[]; + uri: string; + label?: string; + shape?: string; + exchange?: string; + triples?: LDTriple[]; +} diff --git a/packages/dgt-components/lib/models/session.model.ts b/packages/dgt-components/lib/models/session.model.ts new file mode 100644 index 00000000..179f5c76 --- /dev/null +++ b/packages/dgt-components/lib/models/session.model.ts @@ -0,0 +1,4 @@ + +export interface Session { + webId: string; +} diff --git a/packages/dgt-components/lib/models/source.model.ts b/packages/dgt-components/lib/models/source.model.ts new file mode 100644 index 00000000..081a9eaa --- /dev/null +++ b/packages/dgt-components/lib/models/source.model.ts @@ -0,0 +1,13 @@ +import { LDTriple } from './triple.model'; + +export interface Source { + icon: string; + description: string; + type: string; + configuration: unknown; + uri: string; + state?: 'prepared' | 'not prepared'; + exchange?: string; + triples?: LDTriple[]; + shape?: string; +} diff --git a/packages/dgt-components/lib/models/triple.model.ts b/packages/dgt-components/lib/models/triple.model.ts new file mode 100644 index 00000000..5b0b2246 --- /dev/null +++ b/packages/dgt-components/lib/models/triple.model.ts @@ -0,0 +1,7 @@ +import { LDNode } from './node.model'; + +export interface LDTriple { + predicate: string; + subject: LDNode; + object: LDNode; +} diff --git a/packages/dgt-components/lib/services/solid-sdk.service.ts b/packages/dgt-components/lib/services/solid-sdk.service.ts new file mode 100644 index 00000000..a8b725b9 --- /dev/null +++ b/packages/dgt-components/lib/services/solid-sdk.service.ts @@ -0,0 +1,268 @@ +import { login, getSolidDataset, handleIncomingRedirect, getThing, getUrlAll, logout, getStringNoLocale, Thing } from '@digita-ai/ui-transfer-solid-client'; +import { Session } from '../models/session.model'; +import { Profile } from '../models/profile.model'; +import { Issuer } from '../models/issuer.model'; +import { Source } from '../models/source.model'; +import { SolidService } from './solid.service'; + +/** + * An implementation of the Solid service which uses Solid Client. + */ +export class SolidSDKService implements SolidService { + + /** + * Instantiates a solid sdk service. + */ + constructor (private clientName: string) {} + + async validateIssuer(issuer: string): Promise { + + let openidConfig; + let poweredByHeader; + + try { + + const openidConfigResponse = await fetch(new URL('/.well-known/openid-configuration', issuer).toString()); + openidConfig = await openidConfigResponse.json(); + poweredByHeader = openidConfigResponse.headers.get('X-Powered-By'); + + } catch(e) { return false; } + + if ( + // Inrupt.net isn't (fully) Solid OIDC-compliant, therefore we check its X-Powered-By header + !openidConfig && (poweredByHeader.includes('solid') || openidConfig.solid_oidc_supported !== 'https://solidproject.org/TR/solid-oidc') + ) return false; + + return true; + + } + + /** + * Retrieves the value of the oidcIssuer triple from a profile document + * for a given WebID + * + * @param webId The WebID for which to retrieve the OIDC issuer + */ + async getIssuer(webId: string): Promise { return this.getIssuers(webId).then((issuers) => issuers[0]); } + + /** + * Retrieves the value of the oidcIssuer triple from a profile document + * for a given WebID + * + * @param webId The WebID for which to retrieve the OIDC issuers + */ + async getIssuers(webId: string): Promise { + + const responseHead = await fetch(webId, { method: 'HEAD' }); + + const poweredByHeader = responseHead.headers.get('X-Powered-By'); + + const profile = await this.profileThing(webId); + + // Gets the issuers from the user's profile. + const issuers: string[] = getUrlAll(profile, 'http://www.w3.org/ns/solid/terms#oidcIssuer'); + + const host = new URL(webId).origin; + + if (poweredByHeader?.includes('solid') && !issuers.includes(host)) { + + issuers.push(host); + + } + + // Check if the issuers are valid OIDC providers. + + const validationResults = await Promise.all(issuers.map(this.validateIssuer)); + + const validIssuers = issuers.filter((issuer, index) => validationResults[index]); + + if (!validIssuers || validIssuers.length === 0) { throw new Error(`No valid OIDC issuers for WebID: ${webId}`); } + + return Promise.all(validIssuers.map((iss) => { + + const url = new URL(iss).host.split('.'); + let description = (url.length > 2 ? url[1] : url[0]).split(':')[0]; + description = description.charAt(0).toUpperCase() + description.slice(1); + + const favicon = iss.endsWith('/') ? `${iss}favicon.ico` : `${iss}/favicon.ico`; + + return fetch(favicon).then((response) => { + + const icon = response.status === 200 ? favicon : 'https://www.donkey.bike/wp-content/uploads/2020/12/user-member-avatar-face-profile-icon-vector-22965342-300x300.jpg'; + + return { uri: iss, icon, description }; + + }); + + })); + + } + + async getSources(webId: string): Promise { + + const profile = await this.profileThing(webId); + + // Gets the sources from the user's profile. + const sources: string[] = getUrlAll(profile, 'http://www.w3.org/ns/solid/terms#account'); + + if (!sources || sources.length === 0) { throw new Error(`No sources for WebID: ${webId}`); } + + return Promise.all(sources.map((source) => { + + const url = new URL(source); + + const origin = url.origin; + + const host = url.host.split('.'); + + let description = (host.length > 2 ? host[1] : host[0]).split(':')[0]; + description = description.charAt(0).toUpperCase() + description.slice(1); + + const favicon = origin.endsWith('/') ? `${origin}favicon.ico` : `${origin}/favicon.ico`; + + return fetch(favicon).then((response) => { + + const icon = response.status === 200 ? favicon : 'https://www.donkey.bike/wp-content/uploads/2020/12/user-member-avatar-face-profile-icon-vector-22965342-300x300.jpg'; + + return { uri: source, icon, description, type: 'solid', configuration: {} }; + + }); + + })); + + } + + /** + * Handles the post-login logic, as well as the restoration + * of sessions on page refreshes + */ + async getSession(): Promise { + + const session = await handleIncomingRedirect({ restorePreviousSession: true }); + + return session && session.isLoggedIn ? { webId: session.webId } : Promise.reject(); + + } + + /** + * Redirects the user to their OIDC provider + */ + async login(webId: string): Promise { + + if (!webId) { + + throw new Error(`WebId should be set.: ${webId}`); + + } + + const issuer = await this.getIssuer(webId); + + if (!issuer) { + + throw new Error(`Issuer should be set.: ${issuer}`); + + } + + await login({ + oidcIssuer: issuer.uri, + redirectUrl: window.location.href, + clientName: this.clientName, + }); + + } + + /** + * Redirects the user to their OIDC provider + */ + async loginWithIssuer(issuer: Issuer): Promise { + + if (!issuer) { + + throw new Error(`Issuer should be set.: ${issuer}`); + + } + + await login({ + oidcIssuer: issuer.uri, + redirectUrl: window.location.href, + clientName: this.clientName, + }); + + } + + /** + * Deauthenticates the user from their OIDC issuer + */ + async logout(): Promise { + + return await logout(); + + } + + /** + * Retrieves the profile for the given WebID. + * + * @param webId The WebID for which to retrieve the profile. + */ + async getProfile(webId: string): Promise { + + const profile = await this.profileThing(webId); + + const name = getStringNoLocale(profile, 'http://xmlns.com/foaf/0.1/name'); + + return { uri: webId, name }; + + } + + private async profileThing(webId: string): Promise { + + if (!webId) { + + throw new Error(`WebId must be defined.`); + + } + + // Parse the user's WebID as a url. + try { + + new URL(webId); + + } catch { + + throw new Error(`Invalid WebId: ${webId}`); + + } + + let profileDataset; + + // Dereference the user's WebID to get the user's profile document. + try { + + profileDataset = await getSolidDataset(webId); + + } catch(e) { + + throw new Error(`No profile for WebId: ${webId}`); + + } + + if(!profileDataset) { + + throw new Error(`Could not read profile for WebId: ${webId}`); + + } + + // Parses the profile document. + const profile = getThing(profileDataset, webId); + + if(!profile) { + + throw new Error(`No profile info for WebId: ${webId}`); + + } + + return profile; + + } + +} diff --git a/packages/dgt-components/lib/services/solid.service.ts b/packages/dgt-components/lib/services/solid.service.ts new file mode 100644 index 00000000..593bcbea --- /dev/null +++ b/packages/dgt-components/lib/services/solid.service.ts @@ -0,0 +1,63 @@ +import { Session } from '../models/session.model'; +import { Profile } from '../models/profile.model'; +import { Issuer } from '../models/issuer.model'; +import { Source } from '../models/source.model'; + +/** + * Service for interacting with Solid pods + */ +export interface SolidService { + + /** + * Retrieves the value of a single oidcIssuer triple from a profile document + * for a given WebID + * + * @param webId The WebID for which to retrieve the OIDC issuer + */ + getIssuer(webId: string): Promise; + + /** + * Retrieves the value of the oidcIssuer triples from a profile document + * for a given WebID + * + * @param webId The WebID for which to retrieve the OIDC issuers + */ + getIssuers(webId: string): Promise; + + /** + * Retrieves the value of the account triples from a profile document + * for a given WebID + * + * @param webId The WebID for which to retrieve the OIDC issuers + */ + getSources(webId: string): Promise; + + /** + * Handles the post-login logic, as well as the restoration + * of sessions on page refreshes + */ + getSession(): Promise; + + /** + * Redirects the user to their OIDC provider + */ + login(webId: string): Promise; + + /** + * Redirects the user to their OIDC provider + */ + loginWithIssuer(issuer: Issuer): Promise; + + /** + * Deauthenticates the user from their OIDC issuer + */ + logout(): Promise; + + /** + * Retrieves the profile for the given WebID. + * + * @param webId The WebID for which to retrieve the profile. + */ + getProfile(webId: string): Promise; + +} diff --git a/packages/dgt-components/package-lock.json b/packages/dgt-components/package-lock.json index 1aa7fef3..dbe5b926 100644 --- a/packages/dgt-components/package-lock.json +++ b/packages/dgt-components/package-lock.json @@ -537,6 +537,17 @@ "@digita-ai/semcom-core": "0.4.1", "buffer": "6.0.3", "n3": "1.10.0" + }, + "dependencies": { + "n3": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.10.0.tgz", + "integrity": "sha512-y+qpS0GktEBttOaDR+BF1t1G2fw4Xn4nCZWNn+7MvEmD2I4YpMH6OJF/xHKSwInCxOC9vu9eI6pluB9/RDUyZQ==", + "requires": { + "queue-microtask": "^1.1.2", + "readable-stream": "^3.6.0" + } + } } }, "@digita-ai/typescript-config": { @@ -545,6 +556,16 @@ "integrity": "sha512-/hl2uGMPa1XvouKwjqSOBrX1zL5RArHf+3vFIU4nuqLM7IoX2telyvNA2Ej3zbuUS7rOTQW8dYi3j4LHnCvCxg==", "dev": true }, + "@digita-ai/ui-transfer-solid-client": { + "version": "0.7.6", + "resolved": "https://npm.pkg.github.com/download/@digita-ai/ui-transfer-solid-client/0.7.6/458d0470d4c1d59e8f33058576f96f768fae7f14f9cbba5985ef3e990f4c3ed5", + "integrity": "sha512-AAWkPB+g4alyuIIMhVnJ7oyy41jbiE9fg1LVJSgN6ANoSM9JZWU7fEnIxDKrQ1qBU+e4634Cq99lxrDiN3Zk6g==", + "requires": { + "@inrupt/solid-client": "1.6.1", + "@inrupt/solid-client-authn-browser": "1.8.0", + "rxjs": "^6.6.7" + } + }, "@eslint/eslintrc": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.1.tgz", @@ -573,6 +594,112 @@ } } }, + "@inrupt/jose-legacy-modules": { + "version": "0.0.3-3.15.4", + "resolved": "https://registry.npmjs.org/@inrupt/jose-legacy-modules/-/jose-legacy-modules-0.0.3-3.15.4.tgz", + "integrity": "sha512-gcmIqLLFyhNZWw9OKK3kNgEbpKU0z6kn6NPWQlJf0Dy5QtuIgwcS7aRU2GJScz+Dx9KGQVvyAapYX3buHyrBXw==", + "requires": { + "jose": "3.15.4" + }, + "dependencies": { + "jose": { + "version": "3.15.4", + "resolved": "https://registry.npmjs.org/jose/-/jose-3.15.4.tgz", + "integrity": "sha512-SXeGi+g5ZcNgV6o7f+Mx3Q1gaYMSBzAi3cmcZPxoeCEZPgfSCnnyfmMXzXoLDh+XL4KMtGvhOsYBoqQhnuR2rQ==" + } + } + }, + "@inrupt/oidc-client-ext": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/@inrupt/oidc-client-ext/-/oidc-client-ext-1.11.2.tgz", + "integrity": "sha512-htdqsFnLOSUhi+AkhyYCTA1vjUsZT8TeQOiXEtLDgneCRxwxCGfRwVSgXSC30OeophlgrZ7/QVixaz3BB5yXEA==", + "requires": { + "@inrupt/jose-legacy-modules": "0.0.3-3.15.4", + "@inrupt/solid-client-authn-core": "^1.11.2", + "@types/uuid": "^8.3.0", + "form-urlencoded": "~6.0.3", + "oidc-client": "^1.11.3", + "uuid": "^8.3.1" + }, + "dependencies": { + "form-urlencoded": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/form-urlencoded/-/form-urlencoded-6.0.4.tgz", + "integrity": "sha512-39GnqmnZkThJBXiKhBCrBGPKiwFHDgi3lcGO3SfURjXoz9x8quxNRTiIWViYN+QzQXxxl/uyKm+i+0PCj7Aqbw==" + } + } + }, + "@inrupt/solid-client": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@inrupt/solid-client/-/solid-client-1.6.1.tgz", + "integrity": "sha512-fTU30u73Re+vl7Rn4+U6jgodCtaLNGjlgLgiHivArsczApCf+fzh5MqD6uZlf0kRKsZpHm6q+7n5JRwBhOr/8Q==", + "requires": { + "@rdfjs/dataset": "^1.0.1", + "@types/n3": "^1.1.6", + "@types/rdf-js": "^4.0.0", + "@types/rdfjs__dataset": "^1.0.2", + "cross-fetch": "^3.0.4", + "http-link-header": "^1.0.2", + "n3": "1.8.1" + }, + "dependencies": { + "n3": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.8.1.tgz", + "integrity": "sha512-oS0XBNhHH+1TFByvJs84q2lsy3MqpkIeLNT8r9OPyblcvcQbZHcKspwdVcWWzNrlMpSHmbOG1KO5AbXy2++Csw==", + "requires": { + "queue-microtask": "^1.1.2", + "readable-stream": "^3.6.0" + } + } + } + }, + "@inrupt/solid-client-authn-browser": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@inrupt/solid-client-authn-browser/-/solid-client-authn-browser-1.8.0.tgz", + "integrity": "sha512-1zYE5mYzmgsZi9AOVmMAkCEXFXBOwGlOOG0p3vV4h2YnDC7YsP7cszQ3jfxwm4nnIEK+h9g3UjWKHevAKWAkzQ==", + "requires": { + "@inrupt/oidc-client-ext": "^1.8.0", + "@inrupt/solid-client-authn-core": "^1.8.0", + "@types/form-urlencoded": "^2.0.1", + "@types/lodash.clonedeep": "^4.5.6", + "@types/node": "^14.14.14", + "@types/uuid": "^8.3.0", + "assert": "^2.0.0", + "browserify-zlib": "^0.2.0", + "buffer": "^6.0.3", + "crypto-browserify": "^3.12.0", + "form-urlencoded": "^4.2.1", + "jose": "^2.0.2", + "lodash.clonedeep": "^4.5.0", + "os-browserify": "^0.3.0", + "reflect-metadata": "^0.1.13", + "stream-browserify": "^3.0.0", + "tsyringe": "^4.4.0", + "util": "^0.12.3", + "uuid": "^8.3.1" + } + }, + "@inrupt/solid-client-authn-core": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/@inrupt/solid-client-authn-core/-/solid-client-authn-core-1.11.2.tgz", + "integrity": "sha512-hL+BC81lE4V0EXZE8PJ418y/vFvW+rfcmHgHqi0ZKSSxLNVE08Ok4W2d+g6wcW3wyePZ9FOL2K8BIh7/jCGj8Q==", + "requires": { + "@inrupt/jose-legacy-modules": "0.0.3-3.15.4", + "@inrupt/solid-common-vocab": "^1.0.0", + "@types/lodash.clonedeep": "^4.5.6", + "@types/uuid": "^8.3.0", + "cross-fetch": "^3.0.6", + "events": "^3.3.0", + "lodash.clonedeep": "^4.5.0", + "uuid": "^8.3.1" + } + }, + "@inrupt/solid-common-vocab": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@inrupt/solid-common-vocab/-/solid-common-vocab-1.0.0.tgz", + "integrity": "sha512-LcImhJqqPsNl/OlULzEEK2rYevty0eh1zaOLVz3lnydEU1DQkeaJ8fKBxKdp5/QjCtnIYcaDjh5U11PGh29Dgg==" + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -809,6 +936,35 @@ } } }, + "@panva/asn1.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz", + "integrity": "sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==" + }, + "@rdfjs/data-model": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@rdfjs/data-model/-/data-model-1.3.3.tgz", + "integrity": "sha512-oo9U3nEowTxxML7CZybujL3e/bty4aXHDSWanWXQxfnJQYKU6p5SCgkjeRbuVfQ9lAVfdvz68Qq5D4LtGWuKug==", + "requires": { + "@types/rdf-js": "*" + } + }, + "@rdfjs/dataset": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@rdfjs/dataset/-/dataset-1.1.1.tgz", + "integrity": "sha512-BNwCSvG0cz0srsG5esq6CQKJc1m8g/M0DZpLuiEp0MMpfwguXX7VeS8TCg4UUG3DV/DqEvhy83ZKSEjdsYseeA==", + "requires": { + "@rdfjs/data-model": "^1.2.0" + } + }, + "@rdfjs/types": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rdfjs/types/-/types-1.0.1.tgz", + "integrity": "sha512-YxVkH0XrCNG3MWeZxfg596GFe+oorTVusmNxRP6ZHTsGczZ8AGvG3UchRNkg3Fy4MyysI7vBAA5YZbESL+VmHQ==", + "requires": { + "@types/node": "*" + } + }, "@rollup/plugin-commonjs": { "version": "20.0.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-20.0.0.tgz", @@ -944,6 +1100,11 @@ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, + "@types/form-urlencoded": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/form-urlencoded/-/form-urlencoded-2.0.1.tgz", + "integrity": "sha512-Kz3LwezuNvsQF8ZcswMv4b5ZhKmjTkH2Rxle6l/520Npvaxho6b4HN9lStp6HhGrZsL/rwJHpWK9vM1RA7uZbw==" + }, "@types/graceful-fs": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", @@ -987,21 +1148,32 @@ "pretty-format": "^26.0.0" } }, + "@types/lodash": { + "version": "4.14.175", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.175.tgz", + "integrity": "sha512-XmdEOrKQ8a1Y/yxQFOMbC47G/V2VDO1GvMRnl4O75M4GW/abC5tnfzadQYkqEveqRM1dEJGFFegfPNA2vvx2iw==" + }, + "@types/lodash.clonedeep": { + "version": "4.5.6", + "resolved": "https://registry.npmjs.org/@types/lodash.clonedeep/-/lodash.clonedeep-4.5.6.tgz", + "integrity": "sha512-cE1jYr2dEg1wBImvXlNtp0xDoS79rfEdGozQVgliDZj1uERH4k+rmEMTudP9b4VQ8O6nRb5gPqft0QzEQGMQgA==", + "requires": { + "@types/lodash": "*" + } + }, "@types/n3": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@types/n3/-/n3-1.8.0.tgz", - "integrity": "sha512-uyVeuz1TmdmKORidY0+hSfhonXgMk/hzpTnfZXG4HmQdXdykeoi7ohVxmAfYX21aaIcx9wJr1nqRN1griAOMPw==", - "dev": true, + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@types/n3/-/n3-1.10.3.tgz", + "integrity": "sha512-eVw/weCi6JPooPTz7Zgezmdw5ypNE57Ep+SlxFhT75F0nL9snsu1TIpAMAqtzHvi7VKJKJbnuOxAy9jgFCXDTA==", "requires": { "@types/node": "*", - "@types/rdf-js": "*" + "rdf-js": "^4.0.2" } }, "@types/node": { "version": "14.17.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.1.tgz", - "integrity": "sha512-/tpUyFD7meeooTRwl3sYlihx2BrJE7q9XF71EguPFIySj9B7qgnRtHsHTho+0AUm4m1SvWGm6uSncrR94q6Vtw==", - "dev": true + "integrity": "sha512-/tpUyFD7meeooTRwl3sYlihx2BrJE7q9XF71EguPFIySj9B7qgnRtHsHTho+0AUm4m1SvWGm6uSncrR94q6Vtw==" }, "@types/normalize-package-data": { "version": "2.4.0", @@ -1025,7 +1197,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-4.0.1.tgz", "integrity": "sha512-S+28+3RoFI+3arls7dS813gYnhb2HiyLX+gs00rgIvCzHU93DaYajhx4tyT+XEO8SjtzZw90OF4OVdYXBwbvkQ==", - "dev": true, "requires": { "@types/node": "*" }, @@ -1033,11 +1204,18 @@ "@types/node": { "version": "15.6.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-15.6.1.tgz", - "integrity": "sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA==", - "dev": true + "integrity": "sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA==" } } }, + "@types/rdfjs__dataset": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/rdfjs__dataset/-/rdfjs__dataset-1.0.5.tgz", + "integrity": "sha512-8OBC9Kr/ZSgNoUTe5mHTDPHaPt8Xen4XbYfqcbYv56d+4WdKliHXaFmFc0L4I5vsynE5JGu21Hvg2zWgX1Az6Q==", + "requires": { + "rdf-js": "^4.0.2" + } + }, "@types/stack-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz", @@ -1054,6 +1232,11 @@ "@types/jest": "*" } }, + "@types/uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg==" + }, "@types/yargs": { "version": "15.0.13", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz", @@ -1078,8 +1261,7 @@ "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" }, "acorn-globals": { "version": "6.0.0", @@ -1232,6 +1414,35 @@ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, + "assert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", + "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "requires": { + "es6-object-assign": "^1.1.0", + "is-nan": "^1.2.1", + "object-is": "^1.0.1", + "util": "^0.12.0" + } + }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -1256,6 +1467,11 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" + }, "babel-jest": { "version": "26.6.3", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz", @@ -1393,6 +1609,11 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1412,12 +1633,84 @@ "fill-range": "^7.0.1" } }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, "browser-process-hrtime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "requires": { + "pako": "~1.0.5" + } + }, "browserslist": { "version": "4.16.6", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", @@ -1464,6 +1757,11 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -1481,6 +1779,15 @@ "unset-value": "^1.0.0" } }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1530,6 +1837,15 @@ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "cjs-module-lexer": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz", @@ -1707,6 +2023,11 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, + "core-js": { + "version": "3.18.2", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.18.2.tgz", + "integrity": "sha512-zNhPOUoSgoizoSQFdX1MeZO16ORRb9FFQLts8gSYbZU5FcgXhp24iMWMxnOQo5uIaIG7/6FA/IqJPwev1o9ZXQ==" + }, "core-js-pure": { "version": "3.13.0", "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.13.0.tgz", @@ -1727,6 +2048,47 @@ "yaml": "^1.10.0" } }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -1737,8 +2099,6 @@ "version": "3.1.4", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz", "integrity": "sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ==", - "dev": true, - "optional": true, "requires": { "node-fetch": "2.6.1" } @@ -1754,6 +2114,29 @@ "which": "^2.0.1" } }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, "css": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", @@ -1865,6 +2248,14 @@ "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -1912,6 +2303,15 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, "detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -1930,6 +2330,23 @@ "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", "dev": true }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -1962,6 +2379,27 @@ "integrity": "sha512-vCMf4gDOpEylPSLPLSwAEsz+R3ShP02Y3cAKMZvTqule3XcPp7tgc/0ESI7IS6ZeyBlGClE50N53fIOkcIVnpw==", "dev": true }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "emittery": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz", @@ -2001,6 +2439,48 @@ "is-arrayish": "^0.2.1" } }, + "es-abstract": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", + "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=" + }, "esbuild": { "version": "0.12.20", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.20.tgz", @@ -2236,6 +2716,20 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "exec-sh": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.6.tgz", @@ -2558,6 +3052,11 @@ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, "form-data": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", @@ -2569,6 +3068,11 @@ "mime-types": "^2.1.12" } }, + "form-urlencoded": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/form-urlencoded/-/form-urlencoded-4.5.1.tgz", + "integrity": "sha512-Rkd/RdMaprsMJEGzEbxolwacp78WupH7u369KEyIY3pEZ1fhL6HtyQ1FX+4HSfA1VVhET18UwCUcr5DVaDIaqg==" + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -2594,8 +3098,7 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "functional-red-black-tree": { "version": "1.0.1", @@ -2615,6 +3118,16 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, "get-own-enumerable-property-symbols": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", @@ -2636,6 +3149,15 @@ "pump": "^3.0.0" } }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -2699,17 +3221,34 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "requires": { "function-bind": "^1.1.1" } }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "requires": { + "has-symbols": "^1.0.2" + } + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -2762,6 +3301,35 @@ } } }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -2783,6 +3351,11 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "http-link-header": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.0.3.tgz", + "integrity": "sha512-nARK1wSKoBBrtcoESlHBx36c1Ln/gnbNQi1eB6MeTUefJIT3NvUOsV15bClga0k38f0q/kN5xxrGSDS3EFnm9w==" + }, "http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -2877,6 +3450,16 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -2897,18 +3480,49 @@ } } }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" + }, "is-ci": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", @@ -2947,6 +3561,14 @@ } } }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -2997,6 +3619,14 @@ "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", @@ -3006,12 +3636,34 @@ "is-extglob": "^2.1.1" } }, + "is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-number-object": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", @@ -3042,18 +3694,60 @@ "@types/estree": "*" } }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "is-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", "dev": true }, + "is-shared-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", + "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==" + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.8.tgz", + "integrity": "sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.5", + "foreach": "^2.0.5", + "has-tostringtag": "^1.0.0" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -3066,6 +3760,14 @@ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, + "is-weakref": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", + "integrity": "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==", + "requires": { + "call-bind": "^1.0.0" + } + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -3825,6 +4527,14 @@ "supports-color": "^7.0.0" } }, + "jose": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/jose/-/jose-2.0.5.tgz", + "integrity": "sha512-BAiDNeDKTMgk4tvD0BbxJ8xHEHBZgpeRZ1zGPPsitSyMgjoMWiLGYAE7H7NpP5h0lPppQajQs871E8NHUrzVPA==", + "requires": { + "@panva/asn1.js": "^1.0.0" + } + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -4078,8 +4788,7 @@ "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, "lodash.merge": { "version": "4.6.2", @@ -4189,6 +4898,16 @@ "object-visit": "^1.0.0" } }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, "merge": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/merge/-/merge-2.1.1.tgz", @@ -4211,6 +4930,22 @@ "picomatch": "^2.2.3" } }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "mime-db": { "version": "1.47.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", @@ -4239,6 +4974,16 @@ "dev": true, "optional": true }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -4288,9 +5033,9 @@ "dev": true }, "n3": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/n3/-/n3-1.10.0.tgz", - "integrity": "sha512-y+qpS0GktEBttOaDR+BF1t1G2fw4Xn4nCZWNn+7MvEmD2I4YpMH6OJF/xHKSwInCxOC9vu9eI6pluB9/RDUyZQ==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.8.0.tgz", + "integrity": "sha512-/PEmoB3UJrG6aXGZenDHFBJtmPp2rtfB2YLzAm2dU9stInD+ztvy4fKv5fv2ggsrSlpu7BYDTsz/c6S391uuEg==", "requires": { "queue-microtask": "^1.1.2", "readable-stream": "^3.6.0" @@ -4336,9 +5081,7 @@ "node-fetch": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", - "dev": true, - "optional": true + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" }, "node-int64": { "version": "0.4.0", @@ -4453,6 +5196,25 @@ } } }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==" + }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -4462,6 +5224,17 @@ "isobject": "^3.0.0" } }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", @@ -4471,6 +5244,18 @@ "isobject": "^3.0.1" } }, + "oidc-client": { + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/oidc-client/-/oidc-client-1.11.5.tgz", + "integrity": "sha512-LcKrKC8Av0m/KD/4EFmo9Sg8fSQ+WFJWBrmtWd+tZkNn3WT/sQG3REmPANE9tzzhbjW6VkTNy4xhAXCfPApAOg==", + "requires": { + "acorn": "^7.4.1", + "base64-js": "^1.5.1", + "core-js": "^3.8.3", + "crypto-js": "^4.0.0", + "serialize-javascript": "^4.0.0" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4503,6 +5288,11 @@ "word-wrap": "^1.2.3" } }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + }, "p-each-series": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", @@ -4548,6 +5338,11 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4557,6 +5352,18 @@ "callsites": "^3.0.0" } }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, "parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -4611,6 +5418,18 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, + "pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "picomatch": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", @@ -4708,6 +5527,26 @@ "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -4729,6 +5568,31 @@ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "rdf-js": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rdf-js/-/rdf-js-4.0.2.tgz", + "integrity": "sha512-ApvlFa/WsQh8LpPK/6hctQwG06Z9ztQQGWVtrcrf9L6+sejHNXLPOqL+w7q3hF+iL0C4sv3AX1PUtGkLNzyZ0Q==", + "requires": { + "@rdfjs/types": "*" + } + }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -4787,6 +5651,11 @@ "strip-indent": "^3.0.0" } }, + "reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" + }, "regenerator-runtime": { "version": "0.13.7", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", @@ -4910,6 +5779,15 @@ "glob": "^7.1.3" } }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, "rollup": { "version": "2.56.2", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.56.2.tgz", @@ -4955,8 +5833,7 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sane": { "version": "4.1.0", @@ -5123,6 +6000,14 @@ "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", "dev": true }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "requires": { + "randombytes": "^2.1.0" + } + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -5152,6 +6037,15 @@ } } }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5174,6 +6068,16 @@ "dev": true, "optional": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -5463,6 +6367,15 @@ } } }, + "stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "requires": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, "string-argv": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", @@ -5490,6 +6403,24 @@ "strip-ansi": "^6.0.0" } }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -5768,6 +6699,14 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "tsyringe": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/tsyringe/-/tsyringe-4.6.0.tgz", + "integrity": "sha512-BMQAZamSfEmIQzH8WJeRu1yZGQbPSDuI9g+yEiKZFIcO46GPZuMOC2d0b52cVBdw1d++06JnDSIIZvEnogMdAw==", + "requires": { + "tslib": "^1.9.3" + } + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5804,6 +6743,17 @@ "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", "dev": true }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } + }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -5883,6 +6833,19 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, + "util": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", + "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -5891,9 +6854,7 @@ "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "optional": true + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, "v8-compile-cache": { "version": "2.3.0", @@ -6011,12 +6972,37 @@ "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "which-typed-array": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.7.tgz", + "integrity": "sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.5", + "foreach": "^2.0.5", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.7" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", diff --git a/packages/dgt-components/package.json b/packages/dgt-components/package.json index 3dd96868..02f1ec83 100644 --- a/packages/dgt-components/package.json +++ b/packages/dgt-components/package.json @@ -28,13 +28,14 @@ "posttest": "jest-coverage-thresholds-bumper --silent --coverage-summary-path coverage-summary.json" }, "dependencies": { + "@digita-ai/ui-transfer-solid-client": "0.7.6", "@digita-ai/dgt-theme": "0.6.1", "@digita-ai/dgt-utils": "0.6.1", "@digita-ai/semcom-core": "0.4.1", "@digita-ai/semcom-sdk": "0.4.1", "buffer": "6.0.3", "lit-element": "2.4.0", - "n3": "1.10.0", + "n3": "1.8.0", "rx-lit": "1.0.1", "rxjs": "^6.6.7", "xstate": "^4.25.0" @@ -45,7 +46,7 @@ "@originjs/vite-plugin-commonjs": "^1.0.0-beta7", "@rollup/plugin-commonjs": "^20.0.0", "@types/jest": "^26.0.23", - "@types/n3": "^1.8.0", + "@types/n3": "^1.10.3", "@types/node": "^14.14.44", "@types/rdf-js": "^4.0.1", "eslint": "^7.16.0", @@ -88,10 +89,10 @@ ], "coverageThreshold": { "global": { - "branches": 37.57, - "functions": 49.07, - "lines": 46.07, - "statements": 47.94 + "branches": 25.56, + "functions": 25.48, + "lines": 25.11, + "statements": 24.76 } }, "coveragePathIgnorePatterns": [ diff --git a/packages/dgt-components/tests/setup.ts b/packages/dgt-components/tests/setup.ts index 30493177..b64fe87f 100644 --- a/packages/dgt-components/tests/setup.ts +++ b/packages/dgt-components/tests/setup.ts @@ -1,12 +1,12 @@ -import { AlertComponent } from '../lib/alerts/alert.component'; -import { FormElementComponent } from '../lib/forms/form-element.component'; -import { SidebarListItemComponent } from '../lib/sidebar/sidebar-list-item.component'; -import { SidebarListComponent } from '../lib/sidebar/sidebar-list.component'; -import { ContentHeaderComponent } from '../lib/header/content-header.component'; -import { SidebarComponent } from '../lib/sidebar/sidebar.component'; -import { SidebarItemComponent } from '../lib/sidebar/sidebar-item.component'; -import { CardComponent } from '../lib/cards/card.component'; -import { ListItemComponent } from '../lib/list-item/list-item.component'; +import { AlertComponent } from '../lib/components/alerts/alert.component'; +import { FormElementComponent } from '../lib/components/forms/form-element.component'; +import { SidebarListItemComponent } from '../lib/components/sidebar/sidebar-list-item.component'; +import { SidebarListComponent } from '../lib/components/sidebar/sidebar-list.component'; +import { ContentHeaderComponent } from '../lib/components/header/content-header.component'; +import { SidebarComponent } from '../lib/components/sidebar/sidebar.component'; +import { SidebarItemComponent } from '../lib/components/sidebar/sidebar-item.component'; +import { CardComponent } from '../lib/components/cards/card.component'; +import { ListItemComponent } from '../lib/components/list-item/list-item.component'; /** * Register tags for components. diff --git a/packages/dgt-components/vite.config.ts b/packages/dgt-components/vite.config.ts index 6b5a2b2a..9b40efbd 100644 --- a/packages/dgt-components/vite.config.ts +++ b/packages/dgt-components/vite.config.ts @@ -27,7 +27,7 @@ export default ({ command, mode }) => { }, rollupOptions: { input: { - profileName: resolve(__dirname, 'lib/profile/profile-name.component.ts'), + profileName: resolve(__dirname, 'lib/components/profile/profile-name.component.ts'), }, output: [ { diff --git a/packages/dgt-theme/lib/icons/Location.svg b/packages/dgt-theme/lib/icons/Location.svg new file mode 100644 index 00000000..0d46a8fb --- /dev/null +++ b/packages/dgt-theme/lib/icons/Location.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/dgt-theme/lib/index.ts b/packages/dgt-theme/lib/index.ts index 8c128855..6b8bf4fe 100644 --- a/packages/dgt-theme/lib/index.ts +++ b/packages/dgt-theme/lib/index.ts @@ -25,6 +25,7 @@ export { default as Picture } from './icons/Picture.svg?raw'; export { default as Podspaces } from './icons/Podspaces.svg?raw'; export { default as Doccle } from './icons/Doccle.svg?raw'; export { default as Vault } from './icons/vault.svg'; +export { default as Location } from './icons/Location.svg?raw'; /** * Export theme