44 * @packageDocumentation
55 */
66
7- import { IndexedFormula , NamedNode , sym } from 'rdflib'
7+ import { fetcher , IndexedFormula , NamedNode , sym , UpdateManager } from 'rdflib'
88import { ACLbyCombination , readACL } from './acl'
99import widgets from '../widgets'
1010import ns from '../ns'
1111import { AccessController } from './access-controller'
1212import { AgentMapMap , ComboList , PartialAgentTriple } from './types'
1313import { AddAgentButtons } from './add-agent-buttons'
1414import * as debug from '../debug'
15+ import { LiveStore } from 'pane-registry'
1516
1617const ACL = ns . acl
1718
@@ -58,7 +59,7 @@ export class AccessGroups {
5859 public aclMap : AgentMapMap
5960 private readonly addAgentButton : AddAgentButtons
6061 private readonly rootElement : HTMLElement
61- private _store : IndexedFormula
62+ private _store : LiveStore
6263
6364 constructor (
6465 private doc : NamedNode ,
@@ -68,7 +69,9 @@ export class AccessGroups {
6869 private options : AccessGroupsOptions = { }
6970 ) {
7071 this . defaults = options . defaults || false
71- this . _store = store
72+ fetcher ( store , { } )
73+ store . updater = new UpdateManager ( store )
74+ this . _store = store as LiveStore // TODO hacky, find a better solution
7275 this . aclMap = readACL ( doc , aclDoc , store , this . defaults )
7376 this . byCombo = ACLbyCombination ( this . aclMap )
7477 this . addAgentButton = new AddAgentButtons ( this )
@@ -178,7 +181,7 @@ export class AccessGroups {
178181 if ( ! agent && ! secondAttempt ) {
179182 debug . log ( ` Not obvious: looking up dropped thing ${ thing } ` )
180183 try {
181- await ( this . store as any ) . fetcher . load ( thing . doc ( ) )
184+ await this . _store . fetcher . load ( thing . doc ( ) )
182185 } catch ( error ) {
183186 const message = `Ignore error looking up dropped thing: ${ error } `
184187 debug . error ( message )
0 commit comments