solid-panes 3.7.3-f251a0e3 → 3.7.3-newStyle-363115da

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 (68) hide show
  1. package/dist/RDFXMLPane.js +2 -1
  2. package/dist/RDFXMLPane.js.map +1 -1
  3. package/dist/dashboard/basicPreferences.js +121 -129
  4. package/dist/dashboard/basicPreferences.js.map +1 -1
  5. package/dist/dashboard/dashboardPane.js +60 -54
  6. package/dist/dashboard/dashboardPane.js.map +1 -1
  7. package/dist/dashboard/homepage.js +45 -54
  8. package/dist/dashboard/homepage.js.map +1 -1
  9. package/dist/dataContentPane.js +3 -2
  10. package/dist/dataContentPane.js.map +1 -1
  11. package/dist/defaultPane.js +1 -1
  12. package/dist/defaultPane.js.map +1 -1
  13. package/dist/home/homePane.d.ts.map +1 -1
  14. package/dist/home/homePane.js +60 -55
  15. package/dist/home/homePane.js.map +1 -1
  16. package/dist/index.js +86 -25
  17. package/dist/index.js.map +1 -1
  18. package/dist/internal/internalPane.js +168 -179
  19. package/dist/internal/internalPane.js.map +1 -1
  20. package/dist/mainPage/footer.js +13 -7
  21. package/dist/mainPage/footer.js.map +1 -1
  22. package/dist/mainPage/header.js +60 -58
  23. package/dist/mainPage/header.js.map +1 -1
  24. package/dist/mainPage/index.js +19 -24
  25. package/dist/mainPage/index.js.map +1 -1
  26. package/dist/microblogPane/microblogPane.js +18 -17
  27. package/dist/microblogPane/microblogPane.js.map +1 -1
  28. package/dist/n3Pane.js +2 -1
  29. package/dist/n3Pane.js.map +1 -1
  30. package/dist/outline/context.js +17 -11
  31. package/dist/outline/context.js.map +1 -1
  32. package/dist/outline/manager.js +11 -11
  33. package/dist/outline/manager.js.map +1 -1
  34. package/dist/outline/propertyViews.js +39 -28
  35. package/dist/outline/propertyViews.js.map +1 -1
  36. package/dist/outline/queryByExample.js +4 -3
  37. package/dist/outline/queryByExample.js.map +1 -1
  38. package/dist/outline/userInput.js +13 -13
  39. package/dist/outline/userInput.js.map +1 -1
  40. package/dist/outline/viewAsImage.js +13 -5
  41. package/dist/outline/viewAsImage.js.map +1 -1
  42. package/dist/outline/viewAsMbox.js +20 -11
  43. package/dist/outline/viewAsMbox.js.map +1 -1
  44. package/dist/pad/padPane.js +395 -404
  45. package/dist/pad/padPane.js.map +1 -1
  46. package/dist/schedule/schedulePane.js +4 -5
  47. package/dist/schedule/schedulePane.js.map +1 -1
  48. package/dist/sharing/sharingPane.js +36 -32
  49. package/dist/sharing/sharingPane.js.map +1 -1
  50. package/dist/socialPane.js +2 -1
  51. package/dist/socialPane.js.map +1 -1
  52. package/dist/tabbed/tabbedPane.js +54 -51
  53. package/dist/tabbed/tabbedPane.js.map +1 -1
  54. package/dist/trustedApplications/trustedApplications.dom.js +134 -146
  55. package/dist/trustedApplications/trustedApplications.dom.js.map +1 -1
  56. package/dist/trustedApplications/trustedApplications.utils.js +20 -20
  57. package/dist/trustedApplications/trustedApplications.utils.js.map +1 -1
  58. package/dist/trustedApplications/trustedApplications.view.js +51 -57
  59. package/dist/trustedApplications/trustedApplications.view.js.map +1 -1
  60. package/dist/versionInfo.js +35 -29
  61. package/dist/versionInfo.js.map +1 -1
  62. package/package.json +31 -36
  63. package/dist/schedule/formsForSchedule.js +0 -124
  64. package/dist/schedule/formsForSchedule.js.map +0 -1
  65. package/dist/types.d.ts +0 -30
  66. package/dist/types.d.ts.map +0 -1
  67. package/dist/types.js +0 -2
  68. package/dist/types.js.map +0 -1
@@ -1,19 +1,17 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { authSession, authn } from 'solid-logic';
11
- import { icons, initHeader } from 'solid-ui';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createHeader = createHeader;
7
+ var _solidLogic = require("solid-logic");
8
+ var _solidUi = require("solid-ui");
12
9
  /**
13
10
  * menu icons
14
11
  */
15
- const HELP_MENU_ICON = icons.iconBase + 'noun_help.svg';
12
+ const HELP_MENU_ICON = _solidUi.icons.iconBase + 'noun_help.svg';
16
13
  const SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg';
14
+
17
15
  /**
18
16
  * menu elements
19
17
  */
@@ -26,59 +24,63 @@ const LOG_OUT_MENU_ITEM = 'Log out';
26
24
  */
27
25
  const USER_GUIDE_MENU_URL = 'https://solidos.github.io/userguide/';
28
26
  const REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solidos/solidos/issues';
29
- export function createHeader(store, outliner) {
30
- return __awaiter(this, void 0, void 0, function* () {
31
- initHeader(store, yield setUserMenu(outliner), setHeaderOptions());
32
- });
27
+ async function createHeader(store, outliner) {
28
+ (0, _solidUi.initHeader)(store, await setUserMenu(outliner), setHeaderOptions());
33
29
  }
34
30
  function setHeaderOptions() {
35
- const helpMenuList = [
36
- { label: USER_GUIDE_MENU_ITEM, url: USER_GUIDE_MENU_URL, target: '_blank' },
37
- { label: REPORT_A_PROBLEM_MENU_ITEM, url: REPORT_A_PROBLEM_MENU_URL, target: '_blank' }
38
- ];
39
- const headerOptions = { logo: SOLID_ICON_URL, helpIcon: HELP_MENU_ICON, helpMenuList };
40
- return headerOptions;
31
+ const helpMenuList = [{
32
+ label: USER_GUIDE_MENU_ITEM,
33
+ url: USER_GUIDE_MENU_URL,
34
+ target: '_blank'
35
+ }, {
36
+ label: REPORT_A_PROBLEM_MENU_ITEM,
37
+ url: REPORT_A_PROBLEM_MENU_URL,
38
+ target: '_blank'
39
+ }];
40
+ const headerOptions = {
41
+ logo: SOLID_ICON_URL,
42
+ helpIcon: HELP_MENU_ICON,
43
+ helpMenuList
44
+ };
45
+ return headerOptions;
41
46
  }
42
- function setUserMenu(outliner) {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- const showProfile = {
45
- label: SHOW_YOUR_PROFILE_MENU_ITEM,
46
- onclick: () => openUserProfile(outliner)
47
- };
48
- const logOut = {
49
- label: LOG_OUT_MENU_ITEM,
50
- onclick: () => {
51
- authSession.logout();
52
- }
53
- };
54
- // the order of the menu is important here, show profile first and logout last
55
- let userMenuList = []; // was [showProfile]
56
- userMenuList = userMenuList.concat(yield getMenuItems(outliner));
57
- userMenuList.push(logOut);
58
- return userMenuList;
59
- });
47
+ async function setUserMenu(outliner) {
48
+ // @ts-ignore: showProfile is used conditionally
49
+ const showProfile = {
50
+ label: SHOW_YOUR_PROFILE_MENU_ITEM,
51
+ onclick: () => openUserProfile(outliner)
52
+ };
53
+ const logOut = {
54
+ label: LOG_OUT_MENU_ITEM,
55
+ onclick: () => {
56
+ _solidLogic.authSession.logout();
57
+ }
58
+ };
59
+
60
+ // the order of the menu is important here, show profile first and logout last
61
+ let userMenuList = []; // was [showProfile]
62
+ userMenuList = userMenuList.concat(await getMenuItems(outliner));
63
+ userMenuList.push(logOut);
64
+ return userMenuList;
60
65
  }
66
+
61
67
  // Does not work to jump to user profile,
62
68
  function openUserProfile(outliner) {
63
- outliner.GotoSubject(authn.currentUser(), true, undefined, true, undefined);
64
- location.reload();
69
+ outliner.GotoSubject(_solidLogic.authn.currentUser(), true, undefined, true, undefined);
70
+ location.reload();
65
71
  }
66
- function getMenuItems(outliner) {
67
- return __awaiter(this, void 0, void 0, function* () {
68
- const items = yield outliner.getDashboardItems();
69
- return items.map((element) => {
70
- return {
71
- label: element.label,
72
- onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)
73
- };
74
- });
75
- });
72
+ async function getMenuItems(outliner) {
73
+ const items = await outliner.getDashboardItems();
74
+ return items.map(element => {
75
+ return {
76
+ label: element.label,
77
+ onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)
78
+ };
79
+ });
76
80
  }
77
- function openDashboardPane(outliner, pane) {
78
- return __awaiter(this, void 0, void 0, function* () {
79
- outliner.showDashboard({
80
- pane
81
- });
82
- });
81
+ async function openDashboardPane(outliner, pane) {
82
+ outliner.showDashboard({
83
+ pane
84
+ });
83
85
  }
84
86
  //# sourceMappingURL=header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/mainPage/header.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC5C;;EAEE;AACF,MAAM,cAAc,GAAG,KAAK,CAAC,QAAQ,GAAG,eAAe,CAAA;AACvD,MAAM,cAAc,GAAG,sDAAsD,CAAA;AAE7E;;EAEE;AACF,MAAM,oBAAoB,GAAG,YAAY,CAAA;AACzC,MAAM,0BAA0B,GAAG,kBAAkB,CAAA;AACrD,MAAM,2BAA2B,GAAG,mBAAmB,CAAA;AACvD,MAAM,iBAAiB,GAAG,SAAS,CAAA;AAGnC;;GAEG;AACH,MAAM,mBAAmB,GAAG,sCAAsC,CAAA;AAClE,MAAM,yBAAyB,GAAG,2CAA2C,CAAA;AAE7E,MAAM,UAAgB,YAAY,CAAE,KAAK,EAAE,QAAQ;;QACjD,UAAU,CAAC,KAAK,EAAE,MAAM,WAAW,CAAC,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAA;IACpE,CAAC;CAAA;AAED,SAAS,gBAAgB;IACvB,MAAM,YAAY,GAAG;QACnB,EAAE,KAAK,EAAE,oBAAoB,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC3E,EAAE,KAAK,EAAE,0BAA0B,EAAE,GAAG,EAAE,yBAAyB,EAAE,MA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C;aAChF,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;CAAA;AAED,SAAe,iBAAiB,CAAE,QAAa,EAAE,IAAY;;QAC3D,QAAQ,CAAC,aAAa,CAAC;YACrB,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CAAA"}
1
+ {"version":3,"file":"header.js","names":["_solidLogic","require","_solidUi","HELP_MENU_ICON","icons","iconBase","SOLID_ICON_URL","USER_GUIDE_MENU_ITEM","REPORT_A_PROBLEM_MENU_ITEM","SHOW_YOUR_PROFILE_MENU_ITEM","LOG_OUT_MENU_ITEM","USER_GUIDE_MENU_URL","REPORT_A_PROBLEM_MENU_URL","createHeader","store","outliner","initHeader","setUserMenu","setHeaderOptions","helpMenuList","label","url","target","headerOptions","logo","helpIcon","showProfile","onclick","openUserProfile","logOut","authSession","logout","userMenuList","concat","getMenuItems","push","GotoSubject","authn","currentUser","undefined","location","reload","items","getDashboardItems","map","element","openDashboardPane","tabName","paneName","pane","showDashboard"],"sources":["../../src/mainPage/header.ts"],"sourcesContent":["import { authSession, authn } from 'solid-logic'\nimport { icons, initHeader } from 'solid-ui'\n/**\n * menu icons\n*/\nconst HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\n/**\n * menu elements\n*/\nconst USER_GUIDE_MENU_ITEM = 'User guide'\nconst REPORT_A_PROBLEM_MENU_ITEM = 'Report a problem'\nconst SHOW_YOUR_PROFILE_MENU_ITEM = 'Show your profile'\nconst LOG_OUT_MENU_ITEM = 'Log out'\n\ntype UserMenuItem = { label: string; onclick: () => void }\n/**\n * URLS\n */\nconst USER_GUIDE_MENU_URL = 'https://solidos.github.io/userguide/'\nconst REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solidos/solidos/issues'\n\nexport async function createHeader (store, outliner) {\n initHeader(store, await setUserMenu(outliner), setHeaderOptions())\n}\n\nfunction setHeaderOptions () {\n const helpMenuList = [\n { label: USER_GUIDE_MENU_ITEM, url: USER_GUIDE_MENU_URL, target: '_blank' },\n { label: REPORT_A_PROBLEM_MENU_ITEM, url: REPORT_A_PROBLEM_MENU_URL, target: '_blank' }\n ]\n const headerOptions = { logo: SOLID_ICON_URL, helpIcon: HELP_MENU_ICON, helpMenuList }\n\n return headerOptions\n}\n\nasync function setUserMenu (outliner: any) {\n // @ts-ignore: showProfile is used conditionally\n const showProfile = {\n label: SHOW_YOUR_PROFILE_MENU_ITEM,\n onclick: () => openUserProfile(outliner)\n }\n\n const logOut: UserMenuItem = {\n label: LOG_OUT_MENU_ITEM,\n onclick: () => {\n authSession.logout()\n }\n }\n\n // the order of the menu is important here, show profile first and logout last\n let userMenuList:UserMenuItem[] = [] // was [showProfile]\n userMenuList = userMenuList.concat(await getMenuItems(outliner))\n userMenuList.push(logOut)\n\n return userMenuList\n}\n\n// Does not work to jump to user profile,\nfunction openUserProfile (outliner: any) {\n outliner.GotoSubject(authn.currentUser(), true, undefined, true, undefined)\n location.reload()\n}\n\nasync function getMenuItems (outliner: any) {\n const items = await outliner.getDashboardItems()\n return items.map((element) => {\n return {\n label: element.label,\n onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)\n }\n })\n}\n\nasync function openDashboardPane (outliner: any, pane: string): Promise<void> {\n outliner.showDashboard({\n pane\n })\n}\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA;AACA;AACA;AACA,MAAME,cAAc,GAAGC,cAAK,CAACC,QAAQ,GAAG,eAAe;AACvD,MAAMC,cAAc,GAAG,sDAAsD;;AAE7E;AACA;AACA;AACA,MAAMC,oBAAoB,GAAG,YAAY;AACzC,MAAMC,0BAA0B,GAAG,kBAAkB;AACrD,MAAMC,2BAA2B,GAAG,mBAAmB;AACvD,MAAMC,iBAAiB,GAAG,SAAS;AAGnC;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,sCAAsC;AAClE,MAAMC,yBAAyB,GAA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AC;EAC3EC,QAAQ,CAACC,MAAM,CAAC,CAAC;AACnB;AAEA,eAAeP,YAAYA,CAAEnB,QAAa,EAAE;EAC1C,MAAM2B,KAAK,GAAG,MAAM3B,QAAQ,CAAC4B,iBAAiB,CAAC,CAAC;EAChD,OAAOD,KAAK,CAACE,GAAG,CAAEC,OAAO,IAAK;IAC5B,OAAO;MACLzB,KAAK,EAAEyB,OAAO,CAACzB,KAAK;MACpBO,OAAO,EAAEA,CAAA,KAAMmB,iBAAiB,CAAC/B,QAAQ,EAAE8B,OAAO,CAACE,OAAO,IAAIF,OAAO,CAACG,QAAQ;IAChF,CAAC;EACH,CAAC,CAAC;AACJ;AAEA,eAAeF,iBAAiBA,CAAE/B,QAAa,EAAEkC,IAAY,EAAiB;EAC5ElC,QAAQ,CAACmC,aAAa,CAAC;IACrBD;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -1,30 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = initMainPage;
7
+ var _index = require("../index");
8
+ var _header = require("./header");
9
+ var _footer = require("./footer");
1
10
  /* Main Page
2
11
  **
3
12
  ** This code is called in mashlib and renders the header and footer of the Databrowser.
4
13
  */
5
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7
- return new (P || (P = Promise))(function (resolve, reject) {
8
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
9
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
10
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
11
- step((generator = generator.apply(thisArg, _arguments || [])).next());
12
- });
13
- };
14
- import { getOutliner } from '../index';
15
- import { createHeader } from './header';
16
- import { createFooter } from './footer';
17
- export default function initMainPage(store, uri) {
18
- return __awaiter(this, void 0, void 0, function* () {
19
- const outliner = getOutliner(document);
20
- uri = uri || window.location.href;
21
- let subject = uri;
22
- if (typeof uri === 'string')
23
- subject = store.sym(uri);
24
- outliner.GotoSubject(subject, true, undefined, true, undefined);
25
- const header = yield createHeader(store, outliner);
26
- const footer = createFooter(store);
27
- return Promise.all([header, footer]);
28
- });
14
+
15
+ async function initMainPage(store, uri) {
16
+ const outliner = (0, _index.getOutliner)(document);
17
+ uri = uri || window.location.href;
18
+ let subject = uri;
19
+ if (typeof uri === 'string') subject = store.sym(uri);
20
+ outliner.GotoSubject(subject, true, undefined, true, undefined);
21
+ const header = await (0, _header.createHeader)(store, outliner);
22
+ const footer = (0, _footer.createFooter)(store);
23
+ return Promise.all([header, footer]);
29
24
  }
30
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mainPage/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,MAAM,CAAC,OAAO,UAAgB,YAAY,CAAE,KAAgB,EAAE,GAA+B;;QAC3F,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAA;QACtC,GAAG,GAAG,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAA;QACjC,IAAI,OAAO,GAAG,GAAG,CAAA;QACjB,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QACrD,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,CAAA;QAC/D,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QAClD,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,CAAA;QAClC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACtC,CAAC;CAAA"}
1
+ {"version":3,"file":"index.js","names":["_index","require","_header","_footer","initMainPage","store","uri","outliner","getOutliner","document","window","location","href","subject","sym","GotoSubject","undefined","header","createHeader","footer","createFooter","Promise","all"],"sources":["../../src/mainPage/index.ts"],"sourcesContent":["/* Main Page\n **\n ** This code is called in mashlib and renders the header and footer of the Databrowser.\n */\n\nimport { LiveStore, NamedNode } from 'rdflib'\nimport { getOutliner } from '../index'\nimport { createHeader } from './header'\nimport { createFooter } from './footer'\n\nexport default async function initMainPage (store: LiveStore, uri?: string | NamedNode | null) {\n const outliner = getOutliner(document)\n uri = uri || window.location.href\n let subject = uri\n if (typeof uri === 'string') subject = store.sym(uri)\n outliner.GotoSubject(subject, true, undefined, true, undefined)\n const header = await createHeader(store, outliner)\n const footer = createFooter(store)\n return Promise.all([header, footer])\n}\n"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AARA;AACA;AACA;AACA;;AAOe,eAAeG,YAAYA,CAAEC,KAAgB,EAAEC,GAA+B,EAAE;EAC7F,MAAMC,QAAQ,GAAG,IAAAC,kBAAW,EAACC,QAAQ,CAAC;EACtCH,GAAG,GAAGA,GAAG,IAAII,MAAM,CAACC,QAAQ,CAACC,IAAI;EACjC,IAAIC,OAAO,GAAGP,GAAG;EACjB,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAEO,OAAO,GAAGR,KAAK,CAACS,GAAG,CAACR,GAAG,CAAC;EACrDC,QAAQ,CAACQ,WAAW,CAACF,OAAO,EAAE,IAAI,EAAEG,SAAS,EAAE,IAAI,EAAEA,SAAS,CAAC;EAC/D,MAAMC,MAAM,GAAG,MAAM,IAAAC,oBAAY,EAACb,KAAK,EAAEE,QAAQ,CAAC;EAClD,MAAMY,MAAM,GAAG,IAAAC,oBAAY,EAACf,KAAK,CAAC;EAClC,OAAOgB,OAAO,CAACC,GAAG,CAAC,CAACL,MAAM,EAAEE,MAAM,CAAC,CAAC;AACtC","ignoreList":[]}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _solidLogic = require("solid-logic");
8
8
  var UI = _interopRequireWildcard(require("solid-ui"));
9
+ var $rdf = _interopRequireWildcard(require("rdflib"));
9
10
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
11
  /*
11
12
  Microblog pane
@@ -26,10 +27,10 @@ var _default = exports.default = {
26
27
  //* **********************************************
27
28
  // NAMESPACES SECTION
28
29
  //* **********************************************
29
- const SIOC = UI.rdf.Namespace('http://rdfs.org/sioc/ns#');
30
- const SIOCt = UI.rdf.Namespace('http://rdfs.org/sioc/types#');
31
- const FOAF = UI.rdf.Namespace('http://xmlns.com/foaf/0.1/');
32
- const terms = UI.rdf.Namespace('http://purl.org/dc/terms/');
30
+ const SIOC = $rdf.Namespace('http://rdfs.org/sioc/ns#');
31
+ const SIOCt = $rdf.Namespace('http://rdfs.org/sioc/types#');
32
+ const FOAF = $rdf.Namespace('http://xmlns.com/foaf/0.1/');
33
+ const terms = $rdf.Namespace('http://purl.org/dc/terms/');
33
34
  const RDF = UI.ns.rdf;
34
35
  const kb = _solidLogic.store;
35
36
  const charCount = 140;
@@ -102,7 +103,7 @@ var _default = exports.default = {
102
103
  return kb.sym(post) in this.favorites;
103
104
  };
104
105
  Favorites.prototype.add = function (post, callback) {
105
- const batch = new UI.rdf.Statement(this.favoritesURI, SIOC('container_of'), kb.sym(post), kb.sym(this.user));
106
+ const batch = new $rdf.Statement(this.favoritesURI, SIOC('container_of'), kb.sym(post), kb.sym(this.user));
106
107
  sparqlUpdater.insert_statement(batch, function (a, success, c) {
107
108
  if (success) {
108
109
  kb.add(batch.subject, batch.predicate, batch.object, batch.why);
@@ -111,7 +112,7 @@ var _default = exports.default = {
111
112
  });
112
113
  };
113
114
  Favorites.prototype.remove = function (post, callback) {
114
- const batch = new UI.rdf.Statement(this.favoritesURI, SIOC('container_of'), kb.sym(post), kb.sym(this.user));
115
+ const batch = new $rdf.Statement(this.favoritesURI, SIOC('container_of'), kb.sym(post), kb.sym(this.user));
115
116
  sparqlUpdater.delete_statement(batch, function (a, success, c) {
116
117
  if (success) {
117
118
  kb.add(batch.subject, batch.predicate, batch.object, batch.why);
@@ -189,21 +190,21 @@ var _default = exports.default = {
189
190
  }
190
191
 
191
192
  // generate new post
192
- const batch = [new UI.rdf.Statement(newPost, RDF('type'), SIOCt('MicroblogPost'), myUser), new UI.rdf.Statement(newPost, SIOC('has_creator'), kb.sym(myUserURI), myUser), new UI.rdf.Statement(newPost, SIOC('content'), statusMsg, myUser), new UI.rdf.Statement(newPost, terms('created'), new Date(), myUser), new UI.rdf.Statement(micro, SIOC('container_of'), newPost, myUser)];
193
+ const batch = [new $rdf.Statement(newPost, RDF('type'), SIOCt('MicroblogPost'), myUser), new $rdf.Statement(newPost, SIOC('has_creator'), kb.sym(myUserURI), myUser), new $rdf.Statement(newPost, SIOC('content'), statusMsg, myUser), new $rdf.Statement(newPost, terms('created'), new Date(), myUser), new $rdf.Statement(micro, SIOC('container_of'), newPost, myUser)];
193
194
 
194
195
  // message replies
195
196
  if (replyTo) {
196
- batch.push(new UI.rdf.Statement(newPost, SIOC('reply_of'), kb.sym(replyTo), myUser));
197
+ batch.push(new $rdf.Statement(newPost, SIOC('reply_of'), kb.sym(replyTo), myUser));
197
198
  }
198
199
 
199
200
  // @replies, #hashtags, !groupReplies
200
201
  for (const r in meta.recipients) {
201
- batch.push(new UI.rdf.Statement(newPost, SIOC('topic'), kb.sym(meta.recipients[r]), myUser));
202
- batch.push(new UI.rdf.Statement(kb.any(), SIOC('container_of'), newPost, myUser));
202
+ batch.push(new $rdf.Statement(newPost, SIOC('topic'), kb.sym(meta.recipients[r]), myUser));
203
+ batch.push(new $rdf.Statement(kb.any(), SIOC('container_of'), newPost, myUser));
203
204
  const mblogs = kb.each(kb.sym(meta.recipients[r]), SIOC('creator_of'));
204
205
  for (const mbl in mblogs) {
205
206
  if (kb.whether(mblogs[mbl], SIOC('topic'), kb.sym(meta.recipients[r]))) {
206
- const replyBatch = new UI.rdf.Statement(mblogs[mbl], SIOC('container_of'), newPost, kb.sym(meta.recipients[r].split('#')[0]));
207
+ const replyBatch = new $rdf.Statement(mblogs[mbl], SIOC('container_of'), newPost, kb.sym(meta.recipients[r].split('#')[0]));
207
208
  sparqlUpdater.insert_statement(replyBatch);
208
209
  }
209
210
  }
@@ -239,16 +240,16 @@ var _default = exports.default = {
239
240
  };
240
241
  const genUserMB = [
241
242
  // user
242
- new UI.rdf.Statement(kb.sym(host + '#' + id), RDF('type'), SIOC('User'), kb.sym(host)), new UI.rdf.Statement(kb.sym(host + '#' + id), SIOC('creator_of'), kb.sym(host + '#mb'), kb.sym(host)), new UI.rdf.Statement(kb.sym(host + '#' + id), SIOC('creator_of'), kb.sym(host + '#mbn'), kb.sym(host)), new UI.rdf.Statement(kb.sym(host + '#' + id), SIOC('creator_of'), kb.sym(host + '#fav'), kb.sym(host)), new UI.rdf.Statement(kb.sym(host + '#' + id), SIOC('name'), name, kb.sym(host)), new UI.rdf.Statement(kb.sym(host + '#' + id), SIOC('id'), id, kb.sym(host)), new UI.rdf.Statement(kb.sym(host + '#' + id), RDF('label'), id, kb.sym(host)), new UI.rdf.Statement(s, FOAF('holdsAccount'), kb.sym(host + '#' + id), kb.sym(host)),
243
+ new $rdf.Statement(kb.sym(host + '#' + id), RDF('type'), SIOC('User'), kb.sym(host)), new $rdf.Statement(kb.sym(host + '#' + id), SIOC('creator_of'), kb.sym(host + '#mb'), kb.sym(host)), new $rdf.Statement(kb.sym(host + '#' + id), SIOC('creator_of'), kb.sym(host + '#mbn'), kb.sym(host)), new $rdf.Statement(kb.sym(host + '#' + id), SIOC('creator_of'), kb.sym(host + '#fav'), kb.sym(host)), new $rdf.Statement(kb.sym(host + '#' + id), SIOC('name'), name, kb.sym(host)), new $rdf.Statement(kb.sym(host + '#' + id), SIOC('id'), id, kb.sym(host)), new $rdf.Statement(kb.sym(host + '#' + id), RDF('label'), id, kb.sym(host)), new $rdf.Statement(s, FOAF('holdsAccount'), kb.sym(host + '#' + id), kb.sym(host)),
243
244
  // microblog
244
- new UI.rdf.Statement(kb.sym(host + '#mb'), RDF('type'), SIOCt('Microblog'), kb.sym(host)), new UI.rdf.Statement(kb.sym(host + '#mb'), SIOC('has_creator'), kb.sym(host + '#' + id), kb.sym(host)),
245
+ new $rdf.Statement(kb.sym(host + '#mb'), RDF('type'), SIOCt('Microblog'), kb.sym(host)), new $rdf.Statement(kb.sym(host + '#mb'), SIOC('has_creator'), kb.sym(host + '#' + id), kb.sym(host)),
245
246
  // notification microblog
246
- new UI.rdf.Statement(kb.sym(host + '#mbn'), RDF('type'), SIOCt('Microblog'), kb.sym(host)), new UI.rdf.Statement(kb.sym(host + '#mbn'), SIOC('topic'), kb.sym(host + '#' + id), kb.sym(host)), new UI.rdf.Statement(kb.sym(host + '#mbn'), SIOC('has_creator'), kb.sym(host + '#' + id), kb.sym(host)),
247
+ new $rdf.Statement(kb.sym(host + '#mbn'), RDF('type'), SIOCt('Microblog'), kb.sym(host)), new $rdf.Statement(kb.sym(host + '#mbn'), SIOC('topic'), kb.sym(host + '#' + id), kb.sym(host)), new $rdf.Statement(kb.sym(host + '#mbn'), SIOC('has_creator'), kb.sym(host + '#' + id), kb.sym(host)),
247
248
  // favorites container
248
- new UI.rdf.Statement(kb.sym(host + '#fav'), RDF('type'), SIOCt('FavouriteThings'), kb.sym(host)), new UI.rdf.Statement(kb.sym(host + '#fav'), SIOC('has_creator'), kb.sym(host + '#' + id), kb.sym(host))];
249
+ new $rdf.Statement(kb.sym(host + '#fav'), RDF('type'), SIOCt('FavouriteThings'), kb.sym(host)), new $rdf.Statement(kb.sym(host + '#fav'), SIOC('has_creator'), kb.sym(host + '#' + id), kb.sym(host))];
249
250
  if (avatar) {
250
251
  // avatar optional
251
- genUserMB.push(new UI.rdf.Statement(kb.sym(host + '#' + id), SIOC('avatar'), kb.sym(avatar), kb.sym(host)));
252
+ genUserMB.push(new $rdf.Statement(kb.sym(host + '#' + id), SIOC('avatar'), kb.sym(avatar), kb.sym(host)));
252
253
  }
253
254
  sparqlUpdater.insert_statement(genUserMB, cbgenUserMB);
254
255
  };
@@ -363,7 +364,7 @@ var _default = exports.default = {
363
364
  that.notify('You ' + doFollow + username + '.');
364
365
  }
365
366
  };
366
- const followMe = new UI.rdf.Statement(myUser, SIOC('follows'), that.creator.sym, myUser);
367
+ const followMe = new $rdf.Statement(myUser, SIOC('follows'), that.creator.sym, myUser);
367
368
  xfollowButton.disabled = true;
368
369
  xfollowButton.value = 'Updating...';
369
370
  if (!that.Ifollow) {