solid-ui 5.0.2-2 → 5.0.2-4
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/_virtual/~icons/lucide/arrow-left.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/arrow-left.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/file.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/file.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/file.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/file.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/pencil.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/pencil.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/pencil.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/pencil.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/share-2.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/share-2.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/share-2.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +1 -0
- package/dist/chunks/DialogProvider-CdesAsw-.js +208 -0
- package/dist/chunks/DialogProvider-CdesAsw-.js.map +1 -0
- package/dist/chunks/ResourceActionsMenu-Bllpr4M5.js +378 -0
- package/dist/chunks/ResourceActionsMenu-Bllpr4M5.js.map +1 -0
- package/dist/chunks/{access-control-modal-Dcg6-f4V.js → access-control-modal-CwmY_Dod.js} +419 -432
- package/dist/chunks/access-control-modal-CwmY_Dod.js.map +1 -0
- package/dist/chunks/{account-D6JK-n7u.js → account-CoHPKKDu.js} +6 -6
- package/dist/chunks/{account-D6JK-n7u.js.map → account-CoHPKKDu.js.map} +1 -1
- package/dist/chunks/{auth-B_abPDvH.js → auth-CocCqS1p.js} +23 -22
- package/dist/chunks/{auth-B_abPDvH.js.map → auth-CocCqS1p.js.map} +1 -1
- package/dist/chunks/{avatar-BR3COVSQ.js → avatar-sNdKdWVO.js} +2 -2
- package/dist/chunks/{avatar-BR3COVSQ.js.map → avatar-sNdKdWVO.js.map} +1 -1
- package/dist/chunks/context-BDrfQ9bN.js +21 -0
- package/dist/chunks/context-BDrfQ9bN.js.map +1 -0
- package/dist/chunks/{dialogs-root-BcQo2XMF.js → dialogs-root-BNF3_SA8.js} +2 -2
- package/dist/chunks/{dialogs-root-BcQo2XMF.js.map → dialogs-root-BNF3_SA8.js.map} +1 -1
- package/dist/chunks/events-CXQHDCs2.js +8 -0
- package/dist/chunks/events-CXQHDCs2.js.map +1 -0
- package/dist/chunks/file-explorer-header-D0TebSYR.js +962 -0
- package/dist/chunks/file-explorer-header-D0TebSYR.js.map +1 -0
- package/dist/chunks/file-explorer-provider-DpjC7uds.js +295 -0
- package/dist/chunks/file-explorer-provider-DpjC7uds.js.map +1 -0
- package/dist/chunks/globe-CsCgZcy5.js +16 -0
- package/dist/chunks/globe-CsCgZcy5.js.map +1 -0
- package/dist/chunks/{guard-bTeM7wd7.js → guard-BOicu9dt.js} +2 -2
- package/dist/chunks/{guard-bTeM7wd7.js.map → guard-BOicu9dt.js.map} +1 -1
- package/dist/chunks/index.esm-C9oV3H3X.js +6 -0
- package/dist/chunks/index.esm-C9oV3H3X.js.map +1 -0
- package/dist/chunks/{jsonld-CnfzCyCn.js → jsonld-D-TE94B0.js} +2 -2
- package/dist/chunks/{jsonld-CnfzCyCn.js.map → jsonld-D-TE94B0.js.map} +1 -1
- package/dist/chunks/{login-button-Div4ZT4J.js → login-button-clTw_9tX.js} +2 -2
- package/dist/chunks/{login-button-Div4ZT4J.js.map → login-button-clTw_9tX.js.map} +1 -1
- package/dist/chunks/{logout-button-D3lqlnCX.js → logout-button-CP-Pz70O.js} +2 -2
- package/dist/chunks/{logout-button-D3lqlnCX.js.map → logout-button-CP-Pz70O.js.map} +1 -1
- package/dist/chunks/provide-z9U64q4m.js +111 -0
- package/dist/chunks/provide-z9U64q4m.js.map +1 -0
- package/dist/chunks/{provider-Dcd1NPYx.js → provider-Cuv3Kp6G.js} +4 -4
- package/dist/chunks/{provider-Dcd1NPYx.js.map → provider-Cuv3Kp6G.js.map} +1 -1
- package/dist/chunks/{rdf-form-CmPnHKR-.js → rdf-form-DVmTw3RG.js} +20 -20
- package/dist/chunks/{rdf-form-CmPnHKR-.js.map → rdf-form-DVmTw3RG.js.map} +1 -1
- package/dist/chunks/{rdf-input-3AgoeCkJ.js → rdf-input-CRYLK-27.js} +42 -42
- package/dist/chunks/{rdf-input-3AgoeCkJ.js.map → rdf-input-CRYLK-27.js.map} +1 -1
- package/dist/chunks/{signup-button-2fAoS0Nv.js → signup-button-CexdMWj6.js} +2 -2
- package/dist/chunks/{signup-button-2fAoS0Nv.js.map → signup-button-CexdMWj6.js.map} +1 -1
- package/dist/chunks/{index.esm-CECfD0e9.js → solidLogicSingleton.esm-BXyHD7mn.js} +1210 -1161
- package/dist/chunks/solidLogicSingleton.esm-BXyHD7mn.js.map +1 -0
- package/dist/chunks/{src-Dx7k_VIe.js → src-DQgHAH3d.js} +4579 -4542
- package/dist/chunks/src-DQgHAH3d.js.map +1 -0
- package/dist/chunks/{style-w0Fl0xnd.js → style-CXaw5EYi.js} +9 -8
- package/dist/chunks/{style-w0Fl0xnd.js.map → style-CXaw5EYi.js.map} +1 -1
- package/dist/chunks/{widgets-BWpm5CPx.js → widgets-BBEQu0CS.js} +722 -721
- package/dist/chunks/{widgets-BWpm5CPx.js.map → widgets-BBEQu0CS.js.map} +1 -1
- package/dist/components/access-control-modal/AccessControlModal.cjs.js +1 -1
- package/dist/components/access-control-modal/AccessControlModal.cjs.js.map +1 -1
- package/dist/components/access-control-modal/AccessControlModal.esm.js +1 -1
- package/dist/components/access-control-modal/AccessControlModal.esm.js.map +1 -1
- package/dist/components/access-control-modal.js +1 -1
- package/dist/components/account.js +1 -1
- package/dist/components/all.cjs.js +1 -1
- package/dist/components/all.esm.js +3 -0
- package/dist/components/avatar.js +1 -1
- package/dist/components/dialog-provider.js +1 -1
- package/dist/components/dialogs-root.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +15 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +20 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +310 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +2 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +6 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +35 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +23 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +318 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +2 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +6 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +35 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +22 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +356 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +2 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +6 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +1 -0
- package/dist/components/file-explorer-header/index.cjs.js +2 -0
- package/dist/components/file-explorer-header/index.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/index.d.ts +4 -0
- package/dist/components/file-explorer-header/index.d.ts.map +1 -0
- package/dist/components/file-explorer-header/index.esm.js +6 -0
- package/dist/components/file-explorer-header/index.esm.js.map +1 -0
- package/dist/components/file-explorer-header/types.d.ts +11 -0
- package/dist/components/file-explorer-header/types.d.ts.map +1 -0
- package/dist/components/file-explorer-header.js +1 -0
- package/dist/components/file-explorer-provider/FileExplorerProvider.cjs.js +2 -0
- package/dist/components/file-explorer-provider/FileExplorerProvider.cjs.js.map +1 -0
- package/dist/components/file-explorer-provider/FileExplorerProvider.d.ts +17 -0
- package/dist/components/file-explorer-provider/FileExplorerProvider.d.ts.map +1 -0
- package/dist/components/file-explorer-provider/FileExplorerProvider.esm.js +297 -0
- package/dist/components/file-explorer-provider/FileExplorerProvider.esm.js.map +1 -0
- package/dist/components/file-explorer-provider/index.cjs.js +2 -0
- package/dist/components/file-explorer-provider/index.cjs.js.map +1 -0
- package/dist/components/file-explorer-provider/index.d.ts +4 -0
- package/dist/components/file-explorer-provider/index.d.ts.map +1 -0
- package/dist/components/file-explorer-provider/index.esm.js +6 -0
- package/dist/components/file-explorer-provider/index.esm.js.map +1 -0
- package/dist/components/file-explorer-provider.js +1 -0
- package/dist/components/guard.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.esm.js +1 -0
- package/dist/components/login-button.js +1 -1
- package/dist/components/login-modal.js +1 -1
- package/dist/components/logout-button.js +1 -1
- package/dist/components/provider.js +1 -1
- package/dist/components/rdf-form.js +1 -1
- package/dist/components/rdf-input.js +1 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +8 -0
- package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +27 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +23 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +344 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +2 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +6 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.test.d.ts +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.test.d.ts.map +1 -0
- package/dist/components/resource-actions-menu/index.cjs.js +1 -0
- package/dist/components/resource-actions-menu/index.d.ts +2 -0
- package/dist/components/resource-actions-menu/index.d.ts.map +1 -0
- package/dist/components/resource-actions-menu/index.esm.js +1 -0
- package/dist/components/resource-actions-menu.js +1 -0
- package/dist/components/signup-button.js +1 -1
- package/dist/components.js +15 -12
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +8 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -9
- package/dist/lib/context/noopContext.cjs.js +2 -0
- package/dist/lib/context/noopContext.cjs.js.map +1 -0
- package/dist/lib/context/noopContext.d.ts +2 -0
- package/dist/lib/context/noopContext.d.ts.map +1 -0
- package/dist/lib/context/noopContext.esm.js +18 -0
- package/dist/lib/context/noopContext.esm.js.map +1 -0
- package/dist/lib/file-explorer/compose-explorer.cjs.js +2 -0
- package/dist/lib/file-explorer/compose-explorer.cjs.js.map +1 -0
- package/dist/lib/file-explorer/compose-explorer.d.ts +17 -0
- package/dist/lib/file-explorer/compose-explorer.d.ts.map +1 -0
- package/dist/lib/file-explorer/compose-explorer.esm.js +18 -0
- package/dist/lib/file-explorer/compose-explorer.esm.js.map +1 -0
- package/dist/lib/file-explorer/context.cjs.js +1 -1
- package/dist/lib/file-explorer/context.cjs.js.map +1 -1
- package/dist/lib/file-explorer/context.d.ts +12 -14
- package/dist/lib/file-explorer/context.d.ts.map +1 -1
- package/dist/lib/file-explorer/context.esm.js +4 -3
- package/dist/lib/file-explorer/context.esm.js.map +1 -1
- package/dist/lib/file-explorer/events.cjs.js +2 -0
- package/dist/lib/file-explorer/events.cjs.js.map +1 -0
- package/dist/lib/file-explorer/events.d.ts +16 -0
- package/dist/lib/file-explorer/events.d.ts.map +1 -0
- package/dist/lib/file-explorer/events.esm.js +8 -0
- package/dist/lib/file-explorer/events.esm.js.map +1 -0
- package/dist/lib/file-explorer/index.cjs.js +1 -0
- package/dist/lib/file-explorer/index.d.ts +5 -0
- package/dist/lib/file-explorer/index.d.ts.map +1 -0
- package/dist/lib/file-explorer/index.esm.js +5 -0
- package/dist/lib/file-explorer/relevant-panes.cjs.js +2 -0
- package/dist/lib/file-explorer/relevant-panes.cjs.js.map +1 -0
- package/dist/lib/file-explorer/relevant-panes.d.ts +22 -0
- package/dist/lib/file-explorer/relevant-panes.d.ts.map +1 -0
- package/dist/lib/file-explorer/relevant-panes.esm.js +23 -0
- package/dist/lib/file-explorer/relevant-panes.esm.js.map +1 -0
- package/dist/loader.js +11 -9
- package/dist/solid-ui.js +211 -107
- package/dist/solid-ui.min.js +211 -107
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/theme.css +1 -1
- package/dist/utils/podUtils.cjs.js +2 -0
- package/dist/utils/podUtils.cjs.js.map +1 -0
- package/dist/utils/podUtils.d.ts +6 -0
- package/dist/utils/podUtils.d.ts.map +1 -0
- package/dist/utils/podUtils.esm.js +22 -0
- package/dist/utils/podUtils.esm.js.map +1 -0
- package/dist/utils/webIdUtils.cjs.js +1 -0
- package/dist/utils/webIdUtils.d.ts +7 -0
- package/dist/utils/webIdUtils.d.ts.map +1 -0
- package/dist/utils/webIdUtils.esm.js +3 -0
- package/package.json +3 -3
- package/dist/chunks/DialogProvider-C89v7x0r.js +0 -314
- package/dist/chunks/DialogProvider-C89v7x0r.js.map +0 -1
- package/dist/chunks/access-control-modal-Dcg6-f4V.js.map +0 -1
- package/dist/chunks/index.esm-CECfD0e9.js.map +0 -1
- package/dist/chunks/src-Dx7k_VIe.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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-BXyHD7mn.js";
|
|
2
|
+
import { r as g, t as _ } from "./index.esm-C9oV3H3X.js";
|
|
3
|
+
import { a as v, c as y, f as b, i as x, n as S, o as C, p as w, s as T, t as E, u as D } from "./style-CXaw5EYi.js";
|
|
3
4
|
// src/lib/debug.ts
|
|
4
5
|
function O(...e) {
|
|
5
6
|
console.log(...e);
|
|
@@ -14,7 +15,7 @@ function j(...e) {
|
|
|
14
15
|
console.trace(...e);
|
|
15
16
|
}
|
|
16
17
|
// node_modules/escape-html/index.js
|
|
17
|
-
var M = /* @__PURE__ */
|
|
18
|
+
var M = /* @__PURE__ */ f(((e, t) => {
|
|
18
19
|
var n = /["'&<>]/;
|
|
19
20
|
t.exports = r;
|
|
20
21
|
function r(e) {
|
|
@@ -70,7 +71,7 @@ function ne(e, t, n) {
|
|
|
70
71
|
return P(r);
|
|
71
72
|
}
|
|
72
73
|
// node_modules/mime-db/db.json
|
|
73
|
-
var re = /* @__PURE__ */
|
|
74
|
+
var re = /* @__PURE__ */ o({ default: () => ie }), ie, ae = r((() => {
|
|
74
75
|
ie = {
|
|
75
76
|
"application/1d-interleaved-parityfec": { source: "iana" },
|
|
76
77
|
"application/3gpdash-qoe-report+xml": {
|
|
@@ -7690,9 +7691,9 @@ var re = /* @__PURE__ */ u({ default: () => ie }), ie, ae = n((() => {
|
|
|
7690
7691
|
"x-shader/x-fragment": { compressible: !0 },
|
|
7691
7692
|
"x-shader/x-vertex": { compressible: !0 }
|
|
7692
7693
|
};
|
|
7693
|
-
})), oe = /* @__PURE__ */
|
|
7694
|
-
t.exports = (ae(),
|
|
7695
|
-
})), se = /* @__PURE__ */
|
|
7694
|
+
})), oe = /* @__PURE__ */ f(((e, t) => {
|
|
7695
|
+
t.exports = (ae(), p(re).default);
|
|
7696
|
+
})), se = /* @__PURE__ */ f(((e, t) => {
|
|
7696
7697
|
function n(e) {
|
|
7697
7698
|
if (typeof e != "string") throw TypeError("Path must be a string. Received " + JSON.stringify(e));
|
|
7698
7699
|
}
|
|
@@ -7854,7 +7855,7 @@ var re = /* @__PURE__ */ u({ default: () => ie }), ie, ae = n((() => {
|
|
|
7854
7855
|
posix: null
|
|
7855
7856
|
};
|
|
7856
7857
|
a.posix = a, t.exports = a;
|
|
7857
|
-
})), ce = /* @__PURE__ */
|
|
7858
|
+
})), ce = /* @__PURE__ */ f(((e, t) => {
|
|
7858
7859
|
var n = {
|
|
7859
7860
|
"prs.": 100,
|
|
7860
7861
|
"x-": 200,
|
|
@@ -7878,7 +7879,7 @@ var re = /* @__PURE__ */ u({ default: () => ie }), ie, ae = n((() => {
|
|
|
7878
7879
|
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;
|
|
7879
7880
|
return s + c + l + u;
|
|
7880
7881
|
};
|
|
7881
|
-
})), le = /* @__PURE__ */
|
|
7882
|
+
})), le = /* @__PURE__ */ a((/* @__PURE__ */ f(((e) => {
|
|
7882
7883
|
var t = oe(), n = se().extname, r = ce(), i = /^\s*([^;\s]*)(?:;|\s|$)/, a = /^text\//i;
|
|
7883
7884
|
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);
|
|
7884
7885
|
function o(e) {
|
|
@@ -8040,7 +8041,7 @@ O(" icons.iconBase is set to : " + R.iconBase);
|
|
|
8040
8041
|
var pe = R.iconBase;
|
|
8041
8042
|
R.originalIconBase;
|
|
8042
8043
|
// src/widgets/peoplePicker.js
|
|
8043
|
-
var z = /* @__PURE__ */
|
|
8044
|
+
var z = /* @__PURE__ */ a(M()), B = m.store, me = class {
|
|
8044
8045
|
constructor(e, t, n, r) {
|
|
8045
8046
|
this.options = r || {}, this.element = e, this.typeIndex = t, this.groupPickedCb = n, this.selectedgroup = this.options.selectedgroup, this.onSelectGroup = this.onSelectGroup.bind(this);
|
|
8046
8047
|
}
|
|
@@ -8076,27 +8077,27 @@ var z = /* @__PURE__ */ d(M()), B = f.store, me = class {
|
|
|
8076
8077
|
return new Promise((t, n) => {
|
|
8077
8078
|
B.fetcher.nowOrWhenFetched(e, (r, i) => {
|
|
8078
8079
|
if (!r) return n(i);
|
|
8079
|
-
let
|
|
8080
|
-
if (!
|
|
8081
|
-
let
|
|
8082
|
-
if (!
|
|
8083
|
-
B.fetcher.load(
|
|
8084
|
-
return t({ book:
|
|
8080
|
+
let a = B.any(null, h.solid("forClass"), h.vcard("AddressBook"));
|
|
8081
|
+
if (!a) return n(/* @__PURE__ */ Error("no address book registered in the solid type index " + e));
|
|
8082
|
+
let o = B.any(a, h.solid("instance"));
|
|
8083
|
+
if (!o) return n(/* @__PURE__ */ Error("incomplete address book registration"));
|
|
8084
|
+
B.fetcher.load(o).then(function(e) {
|
|
8085
|
+
return t({ book: o });
|
|
8085
8086
|
}).catch(function(e) {
|
|
8086
8087
|
return n(/* @__PURE__ */ Error("Could not load address book " + e));
|
|
8087
8088
|
});
|
|
8088
8089
|
});
|
|
8089
8090
|
});
|
|
8090
8091
|
}
|
|
8091
|
-
createNewGroup(
|
|
8092
|
-
let { groupIndex:
|
|
8093
|
-
let
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
] : [
|
|
8098
|
-
return be(n.uri, { toIns:
|
|
8099
|
-
|
|
8092
|
+
createNewGroup(e, r) {
|
|
8093
|
+
let { groupIndex: i, groupContainer: a } = xe(e), o = n(`${a.uri}${te().slice(0, 8)}.ttl#this`), s = r || "Untitled Group", c = [o.doc(), i].map((n) => {
|
|
8094
|
+
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
|
+
r,
|
|
8096
|
+
a,
|
|
8097
|
+
c
|
|
8098
|
+
] : [r, a];
|
|
8099
|
+
return be(n.uri, { toIns: l }).then(() => {
|
|
8100
|
+
l.forEach((e) => {
|
|
8100
8101
|
B.add(e);
|
|
8101
8102
|
});
|
|
8102
8103
|
});
|
|
@@ -8126,7 +8127,7 @@ var z = /* @__PURE__ */ d(M()), B = f.store, me = class {
|
|
|
8126
8127
|
loadGroups() {
|
|
8127
8128
|
return new Promise((e, t) => {
|
|
8128
8129
|
let { groupIndex: n } = xe(this.book);
|
|
8129
|
-
B.fetcher.nowOrWhenFetched(n, (n, r) => n ? e(B.each(this.book,
|
|
8130
|
+
B.fetcher.nowOrWhenFetched(n, (n, r) => n ? e(B.each(this.book, h.vcard("includesGroup"))) : t(r));
|
|
8130
8131
|
});
|
|
8131
8132
|
}
|
|
8132
8133
|
handleClickGroup(e) {
|
|
@@ -8140,7 +8141,7 @@ var z = /* @__PURE__ */ d(M()), B = f.store, me = class {
|
|
|
8140
8141
|
}
|
|
8141
8142
|
render() {
|
|
8142
8143
|
let e = document.createElement("div");
|
|
8143
|
-
return e.textContent = (0, z.default)(ye(this.group,
|
|
8144
|
+
return e.textContent = (0, z.default)(ye(this.group, h.vcard("fn"), `[${this.group.value}]`)), this.element.innerHTML = "", this.element.appendChild(e), this;
|
|
8144
8145
|
}
|
|
8145
8146
|
}, _e = class {
|
|
8146
8147
|
constructor(e, t, n, r, i) {
|
|
@@ -8159,13 +8160,13 @@ var z = /* @__PURE__ */ d(M()), B = f.store, me = class {
|
|
|
8159
8160
|
});
|
|
8160
8161
|
});
|
|
8161
8162
|
let t = document.createElement("input");
|
|
8162
|
-
t.type = "text", t.value = ye(this.group,
|
|
8163
|
+
t.type = "text", t.value = ye(this.group, h.vcard("fn"), "Untitled Group"), t.addEventListener("change", (e) => {
|
|
8163
8164
|
this.setGroupName(e.target.value).catch((e) => {
|
|
8164
8165
|
this.element.appendChild(L(document, `Error changing group name. (${e})`));
|
|
8165
8166
|
});
|
|
8166
8167
|
});
|
|
8167
8168
|
let n = document.createElement("label");
|
|
8168
|
-
if (n.textContent = (0, z.default)("Group Name:"), n.appendChild(t), e.appendChild(n), B.any(this.group,
|
|
8169
|
+
if (n.textContent = (0, z.default)("Group Name:"), n.appendChild(t), e.appendChild(n), B.any(this.group, h.vcard("hasMember"))) B.match(this.group, h.vcard("hasMember")).forEach((t) => {
|
|
8169
8170
|
let n = t.object, r = document.createElement("div");
|
|
8170
8171
|
new ve(r, n, this.handleRemove(n)).render(), e.appendChild(r);
|
|
8171
8172
|
});
|
|
@@ -8180,37 +8181,37 @@ var z = /* @__PURE__ */ d(M()), B = f.store, me = class {
|
|
|
8180
8181
|
this.doneBuildingCb(this.group);
|
|
8181
8182
|
}), e.appendChild(r), this.element.innerHTML = "", this.element.appendChild(e), this;
|
|
8182
8183
|
}
|
|
8183
|
-
add(
|
|
8184
|
-
return new Promise((
|
|
8185
|
-
B.fetcher.nowOrWhenFetched(
|
|
8186
|
-
if (!
|
|
8187
|
-
let o =
|
|
8188
|
-
return !s || !s.equals(
|
|
8184
|
+
add(e) {
|
|
8185
|
+
return new Promise((t, r) => {
|
|
8186
|
+
B.fetcher.nowOrWhenFetched(e, (i, a) => {
|
|
8187
|
+
if (!i) return this.onGroupChanged(a), r(a);
|
|
8188
|
+
let o = n(e), s = B.any(o, h.rdf("type"));
|
|
8189
|
+
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);
|
|
8189
8190
|
});
|
|
8190
|
-
}).then((
|
|
8191
|
-
let n =
|
|
8192
|
-
return B.holdsStatement(n) ?
|
|
8193
|
-
n.why = this.group.doc(), B.add(n), this.onGroupChanged(null, "added",
|
|
8191
|
+
}).then((e) => {
|
|
8192
|
+
let n = t(this.group, h.vcard("hasMember"), e);
|
|
8193
|
+
return B.holdsStatement(n) ? e : be(this.group.doc().uri, { toIns: [n] }).then(() => {
|
|
8194
|
+
n.why = this.group.doc(), B.add(n), this.onGroupChanged(null, "added", e), this.render();
|
|
8194
8195
|
});
|
|
8195
8196
|
});
|
|
8196
8197
|
}
|
|
8197
|
-
handleRemove(
|
|
8198
|
+
handleRemove(e) {
|
|
8198
8199
|
return (n) => {
|
|
8199
|
-
let r =
|
|
8200
|
-
return be(this.group.doc().uri, { toDel: [r] }).then(() => (B.remove(r), this.onGroupChanged(null, "removed",
|
|
8201
|
-
let n = B.any(
|
|
8200
|
+
let r = t(this.group, h.vcard("hasMember"), e);
|
|
8201
|
+
return be(this.group.doc().uri, { toDel: [r] }).then(() => (B.remove(r), this.onGroupChanged(null, "removed", e), this.render(), !0)).catch((t) => {
|
|
8202
|
+
let n = B.any(e, h.foaf("name")), r = n && n.value ? `Could not remove ${n.value}. (${t})` : `Could not remove ${e.value}. (${t})`;
|
|
8202
8203
|
throw Error(r);
|
|
8203
8204
|
});
|
|
8204
8205
|
};
|
|
8205
8206
|
}
|
|
8206
|
-
setGroupName(
|
|
8207
|
+
setGroupName(e) {
|
|
8207
8208
|
let { groupIndex: n } = xe(this.book), r = [this.group.doc(), n].map((n) => {
|
|
8208
|
-
let r = B.match(this.group,
|
|
8209
|
+
let r = B.match(this.group, h.vcard("fn"), null, n), i = t(this.group, h.vcard("fn"), u(e));
|
|
8209
8210
|
return be(n.value, {
|
|
8210
8211
|
toDel: r,
|
|
8211
|
-
toIns: [
|
|
8212
|
+
toIns: [i]
|
|
8212
8213
|
}).then((e) => {
|
|
8213
|
-
B.removeStatements(r),
|
|
8214
|
+
B.removeStatements(r), i.why = n, B.add(i);
|
|
8214
8215
|
});
|
|
8215
8216
|
});
|
|
8216
8217
|
return Promise.all(r);
|
|
@@ -8222,14 +8223,14 @@ var z = /* @__PURE__ */ d(M()), B = f.store, me = class {
|
|
|
8222
8223
|
render() {
|
|
8223
8224
|
let e = document.createElement("div");
|
|
8224
8225
|
e.style.display = "flex";
|
|
8225
|
-
let t = ye(this.webIdNode,
|
|
8226
|
+
let t = ye(this.webIdNode, h.foaf("img"), pe + "noun_15059.svg"), n = document.createElement("img");
|
|
8226
8227
|
n.src = (0, z.default)(t), n.width = "50", n.height = "50", n.style.margin = "5px";
|
|
8227
|
-
let r = ye(this.webIdNode,
|
|
8228
|
+
let r = ye(this.webIdNode, h.foaf("name"), `[${this.webIdNode}]`), i = document.createElement("span");
|
|
8228
8229
|
i.innerHTML = (0, z.default)(r), i.style.flexGrow = "1", i.style.margin = "auto 0";
|
|
8229
|
-
let
|
|
8230
|
-
return
|
|
8230
|
+
let a = document.createElement("button");
|
|
8231
|
+
return a.textContent = "Remove", a.addEventListener("click", (e) => this.handleRemove().catch((e) => {
|
|
8231
8232
|
this.element.appendChild(L(document, (0, z.default)(`${e}`)));
|
|
8232
|
-
})),
|
|
8233
|
+
})), a.style.margin = "5px", e.appendChild(n), e.appendChild(i), e.appendChild(a), this.element.innerHTML = "", this.element.appendChild(e), this;
|
|
8233
8234
|
}
|
|
8234
8235
|
};
|
|
8235
8236
|
function ye(e, t, n) {
|
|
@@ -8246,7 +8247,7 @@ function be(e, { toDel: t, toIns: n }) {
|
|
|
8246
8247
|
}
|
|
8247
8248
|
function xe(e) {
|
|
8248
8249
|
return {
|
|
8249
|
-
groupIndex: B.any(e,
|
|
8250
|
+
groupIndex: B.any(e, h.vcard("groupIndex")),
|
|
8250
8251
|
groupContainer: B.sym(e.dir().uri + "Group/")
|
|
8251
8252
|
};
|
|
8252
8253
|
}
|
|
@@ -8344,10 +8345,10 @@ function Re() {
|
|
|
8344
8345
|
return Ie(/* @__PURE__ */ new Date(), "{Hours}:{Minutes}:{Seconds}.{Milliseconds}");
|
|
8345
8346
|
}
|
|
8346
8347
|
function ze(e, t) {
|
|
8347
|
-
let n =
|
|
8348
|
-
let t = n.any(e,
|
|
8348
|
+
let n = g, r = function(e) {
|
|
8349
|
+
let t = n.any(e, h.vcard("fn")) || n.any(e, h.foaf("name")) || n.any(e, h.vcard("organization-name"));
|
|
8349
8350
|
return t ? t.value : null;
|
|
8350
|
-
}, i = t.sameTerm(
|
|
8351
|
+
}, i = t.sameTerm(h.foaf("Agent")) ? "Everyone" : r(t);
|
|
8351
8352
|
if (e.textContent = i || D(t), !i && t.uri) {
|
|
8352
8353
|
if (!n.fetcher) throw Error("kb has no fetcher");
|
|
8353
8354
|
n.fetcher.nowOrWhenFetched(t.doc(), void 0, function(n) {
|
|
@@ -8356,7 +8357,7 @@ function ze(e, t) {
|
|
|
8356
8357
|
}
|
|
8357
8358
|
}
|
|
8358
8359
|
function Be(e, t) {
|
|
8359
|
-
return t.each(e,
|
|
8360
|
+
return t.each(e, h.sioc("avatar")).concat(t.each(e, h.foaf("img"))).concat(t.each(e, h.vcard("logo"))).concat(t.each(e, h.vcard("hasPhoto"))).concat(t.each(e, h.vcard("photo"))).concat(t.each(e, h.foaf("depiction")));
|
|
8360
8361
|
}
|
|
8361
8362
|
var Ve = {
|
|
8362
8363
|
"solid:AppProviderClass": "noun_144.svg",
|
|
@@ -8395,13 +8396,13 @@ function Ue(e) {
|
|
|
8395
8396
|
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";
|
|
8396
8397
|
}
|
|
8397
8398
|
function We(e) {
|
|
8398
|
-
let t =
|
|
8399
|
-
if (e.sameTerm(
|
|
8400
|
-
let r = t.any(e,
|
|
8399
|
+
let t = g, n = V;
|
|
8400
|
+
if (e.sameTerm(h.foaf("Agent")) || e.sameTerm(h.rdf("Resource"))) return n + "noun_98053.svg";
|
|
8401
|
+
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"));
|
|
8401
8402
|
return r ? r.uri : null;
|
|
8402
8403
|
}
|
|
8403
8404
|
function Ge(e, t, n) {
|
|
8404
|
-
let r =
|
|
8405
|
+
let r = g, i = We(t);
|
|
8405
8406
|
if (i) return e.setAttribute("src", i), !0;
|
|
8406
8407
|
let a = n[t.uri];
|
|
8407
8408
|
if (a) return e.setAttribute("src", a), e.style = E.classIconStyle, !0;
|
|
@@ -8412,10 +8413,10 @@ function Ge(e, t, n) {
|
|
|
8412
8413
|
return e.setAttribute("src", V + "noun_10636_grey.svg"), !1;
|
|
8413
8414
|
}
|
|
8414
8415
|
function Ke(e, t) {
|
|
8415
|
-
let n =
|
|
8416
|
+
let n = g, r = {};
|
|
8416
8417
|
for (let e in Ve) {
|
|
8417
|
-
let t = e.split(":")[0], n = e.split(":")[1], i =
|
|
8418
|
-
|
|
8418
|
+
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, V);
|
|
8419
8420
|
}
|
|
8420
8421
|
if (!Ge(e, t, r) && t.uri) {
|
|
8421
8422
|
if (!n.fetcher) throw Error("kb has no fetcher");
|
|
@@ -8522,24 +8523,24 @@ function W(e, t) {
|
|
|
8522
8523
|
function Ye(e, t) {
|
|
8523
8524
|
return U(e, Ae, "Continue", t);
|
|
8524
8525
|
}
|
|
8525
|
-
function Xe(e, t, n, r, i,
|
|
8526
|
-
return new Promise(function(t,
|
|
8527
|
-
let
|
|
8528
|
-
r ||=
|
|
8529
|
-
let
|
|
8530
|
-
|
|
8531
|
-
let
|
|
8532
|
-
|
|
8533
|
-
function
|
|
8534
|
-
|
|
8526
|
+
function Xe(e, t, n, r, i, a) {
|
|
8527
|
+
return new Promise(function(t, o) {
|
|
8528
|
+
let s = e.createElement("div");
|
|
8529
|
+
r ||= h.foaf("name"), a ||= i ? D(i) : " ";
|
|
8530
|
+
let c = a + " " + D(r) + ": ";
|
|
8531
|
+
s.appendChild(e.createElement("p")).textContent = c;
|
|
8532
|
+
let l = e.createElement("input");
|
|
8533
|
+
l.setAttribute("type", "text"), l.setAttribute("size", "100"), l.setAttribute("maxLength", "2048"), l.setAttribute("style", E.textInputStyle), l.select(), s.appendChild(l), n.appendChild(s);
|
|
8534
|
+
function u() {
|
|
8535
|
+
s.parentNode.removeChild(s), t(l.value.trim());
|
|
8535
8536
|
}
|
|
8536
|
-
|
|
8537
|
-
e.keyCode === 13 &&
|
|
8538
|
-
}, !1),
|
|
8539
|
-
|
|
8540
|
-
})),
|
|
8541
|
-
|
|
8542
|
-
})),
|
|
8537
|
+
l.addEventListener("keyup", function(e) {
|
|
8538
|
+
e.keyCode === 13 && u();
|
|
8539
|
+
}, !1), s.appendChild(e.createElement("br")), s.appendChild(W(e, function(e) {
|
|
8540
|
+
s.parentNode.removeChild(s), t(null);
|
|
8541
|
+
})), s.appendChild(Ye(e, function(e) {
|
|
8542
|
+
u();
|
|
8543
|
+
})), l.focus();
|
|
8543
8544
|
});
|
|
8544
8545
|
}
|
|
8545
8546
|
var Ze = Qe;
|
|
@@ -8581,65 +8582,65 @@ function nt(e) {
|
|
|
8581
8582
|
if (e.refresh) e.refresh();
|
|
8582
8583
|
else for (let t = 0; t < e.children.length; t++) nt(e.children[t]);
|
|
8583
8584
|
}
|
|
8584
|
-
function rt(
|
|
8585
|
-
let o = /* @__PURE__ */ new Set(), s = !!(
|
|
8586
|
-
let
|
|
8587
|
-
if (!
|
|
8588
|
-
return new Promise((i) =>
|
|
8585
|
+
function rt(e, r, i, a = {}) {
|
|
8586
|
+
let o = /* @__PURE__ */ new Set(), s = !!(a.renderSupportingInfo || a.renderNameSuffix), c = a.refreshOnDocumentLoad ?? !0, l = function(e) {
|
|
8587
|
+
let n = x.updater;
|
|
8588
|
+
if (!n) throw Error("kb has no updater");
|
|
8589
|
+
return new Promise((i) => n.update(t(r, y, e, m), [], function(e, t, n, r) {
|
|
8589
8590
|
t ? d() : Me(void 0, "Error deleting one: " + n), i();
|
|
8590
8591
|
}));
|
|
8591
8592
|
};
|
|
8592
|
-
function u(
|
|
8593
|
-
let n =
|
|
8594
|
-
if (r.renderSupportingInfo =
|
|
8595
|
-
let
|
|
8596
|
-
|
|
8597
|
-
o.delete(
|
|
8593
|
+
function u(t) {
|
|
8594
|
+
let n = t, r = { noun: b };
|
|
8595
|
+
if (r.renderSupportingInfo = a.renderSupportingInfo, r.renderNameSuffix = a.renderNameSuffix, r.confirmationContainer = a.confirmationContainer, s && c && t?.uri && x.fetcher) {
|
|
8596
|
+
let e = t.doc(), n = e?.uri ? x.fetcher.requested?.[e.uri] : void 0, r = n !== "done" && n !== "failed";
|
|
8597
|
+
e?.uri && r && !o.has(e.uri) && (o.add(e.uri), x.fetcher.nowOrWhenFetched(e, void 0, () => {
|
|
8598
|
+
o.delete(e.uri), d();
|
|
8598
8599
|
}));
|
|
8599
8600
|
}
|
|
8600
8601
|
return _ && (r.deleteFunction = function() {
|
|
8601
8602
|
return l(n);
|
|
8602
|
-
}), Ze(
|
|
8603
|
+
}), Ze(e, y, t, r);
|
|
8603
8604
|
}
|
|
8604
8605
|
let d = function() {
|
|
8605
|
-
let e = x.each(
|
|
8606
|
+
let e = x.each(r, y);
|
|
8606
8607
|
e.sort(), T(E, e, u, s ? function(e, t) {
|
|
8607
8608
|
return u(t);
|
|
8608
8609
|
} : void 0);
|
|
8609
8610
|
};
|
|
8610
|
-
function f(
|
|
8611
|
-
let
|
|
8612
|
-
if (
|
|
8613
|
-
let
|
|
8614
|
-
O("Dropped on attachemnt " +
|
|
8611
|
+
function f(e) {
|
|
8612
|
+
let i = [];
|
|
8613
|
+
if (e.forEach(function(e) {
|
|
8614
|
+
let a = n(e);
|
|
8615
|
+
O("Dropped on attachemnt " + e), i.push(t(r, y, a, m));
|
|
8615
8616
|
}), !x.updater) throw Error("kb has no updater");
|
|
8616
|
-
x.updater.update([],
|
|
8617
|
+
x.updater.update([], i, function(e, t, n, r) {
|
|
8617
8618
|
t ? d() : Me(void 0, "Error adding one: " + n);
|
|
8618
8619
|
});
|
|
8619
8620
|
}
|
|
8620
|
-
function
|
|
8621
|
-
de(x.fetcher,
|
|
8622
|
-
let i = [
|
|
8621
|
+
function p(e) {
|
|
8622
|
+
de(x.fetcher, e, a.uploadFolder?.uri, a.uploadFolder?.uri, function(e, n) {
|
|
8623
|
+
let i = [t(r, y, x.sym(n), m)];
|
|
8623
8624
|
if (!x.updater) throw Error("kb has no updater");
|
|
8624
8625
|
x.updater.update([], i, function(e, t, n, r) {
|
|
8625
8626
|
t ? d() : Me(void 0, "Error adding link to uploaded file: " + n);
|
|
8626
8627
|
});
|
|
8627
8628
|
});
|
|
8628
8629
|
}
|
|
8629
|
-
let
|
|
8630
|
-
|
|
8631
|
-
let _ =
|
|
8630
|
+
let m = a.doc || r.doc();
|
|
8631
|
+
a.modify === void 0 && (a.modify = !0);
|
|
8632
|
+
let _ = a.modify, v = a.promptIcon || V + "noun_748003.svg", y = a.predicate || h.wf("attachment"), b = a.noun || "attachment", x = g, S = i.appendChild(e.createElement("table"));
|
|
8632
8633
|
S.setAttribute("style", "margin-top: 1em; margin-bottom: 1em;");
|
|
8633
|
-
let C = S.appendChild(
|
|
8634
|
-
if (E.appendChild(
|
|
8635
|
-
let
|
|
8636
|
-
w.appendChild(
|
|
8637
|
-
let n =
|
|
8638
|
-
I(
|
|
8639
|
-
let r =
|
|
8640
|
-
if (r && I(r, f, n), I(w, f, n),
|
|
8641
|
-
let
|
|
8642
|
-
w.appendChild(
|
|
8634
|
+
let C = S.appendChild(e.createElement("tr")), w = C.appendChild(e.createElement("td")), E = C.appendChild(e.createElement("td")).appendChild(e.createElement("table"));
|
|
8635
|
+
if (E.appendChild(e.createElement("tr")), S.refresh = d, d(), _) {
|
|
8636
|
+
let t = U(e, v, "Drop attachments here");
|
|
8637
|
+
w.appendChild(t);
|
|
8638
|
+
let n = a.uploadFolder ? p : null;
|
|
8639
|
+
I(t, f, n);
|
|
8640
|
+
let r = t.querySelector("img");
|
|
8641
|
+
if (r && I(r, f, n), I(w, f, n), a.uploadFolder) {
|
|
8642
|
+
let t = bt(e, p);
|
|
8643
|
+
w.appendChild(t);
|
|
8643
8644
|
}
|
|
8644
8645
|
}
|
|
8645
8646
|
return S;
|
|
@@ -8649,7 +8650,7 @@ function it(e) {
|
|
|
8649
8650
|
let t = v(e).getAttribute("href");
|
|
8650
8651
|
if (!t) return O("openHrefInOutlineMode: No href found!\n");
|
|
8651
8652
|
let n = window.document;
|
|
8652
|
-
n.outlineManager ? n.outlineManager.GotoSubject(
|
|
8653
|
+
n.outlineManager ? n.outlineManager.GotoSubject(g.sym(t), !0, void 0, !0, void 0) : window && window.panes && window.panes.getOutliner ? window.panes.getOutliner().GotoSubject(g.sym(t), !0, void 0, !0, void 0) : O("ERROR: Can't access outline manager in this config");
|
|
8653
8654
|
}
|
|
8654
8655
|
function at(e) {
|
|
8655
8656
|
if (e.uri === void 0) return;
|
|
@@ -8663,27 +8664,27 @@ function at(e) {
|
|
|
8663
8664
|
if (e < 0) return;
|
|
8664
8665
|
t = t.slice(0, e);
|
|
8665
8666
|
}
|
|
8666
|
-
return
|
|
8667
|
+
return g.sym("http://tabulator.org/wiki/annnotation/" + t);
|
|
8667
8668
|
}
|
|
8668
8669
|
function ot() {
|
|
8669
8670
|
let e = {};
|
|
8670
|
-
return
|
|
8671
|
+
return g.statementsMatching(void 0, h.rdf("type"), void 0).forEach(function(t) {
|
|
8671
8672
|
t.object.value && (e[t.object.value] = !0);
|
|
8672
|
-
}),
|
|
8673
|
+
}), g.statementsMatching(void 0, h.rdfs("subClassOf"), void 0).forEach(function(t) {
|
|
8673
8674
|
t.object.value && (e[t.object.value] = !0), t.subject.value && (e[t.subject.value] = !0);
|
|
8674
|
-
}),
|
|
8675
|
+
}), g.each(void 0, h.rdf("type"), h.rdfs("Class")).forEach(function(t) {
|
|
8675
8676
|
t.value && (e[t.value] = !0);
|
|
8676
8677
|
}), e;
|
|
8677
8678
|
}
|
|
8678
8679
|
function st(e) {
|
|
8679
|
-
let t = {}, n = {}, r = {}, i = 0,
|
|
8680
|
-
for (let e in
|
|
8681
|
-
let
|
|
8682
|
-
for (let e = 0; e <
|
|
8683
|
-
let t =
|
|
8684
|
-
!r[t] && !n[t] && (n[t] = !0, r[t] = !0,
|
|
8685
|
-
}
|
|
8686
|
-
return t.op = r, t.dp = n, w(`propertyTriage: ${i} non-lit, ${
|
|
8680
|
+
let t = {}, n = {}, r = {}, i = 0, a = 0, o = 0, s = e.predicateIndex;
|
|
8681
|
+
for (let e in s) s[e][0].object.termType === "Literal" ? (n[e] = !0, a++) : (r[e] = !0, i++);
|
|
8682
|
+
let c = e.each(void 0, h.rdf("type"), h.rdf("Property"));
|
|
8683
|
+
for (let e = 0; e < c.length; e++) {
|
|
8684
|
+
let t = c[e].toNT();
|
|
8685
|
+
!r[t] && !n[t] && (n[t] = !0, r[t] = !0, o++);
|
|
8686
|
+
}
|
|
8687
|
+
return t.op = r, t.dp = n, w(`propertyTriage: ${i} non-lit, ${a} literal. ${o} unknown.`), t;
|
|
8687
8688
|
}
|
|
8688
8689
|
function ct(e, t) {
|
|
8689
8690
|
let n = e.createElement("button");
|
|
@@ -8732,7 +8733,7 @@ function ft(e, t) {
|
|
|
8732
8733
|
return n.textContent = D(t), n;
|
|
8733
8734
|
}
|
|
8734
8735
|
function pt(e) {
|
|
8735
|
-
let t = G.twoLine[e.uri], n =
|
|
8736
|
+
let t = G.twoLine[e.uri], n = g;
|
|
8736
8737
|
if (t) return t;
|
|
8737
8738
|
let r = n.findSuperClassesNT(e);
|
|
8738
8739
|
for (let e in r) if (t = G.twoLine[n.fromNT(e).uri], t) return t;
|
|
@@ -8740,7 +8741,7 @@ function pt(e) {
|
|
|
8740
8741
|
}
|
|
8741
8742
|
function mt(e, t) {
|
|
8742
8743
|
let n = "", r = function(e) {
|
|
8743
|
-
let r =
|
|
8744
|
+
let r = g.any(t, h.qu(e));
|
|
8744
8745
|
return r || (n += "@@ No value for " + e + "! "), r ? x(r.value) : "?";
|
|
8745
8746
|
}, i = e.createElement("table");
|
|
8746
8747
|
return i.innerHTML = `
|
|
@@ -8757,16 +8758,16 @@ function mt(e, t) {
|
|
|
8757
8758
|
}
|
|
8758
8759
|
function ht(e, t) {
|
|
8759
8760
|
let n = function(e) {
|
|
8760
|
-
let n =
|
|
8761
|
+
let n = g.any(t, e);
|
|
8761
8762
|
return n ? x(n.value) : "?";
|
|
8762
8763
|
}, r = e.createElement("table");
|
|
8763
8764
|
return r.innerHTML = `
|
|
8764
8765
|
<tr>
|
|
8765
|
-
<td colspan="2">${n(
|
|
8766
|
+
<td colspan="2">${n(h.dc("title"))}</td>
|
|
8766
8767
|
</tr>
|
|
8767
8768
|
<tr style="color: #777">
|
|
8768
|
-
<td>${n(
|
|
8769
|
-
<td>${n(
|
|
8769
|
+
<td>${n(h.cal("dtstart"))}</td>
|
|
8770
|
+
<td>${n(h.cal("dtend"))}</td>
|
|
8770
8771
|
</tr>`, r;
|
|
8771
8772
|
}
|
|
8772
8773
|
function gt(e, t) {
|
|
@@ -8786,9 +8787,9 @@ function yt(e, t) {
|
|
|
8786
8787
|
audio: "http://purl.org/dc/dcmitype/Sound",
|
|
8787
8788
|
image: "http://purl.org/dc/dcmitype/Image",
|
|
8788
8789
|
video: "http://purl.org/dc/dcmitype/MovingImage"
|
|
8789
|
-
}, r = t || "image",
|
|
8790
|
-
for (let e in
|
|
8791
|
-
return n[r] in
|
|
8790
|
+
}, r = t || "image", a = g.findTypeURIs(e), o = i(r + "/*").uri.split("*")[0];
|
|
8791
|
+
for (let e in a) if (e.startsWith(o)) return !0;
|
|
8792
|
+
return n[r] in a;
|
|
8792
8793
|
}
|
|
8793
8794
|
function bt(e, t) {
|
|
8794
8795
|
let n = e.createElement("div"), r = n.appendChild(e.createElement("input"));
|
|
@@ -8809,72 +8810,72 @@ G = {
|
|
|
8809
8810
|
};
|
|
8810
8811
|
// src/widgets/forms/fieldParams.ts
|
|
8811
8812
|
var xt = {
|
|
8812
|
-
[
|
|
8813
|
+
[h.ui("ColorField").uri]: {
|
|
8813
8814
|
size: 9,
|
|
8814
8815
|
type: "color",
|
|
8815
8816
|
style: "height: 3em;",
|
|
8816
8817
|
dt: "color",
|
|
8817
8818
|
pattern: /^\s*#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]([0-9a-f][0-9a-f])?\s*$/
|
|
8818
8819
|
},
|
|
8819
|
-
[
|
|
8820
|
+
[h.ui("DateField").uri]: {
|
|
8820
8821
|
size: 20,
|
|
8821
8822
|
type: "date",
|
|
8822
8823
|
dt: "date",
|
|
8823
8824
|
pattern: /^\s*[0-9][0-9][0-9][0-9](-[0-1]?[0-9]-[0-3]?[0-9])?Z?\s*$/
|
|
8824
8825
|
},
|
|
8825
|
-
[
|
|
8826
|
+
[h.ui("DateTimeField").uri]: {
|
|
8826
8827
|
size: 20,
|
|
8827
8828
|
type: "datetime-local",
|
|
8828
8829
|
dt: "dateTime",
|
|
8829
8830
|
pattern: /^\s*[0-9][0-9][0-9][0-9](-[0-1]?[0-9]-[0-3]?[0-9])?(T[0-2][0-9]:[0-5][0-9](:[0-5][0-9])?)?Z?\s*$/
|
|
8830
8831
|
},
|
|
8831
|
-
[
|
|
8832
|
+
[h.ui("TimeField").uri]: {
|
|
8832
8833
|
size: 10,
|
|
8833
8834
|
type: "time",
|
|
8834
8835
|
dt: "time",
|
|
8835
8836
|
pattern: /^\s*([0-2]?[0-9]:[0-5][0-9](:[0-5][0-9])?)\s*$/
|
|
8836
8837
|
},
|
|
8837
|
-
[
|
|
8838
|
+
[h.ui("IntegerField").uri]: {
|
|
8838
8839
|
size: 12,
|
|
8839
8840
|
style: "text-align: right;",
|
|
8840
8841
|
dt: "integer",
|
|
8841
8842
|
pattern: /^\s*-?[0-9]+\s*$/
|
|
8842
8843
|
},
|
|
8843
|
-
[
|
|
8844
|
+
[h.ui("DecimalField").uri]: {
|
|
8844
8845
|
size: 12,
|
|
8845
8846
|
style: "text-align: right;",
|
|
8846
8847
|
dt: "decimal",
|
|
8847
8848
|
pattern: /^\s*-?[0-9]*(\.[0-9]*)?\s*$/
|
|
8848
8849
|
},
|
|
8849
|
-
[
|
|
8850
|
+
[h.ui("FloatField").uri]: {
|
|
8850
8851
|
size: 12,
|
|
8851
8852
|
style: "text-align: right;",
|
|
8852
8853
|
dt: "float",
|
|
8853
8854
|
pattern: /^\s*-?[0-9]*(\.[0-9]*)?((e|E)-?[0-9]*)?\s*$/
|
|
8854
8855
|
},
|
|
8855
|
-
[
|
|
8856
|
-
[
|
|
8857
|
-
[
|
|
8858
|
-
[
|
|
8856
|
+
[h.ui("SingleLineTextField").uri]: {},
|
|
8857
|
+
[h.ui("NamedNodeURIField").uri]: { namedNode: !0 },
|
|
8858
|
+
[h.ui("TextField").uri]: {},
|
|
8859
|
+
[h.ui("PhoneField").uri]: {
|
|
8859
8860
|
size: 20,
|
|
8860
8861
|
uriPrefix: "tel:",
|
|
8861
8862
|
pattern: /^\+?[\d-]+[\d]*$/
|
|
8862
8863
|
},
|
|
8863
|
-
[
|
|
8864
|
+
[h.ui("EmailField").uri]: {
|
|
8864
8865
|
size: 30,
|
|
8865
8866
|
uriPrefix: "mailto:",
|
|
8866
8867
|
pattern: /^\s*.*@.*\..*\s*$/
|
|
8867
8868
|
},
|
|
8868
|
-
[
|
|
8869
|
-
[
|
|
8869
|
+
[h.ui("Group").uri]: { style: E.formGroupStyle },
|
|
8870
|
+
[h.ui("Comment").uri]: {
|
|
8870
8871
|
element: "p",
|
|
8871
8872
|
style: E.commentStyle
|
|
8872
8873
|
},
|
|
8873
|
-
[
|
|
8874
|
+
[h.ui("Heading").uri]: {
|
|
8874
8875
|
element: "h3",
|
|
8875
8876
|
style: E.formHeadingStyle
|
|
8876
8877
|
}
|
|
8877
|
-
}, St =
|
|
8878
|
+
}, St = m.store, K = {};
|
|
8878
8879
|
function Ct(e) {
|
|
8879
8880
|
let t = St, n = t.findTypeURIs(e), r = t.bottomTypeURIs(n), i = [];
|
|
8880
8881
|
for (let e in r) i.push(e);
|
|
@@ -8890,8 +8891,8 @@ function q(e, t) {
|
|
|
8890
8891
|
// src/widgets/forms/formStyle.ts
|
|
8891
8892
|
var wt = "https://www.w3.org/ns/css#";
|
|
8892
8893
|
function Tt(e, t) {
|
|
8893
|
-
let n = xt[Ct(t)] || {}, r =
|
|
8894
|
-
r ? r.termType === "Literal" ? r && e.setAttribute("style", r.value) :
|
|
8894
|
+
let n = xt[Ct(t)] || {}, r = g.any(t, h.ui("style"));
|
|
8895
|
+
r ? r.termType === "Literal" ? r && e.setAttribute("style", r.value) : g.statementsMatching(r, null, null, t.doc()).forEach((t) => {
|
|
8895
8896
|
if (t.predicate.uri && t.predicate.uri.startsWith(wt)) {
|
|
8896
8897
|
let n = t.predicate.uri.slice(26);
|
|
8897
8898
|
try {
|
|
@@ -8903,16 +8904,16 @@ function Tt(e, t) {
|
|
|
8903
8904
|
}) : n.style && e.setAttribute("style", n.style);
|
|
8904
8905
|
}
|
|
8905
8906
|
// src/widgets/forms/basic.ts
|
|
8906
|
-
var J =
|
|
8907
|
+
var J = m.store;
|
|
8907
8908
|
function Et(e, t, n, r, i) {
|
|
8908
8909
|
n.style.display = "flex", n.style.flexDirection = "row";
|
|
8910
|
+
let a = n.appendChild(e.createElement("div"));
|
|
8911
|
+
a.style.width = S.formFieldNameBoxWidth;
|
|
8909
8912
|
let o = n.appendChild(e.createElement("div"));
|
|
8910
|
-
|
|
8911
|
-
let s = n.appendChild(e.createElement("div"));
|
|
8912
|
-
return o.setAttribute("class", "formFieldName"), o.setAttribute("style", E.formFieldNameBoxStyle), s.setAttribute("class", "formFieldValue"), i ? o.appendChild(e.createTextNode(i)) : t.any(r, a.ui("property")) ? o.appendChild(Dt(e, t.any(r, a.ui("property")), r)) : (s.appendChild(L(e, "No property or label given for form field: " + r)), o.appendChild(e.createTextNode("???"))), s;
|
|
8913
|
+
return a.setAttribute("class", "formFieldName"), a.setAttribute("style", E.formFieldNameBoxStyle), o.setAttribute("class", "formFieldValue"), i ? a.appendChild(e.createTextNode(i)) : t.any(r, h.ui("property")) ? a.appendChild(Dt(e, t.any(r, h.ui("property")), r)) : (o.appendChild(L(e, "No property or label given for form field: " + r)), a.appendChild(e.createTextNode("???"))), o;
|
|
8913
8914
|
}
|
|
8914
8915
|
function Dt(e, t, n) {
|
|
8915
|
-
let r = J.any(n,
|
|
8916
|
+
let r = J.any(n, h.ui("label"));
|
|
8916
8917
|
if (r ||= D(t, !0), t === void 0) return e.createTextNode("@@Internal error: undefined property");
|
|
8917
8918
|
let i = e.createElement("a");
|
|
8918
8919
|
return t.uri && i.setAttribute("href", t.uri), i.setAttribute("style", "color: #3B5998; text-decoration: none;"), i.textContent = r, i;
|
|
@@ -8923,36 +8924,36 @@ function Ot(e, t, n) {
|
|
|
8923
8924
|
if (!J.updater) throw Error("Store has no updater");
|
|
8924
8925
|
return r.length > 0 && r[0].why.value && J.updater.editable(r[0].why.value, J) ? J.sym(r[0].why.value) : n;
|
|
8925
8926
|
}
|
|
8926
|
-
function Y(
|
|
8927
|
-
let
|
|
8928
|
-
if (n && n.appendChild(
|
|
8929
|
-
let
|
|
8927
|
+
function Y(e, n, r, i, a, o, s) {
|
|
8928
|
+
let c = J, l = a.doc ? a.doc() : null, u = e.createElement("div"), f = c.any(a, h.ui("property"));
|
|
8929
|
+
if (n && n.appendChild(u), !f) return u.appendChild(L(e, "Error: No property given for text field: " + a));
|
|
8930
|
+
let p = Et(e, c, u, a), m = c.anyJS(a, h.ui("suppressEmptyUneditable"), null, l), g = xt[Ct(a)];
|
|
8930
8931
|
g === void 0 && (g = { style: "" });
|
|
8931
|
-
let _ = g.style || "", v = E.textInputStyle + _, y =
|
|
8932
|
-
y.style = v,
|
|
8933
|
-
let b = (y.getAttribute("type") || "").toLowerCase(), x = b === "date" || b === "datetime-local", C =
|
|
8932
|
+
let _ = g.style || "", v = E.textInputStyle + _, y = e.createElement("input");
|
|
8933
|
+
y.style = v, p.appendChild(y), y.setAttribute("type", g.type ? g.type : "text");
|
|
8934
|
+
let b = (y.getAttribute("type") || "").toLowerCase(), x = b === "date" || b === "datetime-local", C = c.anyJS(a, h.ui("size")) || S.textInputSize || 20;
|
|
8934
8935
|
y.setAttribute("size", C);
|
|
8935
|
-
let w =
|
|
8936
|
-
y.setAttribute("maxLength", w ? "" + w : S.basicMaxLength),
|
|
8937
|
-
let T =
|
|
8938
|
-
if (T ||=
|
|
8936
|
+
let w = c.any(a, h.ui("maxLength"));
|
|
8937
|
+
y.setAttribute("maxLength", w ? "" + w : S.basicMaxLength), o ||= Ot(i, f, o);
|
|
8938
|
+
let T = c.any(i, f, void 0, o);
|
|
8939
|
+
if (T ||= c.any(a, h.ui("default")), T && T.value && g.uriPrefix ? y.value = decodeURIComponent(T.value.replace(g.uriPrefix, "")).replace(/ /g, "") : T &&
|
|
8939
8940
|
/* istanbul ignore next */
|
|
8940
|
-
(y.value = T.value || T.value || ""), y.setAttribute("style", v), !
|
|
8941
|
-
return
|
|
8941
|
+
(y.value = T.value || T.value || ""), y.setAttribute("style", v), !c.updater) throw Error("kb has no updater");
|
|
8942
|
+
return c.updater.editable(o.uri) ? (y.addEventListener("keyup", function(e) {
|
|
8942
8943
|
g.pattern && y.setAttribute("style", v + (y.value.match(g.pattern) ? "color: green;" : "color: red;"));
|
|
8943
8944
|
}, !0), y.addEventListener("change", function(n) {
|
|
8944
|
-
if (x &&
|
|
8945
|
+
if (x && e.activeElement === y) {
|
|
8945
8946
|
y.dataset && (y.dataset.deferredChange = "true");
|
|
8946
8947
|
return;
|
|
8947
8948
|
}
|
|
8948
8949
|
if (g.pattern && !y.value.match(g.pattern)) return;
|
|
8949
8950
|
let r = !x;
|
|
8950
8951
|
r && (y.disabled = !0), y.setAttribute("style", v + "color: gray;");
|
|
8951
|
-
let
|
|
8952
|
-
g.namedNode ?
|
|
8953
|
-
let
|
|
8954
|
-
|
|
8955
|
-
function
|
|
8952
|
+
let a = c.statementsMatching(i, f), l;
|
|
8953
|
+
g.namedNode ? l = c.sym(y.value) : g.uriPrefix ? (l = encodeURIComponent(y.value.replace(/ /g, "")), l = c.sym(g.uriPrefix + y.value)) : l = g.dt ? new d(y.value.trim(), void 0, h.xsd(g.dt)) : new d(y.value);
|
|
8954
|
+
let p = a.map((e) => t(e.subject, e.predicate, l, e.why));
|
|
8955
|
+
p.length === 0 && (p = [t(i, f, l, o)]);
|
|
8956
|
+
function m(e, t, n) {
|
|
8956
8957
|
let r = [];
|
|
8957
8958
|
/* istanbul ignore next */
|
|
8958
8959
|
if (t.forEach((e) => {
|
|
@@ -8961,15 +8962,15 @@ function Y(t, n, r, i, o, s, l) {
|
|
|
8961
8962
|
/* istanbul ignore next */
|
|
8962
8963
|
r.includes(e.why.uri) || r.push(e.why.uri);
|
|
8963
8964
|
}), r.length === 0) throw Error("updateMany has no docs to patch");
|
|
8964
|
-
if (!
|
|
8965
|
-
if (r.length === 1) return
|
|
8966
|
-
let i = r.pop(), a = t.filter((e) => e.why.uri === i), o = t.filter((e) => e.why.uri !== i), s = e.filter((e) => e.why.uri === i),
|
|
8967
|
-
|
|
8968
|
-
t ?
|
|
8965
|
+
if (!c.updater) throw Error("kb has no updater");
|
|
8966
|
+
if (r.length === 1) return c.updater.update(e, t, n);
|
|
8967
|
+
let i = r.pop(), a = t.filter((e) => e.why.uri === i), o = t.filter((e) => e.why.uri !== i), s = e.filter((e) => e.why.uri === i), l = e.filter((e) => e.why.uri !== i);
|
|
8968
|
+
c.updater.update(s, a, function(e, t, r) {
|
|
8969
|
+
t ? m(l, o, n) : n(e, t, r);
|
|
8969
8970
|
});
|
|
8970
8971
|
}
|
|
8971
|
-
|
|
8972
|
-
n ? (r && (y.disabled = !1), y.setAttribute("style", v)) :
|
|
8972
|
+
m(a, p, function(t, n, i) {
|
|
8973
|
+
n ? (r && (y.disabled = !1), y.setAttribute("style", v)) : u.appendChild(L(e, i)), s(n, i);
|
|
8973
8974
|
});
|
|
8974
8975
|
}, !0), y.addEventListener("blur", function(e) {
|
|
8975
8976
|
if (x && y.dataset && y.dataset.deferredChange === "true") {
|
|
@@ -8977,10 +8978,10 @@ function Y(t, n, r, i, o, s, l) {
|
|
|
8977
8978
|
let e = new Event("change", { bubbles: !0 });
|
|
8978
8979
|
y.dispatchEvent(e);
|
|
8979
8980
|
}
|
|
8980
|
-
}, !0),
|
|
8981
|
+
}, !0), u) : (y.readOnly = !0, y.style = E.textInputStyleUneditable + _, m && y.value === "" && (u.style.display = "none"), u);
|
|
8981
8982
|
}
|
|
8982
8983
|
// src/widgets/forms/autocomplete/language.ts
|
|
8983
|
-
var kt = /* @__PURE__ */
|
|
8984
|
+
var kt = /* @__PURE__ */ o({
|
|
8984
8985
|
addDefaults: () => jt,
|
|
8985
8986
|
defaultPreferredLanguages: () => X,
|
|
8986
8987
|
filterByLanguage: () => Pt,
|
|
@@ -8999,12 +9000,12 @@ function jt(e) {
|
|
|
8999
9000
|
}
|
|
9000
9001
|
async function Mt(e) {
|
|
9001
9002
|
let t = e.doc();
|
|
9002
|
-
await
|
|
9003
|
-
let n =
|
|
9003
|
+
await g.fetcher?.load(t);
|
|
9004
|
+
let n = g.any(e, h.schema("knowsLanguage"), null, t);
|
|
9004
9005
|
if (!n) return X;
|
|
9005
9006
|
let r = [];
|
|
9006
9007
|
return n.elements.forEach((e) => {
|
|
9007
|
-
let n =
|
|
9008
|
+
let n = g.any(e, h.solid("publicId"), null, t);
|
|
9008
9009
|
if (!n) {
|
|
9009
9010
|
console.warn("getPreferredLanguages: No publiID of language.");
|
|
9010
9011
|
return;
|
|
@@ -9018,7 +9019,7 @@ async function Mt(e) {
|
|
|
9018
9019
|
}), r.length > 0 ? (console.log(` User knows languages with codes: "${r.join(",")}"`), jt(r)) : null;
|
|
9019
9020
|
}
|
|
9020
9021
|
async function Nt() {
|
|
9021
|
-
let e = await
|
|
9022
|
+
let e = await _.currentUser();
|
|
9022
9023
|
if (e) {
|
|
9023
9024
|
let t = await Mt(e);
|
|
9024
9025
|
if (t) return t;
|
|
@@ -9048,7 +9049,7 @@ function Pt(e, t) {
|
|
|
9048
9049
|
return O(` Filter by language: ${e.length} -> ${i.length}`), i;
|
|
9049
9050
|
}
|
|
9050
9051
|
// src/widgets/forms/autocomplete/publicData.ts
|
|
9051
|
-
var Ft = /* @__PURE__ */
|
|
9052
|
+
var Ft = /* @__PURE__ */ o({
|
|
9052
9053
|
AUTOCOMPLETE_LIMIT: () => 200,
|
|
9053
9054
|
ESCOResultToBindings: () => Yt,
|
|
9054
9055
|
bindingToTerm: () => qt,
|
|
@@ -9088,11 +9089,11 @@ var Ft = /* @__PURE__ */ u({
|
|
|
9088
9089
|
headers: new Headers({ Accept: "application/json" })
|
|
9089
9090
|
}, Bt = {
|
|
9090
9091
|
label: "ESCO",
|
|
9091
|
-
logo:
|
|
9092
|
+
logo: g.sym("https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif"),
|
|
9092
9093
|
searchByNameURI: "https://ec.europa.eu/esco/api/search?language=$(language)&type=occupation&text=$(name)"
|
|
9093
9094
|
}, Vt = {
|
|
9094
9095
|
label: "DBPedia",
|
|
9095
|
-
logo:
|
|
9096
|
+
logo: g.sym("https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/DBpediaLogo.svg/263px-DBpediaLogo.svg.png"),
|
|
9096
9097
|
searchByNameQuery: "select distinct ?subject, ?name where {\n ?subject a $(targetClass); rdfs:label ?name\n FILTER regex(?name, \"$(name)\", \"i\")\n } LIMIT $(limit)",
|
|
9097
9098
|
endpoint: "https://dbpedia.org/sparql/"
|
|
9098
9099
|
}, Ht = { AcademicInsitution: "http://umbel.org/umbel/rc/EducationalOrganization" }, Ut = {
|
|
@@ -9105,63 +9106,63 @@ var Ft = /* @__PURE__ */ u({
|
|
|
9105
9106
|
}, Wt = {
|
|
9106
9107
|
label: "WikiData",
|
|
9107
9108
|
limit: 3e3,
|
|
9108
|
-
logo:
|
|
9109
|
+
logo: g.sym("https://www.wikimedia.org/static/images/project-logos/wikidatawiki.png"),
|
|
9109
9110
|
endpoint: "https://query.wikidata.org/sparql",
|
|
9110
9111
|
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) ",
|
|
9111
9112
|
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}"
|
|
9112
9113
|
}, Gt = {
|
|
9113
|
-
"http://www.wikidata.org/entity/Q15936437":
|
|
9114
|
-
"http://www.wikidata.org/entity/Q1664720":
|
|
9115
|
-
"http://www.wikidata.org/entity/Q43229":
|
|
9116
|
-
"http://www.wikidata.org/entity/Q3918":
|
|
9117
|
-
"http://www.wikidata.org/entity/Q170584":
|
|
9118
|
-
"http://www.wikidata.org/entity/Q327333":
|
|
9119
|
-
"http://www.wikidata.org/entity/Q2221906":
|
|
9120
|
-
"http://www.wikidata.org/entity/Q167037":
|
|
9114
|
+
"http://www.wikidata.org/entity/Q15936437": h.schema("CollegeOrUniversity"),
|
|
9115
|
+
"http://www.wikidata.org/entity/Q1664720": h.schema("EducationalOrganization"),
|
|
9116
|
+
"http://www.wikidata.org/entity/Q43229": h.schema("Organization"),
|
|
9117
|
+
"http://www.wikidata.org/entity/Q3918": h.schema("CollegeOrUniversity"),
|
|
9118
|
+
"http://www.wikidata.org/entity/Q170584": h.schema("Project"),
|
|
9119
|
+
"http://www.wikidata.org/entity/Q327333": h.schema("GovernmentOrganization"),
|
|
9120
|
+
"http://www.wikidata.org/entity/Q2221906": h.schema("Place"),
|
|
9121
|
+
"http://www.wikidata.org/entity/Q167037": h.schema("Corporation")
|
|
9121
9122
|
}, Kt = {
|
|
9122
|
-
targetClass:
|
|
9123
|
-
sealImage:
|
|
9124
|
-
shortName:
|
|
9125
|
-
subsidiary:
|
|
9126
|
-
city:
|
|
9127
|
-
state:
|
|
9128
|
-
country:
|
|
9129
|
-
homepage:
|
|
9130
|
-
lat:
|
|
9131
|
-
long:
|
|
9123
|
+
targetClass: h.rdf("type"),
|
|
9124
|
+
sealImage: h.schema("logo"),
|
|
9125
|
+
shortName: h.foaf("nick"),
|
|
9126
|
+
subsidiary: h.schema("subOrganization"),
|
|
9127
|
+
city: h.vcard("locality"),
|
|
9128
|
+
state: h.vcard("region"),
|
|
9129
|
+
country: h.vcard("country-name"),
|
|
9130
|
+
homepage: h.foaf("homepage"),
|
|
9131
|
+
lat: h.schema("latitude"),
|
|
9132
|
+
long: h.schema("longitude")
|
|
9132
9133
|
};
|
|
9133
9134
|
function qt(e) {
|
|
9134
9135
|
let t = e.type.toLowerCase();
|
|
9135
|
-
if (t === "uri" || t === "iri") return
|
|
9136
|
-
if (t === "literal") return e["xml:lang"] ? new
|
|
9136
|
+
if (t === "uri" || t === "iri") return g.sym(e.value);
|
|
9137
|
+
if (t === "literal") return e["xml:lang"] ? new d(e.value, e["xml:lang"]) : new d(e.value);
|
|
9137
9138
|
throw Error(`bindingToTerm: Unexpected type "${e.type}" in sparql binding}`);
|
|
9138
9139
|
}
|
|
9139
9140
|
function Jt(e, t, n, r, i = Kt) {
|
|
9140
|
-
let
|
|
9141
|
+
let a = {};
|
|
9141
9142
|
O(`loadFromBindings: subject: ${t}`), O(` doc: ${r}`), n.forEach((e) => {
|
|
9142
9143
|
for (let t in e) {
|
|
9143
9144
|
let n = e[t], r = JSON.stringify(n);
|
|
9144
|
-
|
|
9145
|
+
a[t] = a[t] || /* @__PURE__ */ new Set(), a[t].add(r);
|
|
9145
9146
|
}
|
|
9146
9147
|
});
|
|
9147
|
-
for (let n in
|
|
9148
|
-
let
|
|
9149
|
-
O(` results ${n} -> ${
|
|
9150
|
-
let
|
|
9151
|
-
if (
|
|
9152
|
-
else if (
|
|
9153
|
-
else throw Error(`loadFromBindings: unexpected type: ${
|
|
9154
|
-
if (n === "type") Gt[
|
|
9148
|
+
for (let n in a) {
|
|
9149
|
+
let o = a[n];
|
|
9150
|
+
O(` results ${n} -> ${o}`), o.forEach((a) => {
|
|
9151
|
+
let o = JSON.parse(a), { type: s, value: c } = o, l;
|
|
9152
|
+
if (s === "uri") l = e.sym(c);
|
|
9153
|
+
else if (s === "literal") l = new d(c, o.language, o.datatype);
|
|
9154
|
+
else throw Error(`loadFromBindings: unexpected type: ${s}`);
|
|
9155
|
+
if (n === "type") Gt[c] ? l = Gt[c] : k("Unmapped Wikidata Class: " + c);
|
|
9155
9156
|
else if (n === "coordinates") {
|
|
9156
|
-
O(" @@@ hey a point: " +
|
|
9157
|
-
let n = /.*\(([-0-9.-]*) ([-0-9.-]*)\)/.exec(
|
|
9157
|
+
O(" @@@ hey a point: " + c);
|
|
9158
|
+
let n = /.*\(([-0-9.-]*) ([-0-9.-]*)\)/.exec(c);
|
|
9158
9159
|
if (n) {
|
|
9159
|
-
let i =
|
|
9160
|
-
e.add(t,
|
|
9161
|
-
} else O("Bad coordinates syntax: " +
|
|
9160
|
+
let i = h.xsd("float"), a = new d(n[1], null, i), o = new d(n[2], null, i);
|
|
9161
|
+
e.add(t, h.schema("longitude"), o, r), e.add(t, h.schema("latitude"), a, r);
|
|
9162
|
+
} else O("Bad coordinates syntax: " + c);
|
|
9162
9163
|
} else {
|
|
9163
|
-
let
|
|
9164
|
-
e.add(t,
|
|
9164
|
+
let a = i[n] || h.schema(n);
|
|
9165
|
+
e.add(t, a, l, r), O(` public data ${a} ${l}.`);
|
|
9165
9166
|
}
|
|
9166
9167
|
});
|
|
9167
9168
|
}
|
|
@@ -9185,7 +9186,7 @@ async function Xt(e, t, n) {
|
|
|
9185
9186
|
if (!n.searchByNameURI) throw Error("Missing queryTarget.searchByNameURI on queryESCODataByName");
|
|
9186
9187
|
let r = n.limit || 200, i = n.searchByNameURI.replace("$(name)", e).replace("$(limit)", "" + r).replace("$(targetClass)", t.toNT());
|
|
9187
9188
|
O("Querying ESCO data - uri: " + i);
|
|
9188
|
-
let a = (await
|
|
9189
|
+
let a = (await g.fetcher?.webOperation("GET", i, zt))?.responseText || "";
|
|
9189
9190
|
if (O(" Query result text" + a.slice(0, 500) + "..."), a.length === 0) throw Error("Wot no text back from ESCO query " + i);
|
|
9190
9191
|
let o = JSON.parse(a);
|
|
9191
9192
|
return O(" ESCO Query result JSON" + JSON.stringify(o, null, 4).slice(0, 500) + "..."), Yt(o);
|
|
@@ -9211,7 +9212,7 @@ async function Qt(e, t, n, r) {
|
|
|
9211
9212
|
if (r.searchByNameURI) {
|
|
9212
9213
|
let e = i(r.searchByNameURI), t;
|
|
9213
9214
|
try {
|
|
9214
|
-
t = await
|
|
9215
|
+
t = await g.fetcher?.webOperation("GET", e, zt);
|
|
9215
9216
|
} catch (t) {
|
|
9216
9217
|
throw Error(`Exception when trying to fetch ${e} \n ${t}`);
|
|
9217
9218
|
}
|
|
@@ -9235,25 +9236,25 @@ async function $t(e, t) {
|
|
|
9235
9236
|
let a = {
|
|
9236
9237
|
credentials: "omit",
|
|
9237
9238
|
headers: i
|
|
9238
|
-
}, o = (await
|
|
9239
|
+
}, o = (await g.fetcher?.webOperation("GET", r, a))?.responseText || "";
|
|
9239
9240
|
if (o.length === 0) throw Error("No text back from query " + r);
|
|
9240
9241
|
let s = Zt(o), c = JSON.parse(s);
|
|
9241
9242
|
return O(" Query result JSON" + JSON.stringify(c, null, 4).slice(0, 100) + "..."), c.results.bindings;
|
|
9242
9243
|
}
|
|
9243
|
-
async function en(e,
|
|
9244
|
-
if (O("queryPublicDataConstruct: sparql:", e), !
|
|
9245
|
-
let
|
|
9246
|
-
|
|
9247
|
-
let
|
|
9248
|
-
O(" queryPublicDataConstruct uri: " +
|
|
9249
|
-
let
|
|
9250
|
-
|
|
9251
|
-
let
|
|
9244
|
+
async function en(e, t, n) {
|
|
9245
|
+
if (O("queryPublicDataConstruct: sparql:", e), !n.endpoint) throw Error("Missing queryTarget.endpoint required for queryPublicDataConstruct");
|
|
9246
|
+
let r = new URL(n.endpoint);
|
|
9247
|
+
r.searchParams.append("query", e);
|
|
9248
|
+
let i = r.href;
|
|
9249
|
+
O(" queryPublicDataConstruct uri: " + i);
|
|
9250
|
+
let a = new Headers();
|
|
9251
|
+
a.append("Accept", "text/turtle");
|
|
9252
|
+
let o = {
|
|
9252
9253
|
credentials: "omit",
|
|
9253
|
-
headers:
|
|
9254
|
-
}, c = (await
|
|
9255
|
-
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:" +
|
|
9256
|
-
|
|
9254
|
+
headers: a
|
|
9255
|
+
}, c = (await g.fetcher?.webOperation("GET", i, o))?.responseText || "No response text?";
|
|
9256
|
+
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
|
+
s(c, g, t.uri, "text/turtle");
|
|
9257
9258
|
}
|
|
9258
9259
|
async function tn(e, t, n) {
|
|
9259
9260
|
if (n.uri.startsWith("https://dbpedia.org/resource/")) return on(e, t, n);
|
|
@@ -9301,7 +9302,7 @@ async function un(e, t, n, r) {
|
|
|
9301
9302
|
n.appendChild(L(e, r, "pink")), E.setStyle(n, "autocompleteRowStyle"), n.style.padding = "1em";
|
|
9302
9303
|
}
|
|
9303
9304
|
function a(e, n) {
|
|
9304
|
-
O("Auto complete: finish! " + e), e.termType === "Literal" && t.queryParams.objectURIBase && (e =
|
|
9305
|
+
O("Auto complete: finish! " + e), e.termType === "Literal" && t.queryParams.objectURIBase && (e = g.sym(t.queryParams.objectURIBase.value + e.value)), u(), r(e, n);
|
|
9305
9306
|
}
|
|
9306
9307
|
async function o(e, t) {
|
|
9307
9308
|
n.acceptButton ? (n.acceptButton.disbaled = !1, Z(n.acceptButton, !0), M.value = t.value, D = t, k = e, O("Auto complete: name: " + t), O("Auto complete: waiting for accept " + e), u()) : (Z(n.cancelButton, !0), a(e, t));
|
|
@@ -9310,7 +9311,7 @@ async function un(e, t, n, r) {
|
|
|
9310
9311
|
D && M.value === D.value && a(k, D);
|
|
9311
9312
|
}
|
|
9312
9313
|
async function c(e) {
|
|
9313
|
-
O("Auto complete: Canceled by user! "), t.permanent ?
|
|
9314
|
+
O("Auto complete: Canceled by user! "), t.permanent ? h() : T.parentNode && T.parentNode.removeChild(T);
|
|
9314
9315
|
}
|
|
9315
9316
|
function l(e, t) {
|
|
9316
9317
|
let n = e.split(" ");
|
|
@@ -9369,7 +9370,7 @@ async function un(e, t, n, r) {
|
|
|
9369
9370
|
}
|
|
9370
9371
|
b = !1;
|
|
9371
9372
|
}
|
|
9372
|
-
function
|
|
9373
|
+
function h() {
|
|
9373
9374
|
t.currentObject ? (M.value = t.currentName ? t.currentName.value : "??? wot no name for " + t.currentObject, D = t.currentName, C = t.currentName ? t.currentName.value : void 0, k = t.currentObject) : (M.value = "", C = void 0, k = void 0), n.deleteButton && Z(n.deleteButton, !!t.currentObject), n.acceptButton && Z(n.acceptButton, !1), n.editButton && Z(n.editButton, !0), n.cancelButton && Z(n.cancelButton, !1), b = !1, u();
|
|
9374
9375
|
}
|
|
9375
9376
|
let _ = t.targetClass;
|
|
@@ -9380,7 +9381,7 @@ async function un(e, t, n, r) {
|
|
|
9380
9381
|
let j = A.appendChild(e.createElement("tr"));
|
|
9381
9382
|
E.setStyle(j, "autocompleteRowStyle");
|
|
9382
9383
|
let M = j.appendChild(e.createElement("td")).appendChild(e.createElement("input"));
|
|
9383
|
-
M.setAttribute("type", "text"),
|
|
9384
|
+
M.setAttribute("type", "text"), h();
|
|
9384
9385
|
let N = t.size || S.textInputSize || 20;
|
|
9385
9386
|
M.setAttribute("size", N), M.setAttribute("data-testid", "autocomplete-input");
|
|
9386
9387
|
let P = E.textInputStyle || "border: 0.1em solid #444; border-radius: 0.5em; width: 100%; font-size: 100%; padding: 0.1em 0.6em";
|
|
@@ -9390,31 +9391,31 @@ async function un(e, t, n, r) {
|
|
|
9390
9391
|
}
|
|
9391
9392
|
// src/widgets/forms/autocomplete/autocompleteBar.ts
|
|
9392
9393
|
var dn = "Solid ID", fn = R.iconBase + "noun_34653_green.svg", pn = R.iconBase + "noun_Search_875351.svg", mn = R.iconBase + "noun_253504.svg";
|
|
9393
|
-
async function hn(e, t, n, r, i,
|
|
9394
|
-
async function
|
|
9395
|
-
return r.permanent ? (Z(v, !0), Z(
|
|
9394
|
+
async function hn(e, t, n, r, i, a) {
|
|
9395
|
+
async function o(e, t) {
|
|
9396
|
+
return r.permanent ? (Z(v, !0), Z(f, !1), Z(p, !1)) : c(), i(e, t);
|
|
9396
9397
|
}
|
|
9397
|
-
async function
|
|
9398
|
-
let r = await Xe(e,
|
|
9398
|
+
async function s(n) {
|
|
9399
|
+
let r = await Xe(e, g, C, h.vcard("url"), void 0, dn);
|
|
9399
9400
|
if (r) return i(t, r);
|
|
9400
9401
|
}
|
|
9401
|
-
function
|
|
9402
|
+
function c() {
|
|
9402
9403
|
S &&= (C.removeChild(S), void 0);
|
|
9403
9404
|
}
|
|
9404
|
-
async function
|
|
9405
|
-
S = e.createElement("div"), S.setAttribute("style", "display: flex; flex-flow: wrap;"), S.appendChild(await un(e, r, x,
|
|
9405
|
+
async function l() {
|
|
9406
|
+
S = e.createElement("div"), S.setAttribute("style", "display: flex; flex-flow: wrap;"), S.appendChild(await un(e, r, x, o)), S.appendChild(f), S.appendChild(p), S.appendChild(v), S.appendChild(m), C.appendChild(S);
|
|
9406
9407
|
}
|
|
9407
|
-
async function
|
|
9408
|
-
S ? (C.removeChild(S), S = void 0) : await
|
|
9408
|
+
async function u(e) {
|
|
9409
|
+
S ? (C.removeChild(S), S = void 0) : await l();
|
|
9409
9410
|
}
|
|
9410
|
-
async function
|
|
9411
|
+
async function d(e) {
|
|
9411
9412
|
for (let n of e) await i(t, n);
|
|
9412
9413
|
}
|
|
9413
|
-
let
|
|
9414
|
-
|
|
9415
|
-
let
|
|
9416
|
-
|
|
9417
|
-
let
|
|
9414
|
+
let f = Ye(e);
|
|
9415
|
+
f.setAttribute("data-testid", "accept-button");
|
|
9416
|
+
let p = W(e);
|
|
9417
|
+
p.setAttribute("data-testid", "cancel-button");
|
|
9418
|
+
let m = e.createElement("div"), _ = H(e, m, r.targetClass ? D(r.targetClass) : "item", a);
|
|
9418
9419
|
_.setAttribute("data-testid", "delete-button");
|
|
9419
9420
|
let v = U(e, mn, "Edit", (e) => {
|
|
9420
9421
|
y = !y, b();
|
|
@@ -9422,93 +9423,93 @@ async function hn(e, t, n, r, i, o) {
|
|
|
9422
9423
|
v.setAttribute("data-testid", "edit-button");
|
|
9423
9424
|
let y = !0;
|
|
9424
9425
|
function b() {
|
|
9425
|
-
y ? (Z(v, !1), Z(
|
|
9426
|
+
y ? (Z(v, !1), Z(f, !1), Z(p, !1)) : (Z(v, !0), Z(f, !1), Z(p, !1));
|
|
9426
9427
|
}
|
|
9427
9428
|
let x = {
|
|
9428
|
-
acceptButton:
|
|
9429
|
-
cancelButton:
|
|
9429
|
+
acceptButton: f,
|
|
9430
|
+
cancelButton: p,
|
|
9430
9431
|
editButton: v,
|
|
9431
9432
|
deleteButton: _
|
|
9432
9433
|
}, S, C = e.createElement("div");
|
|
9433
|
-
return C.style.display = "flex", C.style.flexDirection = "row", (r.permanent || r.currentObject) && await
|
|
9434
|
+
return C.style.display = "flex", C.style.flexDirection = "row", (r.permanent || r.currentObject) && await l(), n.editable && (C.style.width = "100%", n.manualURIEntry && I(C.appendChild(U(e, fn, n.idNoun, s)), d, void 0), n.dbLookup && !r.currentObject && !r.permanent && C.appendChild(U(e, pn, n.idNoun, u))), b(), C;
|
|
9434
9435
|
}
|
|
9435
9436
|
// src/widgets/forms/autocomplete/autocompleteField.ts
|
|
9436
|
-
function gn(
|
|
9437
|
-
async function
|
|
9437
|
+
function gn(e, n, r, i, a, o, s) {
|
|
9438
|
+
async function c(n, r) {
|
|
9438
9439
|
if (!r) throw Error("autocompleteField: No name set.");
|
|
9439
|
-
let a =
|
|
9440
|
+
let a = u.the(i, _, null, o);
|
|
9440
9441
|
if (a) {
|
|
9441
|
-
let e =
|
|
9442
|
+
let e = u.any(a, v, null, o);
|
|
9442
9443
|
if (a.equals(n) && e && e.sameTerm(r)) return;
|
|
9443
9444
|
}
|
|
9444
|
-
let
|
|
9445
|
+
let c = a ? u.statementsMatching(i, _, a, o).concat(u.statementsMatching(a, v, null, o)) : [], l = [t(i, _, n, o), t(n, v, r, o)];
|
|
9445
9446
|
try {
|
|
9446
|
-
await
|
|
9447
|
-
} catch (
|
|
9448
|
-
|
|
9447
|
+
await u.updater?.updateMany(c, l);
|
|
9448
|
+
} catch (t) {
|
|
9449
|
+
s(!1, t), f.appendChild(L(e, "Autocomplete form data update error:" + t, null, t));
|
|
9449
9450
|
return;
|
|
9450
9451
|
}
|
|
9451
|
-
|
|
9452
|
+
s(!0, "");
|
|
9452
9453
|
}
|
|
9453
|
-
async function
|
|
9454
|
-
let r =
|
|
9454
|
+
async function l(t, n) {
|
|
9455
|
+
let r = u.the(i, _, null, o);
|
|
9455
9456
|
if (!r) {
|
|
9456
|
-
|
|
9457
|
+
s(!1, "NO data to elete"), f.appendChild(L(e, "Autocomplete delete: no old data!"));
|
|
9457
9458
|
return;
|
|
9458
9459
|
}
|
|
9459
|
-
let a =
|
|
9460
|
+
let a = u.statementsMatching(i, _, r, o).concat(u.statementsMatching(r, v, null, o)), c = [];
|
|
9460
9461
|
try {
|
|
9461
|
-
await
|
|
9462
|
-
} catch (
|
|
9463
|
-
let n = /* @__PURE__ */ Error("Autocomplete form data delete error:" +
|
|
9464
|
-
|
|
9462
|
+
await u.updater?.updateMany(a, c);
|
|
9463
|
+
} catch (t) {
|
|
9464
|
+
let n = /* @__PURE__ */ Error("Autocomplete form data delete error:" + t);
|
|
9465
|
+
s(!1, t), f.appendChild(L(e, n, null, t));
|
|
9465
9466
|
return;
|
|
9466
9467
|
}
|
|
9467
|
-
|
|
9468
|
+
s(!0, "");
|
|
9468
9469
|
}
|
|
9469
9470
|
if (i.termType !== "NamedNode") throw Error("Sorry this field only works on NamedNode subjects (for editable)");
|
|
9470
|
-
let
|
|
9471
|
-
n && n.appendChild(
|
|
9472
|
-
let
|
|
9473
|
-
|
|
9474
|
-
let
|
|
9475
|
-
|
|
9476
|
-
let _ =
|
|
9477
|
-
if (!_) return
|
|
9478
|
-
let v =
|
|
9479
|
-
if (!y) return
|
|
9471
|
+
let u = g, d = a.doc ? a.doc() : null, f = e.createElement("div");
|
|
9472
|
+
n && n.appendChild(f);
|
|
9473
|
+
let p = e.createElement("div");
|
|
9474
|
+
p.setAttribute("class", "formFieldName"), p.setAttribute("style", E.formFieldNameBoxStyle), f.appendChild(p);
|
|
9475
|
+
let m = e.createElement("div");
|
|
9476
|
+
m.setAttribute("class", "formFieldValue"), f.appendChild(m);
|
|
9477
|
+
let _ = u.any(a, h.ui("property"));
|
|
9478
|
+
if (!_) return f.appendChild(L(e, "Error: No property given for autocomplete field: " + a));
|
|
9479
|
+
let v = u.any(a, h.ui("labelProperty")) || h.schema("name"), y = u.any(a, h.ui("dataSource"));
|
|
9480
|
+
if (!y) return f.appendChild(L(e, "Error: No data source given for autocomplete field: " + a));
|
|
9480
9481
|
let b = {
|
|
9481
|
-
label:
|
|
9482
|
-
logo:
|
|
9483
|
-
}, x =
|
|
9484
|
-
x && (b.targetClass = x), b.objectURIBase =
|
|
9485
|
-
let S =
|
|
9482
|
+
label: u.anyJS(y, h.schema("name"), null, y.doc()),
|
|
9483
|
+
logo: u.any(y, h.schema("logo"), null, y.doc())
|
|
9484
|
+
}, x = u.any(a, h.ui("targetClass"), null, a.doc()) || u.any(y, h.ui("targetClass"), null, y.doc());
|
|
9485
|
+
x && (b.targetClass = x), b.objectURIBase = u.any(y, h.ui("objectURIBase"), null, y.doc()) || void 0;
|
|
9486
|
+
let S = u.anyJS(y, h.ui("endpoint"), null, y.doc());
|
|
9486
9487
|
if (S) {
|
|
9487
|
-
if (b.endpoint = S, b.searchByNameQuery =
|
|
9488
|
-
b.insitituteDetailsQuery =
|
|
9488
|
+
if (b.endpoint = S, b.searchByNameQuery = u.anyJS(y, h.ui("searchByNameQuery"), null, y.doc()), !b.searchByNameQuery) return f.appendChild(L(e, "Error: No searchByNameQuery given for endpoint data Source: " + a));
|
|
9489
|
+
b.insitituteDetailsQuery = u.anyJS(y, h.ui("insitituteDetailsQuery"), null, y.doc());
|
|
9489
9490
|
} else {
|
|
9490
|
-
let
|
|
9491
|
-
if (!
|
|
9492
|
-
b.searchByNameURI =
|
|
9491
|
+
let t = u.anyJS(y, h.ui("searchByNameURI"));
|
|
9492
|
+
if (!t) return f.appendChild(L(e, "Error: No searchByNameURI OR sparql endpoint given for dataSource: " + y));
|
|
9493
|
+
b.searchByNameURI = t;
|
|
9493
9494
|
}
|
|
9494
|
-
let C =
|
|
9495
|
+
let C = u.anyJS(a, h.ui("suppressEmptyUneditable"), null, d), w = u.updater?.editable(o.uri), T = {
|
|
9495
9496
|
permanent: !0,
|
|
9496
9497
|
targetClass: b.targetClass,
|
|
9497
9498
|
queryParams: b
|
|
9498
9499
|
};
|
|
9499
|
-
T.size =
|
|
9500
|
-
let D =
|
|
9501
|
-
if (D) T.currentObject = D, T.currentName =
|
|
9502
|
-
else if (D =
|
|
9503
|
-
else if (C && !w) return
|
|
9504
|
-
return
|
|
9500
|
+
T.size = u.anyJS(a, h.ui("size"), null, d) || void 0;
|
|
9501
|
+
let D = u.any(i, _, void 0, o);
|
|
9502
|
+
if (D) T.currentObject = D, T.currentName = u.any(T.currentObject, v, null, o);
|
|
9503
|
+
else if (D = u.any(a, h.ui("default")), D) T.currentObject = D, T.currentName = u.any(T.currentObject, v, null, o);
|
|
9504
|
+
else if (C && !w) return f.style.display = "none", f;
|
|
9505
|
+
return p.appendChild(Dt(e, _, a)), hn(e, i, {
|
|
9505
9506
|
editable: w,
|
|
9506
9507
|
dbLookup: !0
|
|
9507
|
-
}, T,
|
|
9508
|
-
|
|
9509
|
-
}, (
|
|
9510
|
-
|
|
9511
|
-
}),
|
|
9508
|
+
}, T, c, l).then((e) => {
|
|
9509
|
+
m.appendChild(e);
|
|
9510
|
+
}, (t) => {
|
|
9511
|
+
m.appendChild(L(e, `Error rendering autocomplete ${a}: ${t}`, "#fee", t));
|
|
9512
|
+
}), f;
|
|
9512
9513
|
}
|
|
9513
9514
|
// src/lib/style_multiSelect.js
|
|
9514
9515
|
var Q = {
|
|
@@ -9802,102 +9803,102 @@ var _n = class {
|
|
|
9802
9803
|
!t && this._domElements.optionsContainerList.insertAdjacentHTML("beforeend", e);
|
|
9803
9804
|
} else t && t.parentNode && t.parentNode.removeChild(t);
|
|
9804
9805
|
}
|
|
9805
|
-
}, vn = "✓", yn = "✕", bn = "-", xn =
|
|
9806
|
-
K[
|
|
9807
|
-
function Sn(e, t, n, r, i,
|
|
9808
|
-
let
|
|
9809
|
-
for (let
|
|
9810
|
-
let
|
|
9811
|
-
if (Ct(
|
|
9812
|
-
let
|
|
9813
|
-
O("Refreshing Options field by replacing it."),
|
|
9806
|
+
}, vn = "✓", yn = "✕", bn = "-", xn = g;
|
|
9807
|
+
K[h.ui("AutocompleteField").uri] = gn;
|
|
9808
|
+
function Sn(e, t, n, r, i, a, o) {
|
|
9809
|
+
let s = a.children;
|
|
9810
|
+
for (let c = 0; c < o.length; c++) {
|
|
9811
|
+
let l = o[c];
|
|
9812
|
+
if (Ct(l) === h.ui("Options").uri) {
|
|
9813
|
+
let o = q(e, l)(e, null, t, n, l, r, i);
|
|
9814
|
+
O("Refreshing Options field by replacing it."), a.insertBefore(o, s[c]), a.removeChild(s[c + 1]);
|
|
9814
9815
|
}
|
|
9815
9816
|
}
|
|
9816
9817
|
}
|
|
9817
|
-
K[
|
|
9818
|
-
let
|
|
9819
|
-
if (t && t.appendChild(
|
|
9820
|
-
let
|
|
9821
|
-
if (n[
|
|
9822
|
-
let
|
|
9823
|
-
for (let e in n)
|
|
9824
|
-
|
|
9825
|
-
let
|
|
9826
|
-
if (
|
|
9827
|
-
|
|
9828
|
-
let
|
|
9829
|
-
if (
|
|
9818
|
+
K[h.ui("Form").uri] = K[h.ui("Group").uri] = function(e, t, n, r, i, a, o) {
|
|
9819
|
+
let s = e.createElement("div"), c = h.ui;
|
|
9820
|
+
if (t && t.appendChild(s), !i) return;
|
|
9821
|
+
let l = r.toNT() + "|" + i.toNT();
|
|
9822
|
+
if (n[l]) return s.appendChild(e.createTextNode("Group: see above " + l)), s;
|
|
9823
|
+
let u = {};
|
|
9824
|
+
for (let e in n) u[e] = 1;
|
|
9825
|
+
u[l] = 1;
|
|
9826
|
+
let d = i.doc ? i.doc() : null, f = xn.any(i, c("weight"), null, d), p = f ? Number(f.value) : 1;
|
|
9827
|
+
if (p > 3 || p < 0) return s.appendChild(L(e, `Form Group weight ${p} should be 0-3`));
|
|
9828
|
+
s.setAttribute("style", E.formGroupStyle[p]), s.style.display = "flex", s.style.flexDirection = "column", s.class = "form-weight-" + p;
|
|
9829
|
+
let m = xn.any(i, c("parts"), null, d), g;
|
|
9830
|
+
if (m ? g = m.elements : (m = xn.each(i, c("part"), null, d), g = An(m)), !m) return s.appendChild(L(e, "No parts to form! "));
|
|
9830
9831
|
for (let t = 0; t < g.length; t++) {
|
|
9831
|
-
let i = g[t],
|
|
9832
|
-
|
|
9833
|
-
t && i && i.widget && i.widget === "select" && Sn(e, n, r, o, s,
|
|
9832
|
+
let i = g[t], c = q(e, i);
|
|
9833
|
+
s.appendChild(c(e, null, u, r, i, a, function(t, i) {
|
|
9834
|
+
t && i && i.widget && i.widget === "select" && Sn(e, n, r, a, o, s, g), o(t, {
|
|
9834
9835
|
widget: "group",
|
|
9835
9836
|
change: i
|
|
9836
9837
|
});
|
|
9837
9838
|
}));
|
|
9838
9839
|
}
|
|
9839
|
-
return
|
|
9840
|
-
}, K[
|
|
9841
|
-
let c =
|
|
9840
|
+
return s;
|
|
9841
|
+
}, K[h.ui("Options").uri] = function(e, t, r, i, a, o, s) {
|
|
9842
|
+
let c = g, l = e.createElement("div"), u = a.doc ? a.doc() : null, d = h.ui;
|
|
9842
9843
|
t && t.appendChild(l);
|
|
9843
|
-
let f = c.any(
|
|
9844
|
-
f ||=
|
|
9845
|
-
let
|
|
9846
|
-
|
|
9847
|
-
let
|
|
9848
|
-
|
|
9849
|
-
for (let t = 0; t <
|
|
9850
|
-
let
|
|
9851
|
-
for (let e = 0; e < f.length; e++) for (let t of
|
|
9844
|
+
let f = c.any(a, d("dependingOn"));
|
|
9845
|
+
f ||= h.rdf("type");
|
|
9846
|
+
let p = c.each(a, d("case"), null, u);
|
|
9847
|
+
p || l.appendChild(L(e, "No cases to Options form. "));
|
|
9848
|
+
let m;
|
|
9849
|
+
m = f.sameTerm(h.rdf("type")) ? Object.keys(c.findTypeURIs(i)).map((e) => n(e)) : c.each(i, f);
|
|
9850
|
+
for (let t = 0; t < p.length; t++) {
|
|
9851
|
+
let n = p[t], f = c.each(n, d("for"), null, u), h = !1;
|
|
9852
|
+
for (let e = 0; e < f.length; e++) for (let t of m) {
|
|
9852
9853
|
let n = f[e];
|
|
9853
|
-
(t.sameTerm(f) || t.termType === n.termType && t.value === n.value) && (
|
|
9854
|
+
(t.sameTerm(f) || t.termType === n.termType && t.value === n.value) && (h = !0);
|
|
9854
9855
|
}
|
|
9855
|
-
if (
|
|
9856
|
-
let t = c.the(
|
|
9857
|
-
if (t) En(e, l,
|
|
9858
|
-
else return l.appendChild(L(e, "No \"use\" part for case in form " +
|
|
9856
|
+
if (h) {
|
|
9857
|
+
let t = c.the(n, d("use"));
|
|
9858
|
+
if (t) En(e, l, r, i, t, o, s);
|
|
9859
|
+
else return l.appendChild(L(e, "No \"use\" part for case in form " + a)), l;
|
|
9859
9860
|
break;
|
|
9860
9861
|
}
|
|
9861
9862
|
}
|
|
9862
9863
|
return l;
|
|
9863
|
-
}, K[
|
|
9864
|
-
function
|
|
9864
|
+
}, K[h.ui("Multiple").uri] = function(n, r, i, a, o, s, l) {
|
|
9865
|
+
function u(e) {
|
|
9865
9866
|
return e.map((e) => e.toString().slice(-7)).join(", ");
|
|
9866
9867
|
}
|
|
9867
|
-
async function
|
|
9868
|
-
let
|
|
9869
|
-
if (w) ee(), P.elements.push(
|
|
9868
|
+
async function d() {
|
|
9869
|
+
let e = $(s);
|
|
9870
|
+
if (w) ee(), P.elements.push(e), await te();
|
|
9870
9871
|
else {
|
|
9871
|
-
let r = E ? [e
|
|
9872
|
+
let r = E ? [t(e, T, a, s)] : [t(a, T, e, s)];
|
|
9872
9873
|
try {
|
|
9873
|
-
await
|
|
9874
|
+
await m.updater.update([], r);
|
|
9874
9875
|
} catch (e) {
|
|
9875
|
-
let
|
|
9876
|
-
v.appendChild(L(
|
|
9876
|
+
let t = "Error adding to unordered multiple: " + e;
|
|
9877
|
+
v.appendChild(L(n, t)), A(t);
|
|
9877
9878
|
}
|
|
9878
9879
|
ne();
|
|
9879
9880
|
}
|
|
9880
9881
|
}
|
|
9881
|
-
function
|
|
9882
|
+
function f(e) {
|
|
9882
9883
|
async function r() {
|
|
9883
9884
|
if (w) {
|
|
9884
|
-
O("pre delete: " +
|
|
9885
|
-
for (let
|
|
9886
|
-
P.elements.splice(
|
|
9885
|
+
O("pre delete: " + u(P.elements));
|
|
9886
|
+
for (let t = 0; t < P.elements.length; t++) if (P.elements[t].sameTerm(e)) {
|
|
9887
|
+
P.elements.splice(t, 1), await te();
|
|
9887
9888
|
return;
|
|
9888
9889
|
}
|
|
9889
|
-
} else if (
|
|
9890
|
-
let r = [
|
|
9891
|
-
|
|
9892
|
-
|
|
9890
|
+
} else if (m.holds(a, T, e, s)) {
|
|
9891
|
+
let r = [t(a, T, e, s)];
|
|
9892
|
+
m.updater.update(r, [], function(e, t, r) {
|
|
9893
|
+
t ? N.removeChild(d) : N.appendChild(L(n, "Multiple: delete failed: " + r));
|
|
9893
9894
|
});
|
|
9894
9895
|
}
|
|
9895
9896
|
}
|
|
9896
|
-
async function
|
|
9897
|
-
O("pre move: " +
|
|
9897
|
+
async function o(t, n) {
|
|
9898
|
+
O("pre move: " + u(P.elements));
|
|
9898
9899
|
let r = 0;
|
|
9899
|
-
for (; r < P.elements.length && !P.elements[r].sameTerm(
|
|
9900
|
-
if (r === P.elements.length && alert("list move: not found element for " +
|
|
9900
|
+
for (; r < P.elements.length && !P.elements[r].sameTerm(e); r++);
|
|
9901
|
+
if (r === P.elements.length && alert("list move: not found element for " + e), n) {
|
|
9901
9902
|
if (r === 0) {
|
|
9902
9903
|
alert("@@ boop - already at top -temp message");
|
|
9903
9904
|
return;
|
|
@@ -9912,51 +9913,51 @@ K[a.ui("Form").uri] = K[a.ui("Group").uri] = function(e, t, n, r, i, o, s) {
|
|
|
9912
9913
|
}
|
|
9913
9914
|
await te();
|
|
9914
9915
|
}
|
|
9915
|
-
function
|
|
9916
|
-
O(`Item done callback for item ${
|
|
9916
|
+
function c(t, n) {
|
|
9917
|
+
O(`Item done callback for item ${e.toString()}`), t || A(" Item done callback: Error: " + n), l(t, n);
|
|
9917
9918
|
}
|
|
9918
|
-
b("Multiple: render object: " +
|
|
9919
|
-
let
|
|
9920
|
-
if (
|
|
9921
|
-
let e =
|
|
9919
|
+
b("Multiple: render object: " + e);
|
|
9920
|
+
let d = q(n, M)(n, null, i, e, M, s, c);
|
|
9921
|
+
if (d.subject = e, m.updater.editable(s.uri) && (H(n, d, k, r), w)) {
|
|
9922
|
+
let e = n.createElement("div");
|
|
9922
9923
|
e.style.display = "grid", e.style.gridTemplateColumns = "auto 3em", e.style.gridTemplateRows = "50% 50%";
|
|
9923
|
-
let
|
|
9924
|
-
return i.appendChild(
|
|
9924
|
+
let t = U(n, R.iconBase + "noun_1369237.svg", "Move Up", async (e) => o(e, !0)), r = U(n, R.iconBase + "noun_1369241.svg", "Move Down", async (e) => o(e, !1)), i = n.createElement("div");
|
|
9925
|
+
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;
|
|
9925
9926
|
}
|
|
9926
|
-
return
|
|
9927
|
+
return d;
|
|
9927
9928
|
}
|
|
9928
|
-
let
|
|
9929
|
-
|
|
9930
|
-
let C =
|
|
9931
|
-
if (!T) return v.appendChild(L(
|
|
9932
|
-
let k =
|
|
9929
|
+
let p = R.iconBase + "noun_19460_green.svg", m = g, _ = o.doc ? o.doc() : null, v = n.createElement("div"), x = v, S = h.ui;
|
|
9930
|
+
r && r.appendChild(v);
|
|
9931
|
+
let C = m.any(o, S("ordered")), w = C ? c.toJS(C) : !1, T = m.any(o, S("property")), E = m.anyJS(o, S("reverse"), null, _);
|
|
9932
|
+
if (!T) return v.appendChild(L(n, "No property to multiple: " + o)), x;
|
|
9933
|
+
let k = m.any(o, S("label"));
|
|
9933
9934
|
k ||= D(T);
|
|
9934
|
-
let j =
|
|
9935
|
+
let j = m.any(o, S("min"));
|
|
9935
9936
|
j = j ? 0 + j.value : 0;
|
|
9936
|
-
let M =
|
|
9937
|
-
if (!M) return v.appendChild(L(
|
|
9938
|
-
let N = v.appendChild(
|
|
9937
|
+
let M = m.any(o, S("part"));
|
|
9938
|
+
if (!M) return v.appendChild(L(n, "No part to multiple: " + o)), x;
|
|
9939
|
+
let N = v.appendChild(n.createElement("div"));
|
|
9939
9940
|
N.style.display = "flex", N.style.flexDirection = "column";
|
|
9940
9941
|
let P, F;
|
|
9941
|
-
if (F = E ?
|
|
9942
|
-
let e = v.appendChild(
|
|
9942
|
+
if (F = E ? m.any(null, T, a, s) : m.any(a, T, null, s), w ? (P = E ? m.any(null, T, a, s) : m.any(a, T, null, s), F = P ? P.elements : []) : (F = E ? m.each(null, T, a, s) : m.each(a, T, null, s), P = null), m.updater.editable(s.uri)) {
|
|
9943
|
+
let e = v.appendChild(n.createElement("div"));
|
|
9943
9944
|
e.style.padding = "0.5em";
|
|
9944
|
-
let
|
|
9945
|
-
|
|
9946
|
-
let r =
|
|
9945
|
+
let t = e.appendChild(n.createElement("img"));
|
|
9946
|
+
t.setAttribute("src", p), t.setAttribute("style", "margin: 0.2em; width: 1.5em; height:1.5em"), t.title = "Click to add another " + k;
|
|
9947
|
+
let r = n.createElement("span");
|
|
9947
9948
|
r.textContent = (F.length === 0 ? "Add another " : "Add ") + k, e.addEventListener("click", async (e) => {
|
|
9948
|
-
await
|
|
9949
|
+
await d();
|
|
9949
9950
|
}, !0), e.appendChild(r);
|
|
9950
9951
|
}
|
|
9951
9952
|
function ee() {
|
|
9952
|
-
P || (P = new
|
|
9953
|
+
P || (P = new e(), E ? m.add(P, T, a, s) : m.add(a, T, P, s));
|
|
9953
9954
|
}
|
|
9954
9955
|
async function te() {
|
|
9955
|
-
O("save list: " +
|
|
9956
|
+
O("save list: " + u(P.elements)), ee();
|
|
9956
9957
|
try {
|
|
9957
|
-
await
|
|
9958
|
+
await m.fetcher.putBack(s);
|
|
9958
9959
|
} catch (e) {
|
|
9959
|
-
v.appendChild(L(
|
|
9960
|
+
v.appendChild(L(n, "Error trying to put back a list: " + e));
|
|
9960
9961
|
return;
|
|
9961
9962
|
}
|
|
9962
9963
|
ne();
|
|
@@ -9964,16 +9965,16 @@ K[a.ui("Form").uri] = K[a.ui("Group").uri] = function(e, t, n, r, i, o, s) {
|
|
|
9964
9965
|
function ne() {
|
|
9965
9966
|
let e;
|
|
9966
9967
|
if (w) {
|
|
9967
|
-
let t = E ?
|
|
9968
|
+
let t = E ? m.the(null, T, a, s) : m.the(a, T, null, s);
|
|
9968
9969
|
e = t ? t.elements : [];
|
|
9969
|
-
} else e = E ?
|
|
9970
|
-
y(N, e,
|
|
9970
|
+
} else e = E ? m.each(null, T, a, s) : m.each(a, T, null, s), e.sort();
|
|
9971
|
+
y(N, e, f);
|
|
9971
9972
|
}
|
|
9972
9973
|
N.refresh = ne, ne();
|
|
9973
9974
|
async function re() {
|
|
9974
9975
|
let e = j - F.length;
|
|
9975
9976
|
if (e > 0) {
|
|
9976
|
-
for (let t = 0; t < e; t++) O("Adding extra: min " + j), await
|
|
9977
|
+
for (let t = 0; t < e; t++) O("Adding extra: min " + j), await d();
|
|
9977
9978
|
await te();
|
|
9978
9979
|
}
|
|
9979
9980
|
}
|
|
@@ -9982,69 +9983,69 @@ K[a.ui("Form").uri] = K[a.ui("Group").uri] = function(e, t, n, r, i, o, s) {
|
|
|
9982
9983
|
}, (e) => {
|
|
9983
9984
|
A(" Multiple render: async stuff fails. #### ", e);
|
|
9984
9985
|
}), x;
|
|
9985
|
-
}, K[
|
|
9986
|
-
let
|
|
9987
|
-
if (!
|
|
9988
|
-
let
|
|
9989
|
-
|
|
9990
|
-
let
|
|
9991
|
-
|
|
9992
|
-
let
|
|
9993
|
-
|
|
9994
|
-
let
|
|
9995
|
-
!_ && v &&
|
|
9996
|
-
let y = Pn(e,
|
|
9997
|
-
return
|
|
9986
|
+
}, K[h.ui("PhoneField").uri] = Y, K[h.ui("EmailField").uri] = Y, K[h.ui("ColorField").uri] = Y, K[h.ui("DateField").uri] = Y, K[h.ui("DateTimeField").uri] = Y, K[h.ui("TimeField").uri] = Y, K[h.ui("NumericField").uri] = Y, K[h.ui("IntegerField").uri] = Y, K[h.ui("DecimalField").uri] = Y, K[h.ui("FloatField").uri] = Y, K[h.ui("TextField").uri] = Y, K[h.ui("SingleLineTextField").uri] = Y, K[h.ui("NamedNodeURIField").uri] = Y, K[h.ui("MultiLineTextField").uri] = function(e, t, n, r, i, a, o) {
|
|
9987
|
+
let s = h.ui, c = g, l = i.doc ? i.doc() : null, u = c.any(i, s("property"));
|
|
9988
|
+
if (!u) return L(e, "No property to text field: " + i);
|
|
9989
|
+
let d = e.createElement("div");
|
|
9990
|
+
d.style.display = "flex", d.style.flexDirection = "row";
|
|
9991
|
+
let f = d.appendChild(e.createElement("div"));
|
|
9992
|
+
f.style.width = S.formFieldNameBoxWidth;
|
|
9993
|
+
let p = d.appendChild(e.createElement("div"));
|
|
9994
|
+
f.appendChild(Dt(e, u, i)), a = Ot(r, u, a);
|
|
9995
|
+
let m = c.anyJS(r, u, null, a) || "", _ = c.updater.editable(a.uri), v = i && c.anyJS(i, h.ui("suppressEmptyUneditable"), null, l);
|
|
9996
|
+
!_ && v && m === "" && (d.style.display = "none");
|
|
9997
|
+
let y = Pn(e, c, r, u, a, o);
|
|
9998
|
+
return p.appendChild(y), t && t.appendChild(d), d;
|
|
9998
9999
|
};
|
|
9999
|
-
function Cn(
|
|
10000
|
-
let
|
|
10001
|
-
if (!
|
|
10002
|
-
let
|
|
10003
|
-
return n && n.appendChild(
|
|
10004
|
-
}
|
|
10005
|
-
let
|
|
10006
|
-
|
|
10007
|
-
let
|
|
10008
|
-
|
|
10009
|
-
let
|
|
10000
|
+
function Cn(e, n, r, i, a, o, s, c) {
|
|
10001
|
+
let l = h.ui, u = g, d = u.any(a, l("property"));
|
|
10002
|
+
if (!d) {
|
|
10003
|
+
let t = L(e, "No property to boolean field: " + a);
|
|
10004
|
+
return n && n.appendChild(t), t;
|
|
10005
|
+
}
|
|
10006
|
+
let f = u.any(a, l("label"));
|
|
10007
|
+
f ||= D(d, !0), o = Ot(i, d, o);
|
|
10008
|
+
let p = u.any(i, d);
|
|
10009
|
+
p === void 0 && (p = !1);
|
|
10010
|
+
let m = t(i, d, !0, o), _ = t(i, d, !1, o), v = zn(e, u, f, _, m, a, o, c);
|
|
10010
10011
|
return n && n.appendChild(v), v;
|
|
10011
10012
|
}
|
|
10012
|
-
K[
|
|
10013
|
+
K[h.ui("BooleanField").uri] = function(e, t, n, r, i, a, o) {
|
|
10013
10014
|
return Cn(e, t, n, r, i, a, o, !1);
|
|
10014
|
-
}, K[
|
|
10015
|
+
}, K[h.ui("TristateField").uri] = function(e, t, n, r, i, a, o) {
|
|
10015
10016
|
return Cn(e, t, n, r, i, a, o, !0);
|
|
10016
|
-
}, K[
|
|
10017
|
-
let
|
|
10018
|
-
if (!
|
|
10019
|
-
b("Classifier: dataDoc=" +
|
|
10020
|
-
let
|
|
10021
|
-
return
|
|
10022
|
-
},
|
|
10023
|
-
|
|
10017
|
+
}, K[h.ui("Classifier").uri] = function(e, t, n, r, i, a, o) {
|
|
10018
|
+
let s = g, c = h.ui, l = s.any(i, c("category"));
|
|
10019
|
+
if (!l) return L(e, "No category for classifier: " + i);
|
|
10020
|
+
b("Classifier: dataDoc=" + a);
|
|
10021
|
+
let u = function(e, t) {
|
|
10022
|
+
return o(e || e, t);
|
|
10023
|
+
}, d = e.createElement("div");
|
|
10024
|
+
d.setAttribute("class", "classifierBox");
|
|
10025
|
+
let f = e.createElement("div");
|
|
10026
|
+
f.setAttribute("class", "formFieldName classifierBox-label"), f.appendChild(Dt(e, l, i)), d.appendChild(f);
|
|
10024
10027
|
let p = e.createElement("div");
|
|
10025
|
-
p.setAttribute("class", "
|
|
10026
|
-
let m = e
|
|
10027
|
-
m
|
|
10028
|
-
|
|
10029
|
-
|
|
10030
|
-
let e = g.querySelectorAll("select");
|
|
10031
|
-
e.length && !c.updater.editable(o.uri) && e.forEach((e) => {
|
|
10028
|
+
p.setAttribute("class", "formFieldValue classifierBox-selectBox");
|
|
10029
|
+
let m = Rn(e, s, r, l, a, u);
|
|
10030
|
+
if (m && m.querySelectorAll) {
|
|
10031
|
+
let e = m.querySelectorAll("select");
|
|
10032
|
+
e.length && !s.updater.editable(a.uri) && e.forEach((e) => {
|
|
10032
10033
|
e.readOnly = !0, e.style = E.textInputStyleUneditable;
|
|
10033
10034
|
});
|
|
10034
10035
|
}
|
|
10035
|
-
return
|
|
10036
|
-
}, K[
|
|
10037
|
-
let l =
|
|
10038
|
-
|
|
10039
|
-
let
|
|
10040
|
-
|
|
10041
|
-
let _ =
|
|
10042
|
-
_.setAttribute("class", "formFieldValue choiceBox-selectBox"),
|
|
10036
|
+
return p.appendChild(m), d.appendChild(p), t && t.appendChild(d), d;
|
|
10037
|
+
}, K[h.ui("Choice").uri] = function(e, r, i, a, o, s, c) {
|
|
10038
|
+
let l = h.ui, u = g, d = o.doc ? o.doc() : null, f, p = e.createElement("div");
|
|
10039
|
+
p.setAttribute("class", "choiceBox"), r && r.appendChild(p);
|
|
10040
|
+
let m = e.createElement("div");
|
|
10041
|
+
m.setAttribute("class", "formFieldName choiceBox-label"), p.appendChild(m);
|
|
10042
|
+
let _ = e.createElement("div");
|
|
10043
|
+
_.setAttribute("class", "formFieldValue choiceBox-selectBox"), p.appendChild(_);
|
|
10043
10044
|
let v = u.any(o, l("property"));
|
|
10044
|
-
if (!v) return
|
|
10045
|
-
|
|
10045
|
+
if (!v) return p.appendChild(L(e, "No property for Choice: " + o));
|
|
10046
|
+
m.appendChild(Dt(e, v, o));
|
|
10046
10047
|
let y = u.any(o, l("from"));
|
|
10047
|
-
if (!y) return L(
|
|
10048
|
+
if (!y) return L(e, "No 'from' for Choice: " + o);
|
|
10048
10049
|
let b = u.any(o, l("use")), x = {
|
|
10049
10050
|
form: o,
|
|
10050
10051
|
subForm: b,
|
|
@@ -10052,17 +10053,17 @@ K[a.ui("BooleanField").uri] = function(e, t, n, r, i, a, o) {
|
|
|
10052
10053
|
};
|
|
10053
10054
|
function S(e) {
|
|
10054
10055
|
let t = [], n;
|
|
10055
|
-
t = u.each(void 0,
|
|
10056
|
+
t = u.each(void 0, h.rdf("type"), y, d);
|
|
10056
10057
|
for (let n in Hn(u, y, e)) t.push(u.fromNT(n));
|
|
10057
|
-
if (y.sameTerm(
|
|
10058
|
-
else if (y.sameTerm(
|
|
10058
|
+
if (y.sameTerm(h.rdfs("Class"))) for (f in ot()) t.push(u.sym(f));
|
|
10059
|
+
else if (y.sameTerm(h.rdf("Property"))) {
|
|
10059
10060
|
for (f in n = st(u), n.op) t.push(u.fromNT(f));
|
|
10060
10061
|
for (f in n.dp) t.push(u.fromNT(f));
|
|
10061
10062
|
x.disambiguate = !0;
|
|
10062
|
-
} else if (y.sameTerm(
|
|
10063
|
+
} else if (y.sameTerm(h.owl("ObjectProperty"))) {
|
|
10063
10064
|
for (f in n = st(u), n.op) t.push(u.fromNT(f));
|
|
10064
10065
|
x.disambiguate = !0;
|
|
10065
|
-
} else if (y.sameTerm(
|
|
10066
|
+
} else if (y.sameTerm(h.owl("DatatypeProperty"))) {
|
|
10066
10067
|
for (f in n = st(u), n.dp) t.push(u.fromNT(f));
|
|
10067
10068
|
x.disambiguate = !0;
|
|
10068
10069
|
}
|
|
@@ -10073,69 +10074,69 @@ K[a.ui("BooleanField").uri] = function(e, t, n, r, i, a, o) {
|
|
|
10073
10074
|
C && (x.multiSelect = !0);
|
|
10074
10075
|
let w = u.each(o, l("search-full-store")).length ? null : s, T;
|
|
10075
10076
|
return _.refresh = function() {
|
|
10076
|
-
let
|
|
10077
|
-
if (
|
|
10078
|
-
let
|
|
10077
|
+
let r = u.each(a, v, null, s).map((e) => e.value), i = S(w);
|
|
10078
|
+
if (i.push(r), i = jn(i), T = Bn(e, _, u, a, v, i, r, y, x, s, c), _.innerHTML = "", _.appendChild(T), C) {
|
|
10079
|
+
let i = new _n({
|
|
10079
10080
|
placeholder: T.selected,
|
|
10080
10081
|
select: T,
|
|
10081
10082
|
container: _,
|
|
10082
10083
|
textField: "textField",
|
|
10083
10084
|
valueField: "valueField"
|
|
10084
10085
|
});
|
|
10085
|
-
|
|
10086
|
-
if (
|
|
10087
|
-
return e !==
|
|
10088
|
-
})),
|
|
10089
|
-
if ((
|
|
10090
|
-
let
|
|
10091
|
-
o.push(
|
|
10092
|
-
|
|
10093
|
-
n || _.appendChild(L(
|
|
10094
|
-
}),
|
|
10086
|
+
i.init(), i.subscribe(function(i) {
|
|
10087
|
+
if (i.action === "REMOVE_OPTION" && (r = r.filter(function(e) {
|
|
10088
|
+
return e !== i.value;
|
|
10089
|
+
})), i.action === "CLEAR_ALL_OPTIONS" && (r = []), i.action === "ADD_OPTION") {
|
|
10090
|
+
if ((i.value + "").includes("Create new")) {
|
|
10091
|
+
let i = $(s), o = [];
|
|
10092
|
+
o.push(t(a, v, u.sym(i), s)), y && o.push(t(i, h.rdf("type"), u.sym(y), s)), b && wn(e, _, {}, n(i), b, s, function(t, n) {
|
|
10093
|
+
t ? (u.updater.update([], o, function(t, n, r) {
|
|
10094
|
+
n || _.appendChild(L(e, "Error updating select: " + r));
|
|
10095
|
+
}), r.push(i), c && c(t, {
|
|
10095
10096
|
widget: "select",
|
|
10096
10097
|
event: "new"
|
|
10097
|
-
})) : _.appendChild(L(
|
|
10098
|
+
})) : _.appendChild(L(e, "Error updating data in field of select: " + n));
|
|
10098
10099
|
});
|
|
10099
|
-
} else
|
|
10100
|
+
} else r.push(i.value);
|
|
10100
10101
|
}
|
|
10101
|
-
T.update(
|
|
10102
|
+
T.update(r);
|
|
10102
10103
|
});
|
|
10103
10104
|
}
|
|
10104
|
-
}, _.refresh(), T && T.refresh && T.refresh(),
|
|
10105
|
+
}, _.refresh(), T && T.refresh && T.refresh(), p;
|
|
10105
10106
|
};
|
|
10106
10107
|
function wn(e, t, n, r, i, a, o) {
|
|
10107
10108
|
q(e, i)(e, t, n, r, i, a, o);
|
|
10108
10109
|
}
|
|
10109
|
-
K[
|
|
10110
|
-
let
|
|
10111
|
-
|
|
10112
|
-
let
|
|
10113
|
-
t && t.appendChild(
|
|
10114
|
-
let
|
|
10115
|
-
|
|
10116
|
-
let
|
|
10117
|
-
return
|
|
10110
|
+
K[h.ui("Comment").uri] = K[h.ui("Heading").uri] = function(e, t, n, r, i, a, o) {
|
|
10111
|
+
let s = h.ui, c = g, l = c.any(i, s("contents"));
|
|
10112
|
+
l ||= "Error: No contents in comment field.";
|
|
10113
|
+
let u = i.doc ? i.doc() : null, d = xt[Ct(i)] || {}, f = e.createElement("div");
|
|
10114
|
+
t && t.appendChild(f);
|
|
10115
|
+
let p = f.appendChild(e.createElement(d.element));
|
|
10116
|
+
p.textContent = l, Tt(p, i);
|
|
10117
|
+
let m = c.anyJS(i, h.ui("suppressIfUneditable"), null, u), _ = c.updater.editable(a.uri);
|
|
10118
|
+
return m && !_ && (f.style.display = "none"), f;
|
|
10118
10119
|
};
|
|
10119
10120
|
function Tn(e, t, n, r, i) {
|
|
10120
|
-
let
|
|
10121
|
-
return
|
|
10122
|
-
En(e, t, {}, n,
|
|
10123
|
-
}, !0),
|
|
10121
|
+
let a = e.createElement("button");
|
|
10122
|
+
return a.setAttribute("type", "button"), a.innerHTML = "Edit " + D(h.ui("Form")), a.addEventListener("click", function(o) {
|
|
10123
|
+
En(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
|
+
}, !0), a;
|
|
10124
10125
|
}
|
|
10125
10126
|
function En(e, t, n, r, i, a, o) {
|
|
10126
10127
|
return q(e, i)(e, t, n, r, i, a, o);
|
|
10127
10128
|
}
|
|
10128
10129
|
function Dn(e, t) {
|
|
10129
|
-
let n = e.each(void 0,
|
|
10130
|
+
let n = e.each(void 0, h.rdf("range"), t);
|
|
10130
10131
|
[
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10132
|
+
h.rdfs("comment"),
|
|
10133
|
+
h.dc("title"),
|
|
10134
|
+
h.foaf("name"),
|
|
10135
|
+
h.foaf("homepage")
|
|
10135
10136
|
].forEach(function(e) {
|
|
10136
10137
|
n.push(e);
|
|
10137
10138
|
});
|
|
10138
|
-
let r = e.each(void 0,
|
|
10139
|
+
let r = e.each(void 0, h.rdf("type"), t);
|
|
10139
10140
|
r.length > 60 && (r = r.slice(0, 60));
|
|
10140
10141
|
let i = {};
|
|
10141
10142
|
for (let t = 0; t < (r.length > 60 ? 60 : r.length); t++) e.statementsMatching(r[t], void 0, void 0).forEach(function(e) {
|
|
@@ -10144,32 +10145,32 @@ function Dn(e, t) {
|
|
|
10144
10145
|
n.forEach(function(e) {
|
|
10145
10146
|
i[e.uri] = !0;
|
|
10146
10147
|
});
|
|
10147
|
-
let
|
|
10148
|
-
for (let t in i)
|
|
10149
|
-
return
|
|
10148
|
+
let a = [];
|
|
10149
|
+
for (let t in i) a.push(e.sym(t));
|
|
10150
|
+
return a;
|
|
10150
10151
|
}
|
|
10151
10152
|
function On(e, t, n) {
|
|
10152
10153
|
let r = [e.sym(t)];
|
|
10153
10154
|
for (; r.length > 0;) {
|
|
10154
10155
|
let t = r.shift(), i = e.each(t, n);
|
|
10155
10156
|
if (b("Lists for " + t + ", " + n + ": " + i.length), i.length !== 0) return i;
|
|
10156
|
-
let
|
|
10157
|
-
for (let e = 0; e <
|
|
10157
|
+
let a = e.each(t, h.rdfs("subClassOf"));
|
|
10158
|
+
for (let e = 0; e < a.length; e++) r.push(a[e]), b("findClosest: add super: " + a[e]);
|
|
10158
10159
|
}
|
|
10159
10160
|
return [];
|
|
10160
10161
|
}
|
|
10161
10162
|
function kn(e) {
|
|
10162
|
-
let t =
|
|
10163
|
+
let t = g;
|
|
10163
10164
|
b("formsFor: subject=" + e);
|
|
10164
10165
|
let n = t.findTypeURIs(e), r;
|
|
10165
10166
|
for (r in n) b(" type: " + r);
|
|
10166
|
-
let i = t.bottomTypeURIs(n),
|
|
10167
|
-
for (let e in i) b("candidatesFor: trying bottom type =" + e),
|
|
10168
|
-
return
|
|
10167
|
+
let i = t.bottomTypeURIs(n), a = [];
|
|
10168
|
+
for (let e in i) b("candidatesFor: trying bottom type =" + e), a = a.concat(On(t, e, h.ui("creationForm"))), a = a.concat(On(t, e, h.ui("annotationForm")));
|
|
10169
|
+
return a;
|
|
10169
10170
|
}
|
|
10170
10171
|
function An(e) {
|
|
10171
10172
|
let t = e.map(function(e) {
|
|
10172
|
-
return [xn.any(e,
|
|
10173
|
+
return [xn.any(e, h.ui("sequence")) || 9999, e];
|
|
10173
10174
|
});
|
|
10174
10175
|
return t.sort(function(e, t) {
|
|
10175
10176
|
return e[0] - t[0];
|
|
@@ -10191,301 +10192,301 @@ function Mn(e, t, n, r, i, a, o, s) {
|
|
|
10191
10192
|
c.parentNode.appendChild(Nn(e, t, n, r, i, a, o, s));
|
|
10192
10193
|
}, !1), c;
|
|
10193
10194
|
}
|
|
10194
|
-
function Nn(
|
|
10195
|
-
let
|
|
10196
|
-
if (!
|
|
10197
|
-
let
|
|
10198
|
-
if (
|
|
10199
|
-
let
|
|
10200
|
-
|
|
10201
|
-
let n =
|
|
10202
|
-
return n.setAttribute("type", "button"), n.setAttribute("style", "float: right;"), n.innerHTML = "Goto " + D(
|
|
10203
|
-
|
|
10204
|
-
}, !1),
|
|
10195
|
+
function Nn(e, n, r, i, a, o, s, c) {
|
|
10196
|
+
let l = e.createElement("form");
|
|
10197
|
+
if (!o) {
|
|
10198
|
+
let t = On(n, a.uri, h.ui("creationForm"));
|
|
10199
|
+
if (t.length === 0) {
|
|
10200
|
+
let t = l.appendChild(e.createElement("p"));
|
|
10201
|
+
t.textContent = "I am sorry, you need to provide information about a " + D(a) + " but I don't know enough information about those to ask you.";
|
|
10202
|
+
let n = l.appendChild(e.createElement("button"));
|
|
10203
|
+
return n.setAttribute("type", "button"), n.setAttribute("style", "float: right;"), n.innerHTML = "Goto " + D(a), n.addEventListener("click", function(t) {
|
|
10204
|
+
e.outlineManager.GotoSubject(a, !0, void 0, !0, void 0);
|
|
10205
|
+
}, !1), l;
|
|
10205
10206
|
}
|
|
10206
|
-
b("lists[0] is " +
|
|
10207
|
+
b("lists[0] is " + t[0]), o = t[0];
|
|
10207
10208
|
}
|
|
10208
|
-
b("form is " +
|
|
10209
|
-
let
|
|
10210
|
-
if (!
|
|
10211
|
-
let
|
|
10212
|
-
r && !n.holds(r, i,
|
|
10209
|
+
b("form is " + o), l.setAttribute("style", `border: 0.05em solid ${S.formBorderColor}; color: ${S.formBorderColor}`), l.innerHTML = "<h3>New " + D(a) + "</h3>";
|
|
10210
|
+
let u = q(e, o), d = $(s), f = !1, p = function(o, u) {
|
|
10211
|
+
if (!o) return c(o, u);
|
|
10212
|
+
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(ct(e, d));
|
|
10213
10214
|
};
|
|
10214
|
-
function
|
|
10215
|
-
return
|
|
10215
|
+
function m(e, t, n) {
|
|
10216
|
+
return c(t, n);
|
|
10216
10217
|
}
|
|
10217
|
-
return w("paneUtils Object is " +
|
|
10218
|
+
return w("paneUtils Object is " + d), lt(e, u(e, l, {}, d, o, s, p)).setAttribute("style", "float: right;"), l.AJAR_subject = d, l;
|
|
10218
10219
|
}
|
|
10219
|
-
function Pn(
|
|
10220
|
-
let s =
|
|
10220
|
+
function Pn(e, n, r, i, a, o) {
|
|
10221
|
+
let s = e.createElement("div"), c = n.anyJS(r, i, null, a) || "", l = e.createElement("textarea");
|
|
10221
10222
|
s.appendChild(l), l.rows = c ? c.split("\n").length + 2 : 2, l.cols = 80, l.setAttribute("style", E.multilineTextInputStyle), c === null ? l.select() : l.value = c, s.refresh = function() {
|
|
10222
10223
|
let e = n.any(r, i, null, a);
|
|
10223
10224
|
e && e.value !== l.value && (l.value = e.value);
|
|
10224
10225
|
};
|
|
10225
10226
|
function u(c) {
|
|
10226
10227
|
f.disabled = !0, f.setAttribute("style", "visibility: hidden; float: right;"), l.disabled = !0, l.style.color = S.textInputColorPending;
|
|
10227
|
-
let u = n.statementsMatching(r, i, null, a), d =
|
|
10228
|
-
n.updater.update(u, d, function(
|
|
10229
|
-
n ? (l.style.color = S.textInputColor, l.disabled = !1) : s.appendChild(L(
|
|
10228
|
+
let u = n.statementsMatching(r, i, null, a), d = t(r, i, l.value, a);
|
|
10229
|
+
n.updater.update(u, d, function(t, n, r) {
|
|
10230
|
+
n ? (l.style.color = S.textInputColor, l.disabled = !1) : s.appendChild(L(e, "Error (while saving change to " + a.uri + "): " + r)), o && o(n, r);
|
|
10230
10231
|
});
|
|
10231
10232
|
}
|
|
10232
10233
|
let d = n.updater.editable(a.uri), f;
|
|
10233
|
-
return d ? (f = Ye(
|
|
10234
|
+
return d ? (f = Ye(e, u), f.disabled = !0, f.style.visibility = "hidden", f.style.float = "right", s.appendChild(f), l.addEventListener("keyup", function(e) {
|
|
10234
10235
|
l.style.color = "green", f && (f.disabled = !1, f.style.visibility = "");
|
|
10235
10236
|
}, !0), l.addEventListener("change", u, !0)) : (l.disabled = !0, l.style.backgroundColor = S.textInputBackgroundColorUneditable), s;
|
|
10236
10237
|
}
|
|
10237
|
-
function Fn(
|
|
10238
|
-
b("Select list length now " +
|
|
10239
|
-
let
|
|
10240
|
-
for (let e = 0; e <
|
|
10241
|
-
let t =
|
|
10242
|
-
t.uri || k(`makeSelectForClassifierOptions: option does not have an uri: ${t}, with predicate: ${i}`), !(!t.uri || t.uri in
|
|
10243
|
-
}
|
|
10244
|
-
if (
|
|
10245
|
-
b("makeSelectForClassifierOptions: dataDoc=" +
|
|
10246
|
-
let
|
|
10247
|
-
return
|
|
10248
|
-
|
|
10249
|
-
}),
|
|
10238
|
+
function Fn(e, n, r, i, a, o, s, c) {
|
|
10239
|
+
b("Select list length now " + a.length);
|
|
10240
|
+
let l = 0, u = {}, d = n.updater.editable(s.uri);
|
|
10241
|
+
for (let e = 0; e < a.length; e++) {
|
|
10242
|
+
let t = a[e];
|
|
10243
|
+
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
|
+
}
|
|
10245
|
+
if (l === 0 && !o.mint) return L(e, "Can't do selector with no options, subject= " + r + " property = " + i + ".");
|
|
10246
|
+
b("makeSelectForClassifierOptions: dataDoc=" + s);
|
|
10247
|
+
let f, p = function() {
|
|
10248
|
+
return f = {}, i.sameTerm(h.rdf("type")) ? f = n.findTypeURIs(r) : n.each(r, i, null, s).forEach(function(e) {
|
|
10249
|
+
f[e.uri] = !0;
|
|
10250
|
+
}), f;
|
|
10250
10251
|
};
|
|
10251
|
-
|
|
10252
|
-
let
|
|
10252
|
+
f = p();
|
|
10253
|
+
let m = function(a) {
|
|
10253
10254
|
g.disabled = !0;
|
|
10254
|
-
let
|
|
10255
|
-
n.holds(r, i,
|
|
10256
|
-
},
|
|
10255
|
+
let l = [], u = [], d = function(e) {
|
|
10256
|
+
n.holds(r, i, e, s) && l.push(t(r, i, e, s));
|
|
10257
|
+
}, m;
|
|
10257
10258
|
for (let a = 0; a < g.options.length; a++) {
|
|
10258
|
-
let
|
|
10259
|
-
if (
|
|
10260
|
-
if (
|
|
10261
|
-
let
|
|
10262
|
-
e ||
|
|
10259
|
+
let l = g.options[a];
|
|
10260
|
+
if (l.selected && l.AJAR_mint) {
|
|
10261
|
+
if (o.mintClass) {
|
|
10262
|
+
let t = Nn(e, n, r, i, o.mintClass, null, s, function(e, t) {
|
|
10263
|
+
e || c(e, t, { change: "new" });
|
|
10263
10264
|
});
|
|
10264
|
-
g.parentNode.appendChild(
|
|
10265
|
-
} else
|
|
10266
|
-
u.push(
|
|
10265
|
+
g.parentNode.appendChild(t), m = t.AJAR_subject;
|
|
10266
|
+
} else m = $(s);
|
|
10267
|
+
u.push(t(r, i, m, s)), o.mintStatementsFun && (u = u.concat(o.mintStatementsFun(m)));
|
|
10267
10268
|
}
|
|
10268
|
-
|
|
10269
|
+
l.AJAR_uri && (l.selected && !(l.AJAR_uri in f) && u.push(t(r, i, n.sym(l.AJAR_uri), s)), !l.selected && l.AJAR_uri in f && d(n.sym(l.AJAR_uri)), l.selected && (g.currentURI = l.AJAR_uri));
|
|
10269
10270
|
}
|
|
10270
10271
|
let h = g.subSelect;
|
|
10271
10272
|
for (; h && h.currentURI;) d(n.sym(h.currentURI)), h = h.subSelect;
|
|
10272
10273
|
for (h = g.superSelect; h && h.currentURI;) d(n.sym(h.currentURI)), h = h.superSelect;
|
|
10273
10274
|
function _(e, t) {
|
|
10274
|
-
|
|
10275
|
+
c(e, {
|
|
10275
10276
|
widget: "select",
|
|
10276
10277
|
event: "new"
|
|
10277
10278
|
});
|
|
10278
10279
|
}
|
|
10279
|
-
w("makeSelectForClassifierOptions: data doc = " +
|
|
10280
|
-
if (
|
|
10281
|
-
else return g.parentNode.appendChild(L(
|
|
10282
|
-
|
|
10280
|
+
w("makeSelectForClassifierOptions: data doc = " + s), n.updater.update(l, u, function(t, n, r) {
|
|
10281
|
+
if (f = p(), n) g.disabled = !1, m && q(e, o.subForm)(e, g.parentNode, {}, m, o.subForm, s, _);
|
|
10282
|
+
else return g.parentNode.appendChild(L(e, "Error updating data in select: " + r));
|
|
10283
|
+
c && c(n, {
|
|
10283
10284
|
widget: "select",
|
|
10284
10285
|
event: "change"
|
|
10285
10286
|
});
|
|
10286
10287
|
});
|
|
10287
|
-
}, g =
|
|
10288
|
-
g.setAttribute("style", E.formSelectStyle),
|
|
10289
|
-
|
|
10288
|
+
}, g = e.createElement("select");
|
|
10289
|
+
g.setAttribute("style", E.formSelectStyle), o.multiple && g.setAttribute("multiple", "true"), g.currentURI = null, g.refresh = function() {
|
|
10290
|
+
f = p();
|
|
10290
10291
|
for (let e = 0; e < g.children.length; e++) {
|
|
10291
10292
|
let t = g.children[e];
|
|
10292
|
-
t.AJAR_uri && (t.selected = t.AJAR_uri in
|
|
10293
|
+
t.AJAR_uri && (t.selected = t.AJAR_uri in f);
|
|
10293
10294
|
}
|
|
10294
10295
|
g.disabled = !1;
|
|
10295
10296
|
};
|
|
10296
|
-
for (let
|
|
10297
|
-
let r = n.sym(
|
|
10298
|
-
|
|
10297
|
+
for (let t in u) {
|
|
10298
|
+
let r = n.sym(t), i = e.createElement("option");
|
|
10299
|
+
o.disambiguate ? i.appendChild(e.createTextNode(C(r, !0))) : i.appendChild(e.createTextNode(D(r, !0)));
|
|
10299
10300
|
let a = n.any(r, n.sym("http://www.w3.org/ns/ui#backgroundColor"));
|
|
10300
|
-
a && i.setAttribute("style", "background-color: " + a.value + "; "), i.AJAR_uri =
|
|
10301
|
+
a && i.setAttribute("style", "background-color: " + a.value + "; "), i.AJAR_uri = t, t in f && (i.setAttribute("selected", "true"), g.currentURI = t), g.appendChild(i);
|
|
10301
10302
|
}
|
|
10302
|
-
if (
|
|
10303
|
-
let
|
|
10304
|
-
|
|
10303
|
+
if (d && o.mint) {
|
|
10304
|
+
let t = e.createElement("option");
|
|
10305
|
+
t.appendChild(e.createTextNode(o.mint)), t.AJAR_mint = !0, g.insertBefore(t, g.firstChild);
|
|
10305
10306
|
}
|
|
10306
|
-
if (g.currentURI == null && !
|
|
10307
|
-
let
|
|
10308
|
-
|
|
10307
|
+
if (g.currentURI == null && !o.multiple) {
|
|
10308
|
+
let t = e.createElement("option");
|
|
10309
|
+
t.appendChild(e.createTextNode(o.nullLabel)), g.insertBefore(t, g.firstChild), t.selected = !0;
|
|
10309
10310
|
}
|
|
10310
|
-
return
|
|
10311
|
+
return d && g.addEventListener("change", m, !1), g;
|
|
10311
10312
|
}
|
|
10312
|
-
function In(
|
|
10313
|
-
b("Select list length now " +
|
|
10314
|
-
let
|
|
10315
|
-
for (let e = 0; e <
|
|
10316
|
-
let t =
|
|
10317
|
-
t.uri || k(`makeSelectForOptions: option does not have an uri: ${t}, with predicate: ${i}`), !(!t.uri || t.uri in
|
|
10318
|
-
}
|
|
10319
|
-
if (
|
|
10320
|
-
b("makeSelectForOptions: dataDoc=" +
|
|
10321
|
-
let
|
|
10322
|
-
return
|
|
10323
|
-
e.uri && (
|
|
10324
|
-
}),
|
|
10313
|
+
function In(e, n, r, i, a, o, s, c) {
|
|
10314
|
+
b("Select list length now " + a.length);
|
|
10315
|
+
let l = 0, u = {}, d = n.updater.editable(s.uri);
|
|
10316
|
+
for (let e = 0; e < a.length; e++) {
|
|
10317
|
+
let t = a[e];
|
|
10318
|
+
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
|
+
}
|
|
10320
|
+
if (l === 0) return L(e, "Can't do selector with no options, subject= " + r + " property = " + i + ".");
|
|
10321
|
+
b("makeSelectForOptions: dataDoc=" + s);
|
|
10322
|
+
let f, p = function() {
|
|
10323
|
+
return f = {}, i.sameTerm(h.rdf("type")) ? f = n.findTypeURIs(r) : n.each(r, i, null, s).forEach(function(e) {
|
|
10324
|
+
e.uri && (f[e.uri] = !0);
|
|
10325
|
+
}), f;
|
|
10325
10326
|
};
|
|
10326
|
-
|
|
10327
|
-
let
|
|
10327
|
+
f = p();
|
|
10328
|
+
let m = function(a) {
|
|
10328
10329
|
g.disabled = !0;
|
|
10329
|
-
let o = [],
|
|
10330
|
-
n.holds(r, i,
|
|
10330
|
+
let o = [], l = [], u = function(e) {
|
|
10331
|
+
n.holds(r, i, e, s) && o.push(t(r, i, e, s));
|
|
10331
10332
|
};
|
|
10332
|
-
for (let
|
|
10333
|
-
let a = g.options[
|
|
10334
|
-
a.AJAR_uri && (a.selected && !(a.AJAR_uri in
|
|
10333
|
+
for (let e = 0; e < g.options.length; e++) {
|
|
10334
|
+
let a = g.options[e];
|
|
10335
|
+
a.AJAR_uri && (a.selected && !(a.AJAR_uri in f) && l.push(t(r, i, n.sym(a.AJAR_uri), s)), !a.selected && a.AJAR_uri in f && u(n.sym(a.AJAR_uri)), a.selected && (g.currentURI = a.AJAR_uri));
|
|
10335
10336
|
}
|
|
10336
10337
|
let d = g.subSelect;
|
|
10337
10338
|
for (; d && d.currentURI;) u(n.sym(d.currentURI)), d = d.subSelect;
|
|
10338
10339
|
for (d = g.superSelect; d && d.currentURI;) u(n.sym(d.currentURI)), d = d.superSelect;
|
|
10339
|
-
w("selectForOptions: data doc = " +
|
|
10340
|
-
if (
|
|
10341
|
-
else return g.parentNode.appendChild(L(
|
|
10342
|
-
|
|
10340
|
+
w("selectForOptions: data doc = " + s), n.updater.update(o, l, function(t, n, r) {
|
|
10341
|
+
if (f = p(), n) g.disabled = !1;
|
|
10342
|
+
else return g.parentNode.appendChild(L(e, "Error updating data in select: " + r));
|
|
10343
|
+
c && c(n, {
|
|
10343
10344
|
widget: "select",
|
|
10344
10345
|
event: "change"
|
|
10345
10346
|
});
|
|
10346
10347
|
});
|
|
10347
|
-
}, g =
|
|
10348
|
+
}, g = e.createElement("select");
|
|
10348
10349
|
g.setAttribute("style", E.formSelectStyle), g.currentURI = null, g.refresh = function() {
|
|
10349
|
-
|
|
10350
|
+
f = p();
|
|
10350
10351
|
for (let e = 0; e < g.children.length; e++) {
|
|
10351
10352
|
let t = g.children[e];
|
|
10352
|
-
t.AJAR_uri && (t.selected = t.AJAR_uri in
|
|
10353
|
+
t.AJAR_uri && (t.selected = t.AJAR_uri in f);
|
|
10353
10354
|
}
|
|
10354
10355
|
g.disabled = !1;
|
|
10355
10356
|
};
|
|
10356
|
-
for (let
|
|
10357
|
-
let r = n.sym(
|
|
10358
|
-
|
|
10357
|
+
for (let t in u) {
|
|
10358
|
+
let r = n.sym(t), i = e.createElement("option");
|
|
10359
|
+
o.disambiguate ? i.appendChild(e.createTextNode(C(r, !0))) : i.appendChild(e.createTextNode(D(r, !0)));
|
|
10359
10360
|
let a = n.any(r, n.sym("http://www.w3.org/ns/ui#backgroundColor"));
|
|
10360
|
-
a && i.setAttribute("style", "background-color: " + a.value + "; "), i.AJAR_uri =
|
|
10361
|
+
a && i.setAttribute("style", "background-color: " + a.value + "; "), i.AJAR_uri = t, t in f && (i.setAttribute("selected", "true"), g.currentURI = t), g.appendChild(i);
|
|
10361
10362
|
}
|
|
10362
10363
|
if (!g.currentURI) {
|
|
10363
|
-
let
|
|
10364
|
-
|
|
10364
|
+
let t = e.createElement("option");
|
|
10365
|
+
t.appendChild(e.createTextNode(o.nullLabel)), g.insertBefore(t, g.firstChild), t.selected = !0;
|
|
10365
10366
|
}
|
|
10366
|
-
return
|
|
10367
|
+
return d && g.addEventListener("change", m, !1), g;
|
|
10367
10368
|
}
|
|
10368
|
-
function Ln(e, t, n, r, i,
|
|
10369
|
-
let
|
|
10370
|
-
return
|
|
10371
|
-
multiple:
|
|
10369
|
+
function Ln(e, t, n, r, i, a) {
|
|
10370
|
+
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), b("Select list length " + s.length), s.length === 0 ? L(e, "Can't do " + (c ? "multiple " : "") + "selector with no subclasses of category: " + r) : s.length === 1 ? L(e, "Can't do " + (c ? "multiple " : "") + "selector with only 1 subclass of category: " + r + ":" + s[1]) : Fn(e, t, n, h.rdf("type"), s, {
|
|
10372
|
+
multiple: c,
|
|
10372
10373
|
nullLabel: "* Select type *"
|
|
10373
|
-
}, i,
|
|
10374
|
+
}, i, a);
|
|
10374
10375
|
}
|
|
10375
|
-
function Rn(e, t, n, r, i,
|
|
10376
|
-
function
|
|
10377
|
-
|
|
10376
|
+
function Rn(e, t, n, r, i, a) {
|
|
10377
|
+
function o() {
|
|
10378
|
+
c &&= (s.removeChild(c), null), u.currentURI && t.any(t.sym(u.currentURI), h.owl("disjointUnionOf")) && (c = Rn(e, t, n, t.sym(u.currentURI), i, a), u.subSelect = c.firstChild, u.subSelect.superSelect = u, s.appendChild(c));
|
|
10378
10379
|
}
|
|
10379
|
-
let
|
|
10380
|
-
function
|
|
10381
|
-
e &&
|
|
10380
|
+
let s = e.createElement("span"), c = null;
|
|
10381
|
+
function l(e, t) {
|
|
10382
|
+
e && o(), a(e, t);
|
|
10382
10383
|
}
|
|
10383
|
-
let
|
|
10384
|
-
return
|
|
10384
|
+
let u = Ln(e, t, n, r, i, l);
|
|
10385
|
+
return s.appendChild(u), o(), s;
|
|
10385
10386
|
}
|
|
10386
|
-
function zn(e, t, n, r, i, o, s
|
|
10387
|
-
let
|
|
10388
|
-
|
|
10389
|
-
function
|
|
10387
|
+
function zn(e, t, n, r, i, a, o, s) {
|
|
10388
|
+
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
|
+
d.style = E.checkboxInputStyle, l.appendChild(d);
|
|
10390
|
+
function p(e) {
|
|
10390
10391
|
if (!e) return [];
|
|
10391
|
-
if (e.object) return e.why ||=
|
|
10392
|
+
if (e.object) return e.why ||= o, [e];
|
|
10392
10393
|
if (e instanceof Array) return e;
|
|
10393
10394
|
throw Error("buildCheckboxForm: bad param " + e);
|
|
10394
10395
|
}
|
|
10395
|
-
i =
|
|
10396
|
-
function
|
|
10396
|
+
i = p(i), r = p(r);
|
|
10397
|
+
function m(e) {
|
|
10397
10398
|
return e.filter((e) => !t.holds(e.subject, e.predicate, e.object, e.why)).length === 0;
|
|
10398
10399
|
}
|
|
10399
10400
|
function g() {
|
|
10400
|
-
let n =
|
|
10401
|
+
let n = m(i), o = n;
|
|
10401
10402
|
if (r.length) {
|
|
10402
|
-
let
|
|
10403
|
-
if (n &&
|
|
10404
|
-
if (!n && !
|
|
10403
|
+
let l = m(r);
|
|
10404
|
+
if (n && l) return c.appendChild(L(e, "Inconsistent data in dataDoc!\n" + i + " and\n" + r)), c;
|
|
10405
|
+
if (!n && !l) {
|
|
10405
10406
|
n = null;
|
|
10406
|
-
let e = t.any(
|
|
10407
|
-
|
|
10407
|
+
let e = t.any(a, h.ui("default"));
|
|
10408
|
+
o = e ? e.value === "1" : s ? null : !1;
|
|
10408
10409
|
}
|
|
10409
10410
|
}
|
|
10410
|
-
|
|
10411
|
+
d.state = n, d.textContent = {
|
|
10411
10412
|
true: vn,
|
|
10412
|
-
false:
|
|
10413
|
+
false: s ? yn : " ",
|
|
10413
10414
|
null: bn
|
|
10414
|
-
}[
|
|
10415
|
+
}[o];
|
|
10415
10416
|
}
|
|
10416
|
-
if (g(), !
|
|
10417
|
+
if (g(), !u) return c;
|
|
10417
10418
|
let _ = !1;
|
|
10418
|
-
return
|
|
10419
|
+
return d.addEventListener("click", function(n) {
|
|
10419
10420
|
if (_) return;
|
|
10420
|
-
_ = !0,
|
|
10421
|
+
_ = !0, d.disabled = !0;
|
|
10421
10422
|
let a = !1, o = function() {
|
|
10422
|
-
return !a && (a = !0, _ = !1,
|
|
10423
|
-
},
|
|
10424
|
-
|
|
10423
|
+
return !a && (a = !0, _ = !1, d.disabled = !1, !0);
|
|
10424
|
+
}, l = function(t) {
|
|
10425
|
+
f.style.color = "#000", f.style.backgroundColor = "#fee", c.appendChild(L(e, `Checkbox: Error updating dataDoc from ${d.state} to ${d.newState}:\n\n${t}`));
|
|
10425
10426
|
};
|
|
10426
|
-
|
|
10427
|
-
let u =
|
|
10428
|
-
|
|
10429
|
-
let
|
|
10430
|
-
O(` Deleting ${u}`), O(` Inserting ${
|
|
10427
|
+
f.style.color = "#bbb";
|
|
10428
|
+
let u = d.state === !0 ? i : d.state === !1 ? r : [];
|
|
10429
|
+
d.newState = d.state === null ? !0 : d.state === !0 ? !1 : !s || null;
|
|
10430
|
+
let p = d.newState === !0 ? i : d.newState === !1 ? r : [];
|
|
10431
|
+
O(` Deleting ${u}`), O(` Inserting ${p}`);
|
|
10431
10432
|
try {
|
|
10432
|
-
let e = t.updater.update(u,
|
|
10433
|
-
o() && (n ? (
|
|
10433
|
+
let e = t.updater.update(u, p, function(e, n, r) {
|
|
10434
|
+
o() && (n ? (f.style.color = "#000", d.state = d.newState, d.textContent = {
|
|
10434
10435
|
true: vn,
|
|
10435
10436
|
false: yn,
|
|
10436
10437
|
null: bn
|
|
10437
|
-
}[
|
|
10438
|
+
}[d.state]) : (u.why && t.holds(u.subject, u.predicate, u.object, u.why) && O(" @@@@@ weird if 409 - does hold statement"), l(r)));
|
|
10438
10439
|
});
|
|
10439
10440
|
e && typeof e.then == "function" && e.catch(function(e) {
|
|
10440
|
-
o() &&
|
|
10441
|
+
o() && l(e instanceof Error ? e.message : e);
|
|
10441
10442
|
}).finally(function() {
|
|
10442
10443
|
o();
|
|
10443
10444
|
});
|
|
10444
10445
|
} catch (e) {
|
|
10445
10446
|
throw o(), e;
|
|
10446
10447
|
}
|
|
10447
|
-
}, !1),
|
|
10448
|
+
}, !1), c;
|
|
10448
10449
|
}
|
|
10449
10450
|
function $(e) {
|
|
10450
10451
|
let t = /* @__PURE__ */ new Date();
|
|
10451
|
-
return
|
|
10452
|
+
return n(e.uri + "#id" + ("" + t.getTime()));
|
|
10452
10453
|
}
|
|
10453
|
-
function Bn(
|
|
10454
|
-
let
|
|
10454
|
+
function Bn(e, r, i, a, o, s, c, l, u, d, f) {
|
|
10455
|
+
let p = {}, m = i.updater.editable(d.uri);
|
|
10455
10456
|
for (let e = 0; e < s.length; e++) {
|
|
10456
10457
|
let t = s[e];
|
|
10457
|
-
!t.uri || t.uri in
|
|
10458
|
+
!t.uri || t.uri in p || (p[t.uri] = !0);
|
|
10458
10459
|
}
|
|
10459
|
-
if (Object.keys(
|
|
10460
|
+
if (Object.keys(p).length === 0 && !u.mint) return L(e, "Can't do selector with no options, subject= " + a + " property = " + o + ".");
|
|
10460
10461
|
b("makeSelectForChoice: dataDoc=" + d);
|
|
10461
10462
|
function g() {
|
|
10462
10463
|
let e = "--- choice ---";
|
|
10463
|
-
return o && o.termType !== "BlankNode" && (e = "* Select for property: " + D(o) + " *"),
|
|
10464
|
+
return o && o.termType !== "BlankNode" && (e = "* Select for property: " + D(o) + " *"), a && a.termType !== "BlankNode" && (e = "* Select for " + D(a, !0) + " *"), e;
|
|
10464
10465
|
}
|
|
10465
10466
|
function _() {
|
|
10466
|
-
let
|
|
10467
|
-
return
|
|
10467
|
+
let t = e.createElement("option");
|
|
10468
|
+
return t.appendChild(e.createTextNode(g())), t.disabled = !0, t.value = !0, t.hidden = !0, t.selected = !0, t;
|
|
10468
10469
|
}
|
|
10469
10470
|
let v = function(e) {
|
|
10470
|
-
|
|
10471
|
-
}, y =
|
|
10471
|
+
r.removeChild(r.lastChild), y.refresh();
|
|
10472
|
+
}, y = e.createElement("select");
|
|
10472
10473
|
y.setAttribute("style", E.formSelectStyle), y.setAttribute("id", "formSelect"), y.currentURI = null;
|
|
10473
|
-
for (let e in
|
|
10474
|
-
if (
|
|
10475
|
-
let
|
|
10476
|
-
|
|
10477
|
-
}
|
|
10478
|
-
y.children.length === 0 && y.insertBefore(_(), y.firstChild), y.update = function(
|
|
10479
|
-
c =
|
|
10480
|
-
let s = [], u = [],
|
|
10481
|
-
|
|
10482
|
-
},
|
|
10483
|
-
|
|
10484
|
-
}, g =
|
|
10485
|
-
for (let e of g) Vn(e, c) ||
|
|
10486
|
-
for (let e of c) e in g ||
|
|
10487
|
-
|
|
10488
|
-
if (!n) return y.parentNode.appendChild(L(
|
|
10474
|
+
for (let e in p) y.appendChild(x(e));
|
|
10475
|
+
if (m && u.mint) {
|
|
10476
|
+
let t = e.createElement("option");
|
|
10477
|
+
t.appendChild(e.createTextNode(u.mint)), t.AJAR_mint = !0, y.insertBefore(t, y.firstChild);
|
|
10478
|
+
}
|
|
10479
|
+
y.children.length === 0 && y.insertBefore(_(), y.firstChild), y.update = function(r) {
|
|
10480
|
+
c = r;
|
|
10481
|
+
let s = [], u = [], p = function(e) {
|
|
10482
|
+
i.holds(a, o, e, d) && s.push(t(a, o, e, d));
|
|
10483
|
+
}, m = function(e) {
|
|
10484
|
+
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
|
+
}, g = i.each(a, o, null, d).map((e) => e.value);
|
|
10486
|
+
for (let e of g) Vn(e, c) || p(n(e));
|
|
10487
|
+
for (let e of c) e in g || m(n(e));
|
|
10488
|
+
i.updater.update(s, u, function(t, n, r) {
|
|
10489
|
+
if (!n) return y.parentNode.appendChild(L(e, "Error updating data in select: " + r));
|
|
10489
10490
|
y.refresh(), f && f(n, {
|
|
10490
10491
|
widget: "select",
|
|
10491
10492
|
event: "change"
|
|
@@ -10493,36 +10494,36 @@ function Bn(t, n, r, i, o, s, c, l, u, d, f) {
|
|
|
10493
10494
|
});
|
|
10494
10495
|
}, y.refresh = function() {
|
|
10495
10496
|
y.disabled = !0;
|
|
10496
|
-
let s = [],
|
|
10497
|
+
let s = [], p;
|
|
10497
10498
|
for (let n = 0; n < y.options.length; n++) {
|
|
10498
|
-
let
|
|
10499
|
-
if (
|
|
10499
|
+
let r = y.options[n];
|
|
10500
|
+
if (r.selected && r.AJAR_mint) {
|
|
10500
10501
|
if (u.mintClass) {
|
|
10501
|
-
let
|
|
10502
|
+
let t = Nn(e, i, a, o, l, u.subForm, d, function(e, t) {
|
|
10502
10503
|
e || f(e, t, { change: "new" });
|
|
10503
10504
|
});
|
|
10504
|
-
y.parentNode.appendChild(
|
|
10505
|
-
} else
|
|
10506
|
-
s.push(
|
|
10505
|
+
y.parentNode.appendChild(t), p = t.AJAR_subject;
|
|
10506
|
+
} else p = $(d);
|
|
10507
|
+
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))), y.currentURI = p;
|
|
10507
10508
|
}
|
|
10508
|
-
|
|
10509
|
+
r.AJAR_uri && (r.selected && Vn(r.AJAR_uri, c) && (y.currentURI = r.AJAR_uri), Vn(r.AJAR_uri, c) || r.removeAttribute("selected"), Vn(r.AJAR_uri, c) && r.setAttribute("selected", "true"));
|
|
10509
10510
|
}
|
|
10510
|
-
w("selectForOptions: data doc = " + d), y.currentURI && u.subForm && !u.multiSelect && wn(
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
}), f && f(
|
|
10511
|
+
w("selectForOptions: data doc = " + d), y.currentURI && u.subForm && !u.multiSelect && wn(e, r, {}, n(y.currentURI), u.subForm, d, function(t, n) {
|
|
10512
|
+
t ? (i.updater.update([], s, function(t, n, i) {
|
|
10513
|
+
n || r.appendChild(L(e, "Error updating select: " + i));
|
|
10514
|
+
}), f && f(t, {
|
|
10514
10515
|
widget: "select",
|
|
10515
10516
|
event: "new"
|
|
10516
|
-
})) :
|
|
10517
|
+
})) : r.appendChild(L(e, "Error updating data in field of select: " + n));
|
|
10517
10518
|
}), y.disabled = !1;
|
|
10518
10519
|
};
|
|
10519
|
-
function x(
|
|
10520
|
-
let n =
|
|
10521
|
-
a = u.disambiguate ? C(
|
|
10522
|
-
let o =
|
|
10523
|
-
return o && n.setAttribute("style", "background-color: " + o.value + "; "), n.AJAR_uri =
|
|
10520
|
+
function x(t) {
|
|
10521
|
+
let n = e.createElement("option"), r = i.sym(t), a;
|
|
10522
|
+
a = u.disambiguate ? C(r, !0) : D(r, !0), n.appendChild(e.createTextNode(a)), n.setAttribute("value", t);
|
|
10523
|
+
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, Vn(r.value, c) && n.setAttribute("selected", "true"), n;
|
|
10524
10525
|
}
|
|
10525
|
-
return
|
|
10526
|
+
return m && y.addEventListener("change", v, !1), y;
|
|
10526
10527
|
}
|
|
10527
10528
|
function Vn(e, t) {
|
|
10528
10529
|
let n = 0;
|
|
@@ -10544,7 +10545,7 @@ function Hn(e, t, n) {
|
|
|
10544
10545
|
return h;
|
|
10545
10546
|
}
|
|
10546
10547
|
// src/widgets/index.js
|
|
10547
|
-
var Un = /* @__PURE__ */
|
|
10548
|
+
var Un = /* @__PURE__ */ o({
|
|
10548
10549
|
Group: () => ge,
|
|
10549
10550
|
GroupBuilder: () => _e,
|
|
10550
10551
|
GroupPicker: () => he,
|
|
@@ -10628,4 +10629,4 @@ var Un = /* @__PURE__ */ u({
|
|
|
10628
10629
|
});
|
|
10629
10630
|
export { I as C, j as D, O as E, k as O, ue as S, A as T, nt as _, kt as a, R as b, W as c, Ye as d, H as f, Ze as g, it as h, $ as i, Ne as l, Ve as m, En as n, Xe as o, We as p, zn as r, U as s, Un as t, Me as u, Ke as v, de as w, L as x, Fe as y };
|
|
10630
10631
|
|
|
10631
|
-
//# sourceMappingURL=widgets-
|
|
10632
|
+
//# sourceMappingURL=widgets-BBEQu0CS.js.map
|