solid-panes 5.1.0-1 → 5.1.0-2

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 (277) hide show
  1. package/dist/RDFXMLPane2.esm.js +1 -2
  2. package/dist/_virtual/~icons/lucide/cake.esm.js +1 -2
  3. package/dist/_virtual/~icons/lucide/camera.esm.js +1 -2
  4. package/dist/_virtual/~icons/lucide/circle-user-round.esm.js +1 -2
  5. package/dist/_virtual/~icons/lucide/folder-open.esm.js +1 -2
  6. package/dist/_virtual/~icons/lucide/help-circle.esm.js +1 -2
  7. package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js +1 -2
  8. package/dist/_virtual/~icons/lucide/mail.esm.js +1 -2
  9. package/dist/_virtual/~icons/lucide/map-pin.esm.js +1 -2
  10. package/dist/_virtual/~icons/lucide/pencil.esm.js +1 -2
  11. package/dist/_virtual/~icons/lucide/phone.esm.js +1 -2
  12. package/dist/_virtual/~icons/lucide/settings-2.esm.js +1 -2
  13. package/dist/_virtual/~icons/lucide/user-round-plus.esm.js +1 -2
  14. package/dist/_virtual/~icons/lucide/user.esm.js +1 -2
  15. package/dist/_virtual/~icons/lucide/users.esm.js +1 -2
  16. package/dist/_virtual/~icons/lucide/x.esm.js +1 -2
  17. package/dist/audio/audioPane.esm.js +1 -2
  18. package/dist/classInstancePane.esm.js +1 -2
  19. package/dist/components/editor-card/EditorCard.cjs.js +1 -1
  20. package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
  21. package/dist/components/editor-card/EditorCard.esm.js +6 -7
  22. package/dist/components/editor-card/EditorCard.styles.esm.js +1 -2
  23. package/dist/components/header/Header.cjs.js +1 -1
  24. package/dist/components/header/Header.cjs.js.map +1 -1
  25. package/dist/components/header/Header.esm.js +7 -8
  26. package/dist/components/header/Header.styles.esm.js +1 -2
  27. package/dist/components/navbar/Navbar.cjs.js +2 -2
  28. package/dist/components/navbar/Navbar.cjs.js.map +1 -1
  29. package/dist/components/navbar/Navbar.esm.js +8 -9
  30. package/dist/components/navbar/Navbar.styles.esm.js +1 -2
  31. package/dist/components/profile-heading/ProfileHeading.cjs.js +17 -17
  32. package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -1
  33. package/dist/components/profile-heading/ProfileHeading.esm.js +28 -29
  34. package/dist/components/profile-heading/ProfileHeading.styles.esm.js +1 -2
  35. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +1 -1
  36. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +2 -3
  37. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js +1 -2
  38. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js +1 -2
  39. package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js +1 -2
  40. package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +1 -2
  41. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js +1 -2
  42. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js +1 -2
  43. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js +0 -1
  44. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js +1 -2
  45. package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js +1 -2
  46. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js +1 -2
  47. package/dist/components/profile-heading/editor/textUtils.esm.js +1 -2
  48. package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js +1 -2
  49. package/dist/components/profile-heading/editor/texts/messageTexts.esm.js +1 -2
  50. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +3 -3
  51. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -1
  52. package/dist/components/profile-heading/editor/ui/dialog2.esm.js +4 -19
  53. package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -1
  54. package/dist/components/profile-heading/editor/ui/spinner.esm.js +1 -2
  55. package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js +1 -2
  56. package/dist/components/profile-heading/friendActions.esm.js +1 -2
  57. package/dist/components/profile-heading/profileHeadingData.esm.js +1 -2
  58. package/dist/dashboard/basicPreferences.esm.js +1 -2
  59. package/dist/dashboard/dashboardPane.esm.js +0 -1
  60. package/dist/dashboard/homepage.esm.js +1 -2
  61. package/dist/dashboard/ontologyData.esm.js +1 -2
  62. package/dist/dashboard/preferencesFormText.esm.js +1 -2
  63. package/dist/dataContentPane2.cjs.js +1 -1
  64. package/dist/dataContentPane2.esm.js +2 -3
  65. package/dist/defaultPane2.cjs.js +1 -1
  66. package/dist/defaultPane2.esm.js +2 -3
  67. package/dist/dokieli/dokieliPane.cjs.js +1 -1
  68. package/dist/dokieli/dokieliPane.cjs.js.map +1 -1
  69. package/dist/dokieli/dokieliPane.esm.js +7 -12
  70. package/dist/dokieli/dokieliPane.esm.js.map +1 -1
  71. package/dist/dokieli/new.esm.js +1 -2
  72. package/dist/form/pane.esm.js +1 -2
  73. package/dist/home/homePane.esm.js +1 -2
  74. package/dist/humanReadablePane.d.ts +3 -0
  75. package/dist/humanReadablePane.d.ts.map +1 -1
  76. package/dist/humanReadablePane2.cjs.js +276 -1
  77. package/dist/humanReadablePane2.cjs.js.map +1 -1
  78. package/dist/humanReadablePane2.esm.js +428 -31
  79. package/dist/humanReadablePane2.esm.js.map +1 -1
  80. package/dist/icons/folder.esm.js +1 -2
  81. package/dist/icons/friends.esm.js +1 -2
  82. package/dist/icons/person.esm.js +1 -2
  83. package/dist/imagePane.d.ts.map +1 -1
  84. package/dist/imagePane2.cjs.js +1 -1
  85. package/dist/imagePane2.cjs.js.map +1 -1
  86. package/dist/imagePane2.esm.js +2 -3
  87. package/dist/imagePane2.esm.js.map +1 -1
  88. package/dist/index.esm.js +1 -2
  89. package/dist/internal/internalPane2.cjs.js +1 -1
  90. package/dist/internal/internalPane2.esm.js +2 -3
  91. package/dist/mainPage/header.esm.js +1 -2
  92. package/dist/mainPage/index.cjs.js +1 -1
  93. package/dist/mainPage/index.cjs.js.map +1 -1
  94. package/dist/mainPage/index.d.ts +1 -1
  95. package/dist/mainPage/index.d.ts.map +1 -1
  96. package/dist/mainPage/index.esm.js +6 -2
  97. package/dist/mainPage/index.esm.js.map +1 -1
  98. package/dist/mainPage/navbar.esm.js +1 -2
  99. package/dist/mainPage/navigation.cjs.js +1 -1
  100. package/dist/mainPage/navigation.cjs.js.map +1 -1
  101. package/dist/mainPage/navigation.d.ts.map +1 -1
  102. package/dist/mainPage/navigation.esm.js +14 -11
  103. package/dist/mainPage/navigation.esm.js.map +1 -1
  104. package/dist/mainPage/profileHeading2.esm.js +1 -2
  105. package/dist/n3Pane2.esm.js +1 -2
  106. package/dist/navigation/browserEvents.esm.js +1 -2
  107. package/dist/navigation/chrome.esm.js +1 -2
  108. package/dist/navigation/controller.cjs.js +1 -1
  109. package/dist/navigation/controller.cjs.js.map +1 -1
  110. package/dist/navigation/controller.esm.js +6 -7
  111. package/dist/navigation/controller.esm.js.map +1 -1
  112. package/dist/navigation/events.esm.js +1 -2
  113. package/dist/navigation/navbarVisibility.esm.js +1 -2
  114. package/dist/navigation/options.esm.js +1 -2
  115. package/dist/navigation/podContext.esm.js +1 -2
  116. package/dist/navigation/state.esm.js +1 -2
  117. package/dist/outline/context.esm.js +1 -2
  118. package/dist/outline/fileExplorerHelpers.cjs.js +2 -0
  119. package/dist/outline/fileExplorerHelpers.cjs.js.map +1 -0
  120. package/dist/outline/fileExplorerHelpers.d.ts +13 -0
  121. package/dist/outline/fileExplorerHelpers.d.ts.map +1 -0
  122. package/dist/outline/fileExplorerHelpers.esm.js +24 -0
  123. package/dist/outline/fileExplorerHelpers.esm.js.map +1 -0
  124. package/dist/outline/manager2.cjs.js +1 -1
  125. package/dist/outline/manager2.cjs.js.map +1 -1
  126. package/dist/outline/manager2.esm.js +422 -433
  127. package/dist/outline/manager2.esm.js.map +1 -1
  128. package/dist/outline/outlineDomHelpers.cjs.js +2 -0
  129. package/dist/outline/outlineDomHelpers.cjs.js.map +1 -0
  130. package/dist/outline/outlineDomHelpers.d.ts +30 -0
  131. package/dist/outline/outlineDomHelpers.d.ts.map +1 -0
  132. package/dist/outline/outlineDomHelpers.esm.js +79 -0
  133. package/dist/outline/outlineDomHelpers.esm.js.map +1 -0
  134. package/dist/outline/outlineIcons.esm.js +1 -2
  135. package/dist/outline/propertyViews.esm.js +1 -2
  136. package/dist/outline/queryByExample.cjs.js.map +1 -1
  137. package/dist/outline/queryByExample.esm.js +1 -2
  138. package/dist/outline/queryByExample.esm.js.map +1 -1
  139. package/dist/outline/userInput.cjs.js +9 -9
  140. package/dist/outline/userInput.cjs.js.map +1 -1
  141. package/dist/outline/userInput.esm.js +50 -40
  142. package/dist/outline/userInput.esm.js.map +1 -1
  143. package/dist/outline/viewAsImage.esm.js +1 -2
  144. package/dist/outline/viewAsMbox.esm.js +1 -2
  145. package/dist/pad/padPane2.cjs.js +1 -1
  146. package/dist/pad/padPane2.esm.js +2 -3
  147. package/dist/playlist/playlistPane.esm.js +1 -2
  148. package/dist/registerPanes.esm.js +1 -2
  149. package/dist/schedule/formsForSchedule.esm.js +1 -2
  150. package/dist/schedule/schedulePane.d.ts.map +1 -1
  151. package/dist/schedule/schedulePane2.cjs.js +1 -1
  152. package/dist/schedule/schedulePane2.cjs.js.map +1 -1
  153. package/dist/schedule/schedulePane2.esm.js +60 -59
  154. package/dist/schedule/schedulePane2.esm.js.map +1 -1
  155. package/dist/sharing/sharingPane.esm.js +1 -2
  156. package/dist/slideshow/slideshowPane.esm.js +1 -2
  157. package/dist/social/editProfileDetails.cjs.js +1 -1
  158. package/dist/social/editProfileDetails.esm.js +1 -2
  159. package/dist/social/icons.esm.js +1 -2
  160. package/dist/social/socialPane2.esm.js +1 -2
  161. package/dist/social/socialSections.esm.js +1 -2
  162. package/dist/social/triage.esm.js +1 -2
  163. package/dist/tabbed/tabbedPane.esm.js +1 -2
  164. package/dist/tableViewPane.esm.js +1 -2
  165. package/dist/transaction/pane.esm.js +1 -2
  166. package/dist/transaction/period.esm.js +1 -2
  167. package/dist/trip/tripPane.esm.js +1 -2
  168. package/dist/trustedApplications/trustedApplications.dom.esm.js +1 -2
  169. package/dist/trustedApplications/trustedApplications.utils.esm.js +1 -2
  170. package/dist/trustedApplications/trustedApplications.view.esm.js +1 -2
  171. package/dist/ui/pane.esm.js +1 -2
  172. package/dist/utils/paneUtils.cjs.js +1 -1
  173. package/dist/utils/paneUtils.cjs.js.map +1 -1
  174. package/dist/utils/paneUtils.d.ts +5 -3
  175. package/dist/utils/paneUtils.d.ts.map +1 -1
  176. package/dist/utils/paneUtils.esm.js +36 -29
  177. package/dist/utils/paneUtils.esm.js.map +1 -1
  178. package/dist/utils/podUtils.cjs.js +1 -1
  179. package/dist/utils/podUtils.cjs.js.map +1 -1
  180. package/dist/utils/podUtils.d.ts +9 -1
  181. package/dist/utils/podUtils.d.ts.map +1 -1
  182. package/dist/utils/podUtils.esm.js +22 -95
  183. package/dist/utils/podUtils.esm.js.map +1 -1
  184. package/dist/utils/viewerUtils.esm.js +1 -2
  185. package/dist/utils/webIdUtils.esm.js +1 -2
  186. package/dist/versionInfo.cjs.js +1 -1
  187. package/dist/versionInfo.cjs.js.map +1 -1
  188. package/dist/versionInfo.esm.js +4 -5
  189. package/dist/versionInfo.esm.js.map +1 -1
  190. package/dist/video/videoPane.esm.js +1 -2
  191. package/package.json +7 -6
  192. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js +0 -2
  193. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +0 -1
  194. package/dist/_virtual/~icons/lucide/arrow-left.esm.js +0 -11
  195. package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +0 -1
  196. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js +0 -2
  197. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +0 -1
  198. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js +0 -11
  199. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +0 -1
  200. package/dist/_virtual/~icons/lucide/folder.cjs.js +0 -2
  201. package/dist/_virtual/~icons/lucide/folder.cjs.js.map +0 -1
  202. package/dist/_virtual/~icons/lucide/folder.esm.js +0 -11
  203. package/dist/_virtual/~icons/lucide/folder.esm.js.map +0 -1
  204. package/dist/_virtual/~icons/lucide/globe.cjs.js +0 -2
  205. package/dist/_virtual/~icons/lucide/globe.cjs.js.map +0 -1
  206. package/dist/_virtual/~icons/lucide/globe.esm.js +0 -11
  207. package/dist/_virtual/~icons/lucide/globe.esm.js.map +0 -1
  208. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +0 -2
  209. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +0 -1
  210. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +0 -11
  211. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +0 -1
  212. package/dist/_virtual/~icons/lucide/share-2.cjs.js +0 -2
  213. package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +0 -1
  214. package/dist/_virtual/~icons/lucide/share-2.esm.js +0 -11
  215. package/dist/_virtual/~icons/lucide/share-2.esm.js.map +0 -1
  216. package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +0 -2
  217. package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +0 -1
  218. package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +0 -11
  219. package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +0 -1
  220. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +0 -14
  221. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +0 -1
  222. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +0 -18
  223. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +0 -1
  224. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +0 -292
  225. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +0 -1
  226. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +0 -2
  227. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +0 -1
  228. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +0 -7
  229. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +0 -1
  230. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +0 -32
  231. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +0 -1
  232. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +0 -21
  233. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +0 -1
  234. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +0 -294
  235. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +0 -1
  236. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +0 -2
  237. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +0 -1
  238. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +0 -7
  239. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +0 -1
  240. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +0 -34
  241. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +0 -1
  242. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +0 -20
  243. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +0 -1
  244. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +0 -346
  245. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +0 -1
  246. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +0 -2
  247. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +0 -1
  248. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +0 -7
  249. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +0 -1
  250. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +0 -13
  251. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +0 -1
  252. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +0 -36
  253. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +0 -1
  254. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +0 -470
  255. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +0 -1
  256. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js +0 -2
  257. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +0 -1
  258. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js +0 -7
  259. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +0 -1
  260. package/dist/components/file-explorer-header/index.cjs.js +0 -1
  261. package/dist/components/file-explorer-header/index.d.ts +0 -3
  262. package/dist/components/file-explorer-header/index.d.ts.map +0 -1
  263. package/dist/components/file-explorer-header/index.esm.js +0 -2
  264. package/dist/components/file-explorer-header/types.d.ts +0 -10
  265. package/dist/components/file-explorer-header/types.d.ts.map +0 -1
  266. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +0 -8
  267. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +0 -1
  268. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +0 -32
  269. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +0 -1
  270. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +0 -19
  271. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +0 -1
  272. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +0 -322
  273. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +0 -1
  274. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +0 -2
  275. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +0 -1
  276. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +0 -7
  277. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +0 -1
@@ -5,7 +5,7 @@
5
5
  import * as t from "solid-ui";
6
6
  import { authn as n } from "solid-logic";
7
7
  import * as r from "rdflib";
8
- //#region src/schedule/schedulePane.ts
8
+ // src/schedule/schedulePane.ts
9
9
  var i = t.ns, a = [
10
10
  i.sched("No"),
11
11
  i.sched("Maybe"),
@@ -25,93 +25,95 @@ var s = {
25
25
  mintClass: i.sched("SchedulableEvent"),
26
26
  mintNew: function(e, i) {
27
27
  return new Promise(function(a, s) {
28
- let c = t.ns, l = e.session.store, u = i.newBase, d = i.useExisting || r.sym(i.newBase + "index.ttl#this"), f = function(e, t) {
29
- e || (console.log("Error in Schedule Pane: Error constructing new scheduler: " + t), s(Error(t)));
30
- }, p = function(e, n, i) {
28
+ let c = t.ns, l = e.session.store, u = [], d = !1, f = i.newBase, p = i.useExisting || r.sym(i.newBase + "index.ttl#this"), m = function(e) {
29
+ d || (d = !0, u.length = 0, console.log("Error in Schedule Pane: Error constructing new scheduler: " + e), s(Error(e)));
30
+ }, h = function(e, t) {
31
+ e || m(t);
32
+ }, g = function(e, n, i) {
31
33
  let a = r.graph(), o = r.Namespace("http://www.w3.org/ns/auth/acl#"), s = a.sym(n + "#a1"), l = a.sym(n), u = a.sym(e);
32
- return a.add(s, t.ns.rdf("type"), o("Authorization"), l), a.add(s, o("accessTo"), u, l), a.add(s, o("agent"), _, l), a.add(s, o("mode"), o("Read"), l), a.add(s, o("mode"), o("Write"), l), a.add(s, o("mode"), o("Control"), l), s = a.sym(n + "#a2"), a.add(s, t.ns.rdf("type"), o("Authorization"), l), a.add(s, o("accessTo"), u, l), a.add(s, o("agentClass"), c.foaf("Agent"), l), a.add(s, o("mode"), o("Read"), l), i && a.add(s, o("mode"), o("Write"), l), r.serialize(l, a, n, "text/turtle");
33
- }, m = function(e, t, n) {
34
- let r = l.any(l.sym(e), l.sym("http://www.iana.org/assignments/link-relations/acl"));
35
- if (r) {
36
- let i = p(e, r.uri, t);
37
- return h.webOperation("PUT", r.uri, {
38
- data: i,
34
+ return a.add(s, t.ns.rdf("type"), o("Authorization"), l), a.add(s, o("accessTo"), u, l), a.add(s, o("agent"), b, l), a.add(s, o("mode"), o("Read"), l), a.add(s, o("mode"), o("Write"), l), a.add(s, o("mode"), o("Control"), l), s = a.sym(n + "#a2"), a.add(s, t.ns.rdf("type"), o("Authorization"), l), a.add(s, o("accessTo"), u, l), a.add(s, o("agentClass"), c.foaf("Agent"), l), a.add(s, o("mode"), o("Read"), l), i && a.add(s, o("mode"), o("Write"), l), r.serialize(l, a, n, "text/turtle");
35
+ }, _ = function(e, t, n) {
36
+ let r = !1, i = function(e, t) {
37
+ r || (r = !0, n(e, t));
38
+ }, a = l.any(l.sym(e), l.sym("http://www.iana.org/assignments/link-relations/acl"));
39
+ if (a) {
40
+ let n = g(e, a.uri, t);
41
+ return v.webOperation("PUT", a.uri, {
42
+ data: n,
39
43
  contentType: "text/turtle"
40
- }).then((e) => n(!0)).catch((e) => {
41
- n(!1, e.message);
44
+ }).then((e) => i(!0)).catch((e) => {
45
+ i(!1, e.message);
42
46
  });
43
47
  }
44
- return h.load(e).catch((e) => {
45
- n(!1, "Getting headers for ACL: " + e);
46
- }).then(() => {
48
+ return v.load(e).then(() => {
47
49
  let n = l.any(l.sym(e), l.sym("http://www.iana.org/assignments/link-relations/acl"));
48
50
  if (!n) throw Error("No Link rel=ACL header for " + e);
49
- let r = p(e, n.uri, t);
50
- return h.webOperation("PUT", n.uri, {
51
+ let r = g(e, n.uri, t);
52
+ return v.webOperation("PUT", n.uri, {
51
53
  data: r,
52
54
  contentType: "text/turtle"
53
55
  });
54
- }).then((e) => n(!0)).catch((e) => {
55
- n(!1, e.message);
56
+ }).then((e) => i(!0)).catch((e) => {
57
+ i(!1, e.message);
56
58
  });
57
- }, h = l.fetcher, g = l.updater, _ = i.me || n.currentUser();
58
- if (!_) {
59
- console.log("MUST BE LOGGED IN"), alert("NOT LOGGED IN");
59
+ }, v = l.fetcher, y = l.updater, b = i.me || n.currentUser();
60
+ if (!b) {
61
+ console.log("MUST BE LOGGED IN"), alert("NOT LOGGED IN"), s(/* @__PURE__ */ Error("Schedule pane requires a logged-in user"));
60
62
  return;
61
63
  }
62
- let v = d.dir();
63
- if (!v) throw Error("Schedule pane needs a base directory to mint a new poll");
64
- let y = v.uri, b, x;
64
+ let x = p.dir();
65
+ if (!x) throw Error("Schedule pane needs a base directory to mint a new poll");
66
+ let S = x.uri, C, w;
65
67
  if (i.useExisting) {
66
- x = i.useExisting;
67
- let e = d.dir();
68
+ w = i.useExisting;
69
+ let e = p.dir();
68
70
  if (!e) throw Error("Existing schedule instance needs a containing directory");
69
- if (u = e.uri, b = x.doc(), i.newBase) throw Error("mint new scheduler: Illegal - have both new base and existing event");
70
- } else b = l.sym(u + "details.ttl"), x = l.sym(b.uri + "#event");
71
- let S = l.sym(u + "results.ttl"), C = i.noIndexHTML ? [] : [{
71
+ if (f = e.uri, C = w.doc(), i.newBase) throw Error("mint new scheduler: Illegal - have both new base and existing event");
72
+ } else C = l.sym(f + "details.ttl"), w = l.sym(C.uri + "#event");
73
+ let T = l.sym(f + "results.ttl"), E = i.noIndexHTML ? [] : [{
72
74
  local: "index.html",
73
75
  contentType: "text/html"
74
- }], w = [];
75
- for (let e = 0; e < C.length; e++) (function(e) {
76
- w.push(function() {
77
- let t = u + e.local;
78
- console.log("Copying " + y + e.local + " to " + t);
76
+ }];
77
+ for (let e = 0; e < E.length; e++) (function(e) {
78
+ u.push(function() {
79
+ let t = f + e.local;
80
+ console.log("Copying " + S + e.local + " to " + t);
79
81
  let r = function() {
80
- m(t, !1, function(e, n) {
81
- e ? o(w) : (f(e, "FAILED to set ACL " + t + " : " + n), console.log("FAILED to set ACL " + t + " : " + n));
82
+ _(t, !1, function(e, n) {
83
+ e ? o(u) : (h(e, "FAILED to set ACL " + t + " : " + n), console.log("FAILED to set ACL " + t + " : " + n));
82
84
  });
83
85
  };
84
- l.fetcher.webCopy(y + e.local, u + e.local, e.contentType).then(() => n.checkUser()).then((e) => {
85
- _ = e, r();
86
+ l.fetcher.webCopy(S + e.local, f + e.local, e.contentType).then(() => n.checkUser()).then((e) => {
87
+ b = e, r();
86
88
  }).catch((t) => {
87
- console.log("FAILED to copy " + y + e.local + " : " + t.message), f(!1, "FAILED to copy " + y + e.local + " : " + t.message);
89
+ console.log("FAILED to copy " + S + e.local + " : " + t.message), h(!1, "FAILED to copy " + S + e.local + " : " + t.message);
88
90
  });
89
91
  });
90
- })(C[e]);
91
- w.push(function() {
92
- l.add(x, c.rdf("type"), c.sched("SchedulableEvent"), b), _ && (l.add(x, c.dc("author"), _, b), l.add(x, c.foaf("maker"), _, b)), l.add(x, c.dc("created"), r.literal((/* @__PURE__ */ new Date()).toISOString(), r.sym("http://www.w3.org/2001/XMLSchema#dateTime")), b), l.add(x, c.sched("resultsDocument"), b), g.put(b, l.statementsMatching(void 0, void 0, void 0, b), "text/turtle", function(e, t, n) {
93
- t ? o(w) : (f(t, "FAILED to save new scheduler at: " + b + " : " + n), console.log("FAILED to save new scheduler at: " + b + " : " + n));
92
+ })(E[e]);
93
+ u.push(function() {
94
+ l.add(w, c.rdf("type"), c.sched("SchedulableEvent"), C), b && (l.add(w, c.dc("author"), b, C), l.add(w, c.foaf("maker"), b, C)), l.add(w, c.dc("created"), r.literal((/* @__PURE__ */ new Date()).toISOString(), r.sym("http://www.w3.org/2001/XMLSchema#dateTime")), C), l.add(w, c.sched("resultsDocument"), C), y.put(C, l.statementsMatching(void 0, void 0, void 0, C), "text/turtle", function(e, t, n) {
95
+ t ? o(u) : (h(t, "FAILED to save new scheduler at: " + C + " : " + n), console.log("FAILED to save new scheduler at: " + C + " : " + n));
94
96
  });
95
- }), w.push(function() {
96
- l.fetcher.webOperation("PUT", S.uri, {
97
+ }), u.push(function() {
98
+ l.fetcher.webOperation("PUT", T.uri, {
97
99
  data: "",
98
100
  contentType: "text/turtle"
99
101
  }).then(() => {
100
- o(w);
102
+ o(u);
101
103
  }).catch((e) => {
102
- f(!1, "Failed to initialize empty results file: " + e.message);
104
+ h(!1, "Failed to initialize empty results file: " + e.message);
103
105
  });
104
- }), w.push(function() {
105
- m(S.uri, !0, function(e, t) {
106
- f(e, "Failed to set Read-Write ACL on results file: " + t), e && o(w);
106
+ }), u.push(function() {
107
+ _(T.uri, !0, function(e, t) {
108
+ h(e, "Failed to set Read-Write ACL on results file: " + t), e && o(u);
107
109
  });
108
- }), w.push(function() {
109
- m(b.uri, !1, function(e, t) {
110
- f(e, "Failed to set read ACL on configuration file: " + t), e && o(w);
110
+ }), u.push(function() {
111
+ _(C.uri, !1, function(e, t) {
112
+ h(e, "Failed to set read ACL on configuration file: " + t), e && o(u);
111
113
  });
112
- }), w.push(function() {
113
- console.log("Finished minting new scheduler"), i.newInstance = x, a(i);
114
- }), o(w);
114
+ }), u.push(function() {
115
+ d || (d = !0, console.log("Finished minting new scheduler"), i.newInstance = w, a(i));
116
+ }), o(u);
115
117
  });
116
118
  },
117
119
  render: function(i, o) {
@@ -375,7 +377,6 @@ var s = {
375
377
  return N(), H;
376
378
  }
377
379
  };
378
- //#endregion
379
380
  export { s as schedulePane };
380
381
 
381
382
  //# sourceMappingURL=schedulePane2.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schedulePane2.esm.js","names":["ns","formText","formsForSchedule_default","UI","$rdf","ns$1","possibleAvailabilities","runNextAgendaItem","nextTask","agenda","schedulePane","context","subject","ns","kb","newBase","options","thisInstance","complainIfBad","ok","body","reject","genACLtext","g","auth","a","aclURI","acl","doc","docURI","me","allWrite","setACL2","aclDoc","aclText","fetcher","callbackFunction","err","updater","authn","baseDir","base","newDetailsDoc","newInstance","existingBaseDir","newResultsDoc","toBeCopied","f","newURI","item","setThatACL","message","webId","resolve","dom","invitation","appPathSegment","applyEnvironmentAttributes","environment","waitingForLogin","detailsDoc","resultsDoc","formsURI","form1","form2","form3","div","clearElement","ele","refreshCellColor","bg","value","cell","logInOutButton","showAppropriateDisplay","newInstanceButton","b","initializeNewInstanceInWorkspace","workspace","uriPrefix","ws","initializeNewInstanceAtBase","p","error","getForms","getDetails","showSignon","showBootstrap","getResults","showForms","naviMain","signonContext","baseField","button","doneButton","naviCenter","currentSlide","gotDoneButton","hasFormControls","container","asBoolean","term","fallback","renderTimeProposalFallback","allDayValue","fallbackForm","slide","annotateRenderedForm","control","heading","includePrimaryFields","row","labelElement","labelText","commentValueCell","commentRow","unwrapSlide","firstElement","forms","slides","refresh","b1","b2","emailButton","naviLeft","naviRight","insertables","success","errorBody","emailIcon","title","mailto","mbox","who","showResults","response","comment","location","author","authorName","query","v","opt","time","resp","possibleTimes","displayTheMatrix","matrix","refreshButton","refreshIcon","dataPointForNT","loginContext","z","y","selectOptions","predicate","x","cellSubject","selector","responses","myResponse","r","id","dataPoint","j","possibleTime","instanceCreator","editButton","editIcon","structure","naviMenu"],"sources":["../../src/schedule/schedulePane.ts"],"sourcesContent":["/* Scheduler Pane\n **\n **\n */\n/* global alert */\n\nimport * as UI from 'solid-ui'\nimport { authn } from 'solid-logic'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext, RenderEnvironment } from 'pane-registry'\nimport type { NamedNode, Node as RdflibNode, Statement, Variable } from 'rdflib'\nimport formText from './formsForSchedule.ttl'\nimport './schedulePane.css'\nimport '../styles/utilities.css'\n\nconst ns = UI.ns\n\n// @@ Give other combos too-- see schedule ontology\nconst possibleAvailabilities = [\n ns.sched('No'),\n ns.sched('Maybe'),\n ns.sched('Yes')\n]\n\ntype AgendaTask = () => void\n\ntype CopySpec = {\n local: string\n contentType: string\n}\n\ntype MintOptions = {\n newBase: string\n useExisting?: NamedNode\n noIndexHTML?: boolean\n me?: NamedNode | null\n newInstance?: NamedNode\n thisInstance?: NamedNode\n}\n\ntype MatrixOptionsLike = {\n set_x: RdflibNode[]\n set_y: RdflibNode[]\n cellFunction?: (cell: HTMLElement, x: RdflibNode, y: RdflibNode, value: NamedNode | null) => string\n}\n\ntype ResponseQueryVars = {\n time: Variable\n author: Variable\n value: Variable\n resp: Variable\n cell: Variable\n}\n\ntype LoginStatusBoxLike = {\n refresh: () => void\n}\n\nfunction runNextAgendaItem (agenda: AgendaTask[]): void {\n const nextTask = agenda.shift()\n if (nextTask) {\n nextTask()\n }\n}\n\nexport const schedulePane = {\n icon: UI.icons.iconBase + 'noun_346777.svg', // @@ better?\n\n name: 'schedule',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve an Scheduler pane?\n label: function (subject: NamedNode, context: DataBrowserContext) {\n const kb = context.session.store\n const t = kb.findTypeURIs(subject)\n if (t['http://www.w3.org/ns/pim/schedule#SchedulableEvent']) {\n return 'Scheduling poll'\n }\n return null // No under other circumstances\n },\n\n // Mint a new Schedule poll\n mintClass: ns.sched('SchedulableEvent'),\n\n mintNew: function (context: DataBrowserContext, options: MintOptions) {\n return new Promise<MintOptions>(function (resolve, reject) {\n const ns = UI.ns\n const kb = context.session.store\n let newBase = options.newBase\n const thisInstance =\n options.useExisting || $rdf.sym(options.newBase + 'index.ttl#this')\n\n const complainIfBad = function (ok: boolean, body: string) {\n if (ok) return\n console.log(\n 'Error in Schedule Pane: Error constructing new scheduler: ' + body\n )\n reject(new Error(body))\n }\n\n // ////////////////////// Accesss control\n\n // Two constiations of ACL for this app, public read and public read/write\n // In all cases owner has read write control\n\n const genACLtext = function (docURI: string, aclURI: string, allWrite: boolean) {\n const g = $rdf.graph()\n const auth = $rdf.Namespace('http://www.w3.org/ns/auth/acl#')\n let a = g.sym(aclURI + '#a1')\n const acl = g.sym(aclURI)\n const doc = g.sym(docURI)\n g.add(a, UI.ns.rdf('type'), auth('Authorization'), acl)\n g.add(a, auth('accessTo'), doc, acl)\n g.add(a, auth('agent'), me as NamedNode, acl)\n g.add(a, auth('mode'), auth('Read'), acl)\n g.add(a, auth('mode'), auth('Write'), acl)\n g.add(a, auth('mode'), auth('Control'), acl)\n\n a = g.sym(aclURI + '#a2')\n g.add(a, UI.ns.rdf('type'), auth('Authorization'), acl)\n g.add(a, auth('accessTo'), doc, acl)\n g.add(a, auth('agentClass'), ns.foaf('Agent'), acl)\n g.add(a, auth('mode'), auth('Read'), acl)\n if (allWrite) {\n g.add(a, auth('mode'), auth('Write'), acl)\n }\n return $rdf.serialize(acl, g, aclURI, 'text/turtle')\n }\n\n /*\n const setACL3 = function (docURI, allWrite, callbackFunction) {\n const aclText = genACLtext(docURI, aclDoc.uri, allWrite)\n return UI.acl.setACL(docURI, aclText, callbackFunction)\n }\n */\n\n const setACL2 = function setACL2 (docURI, allWrite, callbackFunction) {\n const aclDoc = kb.any(\n kb.sym(docURI),\n kb.sym('http://www.iana.org/assignments/link-relations/acl')\n ) as NamedNode | null // @@ check that this get set by web.js\n\n if (aclDoc) {\n // Great we already know where it is\n const aclText = genACLtext(docURI, aclDoc.uri, allWrite)\n\n return fetcher\n .webOperation('PUT', aclDoc.uri, {\n data: aclText,\n contentType: 'text/turtle'\n })\n .then(_result => callbackFunction(true))\n .catch(err => {\n callbackFunction(false, err.message)\n })\n } else {\n return fetcher\n .load(docURI)\n .catch(err => {\n callbackFunction(false, 'Getting headers for ACL: ' + err)\n })\n .then(() => {\n const aclDoc = kb.any(\n kb.sym(docURI),\n kb.sym('http://www.iana.org/assignments/link-relations/acl')\n ) as NamedNode | null\n\n if (!aclDoc) {\n // complainIfBad(false, \"No Link rel=ACL header for \" + docURI)\n throw new Error('No Link rel=ACL header for ' + docURI)\n }\n\n const aclText = genACLtext(docURI, aclDoc.uri, allWrite)\n\n return fetcher.webOperation('PUT', aclDoc.uri, {\n data: aclText,\n contentType: 'text/turtle'\n })\n })\n .then(_result => callbackFunction(true))\n .catch(err => {\n callbackFunction(false, err.message)\n })\n }\n }\n\n // Body of mintNew\n const fetcher = kb.fetcher\n const updater = kb.updater\n\n let me: NamedNode | null = options.me || authn.currentUser()\n if (!me) {\n console.log('MUST BE LOGGED IN')\n alert('NOT LOGGED IN')\n return\n }\n\n const baseDir = thisInstance.dir()\n if (!baseDir) {\n throw new Error('Schedule pane needs a base directory to mint a new poll')\n }\n const base = baseDir.uri\n let newDetailsDoc: NamedNode\n let newInstance: NamedNode\n\n if (options.useExisting) {\n newInstance = options.useExisting\n const existingBaseDir = thisInstance.dir()\n if (!existingBaseDir) {\n throw new Error('Existing schedule instance needs a containing directory')\n }\n newBase = existingBaseDir.uri\n newDetailsDoc = newInstance.doc()\n // newIndexDoc = null\n if (options.newBase) {\n throw new Error(\n 'mint new scheduler: Illegal - have both new base and existing event'\n )\n }\n } else {\n newDetailsDoc = kb.sym(newBase + 'details.ttl')\n // newIndexDoc = kb.sym(newBase + 'index.html')\n newInstance = kb.sym(newDetailsDoc.uri + '#event')\n }\n\n const newResultsDoc = kb.sym(newBase + 'results.ttl')\n\n const toBeCopied: CopySpec[] = options.noIndexHTML\n ? []\n : [{ local: 'index.html', contentType: 'text/html' }]\n\n const agenda: AgendaTask[] = []\n\n // @@ This needs some form of visible progress bar\n for (let f = 0; f < toBeCopied.length; f++) {\n const item = toBeCopied[f]\n const fun = function copyItem (item: CopySpec) {\n agenda.push(function () {\n const newURI = newBase + item.local\n console.log('Copying ' + base + item.local + ' to ' + newURI)\n\n const setThatACL = function () {\n setACL2(newURI, false, function (ok, message) {\n if (!ok) {\n complainIfBad(\n ok,\n 'FAILED to set ACL ' + newURI + ' : ' + message\n )\n console.log('FAILED to set ACL ' + newURI + ' : ' + message)\n } else {\n runNextAgendaItem(agenda) // beware too much nesting\n }\n })\n }\n\n kb.fetcher\n .webCopy(\n base + item.local,\n newBase + item.local,\n item.contentType\n )\n .then(() => authn.checkUser())\n .then(webId => {\n me = webId as NamedNode | null\n\n setThatACL()\n })\n .catch(err => {\n console.log(\n 'FAILED to copy ' + base + item.local + ' : ' + err.message\n )\n complainIfBad(\n false,\n 'FAILED to copy ' + base + item.local + ' : ' + err.message\n )\n })\n })\n }\n fun(item)\n }\n\n agenda.push(function createDetailsFile () {\n kb.add(\n newInstance,\n ns.rdf('type'),\n ns.sched('SchedulableEvent'),\n newDetailsDoc\n )\n if (me) {\n kb.add(newInstance, ns.dc('author'), me, newDetailsDoc) // Who is sending the invitation?\n kb.add(newInstance, ns.foaf('maker'), me, newDetailsDoc) // Uneditable - wh is allowed to edit this?\n }\n\n kb.add(\n newInstance,\n ns.dc('created'),\n $rdf.literal(\n new Date().toISOString(),\n $rdf.sym('http://www.w3.org/2001/XMLSchema#dateTime')\n ),\n newDetailsDoc\n )\n kb.add(newInstance, ns.sched('resultsDocument'), newDetailsDoc)\n\n updater.put(\n newDetailsDoc,\n kb.statementsMatching(undefined, undefined, undefined, newDetailsDoc),\n 'text/turtle',\n function (uri2, ok, message) {\n if (ok) {\n runNextAgendaItem(agenda)\n } else {\n complainIfBad(\n ok,\n 'FAILED to save new scheduler at: ' +\n newDetailsDoc +\n ' : ' +\n message\n )\n console.log(\n 'FAILED to save new scheduler at: ' +\n newDetailsDoc +\n ' : ' +\n message\n )\n }\n }\n )\n })\n\n agenda.push(function () {\n kb.fetcher\n .webOperation('PUT', newResultsDoc.uri, {\n data: '',\n contentType: 'text/turtle'\n })\n .then(() => {\n runNextAgendaItem(agenda)\n })\n .catch(err => {\n complainIfBad(\n false,\n 'Failed to initialize empty results file: ' + err.message\n )\n })\n })\n\n agenda.push(function () {\n setACL2(newResultsDoc.uri, true, function (ok, body) {\n complainIfBad(\n ok,\n 'Failed to set Read-Write ACL on results file: ' + body\n )\n if (ok) runNextAgendaItem(agenda)\n })\n })\n\n agenda.push(function () {\n setACL2(newDetailsDoc.uri, false, function (ok, body) {\n complainIfBad(\n ok,\n 'Failed to set read ACL on configuration file: ' + body\n )\n if (ok) runNextAgendaItem(agenda)\n })\n })\n\n agenda.push(function () {\n // give the user links to the new app\n console.log('Finished minting new scheduler')\n options.newInstance = newInstance\n resolve(options)\n })\n\n runNextAgendaItem(agenda)\n // Created new data files.\n }) // promise\n }, // mintNew\n\n // Render one meeting schedule poll\n render: function (subject: NamedNode, context: DataBrowserContext) {\n const dom = context.dom\n const kb = context.session.store\n const ns = UI.ns\n const invitation = subject\n const appPathSegment = 'app-when-can-we.w3.org' // how to allocate this string and connect to\n\n function applyEnvironmentAttributes (element: HTMLDivElement): void {\n const environment = (context.environment ?? {}) as Partial<RenderEnvironment>\n element.dataset.layout = environment.layout ?? 'desktop'\n }\n\n // ////////////////////////////////////////////\n\n const fetcher = kb.fetcher\n const updater = kb.updater\n let waitingForLogin = false\n\n const thisInstance = subject\n const detailsDoc = subject.doc()\n const baseDir = detailsDoc.dir()\n if (!baseDir) {\n throw new Error('Schedule pane needs a containing directory for its details document')\n }\n const base = baseDir.uri\n\n const resultsDoc = $rdf.sym(base + 'results.ttl')\n // const formsURI = base + 'forms.ttl'\n // We can't in fact host stuff from there because of CORS\n const formsURI =\n 'https://solidos.github.io/solid-panes/schedule/formsForSchedule.ttl'\n\n const form1 = kb.sym(formsURI + '#form1')\n const form2 = kb.sym(formsURI + '#form2')\n const form3 = kb.sym(formsURI + '#form3')\n\n $rdf.parse(formText, kb, formsURI, 'text/turtle') // Load forms directly\n\n // Utility functions\n\n const complainIfBad = function (ok, message) {\n if (!ok) {\n div.appendChild(UI.widgets.errorMessageBlock(dom, message, 'pink'))\n }\n }\n\n const clearElement = function (ele) {\n while (ele.firstChild) {\n ele.removeChild(ele.firstChild)\n }\n return ele\n }\n\n const refreshCellColor = function (cell, value) {\n const bg = kb.any(value, UI.ns.ui('backgroundColor'))\n if (bg) {\n cell.classList.add('schedule-pane__cell')\n cell.setAttribute(\n 'style',\n 'background-color: ' + bg + ';'\n )\n }\n }\n\n let me: NamedNode | null = null\n\n authn.checkUser().then(webId => {\n me = (webId as NamedNode | null) ?? null\n\n if (logInOutButton) {\n logInOutButton.refresh()\n }\n if (webId && waitingForLogin) {\n waitingForLogin = false\n showAppropriateDisplay()\n }\n })\n console.log('me: ' + me) // @@ curently not actually used elsewhere\n\n // ////////////////////////////// Reproduction: spawn a new instance\n //\n // Viral growth path: user of app decides to make another instance\n //\n\n const newInstanceButton = function () {\n const b = UI.login.newAppInstance(\n dom,\n { noun: 'scheduler', appPathSegment },\n function (workspace: string | null, newBase: string) {\n return initializeNewInstanceInWorkspace(\n $rdf.sym(workspace || newBase)\n )\n }\n )\n if (b.firstChild instanceof HTMLElement) {\n b.firstChild.classList.add('schedule-pane__button')\n }\n return b\n } // newInstanceButton\n\n // /////////////////////// Create new document files for new instance of app\n\n const initializeNewInstanceInWorkspace = function (ws: NamedNode) {\n const uriPrefix = kb.any(ws, ns.space('uriPrefix'))\n let newBase = ''\n if (!uriPrefix) {\n newBase = ws.uri.split('#')[0]\n } else {\n newBase = uriPrefix.value\n }\n if (newBase.slice(-1) !== '/') {\n $rdf.log.error(appPathSegment + ': No / at end of uriPrefix ' + newBase) // @@ paramater?\n newBase = newBase + '/'\n }\n const now = new Date()\n newBase += appPathSegment + '/id' + now.getTime() + '/' // unique id\n\n initializeNewInstanceAtBase(thisInstance, newBase)\n }\n\n const initializeNewInstanceAtBase = function (thisInstance: NamedNode, newBase: string) {\n const options: MintOptions = { thisInstance, newBase }\n schedulePane.mintNew(context, options)\n .then(function (options) {\n if (!options.newInstance) {\n throw new Error('New scheduler instance was not returned')\n }\n const p = div.appendChild(dom.createElement('p'))\n p.setAttribute('style', 'font-size: 140%;')\n p.innerHTML =\n 'Your <a href=\\'' +\n options.newInstance.uri +\n '\\'><b>new scheduler</b></a> is ready to be set up. ' +\n '<br/><br/><a href=\\'' +\n options.newInstance.uri +\n '\\'>Say when you what days work for you.</a>'\n })\n .catch(function (error) {\n complainIfBad(\n false,\n 'Error createing new scheduler at ' +\n options.newInstance +\n ': ' +\n error\n )\n })\n }\n\n // ///////////////////////\n\n const getForms = function () {\n console.log('getforms()')\n getDetails()\n /*\n fetcher.nowOrWhenFetched(formsURI, undefined, function (ok, body) {\n console.log('getforms() ok? ' + ok)\n if (!ok) return complainIfBad(ok, body)\n getDetails()\n })\n */\n }\n\n const getDetails = function () {\n console.log('getDetails()') // Looking for blank screen hang-up\n fetcher.nowOrWhenFetched(detailsDoc.uri, undefined, function (ok, body) {\n console.log('getDetails() ok? ' + ok)\n if (!ok) return complainIfBad(ok, body)\n showAppropriateDisplay()\n })\n }\n\n const showAppropriateDisplay = function showAppropriateDisplay () {\n console.log('showAppropriateDisplay()')\n\n authn.checkUser().then(webId => {\n if (!webId) {\n return showSignon()\n }\n\n // On gh-pages, the turtle will not load properly (bad mime type)\n // but we can trap it as being a non-editable server.\n\n if (\n !kb.updater.editable(detailsDoc.uri, kb) ||\n kb.holds(subject, ns.rdf('type'), ns.wf('TemplateInstance'))\n ) {\n // This is read-only example e.g. on github pages, etc\n showBootstrap()\n return\n }\n\n const ready = kb.any(subject, ns.sched('ready'))\n\n if (!ready) {\n showForms()\n } else {\n // no editing not author\n getResults()\n }\n })\n }\n\n const showSignon = function showSignon () {\n clearElement(naviMain)\n const signonContext = { div, dom }\n UI.login.ensureLoggedIn(signonContext).then(context => {\n me = context.me ?? null\n waitingForLogin = false // untested\n showAppropriateDisplay()\n })\n }\n\n const showBootstrap = function showBootstrap () {\n const div = clearElement(naviMain)\n div.appendChild(\n UI.login.newAppInstance(\n dom,\n { noun: 'poll', appPathSegment },\n function (workspace: string | null, newBase: string) {\n return initializeNewInstanceInWorkspace(\n $rdf.sym(workspace || newBase)\n )\n }\n )\n )\n\n div.appendChild(dom.createElement('hr')) // @@\n\n const p = div.appendChild(dom.createElement('p'))\n p.textContent =\n 'Where would you like to store the data for the poll? ' +\n 'Give the URL of the directory where you would like the data stored.'\n const baseField = div.appendChild(dom.createElement('input'))\n baseField.setAttribute('type', 'text')\n baseField.size = 80 // really a string\n baseField.label = 'base URL'\n baseField.autocomplete = 'on'\n\n div.appendChild(dom.createElement('br')) // @@\n\n const button = div.appendChild(dom.createElement('button'))\n button.classList.add('schedule-pane__button')\n button.textContent = 'Start new poll at this URI'\n button.addEventListener('click', function (_e) {\n let newBase = baseField.value\n if (newBase.slice(-1) !== '/') {\n newBase += '/'\n }\n initializeNewInstanceAtBase(thisInstance, newBase)\n })\n }\n\n // ///////////// The forms to configure the poll\n\n const doneButton = dom.createElement('button')\n\n const showForms = function () {\n clearElement(naviCenter) // Remove refresh button if nec\n const div = naviMain\n\n // form2 depends on sched:allDay; seed a local default for new polls\n if (!kb.any(subject, ns.sched('allDay'))) {\n kb.add(\n subject,\n ns.sched('allDay'),\n $rdf.literal('true', $rdf.sym('http://www.w3.org/2001/XMLSchema#boolean')),\n detailsDoc\n )\n }\n\n const wizard = true\n let currentSlide = 0\n let gotDoneButton = false\n\n const hasFormControls = function (container) {\n return !!container.querySelector('input, select, textarea, button')\n }\n\n const asBoolean = function (term, fallback) {\n if (!term) return fallback\n const value = (term.value || '').toLowerCase()\n if (value === 'true' || value === '1') return true\n if (value === 'false' || value === '0') return false\n return fallback\n }\n\n const renderTimeProposalFallback = function (slide) {\n const allDayValue = asBoolean(kb.any(subject, ns.sched('allDay')), true)\n const fallbackForm = kb.sym(\n formsURI + (allDayValue ? '#AllDayForm2' : '#NotAllDayForm2')\n )\n UI.widgets.appendForm(\n document,\n slide,\n {},\n subject,\n fallbackForm,\n detailsDoc,\n complainIfBad\n )\n }\n\n const annotateRenderedForm = function (\n container: HTMLElement,\n includePrimaryFields: boolean = false\n ) {\n const controls = Array.from(\n container.querySelectorAll('input, select, textarea')\n ) as HTMLElement[]\n controls.forEach(control => {\n control.classList.add('schedule-pane__form-control')\n if (control.tagName.toLowerCase() === 'textarea') {\n control.classList.add('schedule-pane__form-control--textarea')\n }\n })\n\n const borderedPanels = Array.from(\n container.querySelectorAll('div[style*=\"border: 0.05em solid\"]')\n ) as HTMLElement[]\n borderedPanels.forEach(panel => {\n panel.classList.add('schedule-pane__panel')\n })\n\n const headings = Array.from(container.querySelectorAll('h3')) as HTMLElement[]\n headings.forEach(heading => {\n heading.classList.add('schedule-pane__form-heading')\n const headingText = (heading.textContent || '').trim().toLowerCase()\n if (headingText === 'time proposals') {\n heading.classList.add('schedule-pane__form-heading--time-proposals')\n heading.closest('.schedule-pane__panel')?.classList.add(\n 'schedule-pane__panel--time-proposals'\n )\n }\n })\n\n if (!includePrimaryFields) {\n return\n }\n\n const labels = Array.from(container.querySelectorAll('.formFieldName'))\n labels.forEach(labelElement => {\n const row = labelElement.parentElement as HTMLElement | null\n const labelText = (labelElement.textContent || '').trim().toLowerCase()\n if (!row) return\n if (labelText === 'summary' || labelText === 'location') {\n row.classList.add('schedule-pane__field-row--compact')\n }\n if (labelText === 'comment') {\n row.classList.add('schedule-pane__field-row--comment')\n }\n })\n\n const commentField = container.querySelector('textarea') as HTMLTextAreaElement | null\n const commentFieldWrapper = commentField?.parentElement as HTMLElement | null\n const commentValueCell = commentFieldWrapper?.parentElement as HTMLElement | null\n const commentRow = commentValueCell?.parentElement as HTMLElement | null\n if (commentRow) {\n commentRow.classList.add('schedule-pane__field-row--comment')\n }\n if (commentValueCell) {\n commentValueCell.classList.add('schedule-pane__field-value--comment')\n }\n }\n\n const unwrapSlide = function (slide: HTMLElement) {\n const firstElement = slide.firstElementChild as HTMLElement | null\n if (!firstElement || slide.childElementCount !== 1) {\n return slide\n }\n return firstElement\n }\n\n if (wizard) {\n const forms = [form1, form2, form3]\n const slides: HTMLElement[] = []\n currentSlide = 0\n for (let f = 0; f < forms.length; f++) {\n const slide = dom.createElement('div')\n UI.widgets.appendForm(\n document,\n slide,\n {},\n subject,\n forms[f],\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(slide, f === 0)\n\n // Some stores end up with form2's ui:Options unresolved; force a usable input form.\n if (f === 1 && !hasFormControls(slide)) {\n renderTimeProposalFallback(slide)\n annotateRenderedForm(slide)\n }\n\n slides.push(unwrapSlide(slide))\n }\n\n const refresh = function () {\n clearElement(naviMain).appendChild(slides[currentSlide])\n\n if (currentSlide === 0) {\n b1.setAttribute('disabled', '')\n } else {\n b1.removeAttribute('disabled')\n }\n if (currentSlide === slides.length - 1) {\n b2.setAttribute('disabled', '')\n if (!gotDoneButton) {\n // Only expose at last slide seen\n naviCenter.appendChild(emailButton) // could also check data shape\n naviCenter.appendChild(doneButton) // could also check data shape\n gotDoneButton = true\n }\n } else {\n b2.removeAttribute('disabled')\n }\n }\n const b1 = clearElement(naviLeft).appendChild(dom.createElement('button'))\n b1.classList.add('schedule-pane__button')\n b1.textContent = '<- go back'\n b1.addEventListener(\n 'click',\n function (_e) {\n if (currentSlide > 0) {\n currentSlide -= 1\n refresh()\n }\n },\n false\n )\n\n const b2 = clearElement(naviRight).appendChild(\n dom.createElement('button')\n )\n b2.classList.add('schedule-pane__button')\n b2.textContent = 'continue ->'\n b2.addEventListener(\n 'click',\n function (_e) {\n if (currentSlide < slides.length - 1) {\n currentSlide += 1\n refresh()\n }\n },\n false\n )\n\n refresh()\n } else {\n // not wizard one big form\n // @@@ create the initial config doc if not exist\n const table = div.appendChild(dom.createElement('table'))\n UI.widgets.appendForm(\n document,\n table,\n {},\n subject,\n form1,\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(table, true)\n UI.widgets.appendForm(\n document,\n table,\n {},\n subject,\n form2,\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(table)\n UI.widgets.appendForm(\n document,\n table,\n {},\n subject,\n form3,\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(table)\n naviCenter.appendChild(doneButton) // could also check data shape\n }\n // @@@ link config to results\n\n const insertables: Statement[] = []\n insertables.push(\n $rdf.st(\n subject,\n ns.sched('availabilityOptions'),\n ns.sched('YesNoMaybe'),\n detailsDoc\n )\n )\n insertables.push(\n $rdf.st(\n subject,\n ns.sched('ready'),\n $rdf.literal(\n new Date().toISOString(),\n $rdf.sym('http://www.w3.org/2001/XMLSchema#dateTime')\n ),\n detailsDoc\n )\n )\n insertables.push(\n $rdf.st(subject, ns.sched('results'), resultsDoc, detailsDoc)\n ) // @@ also link in results\n\n doneButton.classList.add('schedule-pane__button')\n doneButton.textContent = 'Go to poll'\n doneButton.addEventListener(\n 'click',\n function (_e) {\n if (kb.any(subject, ns.sched('ready'))) {\n // already done\n getResults()\n naviRight.appendChild(emailButton)\n } else {\n naviRight.appendChild(emailButton)\n kb.updater.update([], insertables, function (\n uri,\n success,\n errorBody\n ) {\n if (!success) {\n complainIfBad(success, errorBody)\n } else {\n // naviRight.appendChild(emailButton)\n getResults()\n }\n })\n }\n },\n false\n )\n\n const emailButton = dom.createElement('button')\n emailButton.classList.add('schedule-pane__button')\n const emailIcon = emailButton.appendChild(dom.createElement('img'))\n emailIcon.setAttribute('src', UI.icons.iconBase + 'noun_480183.svg') // noun_480183.svg\n emailIcon.classList.add('schedule-pane__button-icon')\n // emailButton.textContent = 'email invitations'\n emailButton.addEventListener(\n 'click',\n function (_e) {\n const title =\n kb.anyValue(subject, ns.cal('summary')) ||\n kb.anyValue(subject, ns.dc('title')) ||\n ''\n const mailto =\n 'mailto:' +\n kb\n .each(subject, ns.sched('invitee'))\n .map(function (who) {\n const mbox = kb.any(who as NamedNode, ns.foaf('mbox')) as NamedNode | null\n return mbox ? mbox.uri.replace('mailto:', '') : ''\n })\n .join(',') +\n '?subject=' +\n encodeURIComponent(title + '-- When can we meet?') +\n '&body=' +\n encodeURIComponent(\n title + '\\n\\nWhen can you?\\n\\nSee ' + subject + '\\n'\n )\n // @@ assumed there is a data browser\n\n console.log('Mail: ' + mailto)\n window.location.href = mailto\n },\n false\n )\n } // showForms\n\n // Ask for each day, what times .. @@ to be added some time\n /*\n const setTimesOfDay = function () {\n const i, j, x, y, slot, cell, day\n const insertables = []\n const possibleDays = kb.each(invitation, ns.sched('option'))\n .map(function (opt) {return kb.any(opt, ns.cal('dtstart'))})\n const cellLookup = []\n const slots = kb.each(invitation, ns.sched('slot'))\n if (slots.length === 0) {\n for (i = 0; i < 2; i++) {\n slot = UI.widgets.newThing(detailsDoc)\n insertables.push($rdf.st(invitation, ns.sched('slot'), slot))\n insertables.push($rdf.st(slot, ns.rdfs('label'), 'slot ' + (i + 1)))\n for (j = 0; j < possibleDays.length; j++) {\n day - possibleDays[j]\n x = kb.any(slot, ns.rdfs('label'))\n y = kb.any(day, ns.cal('dtstart'))\n cell = UI.widgets.newThing(detailsDoc)\n cellLookup[x.toNT() + y.toNT()] = cell\n insertables.push($rdf.st(slot, ns.sched('cell'), cell))\n insertables.push($rdf.st(cell, ns.sched('day'), possibleDays[j]))\n }\n }\n }\n\n const query = new $rdf.Query('TimesOfDay')\n const v = {}['day', 'label', 'value', 'slot', 'cell'].map(function (x) {\n query.consts.push(v[x] = $rdf.constiable(x)) })\n query.pat.add(invitation, ns.sched('slot'), v.slot)\n query.pat.add(v.slot, ns.rdfs('label'), v.label)\n query.pat.add(v.slot, ns.sched('cell'), v.cell)\n query.pat.add(v.cell, ns.sched('timeOfDay'), v.value)\n query.pat.add(v.cell, ns.sched('day'), v.day)\n\n const options = {}\n options.set_x = kb.each(subject, ns.sched('slot')) // @@@@@ option -> dtstart in future\n options.set_x = options.set_x.map(function (opt) { return kb.any(opt, ns.rdfs('label')) })\n\n options.set_y = kb.each(subject, ns.sched('option')); // @@@@@ option -> dtstart in future\n options.set_y = options.set_y.map(function (opt) { return kb.any(opt, ns.cal('dtstart')) })\n\n const possibleTimes = kb.each(invitation, ns.sched('option'))\n .map(function (opt) { return kb.any(opt, ns.cal('dtstart')) })\n\n const displayTheMatrix = function () {\n const matrix = div.appendChild(UI.matrix.matrixForQuery(\n dom, query, v.time, v.author, v.value, options, function () {}))\n\n matrix.setAttribute('class', 'matrix')\n\n const refreshButton = dom.createElement('button')\n refreshButton.setAttribute('style', inputStyle)\n refreshButton.textContent = 'refresh'\n refreshButton.addEventListener('click', function (e) {\n refreshButton.disabled = true\n store.fetcher.nowOrWhenFetched(subject.doc(), undefined, function (ok, body) {\n if (!ok) {\n console.log('Cant refresh matrix' + body)\n } else {\n matrix.refresh()\n refreshButton.disabled = false\n }\n })\n }, false)\n\n clearElement(naviCenter)\n naviCenter.appendChild(refreshButton)\n }\n\n const dataPointForNT = []\n\n const doc = resultsDoc\n options.set_y = options.set_y.filter(function (z) { return (! z.sameTerm(me)) })\n options.set_y.push(me) // Put me on the end\n\n options.cellFunction = function (cell, x, y, value) {\n // const point = cellLookup[x.toNT() + y.toNT()]\n\n if (y.sameTerm(me)) {\n const callbackFunction = function () { refreshCellColor(cell, value); }; // @@ may need that\n const selectOptions = {}\n const predicate = ns.sched('timeOfDay')\n const cellSubject = dataPointForNT[x.toNT()]\n const selector = UI.widgets.makeSelectForOptions(dom, kb, cellSubject, predicate,\n possibleAvailabilities, selectOptions, resultsDoc, callbackFunction)\n cell.appendChild(selector)\n } else if (value !== null) {\n cell.textContent = UI.utils.label(value)\n }\n\n }\n\n const responses = kb.each(invitation, ns.sched('response'))\n const myResponse = null\n responses.map(function (r) {\n if (kb.holds(r, ns.dc('author'), me)) {\n myResponse = r\n }\n })\n\n const id = UI.widgets.newThing(doc).uri\n if (myResponse === null) {\n myResponse = $rdf.sym(id + '_response')\n insertables.push($rdf.st(invitation, ns.sched('response'), myResponse, doc))\n insertables.push($rdf.st(myResponse, ns.dc('author'), me, doc))\n } else {\n const dps = kb.each(myResponse, ns.sched('cell'))\n dps.map(function (dataPoint) {\n const time = kb.any(dataPoint, ns.cal('dtstart'))\n dataPointForNT[time.toNT()] = dataPoint\n })\n }\n for (let j = 0; j < possibleTimes.length; j++) {\n if (dataPointForNT[possibleTimes[j].toNT()]) continue\n const dataPoint = $rdf.sym(id + '_' + j)\n insertables.push($rdf.st(myResponse, ns.sched('cell'), dataPoint, doc))\n insertables.push($rdf.st(dataPoint, ns.cal('dtstart'), possibleTimes[j], doc)) // @@\n dataPointForNT[possibleTimes[j].toNT()] = dataPoint\n }\n if (insertables.length) {\n store.updater.update([], insertables, function (uri, success, errorBody) {\n if (!success) {\n complainIfBad(success, errorBody)\n } else {\n displayTheMatrix()\n }\n })\n } else { // no insertables\n displayTheMatrix()\n }\n }\n */\n // end setTimesOfDay\n\n // Read or create empty results file\n function getResults () {\n fetcher.nowOrWhenFetched(resultsDoc.uri, undefined, (ok, body, response) => {\n if (!ok) {\n if (response.status === 404) {\n // / Check explicitly for 404 error\n console.log('Initializing details file ' + resultsDoc)\n updater.put(resultsDoc, [], 'text/turtle', function (\n uri2,\n ok,\n message\n ) {\n if (ok) {\n clearElement(naviMain)\n showResults()\n } else {\n complainIfBad(\n ok,\n 'FAILED to create results file at: ' +\n resultsDoc.uri +\n ' : ' +\n message\n )\n console.log(\n 'FAILED to craete results file at: ' +\n resultsDoc.uri +\n ' : ' +\n message\n )\n }\n })\n } else {\n // Other error, not 404 -- do not try to overwite the file\n complainIfBad(ok, 'FAILED to read results file: ' + body)\n }\n } else {\n // Happy read\n clearElement(naviMain)\n showResults()\n }\n })\n }\n\n function showResults () {\n // Now the form for responsing to the poll\n //\n\n // div.appendChild(dom.createElement('hr'))\n\n // const invitation = subject\n const title = kb.any(invitation, ns.cal('summary'))\n const comment = kb.any(invitation, ns.cal('comment'))\n const location = kb.any(invitation, ns.cal('location'))\n const div = naviMain\n if (title) div.appendChild(dom.createElement('h3')).textContent = title.value\n if (location) {\n div.appendChild(dom.createElement('address')).textContent =\n location.value\n }\n if (comment) {\n div.appendChild(dom.createElement('p')).textContent = comment.value\n }\n const author = kb.any(invitation, ns.dc('author')) as NamedNode | null\n if (author) {\n const authorName = kb.any(author, ns.foaf('name'))\n if (authorName) {\n div.appendChild(dom.createElement('p')).textContent = authorName.value\n }\n }\n\n const query = new $rdf.Query('Responses', 0)\n const v = {} as ResponseQueryVars\n v.time = $rdf.variable('time')\n v.author = $rdf.variable('author')\n v.value = $rdf.variable('value')\n v.resp = $rdf.variable('resp')\n v.cell = $rdf.variable('cell')\n query.vars.push(v.time, v.author, v.value, v.resp, v.cell)\n query.pat.add(invitation, ns.sched('response'), v.resp)\n query.pat.add(v.resp, ns.dc('author'), v.author)\n query.pat.add(v.resp, ns.sched('cell'), v.cell)\n query.pat.add(v.cell, ns.sched('availabilty'), v.value)\n query.pat.add(v.cell, ns.cal('dtstart'), v.time)\n\n // Sort by by person @@@\n\n const options: MatrixOptionsLike = { set_x: [], set_y: [] }\n options.set_x = kb.each(subject, ns.sched('option')) as RdflibNode[] // @@@@@ option -> dtstart in future\n options.set_x = options.set_x.map(function (opt) {\n return kb.any(opt as NamedNode, ns.cal('dtstart'))\n }).filter(function (time) {\n return !!time\n })\n\n options.set_y = kb.each(subject, ns.sched('response')) as RdflibNode[]\n options.set_y = options.set_y.map(function (resp) {\n return kb.any(resp as NamedNode, ns.dc('author'))\n }).filter(function (author) {\n return !!author\n })\n\n const possibleTimes = kb\n .each(invitation, ns.sched('option'))\n .map(function (opt) {\n return kb.any(opt as NamedNode, ns.cal('dtstart'))\n })\n .filter(function (time) {\n return !!time\n })\n\n const displayTheMatrix = function () {\n const matrix = div.appendChild(\n UI.matrix.matrixForQuery(\n dom,\n query,\n v.time,\n v.author,\n v.value,\n options,\n function () {}\n )\n )\n\n matrix.setAttribute('class', 'matrix')\n\n const refreshButton = dom.createElement('button')\n refreshButton.classList.add('schedule-pane__button')\n // refreshButton.textContent = 'refresh' // noun_479395.svg\n const refreshIcon = dom.createElement('img')\n refreshIcon.setAttribute('src', UI.icons.iconBase + 'noun_479395.svg')\n refreshIcon.classList.add('schedule-pane__button-icon')\n refreshButton.appendChild(refreshIcon)\n refreshButton.addEventListener(\n 'click',\n function (_e) {\n refreshButton.disabled = true\n kb.fetcher.refresh(resultsDoc, function (ok, body) {\n if (!ok) {\n console.log('Cant refresh matrix' + body)\n } else {\n matrix.refresh()\n refreshButton.disabled = false\n }\n })\n },\n false\n )\n\n clearElement(naviCenter)\n naviCenter.appendChild(refreshButton)\n }\n\n // @@ Give other combos too-- see schedule ontology\n // const possibleAvailabilities = [ SCHED('No'), SCHED('Maybe'), SCHED('Yes') ]\n\n // const me = authn.currentUser()\n\n const dataPointForNT: Record<string, NamedNode> = {}\n\n const loginContext = { div: naviCenter, dom }\n UI.login.ensureLoggedIn(loginContext).then(context => {\n const me = context.me\n if (!me) {\n return\n }\n const doc = resultsDoc\n options.set_y = options.set_y.filter(function (z) {\n return !z.sameTerm(me)\n })\n options.set_y.push(me) // Put me on the end\n\n options.cellFunction = function (cell, x, y, value) {\n if (value !== null) {\n kb.fetcher.nowOrWhenFetched(\n value.uri.split('#')[0],\n undefined,\n function (ok, _error) {\n if (ok) refreshCellColor(cell, value)\n }\n )\n }\n if (y.sameTerm(me)) {\n const callbackFunction = function () {\n refreshCellColor(cell, value)\n return ''\n } // @@ may need that\n const selectOptions = {}\n const predicate = ns.sched('availabilty')\n if (!x) return ''\n const cellSubject = dataPointForNT[x.toNT()]\n const selector = UI.widgets.makeSelectForOptions(\n dom,\n kb,\n cellSubject,\n predicate,\n possibleAvailabilities,\n selectOptions,\n resultsDoc,\n callbackFunction\n )\n cell.appendChild(selector)\n } else if (value !== null) {\n cell.textContent = UI.utils.label(value)\n }\n return ''\n }\n\n const responses = kb.each(invitation, ns.sched('response'))\n let myResponse: NamedNode | null = null\n responses.forEach(function (r) {\n if (kb.holds(r, ns.dc('author'), me)) {\n myResponse = r as NamedNode\n }\n })\n\n const insertables: Statement[] = [] // list of statements to be stored\n\n const id = UI.widgets.newThing(doc).uri\n if (myResponse === null) {\n myResponse = $rdf.sym(id + '_response')\n insertables.push(\n $rdf.st(invitation, ns.sched('response'), myResponse, doc)\n )\n insertables.push($rdf.st(myResponse, ns.dc('author'), me, doc))\n } else {\n const dps = kb.each(myResponse, ns.sched('cell'))\n dps.forEach(function (dataPoint) {\n const time = kb.any(dataPoint as NamedNode, ns.cal('dtstart'))\n if (!time) return\n dataPointForNT[time.toNT()] = dataPoint as NamedNode\n })\n }\n for (let j = 0; j < possibleTimes.length; j++) {\n const possibleTime = possibleTimes[j]\n if (!possibleTime) continue\n if (dataPointForNT[possibleTime.toNT()]) continue\n const dataPoint = $rdf.sym(id + '_' + j)\n insertables.push(\n $rdf.st(myResponse, ns.sched('cell'), dataPoint, doc)\n )\n insertables.push(\n $rdf.st(dataPoint, ns.cal('dtstart'), possibleTime, doc)\n ) // @@\n dataPointForNT[possibleTime.toNT()] = dataPoint\n }\n if (insertables.length) {\n kb.updater.update([], insertables, function (\n uri,\n success,\n errorBody\n ) {\n if (!success) {\n complainIfBad(success, errorBody)\n } else {\n displayTheMatrix()\n }\n })\n } else {\n // no insertables\n displayTheMatrix()\n }\n }) // @@@@ end of .then\n\n // If I made this in the first place, allow me to edit it.\n // @@ optionally -- allows others to if according to original\n const instanceCreator = kb.any(subject, ns.foaf('maker')) // owner?\n if (!instanceCreator || !me || instanceCreator.sameTerm(me)) {\n const editButton = dom.createElement('button')\n editButton.classList.add('schedule-pane__button')\n // editButton.textContent = '(Modify the poll)' // noun_344563.svg\n const editIcon = dom.createElement('img')\n editIcon.setAttribute('src', UI.icons.iconBase + 'noun_344563.svg')\n editIcon.classList.add('schedule-pane__button-icon')\n editButton.appendChild(editIcon)\n editButton.addEventListener(\n 'click',\n function (_e) {\n clearElement(div)\n showForms()\n },\n false\n )\n clearElement(naviLeft)\n naviLeft.appendChild(editButton)\n }\n\n // div.appendChild(editButton)\n\n clearElement(naviRight)\n naviRight.appendChild(newInstanceButton())\n } // showResults\n\n const div = dom.createElement('div')\n div.classList.add('schedule-pane')\n applyEnvironmentAttributes(div)\n const structure = div.appendChild(dom.createElement('table')) // @@ make responsive style\n structure.classList.add('schedule-pane__table')\n\n const logInOutButton: LoginStatusBoxLike | null = null\n /*\n const logInOutButton = UI.login.loginStatusBox(dom, setUser)\n // floating divs lead to a mess\n // logInOutButton.setAttribute('style', 'float: right') // float the beginning of the end\n naviLoginout3.appendChild(logInOutButton)\n logInOutButton.setAttribute('style', 'margin-right: 0em;')\n */\n\n const naviTop = structure.appendChild(dom.createElement('tr'))\n const naviMain = naviTop.appendChild(dom.createElement('td'))\n naviMain.classList.add('schedule-pane__main-cell')\n naviMain.setAttribute('colspan', '3')\n\n const naviMenu = structure.appendChild(dom.createElement('tr'))\n naviMenu.classList.add('naviMenu', 'schedule-pane__nav')\n const naviLeft = naviMenu.appendChild(dom.createElement('td'))\n const naviCenter = naviMenu.appendChild(dom.createElement('td'))\n const naviRight = naviMenu.appendChild(d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AAMgF,IAAWD,EAAU,YAAYnH,EAAI,cAAc,IAAI,CAAC;EAC9D,EAAS,UAAU,IAAI,YAAY,oBAAoB;EACvD,IAAMsE,IAAW8C,EAAS,YAAYpH,EAAI,cAAc,IAAI,CAAC,GACvDyC,IAAa2E,EAAS,YAAYpH,EAAI,cAAc,IAAI,CAAC,GACzDuE,IAAY6C,EAAS,YAAYpH,EAAI,cAAc,IAAI,CAAC;EAI9D,OAFA8B,EAAS,GAEFlB;CACT;AACF"}
1
+ {"version":3,"file":"schedulePane2.esm.js","names":["ns","formText","formsForSchedule_default","UI","$rdf","ns$1","possibleAvailabilities","runNextAgendaItem","nextTask","agenda","schedulePane","context","subject","ns","kb","settled","newBase","options","thisInstance","fail","body","reject","complainIfBad","ok","genACLtext","g","auth","a","aclURI","acl","doc","docURI","me","allWrite","setACL2","callbackCalled","callbackOnce","callbackFunction","message","aclDoc","aclText","fetcher","err","updater","authn","baseDir","base","newDetailsDoc","newInstance","existingBaseDir","newResultsDoc","toBeCopied","f","newURI","item","setThatACL","webId","resolve","dom","invitation","appPathSegment","applyEnvironmentAttributes","environment","waitingForLogin","detailsDoc","resultsDoc","formsURI","form1","form2","form3","div","clearElement","ele","refreshCellColor","bg","value","cell","logInOutButton","showAppropriateDisplay","newInstanceButton","b","initializeNewInstanceInWorkspace","workspace","uriPrefix","ws","initializeNewInstanceAtBase","p","error","getForms","getDetails","showSignon","showBootstrap","getResults","showForms","naviMain","signonContext","baseField","button","doneButton","naviCenter","currentSlide","gotDoneButton","hasFormControls","container","asBoolean","term","fallback","renderTimeProposalFallback","allDayValue","fallbackForm","slide","annotateRenderedForm","control","heading","includePrimaryFields","row","labelElement","labelText","commentValueCell","commentRow","unwrapSlide","firstElement","forms","slides","refresh","b1","b2","emailButton","naviLeft","naviRight","insertables","success","errorBody","emailIcon","title","mailto","mbox","who","showResults","response","comment","location","author","authorName","query","v","opt","time","resp","possibleTimes","displayTheMatrix","matrix","refreshButton","refreshIcon","dataPointForNT","loginContext","z","y","selectOptions","predicate","x","cellSubject","selector","responses","myResponse","r","id","dataPoint","j","possibleTime","instanceCreator","editButton","editIcon","structure","naviMenu"],"sources":["../../src/schedule/schedulePane.ts"],"sourcesContent":["/* Scheduler Pane\n **\n **\n */\n/* global alert */\n\nimport * as UI from 'solid-ui'\nimport { authn } from 'solid-logic'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext, RenderEnvironment } from 'pane-registry'\nimport type { NamedNode, Node as RdflibNode, Statement, Variable } from 'rdflib'\nimport formText from './formsForSchedule.ttl'\nimport './schedulePane.css'\nimport '../styles/utilities.css'\n\nconst ns = UI.ns\n\n// @@ Give other combos too-- see schedule ontology\nconst possibleAvailabilities = [\n ns.sched('No'),\n ns.sched('Maybe'),\n ns.sched('Yes')\n]\n\ntype AgendaTask = () => void\n\ntype CopySpec = {\n local: string\n contentType: string\n}\n\ntype MintOptions = {\n newBase: string\n useExisting?: NamedNode\n noIndexHTML?: boolean\n me?: NamedNode | null\n newInstance?: NamedNode\n thisInstance?: NamedNode\n}\n\ntype MatrixOptionsLike = {\n set_x: RdflibNode[]\n set_y: RdflibNode[]\n cellFunction?: (cell: HTMLElement, x: RdflibNode, y: RdflibNode, value: NamedNode | null) => string\n}\n\ntype ResponseQueryVars = {\n time: Variable\n author: Variable\n value: Variable\n resp: Variable\n cell: Variable\n}\n\ntype LoginStatusBoxLike = {\n refresh: () => void\n}\n\nfunction runNextAgendaItem (agenda: AgendaTask[]): void {\n const nextTask = agenda.shift()\n if (nextTask) {\n nextTask()\n }\n}\n\nexport const schedulePane = {\n icon: UI.icons.iconBase + 'noun_346777.svg', // @@ better?\n\n name: 'schedule',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve an Scheduler pane?\n label: function (subject: NamedNode, context: DataBrowserContext) {\n const kb = context.session.store\n const t = kb.findTypeURIs(subject)\n if (t['http://www.w3.org/ns/pim/schedule#SchedulableEvent']) {\n return 'Scheduling poll'\n }\n return null // No under other circumstances\n },\n\n // Mint a new Schedule poll\n mintClass: ns.sched('SchedulableEvent'),\n\n mintNew: function (context: DataBrowserContext, options: MintOptions) {\n return new Promise<MintOptions>(function (resolve, reject) {\n const ns = UI.ns\n const kb = context.session.store\n const agenda: AgendaTask[] = []\n let settled = false\n let newBase = options.newBase\n const thisInstance =\n options.useExisting || $rdf.sym(options.newBase + 'index.ttl#this')\n\n const fail = function (body: string) {\n if (settled) return\n settled = true\n agenda.length = 0\n console.log(\n 'Error in Schedule Pane: Error constructing new scheduler: ' + body\n )\n reject(new Error(body))\n }\n\n const complainIfBad = function (ok: boolean, body: string) {\n if (ok) return\n fail(body)\n }\n\n // ////////////////////// Accesss control\n\n // Two constiations of ACL for this app, public read and public read/write\n // In all cases owner has read write control\n\n const genACLtext = function (docURI: string, aclURI: string, allWrite: boolean) {\n const g = $rdf.graph()\n const auth = $rdf.Namespace('http://www.w3.org/ns/auth/acl#')\n let a = g.sym(aclURI + '#a1')\n const acl = g.sym(aclURI)\n const doc = g.sym(docURI)\n g.add(a, UI.ns.rdf('type'), auth('Authorization'), acl)\n g.add(a, auth('accessTo'), doc, acl)\n g.add(a, auth('agent'), me as NamedNode, acl)\n g.add(a, auth('mode'), auth('Read'), acl)\n g.add(a, auth('mode'), auth('Write'), acl)\n g.add(a, auth('mode'), auth('Control'), acl)\n\n a = g.sym(aclURI + '#a2')\n g.add(a, UI.ns.rdf('type'), auth('Authorization'), acl)\n g.add(a, auth('accessTo'), doc, acl)\n g.add(a, auth('agentClass'), ns.foaf('Agent'), acl)\n g.add(a, auth('mode'), auth('Read'), acl)\n if (allWrite) {\n g.add(a, auth('mode'), auth('Write'), acl)\n }\n return $rdf.serialize(acl, g, aclURI, 'text/turtle')\n }\n\n /*\n const setACL3 = function (docURI, allWrite, callbackFunction) {\n const aclText = genACLtext(docURI, aclDoc.uri, allWrite)\n return UI.acl.setACL(docURI, aclText, callbackFunction)\n }\n */\n\n const setACL2 = function setACL2 (docURI, allWrite, callbackFunction) {\n let callbackCalled = false\n const callbackOnce = function (ok, message?) {\n if (callbackCalled) return\n callbackCalled = true\n callbackFunction(ok, message)\n }\n const aclDoc = kb.any(\n kb.sym(docURI),\n kb.sym('http://www.iana.org/assignments/link-relations/acl')\n ) as NamedNode | null // @@ check that this get set by web.js\n\n if (aclDoc) {\n // Great we already know where it is\n const aclText = genACLtext(docURI, aclDoc.uri, allWrite)\n\n return fetcher\n .webOperation('PUT', aclDoc.uri, {\n data: aclText,\n contentType: 'text/turtle'\n })\n .then(_result => callbackOnce(true))\n .catch(err => {\n callbackOnce(false, err.message)\n })\n } else {\n return fetcher\n .load(docURI)\n .then(() => {\n const aclDoc = kb.any(\n kb.sym(docURI),\n kb.sym('http://www.iana.org/assignments/link-relations/acl')\n ) as NamedNode | null\n\n if (!aclDoc) {\n // complainIfBad(false, \"No Link rel=ACL header for \" + docURI)\n throw new Error('No Link rel=ACL header for ' + docURI)\n }\n\n const aclText = genACLtext(docURI, aclDoc.uri, allWrite)\n\n return fetcher.webOperation('PUT', aclDoc.uri, {\n data: aclText,\n contentType: 'text/turtle'\n })\n })\n .then(_result => callbackOnce(true))\n .catch(err => {\n callbackOnce(false, err.message)\n })\n }\n }\n\n // Body of mintNew\n const fetcher = kb.fetcher\n const updater = kb.updater\n\n let me: NamedNode | null = options.me || authn.currentUser()\n if (!me) {\n console.log('MUST BE LOGGED IN')\n alert('NOT LOGGED IN')\n reject(new Error('Schedule pane requires a logged-in user'))\n return\n }\n\n const baseDir = thisInstance.dir()\n if (!baseDir) {\n throw new Error('Schedule pane needs a base directory to mint a new poll')\n }\n const base = baseDir.uri\n let newDetailsDoc: NamedNode\n let newInstance: NamedNode\n\n if (options.useExisting) {\n newInstance = options.useExisting\n const existingBaseDir = thisInstance.dir()\n if (!existingBaseDir) {\n throw new Error('Existing schedule instance needs a containing directory')\n }\n newBase = existingBaseDir.uri\n newDetailsDoc = newInstance.doc()\n // newIndexDoc = null\n if (options.newBase) {\n throw new Error(\n 'mint new scheduler: Illegal - have both new base and existing event'\n )\n }\n } else {\n newDetailsDoc = kb.sym(newBase + 'details.ttl')\n // newIndexDoc = kb.sym(newBase + 'index.html')\n newInstance = kb.sym(newDetailsDoc.uri + '#event')\n }\n\n const newResultsDoc = kb.sym(newBase + 'results.ttl')\n\n const toBeCopied: CopySpec[] = options.noIndexHTML\n ? []\n : [{ local: 'index.html', contentType: 'text/html' }]\n\n // @@ This needs some form of visible progress bar\n for (let f = 0; f < toBeCopied.length; f++) {\n const item = toBeCopied[f]\n const fun = function copyItem (item: CopySpec) {\n agenda.push(function () {\n const newURI = newBase + item.local\n console.log('Copying ' + base + item.local + ' to ' + newURI)\n\n const setThatACL = function () {\n setACL2(newURI, false, function (ok, message) {\n if (!ok) {\n complainIfBad(\n ok,\n 'FAILED to set ACL ' + newURI + ' : ' + message\n )\n console.log('FAILED to set ACL ' + newURI + ' : ' + message)\n } else {\n runNextAgendaItem(agenda) // beware too much nesting\n }\n })\n }\n\n kb.fetcher\n .webCopy(\n base + item.local,\n newBase + item.local,\n item.contentType\n )\n .then(() => authn.checkUser())\n .then(webId => {\n me = webId as NamedNode | null\n\n setThatACL()\n })\n .catch(err => {\n console.log(\n 'FAILED to copy ' + base + item.local + ' : ' + err.message\n )\n complainIfBad(\n false,\n 'FAILED to copy ' + base + item.local + ' : ' + err.message\n )\n })\n })\n }\n fun(item)\n }\n\n agenda.push(function createDetailsFile () {\n kb.add(\n newInstance,\n ns.rdf('type'),\n ns.sched('SchedulableEvent'),\n newDetailsDoc\n )\n if (me) {\n kb.add(newInstance, ns.dc('author'), me, newDetailsDoc) // Who is sending the invitation?\n kb.add(newInstance, ns.foaf('maker'), me, newDetailsDoc) // Uneditable - wh is allowed to edit this?\n }\n\n kb.add(\n newInstance,\n ns.dc('created'),\n $rdf.literal(\n new Date().toISOString(),\n $rdf.sym('http://www.w3.org/2001/XMLSchema#dateTime')\n ),\n newDetailsDoc\n )\n kb.add(newInstance, ns.sched('resultsDocument'), newDetailsDoc)\n\n updater.put(\n newDetailsDoc,\n kb.statementsMatching(undefined, undefined, undefined, newDetailsDoc),\n 'text/turtle',\n function (uri2, ok, message) {\n if (ok) {\n runNextAgendaItem(agenda)\n } else {\n complainIfBad(\n ok,\n 'FAILED to save new scheduler at: ' +\n newDetailsDoc +\n ' : ' +\n message\n )\n console.log(\n 'FAILED to save new scheduler at: ' +\n newDetailsDoc +\n ' : ' +\n message\n )\n }\n }\n )\n })\n\n agenda.push(function () {\n kb.fetcher\n .webOperation('PUT', newResultsDoc.uri, {\n data: '',\n contentType: 'text/turtle'\n })\n .then(() => {\n runNextAgendaItem(agenda)\n })\n .catch(err => {\n complainIfBad(\n false,\n 'Failed to initialize empty results file: ' + err.message\n )\n })\n })\n\n agenda.push(function () {\n setACL2(newResultsDoc.uri, true, function (ok, body) {\n complainIfBad(\n ok,\n 'Failed to set Read-Write ACL on results file: ' + body\n )\n if (ok) runNextAgendaItem(agenda)\n })\n })\n\n agenda.push(function () {\n setACL2(newDetailsDoc.uri, false, function (ok, body) {\n complainIfBad(\n ok,\n 'Failed to set read ACL on configuration file: ' + body\n )\n if (ok) runNextAgendaItem(agenda)\n })\n })\n\n agenda.push(function () {\n // give the user links to the new app\n if (settled) return\n settled = true\n console.log('Finished minting new scheduler')\n options.newInstance = newInstance\n resolve(options)\n })\n\n runNextAgendaItem(agenda)\n // Created new data files.\n }) // promise\n }, // mintNew\n\n // Render one meeting schedule poll\n render: function (subject: NamedNode, context: DataBrowserContext) {\n const dom = context.dom\n const kb = context.session.store\n const ns = UI.ns\n const invitation = subject\n const appPathSegment = 'app-when-can-we.w3.org' // how to allocate this string and connect to\n\n function applyEnvironmentAttributes (element: HTMLDivElement): void {\n const environment = (context.environment ?? {}) as Partial<RenderEnvironment>\n element.dataset.layout = environment.layout ?? 'desktop'\n }\n\n // ////////////////////////////////////////////\n\n const fetcher = kb.fetcher\n const updater = kb.updater\n let waitingForLogin = false\n\n const thisInstance = subject\n const detailsDoc = subject.doc()\n const baseDir = detailsDoc.dir()\n if (!baseDir) {\n throw new Error('Schedule pane needs a containing directory for its details document')\n }\n const base = baseDir.uri\n\n const resultsDoc = $rdf.sym(base + 'results.ttl')\n // const formsURI = base + 'forms.ttl'\n // We can't in fact host stuff from there because of CORS\n const formsURI =\n 'https://solidos.github.io/solid-panes/schedule/formsForSchedule.ttl'\n\n const form1 = kb.sym(formsURI + '#form1')\n const form2 = kb.sym(formsURI + '#form2')\n const form3 = kb.sym(formsURI + '#form3')\n\n $rdf.parse(formText, kb, formsURI, 'text/turtle') // Load forms directly\n\n // Utility functions\n\n const complainIfBad = function (ok, message) {\n if (!ok) {\n div.appendChild(UI.widgets.errorMessageBlock(dom, message, 'pink'))\n }\n }\n\n const clearElement = function (ele) {\n while (ele.firstChild) {\n ele.removeChild(ele.firstChild)\n }\n return ele\n }\n\n const refreshCellColor = function (cell, value) {\n const bg = kb.any(value, UI.ns.ui('backgroundColor'))\n if (bg) {\n cell.classList.add('schedule-pane__cell')\n cell.setAttribute(\n 'style',\n 'background-color: ' + bg + ';'\n )\n }\n }\n\n let me: NamedNode | null = null\n\n authn.checkUser().then(webId => {\n me = (webId as NamedNode | null) ?? null\n\n if (logInOutButton) {\n logInOutButton.refresh()\n }\n if (webId && waitingForLogin) {\n waitingForLogin = false\n showAppropriateDisplay()\n }\n })\n console.log('me: ' + me) // @@ curently not actually used elsewhere\n\n // ////////////////////////////// Reproduction: spawn a new instance\n //\n // Viral growth path: user of app decides to make another instance\n //\n\n const newInstanceButton = function () {\n const b = UI.login.newAppInstance(\n dom,\n { noun: 'scheduler', appPathSegment },\n function (workspace: string | null, newBase: string) {\n return initializeNewInstanceInWorkspace(\n $rdf.sym(workspace || newBase)\n )\n }\n )\n if (b.firstChild instanceof HTMLElement) {\n b.firstChild.classList.add('schedule-pane__button')\n }\n return b\n } // newInstanceButton\n\n // /////////////////////// Create new document files for new instance of app\n\n const initializeNewInstanceInWorkspace = function (ws: NamedNode) {\n const uriPrefix = kb.any(ws, ns.space('uriPrefix'))\n let newBase = ''\n if (!uriPrefix) {\n newBase = ws.uri.split('#')[0]\n } else {\n newBase = uriPrefix.value\n }\n if (newBase.slice(-1) !== '/') {\n $rdf.log.error(appPathSegment + ': No / at end of uriPrefix ' + newBase) // @@ paramater?\n newBase = newBase + '/'\n }\n const now = new Date()\n newBase += appPathSegment + '/id' + now.getTime() + '/' // unique id\n\n initializeNewInstanceAtBase(thisInstance, newBase)\n }\n\n const initializeNewInstanceAtBase = function (thisInstance: NamedNode, newBase: string) {\n const options: MintOptions = { thisInstance, newBase }\n schedulePane.mintNew(context, options)\n .then(function (options) {\n if (!options.newInstance) {\n throw new Error('New scheduler instance was not returned')\n }\n const p = div.appendChild(dom.createElement('p'))\n p.setAttribute('style', 'font-size: 140%;')\n p.innerHTML =\n 'Your <a href=\\'' +\n options.newInstance.uri +\n '\\'><b>new scheduler</b></a> is ready to be set up. ' +\n '<br/><br/><a href=\\'' +\n options.newInstance.uri +\n '\\'>Say when you what days work for you.</a>'\n })\n .catch(function (error) {\n complainIfBad(\n false,\n 'Error createing new scheduler at ' +\n options.newInstance +\n ': ' +\n error\n )\n })\n }\n\n // ///////////////////////\n\n const getForms = function () {\n console.log('getforms()')\n getDetails()\n /*\n fetcher.nowOrWhenFetched(formsURI, undefined, function (ok, body) {\n console.log('getforms() ok? ' + ok)\n if (!ok) return complainIfBad(ok, body)\n getDetails()\n })\n */\n }\n\n const getDetails = function () {\n console.log('getDetails()') // Looking for blank screen hang-up\n fetcher.nowOrWhenFetched(detailsDoc.uri, undefined, function (ok, body) {\n console.log('getDetails() ok? ' + ok)\n if (!ok) return complainIfBad(ok, body)\n showAppropriateDisplay()\n })\n }\n\n const showAppropriateDisplay = function showAppropriateDisplay () {\n console.log('showAppropriateDisplay()')\n\n authn.checkUser().then(webId => {\n if (!webId) {\n return showSignon()\n }\n\n // On gh-pages, the turtle will not load properly (bad mime type)\n // but we can trap it as being a non-editable server.\n\n if (\n !kb.updater.editable(detailsDoc.uri, kb) ||\n kb.holds(subject, ns.rdf('type'), ns.wf('TemplateInstance'))\n ) {\n // This is read-only example e.g. on github pages, etc\n showBootstrap()\n return\n }\n\n const ready = kb.any(subject, ns.sched('ready'))\n\n if (!ready) {\n showForms()\n } else {\n // no editing not author\n getResults()\n }\n })\n }\n\n const showSignon = function showSignon () {\n clearElement(naviMain)\n const signonContext = { div, dom }\n UI.login.ensureLoggedIn(signonContext).then(context => {\n me = context.me ?? null\n waitingForLogin = false // untested\n showAppropriateDisplay()\n })\n }\n\n const showBootstrap = function showBootstrap () {\n const div = clearElement(naviMain)\n div.appendChild(\n UI.login.newAppInstance(\n dom,\n { noun: 'poll', appPathSegment },\n function (workspace: string | null, newBase: string) {\n return initializeNewInstanceInWorkspace(\n $rdf.sym(workspace || newBase)\n )\n }\n )\n )\n\n div.appendChild(dom.createElement('hr')) // @@\n\n const p = div.appendChild(dom.createElement('p'))\n p.textContent =\n 'Where would you like to store the data for the poll? ' +\n 'Give the URL of the directory where you would like the data stored.'\n const baseField = div.appendChild(dom.createElement('input'))\n baseField.setAttribute('type', 'text')\n baseField.size = 80 // really a string\n baseField.label = 'base URL'\n baseField.autocomplete = 'on'\n\n div.appendChild(dom.createElement('br')) // @@\n\n const button = div.appendChild(dom.createElement('button'))\n button.classList.add('schedule-pane__button')\n button.textContent = 'Start new poll at this URI'\n button.addEventListener('click', function (_e) {\n let newBase = baseField.value\n if (newBase.slice(-1) !== '/') {\n newBase += '/'\n }\n initializeNewInstanceAtBase(thisInstance, newBase)\n })\n }\n\n // ///////////// The forms to configure the poll\n\n const doneButton = dom.createElement('button')\n\n const showForms = function () {\n clearElement(naviCenter) // Remove refresh button if nec\n const div = naviMain\n\n // form2 depends on sched:allDay; seed a local default for new polls\n if (!kb.any(subject, ns.sched('allDay'))) {\n kb.add(\n subject,\n ns.sched('allDay'),\n $rdf.literal('true', $rdf.sym('http://www.w3.org/2001/XMLSchema#boolean')),\n detailsDoc\n )\n }\n\n const wizard = true\n let currentSlide = 0\n let gotDoneButton = false\n\n const hasFormControls = function (container) {\n return !!container.querySelector('input, select, textarea, button')\n }\n\n const asBoolean = function (term, fallback) {\n if (!term) return fallback\n const value = (term.value || '').toLowerCase()\n if (value === 'true' || value === '1') return true\n if (value === 'false' || value === '0') return false\n return fallback\n }\n\n const renderTimeProposalFallback = function (slide) {\n const allDayValue = asBoolean(kb.any(subject, ns.sched('allDay')), true)\n const fallbackForm = kb.sym(\n formsURI + (allDayValue ? '#AllDayForm2' : '#NotAllDayForm2')\n )\n UI.widgets.appendForm(\n document,\n slide,\n {},\n subject,\n fallbackForm,\n detailsDoc,\n complainIfBad\n )\n }\n\n const annotateRenderedForm = function (\n container: HTMLElement,\n includePrimaryFields: boolean = false\n ) {\n const controls = Array.from(\n container.querySelectorAll('input, select, textarea')\n ) as HTMLElement[]\n controls.forEach(control => {\n control.classList.add('schedule-pane__form-control')\n if (control.tagName.toLowerCase() === 'textarea') {\n control.classList.add('schedule-pane__form-control--textarea')\n }\n })\n\n const borderedPanels = Array.from(\n container.querySelectorAll('div[style*=\"border: 0.05em solid\"]')\n ) as HTMLElement[]\n borderedPanels.forEach(panel => {\n panel.classList.add('schedule-pane__panel')\n })\n\n const headings = Array.from(container.querySelectorAll('h3')) as HTMLElement[]\n headings.forEach(heading => {\n heading.classList.add('schedule-pane__form-heading')\n const headingText = (heading.textContent || '').trim().toLowerCase()\n if (headingText === 'time proposals') {\n heading.classList.add('schedule-pane__form-heading--time-proposals')\n heading.closest('.schedule-pane__panel')?.classList.add(\n 'schedule-pane__panel--time-proposals'\n )\n }\n })\n\n if (!includePrimaryFields) {\n return\n }\n\n const labels = Array.from(container.querySelectorAll('.formFieldName'))\n labels.forEach(labelElement => {\n const row = labelElement.parentElement as HTMLElement | null\n const labelText = (labelElement.textContent || '').trim().toLowerCase()\n if (!row) return\n if (labelText === 'summary' || labelText === 'location') {\n row.classList.add('schedule-pane__field-row--compact')\n }\n if (labelText === 'comment') {\n row.classList.add('schedule-pane__field-row--comment')\n }\n })\n\n const commentField = container.querySelector('textarea') as HTMLTextAreaElement | null\n const commentFieldWrapper = commentField?.parentElement as HTMLElement | null\n const commentValueCell = commentFieldWrapper?.parentElement as HTMLElement | null\n const commentRow = commentValueCell?.parentElement as HTMLElement | null\n if (commentRow) {\n commentRow.classList.add('schedule-pane__field-row--comment')\n }\n if (commentValueCell) {\n commentValueCell.classList.add('schedule-pane__field-value--comment')\n }\n }\n\n const unwrapSlide = function (slide: HTMLElement) {\n const firstElement = slide.firstElementChild as HTMLElement | null\n if (!firstElement || slide.childElementCount !== 1) {\n return slide\n }\n return firstElement\n }\n\n if (wizard) {\n const forms = [form1, form2, form3]\n const slides: HTMLElement[] = []\n currentSlide = 0\n for (let f = 0; f < forms.length; f++) {\n const slide = dom.createElement('div')\n UI.widgets.appendForm(\n document,\n slide,\n {},\n subject,\n forms[f],\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(slide, f === 0)\n\n // Some stores end up with form2's ui:Options unresolved; force a usable input form.\n if (f === 1 && !hasFormControls(slide)) {\n renderTimeProposalFallback(slide)\n annotateRenderedForm(slide)\n }\n\n slides.push(unwrapSlide(slide))\n }\n\n const refresh = function () {\n clearElement(naviMain).appendChild(slides[currentSlide])\n\n if (currentSlide === 0) {\n b1.setAttribute('disabled', '')\n } else {\n b1.removeAttribute('disabled')\n }\n if (currentSlide === slides.length - 1) {\n b2.setAttribute('disabled', '')\n if (!gotDoneButton) {\n // Only expose at last slide seen\n naviCenter.appendChild(emailButton) // could also check data shape\n naviCenter.appendChild(doneButton) // could also check data shape\n gotDoneButton = true\n }\n } else {\n b2.removeAttribute('disabled')\n }\n }\n const b1 = clearElement(naviLeft).appendChild(dom.createElement('button'))\n b1.classList.add('schedule-pane__button')\n b1.textContent = '<- go back'\n b1.addEventListener(\n 'click',\n function (_e) {\n if (currentSlide > 0) {\n currentSlide -= 1\n refresh()\n }\n },\n false\n )\n\n const b2 = clearElement(naviRight).appendChild(\n dom.createElement('button')\n )\n b2.classList.add('schedule-pane__button')\n b2.textContent = 'continue ->'\n b2.addEventListener(\n 'click',\n function (_e) {\n if (currentSlide < slides.length - 1) {\n currentSlide += 1\n refresh()\n }\n },\n false\n )\n\n refresh()\n } else {\n // not wizard one big form\n // @@@ create the initial config doc if not exist\n const table = div.appendChild(dom.createElement('table'))\n UI.widgets.appendForm(\n document,\n table,\n {},\n subject,\n form1,\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(table, true)\n UI.widgets.appendForm(\n document,\n table,\n {},\n subject,\n form2,\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(table)\n UI.widgets.appendForm(\n document,\n table,\n {},\n subject,\n form3,\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(table)\n naviCenter.appendChild(doneButton) // could also check data shape\n }\n // @@@ link config to results\n\n const insertables: Statement[] = []\n insertables.push(\n $rdf.st(\n subject,\n ns.sched('availabilityOptions'),\n ns.sched('YesNoMaybe'),\n detailsDoc\n )\n )\n insertables.push(\n $rdf.st(\n subject,\n ns.sched('ready'),\n $rdf.literal(\n new Date().toISOString(),\n $rdf.sym('http://www.w3.org/2001/XMLSchema#dateTime')\n ),\n detailsDoc\n )\n )\n insertables.push(\n $rdf.st(subject, ns.sched('results'), resultsDoc, detailsDoc)\n ) // @@ also link in results\n\n doneButton.classList.add('schedule-pane__button')\n doneButton.textContent = 'Go to poll'\n doneButton.addEventListener(\n 'click',\n function (_e) {\n if (kb.any(subject, ns.sched('ready'))) {\n // already done\n getResults()\n naviRight.appendChild(emailButton)\n } else {\n naviRight.appendChild(emailButton)\n kb.updater.update([], insertables, function (\n uri,\n success,\n errorBody\n ) {\n if (!success) {\n complainIfBad(success, errorBody)\n } else {\n // naviRight.appendChild(emailButton)\n getResults()\n }\n })\n }\n },\n false\n )\n\n const emailButton = dom.createElement('button')\n emailButton.classList.add('schedule-pane__button')\n const emailIcon = emailButton.appendChild(dom.createElement('img'))\n emailIcon.setAttribute('src', UI.icons.iconBase + 'noun_480183.svg') // noun_480183.svg\n emailIcon.classList.add('schedule-pane__button-icon')\n // emailButton.textContent = 'email invitations'\n emailButton.addEventListener(\n 'click',\n function (_e) {\n const title =\n kb.anyValue(subject, ns.cal('summary')) ||\n kb.anyValue(subject, ns.dc('title')) ||\n ''\n const mailto =\n 'mailto:' +\n kb\n .each(subject, ns.sched('invitee'))\n .map(function (who) {\n const mbox = kb.any(who as NamedNode, ns.foaf('mbox')) as NamedNode | null\n return mbox ? mbox.uri.replace('mailto:', '') : ''\n })\n .join(',') +\n '?subject=' +\n encodeURIComponent(title + '-- When can we meet?') +\n '&body=' +\n encodeURIComponent(\n title + '\\n\\nWhen can you?\\n\\nSee ' + subject + '\\n'\n )\n // @@ assumed there is a data browser\n\n console.log('Mail: ' + mailto)\n window.location.href = mailto\n },\n false\n )\n } // showForms\n\n // Ask for each day, what times .. @@ to be added some time\n /*\n const setTimesOfDay = function () {\n const i, j, x, y, slot, cell, day\n const insertables = []\n const possibleDays = kb.each(invitation, ns.sched('option'))\n .map(function (opt) {return kb.any(opt, ns.cal('dtstart'))})\n const cellLookup = []\n const slots = kb.each(invitation, ns.sched('slot'))\n if (slots.length === 0) {\n for (i = 0; i < 2; i++) {\n slot = UI.widgets.newThing(detailsDoc)\n insertables.push($rdf.st(invitation, ns.sched('slot'), slot))\n insertables.push($rdf.st(slot, ns.rdfs('label'), 'slot ' + (i + 1)))\n for (j = 0; j < possibleDays.length; j++) {\n day - possibleDays[j]\n x = kb.any(slot, ns.rdfs('label'))\n y = kb.any(day, ns.cal('dtstart'))\n cell = UI.widgets.newThing(detailsDoc)\n cellLookup[x.toNT() + y.toNT()] = cell\n insertables.push($rdf.st(slot, ns.sched('cell'), cell))\n insertables.push($rdf.st(cell, ns.sched('day'), possibleDays[j]))\n }\n }\n }\n\n const query = new $rdf.Query('TimesOfDay')\n const v = {}['day', 'label', 'value', 'slot', 'cell'].map(function (x) {\n query.consts.push(v[x] = $rdf.constiable(x)) })\n query.pat.add(invitation, ns.sched('slot'), v.slot)\n query.pat.add(v.slot, ns.rdfs('label'), v.label)\n query.pat.add(v.slot, ns.sched('cell'), v.cell)\n query.pat.add(v.cell, ns.sched('timeOfDay'), v.value)\n query.pat.add(v.cell, ns.sched('day'), v.day)\n\n const options = {}\n options.set_x = kb.each(subject, ns.sched('slot')) // @@@@@ option -> dtstart in future\n options.set_x = options.set_x.map(function (opt) { return kb.any(opt, ns.rdfs('label')) })\n\n options.set_y = kb.each(subject, ns.sched('option')); // @@@@@ option -> dtstart in future\n options.set_y = options.set_y.map(function (opt) { return kb.any(opt, ns.cal('dtstart')) })\n\n const possibleTimes = kb.each(invitation, ns.sched('option'))\n .map(function (opt) { return kb.any(opt, ns.cal('dtstart')) })\n\n const displayTheMatrix = function () {\n const matrix = div.appendChild(UI.matrix.matrixForQuery(\n dom, query, v.time, v.author, v.value, options, function () {}))\n\n matrix.setAttribute('class', 'matrix')\n\n const refreshButton = dom.createElement('button')\n refreshButton.setAttribute('style', inputStyle)\n refreshButton.textContent = 'refresh'\n refreshButton.addEventListener('click', function (e) {\n refreshButton.disabled = true\n store.fetcher.nowOrWhenFetched(subject.doc(), undefined, function (ok, body) {\n if (!ok) {\n console.log('Cant refresh matrix' + body)\n } else {\n matrix.refresh()\n refreshButton.disabled = false\n }\n })\n }, false)\n\n clearElement(naviCenter)\n naviCenter.appendChild(refreshButton)\n }\n\n const dataPointForNT = []\n\n const doc = resultsDoc\n options.set_y = options.set_y.filter(function (z) { return (! z.sameTerm(me)) })\n options.set_y.push(me) // Put me on the end\n\n options.cellFunction = function (cell, x, y, value) {\n // const point = cellLookup[x.toNT() + y.toNT()]\n\n if (y.sameTerm(me)) {\n const callbackFunction = function () { refreshCellColor(cell, value); }; // @@ may need that\n const selectOptions = {}\n const predicate = ns.sched('timeOfDay')\n const cellSubject = dataPointForNT[x.toNT()]\n const selector = UI.widgets.makeSelectForOptions(dom, kb, cellSubject, predicate,\n possibleAvailabilities, selectOptions, resultsDoc, callbackFunction)\n cell.appendChild(selector)\n } else if (value !== null) {\n cell.textContent = UI.utils.label(value)\n }\n\n }\n\n const responses = kb.each(invitation, ns.sched('response'))\n const myResponse = null\n responses.map(function (r) {\n if (kb.holds(r, ns.dc('author'), me)) {\n myResponse = r\n }\n })\n\n const id = UI.widgets.newThing(doc).uri\n if (myResponse === null) {\n myResponse = $rdf.sym(id + '_response')\n insertables.push($rdf.st(invitation, ns.sched('response'), myResponse, doc))\n insertables.push($rdf.st(myResponse, ns.dc('author'), me, doc))\n } else {\n const dps = kb.each(myResponse, ns.sched('cell'))\n dps.map(function (dataPoint) {\n const time = kb.any(dataPoint, ns.cal('dtstart'))\n dataPointForNT[time.toNT()] = dataPoint\n })\n }\n for (let j = 0; j < possibleTimes.length; j++) {\n if (dataPointForNT[possibleTimes[j].toNT()]) continue\n const dataPoint = $rdf.sym(id + '_' + j)\n insertables.push($rdf.st(myResponse, ns.sched('cell'), dataPoint, doc))\n insertables.push($rdf.st(dataPoint, ns.cal('dtstart'), possibleTimes[j], doc)) // @@\n dataPointForNT[possibleTimes[j].toNT()] = dataPoint\n }\n if (insertables.length) {\n store.updater.update([], insertables, function (uri, success, errorBody) {\n if (!success) {\n complainIfBad(success, errorBody)\n } else {\n displayTheMatrix()\n }\n })\n } else { // no insertables\n displayTheMatrix()\n }\n }\n */\n // end setTimesOfDay\n\n // Read or create empty results file\n function getResults () {\n fetcher.nowOrWhenFetched(resultsDoc.uri, undefined, (ok, body, response) => {\n if (!ok) {\n if (response.status === 404) {\n // / Check explicitly for 404 error\n console.log('Initializing details file ' + resultsDoc)\n updater.put(resultsDoc, [], 'text/turtle', function (\n uri2,\n ok,\n message\n ) {\n if (ok) {\n clearElement(naviMain)\n showResults()\n } else {\n complainIfBad(\n ok,\n 'FAILED to create results file at: ' +\n resultsDoc.uri +\n ' : ' +\n message\n )\n console.log(\n 'FAILED to craete results file at: ' +\n resultsDoc.uri +\n ' : ' +\n message\n )\n }\n })\n } else {\n // Other error, not 404 -- do not try to overwite the file\n complainIfBad(ok, 'FAILED to read results file: ' + body)\n }\n } else {\n // Happy read\n clearElement(naviMain)\n showResults()\n }\n })\n }\n\n function showResults () {\n // Now the form for responsing to the poll\n //\n\n // div.appendChild(dom.createElement('hr'))\n\n // const invitation = subject\n const title = kb.any(invitation, ns.cal('summary'))\n const comment = kb.any(invitation, ns.cal('comment'))\n const location = kb.any(invitation, ns.cal('location'))\n const div = naviMain\n if (title) div.appendChild(dom.createElement('h3')).textContent = title.value\n if (location) {\n div.appendChild(dom.createElement('address')).textContent =\n location.value\n }\n if (comment) {\n div.appendChild(dom.createElement('p')).textContent = comment.value\n }\n const author = kb.any(invitation, ns.dc('author')) as NamedNode | null\n if (author) {\n const authorName = kb.any(author, ns.foaf('name'))\n if (authorName) {\n div.appendChild(dom.createElement('p')).textContent = authorName.value\n }\n }\n\n const query = new $rdf.Query('Responses', 0)\n const v = {} as ResponseQueryVars\n v.time = $rdf.variable('time')\n v.author = $rdf.variable('author')\n v.value = $rdf.variable('value')\n v.resp = $rdf.variable('resp')\n v.cell = $rdf.variable('cell')\n query.vars.push(v.time, v.author, v.value, v.resp, v.cell)\n query.pat.add(invitation, ns.sched('response'), v.resp)\n query.pat.add(v.resp, ns.dc('author'), v.author)\n query.pat.add(v.resp, ns.sched('cell'), v.cell)\n query.pat.add(v.cell, ns.sched('availabilty'), v.value)\n query.pat.add(v.cell, ns.cal('dtstart'), v.time)\n\n // Sort by by person @@@\n\n const options: MatrixOptionsLike = { set_x: [], set_y: [] }\n options.set_x = kb.each(subject, ns.sched('option')) as RdflibNode[] // @@@@@ option -> dtstart in future\n options.set_x = options.set_x.map(function (opt) {\n return kb.any(opt as NamedNode, ns.cal('dtstart'))\n }).filter(function (time) {\n return !!time\n })\n\n options.set_y = kb.each(subject, ns.sched('response')) as RdflibNode[]\n options.set_y = options.set_y.map(function (resp) {\n return kb.any(resp as NamedNode, ns.dc('author'))\n }).filter(function (author) {\n return !!author\n })\n\n const possibleTimes = kb\n .each(invitation, ns.sched('option'))\n .map(function (opt) {\n return kb.any(opt as NamedNode, ns.cal('dtstart'))\n })\n .filter(function (time) {\n return !!time\n })\n\n const displayTheMatrix = function () {\n const matrix = div.appendChild(\n UI.matrix.matrixForQuery(\n dom,\n query,\n v.time,\n v.author,\n v.value,\n options,\n function () {}\n )\n )\n\n matrix.setAttribute('class', 'matrix')\n\n const refreshButton = dom.createElement('button')\n refreshButton.classList.add('schedule-pane__button')\n // refreshButton.textContent = 'refresh' // noun_479395.svg\n const refreshIcon = dom.createElement('img')\n refreshIcon.setAttribute('src', UI.icons.iconBase + 'noun_479395.svg')\n refreshIcon.classList.add('schedule-pane__button-icon')\n refreshButton.appendChild(refreshIcon)\n refreshButton.addEventListener(\n 'click',\n function (_e) {\n refreshButton.disabled = true\n kb.fetcher.refresh(resultsDoc, function (ok, body) {\n if (!ok) {\n console.log('Cant refresh matrix' + body)\n } else {\n matrix.refresh()\n refreshButton.disabled = false\n }\n })\n },\n false\n )\n\n clearElement(naviCenter)\n naviCenter.appendChild(refreshButton)\n }\n\n // @@ Give other combos too-- see schedule ontology\n // const possibleAvailabilities = [ SCHED('No'), SCHED('Maybe'), SCHED('Yes') ]\n\n // const me = authn.currentUser()\n\n const dataPointForNT: Record<string, NamedNode> = {}\n\n const loginContext = { div: naviCenter, dom }\n UI.login.ensureLoggedIn(loginContext).then(context => {\n const me = context.me\n if (!me) {\n return\n }\n const doc = resultsDoc\n options.set_y = options.set_y.filter(function (z) {\n return !z.sameTerm(me)\n })\n options.set_y.push(me) // Put me on the end\n\n options.cellFunction = function (cell, x, y, value) {\n if (value !== null) {\n kb.fetcher.nowOrWhenFetched(\n value.uri.split('#')[0],\n undefined,\n function (ok, _error) {\n if (ok) refreshCellColor(cell, value)\n }\n )\n }\n if (y.sameTerm(me)) {\n const callbackFunction = function () {\n refreshCellColor(cell, value)\n return ''\n } // @@ may need that\n const selectOptions = {}\n const predicate = ns.sched('availabilty')\n if (!x) return ''\n const cellSubject = dataPointForNT[x.toNT()]\n const selector = UI.widgets.makeSelectForOptions(\n dom,\n kb,\n cellSubject,\n predicate,\n possibleAvailabilities,\n selectOptions,\n resultsDoc,\n callbackFunction\n )\n cell.appendChild(selector)\n } else if (value !== null) {\n cell.textContent = UI.utils.label(value)\n }\n return ''\n }\n\n const responses = kb.each(invitation, ns.sched('response'))\n let myResponse: NamedNode | null = null\n responses.forEach(function (r) {\n if (kb.holds(r, ns.dc('author'), me)) {\n myResponse = r as NamedNode\n }\n })\n\n const insertables: Statement[] = [] // list of statements to be stored\n\n const id = UI.widgets.newThing(doc).uri\n if (myResponse === null) {\n myResponse = $rdf.sym(id + '_response')\n insertables.push(\n $rdf.st(invitation, ns.sched('response'), myResponse, doc)\n )\n insertables.push($rdf.st(myResponse, ns.dc('author'), me, doc))\n } else {\n const dps = kb.each(myResponse, ns.sched('cell'))\n dps.forEach(function (dataPoint) {\n const time = kb.any(dataPoint as NamedNode, ns.cal('dtstart'))\n if (!time) return\n dataPointForNT[time.toNT()] = dataPoint as NamedNode\n })\n }\n for (let j = 0; j < possibleTimes.length; j++) {\n const possibleTime = possibleTimes[j]\n if (!possibleTime) continue\n if (dataPointForNT[possibleTime.toNT()]) continue\n const dataPoint = $rdf.sym(id + '_' + j)\n insertables.push(\n $rdf.st(myResponse, ns.sched('cell'), dataPoint, doc)\n )\n insertables.push(\n $rdf.st(dataPoint, ns.cal('dtstart'), possibleTime, doc)\n ) // @@\n dataPointForNT[possibleTime.toNT()] = dataPoint\n }\n if (insertables.length) {\n kb.updater.update([], insertables, function (\n uri,\n success,\n errorBody\n ) {\n if (!success) {\n complainIfBad(success, errorBody)\n } else {\n displayTheMatrix()\n }\n })\n } else {\n // no insertables\n displayTheMatrix()\n }\n }) // @@@@ end of .then\n\n // If I made this in the first place, allow me to edit it.\n // @@ optionally -- allows others to if according to original\n const instanceCreator = kb.any(subject, ns.foaf('maker')) // owner?\n if (!instanceCreator || !me || instanceCreator.sameTerm(me)) {\n const editButton = dom.createElement('button')\n editButton.classList.add('schedule-pane__button')\n // editButton.textContent = '(Modify the poll)' // noun_344563.svg\n const editIcon = dom.createElement('img')\n editIcon.setAttribute('src', UI.icons.iconBase + 'noun_344563.svg')\n editIcon.classList.add('schedule-pane__button-icon')\n editButton.appendChild(editIcon)\n editButton.addEventListener(\n 'click',\n function (_e) {\n clearElement(div)\n showForms()\n },\n false\n )\n clearElement(naviLeft)\n naviLeft.appendChild(editButton)\n }\n\n // div.appendChild(editButton)\n\n clearElement(naviRight)\n naviRight.appendChild(newInstanceButton())\n } // showResults\n\n const div = dom.createElement('div')\n div.classList.add('schedule-pane')\n applyEnvironmentAttributes(div)\n const structure = div.appendChild(dom.createElement('table')) // @@ make responsive style\n structure.classList.add('schedule-pane__table')\n\n const logInOutButton: LoginStatusBoxLike | null = null\n /*\n const logInOutButton = UI.login.loginStatusBox(dom, setUser)\n // floating divs lead to a mess\n // logInOutButton.setAttribute('style', 'float: right') // float the beginning of the end\n naviLoginout3.appendChild(logInOutButton)\n logInOutButton.setAttribute('style', 'margin-right: 0em;')\n */\n\n const naviTop = structure.appendChild(dom.createElement('tr'))\n const naviMain = naviTop.appendChild(dom.createElement('td'))\n naviMain.classList.add('schedule-pane__main-cell')\n naviMain.setAttribute('colspan', '3')\n\n const naviMenu = structure.appendChild(dom.createElement('tr'))\n naviMenu.classList.add('naviMenu', 'schedule-pane__nav')\n const naviLeft = naviMenu.appendChild(dom.createElement('td'))\n const naviCenter = naviMenu.appendChild(dom.createElement('td'))\n const naviRight = naviMenu.appendChild(dom.createElement('td'))\n\n getForms()\n\n return div\n } // render\n} // property list\n// ends\n"],"mappings":";;;;;;;AAeA,IAAMA,IAAKG,EAAG,IAGRG,IAAyB;CAC7BN,EAAG,MAAM,IAAI;CACbA,EAAG,MAAM,OAAO;CAChBA,EAAG,MAAM,KAAK;AAChB;AAoCA,SAASO,EAAmB,GAA4B;CACtD,IAAMC,IAAWC,EAAO,MAAM;CAC9B,AAAID,KACFA,EAAS;AAEb;AAEA,IAAaE,IAAe;CAC1B,MAAMP,EAAG,MAAM,WAAW;CAE1B,MAAM;CA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,cAAc,IAAI,CAAC,GACvDyC,IAAa2E,EAAS,YAAYpH,EAAI,cAAc,IAAI,CAAC,GACzDuE,IAAY6C,EAAS,YAAYpH,EAAI,cAAc,IAAI,CAAC;EAI9D,OAFA8B,EAAS,GAEFlB;CACT;AACF"}
@@ -1,5 +1,5 @@
1
1
  import { aclControl as e, icons as t, ns as n } from "solid-ui";
2
- //#region src/sharing/sharingPane.ts
2
+ // src/sharing/sharingPane.ts
3
3
  var r = {
4
4
  icon: t.iconBase + "padlock-timbl.svg",
5
5
  name: "sharing",
@@ -16,7 +16,6 @@ var r = {
16
16
  }
17
17
  }
18
18
  };
19
- //#endregion
20
19
  export { r as default };
21
20
 
22
21
  //# sourceMappingURL=sharingPane.esm.js.map
@@ -1,6 +1,6 @@
1
1
  import * as e from "solid-ui";
2
2
  import t from "@solid/better-simple-slideshow";
3
- //#region src/slideshow/slideshowPane.js
3
+ // src/slideshow/slideshowPane.js
4
4
  var n = e.ns, r = {
5
5
  icon: e.icons.iconBase + "noun_138712.svg",
6
6
  name: "slideshow",
@@ -40,7 +40,6 @@ var n = e.ns, r = {
40
40
  }, 1e3), s;
41
41
  }
42
42
  };
43
- //#endregion
44
43
  export { r as slideshowPane };
45
44
 
46
45
  //# sourceMappingURL=slideshowPane.esm.js.map
@@ -1,2 +1,2 @@
1
- require("./icons.cjs.js"),require("./spinner.cjs.js");let e=require("solid-ui");require("rdflib"),require("solid-ui/components/button"),require("lit-html"),e.ns.foaf(`homepage`),e.ns.foaf(`weblog`),e.ns.foaf(`workplaceHomepage`),e.ns.foaf(`schoolHomepage`);
1
+ require("./icons.cjs.js"),require("./spinner.cjs.js");let e=require("solid-ui");require("rdflib"),require("lit-html"),require("solid-ui/components/button"),e.ns.foaf(`homepage`),e.ns.foaf(`weblog`),e.ns.foaf(`workplaceHomepage`),e.ns.foaf(`schoolHomepage`);
2
2
  //# sourceMappingURL=editProfileDetails.cjs.js.map
@@ -2,9 +2,8 @@ import "./icons.esm.js";
2
2
  import "./spinner.esm.js";
3
3
  import { ns as e } from "solid-ui";
4
4
  import "rdflib";
5
- import "solid-ui/components/button";
6
5
  import "lit-html";
6
+ import "solid-ui/components/button";
7
7
  e.foaf("homepage"), e.foaf("weblog"), e.foaf("workplaceHomepage"), e.foaf("schoolHomepage");
8
- //#endregion
9
8
 
10
9
  //# sourceMappingURL=editProfileDetails.esm.js.map
@@ -1,4 +1,4 @@
1
- //#region src/social/icons.ts
1
+ // src/social/icons.ts
2
2
  var e = String.raw;
3
3
  e`
4
4
  <svg xmlns="http://www.w3.org/2000/svg"
@@ -83,7 +83,6 @@ e`
83
83
  </defs>
84
84
  </svg>
85
85
  `;
86
- //#endregion
87
86
  export { t as locationIcon };
88
87
 
89
88
  //# sourceMappingURL=icons.esm.js.map