contacts-pane 2.6.5-alpha → 2.6.5-ea0d5381

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/.eslintrc CHANGED
File without changes
File without changes
package/.nvmrc CHANGED
File without changes
package/LICENSE.md CHANGED
File without changes
package/Makefile CHANGED
File without changes
package/README.md CHANGED
File without changes
package/card.ai CHANGED
File without changes
package/card.png CHANGED
File without changes
package/contactLogic.js CHANGED
File without changes
package/contactsPane.js CHANGED
@@ -604,23 +604,33 @@ export default {
604
604
  let ds = []
605
605
  let ins = []
606
606
  groups.forEach(group => {
607
+ // check for WebId's in VCARD('hasMember)
608
+ const members = kb.statementsMatching(group, ns.vcard('hasMember'), null, group.doc()).map(st => st.object)
609
+ console.log('Alain ' + members)
610
+ const newModel = members.some(member => !kb.any(member, ns.vcard('fn'), null, group.doc())) ? true : false
611
+ // if newModel, shall we check that sameAs is in expected order ?
612
+ console.log(newModel)
613
+ if (!newModel) {
614
+ // update to new model
607
615
  let vcardOrWebids = kb.statementsMatching(null, ns.owl('sameAs'), null, group.doc()).map(st => st.subject)
608
- const strings = new Set(vcardOrWebids.map(contact => contact.uri)) // remove dups
609
- vcardOrWebids = [...strings].map(uri => kb.sym(uri))
610
- vcardOrWebids.forEach(item => {
611
- if (kb.each(item, ns.vcard('fn'), null, group.doc()).length) {
612
- // delete item, it is an old data model, item is a card not a webid.
613
- ds = ds.concat(kb
614
- .statementsMatching(item, ns.owl('sameAs'), null, group.doc())
615
- .concat(kb.statementsMatching(undefined, undefined, item, group.doc())))
616
- // add card webids to group
617
- const webids = kb.each(item, ns.owl('sameAs'), null, group.doc())
618
- webids.forEach(webid => {
619
- ins = ins.concat($rdf.st(webid, ns.owl('sameAs'), item, group.doc()))
620
- .concat($rdf.st(group, ns.vcard('hasMember'), webid, group.doc()))
621
- })
622
- }
623
- })
616
+ const strings = new Set(vcardOrWebids.map(contact => contact.uri)) // remove dups
617
+ vcardOrWebids = [...strings].map(uri => kb.sym(uri))
618
+ vcardOrWebids.forEach(item => {
619
+ if (kb.each(item, ns.vcard('fn'), null, group.doc()).length) {
620
+ // delete item, it is an old data model, item is a card not a webid.
621
+ ds = ds.concat(kb
622
+ .statementsMatching(item, ns.owl('sameAs'), null, group.doc())
623
+ .statementsMatching(null, ns.owl('sameAs'), item, group.doc()) // and also reverse
624
+ .concat(kb.statementsMatching(undefined, undefined, item, group.doc())))
625
+ // add card webids to group
626
+ const webids = kb.each(item, ns.owl('sameAs'), null, group.doc())
627
+ webids.forEach(webid => {
628
+ ins = ins.concat($rdf.st(webid, ns.owl('sameAs'), item, group.doc()))
629
+ .concat($rdf.st(group, ns.vcard('hasMember'), webid, group.doc()))
630
+ })
631
+ }
632
+ })
633
+ }
624
634
  })
625
635
  if (ds.length && confirm('Groups data model need to be updated ?')) {
626
636
  await kb.updater.updateMany(ds, ins)
package/diff.txt CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
package/individual.js CHANGED
File without changes
package/individualForm.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/lib/forms.js CHANGED
File without changes
File without changes
package/lib/publicData.js CHANGED
File without changes
package/lib/vcard.js CHANGED
File without changes
File without changes
package/mugshotGallery.js CHANGED
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contacts-pane",
3
- "version": "2.6.5-alpha",
3
+ "version": "2.6.5-ea0d5381",
4
4
  "description": "Contacts Pane: Contacts manager for Address Book, Groups, and Individuals.",
5
5
  "main": "./contactsPane.js",
6
6
  "scripts": {
@@ -10,8 +10,8 @@
10
10
  "lint": "eslint '*.js'",
11
11
  "lint-fix": "eslint '*.js' --fix",
12
12
  "test": "npm run lint",
13
- "prepublishOnly": "npm test && npm run build",
14
- "postpublish": "git push origin main --follow-tags"
13
+ "ignore:prepublishOnly": "npm test && npm run build",
14
+ "ignore:postpublish": "git push origin main --follow-tags"
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
@@ -37,17 +37,17 @@
37
37
  },
38
38
  "homepage": "https://github.com/solid/contacts-pane",
39
39
  "dependencies": {
40
- "pane-registry": "2.4.12",
41
- "rdflib": "^2.2.20",
42
- "solid-logic": "2.0.0",
43
- "solid-ui": "2.4.23"
40
+ "pane-registry": "2.4.13",
41
+ "rdflib": "^2.2.21",
42
+ "solid-logic": "2.0.1",
43
+ "solid-ui": "2.4.24"
44
44
  },
45
45
  "devDependencies": {
46
- "@typescript-eslint/eslint-plugin": "^5.36.1",
47
- "@typescript-eslint/parser": "^5.36.1",
48
- "eslint": "^8.23.0",
46
+ "@typescript-eslint/eslint-plugin": "^5.43.0",
47
+ "@typescript-eslint/parser": "^5.43.0",
48
+ "eslint": "^8.27.0",
49
49
  "eslint-plugin-import": "^2.26.0",
50
- "husky": "^8.0.1",
50
+ "husky": "^8.0.2",
51
51
  "lint-staged": "^13.0.3",
52
52
  "typescript": "^4.8.2",
53
53
  "typescript-transpile-only": "0.0.4"
File without changes
File without changes
File without changes
File without changes
package/src/forms.ttl CHANGED
File without changes
File without changes
package/src/publicData.ts CHANGED
File without changes
package/src/vcard.ttl CHANGED
File without changes
package/toolsPane.js CHANGED
File without changes
package/webidControl.js CHANGED
File without changes