solid-panes 3.5.36-afb8af9f → 3.5.36-fcdc4202
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/lib/outline/manager.js +0 -8
- package/lib/outline/manager.js.map +1 -1
- package/lib/outline/manager.test.d.ts +2 -0
- package/lib/outline/manager.test.d.ts.map +1 -0
- package/lib/outline/propertyViews.test.d.ts +2 -0
- package/lib/outline/propertyViews.test.d.ts.map +1 -0
- package/lib/outline/propertyViews.test.js +1 -0
- package/lib/outline/propertyViews.test.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.test.d.ts +2 -0
- package/lib/trustedApplications/trustedApplications.test.d.ts.map +1 -0
- package/lib/trustedApplications/trustedApplications.utils.d.ts +1 -0
- package/lib/trustedApplications/trustedApplications.utils.d.ts.map +1 -1
- package/lib/versionInfo.js +2 -2
- package/lib/versionInfo.js.map +1 -1
- package/package.json +2 -2
- package/src/outline/manager.js +0 -9
- package/src/outline/propertyViews.test.ts +2 -1
- package/src/versionInfo.ts +2 -2
- package/tsconfig.json +7 -1
- package/lib/outline/licenseOptions.js +0 -80
- package/lib/outline/licenseOptions.js.map +0 -1
- package/src/outline/licenseOptions.js +0 -105
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.test.d.ts","sourceRoot":"","sources":["../../src/outline/manager.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propertyViews.test.d.ts","sourceRoot":"","sources":["../../src/outline/propertyViews.test.ts"],"names":[],"mappings":""}
|
|
@@ -21,6 +21,7 @@ describe('property views', function () {
|
|
|
21
21
|
var result = view((0, _rdflib.sym)('mailto:alice@mail.example'));
|
|
22
22
|
expect(result).toBeInstanceOf(HTMLAnchorElement);
|
|
23
23
|
expect(result).toHaveAttribute('href', 'mailto:alice@mail.example');
|
|
24
|
+
expect(result).toHaveTextContent('alice@mail.example');
|
|
24
25
|
});
|
|
25
26
|
});
|
|
26
27
|
//# sourceMappingURL=propertyViews.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propertyViews.test.js","names":["_util","require","_rdflib","_propertyViews","global","TextEncoder","TextDecoder","describe","it","each","property","views","propertyViews","document","view","defaults","result","sym","expect","toBeInstanceOf","HTMLImageElement","toHaveAttribute","HTMLAnchorElement"],"sources":["../../src/outline/propertyViews.test.ts"],"sourcesContent":["/* eslint-env jest */\n\nimport { TextEncoder, TextDecoder } from 'util'\nglobal.TextEncoder = TextEncoder as any\nglobal.TextDecoder = TextDecoder as any\n\n\nimport { sym } from 'rdflib'\nimport { propertyViews } from './propertyViews'\n\ndescribe('property views', () => {\n it.each([\n 'http://xmlns.com/foaf/0.1/depiction',\n 'http://xmlns.com/foaf/0.1/img',\n 'http://xmlns.com/foaf/0.1/thumbnail',\n 'http://xmlns.com/foaf/0.1/logo',\n 'http://schema.org/image'\n ])('renders %s as image', (property) => {\n const views = propertyViews(document)\n const view = views.defaults[property]\n const result = view(sym('https://pod.example/img.jpg'))\n expect(result).toBeInstanceOf(HTMLImageElement)\n expect(result).toHaveAttribute('src', 'https://pod.example/img.jpg')\n })\n\n it.each([\n 'http://xmlns.com/foaf/0.1/mbox'\n ])('renders %s as anchor', (property) => {\n const views = propertyViews(document)\n const view = views.defaults[property]\n const result = view(sym('mailto:alice@mail.example'))\n expect(result).toBeInstanceOf(HTMLAnchorElement)\n expect(result).toHaveAttribute('href', 'mailto:alice@mail.example')
|
|
1
|
+
{"version":3,"file":"propertyViews.test.js","names":["_util","require","_rdflib","_propertyViews","global","TextEncoder","TextDecoder","describe","it","each","property","views","propertyViews","document","view","defaults","result","sym","expect","toBeInstanceOf","HTMLImageElement","toHaveAttribute","HTMLAnchorElement","toHaveTextContent"],"sources":["../../src/outline/propertyViews.test.ts"],"sourcesContent":["/* eslint-env jest */\n\nimport { TextEncoder, TextDecoder } from 'util'\nglobal.TextEncoder = TextEncoder as any\nglobal.TextDecoder = TextDecoder as any\n\n\nimport { sym } from 'rdflib'\nimport { propertyViews } from './propertyViews'\n\ndescribe('property views', () => {\n it.each([\n 'http://xmlns.com/foaf/0.1/depiction',\n 'http://xmlns.com/foaf/0.1/img',\n 'http://xmlns.com/foaf/0.1/thumbnail',\n 'http://xmlns.com/foaf/0.1/logo',\n 'http://schema.org/image'\n ])('renders %s as image', (property) => {\n const views = propertyViews(document)\n const view = views.defaults[property]\n const result = view(sym('https://pod.example/img.jpg'))\n expect(result).toBeInstanceOf(HTMLImageElement)\n expect(result).toHaveAttribute('src', 'https://pod.example/img.jpg')\n })\n\n it.each([\n 'http://xmlns.com/foaf/0.1/mbox'\n ])('renders %s as anchor', (property) => {\n const views = propertyViews(document)\n const view = views.defaults[property]\n const result = view(sym('mailto:alice@mail.example'))\n expect(result).toBeInstanceOf(HTMLAnchorElement)\n expect(result).toHaveAttribute('href', 'mailto:alice@mail.example');\n expect(result).toHaveTextContent('alice@mail.example');\n })\n})\n"],"mappings":";;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AARA;;AAGAG,MAAM,CAACC,WAAW,GAAGA,iBAAkB;AACvCD,MAAM,CAACE,WAAW,GAAGA,iBAAkB;AAMvCC,QAAQ,CAAC,gBAAgB,EAAE,YAAM;EAC/BC,EAAE,CAACC,IAAI,CAAC,CACN,qCAAqC,EACrC,+BAA+B,EAC/B,qCAAqC,EACrC,gCAAgC,EAChC,yBAAyB,CAC1B,CAAC,CAAC,qBAAqB,EAAE,UAACC,QAAQ,EAAK;IACtC,IAAMC,KAAK,GAAG,IAAAC,4BAAa,EAACC,QAAQ,CAAC;IACrC,IAAMC,IAAI,GAAGH,KAAK,CAACI,QAAQ,CAACL,QAAQ,CAAC;IACrC,IAAMM,MAAM,GAAGF,IAAI,CAAC,IAAAG,WAAG,EAAC,6BAA6B,CAAC,CAAC;IACvDC,MAAM,CAACF,MAAM,CAAC,CAACG,cAAc,CAACC,gBAAgB,CAAC;IAC/CF,MAAM,CAACF,MAAM,CAAC,CAACK,eAAe,CAAC,KAAK,EAAE,6BAA6B,CAAC;EACtE,CAAC,CAAC;EAEFb,EAAE,CAACC,IAAI,CAAC,CACN,gCAAgC,CACjC,CAAC,CAAC,sBAAsB,EAAE,UAACC,QAAQ,EAAK;IACvC,IAAMC,KAAK,GAAG,IAAAC,4BAAa,EAACC,QAAQ,CAAC;IACrC,IAAMC,IAAI,GAAGH,KAAK,CAACI,QAAQ,CAACL,QAAQ,CAAC;IACrC,IAAMM,MAAM,GAAGF,IAAI,CAAC,IAAAG,WAAG,EAAC,2BAA2B,CAAC,CAAC;IACrDC,MAAM,CAACF,MAAM,CAAC,CAACG,cAAc,CAACG,iBAAiB,CAAC;IAChDJ,MAAM,CAACF,MAAM,CAAC,CAACK,eAAe,CAAC,MAAM,EAAE,2BAA2B,CAAC;IACnEH,MAAM,CAACF,MAAM,CAAC,CAACO,iBAAiB,CAAC,oBAAoB,CAAC;EACxD,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trustedApplications.test.d.ts","sourceRoot":"","sources":["../../src/trustedApplications/trustedApplications.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../typings/solid-namespace/index.d.ts" />
|
|
1
2
|
import { IndexedFormula, NamedNode, Literal } from 'rdflib';
|
|
2
3
|
import { Namespaces } from 'solid-namespace';
|
|
3
4
|
export declare function getStatementsToDelete(origin: NamedNode | Literal, person: NamedNode, kb: IndexedFormula, ns: Namespaces): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trustedApplications.utils.d.ts","sourceRoot":"","sources":["../../src/trustedApplications/trustedApplications.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,SAAS,EAAM,OAAO,EAAkB,MAAM,QAAQ,CAAA;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,GAAG,OAAO,EAC3B,MAAM,EAAE,SAAS,EACjB,EAAE,EAAE,cAAc,EAClB,EAAE,EAAE,UAAU,GACb,GAAG,CAqBL;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,SAAS,EACjB,EAAE,EAAE,UAAU,GACb,GAAG,CASL;AAED,wBAAgB,oBAAoB,WAEnC"}
|
|
1
|
+
{"version":3,"file":"trustedApplications.utils.d.ts","sourceRoot":"","sources":["../../src/trustedApplications/trustedApplications.utils.ts"],"names":[],"mappings":";AAAA,OAAO,EAAa,cAAc,EAAE,SAAS,EAAM,OAAO,EAAkB,MAAM,QAAQ,CAAA;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,GAAG,OAAO,EAC3B,MAAM,EAAE,SAAS,EACjB,EAAE,EAAE,cAAc,EAClB,EAAE,EAAE,UAAU,GACb,GAAG,CAqBL;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,SAAS,EACjB,EAAE,EAAE,UAAU,GACb,GAAG,CASL;AAED,wBAAgB,oBAAoB,WAEnC"}
|
package/lib/versionInfo.js
CHANGED
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = exports["default"] = {
|
|
8
|
-
buildTime: "2024-
|
|
9
|
-
commit: "
|
|
8
|
+
buildTime: "2024-09-03T20:09:29Z",
|
|
9
|
+
commit: "fcdc420285b0d407e8021556f7e375d5b87ce36b",
|
|
10
10
|
npmInfo: {
|
|
11
11
|
'solid-panes': '3.5.36',
|
|
12
12
|
npm: '8.19.4',
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.js","names":["buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\nbuildTime: \"2024-
|
|
1
|
+
{"version":3,"file":"versionInfo.js","names":["buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\nbuildTime: \"2024-09-03T20:09:29Z\",\ncommit: \"fcdc420285b0d407e8021556f7e375d5b87ce36b\",\nnpmInfo:\n{\n 'solid-panes': '3.5.36',\n npm: '8.19.4',\n node: '16.20.2',\n v8: '9.4.146.26-node.26',\n uv: '1.43.0',\n zlib: '1.2.11',\n brotli: '1.0.9',\n ares: '1.19.1',\n modules: '93',\n nghttp2: '1.47.0',\n napi: '8',\n llhttp: '6.0.11',\n openssl: '1.1.1v+quic',\n cldr: '41.0',\n icu: '71.1',\n tz: '2022f',\n unicode: '14.0',\n ngtcp2: '0.8.1',\n nghttp3: '0.7.0'\n}\n};\n"],"mappings":";;;;;;oCAAe;EACfA,SAAS,EAAE,sBAAsB;EACjCC,MAAM,EAAE,0CAA0C;EAClDC,OAAO,EACP;IACE,aAAa,EAAE,QAAQ;IACvBC,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAE,SAAS;IACfC,EAAE,EAAE,oBAAoB;IACxBC,EAAE,EAAE,QAAQ;IACZC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,OAAO;IACfC,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAE,IAAI;IACbC,OAAO,EAAE,QAAQ;IACjBC,IAAI,EAAE,GAAG;IACTC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE,aAAa;IACtBC,IAAI,EAAE,MAAM;IACZC,GAAG,EAAE,MAAM;IACXC,EAAE,EAAE,OAAO;IACXC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,OAAO;IACfC,OAAO,EAAE;EACX;AACA,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-panes",
|
|
3
|
-
"version": "3.5.36-
|
|
3
|
+
"version": "3.5.36-fcdc4202",
|
|
4
4
|
"description": "Solid-compatible Panes: applets and views for the mashlib and databrowser",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"homepage": "https://github.com/solidos/solid-panes",
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@solid/better-simple-slideshow": "^0.1.0",
|
|
49
|
+
"@types/jest": "^29.5.12",
|
|
49
50
|
"activitystreams-pane": "^0.6.13",
|
|
50
51
|
"chat-pane": "^2.4.26",
|
|
51
52
|
"contacts-pane": "^2.6.12",
|
|
@@ -68,7 +69,6 @@
|
|
|
68
69
|
"@babel/preset-typescript": "^7.24.1",
|
|
69
70
|
"@testing-library/dom": "^9.3.4",
|
|
70
71
|
"@testing-library/jest-dom": "^6.4.2",
|
|
71
|
-
"@types/jest": "^29.5.12",
|
|
72
72
|
"@types/webpack-env": "^1.18.4",
|
|
73
73
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
74
74
|
"@typescript-eslint/parser": "^6.21.0",
|
package/src/outline/manager.js
CHANGED
|
@@ -7,8 +7,6 @@ import * as $rdf from 'rdflib'
|
|
|
7
7
|
import * as UI from 'solid-ui'
|
|
8
8
|
import { authn, authSession, store } from 'solid-logic'
|
|
9
9
|
import { propertyViews } from './propertyViews'
|
|
10
|
-
import { licenseOptions } from './licenseOptions'
|
|
11
|
-
|
|
12
10
|
import { outlineIcons } from './outlineIcons.js' // @@ chec
|
|
13
11
|
import { UserInput } from './userInput.js'
|
|
14
12
|
import * as queryByExample from './queryByExample.js'
|
|
@@ -179,13 +177,6 @@ export default function (context) {
|
|
|
179
177
|
td.setAttribute('notSelectable', 'false')
|
|
180
178
|
let theClass = 'obj'
|
|
181
179
|
|
|
182
|
-
// check the IPR on the data. Ok if there is any checked license which is one the document has.
|
|
183
|
-
if (statement && statement.why) {
|
|
184
|
-
if (licenseOptions && licenseOptions.checklicense && licenseOptions.checklicense()) {
|
|
185
|
-
theClass += ' licOkay' // flag as light green etc .licOkay {background-color: #dfd}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
180
|
// set about and put 'expand' icon
|
|
190
181
|
if (
|
|
191
182
|
obj.termType === 'NamedNode' ||
|
|
@@ -30,6 +30,7 @@ describe('property views', () => {
|
|
|
30
30
|
const view = views.defaults[property]
|
|
31
31
|
const result = view(sym('mailto:alice@mail.example'))
|
|
32
32
|
expect(result).toBeInstanceOf(HTMLAnchorElement)
|
|
33
|
-
expect(result).toHaveAttribute('href', 'mailto:alice@mail.example')
|
|
33
|
+
expect(result).toHaveAttribute('href', 'mailto:alice@mail.example');
|
|
34
|
+
expect(result).toHaveTextContent('alice@mail.example');
|
|
34
35
|
})
|
|
35
36
|
})
|
package/src/versionInfo.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
+
// See https://stackoverflow.com/questions/54139158/cannot-find-name-describe-do-you-need-to-install-type-definitions-for-a-test
|
|
3
|
+
|
|
2
4
|
"compilerOptions": {
|
|
3
5
|
/* Basic Options */
|
|
4
6
|
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
|
|
@@ -50,9 +52,13 @@
|
|
|
50
52
|
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
51
53
|
"typeRoots": [
|
|
52
54
|
"node_modules/@types",
|
|
55
|
+
"node_modules/@testing-library",
|
|
53
56
|
"./typings"
|
|
54
57
|
] /* List of folders to include type definitions from. */,
|
|
55
58
|
// "types": [], /* Type declaration files to be included in compilation. */
|
|
59
|
+
|
|
60
|
+
"types": ["node", "jsdom", "jest", "jest-dom"], /* https://medium.com/heybooster/debugging-typescript-jest-dom-matchers-in-vue-js-6962dab4d4cc */
|
|
61
|
+
|
|
56
62
|
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
57
63
|
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
58
64
|
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
@@ -68,5 +74,5 @@
|
|
|
68
74
|
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
69
75
|
},
|
|
70
76
|
"include": ["src/**/*"],
|
|
71
|
-
"exclude": ["node_modules", "**/*.test.ts"
|
|
77
|
+
"exclude": ["node_modules"] // was , "**/*.test.ts"
|
|
72
78
|
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.licenseOptions = licenseOptions;
|
|
7
|
-
exports.licenseURI = void 0;
|
|
8
|
-
var _solidLogic = require("solid-logic");
|
|
9
|
-
// This was a student project to
|
|
10
|
-
// allow the user to chose favoite CC license terms and have them highlighted
|
|
11
|
-
|
|
12
|
-
// tabulator.options becaome UI.licenseOptions
|
|
13
|
-
// Possible future alternative directoons: Store license preferences in a solid preferences file
|
|
14
|
-
|
|
15
|
-
var licenseURI = exports.licenseURI = ['http://creativecommons.org/licenses/by-nc-nd/3.0/', 'http://creativecommons.org/licenses/by-nc-sa/3.0/', 'http://creativecommons.org/licenses/by-nc/3.0/', 'http://creativecommons.org/licenses/by-nd/3.0/', 'http://creativecommons.org/licenses/by-sa/3.0/', 'http://creativecommons.org/licenses/by/3.0/'];
|
|
16
|
-
var names = ['BY-NC-ND', 'BY-NC-SA', 'BY-NC', 'BY-ND', 'BY-SA', 'BY'];
|
|
17
|
-
function licenseOptions() {
|
|
18
|
-
this.options = {};
|
|
19
|
-
this.references = [];
|
|
20
|
-
this.checkedLicenses = [];
|
|
21
|
-
this.openCheckBoxWindow = function () {
|
|
22
|
-
this["this"].display = window.open(' ', 'NewWin', 'menubar=0,location=no,status=no,directories=no,toolbar=no,scrollbars=yes,height=200,width=200');
|
|
23
|
-
};
|
|
24
|
-
var message = "<font face='arial' size='2'><form name ='checkboxes'>";
|
|
25
|
-
var lics = this.checkedLicenses;
|
|
26
|
-
for (var kk = 0; kk < lics.length; kk++) {
|
|
27
|
-
message += "<input type='checkbox' name = 'n" + kk + "' onClick = 'tabulator.options.submit()'" + (
|
|
28
|
-
// @@ FIXME
|
|
29
|
-
lics[kk] ? 'CHECKED' : '') + ' />CC: ' + names[kk] + '<br />';
|
|
30
|
-
}
|
|
31
|
-
message += "<br /> <a onclick='tabulator.options.selectAll()'>[Select All] </a>"; // @@ FIXME
|
|
32
|
-
message += "<a onclick='tabulator.options.deselectAll()'> [Deselect All]</a>"; // @@ FIXME
|
|
33
|
-
message += '</form></font>';
|
|
34
|
-
this.display.document.write(message);
|
|
35
|
-
this.display.document.close();
|
|
36
|
-
var i;
|
|
37
|
-
for (i = 0; i < 6; i++) {
|
|
38
|
-
this.references[i] = this["this"].display.document.checkboxes.elements[i];
|
|
39
|
-
}
|
|
40
|
-
this.selectAll = function () {
|
|
41
|
-
var i;
|
|
42
|
-
for (i = 0; i < 6; i++) {
|
|
43
|
-
this.display.document.checkboxes.elements[i].checked = true;
|
|
44
|
-
this.references[i].checked = true;
|
|
45
|
-
this.checkedLicenses[i] = true;
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
this.deselectAll = function () {
|
|
49
|
-
var i;
|
|
50
|
-
for (i = 0; i < 6; i++) {
|
|
51
|
-
this.display.document.checkboxes.elements[i].checked = false;
|
|
52
|
-
this.references[i].checked = false;
|
|
53
|
-
this.checkedLicenses[i] = false;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
this.submit = function () {
|
|
57
|
-
// alert('this.submit: checked=' + this.references[0].checked)
|
|
58
|
-
for (var _i = 0; _i < 6; _i++) {
|
|
59
|
-
this.checkedLicenses[_i] = !!this.references[_i].checked;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
this.checkLicense = function checkLicense(statement) {
|
|
63
|
-
var licenses = _solidLogic.store.each(statement.why, _solidLogic.store.sym('http://creativecommons.org/ns#license'), null, statement.why);
|
|
64
|
-
// UI.log.info('licenses:' + statement.why + ': ' + licenses)
|
|
65
|
-
for (var _i2 = 0; _i2 < licenses.length; _i2++) {
|
|
66
|
-
for (var j = 0; j < this.checkedLicenses.length; j++) {
|
|
67
|
-
if (this.checkedLicenses[j] && licenses[_i2].uri === licenseURI[j]) {
|
|
68
|
-
return true;
|
|
69
|
-
// theClass += ' licOkay' // icon_expand
|
|
70
|
-
// break
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return false;
|
|
75
|
-
};
|
|
76
|
-
return this;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// ends
|
|
80
|
-
//# sourceMappingURL=licenseOptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"licenseOptions.js","names":["_solidLogic","require","licenseURI","exports","names","licenseOptions","options","references","checkedLicenses","openCheckBoxWindow","display","window","open","message","lics","kk","length","document","write","close","i","checkboxes","elements","selectAll","checked","deselectAll","submit","checkLicense","statement","licenses","store","each","why","sym","j","uri"],"sources":["../../src/outline/licenseOptions.js"],"sourcesContent":["// This was a student project to\n// allow the user to chose favoite CC license terms and have them highlighted\n\n// tabulator.options becaome UI.licenseOptions\n// Possible future alternative directoons: Store license preferences in a solid preferences file\nimport { store } from 'solid-logic'\n\nexport const licenseURI = [\n 'http://creativecommons.org/licenses/by-nc-nd/3.0/',\n 'http://creativecommons.org/licenses/by-nc-sa/3.0/',\n 'http://creativecommons.org/licenses/by-nc/3.0/',\n 'http://creativecommons.org/licenses/by-nd/3.0/',\n 'http://creativecommons.org/licenses/by-sa/3.0/',\n 'http://creativecommons.org/licenses/by/3.0/'\n]\n\nconst names = ['BY-NC-ND', 'BY-NC-SA', 'BY-NC', 'BY-ND', 'BY-SA', 'BY']\n\nexport function licenseOptions () {\n this.options = {}\n this.references = []\n this.checkedLicenses = []\n\n this.openCheckBoxWindow = function () {\n this.this.display = window.open(\n ' ',\n 'NewWin',\n 'menubar=0,location=no,status=no,directories=no,toolbar=no,scrollbars=yes,height=200,width=200'\n )\n }\n let message = \"<font face='arial' size='2'><form name ='checkboxes'>\"\n const lics = this.checkedLicenses\n for (let kk = 0; kk < lics.length; kk++) {\n message +=\n \"<input type='checkbox' name = 'n\" +\n kk +\n \"' onClick = 'tabulator.options.submit()'\" + // @@ FIXME\n (lics[kk] ? 'CHECKED' : '') +\n ' />CC: ' +\n names[kk] +\n '<br />'\n }\n\n message +=\n \"<br /> <a onclick='tabulator.options.selectAll()'>[Select All] </a>\" // @@ FIXME\n message += \"<a onclick='tabulator.options.deselectAll()'> [Deselect All]</a>\" // @@ FIXME\n message += '</form></font>'\n\n this.display.document.write(message)\n\n this.display.document.close()\n\n let i\n for (i = 0; i < 6; i++) {\n this.references[i] = this.this.display.document.checkboxes.elements[i]\n }\n\n this.selectAll = function () {\n let i\n for (i = 0; i < 6; i++) {\n this.display.document.checkboxes.elements[i].checked = true\n this.references[i].checked = true\n this.checkedLicenses[i] = true\n }\n }\n\n this.deselectAll = function () {\n let i\n for (i = 0; i < 6; i++) {\n this.display.document.checkboxes.elements[i].checked = false\n this.references[i].checked = false\n this.checkedLicenses[i] = false\n }\n }\n\n this.submit = function () {\n // alert('this.submit: checked=' + this.references[0].checked)\n for (let i = 0; i < 6; i++) {\n this.checkedLicenses[i] = !!this.references[i].checked\n }\n }\n\n this.checkLicense = function checkLicense (statement) {\n const licenses = store.each(\n statement.why,\n store.sym('http://creativecommons.org/ns#license'),\n null,\n statement.why\n )\n // UI.log.info('licenses:' + statement.why + ': ' + licenses)\n for (let i = 0; i < licenses.length; i++) {\n for (let j = 0; j < this.checkedLicenses.length; j++) {\n if (this.checkedLicenses[j] && licenses[i].uri === licenseURI[j]) {\n return true\n // theClass += ' licOkay' // icon_expand\n // break\n }\n }\n }\n return false\n }\n return this\n}\n\n// ends\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
// This was a student project to
|
|
2
|
-
// allow the user to chose favoite CC license terms and have them highlighted
|
|
3
|
-
|
|
4
|
-
// tabulator.options becaome UI.licenseOptions
|
|
5
|
-
// Possible future alternative directoons: Store license preferences in a solid preferences file
|
|
6
|
-
import { store } from 'solid-logic'
|
|
7
|
-
|
|
8
|
-
export const licenseURI = [
|
|
9
|
-
'http://creativecommons.org/licenses/by-nc-nd/3.0/',
|
|
10
|
-
'http://creativecommons.org/licenses/by-nc-sa/3.0/',
|
|
11
|
-
'http://creativecommons.org/licenses/by-nc/3.0/',
|
|
12
|
-
'http://creativecommons.org/licenses/by-nd/3.0/',
|
|
13
|
-
'http://creativecommons.org/licenses/by-sa/3.0/',
|
|
14
|
-
'http://creativecommons.org/licenses/by/3.0/'
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
const names = ['BY-NC-ND', 'BY-NC-SA', 'BY-NC', 'BY-ND', 'BY-SA', 'BY']
|
|
18
|
-
|
|
19
|
-
export function licenseOptions () {
|
|
20
|
-
this.options = {}
|
|
21
|
-
this.references = []
|
|
22
|
-
this.checkedLicenses = []
|
|
23
|
-
|
|
24
|
-
this.openCheckBoxWindow = function () {
|
|
25
|
-
this.this.display = window.open(
|
|
26
|
-
' ',
|
|
27
|
-
'NewWin',
|
|
28
|
-
'menubar=0,location=no,status=no,directories=no,toolbar=no,scrollbars=yes,height=200,width=200'
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
let message = "<font face='arial' size='2'><form name ='checkboxes'>"
|
|
32
|
-
const lics = this.checkedLicenses
|
|
33
|
-
for (let kk = 0; kk < lics.length; kk++) {
|
|
34
|
-
message +=
|
|
35
|
-
"<input type='checkbox' name = 'n" +
|
|
36
|
-
kk +
|
|
37
|
-
"' onClick = 'tabulator.options.submit()'" + // @@ FIXME
|
|
38
|
-
(lics[kk] ? 'CHECKED' : '') +
|
|
39
|
-
' />CC: ' +
|
|
40
|
-
names[kk] +
|
|
41
|
-
'<br />'
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
message +=
|
|
45
|
-
"<br /> <a onclick='tabulator.options.selectAll()'>[Select All] </a>" // @@ FIXME
|
|
46
|
-
message += "<a onclick='tabulator.options.deselectAll()'> [Deselect All]</a>" // @@ FIXME
|
|
47
|
-
message += '</form></font>'
|
|
48
|
-
|
|
49
|
-
this.display.document.write(message)
|
|
50
|
-
|
|
51
|
-
this.display.document.close()
|
|
52
|
-
|
|
53
|
-
let i
|
|
54
|
-
for (i = 0; i < 6; i++) {
|
|
55
|
-
this.references[i] = this.this.display.document.checkboxes.elements[i]
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
this.selectAll = function () {
|
|
59
|
-
let i
|
|
60
|
-
for (i = 0; i < 6; i++) {
|
|
61
|
-
this.display.document.checkboxes.elements[i].checked = true
|
|
62
|
-
this.references[i].checked = true
|
|
63
|
-
this.checkedLicenses[i] = true
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
this.deselectAll = function () {
|
|
68
|
-
let i
|
|
69
|
-
for (i = 0; i < 6; i++) {
|
|
70
|
-
this.display.document.checkboxes.elements[i].checked = false
|
|
71
|
-
this.references[i].checked = false
|
|
72
|
-
this.checkedLicenses[i] = false
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
this.submit = function () {
|
|
77
|
-
// alert('this.submit: checked=' + this.references[0].checked)
|
|
78
|
-
for (let i = 0; i < 6; i++) {
|
|
79
|
-
this.checkedLicenses[i] = !!this.references[i].checked
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
this.checkLicense = function checkLicense (statement) {
|
|
84
|
-
const licenses = store.each(
|
|
85
|
-
statement.why,
|
|
86
|
-
store.sym('http://creativecommons.org/ns#license'),
|
|
87
|
-
null,
|
|
88
|
-
statement.why
|
|
89
|
-
)
|
|
90
|
-
// UI.log.info('licenses:' + statement.why + ': ' + licenses)
|
|
91
|
-
for (let i = 0; i < licenses.length; i++) {
|
|
92
|
-
for (let j = 0; j < this.checkedLicenses.length; j++) {
|
|
93
|
-
if (this.checkedLicenses[j] && licenses[i].uri === licenseURI[j]) {
|
|
94
|
-
return true
|
|
95
|
-
// theClass += ' licOkay' // icon_expand
|
|
96
|
-
// break
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return false
|
|
101
|
-
}
|
|
102
|
-
return this
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// ends
|