solid-panes 3.5.36 → 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 (119) 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 -28
  52. package/lib/outline/manager.js.map +1 -1
  53. package/lib/outline/manager.test.d.ts +2 -0
  54. package/lib/outline/manager.test.d.ts.map +1 -0
  55. package/lib/outline/manager.test.js +4 -4
  56. package/lib/outline/manager.test.js.map +1 -1
  57. package/lib/outline/propertyViews.js +1 -1
  58. package/lib/outline/propertyViews.js.map +1 -1
  59. package/lib/outline/propertyViews.test.d.ts +2 -0
  60. package/lib/outline/propertyViews.test.d.ts.map +1 -0
  61. package/lib/outline/propertyViews.test.js +1 -0
  62. package/lib/outline/propertyViews.test.js.map +1 -1
  63. package/lib/outline/userInput.js.map +1 -1
  64. package/lib/pad/padPane.js.map +1 -1
  65. package/lib/playlist/playlistPane.js.map +1 -1
  66. package/lib/registerPanes.js +8 -3
  67. package/lib/registerPanes.js.map +1 -1
  68. package/lib/schedule/schedulePane.js +1 -1
  69. package/lib/schedule/schedulePane.js.map +1 -1
  70. package/lib/sharing/sharingPane.js.map +1 -1
  71. package/lib/slideshow/slideshowPane.js +1 -1
  72. package/lib/slideshow/slideshowPane.js.map +1 -1
  73. package/lib/socialPane.js.map +1 -1
  74. package/lib/tabbed/tabbedPane.js +3 -3
  75. package/lib/tabbed/tabbedPane.js.map +1 -1
  76. package/lib/tableViewPane.js.map +1 -1
  77. package/lib/transaction/pane.js.map +1 -1
  78. package/lib/transaction/period.js.map +1 -1
  79. package/lib/trip/tripPane.js.map +1 -1
  80. package/lib/trustedApplications/trustedApplications.dom.js +1 -1
  81. package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
  82. package/lib/trustedApplications/trustedApplications.test.d.ts +2 -0
  83. package/lib/trustedApplications/trustedApplications.test.d.ts.map +1 -0
  84. package/lib/trustedApplications/trustedApplications.test.js +1 -1
  85. package/lib/trustedApplications/trustedApplications.test.js.map +1 -1
  86. package/lib/trustedApplications/trustedApplications.utils.js +5 -5
  87. package/lib/trustedApplications/trustedApplications.utils.js.map +1 -1
  88. package/lib/trustedApplications/trustedApplications.view.js +3 -3
  89. package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
  90. package/lib/ui/pane.js.map +1 -1
  91. package/lib/versionInfo.js +3 -3
  92. package/lib/versionInfo.js.map +1 -1
  93. package/lib/video/videoPane.js.map +1 -1
  94. package/package.json +4 -4
  95. package/src/mainPage/header.ts +6 -3
  96. package/src/outline/manager.js +6 -10
  97. package/src/outline/propertyViews.test.ts +2 -1
  98. package/src/registerPanes.js +7 -2
  99. package/src/versionInfo.ts +3 -3
  100. package/tsconfig.json +7 -1
  101. package/.babelrc +0 -16
  102. package/.eslintignore +0 -3
  103. package/.eslintrc +0 -26
  104. package/.github/workflows/ci.yml +0 -82
  105. package/.nvmrc +0 -1
  106. package/lib/outline/licenseOptions.js +0 -80
  107. package/lib/outline/licenseOptions.js.map +0 -1
  108. package/lib/profile/editProfile.view.d.ts +0 -13
  109. package/lib/profile/editProfile.view.d.ts.map +0 -1
  110. package/lib/profile/editProfile.view.js +0 -135
  111. package/lib/profile/editProfile.view.js.map +0 -1
  112. package/lib/profile/profile.dom.d.ts +0 -4
  113. package/lib/profile/profile.dom.d.ts.map +0 -1
  114. package/lib/profile/profile.dom.js +0 -18
  115. package/lib/profile/profile.dom.js.map +0 -1
  116. package/src/outline/licenseOptions.js +0 -105
  117. package/src/profile/editProfile.view.ts +0 -164
  118. package/src/profile/profile.dom.ts +0 -20
  119. package/src/profile/profileFormText.ttl +0 -386
@@ -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
- }
@@ -1,386 +0,0 @@
1
- # 20210404a
2
- @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
3
- @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
4
- @prefix foaf: <http://xmlns.com/foaf/0.1/>.
5
- @prefix owl: <http://www.w3.org/2002/07/owl#>.
6
- @prefix solid: <http://www.w3.org/ns/solid/terms#>.
7
- @prefix ui: <http://www.w3.org/ns/ui#>.
8
- @prefix schema: <http://schema.org/>.
9
- @prefix vcard: <http://www.w3.org/2006/vcard/ns#>.
10
-
11
- @prefix org: <http://www.w3.org/ns/org#>.
12
- @prefix esco: <http://data.europa.eu/esco/model#>.
13
- @prefix wd: <http://www.wikidata.org/entity/>.
14
- @prefix wdt: <http://www.wikidata.org/prop/direct/>.
15
-
16
- @prefix : <#>.
17
-
18
- :this
19
- <http://purl.org/dc/elements/1.1/title> "Profile form" ;
20
- a ui:Form ;
21
- # ui:part :backgroundColor, :highlightColor;
22
- ui:parts (
23
- :styleGroup
24
- :nicknameField
25
- :pronounsForm
26
- :LanguagesPrompt :LanguagesForm
27
- :CVGroup
28
- :SkillsPrompt :SkillsForm
29
- ).
30
-
31
- :styleGroup a ui:Group; ui:weight 0; ui:parts ( :styleHeading :backgroundColor :highlightColor ).
32
- :styleHeading a ui:Heading; ui:contents "The style of your public profile.".
33
- :backgroundColor a ui:ColorField; ui:property solid:profileBackgroundColor;
34
- ui:label "Background color"; ui:default "#ffffff".
35
- :highlightColor a ui:ColorField; ui:property solid:profileHighlightColor;
36
- ui:label "Highlight color"; ui:default "#000000".
37
-
38
- # Nickname
39
-
40
- :nicknameField a ui:SingleLineTextField; ui:size 12; ui:property foaf:nick;
41
- ui:label "Short name for chats, etc."@en, "nom court"@fr.
42
-
43
- # Pronouns
44
-
45
- :pronounsForm a ui:Group; ui:weight 0; ui:parts ( :pronounsPrompt :subjectPronounForm :objectPronounForm :relativePronounForm) .
46
-
47
- :pronounsPrompt a ui:Comment; ui:contents "What are your pronouns?" .
48
-
49
- :subjectPronounForm a ui:SingleLineTextField; ui:property solid:preferredSubjectPronoun;
50
- ui:size 10; ui:label "he/she/they..." .
51
- :objectPronounForm a ui:SingleLineTextField; ui:property solid:preferredObjectPronoun;
52
- ui:size 10; ui:label "him/her/them..." .
53
- :relativePronounForm a ui:SingleLineTextField; ui:property solid:preferredRelativePronoun;
54
- ui:size 10; ui:label "his/hers/theirs..." .
55
-
56
- # Curriculum Vitae: membership of organizations
57
-
58
- :CVHeading a ui:Heading; ui:contents "Public Curriculum Vitae".
59
- :CVPrompt a ui:Comment; ui:contents "What organizations have you been involved with?" .
60
-
61
- :CVGroup a ui:Group; ui:weight 1; ui:parts ( :CVHeading :CVPrompt :involvementWithOrganizationsForm ).
62
-
63
-
64
- solid:Role a rdfs:Class; owl:oneOf ( solid:CurrentRole solid:FormerRole solid:FutureRole ). # Future Role too?
65
-
66
- org:member owl:inverse [ ui:label "involvement with company, org etc" ]. # timelimited involvement
67
-
68
- :involvementWithOrganizationsForm a ui:Multiple;
69
- ui:label "Involvement with Organization";
70
- ui:property org:member; ui:reverse true; # link back from role to member
71
- ui:ordered false; # Allow user to order CV secions rather than force date order? No.
72
- ui:part :RoleMembershipForm.
73
-
74
- # This is a big important form for one of a series of roles in the list.
75
-
76
- :RoleMembershipForm a ui:Group; ui:weight 3; ui:parts ( :MembershipFormHeading :roleNameField
77
- :escoOccupationField :orgField :RoleClassifier :RoleDatesForm :RoleDescriptionForm).
78
-
79
- :MembershipFormHeading a ui:Heading; ui:contents "Details of this role"@en, "Détailes de ce rôle"@fr .
80
-
81
- :orgField a ui:Choice; ui:label "Organization"@en, "Organization"@fr;
82
- ui:canMintNew true; ui:use :OrganizationCreationForm ;
83
- ui:property org:organization;
84
- ui:from vcard:Organization .
85
- :roleNameField a ui:SingleLineTextField; ui:property vcard:role; ui:size 60 .
86
-
87
- :escoOccupationField a ui:AutocompleteField;
88
- ui:label "occupation"; ui:size 60;
89
- ui:property org:role;
90
- ui:dataSource :ESCO_Occupation_DataSource;
91
- ui:targetClass schema:Occupation .
92
-
93
- :ESCO_Occupation_DataSource a ui:DataSource;
94
- schema:name "ESCO";
95
- ui:targetClass schema:Occupation ;
96
- schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;
97
- ui:searchByNameURI "https://ec.europa.eu/esco/api/search?language=$(language)&type=occupation&text=$(name)".
98
-
99
- :instituteIdentityField a ui:AutocompleteField; ui:label "in wikidata";
100
- ui:size 60;
101
- ui:property solid:publicId; ui:dataSource :WikidataOnOrganizations.
102
-
103
- :WikidataOnOrganizations a ui:DataSource ;
104
- schema:name "Wikidata";
105
- ui:endpoint "https://query.wikidata.org/sparql" ;
106
- ui:targetClass <http://www.wikidata.org/entity/Q43229>; # Use if nothing else
107
- ui:searchByNameQuery """SELECT ?subject ?name
108
- WHERE {
109
- ?klass wdt:P279* $(targetClass) .
110
- ?subject wdt:P31 ?klass .
111
- ?subject rdfs:label ?name.
112
- FILTER regex(?name, "$(name)", "i")
113
- } LIMIT $(limit) """ .
114
-
115
- :WikidataOnOrganizations ui:classMap
116
- [ ui:internalClass schema:Corporation; ui:externalClass <http://www.wikidata.org/entity/Q6881511>], #Enterprise is for-profit
117
- [ ui:internalClass schema:EducationalOrganization; ui:externalClass <http://www.wikidata.org/entity/Q178706>], #insitution
118
- [ ui:internalClass schema:ResearchOrganization; ui:externalClass <http://www.wikidata.org/entity/Q31855>], # reearch insitutie
119
- [ ui:internalClass schema:GovernmentOrganization; ui:externalClass <http://www.wikidata.org/entity/Q327333>], #government agency
120
- [ ui:internalClass schema:MedicalOrganization; ui:externalClass <http://www.wikidata.org/entity/Q4287745>],
121
- [ ui:internalClass schema:MusicGroup; ui:externalClass <http://www.wikidata.org/entity/Q32178211>], #music organization
122
- [ ui:internalClass schema:NGO; ui:externalClass <http://www.wikidata.org/entity/Q163740>], #nonprofit organization @@
123
- [ ui:internalClass schema:Occupation; ui:externalClass <http://www.wikidata.org/entity/Q28640>], # superclass: Profession
124
- [ ui:internalClass schema:Organization; ui:externalClass <http://www.wikidata.org/entity/Q43229>], # Superclass; Organization
125
- [ ui:internalClass schema:Project; ui:externalClass <http://www.wikidata.org/entity/Q170584>],
126
- [ ui:internalClass schema:SportsOrganization; ui:externalClass <http://www.wikidata.org/entity/Q4438121>] .
127
-
128
-
129
- # eposodes in one's career - Roles
130
-
131
- solid:Role owl:disjointUnionOf ( solid:PastRole solid:CurrentRole solid:FutureRole ) .
132
- solid:PastRole a rdfs:Class; rdfs:label "former role"@en, "ancien rôle"@fr, "vergangene Rolle"@de, "rol anterior"@es .
133
- solid:CurrentRole a rdfs:Class; rdfs:label "current role"@en, "rôle actuel"@fr, "momentane Rolle"@de , "rol actual"@es .
134
- solid:FutureRole a rdfs:Class; rdfs:label "future role"@en, "rôle à venir"@fr, "zukünftige Rolle"@de, "rol futuro"@es .
135
-
136
- :RoleDatesGroup a ui:Group; ui:weight 0; ui:parts ( :RoleClassifier :RoleDatesForm ) .
137
- :RoleClassifier a ui:Classifier; ui:label "What sort of role?"@en;
138
- ui:category solid:Role .
139
-
140
- :RoleDatesForm a ui:Options; ui:dependingOn rdf:type; ui:case
141
- [ ui:for solid:PastRole; ui:use :TwoDateForm ],
142
- [ ui:for solid:CurrentRole; ui:use :StartDateForm ],
143
- [ ui:for solid:FutureRole; ui:use :StartDateForm ].
144
-
145
- :StartDateForm a ui:DateField; ui:label "start"@en,"début"@fr;
146
- ui:property schema:startDate .
147
- :TwoDateForm a ui:Group; ui:weight 0; ui:parts ( :StartDateForm :EndDateForm ) .
148
- :EndDateForm a ui:DateField; ui:label "end"@en,"fin"@fr;
149
- ui:property schema:endDate .
150
-
151
- :RoleDescriptionForm a ui:MultiLineTextField; ui:property schema:description;
152
- ui:label "Describe your role" .
153
-
154
- # Organizations
155
-
156
- vcard:Organization ui:creationForm :OrganizationCreationForm .
157
-
158
- # Ontology data to drive the classifier
159
-
160
- solid:InterestingOrganization owl:disjointUnionOf (
161
- # Airline - a Corporation
162
- # Consortium - a Corporation or a NGO
163
- schema:Corporation
164
- schema:EducationalOrganization
165
- schema:ResearchOrganization # Proposed. https://github.com/schemaorg/schemaorg/issues/2877
166
- # FundingScheme - eh?
167
- schema:GovernmentOrganization
168
- # LibrarySystem
169
- # LocalBusiness - Corporation
170
- # MedicalOrganization - a Corporation or a NGO
171
- schema:NGO
172
- # NewsMediaOrganization - a Corporation or a NGO
173
- schema:PerformingGroup # a band
174
- schema:Project # like Solid
175
- schema:SportsOrganization # a Team
176
- solid:OtherOrganization
177
- ) .
178
-
179
- # This until the schema.org ontology adopts it
180
- schema:ResearchOrganization a rdfs:Class; rdfs:label "Research Organization"@en, "Organization de Recherche"@fr ,
181
- "organización de investigación"@es, "منظمة البحث"@ar, "अनुसंधान संगठन"@hi, "Forschungsorganisation"@de, "shirika la utafiti"@sw .
182
-
183
- :OrganizationCreationForm a ui:Form; schema:name "Form for editing an organization using public data" ;
184
- ui:parts ( :OrgClassifier :OrgSwitch :OrganizationNameField :homePageURIField ) .
185
-
186
-
187
- :OrgClassifier a ui:Classifier; ui:label "What sort of organization?"@en;
188
- ui:category solid:InterestingOrganization .
189
-
190
- :OrganizationNameField
191
- a ui:SingleLineTextField ;
192
- ui:label "Organization Name";
193
- ui:maxLength "200" ;
194
- ui:property schema:name ;
195
- ui:size 80 .
196
-
197
- :homePageURIField a ui:NamedNodeURIField; ui:size 80;
198
- ui:label "Home page URI"@en;
199
- ui:property schema:uri . # @@ ??
200
-
201
- :initituteTypeField a ui:Classifier;
202
- ui:label "What sort of organization";
203
- ui:category solid:InterestingOrganization .
204
-
205
- # Depending on the type of org, chose a different form
206
-
207
- :OrgSwitch a ui:Options; ui:dependingOn rdf:type;
208
- ui:case
209
- [ ui:for schema:Corporation; ui:use :CorporationForm ],
210
- [ ui:for schema:GovernmentOrganization; ui:use :GovernmentOrganizationForm ],
211
- [ ui:for schema:PerformingGroup; ui:use :PerformingGroupForm ],
212
- [ ui:for schema:Project; ui:use :ProjectForm ],
213
- [ ui:for schema:NGO; ui:use :NGOForm ],
214
- [ ui:for schema:EducationalOrganization; ui:use :EducationalOrganizationForm ],
215
- [ ui:for schema:ResearchOrganization; ui:use :ResearchOrganizationForm ],
216
- [ ui:for :SportsOrganization; ui:use :SportsOrganizationForm ],
217
- [ ui:for solid:OtherOrganization; ui:use :OtherOrganizationForm ].
218
-
219
-
220
- :CorporationForm a ui:Group; ui:weight 0; ui:parts ( :CorporationPrompt :CorporationAutocomplete ) .
221
-
222
- :CorporationPrompt a ui:Comment; ui:contents "Which corporation?".
223
-
224
- :CorporationAutocomplete a ui:AutocompleteField;
225
- a ui:AutocompleteField; ui:label "Corporation in wikidata";
226
- ui:size 60;
227
- ui:targetClass <http://www.wikidata.org/entity/Q6881511>; # Enterprise
228
- ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.
229
-
230
- :WikidataInstancesByName a ui:DataSource ;
231
- schema:name "Wikidata instances by name";
232
- ui:endpoint "https://query.wikidata.org/sparql" ;
233
- ui:searchByNameQuery """SELECT ?subject ?name
234
- WHERE {
235
- ?klass wdt:P279* $(targetClass) .
236
- ?subject wdt:P31 ?klass .
237
- ?subject rdfs:label ?name.
238
- FILTER regex(?name, "$(name)", "i")
239
- } LIMIT $(limit) """ ;
240
-
241
- # Note this form of the query is very experimental
242
- ui:searchByName [ ui:construct { ?subject schema:name ?name } ;
243
- ui:where { ?klass wdt:P279 ?targetClass .
244
- ?subject wdt:P31 ?klass; rdfs:label ?name .
245
- };
246
- ].
247
-
248
- :GovernmentOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :GovernmentOrganizationPrompt :GovernmentOrganizationAutocomplete ) .
249
-
250
- :GovernmentOrganizationPrompt a ui:Comment; ui:contents "Which GovernmentOrganization?".
251
-
252
- :GovernmentOrganizationAutocomplete
253
- a ui:AutocompleteField; ui:label "GovernmentOrganization in wikidata";
254
- ui:size 60;
255
- ui:targetClass <http://www.wikidata.org/entity/Q327333>; # GovernmentOrganization
256
- ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.
257
-
258
- :EducationalOrganizationForm a ui:Group; ui:weight 1; ui:parts ( :EducationalOrganizationPrompt :EducationalOrganizationAutocomplete ) .
259
-
260
- :EducationalOrganizationPrompt a ui:Comment; ui:contents "Which Educational Organization?".
261
-
262
- :EducationalOrganizationAutocomplete
263
- a ui:AutocompleteField; ui:label "Educational Organization in wikidata";
264
- ui:size 60;
265
- ui:targetClass <http://www.wikidata.org/entity/Q2385804>; # EducationalOrganization
266
- ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.
267
-
268
-
269
- :ResearchOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :ResearchOrganizationPrompt :ResearchOrganizationAutocomplete ) .
270
-
271
- :ResearchOrganizationPrompt a ui:Comment; ui:contents "Which Research Organization?".
272
-
273
- :ResearchOrganizationAutocomplete
274
- a ui:AutocompleteField; ui:label "Research Insitute in wikidata";
275
- ui:size 60;
276
- ui:targetClass <http://www.wikidata.org/entity/Q31855>; # research institute
277
- ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.
278
-
279
-
280
- :NGOForm a ui:Group; ui:weight 0; ui:parts ( :NGOPrompt :NGOAutocomplete ) .
281
-
282
- :NGOPrompt a ui:Comment; ui:contents "Which NGO?".
283
-
284
- :NGOAutocomplete
285
- a ui:AutocompleteField; ui:label "NGO in wikidata";
286
- ui:size 60;
287
- ui:targetClass <http://www.wikidata.org/entity/Q163740>; # Non-profit org
288
- ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.
289
-
290
- :PerformingGroupForm a ui:Group; ui:weight 0; ui:parts ( :PerformingGroupPrompt :PerformingGroupAutocomplete ) .
291
-
292
- :PerformingGroupPrompt a ui:Comment; ui:contents "Which PerformingGroup?".
293
-
294
- :PerformingGroupAutocomplete
295
- a ui:AutocompleteField; ui:label "PerformingGroup in wikidata";
296
- ui:size 60;
297
- ui:targetClass <http://www.wikidata.org/entity/Q32178211>; # Music Org
298
- ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.
299
-
300
-
301
- :ProjectForm a ui:Group; ui:weight 0; ui:parts ( :ProjectPrompt :ProjectAutocomplete ) . # :ProjectAutocomplete - no: supress, as not in WD
302
-
303
- :ProjectPrompt a ui:Comment; ui:contents "Which Project?".
304
-
305
- :ProjectAutocomplete
306
- a ui:AutocompleteField; ui:label "Project in wikidata";
307
- ui:size 60;
308
- ui:targetClass <http://www.wikidata.org/entity/Q170584>; # Project
309
- ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.
310
-
311
- :SportsOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :SportsOrganizationPrompt :SportsOrganizationAutocomplete ) .
312
-
313
- :SportsOrganizationPrompt a ui:Comment; ui:contents "Which Sports Organization?".
314
-
315
- :SportsOrganizationAutocomplete
316
- a ui:AutocompleteField; ui:label "SportsOrganization in wikidata";
317
- ui:size 60;
318
- ui:targetClass <http://www.wikidata.org/entity/Q4438121>; # SportsOrganization
319
- ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.
320
-
321
- :OtherOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :OrganizationNameField :homePageURIField ) .
322
-
323
- #################### Skills
324
-
325
- :SkillsPrompt a ui:Comment; ui:contents "Skills?" .
326
-
327
- :SkillsForm a ui:Multiple;
328
- ui:label "Skills";
329
- ui:property schema:skills;
330
- ui:ordered false; # Allow reader to order skills
331
- ui:part :SkillForm.
332
-
333
- :SkillForm a ui:Group; ui:weight 1; ui:parts ( :escoSkillField ).
334
-
335
- # :skillNameField a ui:SingleLineTextField; ui:property vcard:role; ui:size 30 .
336
-
337
- :escoSkillField a ui:AutocompleteField;
338
- ui:label "skill"; ui:size 30;
339
- ui:property solid:publicId;
340
- ui:dataSource :ESCO_Skill_DataSource;
341
- ui:targetClass schema:Skill .
342
-
343
- :ESCO_Skill_DataSource a ui:DataSource;
344
- schema:name "ESCO Skill";
345
- ui:targetClass esco:Skill ;
346
- schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;
347
- ui:searchByNameURI "https://ec.europa.eu/esco/api/search?language=$(language)&limit=$(limit)&type=skill&text=$(name)".
348
-
349
- # Language
350
-
351
- :LanguagesPrompt a ui:Comment; ui:contents "Languages?" .
352
-
353
- :LanguagesForm a ui:Multiple;
354
- ui:label "Languages";
355
- ui:property schema:knowsLanguage; # @@@
356
- ui:ordered true; # Allow user to order languages most important first.
357
- ui:part :LanguageForm.
358
-
359
- :LanguageForm a ui:Group; ui:weight 1; ui:parts ( :WikidataLanguageField ).
360
-
361
- :WikidataLanguageField a ui:AutocompleteField;
362
- ui:label "Language"; ui:size 30;
363
- ui:property solid:publicId; # @@
364
- ui:dataSource :WikidataLanguageDataSource;
365
- ui:targetClass schema:Language .
366
-
367
- :WikidataLanguageDataSource
368
- schema:name "Wikidata languages";
369
- ui:endpoint "https://query.wikidata.org/sparql" ;
370
- ui:objectURIBase <https://www.w3.org/ns/iana/language-code/>;
371
- # Add this to any literal string returned as ?subject
372
-
373
- ui:searchByNameQuery """SELECT ?item ?subject ?name
374
- WHERE
375
- { ?item wdt:P305 ?subject .
376
- OPTIONAL {?item rdfs:label ?name}
377
- OPTIONAL {?item wdt:P1705 ?name}
378
- FILTER regex(?name, "$(name)", "i")
379
- FILTER regex(?subject, "^..$", "i")
380
- }""" .
381
- # Note we restrict code to two-letter codes with the second regex, so as to limit the deluge of languages
382
- # Hope there are not any important ones which have three-letter codes.
383
- # Omitted: SERVICE wikibase:label { bd:serviceParam wikibase:language "$(languages)". }
384
-
385
-
386
- # ENDS