How to use the solid-ui.ns.space function in solid-ui

To help you get started, we’ve selected a few solid-ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github solid / solid-panes / src / pad / padPane.source.ts View on Github external
var initializeNewInstanceInWorkspace = function (ws: NamedNode) {
      // @@ TODO Clean up type for newBase
      var newBase: any = store.any(ws, ns.space('uriPrefix'))
      if (!newBase) {
        newBase = ws.uri.split('#')[0]
      } else {
        newBase = newBase.value
      }
      if (newBase.slice(-1) !== '/') {
        log.error(appPathSegment + ': No / at end of uriPrefix ' + newBase) // @@ paramater?
        newBase = newBase + '/'
      }
      var now = new Date()
      newBase += appPathSegment + '/id' + now.getTime() + '/' // unique id

      initializeNewInstanceAtBase(thisInstance, newBase)
    }
github solid / solid-panes / src / pad / padPane.ts View on Github external
var initializeNewInstanceInWorkspace = function (ws: NamedNode) {
      // @@ TODO Clean up type for newBase
      var newBase: any = store.any(ws, ns.space('uriPrefix'))
      if (!newBase) {
        newBase = ws.uri.split('#')[0]
      } else {
        newBase = newBase.value
      }
      if (newBase.slice(-1) !== '/') {
        log.error(appPathSegment + ': No / at end of uriPrefix ' + newBase) // @@ paramater?
        newBase = newBase + '/'
      }
      var now = new Date()
      newBase += appPathSegment + '/id' + now.getTime() + '/' // unique id

      initializeNewInstanceAtBase(thisInstance, newBase)
    }
github solid / solid-panes / src / pad / padPane.ts View on Github external
store.add(newInstance, ns.rdf('type'), PAD('Notepad'), newPadDoc)

        // TODO @@ Remove casting of add
        ;(store.add as any)(
          newInstance,
          ns.dc('created'),
          new Date(),
          newPadDoc
        )
        if (me) {
          store.add(newInstance, ns.dc('author'), me, newPadDoc)
        }
        store.add(newInstance, PAD('next'), newInstance, newPadDoc) // linked list empty

        // Keep a paper trail   @@ Revisit when we have non-public ones @@ Privacy
        store.add(newInstance, ns.space('inspiration'), thisInstance, padDoc)
        store.add(newInstance, ns.space('inspiration'), thisInstance, newPadDoc)

        updater.put(
          newPadDoc,
          store.statementsMatching(undefined, undefined, undefined, newPadDoc),
          'text/turtle',
          function (_uri2: string, ok: boolean, message: string) {
            if (ok) {
              agenda.shift()!()
            } else {
              complainIfBad(
                ok,
                'FAILED to save new notepad at: ' +
                  newPadDoc.uri +
                  ' : ' +
                  message
github solid / solid-panes / src / pad / padPane.source.ts View on Github external
// TODO @@ Remove casting of add
        ;(store.add as any)(
          newInstance,
          ns.dc('created'),
          new Date(),
          newPadDoc
        )
        if (me) {
          store.add(newInstance, ns.dc('author'), me, newPadDoc)
        }
        store.add(newInstance, PAD('next'), newInstance, newPadDoc) // linked list empty

        // Keep a paper trail   @@ Revisit when we have non-public ones @@ Privacy
        store.add(newInstance, ns.space('inspiration'), thisInstance, padDoc)
        store.add(newInstance, ns.space('inspiration'), thisInstance, newPadDoc)

        updater.put(
          newPadDoc,
          store.statementsMatching(undefined, undefined, undefined, newPadDoc),
          'text/turtle',
          function (_uri2: string, ok: boolean, message: string) {
            if (ok) {
              agenda.shift()!()
            } else {
              complainIfBad(
                ok,
                'FAILED to save new notepad at: ' +
                  newPadDoc.uri +
                  ' : ' +
                  message
              )
github solid / solid-panes / src / dashboard / basicPreferences.source.ts View on Github external
function addDeletionLinks (
  container: HTMLElement,
  kb: IndexedFormula,
  profile: NamedNode
): void {
  const podServerNodes = kb.each(
    profile,
    ns.space('storage'),
    null,
    profile.doc()
  )
  const podServers = podServerNodes.map(node => node.value)
  podServers.forEach(async server => {
    const deletionLink = await generateDeletionLink(server)
    if (deletionLink) {
      container.appendChild(deletionLink)
    }
  })
}
github solid / solid-panes / src / dashboard / basicPreferences.ts View on Github external
function addDeletionLinks (
  container: HTMLElement,
  kb: IndexedFormula,
  profile: NamedNode
): void {
  const podServerNodes = kb.each(
    profile,
    ns.space('storage'),
    null,
    profile.doc()
  )
  const podServers = podServerNodes.map(node => node.value)
  podServers.forEach(async server => {
    const deletionLink = await generateDeletionLink(server)
    if (deletionLink) {
      container.appendChild(deletionLink)
    }
  })
}