solid-ui 2.4.16-29d82bfe → 2.4.16-520c493e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/acl/acl.d.ts.map +1 -1
- package/lib/acl/acl.js +4 -2
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.d.ts.map +1 -1
- package/lib/acl/add-agent-buttons.js +5 -5
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/authn/authSession.d.ts +4 -0
- package/lib/authn/authSession.d.ts.map +1 -0
- package/lib/authn/authSession.js +25 -0
- package/lib/authn/authSession.js.map +1 -0
- package/lib/authn/authn.d.ts +193 -0
- package/lib/authn/authn.d.ts.map +1 -0
- package/lib/authn/authn.js +2238 -0
- package/lib/authn/authn.js.map +1 -0
- package/lib/{signup → authn}/config-default.js +0 -0
- package/lib/authn/config-default.js.map +1 -0
- package/lib/authn/index.d.ts +35 -0
- package/lib/authn/index.d.ts.map +1 -0
- package/lib/authn/index.js +44 -0
- package/lib/authn/index.js.map +1 -0
- package/lib/{signup → authn}/signup.js +0 -0
- package/lib/authn/signup.js.map +1 -0
- package/lib/authn/types.d.ts +25 -0
- package/lib/authn/types.d.ts.map +1 -0
- package/lib/authn/types.js +6 -0
- package/lib/authn/types.js.map +1 -0
- package/lib/chat/bookmarks.js +22 -20
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +15 -13
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js +10 -10
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js +16 -14
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/message.js +21 -17
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js +21 -16
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/thread.js +24 -24
- package/lib/chat/thread.js.map +1 -1
- package/lib/create/create.d.ts.map +1 -1
- package/lib/create/create.js +9 -9
- package/lib/create/create.js.map +1 -1
- package/lib/folders.js +6 -2
- package/lib/folders.js.map +1 -1
- package/lib/footer/index.js +4 -4
- package/lib/footer/index.js.map +1 -1
- package/lib/header/index.d.ts.map +1 -1
- package/lib/header/index.js +8 -11
- package/lib/header/index.js.map +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +34 -27
- package/lib/index.js.map +1 -1
- package/lib/logic.d.ts +3 -3
- package/lib/logic.d.ts.map +1 -1
- package/lib/logic.js +5 -3
- package/lib/logic.js.map +1 -1
- package/lib/matrix/matrix.js +2 -2
- package/lib/matrix/matrix.js.map +1 -1
- package/lib/messageArea.js +10 -9
- package/lib/messageArea.js.map +1 -1
- package/lib/pad.js +2 -2
- package/lib/pad.js.map +1 -1
- package/lib/participation.js +5 -4
- package/lib/participation.js.map +1 -1
- package/lib/preferences.js +8 -8
- package/lib/preferences.js.map +1 -1
- package/lib/table.js +3 -2
- package/lib/table.js.map +1 -1
- package/lib/tabs.js +3 -3
- package/lib/tabs.js.map +1 -1
- package/lib/utils/index.js +6 -6
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/label.js +4 -4
- package/lib/utils/label.js.map +1 -1
- package/lib/versionInfo.js +2 -2
- package/lib/versionInfo.js.map +1 -1
- package/lib/webpack-bundle.js +84849 -68473
- package/lib/webpack-bundle.js.map +1 -1
- package/lib/widgets/buttons.js +16 -16
- package/lib/widgets/buttons.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteBar.js +2 -2
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteField.js +2 -2
- package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +2 -2
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js +11 -6
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.d.ts +1 -1
- package/lib/widgets/forms/autocomplete/publicData.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js +22 -14
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/lib/widgets/forms/basic.d.ts +1 -1
- package/lib/widgets/forms/basic.d.ts.map +1 -1
- package/lib/widgets/forms/basic.js +2 -2
- package/lib/widgets/forms/basic.js.map +1 -1
- package/lib/widgets/forms/comment.d.ts +1 -1
- package/lib/widgets/forms/comment.js +3 -3
- package/lib/widgets/forms/comment.js.map +1 -1
- package/lib/widgets/forms/fieldFunction.js +2 -2
- package/lib/widgets/forms/fieldFunction.js.map +1 -1
- package/lib/widgets/forms/formStyle.js +3 -3
- package/lib/widgets/forms/formStyle.js.map +1 -1
- package/lib/widgets/forms.js +10 -10
- package/lib/widgets/forms.js.map +1 -1
- package/lib/widgets/peoplePicker.js +2 -2
- package/lib/widgets/peoplePicker.js.map +1 -1
- package/package.json +2 -2
- package/lib/login/login.d.ts +0 -130
- package/lib/login/login.d.ts.map +0 -1
- package/lib/login/login.js +0 -1412
- package/lib/login/login.js.map +0 -1
- package/lib/signup/config-default.js.map +0 -1
- package/lib/signup/signup.js.map +0 -1
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signing in, signing up, profile and preferences reloading
|
|
3
|
+
* Type index management
|
|
4
|
+
*
|
|
5
|
+
* Many functions in this module take a context object which
|
|
6
|
+
* holds various RDF symbols, add to it, and return a promise of it.
|
|
7
|
+
*
|
|
8
|
+
* * `me` RDF symbol for the user's WebID
|
|
9
|
+
* * `publicProfile` The user's public profile, iff loaded
|
|
10
|
+
* * `preferencesFile` The user's personal preference file, iff loaded
|
|
11
|
+
* * `index.public` The user's public type index file
|
|
12
|
+
* * `index.private` The user's private type index file
|
|
13
|
+
*
|
|
14
|
+
* Not RDF symbols:
|
|
15
|
+
* * `noun` A string in english for the type of thing -- like "address book"
|
|
16
|
+
* * `instance` An array of nodes which are existing instances
|
|
17
|
+
* * `containers` An array of nodes of containers of instances
|
|
18
|
+
* * `div` A DOM element where UI can be displayed
|
|
19
|
+
* * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages
|
|
20
|
+
* @packageDocumentation
|
|
21
|
+
*/
|
|
22
|
+
import { NamedNode } from 'rdflib';
|
|
23
|
+
import { PaneDefinition } from 'pane-registry';
|
|
24
|
+
import { AppDetails, AuthenticationContext } from './types';
|
|
25
|
+
export declare const authSession: import("@inrupt/solid-client-authn-browser").Session;
|
|
26
|
+
/**
|
|
27
|
+
* Look for and load the User who has control over it
|
|
28
|
+
*/
|
|
29
|
+
export declare function findOriginOwner(doc: NamedNode | string): string | boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Saves `webId` in `context.me`
|
|
32
|
+
* @param webId
|
|
33
|
+
* @param context
|
|
34
|
+
*
|
|
35
|
+
* @returns Returns the WebID, after setting it
|
|
36
|
+
*/
|
|
37
|
+
export declare function saveUser(webId: NamedNode | string | null, context?: AuthenticationContext): NamedNode | null;
|
|
38
|
+
/**
|
|
39
|
+
* Wrapper around [[offlineTestID]]
|
|
40
|
+
* @returns {NamedNode|null}
|
|
41
|
+
*/
|
|
42
|
+
export declare function defaultTestUser(): NamedNode | null;
|
|
43
|
+
/**
|
|
44
|
+
* Checks synchronously whether user is logged in
|
|
45
|
+
*
|
|
46
|
+
* @returns Named Node or null
|
|
47
|
+
*/
|
|
48
|
+
export declare function currentUser(): NamedNode | null;
|
|
49
|
+
/**
|
|
50
|
+
* Resolves with the logged in user's WebID
|
|
51
|
+
*
|
|
52
|
+
* @param context
|
|
53
|
+
*/
|
|
54
|
+
export declare function logIn(context: AuthenticationContext): Promise<AuthenticationContext>;
|
|
55
|
+
/**
|
|
56
|
+
* Logs the user in and loads their WebID profile document into the store
|
|
57
|
+
*
|
|
58
|
+
* @param context
|
|
59
|
+
*
|
|
60
|
+
* @returns Resolves with the context after login / fetch
|
|
61
|
+
*/
|
|
62
|
+
export declare function logInLoadProfile(context: AuthenticationContext): Promise<AuthenticationContext>;
|
|
63
|
+
/**
|
|
64
|
+
* Loads preference file
|
|
65
|
+
* Do this after having done log in and load profile
|
|
66
|
+
*
|
|
67
|
+
* @private
|
|
68
|
+
*
|
|
69
|
+
* @param context
|
|
70
|
+
*/
|
|
71
|
+
export declare function logInLoadPreferences(context: AuthenticationContext): Promise<AuthenticationContext>;
|
|
72
|
+
export declare function loadTypeIndexes(context: AuthenticationContext): Promise<AuthenticationContext>;
|
|
73
|
+
/**
|
|
74
|
+
* Returns promise of context with arrays of symbols
|
|
75
|
+
*
|
|
76
|
+
* 2016-12-11 change to include forClass arc a la
|
|
77
|
+
* https://github.com/solid/solid/blob/main/proposals/data-discovery.md
|
|
78
|
+
*/
|
|
79
|
+
export declare function findAppInstances(context: AuthenticationContext, theClass: NamedNode, isPublic?: boolean): Promise<AuthenticationContext>;
|
|
80
|
+
/**
|
|
81
|
+
* Register a new app in a type index
|
|
82
|
+
*/
|
|
83
|
+
export declare function registerInTypeIndex(context: AuthenticationContext, instance: NamedNode, theClass: NamedNode, isPublic: boolean): Promise<AuthenticationContext>;
|
|
84
|
+
/**
|
|
85
|
+
* UI to control registration of instance
|
|
86
|
+
*/
|
|
87
|
+
export declare function registrationControl(context: AuthenticationContext, instance: any, theClass: any): Promise<AuthenticationContext | void>;
|
|
88
|
+
/**
|
|
89
|
+
* UI to List at all registered things
|
|
90
|
+
*/
|
|
91
|
+
export declare function registrationList(context: AuthenticationContext, options: {
|
|
92
|
+
private?: boolean;
|
|
93
|
+
public?: boolean;
|
|
94
|
+
type?: NamedNode;
|
|
95
|
+
}): Promise<AuthenticationContext>;
|
|
96
|
+
/**
|
|
97
|
+
* Simple Access Control
|
|
98
|
+
*
|
|
99
|
+
* This function sets up a simple default ACL for a resource, with
|
|
100
|
+
* RWC for the owner, and a specified access (default none) for the public.
|
|
101
|
+
* In all cases owner has read write control.
|
|
102
|
+
* Parameter lists modes allowed to public
|
|
103
|
+
*
|
|
104
|
+
* @param options
|
|
105
|
+
* @param options.public eg ['Read', 'Write']
|
|
106
|
+
*
|
|
107
|
+
* @returns Resolves with aclDoc uri on successful write
|
|
108
|
+
*/
|
|
109
|
+
export declare function setACLUserPublic(docURI: string, me: NamedNode, options: {
|
|
110
|
+
defaultForNew?: boolean;
|
|
111
|
+
public?: [];
|
|
112
|
+
}): Promise<NamedNode>;
|
|
113
|
+
/**
|
|
114
|
+
* Returns `sym($SolidTestEnvironment.username)` if
|
|
115
|
+
* `$SolidTestEnvironment.username` is defined as a global
|
|
116
|
+
* @returns {NamedNode|null}
|
|
117
|
+
*/
|
|
118
|
+
export declare function offlineTestID(): NamedNode | null;
|
|
119
|
+
export declare function renderSignInPopup(dom: HTMLDocument): void;
|
|
120
|
+
/**
|
|
121
|
+
* @returns {Promise<string|null>} Resolves with WebID URI or null
|
|
122
|
+
*/
|
|
123
|
+
/**
|
|
124
|
+
* Retrieves currently logged in webId from either
|
|
125
|
+
* defaultTestUser or SolidAuth
|
|
126
|
+
* @param [setUserCallback] Optional callback
|
|
127
|
+
*
|
|
128
|
+
* @returns Resolves with webId uri, if no callback provided
|
|
129
|
+
*/
|
|
130
|
+
export declare function checkUser<T>(setUserCallback?: (me: NamedNode | null) => T): Promise<NamedNode | T | null>;
|
|
131
|
+
/**
|
|
132
|
+
* Login status box
|
|
133
|
+
*
|
|
134
|
+
* A big sign-up/sign in box or a logout box depending on the state
|
|
135
|
+
*
|
|
136
|
+
* @param dom
|
|
137
|
+
* @param listener
|
|
138
|
+
*
|
|
139
|
+
* @returns
|
|
140
|
+
*/
|
|
141
|
+
export declare function loginStatusBox(dom: HTMLDocument, listener?: ((uri: string | null) => void) | null, options?: {
|
|
142
|
+
buttonStyle?: string;
|
|
143
|
+
}): HTMLElement;
|
|
144
|
+
/**
|
|
145
|
+
* Workspace selection etc
|
|
146
|
+
* See https://github.com/solid/userguide/issues/16
|
|
147
|
+
*/
|
|
148
|
+
/**
|
|
149
|
+
* Returns a UI object which, if it selects a workspace,
|
|
150
|
+
* will callback(workspace, newBase).
|
|
151
|
+
* See https://github.com/solid/userguide/issues/16 for more info on workspaces.
|
|
152
|
+
*
|
|
153
|
+
* If necessary, will get an account, preference file, etc. In sequence:
|
|
154
|
+
*
|
|
155
|
+
* - If not logged in, log in.
|
|
156
|
+
* - Load preference file
|
|
157
|
+
* - Prompt user for workspaces
|
|
158
|
+
* - Allows the user to just type in a URI by hand
|
|
159
|
+
*
|
|
160
|
+
* Calls back with the workspace and the base URI
|
|
161
|
+
*
|
|
162
|
+
* @param dom
|
|
163
|
+
* @param appDetails
|
|
164
|
+
* @param callbackWS
|
|
165
|
+
*/
|
|
166
|
+
export declare function selectWorkspace(dom: HTMLDocument, appDetails: AppDetails, callbackWS: (workspace: string | null, newBase: string) => void): HTMLElement;
|
|
167
|
+
/**
|
|
168
|
+
* Creates a new instance of an app.
|
|
169
|
+
*
|
|
170
|
+
* An instance of an app could be e.g. an issue tracker for a given project,
|
|
171
|
+
* or a chess game, or calendar, or a health/fitness record for a person.
|
|
172
|
+
*
|
|
173
|
+
* Note that this use of the term 'app' refers more to entries in the user's
|
|
174
|
+
* type index than to actual software applications that use the personal data
|
|
175
|
+
* to which these entries point.
|
|
176
|
+
*
|
|
177
|
+
* @param dom
|
|
178
|
+
* @param appDetails
|
|
179
|
+
* @param callback
|
|
180
|
+
*
|
|
181
|
+
* @returns A div with a button in it for making a new app instance
|
|
182
|
+
*/
|
|
183
|
+
export declare function newAppInstance(dom: HTMLDocument, appDetails: AppDetails, callback: (workspace: string | null, newBase: string) => void): HTMLElement;
|
|
184
|
+
/**
|
|
185
|
+
* Retrieves whether the currently logged in user is a power user
|
|
186
|
+
* and/or a developer
|
|
187
|
+
*/
|
|
188
|
+
export declare function getUserRoles(): Promise<Array<NamedNode>>;
|
|
189
|
+
/**
|
|
190
|
+
* Filters which panes should be available, based on the result of [[getUserRoles]]
|
|
191
|
+
*/
|
|
192
|
+
export declare function filterAvailablePanes(panes: Array<PaneDefinition>): Promise<Array<PaneDefinition>>;
|
|
193
|
+
//# sourceMappingURL=authn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authn.d.ts","sourceRoot":"","sources":["../../src/authn/authn.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAoB,SAAS,EAAuD,MAAM,QAAQ,CAAA;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAO9C,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAU3D,eAAO,MAAM,WAAW,sDAAoB,CAAA;AAuB5C;;GAEG;AACH,wBAAgB,eAAe,CAAE,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAQ1E;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,EAChC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,SAAS,GAAG,IAAI,CAYlB;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAK,SAAS,GAAG,IAAI,CASnD;AA+BD;;;;GAIG;AACH,wBAAgB,WAAW,IAAK,SAAS,GAAG,IAAI,CAU/C;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA2BrF;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAoBtG;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA4D1G;AAwBD,wBAAsB,eAAe,CAAE,OAAO,EAAE,qBAAqB,kCAWpE;AAuFD;;;;;GAKG;AACH,w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