solid-ui 5.0.2-5 → 5.0.2-6
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/chunks/{ResourceActionsMenu-Bx7YWY3E.js → ResourceActionsMenu-KFMLta44.js} +53 -44
- package/dist/chunks/ResourceActionsMenu-KFMLta44.js.map +1 -0
- package/dist/chunks/{access-control-modal-B1mFFIyz.js → access-control-modal-BZdBv6VD.js} +2 -2
- package/dist/chunks/{access-control-modal-B1mFFIyz.js.map → access-control-modal-BZdBv6VD.js.map} +1 -1
- package/dist/chunks/{file-explorer-header-Djp_eFuT.js → file-explorer-header-BJzo6xDU.js} +3 -3
- package/dist/chunks/{file-explorer-header-Djp_eFuT.js.map → file-explorer-header-BJzo6xDU.js.map} +1 -1
- package/dist/chunks/square-arrow-out-up-right-DaALlpHo.js +9 -0
- package/dist/chunks/square-arrow-out-up-right-DaALlpHo.js.map +1 -0
- package/dist/chunks/{src-akaVfkuf.js → src-Cv9Lm1V-.js} +2944 -2927
- package/dist/chunks/src-Cv9Lm1V-.js.map +1 -0
- package/dist/chunks/{widgets-B1hBVhRL.js → widgets-C92ihtlF.js} +483 -487
- package/dist/chunks/widgets-C92ihtlF.js.map +1 -0
- package/dist/components/access-control-modal.js +1 -1
- package/dist/components/file-explorer-header.js +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +7 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +11 -2
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -1
- package/dist/components/resource-actions-menu.js +1 -1
- package/dist/components.js +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -8
- package/dist/lib/file-explorer/index.cjs.js +1 -1
- package/dist/lib/file-explorer/index.d.ts +1 -0
- package/dist/lib/file-explorer/index.d.ts.map +1 -1
- package/dist/lib/file-explorer/index.esm.js +2 -1
- package/dist/lib/file-explorer/pane-menu-items.cjs.js +2 -0
- package/dist/lib/file-explorer/pane-menu-items.cjs.js.map +1 -0
- package/dist/lib/file-explorer/pane-menu-items.d.ts +22 -0
- package/dist/lib/file-explorer/pane-menu-items.d.ts.map +1 -0
- package/dist/lib/file-explorer/pane-menu-items.esm.js +20 -0
- package/dist/lib/file-explorer/pane-menu-items.esm.js.map +1 -0
- package/dist/loader.js +3 -3
- package/dist/solid-ui.js +30 -24
- package/dist/solid-ui.min.js +30 -24
- package/dist/solid-ui.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/ResourceActionsMenu-Bx7YWY3E.js.map +0 -1
- package/dist/chunks/src-akaVfkuf.js.map +0 -1
- package/dist/chunks/widgets-B1hBVhRL.js.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { B as e, D as t, E as n, G as r, I as i, J as a, K as o, M as s, P as c, R as l, T as u, V as d, W as f, q as p, t as m, y as h } from "./solidLogicSingleton.esm-Bvt7E7Vl.js";
|
|
2
2
|
import { a as g, c as _, f as v, i as y, n as b, o as x, p as S, s as C, t as w, u as T } from "./style-Dlw9-wPn.js";
|
|
3
3
|
import { r as E, t as D } from "./index.esm-BQrkxchZ.js";
|
|
4
|
+
import "./square-arrow-out-up-right-DaALlpHo.js";
|
|
4
5
|
// src/lib/debug.ts
|
|
5
6
|
function O(...e) {
|
|
6
7
|
console.log(...e);
|
|
@@ -51,17 +52,17 @@ function P(e, t = 0) {
|
|
|
51
52
|
return (N[e[t + 0]] + N[e[t + 1]] + N[e[t + 2]] + N[e[t + 3]] + "-" + N[e[t + 4]] + N[e[t + 5]] + "-" + N[e[t + 6]] + N[e[t + 7]] + "-" + N[e[t + 8]] + N[e[t + 9]] + "-" + N[e[t + 10]] + N[e[t + 11]] + N[e[t + 12]] + N[e[t + 13]] + N[e[t + 14]] + N[e[t + 15]]).toLowerCase();
|
|
52
53
|
}
|
|
53
54
|
// node_modules/uuid/dist/rng.js
|
|
54
|
-
var
|
|
55
|
-
function
|
|
56
|
-
return crypto.getRandomValues(
|
|
55
|
+
var ee = /* @__PURE__ */ new Uint8Array(16);
|
|
56
|
+
function te() {
|
|
57
|
+
return crypto.getRandomValues(ee);
|
|
57
58
|
}
|
|
58
59
|
// node_modules/uuid/dist/v4.js
|
|
59
|
-
function te(e, t, n) {
|
|
60
|
-
return !t && !e && crypto.randomUUID ? crypto.randomUUID() : ne(e, t, n);
|
|
61
|
-
}
|
|
62
60
|
function ne(e, t, n) {
|
|
61
|
+
return !t && !e && crypto.randomUUID ? crypto.randomUUID() : re(e, t, n);
|
|
62
|
+
}
|
|
63
|
+
function re(e, t, n) {
|
|
63
64
|
e ||= {};
|
|
64
|
-
let r = e.random ?? e.rng?.() ??
|
|
65
|
+
let r = e.random ?? e.rng?.() ?? te();
|
|
65
66
|
if (r.length < 16) throw Error("Random bytes length must be >= 16");
|
|
66
67
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
67
68
|
if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
|
|
@@ -71,8 +72,8 @@ function ne(e, t, n) {
|
|
|
71
72
|
return P(r);
|
|
72
73
|
}
|
|
73
74
|
// node_modules/mime-db/db.json
|
|
74
|
-
var
|
|
75
|
-
|
|
75
|
+
var ie = /* @__PURE__ */ o({ default: () => ae }), ae, oe = r((() => {
|
|
76
|
+
ae = {
|
|
76
77
|
"application/1d-interleaved-parityfec": { source: "iana" },
|
|
77
78
|
"application/3gpdash-qoe-report+xml": {
|
|
78
79
|
source: "iana",
|
|
@@ -7691,9 +7692,9 @@ var re = /* @__PURE__ */ o({ default: () => ie }), ie, ae = r((() => {
|
|
|
7691
7692
|
"x-shader/x-fragment": { compressible: !0 },
|
|
7692
7693
|
"x-shader/x-vertex": { compressible: !0 }
|
|
7693
7694
|
};
|
|
7694
|
-
})), oe = /* @__PURE__ */ f(((e, t) => {
|
|
7695
|
-
t.exports = (ae(), p(re).default);
|
|
7696
7695
|
})), se = /* @__PURE__ */ f(((e, t) => {
|
|
7696
|
+
t.exports = (oe(), p(ie).default);
|
|
7697
|
+
})), ce = /* @__PURE__ */ f(((e, t) => {
|
|
7697
7698
|
function n(e) {
|
|
7698
7699
|
if (typeof e != "string") throw TypeError("Path must be a string. Received " + JSON.stringify(e));
|
|
7699
7700
|
}
|
|
@@ -7855,7 +7856,7 @@ var re = /* @__PURE__ */ o({ default: () => ie }), ie, ae = r((() => {
|
|
|
7855
7856
|
posix: null
|
|
7856
7857
|
};
|
|
7857
7858
|
a.posix = a, t.exports = a;
|
|
7858
|
-
})),
|
|
7859
|
+
})), le = /* @__PURE__ */ f(((e, t) => {
|
|
7859
7860
|
var n = {
|
|
7860
7861
|
"prs.": 100,
|
|
7861
7862
|
"x-": 200,
|
|
@@ -7879,8 +7880,8 @@ var re = /* @__PURE__ */ o({ default: () => ie }), ie, ae = r((() => {
|
|
|
7879
7880
|
let [a, o] = e.split("/"), s = n[o.replace(/(\.|x-).*/, "$1")] || n.default, c = r[t] || r.default, l = i[a] || i.default, u = 1 - e.length / 100;
|
|
7880
7881
|
return s + c + l + u;
|
|
7881
7882
|
};
|
|
7882
|
-
})),
|
|
7883
|
-
var t =
|
|
7883
|
+
})), ue = /* @__PURE__ */ a((/* @__PURE__ */ f(((e) => {
|
|
7884
|
+
var t = se(), n = ce().extname, r = le(), i = /^\s*([^;\s]*)(?:;|\s|$)/, a = /^text\//i;
|
|
7884
7885
|
e.charset = o, e.charsets = { lookup: o }, e.contentType = s, e.extension = c, e.extensions = Object.create(null), e.lookup = l, e.types = Object.create(null), e._extensionConflicts = [], u(e.extensions, e.types);
|
|
7885
7886
|
function o(e) {
|
|
7886
7887
|
if (!e || typeof e != "string") return !1;
|
|
@@ -7938,7 +7939,7 @@ var re = /* @__PURE__ */ o({ default: () => ie }), ie, ae = r((() => {
|
|
|
7938
7939
|
return e.types[c] !== "application/octet-stream" && (o > s || o === s && e.types[c]?.slice(0, 12) === "application/") || o > s ? r : i;
|
|
7939
7940
|
}
|
|
7940
7941
|
})))());
|
|
7941
|
-
function
|
|
7942
|
+
function F(e, t, n) {
|
|
7942
7943
|
let r = function(e) {
|
|
7943
7944
|
return e.split("\n").map((e) => e.trim()).filter((e) => e && e[0] !== "#");
|
|
7944
7945
|
}, i = function(e) {
|
|
@@ -7973,7 +7974,7 @@ function I(e, t, n) {
|
|
|
7973
7974
|
e || O("@@@ addTargetListeners: ele " + e), e.addEventListener("dragover", i), e.addEventListener("dragenter", a), e.addEventListener("dragleave", o), e.addEventListener("drop", s);
|
|
7974
7975
|
})(e, t);
|
|
7975
7976
|
}
|
|
7976
|
-
function
|
|
7977
|
+
function de(e, t) {
|
|
7977
7978
|
e.setAttribute("draggable", "true"), e.addEventListener("dragstart", function(n) {
|
|
7978
7979
|
e.style.fontWeight = "bold", n.dataTransfer.setData("text/uri-list", t.uri), n.dataTransfer.setData("text/plain", t.uri), n.dataTransfer.setData("text/html", e.outerHTML), O("Dragstart: " + e + " -> " + t + "de: " + n.dataTransfer.dropEffect);
|
|
7979
7980
|
}, !1), e.addEventListener("drag", function(e) {
|
|
@@ -7982,7 +7983,7 @@ function ue(e, t) {
|
|
|
7982
7983
|
e.style.fontWeight = "normal", O("Dragend dropeffect: " + n.dataTransfer.dropEffect), O("Dragend: " + e + " -> " + t);
|
|
7983
7984
|
}, !1);
|
|
7984
7985
|
}
|
|
7985
|
-
function
|
|
7986
|
+
function fe(e, t, n, r, i) {
|
|
7986
7987
|
let a = function(e, t) {
|
|
7987
7988
|
let n = t?.response?.status ?? t?.status, r = t?.message || String(t), i = `Upload failed while putting ${e}`;
|
|
7988
7989
|
return n === 413 ? `${i}: storage quota was exceeded. ${r}` : n ? `${i} (HTTP ${n}). ${r}` : `${i}. ${r}`;
|
|
@@ -7997,13 +7998,13 @@ function de(e, t, n, r, i) {
|
|
|
7997
7998
|
O(" File read byteLength : " + s.byteLength);
|
|
7998
7999
|
let l = t.type;
|
|
7999
8000
|
if (!t.type || t.type === "") {
|
|
8000
|
-
if (l =
|
|
8001
|
+
if (l = ue.lookup(t.name), !l) {
|
|
8001
8002
|
let e = "Filename needs to have an extension which gives a type we know: " + t.name;
|
|
8002
8003
|
throw O(e), alert(e), Error(e);
|
|
8003
8004
|
}
|
|
8004
8005
|
} else {
|
|
8005
|
-
let e =
|
|
8006
|
-
e && e !== "false" && !t.name.endsWith("." + e) && t.type !==
|
|
8006
|
+
let e = ue.extension(t.type);
|
|
8007
|
+
e && e !== "false" && !t.name.endsWith("." + e) && t.type !== ue.lookup(t.name) && (c = "_." + e);
|
|
8007
8008
|
}
|
|
8008
8009
|
let u = t.type.startsWith("image/") && r || n, d = u + (u.endsWith("/") ? "" : "/") + encodeURIComponent(t.name) + c;
|
|
8009
8010
|
e.webOperation("PUT", d, {
|
|
@@ -8020,28 +8021,28 @@ function de(e, t, n, r, i) {
|
|
|
8020
8021
|
}
|
|
8021
8022
|
}
|
|
8022
8023
|
// src/widgets/error.ts
|
|
8023
|
-
function
|
|
8024
|
+
function I(e, t, n, r) {
|
|
8024
8025
|
let i = e.createElement("div"), a = r || t instanceof Error ? t : null;
|
|
8025
|
-
return a ? (console.error(`errorMessageBlock: ${a} at: ${a.stack || "??"}`, a), i.textContent = a.message) : i.textContent = t, i.appendChild(
|
|
8026
|
+
return a ? (console.error(`errorMessageBlock: ${a} at: ${a.stack || "??"}`, a), i.textContent = a.message) : i.textContent = t, i.appendChild(H(e, () => {
|
|
8026
8027
|
i.parentNode && i.parentNode.removeChild(i);
|
|
8027
8028
|
})).style = w.errorCancelButton, i.setAttribute("style", w.errorMessageBlockStyle), i.style.backgroundColor = n || b.defaultErrorBackgroundColor, i;
|
|
8028
8029
|
}
|
|
8029
8030
|
// src/lib/iconBase.ts
|
|
8030
|
-
var
|
|
8031
|
+
var pe = "https://solidos.github.io/solid-ui/src", L = typeof module < "u" && module.scriptURI ? {
|
|
8031
8032
|
iconBase: module.scriptURI.slice(0, module.scriptURI.lastIndexOf("/")) + "/icons/",
|
|
8032
8033
|
originalIconBase: module.scriptURI.slice(0, module.scriptURI.lastIndexOf("/")) + "/originalIcons/"
|
|
8033
8034
|
} : typeof $SolidTestEnvironment < "u" && $SolidTestEnvironment.iconBase ? {
|
|
8034
8035
|
iconBase: $SolidTestEnvironment.iconBase,
|
|
8035
8036
|
originalIconBase: $SolidTestEnvironment.originalIconBase
|
|
8036
8037
|
} : {
|
|
8037
|
-
iconBase:
|
|
8038
|
-
originalIconBase:
|
|
8038
|
+
iconBase: pe + "/icons/",
|
|
8039
|
+
originalIconBase: pe + "/originalIcons/"
|
|
8039
8040
|
};
|
|
8040
|
-
O(" icons.iconBase is set to : " +
|
|
8041
|
-
var
|
|
8042
|
-
|
|
8041
|
+
O(" icons.iconBase is set to : " + L.iconBase);
|
|
8042
|
+
var me = L.iconBase;
|
|
8043
|
+
L.originalIconBase;
|
|
8043
8044
|
// src/widgets/peoplePicker.js
|
|
8044
|
-
var
|
|
8045
|
+
var R = /* @__PURE__ */ a(M()), z = m.store, he = class {
|
|
8045
8046
|
constructor(e, t, n, r) {
|
|
8046
8047
|
this.options = r || {}, this.element = e, this.typeIndex = t, this.groupPickedCb = n, this.selectedgroup = this.options.selectedgroup, this.onSelectGroup = this.onSelectGroup.bind(this);
|
|
8047
8048
|
}
|
|
@@ -8050,38 +8051,38 @@ var z = /* @__PURE__ */ a(M()), B = m.store, me = class {
|
|
|
8050
8051
|
if (e.style.maxWidth = "350px", e.style.minHeight = "200px", e.style.outline = "1px solid black", e.style.display = "flex", this.selectedgroup) {
|
|
8051
8052
|
e.style.flexDirection = "column";
|
|
8052
8053
|
let t = document.createElement("div");
|
|
8053
|
-
new
|
|
8054
|
+
new _e(t, this.selectedgroup).render();
|
|
8054
8055
|
let n = document.createElement("button");
|
|
8055
|
-
n.textContent = (0,
|
|
8056
|
+
n.textContent = (0, R.default)("Change group"), n.addEventListener("click", (e) => {
|
|
8056
8057
|
this.selectedgroup = null, this.render();
|
|
8057
8058
|
}), e.appendChild(t), e.appendChild(n);
|
|
8058
8059
|
} else this.findAddressBook(this.typeIndex).then(({ book: t }) => {
|
|
8059
8060
|
let n = document.createElement("button");
|
|
8060
|
-
n.textContent = (0,
|
|
8061
|
-
new
|
|
8061
|
+
n.textContent = (0, R.default)("Pick an existing group"), n.style.margin = "auto", n.addEventListener("click", (n) => {
|
|
8062
|
+
new ge(e, t, this.onSelectGroup).render();
|
|
8062
8063
|
});
|
|
8063
8064
|
let r = document.createElement("button");
|
|
8064
|
-
r.textContent = (0,
|
|
8065
|
+
r.textContent = (0, R.default)("Create a new group"), r.style.margin = "auto", r.addEventListener("click", (e) => {
|
|
8065
8066
|
this.createNewGroup(t, this.options.defaultNewGroupName).then(({ group: e }) => {
|
|
8066
|
-
new
|
|
8067
|
+
new ve(this.element, t, e, this.onSelectGroup).render();
|
|
8067
8068
|
}).catch((e) => {
|
|
8068
|
-
this.element.appendChild(
|
|
8069
|
+
this.element.appendChild(I(document, (0, R.default)(`Error creating a new group. (${e})`)));
|
|
8069
8070
|
});
|
|
8070
8071
|
}), e.appendChild(n), e.appendChild(r), this.element.innerHTML = "", this.element.appendChild(e);
|
|
8071
8072
|
}).catch((e) => {
|
|
8072
|
-
this.element.appendChild(
|
|
8073
|
+
this.element.appendChild(I(document, (0, R.default)(`Could find your groups. (${e})`)));
|
|
8073
8074
|
});
|
|
8074
8075
|
return this.element.innerHTML = "", this.element.appendChild(e), this;
|
|
8075
8076
|
}
|
|
8076
8077
|
findAddressBook(e) {
|
|
8077
8078
|
return new Promise((t, n) => {
|
|
8078
|
-
|
|
8079
|
+
z.fetcher.nowOrWhenFetched(e, (r, i) => {
|
|
8079
8080
|
if (!r) return n(i);
|
|
8080
|
-
let a =
|
|
8081
|
+
let a = z.any(null, h.solid("forClass"), h.vcard("AddressBook"));
|
|
8081
8082
|
if (!a) return n(/* @__PURE__ */ Error("no address book registered in the solid type index " + e));
|
|
8082
|
-
let o =
|
|
8083
|
+
let o = z.any(a, h.solid("instance"));
|
|
8083
8084
|
if (!o) return n(/* @__PURE__ */ Error("incomplete address book registration"));
|
|
8084
|
-
|
|
8085
|
+
z.fetcher.load(o).then(function(e) {
|
|
8085
8086
|
return t({ book: o });
|
|
8086
8087
|
}).catch(function(e) {
|
|
8087
8088
|
return n(/* @__PURE__ */ Error("Could not load address book " + e));
|
|
@@ -8090,15 +8091,15 @@ var z = /* @__PURE__ */ a(M()), B = m.store, me = class {
|
|
|
8090
8091
|
});
|
|
8091
8092
|
}
|
|
8092
8093
|
createNewGroup(e, r) {
|
|
8093
|
-
let { groupIndex: i, groupContainer: a } =
|
|
8094
|
+
let { groupIndex: i, groupContainer: a } = Se(e), o = n(`${a.uri}${ne().slice(0, 8)}.ttl#this`), s = r || "Untitled Group", c = [o.doc(), i].map((n) => {
|
|
8094
8095
|
let r = t(o, h.rdf("type"), h.vcard("Group"), n), a = t(o, h.vcard("fn"), s, o.doc(), n), c = t(e, h.vcard("includesGroup"), o, n), l = n.equals(i) ? [
|
|
8095
8096
|
r,
|
|
8096
8097
|
a,
|
|
8097
8098
|
c
|
|
8098
8099
|
] : [r, a];
|
|
8099
|
-
return
|
|
8100
|
+
return xe(n.uri, { toIns: l }).then(() => {
|
|
8100
8101
|
l.forEach((e) => {
|
|
8101
|
-
|
|
8102
|
+
z.add(e);
|
|
8102
8103
|
});
|
|
8103
8104
|
});
|
|
8104
8105
|
});
|
|
@@ -8109,7 +8110,7 @@ var z = /* @__PURE__ */ a(M()), B = m.store, me = class {
|
|
|
8109
8110
|
onSelectGroup(e) {
|
|
8110
8111
|
this.selectedgroup = e, this.groupPickedCb(e), this.render();
|
|
8111
8112
|
}
|
|
8112
|
-
},
|
|
8113
|
+
}, ge = class {
|
|
8113
8114
|
constructor(e, t, n) {
|
|
8114
8115
|
this.element = e, this.book = t, this.onSelectGroup = n;
|
|
8115
8116
|
}
|
|
@@ -8118,16 +8119,16 @@ var z = /* @__PURE__ */ a(M()), B = m.store, me = class {
|
|
|
8118
8119
|
let t = document.createElement("div");
|
|
8119
8120
|
t.style.display = "flex", t.style.flexDirection = "column", e.forEach((e) => {
|
|
8120
8121
|
let n = document.createElement("button");
|
|
8121
|
-
n.addEventListener("click", this.handleClickGroup(e)), new
|
|
8122
|
+
n.addEventListener("click", this.handleClickGroup(e)), new _e(n, e).render(), t.appendChild(n);
|
|
8122
8123
|
}), this.element.innerHTML = "", this.element.appendChild(t);
|
|
8123
8124
|
}).catch((e) => {
|
|
8124
|
-
this.element.appendChild(
|
|
8125
|
+
this.element.appendChild(I(document, (0, R.default)(`There was an error loading your groups. (${e})`)));
|
|
8125
8126
|
}), this;
|
|
8126
8127
|
}
|
|
8127
8128
|
loadGroups() {
|
|
8128
8129
|
return new Promise((e, t) => {
|
|
8129
|
-
let { groupIndex: n } =
|
|
8130
|
-
|
|
8130
|
+
let { groupIndex: n } = Se(this.book);
|
|
8131
|
+
z.fetcher.nowOrWhenFetched(n, (n, r) => n ? e(z.each(this.book, h.vcard("includesGroup"))) : t(r));
|
|
8131
8132
|
});
|
|
8132
8133
|
}
|
|
8133
8134
|
handleClickGroup(e) {
|
|
@@ -8135,15 +8136,15 @@ var z = /* @__PURE__ */ a(M()), B = m.store, me = class {
|
|
|
8135
8136
|
this.onSelectGroup(e);
|
|
8136
8137
|
};
|
|
8137
8138
|
}
|
|
8138
|
-
},
|
|
8139
|
+
}, _e = class {
|
|
8139
8140
|
constructor(e, t) {
|
|
8140
8141
|
this.element = e, this.group = t;
|
|
8141
8142
|
}
|
|
8142
8143
|
render() {
|
|
8143
8144
|
let e = document.createElement("div");
|
|
8144
|
-
return e.textContent = (0,
|
|
8145
|
+
return e.textContent = (0, R.default)(be(this.group, h.vcard("fn"), `[${this.group.value}]`)), this.element.innerHTML = "", this.element.appendChild(e), this;
|
|
8145
8146
|
}
|
|
8146
|
-
},
|
|
8147
|
+
}, ve = class {
|
|
8147
8148
|
constructor(e, t, n, r, i) {
|
|
8148
8149
|
this.element = e, this.book = t, this.group = n, this.onGroupChanged = (e, t, n) => {
|
|
8149
8150
|
i && i(e, t, n);
|
|
@@ -8152,120 +8153,115 @@ var z = /* @__PURE__ */ a(M()), B = m.store, me = class {
|
|
|
8152
8153
|
refresh() {}
|
|
8153
8154
|
render() {
|
|
8154
8155
|
let e = document.createElement("div");
|
|
8155
|
-
e.style.maxWidth = "350px", e.style.minHeight = "200px", e.style.outline = "1px solid black", e.style.display = "flex", e.style.flexDirection = "column",
|
|
8156
|
+
e.style.maxWidth = "350px", e.style.minHeight = "200px", e.style.outline = "1px solid black", e.style.display = "flex", e.style.flexDirection = "column", F(e, (e) => {
|
|
8156
8157
|
e.forEach((e) => {
|
|
8157
8158
|
this.add(e).catch((e) => {
|
|
8158
|
-
this.element.appendChild(
|
|
8159
|
+
this.element.appendChild(I(document, (0, R.default)(`Could not add the given WebId. (${e})`)));
|
|
8159
8160
|
});
|
|
8160
8161
|
});
|
|
8161
8162
|
});
|
|
8162
8163
|
let t = document.createElement("input");
|
|
8163
|
-
t.type = "text", t.value =
|
|
8164
|
+
t.type = "text", t.value = be(this.group, h.vcard("fn"), "Untitled Group"), t.addEventListener("change", (e) => {
|
|
8164
8165
|
this.setGroupName(e.target.value).catch((e) => {
|
|
8165
|
-
this.element.appendChild(
|
|
8166
|
+
this.element.appendChild(I(document, `Error changing group name. (${e})`));
|
|
8166
8167
|
});
|
|
8167
8168
|
});
|
|
8168
8169
|
let n = document.createElement("label");
|
|
8169
|
-
if (n.textContent = (0,
|
|
8170
|
+
if (n.textContent = (0, R.default)("Group Name:"), n.appendChild(t), e.appendChild(n), z.any(this.group, h.vcard("hasMember"))) z.match(this.group, h.vcard("hasMember")).forEach((t) => {
|
|
8170
8171
|
let n = t.object, r = document.createElement("div");
|
|
8171
|
-
new
|
|
8172
|
+
new ye(r, n, this.handleRemove(n)).render(), e.appendChild(r);
|
|
8172
8173
|
});
|
|
8173
8174
|
else {
|
|
8174
8175
|
let t = document.createElement("p");
|
|
8175
|
-
t.textContent =
|
|
8176
|
+
t.textContent = R.default`
|
|
8176
8177
|
To add someone to this group, drag and drop their WebID URL onto the box.
|
|
8177
8178
|
`, e.appendChild(t);
|
|
8178
8179
|
}
|
|
8179
8180
|
let r = document.createElement("button");
|
|
8180
|
-
return r.textContent = (0,
|
|
8181
|
+
return r.textContent = (0, R.default)("Done"), r.addEventListener("click", (e) => {
|
|
8181
8182
|
this.doneBuildingCb(this.group);
|
|
8182
8183
|
}), e.appendChild(r), this.element.innerHTML = "", this.element.appendChild(e), this;
|
|
8183
8184
|
}
|
|
8184
8185
|
add(e) {
|
|
8185
8186
|
return new Promise((t, r) => {
|
|
8186
|
-
|
|
8187
|
+
z.fetcher.nowOrWhenFetched(e, (i, a) => {
|
|
8187
8188
|
if (!i) return this.onGroupChanged(a), r(a);
|
|
8188
|
-
let o = n(e), s =
|
|
8189
|
+
let o = n(e), s = z.any(o, h.rdf("type"));
|
|
8189
8190
|
return !s || !s.equals(h.foaf("Person")) ? r(/* @__PURE__ */ Error(`Only people supported right now. (tried to add something of type ${s.value})`)) : t(o);
|
|
8190
8191
|
});
|
|
8191
8192
|
}).then((e) => {
|
|
8192
8193
|
let n = t(this.group, h.vcard("hasMember"), e);
|
|
8193
|
-
return
|
|
8194
|
-
n.why = this.group.doc(),
|
|
8194
|
+
return z.holdsStatement(n) ? e : xe(this.group.doc().uri, { toIns: [n] }).then(() => {
|
|
8195
|
+
n.why = this.group.doc(), z.add(n), this.onGroupChanged(null, "added", e), this.render();
|
|
8195
8196
|
});
|
|
8196
8197
|
});
|
|
8197
8198
|
}
|
|
8198
8199
|
handleRemove(e) {
|
|
8199
8200
|
return (n) => {
|
|
8200
8201
|
let r = t(this.group, h.vcard("hasMember"), e);
|
|
8201
|
-
return
|
|
8202
|
-
let n =
|
|
8202
|
+
return xe(this.group.doc().uri, { toDel: [r] }).then(() => (z.remove(r), this.onGroupChanged(null, "removed", e), this.render(), !0)).catch((t) => {
|
|
8203
|
+
let n = z.any(e, h.foaf("name")), r = n && n.value ? `Could not remove ${n.value}. (${t})` : `Could not remove ${e.value}. (${t})`;
|
|
8203
8204
|
throw Error(r);
|
|
8204
8205
|
});
|
|
8205
8206
|
};
|
|
8206
8207
|
}
|
|
8207
8208
|
setGroupName(e) {
|
|
8208
|
-
let { groupIndex: n } =
|
|
8209
|
-
let r =
|
|
8210
|
-
return
|
|
8209
|
+
let { groupIndex: n } = Se(this.book), r = [this.group.doc(), n].map((n) => {
|
|
8210
|
+
let r = z.match(this.group, h.vcard("fn"), null, n), i = t(this.group, h.vcard("fn"), u(e));
|
|
8211
|
+
return xe(n.value, {
|
|
8211
8212
|
toDel: r,
|
|
8212
8213
|
toIns: [i]
|
|
8213
8214
|
}).then((e) => {
|
|
8214
|
-
|
|
8215
|
+
z.removeStatements(r), i.why = n, z.add(i);
|
|
8215
8216
|
});
|
|
8216
8217
|
});
|
|
8217
8218
|
return Promise.all(r);
|
|
8218
8219
|
}
|
|
8219
|
-
},
|
|
8220
|
+
}, ye = class {
|
|
8220
8221
|
constructor(e, t, n) {
|
|
8221
8222
|
this.webIdNode = t, this.element = e, this.handleRemove = n;
|
|
8222
8223
|
}
|
|
8223
8224
|
render() {
|
|
8224
8225
|
let e = document.createElement("div");
|
|
8225
8226
|
e.style.display = "flex";
|
|
8226
|
-
let t =
|
|
8227
|
-
n.src = (0,
|
|
8228
|
-
let r =
|
|
8229
|
-
i.innerHTML = (0,
|
|
8227
|
+
let t = be(this.webIdNode, h.foaf("img"), me + "noun_15059.svg"), n = document.createElement("img");
|
|
8228
|
+
n.src = (0, R.default)(t), n.width = "50", n.height = "50", n.style.margin = "5px";
|
|
8229
|
+
let r = be(this.webIdNode, h.foaf("name"), `[${this.webIdNode}]`), i = document.createElement("span");
|
|
8230
|
+
i.innerHTML = (0, R.default)(r), i.style.flexGrow = "1", i.style.margin = "auto 0";
|
|
8230
8231
|
let a = document.createElement("button");
|
|
8231
8232
|
return a.textContent = "Remove", a.addEventListener("click", (e) => this.handleRemove().catch((e) => {
|
|
8232
|
-
this.element.appendChild(
|
|
8233
|
+
this.element.appendChild(I(document, (0, R.default)(`${e}`)));
|
|
8233
8234
|
})), a.style.margin = "5px", e.appendChild(n), e.appendChild(i), e.appendChild(a), this.element.innerHTML = "", this.element.appendChild(e), this;
|
|
8234
8235
|
}
|
|
8235
8236
|
};
|
|
8236
|
-
function
|
|
8237
|
-
let r =
|
|
8237
|
+
function be(e, t, n) {
|
|
8238
|
+
let r = z.any(e, t);
|
|
8238
8239
|
return r ? r.value : n;
|
|
8239
8240
|
}
|
|
8240
|
-
function
|
|
8241
|
+
function xe(e, { toDel: t, toIns: n }) {
|
|
8241
8242
|
return new Promise((e, r) => {
|
|
8242
|
-
|
|
8243
|
+
z.updater.update(t, n, (t, n, i) => {
|
|
8243
8244
|
if (!n) return r(/* @__PURE__ */ Error(`PATCH failed for resource <${t}>: ${i}`));
|
|
8244
8245
|
e();
|
|
8245
8246
|
});
|
|
8246
8247
|
});
|
|
8247
8248
|
}
|
|
8248
|
-
function
|
|
8249
|
+
function Se(e) {
|
|
8249
8250
|
return {
|
|
8250
|
-
groupIndex:
|
|
8251
|
-
groupContainer:
|
|
8251
|
+
groupIndex: z.any(e, h.vcard("groupIndex")),
|
|
8252
|
+
groupContainer: z.sym(e.dir().uri + "Group/")
|
|
8252
8253
|
};
|
|
8253
8254
|
}
|
|
8254
8255
|
// src/lib/newperson.js
|
|
8255
|
-
var
|
|
8256
|
+
var Ce = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjAxNTcgOS4yNzM2M0MxNC4yOTU0IDguMzQwMzEgMTUuMTI4OCA2LjgyOTg0IDE1LjEyODggNS4xMjgyQzE1LjEyODggMi4zMDA1MSAxMi44MjgzIDAgMTAuMDAwNiAwQzcuMTcyODkgMCA0Ljg3MjM4IDIuMzAwNTEgNC44NzIzOCA1LjEyODJDNC44NzIzOCA2LjgyOTg0IDUuNzA1NyA4LjM0MDMxIDYuOTg1NDcgOS4yNzM2M0MzLjgwNDIyIDEwLjQ5MSAxLjUzOTA2IDEzLjU3NTQgMS41MzkwNiAxNy4xNzk1QzEuNTM5MDYgMTguNzM0NyAyLjgwNDM0IDIwIDQuMzU5NTcgMjBIMTUuNjQxNkMxNy4xOTY4IDIwIDE4LjQ2MjEgMTguNzM0NyAxOC40NjIxIDE3LjE3OTVDMTguNDYyMSAxMy41NzU0IDE2LjE5NyAxMC40OTEgMTMuMDE1NyA5LjI3MzYzWk02LjQxMDg2IDUuMTI4MkM2LjQxMDg2IDMuMTQ4ODMgOC4wMjEyMSAxLjUzODQ4IDEwLjAwMDYgMS41Mzg0OEMxMS45OCAxLjUzODQ4IDEzLjU5MDMgMy4xNDg4MyAxMy41OTAzIDUuMTI4MkMxMy41OTAzIDcuMTA3NTggMTEuOTggOC43MTc5NyAxMC4wMDA2IDguNzE3OTdDOC4wMjEyMSA4LjcxNzk3IDYuNDEwODYgNy4xMDc1OCA2LjQxMDg2IDUuMTI4MlpNMTUuNjQxNiAxOC40NjE1SDQuMzU5NTdDMy42NTI2NiAxOC40NjE1IDMuMDc3NTQgMTcuODg2NCAzLjA3NzU0IDE3LjE3OTVDMy4wNzc1NCAxMy4zNjIgNi4xODMxNiAxMC4yNTY0IDEwLjAwMDYgMTAuMjU2NEMxMy44MTgxIDEwLjI1NjQgMTYuOTIzNyAxMy4zNjIgMTYuOTIzNyAxNy4xNzk1QzE2LjkyMzcgMTcuODg2NCAxNi4zNDg2IDE4LjQ2MTUgMTUuNjQxNiAxOC40NjE1WiIgZmlsbD0iIzMxNDE1OCIvPgo8L3N2Zz4K", we = (e, t, n) => {
|
|
8256
8257
|
let r = e.createElement("tr");
|
|
8257
8258
|
return r.appendChild(e.createElement("td")).appendChild(t), r.subject = n, r;
|
|
8258
|
-
},
|
|
8259
|
+
}, Te = (e, t) => {
|
|
8259
8260
|
e.addEventListener("click", t);
|
|
8260
|
-
},
|
|
8261
|
+
}, Ee = (e, t, n) => {
|
|
8261
8262
|
let r = t.appendChild(e.createElement("div"));
|
|
8262
8263
|
r.setAttribute("style", w.imageDivStyle), r.appendChild(n), n.setAttribute("draggable", "false");
|
|
8263
|
-
}, Ee = class extends HTMLElement {
|
|
8264
|
-
constructor() {
|
|
8265
|
-
super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6m10 0l-9 9m3-9h6v6\"/></svg>";
|
|
8266
|
-
}
|
|
8267
8264
|
};
|
|
8268
|
-
customElements.get("icon-lucide-square-arrow-out-up-right") || customElements.define("icon-lucide-square-arrow-out-up-right", Ee);
|
|
8269
8265
|
// src/widgets/buttons/iconLinks.ts
|
|
8270
8266
|
function De(e, t, n) {
|
|
8271
8267
|
let r = e.createElement("a");
|
|
@@ -8282,7 +8278,7 @@ function De(e, t, n) {
|
|
|
8282
8278
|
var Oe = (e, t, n) => {
|
|
8283
8279
|
let r = De(e, n);
|
|
8284
8280
|
t.appendChild(r).classList.add("HoverControlHide"), t.appendChild(e.createElement("br"));
|
|
8285
|
-
}, { iconBase:
|
|
8281
|
+
}, { iconBase: B } = L, ke = B + "noun_1180156.svg", Ae = B + "noun_1180158.svg";
|
|
8286
8282
|
function je(e) {
|
|
8287
8283
|
let t = e && e.statusArea || e && e.div || null;
|
|
8288
8284
|
if (t) return t;
|
|
@@ -8296,7 +8292,7 @@ function je(e) {
|
|
|
8296
8292
|
function Me(e, t) {
|
|
8297
8293
|
if (!t) return;
|
|
8298
8294
|
let n = je(e);
|
|
8299
|
-
O("Complaint: " + t), n ? n.appendChild(
|
|
8295
|
+
O("Complaint: " + t), n ? n.appendChild(I(e && e.dom || document, t)) : alert(t);
|
|
8300
8296
|
}
|
|
8301
8297
|
function Ne(e) {
|
|
8302
8298
|
for (; e.firstChild;) e.removeChild(e.firstChild);
|
|
@@ -8365,9 +8361,9 @@ var Ve = {
|
|
|
8365
8361
|
"solid:Pod": "noun_Cabinet_1434380.svg",
|
|
8366
8362
|
"vcard:Group": "noun_339237.svg",
|
|
8367
8363
|
"vcard:Organization": "noun_143899.svg",
|
|
8368
|
-
"vcard:Individual":
|
|
8369
|
-
"schema:Person":
|
|
8370
|
-
"foaf:Person":
|
|
8364
|
+
"vcard:Individual": Ce,
|
|
8365
|
+
"schema:Person": Ce,
|
|
8366
|
+
"foaf:Person": Ce,
|
|
8371
8367
|
"foaf:Agent": "noun_98053.svg",
|
|
8372
8368
|
"acl:AuthenticatedAgent": "noun_99101.svg",
|
|
8373
8369
|
"prov:SoftwareAgent": "noun_Robot_849764.svg",
|
|
@@ -8392,11 +8388,11 @@ function He(e) {
|
|
|
8392
8388
|
return r < 0 ? t.slice(0) + "/" : t.slice(0, r + 1);
|
|
8393
8389
|
}
|
|
8394
8390
|
function Ue(e) {
|
|
8395
|
-
let t =
|
|
8391
|
+
let t = B;
|
|
8396
8392
|
return typeof e != "string" && e.uri ? e.uri.split("/").length === 4 && !e.uri.split("/")[1] && !e.uri.split("/")[3] ? t + "noun_15177.svg" : e.uri.startsWith("message:") || e.uri.startsWith("mid:") ? t + "noun_480183.svg" : e.uri.startsWith("mailto:") ? t + "noun_567486.svg" : e.uri.startsWith("https:") && e.uri.indexOf("#") < 0 ? He(e) + "favicon.ico" : null : t + "noun_10636_grey.svg";
|
|
8397
8393
|
}
|
|
8398
8394
|
function We(e) {
|
|
8399
|
-
let t = E, n =
|
|
8395
|
+
let t = E, n = B;
|
|
8400
8396
|
if (e.sameTerm(h.foaf("Agent")) || e.sameTerm(h.rdf("Resource"))) return n + "noun_98053.svg";
|
|
8401
8397
|
let r = t.any(e, h.sioc("avatar")) || t.any(e, h.foaf("img")) || t.any(e, h.vcard("logo")) || t.any(e, h.vcard("hasPhoto")) || t.any(e, h.vcard("photo")) || t.any(e, h.foaf("depiction"));
|
|
8402
8398
|
return r ? r.uri : null;
|
|
@@ -8410,13 +8406,13 @@ function Ge(e, t, n) {
|
|
|
8410
8406
|
if (o) return e.setAttribute("src", o), !0;
|
|
8411
8407
|
let s = r.findTypeURIs(t);
|
|
8412
8408
|
for (let t in s) if (n[t]) return e.setAttribute("src", n[t]), !1;
|
|
8413
|
-
return e.setAttribute("src",
|
|
8409
|
+
return e.setAttribute("src", B + "noun_10636_grey.svg"), !1;
|
|
8414
8410
|
}
|
|
8415
8411
|
function Ke(e, t) {
|
|
8416
8412
|
let n = E, r = {};
|
|
8417
8413
|
for (let e in Ve) {
|
|
8418
8414
|
let t = e.split(":")[0], n = e.split(":")[1], i = h[t](n), a = Ve[e];
|
|
8419
|
-
a.startsWith("data:") ? r[i.uri] = a : r[i.uri] = l(a,
|
|
8415
|
+
a.startsWith("data:") ? r[i.uri] = a : r[i.uri] = l(a, B);
|
|
8420
8416
|
}
|
|
8421
8417
|
if (!Ge(e, t, r) && t.uri) {
|
|
8422
8418
|
if (!n.fetcher) throw Error("kb has no fetcher");
|
|
@@ -8427,7 +8423,7 @@ function Ke(e, t) {
|
|
|
8427
8423
|
}
|
|
8428
8424
|
function qe(e, t) {
|
|
8429
8425
|
let n = e.createElement("img");
|
|
8430
|
-
if (n.style = w.iconStyle, n.setAttribute("src",
|
|
8426
|
+
if (n.style = w.iconStyle, n.setAttribute("src", B + (function(e) {
|
|
8431
8427
|
if (!e.uri) return !1;
|
|
8432
8428
|
let t = e.uri.split("/");
|
|
8433
8429
|
return t.length === 3 || t.length === 4 && t[3] === "";
|
|
@@ -8453,16 +8449,16 @@ function Je(e, t, n, r, i) {
|
|
|
8453
8449
|
c.style.gridColumn = "1/2", c.style.gridRow = "1";
|
|
8454
8450
|
let l = e.createElement("div");
|
|
8455
8451
|
l.style.gridColumn = "1/2", l.style.gridRow = "2";
|
|
8456
|
-
let u =
|
|
8452
|
+
let u = H(e, a);
|
|
8457
8453
|
s.appendChild(u), u.style.gridColumn = "1", u.style.gridRow = "2";
|
|
8458
8454
|
let d = s.appendChild(e.createElement("button"));
|
|
8459
8455
|
d.style.cssText = w.buttonStyle, d.style.gridRow = "2", d.style.gridColumn = "2", d.textContent = "Cancel";
|
|
8460
|
-
let f =
|
|
8456
|
+
let f = V(e, L.iconBase + "noun_925021.svg", "Delete it");
|
|
8461
8457
|
s.appendChild(f), f.style.gridRow = "1", f.style.gridColumn = "1";
|
|
8462
8458
|
let p = s.appendChild(e.createElement("button"));
|
|
8463
8459
|
return p.style.cssText = w.buttonStyle, p.style.gridRow = "1", p.style.gridColumn = "2", p.textContent = n, s.appendChild(p), f.addEventListener("click", o), p.addEventListener("click", o), d.addEventListener("click", a), s;
|
|
8464
8460
|
}
|
|
8465
|
-
function
|
|
8461
|
+
function Ye(e, t, n, r, i) {
|
|
8466
8462
|
function a() {
|
|
8467
8463
|
let n = "button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", a = [];
|
|
8468
8464
|
if (i) for (let e = t; e; e = e.parentElement) {
|
|
@@ -8494,14 +8490,14 @@ function H(e, t, n, r, i) {
|
|
|
8494
8490
|
let u = Je(e, l, c, r, o);
|
|
8495
8491
|
l.appendChild(u), i && (u.style.position = "static", u.style.top = "", Array.from(u.querySelectorAll("button")).find((e) => e.textContent === "Cancel")?.focus());
|
|
8496
8492
|
}
|
|
8497
|
-
let o =
|
|
8493
|
+
let o = B + "noun_2188_red.svg", s = e.createElement("img");
|
|
8498
8494
|
s.setAttribute("src", o), s.tabIndex = 0, s.setAttribute("role", "button"), s.setAttribute("style", w.smallButtonStyle), s.style.float = "right";
|
|
8499
8495
|
let c = "Remove this " + n;
|
|
8500
8496
|
return s.title = c, s.setAttribute("aria-label", c), s.classList.add("hoverControlHide"), s.addEventListener("click", a), s.addEventListener("keydown", (e) => {
|
|
8501
8497
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), s.click());
|
|
8502
8498
|
}), t.classList.add("hoverControl"), t.appendChild(s), s.setAttribute("data-testid", "deleteButtonWithCheck"), s;
|
|
8503
8499
|
}
|
|
8504
|
-
function
|
|
8500
|
+
function V(e, t, n, r, i = {
|
|
8505
8501
|
buttonColor: "Primary",
|
|
8506
8502
|
needsBorder: !1
|
|
8507
8503
|
}) {
|
|
@@ -8516,14 +8512,14 @@ function U(e, t, n, r, i = {
|
|
|
8516
8512
|
}, i.buttonColor === "Secondary" ? i.needsBorder ? a.setAttribute("style", w.secondaryButtonNoBorder) : a.setAttribute("style", w.secondaryButton) : i.needsBorder ? a.setAttribute("style", w.primaryButtonNoBorder) : a.setAttribute("style", w.primaryButton);
|
|
8517
8513
|
return r && a.addEventListener("click", r, !1), a;
|
|
8518
8514
|
}
|
|
8519
|
-
function
|
|
8520
|
-
let n =
|
|
8515
|
+
function H(e, t) {
|
|
8516
|
+
let n = V(e, ke, "Cancel", t);
|
|
8521
8517
|
return n.firstChild && (n.firstChild.style.opacity = "0.3"), n;
|
|
8522
8518
|
}
|
|
8523
|
-
function
|
|
8524
|
-
return
|
|
8519
|
+
function Xe(e, t) {
|
|
8520
|
+
return V(e, Ae, "Continue", t);
|
|
8525
8521
|
}
|
|
8526
|
-
function
|
|
8522
|
+
function Ze(e, t, n, r, i, a) {
|
|
8527
8523
|
return new Promise(function(t, o) {
|
|
8528
8524
|
let s = e.createElement("div");
|
|
8529
8525
|
r ||= h.foaf("name"), a ||= i ? T(i) : " ";
|
|
@@ -8536,15 +8532,15 @@ function Xe(e, t, n, r, i, a) {
|
|
|
8536
8532
|
}
|
|
8537
8533
|
l.addEventListener("keyup", function(e) {
|
|
8538
8534
|
e.keyCode === 13 && u();
|
|
8539
|
-
}, !1), s.appendChild(e.createElement("br")), s.appendChild(
|
|
8535
|
+
}, !1), s.appendChild(e.createElement("br")), s.appendChild(H(e, function(e) {
|
|
8540
8536
|
s.parentNode.removeChild(s), t(null);
|
|
8541
|
-
})), s.appendChild(
|
|
8537
|
+
})), s.appendChild(Xe(e, function(e) {
|
|
8542
8538
|
u();
|
|
8543
8539
|
})), l.focus();
|
|
8544
8540
|
});
|
|
8545
8541
|
}
|
|
8546
|
-
var
|
|
8547
|
-
function
|
|
8542
|
+
var Qe = $e;
|
|
8543
|
+
function $e(e, t, n, r) {
|
|
8548
8544
|
let i = e.createElement("tr");
|
|
8549
8545
|
r ||= {};
|
|
8550
8546
|
let a = i.appendChild(e.createElement("td")), o = i.appendChild(e.createElement("td")), s = i.appendChild(e.createElement("td")), c = r.image || qe(e, n);
|
|
@@ -8564,25 +8560,25 @@ function Qe(e, t, n, r) {
|
|
|
8564
8560
|
n.setAttribute("style", "font-size: 90%; opacity: 0.8;"), typeof t == "string" ? n.textContent = t : n.appendChild(t);
|
|
8565
8561
|
}
|
|
8566
8562
|
}
|
|
8567
|
-
return r.deleteFunction &&
|
|
8563
|
+
return r.deleteFunction && Ye(e, s, r.noun || "one", r.deleteFunction, r.confirmationContainer), n.uri && (r.link !== !1 && (s.appendChild(De(e, n)).classList.add("HoverControlHide"), s.appendChild(e.createElement("br"))), r.draggable !== !1 && (c.setAttribute("draggable", "false"), de(i, n))), i.subject = n, i;
|
|
8568
8564
|
}
|
|
8569
|
-
function
|
|
8565
|
+
function et(e, t, n, r) {
|
|
8570
8566
|
let i = t.appendChild(e.createElement("div"));
|
|
8571
8567
|
n ? i.textContent = n : ze(i, r);
|
|
8572
8568
|
}
|
|
8573
|
-
function
|
|
8569
|
+
function tt(e, t, n, r) {
|
|
8574
8570
|
let i = t.appendChild(e.createElement("div"));
|
|
8575
|
-
i.setAttribute("style", w.linkDivStyle), r.deleteFunction &&
|
|
8571
|
+
i.setAttribute("style", w.linkDivStyle), r.deleteFunction && Ye(e, i, r.noun || "one", r.deleteFunction, r.confirmationContainer), n.uri && (r.link !== !1 && Oe(e, i, n), de(t, n));
|
|
8576
8572
|
}
|
|
8577
|
-
function
|
|
8573
|
+
function nt(e, t, n) {
|
|
8578
8574
|
let r = e.createElement("div");
|
|
8579
|
-
return r.setAttribute("style", w.renderAsDivStyle), n ||= {},
|
|
8575
|
+
return r.setAttribute("style", w.renderAsDivStyle), n ||= {}, Ee(e, r, n.image || qe(e, t)), et(e, r, n.title, t), tt(e, r, t, n), n.clickable && n.onClickFunction && Te(r, n.onClickFunction), n.wrapInATR ? we(e, r, t) : r;
|
|
8580
8576
|
}
|
|
8581
|
-
function
|
|
8577
|
+
function rt(e) {
|
|
8582
8578
|
if (e.refresh) e.refresh();
|
|
8583
|
-
else for (let t = 0; t < e.children.length; t++)
|
|
8579
|
+
else for (let t = 0; t < e.children.length; t++) rt(e.children[t]);
|
|
8584
8580
|
}
|
|
8585
|
-
function
|
|
8581
|
+
function it(e, r, i, a = {}) {
|
|
8586
8582
|
let o = /* @__PURE__ */ new Set(), s = !!(a.renderSupportingInfo || a.renderNameSuffix), c = a.refreshOnDocumentLoad ?? !0, l = function(e) {
|
|
8587
8583
|
let n = b.updater;
|
|
8588
8584
|
if (!n) throw Error("kb has no updater");
|
|
@@ -8600,7 +8596,7 @@ function rt(e, r, i, a = {}) {
|
|
|
8600
8596
|
}
|
|
8601
8597
|
return g && (r.deleteFunction = function() {
|
|
8602
8598
|
return l(n);
|
|
8603
|
-
}),
|
|
8599
|
+
}), Qe(e, v, t, r);
|
|
8604
8600
|
}
|
|
8605
8601
|
let d = function() {
|
|
8606
8602
|
let e = b.each(r, v);
|
|
@@ -8619,7 +8615,7 @@ function rt(e, r, i, a = {}) {
|
|
|
8619
8615
|
});
|
|
8620
8616
|
}
|
|
8621
8617
|
function p(e) {
|
|
8622
|
-
|
|
8618
|
+
fe(b.fetcher, e, a.uploadFolder?.uri, a.uploadFolder?.uri, function(e, n) {
|
|
8623
8619
|
let i = [t(r, v, b.sym(n), m)];
|
|
8624
8620
|
if (!b.updater) throw Error("kb has no updater");
|
|
8625
8621
|
b.updater.update([], i, function(e, t, n, r) {
|
|
@@ -8629,30 +8625,30 @@ function rt(e, r, i, a = {}) {
|
|
|
8629
8625
|
}
|
|
8630
8626
|
let m = a.doc || r.doc();
|
|
8631
8627
|
a.modify === void 0 && (a.modify = !0);
|
|
8632
|
-
let g = a.modify, _ = a.promptIcon ||
|
|
8628
|
+
let g = a.modify, _ = a.promptIcon || B + "noun_748003.svg", v = a.predicate || h.wf("attachment"), y = a.noun || "attachment", b = E, x = i.appendChild(e.createElement("table"));
|
|
8633
8629
|
x.setAttribute("style", "margin-top: 1em; margin-bottom: 1em;");
|
|
8634
8630
|
let S = x.appendChild(e.createElement("tr")), w = S.appendChild(e.createElement("td")), T = S.appendChild(e.createElement("td")).appendChild(e.createElement("table"));
|
|
8635
8631
|
if (T.appendChild(e.createElement("tr")), x.refresh = d, d(), g) {
|
|
8636
|
-
let t =
|
|
8632
|
+
let t = V(e, _, "Drop attachments here");
|
|
8637
8633
|
w.appendChild(t);
|
|
8638
8634
|
let n = a.uploadFolder ? p : null;
|
|
8639
|
-
|
|
8635
|
+
F(t, f, n);
|
|
8640
8636
|
let r = t.querySelector("img");
|
|
8641
|
-
if (r &&
|
|
8642
|
-
let t =
|
|
8637
|
+
if (r && F(r, f, n), F(w, f, n), a.uploadFolder) {
|
|
8638
|
+
let t = xt(e, p);
|
|
8643
8639
|
w.appendChild(t);
|
|
8644
8640
|
}
|
|
8645
8641
|
}
|
|
8646
8642
|
return x;
|
|
8647
8643
|
}
|
|
8648
|
-
function
|
|
8644
|
+
function at(e) {
|
|
8649
8645
|
e.preventDefault(), e.stopPropagation();
|
|
8650
8646
|
let t = g(e).getAttribute("href");
|
|
8651
8647
|
if (!t) return O("openHrefInOutlineMode: No href found!\n");
|
|
8652
8648
|
let n = window.document;
|
|
8653
8649
|
n.outlineManager ? n.outlineManager.GotoSubject(E.sym(t), !0, void 0, !0, void 0) : window && window.panes && window.panes.getOutliner ? window.panes.getOutliner().GotoSubject(E.sym(t), !0, void 0, !0, void 0) : O("ERROR: Can't access outline manager in this config");
|
|
8654
8650
|
}
|
|
8655
|
-
function
|
|
8651
|
+
function ot(e) {
|
|
8656
8652
|
if (e.uri === void 0) return;
|
|
8657
8653
|
let t = e.uri;
|
|
8658
8654
|
if (t.slice(0, 7) !== "http://") return;
|
|
@@ -8666,7 +8662,7 @@ function at(e) {
|
|
|
8666
8662
|
}
|
|
8667
8663
|
return E.sym("http://tabulator.org/wiki/annnotation/" + t);
|
|
8668
8664
|
}
|
|
8669
|
-
function
|
|
8665
|
+
function st() {
|
|
8670
8666
|
let e = {};
|
|
8671
8667
|
return E.statementsMatching(void 0, h.rdf("type"), void 0).forEach(function(t) {
|
|
8672
8668
|
t.object.value && (e[t.object.value] = !0);
|
|
@@ -8676,7 +8672,7 @@ function ot() {
|
|
|
8676
8672
|
t.value && (e[t.value] = !0);
|
|
8677
8673
|
}), e;
|
|
8678
8674
|
}
|
|
8679
|
-
function
|
|
8675
|
+
function ct(e) {
|
|
8680
8676
|
let t = {}, n = {}, r = {}, i = 0, a = 0, o = 0, s = e.predicateIndex;
|
|
8681
8677
|
for (let e in s) s[e][0].object.termType === "Literal" ? (n[e] = !0, a++) : (r[e] = !0, i++);
|
|
8682
8678
|
let c = e.each(void 0, h.rdf("type"), h.rdf("Property"));
|
|
@@ -8686,30 +8682,30 @@ function st(e) {
|
|
|
8686
8682
|
}
|
|
8687
8683
|
return t.op = r, t.dp = n, S(`propertyTriage: ${i} non-lit, ${a} literal. ${o} unknown.`), t;
|
|
8688
8684
|
}
|
|
8689
|
-
function
|
|
8685
|
+
function lt(e, t) {
|
|
8690
8686
|
let n = e.createElement("button");
|
|
8691
8687
|
return n.setAttribute("type", "button"), n.textContent = "Goto " + T(t), n.addEventListener("click", function(n) {
|
|
8692
8688
|
e.outlineManager.GotoSubject(t, !0, void 0, !0, void 0);
|
|
8693
8689
|
}, !0), n;
|
|
8694
8690
|
}
|
|
8695
|
-
function
|
|
8691
|
+
function ut(e, t) {
|
|
8696
8692
|
let n = e.createElement("button");
|
|
8697
8693
|
return n.setAttribute("type", "button"), n.textContent = "✕", n.addEventListener("click", function(e) {
|
|
8698
8694
|
t.parentNode.removeChild(t);
|
|
8699
8695
|
}, !0), n;
|
|
8700
8696
|
}
|
|
8701
|
-
function
|
|
8702
|
-
return
|
|
8697
|
+
function dt(e, t, n, r, i, a, o, s, c) {
|
|
8698
|
+
return ft(e.createElement("div"), e, t, n, r, i, a, o, s, c);
|
|
8703
8699
|
}
|
|
8704
|
-
function
|
|
8700
|
+
function ft(e, t, n, r, i, a, o, s, c, l) {
|
|
8705
8701
|
let u = "border: 0.1em solid #ddd; border-bottom: none; width: 95%; height: 2em; padding: 0.5em;", d = null;
|
|
8706
8702
|
e.innerHTML = "";
|
|
8707
8703
|
let f = function(e, o) {
|
|
8708
8704
|
let f, p, m = function() {
|
|
8709
8705
|
let e = a ? n.each(void 0, i, o) : n.each(o, i);
|
|
8710
|
-
_.setAttribute("class", e.length === 0 ? "hideTillHover" : ""), p.setAttribute("src", s.connectIcon ||
|
|
8706
|
+
_.setAttribute("class", e.length === 0 ? "hideTillHover" : ""), p.setAttribute("src", s.connectIcon || B + "noun_25830.svg"), p.setAttribute("title", e.length ? e.length : "attach");
|
|
8711
8707
|
};
|
|
8712
|
-
f =
|
|
8708
|
+
f = U.twoLine.widgetForClass(r)(t, o), f.setAttribute("style", u);
|
|
8713
8709
|
let h = t.createElement("div");
|
|
8714
8710
|
h.setAttribute("class", "hideTillHover"), h.setAttribute("style", "float:right; width:10%");
|
|
8715
8711
|
let g = t.createElement("a");
|
|
@@ -8727,19 +8723,19 @@ function dt(e, t, n, r, i, a, o, s, c, l) {
|
|
|
8727
8723
|
}
|
|
8728
8724
|
return e;
|
|
8729
8725
|
}
|
|
8730
|
-
var
|
|
8731
|
-
function
|
|
8726
|
+
var U = {};
|
|
8727
|
+
function pt(e, t) {
|
|
8732
8728
|
let n = e.createElement("div");
|
|
8733
8729
|
return n.textContent = T(t), n;
|
|
8734
8730
|
}
|
|
8735
|
-
function
|
|
8736
|
-
let t =
|
|
8731
|
+
function mt(e) {
|
|
8732
|
+
let t = U.twoLine[e.uri], n = E;
|
|
8737
8733
|
if (t) return t;
|
|
8738
8734
|
let r = n.findSuperClassesNT(e);
|
|
8739
|
-
for (let e in r) if (t =
|
|
8740
|
-
return
|
|
8735
|
+
for (let e in r) if (t = U.twoLine[n.fromNT(e).uri], t) return t;
|
|
8736
|
+
return U.twoLine[""];
|
|
8741
8737
|
}
|
|
8742
|
-
function
|
|
8738
|
+
function ht(e, t) {
|
|
8743
8739
|
let n = "", r = function(e) {
|
|
8744
8740
|
let r = E.any(t, h.qu(e));
|
|
8745
8741
|
return r || (n += "@@ No value for " + e + "! "), r ? y(r.value) : "?";
|
|
@@ -8756,7 +8752,7 @@ function mt(e, t) {
|
|
|
8756
8752
|
<td><a href="${y(t.uri)}">${y(n)}</a></td>
|
|
8757
8753
|
</tr>`), i;
|
|
8758
8754
|
}
|
|
8759
|
-
function
|
|
8755
|
+
function gt(e, t) {
|
|
8760
8756
|
let n = function(e) {
|
|
8761
8757
|
let n = E.any(t, e);
|
|
8762
8758
|
return n ? y(n.value) : "?";
|
|
@@ -8770,19 +8766,19 @@ function ht(e, t) {
|
|
|
8770
8766
|
<td>${n(h.cal("dtend"))}</td>
|
|
8771
8767
|
</tr>`, r;
|
|
8772
8768
|
}
|
|
8773
|
-
function
|
|
8769
|
+
function _t(e, t) {
|
|
8774
8770
|
let n = e.querySelectorAll("link");
|
|
8775
8771
|
for (let e = 0; e < n.length; e++) if ((n[e].getAttribute("rel") || "") === "stylesheet" && (n[e].getAttribute("href") || "") === t) return;
|
|
8776
8772
|
let r = e.createElement("link");
|
|
8777
8773
|
r.setAttribute("rel", "stylesheet"), r.setAttribute("type", "text/css"), r.setAttribute("href", t), e.getElementsByTagName("head")[0].appendChild(r);
|
|
8778
8774
|
}
|
|
8779
|
-
function _t(e) {
|
|
8780
|
-
return yt(e, "audio");
|
|
8781
|
-
}
|
|
8782
8775
|
function vt(e) {
|
|
8783
|
-
return
|
|
8776
|
+
return bt(e, "audio");
|
|
8777
|
+
}
|
|
8778
|
+
function yt(e) {
|
|
8779
|
+
return bt(e, "video");
|
|
8784
8780
|
}
|
|
8785
|
-
function
|
|
8781
|
+
function bt(e, t) {
|
|
8786
8782
|
let n = {
|
|
8787
8783
|
audio: "http://purl.org/dc/dcmitype/Sound",
|
|
8788
8784
|
image: "http://purl.org/dc/dcmitype/Image",
|
|
@@ -8791,25 +8787,25 @@ function yt(e, t) {
|
|
|
8791
8787
|
for (let e in a) if (e.startsWith(o)) return !0;
|
|
8792
8788
|
return n[r] in a;
|
|
8793
8789
|
}
|
|
8794
|
-
function
|
|
8790
|
+
function xt(e, t) {
|
|
8795
8791
|
let n = e.createElement("div"), r = n.appendChild(e.createElement("input"));
|
|
8796
8792
|
return r.setAttribute("type", "file"), r.setAttribute("multiple", "true"), r.addEventListener("change", (e) => {
|
|
8797
8793
|
O("File drop event: ", e), e.files ? t(e.files) : e.target && e.target.files ? t(e.target.files) : alert("Sorry no files .. internal error?");
|
|
8798
|
-
}, !1), r.style = "display:none",
|
|
8794
|
+
}, !1), r.style = "display:none", F(n.appendChild(V(e, B + "noun_Upload_76574_000000.svg", "Upload files", (e) => {
|
|
8799
8795
|
r.click();
|
|
8800
8796
|
})), null, t), n;
|
|
8801
8797
|
}
|
|
8802
|
-
|
|
8798
|
+
U = {
|
|
8803
8799
|
line: {},
|
|
8804
8800
|
twoLine: {
|
|
8805
|
-
"":
|
|
8806
|
-
"http://www.w3.org/2000/10/swap/pim/qif#Transaction":
|
|
8807
|
-
"http://www.w3.org/ns/pim/trip#Trip":
|
|
8808
|
-
widgetForClass:
|
|
8801
|
+
"": pt,
|
|
8802
|
+
"http://www.w3.org/2000/10/swap/pim/qif#Transaction": ht,
|
|
8803
|
+
"http://www.w3.org/ns/pim/trip#Trip": gt,
|
|
8804
|
+
widgetForClass: mt
|
|
8809
8805
|
}
|
|
8810
8806
|
};
|
|
8811
8807
|
// src/widgets/forms/fieldParams.ts
|
|
8812
|
-
var
|
|
8808
|
+
var St = {
|
|
8813
8809
|
[h.ui("ColorField").uri]: {
|
|
8814
8810
|
size: 9,
|
|
8815
8811
|
type: "color",
|
|
@@ -8875,23 +8871,23 @@ var xt = {
|
|
|
8875
8871
|
element: "h3",
|
|
8876
8872
|
style: w.formHeadingStyle
|
|
8877
8873
|
}
|
|
8878
|
-
},
|
|
8879
|
-
function
|
|
8880
|
-
let t =
|
|
8874
|
+
}, Ct = m.store, W = {};
|
|
8875
|
+
function G(e) {
|
|
8876
|
+
let t = Ct, n = t.findTypeURIs(e), r = t.bottomTypeURIs(n), i = [];
|
|
8881
8877
|
for (let e in r) i.push(e);
|
|
8882
8878
|
return i[0];
|
|
8883
8879
|
}
|
|
8884
|
-
function
|
|
8885
|
-
let n =
|
|
8880
|
+
function K(e, t) {
|
|
8881
|
+
let n = G(t), r = W[n];
|
|
8886
8882
|
return v("paneUtils: Going to implement field " + t + " of type " + n), r || function(e, r) {
|
|
8887
|
-
let i =
|
|
8883
|
+
let i = I(e, "No handler for field " + t + " of type " + n);
|
|
8888
8884
|
return r && r.appendChild(i), i;
|
|
8889
8885
|
};
|
|
8890
8886
|
}
|
|
8891
8887
|
// src/widgets/forms/formStyle.ts
|
|
8892
8888
|
var wt = "https://www.w3.org/ns/css#";
|
|
8893
8889
|
function Tt(e, t) {
|
|
8894
|
-
let n =
|
|
8890
|
+
let n = St[G(t)] || {}, r = E.any(t, h.ui("style"));
|
|
8895
8891
|
r ? r.termType === "Literal" ? r && e.setAttribute("style", r.value) : E.statementsMatching(r, null, null, t.doc()).forEach((t) => {
|
|
8896
8892
|
if (t.predicate.uri && t.predicate.uri.startsWith(wt)) {
|
|
8897
8893
|
let n = t.predicate.uri.slice(26);
|
|
@@ -8904,37 +8900,37 @@ function Tt(e, t) {
|
|
|
8904
8900
|
}) : n.style && e.setAttribute("style", n.style);
|
|
8905
8901
|
}
|
|
8906
8902
|
// src/widgets/forms/basic.ts
|
|
8907
|
-
var
|
|
8903
|
+
var q = m.store;
|
|
8908
8904
|
function Et(e, t, n, r, i) {
|
|
8909
8905
|
n.style.display = "flex", n.style.flexDirection = "row";
|
|
8910
8906
|
let a = n.appendChild(e.createElement("div"));
|
|
8911
8907
|
a.style.width = b.formFieldNameBoxWidth;
|
|
8912
8908
|
let o = n.appendChild(e.createElement("div"));
|
|
8913
|
-
return a.setAttribute("class", "formFieldName"), a.setAttribute("style", w.formFieldNameBoxStyle), o.setAttribute("class", "formFieldValue"), i ? a.appendChild(e.createTextNode(i)) : t.any(r, h.ui("property")) ? a.appendChild(
|
|
8909
|
+
return a.setAttribute("class", "formFieldName"), a.setAttribute("style", w.formFieldNameBoxStyle), o.setAttribute("class", "formFieldValue"), i ? a.appendChild(e.createTextNode(i)) : t.any(r, h.ui("property")) ? a.appendChild(J(e, t.any(r, h.ui("property")), r)) : (o.appendChild(I(e, "No property or label given for form field: " + r)), a.appendChild(e.createTextNode("???"))), o;
|
|
8914
8910
|
}
|
|
8915
|
-
function
|
|
8916
|
-
let r =
|
|
8911
|
+
function J(e, t, n) {
|
|
8912
|
+
let r = q.any(n, h.ui("label"));
|
|
8917
8913
|
if (r ||= T(t, !0), t === void 0) return e.createTextNode("@@Internal error: undefined property");
|
|
8918
8914
|
let i = e.createElement("a");
|
|
8919
8915
|
return t.uri && i.setAttribute("href", t.uri), i.setAttribute("style", "color: #3B5998; text-decoration: none;"), i.textContent = r, i;
|
|
8920
8916
|
}
|
|
8921
|
-
function
|
|
8922
|
-
let r =
|
|
8917
|
+
function Dt(e, t, n) {
|
|
8918
|
+
let r = q.statementsMatching(e, t);
|
|
8923
8919
|
if (r.length === 0) return n;
|
|
8924
|
-
if (!
|
|
8925
|
-
return r.length > 0 && r[0].why.value &&
|
|
8920
|
+
if (!q.updater) throw Error("Store has no updater");
|
|
8921
|
+
return r.length > 0 && r[0].why.value && q.updater.editable(r[0].why.value, q) ? q.sym(r[0].why.value) : n;
|
|
8926
8922
|
}
|
|
8927
8923
|
function Y(e, n, r, i, a, o, s) {
|
|
8928
|
-
let c =
|
|
8929
|
-
if (n && n.appendChild(u), !f) return u.appendChild(
|
|
8930
|
-
let p = Et(e, c, u, a), m = c.anyJS(a, h.ui("suppressEmptyUneditable"), null, l), g =
|
|
8924
|
+
let c = q, l = a.doc ? a.doc() : null, u = e.createElement("div"), f = c.any(a, h.ui("property"));
|
|
8925
|
+
if (n && n.appendChild(u), !f) return u.appendChild(I(e, "Error: No property given for text field: " + a));
|
|
8926
|
+
let p = Et(e, c, u, a), m = c.anyJS(a, h.ui("suppressEmptyUneditable"), null, l), g = St[G(a)];
|
|
8931
8927
|
g === void 0 && (g = { style: "" });
|
|
8932
8928
|
let _ = g.style || "", v = w.textInputStyle + _, y = e.createElement("input");
|
|
8933
8929
|
y.style = v, p.appendChild(y), y.setAttribute("type", g.type ? g.type : "text");
|
|
8934
8930
|
let x = (y.getAttribute("type") || "").toLowerCase(), S = x === "date" || x === "datetime-local", C = c.anyJS(a, h.ui("size")) || b.textInputSize || 20;
|
|
8935
8931
|
y.setAttribute("size", C);
|
|
8936
8932
|
let T = c.any(a, h.ui("maxLength"));
|
|
8937
|
-
y.setAttribute("maxLength", T ? "" + T : b.basicMaxLength), o ||=
|
|
8933
|
+
y.setAttribute("maxLength", T ? "" + T : b.basicMaxLength), o ||= Dt(i, f, o);
|
|
8938
8934
|
let E = c.any(i, f, void 0, o);
|
|
8939
8935
|
if (E ||= c.any(a, h.ui("default")), E && E.value && g.uriPrefix ? y.value = decodeURIComponent(E.value.replace(g.uriPrefix, "")).replace(/ /g, "") : E &&
|
|
8940
8936
|
/* istanbul ignore next */
|
|
@@ -8970,7 +8966,7 @@ function Y(e, n, r, i, a, o, s) {
|
|
|
8970
8966
|
});
|
|
8971
8967
|
}
|
|
8972
8968
|
m(a, p, function(t, n, i) {
|
|
8973
|
-
n ? (r && (y.disabled = !1), y.setAttribute("style", v)) : u.appendChild(
|
|
8969
|
+
n ? (r && (y.disabled = !1), y.setAttribute("style", v)) : u.appendChild(I(e, i)), s(n, i);
|
|
8974
8970
|
});
|
|
8975
8971
|
}, !0), y.addEventListener("blur", function(e) {
|
|
8976
8972
|
if (S && y.dataset && y.dataset.deferredChange === "true") {
|
|
@@ -8981,24 +8977,24 @@ function Y(e, n, r, i, a, o, s) {
|
|
|
8981
8977
|
}, !0), u) : (y.readOnly = !0, y.style = w.textInputStyleUneditable + _, m && y.value === "" && (u.style.display = "none"), u);
|
|
8982
8978
|
}
|
|
8983
8979
|
// src/widgets/forms/autocomplete/language.ts
|
|
8984
|
-
var
|
|
8985
|
-
addDefaults: () =>
|
|
8980
|
+
var Ot = /* @__PURE__ */ o({
|
|
8981
|
+
addDefaults: () => At,
|
|
8986
8982
|
defaultPreferredLanguages: () => X,
|
|
8987
|
-
filterByLanguage: () =>
|
|
8988
|
-
getPreferredLanguages: () =>
|
|
8989
|
-
getPreferredLanguagesFor: () =>
|
|
8990
|
-
languageCodeURIBase: () =>
|
|
8991
|
-
}),
|
|
8983
|
+
filterByLanguage: () => Nt,
|
|
8984
|
+
getPreferredLanguages: () => Mt,
|
|
8985
|
+
getPreferredLanguagesFor: () => jt,
|
|
8986
|
+
languageCodeURIBase: () => kt
|
|
8987
|
+
}), kt = "https://www.w3.org/ns/iana/language-code/", X = [
|
|
8992
8988
|
"en",
|
|
8993
8989
|
"fr",
|
|
8994
8990
|
"de",
|
|
8995
8991
|
"it",
|
|
8996
8992
|
"ar"
|
|
8997
8993
|
];
|
|
8998
|
-
function
|
|
8994
|
+
function At(e) {
|
|
8999
8995
|
return e ||= [], e.concat(X.filter((t) => !e.includes(t)));
|
|
9000
8996
|
}
|
|
9001
|
-
async function
|
|
8997
|
+
async function jt(e) {
|
|
9002
8998
|
let t = e.doc();
|
|
9003
8999
|
await E.fetcher?.load(t);
|
|
9004
9000
|
let n = E.any(e, h.schema("knowsLanguage"), null, t);
|
|
@@ -9011,26 +9007,26 @@ async function Mt(e) {
|
|
|
9011
9007
|
return;
|
|
9012
9008
|
}
|
|
9013
9009
|
if (!n.value.startsWith("https://www.w3.org/ns/iana/language-code/")) {
|
|
9014
|
-
console.error(`What should be a language code ${n.value} does not start with ${
|
|
9010
|
+
console.error(`What should be a language code ${n.value} does not start with ${kt}`);
|
|
9015
9011
|
return;
|
|
9016
9012
|
}
|
|
9017
9013
|
let i = n.value.slice(41);
|
|
9018
9014
|
r.push(i);
|
|
9019
|
-
}), r.length > 0 ? (console.log(` User knows languages with codes: "${r.join(",")}"`),
|
|
9015
|
+
}), r.length > 0 ? (console.log(` User knows languages with codes: "${r.join(",")}"`), At(r)) : null;
|
|
9020
9016
|
}
|
|
9021
|
-
async function
|
|
9017
|
+
async function Mt() {
|
|
9022
9018
|
let e = await D.currentUser();
|
|
9023
9019
|
if (e) {
|
|
9024
|
-
let t = await
|
|
9020
|
+
let t = await jt(e);
|
|
9025
9021
|
if (t) return t;
|
|
9026
9022
|
}
|
|
9027
9023
|
if (typeof navigator < "u") {
|
|
9028
|
-
if (navigator.languages) return
|
|
9029
|
-
if (navigator.language) return
|
|
9024
|
+
if (navigator.languages) return At(navigator.languages.map((e) => e.split("-")[0]));
|
|
9025
|
+
if (navigator.language) return At([navigator.language.split("-")[0]]);
|
|
9030
9026
|
}
|
|
9031
9027
|
return X;
|
|
9032
9028
|
}
|
|
9033
|
-
function
|
|
9029
|
+
function Nt(e, t) {
|
|
9034
9030
|
let n = {};
|
|
9035
9031
|
e.forEach((e) => {
|
|
9036
9032
|
let t = e.subject.value;
|
|
@@ -9049,31 +9045,31 @@ function Pt(e, t) {
|
|
|
9049
9045
|
return O(` Filter by language: ${e.length} -> ${i.length}`), i;
|
|
9050
9046
|
}
|
|
9051
9047
|
// src/widgets/forms/autocomplete/publicData.ts
|
|
9052
|
-
var
|
|
9048
|
+
var Pt = /* @__PURE__ */ o({
|
|
9053
9049
|
AUTOCOMPLETE_LIMIT: () => 200,
|
|
9054
|
-
ESCOResultToBindings: () =>
|
|
9055
|
-
bindingToTerm: () =>
|
|
9056
|
-
dbPediaTypeMap: () =>
|
|
9057
|
-
dbpediaParameters: () =>
|
|
9058
|
-
escoParameters: () =>
|
|
9059
|
-
fetcherOptionsJsonPublicData: () =>
|
|
9060
|
-
getDbpediaDetails: () =>
|
|
9061
|
-
getWikidataDetails: () =>
|
|
9062
|
-
getWikidataDetailsOld: () =>
|
|
9063
|
-
getWikidataLocation: () =>
|
|
9064
|
-
instituteDetailsWikidataQuery: () =>
|
|
9065
|
-
loadFromBindings: () =>
|
|
9066
|
-
loadPublicDataThing: () =>
|
|
9067
|
-
queryESCODataByName: () =>
|
|
9068
|
-
queryPublicDataByName: () =>
|
|
9069
|
-
queryPublicDataConstruct: () =>
|
|
9070
|
-
queryPublicDataSelect: () =>
|
|
9071
|
-
variableNameToPredicateMap: () =>
|
|
9072
|
-
wikidataClasses: () =>
|
|
9073
|
-
wikidataIncomingClassMap: () =>
|
|
9074
|
-
wikidataOutgoingClassMap: () =>
|
|
9075
|
-
wikidataParameters: () =>
|
|
9076
|
-
}),
|
|
9050
|
+
ESCOResultToBindings: () => Jt,
|
|
9051
|
+
bindingToTerm: () => Kt,
|
|
9052
|
+
dbPediaTypeMap: () => Vt,
|
|
9053
|
+
dbpediaParameters: () => Bt,
|
|
9054
|
+
escoParameters: () => zt,
|
|
9055
|
+
fetcherOptionsJsonPublicData: () => Rt,
|
|
9056
|
+
getDbpediaDetails: () => an,
|
|
9057
|
+
getWikidataDetails: () => tn,
|
|
9058
|
+
getWikidataDetailsOld: () => nn,
|
|
9059
|
+
getWikidataLocation: () => rn,
|
|
9060
|
+
instituteDetailsWikidataQuery: () => Lt,
|
|
9061
|
+
loadFromBindings: () => qt,
|
|
9062
|
+
loadPublicDataThing: () => en,
|
|
9063
|
+
queryESCODataByName: () => Yt,
|
|
9064
|
+
queryPublicDataByName: () => Zt,
|
|
9065
|
+
queryPublicDataConstruct: () => $t,
|
|
9066
|
+
queryPublicDataSelect: () => Qt,
|
|
9067
|
+
variableNameToPredicateMap: () => Gt,
|
|
9068
|
+
wikidataClasses: () => It,
|
|
9069
|
+
wikidataIncomingClassMap: () => Wt,
|
|
9070
|
+
wikidataOutgoingClassMap: () => Ht,
|
|
9071
|
+
wikidataParameters: () => Ut
|
|
9072
|
+
}), Ft = /\$\(subject\)/g, It = {
|
|
9077
9073
|
Corporation: "http://www.wikidata.org/entity/Q6881511",
|
|
9078
9074
|
EducationalOrganization: "http://www.wikidata.org/entity/Q178706",
|
|
9079
9075
|
GovernmentOrganization: "http://www.wikidata.org/entity/Q327333",
|
|
@@ -9084,33 +9080,33 @@ var Ft = /* @__PURE__ */ o({
|
|
|
9084
9080
|
Project: "http://www.wikidata.org/entity/Q170584",
|
|
9085
9081
|
ResearchOrganization: "http://www.wikidata.org/entity/Q31855",
|
|
9086
9082
|
SportsOrganization: "http://www.wikidata.org/entity/Q4438121"
|
|
9087
|
-
},
|
|
9083
|
+
}, Lt = "prefix vcard: <http://www.w3.org/2006/vcard/ns#>\nCONSTRUCT\n{ wd:Q49108 vcard:fn ?itemLabel.\nwd:Q49108 rdf:type ?klass. ?klass rdfs:label ?klassLabel; rdfs:comment ?klassDescription .\nwd:Q49108 schema:logo ?logo;\n schema:image ?image;\n schema:logo ?sealImage;\n schema:subOrganization ?subsidiary .\n ?subsidiary rdfs:label ?subsidiaryLabel .\n ?supersidiary schema:subOrganization wd:Q49108 .\n ?supersidiary rdfs:label ?supersidiaryLabel .\n wd:Q49108 schema:location ?location .\n ?location schema:elevation ?elevation .\n ?location wdt:P131 ?region . ?region rdfs:label ?regionLabel .\n ?location wdt:P625 ?coordinates .\n ?location schema:country ?country . ?country rdfs:label ?countryLabel .\n}\nWHERE\n{ optional {wd:Q49108 rdfs:label ?itemLabel} .\n optional {wd:Q49108 wdt:P154 ?logo .}\n optional {wd:Q49108 wdt:P31 ?klass .}\n optional {wd:Q49108 wdt:P158 ?sealImage .}\n optional {wd:Q49108 wdt:P18 ?image .}\n\n optional { wd:Q49108 wdt:P355 ?subsidiary . }\n optional { ?supersidiary wdt:P355 wd:Q49108. }\n\n optional { wd:Q49108 wdt:P276 ?location .\n\n optional { ?location schema:eleveation ?elevation }\n optional { ?location wdt:P131 ?region }\n optional { ?location wdt:P625 ?coordinates }\n optional { ?location wdt:P17 ?country }\n }\n SERVICE wikibase:label { bd:serviceParam wikibase:language \"fr,en,de,it\". }\n}", Rt = {
|
|
9088
9084
|
credentials: "omit",
|
|
9089
9085
|
headers: new Headers({ Accept: "application/json" })
|
|
9090
|
-
},
|
|
9086
|
+
}, zt = {
|
|
9091
9087
|
label: "ESCO",
|
|
9092
9088
|
logo: E.sym("https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif"),
|
|
9093
9089
|
searchByNameURI: "https://ec.europa.eu/esco/api/search?language=$(language)&type=occupation&text=$(name)"
|
|
9094
|
-
},
|
|
9090
|
+
}, Bt = {
|
|
9095
9091
|
label: "DBPedia",
|
|
9096
9092
|
logo: E.sym("https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/DBpediaLogo.svg/263px-DBpediaLogo.svg.png"),
|
|
9097
9093
|
searchByNameQuery: "select distinct ?subject, ?name where {\n ?subject a $(targetClass); rdfs:label ?name\n FILTER regex(?name, \"$(name)\", \"i\")\n } LIMIT $(limit)",
|
|
9098
9094
|
endpoint: "https://dbpedia.org/sparql/"
|
|
9099
|
-
},
|
|
9095
|
+
}, Vt = { AcademicInsitution: "http://umbel.org/umbel/rc/EducationalOrganization" }, Ht = {
|
|
9100
9096
|
AcademicInsitution: "http://www.wikidata.org/entity/Q4671277",
|
|
9101
9097
|
Enterprise: "http://www.wikidata.org/entity/Q6881511",
|
|
9102
9098
|
Business: "http://www.wikidata.org/entity/Q4830453",
|
|
9103
9099
|
NGO: "http://www.wikidata.org/entity/Q79913",
|
|
9104
9100
|
CharitableOrganization: "http://www.wikidata.org/entity/Q708676",
|
|
9105
9101
|
Insitute: "http://www.wikidata.org/entity/Q1664720"
|
|
9106
|
-
},
|
|
9102
|
+
}, Ut = {
|
|
9107
9103
|
label: "WikiData",
|
|
9108
9104
|
limit: 3e3,
|
|
9109
9105
|
logo: E.sym("https://www.wikimedia.org/static/images/project-logos/wikidatawiki.png"),
|
|
9110
9106
|
endpoint: "https://query.wikidata.org/sparql",
|
|
9111
9107
|
searchByNameQuery: "SELECT ?subject ?name\n WHERE {\n ?klass wdt:P279* $(targetClass) .\n ?subject wdt:P31 ?klass .\n ?subject rdfs:label ?name.\n FILTER regex(?name, \"$(name)\", \"i\")\n } LIMIT $(limit) ",
|
|
9112
9108
|
insitituteDetailsQuery: "CONSTRUCT\n{ wd:Q49108 schema:name ?itemLabel;\n schema:logo ?logo;\n schema:logo ?sealImage;\n schema:subOrganization ?subsidiary .\n ?subsidiary schema:name ?subsidiaryLabel .\n}\nWHERE\n{\n wd:Q49108 # rdfs:label ?itemLabel ;\n wdt:P154 ?logo;\n wdt:P158 ?sealImage ;\n wdt:P355 ?subsidiary .\n # ?subsidiary rdfs:label ?subsidiaryLabel .\n\n SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE], fr\". }\n}"
|
|
9113
|
-
},
|
|
9109
|
+
}, Wt = {
|
|
9114
9110
|
"http://www.wikidata.org/entity/Q15936437": h.schema("CollegeOrUniversity"),
|
|
9115
9111
|
"http://www.wikidata.org/entity/Q1664720": h.schema("EducationalOrganization"),
|
|
9116
9112
|
"http://www.wikidata.org/entity/Q43229": h.schema("Organization"),
|
|
@@ -9119,7 +9115,7 @@ var Ft = /* @__PURE__ */ o({
|
|
|
9119
9115
|
"http://www.wikidata.org/entity/Q327333": h.schema("GovernmentOrganization"),
|
|
9120
9116
|
"http://www.wikidata.org/entity/Q2221906": h.schema("Place"),
|
|
9121
9117
|
"http://www.wikidata.org/entity/Q167037": h.schema("Corporation")
|
|
9122
|
-
},
|
|
9118
|
+
}, Gt = {
|
|
9123
9119
|
targetClass: h.rdf("type"),
|
|
9124
9120
|
sealImage: h.schema("logo"),
|
|
9125
9121
|
shortName: h.foaf("nick"),
|
|
@@ -9131,13 +9127,13 @@ var Ft = /* @__PURE__ */ o({
|
|
|
9131
9127
|
lat: h.schema("latitude"),
|
|
9132
9128
|
long: h.schema("longitude")
|
|
9133
9129
|
};
|
|
9134
|
-
function
|
|
9130
|
+
function Kt(e) {
|
|
9135
9131
|
let t = e.type.toLowerCase();
|
|
9136
9132
|
if (t === "uri" || t === "iri") return E.sym(e.value);
|
|
9137
9133
|
if (t === "literal") return e["xml:lang"] ? new d(e.value, e["xml:lang"]) : new d(e.value);
|
|
9138
9134
|
throw Error(`bindingToTerm: Unexpected type "${e.type}" in sparql binding}`);
|
|
9139
9135
|
}
|
|
9140
|
-
function
|
|
9136
|
+
function qt(e, t, n, r, i = Gt) {
|
|
9141
9137
|
let a = {};
|
|
9142
9138
|
O(`loadFromBindings: subject: ${t}`), O(` doc: ${r}`), n.forEach((e) => {
|
|
9143
9139
|
for (let t in e) {
|
|
@@ -9152,7 +9148,7 @@ function Jt(e, t, n, r, i = Kt) {
|
|
|
9152
9148
|
if (s === "uri") l = e.sym(c);
|
|
9153
9149
|
else if (s === "literal") l = new d(c, o.language, o.datatype);
|
|
9154
9150
|
else throw Error(`loadFromBindings: unexpected type: ${s}`);
|
|
9155
|
-
if (n === "type")
|
|
9151
|
+
if (n === "type") Wt[c] ? l = Wt[c] : k("Unmapped Wikidata Class: " + c);
|
|
9156
9152
|
else if (n === "coordinates") {
|
|
9157
9153
|
O(" @@@ hey a point: " + c);
|
|
9158
9154
|
let n = /.*\(([-0-9.-]*) ([-0-9.-]*)\)/.exec(c);
|
|
@@ -9167,7 +9163,7 @@ function Jt(e, t, n, r, i = Kt) {
|
|
|
9167
9163
|
});
|
|
9168
9164
|
}
|
|
9169
9165
|
}
|
|
9170
|
-
function
|
|
9166
|
+
function Jt(e) {
|
|
9171
9167
|
return e._embedded.results.map((e) => {
|
|
9172
9168
|
let t = e.title, n = e.uri;
|
|
9173
9169
|
return {
|
|
@@ -9182,50 +9178,50 @@ function Yt(e) {
|
|
|
9182
9178
|
};
|
|
9183
9179
|
});
|
|
9184
9180
|
}
|
|
9185
|
-
async function
|
|
9181
|
+
async function Yt(e, t, n) {
|
|
9186
9182
|
if (!n.searchByNameURI) throw Error("Missing queryTarget.searchByNameURI on queryESCODataByName");
|
|
9187
9183
|
let r = n.limit || 200, i = n.searchByNameURI.replace("$(name)", e).replace("$(limit)", "" + r).replace("$(targetClass)", t.toNT());
|
|
9188
9184
|
O("Querying ESCO data - uri: " + i);
|
|
9189
|
-
let a = (await E.fetcher?.webOperation("GET", i,
|
|
9185
|
+
let a = (await E.fetcher?.webOperation("GET", i, Rt))?.responseText || "";
|
|
9190
9186
|
if (O(" Query result text" + a.slice(0, 500) + "..."), a.length === 0) throw Error("Wot no text back from ESCO query " + i);
|
|
9191
9187
|
let o = JSON.parse(a);
|
|
9192
|
-
return O(" ESCO Query result JSON" + JSON.stringify(o, null, 4).slice(0, 500) + "..."),
|
|
9188
|
+
return O(" ESCO Query result JSON" + JSON.stringify(o, null, 4).slice(0, 500) + "..."), Jt(o);
|
|
9193
9189
|
}
|
|
9194
|
-
function
|
|
9190
|
+
function Xt(e) {
|
|
9195
9191
|
let t = e.indexOf("SPARQL-QUERY");
|
|
9196
9192
|
if (t < 0) return e;
|
|
9197
9193
|
k(" ### Fixing JSON with wikidata error code injection " + e.slice(t, t + 200));
|
|
9198
9194
|
let n = e.lastIndexOf("}, {");
|
|
9199
9195
|
return e.slice(0, n) + " } ] } } ";
|
|
9200
9196
|
}
|
|
9201
|
-
async function
|
|
9197
|
+
async function Zt(e, t, n, r) {
|
|
9202
9198
|
function i(n) {
|
|
9203
9199
|
let i = r.limit || 200;
|
|
9204
9200
|
return n.replace("$(name)", e).replace("$(limit)", "" + i).replace("$(language)", a).replace("$(targetClass)", t.toNT());
|
|
9205
9201
|
}
|
|
9206
9202
|
if (!t) throw Error("queryPublicDataByName: No class provided");
|
|
9207
|
-
let a = (await
|
|
9203
|
+
let a = (await Mt() || X)[0] || "en";
|
|
9208
9204
|
if (r.searchByNameQuery) {
|
|
9209
9205
|
let e = i(r.searchByNameQuery);
|
|
9210
|
-
return O("Querying public data - sparql: " + e),
|
|
9206
|
+
return O("Querying public data - sparql: " + e), Qt(e, r);
|
|
9211
9207
|
}
|
|
9212
9208
|
if (r.searchByNameURI) {
|
|
9213
9209
|
let e = i(r.searchByNameURI), t;
|
|
9214
9210
|
try {
|
|
9215
|
-
t = await E.fetcher?.webOperation("GET", e,
|
|
9211
|
+
t = await E.fetcher?.webOperation("GET", e, Rt);
|
|
9216
9212
|
} catch (t) {
|
|
9217
9213
|
throw Error(`Exception when trying to fetch ${e} \n ${t}`);
|
|
9218
9214
|
}
|
|
9219
9215
|
let n = t.responseText || "";
|
|
9220
9216
|
if (t.status !== 200) throw Error(`HTTP error status ${t.status} trying to fetch ${e} `);
|
|
9221
9217
|
if (O(" Query result text" + n.slice(0, 500) + "..."), n.length === 0) throw Error("queryPublicDataByName: No text back from public data query " + e);
|
|
9222
|
-
let a =
|
|
9223
|
-
if (O(" API Query result JSON" + JSON.stringify(o, null, 4).slice(0, 500) + "..."), o._embedded) return O(" Looks like ESCO"),
|
|
9218
|
+
let a = Xt(n), o = JSON.parse(a);
|
|
9219
|
+
if (O(" API Query result JSON" + JSON.stringify(o, null, 4).slice(0, 500) + "..."), o._embedded) return O(" Looks like ESCO"), Jt(o);
|
|
9224
9220
|
throw alert("Code me: unrecognized API return format"), Error(`*** Need to add code to parse unrecognized API JSON return\n${JSON.stringify(o, null, 4)}`);
|
|
9225
9221
|
}
|
|
9226
9222
|
throw Error("Query source must have either rest API or SPARQL endpoint.");
|
|
9227
9223
|
}
|
|
9228
|
-
async function
|
|
9224
|
+
async function Qt(e, t) {
|
|
9229
9225
|
if (!t.endpoint) throw Error("Missing queryTarget.endpoint required for queryPublicDataSelect");
|
|
9230
9226
|
let n = new URL(t.endpoint);
|
|
9231
9227
|
n.searchParams.append("query", e);
|
|
@@ -9238,10 +9234,10 @@ async function $t(e, t) {
|
|
|
9238
9234
|
headers: i
|
|
9239
9235
|
}, o = (await E.fetcher?.webOperation("GET", r, a))?.responseText || "";
|
|
9240
9236
|
if (o.length === 0) throw Error("No text back from query " + r);
|
|
9241
|
-
let s =
|
|
9237
|
+
let s = Xt(o), c = JSON.parse(s);
|
|
9242
9238
|
return O(" Query result JSON" + JSON.stringify(c, null, 4).slice(0, 100) + "..."), c.results.bindings;
|
|
9243
9239
|
}
|
|
9244
|
-
async function
|
|
9240
|
+
async function $t(e, t, n) {
|
|
9245
9241
|
if (O("queryPublicDataConstruct: sparql:", e), !n.endpoint) throw Error("Missing queryTarget.endpoint required for queryPublicDataConstruct");
|
|
9246
9242
|
let r = new URL(n.endpoint);
|
|
9247
9243
|
r.searchParams.append("query", e);
|
|
@@ -9256,9 +9252,9 @@ async function en(e, t, n) {
|
|
|
9256
9252
|
if (O(" queryPublicDataConstruct result text:" + (c.length > 500 ? c.slice(0, 200) + " ... " + c.slice(-200) : c)), c.length === 0) throw Error("queryPublicDataConstruct: No text back from construct query:" + i);
|
|
9257
9253
|
s(c, E, t.uri, "text/turtle");
|
|
9258
9254
|
}
|
|
9259
|
-
async function
|
|
9260
|
-
if (n.uri.startsWith("https://dbpedia.org/resource/")) return
|
|
9261
|
-
if (n.uri.match(/^https?:\/\/www\.wikidata\.org\/entity\/.*/)) await
|
|
9255
|
+
async function en(e, t, n) {
|
|
9256
|
+
if (n.uri.startsWith("https://dbpedia.org/resource/")) return an(e, t, n);
|
|
9257
|
+
if (n.uri.match(/^https?:\/\/www\.wikidata\.org\/entity\/.*/)) await tn(e, t, n);
|
|
9262
9258
|
else {
|
|
9263
9259
|
let t = n.uri.startsWith("http:") ? e.sym("https:" + n.uri.slice(5)) : n, r = new Headers();
|
|
9264
9260
|
return r.append("Accept", "text/turtle"), e.fetcher.load(t, {
|
|
@@ -9267,39 +9263,39 @@ async function tn(e, t, n) {
|
|
|
9267
9263
|
});
|
|
9268
9264
|
}
|
|
9269
9265
|
}
|
|
9266
|
+
async function tn(e, t, n) {
|
|
9267
|
+
await $t(Lt.replace(/wd:Q49108/g, n.toNT()), n, Ut), O("getWikidataDetails: loaded.", n);
|
|
9268
|
+
}
|
|
9270
9269
|
async function nn(e, t, n) {
|
|
9271
|
-
await
|
|
9270
|
+
qt(e, n, await Qt("select distinct * where {\n optional { $(subject) wdt:P31 ?targetClass } # instance of\n optional { $(subject) wdt:P154 ?logo }\n optional { $(subject) wdt:P158 ?sealImage }\n# optional { $(subject) wdt:P159 ?headquartersLocation }\n\noptional { $(subject) wdt:P17 ?country }\noptional { $(subject) wdt:P18 ?image }\noptional { $(subject) wdt:P1813 ?shortName }\n\noptional { $(subject) wdt:P355 ?subsidiary }\n# SERVICE wikibase:label { bd:serviceParam wikibase:language \"fr,en,de,it\" }\n}".replace(Ft, n.toNT()), Ut), n.doc());
|
|
9272
9271
|
}
|
|
9273
9272
|
async function rn(e, t, n) {
|
|
9274
|
-
|
|
9275
|
-
}
|
|
9276
|
-
async function an(e, t, n) {
|
|
9277
|
-
let r = "select distinct * where {\n\n $(subject) wdt:P276 ?location .\n\n optional { ?location wdt:P2044 ?elevation }\n optional { ?location wdt:P131 ?region }\n optional { ?location wdt:P625 ?coordinates }\noptional { ?location wdt:P17 ?country }\n\n# SERVICE wikibase:label { bd:serviceParam wikibase:language \"fr,en,de,it\" }\n}".replace(It, n.toNT());
|
|
9273
|
+
let r = "select distinct * where {\n\n $(subject) wdt:P276 ?location .\n\n optional { ?location wdt:P2044 ?elevation }\n optional { ?location wdt:P131 ?region }\n optional { ?location wdt:P625 ?coordinates }\noptional { ?location wdt:P17 ?country }\n\n# SERVICE wikibase:label { bd:serviceParam wikibase:language \"fr,en,de,it\" }\n}".replace(Ft, n.toNT());
|
|
9278
9274
|
O(" location query sparql:" + r);
|
|
9279
|
-
let i = await
|
|
9280
|
-
O(" location query bindings:", i),
|
|
9275
|
+
let i = await Qt(r, Ut);
|
|
9276
|
+
O(" location query bindings:", i), qt(e, n, i, n.doc());
|
|
9281
9277
|
}
|
|
9282
|
-
async function
|
|
9283
|
-
|
|
9278
|
+
async function an(e, t, n) {
|
|
9279
|
+
qt(e, n, await Qt(`select distinct ?city, ?state, ?country, ?homepage, ?logo, ?lat, ?long, WHERE {
|
|
9284
9280
|
OPTIONAL { <${n}> <http://dbpedia.org/ontology/city> ?city }
|
|
9285
9281
|
OPTIONAL { ${n} <http://dbpedia.org/ontology/state> ?state }
|
|
9286
9282
|
OPTIONAL { ${n} <http://dbpedia.org/ontology/country> ?country }
|
|
9287
9283
|
OPTIONAL { ${n} foaf:homepage ?homepage }
|
|
9288
9284
|
OPTIONAL { ${n} foaf:lat ?lat; foaf:long ?long }
|
|
9289
9285
|
OPTIONAL { ${n} <http://dbpedia.org/ontology/country> ?country }
|
|
9290
|
-
}`,
|
|
9286
|
+
}`, Bt), n.doc()), O("Finished getDbpediaDetails.");
|
|
9291
9287
|
}
|
|
9292
9288
|
// src/widgets/forms/autocomplete/autocompletePicker.ts
|
|
9293
|
-
var
|
|
9289
|
+
var on = 4, sn = 20, cn = 40;
|
|
9294
9290
|
function Z(e, t) {
|
|
9295
9291
|
e.style.display = t ? "" : "none";
|
|
9296
9292
|
}
|
|
9297
|
-
async function
|
|
9293
|
+
async function ln(e, t, n, r) {
|
|
9298
9294
|
function i(t) {
|
|
9299
9295
|
let n = A.appendChild(e.createElement("tr"));
|
|
9300
9296
|
O(t);
|
|
9301
9297
|
let r = Error(t);
|
|
9302
|
-
n.appendChild(
|
|
9298
|
+
n.appendChild(I(e, r, "pink")), w.setStyle(n, "autocompleteRowStyle"), n.style.padding = "1em";
|
|
9303
9299
|
}
|
|
9304
9300
|
function a(e, n) {
|
|
9305
9301
|
O("Auto complete: finish! " + e), e.termType === "Literal" && t.queryParams.objectURIBase && (e = E.sym(t.queryParams.objectURIBase.value + e.value)), u(), r(e, n);
|
|
@@ -9330,12 +9326,12 @@ async function un(e, t, n, r) {
|
|
|
9330
9326
|
async function f(e, n) {
|
|
9331
9327
|
let r;
|
|
9332
9328
|
try {
|
|
9333
|
-
r = await
|
|
9329
|
+
r = await Zt(e, g, n || X, t.queryParams);
|
|
9334
9330
|
} catch (e) {
|
|
9335
9331
|
i("Error querying db of organizations: " + e), y = !1;
|
|
9336
9332
|
return;
|
|
9337
9333
|
}
|
|
9338
|
-
return v = r.length < 200, S = v ? e : void 0, u(),
|
|
9334
|
+
return v = r.length < 200, S = v ? e : void 0, u(), Nt(r, n) || [];
|
|
9339
9335
|
}
|
|
9340
9336
|
function p(e, t) {
|
|
9341
9337
|
return (t || []).filter((t) => l(e, t.name.value));
|
|
@@ -9344,7 +9340,7 @@ async function un(e, t, n, r) {
|
|
|
9344
9340
|
function t(t) {
|
|
9345
9341
|
let n = e.createElement("tr");
|
|
9346
9342
|
w.setStyle(n, "autocompleteRowStyle"), n.setAttribute("style", "padding: 0.3em;"), n.style.color = x ? "#080" : "#088", n.textContent = t.name.value;
|
|
9347
|
-
let r =
|
|
9343
|
+
let r = Kt(t.subject), i = Kt(t.name);
|
|
9348
9344
|
return n.addEventListener("click", async (e) => {
|
|
9349
9345
|
O(" click row textContent: " + n.textContent), O(" click name: " + i.value), r && i && o(r, i);
|
|
9350
9346
|
}), n;
|
|
@@ -9357,16 +9353,16 @@ async function un(e, t, n, r) {
|
|
|
9357
9353
|
return;
|
|
9358
9354
|
}
|
|
9359
9355
|
O(`Setting lock at "${M.value}"`), y = !0;
|
|
9360
|
-
let r = await
|
|
9361
|
-
if (i.length <
|
|
9356
|
+
let r = await Mt(), i = M.value.trim().toLowerCase();
|
|
9357
|
+
if (i.length < on) u(), C = sn;
|
|
9362
9358
|
else {
|
|
9363
9359
|
x && S && i.startsWith(S) || (O(` Querying database at "${i}" cf last "${S}".`), _ = await f(i, r) || []);
|
|
9364
9360
|
let e = p(i, _);
|
|
9365
|
-
v && e.length <=
|
|
9361
|
+
v && e.length <= cn && (C = e.length), x = v && e.length <= C, O(` Filter:"${i}" lastBindings: ${_.length}, slimmed to ${e.length}; rows: ${C}, Enough? ${v}, All displayed? ${x}`);
|
|
9366
9362
|
let a = e.slice(0, C);
|
|
9367
9363
|
a.sort(n), u();
|
|
9368
9364
|
for (let e of a) A.appendChild(t(e));
|
|
9369
|
-
e.length === 1 && o(
|
|
9365
|
+
e.length === 1 && o(Kt(e[0].subject), Kt(e[0].name));
|
|
9370
9366
|
}
|
|
9371
9367
|
y = !1;
|
|
9372
9368
|
}
|
|
@@ -9376,7 +9372,7 @@ async function un(e, t, n, r) {
|
|
|
9376
9372
|
let g = t.targetClass;
|
|
9377
9373
|
if (!g) throw Error("renderAutoComplete: missing targetClass");
|
|
9378
9374
|
n.acceptButton && n.acceptButton.addEventListener("click", s, !1), n.cancelButton && n.cancelButton.addEventListener("click", c, !1);
|
|
9379
|
-
let _, v = !1, y = !1, x = !1, S, C =
|
|
9375
|
+
let _, v = !1, y = !1, x = !1, S, C = sn, T = e.createElement("div"), D, k, A = T.appendChild(e.createElement("table"));
|
|
9380
9376
|
A.setAttribute("data-testid", "autocomplete-table"), A.setAttribute("style", "max-width: 30em; margin: 0.5em;");
|
|
9381
9377
|
let j = A.appendChild(e.createElement("tr"));
|
|
9382
9378
|
w.setStyle(j, "autocompleteRowStyle");
|
|
@@ -9390,20 +9386,20 @@ async function un(e, t, n, r) {
|
|
|
9390
9386
|
}, !1), M.addEventListener("input", d), T;
|
|
9391
9387
|
}
|
|
9392
9388
|
// src/widgets/forms/autocomplete/autocompleteBar.ts
|
|
9393
|
-
var
|
|
9394
|
-
async function
|
|
9389
|
+
var un = "Solid ID", dn = L.iconBase + "noun_34653_green.svg", fn = L.iconBase + "noun_Search_875351.svg", pn = L.iconBase + "noun_253504.svg";
|
|
9390
|
+
async function mn(e, t, n, r, i, a) {
|
|
9395
9391
|
async function o(e, t) {
|
|
9396
9392
|
return r.permanent ? (Z(_, !0), Z(f, !1), Z(p, !1)) : c(), i(e, t);
|
|
9397
9393
|
}
|
|
9398
9394
|
async function s(n) {
|
|
9399
|
-
let r = await
|
|
9395
|
+
let r = await Ze(e, E, S, h.vcard("url"), void 0, un);
|
|
9400
9396
|
if (r) return i(t, r);
|
|
9401
9397
|
}
|
|
9402
9398
|
function c() {
|
|
9403
9399
|
x &&= (S.removeChild(x), void 0);
|
|
9404
9400
|
}
|
|
9405
9401
|
async function l() {
|
|
9406
|
-
x = e.createElement("div"), x.setAttribute("style", "display: flex; flex-flow: wrap;"), x.appendChild(await
|
|
9402
|
+
x = e.createElement("div"), x.setAttribute("style", "display: flex; flex-flow: wrap;"), x.appendChild(await ln(e, r, b, o)), x.appendChild(f), x.appendChild(p), x.appendChild(_), x.appendChild(m), S.appendChild(x);
|
|
9407
9403
|
}
|
|
9408
9404
|
async function u(e) {
|
|
9409
9405
|
x ? (S.removeChild(x), x = void 0) : await l();
|
|
@@ -9411,13 +9407,13 @@ async function hn(e, t, n, r, i, a) {
|
|
|
9411
9407
|
async function d(e) {
|
|
9412
9408
|
for (let n of e) await i(t, n);
|
|
9413
9409
|
}
|
|
9414
|
-
let f =
|
|
9410
|
+
let f = Xe(e);
|
|
9415
9411
|
f.setAttribute("data-testid", "accept-button");
|
|
9416
|
-
let p =
|
|
9412
|
+
let p = H(e);
|
|
9417
9413
|
p.setAttribute("data-testid", "cancel-button");
|
|
9418
|
-
let m = e.createElement("div"), g =
|
|
9414
|
+
let m = e.createElement("div"), g = Ye(e, m, r.targetClass ? T(r.targetClass) : "item", a);
|
|
9419
9415
|
g.setAttribute("data-testid", "delete-button");
|
|
9420
|
-
let _ =
|
|
9416
|
+
let _ = V(e, pn, "Edit", (e) => {
|
|
9421
9417
|
v = !v, y();
|
|
9422
9418
|
});
|
|
9423
9419
|
_.setAttribute("data-testid", "edit-button");
|
|
@@ -9431,10 +9427,10 @@ async function hn(e, t, n, r, i, a) {
|
|
|
9431
9427
|
editButton: _,
|
|
9432
9428
|
deleteButton: g
|
|
9433
9429
|
}, x, S = e.createElement("div");
|
|
9434
|
-
return S.style.display = "flex", S.style.flexDirection = "row", (r.permanent || r.currentObject) && await l(), n.editable && (S.style.width = "100%", n.manualURIEntry &&
|
|
9430
|
+
return S.style.display = "flex", S.style.flexDirection = "row", (r.permanent || r.currentObject) && await l(), n.editable && (S.style.width = "100%", n.manualURIEntry && F(S.appendChild(V(e, dn, n.idNoun, s)), d, void 0), n.dbLookup && !r.currentObject && !r.permanent && S.appendChild(V(e, fn, n.idNoun, u))), y(), S;
|
|
9435
9431
|
}
|
|
9436
9432
|
// src/widgets/forms/autocomplete/autocompleteField.ts
|
|
9437
|
-
function
|
|
9433
|
+
function hn(e, n, r, i, a, o, s) {
|
|
9438
9434
|
async function c(n, r) {
|
|
9439
9435
|
if (!r) throw Error("autocompleteField: No name set.");
|
|
9440
9436
|
let a = u.the(i, g, null, o);
|
|
@@ -9446,7 +9442,7 @@ function gn(e, n, r, i, a, o, s) {
|
|
|
9446
9442
|
try {
|
|
9447
9443
|
await u.updater?.updateMany(c, l);
|
|
9448
9444
|
} catch (t) {
|
|
9449
|
-
s(!1, t), f.appendChild(
|
|
9445
|
+
s(!1, t), f.appendChild(I(e, "Autocomplete form data update error:" + t, null, t));
|
|
9450
9446
|
return;
|
|
9451
9447
|
}
|
|
9452
9448
|
s(!0, "");
|
|
@@ -9454,7 +9450,7 @@ function gn(e, n, r, i, a, o, s) {
|
|
|
9454
9450
|
async function l(t, n) {
|
|
9455
9451
|
let r = u.the(i, g, null, o);
|
|
9456
9452
|
if (!r) {
|
|
9457
|
-
s(!1, "NO data to elete"), f.appendChild(
|
|
9453
|
+
s(!1, "NO data to elete"), f.appendChild(I(e, "Autocomplete delete: no old data!"));
|
|
9458
9454
|
return;
|
|
9459
9455
|
}
|
|
9460
9456
|
let a = u.statementsMatching(i, g, r, o).concat(u.statementsMatching(r, _, null, o)), c = [];
|
|
@@ -9462,7 +9458,7 @@ function gn(e, n, r, i, a, o, s) {
|
|
|
9462
9458
|
await u.updater?.updateMany(a, c);
|
|
9463
9459
|
} catch (t) {
|
|
9464
9460
|
let n = /* @__PURE__ */ Error("Autocomplete form data delete error:" + t);
|
|
9465
|
-
s(!1, t), f.appendChild(
|
|
9461
|
+
s(!1, t), f.appendChild(I(e, n, null, t));
|
|
9466
9462
|
return;
|
|
9467
9463
|
}
|
|
9468
9464
|
s(!0, "");
|
|
@@ -9475,9 +9471,9 @@ function gn(e, n, r, i, a, o, s) {
|
|
|
9475
9471
|
let m = e.createElement("div");
|
|
9476
9472
|
m.setAttribute("class", "formFieldValue"), f.appendChild(m);
|
|
9477
9473
|
let g = u.any(a, h.ui("property"));
|
|
9478
|
-
if (!g) return f.appendChild(
|
|
9474
|
+
if (!g) return f.appendChild(I(e, "Error: No property given for autocomplete field: " + a));
|
|
9479
9475
|
let _ = u.any(a, h.ui("labelProperty")) || h.schema("name"), v = u.any(a, h.ui("dataSource"));
|
|
9480
|
-
if (!v) return f.appendChild(
|
|
9476
|
+
if (!v) return f.appendChild(I(e, "Error: No data source given for autocomplete field: " + a));
|
|
9481
9477
|
let y = {
|
|
9482
9478
|
label: u.anyJS(v, h.schema("name"), null, v.doc()),
|
|
9483
9479
|
logo: u.any(v, h.schema("logo"), null, v.doc())
|
|
@@ -9485,11 +9481,11 @@ function gn(e, n, r, i, a, o, s) {
|
|
|
9485
9481
|
b && (y.targetClass = b), y.objectURIBase = u.any(v, h.ui("objectURIBase"), null, v.doc()) || void 0;
|
|
9486
9482
|
let x = u.anyJS(v, h.ui("endpoint"), null, v.doc());
|
|
9487
9483
|
if (x) {
|
|
9488
|
-
if (y.endpoint = x, y.searchByNameQuery = u.anyJS(v, h.ui("searchByNameQuery"), null, v.doc()), !y.searchByNameQuery) return f.appendChild(
|
|
9484
|
+
if (y.endpoint = x, y.searchByNameQuery = u.anyJS(v, h.ui("searchByNameQuery"), null, v.doc()), !y.searchByNameQuery) return f.appendChild(I(e, "Error: No searchByNameQuery given for endpoint data Source: " + a));
|
|
9489
9485
|
y.insitituteDetailsQuery = u.anyJS(v, h.ui("insitituteDetailsQuery"), null, v.doc());
|
|
9490
9486
|
} else {
|
|
9491
9487
|
let t = u.anyJS(v, h.ui("searchByNameURI"));
|
|
9492
|
-
if (!t) return f.appendChild(
|
|
9488
|
+
if (!t) return f.appendChild(I(e, "Error: No searchByNameURI OR sparql endpoint given for dataSource: " + v));
|
|
9493
9489
|
y.searchByNameURI = t;
|
|
9494
9490
|
}
|
|
9495
9491
|
let S = u.anyJS(a, h.ui("suppressEmptyUneditable"), null, d), C = u.updater?.editable(o.uri), T = {
|
|
@@ -9502,13 +9498,13 @@ function gn(e, n, r, i, a, o, s) {
|
|
|
9502
9498
|
if (D) T.currentObject = D, T.currentName = u.any(T.currentObject, _, null, o);
|
|
9503
9499
|
else if (D = u.any(a, h.ui("default")), D) T.currentObject = D, T.currentName = u.any(T.currentObject, _, null, o);
|
|
9504
9500
|
else if (S && !C) return f.style.display = "none", f;
|
|
9505
|
-
return p.appendChild(
|
|
9501
|
+
return p.appendChild(J(e, g, a)), mn(e, i, {
|
|
9506
9502
|
editable: C,
|
|
9507
9503
|
dbLookup: !0
|
|
9508
9504
|
}, T, c, l).then((e) => {
|
|
9509
9505
|
m.appendChild(e);
|
|
9510
9506
|
}, (t) => {
|
|
9511
|
-
m.appendChild(
|
|
9507
|
+
m.appendChild(I(e, `Error rendering autocomplete ${a}: ${t}`, "#fee", t));
|
|
9512
9508
|
}), f;
|
|
9513
9509
|
}
|
|
9514
9510
|
// src/lib/style_multiSelect.js
|
|
@@ -9534,7 +9530,7 @@ Q.setStyle = function(e, t) {
|
|
|
9534
9530
|
e.style = Q[t];
|
|
9535
9531
|
};
|
|
9536
9532
|
// src/widgets/multiSelect.js
|
|
9537
|
-
var
|
|
9533
|
+
var gn = class {
|
|
9538
9534
|
_data;
|
|
9539
9535
|
_domElements;
|
|
9540
9536
|
_event = () => {};
|
|
@@ -9803,19 +9799,19 @@ var _n = class {
|
|
|
9803
9799
|
!t && this._domElements.optionsContainerList.insertAdjacentHTML("beforeend", e);
|
|
9804
9800
|
} else t && t.parentNode && t.parentNode.removeChild(t);
|
|
9805
9801
|
}
|
|
9806
|
-
},
|
|
9807
|
-
|
|
9808
|
-
function
|
|
9802
|
+
}, _n = "✓", vn = "✕", yn = "-", bn = E;
|
|
9803
|
+
W[h.ui("AutocompleteField").uri] = hn;
|
|
9804
|
+
function xn(e, t, n, r, i, a, o) {
|
|
9809
9805
|
let s = a.children;
|
|
9810
9806
|
for (let c = 0; c < o.length; c++) {
|
|
9811
9807
|
let l = o[c];
|
|
9812
|
-
if (
|
|
9813
|
-
let o =
|
|
9808
|
+
if (G(l) === h.ui("Options").uri) {
|
|
9809
|
+
let o = K(e, l)(e, null, t, n, l, r, i);
|
|
9814
9810
|
O("Refreshing Options field by replacing it."), a.insertBefore(o, s[c]), a.removeChild(s[c + 1]);
|
|
9815
9811
|
}
|
|
9816
9812
|
}
|
|
9817
9813
|
}
|
|
9818
|
-
|
|
9814
|
+
W[h.ui("Form").uri] = W[h.ui("Group").uri] = function(e, t, n, r, i, a, o) {
|
|
9819
9815
|
let s = e.createElement("div"), c = h.ui;
|
|
9820
9816
|
if (t && t.appendChild(s), !i) return;
|
|
9821
9817
|
let l = r.toNT() + "|" + i.toNT();
|
|
@@ -9823,28 +9819,28 @@ K[h.ui("Form").uri] = K[h.ui("Group").uri] = function(e, t, n, r, i, a, o) {
|
|
|
9823
9819
|
let u = {};
|
|
9824
9820
|
for (let e in n) u[e] = 1;
|
|
9825
9821
|
u[l] = 1;
|
|
9826
|
-
let d = i.doc ? i.doc() : null, f =
|
|
9827
|
-
if (p > 3 || p < 0) return s.appendChild(
|
|
9822
|
+
let d = i.doc ? i.doc() : null, f = bn.any(i, c("weight"), null, d), p = f ? Number(f.value) : 1;
|
|
9823
|
+
if (p > 3 || p < 0) return s.appendChild(I(e, `Form Group weight ${p} should be 0-3`));
|
|
9828
9824
|
s.setAttribute("style", w.formGroupStyle[p]), s.style.display = "flex", s.style.flexDirection = "column", s.class = "form-weight-" + p;
|
|
9829
|
-
let m =
|
|
9830
|
-
if (m ? g = m.elements : (m =
|
|
9825
|
+
let m = bn.any(i, c("parts"), null, d), g;
|
|
9826
|
+
if (m ? g = m.elements : (m = bn.each(i, c("part"), null, d), g = kn(m)), !m) return s.appendChild(I(e, "No parts to form! "));
|
|
9831
9827
|
for (let t = 0; t < g.length; t++) {
|
|
9832
|
-
let i = g[t], c =
|
|
9828
|
+
let i = g[t], c = K(e, i);
|
|
9833
9829
|
s.appendChild(c(e, null, u, r, i, a, function(t, i) {
|
|
9834
|
-
t && i && i.widget && i.widget === "select" &&
|
|
9830
|
+
t && i && i.widget && i.widget === "select" && xn(e, n, r, a, o, s, g), o(t, {
|
|
9835
9831
|
widget: "group",
|
|
9836
9832
|
change: i
|
|
9837
9833
|
});
|
|
9838
9834
|
}));
|
|
9839
9835
|
}
|
|
9840
9836
|
return s;
|
|
9841
|
-
},
|
|
9837
|
+
}, W[h.ui("Options").uri] = function(e, t, r, i, a, o, s) {
|
|
9842
9838
|
let c = E, l = e.createElement("div"), u = a.doc ? a.doc() : null, d = h.ui;
|
|
9843
9839
|
t && t.appendChild(l);
|
|
9844
9840
|
let f = c.any(a, d("dependingOn"));
|
|
9845
9841
|
f ||= h.rdf("type");
|
|
9846
9842
|
let p = c.each(a, d("case"), null, u);
|
|
9847
|
-
p || l.appendChild(
|
|
9843
|
+
p || l.appendChild(I(e, "No cases to Options form. "));
|
|
9848
9844
|
let m;
|
|
9849
9845
|
m = f.sameTerm(h.rdf("type")) ? Object.keys(c.findTypeURIs(i)).map((e) => n(e)) : c.each(i, f);
|
|
9850
9846
|
for (let t = 0; t < p.length; t++) {
|
|
@@ -9855,28 +9851,28 @@ K[h.ui("Form").uri] = K[h.ui("Group").uri] = function(e, t, n, r, i, a, o) {
|
|
|
9855
9851
|
}
|
|
9856
9852
|
if (h) {
|
|
9857
9853
|
let t = c.the(n, d("use"));
|
|
9858
|
-
if (t)
|
|
9859
|
-
else return l.appendChild(
|
|
9854
|
+
if (t) Tn(e, l, r, i, t, o, s);
|
|
9855
|
+
else return l.appendChild(I(e, "No \"use\" part for case in form " + a)), l;
|
|
9860
9856
|
break;
|
|
9861
9857
|
}
|
|
9862
9858
|
}
|
|
9863
9859
|
return l;
|
|
9864
|
-
},
|
|
9860
|
+
}, W[h.ui("Multiple").uri] = function(n, r, i, a, o, s, l) {
|
|
9865
9861
|
function u(e) {
|
|
9866
9862
|
return e.map((e) => e.toString().slice(-7)).join(", ");
|
|
9867
9863
|
}
|
|
9868
9864
|
async function d() {
|
|
9869
9865
|
let e = $(s);
|
|
9870
|
-
if (C)
|
|
9866
|
+
if (C) te(), P.elements.push(e), await ne();
|
|
9871
9867
|
else {
|
|
9872
9868
|
let r = D ? [t(e, w, a, s)] : [t(a, w, e, s)];
|
|
9873
9869
|
try {
|
|
9874
9870
|
await m.updater.update([], r);
|
|
9875
9871
|
} catch (e) {
|
|
9876
9872
|
let t = "Error adding to unordered multiple: " + e;
|
|
9877
|
-
y.appendChild(
|
|
9873
|
+
y.appendChild(I(n, t)), A(t);
|
|
9878
9874
|
}
|
|
9879
|
-
|
|
9875
|
+
re();
|
|
9880
9876
|
}
|
|
9881
9877
|
}
|
|
9882
9878
|
function f(e) {
|
|
@@ -9884,13 +9880,13 @@ K[h.ui("Form").uri] = K[h.ui("Group").uri] = function(e, t, n, r, i, a, o) {
|
|
|
9884
9880
|
if (C) {
|
|
9885
9881
|
O("pre delete: " + u(P.elements));
|
|
9886
9882
|
for (let t = 0; t < P.elements.length; t++) if (P.elements[t].sameTerm(e)) {
|
|
9887
|
-
P.elements.splice(t, 1), await
|
|
9883
|
+
P.elements.splice(t, 1), await ne();
|
|
9888
9884
|
return;
|
|
9889
9885
|
}
|
|
9890
9886
|
} else if (m.holds(a, w, e, s)) {
|
|
9891
9887
|
let r = [t(a, w, e, s)];
|
|
9892
9888
|
m.updater.update(r, [], function(e, t, r) {
|
|
9893
|
-
t ? N.removeChild(d) : N.appendChild(
|
|
9889
|
+
t ? N.removeChild(d) : N.appendChild(I(n, "Multiple: delete failed: " + r));
|
|
9894
9890
|
});
|
|
9895
9891
|
}
|
|
9896
9892
|
}
|
|
@@ -9911,58 +9907,58 @@ K[h.ui("Form").uri] = K[h.ui("Group").uri] = function(e, t, n, r, i, a, o) {
|
|
|
9911
9907
|
}
|
|
9912
9908
|
P.elements.splice(r, 2, P.elements[r + 1], P.elements[r]);
|
|
9913
9909
|
}
|
|
9914
|
-
await
|
|
9910
|
+
await ne();
|
|
9915
9911
|
}
|
|
9916
9912
|
function c(t, n) {
|
|
9917
9913
|
O(`Item done callback for item ${e.toString()}`), t || A(" Item done callback: Error: " + n), l(t, n);
|
|
9918
9914
|
}
|
|
9919
9915
|
v("Multiple: render object: " + e);
|
|
9920
|
-
let d =
|
|
9921
|
-
if (d.subject = e, m.updater.editable(s.uri) && (
|
|
9916
|
+
let d = K(n, M)(n, null, i, e, M, s, c);
|
|
9917
|
+
if (d.subject = e, m.updater.editable(s.uri) && (Ye(n, d, k, r), C)) {
|
|
9922
9918
|
let e = n.createElement("div");
|
|
9923
9919
|
e.style.display = "grid", e.style.gridTemplateColumns = "auto 3em", e.style.gridTemplateRows = "50% 50%";
|
|
9924
|
-
let t =
|
|
9920
|
+
let t = V(n, L.iconBase + "noun_1369237.svg", "Move Up", async (e) => o(e, !0)), r = V(n, L.iconBase + "noun_1369241.svg", "Move Down", async (e) => o(e, !1)), i = n.createElement("div");
|
|
9925
9921
|
return i.appendChild(d), e.appendChild(i), e.appendChild(t), e.appendChild(r), t.style.gridColumn = 2, r.style.gridColumn = 2, t.style.gridRow = 1, r.style.padding = "0em", t.style.padding = "0em", r.style.gridRow = 2, i.style.gridColumn = 1, i.style.gridRowStart = "span 2", e;
|
|
9926
9922
|
}
|
|
9927
9923
|
return d;
|
|
9928
9924
|
}
|
|
9929
|
-
let p =
|
|
9925
|
+
let p = L.iconBase + "noun_19460_green.svg", m = E, g = o.doc ? o.doc() : null, y = n.createElement("div"), b = y, x = h.ui;
|
|
9930
9926
|
r && r.appendChild(y);
|
|
9931
9927
|
let S = m.any(o, x("ordered")), C = S ? c.toJS(S) : !1, w = m.any(o, x("property")), D = m.anyJS(o, x("reverse"), null, g);
|
|
9932
|
-
if (!w) return y.appendChild(
|
|
9928
|
+
if (!w) return y.appendChild(I(n, "No property to multiple: " + o)), b;
|
|
9933
9929
|
let k = m.any(o, x("label"));
|
|
9934
9930
|
k ||= T(w);
|
|
9935
9931
|
let j = m.any(o, x("min"));
|
|
9936
9932
|
j = j ? 0 + j.value : 0;
|
|
9937
9933
|
let M = m.any(o, x("part"));
|
|
9938
|
-
if (!M) return y.appendChild(
|
|
9934
|
+
if (!M) return y.appendChild(I(n, "No part to multiple: " + o)), b;
|
|
9939
9935
|
let N = y.appendChild(n.createElement("div"));
|
|
9940
9936
|
N.style.display = "flex", N.style.flexDirection = "column";
|
|
9941
|
-
let P,
|
|
9942
|
-
if (
|
|
9937
|
+
let P, ee;
|
|
9938
|
+
if (ee = D ? m.any(null, w, a, s) : m.any(a, w, null, s), C ? (P = D ? m.any(null, w, a, s) : m.any(a, w, null, s), ee = P ? P.elements : []) : (ee = D ? m.each(null, w, a, s) : m.each(a, w, null, s), P = null), m.updater.editable(s.uri)) {
|
|
9943
9939
|
let e = y.appendChild(n.createElement("div"));
|
|
9944
9940
|
e.style.padding = "0.5em";
|
|
9945
9941
|
let t = e.appendChild(n.createElement("img"));
|
|
9946
9942
|
t.setAttribute("src", p), t.setAttribute("style", "margin: 0.2em; width: 1.5em; height:1.5em"), t.title = "Click to add another " + k;
|
|
9947
9943
|
let r = n.createElement("span");
|
|
9948
|
-
r.textContent = (
|
|
9944
|
+
r.textContent = (ee.length === 0 ? "Add another " : "Add ") + k, e.addEventListener("click", async (e) => {
|
|
9949
9945
|
await d();
|
|
9950
9946
|
}, !0), e.appendChild(r);
|
|
9951
9947
|
}
|
|
9952
|
-
function
|
|
9948
|
+
function te() {
|
|
9953
9949
|
P || (P = new e(), D ? m.add(P, w, a, s) : m.add(a, w, P, s));
|
|
9954
9950
|
}
|
|
9955
|
-
async function
|
|
9956
|
-
O("save list: " + u(P.elements)),
|
|
9951
|
+
async function ne() {
|
|
9952
|
+
O("save list: " + u(P.elements)), te();
|
|
9957
9953
|
try {
|
|
9958
9954
|
await m.fetcher.putBack(s);
|
|
9959
9955
|
} catch (e) {
|
|
9960
|
-
y.appendChild(
|
|
9956
|
+
y.appendChild(I(n, "Error trying to put back a list: " + e));
|
|
9961
9957
|
return;
|
|
9962
9958
|
}
|
|
9963
|
-
|
|
9959
|
+
re();
|
|
9964
9960
|
}
|
|
9965
|
-
function
|
|
9961
|
+
function re() {
|
|
9966
9962
|
let e;
|
|
9967
9963
|
if (C) {
|
|
9968
9964
|
let t = D ? m.the(null, w, a, s) : m.the(a, w, null, s);
|
|
@@ -9970,63 +9966,63 @@ K[h.ui("Form").uri] = K[h.ui("Group").uri] = function(e, t, n, r, i, a, o) {
|
|
|
9970
9966
|
} else e = D ? m.each(null, w, a, s) : m.each(a, w, null, s), e.sort();
|
|
9971
9967
|
_(N, e, f);
|
|
9972
9968
|
}
|
|
9973
|
-
N.refresh =
|
|
9974
|
-
async function
|
|
9975
|
-
let e = j -
|
|
9969
|
+
N.refresh = re, re();
|
|
9970
|
+
async function ie() {
|
|
9971
|
+
let e = j - ee.length;
|
|
9976
9972
|
if (e > 0) {
|
|
9977
9973
|
for (let t = 0; t < e; t++) O("Adding extra: min " + j), await d();
|
|
9978
|
-
await
|
|
9974
|
+
await ne();
|
|
9979
9975
|
}
|
|
9980
9976
|
}
|
|
9981
|
-
return
|
|
9977
|
+
return ie().then(() => {
|
|
9982
9978
|
O(" Multiple render: async stuff ok");
|
|
9983
9979
|
}, (e) => {
|
|
9984
9980
|
A(" Multiple render: async stuff fails. #### ", e);
|
|
9985
9981
|
}), b;
|
|
9986
|
-
},
|
|
9982
|
+
}, W[h.ui("PhoneField").uri] = Y, W[h.ui("EmailField").uri] = Y, W[h.ui("ColorField").uri] = Y, W[h.ui("DateField").uri] = Y, W[h.ui("DateTimeField").uri] = Y, W[h.ui("TimeField").uri] = Y, W[h.ui("NumericField").uri] = Y, W[h.ui("IntegerField").uri] = Y, W[h.ui("DecimalField").uri] = Y, W[h.ui("FloatField").uri] = Y, W[h.ui("TextField").uri] = Y, W[h.ui("SingleLineTextField").uri] = Y, W[h.ui("NamedNodeURIField").uri] = Y, W[h.ui("MultiLineTextField").uri] = function(e, t, n, r, i, a, o) {
|
|
9987
9983
|
let s = h.ui, c = E, l = i.doc ? i.doc() : null, u = c.any(i, s("property"));
|
|
9988
|
-
if (!u) return
|
|
9984
|
+
if (!u) return I(e, "No property to text field: " + i);
|
|
9989
9985
|
let d = e.createElement("div");
|
|
9990
9986
|
d.style.display = "flex", d.style.flexDirection = "row";
|
|
9991
9987
|
let f = d.appendChild(e.createElement("div"));
|
|
9992
9988
|
f.style.width = b.formFieldNameBoxWidth;
|
|
9993
9989
|
let p = d.appendChild(e.createElement("div"));
|
|
9994
|
-
f.appendChild(
|
|
9990
|
+
f.appendChild(J(e, u, i)), a = Dt(r, u, a);
|
|
9995
9991
|
let m = c.anyJS(r, u, null, a) || "", g = c.updater.editable(a.uri), _ = i && c.anyJS(i, h.ui("suppressEmptyUneditable"), null, l);
|
|
9996
9992
|
!g && _ && m === "" && (d.style.display = "none");
|
|
9997
|
-
let v =
|
|
9993
|
+
let v = Nn(e, c, r, u, a, o);
|
|
9998
9994
|
return p.appendChild(v), t && t.appendChild(d), d;
|
|
9999
9995
|
};
|
|
10000
|
-
function
|
|
9996
|
+
function Sn(e, n, r, i, a, o, s, c) {
|
|
10001
9997
|
let l = h.ui, u = E, d = u.any(a, l("property"));
|
|
10002
9998
|
if (!d) {
|
|
10003
|
-
let t =
|
|
9999
|
+
let t = I(e, "No property to boolean field: " + a);
|
|
10004
10000
|
return n && n.appendChild(t), t;
|
|
10005
10001
|
}
|
|
10006
10002
|
let f = u.any(a, l("label"));
|
|
10007
|
-
f ||= T(d, !0), o =
|
|
10003
|
+
f ||= T(d, !0), o = Dt(i, d, o);
|
|
10008
10004
|
let p = u.any(i, d);
|
|
10009
10005
|
p === void 0 && (p = !1);
|
|
10010
|
-
let m = t(i, d, !0, o), g = t(i, d, !1, o), _ =
|
|
10006
|
+
let m = t(i, d, !0, o), g = t(i, d, !1, o), _ = Rn(e, u, f, g, m, a, o, c);
|
|
10011
10007
|
return n && n.appendChild(_), _;
|
|
10012
10008
|
}
|
|
10013
|
-
|
|
10014
|
-
return
|
|
10015
|
-
},
|
|
10016
|
-
return
|
|
10017
|
-
},
|
|
10009
|
+
W[h.ui("BooleanField").uri] = function(e, t, n, r, i, a, o) {
|
|
10010
|
+
return Sn(e, t, n, r, i, a, o, !1);
|
|
10011
|
+
}, W[h.ui("TristateField").uri] = function(e, t, n, r, i, a, o) {
|
|
10012
|
+
return Sn(e, t, n, r, i, a, o, !0);
|
|
10013
|
+
}, W[h.ui("Classifier").uri] = function(e, t, n, r, i, a, o) {
|
|
10018
10014
|
let s = E, c = h.ui, l = s.any(i, c("category"));
|
|
10019
|
-
if (!l) return
|
|
10015
|
+
if (!l) return I(e, "No category for classifier: " + i);
|
|
10020
10016
|
v("Classifier: dataDoc=" + a);
|
|
10021
10017
|
let u = function(e, t) {
|
|
10022
10018
|
return o(e || e, t);
|
|
10023
10019
|
}, d = e.createElement("div");
|
|
10024
10020
|
d.setAttribute("class", "classifierBox");
|
|
10025
10021
|
let f = e.createElement("div");
|
|
10026
|
-
f.setAttribute("class", "formFieldName classifierBox-label"), f.appendChild(
|
|
10022
|
+
f.setAttribute("class", "formFieldName classifierBox-label"), f.appendChild(J(e, l, i)), d.appendChild(f);
|
|
10027
10023
|
let p = e.createElement("div");
|
|
10028
10024
|
p.setAttribute("class", "formFieldValue classifierBox-selectBox");
|
|
10029
|
-
let m =
|
|
10025
|
+
let m = Ln(e, s, r, l, a, u);
|
|
10030
10026
|
if (m && m.querySelectorAll) {
|
|
10031
10027
|
let e = m.querySelectorAll("select");
|
|
10032
10028
|
e.length && !s.updater.editable(a.uri) && e.forEach((e) => {
|
|
@@ -10034,7 +10030,7 @@ K[h.ui("BooleanField").uri] = function(e, t, n, r, i, a, o) {
|
|
|
10034
10030
|
});
|
|
10035
10031
|
}
|
|
10036
10032
|
return p.appendChild(m), d.appendChild(p), t && t.appendChild(d), d;
|
|
10037
|
-
},
|
|
10033
|
+
}, W[h.ui("Choice").uri] = function(e, r, i, a, o, s, c) {
|
|
10038
10034
|
let l = h.ui, u = E, d = o.doc ? o.doc() : null, f, p = e.createElement("div");
|
|
10039
10035
|
p.setAttribute("class", "choiceBox"), r && r.appendChild(p);
|
|
10040
10036
|
let m = e.createElement("div");
|
|
@@ -10042,10 +10038,10 @@ K[h.ui("BooleanField").uri] = function(e, t, n, r, i, a, o) {
|
|
|
10042
10038
|
let g = e.createElement("div");
|
|
10043
10039
|
g.setAttribute("class", "formFieldValue choiceBox-selectBox"), p.appendChild(g);
|
|
10044
10040
|
let _ = u.any(o, l("property"));
|
|
10045
|
-
if (!_) return p.appendChild(
|
|
10046
|
-
m.appendChild(
|
|
10041
|
+
if (!_) return p.appendChild(I(e, "No property for Choice: " + o));
|
|
10042
|
+
m.appendChild(J(e, _, o));
|
|
10047
10043
|
let v = u.any(o, l("from"));
|
|
10048
|
-
if (!v) return
|
|
10044
|
+
if (!v) return I(e, "No 'from' for Choice: " + o);
|
|
10049
10045
|
let y = u.any(o, l("use")), b = {
|
|
10050
10046
|
form: o,
|
|
10051
10047
|
subForm: y,
|
|
@@ -10054,17 +10050,17 @@ K[h.ui("BooleanField").uri] = function(e, t, n, r, i, a, o) {
|
|
|
10054
10050
|
function x(e) {
|
|
10055
10051
|
let t = [], n;
|
|
10056
10052
|
t = u.each(void 0, h.rdf("type"), v, d);
|
|
10057
|
-
for (let n in
|
|
10058
|
-
if (v.sameTerm(h.rdfs("Class"))) for (f in
|
|
10053
|
+
for (let n in Vn(u, v, e)) t.push(u.fromNT(n));
|
|
10054
|
+
if (v.sameTerm(h.rdfs("Class"))) for (f in st()) t.push(u.sym(f));
|
|
10059
10055
|
else if (v.sameTerm(h.rdf("Property"))) {
|
|
10060
|
-
for (f in n =
|
|
10056
|
+
for (f in n = ct(u), n.op) t.push(u.fromNT(f));
|
|
10061
10057
|
for (f in n.dp) t.push(u.fromNT(f));
|
|
10062
10058
|
b.disambiguate = !0;
|
|
10063
10059
|
} else if (v.sameTerm(h.owl("ObjectProperty"))) {
|
|
10064
|
-
for (f in n =
|
|
10060
|
+
for (f in n = ct(u), n.op) t.push(u.fromNT(f));
|
|
10065
10061
|
b.disambiguate = !0;
|
|
10066
10062
|
} else if (v.sameTerm(h.owl("DatatypeProperty"))) {
|
|
10067
|
-
for (f in n =
|
|
10063
|
+
for (f in n = ct(u), n.dp) t.push(u.fromNT(f));
|
|
10068
10064
|
b.disambiguate = !0;
|
|
10069
10065
|
}
|
|
10070
10066
|
return t;
|
|
@@ -10075,8 +10071,8 @@ K[h.ui("BooleanField").uri] = function(e, t, n, r, i, a, o) {
|
|
|
10075
10071
|
let C = u.each(o, l("search-full-store")).length ? null : s, w;
|
|
10076
10072
|
return g.refresh = function() {
|
|
10077
10073
|
let r = u.each(a, _, null, s).map((e) => e.value), i = x(C);
|
|
10078
|
-
if (i.push(r), i =
|
|
10079
|
-
let i = new
|
|
10074
|
+
if (i.push(r), i = An(i), w = zn(e, g, u, a, _, i, r, v, b, s, c), g.innerHTML = "", g.appendChild(w), S) {
|
|
10075
|
+
let i = new gn({
|
|
10080
10076
|
placeholder: w.selected,
|
|
10081
10077
|
select: w,
|
|
10082
10078
|
container: g,
|
|
@@ -10089,13 +10085,13 @@ K[h.ui("BooleanField").uri] = function(e, t, n, r, i, a, o) {
|
|
|
10089
10085
|
})), i.action === "CLEAR_ALL_OPTIONS" && (r = []), i.action === "ADD_OPTION") {
|
|
10090
10086
|
if ((i.value + "").includes("Create new")) {
|
|
10091
10087
|
let i = $(s), o = [];
|
|
10092
|
-
o.push(t(a, _, u.sym(i), s)), v && o.push(t(i, h.rdf("type"), u.sym(v), s)), y &&
|
|
10088
|
+
o.push(t(a, _, u.sym(i), s)), v && o.push(t(i, h.rdf("type"), u.sym(v), s)), y && Cn(e, g, {}, n(i), y, s, function(t, n) {
|
|
10093
10089
|
t ? (u.updater.update([], o, function(t, n, r) {
|
|
10094
|
-
n || g.appendChild(
|
|
10090
|
+
n || g.appendChild(I(e, "Error updating select: " + r));
|
|
10095
10091
|
}), r.push(i), c && c(t, {
|
|
10096
10092
|
widget: "select",
|
|
10097
10093
|
event: "new"
|
|
10098
|
-
})) : g.appendChild(
|
|
10094
|
+
})) : g.appendChild(I(e, "Error updating data in field of select: " + n));
|
|
10099
10095
|
});
|
|
10100
10096
|
} else r.push(i.value);
|
|
10101
10097
|
}
|
|
@@ -10104,29 +10100,29 @@ K[h.ui("BooleanField").uri] = function(e, t, n, r, i, a, o) {
|
|
|
10104
10100
|
}
|
|
10105
10101
|
}, g.refresh(), w && w.refresh && w.refresh(), p;
|
|
10106
10102
|
};
|
|
10107
|
-
function
|
|
10108
|
-
|
|
10103
|
+
function Cn(e, t, n, r, i, a, o) {
|
|
10104
|
+
K(e, i)(e, t, n, r, i, a, o);
|
|
10109
10105
|
}
|
|
10110
|
-
|
|
10106
|
+
W[h.ui("Comment").uri] = W[h.ui("Heading").uri] = function(e, t, n, r, i, a, o) {
|
|
10111
10107
|
let s = h.ui, c = E, l = c.any(i, s("contents"));
|
|
10112
10108
|
l ||= "Error: No contents in comment field.";
|
|
10113
|
-
let u = i.doc ? i.doc() : null, d =
|
|
10109
|
+
let u = i.doc ? i.doc() : null, d = St[G(i)] || {}, f = e.createElement("div");
|
|
10114
10110
|
t && t.appendChild(f);
|
|
10115
10111
|
let p = f.appendChild(e.createElement(d.element));
|
|
10116
10112
|
p.textContent = l, Tt(p, i);
|
|
10117
10113
|
let m = c.anyJS(i, h.ui("suppressIfUneditable"), null, u), g = c.updater.editable(a.uri);
|
|
10118
10114
|
return m && !g && (f.style.display = "none"), f;
|
|
10119
10115
|
};
|
|
10120
|
-
function
|
|
10116
|
+
function wn(e, t, n, r, i) {
|
|
10121
10117
|
let a = e.createElement("button");
|
|
10122
10118
|
return a.setAttribute("type", "button"), a.innerHTML = "Edit " + T(h.ui("Form")), a.addEventListener("click", function(o) {
|
|
10123
|
-
|
|
10119
|
+
Tn(e, t, {}, n, h.ui("FormForm"), r, i).setAttribute("style", h.ui("FormForm").sameTerm(n) ? "background-color: #fee;" : "background-color: #ffffe7;"), a.parentNode.removeChild(a);
|
|
10124
10120
|
}, !0), a;
|
|
10125
10121
|
}
|
|
10126
|
-
function
|
|
10127
|
-
return
|
|
10122
|
+
function Tn(e, t, n, r, i, a, o) {
|
|
10123
|
+
return K(e, i)(e, t, n, r, i, a, o);
|
|
10128
10124
|
}
|
|
10129
|
-
function
|
|
10125
|
+
function En(e, t) {
|
|
10130
10126
|
let n = e.each(void 0, h.rdf("range"), t);
|
|
10131
10127
|
[
|
|
10132
10128
|
h.rdfs("comment"),
|
|
@@ -10149,7 +10145,7 @@ function Dn(e, t) {
|
|
|
10149
10145
|
for (let t in i) a.push(e.sym(t));
|
|
10150
10146
|
return a;
|
|
10151
10147
|
}
|
|
10152
|
-
function
|
|
10148
|
+
function Dn(e, t, n) {
|
|
10153
10149
|
let r = [e.sym(t)];
|
|
10154
10150
|
for (; r.length > 0;) {
|
|
10155
10151
|
let t = r.shift(), i = e.each(t, n);
|
|
@@ -10159,18 +10155,18 @@ function On(e, t, n) {
|
|
|
10159
10155
|
}
|
|
10160
10156
|
return [];
|
|
10161
10157
|
}
|
|
10162
|
-
function
|
|
10158
|
+
function On(e) {
|
|
10163
10159
|
let t = E;
|
|
10164
10160
|
v("formsFor: subject=" + e);
|
|
10165
10161
|
let n = t.findTypeURIs(e), r;
|
|
10166
10162
|
for (r in n) v(" type: " + r);
|
|
10167
10163
|
let i = t.bottomTypeURIs(n), a = [];
|
|
10168
|
-
for (let e in i) v("candidatesFor: trying bottom type =" + e), a = a.concat(
|
|
10164
|
+
for (let e in i) v("candidatesFor: trying bottom type =" + e), a = a.concat(Dn(t, e, h.ui("creationForm"))), a = a.concat(Dn(t, e, h.ui("annotationForm")));
|
|
10169
10165
|
return a;
|
|
10170
10166
|
}
|
|
10171
|
-
function
|
|
10167
|
+
function kn(e) {
|
|
10172
10168
|
let t = e.map(function(e) {
|
|
10173
|
-
return [
|
|
10169
|
+
return [bn.any(e, h.ui("sequence")) || 9999, e];
|
|
10174
10170
|
});
|
|
10175
10171
|
return t.sort(function(e, t) {
|
|
10176
10172
|
return e[0] - t[0];
|
|
@@ -10178,7 +10174,7 @@ function An(e) {
|
|
|
10178
10174
|
return e[1];
|
|
10179
10175
|
});
|
|
10180
10176
|
}
|
|
10181
|
-
function
|
|
10177
|
+
function An(e) {
|
|
10182
10178
|
let t = e.map(function(e) {
|
|
10183
10179
|
return [T(e).toLowerCase(), e];
|
|
10184
10180
|
});
|
|
@@ -10186,16 +10182,16 @@ function jn(e) {
|
|
|
10186
10182
|
return e[1];
|
|
10187
10183
|
});
|
|
10188
10184
|
}
|
|
10189
|
-
function
|
|
10185
|
+
function jn(e, t, n, r, i, a, o, s) {
|
|
10190
10186
|
let c = e.createElement("button");
|
|
10191
10187
|
return c.setAttribute("type", "button"), c.innerHTML = "New " + T(i), c.addEventListener("click", function(l) {
|
|
10192
|
-
c.parentNode.appendChild(
|
|
10188
|
+
c.parentNode.appendChild(Mn(e, t, n, r, i, a, o, s));
|
|
10193
10189
|
}, !1), c;
|
|
10194
10190
|
}
|
|
10195
|
-
function
|
|
10191
|
+
function Mn(e, n, r, i, a, o, s, c) {
|
|
10196
10192
|
let l = e.createElement("form");
|
|
10197
10193
|
if (!o) {
|
|
10198
|
-
let t =
|
|
10194
|
+
let t = Dn(n, a.uri, h.ui("creationForm"));
|
|
10199
10195
|
if (t.length === 0) {
|
|
10200
10196
|
let t = l.appendChild(e.createElement("p"));
|
|
10201
10197
|
t.textContent = "I am sorry, you need to provide information about a " + T(a) + " but I don't know enough information about those to ask you.";
|
|
@@ -10207,17 +10203,17 @@ function Nn(e, n, r, i, a, o, s, c) {
|
|
|
10207
10203
|
v("lists[0] is " + t[0]), o = t[0];
|
|
10208
10204
|
}
|
|
10209
10205
|
v("form is " + o), l.setAttribute("style", `border: 0.05em solid ${b.formBorderColor}; color: ${b.formBorderColor}`), l.innerHTML = "<h3>New " + T(a) + "</h3>";
|
|
10210
|
-
let u =
|
|
10206
|
+
let u = K(e, o), d = $(s), f = !1, p = function(o, u) {
|
|
10211
10207
|
if (!o) return c(o, u);
|
|
10212
10208
|
let p = [];
|
|
10213
|
-
r && !n.holds(r, i, d, s) && p.push(t(r, i, d, s)), r && !n.holds(d, h.rdf("type"), a, s) && p.push(t(d, h.rdf("type"), a, s)), p.length ? n.updater.update([], p, m) : c(!0, u), f ||= l.appendChild(
|
|
10209
|
+
r && !n.holds(r, i, d, s) && p.push(t(r, i, d, s)), r && !n.holds(d, h.rdf("type"), a, s) && p.push(t(d, h.rdf("type"), a, s)), p.length ? n.updater.update([], p, m) : c(!0, u), f ||= l.appendChild(lt(e, d));
|
|
10214
10210
|
};
|
|
10215
10211
|
function m(e, t, n) {
|
|
10216
10212
|
return c(t, n);
|
|
10217
10213
|
}
|
|
10218
|
-
return S("paneUtils Object is " + d),
|
|
10214
|
+
return S("paneUtils Object is " + d), ut(e, u(e, l, {}, d, o, s, p)).setAttribute("style", "float: right;"), l.AJAR_subject = d, l;
|
|
10219
10215
|
}
|
|
10220
|
-
function
|
|
10216
|
+
function Nn(e, n, r, i, a, o) {
|
|
10221
10217
|
let s = e.createElement("div"), c = n.anyJS(r, i, null, a) || "", l = e.createElement("textarea");
|
|
10222
10218
|
s.appendChild(l), l.rows = c ? c.split("\n").length + 2 : 2, l.cols = 80, l.setAttribute("style", w.multilineTextInputStyle), c === null ? l.select() : l.value = c, s.refresh = function() {
|
|
10223
10219
|
let e = n.any(r, i, null, a);
|
|
@@ -10227,22 +10223,22 @@ function Pn(e, n, r, i, a, o) {
|
|
|
10227
10223
|
f.disabled = !0, f.setAttribute("style", "visibility: hidden; float: right;"), l.disabled = !0, l.style.color = b.textInputColorPending;
|
|
10228
10224
|
let u = n.statementsMatching(r, i, null, a), d = t(r, i, l.value, a);
|
|
10229
10225
|
n.updater.update(u, d, function(t, n, r) {
|
|
10230
|
-
n ? (l.style.color = b.textInputColor, l.disabled = !1) : s.appendChild(
|
|
10226
|
+
n ? (l.style.color = b.textInputColor, l.disabled = !1) : s.appendChild(I(e, "Error (while saving change to " + a.uri + "): " + r)), o && o(n, r);
|
|
10231
10227
|
});
|
|
10232
10228
|
}
|
|
10233
10229
|
let d = n.updater.editable(a.uri), f;
|
|
10234
|
-
return d ? (f =
|
|
10230
|
+
return d ? (f = Xe(e, u), f.disabled = !0, f.style.visibility = "hidden", f.style.float = "right", s.appendChild(f), l.addEventListener("keyup", function(e) {
|
|
10235
10231
|
l.style.color = "green", f && (f.disabled = !1, f.style.visibility = "");
|
|
10236
10232
|
}, !0), l.addEventListener("change", u, !0)) : (l.disabled = !0, l.style.backgroundColor = b.textInputBackgroundColorUneditable), s;
|
|
10237
10233
|
}
|
|
10238
|
-
function
|
|
10234
|
+
function Pn(e, n, r, i, a, o, s, c) {
|
|
10239
10235
|
v("Select list length now " + a.length);
|
|
10240
10236
|
let l = 0, u = {}, d = n.updater.editable(s.uri);
|
|
10241
10237
|
for (let e = 0; e < a.length; e++) {
|
|
10242
10238
|
let t = a[e];
|
|
10243
10239
|
t.uri || k(`makeSelectForClassifierOptions: option does not have an uri: ${t}, with predicate: ${i}`), !t.uri || t.uri in u || (u[t.uri] = !0, l++);
|
|
10244
10240
|
}
|
|
10245
|
-
if (l === 0 && !o.mint) return
|
|
10241
|
+
if (l === 0 && !o.mint) return I(e, "Can't do selector with no options, subject= " + r + " property = " + i + ".");
|
|
10246
10242
|
v("makeSelectForClassifierOptions: dataDoc=" + s);
|
|
10247
10243
|
let f, p = function() {
|
|
10248
10244
|
return f = {}, i.sameTerm(h.rdf("type")) ? f = n.findTypeURIs(r) : n.each(r, i, null, s).forEach(function(e) {
|
|
@@ -10259,7 +10255,7 @@ function Fn(e, n, r, i, a, o, s, c) {
|
|
|
10259
10255
|
let l = g.options[a];
|
|
10260
10256
|
if (l.selected && l.AJAR_mint) {
|
|
10261
10257
|
if (o.mintClass) {
|
|
10262
|
-
let t =
|
|
10258
|
+
let t = Mn(e, n, r, i, o.mintClass, null, s, function(e, t) {
|
|
10263
10259
|
e || c(e, t, { change: "new" });
|
|
10264
10260
|
});
|
|
10265
10261
|
g.parentNode.appendChild(t), m = t.AJAR_subject;
|
|
@@ -10278,8 +10274,8 @@ function Fn(e, n, r, i, a, o, s, c) {
|
|
|
10278
10274
|
});
|
|
10279
10275
|
}
|
|
10280
10276
|
S("makeSelectForClassifierOptions: data doc = " + s), n.updater.update(l, u, function(t, n, r) {
|
|
10281
|
-
if (f = p(), n) g.disabled = !1, m &&
|
|
10282
|
-
else return g.parentNode.appendChild(
|
|
10277
|
+
if (f = p(), n) g.disabled = !1, m && K(e, o.subForm)(e, g.parentNode, {}, m, o.subForm, s, _);
|
|
10278
|
+
else return g.parentNode.appendChild(I(e, "Error updating data in select: " + r));
|
|
10283
10279
|
c && c(n, {
|
|
10284
10280
|
widget: "select",
|
|
10285
10281
|
event: "change"
|
|
@@ -10310,14 +10306,14 @@ function Fn(e, n, r, i, a, o, s, c) {
|
|
|
10310
10306
|
}
|
|
10311
10307
|
return d && g.addEventListener("change", m, !1), g;
|
|
10312
10308
|
}
|
|
10313
|
-
function
|
|
10309
|
+
function Fn(e, n, r, i, a, o, s, c) {
|
|
10314
10310
|
v("Select list length now " + a.length);
|
|
10315
10311
|
let l = 0, u = {}, d = n.updater.editable(s.uri);
|
|
10316
10312
|
for (let e = 0; e < a.length; e++) {
|
|
10317
10313
|
let t = a[e];
|
|
10318
10314
|
t.uri || k(`makeSelectForOptions: option does not have an uri: ${t}, with predicate: ${i}`), !t.uri || t.uri in u || (u[t.uri] = !0, l++);
|
|
10319
10315
|
}
|
|
10320
|
-
if (l === 0) return
|
|
10316
|
+
if (l === 0) return I(e, "Can't do selector with no options, subject= " + r + " property = " + i + ".");
|
|
10321
10317
|
v("makeSelectForOptions: dataDoc=" + s);
|
|
10322
10318
|
let f, p = function() {
|
|
10323
10319
|
return f = {}, i.sameTerm(h.rdf("type")) ? f = n.findTypeURIs(r) : n.each(r, i, null, s).forEach(function(e) {
|
|
@@ -10339,7 +10335,7 @@ function In(e, n, r, i, a, o, s, c) {
|
|
|
10339
10335
|
for (d = g.superSelect; d && d.currentURI;) u(n.sym(d.currentURI)), d = d.superSelect;
|
|
10340
10336
|
S("selectForOptions: data doc = " + s), n.updater.update(o, l, function(t, n, r) {
|
|
10341
10337
|
if (f = p(), n) g.disabled = !1;
|
|
10342
|
-
else return g.parentNode.appendChild(
|
|
10338
|
+
else return g.parentNode.appendChild(I(e, "Error updating data in select: " + r));
|
|
10343
10339
|
c && c(n, {
|
|
10344
10340
|
widget: "select",
|
|
10345
10341
|
event: "change"
|
|
@@ -10366,25 +10362,25 @@ function In(e, n, r, i, a, o, s, c) {
|
|
|
10366
10362
|
}
|
|
10367
10363
|
return d && g.addEventListener("change", m, !1), g;
|
|
10368
10364
|
}
|
|
10369
|
-
function
|
|
10365
|
+
function In(e, t, n, r, i, a) {
|
|
10370
10366
|
let o = t.any(r, h.owl("disjointUnionOf")), s, c = !1;
|
|
10371
|
-
return o ? s = o.elements : (s = t.each(void 0, h.rdfs("subClassOf"), r), c = !0), v("Select list length " + s.length), s.length === 0 ?
|
|
10367
|
+
return o ? s = o.elements : (s = t.each(void 0, h.rdfs("subClassOf"), r), c = !0), v("Select list length " + s.length), s.length === 0 ? I(e, "Can't do " + (c ? "multiple " : "") + "selector with no subclasses of category: " + r) : s.length === 1 ? I(e, "Can't do " + (c ? "multiple " : "") + "selector with only 1 subclass of category: " + r + ":" + s[1]) : Pn(e, t, n, h.rdf("type"), s, {
|
|
10372
10368
|
multiple: c,
|
|
10373
10369
|
nullLabel: "* Select type *"
|
|
10374
10370
|
}, i, a);
|
|
10375
10371
|
}
|
|
10376
|
-
function
|
|
10372
|
+
function Ln(e, t, n, r, i, a) {
|
|
10377
10373
|
function o() {
|
|
10378
|
-
c &&= (s.removeChild(c), null), u.currentURI && t.any(t.sym(u.currentURI), h.owl("disjointUnionOf")) && (c =
|
|
10374
|
+
c &&= (s.removeChild(c), null), u.currentURI && t.any(t.sym(u.currentURI), h.owl("disjointUnionOf")) && (c = Ln(e, t, n, t.sym(u.currentURI), i, a), u.subSelect = c.firstChild, u.subSelect.superSelect = u, s.appendChild(c));
|
|
10379
10375
|
}
|
|
10380
10376
|
let s = e.createElement("span"), c = null;
|
|
10381
10377
|
function l(e, t) {
|
|
10382
10378
|
e && o(), a(e, t);
|
|
10383
10379
|
}
|
|
10384
|
-
let u =
|
|
10380
|
+
let u = In(e, t, n, r, i, l);
|
|
10385
10381
|
return s.appendChild(u), o(), s;
|
|
10386
10382
|
}
|
|
10387
|
-
function
|
|
10383
|
+
function Rn(e, t, n, r, i, a, o, s) {
|
|
10388
10384
|
let c = e.createElement("div"), l = Et(e, t, c, a, n), u = t.updater.editable(o.uri), d = e.createElement("button"), f = d;
|
|
10389
10385
|
d.style = w.checkboxInputStyle, l.appendChild(d);
|
|
10390
10386
|
function p(e) {
|
|
@@ -10401,7 +10397,7 @@ function zn(e, t, n, r, i, a, o, s) {
|
|
|
10401
10397
|
let n = m(i), o = n;
|
|
10402
10398
|
if (r.length) {
|
|
10403
10399
|
let l = m(r);
|
|
10404
|
-
if (n && l) return c.appendChild(
|
|
10400
|
+
if (n && l) return c.appendChild(I(e, "Inconsistent data in dataDoc!\n" + i + " and\n" + r)), c;
|
|
10405
10401
|
if (!n && !l) {
|
|
10406
10402
|
n = null;
|
|
10407
10403
|
let e = t.any(a, h.ui("default"));
|
|
@@ -10409,9 +10405,9 @@ function zn(e, t, n, r, i, a, o, s) {
|
|
|
10409
10405
|
}
|
|
10410
10406
|
}
|
|
10411
10407
|
d.state = n, d.textContent = {
|
|
10412
|
-
true:
|
|
10413
|
-
false: s ?
|
|
10414
|
-
null:
|
|
10408
|
+
true: _n,
|
|
10409
|
+
false: s ? vn : " ",
|
|
10410
|
+
null: yn
|
|
10415
10411
|
}[o];
|
|
10416
10412
|
}
|
|
10417
10413
|
if (g(), !u) return c;
|
|
@@ -10422,7 +10418,7 @@ function zn(e, t, n, r, i, a, o, s) {
|
|
|
10422
10418
|
let a = !1, o = function() {
|
|
10423
10419
|
return !a && (a = !0, _ = !1, d.disabled = !1, !0);
|
|
10424
10420
|
}, l = function(t) {
|
|
10425
|
-
f.style.color = "#000", f.style.backgroundColor = "#fee", c.appendChild(
|
|
10421
|
+
f.style.color = "#000", f.style.backgroundColor = "#fee", c.appendChild(I(e, `Checkbox: Error updating dataDoc from ${d.state} to ${d.newState}:\n\n${t}`));
|
|
10426
10422
|
};
|
|
10427
10423
|
f.style.color = "#bbb";
|
|
10428
10424
|
let u = d.state === !0 ? i : d.state === !1 ? r : [];
|
|
@@ -10432,9 +10428,9 @@ function zn(e, t, n, r, i, a, o, s) {
|
|
|
10432
10428
|
try {
|
|
10433
10429
|
let e = t.updater.update(u, p, function(e, n, r) {
|
|
10434
10430
|
o() && (n ? (f.style.color = "#000", d.state = d.newState, d.textContent = {
|
|
10435
|
-
true:
|
|
10436
|
-
false:
|
|
10437
|
-
null:
|
|
10431
|
+
true: _n,
|
|
10432
|
+
false: vn,
|
|
10433
|
+
null: yn
|
|
10438
10434
|
}[d.state]) : (u.why && t.holds(u.subject, u.predicate, u.object, u.why) && O(" @@@@@ weird if 409 - does hold statement"), l(r)));
|
|
10439
10435
|
});
|
|
10440
10436
|
e && typeof e.then == "function" && e.catch(function(e) {
|
|
@@ -10451,13 +10447,13 @@ function $(e) {
|
|
|
10451
10447
|
let t = /* @__PURE__ */ new Date();
|
|
10452
10448
|
return n(e.uri + "#id" + ("" + t.getTime()));
|
|
10453
10449
|
}
|
|
10454
|
-
function
|
|
10450
|
+
function zn(e, r, i, a, o, s, c, l, u, d, f) {
|
|
10455
10451
|
let p = {}, m = i.updater.editable(d.uri);
|
|
10456
10452
|
for (let e = 0; e < s.length; e++) {
|
|
10457
10453
|
let t = s[e];
|
|
10458
10454
|
!t.uri || t.uri in p || (p[t.uri] = !0);
|
|
10459
10455
|
}
|
|
10460
|
-
if (Object.keys(p).length === 0 && !u.mint) return
|
|
10456
|
+
if (Object.keys(p).length === 0 && !u.mint) return I(e, "Can't do selector with no options, subject= " + a + " property = " + o + ".");
|
|
10461
10457
|
v("makeSelectForChoice: dataDoc=" + d);
|
|
10462
10458
|
function g() {
|
|
10463
10459
|
let e = "--- choice ---";
|
|
@@ -10483,10 +10479,10 @@ function Bn(e, r, i, a, o, s, c, l, u, d, f) {
|
|
|
10483
10479
|
}, m = function(e) {
|
|
10484
10480
|
i.holds(a, o, e, d) || u.push(t(a, o, e, d)), l && !i.holds(e, h.rdf("type"), i.sym(l), d) && u.push(t(e, h.rdf("type"), i.sym(l), d));
|
|
10485
10481
|
}, g = i.each(a, o, null, d).map((e) => e.value);
|
|
10486
|
-
for (let e of g)
|
|
10482
|
+
for (let e of g) Bn(e, c) || p(n(e));
|
|
10487
10483
|
for (let e of c) e in g || m(n(e));
|
|
10488
10484
|
i.updater.update(s, u, function(t, n, r) {
|
|
10489
|
-
if (!n) return b.parentNode.appendChild(
|
|
10485
|
+
if (!n) return b.parentNode.appendChild(I(e, "Error updating data in select: " + r));
|
|
10490
10486
|
b.refresh(), f && f(n, {
|
|
10491
10487
|
widget: "select",
|
|
10492
10488
|
event: "change"
|
|
@@ -10499,38 +10495,38 @@ function Bn(e, r, i, a, o, s, c, l, u, d, f) {
|
|
|
10499
10495
|
let r = b.options[n];
|
|
10500
10496
|
if (r.selected && r.AJAR_mint) {
|
|
10501
10497
|
if (u.mintClass) {
|
|
10502
|
-
let t =
|
|
10498
|
+
let t = Mn(e, i, a, o, l, u.subForm, d, function(e, t) {
|
|
10503
10499
|
e || f(e, t, { change: "new" });
|
|
10504
10500
|
});
|
|
10505
10501
|
b.parentNode.appendChild(t), p = t.AJAR_subject;
|
|
10506
10502
|
} else p = $(d);
|
|
10507
10503
|
s.push(t(a, o, i.sym(p), d)), l && s.push(t(p, h.rdf("type"), i.sym(l), d)), u.mintStatementsFun && (s = s.concat(u.mintStatementsFun(p))), b.currentURI = p;
|
|
10508
10504
|
}
|
|
10509
|
-
r.AJAR_uri && (r.selected &&
|
|
10505
|
+
r.AJAR_uri && (r.selected && Bn(r.AJAR_uri, c) && (b.currentURI = r.AJAR_uri), Bn(r.AJAR_uri, c) || r.removeAttribute("selected"), Bn(r.AJAR_uri, c) && r.setAttribute("selected", "true"));
|
|
10510
10506
|
}
|
|
10511
|
-
S("selectForOptions: data doc = " + d), b.currentURI && u.subForm && !u.multiSelect &&
|
|
10507
|
+
S("selectForOptions: data doc = " + d), b.currentURI && u.subForm && !u.multiSelect && Cn(e, r, {}, n(b.currentURI), u.subForm, d, function(t, n) {
|
|
10512
10508
|
t ? (i.updater.update([], s, function(t, n, i) {
|
|
10513
|
-
n || r.appendChild(
|
|
10509
|
+
n || r.appendChild(I(e, "Error updating select: " + i));
|
|
10514
10510
|
}), f && f(t, {
|
|
10515
10511
|
widget: "select",
|
|
10516
10512
|
event: "new"
|
|
10517
|
-
})) : r.appendChild(
|
|
10513
|
+
})) : r.appendChild(I(e, "Error updating data in field of select: " + n));
|
|
10518
10514
|
}), b.disabled = !1;
|
|
10519
10515
|
};
|
|
10520
10516
|
function C(t) {
|
|
10521
10517
|
let n = e.createElement("option"), r = i.sym(t), a;
|
|
10522
10518
|
a = u.disambiguate ? x(r, !0) : T(r, !0), n.appendChild(e.createTextNode(a)), n.setAttribute("value", t);
|
|
10523
10519
|
let o = i.any(r, i.sym("http://www.w3.org/ns/ui#backgroundColor"));
|
|
10524
|
-
return o && n.setAttribute("style", "background-color: " + o.value + "; "), n.AJAR_uri = t,
|
|
10520
|
+
return o && n.setAttribute("style", "background-color: " + o.value + "; "), n.AJAR_uri = t, Bn(r.value, c) && n.setAttribute("selected", "true"), n;
|
|
10525
10521
|
}
|
|
10526
10522
|
return m && b.addEventListener("change", y, !1), b;
|
|
10527
10523
|
}
|
|
10528
|
-
function
|
|
10524
|
+
function Bn(e, t) {
|
|
10529
10525
|
let n = 0;
|
|
10530
10526
|
for (; n < t.length; n++) if (t[n] === e) return !0;
|
|
10531
10527
|
return !1;
|
|
10532
10528
|
}
|
|
10533
|
-
function
|
|
10529
|
+
function Vn(e, t, n) {
|
|
10534
10530
|
let r, i, a, o, s, c, l, u, d, f, p, m = {};
|
|
10535
10531
|
m[t.toNT()] = !0;
|
|
10536
10532
|
let h = {}, g = e.transitiveClosure(m, e.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"), !0);
|
|
@@ -10545,88 +10541,88 @@ function Hn(e, t, n) {
|
|
|
10545
10541
|
return h;
|
|
10546
10542
|
}
|
|
10547
10543
|
// src/widgets/index.js
|
|
10548
|
-
var
|
|
10549
|
-
Group: () =>
|
|
10550
|
-
GroupBuilder: () =>
|
|
10551
|
-
GroupPicker: () =>
|
|
10552
|
-
PeoplePicker: () =>
|
|
10553
|
-
Person: () =>
|
|
10554
|
-
addStyleSheet: () =>
|
|
10555
|
-
allClassURIs: () =>
|
|
10556
|
-
appendForm: () =>
|
|
10557
|
-
askName: () =>
|
|
10558
|
-
attachmentList: () =>
|
|
10544
|
+
var Hn = /* @__PURE__ */ o({
|
|
10545
|
+
Group: () => _e,
|
|
10546
|
+
GroupBuilder: () => ve,
|
|
10547
|
+
GroupPicker: () => ge,
|
|
10548
|
+
PeoplePicker: () => he,
|
|
10549
|
+
Person: () => ye,
|
|
10550
|
+
addStyleSheet: () => _t,
|
|
10551
|
+
allClassURIs: () => st,
|
|
10552
|
+
appendForm: () => Tn,
|
|
10553
|
+
askName: () => Ze,
|
|
10554
|
+
attachmentList: () => it,
|
|
10559
10555
|
basicField: () => Y,
|
|
10560
|
-
buildCheckboxForm: () =>
|
|
10561
|
-
button: () =>
|
|
10562
|
-
cancelButton: () =>
|
|
10556
|
+
buildCheckboxForm: () => Rn,
|
|
10557
|
+
button: () => V,
|
|
10558
|
+
cancelButton: () => H,
|
|
10563
10559
|
clearElement: () => Ne,
|
|
10564
10560
|
complain: () => Me,
|
|
10565
|
-
continueButton: () =>
|
|
10566
|
-
createLinkDiv: () =>
|
|
10561
|
+
continueButton: () => Xe,
|
|
10562
|
+
createLinkDiv: () => tt,
|
|
10567
10563
|
createLinkForURI: () => Oe,
|
|
10568
|
-
createNameDiv: () =>
|
|
10569
|
-
defaultAnnotationStore: () =>
|
|
10570
|
-
deleteButtonWithCheck: () =>
|
|
10571
|
-
editFormButton: () =>
|
|
10572
|
-
errorMessageBlock: () =>
|
|
10564
|
+
createNameDiv: () => et,
|
|
10565
|
+
defaultAnnotationStore: () => ot,
|
|
10566
|
+
deleteButtonWithCheck: () => Ye,
|
|
10567
|
+
editFormButton: () => wn,
|
|
10568
|
+
errorMessageBlock: () => I,
|
|
10573
10569
|
extractLogURI: () => Pe,
|
|
10574
10570
|
faviconOrDefault: () => qe,
|
|
10575
|
-
field: () =>
|
|
10576
|
-
fieldFunction: () =>
|
|
10577
|
-
fieldLabel: () =>
|
|
10578
|
-
fieldParams: () =>
|
|
10579
|
-
fieldStore: () =>
|
|
10580
|
-
fileUploadButtonDiv: () =>
|
|
10581
|
-
findClosest: () =>
|
|
10571
|
+
field: () => W,
|
|
10572
|
+
fieldFunction: () => K,
|
|
10573
|
+
fieldLabel: () => J,
|
|
10574
|
+
fieldParams: () => St,
|
|
10575
|
+
fieldStore: () => Dt,
|
|
10576
|
+
fileUploadButtonDiv: () => xt,
|
|
10577
|
+
findClosest: () => Dn,
|
|
10582
10578
|
findImage: () => We,
|
|
10583
10579
|
findImageFromURI: () => Ue,
|
|
10584
10580
|
formatDateTime: () => Ie,
|
|
10585
|
-
formsFor: () =>
|
|
10581
|
+
formsFor: () => On,
|
|
10586
10582
|
iconForClass: () => Ve,
|
|
10587
10583
|
imagesOf: () => Be,
|
|
10588
|
-
index: () =>
|
|
10589
|
-
isAudio: () =>
|
|
10590
|
-
isImage: () =>
|
|
10591
|
-
isVideo: () =>
|
|
10592
|
-
linkButton: () =>
|
|
10584
|
+
index: () => U,
|
|
10585
|
+
isAudio: () => vt,
|
|
10586
|
+
isImage: () => bt,
|
|
10587
|
+
isVideo: () => yt,
|
|
10588
|
+
linkButton: () => lt,
|
|
10593
10589
|
linkIcon: () => De,
|
|
10594
|
-
makeDescription: () =>
|
|
10595
|
-
makeDraggable: () =>
|
|
10596
|
-
makeDropTarget: () =>
|
|
10597
|
-
makeSelectForCategory: () =>
|
|
10598
|
-
makeSelectForChoice: () =>
|
|
10599
|
-
makeSelectForClassifierOptions: () =>
|
|
10600
|
-
makeSelectForNestedCategory: () =>
|
|
10601
|
-
makeSelectForOptions: () =>
|
|
10602
|
-
mostSpecificClassURI: () =>
|
|
10603
|
-
newButton: () =>
|
|
10590
|
+
makeDescription: () => Nn,
|
|
10591
|
+
makeDraggable: () => de,
|
|
10592
|
+
makeDropTarget: () => F,
|
|
10593
|
+
makeSelectForCategory: () => In,
|
|
10594
|
+
makeSelectForChoice: () => zn,
|
|
10595
|
+
makeSelectForClassifierOptions: () => Pn,
|
|
10596
|
+
makeSelectForNestedCategory: () => Ln,
|
|
10597
|
+
makeSelectForOptions: () => Fn,
|
|
10598
|
+
mostSpecificClassURI: () => G,
|
|
10599
|
+
newButton: () => jn,
|
|
10604
10600
|
newThing: () => $,
|
|
10605
|
-
openHrefInOutlineMode: () =>
|
|
10606
|
-
personTR: () =>
|
|
10607
|
-
promptForNew: () =>
|
|
10608
|
-
propertiesForClass: () =>
|
|
10609
|
-
propertyTriage: () =>
|
|
10610
|
-
publicData: () =>
|
|
10611
|
-
refreshTree: () =>
|
|
10612
|
-
removeButton: () =>
|
|
10613
|
-
renderAsDiv: () =>
|
|
10614
|
-
renderAsRow: () =>
|
|
10615
|
-
renderAutoComplete: () =>
|
|
10616
|
-
renderAutocompleteControl: () =>
|
|
10601
|
+
openHrefInOutlineMode: () => at,
|
|
10602
|
+
personTR: () => Qe,
|
|
10603
|
+
promptForNew: () => Mn,
|
|
10604
|
+
propertiesForClass: () => En,
|
|
10605
|
+
propertyTriage: () => ct,
|
|
10606
|
+
publicData: () => Pt,
|
|
10607
|
+
refreshTree: () => rt,
|
|
10608
|
+
removeButton: () => ut,
|
|
10609
|
+
renderAsDiv: () => nt,
|
|
10610
|
+
renderAsRow: () => $e,
|
|
10611
|
+
renderAutoComplete: () => ln,
|
|
10612
|
+
renderAutocompleteControl: () => mn,
|
|
10617
10613
|
renderNameValuePair: () => Et,
|
|
10618
|
-
selectorPanel: () =>
|
|
10619
|
-
selectorPanelRefresh: () =>
|
|
10614
|
+
selectorPanel: () => dt,
|
|
10615
|
+
selectorPanelRefresh: () => ft,
|
|
10620
10616
|
setImage: () => Ke,
|
|
10621
10617
|
setName: () => ze,
|
|
10622
10618
|
setVisible: () => Z,
|
|
10623
10619
|
shortDate: () => Fe,
|
|
10624
10620
|
shortTime: () => Re,
|
|
10625
|
-
sortByLabel: () =>
|
|
10626
|
-
sortBySequence: () =>
|
|
10621
|
+
sortByLabel: () => An,
|
|
10622
|
+
sortBySequence: () => kn,
|
|
10627
10623
|
timestamp: () => Le,
|
|
10628
|
-
uploadFiles: () =>
|
|
10624
|
+
uploadFiles: () => fe
|
|
10629
10625
|
});
|
|
10630
|
-
export {
|
|
10626
|
+
export { F as C, j as D, O as E, k as O, de as S, A as T, rt as _, Ot as a, L as b, H as c, Xe as d, Ye as f, Qe as g, at as h, $ as i, Ne as l, Ve as m, Tn as n, Ze as o, We as p, Rn as r, V as s, Hn as t, Me as u, Ke as v, fe as w, I as x, Fe as y };
|
|
10631
10627
|
|
|
10632
|
-
//# sourceMappingURL=widgets-
|
|
10628
|
+
//# sourceMappingURL=widgets-C92ihtlF.js.map
|