Skip to content

Commit 72f773b

Browse files
committed
Merge branch 'main' into updateNodeVersion
2 parents 1e55b27 + 0533393 commit 72f773b

17 files changed

Lines changed: 769 additions & 833 deletions

File tree

.storybook/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ module.exports = {
44
],
55
addons: [
66
"@storybook/addon-links",
7-
"@storybook/addon-essentials",
8-
"@storybook/addon-postcss"
7+
"@storybook/addon-essentials"
98
],
109
webpackFinal: async (config) => {
1110
config.externals = {

package-lock.json

Lines changed: 580 additions & 681 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
"mime-types": "^2.1.34",
6363
"pane-registry": "^2.4.7",
6464
"path-browserify": "^1.0.1",
65-
"postcss-flexbugs-fixes": "^5.0.2",
6665
"rdflib": "^2.2.17",
6766
"solid-logic": "^1.3.14",
6867
"solid-namespace": "^0.5.2",
@@ -81,7 +80,6 @@
8180
"@storybook/addon-actions": "^6.4.9",
8281
"@storybook/addon-essentials": "^6.4.9",
8382
"@storybook/addon-links": "^6.4.9",
84-
"@storybook/addon-postcss": "^2.0.0",
8583
"@storybook/html": "^6.4.9",
8684
"@testing-library/dom": "^8.11.1",
8785
"@testing-library/user-event": "^13.5.0",
@@ -90,7 +88,6 @@
9088
"@types/node": "^17.0.5",
9189
"@typescript-eslint/eslint-plugin": "^5.8.0",
9290
"@typescript-eslint/parser": "^5.8.0",
93-
"autoprefixer": "^10.4.0",
9491
"babel-loader": "^8.2.3",
9592
"eslint": "^7.32.0",
9693
"eslint-config-standard": "^16.0.3",
@@ -105,7 +102,6 @@
105102
"jsdom": "^19.0.0",
106103
"lint-staged": "^12.1.4",
107104
"nock": "^13.2.1",
108-
"postcss-flexbugs-fixes": "^5.0.2",
109105
"raw-loader": "^4.0.2",
110106
"react": "^17.0.2",
111107
"react-dom": "^17.0.2",

postcss.config.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/acl/access-groups.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @packageDocumentation
55
*/
66

7-
import { NamedNode, sym, LiveStore } from 'rdflib'
7+
import { NamedNode, sym, Store } from 'rdflib'
88
import { ACLbyCombination, readACL } from './acl'
99
import * as widgets from '../widgets'
1010
import * as ns from '../ns'
@@ -58,13 +58,13 @@ export class AccessGroups {
5858
public aclMap: AgentMapMap
5959
private readonly addAgentButton: AddAgentButtons
6060
private readonly rootElement: HTMLElement
61-
private _store: LiveStore
61+
private _store: Store // @@ was LiveStore but does not need to be connected to web
6262

6363
constructor (
6464
private doc: NamedNode,
6565
private aclDoc: NamedNode,
6666
public controller: AccessController,
67-
store: LiveStore,
67+
store: Store, // @@ was LiveStore
6868
private options: AccessGroupsOptions = {}
6969
) {
7070
this.defaults = options.defaults || false

src/acl/acl-control.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import * as ns from '../ns'
99
import * as utils from '../utils'
1010
import { getACLorDefault, getProspectiveHolder } from './acl'
11-
import { IndexedFormula, NamedNode } from 'rdflib'
11+
import { Store, NamedNode } from 'rdflib'
1212
import { DataBrowserContext } from 'pane-registry'
1313
import { AccessController } from './access-controller'
1414
import { getClasses } from '../jss'
@@ -126,7 +126,7 @@ export function ACLControlBox5 (
126126
subject: NamedNode,
127127
context: DataBrowserContext,
128128
noun: string,
129-
kb: IndexedFormula
129+
kb: Store
130130
): HTMLElement {
131131
const dom = context.dom
132132
const doc = subject.doc() // The ACL is actually to the doc describing the thing
@@ -154,7 +154,7 @@ export function ACLControlBox5 (
154154

155155
async function loadController (
156156
doc: NamedNode,
157-
kb: IndexedFormula,
157+
kb: Store,
158158
subject: NamedNode,
159159
noun: string,
160160
context: DataBrowserContext,
@@ -200,7 +200,7 @@ function getDirectory (doc: NamedNode): string | null {
200200
return (q >= 0 && p < q + 2) || p < 0 ? null : str.slice(0, p + 1)
201201
}
202202

203-
function isStorage (doc: NamedNode, aclDoc: NamedNode, store: IndexedFormula): boolean {
203+
function isStorage (doc: NamedNode, aclDoc: NamedNode, store: Store): boolean {
204204
// @@ TODO: The methods used for targetIsStorage are HACKs - it should not be relied upon, and work is
205205
// @@ underway to standardize a behavior that does not rely upon this hack
206206
// @@ hopefully fixed as part of https://github.com/solid/data-interoperability-panel/issues/10

src/acl/acl.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { solidLogicSingleton, ACL_LINK } from 'solid-logic'
1010
import * as utils from '../utils'
1111
import { AgentMapMap, AgentMapUnion, ComboList } from './types'
1212
import * as debug from '../debug'
13-
import { graph, IndexedFormula, NamedNode, serialize, st, Statement, sym, LiveStore } from 'rdflib'
13+
import { graph, Store, NamedNode, serialize, st, Statement, sym, LiveStore } from 'rdflib'
1414

1515
const kb = solidLogicSingleton.store
1616

@@ -25,7 +25,7 @@ export function adoptACLDefault (
2525
aclDoc: NamedNode,
2626
defaultResource: NamedNode,
2727
defaultACLDoc: NamedNode
28-
): IndexedFormula {
28+
): Store {
2929
const ACL = ns.acl
3030
const isContainer = doc.uri.slice(-1) === '/' // Give default for all directories
3131

@@ -46,7 +46,7 @@ export function adoptACLDefault (
4646

4747
const kb2 = graph() // Potential - derived is kept apart
4848
proposed.forEach(st => kb2.add(move(st.subject), move(st.predicate), move(st.object), sym(aclDoc.uri)))
49-
return kb2
49+
return kb2 as LiveStore
5050

5151
function move (symbol) {
5252
const y = defaultACLDoc.uri.length // The default ACL file
@@ -66,7 +66,7 @@ export function adoptACLDefault (
6666
export function readACL (
6767
doc: NamedNode,
6868
aclDoc: NamedNode,
69-
kb2: IndexedFormula = kb,
69+
kb2: Store = kb,
7070
getDefaults: boolean = false
7171
): AgentMapMap {
7272
const auths: Array<NamedNode> = getDefaults
@@ -211,7 +211,7 @@ export function ACLbyCombination (ac: AgentMapMap | AgentMapUnion): ComboList {
211211
/**
212212
* Write ACL graph to store from AC
213213
*/
214-
export function makeACLGraph (kb: IndexedFormula, x: NamedNode, ac: AgentMapMap, aclDoc: NamedNode): void {
214+
export function makeACLGraph (kb: Store, x: NamedNode, ac: AgentMapMap, aclDoc: NamedNode): void {
215215
const byCombo = ACLbyCombination(ac)
216216
return makeACLGraphbyCombo(kb, x, byCombo, aclDoc)
217217
}
@@ -220,7 +220,7 @@ export function makeACLGraph (kb: IndexedFormula, x: NamedNode, ac: AgentMapMap,
220220
* Write ACL graph to store from combo
221221
*/
222222
export function makeACLGraphbyCombo (
223-
kb: IndexedFormula,
223+
kb: Store,
224224
x: NamedNode,
225225
byCombo: ComboList,
226226
aclDoc: NamedNode,

src/footer/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
This file was copied from mashlib/src/global/footer.ts file. It is modified to
33
work in solid-ui by adjusting where imported functions are found.
44
*/
5-
import { IndexedFormula, NamedNode } from 'rdflib'
5+
import { LiveStore, NamedNode } from 'rdflib'
66
import { authn, authSession } from 'solid-logic'
77
import { addStyleClassToElement, getName, getPod, getPodOwner } from '../utils/headerFooterHelpers'
88

@@ -22,7 +22,7 @@ export type FooterOptions = {
2222
* @param store the data store
2323
* @returns the footer
2424
*/
25-
export async function initFooter (store: IndexedFormula, options?: FooterOptions) {
25+
export async function initFooter (store: LiveStore, options?: FooterOptions) {
2626
const footer = document.getElementById('PageFooter')
2727
if (!footer) {
2828
return
@@ -36,7 +36,7 @@ export async function initFooter (store: IndexedFormula, options?: FooterOptions
3636
/**
3737
* @ignore exporting this only for the unit test
3838
*/
39-
export function rebuildFooter (footer: HTMLElement, store: IndexedFormula, pod: NamedNode | null, podOwner: NamedNode | null, options?: FooterOptions) {
39+
export function rebuildFooter (footer: HTMLElement, store: LiveStore, pod: NamedNode | null, podOwner: NamedNode | null, options?: FooterOptions) {
4040
return async () => {
4141
const user = authn.currentUser()
4242
footer.innerHTML = ''
@@ -46,7 +46,7 @@ export function rebuildFooter (footer: HTMLElement, store: IndexedFormula, pod:
4646
/**
4747
* @ignore exporting this only for the unit test
4848
*/
49-
export function createControllerInfoBlock (store: IndexedFormula, user: NamedNode | null, pod: NamedNode | null, podOwner: NamedNode | null, options?: FooterOptions): HTMLElement {
49+
export function createControllerInfoBlock (store: LiveStore, user: NamedNode | null, pod: NamedNode | null, podOwner: NamedNode | null, options?: FooterOptions): HTMLElement {
5050
const profileLinkContainer = document.createElement('div')
5151
if (!pod || !podOwner || (user && user.equals(podOwner))) {
5252
return profileLinkContainer

0 commit comments

Comments
 (0)