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.
- package/dist/RDFXMLPane.js +2 -1
- package/dist/RDFXMLPane.js.map +1 -1
- package/dist/dashboard/basicPreferences.js +121 -129
- package/dist/dashboard/basicPreferences.js.map +1 -1
- package/dist/dashboard/dashboardPane.js +60 -54
- package/dist/dashboard/dashboardPane.js.map +1 -1
- package/dist/dashboard/homepage.js +45 -54
- package/dist/dashboard/homepage.js.map +1 -1
- package/dist/dataContentPane.js +3 -2
- package/dist/dataContentPane.js.map +1 -1
- package/dist/defaultPane.js +1 -1
- package/dist/defaultPane.js.map +1 -1
- package/dist/home/homePane.d.ts.map +1 -1
- package/dist/home/homePane.js +60 -55
- package/dist/home/homePane.js.map +1 -1
- package/dist/index.js +86 -25
- package/dist/index.js.map +1 -1
- package/dist/internal/internalPane.js +168 -179
- package/dist/internal/internalPane.js.map +1 -1
- package/dist/mainPage/footer.js +13 -7
- package/dist/mainPage/footer.js.map +1 -1
- package/dist/mainPage/header.js +60 -58
- package/dist/mainPage/header.js.map +1 -1
- package/dist/mainPage/index.js +19 -24
- package/dist/mainPage/index.js.map +1 -1
- package/dist/microblogPane/microblogPane.js +18 -17
- package/dist/microblogPane/microblogPane.js.map +1 -1
- package/dist/n3Pane.js +2 -1
- package/dist/n3Pane.js.map +1 -1
- package/dist/outline/context.js +17 -11
- package/dist/outline/context.js.map +1 -1
- package/dist/outline/manager.js +11 -11
- package/dist/outline/manager.js.map +1 -1
- package/dist/outline/propertyViews.js +39 -28
- package/dist/outline/propertyViews.js.map +1 -1
- package/dist/outline/queryByExample.js +4 -3
- package/dist/outline/queryByExample.js.map +1 -1
- package/dist/outline/userInput.js +13 -13
- package/dist/outline/userInput.js.map +1 -1
- package/dist/outline/viewAsImage.js +13 -5
- package/dist/outline/viewAsImage.js.map +1 -1
- package/dist/outline/viewAsMbox.js +20 -11
- package/dist/outline/viewAsMbox.js.map +1 -1
- package/dist/pad/padPane.js +395 -404
- package/dist/pad/padPane.js.map +1 -1
- package/dist/schedule/schedulePane.js +4 -5
- package/dist/schedule/schedulePane.js.map +1 -1
- package/dist/sharing/sharingPane.js +36 -32
- package/dist/sharing/sharingPane.js.map +1 -1
- package/dist/socialPane.js +2 -1
- package/dist/socialPane.js.map +1 -1
- package/dist/tabbed/tabbedPane.js +54 -51
- package/dist/tabbed/tabbedPane.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.dom.js +134 -146
- package/dist/trustedApplications/trustedApplications.dom.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.utils.js +20 -20
- package/dist/trustedApplications/trustedApplications.utils.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.view.js +51 -57
- package/dist/trustedApplications/trustedApplications.view.js.map +1 -1
- package/dist/versionInfo.js +35 -29
- package/dist/versionInfo.js.map +1 -1
- package/package.json +31 -36
- package/dist/schedule/formsForSchedule.js +0 -124
- package/dist/schedule/formsForSchedule.js.map +0 -1
- package/dist/types.d.ts +0 -30
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
package/dist/mainPage/header.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
30
|
-
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
64
|
-
|
|
69
|
+
outliner.GotoSubject(_solidLogic.authn.currentUser(), true, undefined, true, undefined);
|
|
70
|
+
location.reload();
|
|
65
71
|
}
|
|
66
|
-
function getMenuItems(outliner) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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","
|
|
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,GAAG,2CAA2C;AAEtE,eAAeC,YAAYA,CAAEC,KAAK,EAAEC,QAAQ,EAAE;EACnD,IAAAC,mBAAU,EAACF,KAAK,EAAE,MAAMG,WAAW,CAACF,QAAQ,CAAC,EAAEG,gBAAgB,CAAC,CAAC,CAAC;AACpE;AAEA,SAASA,gBAAgBA,CAAA,EAAI;EAC3B,MAAMC,YAAY,GAAG,CACnB;IAAEC,KAAK,EAAEb,oBAAoB;IAAEc,GAAG,EAAEV,mBAAmB;IAAEW,MAAM,EAAE;EAAS,CAAC,EAC3E;IAAEF,KAAK,EAAEZ,0BAA0B;IAAEa,GAAG,EAAET,yBAAyB;IAAEU,MAAM,EAAE;EAAS,CAAC,CACxF;EACD,MAAMC,aAAa,GAAG;IAAEC,IAAI,EAAElB,cAAc;IAAEmB,QAAQ,EAAEtB,cAAc;IAAEgB;EAAa,CAAC;EAEtF,OAAOI,aAAa;AACtB;AAEA,eAAeN,WAAWA,CAAEF,QAAa,EAAE;EACzC;EACA,MAAMW,WAAW,GAAG;IAClBN,KAAK,EAAEX,2BAA2B;IAClCkB,OAAO,EAAEA,CAAA,KAAMC,eAAe,CAACb,QAAQ;EACzC,CAAC;EAED,MAAMc,MAAoB,GAAG;IAC3BT,KAAK,EAAEV,iBAAiB;IACxBiB,OAAO,EAAEA,CAAA,KAAM;MACbG,uBAAW,CAACC,MAAM,CAAC,CAAC;IACtB;EACF,CAAC;;EAED;EACA,IAAIC,YAA2B,GAAG,EAAE,EAAC;EACrCA,YAAY,GAAGA,YAAY,CAACC,MAAM,CAAC,MAAMC,YAAY,CAACnB,QAAQ,CAAC,CAAC;EAChEiB,YAAY,CAACG,IAAI,CAACN,MAAM,CAAC;EAEzB,OAAOG,YAAY;AACrB;;AAEA;AACA,SAASJ,eAAeA,CAAEb,QAAa,EAAE;EACvCA,QAAQ,CAACqB,WAAW,CAACC,iBAAK,CAACC,WAAW,CAAC,CAAC,EAAE,IAAI,EAAEC,SAAS,EAAE,IAAI,EAAEA,SAAS,CAAC;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":[]}
|
package/dist/mainPage/index.js
CHANGED
|
@@ -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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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","
|
|
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 =
|
|
30
|
-
const SIOCt =
|
|
31
|
-
const FOAF =
|
|
32
|
-
const 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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
202
|
-
batch.push(new
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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) {
|