solid-panes 3.5.36-fcdc4202 → 3.6.0-4e7f9f6d

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 (108) hide show
  1. package/coverage/clover.xml +152 -0
  2. package/coverage/coverage-final.json +6 -0
  3. package/coverage/lcov-report/base.css +224 -0
  4. package/coverage/lcov-report/block-navigation.js +87 -0
  5. package/coverage/lcov-report/favicon.png +0 -0
  6. package/coverage/lcov-report/index.html +131 -0
  7. package/coverage/lcov-report/outline/index.html +161 -0
  8. package/coverage/lcov-report/outline/outlineIcons.js.html +565 -0
  9. package/coverage/lcov-report/outline/propertyViews.ts.html +196 -0
  10. package/coverage/lcov-report/outline/viewAsImage.ts.html +121 -0
  11. package/coverage/lcov-report/outline/viewAsMbox.ts.html +127 -0
  12. package/coverage/lcov-report/prettify.css +1 -0
  13. package/coverage/lcov-report/prettify.js +2 -0
  14. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  15. package/coverage/lcov-report/sorter.js +196 -0
  16. package/coverage/lcov-report/trustedApplications/index.html +116 -0
  17. package/coverage/lcov-report/trustedApplications/trustedApplications.utils.ts.html +238 -0
  18. package/coverage/lcov.info +202 -0
  19. package/jest.config.js +3 -0
  20. package/lib/RDFXMLPane.js.map +1 -1
  21. package/lib/argument/argumentPane.js.map +1 -1
  22. package/lib/attach/attachPane.js.map +1 -1
  23. package/lib/audio/audioPane.js +6 -6
  24. package/lib/audio/audioPane.js.map +1 -1
  25. package/lib/classInstancePane.js.map +1 -1
  26. package/lib/dashboard/basicPreferences.js +7 -7
  27. package/lib/dashboard/basicPreferences.js.map +1 -1
  28. package/lib/dashboard/dashboardPane.js.map +1 -1
  29. package/lib/dashboard/homepage.js +4 -4
  30. package/lib/dashboard/homepage.js.map +1 -1
  31. package/lib/dataContentPane.js.map +1 -1
  32. package/lib/defaultPane.js.map +1 -1
  33. package/lib/dokieli/dokieliPane.js +1 -1
  34. package/lib/dokieli/dokieliPane.js.map +1 -1
  35. package/lib/form/pane.js +2 -2
  36. package/lib/form/pane.js.map +1 -1
  37. package/lib/home/homePane.js +3 -3
  38. package/lib/home/homePane.js.map +1 -1
  39. package/lib/humanReadablePane.js.map +1 -1
  40. package/lib/imagePane.js.map +1 -1
  41. package/lib/index.js +1 -1
  42. package/lib/index.js.map +1 -1
  43. package/lib/internal/internalPane.js.map +1 -1
  44. package/lib/mainPage/header.d.ts.map +1 -1
  45. package/lib/mainPage/header.js +8 -8
  46. package/lib/mainPage/header.js.map +1 -1
  47. package/lib/mainPage/index.js +3 -3
  48. package/lib/mainPage/index.js.map +1 -1
  49. package/lib/microblogPane/microblogPane.js.map +1 -1
  50. package/lib/n3Pane.js.map +1 -1
  51. package/lib/outline/manager.js +24 -20
  52. package/lib/outline/manager.js.map +1 -1
  53. package/lib/outline/manager.test.js +4 -4
  54. package/lib/outline/manager.test.js.map +1 -1
  55. package/lib/outline/propertyViews.js +1 -1
  56. package/lib/outline/propertyViews.js.map +1 -1
  57. package/lib/outline/userInput.js.map +1 -1
  58. package/lib/pad/padPane.js.map +1 -1
  59. package/lib/playlist/playlistPane.js.map +1 -1
  60. package/lib/registerPanes.js +8 -3
  61. package/lib/registerPanes.js.map +1 -1
  62. package/lib/schedule/schedulePane.js +1 -1
  63. package/lib/schedule/schedulePane.js.map +1 -1
  64. package/lib/sharing/sharingPane.js.map +1 -1
  65. package/lib/slideshow/slideshowPane.js +1 -1
  66. package/lib/slideshow/slideshowPane.js.map +1 -1
  67. package/lib/socialPane.js.map +1 -1
  68. package/lib/tabbed/tabbedPane.js +3 -3
  69. package/lib/tabbed/tabbedPane.js.map +1 -1
  70. package/lib/tableViewPane.js.map +1 -1
  71. package/lib/transaction/pane.js.map +1 -1
  72. package/lib/transaction/period.js.map +1 -1
  73. package/lib/trip/tripPane.js.map +1 -1
  74. package/lib/trustedApplications/trustedApplications.dom.js +1 -1
  75. package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
  76. package/lib/trustedApplications/trustedApplications.test.js +1 -1
  77. package/lib/trustedApplications/trustedApplications.test.js.map +1 -1
  78. package/lib/trustedApplications/trustedApplications.utils.d.ts +0 -1
  79. package/lib/trustedApplications/trustedApplications.utils.d.ts.map +1 -1
  80. package/lib/trustedApplications/trustedApplications.utils.js +5 -5
  81. package/lib/trustedApplications/trustedApplications.utils.js.map +1 -1
  82. package/lib/trustedApplications/trustedApplications.view.js +3 -3
  83. package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
  84. package/lib/ui/pane.js.map +1 -1
  85. package/lib/versionInfo.js +3 -3
  86. package/lib/versionInfo.js.map +1 -1
  87. package/lib/video/videoPane.js.map +1 -1
  88. package/package.json +3 -3
  89. package/src/mainPage/header.ts +6 -3
  90. package/src/outline/manager.js +6 -1
  91. package/src/registerPanes.js +7 -2
  92. package/src/versionInfo.ts +3 -3
  93. package/.babelrc +0 -16
  94. package/.eslintignore +0 -3
  95. package/.eslintrc +0 -26
  96. package/.github/workflows/ci.yml +0 -82
  97. package/.nvmrc +0 -1
  98. package/lib/profile/editProfile.view.d.ts +0 -13
  99. package/lib/profile/editProfile.view.d.ts.map +0 -1
  100. package/lib/profile/editProfile.view.js +0 -135
  101. package/lib/profile/editProfile.view.js.map +0 -1
  102. package/lib/profile/profile.dom.d.ts +0 -4
  103. package/lib/profile/profile.dom.d.ts.map +0 -1
  104. package/lib/profile/profile.dom.js +0 -18
  105. package/lib/profile/profile.dom.js.map +0 -1
  106. package/src/profile/editProfile.view.ts +0 -164
  107. package/src/profile/profile.dom.ts +0 -20
  108. package/src/profile/profileFormText.ttl +0 -386
@@ -1,82 +0,0 @@
1
- # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
-
4
- name: CI
5
-
6
- on:
7
- push:
8
- branches:
9
- - "**"
10
- pull_request:
11
- branches:
12
- - "**"
13
- workflow_dispatch:
14
-
15
- jobs:
16
- build:
17
-
18
- runs-on: ubuntu-latest
19
-
20
- strategy:
21
- matrix:
22
- node-version:
23
- - 16.x
24
- - 18.x
25
-
26
- steps:
27
- - uses: actions/checkout@v2
28
- - name: Use Node.js ${{ matrix.node-version }}
29
- uses: actions/setup-node@v1
30
- with:
31
- node-version: ${{ matrix.node-version }}
32
- - run: npm ci
33
- - run: npm run lint --if-present
34
- - run: npm test
35
- - run: npm run build --if-present
36
- - name: Save build
37
- if: matrix.node-version == '16.x'
38
- uses: actions/upload-artifact@v2
39
- with:
40
- name: build
41
- path: |
42
- .
43
- !node_modules
44
- retention-days: 1
45
-
46
- npm-publish-build:
47
- needs: build
48
- runs-on: ubuntu-latest
49
- steps:
50
- - uses: actions/download-artifact@v2
51
- with:
52
- name: build
53
- - uses: actions/setup-node@v1
54
- with:
55
- node-version: 16.x
56
- - uses: rlespinasse/github-slug-action@v3.x
57
- - name: Append commit hash to package version
58
- run: 'sed -i -E "s/(\"version\": *\"[^\"]+)/\1-${GITHUB_SHA_SHORT}/" package.json'
59
- - name: Disable pre- and post-publish actions
60
- run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
61
- - uses: JS-DevTools/npm-publish@v1
62
- with:
63
- token: ${{ secrets.NPM_TOKEN }}
64
- tag: ${{ env.GITHUB_REF_SLUG }}
65
-
66
- npm-publish-latest:
67
- needs: build
68
- runs-on: ubuntu-latest
69
- if: github.ref == 'refs/heads/main'
70
- steps:
71
- - uses: actions/download-artifact@v2
72
- with:
73
- name: build
74
- - uses: actions/setup-node@v1
75
- with:
76
- node-version: 16.x
77
- - name: Disable pre- and post-publish actions
78
- run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
79
- - uses: JS-DevTools/npm-publish@v1
80
- with:
81
- token: ${{ secrets.NPM_TOKEN }}
82
- tag: latest
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- v18.19.0
@@ -1,13 +0,0 @@
1
- /**
2
- * Profile Editing App Pane
3
- *
4
- * Unlike view panes, this is available any place whatever the real subject,
5
- * and allows the user to edit their own profile.
6
- *
7
- * Usage: paneRegistry.register('profile/profilePane')
8
- * or standalone script adding onto existing mashlib.
9
- */
10
- import { PaneDefinition } from 'pane-registry';
11
- declare const editProfileView: PaneDefinition;
12
- export default editProfileView;
13
- //# sourceMappingURL=editProfile.view.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editProfile.view.d.ts","sourceRoot":"","sources":["../../src/profile/editProfile.view.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAQ9C,QAAA,MAAM,eAAe,EAAE,cA+ItB,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -1,135 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _rdflib = require("rdflib");
8
- var _solidUi = require("solid-ui");
9
- var _profile = require("./profile.dom");
10
- /**
11
- * Profile Editing App Pane
12
- *
13
- * Unlike view panes, this is available any place whatever the real subject,
14
- * and allows the user to edit their own profile.
15
- *
16
- * Usage: paneRegistry.register('profile/profilePane')
17
- * or standalone script adding onto existing mashlib.
18
- */
19
- /* babel-plugin-inline-import './profileFormText.ttl' */
20
- var profileFormText = "# 20210404a\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n\n@prefix org: <http://www.w3.org/ns/org#>.\n@prefix esco: <http://data.europa.eu/esco/model#>.\n@prefix wd: <http://www.wikidata.org/entity/>.\n@prefix wdt: <http://www.wikidata.org/prop/direct/>.\n\n@prefix : <#>.\n\n:this\n <http://purl.org/dc/elements/1.1/title> \"Profile form\" ;\n a ui:Form ;\n # ui:part :backgroundColor, :highlightColor;\n ui:parts (\n :styleGroup\n :nicknameField\n :pronounsForm\n :LanguagesPrompt :LanguagesForm\n :CVGroup\n :SkillsPrompt :SkillsForm\n ).\n\n:styleGroup a ui:Group; ui:weight 0; ui:parts ( :styleHeading :backgroundColor :highlightColor ).\n :styleHeading a ui:Heading; ui:contents \"The style of your public profile.\".\n :backgroundColor a ui:ColorField; ui:property solid:profileBackgroundColor;\n ui:label \"Background color\"; ui:default \"#ffffff\".\n :highlightColor a ui:ColorField; ui:property solid:profileHighlightColor;\n ui:label \"Highlight color\"; ui:default \"#000000\".\n\n# Nickname\n\n:nicknameField a ui:SingleLineTextField; ui:size 12; ui:property foaf:nick;\n ui:label \"Short name for chats, etc.\"@en, \"nom court\"@fr.\n\n # Pronouns\n\n :pronounsForm a ui:Group; ui:weight 0; ui:parts ( :pronounsPrompt :subjectPronounForm :objectPronounForm :relativePronounForm) .\n\n :pronounsPrompt a ui:Comment; ui:contents \"What are your pronouns?\" .\n\n :subjectPronounForm a ui:SingleLineTextField; ui:property solid:preferredSubjectPronoun;\n ui:size 10; ui:label \"he/she/they...\" .\n :objectPronounForm a ui:SingleLineTextField; ui:property solid:preferredObjectPronoun;\n ui:size 10; ui:label \"him/her/them...\" .\n :relativePronounForm a ui:SingleLineTextField; ui:property solid:preferredRelativePronoun;\n ui:size 10; ui:label \"his/hers/theirs...\" .\n\n # Curriculum Vitae: membership of organizations\n\n :CVHeading a ui:Heading; ui:contents \"Public Curriculum Vitae\".\n :CVPrompt a ui:Comment; ui:contents \"What organizations have you been involved with?\" .\n\n :CVGroup a ui:Group; ui:weight 1; ui:parts ( :CVHeading :CVPrompt :involvementWithOrganizationsForm ).\n\n\n solid:Role a rdfs:Class; owl:oneOf ( solid:CurrentRole solid:FormerRole solid:FutureRole ). # Future Role too?\n\n org:member owl:inverse [ ui:label \"involvement with company, org etc\" ]. # timelimited involvement\n\n :involvementWithOrganizationsForm a ui:Multiple;\n ui:label \"Involvement with Organization\";\n ui:property org:member; ui:reverse true; # link back from role to member\n ui:ordered false; # Allow user to order CV secions rather than force date order? No.\n ui:part :RoleMembershipForm.\n\n# This is a big important form for one of a series of roles in the list.\n\n :RoleMembershipForm a ui:Group; ui:weight 3; ui:parts ( :MembershipFormHeading :roleNameField\n :escoOccupationField :orgField :RoleClassifier :RoleDatesForm :RoleDescriptionForm).\n\n :MembershipFormHeading a ui:Heading; ui:contents \"Details of this role\"@en, \"D\xE9tailes de ce r\xF4le\"@fr .\n\n :orgField a ui:Choice; ui:label \"Organization\"@en, \"Organization\"@fr;\n ui:canMintNew true; ui:use :OrganizationCreationForm ;\n ui:property org:organization;\n ui:from vcard:Organization .\n :roleNameField a ui:SingleLineTextField; ui:property vcard:role; ui:size 60 .\n\n :escoOccupationField a ui:AutocompleteField;\n ui:label \"occupation\"; ui:size 60;\n ui:property org:role;\n ui:dataSource :ESCO_Occupation_DataSource;\n ui:targetClass schema:Occupation .\n\n :ESCO_Occupation_DataSource a ui:DataSource;\n schema:name \"ESCO\";\n ui:targetClass schema:Occupation ;\n schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;\n ui:searchByNameURI \"https://ec.europa.eu/esco/api/search?language=$(language)&type=occupation&text=$(name)\".\n\n :instituteIdentityField a ui:AutocompleteField; ui:label \"in wikidata\";\n ui:size 60;\n ui:property solid:publicId; ui:dataSource :WikidataOnOrganizations.\n\n :WikidataOnOrganizations a ui:DataSource ;\n schema:name \"Wikidata\";\n ui:endpoint \"https://query.wikidata.org/sparql\" ;\n ui:targetClass <http://www.wikidata.org/entity/Q43229>; # Use if nothing else\n ui:searchByNameQuery \"\"\"SELECT ?subject ?name\n WHERE {\n ?klass wdt:P279* $(targetClass) .\n ?subject wdt:P31 ?klass .\n ?subject rdfs:label ?name.\n FILTER regex(?name, \"$(name)\", \"i\")\n } LIMIT $(limit) \"\"\" .\n\n :WikidataOnOrganizations ui:classMap\n [ ui:internalClass schema:Corporation; ui:externalClass <http://www.wikidata.org/entity/Q6881511>], #Enterprise is for-profit\n [ ui:internalClass schema:EducationalOrganization; ui:externalClass <http://www.wikidata.org/entity/Q178706>], #insitution\n [ ui:internalClass schema:ResearchOrganization; ui:externalClass <http://www.wikidata.org/entity/Q31855>], # reearch insitutie\n [ ui:internalClass schema:GovernmentOrganization; ui:externalClass <http://www.wikidata.org/entity/Q327333>], #government agency\n [ ui:internalClass schema:MedicalOrganization; ui:externalClass <http://www.wikidata.org/entity/Q4287745>],\n [ ui:internalClass schema:MusicGroup; ui:externalClass <http://www.wikidata.org/entity/Q32178211>], #music organization\n [ ui:internalClass schema:NGO; ui:externalClass <http://www.wikidata.org/entity/Q163740>], #nonprofit organization @@\n [ ui:internalClass schema:Occupation; ui:externalClass <http://www.wikidata.org/entity/Q28640>], # superclass: Profession\n [ ui:internalClass schema:Organization; ui:externalClass <http://www.wikidata.org/entity/Q43229>], # Superclass; Organization\n [ ui:internalClass schema:Project; ui:externalClass <http://www.wikidata.org/entity/Q170584>],\n [ ui:internalClass schema:SportsOrganization; ui:externalClass <http://www.wikidata.org/entity/Q4438121>] .\n\n\n# eposodes in one's career - Roles\n\nsolid:Role owl:disjointUnionOf ( solid:PastRole solid:CurrentRole solid:FutureRole ) .\nsolid:PastRole a rdfs:Class; rdfs:label \"former role\"@en, \"ancien r\xF4le\"@fr, \"vergangene Rolle\"@de, \"rol anterior\"@es .\nsolid:CurrentRole a rdfs:Class; rdfs:label \"current role\"@en, \"r\xF4le actuel\"@fr, \"momentane Rolle\"@de , \"rol actual\"@es .\nsolid:FutureRole a rdfs:Class; rdfs:label \"future role\"@en, \"r\xF4le \xE0 venir\"@fr, \"zuk\xFCnftige Rolle\"@de, \"rol futuro\"@es .\n\n:RoleDatesGroup a ui:Group; ui:weight 0; ui:parts ( :RoleClassifier :RoleDatesForm ) .\n :RoleClassifier a ui:Classifier; ui:label \"What sort of role?\"@en;\n ui:category solid:Role .\n\n :RoleDatesForm a ui:Options; ui:dependingOn rdf:type; ui:case\n [ ui:for solid:PastRole; ui:use :TwoDateForm ],\n [ ui:for solid:CurrentRole; ui:use :StartDateForm ],\n [ ui:for solid:FutureRole; ui:use :StartDateForm ].\n\n :StartDateForm a ui:DateField; ui:label \"start\"@en,\"d\xE9but\"@fr;\n ui:property schema:startDate .\n :TwoDateForm a ui:Group; ui:weight 0; ui:parts ( :StartDateForm :EndDateForm ) .\n :EndDateForm a ui:DateField; ui:label \"end\"@en,\"fin\"@fr;\n ui:property schema:endDate .\n\n:RoleDescriptionForm a ui:MultiLineTextField; ui:property schema:description;\n ui:label \"Describe your role\" .\n\n# Organizations\n\n vcard:Organization ui:creationForm :OrganizationCreationForm .\n\n# Ontology data to drive the classifier\n\nsolid:InterestingOrganization owl:disjointUnionOf (\n# Airline - a Corporation\n# Consortium - a Corporation or a NGO\n schema:Corporation\n schema:EducationalOrganization\n schema:ResearchOrganization # Proposed. https://github.com/schemaorg/schemaorg/issues/2877\n# FundingScheme - eh?\n schema:GovernmentOrganization\n# LibrarySystem\n# LocalBusiness - Corporation\n# MedicalOrganization - a Corporation or a NGO\n schema:NGO\n # NewsMediaOrganization - a Corporation or a NGO\nschema:PerformingGroup # a band\nschema:Project # like Solid\nschema:SportsOrganization # a Team\nsolid:OtherOrganization\n ) .\n\n# This until the schema.org ontology adopts it\nschema:ResearchOrganization a rdfs:Class; rdfs:label \"Research Organization\"@en, \"Organization de Recherche\"@fr ,\n \"organizaci\xF3n de investigaci\xF3n\"@es, \"\u0645\u0646\u0638\u0645\u0629 \u0627\u0644\u0628\u062D\u062B\"@ar, \"\u0905\u0928\u0941\u0938\u0902\u0927\u093E\u0928 \u0938\u0902\u0917\u0920\u0928\"@hi, \"Forschungsorganisation\"@de, \"shirika la utafiti\"@sw .\n\n :OrganizationCreationForm a ui:Form; schema:name \"Form for editing an organization using public data\" ;\n ui:parts ( :OrgClassifier :OrgSwitch :OrganizationNameField :homePageURIField ) .\n\n\n :OrgClassifier a ui:Classifier; ui:label \"What sort of organization?\"@en;\n ui:category solid:InterestingOrganization .\n\n :OrganizationNameField\n a ui:SingleLineTextField ;\n ui:label \"Organization Name\";\n ui:maxLength \"200\" ;\n ui:property schema:name ;\n ui:size 80 .\n\n :homePageURIField a ui:NamedNodeURIField; ui:size 80;\n ui:label \"Home page URI\"@en;\n ui:property schema:uri . # @@ ??\n\n :initituteTypeField a ui:Classifier;\n ui:label \"What sort of organization\";\n ui:category solid:InterestingOrganization .\n\n# Depending on the type of org, chose a different form\n\n :OrgSwitch a ui:Options; ui:dependingOn rdf:type;\n ui:case\n [ ui:for schema:Corporation; ui:use :CorporationForm ],\n [ ui:for schema:GovernmentOrganization; ui:use :GovernmentOrganizationForm ],\n [ ui:for schema:PerformingGroup; ui:use :PerformingGroupForm ],\n [ ui:for schema:Project; ui:use :ProjectForm ],\n [ ui:for schema:NGO; ui:use :NGOForm ],\n [ ui:for schema:EducationalOrganization; ui:use :EducationalOrganizationForm ],\n [ ui:for schema:ResearchOrganization; ui:use :ResearchOrganizationForm ],\n [ ui:for :SportsOrganization; ui:use :SportsOrganizationForm ],\n [ ui:for solid:OtherOrganization; ui:use :OtherOrganizationForm ].\n\n\n :CorporationForm a ui:Group; ui:weight 0; ui:parts ( :CorporationPrompt :CorporationAutocomplete ) .\n\n :CorporationPrompt a ui:Comment; ui:contents \"Which corporation?\".\n\n :CorporationAutocomplete a ui:AutocompleteField;\n a ui:AutocompleteField; ui:label \"Corporation in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q6881511>; # Enterprise\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :WikidataInstancesByName a ui:DataSource ;\n schema:name \"Wikidata instances by name\";\n ui:endpoint \"https://query.wikidata.org/sparql\" ;\n ui:searchByNameQuery \"\"\"SELECT ?subject ?name\n WHERE {\n ?klass wdt:P279* $(targetClass) .\n ?subject wdt:P31 ?klass .\n ?subject rdfs:label ?name.\n FILTER regex(?name, \"$(name)\", \"i\")\n } LIMIT $(limit) \"\"\" ;\n\n # Note this form of the query is very experimental\n ui:searchByName [ ui:construct { ?subject schema:name ?name } ;\n ui:where { ?klass wdt:P279 ?targetClass .\n ?subject wdt:P31 ?klass; rdfs:label ?name .\n };\n ].\n\n :GovernmentOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :GovernmentOrganizationPrompt :GovernmentOrganizationAutocomplete ) .\n\n :GovernmentOrganizationPrompt a ui:Comment; ui:contents \"Which GovernmentOrganization?\".\n\n :GovernmentOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"GovernmentOrganization in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q327333>; # GovernmentOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :EducationalOrganizationForm a ui:Group; ui:weight 1; ui:parts ( :EducationalOrganizationPrompt :EducationalOrganizationAutocomplete ) .\n\n :EducationalOrganizationPrompt a ui:Comment; ui:contents \"Which Educational Organization?\".\n\n :EducationalOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Educational Organization in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q2385804>; # EducationalOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n\n :ResearchOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :ResearchOrganizationPrompt :ResearchOrganizationAutocomplete ) .\n\n :ResearchOrganizationPrompt a ui:Comment; ui:contents \"Which Research Organization?\".\n\n :ResearchOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Research Insitute in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q31855>; # research institute\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n\n :NGOForm a ui:Group; ui:weight 0; ui:parts ( :NGOPrompt :NGOAutocomplete ) .\n\n :NGOPrompt a ui:Comment; ui:contents \"Which NGO?\".\n\n :NGOAutocomplete\n a ui:AutocompleteField; ui:label \"NGO in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q163740>; # Non-profit org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :PerformingGroupForm a ui:Group; ui:weight 0; ui:parts ( :PerformingGroupPrompt :PerformingGroupAutocomplete ) .\n\n :PerformingGroupPrompt a ui:Comment; ui:contents \"Which PerformingGroup?\".\n\n :PerformingGroupAutocomplete\n a ui:AutocompleteField; ui:label \"PerformingGroup in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q32178211>; # Music Org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n\n :ProjectForm a ui:Group; ui:weight 0; ui:parts ( :ProjectPrompt :ProjectAutocomplete ) . # :ProjectAutocomplete - no: supress, as not in WD\n\n :ProjectPrompt a ui:Comment; ui:contents \"Which Project?\".\n\n :ProjectAutocomplete\n a ui:AutocompleteField; ui:label \"Project in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q170584>; # Project\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :SportsOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :SportsOrganizationPrompt :SportsOrganizationAutocomplete ) .\n\n :SportsOrganizationPrompt a ui:Comment; ui:contents \"Which Sports Organization?\".\n\n :SportsOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"SportsOrganization in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q4438121>; # SportsOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :OtherOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :OrganizationNameField :homePageURIField ) .\n\n #################### Skills\n\n :SkillsPrompt a ui:Comment; ui:contents \"Skills?\" .\n\n :SkillsForm a ui:Multiple;\n ui:label \"Skills\";\n ui:property schema:skills;\n ui:ordered false; # Allow reader to order skills\n ui:part :SkillForm.\n\n :SkillForm a ui:Group; ui:weight 1; ui:parts ( :escoSkillField ).\n\n # :skillNameField a ui:SingleLineTextField; ui:property vcard:role; ui:size 30 .\n\n :escoSkillField a ui:AutocompleteField;\n ui:label \"skill\"; ui:size 30;\n ui:property solid:publicId;\n ui:dataSource :ESCO_Skill_DataSource;\n ui:targetClass schema:Skill .\n\n :ESCO_Skill_DataSource a ui:DataSource;\n schema:name \"ESCO Skill\";\n ui:targetClass esco:Skill ;\n schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;\n ui:searchByNameURI \"https://ec.europa.eu/esco/api/search?language=$(language)&limit=$(limit)&type=skill&text=$(name)\".\n\n# Language\n\n:LanguagesPrompt a ui:Comment; ui:contents \"Languages?\" .\n\n:LanguagesForm a ui:Multiple;\n ui:label \"Languages\";\n ui:property schema:knowsLanguage; # @@@\n ui:ordered true; # Allow user to order languages most important first.\n ui:part :LanguageForm.\n\n:LanguageForm a ui:Group; ui:weight 1; ui:parts ( :WikidataLanguageField ).\n\n :WikidataLanguageField a ui:AutocompleteField;\n ui:label \"Language\"; ui:size 30;\n ui:property solid:publicId; # @@\n ui:dataSource :WikidataLanguageDataSource;\n ui:targetClass schema:Language .\n\n :WikidataLanguageDataSource\n schema:name \"Wikidata languages\";\n ui:endpoint \"https://query.wikidata.org/sparql\" ;\n ui:objectURIBase <https://www.w3.org/ns/iana/language-code/>;\n # Add this to any literal string returned as ?subject\n\n ui:searchByNameQuery \"\"\"SELECT ?item ?subject ?name\nWHERE\n{ ?item wdt:P305 ?subject .\n OPTIONAL {?item rdfs:label ?name}\n OPTIONAL {?item wdt:P1705 ?name}\n FILTER regex(?name, \"$(name)\", \"i\")\n FILTER regex(?subject, \"^..$\", \"i\")\n}\"\"\" .\n # Note we restrict code to two-letter codes with the second regex, so as to limit the deluge of languages\n # Hope there are not any important ones which have three-letter codes.\n # Omitted: SERVICE wikibase:label { bd:serviceParam wikibase:language \"$(languages)\". }\n\n\n# ENDS\n";
21
- var highlightColor = _solidUi.style.highlightColor || '#7C4DFF';
22
- var editProfileView = {
23
- global: true,
24
- icon: _solidUi.icons.iconBase + 'noun_492246.svg',
25
- name: 'editProfile',
26
- label: function label() {
27
- return null;
28
- },
29
- render: function render(subject, context) {
30
- var dom = context.dom;
31
- var store = context.session.store;
32
- function complainIfBad(ok, mess) {
33
- if (ok) return;
34
- div.appendChild(_solidUi.widgets.errorMessageBlock(dom, mess, '#fee'));
35
- }
36
- function renderProfileForm(div, subject) {
37
- var preferencesForm = (0, _rdflib.sym)('https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#this');
38
- var preferencesFormDoc = preferencesForm.doc();
39
- if (!store.holds(undefined, undefined, undefined, preferencesFormDoc)) {
40
- // If not loaded already
41
- (0, _rdflib.parse)(profileFormText, store, preferencesFormDoc.uri, 'text/turtle', function () {
42
- return null;
43
- }); // Load form directly
44
- }
45
- _solidUi.widgets.appendForm(dom, div, {}, subject, preferencesForm, editableProfile, complainIfBad);
46
- } // renderProfileForm
47
-
48
- var div = dom.createElement('div');
49
- var editableProfile;
50
- div.setAttribute('style', "border: 0.3em solid ".concat(highlightColor, "; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;"));
51
- var table = div.appendChild(dom.createElement('table'));
52
- // const top = table.appendChild(dom.createElement('tr'))
53
- var main = table.appendChild(dom.createElement('tr'));
54
- var bottom = table.appendChild(dom.createElement('tr'));
55
- var statusArea = bottom.appendChild(dom.createElement('div'));
56
- statusArea.setAttribute('style', 'padding: 0.7em;');
57
- function comment(str) {
58
- var p = main.appendChild(dom.createElement('p'));
59
- p.setAttribute('style', 'padding: 1em;');
60
- p.textContent = str;
61
- return p;
62
- }
63
- function heading(str) {
64
- var h = main.appendChild(dom.createElement('h3'));
65
- h.setAttribute('style', 'color:' + highlightColor + ';');
66
- h.textContent = str;
67
- return h;
68
- }
69
- var profileContext = {
70
- dom: dom,
71
- div: main,
72
- statusArea: statusArea,
73
- me: null
74
- };
75
- _solidUi.login.ensureLoadedProfile(profileContext).then(function (theContext) {
76
- var me = theContext.me;
77
- heading('Edit your public profile');
78
- var profile = me.doc();
79
- if (!store.updater) {
80
- throw new Error('Store has no updater');
81
- }
82
- if (store.any(me, _solidUi.ns.solid('editableProfile'))) {
83
- editableProfile = store.any(me, _solidUi.ns.solid('editableProfile'));
84
- } else if (store.updater.editable(profile.uri, store)) {
85
- editableProfile = profile;
86
- } else {
87
- statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, "\u26A0\uFE0F Your profile ".concat(profile, " is not editable, so we cannot do much here."), 'straw'));
88
- return;
89
- }
90
- comment("Everything you put here will be public.\n There will be other places to record private things.");
91
- heading('Your contact information');
92
- main.appendChild((0, _profile.paneDiv)(context, me, 'contact'));
93
- heading('People you know who have WebIDs');
94
- comment("This is your public social network.\n Only put people here to whom you are happy to be publicly connected.\n (You can always keep private track of friends and family in your contacts.)");
95
-
96
- // TODO: would be useful to explain what it means to "drag people"
97
- // what is it that is being dragged?
98
- // is there a way to search for people (or things to drag) on this page?
99
- if (editableProfile) {
100
- comment('Drag people onto the target below to add people.');
101
- }
102
- _solidUi.widgets.attachmentList(dom, me, main, {
103
- doc: profile,
104
- modify: !!editableProfile,
105
- predicate: _solidUi.ns.foaf('knows'),
106
- noun: 'friend'
107
- });
108
- heading('Communities you participate in');
109
- comment("These are organizations and projects (etc) whose stuff you share");
110
-
111
- // TODO: would be useful to explain what it means to "drag organizations"
112
- // what is it that is being dragged?
113
- // is there a way to search for people (or things to drag) on this page?
114
- // Also provide a way of using cut and paste
115
- if (editableProfile) {
116
- comment('Drag organizations onto the target below to add organizations.');
117
- }
118
- _solidUi.widgets.attachmentList(dom, me, main, {
119
- doc: profile,
120
- modify: !!editableProfile,
121
- predicate: _solidUi.ns.solid('community'),
122
- noun: 'community'
123
- });
124
-
125
- // heading('The style of your public profile') headings are in form now
126
- renderProfileForm(main, me);
127
- heading('Thank you for filling your profile.');
128
- })["catch"](function (error) {
129
- statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, error, '#fee'));
130
- });
131
- return div;
132
- }
133
- };
134
- var _default = exports["default"] = editProfileView;
135
- //# sourceMappingURL=editProfile.view.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editProfile.view.js","names":["_rdflib","require","_solidUi","_profile","profileFormText","highlightColor","style","editProfileView","global","icon","icons","iconBase","name","label","render","subject","context","dom","store","session","complainIfBad","ok","mess","div","appendChild","widgets","errorMessageBlock","renderProfileForm","preferencesForm","sym","preferencesFormDoc","doc","holds","undefined","parse","uri","appendForm","editableProfile","createElement","setAttribute","concat","table","main","bottom","statusArea","comment","str","p","textContent","heading","h","profileContext","me","login","ensureLoadedProfile","then","theContext","profile","updater","Error","any","ns","solid","editable","paneDiv","attachmentList","modify","predicate","foaf","noun","error","_default","exports"],"sources":["../../src/profile/editProfile.view.ts"],"sourcesContent":["/**\n * Profile Editing App Pane\n *\n * Unlike view panes, this is available any place whatever the real subject,\n * and allows the user to edit their own profile.\n *\n * Usage: paneRegistry.register('profile/profilePane')\n * or standalone script adding onto existing mashlib.\n */\n\nimport { PaneDefinition } from 'pane-registry'\nimport { NamedNode, parse, Store, sym } from 'rdflib'\nimport { icons, login, ns, style, widgets } from 'solid-ui'\nimport { paneDiv } from './profile.dom'\nimport profileFormText from './profileFormText.ttl'\n\nconst highlightColor = style.highlightColor || '#7C4DFF'\n\nconst editProfileView: PaneDefinition = {\n global: true,\n\n icon: icons.iconBase + 'noun_492246.svg',\n\n name: 'editProfile',\n\n label: () => null,\n\n render: function (subject, context) {\n const dom = context.dom\n const store = context.session.store as Store\n\n function complainIfBad (ok: Boolean, mess: any) {\n if (ok) return\n div.appendChild(widgets.errorMessageBlock(dom, mess, '#fee'))\n }\n\n function renderProfileForm (div: HTMLElement, subject: NamedNode) {\n const preferencesForm = sym('https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#this')\n const preferencesFormDoc = preferencesForm.doc()\n if (!store.holds(undefined, undefined, undefined, preferencesFormDoc)) {\n // If not loaded already\n parse(profileFormText, store, preferencesFormDoc.uri, 'text/turtle', () => null) // Load form directly\n }\n\n widgets.appendForm(\n dom,\n div,\n {},\n subject,\n preferencesForm,\n editableProfile,\n complainIfBad\n )\n } // renderProfileForm\n\n const div = dom.createElement('div')\n let editableProfile: NamedNode | null\n div.setAttribute('style', `border: 0.3em solid ${highlightColor}; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;`)\n\n const table = div.appendChild(dom.createElement('table'))\n // const top = table.appendChild(dom.createElement('tr'))\n const main = table.appendChild(dom.createElement('tr'))\n const bottom = table.appendChild(dom.createElement('tr'))\n const statusArea = bottom.appendChild(dom.createElement('div'))\n statusArea.setAttribute('style', 'padding: 0.7em;')\n\n function comment (str: string) {\n const p = main.appendChild(dom.createElement('p'))\n p.setAttribute('style', 'padding: 1em;')\n p.textContent = str\n return p\n }\n\n function heading (str: string) {\n const h = main.appendChild(dom.createElement('h3'))\n h.setAttribute('style', 'color:' + highlightColor + ';')\n h.textContent = str\n return h\n }\n\n const profileContext = {\n dom: dom,\n div: main,\n statusArea: statusArea,\n me: null\n }\n login.ensureLoadedProfile(profileContext)\n .then(theContext => {\n const me = theContext.me!\n\n heading('Edit your public profile')\n\n const profile = me.doc()\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n if (store.any(me, ns.solid('editableProfile'))) {\n editableProfile = store.any(me as any, ns.solid('editableProfile')) as NamedNode\n } else if (store.updater.editable(profile.uri, store)) {\n editableProfile = profile\n } else {\n statusArea.appendChild(widgets.errorMessageBlock(dom, `⚠️ Your profile ${profile} is not editable, so we cannot do much here.`, 'straw'))\n return\n }\n\n comment(`Everything you put here will be public.\n There will be other places to record private things.`)\n\n heading('Your contact information')\n\n main.appendChild(paneDiv(context, me, 'contact'))\n\n\n heading('People you know who have WebIDs')\n\n comment(`This is your public social network.\n Only put people here to whom you are happy to be publicly connected.\n (You can always keep private track of friends and family in your contacts.)`)\n\n // TODO: would be useful to explain what it means to \"drag people\"\n // what is it that is being dragged?\n // is there a way to search for people (or things to drag) on this page?\n if (editableProfile) {\n comment('Drag people onto the target below to add people.')\n }\n\n widgets.attachmentList(dom, me, main, {\n doc: profile,\n modify: !!editableProfile,\n predicate: ns.foaf('knows'),\n noun: 'friend'\n })\n\n heading('Communities you participate in')\n\n comment(`These are organizations and projects (etc) whose stuff you share`)\n\n // TODO: would be useful to explain what it means to \"drag organizations\"\n // what is it that is being dragged?\n // is there a way to search for people (or things to drag) on this page?\n // Also provide a way of using cut and paste\n if (editableProfile) {\n comment('Drag organizations onto the target below to add organizations.')\n }\n\n widgets.attachmentList(dom, me, main, {\n doc: profile,\n modify: !!editableProfile,\n predicate: ns.solid('community'),\n noun: 'community'\n })\n\n // heading('The style of your public profile') headings are in form now\n renderProfileForm(main, me)\n\n heading('Thank you for filling your profile.')\n }).catch(error => {\n statusArea.appendChild(widgets.errorMessageBlock(dom, error, '#fee'))\n })\n return div\n }\n}\n\nexport default editProfileView\n"],"mappings":";;;;;;AAWA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAAA,IAAAG,eAAA;AAgBA,IAAMC,cAAc,GAAGC,cAAK,CAACD,cAAc,IAAI,SAAS;AAExD,IAAME,eAA+B,GAAG;EACtCC,MAAM,EAAE,IAAI;EAEZC,IAAI,EAAEC,cAAK,CAACC,QAAQ,GAAG,iBAAiB;EAExCC,IAAI,EAAE,aAAa;EAEnBC,KAAK,EAAE,SAAAA,MAAA;IAAA,OAAM,IAAI;EAAA;EAEjBC,MAAM,EAAE,SAAAA,OAAUC,OAAO,EAAEC,OAAO,EAAE;IAClC,IAAMC,GAAG,GAAGD,OAAO,CAACC,GAAG;IACvB,IAAMC,KAAK,GAAGF,OAAO,CAACG,OAAO,CAACD,KAAc;IAE5C,SAASE,aAAaA,CAAEC,EAAW,EAAEC,IAAS,EAAE;MAC9C,IAAID,EAAE,EAAE;MACRE,GAA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CAAC;;MAEF;MACA1C,iBAAiB,CAACe,IAAI,EAAEU,EAAE,CAAC;MAE3BH,OAAO,CAAC,qCAAqC,CAAC;IAChD,CAAC,CAAC,SAAM,CAAC,UAAAqB,KAAK,EAAI;MAChB1B,UAAU,CAACpB,WAAW,CAACC,gBAAO,CAACC,iBAAiB,CAACT,GAAG,EAAEqD,KAAK,EAAE,MAAM,CAAC,CAAC;IACvE,CAAC,CAAC;IACJ,OAAO/C,GAAG;EACZ;AACF,CAAC;AAAA,IAAAgD,QAAA,GAAAC,OAAA,cAEcjE,eAAe","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- import { DataBrowserContext } from 'pane-registry';
2
- import { NamedNode } from 'rdflib';
3
- export declare function paneDiv(context: DataBrowserContext, subject: NamedNode, paneName: string): HTMLElement;
4
- //# sourceMappingURL=profile.dom.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.dom.d.ts","sourceRoot":"","sources":["../../src/profile/profile.dom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,wBAAgB,OAAO,CACrB,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,MAAM,GACf,WAAW,CAYb"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.paneDiv = paneDiv;
7
- function paneDiv(context, subject, paneName) {
8
- var view = context.session.paneRegistry.byName(paneName);
9
- if (!view) {
10
- var warning = context.dom.createElement('div');
11
- warning.innerText = "Unable to load view: ".concat(paneName);
12
- return warning;
13
- }
14
- var viewContainer = view.render(subject, context);
15
- viewContainer.setAttribute('style', 'border: 0.3em solid #444; border-radius: 0.5em');
16
- return viewContainer;
17
- }
18
- //# sourceMappingURL=profile.dom.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.dom.js","names":["paneDiv","context","subject","paneName","view","session","paneRegistry","byName","warning","dom","createElement","innerText","concat","viewContainer","render","setAttribute"],"sources":["../../src/profile/profile.dom.ts"],"sourcesContent":["import { DataBrowserContext } from 'pane-registry'\nimport { NamedNode } from 'rdflib'\n\nexport function paneDiv (\n context: DataBrowserContext,\n subject: NamedNode,\n paneName: string\n): HTMLElement {\n const view = context.session.paneRegistry.byName(paneName)\n if (!view) {\n const warning = context.dom.createElement('div')\n warning.innerText = `Unable to load view: ${paneName}`\n return warning\n }\n const viewContainer = view.render(subject, context)\n viewContainer.setAttribute(\n 'style', 'border: 0.3em solid #444; border-radius: 0.5em'\n )\n return viewContainer\n}\n"],"mappings":";;;;;;AAGO,SAASA,OAAOA,CACrBC,OAA2B,EAC3BC,OAAkB,EAClBC,QAAgB,EACH;EACb,IAAMC,IAAI,GAAGH,OAAO,CAACI,OAAO,CAACC,YAAY,CAACC,MAAM,CAACJ,QAAQ,CAAC;EAC1D,IAAI,CAACC,IAAI,EAAE;IACT,IAAMI,OAAO,GAAGP,OAAO,CAACQ,GAAG,CAACC,aAAa,CAAC,KAAK,CAAC;IAChDF,OAAO,CAACG,SAAS,2BAAAC,MAAA,CAA2BT,QAAQ,CAAE;IACtD,OAAOK,OAAO;EAChB;EACA,IAAMK,aAAa,GAAGT,IAAI,CAACU,MAAM,CAACZ,OAAO,EAAED,OAAO,CAAC;EACnDY,aAAa,CAACE,YAAY,CACxB,OAAO,EAAE,gDACX,CAAC;EACD,OAAOF,aAAa;AACtB","ignoreList":[]}
@@ -1,164 +0,0 @@
1
- /**
2
- * Profile Editing App Pane
3
- *
4
- * Unlike view panes, this is available any place whatever the real subject,
5
- * and allows the user to edit their own profile.
6
- *
7
- * Usage: paneRegistry.register('profile/profilePane')
8
- * or standalone script adding onto existing mashlib.
9
- */
10
-
11
- import { PaneDefinition } from 'pane-registry'
12
- import { NamedNode, parse, Store, sym } from 'rdflib'
13
- import { icons, login, ns, style, widgets } from 'solid-ui'
14
- import { paneDiv } from './profile.dom'
15
- import profileFormText from './profileFormText.ttl'
16
-
17
- const highlightColor = style.highlightColor || '#7C4DFF'
18
-
19
- const editProfileView: PaneDefinition = {
20
- global: true,
21
-
22
- icon: icons.iconBase + 'noun_492246.svg',
23
-
24
- name: 'editProfile',
25
-
26
- label: () => null,
27
-
28
- render: function (subject, context) {
29
- const dom = context.dom
30
- const store = context.session.store as Store
31
-
32
- function complainIfBad (ok: Boolean, mess: any) {
33
- if (ok) return
34
- div.appendChild(widgets.errorMessageBlock(dom, mess, '#fee'))
35
- }
36
-
37
- function renderProfileForm (div: HTMLElement, subject: NamedNode) {
38
- const preferencesForm = sym('https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#this')
39
- const preferencesFormDoc = preferencesForm.doc()
40
- if (!store.holds(undefined, undefined, undefined, preferencesFormDoc)) {
41
- // If not loaded already
42
- parse(profileFormText, store, preferencesFormDoc.uri, 'text/turtle', () => null) // Load form directly
43
- }
44
-
45
- widgets.appendForm(
46
- dom,
47
- div,
48
- {},
49
- subject,
50
- preferencesForm,
51
- editableProfile,
52
- complainIfBad
53
- )
54
- } // renderProfileForm
55
-
56
- const div = dom.createElement('div')
57
- let editableProfile: NamedNode | null
58
- div.setAttribute('style', `border: 0.3em solid ${highlightColor}; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;`)
59
-
60
- const table = div.appendChild(dom.createElement('table'))
61
- // const top = table.appendChild(dom.createElement('tr'))
62
- const main = table.appendChild(dom.createElement('tr'))
63
- const bottom = table.appendChild(dom.createElement('tr'))
64
- const statusArea = bottom.appendChild(dom.createElement('div'))
65
- statusArea.setAttribute('style', 'padding: 0.7em;')
66
-
67
- function comment (str: string) {
68
- const p = main.appendChild(dom.createElement('p'))
69
- p.setAttribute('style', 'padding: 1em;')
70
- p.textContent = str
71
- return p
72
- }
73
-
74
- function heading (str: string) {
75
- const h = main.appendChild(dom.createElement('h3'))
76
- h.setAttribute('style', 'color:' + highlightColor + ';')
77
- h.textContent = str
78
- return h
79
- }
80
-
81
- const profileContext = {
82
- dom: dom,
83
- div: main,
84
- statusArea: statusArea,
85
- me: null
86
- }
87
- login.ensureLoadedProfile(profileContext)
88
- .then(theContext => {
89
- const me = theContext.me!
90
-
91
- heading('Edit your public profile')
92
-
93
- const profile = me.doc()
94
- if (!store.updater) {
95
- throw new Error('Store has no updater')
96
- }
97
- if (store.any(me, ns.solid('editableProfile'))) {
98
- editableProfile = store.any(me as any, ns.solid('editableProfile')) as NamedNode
99
- } else if (store.updater.editable(profile.uri, store)) {
100
- editableProfile = profile
101
- } else {
102
- statusArea.appendChild(widgets.errorMessageBlock(dom, `⚠️ Your profile ${profile} is not editable, so we cannot do much here.`, 'straw'))
103
- return
104
- }
105
-
106
- comment(`Everything you put here will be public.
107
- There will be other places to record private things.`)
108
-
109
- heading('Your contact information')
110
-
111
- main.appendChild(paneDiv(context, me, 'contact'))
112
-
113
-
114
- heading('People you know who have WebIDs')
115
-
116
- comment(`This is your public social network.
117
- Only put people here to whom you are happy to be publicly connected.
118
- (You can always keep private track of friends and family in your contacts.)`)
119
-
120
- // TODO: would be useful to explain what it means to "drag people"
121
- // what is it that is being dragged?
122
- // is there a way to search for people (or things to drag) on this page?
123
- if (editableProfile) {
124
- comment('Drag people onto the target below to add people.')
125
- }
126
-
127
- widgets.attachmentList(dom, me, main, {
128
- doc: profile,
129
- modify: !!editableProfile,
130
- predicate: ns.foaf('knows'),
131
- noun: 'friend'
132
- })
133
-
134
- heading('Communities you participate in')
135
-
136
- comment(`These are organizations and projects (etc) whose stuff you share`)
137
-
138
- // TODO: would be useful to explain what it means to "drag organizations"
139
- // what is it that is being dragged?
140
- // is there a way to search for people (or things to drag) on this page?
141
- // Also provide a way of using cut and paste
142
- if (editableProfile) {
143
- comment('Drag organizations onto the target below to add organizations.')
144
- }
145
-
146
- widgets.attachmentList(dom, me, main, {
147
- doc: profile,
148
- modify: !!editableProfile,
149
- predicate: ns.solid('community'),
150
- noun: 'community'
151
- })
152
-
153
- // heading('The style of your public profile') headings are in form now
154
- renderProfileForm(main, me)
155
-
156
- heading('Thank you for filling your profile.')
157
- }).catch(error => {
158
- statusArea.appendChild(widgets.errorMessageBlock(dom, error, '#fee'))
159
- })
160
- return div
161
- }
162
- }
163
-
164
- export default editProfileView
@@ -1,20 +0,0 @@
1
- import { DataBrowserContext } from 'pane-registry'
2
- import { NamedNode } from 'rdflib'
3
-
4
- export function paneDiv (
5
- context: DataBrowserContext,
6
- subject: NamedNode,
7
- paneName: string
8
- ): HTMLElement {
9
- const view = context.session.paneRegistry.byName(paneName)
10
- if (!view) {
11
- const warning = context.dom.createElement('div')
12
- warning.innerText = `Unable to load view: ${paneName}`
13
- return warning
14
- }
15
- const viewContainer = view.render(subject, context)
16
- viewContainer.setAttribute(
17
- 'style', 'border: 0.3em solid #444; border-radius: 0.5em'
18
- )
19
- return viewContainer
20
- }