@edifice.io/wiki 3.6.12 → 3.6.14-develop-pedago.20261005153803

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index2.js CHANGED
@@ -5,7 +5,7 @@ var L1 = (e, t, i) => t.has(e) || S1("Cannot " + i);
5
5
  var v = (e, t, i) => (L1(e, t, "read from private field"), i ? i.call(e) : t.get(e)), N = (e, t, i) => t.has(e) ? S1("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), A = (e, t, i, s) => (L1(e, t, "write to private field"), s ? s.call(e, i) : t.set(e, i), i);
6
6
  import { jsx as o, jsxs as p, Fragment as c2 } from "react/jsx-runtime";
7
7
  import * as r2 from "react";
8
- import { createContext as ot, useState as i2, useEffect as a2, useCallback as w2, useContext as Xi, Suspense as l0, useRef as C0, lazy as M2, forwardRef as r1, useMemo as l1 } from "react";
8
+ import { createContext as ot, useState as i2, useEffect as o2, useCallback as J2, useContext as Xi, Suspense as l0, useRef as C0, lazy as M2, forwardRef as r1, useMemo as l1 } from "react";
9
9
  import { createRoot as $i } from "react-dom/client";
10
10
  import { useRouteError as _i, useNavigate as _, useActionData as es, Form as U0, useParams as X, useSubmit as rt, redirect as se, useLocation as me, useBlocker as ts, useBeforeUnload as is, useNavigation as ss, matchPath as ns, useMatch as ne, Outlet as as, createMemoryRouter as os, RouterProvider as rs } from "react-router-dom";
11
11
  import { ERROR_CODE as ls, FOLDER as R2, SORT_ORDER as cs, ResourceService as pe, odeServices as W } from "@edifice.io/client";
@@ -57,7 +57,7 @@ function Z2(e, t) {
57
57
  cleanups: null,
58
58
  context: a ? a.context : null,
59
59
  owner: a
60
- }, l = n ? e : () => e(() => o2(() => b0(r)));
60
+ }, l = n ? e : () => e(() => s2(() => b0(r)));
61
61
  T = r, j = null;
62
62
  try {
63
63
  return f2(l, !0);
@@ -126,18 +126,18 @@ function Ks(e, t, i) {
126
126
  d = !1;
127
127
  const L = u ? u() : s;
128
128
  if (L == null || L === !1) {
129
- x(r, o2(h));
129
+ x(r, s2(h));
130
130
  return;
131
131
  }
132
132
  let w;
133
- const U = l !== ze ? l : o2(() => {
133
+ const U = l !== ze ? l : s2(() => {
134
134
  try {
135
135
  return n(L, {
136
136
  value: h(),
137
137
  refetching: R
138
138
  });
139
- } catch (s2) {
140
- w = s2;
139
+ } catch (n2) {
140
+ w = n2;
141
141
  }
142
142
  });
143
143
  if (w !== void 0) {
@@ -147,7 +147,7 @@ function Ks(e, t, i) {
147
147
  return x(r, U, void 0, L), U;
148
148
  return r = U, "v" in U ? (U.s === 1 ? x(r, U.v, void 0, L) : x(r, void 0, ee(U.v), L), U) : (d = !0, queueMicrotask(() => d = !1), f2(() => {
149
149
  g(m ? "refreshing" : "pending"), S();
150
- }, !1), U.then((s2) => x(U, s2, void 0, L), (s2) => x(U, void 0, ee(s2), L)));
150
+ }, !1), U.then((n2) => x(U, n2, void 0, L), (n2) => x(U, void 0, ee(n2), L)));
151
151
  }
152
152
  Object.defineProperties(O, {
153
153
  state: {
@@ -180,7 +180,7 @@ function Ks(e, t, i) {
180
180
  function M3(e) {
181
181
  return f2(e, !1);
182
182
  }
183
- function o2(e) {
183
+ function s2(e) {
184
184
  if (j === null) return e();
185
185
  const t = j;
186
186
  j = null;
@@ -201,12 +201,12 @@ function b3(e, t, i) {
201
201
  } else l = e();
202
202
  if (a)
203
203
  return a = !1, r;
204
- const c = o2(() => t(l, n, r));
204
+ const c = s2(() => t(l, n, r));
205
205
  return n = l, c;
206
206
  };
207
207
  }
208
208
  function Xs(e) {
209
- Ht(() => o2(e));
209
+ Ht(() => s2(e));
210
210
  }
211
211
  function M0(e) {
212
212
  return T === null || (T.cleanups === null ? T.cleanups = [e] : T.cleanups.push(e)), e;
@@ -319,7 +319,7 @@ function ye(e, t, i, s = v2, n) {
319
319
  function ce(e) {
320
320
  if (e.state === 0) return;
321
321
  if (e.state === le) return de(e);
322
- if (e.suspense && o2(e.suspense.inFallback)) return e.suspense.effects.push(e);
322
+ if (e.suspense && s2(e.suspense.inFallback)) return e.suspense.effects.push(e);
323
323
  const t = [e];
324
324
  for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < ke); )
325
325
  e.state && t.push(e);
@@ -428,7 +428,7 @@ function Qe(e) {
428
428
  function an(e, t) {
429
429
  return function(s) {
430
430
  let n;
431
- return N2(() => n = o2(() => (T.context = {
431
+ return N2(() => n = s2(() => (T.context = {
432
432
  ...T.context,
433
433
  [e]: s.value
434
434
  }, Gt(() => s.children))), void 0), n;
@@ -442,7 +442,7 @@ function on(e, t, i = {}) {
442
442
  let s = [], n = [], a = [], r = 0, l = t.length > 1 ? [] : null;
443
443
  return M0(() => ue(a)), () => {
444
444
  let c = e() || [], d = c.length, m, u;
445
- return c[Ut], o2(() => {
445
+ return c[Ut], s2(() => {
446
446
  let h, f, k, y, b, S, M, g, x;
447
447
  if (d === 0)
448
448
  r !== 0 && (ue(a), a = [], s = [], n = [], r = 0, l && (l = [])), i.fallback && (s = [Ve], n[0] = Z2((J) => (a[0] = J, i.fallback())), r = 1);
@@ -477,7 +477,7 @@ function rn(e, t, i = {}) {
477
477
  let s = [], n = [], a = [], r = [], l = 0, c;
478
478
  return M0(() => ue(a)), () => {
479
479
  const d = e() || [], m = d.length;
480
- return d[Ut], o2(() => {
480
+ return d[Ut], s2(() => {
481
481
  if (m === 0)
482
482
  return l !== 0 && (ue(a), a = [], s = [], n = [], l = 0, r = []), i.fallback && (s = [Ve], n[0] = Z2((C) => (a[0] = C, i.fallback())), l = 1), n;
483
483
  for (s[0] === Ve && (a[0](), a = [], s = [], n = [], l = 0), c = 0; c < m; c++)
@@ -494,7 +494,7 @@ function rn(e, t, i = {}) {
494
494
  };
495
495
  }
496
496
  function Vt(e, t) {
497
- return o2(() => e(t || {}));
497
+ return s2(() => e(t || {}));
498
498
  }
499
499
  function Y0() {
500
500
  return !0;
@@ -634,7 +634,7 @@ function Xt(e) {
634
634
  t = l;
635
635
  }
636
636
  let r;
637
- return t2(() => (r = t()) ? o2(() => {
637
+ return t2(() => (r = t()) ? s2(() => {
638
638
  if (!a || I.done) return r(n);
639
639
  const l = I.context;
640
640
  h0(a);
@@ -669,8 +669,8 @@ function z3(e) {
669
669
  const n = s();
670
670
  if (n) {
671
671
  const a = e.children;
672
- return typeof a == "function" && a.length > 0 ? o2(() => a(t ? n : () => {
673
- if (!o2(s)) throw $t("Show");
672
+ return typeof a == "function" && a.length > 0 ? s2(() => a(t ? n : () => {
673
+ if (!s2(s)) throw $t("Show");
674
674
  return i();
675
675
  })) : a;
676
676
  }
@@ -694,9 +694,9 @@ function A3(e) {
694
694
  const s = i()();
695
695
  if (!s) return e.fallback;
696
696
  const [n, a, r] = s, l = r.children;
697
- return typeof l == "function" && l.length > 0 ? o2(() => l(r.keyed ? a() : () => {
697
+ return typeof l == "function" && l.length > 0 ? s2(() => l(r.keyed ? a() : () => {
698
698
  var d;
699
- if (((d = o2(i)()) == null ? void 0 : d[0]) !== n) throw $t("Match");
699
+ if (((d = s2(i)()) == null ? void 0 : d[0]) !== n) throw $t("Match");
700
700
  return a();
701
701
  })) : l;
702
702
  }, void 0, void 0);
@@ -875,7 +875,7 @@ function Z3(e, t, i, s) {
875
875
  const a = () => {
876
876
  const l = document.createElement("template");
877
877
  return l.innerHTML = e, l.content.firstChild;
878
- }, r = () => (n || (n = a())).cloneNode(!0);
878
+ }, r = t ? () => s2(() => document.importNode(n || (n = a()), !0)) : () => (n || (n = a())).cloneNode(!0);
879
879
  return r.cloneNode = r, r;
880
880
  }
881
881
  function Mn(e, t = window.document) {
@@ -941,7 +941,7 @@ function Jn(e, t = {}, i, s) {
941
941
  return s || N2(() => n.children = v0(e, t.children, n.children)), N2(() => typeof t.ref == "function" && wn(t.ref, e)), N2(() => zn(e, t, i, !0, n, !0)), n;
942
942
  }
943
943
  function wn(e, t, i) {
944
- return o2(() => e(t, i));
944
+ return s2(() => e(t, i));
945
945
  }
946
946
  function $e(e, t, i, s) {
947
947
  if (i !== void 0 && !s && (s = []), typeof t != "function") return v0(e, t, s, i);
@@ -1184,7 +1184,7 @@ function Nn(e, t) {
1184
1184
  const s = i();
1185
1185
  switch (typeof s) {
1186
1186
  case "function":
1187
- return o2(() => s(t));
1187
+ return s2(() => s(t));
1188
1188
  case "string":
1189
1189
  const n = kn.has(s), a = I.context ? An() : ti(s, n);
1190
1190
  return Jn(a, t, n), a;
@@ -1283,7 +1283,7 @@ var jn = class {
1283
1283
  findByName(e) {
1284
1284
  return this.transfomers[e];
1285
1285
  }
1286
- }, Dn = (e) => Object.prototype.toString.call(e).slice(8, -1), si = (e) => typeof e > "u", Hn = (e) => e === null, S0 = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, e1 = (e) => S0(e) && Object.keys(e).length === 0, z2 = (e) => Array.isArray(e), Fn = (e) => typeof e == "string", Gn = (e) => typeof e == "number" && !isNaN(e), Yn = (e) => typeof e == "boolean", Pn = (e) => e instanceof RegExp, L0 = (e) => e instanceof Map, R0 = (e) => e instanceof Set, ni = (e) => Dn(e) === "Symbol", Bn = (e) => e instanceof Date && !isNaN(e.valueOf()), Qn = (e) => e instanceof Error, Z1 = (e) => typeof e == "number" && isNaN(e), Vn = (e) => Yn(e) || Hn(e) || si(e) || Gn(e) || Fn(e) || ni(e), Kn = (e) => typeof e == "bigint", Xn = (e) => e === 1 / 0 || e === -1 / 0, $n = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), _n = (e) => e instanceof URL, ai = (e) => e.replace(/\./g, "\\."), Te = (e) => e.map(String).map(ai).join("."), y0 = (e) => {
1286
+ }, Dn = (e) => Object.prototype.toString.call(e).slice(8, -1), si = (e) => typeof e > "u", Hn = (e) => e === null, S0 = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, e1 = (e) => S0(e) && Object.keys(e).length === 0, w2 = (e) => Array.isArray(e), Fn = (e) => typeof e == "string", Gn = (e) => typeof e == "number" && !isNaN(e), Yn = (e) => typeof e == "boolean", Pn = (e) => e instanceof RegExp, L0 = (e) => e instanceof Map, R0 = (e) => e instanceof Set, ni = (e) => Dn(e) === "Symbol", Bn = (e) => e instanceof Date && !isNaN(e.valueOf()), Qn = (e) => e instanceof Error, Z1 = (e) => typeof e == "number" && isNaN(e), Vn = (e) => Yn(e) || Hn(e) || si(e) || Gn(e) || Fn(e) || ni(e), Kn = (e) => typeof e == "bigint", Xn = (e) => e === 1 / 0 || e === -1 / 0, $n = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), _n = (e) => e instanceof URL, ai = (e) => e.replace(/\./g, "\\."), Te = (e) => e.map(String).map(ai).join("."), y0 = (e) => {
1287
1287
  const t = [];
1288
1288
  let i = "";
1289
1289
  for (let n = 0; n < e.length; n++) {
@@ -1413,7 +1413,7 @@ oi.forEach((e) => {
1413
1413
  mi[e.annotation] = e;
1414
1414
  });
1415
1415
  var ia = (e, t, i) => {
1416
- if (z2(t))
1416
+ if (w2(t))
1417
1417
  switch (t[0]) {
1418
1418
  case "symbol":
1419
1419
  return ri.untransform(e, t, i);
@@ -1474,7 +1474,7 @@ var sa = (e, t) => {
1474
1474
  let s = e;
1475
1475
  for (let a = 0; a < t.length - 1; a++) {
1476
1476
  const r = t[a];
1477
- if (z2(s)) {
1477
+ if (w2(s)) {
1478
1478
  const l = +r;
1479
1479
  s = s[l];
1480
1480
  } else if (S0(s))
@@ -1497,7 +1497,7 @@ var sa = (e, t) => {
1497
1497
  }
1498
1498
  }
1499
1499
  const n = t[t.length - 1];
1500
- if (z2(s) ? s[+n] = i(s[+n]) : S0(s) && (s[n] = i(s[n])), R0(s)) {
1500
+ if (w2(s) ? s[+n] = i(s[+n]) : S0(s) && (s[n] = i(s[n])), R0(s)) {
1501
1501
  const a = D2(s, +n), r = i(a);
1502
1502
  a !== r && (s.delete(a), s.add(r));
1503
1503
  }
@@ -1520,7 +1520,7 @@ var sa = (e, t) => {
1520
1520
  function i1(e, t, i = []) {
1521
1521
  if (!e)
1522
1522
  return;
1523
- if (!z2(e)) {
1523
+ if (!w2(e)) {
1524
1524
  r0(e, (a, r) => i1(a, t, [...i, ...y0(r)]));
1525
1525
  return;
1526
1526
  }
@@ -1541,7 +1541,7 @@ function aa(e, t) {
1541
1541
  e = t1(e, r, () => a);
1542
1542
  });
1543
1543
  }
1544
- if (z2(t)) {
1544
+ if (w2(t)) {
1545
1545
  const [s, n] = t;
1546
1546
  s.forEach((a) => {
1547
1547
  e = t1(e, y0(a), () => e);
@@ -1550,7 +1550,7 @@ function aa(e, t) {
1550
1550
  r0(t, i);
1551
1551
  return e;
1552
1552
  }
1553
- var oa = (e, t) => S0(e) || z2(e) || L0(e) || R0(e) || ci(e, t);
1553
+ var oa = (e, t) => S0(e) || w2(e) || L0(e) || R0(e) || ci(e, t);
1554
1554
  function ra(e, t, i) {
1555
1555
  const s = i.get(e);
1556
1556
  s ? s.push(t) : i.set(e, [t]);
@@ -1589,12 +1589,12 @@ var Ci = (e, t, i, s, n = [], a = [], r = /* @__PURE__ */ new Map()) => {
1589
1589
  return {
1590
1590
  transformedValue: null
1591
1591
  };
1592
- const c = N1(e, i), d = (c == null ? void 0 : c.value) ?? e, m = z2(d) ? [] : {}, u = {};
1592
+ const c = N1(e, i), d = (c == null ? void 0 : c.value) ?? e, m = w2(d) ? [] : {}, u = {};
1593
1593
  r0(d, (h, f) => {
1594
1594
  if (f === "__proto__" || f === "constructor" || f === "prototype")
1595
1595
  throw new Error(`Detected property ${f}. This is a prototype pollution risk, please remove it from your object.`);
1596
1596
  const k = Ci(h, t, i, s, [...n, f], [...a, e], r);
1597
- m[f] = k.transformedValue, z2(k.annotations) ? u[f] = k.annotations : S0(k.annotations) && r0(k.annotations, (y, b) => {
1597
+ m[f] = k.transformedValue, w2(k.annotations) ? u[f] = k.annotations : S0(k.annotations) && r0(k.annotations, (y, b) => {
1598
1598
  u[ai(f) + "." + b] = y;
1599
1599
  });
1600
1600
  });
@@ -2153,11 +2153,11 @@ var U1;
2153
2153
  (function(e) {
2154
2154
  e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
2155
2155
  })(U1 || (U1 = {}));
2156
- var I2;
2156
+ var A2;
2157
2157
  (function(e) {
2158
- e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
2159
- })(I2 || (I2 = {}));
2160
- I2.Space, I2.Enter, I2.Esc, I2.Space, I2.Enter, I2.Tab;
2158
+ e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter";
2159
+ })(A2 || (A2 = {}));
2160
+ A2.Space, A2.Enter, A2.Esc, A2.Space, A2.Enter;
2161
2161
  var j1;
2162
2162
  (function(e) {
2163
2163
  e[e.RightClick = 2] = "RightClick";
@@ -3398,7 +3398,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3398
3398
  const [t, i] = i2([]), [s, n] = i2(!0), {
3399
3399
  user: a
3400
3400
  } = c1();
3401
- return a2(() => {
3401
+ return o2(() => {
3402
3402
  (async () => {
3403
3403
  if (!e) {
3404
3404
  i([]), n(!0);
@@ -3447,7 +3447,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3447
3447
  mutation: f,
3448
3448
  shouldIncludeSubPages: k,
3449
3449
  toggleShouldIncludeSubPages: y
3450
- } = So(), [b, S] = i2([]), M = w2(async (J) => {
3450
+ } = So(), [b, S] = i2([]), M = J2(async (J) => {
3451
3451
  s(!0);
3452
3452
  const {
3453
3453
  addToastMessage: O
@@ -3471,7 +3471,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3471
3471
  count: z.newPageIds.length
3472
3472
  })
3473
3473
  }));
3474
- }, [f, h, t, e, k, a]), g = w2((J) => {
3474
+ }, [f, h, t, e, k, a]), g = J2((J) => {
3475
3475
  if (J.length > 0) {
3476
3476
  const O = J.map((z) => z.assetId);
3477
3477
  S(O);
@@ -3696,7 +3696,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3696
3696
  getPageFromRoute: () => m,
3697
3697
  getRevisionFromRoute: () => u,
3698
3698
  getPageVersionFromRoute: () => {
3699
- var J, O, z, H, R, L, w, U, s2, q, S2;
3699
+ var J, O, z, H, R, L, w, U, n2, q, S2;
3700
3700
  const g = !a.versionId;
3701
3701
  return {
3702
3702
  isRevision: !!a.versionId,
@@ -3707,7 +3707,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3707
3707
  jsonContent: (z = u.data) == null ? void 0 : z.jsonContent,
3708
3708
  lastContributer: ((H = u.data) == null ? void 0 : H.userId) ?? ((R = m.data) == null ? void 0 : R.lastContributer),
3709
3709
  lastContributerName: ((L = u.data) == null ? void 0 : L.username) ?? ((w = m.data) == null ? void 0 : w.lastContributerName),
3710
- title: ((U = u.data) == null ? void 0 : U.title) ?? ((s2 = m.data) == null ? void 0 : s2.title),
3710
+ title: ((U = u.data) == null ? void 0 : U.title) ?? ((n2 = m.data) == null ? void 0 : n2.title),
3711
3711
  modified: ((q = u.data) == null ? void 0 : q.date) ?? ((S2 = m.data) == null ? void 0 : S2.modified)
3712
3712
  },
3713
3713
  isPending: m.isPending || a.versionId && u.isPending,
@@ -3778,7 +3778,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3778
3778
  } = wo({
3779
3779
  data: n,
3780
3780
  selectedItems: c
3781
- }), g = w2((x) => {
3781
+ }), g = J2((x) => {
3782
3782
  b(!1), i(`/id/${t.wikiId}/page/${e}/version/${x}`);
3783
3783
  }, [b, i, t.wikiId, e]);
3784
3784
  return a ? /* @__PURE__ */ o(p2, {}) : /* @__PURE__ */ u1(/* @__PURE__ */ p(Y, { id: "revision-modal", isOpen: y, size: "lg", onModalClose: () => b(!1), children: [
@@ -3897,7 +3897,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3897
3897
  }, Di = (e) => {
3898
3898
  const t = g2();
3899
3899
  return {
3900
- handleSortPage: w2(async (s) => {
3900
+ handleSortPage: J2(async (s) => {
3901
3901
  try {
3902
3902
  const n = await B.getWikiPages(e, !1);
3903
3903
  for (const a of s) {
@@ -3957,7 +3957,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3957
3957
  setOpenMoveModal: f
3958
3958
  } = y2(), {
3959
3959
  addToastMessage: k
3960
- } = H0(), [y, b] = i2(null), S = zo(s, t), M = w2(async () => {
3960
+ } = H0(), [y, b] = i2(null), S = zo(s, t), M = J2(async () => {
3961
3961
  if (y && l && a)
3962
3962
  try {
3963
3963
  h(!0);
@@ -4034,7 +4034,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4034
4034
  } = ps(), {
4035
4035
  t: m
4036
4036
  } = E();
4037
- return a2(() => {
4037
+ return o2(() => {
4038
4038
  const C = document.getElementById("theme");
4039
4039
  C && (C.href = `${d == null ? void 0 : d.themeUrl}theme.css`);
4040
4040
  }, [d == null ? void 0 : d.themeUrl]), c ? /* @__PURE__ */ p("div", { className: "d-flex flex-column mt-24 ms-md-24 me-md-16", children: [
@@ -4097,17 +4097,17 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4097
4097
  d() && /* @__PURE__ */ o(Z, { onClick: c, leftIcon: /* @__PURE__ */ o(It, {}), variant: "filled", isLoading: r, disabled: r, children: s("wiki.version.restore") })
4098
4098
  ] })
4099
4099
  ] });
4100
- }, J2 = (e, t) => e.get(t), K0 = (e, t) => async ({
4100
+ }, I2 = (e, t) => e.get(t), K0 = (e, t) => async ({
4101
4101
  params: i,
4102
4102
  request: s
4103
4103
  }) => {
4104
4104
  var u;
4105
4105
  const n = await s.formData(), {
4106
4106
  addToastMessage: a
4107
- } = H0(), r = J2(n, "isConfirmVisibilityForm"), l = r ? JSON.parse(J2(n, "actionData")) : {
4108
- title: J2(n, "title"),
4109
- content: J2(n, "content"),
4110
- isHidden: J2(n, "isHidden") === "true"
4107
+ } = H0(), r = I2(n, "isConfirmVisibilityForm"), l = r ? JSON.parse(I2(n, "actionData")) : {
4108
+ title: I2(n, "title"),
4109
+ content: I2(n, "content"),
4110
+ isHidden: I2(n, "isHidden") === "true"
4111
4111
  };
4112
4112
  if (!r) {
4113
4113
  const h = (u = (await e.ensureQueryData($.findOne(i.wikiId))).pages) == null ? void 0 : u.find((f) => f._id === i.pageId);
@@ -10432,40 +10432,40 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10432
10432
  } = Zi({
10433
10433
  pageId: i.pageId || ""
10434
10434
  });
10435
- a2(() => {
10435
+ o2(() => {
10436
10436
  B.triggerPageView(i.pageId);
10437
- }, [i.pageId]), a2(() => {
10437
+ }, [i.pageId]), o2(() => {
10438
10438
  g && k(g._id);
10439
- }, [g]), a2(() => {
10439
+ }, [g]), o2(() => {
10440
10440
  if (g != null && g.aiMetadata && !g.aiMetadata.contentGenerated) {
10441
- const n2 = setInterval(() => {
10441
+ const a2 = setInterval(() => {
10442
10442
  O();
10443
10443
  }, 5e3);
10444
- return () => clearInterval(n2);
10444
+ return () => clearInterval(a2);
10445
10445
  }
10446
10446
  }, [g == null ? void 0 : g.aiMetadata, O]);
10447
- const H = ko(), R = xo(), L = yo(), w = async (n2, A2) => {
10447
+ const H = ko(), R = xo(), L = yo(), w = async (a2, z2) => {
10448
10448
  await H.mutate({
10449
10449
  wikiId: i.wikiId,
10450
10450
  pageId: i.pageId,
10451
- comment: n2,
10452
- replyTo: A2
10451
+ comment: a2,
10452
+ replyTo: z2
10453
10453
  });
10454
10454
  }, U = async ({
10455
- comment: n2,
10456
- commentId: A2
10455
+ comment: a2,
10456
+ commentId: z2
10457
10457
  }) => {
10458
10458
  await L.mutateAsync({
10459
10459
  wikiId: i.wikiId,
10460
10460
  pageId: i.pageId,
10461
- commentId: A2,
10462
- comment: n2
10461
+ commentId: z2,
10462
+ comment: a2
10463
10463
  });
10464
- }, s2 = async (n2) => {
10464
+ }, n2 = async (a2) => {
10465
10465
  await R.mutateAsync({
10466
10466
  wikiId: i.wikiId,
10467
10467
  pageId: i.pageId,
10468
- commentId: n2
10468
+ commentId: a2
10469
10469
  });
10470
10470
  }, q = async () => {
10471
10471
  t(!0);
@@ -10498,15 +10498,15 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10498
10498
  maxReplies: Aa,
10499
10499
  additionalReplies: Oa
10500
10500
  }, type: u ? "edit" : "read", rights: m, callbacks: {
10501
- post: (n2, A2) => w(n2, A2),
10501
+ post: (a2, z2) => w(a2, z2),
10502
10502
  put: ({
10503
- comment: n2,
10504
- commentId: A2
10503
+ comment: a2,
10504
+ commentId: z2
10505
10505
  }) => U({
10506
- comment: n2,
10507
- commentId: A2
10506
+ comment: a2,
10507
+ commentId: z2
10508
10508
  }),
10509
- delete: (n2) => s2(n2)
10509
+ delete: (a2) => n2(a2)
10510
10510
  } }),
10511
10511
  /* @__PURE__ */ p(l0, { fallback: /* @__PURE__ */ o(p2, { position: !1 }), children: [
10512
10512
  n && /* @__PURE__ */ o(Qo, {}),
@@ -10636,7 +10636,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10636
10636
  }, ar = (e) => {
10637
10637
  const [t, i] = i2(e == null ? void 0 : e.content), s = me(), n = X(), a = rt(), {
10638
10638
  data: r
10639
- } = m0(n.wikiId), l = u2(), c = s.pathname.includes("subpage") || !!(e != null && e.parentId), d = !!(e != null && e._id), m = w2(() => {
10639
+ } = m0(n.wikiId), l = u2(), c = s.pathname.includes("subpage") || !!(e != null && e.parentId), d = !!(e != null && e._id), m = J2(() => {
10640
10640
  let H = !1;
10641
10641
  if (d)
10642
10642
  H = !(e != null && e.isVisible);
@@ -10664,12 +10664,12 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10664
10664
  content: e == null ? void 0 : e.content
10665
10665
  }
10666
10666
  });
10667
- a2(() => {
10667
+ o2(() => {
10668
10668
  h("content", t ?? "", {
10669
10669
  shouldDirty: !0
10670
10670
  });
10671
10671
  }, [t]);
10672
- const M = w2(() => {
10672
+ const M = J2(() => {
10673
10673
  if (c) {
10674
10674
  const H = d ? e.parentId : n.pageId, R = B1(r, H);
10675
10675
  return !(R != null && R.isVisible);
@@ -11043,7 +11043,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11043
11043
  } = H0(), r = (await e.fetchQuery(V.findAllFromWiki({
11044
11044
  wikiId: t.wikiId,
11045
11045
  content: !1
11046
- })) ?? []).map((C) => C.position ?? 0), l = J2(s, "title"), c = J2(s, "content"), d = J2(s, "isHidden") === "false", m = r.length > 0 ? Math.max(...r) + 1 : 1, u = await B.createPage({
11046
+ })) ?? []).map((C) => C.position ?? 0), l = I2(s, "title"), c = I2(s, "content"), d = I2(s, "isHidden") === "false", m = r.length > 0 ? Math.max(...r) + 1 : 1, u = await B.createPage({
11047
11047
  wikiId: t.wikiId,
11048
11048
  data: {
11049
11049
  title: l,
@@ -11120,17 +11120,17 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11120
11120
  selectedPages: u,
11121
11121
  pagesCount: z
11122
11122
  });
11123
- a2(() => () => {
11123
+ o2(() => () => {
11124
11124
  h([]);
11125
- }, [h]), a2(() => {
11125
+ }, [h]), o2(() => {
11126
11126
  h([]);
11127
11127
  }, [a.pathname, h]);
11128
11128
  const R = (q) => (S == null ? void 0 : S[q]) || 0, L = async (q) => {
11129
11129
  t(!0), s(q);
11130
11130
  }, w = () => {
11131
11131
  t(!1);
11132
- }, U = (q, S2, n2) => /* @__PURE__ */ p("div", { className: C2("grid gap-24 px-12 py-8 mb-2 align-items: center", {
11133
- "bg-secondary-200 rounded": n2
11132
+ }, U = (q, S2, a2) => /* @__PURE__ */ p("div", { className: C2("grid gap-24 px-12 py-8 mb-2 align-items: center", {
11133
+ "bg-secondary-200 rounded": a2
11134
11134
  }), style: {
11135
11135
  "--edifice-columns": 9
11136
11136
  }, children: [
@@ -11150,8 +11150,8 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11150
11150
  background: !0,
11151
11151
  level: q.isVisible ? "warning" : "info"
11152
11152
  }, children: q.isVisible ? g("wiki.table.body.visible") : g("wiki.table.body.invisible") }) })
11153
- ] }), s2 = (q, S2, n2) => /* @__PURE__ */ p("div", { className: C2("grid px-12 py-8 mb-2 gap-2", {
11154
- "bg-secondary-200 rounded": n2
11153
+ ] }), n2 = (q, S2, a2) => /* @__PURE__ */ p("div", { className: C2("grid px-12 py-8 mb-2 gap-2", {
11154
+ "bg-secondary-200 rounded": a2
11155
11155
  }), children: [
11156
11156
  /* @__PURE__ */ p("div", { className: "d-flex align-items-center gap-8 g-col-6 g-col-md-12 justify-content-between", children: [
11157
11157
  /* @__PURE__ */ p("div", { className: "d-flex align-items-center gap-8", children: [
@@ -11169,7 +11169,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11169
11169
  return k ? /* @__PURE__ */ o(p2, {}) : b ? "An error has occurred: " + b.message : /* @__PURE__ */ p(c2, { children: [
11170
11170
  /* @__PURE__ */ o(Ce, { className: "m-16", level: "h2", headingStyle: "h2", children: g("wiki.pagelist") }),
11171
11171
  /* @__PURE__ */ p("div", { className: "px-md-16", children: [
11172
- /* @__PURE__ */ o(fs, { data: O, items: H, renderNode: f ? U : s2, onSelectedItems: h }),
11172
+ /* @__PURE__ */ o(fs, { data: O, items: H, renderNode: f ? U : n2, onSelectedItems: h }),
11173
11173
  /* @__PURE__ */ p(l0, { fallback: /* @__PURE__ */ o(p2, { position: !1 }), children: [
11174
11174
  l && /* @__PURE__ */ o(Cr, { pageId: u[0] }),
11175
11175
  c && /* @__PURE__ */ o(hr, { selectedPages: u }),
@@ -11247,7 +11247,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11247
11247
  }
11248
11248
  return c;
11249
11249
  }) : [], [t, s]);
11250
- a2(() => {
11250
+ o2(() => {
11251
11251
  t && i(a.slice().sort((r, l) => (r.position ?? a.length) - (l.position ?? a.length)));
11252
11252
  }, [t, i]);
11253
11253
  }, xr = (e, t) => {
@@ -11259,7 +11259,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11259
11259
  const [e, t] = i2(!0), i = X(), s = _(), n = ne("/id/:wikiId"), a = u2(), {
11260
11260
  data: r
11261
11261
  } = m0(i.wikiId);
11262
- return a2(() => {
11262
+ return o2(() => {
11263
11263
  if (r) {
11264
11264
  if (n) {
11265
11265
  if (r.pages.length) {
@@ -11357,17 +11357,17 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11357
11357
  const {
11358
11358
  header: x
11359
11359
  } = Wi(), J = (w) => t(`/id/${y == null ? void 0 : y._id}/page/${w}`), O = (w) => t(`page/${w}/subpage/create`), z = !l && !M, H = !l && !n && !z;
11360
- a2(() => {
11360
+ o2(() => {
11361
11361
  e.pageId ? h(`${e.pageId}`) : h(null);
11362
- }, [e.pageId]), a2(() => {
11362
+ }, [e.pageId]), o2(() => {
11363
11363
  c.forEach((w) => {
11364
11364
  w.type === "success" ? d.success(u(w.text)) : w.type === "error" && d.error(u(w.text));
11365
11365
  }), c.length > 0 && C();
11366
- }, [c, C, d]), a2(() => {
11366
+ }, [c, C, d]), o2(() => {
11367
11367
  if (S) return;
11368
11368
  const w = setInterval(() => {
11369
- var s2;
11370
- const U = (s2 = y == null ? void 0 : y.pages) == null ? void 0 : s2.filter((q) => q.aiMetadata && !q.aiMetadata.contentGenerated);
11369
+ var n2;
11370
+ const U = (n2 = y == null ? void 0 : y.pages) == null ? void 0 : n2.filter((q) => q.aiMetadata && !q.aiMetadata.contentGenerated);
11371
11371
  if ((U == null ? void 0 : U.length) === 0) {
11372
11372
  clearInterval(w);
11373
11373
  return;
@@ -11376,7 +11376,7 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11376
11376
  }, 5e3);
11377
11377
  return () => clearInterval(w);
11378
11378
  }, [b, y, S]);
11379
- const R = w2((w) => !w.aiMetadata || w.aiMetadata && w.aiMetadata.contentGenerated, []);
11379
+ const R = J2((w) => !w.aiMetadata || w.aiMetadata && w.aiMetadata.contentGenerated, []);
11380
11380
  return S ? /* @__PURE__ */ o(Sr, {}) : /* @__PURE__ */ p(c2, { children: [
11381
11381
  x && /* @__PURE__ */ o(tr, {}),
11382
11382
  /* @__PURE__ */ p(e2, { className: "flex-grow-1", children: [
@@ -11399,8 +11399,8 @@ const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11399
11399
  !w.isVisible && /* @__PURE__ */ o(ae, { width: "20", height: "20", className: C2({
11400
11400
  "me-8": U
11401
11401
  }) }),
11402
- !U && !l && /* @__PURE__ */ o("button", { className: "tree-btn mx-8", onClick: (s2) => {
11403
- s2.stopPropagation(), O(w.id);
11402
+ !U && !l && /* @__PURE__ */ o("button", { className: "tree-btn mx-8", onClick: (n2) => {
11403
+ n2.stopPropagation(), O(w.id);
11404
11404
  }, children: /* @__PURE__ */ o(D0, { height: 16, width: 16 }) })
11405
11405
  ] })
11406
11406
  ] }), onSortable: (w) => m(w), onTreeItemClick: J, isDisabled: () => l })
@@ -11538,7 +11538,7 @@ const K1 = "import-pdf", zr = (e) => ({
11538
11538
  } = P(), {
11539
11539
  t: a
11540
11540
  } = E(), r = d1();
11541
- a2(() => {
11541
+ o2(() => {
11542
11542
  var u, C;
11543
11543
  const m = (C = (u = i == null ? void 0 : i.votes) == null ? void 0 : u.find((h) => h.userId === (s == null ? void 0 : s.userId))) == null ? void 0 : C.vote;
11544
11544
  t((h) => h === m ? h : m);
@@ -12120,7 +12120,7 @@ const Ki = (e) => {
12120
12120
  } = E(), {
12121
12121
  setPagesStructure: r
12122
12122
  } = G0(), l = v1();
12123
- return a2(() => {
12123
+ return o2(() => {
12124
12124
  let c = null;
12125
12125
  return (async () => {
12126
12126
  t(!0);
@@ -12207,7 +12207,7 @@ const Ki = (e) => {
12207
12207
  } = E(), r = Fr(), {
12208
12208
  setFormValues: l
12209
12209
  } = G0(), c = X(), d = _();
12210
- a2(() => {
12210
+ o2(() => {
12211
12211
  const u = setInterval(async () => {
12212
12212
  var h;
12213
12213
  const C = await W.http().get(`/wiki/${c.wikiId}`);
@@ -12468,7 +12468,7 @@ const Ki = (e) => {
12468
12468
  };
12469
12469
  return u.children && (f.children = c(u.children, h)), f;
12470
12470
  });
12471
- return a2(() => {
12471
+ return o2(() => {
12472
12472
  if (n.current)
12473
12473
  return a.current || (a.current = $i(n.current)), r.current || (r.current = os(c(_r(E1)), {
12474
12474
  initialEntries: [`/id/${e}`]
@@ -12498,7 +12498,7 @@ export {
12498
12498
  F3 as G,
12499
12499
  G3 as H,
12500
12500
  J3 as I,
12501
- o2 as J,
12501
+ s2 as J,
12502
12502
  Jn as K,
12503
12503
  Kt as L,
12504
12504
  Z2 as M,
@@ -4,11 +4,8 @@ import { IAction } from '@edifice.io/client';
4
4
  * @param actions (expects an array of actions)
5
5
  * @returns queryOptions with key, fn, and selected data
6
6
  */
7
- export declare const actionsQueryOptions: (actions: IAction[]) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<Record<string, boolean>, Error, IAction[], string[]>, "queryFn"> & {
8
- queryFn?: import('@tanstack/react-query').QueryFunction<Record<string, boolean>, string[], never> | undefined;
7
+ export declare const actionsQueryOptions: (actions: IAction[]) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<Record<string, boolean>, Error, IAction[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
8
+ queryFn?: import('@tanstack/react-query').QueryFunction<Record<string, boolean>, import('@tanstack/react-query').QueryKey, never> | undefined;
9
9
  } & {
10
- queryKey: string[] & {
11
- [dataTagSymbol]: Record<string, boolean>;
12
- [dataTagErrorSymbol]: Error;
13
- };
10
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, Record<string, boolean>>;
14
11
  };
@@ -70,11 +70,7 @@ export declare const pageQueryOptions: {
70
70
  }];
71
71
  parentId?: string;
72
72
  position?: number;
73
- }, readonly ["page", {
74
- readonly id: string;
75
- }, {
76
- readonly originalformat: boolean | undefined;
77
- }]>, "queryFn"> & {
73
+ }, import('@tanstack/react-query').QueryKey>, "queryFn"> & {
78
74
  queryFn?: import('@tanstack/react-query').QueryFunction<{
79
75
  comments: {
80
76
  id: string;
@@ -106,141 +102,79 @@ export declare const pageQueryOptions: {
106
102
  }];
107
103
  parentId?: string;
108
104
  position?: number;
109
- }, readonly ["page", {
110
- readonly id: string;
111
- }, {
112
- readonly originalformat: boolean | undefined;
113
- }], never> | undefined;
105
+ }, import('@tanstack/react-query').QueryKey, never> | undefined;
114
106
  } & {
115
- queryKey: readonly ["page", {
116
- readonly id: string;
117
- }, {
118
- readonly originalformat: boolean | undefined;
119
- }] & {
120
- [dataTagSymbol]: {
121
- comments: {
122
- id: string;
123
- comment: string;
124
- authorId: string;
125
- authorName: string;
126
- createdAt: number;
127
- updatedAt: number;
128
- replyTo: string | undefined;
129
- deleted: boolean | undefined;
130
- }[] | undefined;
131
- isVisible: boolean;
107
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, {
108
+ comments: {
109
+ id: string;
110
+ comment: string;
111
+ authorId: string;
112
+ authorName: string;
113
+ createdAt: number;
114
+ updatedAt: number;
115
+ replyTo: string | undefined;
116
+ deleted: boolean | undefined;
117
+ }[] | undefined;
118
+ isVisible: boolean;
119
+ _id: string;
120
+ title: string;
121
+ content: string;
122
+ contentPlain: string;
123
+ contentVersion: number;
124
+ author: string;
125
+ authorName: string;
126
+ created?: import('../../../models').Created;
127
+ modified: import('../../../models').Modified;
128
+ lastContributer?: string;
129
+ lastContributerName?: string;
130
+ children?: [{
132
131
  _id: string;
133
132
  title: string;
134
- content: string;
135
- contentPlain: string;
136
- contentVersion: number;
137
- author: string;
138
- authorName: string;
139
- created?: import('../../../models').Created;
140
- modified: import('../../../models').Modified;
141
- lastContributer?: string;
142
- lastContributerName?: string;
143
- children?: [{
144
- _id: string;
145
- title: string;
146
- isVisible: boolean;
147
- position?: number;
148
- }];
149
- parentId?: string;
133
+ isVisible: boolean;
150
134
  position?: number;
151
- };
152
- [dataTagErrorSymbol]: Error;
153
- };
135
+ }];
136
+ parentId?: string;
137
+ position?: number;
138
+ }>;
154
139
  };
155
140
  findAllFromWiki: ({ wikiId, content, }: {
156
141
  wikiId: string;
157
142
  content: boolean;
158
- }) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../../../models').Page[], Error, import('../../../models').Page[], readonly ["page", {
159
- readonly id: string;
160
- }]>, "queryFn"> & {
161
- queryFn?: import('@tanstack/react-query').QueryFunction<import('../../../models').Page[], readonly ["page", {
162
- readonly id: string;
163
- }], never> | undefined;
143
+ }) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../../../models').Page[], Error, import('../../../models').Page[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
144
+ queryFn?: import('@tanstack/react-query').QueryFunction<import('../../../models').Page[], import('@tanstack/react-query').QueryKey, never> | undefined;
164
145
  } & {
165
- queryKey: readonly ["page", {
166
- readonly id: string;
167
- }] & {
168
- [dataTagSymbol]: import('../../../models').Page[];
169
- [dataTagErrorSymbol]: Error;
170
- };
146
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, import('../../../models').Page[]>;
171
147
  };
172
148
  findAllRevisionsForPage: ({ wikiId, pageId, }: {
173
149
  wikiId: string;
174
150
  pageId: string;
175
- }) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../../../models/revision').Revision[], Error, import('../../../models/revision').Revision[], readonly ["page", "revision", {
176
- readonly id: string;
177
- }]>, "queryFn"> & {
178
- queryFn?: import('@tanstack/react-query').QueryFunction<import('../../../models/revision').Revision[], readonly ["page", "revision", {
179
- readonly id: string;
180
- }], never> | undefined;
151
+ }) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../../../models/revision').Revision[], Error, import('../../../models/revision').Revision[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
152
+ queryFn?: import('@tanstack/react-query').QueryFunction<import('../../../models/revision').Revision[], import('@tanstack/react-query').QueryKey, never> | undefined;
181
153
  } & {
182
- queryKey: readonly ["page", "revision", {
183
- readonly id: string;
184
- }] & {
185
- [dataTagSymbol]: import('../../../models/revision').Revision[];
186
- [dataTagErrorSymbol]: Error;
187
- };
154
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, import('../../../models/revision').Revision[]>;
188
155
  };
189
156
  findOneRevision: ({ wikiId, pageId, revisionId, }: {
190
157
  wikiId: string;
191
158
  pageId: string;
192
159
  revisionId?: string;
193
- }) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../../../models/revision').Revision, Error, import('../../../models/revision').Revision, readonly ["page", "revision", {
194
- readonly id: string;
195
- }, {
196
- readonly id: string | undefined;
197
- }]>, "queryFn"> & {
198
- queryFn?: import('@tanstack/react-query').QueryFunction<import('../../../models/revision').Revision, readonly ["page", "revision", {
199
- readonly id: string;
200
- }, {
201
- readonly id: string | undefined;
202
- }], never> | undefined;
160
+ }) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../../../models/revision').Revision, Error, import('../../../models/revision').Revision, import('@tanstack/react-query').QueryKey>, "queryFn"> & {
161
+ queryFn?: import('@tanstack/react-query').QueryFunction<import('../../../models/revision').Revision, import('@tanstack/react-query').QueryKey, never> | undefined;
203
162
  } & {
204
- queryKey: readonly ["page", "revision", {
205
- readonly id: string;
206
- }, {
207
- readonly id: string | undefined;
208
- }] & {
209
- [dataTagSymbol]: import('../../../models/revision').Revision;
210
- [dataTagErrorSymbol]: Error;
211
- };
163
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, import('../../../models/revision').Revision>;
212
164
  };
213
165
  findPagesViewsCounter: ({ pageIds }: {
214
166
  pageIds: string[];
215
- }) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('@edifice.io/client').ViewsCounters, Error, import('@edifice.io/client').ViewsCounters, readonly ["page", "viewsCounter", {
216
- readonly id: string[];
217
- }]>, "queryFn"> & {
218
- queryFn?: import('@tanstack/react-query').QueryFunction<import('@edifice.io/client').ViewsCounters, readonly ["page", "viewsCounter", {
219
- readonly id: string[];
220
- }], never> | undefined;
167
+ }) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('@edifice.io/client').ViewsCounters, Error, import('@edifice.io/client').ViewsCounters, import('@tanstack/react-query').QueryKey>, "queryFn"> & {
168
+ queryFn?: import('@tanstack/react-query').QueryFunction<import('@edifice.io/client').ViewsCounters, import('@tanstack/react-query').QueryKey, never> | undefined;
221
169
  } & {
222
- queryKey: readonly ["page", "viewsCounter", {
223
- readonly id: string[];
224
- }] & {
225
- [dataTagSymbol]: import('@edifice.io/client').ViewsCounters;
226
- [dataTagErrorSymbol]: Error;
227
- };
170
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, import('@edifice.io/client').ViewsCounters>;
228
171
  };
229
172
  findPageViewsDetails: ({ pageId }: {
230
173
  pageId: string;
231
- }) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('@edifice.io/client').ViewsDetails | undefined, Error, import('@edifice.io/client').ViewsDetails | undefined, readonly ["page", "viewsDetails", {
232
- readonly id: string;
233
- }]>, "queryFn"> & {
234
- queryFn?: import('@tanstack/react-query').QueryFunction<import('@edifice.io/client').ViewsDetails | undefined, readonly ["page", "viewsDetails", {
235
- readonly id: string;
236
- }], never> | undefined;
174
+ }) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('@edifice.io/client').ViewsDetails | undefined, Error, import('@edifice.io/client').ViewsDetails | undefined, import('@tanstack/react-query').QueryKey>, "queryFn"> & {
175
+ queryFn?: import('@tanstack/react-query').QueryFunction<import('@edifice.io/client').ViewsDetails | undefined, import('@tanstack/react-query').QueryKey, never> | undefined;
237
176
  } & {
238
- queryKey: readonly ["page", "viewsDetails", {
239
- readonly id: string;
240
- }] & {
241
- [dataTagSymbol]: import('@edifice.io/client').ViewsDetails | undefined;
242
- [dataTagErrorSymbol]: Error;
243
- };
177
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, import('@edifice.io/client').ViewsDetails | undefined>;
244
178
  };
245
179
  };
246
180
  /**
@@ -1,18 +1,9 @@
1
1
  export declare const pollQueryOptions: {
2
2
  base: readonly ["poll"];
3
- findOne: (pollName: string) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../../api/poll/poll.types').Poll, Error, import('../../api/poll/poll.types').Poll, readonly ["poll", {
4
- readonly name: string;
5
- }]>, "queryFn"> & {
6
- queryFn?: import('@tanstack/react-query').QueryFunction<import('../../api/poll/poll.types').Poll, readonly ["poll", {
7
- readonly name: string;
8
- }], never> | undefined;
3
+ findOne: (pollName: string) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../../api/poll/poll.types').Poll, Error, import('../../api/poll/poll.types').Poll, import('@tanstack/react-query').QueryKey>, "queryFn"> & {
4
+ queryFn?: import('@tanstack/react-query').QueryFunction<import('../../api/poll/poll.types').Poll, import('@tanstack/react-query').QueryKey, never> | undefined;
9
5
  } & {
10
- queryKey: readonly ["poll", {
11
- readonly name: string;
12
- }] & {
13
- [dataTagSymbol]: import('../../api/poll/poll.types').Poll;
14
- [dataTagErrorSymbol]: Error;
15
- };
6
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, import('../../api/poll/poll.types').Poll>;
16
7
  };
17
8
  };
18
9
  export declare const useGetPoll: (pollName: string) => import('@tanstack/react-query').UseQueryResult<import('../../api/poll/poll.types').Poll, Error>;
@@ -3,29 +3,20 @@
3
3
  */
4
4
  export declare const wikiQueryOptions: {
5
5
  base: readonly ["wiki"];
6
- findAllAsResources: () => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('@edifice.io/client').IResource[], Error, import('@edifice.io/client').IResource[], readonly ["wiki", "resources"]>, "queryFn"> & {
7
- queryFn?: import('@tanstack/react-query').QueryFunction<import('@edifice.io/client').IResource[], readonly ["wiki", "resources"], never> | undefined;
6
+ findAllAsResources: () => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('@edifice.io/client').IResource[], Error, import('@edifice.io/client').IResource[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
7
+ queryFn?: import('@tanstack/react-query').QueryFunction<import('@edifice.io/client').IResource[], import('@tanstack/react-query').QueryKey, never> | undefined;
8
8
  } & {
9
- queryKey: readonly ["wiki", "resources"] & {
10
- [dataTagSymbol]: import('@edifice.io/client').IResource[];
11
- [dataTagErrorSymbol]: Error;
12
- };
9
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, import('@edifice.io/client').IResource[]>;
13
10
  };
14
- findAll: () => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../../../models').PickedWiki[], Error, import('../../../models').PickedWiki[], readonly ["wiki", "list"]>, "queryFn"> & {
15
- queryFn?: import('@tanstack/react-query').QueryFunction<import('../../../models').PickedWiki[], readonly ["wiki", "list"], never> | undefined;
11
+ findAll: () => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../../../models').PickedWiki[], Error, import('../../../models').PickedWiki[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
12
+ queryFn?: import('@tanstack/react-query').QueryFunction<import('../../../models').PickedWiki[], import('@tanstack/react-query').QueryKey, never> | undefined;
16
13
  } & {
17
- queryKey: readonly ["wiki", "list"] & {
18
- [dataTagSymbol]: import('../../../models').PickedWiki[];
19
- [dataTagErrorSymbol]: Error;
20
- };
14
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, import('../../../models').PickedWiki[]>;
21
15
  };
22
- findAllWithPages: () => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../../../models').Wiki[], Error, import('../../../models').Wiki[], readonly ["wiki", "listallpages"]>, "queryFn"> & {
23
- queryFn?: import('@tanstack/react-query').QueryFunction<import('../../../models').Wiki[], readonly ["wiki", "listallpages"], never> | undefined;
16
+ findAllWithPages: () => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../../../models').Wiki[], Error, import('../../../models').Wiki[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
17
+ queryFn?: import('@tanstack/react-query').QueryFunction<import('../../../models').Wiki[], import('@tanstack/react-query').QueryKey, never> | undefined;
24
18
  } & {
25
- queryKey: readonly ["wiki", "listallpages"] & {
26
- [dataTagSymbol]: import('../../../models').Wiki[];
27
- [dataTagErrorSymbol]: Error;
28
- };
19
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, import('../../../models').Wiki[]>;
29
20
  };
30
21
  findOne: (wikiId: string) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<{
31
22
  pages: {
@@ -111,9 +102,7 @@ export declare const wikiQueryOptions: {
111
102
  shared?: string[];
112
103
  aiGenerated?: boolean;
113
104
  aiMetadata?: import('../../../models').AIMetadata;
114
- }, readonly ["wiki", {
115
- readonly id: string;
116
- }]>, "queryFn"> & {
105
+ }, import('@tanstack/react-query').QueryKey>, "queryFn"> & {
117
106
  queryFn?: import('@tanstack/react-query').QueryFunction<{
118
107
  pages: {
119
108
  isVisible: boolean;
@@ -156,58 +145,51 @@ export declare const wikiQueryOptions: {
156
145
  shared?: string[];
157
146
  aiGenerated?: boolean;
158
147
  aiMetadata?: import('../../../models').AIMetadata;
159
- }, readonly ["wiki", {
160
- readonly id: string;
161
- }], never> | undefined;
148
+ }, import('@tanstack/react-query').QueryKey, never> | undefined;
162
149
  } & {
163
- queryKey: readonly ["wiki", {
164
- readonly id: string;
165
- }] & {
166
- [dataTagSymbol]: {
167
- pages: {
168
- isVisible: boolean;
169
- _id: string;
170
- title: string;
171
- content: string;
172
- jsonContent?: any;
173
- contentPlain: string;
174
- contentVersion: number;
175
- author: string;
176
- authorName: string;
177
- modified: import('../../../models').Modified;
178
- created?: import('../../../models').Created;
179
- lastContributer?: string;
180
- lastContributerName?: string;
181
- comments?: import('../../../models').Comment[];
182
- children?: [{
183
- _id: string;
184
- title: string;
185
- isVisible: boolean;
186
- position?: number;
187
- }];
188
- position?: number;
189
- parentId?: string;
190
- error?: any;
191
- views?: number;
192
- aiMetadata?: {
193
- contentGenerated?: boolean;
194
- contentGeneratedDate?: import('../../../models').Created;
195
- };
196
- }[];
150
+ queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, {
151
+ pages: {
152
+ isVisible: boolean;
197
153
  _id: string;
198
154
  title: string;
199
- thumbnail: string;
200
- created: import('../../../models').Created;
155
+ content: string;
156
+ jsonContent?: any;
157
+ contentPlain: string;
158
+ contentVersion: number;
159
+ author: string;
160
+ authorName: string;
201
161
  modified: import('../../../models').Modified;
202
- owner: import('../../../models').Owner;
203
- rights: string[];
204
- index?: string;
205
- shared?: string[];
206
- aiGenerated?: boolean;
207
- aiMetadata?: import('../../../models').AIMetadata;
208
- };
209
- [dataTagErrorSymbol]: Error;
210
- };
162
+ created?: import('../../../models').Created;
163
+ lastContributer?: string;
164
+ lastContributerName?: string;
165
+ comments?: import('../../../models').Comment[];
166
+ children?: [{
167
+ _id: string;
168
+ title: string;
169
+ isVisible: boolean;
170
+ position?: number;
171
+ }];
172
+ position?: number;
173
+ parentId?: string;
174
+ error?: any;
175
+ views?: number;
176
+ aiMetadata?: {
177
+ contentGenerated?: boolean;
178
+ contentGeneratedDate?: import('../../../models').Created;
179
+ };
180
+ }[];
181
+ _id: string;
182
+ title: string;
183
+ thumbnail: string;
184
+ created: import('../../../models').Created;
185
+ modified: import('../../../models').Modified;
186
+ owner: import('../../../models').Owner;
187
+ rights: string[];
188
+ index?: string;
189
+ shared?: string[];
190
+ aiGenerated?: boolean;
191
+ aiMetadata?: import('../../../models').AIMetadata;
192
+ }>;
211
193
  };
212
194
  };
213
195
  export declare const useGetWikis: () => import('@tanstack/react-query').UseQueryResult<import('../../../models').PickedWiki[], Error>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/wiki",
3
- "version": "3.6.12",
3
+ "version": "3.6.14-develop-pedago.20261005153803",
4
4
  "description": "Wiki application",
5
5
  "license": "AGPL-3.0",
6
6
  "author": "Edifice",
@@ -17,29 +17,35 @@
17
17
  ]
18
18
  },
19
19
  "dependencies": {
20
- "@edifice.io/bootstrap": "2.6.6",
21
- "@edifice.io/client": "2.6.6",
22
- "@edifice.io/react": "2.6.6",
23
20
  "@react-spring/web": "9.7.5",
24
- "@tanstack/react-query": "5.81.5",
25
21
  "@uidotdev/usehooks": "2.4.1",
26
22
  "clsx": "2.1.1",
27
23
  "i18next": "23.8.1",
28
24
  "i18next-http-backend": "2.4.2",
29
25
  "lottie-react": "2.4.1",
30
- "ode-explorer": "2.6.10",
31
- "react": "18.3.1",
32
- "react-dom": "18.3.1",
26
+ "ode-explorer": "develop-pedago",
33
27
  "react-error-boundary": "4.0.13",
34
28
  "react-hook-form": "7.71.1",
35
- "react-i18next": "14.1.0",
36
29
  "react-router-dom": "6.30.3",
37
30
  "zustand": "4.5.7"
38
31
  },
32
+ "peerDependencies": {
33
+ "@edifice.io/bootstrap": "develop-pedago",
34
+ "@edifice.io/client": "develop-pedago",
35
+ "@edifice.io/react": "develop-pedago",
36
+ "@tanstack/react-query": "^5",
37
+ "react": "18.3.1",
38
+ "react-dom": "18.3.1",
39
+ "react-i18next": "^14"
40
+ },
39
41
  "devDependencies": {
40
42
  "@axe-core/react": "4.11.1",
41
43
  "@babel/plugin-transform-react-pure-annotations": "7.23.3",
44
+ "@edifice.io/bootstrap": "develop-pedago",
45
+ "@edifice.io/client": "develop-pedago",
46
+ "@edifice.io/react": "develop-pedago",
42
47
  "@eslint/js": "9.39.2",
48
+ "@tanstack/react-query": "5.62.7",
43
49
  "@tanstack/react-query-devtools": "5.91.3",
44
50
  "@testing-library/jest-dom": "6.5.0",
45
51
  "@testing-library/react": "16.0.1",
@@ -60,6 +66,9 @@
60
66
  "msw": "2.12.8",
61
67
  "nx": "19.6.0",
62
68
  "prettier": "3.8.1",
69
+ "react": "18.3.1",
70
+ "react-dom": "18.3.1",
71
+ "react-i18next": "14.1.0",
63
72
  "typescript": "5.9.3",
64
73
  "typescript-eslint": "8.54.0",
65
74
  "vite": "5.4.21",