solid-panes 3.5.19 → 3.5.21

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.
Files changed (84) hide show
  1. package/dev/loader.ts +11 -11
  2. package/lib/argument/argumentPane.js +15 -7
  3. package/lib/argument/argumentPane.js.map +1 -1
  4. package/lib/dashboard/basicPreferences.d.ts.map +1 -1
  5. package/lib/dashboard/basicPreferences.js +6 -6
  6. package/lib/dashboard/basicPreferences.js.map +1 -1
  7. package/lib/dashboard/dashboardPane.d.ts.map +1 -1
  8. package/lib/dashboard/dashboardPane.js +6 -4
  9. package/lib/dashboard/dashboardPane.js.map +1 -1
  10. package/lib/dataContentPane.js +1 -1
  11. package/lib/dataContentPane.js.map +1 -1
  12. package/lib/form/pane.js +15 -6
  13. package/lib/form/pane.js.map +1 -1
  14. package/lib/home/homePane.d.ts.map +1 -1
  15. package/lib/home/homePane.js +7 -5
  16. package/lib/home/homePane.js.map +1 -1
  17. package/lib/index.d.ts +7 -3
  18. package/lib/index.d.ts.map +1 -1
  19. package/lib/index.js +15 -4
  20. package/lib/index.js.map +1 -1
  21. package/lib/mainPage/header.d.ts.map +1 -1
  22. package/lib/mainPage/header.js +4 -2
  23. package/lib/mainPage/header.js.map +1 -1
  24. package/lib/microblogPane/microblogPane.js +16 -14
  25. package/lib/microblogPane/microblogPane.js.map +1 -1
  26. package/lib/outline/dragDrop.js +16 -6
  27. package/lib/outline/dragDrop.js.map +1 -1
  28. package/lib/outline/licenseOptions.js +12 -5
  29. package/lib/outline/licenseOptions.js.map +1 -1
  30. package/lib/outline/manager.js +29 -21
  31. package/lib/outline/manager.js.map +1 -1
  32. package/lib/outline/queryByExample.js +14 -6
  33. package/lib/outline/queryByExample.js.map +1 -1
  34. package/lib/outline/userInput.js +90 -80
  35. package/lib/outline/userInput.js.map +1 -1
  36. package/lib/pad/padPane.d.ts.map +1 -1
  37. package/lib/pad/padPane.js +6 -4
  38. package/lib/pad/padPane.js.map +1 -1
  39. package/lib/profile/editProfile.view.d.ts.map +1 -1
  40. package/lib/profile/editProfile.view.js +3 -3
  41. package/lib/profile/editProfile.view.js.map +1 -1
  42. package/lib/schedule/schedulePane.js +26 -14
  43. package/lib/schedule/schedulePane.js.map +1 -1
  44. package/lib/socialPane.js +16 -6
  45. package/lib/socialPane.js.map +1 -1
  46. package/lib/transaction/pane.js +1 -1
  47. package/lib/transaction/pane.js.map +1 -1
  48. package/lib/transaction/period.js +1 -1
  49. package/lib/transaction/period.js.map +1 -1
  50. package/lib/trip/tripPane.js +1 -1
  51. package/lib/trip/tripPane.js.map +1 -1
  52. package/lib/trustedApplications/trustedApplications.dom.d.ts.map +1 -1
  53. package/lib/trustedApplications/trustedApplications.dom.js +11 -9
  54. package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
  55. package/lib/trustedApplications/trustedApplications.view.d.ts.map +1 -1
  56. package/lib/trustedApplications/trustedApplications.view.js +5 -3
  57. package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
  58. package/lib/versionInfo.js +3 -3
  59. package/lib/versionInfo.js.map +1 -1
  60. package/package.json +14 -14
  61. package/src/argument/argumentPane.js +5 -5
  62. package/src/dashboard/basicPreferences.ts +4 -5
  63. package/src/dashboard/dashboardPane.ts +4 -3
  64. package/src/dataContentPane.js +1 -1
  65. package/src/form/pane.js +5 -4
  66. package/src/home/homePane.ts +7 -6
  67. package/src/index.ts +24 -18
  68. package/src/mainPage/header.ts +3 -2
  69. package/src/microblogPane/microblogPane.js +9 -8
  70. package/src/outline/dragDrop.js +5 -4
  71. package/src/outline/licenseOptions.js +4 -5
  72. package/src/outline/manager.js +22 -21
  73. package/src/outline/queryByExample.js +4 -4
  74. package/src/outline/userInput.js +72 -72
  75. package/src/pad/padPane.ts +3 -3
  76. package/src/profile/editProfile.view.ts +5 -8
  77. package/src/schedule/schedulePane.js +14 -13
  78. package/src/socialPane.js +5 -4
  79. package/src/transaction/pane.js +1 -1
  80. package/src/transaction/period.js +1 -1
  81. package/src/trip/tripPane.js +1 -1
  82. package/src/trustedApplications/trustedApplications.dom.ts +2 -1
  83. package/src/trustedApplications/trustedApplications.view.ts +4 -4
  84. package/src/versionInfo.ts +3 -3
@@ -11,17 +11,17 @@
11
11
  request: 'from' 'to' 'message' 'Request'
12
12
  */
13
13
 
14
- const UI = require('solid-ui')
14
+ import * as UI from 'solid-ui'
15
+ import { store } from 'solid-logic'
16
+ import * as panes from 'pane-registry'
17
+
15
18
  const $rdf = UI.rdf
16
- const panes = require('pane-registry')
17
19
 
18
20
  let UserInputFormula // Formula to store references of user's work
19
21
  let TempFormula // Formula to store incomplete triples (Requests),
20
22
  // temporarily disjoint with kb to avoid bugs
21
23
 
22
24
  module.exports = function UserInput (outline) {
23
- const kb = UI.store
24
-
25
25
  const myDocument = outline.document // is this ok?
26
26
  // UI.log.warn("myDocument when it's set is "+myDocument.location);
27
27
  this.menuId = 'predicateMenu1'
@@ -59,18 +59,18 @@ module.exports = function UserInput (outline) {
59
59
 
60
60
  if (!UserInputFormula) {
61
61
  UserInputFormula = new UI.rdf.Formula()
62
- UserInputFormula.superFormula = kb
62
+ UserInputFormula.superFormula = store
63
63
  // UserInputFormula.registerFormula("Your Work");
64
64
  }
65
65
  if (!TempFormula) TempFormula = new UI.rdf.IndexedFormula()
66
66
  // Use RDFIndexedFormula so add returns the statement
67
67
  TempFormula.name = 'TempFormula'
68
- if (!UI.store.updater) UI.store.updater = new UI.rdf.UpdateManager(kb)
68
+ if (!store.updater) store.updater = new UI.rdf.UpdateManager(store)
69
69
 
70
70
  return {
71
71
  // updateService: updateService,
72
72
 
73
- sparqler: UI.store.updater,
73
+ sparqler: store.updater,
74
74
  lastModified: null, // the last <input> being modified, .isNew indicates whether it's a new input
75
75
  lastModifiedStat: null, // the last statement being modified
76
76
  statIsInverse: false, // whether the statement is an inverse
@@ -122,10 +122,10 @@ module.exports = function UserInput (outline) {
122
122
  } else {
123
123
  // no previous row: write to the document defining the subject
124
124
  const subject = UI.utils.getAbout(
125
- kb,
125
+ store,
126
126
  UI.utils.ancestor(target.parentNode.parentNode, 'TD')
127
127
  )
128
- const doc = kb.sym(UI.rdf.Util.uri.docpart(subject.uri))
128
+ const doc = store.sym(UI.rdf.Util.uri.docpart(subject.uri))
129
129
  This.formUndetStat(insertTr, subject, reqTerm1, reqTerm2, doc, false)
130
130
  }
131
131
 
@@ -324,7 +324,7 @@ module.exports = function UserInput (outline) {
324
324
  obj = UI.utils.getTerm(target)
325
325
  trNode = UI.utils.ancestor(target, 'TR')
326
326
  } catch (e) {
327
- UI.log.warn('userinput.js: ' + e + UI.utils.getAbout(kb, selectedTd))
327
+ UI.log.warn('userinput.js: ' + e + UI.utils.getAbout(store, selectedTd))
328
328
  UI.log.error(target + ' getStatement Error:' + e)
329
329
  }
330
330
 
@@ -445,14 +445,14 @@ module.exports = function UserInput (outline) {
445
445
  s = new UI.rdf.Statement(
446
446
  s.subject,
447
447
  s.predicate,
448
- kb.literal(this.lastModified.value),
448
+ store.literal(this.lastModified.value),
449
449
  s.why
450
450
  )
451
451
  // TODO: DEFINE ERROR CALLBACK
452
452
  defaultpropview = this.views.defaults[s.predicate.uri]
453
453
  trCache = UI.utils.ancestor(this.lastModified, 'TR')
454
454
  try {
455
- UI.store.updater.update([], [s], function (
455
+ store.updater.update([], [s], function (
456
456
  uri,
457
457
  success,
458
458
  errorBody
@@ -473,10 +473,10 @@ module.exports = function UserInput (outline) {
473
473
  UI.log.error('Error inserting fact ' + s + ':\n\t' + e + '\n')
474
474
  return
475
475
  }
476
- s = kb.add(
476
+ s = store.add(
477
477
  s.subject,
478
478
  s.predicate,
479
- kb.literal(this.lastModified.value),
479
+ store.literal(this.lastModified.value),
480
480
  s.why
481
481
  )
482
482
  } else {
@@ -499,11 +499,11 @@ module.exports = function UserInput (outline) {
499
499
  s2 = $rdf.st(
500
500
  s.subject,
501
501
  s.predicate,
502
- kb.literal(this.lastModified.value),
502
+ store.literal(this.lastModified.value),
503
503
  s.why
504
504
  )
505
505
  try {
506
- UI.store.updater.update([s], [s2], function (
506
+ store.updater.update([s], [s2], function (
507
507
  uri,
508
508
  success,
509
509
  errorBody
@@ -531,12 +531,12 @@ module.exports = function UserInput (outline) {
531
531
  }
532
532
  case 'BlankNode': { // a request refill with text
533
533
  // var newStat
534
- const textTerm = kb.literal(this.lastModified.value, '')
534
+ const textTerm = store.literal(this.lastModified.value, '')
535
535
  // <Feature about="labelChoice">
536
536
  if (s.predicate.termType === 'Collection') {
537
537
  // case: add triple ????????? Weird - tbl
538
538
  const selectedPredicate = s.predicate.elements[0] // @@ TBL elements is a list on the predicate??
539
- if (kb.any(undefined, selectedPredicate, textTerm)) {
539
+ if (store.any(undefined, selectedPredicate, textTerm)) {
540
540
  if (!e) {
541
541
  // keyboard
542
542
  const tdNode = this.lastModified.parentNode
@@ -545,7 +545,7 @@ module.exports = function UserInput (outline) {
545
545
  e.pageY = UI.utils.findPos(tdNode)[1] + tdNode.clientHeight
546
546
  }
547
547
  this.showMenu(e, 'DidYouMeanDialog', undefined, {
548
- dialogTerm: kb.any(undefined, selectedPredicate, textTerm),
548
+ dialogTerm: store.any(undefined, selectedPredicate, textTerm),
549
549
  bnodeTerm: s.subject
550
550
  })
551
551
  } else {
@@ -554,8 +554,8 @@ module.exports = function UserInput (outline) {
554
554
  'TR'
555
555
  ).AJAR_statement
556
556
  s2 = $rdf.st(s.subject, selectedPredicate, textTerm, s.why)
557
- const type = kb.the(s.subject, rdf('type'))
558
- s3 = kb.anyStatementMatching(
557
+ const type = store.the(s.subject, rdf('type'))
558
+ s3 = store.anyStatementMatching(
559
559
  s.subject,
560
560
  rdf('type'),
561
561
  type,
@@ -568,7 +568,7 @@ module.exports = function UserInput (outline) {
568
568
  'TD'
569
569
  ).parentNode
570
570
  try {
571
- UI.store.updater.update([], [s1, s2, s3], function (
571
+ store.updater.update([], [s1, s2, s3], function (
572
572
  uri,
573
573
  success,
574
574
  errorBody
@@ -589,8 +589,8 @@ module.exports = function UserInput (outline) {
589
589
  )
590
590
  return
591
591
  }
592
- kb.remove(s)
593
- kb.add(s.subject, selectedPredicate, textTerm, s.why) // was: newStat =
592
+ store.remove(s)
593
+ store.add(s.subject, selectedPredicate, textTerm, s.why) // was: newStat =
594
594
  // a subtle bug occurs here, if foaf:nick hasn't been dereferneced,
595
595
  // this add will cause a repainting
596
596
  }
@@ -609,7 +609,7 @@ module.exports = function UserInput (outline) {
609
609
  this.fillInRequest(
610
610
  'object',
611
611
  this.lastModified.parentNode,
612
- kb.literal(this.lastModified.value)
612
+ store.literal(this.lastModified.value)
613
613
  )
614
614
  return // The new Td is already generated by fillInRequest, so it's done.
615
615
  }
@@ -638,7 +638,7 @@ module.exports = function UserInput (outline) {
638
638
  // UI.log.warn("test .isNew)");
639
639
  return
640
640
  } else if (s.predicate.termType === 'Collection') {
641
- kb.removeMany(s.subject)
641
+ store.removeMany(s.subject)
642
642
  const upperTr = UI.utils.ancestor(
643
643
  UI.utils.ancestor(this.lastModified, 'TR').parentNode,
644
644
  'TR'
@@ -687,7 +687,7 @@ module.exports = function UserInput (outline) {
687
687
  // outline.replaceTD(outline.outlineObjectTD(s.object, defaultpropview),trNode.lastChild);
688
688
  outline.replaceTD(
689
689
  outline.outlineObjectTD(
690
- kb.literal(this.lastModified.value),
690
+ store.literal(this.lastModified.value),
691
691
  defaultpropview
692
692
  ),
693
693
  trNode.lastChild
@@ -726,14 +726,14 @@ module.exports = function UserInput (outline) {
726
726
  const s = this.getStatementAbout(selectedTd)
727
727
  if (
728
728
  !isBackOut &&
729
- !kb.whether(s.object, rdf('type'), UI.ns.link('Request')) &&
729
+ !store.whether(s.object, rdf('type'), UI.ns.link('Request')) &&
730
730
  // Better to check whether provenance is internal?
731
- !kb.whether(s.predicate, rdf('type'), UI.ns.link('Request')) &&
732
- !kb.whether(s.subject, rdf('type'), UI.ns.link('Request'))
731
+ !store.whether(s.predicate, rdf('type'), UI.ns.link('Request')) &&
732
+ !store.whether(s.subject, rdf('type'), UI.ns.link('Request'))
733
733
  ) {
734
734
  UI.log.debug('about to send SPARQLUpdate')
735
735
  try {
736
- UI.store.updater.update([s], [], function (uri, success, errorBody) {
736
+ store.updater.update([s], [], function (uri, success, errorBody) {
737
737
  if (success) {
738
738
  removefromview()
739
739
  } else {
@@ -871,14 +871,14 @@ module.exports = function UserInput (outline) {
871
871
  // modify store and update here
872
872
  const isInverse = selectedTd.parentNode.AJAR_inverse
873
873
  if (!isInverse) {
874
- insertTr.AJAR_statement = kb.add(
874
+ insertTr.AJAR_statement = store.add(
875
875
  preStat.subject,
876
876
  preStat.predicate,
877
877
  term,
878
878
  preStat.why
879
879
  )
880
880
  } else {
881
- insertTr.AJAR_statemnet = kb.add(
881
+ insertTr.AJAR_statemnet = store.add(
882
882
  term,
883
883
  preStat.predicate,
884
884
  preStat.object,
@@ -887,7 +887,7 @@ module.exports = function UserInput (outline) {
887
887
  }
888
888
 
889
889
  try {
890
- UI.store.updater.update([], [insertTr.AJAR_statement], function (
890
+ store.updater.update([], [insertTr.AJAR_statement], function (
891
891
  uri,
892
892
  success,
893
893
  errorBody
@@ -1001,10 +1001,10 @@ module.exports = function UserInput (outline) {
1001
1001
  }
1002
1002
  */
1003
1003
  subject = UI.utils.getAbout(
1004
- kb,
1004
+ store,
1005
1005
  UI.utils.ancestor(selectedTd, 'TABLE').parentNode
1006
1006
  )
1007
- subjectClass = kb.any(subject, rdf('type'))
1007
+ subjectClass = store.any(subject, rdf('type'))
1008
1008
  sparqlText = []
1009
1009
  const endl = '.\n'
1010
1010
  sparqlText[0] =
@@ -1032,11 +1032,11 @@ module.exports = function UserInput (outline) {
1032
1032
  'SELECT ?pred WHERE{\n' +
1033
1033
  subject +
1034
1034
  rdf('type') +
1035
- kb.variable('subjectClass') +
1035
+ store.variable('subjectClass') +
1036
1036
  endl +
1037
- kb.variable('pred') +
1037
+ store.variable('pred') +
1038
1038
  UI.ns.rdfs('domain') +
1039
- kb.variable('subjectClass') +
1039
+ store.variable('subjectClass') +
1040
1040
  endl +
1041
1041
  '}'
1042
1042
  predicateQuery = sparqlText.map($rdf.SPARQLToQuery)
@@ -1058,10 +1058,10 @@ module.exports = function UserInput (outline) {
1058
1058
  ?pred rdfs:range ?objectClass.
1059
1059
  */
1060
1060
  subject = UI.utils.getAbout(
1061
- kb,
1061
+ store,
1062
1062
  UI.utils.ancestor(selectedTd, 'TABLE').parentNode
1063
1063
  )
1064
- subjectClass = kb.any(subject, rdf('type'))
1064
+ subjectClass = store.any(subject, rdf('type'))
1065
1065
  const object = selectedTd.parentNode.AJAR_statement.object
1066
1066
  // var objectClass = (object.termType === 'Literal') ? UI.ns.rdfs('Literal') : kb.any(object, rdf('type'))
1067
1067
  // var sparqlText="SELECT ?pred WHERE{\n?pred "+rdf('type')+rdf('Property')+".\n"+
@@ -1098,13 +1098,13 @@ module.exports = function UserInput (outline) {
1098
1098
  // objectTd
1099
1099
  const predicateTerm = selectedTd.parentNode.AJAR_statement.predicate
1100
1100
  if (
1101
- kb.whether(
1101
+ store.whether(
1102
1102
  predicateTerm,
1103
1103
  rdf('type'),
1104
1104
  UI.ns.owl('DatatypeProperty')
1105
1105
  ) ||
1106
1106
  predicateTerm.termType === 'Collection' ||
1107
- kb.whether(predicateTerm, UI.ns.rdfs('range'), UI.ns.rdfs('Literal'))
1107
+ store.whether(predicateTerm, UI.ns.rdfs('range'), UI.ns.rdfs('Literal'))
1108
1108
  ) {
1109
1109
  selectedTd.className = ''
1110
1110
  UI.utils.emptyNode(selectedTd)
@@ -1174,7 +1174,7 @@ module.exports = function UserInput (outline) {
1174
1174
  if (menu.lastHighlight) menu.lastHighlight.className = ''
1175
1175
  menu.lastHighlight = item
1176
1176
  menu.lastHighlight.className = 'activeItem'
1177
- outline.showURI(UI.utils.getAbout(kb, menu.lastHighlight))
1177
+ outline.showURI(UI.utils.getAbout(store, menu.lastHighlight))
1178
1178
  }
1179
1179
  if (enterEvent) {
1180
1180
  // either the real event of the pseudo number passed by OutlineKeypressPanel
@@ -1240,7 +1240,7 @@ module.exports = function UserInput (outline) {
1240
1240
  return 'asGivenTxt'
1241
1241
  }
1242
1242
 
1243
- const inputTerm = UI.utils.getAbout(kb, menu.lastHighlight)
1243
+ const inputTerm = UI.utils.getAbout(store, menu.lastHighlight)
1244
1244
  const fillInType = mode === 'predicate' ? 'predicate' : 'object'
1245
1245
  outline.UserInput.clearMenu()
1246
1246
  outline.UserInput.fillInRequest(
@@ -1356,7 +1356,7 @@ module.exports = function UserInput (outline) {
1356
1356
  }
1357
1357
  qp('at end of handler\n^^^^^^^^^^^^^^^^^\n\n')
1358
1358
  setHighlightItem(menu.firstChild.firstChild)
1359
- outline.showURI(UI.utils.getAbout(kb, menu.lastHighlight))
1359
+ outline.showURI(UI.utils.getAbout(store, menu.lastHighlight))
1360
1360
  return 'nothing to return'
1361
1361
  }
1362
1362
  } // end of return function
@@ -1477,17 +1477,17 @@ module.exports = function UserInput (outline) {
1477
1477
  const predicateTerm = this.getStatementAbout(selectedTd).predicate
1478
1478
  // var predicateTerm=selectedTd.parentNode.AJAR_statement.predicate;
1479
1479
  if (
1480
- kb.whether(
1480
+ store.whether(
1481
1481
  predicateTerm,
1482
1482
  UI.ns.rdf('type'),
1483
1483
  UI.ns.owl('DatatypeProperty')
1484
1484
  ) ||
1485
- kb.whether(predicateTerm, UI.ns.rdfs('range'), UI.ns.rdfs('Literal')) ||
1485
+ store.whether(predicateTerm, UI.ns.rdfs('range'), UI.ns.rdfs('Literal')) ||
1486
1486
  predicateTerm.termType === 'Collection'
1487
1487
  ) {
1488
1488
  return 'DatatypeProperty-like'
1489
1489
  } else if (
1490
- kb.whether(predicateTerm, rdf('type'), UI.ns.owl('ObjectProperty'))
1490
+ store.whether(predicateTerm, rdf('type'), UI.ns.owl('ObjectProperty'))
1491
1491
  ) {
1492
1492
  return 'ObjectProperty-like'
1493
1493
  } else {
@@ -1549,7 +1549,7 @@ module.exports = function UserInput (outline) {
1549
1549
  outline.UserInput.clearMenu()
1550
1550
  const selectedTd = outline.getSelection()[0]
1551
1551
  const targetdoc = selectedTd.parentNode.AJAR_statement.why
1552
- const newTerm = kb.nextSymbol(targetdoc)
1552
+ const newTerm = store.nextSymbol(targetdoc)
1553
1553
  outline.UserInput.fillInRequest('object', selectedTd, newTerm)
1554
1554
  // selection is changed
1555
1555
  outline.outlineExpand(outline.getSelection()[0], newTerm)
@@ -1571,7 +1571,7 @@ module.exports = function UserInput (outline) {
1571
1571
  // this is input box
1572
1572
  if (this.value !== tiptext) {
1573
1573
  const newuri = this.value // @@ Removed URI "fixup" code
1574
- This.fillInRequest('object', selectedTd, kb.sym(newuri))
1574
+ This.fillInRequest('object', selectedTd, store.sym(newuri))
1575
1575
  }
1576
1576
  }
1577
1577
  }
@@ -1642,7 +1642,7 @@ module.exports = function UserInput (outline) {
1642
1642
  },
1643
1643
 
1644
1644
  bnode2symbol: function bnode2symbol (bnode, symbol) {
1645
- kb.copyTo(bnode, symbol, ['two-direction', 'delete'])
1645
+ store.copyTo(bnode, symbol, ['two-direction', 'delete'])
1646
1646
  },
1647
1647
 
1648
1648
  generateRequest: function generateRequest (
@@ -1792,7 +1792,7 @@ module.exports = function UserInput (outline) {
1792
1792
  const target = UI.utils.ancestor(UI.utils.getTarget(e), 'TR')
1793
1793
  if (target.childNodes.length === 2 && target.nextSibling) {
1794
1794
  // Yes
1795
- kb.add(bnodeTerm, IDpredicate, IDterm) // used to connect the two
1795
+ store.add(bnodeTerm, IDpredicate, IDterm) // used to connect the two
1796
1796
  outline.UserInput.clearMenu()
1797
1797
  } else if (target.childNodes.length === 2) {
1798
1798
  outline.UserInput.clearMenu()
@@ -1803,7 +1803,7 @@ module.exports = function UserInput (outline) {
1803
1803
  const clickedTd = extraInformation.clickedTd
1804
1804
  selectItem = function selectItem (e) {
1805
1805
  qp('LIMITED P SELECT ITEM!!!!')
1806
- const selectedPredicate = UI.utils.getAbout(kb, UI.utils.getTarget(e))
1806
+ const selectedPredicate = UI.utils.getAbout(store, UI.utils.getTarget(e))
1807
1807
  const predicateChoices =
1808
1808
  clickedTd.parentNode.AJAR_statement.predicate.elements
1809
1809
  for (let i = 0; i < predicateChoices.length; i++) {
@@ -1835,7 +1835,7 @@ module.exports = function UserInput (outline) {
1835
1835
  const selectedTd = extraInformation.selectedTd
1836
1836
  selectItem = function selectItem (e) {
1837
1837
  qp('WOOHOO')
1838
- const inputTerm = UI.utils.getAbout(kb, UI.utils.getTarget(e))
1838
+ const inputTerm = UI.utils.getAbout(store, UI.utils.getTarget(e))
1839
1839
  qp('GENERAL SELECT ITEM!!!!!!=' + inputTerm)
1840
1840
  qp('target=' + UI.utils.getTarget(e))
1841
1841
  if (isPredicate) {
@@ -1873,7 +1873,7 @@ module.exports = function UserInput (outline) {
1873
1873
  // build NameSpaces here from knowledge base
1874
1874
  const NameSpaces = {}
1875
1875
  // for each (ontology in ontologies)
1876
- kb.each(undefined, UI.ns.rdf('type'), UI.ns.owl('Ontology')).forEach(
1876
+ store.each(undefined, UI.ns.rdf('type'), UI.ns.owl('Ontology')).forEach(
1877
1877
  function (ontology) {
1878
1878
  const label = UI.utils.label(ontology)
1879
1879
  if (!label) return
@@ -1939,11 +1939,11 @@ module.exports = function UserInput (outline) {
1939
1939
  const h1 = table.appendChild(myDocument.createElement('tr'))
1940
1940
  const h1th = h1.appendChild(myDocument.createElement('th'))
1941
1941
  h1th.appendChild(myDocument.createTextNode('Did you mean...'))
1942
- const plist = kb.statementsMatching(dialogTerm)
1942
+ const plist = store.statementsMatching(dialogTerm)
1943
1943
  let i
1944
1944
  for (i = 0; i < plist.length; i++) {
1945
1945
  if (
1946
- kb.whether(
1946
+ store.whether(
1947
1947
  plist[i].predicate,
1948
1948
  rdf('type'),
1949
1949
  UI.ns.owl('InverseFunctionalProperty')
@@ -1953,7 +1953,7 @@ module.exports = function UserInput (outline) {
1953
1953
  }
1954
1954
  }
1955
1955
  const IDpredicate = plist[i].predicate
1956
- const IDterm = kb.any(dialogTerm, plist[i].predicate)
1956
+ const IDterm = store.any(dialogTerm, plist[i].predicate)
1957
1957
  const text =
1958
1958
  UI.utils.label(dialogTerm) +
1959
1959
  ' who has ' +
@@ -2000,7 +2000,7 @@ module.exports = function UserInput (outline) {
2000
2000
  tempQuery.vars = []
2001
2001
  tempQuery.vars.push('Kenny')
2002
2002
  const tempBinding = {}
2003
- tempBinding.Kenny = kb.fromNT(predicates[i].NT)
2003
+ tempBinding.Kenny = store.fromNT(predicates[i].NT)
2004
2004
  try {
2005
2005
  addPredicateChoice(tempQuery)(tempBinding)
2006
2006
  } catch (e) {
@@ -2087,13 +2087,13 @@ module.exports = function UserInput (outline) {
2087
2087
  console.log('\n===start JournalTitleAutoComplete\n')
2088
2088
 
2089
2089
  // Gets all the URI's with type Journal in the knowledge base
2090
- const juris = kb.each(undefined, rdf('type'), bibo('Journal'))
2090
+ const juris = store.each(undefined, rdf('type'), bibo('Journal'))
2091
2091
 
2092
2092
  const matchedtitle = [] // debugging display before inserts into menu
2093
2093
 
2094
2094
  for (let i = 0; i < juris.length; i++) {
2095
2095
  const juri = juris[i]
2096
- const jtitle = kb.each(juri, dcelems('title'), undefined)
2096
+ const jtitle = store.each(juri, dcelems('title'), undefined)
2097
2097
 
2098
2098
  const jtstr = jtitle + ''
2099
2099
 
@@ -2125,11 +2125,11 @@ module.exports = function UserInput (outline) {
2125
2125
  break
2126
2126
  }
2127
2127
  case 'LimitedPredicateChoice': {
2128
- const choiceTerm = UI.utils.getAbout(kb, extraInformation.clickedTd)
2128
+ const choiceTerm = UI.utils.getAbout(store, extraInformation.clickedTd)
2129
2129
  // because getAbout relies on kb.fromNT, which does not deal with
2130
2130
  // the 'Collection' termType. This termType is ambiguous anyway.
2131
2131
  choiceTerm.termType = 'Collection'
2132
- const choices = kb.each(choiceTerm, UI.ns.link('element'))
2132
+ const choices = store.each(choiceTerm, UI.ns.link('element'))
2133
2133
  for (let i = 0; i < choices.length; i++) {
2134
2134
  addMenuItem(choices[i])
2135
2135
  }
@@ -2154,7 +2154,7 @@ module.exports = function UserInput (outline) {
2154
2154
  switch (inputQuery.constructor.name) {
2155
2155
  case 'Array':
2156
2156
  for (let i = 0; i < inputQuery.length; i++) {
2157
- kb.query(
2157
+ store.query(
2158
2158
  inputQuery[i],
2159
2159
  addPredicateChoice(inputQuery[i]),
2160
2160
  nullFetcher
@@ -2165,7 +2165,7 @@ module.exports = function UserInput (outline) {
2165
2165
  throw new Error('addPredicateChoice: query is not defined')
2166
2166
  // break
2167
2167
  default:
2168
- kb.query(inputQuery, addPredicateChoice(inputQuery), nullFetcher)
2168
+ store.query(inputQuery, addPredicateChoice(inputQuery), nullFetcher)
2169
2169
  }
2170
2170
  }
2171
2171
  }
@@ -2188,7 +2188,7 @@ module.exports = function UserInput (outline) {
2188
2188
  // RDF Event
2189
2189
 
2190
2190
  let eventhandler
2191
- if (kb.any(reqTerm, UI.ns.link('onfillin'))) {
2191
+ if (store.any(reqTerm, UI.ns.link('onfillin'))) {
2192
2192
  /* 2017 -- Not sure what is supposed to happen here -- timbl @@@@
2193
2193
  eventhandler = function(subject) {
2194
2194
  return kb.any(reqTerm, UI.ns.link('onfillin')).value)
@@ -2208,13 +2208,13 @@ module.exports = function UserInput (outline) {
2208
2208
  )
2209
2209
 
2210
2210
  try {
2211
- UI.store.updater.update([], [s], function (
2211
+ store.updater.update([], [s], function (
2212
2212
  uri,
2213
2213
  success,
2214
2214
  errorBody
2215
2215
  ) {
2216
2216
  if (success) {
2217
- newStat = kb.anyStatementMatching(
2217
+ newStat = store.anyStatementMatching(
2218
2218
  stat.subject,
2219
2219
  inputTerm,
2220
2220
  stat.object,
@@ -2284,7 +2284,7 @@ module.exports = function UserInput (outline) {
2284
2284
  }
2285
2285
 
2286
2286
  try {
2287
- UI.store.updater.update([], [s], function (
2287
+ store.updater.update([], [s], function (
2288
2288
  uri,
2289
2289
  success,
2290
2290
  _errorBody
@@ -2300,14 +2300,14 @@ module.exports = function UserInput (outline) {
2300
2300
  if (success) {
2301
2301
  newTd.className = newTd.className.replace(/ pendingedit/g, '') // User feedback
2302
2302
  if (!isInverse) {
2303
- newStats = kb.statementsMatching(
2303
+ newStats = store.statementsMatching(
2304
2304
  stat.subject,
2305
2305
  stat.predicate,
2306
2306
  inputTerm,
2307
2307
  stat.why
2308
2308
  )
2309
2309
  } else {
2310
- newStats = kb.statementsMatching(
2310
+ newStats = store.statementsMatching(
2311
2311
  inputTerm,
2312
2312
  stat.predicate,
2313
2313
  stat.object,
@@ -1,7 +1,7 @@
1
- import { authn, icons, ns, pad, widgets } from 'solid-ui'
1
+ import { icons, ns, pad, widgets, login } from 'solid-ui'
2
+ import { authn, AppDetails } from 'solid-logic'
2
3
  import { graph, log, NamedNode, Namespace, sym, serialize, Store } from 'rdflib'
3
4
  import { PaneDefinition } from 'pane-registry'
4
- import { AppDetails } from 'solid-ui/lib/authn/types'
5
5
  /* pad Pane
6
6
  **
7
7
  */
@@ -208,7 +208,7 @@ const paneDef: PaneDefinition = {
208
208
  const div = clearElement(container)
209
209
  const appDetails = { noun: 'notepad' } as AppDetails
210
210
  div.appendChild(
211
- authn.newAppInstance(dom, appDetails, (workspace: string | null, newBase) => {
211
+ login.newAppInstance(dom, appDetails, (workspace: string | null, newBase) => {
212
212
  // FIXME: not sure if this will work at all, just
213
213
  // trying to get the types to match - Michiel.
214
214
  return initializeNewInstanceInWorkspace(new NamedNode(workspace || newBase))
@@ -8,13 +8,11 @@
8
8
  * or standalone script adding onto existing mashlib.
9
9
  */
10
10
 
11
- import { authn, icons, ns, style, widgets } from 'solid-ui'
12
-
13
- import { NamedNode, parse, sym, Store } from 'rdflib'
14
-
15
- import profileFormText from './profileFormText.ttl'
16
11
  import { PaneDefinition } from 'pane-registry'
12
+ import { NamedNode, parse, Store, sym } from 'rdflib'
13
+ import { icons, login, ns, style, widgets } from 'solid-ui'
17
14
  import { paneDiv } from './profile.dom'
15
+ import profileFormText from './profileFormText.ttl'
18
16
 
19
17
  const highlightColor = style.highlightColor || '#7C4DFF'
20
18
 
@@ -86,7 +84,7 @@ const editProfileView: PaneDefinition = {
86
84
  statusArea: statusArea,
87
85
  me: null
88
86
  }
89
- authn.logInLoadProfile(profileContext)
87
+ login.ensureLoadedProfile(profileContext)
90
88
  .then(loggedInContext => {
91
89
  const me = loggedInContext.me!
92
90
 
@@ -136,8 +134,7 @@ const editProfileView: PaneDefinition = {
136
134
  renderProfileForm(main, me)
137
135
 
138
136
  heading('Thank you for filling your profile.')
139
- })
140
- .catch(error => {
137
+ }).catch(error => {
141
138
  statusArea.appendChild(widgets.errorMessageBlock(dom, error, '#fee'))
142
139
  })
143
140
  return div