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/index.js
CHANGED
|
@@ -1,3 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "OutlineManager", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _manager.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.UI = void 0;
|
|
13
|
+
Object.defineProperty(exports, "byName", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return _paneRegistry.byName;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
exports.getOutliner = getOutliner;
|
|
20
|
+
Object.defineProperty(exports, "initMainPage", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return _mainPage.default;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "list", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return _paneRegistry.list;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "paneForIcon", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _paneRegistry.paneForIcon;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "paneForPredicate", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return _paneRegistry.paneForPredicate;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "register", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () {
|
|
47
|
+
return _paneRegistry.register;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "versionInfo", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () {
|
|
53
|
+
return _versionInfo.default;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
var _versionInfo = _interopRequireDefault(require("./versionInfo"));
|
|
57
|
+
var UI = _interopRequireWildcard(require("solid-ui"));
|
|
58
|
+
exports.UI = UI;
|
|
59
|
+
var _solidLogic = require("solid-logic");
|
|
60
|
+
var _manager = _interopRequireDefault(require("./outline/manager.js"));
|
|
61
|
+
var _registerPanes = require("./registerPanes.js");
|
|
62
|
+
var _paneRegistry = require("pane-registry");
|
|
63
|
+
var _context = require("./outline/context");
|
|
64
|
+
var _mainPage = _interopRequireDefault(require("./mainPage"));
|
|
65
|
+
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); }
|
|
66
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1
67
|
/* SOLID PANES
|
|
2
68
|
**
|
|
3
69
|
** Panes are regions of the outline view in which a particular subject is
|
|
@@ -9,40 +75,35 @@
|
|
|
9
75
|
** relevant to a given subject, returning null if not.
|
|
10
76
|
** If it is relevant, then it returns a suitable tooltip for a control which selects the pane
|
|
11
77
|
*/
|
|
12
|
-
|
|
13
|
-
import * as UI from 'solid-ui';
|
|
14
|
-
import { solidLogicSingleton, store } from 'solid-logic';
|
|
15
|
-
import OutlineManager from './outline/manager.js';
|
|
16
|
-
import { registerPanes } from './registerPanes.js';
|
|
17
|
-
import { list, paneForIcon, paneForPredicate, register, byName } from 'pane-registry';
|
|
18
|
-
import { createContext } from './outline/context';
|
|
19
|
-
import initMainPage from './mainPage';
|
|
78
|
+
|
|
20
79
|
function getOutliner(dom) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
80
|
+
if (!dom.outlineManager) {
|
|
81
|
+
const context = (0, _context.createContext)(dom, {
|
|
82
|
+
list: _paneRegistry.list,
|
|
83
|
+
paneForIcon: _paneRegistry.paneForIcon,
|
|
84
|
+
paneForPredicate: _paneRegistry.paneForPredicate,
|
|
85
|
+
register: _paneRegistry.register,
|
|
86
|
+
byName: _paneRegistry.byName
|
|
87
|
+
}, _solidLogic.store, _solidLogic.solidLogicSingleton);
|
|
88
|
+
dom.outlineManager = new _manager.default(context);
|
|
89
|
+
}
|
|
90
|
+
return dom.outlineManager;
|
|
26
91
|
}
|
|
27
92
|
if (typeof window !== 'undefined') {
|
|
28
|
-
|
|
93
|
+
getOutliner(window.document);
|
|
29
94
|
}
|
|
30
|
-
registerPanes(
|
|
95
|
+
(0, _registerPanes.registerPanes)(cjsOrEsModule => (0, _paneRegistry.register)(cjsOrEsModule.default || cjsOrEsModule));
|
|
96
|
+
|
|
31
97
|
// This has common outline mode functionality for the default and other other panes
|
|
32
98
|
// A separate outline manager is required per DOM in cases like a browser extension
|
|
33
99
|
// where there are many occurrences of window and of window.document
|
|
34
100
|
// But each DOM should have just one outline manager.
|
|
35
|
-
|
|
36
|
-
paneForIcon, // from paneRegistry
|
|
37
|
-
paneForPredicate, // from paneRegistry
|
|
38
|
-
register, // from paneRegistry
|
|
39
|
-
byName // from paneRegistry
|
|
40
|
-
};
|
|
101
|
+
|
|
41
102
|
// export for simpler access by non-node scripts
|
|
42
103
|
if (typeof window !== 'undefined') {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
104
|
+
;
|
|
105
|
+
window.panes = {
|
|
106
|
+
getOutliner
|
|
107
|
+
};
|
|
47
108
|
}
|
|
48
109
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_versionInfo","_interopRequireDefault","require","UI","_interopRequireWildcard","exports","_solidLogic","_manager","_registerPanes","_paneRegistry","_context","_mainPage","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","getOutliner","dom","outlineManager","context","createContext","list","paneForIcon","paneForPredicate","register","byName","store","solidLogicSingleton","OutlineManager","window","document","registerPanes","cjsOrEsModule","panes"],"sources":["../src/index.ts"],"sourcesContent":["/* SOLID PANES\n **\n ** Panes are regions of the outline view in which a particular subject is\n ** displayed in a particular way.\n ** Different panes about the same subject are typically stacked vertically.\n ** Panes may be used naked or with a pane selection header.\n **\n ** The label() method has two functions: it determines whether the pane is\n ** relevant to a given subject, returning null if not.\n ** If it is relevant, then it returns a suitable tooltip for a control which selects the pane\n */\n\nimport versionInfo from './versionInfo'\nimport * as UI from 'solid-ui'\nimport { LiveStore } from 'rdflib'\nimport { solidLogicSingleton, store } from 'solid-logic'\nimport OutlineManager from './outline/manager.js'\nimport { registerPanes } from './registerPanes.js'\nimport {\n list,\n paneForIcon,\n paneForPredicate,\n register,\n byName\n} from 'pane-registry'\nimport { createContext } from './outline/context'\nimport initMainPage from './mainPage'\n\nfunction getOutliner (dom) {\n if (!dom.outlineManager) {\n const context = createContext(\n dom,\n { list, paneForIcon, paneForPredicate, register, byName },\n store as LiveStore,\n solidLogicSingleton\n )\n dom.outlineManager = new OutlineManager(context)\n }\n return dom.outlineManager\n}\n\nif (typeof window !== 'undefined') {\n getOutliner(window.document)\n}\n\nregisterPanes((cjsOrEsModule: any) => register(cjsOrEsModule.default || cjsOrEsModule))\n\n// This has common outline mode functionality for the default and other other panes\n// A separate outline manager is required per DOM in cases like a browser extension\n// where there are many occurrences of window and of window.document\n// But each DOM should have just one outline manager.\n\nexport {\n OutlineManager,\n getOutliner,\n UI,\n versionInfo,\n initMainPage,\n list, // from paneRegistry\n paneForIcon, // from paneRegistry\n paneForPredicate, // from paneRegistry\n register, // from paneRegistry\n byName // from paneRegistry\n}\n\n// export for simpler access by non-node scripts\nif (typeof window !== 'undefined') {\n ;(<any>window).panes = {\n getOutliner\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,EAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA8BG,OAAA,CAAAF,EAAA,GAAAA,EAAA;AAE9B,IAAAG,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IA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ASmB,WAAWA,CAAEC,GAAG,EAAE;EACzB,IAAI,CAACA,GAAG,CAACC,cAAc,EAAE;IACvB,MAAMC,OAAO,GAAG,IAAAC,sBAAa,EAC3BH,GAAG,EACH;MAAEI,IAAI,EAAJA,kBAAI;MAAEC,WAAW,EAAXA,yBAAW;MAAEC,gBAAgB,EAAhBA,8BAAgB;MAAEC,QAAQ,EAARA,sBAAQ;MAAEC,MAAM,EAANA;IAAO,CAAC,EACzDC,iBAAK,EACLC,+BACF,CAAC;IACDV,GAAG,CAACC,cAAc,GAAG,IAAIU,gBAAc,CAACT,OAAO,CAAC;EAClD;EACA,OAAOF,GAAG,CAACC,cAAc;AAC3B;AAEA,IAAI,OAAOW,MAAM,KAAK,WAAW,EAAE;EACjCb,WAAW,CAACa,MAAM,CAACC,QAAQ,CAAC;AAC9B;AAEA,IAAAC,4BAAa,EAAEC,aAAkB,IAAK,IAAAR,sBAAQ,EAACQ,aAAa,CAACzB,OAAO,IAAIyB,aAAa,CAAC,CAAC;;AAEvF;AACA;AACA;AACA;;AAeA;AACA,IAAI,OAAOH,MAAM,KAAK,WAAW,EAAE;EACjC;EAAOA,MAAM,CAAEI,KAAK,GAAG;IACrBjB;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,195 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _solidUi = require("solid-ui");
|
|
8
|
+
var _rdflib = require("rdflib");
|
|
1
9
|
/* Internal Pane
|
|
2
10
|
**
|
|
3
11
|
** This outline pane contains the properties which are
|
|
4
12
|
** internal to the user's interaction with the web, and are not normally displayed
|
|
5
13
|
*/
|
|
6
14
|
/* global alert confirm */
|
|
7
|
-
|
|
8
|
-
import { literal, st, sym } from 'rdflib';
|
|
15
|
+
|
|
9
16
|
const pane = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
console.log('deleteRecursive leaf file: ' + file);
|
|
45
|
-
return fetcher.webOperation('DELETE', file.uri);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Promise.all(promises).then(() => {
|
|
49
|
-
console.log('deleteRecursive empty folder: ' + folder);
|
|
50
|
-
fetcher
|
|
51
|
-
.webOperation('DELETE', folder.uri)
|
|
52
|
-
.then(() => {
|
|
53
|
-
console.log('Deleted Ok: ' + folder);
|
|
54
|
-
resolve(undefined);
|
|
55
|
-
})
|
|
56
|
-
.catch((err) => {
|
|
57
|
-
const str = 'Unable to delete ' + folder + ': ' + err;
|
|
58
|
-
console.log(str);
|
|
59
|
-
reject(new Error(str));
|
|
60
|
-
});
|
|
61
|
-
resolve(undefined);
|
|
62
|
-
}, err => {
|
|
63
|
-
alert(err);
|
|
64
|
-
reject(err);
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
const isDocument = subject.uri && !subject.uri.includes('#');
|
|
70
|
-
if (isDocument) {
|
|
71
|
-
const controls = div.appendChild(dom.createElement('table'));
|
|
72
|
-
controls.style.width = '100%';
|
|
73
|
-
controls.style.margin = '1em';
|
|
74
|
-
const controlRow = controls.appendChild(dom.createElement('tr'));
|
|
75
|
-
const deleteCell = controlRow.appendChild(dom.createElement('td'));
|
|
76
|
-
const isFolder = (subject.uri && subject.uri.endsWith('/')) ||
|
|
77
|
-
store.holds(subject, ns.rdf('type'), ns.ldp('Container'));
|
|
78
|
-
const noun = isFolder ? 'folder' : 'file';
|
|
79
|
-
if (!isProtectedUri(subject)) {
|
|
80
|
-
console.log(subject);
|
|
81
|
-
const deleteButton = widgets.deleteButtonWithCheck(dom, deleteCell, noun, function () {
|
|
82
|
-
if (!confirm(`Are you sure you want to delete ${subject}? This cannot be undone.`)) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
// @@ TODO Remove casing of store.fetcher
|
|
86
|
-
if (!store.fetcher) {
|
|
87
|
-
throw new Error('Store has no fetcher');
|
|
88
|
-
}
|
|
89
|
-
const promise = isFolder
|
|
90
|
-
? (deleteRecursive(store, subject) || Promise.resolve())
|
|
91
|
-
: store.fetcher.webOperation('DELETE', subject.uri) || Promise.resolve();
|
|
92
|
-
promise
|
|
93
|
-
.then(() => {
|
|
94
|
-
const str = 'Deleted: ' + subject;
|
|
95
|
-
console.log(str);
|
|
96
|
-
})
|
|
97
|
-
.catch((err) => {
|
|
98
|
-
const str = 'Unable to delete ' + subject + ': ' + err;
|
|
99
|
-
console.log(str);
|
|
100
|
-
alert(str);
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
deleteButton.style = 'height: 2em;';
|
|
104
|
-
deleteButton.class = ''; // Remove hover hide
|
|
105
|
-
deleteCell.appendChild(deleteButton);
|
|
17
|
+
icon: _solidUi.icons.originalIconBase + 'tango/22-emblem-system.png',
|
|
18
|
+
name: 'internal',
|
|
19
|
+
label: function () {
|
|
20
|
+
return 'under the hood'; // There is often a URI even of no statements
|
|
21
|
+
},
|
|
22
|
+
render: function (subject, context) {
|
|
23
|
+
const dom = context.dom;
|
|
24
|
+
const store = context.session.store;
|
|
25
|
+
const canonizedSubject = store.canon(subject);
|
|
26
|
+
const types = store.findTypeURIs(canonizedSubject);
|
|
27
|
+
function filter(pred) {
|
|
28
|
+
if (types['http://www.w3.org/2007/ont/link#ProtocolEvent']) return true; // display everything for them
|
|
29
|
+
const view = context.session.paneRegistry.byName('internal');
|
|
30
|
+
return view && view.predicates && !!(typeof view.predicates[pred.uri] !== 'undefined');
|
|
31
|
+
}
|
|
32
|
+
const div = dom.createElement('div');
|
|
33
|
+
div.setAttribute('class', 'internalPane');
|
|
34
|
+
div.setAttribute('style', 'background-color: #ddddff; padding: 0.5em; border-radius: 1em;');
|
|
35
|
+
function deleteRecursive(kb, folder) {
|
|
36
|
+
const fetcher = kb.fetcher;
|
|
37
|
+
if (!fetcher) {
|
|
38
|
+
console.error('No fetcher available');
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
return new Promise(function (resolve, reject) {
|
|
42
|
+
fetcher.load(folder).then(function () {
|
|
43
|
+
const promises = kb.each(folder, _solidUi.ns.ldp('contains')).map(file => {
|
|
44
|
+
if (kb.holds(file, _solidUi.ns.rdf('type'), _solidUi.ns.ldp('BasicContainer'))) {
|
|
45
|
+
return deleteRecursive(kb, file);
|
|
46
|
+
} else {
|
|
47
|
+
console.log('deleteRecursive leaf file: ' + file);
|
|
48
|
+
return fetcher.webOperation('DELETE', file.uri);
|
|
106
49
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
str = 'Refreshed OK: ' + subject;
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
str = 'Error refreshing: ' + subject + ': ' + errm;
|
|
121
|
-
}
|
|
122
|
-
console.log(str);
|
|
123
|
-
alert(str);
|
|
124
|
-
});
|
|
50
|
+
});
|
|
51
|
+
Promise.all(promises).then(() => {
|
|
52
|
+
console.log('deleteRecursive empty folder: ' + folder);
|
|
53
|
+
fetcher.webOperation('DELETE', folder.uri).then(() => {
|
|
54
|
+
console.log('Deleted Ok: ' + folder);
|
|
55
|
+
resolve(undefined);
|
|
56
|
+
}).catch(err => {
|
|
57
|
+
const str = 'Unable to delete ' + folder + ': ' + err;
|
|
58
|
+
console.log(str);
|
|
59
|
+
reject(new Error(str));
|
|
125
60
|
});
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
61
|
+
resolve(undefined);
|
|
62
|
+
}, err => {
|
|
63
|
+
alert(err);
|
|
64
|
+
reject(err);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
const isDocument = subject.uri && !subject.uri.includes('#');
|
|
70
|
+
if (isDocument) {
|
|
71
|
+
const controls = div.appendChild(dom.createElement('table'));
|
|
72
|
+
controls.style.width = '100%';
|
|
73
|
+
controls.style.margin = '1em';
|
|
74
|
+
const controlRow = controls.appendChild(dom.createElement('tr'));
|
|
75
|
+
const deleteCell = controlRow.appendChild(dom.createElement('td'));
|
|
76
|
+
const isFolder = subject.uri && subject.uri.endsWith('/') || store.holds(subject, _solidUi.ns.rdf('type'), _solidUi.ns.ldp('Container'));
|
|
77
|
+
const noun = isFolder ? 'folder' : 'file';
|
|
78
|
+
if (!isProtectedUri(subject)) {
|
|
79
|
+
console.log(subject);
|
|
80
|
+
const deleteButton = _solidUi.widgets.deleteButtonWithCheck(dom, deleteCell, noun, function () {
|
|
81
|
+
if (!confirm(`Are you sure you want to delete ${subject}? This cannot be undone.`)) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
// @@ TODO Remove casing of store.fetcher
|
|
85
|
+
if (!store.fetcher) {
|
|
130
86
|
throw new Error('Store has no fetcher');
|
|
87
|
+
}
|
|
88
|
+
const promise = isFolder ? deleteRecursive(store, subject) || Promise.resolve() : store.fetcher.webOperation('DELETE', subject.uri) || Promise.resolve();
|
|
89
|
+
promise.then(() => {
|
|
90
|
+
const str = 'Deleted: ' + subject;
|
|
91
|
+
console.log(str);
|
|
92
|
+
}).catch(err => {
|
|
93
|
+
const str = 'Unable to delete ' + subject + ': ' + err;
|
|
94
|
+
console.log(str);
|
|
95
|
+
alert(str);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
deleteButton.style = 'height: 2em;';
|
|
99
|
+
deleteButton.class = ''; // Remove hover hide
|
|
100
|
+
deleteCell.appendChild(deleteButton);
|
|
101
|
+
}
|
|
102
|
+
const refreshCell = controlRow.appendChild(dom.createElement('td'));
|
|
103
|
+
const refreshButton = _solidUi.widgets.button(dom, _solidUi.icons.iconBase + 'noun_479395.svg', 'refresh');
|
|
104
|
+
refreshCell.appendChild(refreshButton);
|
|
105
|
+
refreshButton.addEventListener('click', () => {
|
|
106
|
+
if (!store.fetcher) {
|
|
107
|
+
throw new Error('Store has no fetcher');
|
|
131
108
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
'
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
'http://www.w3.org/
|
|
170
|
-
|
|
171
|
-
'http://www.w3.org/2007/ont/link#Document': 1,
|
|
172
|
-
'http://www.w3.org/ns/rww#editable': 1,
|
|
173
|
-
'http://www.w3.org/2000/01/rdf-schema#seeAlso': 1,
|
|
174
|
-
'http://www.w3.org/2002/07/owl#': 1
|
|
175
|
-
},
|
|
176
|
-
classes: {
|
|
177
|
-
// Things which are inherently already undercover
|
|
178
|
-
'http://www.w3.org/2007/ont/link#ProtocolEvent': 1
|
|
109
|
+
store.fetcher.refresh(subject, function (ok, errm) {
|
|
110
|
+
let str;
|
|
111
|
+
if (ok) {
|
|
112
|
+
str = 'Refreshed OK: ' + subject;
|
|
113
|
+
} else {
|
|
114
|
+
str = 'Error refreshing: ' + subject + ': ' + errm;
|
|
115
|
+
}
|
|
116
|
+
console.log(str);
|
|
117
|
+
alert(str);
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
let plist = store.statementsMatching(subject);
|
|
122
|
+
let docURI = '';
|
|
123
|
+
if (!store.fetcher) {
|
|
124
|
+
throw new Error('Store has no fetcher');
|
|
125
|
+
}
|
|
126
|
+
if (subject.uri) {
|
|
127
|
+
plist.push((0, _rdflib.st)(subject, (0, _rdflib.sym)('http://www.w3.org/2007/ont/link#uri'), subject.uri,
|
|
128
|
+
// @@ TODO Remove casting
|
|
129
|
+
store.fetcher.appNode));
|
|
130
|
+
if (subject.uri.indexOf('#') >= 0) {
|
|
131
|
+
docURI = subject.uri.split('#')[0];
|
|
132
|
+
plist.push((0, _rdflib.st)(subject, (0, _rdflib.sym)('http://www.w3.org/2007/ont/link#documentURI'), subject.uri.split('#')[0],
|
|
133
|
+
// @@ TODO Remove casting
|
|
134
|
+
store.fetcher.appNode));
|
|
135
|
+
plist.push((0, _rdflib.st)(subject, (0, _rdflib.sym)('http://www.w3.org/2007/ont/link#document'), (0, _rdflib.sym)(subject.uri.split('#')[0]), store.fetcher.appNode));
|
|
136
|
+
} else {
|
|
137
|
+
docURI = subject.uri;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (docURI) {
|
|
141
|
+
if (!store.updater) {
|
|
142
|
+
throw new Error('Store has no updater');
|
|
143
|
+
}
|
|
144
|
+
const ed = store.updater.editable(docURI);
|
|
145
|
+
if (ed) {
|
|
146
|
+
plist.push((0, _rdflib.st)(subject, (0, _rdflib.sym)('http://www.w3.org/ns/rww#editable'), (0, _rdflib.literal)(ed.toString()), store.fetcher.appNode));
|
|
147
|
+
}
|
|
179
148
|
}
|
|
149
|
+
// @@ TODO get a proper type
|
|
150
|
+
const outliner = context.getOutliner(dom);
|
|
151
|
+
outliner.appendPropertyTRs(div, plist, false, filter);
|
|
152
|
+
plist = store.statementsMatching(undefined, undefined, subject);
|
|
153
|
+
outliner.appendPropertyTRs(div, plist, true, filter);
|
|
154
|
+
return div;
|
|
155
|
+
},
|
|
156
|
+
predicates: {
|
|
157
|
+
// Predicates used for inner workings. Under the hood
|
|
158
|
+
'http://www.w3.org/2007/ont/link#request': 1,
|
|
159
|
+
'http://www.w3.org/2007/ont/link#requestedBy': 1,
|
|
160
|
+
'http://www.w3.org/2007/ont/link#source': 1,
|
|
161
|
+
'http://www.w3.org/2007/ont/link#session': 2,
|
|
162
|
+
// 2= test neg but display
|
|
163
|
+
'http://www.w3.org/2007/ont/link#uri': 1,
|
|
164
|
+
'http://www.w3.org/2007/ont/link#documentURI': 1,
|
|
165
|
+
'http://www.w3.org/2007/ont/link#document': 1,
|
|
166
|
+
'http://www.w3.org/2007/ont/link#all': 1,
|
|
167
|
+
// From userinput.js
|
|
168
|
+
'http://www.w3.org/2007/ont/link#Document': 1,
|
|
169
|
+
'http://www.w3.org/ns/rww#editable': 1,
|
|
170
|
+
'http://www.w3.org/2000/01/rdf-schema#seeAlso': 1,
|
|
171
|
+
'http://www.w3.org/2002/07/owl#': 1
|
|
172
|
+
},
|
|
173
|
+
classes: {
|
|
174
|
+
// Things which are inherently already undercover
|
|
175
|
+
'http://www.w3.org/2007/ont/link#ProtocolEvent': 1
|
|
176
|
+
}
|
|
180
177
|
};
|
|
181
178
|
function isProtectedUri(subject) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
subject.uri === siteUri + 'profile/' ||
|
|
186
|
-
subject.uri === siteUri + 'profile/card' ||
|
|
187
|
-
subject.uri === siteUri + 'settings/' ||
|
|
188
|
-
subject.uri === siteUri + 'settings/prefs.ttl' ||
|
|
189
|
-
subject.uri === siteUri + 'settings/privateTypeIndex.ttl' ||
|
|
190
|
-
subject.uri === siteUri + 'settings/publicTypeIndex.ttl' ||
|
|
191
|
-
subject.uri === siteUri + 'settings/serverSide.ttl');
|
|
179
|
+
// TODO: Could make the code below smarter by removing some of the redundancy by creating a recursive function, but did not bother now
|
|
180
|
+
const siteUri = subject.site().uri;
|
|
181
|
+
return subject.uri === siteUri || subject.uri === siteUri + 'profile/' || subject.uri === siteUri + 'profile/card' || subject.uri === siteUri + 'settings/' || subject.uri === siteUri + 'settings/prefs.ttl' || subject.uri === siteUri + 'settings/privateTypeIndex.ttl' || subject.uri === siteUri + 'settings/publicTypeIndex.ttl' || subject.uri === siteUri + 'settings/serverSide.ttl';
|
|
192
182
|
}
|
|
193
|
-
|
|
194
|
-
// ends
|
|
183
|
+
var _default = exports.default = pane; // ends
|
|
195
184
|
//# sourceMappingURL=internalPane.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internalPane.js","sourceRoot":"","sources":["../../src/internal/internalPane.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,0BAA0B;AAE1B,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EAA6B,OAAO,EAAa,EAAE,EAAE,GAAG,EAAmB,MAAM,QAAQ,CAAA;AAGhG,MAAM,IAAI,GAAmB;IAC3B,IAAI,EAAE,KAAK,CAAC,gBAAgB,GAAG,4BAA4B;IAE3D,IAAI,EAAE,UAAU;IAEhB,KAAK,EAAE;QACL,OAAO,gBAAgB,CAAA,CAAC,6CAA6C;IACvE,CAAC;IAED,MAAM,EAAE,UAAU,OAAO,EAAE,OAAO;QAChC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;QACvB,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,KAAc,CAAA;QAC5C,MAAM,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAqC,CAAA;QACjF,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,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2BAA2B;QACzE,qCAAqC,EAAE,CAAC;QACxC,6CAA6C,EAAE,CAAC;QAChD,0CAA0C,EAAE,CAAC;QAC7C,qCAAqC,EAAE,CAAC,EAAE,oBAAoB;QAC9D,0CAA0C,EAAE,CAAC;QAC7C,mCAAmC,EAAE,CAAC;QACtC,8CAA8C,EAAE,CAAC;QACjD,gCAAgC,EAAE,CAAC;KACpC;IAED,OAAO,EAAE;QACP,iDAAiD;QACjD,+CAA+C,EAAE,CAAC;KACnD;CACF,CAAA;AAED,SAAS,cAAc,CAAE,OAAkB;IACzC,sIAAsI;IACtI,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,CAAA;IAClC,OAAO,CACL,OAAO,CAAC,GAAG,KAAK,OAAO;QACvB,OAAO,CAAC,GAAG,KAAK,OAAO,GAAG,UAAU;QACpC,OAAO,CAAC,GAAG,KAAK,OAAO,GAAG,cAAc;QACxC,OAAO,CAAC,GAAG,KAAK,OAAO,GAAG,WAAW;QACrC,OAAO,CAAC,GAAG,KAAK,OAAO,GAAG,oBAAoB;QAC9C,OAAO,CAAC,GAAG,KAAK,OAAO,GAAG,+BAA+B;QACzD,OAAO,CAAC,GAAG,KAAK,OAAO,GAAG,8BAA8B;QACxD,OAAO,CAAC,GAAG,KAAK,OAAO,GAAG,yBAAyB,CACpD,CAAA;AACH,CAAC;AAED,eAAe,IAAI,CAAA;AAEnB,OAAO"}
|
|
1
|
+
{"version":3,"file":"internalPane.js","names":["_solidUi","require","_rdflib","pane","icon","icons","originalIconBase","name","label","render","subject","context","dom","store","session","canonizedSubject","canon","types","findTypeURIs","filter","pred","view","paneRegistry","byName","predicates","uri","div","createElement","setAttribute","deleteRecursive","kb","folder","fetcher","console","error","Promise","resolve","reject","load","then","promises","each","ns","ldp","map","file","holds","rdf","log","webOperation","all","undefined","catch","err","str","Error","alert","isDocument","includes","controls","appendChild","style","width","margin","controlRow","deleteCell","isFolder","endsWith","noun","isProtectedUri","deleteButton","widgets","deleteButtonWithCheck","confirm","promise","class","refreshCell","refreshButton","button","iconBase","addEventListener","refresh","ok","errm","plist","statementsMatching","docURI","push","st","sym","appNode","indexOf","split","updater","ed","editable","literal","toString","outliner","getOutliner","appendPropertyTRs","classes","siteUri","site","_default","exports","default"],"sources":["../../src/internal/internalPane.ts"],"sourcesContent":["/* Internal Pane\n **\n ** This outline pane contains the properties which are\n ** internal to the user's interaction with the web, and are not normally displayed\n */\n/* global alert confirm */\n\nimport { icons, ns, widgets } from 'solid-ui'\nimport { BlankNode, IndexedFormula, literal, NamedNode, st, sym, Variable, Store } from 'rdflib'\nimport { PaneDefinition } from 'pane-registry'\n\nconst pane: PaneDefinition = {\n icon: icons.originalIconBase + 'tango/22-emblem-system.png',\n\n name: 'internal',\n\n label: function () {\n return 'under the hood' // There is often a URI even of no statements\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const store = context.session.store as Store\n const canonizedSubject = store.canon(subject) as BlankNode | NamedNode | Variable\n const types = store.findTypeURIs(canonizedSubject)\n\n function filter (pred: NamedNode) {\n if (types['http://www.w3.org/2007/ont/link#ProtocolEvent']) return true // display everything for them\n const view = context.session.paneRegistry.byName('internal')\n return (\n view &&\n view.predicates &&\n !!(typeof view.predicates[pred.uri] !== 'undefined')\n )\n }\n\n const div = dom.createElement('div')\n div.setAttribute('class', 'internalPane')\n div.setAttribute(\n 'style',\n 'background-color: #ddddff; padding: 0.5em; border-radius: 1em;'\n )\n\n function deleteRecursive (kb: IndexedFormula, folder: NamedNode) {\n const fetcher = (kb as any).fetcher\n if (!fetcher) {\n console.error('No fetcher available')\n return\n }\n return new Promise(function (resolve, reject) {\n fetcher.load(folder).then(function () {\n const promises = kb.each(folder, ns.ldp('contains')).map(file => {\n if (kb.holds(file, ns.rdf('type'), ns.ldp('BasicContainer'))) {\n return deleteRecursive(kb, file as NamedNode)\n } else {\n console.log('deleteRecursive leaf file: ' + file)\n return fetcher.webOperation('DELETE', (file as NamedNode).uri)\n }\n })\n Promise.all(promises).then(\n () => {\n console.log('deleteRecursive empty folder: ' + folder)\n fetcher\n .webOperation('DELETE', folder.uri)\n .then(() => {\n console.log('Deleted Ok: ' + folder)\n resolve(undefined)\n })\n .catch((err: string) => {\n const str = 'Unable to delete ' + folder + ': ' + err\n console.log(str)\n reject(new Error(str))\n })\n resolve(undefined)\n },\n err => {\n alert(err)\n reject(err)\n }\n )\n })\n })\n }\n\n const isDocument = subject.uri && !subject.uri.includes('#')\n if (isDocument) {\n const controls = div.appendChild(dom.createElement('table'))\n controls.style.width = '100%'\n controls.style.margin = '1em'\n const controlRow = controls.appendChild(dom.createElement('tr'))\n\n const deleteCell = controlRow.appendChild(dom.createElement('td'))\n const isFolder =\n (subject.uri && subject.uri.endsWith('/')) ||\n store.holds(subject, ns.rdf('type'), ns.ldp('Container'))\n const noun = isFolder ? 'folder' : 'file'\n if (!isProtectedUri(subject)) {\n console.log(subject)\n const deleteButton = widgets.deleteButtonWithCheck(\n dom,\n deleteCell,\n noun,\n function () {\n if (\n !confirm(\n `Are you sure you want to delete ${subject}? This cannot be undone.`\n )\n ) {\n return\n }\n // @@ TODO Remove casing of store.fetcher\n if (!store.fetcher) {\n throw new Error('Store has no fetcher')\n }\n const promise = isFolder\n ? (deleteRecursive(store, subject) || Promise.resolve())\n : store.fetcher.webOperation('DELETE', subject.uri) || Promise.resolve()\n promise\n .then(() => {\n const str = 'Deleted: ' + subject\n console.log(str)\n })\n .catch((err: any) => {\n const str = 'Unable to delete ' + subject + ': ' + err\n console.log(str)\n alert(str)\n })\n }\n )\n deleteButton.style = 'height: 2em;'\n deleteButton.class = '' // Remove hover hide\n deleteCell.appendChild(deleteButton)\n }\n\n const refreshCell = controlRow.appendChild(dom.createElement('td'))\n const refreshButton = widgets.button(\n dom,\n icons.iconBase + 'noun_479395.svg',\n 'refresh'\n )\n refreshCell.appendChild(refreshButton)\n refreshButton.addEventListener('click', () => {\n if (!store.fetcher) {\n throw new Error('Store has no fetcher')\n }\n store.fetcher.refresh(subject, function (\n ok,\n errm\n ) {\n let str\n if (ok) {\n str = 'Refreshed OK: ' + subject\n } else {\n str = 'Error refreshing: ' + subject + ': ' + errm\n }\n console.log(str)\n alert(str)\n })\n })\n }\n\n let plist = store.statementsMatching(subject)\n let docURI = ''\n if (!store.fetcher) {\n throw new Error('Store has no fetcher')\n }\n\n if (subject.uri) {\n plist.push(\n st(\n subject,\n sym('http://www.w3.org/2007/ont/link#uri'),\n subject.uri as any, // @@ TODO Remove casting\n store.fetcher.appNode\n )\n )\n if (subject.uri.indexOf('#') >= 0) {\n docURI = subject.uri.split('#')[0]\n plist.push(\n st(\n subject,\n sym('http://www.w3.org/2007/ont/link#documentURI'),\n subject.uri.split('#')[0] as any, // @@ TODO Remove casting\n store.fetcher.appNode\n )\n )\n plist.push(\n st(\n subject,\n sym('http://www.w3.org/2007/ont/link#document'),\n sym(subject.uri.split('#')[0]),\n store.fetcher.appNode\n )\n )\n } else {\n docURI = subject.uri\n }\n }\n if (docURI) {\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n\n const ed = store.updater.editable(docURI)\n if (ed) {\n plist.push(\n st(\n subject,\n sym('http://www.w3.org/ns/rww#editable'),\n literal(ed.toString()),\n store.fetcher.appNode\n )\n )\n }\n }\n // @@ TODO get a proper type\n const outliner: any = context.getOutliner(dom)\n outliner.appendPropertyTRs(div, plist, false, filter)\n plist = store.statementsMatching(undefined, undefined, subject)\n outliner.appendPropertyTRs(div, plist, true, filter)\n return div\n },\n\n predicates: {\n // Predicates used for inner workings. Under the hood\n 'http://www.w3.org/2007/ont/link#request': 1,\n 'http://www.w3.org/2007/ont/link#requestedBy': 1,\n 'http://www.w3.org/2007/ont/link#source': 1,\n 'http://www.w3.org/2007/ont/link#session': 2, // 2= test neg but display\n 'http://www.w3.org/2007/ont/link#uri': 1,\n 'http://www.w3.org/2007/ont/link#documentURI': 1,\n 'http://www.w3.org/2007/ont/link#document': 1,\n 'http://www.w3.org/2007/ont/link#all': 1, // From userinput.js\n 'http://www.w3.org/2007/ont/link#Document': 1,\n 'http://www.w3.org/ns/rww#editable': 1,\n 'http://www.w3.org/2000/01/rdf-schema#seeAlso': 1,\n 'http://www.w3.org/2002/07/owl#': 1\n },\n\n classes: {\n // Things which are inherently already undercover\n 'http://www.w3.org/2007/ont/link#ProtocolEvent': 1\n }\n}\n\nfunction isProtectedUri (subject: NamedNode): boolean {\n // TODO: Could make the code below smarter by removing some of the redundancy by creating a recursive function, but did not bother now\n const siteUri = subject.site().uri\n return (\n subject.uri === siteUri ||\n subject.uri === siteUri + 'profile/' ||\n subject.uri === siteUri + 'profile/card' ||\n subject.uri === siteUri + 'settings/' ||\n subject.uri === siteUri + 'settings/prefs.ttl' ||\n subject.uri === siteUri + 'settings/privateTypeIndex.ttl' ||\n subject.uri === siteUri + 'settings/publicTypeIndex.ttl' ||\n subject.uri === siteUri + 'settings/serverSide.ttl'\n )\n}\n\nexport default pane\n\n// ends\n"],"mappings":";;;;;;AAOA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AARA;AACA;AACA;AACA;AACA;AACA;;AAMA,MAAME,IAAoB,GAAG;EAC3BC,IAAI,EAAEC,cAAK,CAACC,gBAAgB,GAAG,4BAA4B;EAE3DC,IAAI,EAAE,UAAU;EAEhBC,KAAK,EAAE,SAAAA,CAAA,EAAY;IACjB,OAAO,gBAAgB,EAAC;EAC1B,CAAC;EAEDC,MAAM,EAAE,SAAAA,CAAUC,OAAO,EAAEC,OAAO,EAAE;IAClC,MAAMC,GAAG,GAAGD,OAAO,CAACC,GAAG;IACvB,MAAMC,KAAK,GAAGF,OAAO,CAACG,OAAO,CAACD,KAAc;IAC5C,MAAME,gBAAgB,GAAGF,KAAK,CAACG,KAAK,CAACN,OAAO,CAAqC;IACjF,MAAMO,KAAK,GAAGJ,KAAK,CAACK,YAAY,CAACH,gBAAgB,CAAC;IAElD,SAASI,MAAMA,CAAEC,IAAe,EAAE;MAChC,IAAIH,KAAK,CAAC,+CAA+C,C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,cAAc,IACxC5F,OAAO,CAACe,GAAG,KAAK6E,OAAO,GAAG,WAAW,IACrC5F,OAAO,CAACe,GAAG,KAAK6E,OAAO,GAAG,oBAAoB,IAC9C5F,OAAO,CAACe,GAAG,KAAK6E,OAAO,GAAG,+BAA+B,IACzD5F,OAAO,CAACe,GAAG,KAAK6E,OAAO,GAAG,8BAA8B,IACxD5F,OAAO,CAACe,GAAG,KAAK6E,OAAO,GAAG,yBAAyB;AAEvD;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcvG,IAAI,EAEnB","ignoreList":[]}
|
package/dist/mainPage/footer.js
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createFooter = createFooter;
|
|
7
|
+
var _solidUi = require("solid-ui");
|
|
2
8
|
/**
|
|
3
9
|
* links in the footer
|
|
4
10
|
*/
|
|
5
11
|
const SOLID_PROJECT_URL = 'https://solidproject.org';
|
|
6
12
|
const SOLID_PROJECT_NAME = 'solidproject.org';
|
|
7
|
-
|
|
8
|
-
|
|
13
|
+
function createFooter(store) {
|
|
14
|
+
(0, _solidUi.initFooter)(store, setFooterOptions());
|
|
9
15
|
}
|
|
10
16
|
function setFooterOptions() {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
return {
|
|
18
|
+
solidProjectUrl: SOLID_PROJECT_URL,
|
|
19
|
+
solidProjectName: SOLID_PROJECT_NAME
|
|
20
|
+
};
|
|
15
21
|
}
|
|
16
22
|
//# sourceMappingURL=footer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","
|
|
1
|
+
{"version":3,"file":"footer.js","names":["_solidUi","require","SOLID_PROJECT_URL","SOLID_PROJECT_NAME","createFooter","store","initFooter","setFooterOptions","solidProjectUrl","solidProjectName"],"sources":["../../src/mainPage/footer.ts"],"sourcesContent":["import { LiveStore } from 'rdflib'\nimport { initFooter } from 'solid-ui'\n\n/**\n * links in the footer\n*/\nconst SOLID_PROJECT_URL = 'https://solidproject.org'\nconst SOLID_PROJECT_NAME = 'solidproject.org'\n\nexport function createFooter (store: LiveStore) {\n initFooter(store, setFooterOptions())\n}\n\nfunction setFooterOptions () {\n return {\n solidProjectUrl: SOLID_PROJECT_URL,\n solidProjectName: SOLID_PROJECT_NAME\n }\n}\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAG,0BAA0B;AACpD,MAAMC,kBAAkB,GAAG,kBAAkB;AAEtC,SAASC,YAAYA,CAAEC,KAAgB,EAAE;EAC9C,IAAAC,mBAAU,EAACD,KAAK,EAAEE,gBAAgB,CAAC,CAAC,CAAC;AACvC;AAEA,SAASA,gBAAgBA,CAAA,EAAI;EAC3B,OAAO;IACLC,eAAe,EAAEN,iBAAiB;IAClCO,gBAAgB,EAAEN;EACpB,CAAC;AACH","ignoreList":[]}
|