@edifice.io/wiki 3.6.4 → 3.6.6-develop-enabling.20260807162953

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.
Files changed (2) hide show
  1. package/lib/index2.js +35 -35
  2. package/package.json +5 -5
package/lib/index2.js CHANGED
@@ -5,7 +5,7 @@ var R1 = (e, t, i) => t.has(e) || S1("Cannot " + i);
5
5
  var S = (e, t, i) => (R1(e, t, "read from private field"), i ? i.call(e) : t.get(e)), T = (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), z = (e, t, i, s) => (R1(e, t, "write to private field"), s ? s.call(e, i) : t.set(e, i), i);
6
6
  import { jsx as o, jsxs as h, Fragment as c2 } from "react/jsx-runtime";
7
7
  import * as o2 from "react";
8
- import { createContext as ot, useState as t2, useEffect as n2, useCallback as w2, useContext as Ki, Suspense as l0, useRef as h0, lazy as M2, forwardRef as o1, useMemo as r1 } from "react";
8
+ import { createContext as ot, useState as t2, useEffect as n2, useCallback as J2, useContext as Ki, Suspense as l0, useRef as h0, lazy as M2, forwardRef as o1, useMemo as r1 } from "react";
9
9
  import { createRoot as Xi } from "react-dom/client";
10
10
  import { useRouteError as $i, useNavigate as i2, useActionData as _i, Form as U0, useParams as X, useSubmit as rt, redirect as te, useLocation as ue, useBlocker as es, useBeforeUnload as ts, useNavigation as is, matchPath as ss, useMatch as ie, Outlet as ns, createMemoryRouter as as, RouterProvider as os } from "react-router-dom";
11
11
  import { ERROR_CODE as rs, FOLDER as L2, SORT_ORDER as ls, ResourceService as me, odeServices as W } from "@edifice.io/client";
@@ -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), ii = (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, _e = (e) => S0(e) && Object.keys(e).length === 0, O2 = (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, R0 = (e) => e instanceof Map, L0 = (e) => e instanceof Set, si = (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) || ii(e) || Gn(e) || Fn(e) || si(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, ni = (e) => e.replace(/\./g, "\\."), Ae = (e) => e.map(String).map(ni).join("."), y0 = (e) => {
1286
+ }, Dn = (e) => Object.prototype.toString.call(e).slice(8, -1), ii = (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, _e = (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, R0 = (e) => e instanceof Map, L0 = (e) => e instanceof Set, si = (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) || ii(e) || Gn(e) || Fn(e) || si(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, ni = (e) => e.replace(/\./g, "\\."), Ae = (e) => e.map(String).map(ni).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 @@ ai.forEach((e) => {
1413
1413
  ui[e.annotation] = e;
1414
1414
  });
1415
1415
  var ia = (e, t, i) => {
1416
- if (O2(t))
1416
+ if (w2(t))
1417
1417
  switch (t[0]) {
1418
1418
  case "symbol":
1419
1419
  return oi.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 (O2(s)) {
1477
+ if (w2(s)) {
1478
1478
  const c = +r;
1479
1479
  s = s[c];
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 (O2(s) ? s[+n] = i(s[+n]) : S0(s) && (s[n] = i(s[n])), L0(s)) {
1500
+ if (w2(s) ? s[+n] = i(s[+n]) : S0(s) && (s[n] = i(s[n])), L0(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 t1(e, t, i = []) {
1521
1521
  if (!e)
1522
1522
  return;
1523
- if (!O2(e)) {
1523
+ if (!w2(e)) {
1524
1524
  r0(e, (a, r) => t1(a, t, [...i, ...y0(r)]));
1525
1525
  return;
1526
1526
  }
@@ -1541,7 +1541,7 @@ function aa(e, t) {
1541
1541
  e = e1(e, r, () => a);
1542
1542
  });
1543
1543
  }
1544
- if (O2(t)) {
1544
+ if (w2(t)) {
1545
1545
  const [s, n] = t;
1546
1546
  s.forEach((a) => {
1547
1547
  e = e1(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) || O2(e) || R0(e) || L0(e) || li(e, t);
1553
+ var oa = (e, t) => S0(e) || w2(e) || R0(e) || L0(e) || li(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 pi = (e, t, i, s, n = [], a = [], r = /* @__PURE__ */ new Map()) => {
1589
1589
  return {
1590
1590
  transformedValue: null
1591
1591
  };
1592
- const l = W1(e, i), d = (l == null ? void 0 : l.value) ?? e, m = O2(d) ? [] : {}, u = {};
1592
+ const l = W1(e, i), d = (l == null ? void 0 : l.value) ?? e, m = w2(d) ? [] : {}, u = {};
1593
1593
  r0(d, (p, g) => {
1594
1594
  if (g === "__proto__" || g === "constructor" || g === "prototype")
1595
1595
  throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);
1596
1596
  const k = pi(p, t, i, s, [...n, g], [...a, e], r);
1597
- m[g] = k.transformedValue, O2(k.annotations) ? u[g] = k.annotations : S0(k.annotations) && r0(k.annotations, (y, v) => {
1597
+ m[g] = k.transformedValue, w2(k.annotations) ? u[g] = k.annotations : S0(k.annotations) && r0(k.annotations, (y, v) => {
1598
1598
  u[ni(g) + "." + v] = 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 z2;
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
+ })(z2 || (z2 = {}));
2160
+ z2.Space, z2.Enter, z2.Esc, z2.Space, z2.Enter;
2161
2161
  var j1;
2162
2162
  (function(e) {
2163
2163
  e[e.RightClick = 2] = "RightClick";
@@ -3447,7 +3447,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3447
3447
  mutation: g,
3448
3448
  shouldIncludeSubPages: k,
3449
3449
  toggleShouldIncludeSubPages: y
3450
- } = So(), [v, R] = t2([]), b = w2(async (J) => {
3450
+ } = So(), [v, R] = t2([]), b = J2(async (J) => {
3451
3451
  s(!0);
3452
3452
  const {
3453
3453
  addToastMessage: w
@@ -3471,7 +3471,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3471
3471
  count: O.newPageIds.length
3472
3472
  })
3473
3473
  }));
3474
- }, [g, p, t, e, k, a]), f = w2((J) => {
3474
+ }, [g, p, t, e, k, a]), f = J2((J) => {
3475
3475
  if (J.length > 0) {
3476
3476
  const w = J.map((O) => O.assetId);
3477
3477
  R(w);
@@ -3778,7 +3778,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3778
3778
  } = wo({
3779
3779
  data: n,
3780
3780
  selectedItems: l
3781
- }), f = w2((x) => {
3781
+ }), f = J2((x) => {
3782
3782
  v(!1), i(`/id/${t.wikiId}/page/${e}/version/${x}`);
3783
3783
  }, [v, i, t.wikiId, e]);
3784
3784
  return a ? /* @__PURE__ */ o(p2, {}) : /* @__PURE__ */ u1(/* @__PURE__ */ h(G, { id: "revision-modal", isOpen: y, size: "lg", onModalClose: () => v(!1), children: [
@@ -3897,7 +3897,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3897
3897
  }, ji = (e) => {
3898
3898
  const t = f2();
3899
3899
  return {
3900
- handleSortPage: w2(async (s) => {
3900
+ handleSortPage: J2(async (s) => {
3901
3901
  try {
3902
3902
  const n = await P.getWikiPages(e, !1);
3903
3903
  for (const a of s) {
@@ -3957,7 +3957,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3957
3957
  setOpenMoveModal: g
3958
3958
  } = y2(), {
3959
3959
  addToastMessage: k
3960
- } = D0(), [y, v] = t2(null), R = Oo(s, t), b = w2(async () => {
3960
+ } = D0(), [y, v] = t2(null), R = Oo(s, t), b = J2(async () => {
3961
3961
  if (y && c && a)
3962
3962
  try {
3963
3963
  p(!0);
@@ -4097,17 +4097,17 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4097
4097
  d() && /* @__PURE__ */ o(Z, { onClick: l, leftIcon: /* @__PURE__ */ o(Lt, {}), variant: "filled", isLoading: r, disabled: r, children: s("wiki.version.restore") })
4098
4098
  ] })
4099
4099
  ] });
4100
- }, J2 = (e, t) => e.get(t), Q0 = (e, t) => async ({
4100
+ }, I2 = (e, t) => e.get(t), Q0 = (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
- } = D0(), r = J2(n, "isConfirmVisibilityForm"), c = r ? JSON.parse(J2(n, "actionData")) : {
4108
- title: J2(n, "title"),
4109
- content: J2(n, "content"),
4110
- isHidden: J2(n, "isHidden") === "true"
4107
+ } = D0(), r = I2(n, "isConfirmVisibilityForm"), c = 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 p = (u = (await e.ensureQueryData(K.findOne(i.wikiId))).pages) == null ? void 0 : u.find((g) => g._id === i.pageId);
@@ -10444,21 +10444,21 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10444
10444
  return () => clearInterval(s2);
10445
10445
  }
10446
10446
  }, [f == null ? void 0 : f.aiMetadata, w]);
10447
- const D = ko(), L = xo(), M = yo(), Y = async (s2, z2) => {
10447
+ const D = ko(), L = xo(), M = yo(), Y = async (s2, O2) => {
10448
10448
  await D.mutate({
10449
10449
  wikiId: i.wikiId,
10450
10450
  pageId: i.pageId,
10451
10451
  comment: s2,
10452
- replyTo: z2
10452
+ replyTo: O2
10453
10453
  });
10454
10454
  }, U = async ({
10455
10455
  comment: s2,
10456
- commentId: z2
10456
+ commentId: O2
10457
10457
  }) => {
10458
10458
  await M.mutateAsync({
10459
10459
  wikiId: i.wikiId,
10460
10460
  pageId: i.pageId,
10461
- commentId: z2,
10461
+ commentId: O2,
10462
10462
  comment: s2
10463
10463
  });
10464
10464
  }, l2 = async (s2) => {
@@ -10498,13 +10498,13 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10498
10498
  maxReplies: za,
10499
10499
  additionalReplies: Aa
10500
10500
  }, type: u ? "edit" : "read", rights: m, callbacks: {
10501
- post: (s2, z2) => Y(s2, z2),
10501
+ post: (s2, O2) => Y(s2, O2),
10502
10502
  put: ({
10503
10503
  comment: s2,
10504
- commentId: z2
10504
+ commentId: O2
10505
10505
  }) => U({
10506
10506
  comment: s2,
10507
- commentId: z2
10507
+ commentId: O2
10508
10508
  }),
10509
10509
  delete: (s2) => l2(s2)
10510
10510
  } }),
@@ -10636,7 +10636,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10636
10636
  }, ar = (e) => {
10637
10637
  const [t, i] = t2(e == null ? void 0 : e.content), s = ue(), n = X(), a = rt(), {
10638
10638
  data: r
10639
- } = m0(n.wikiId), c = u2(), l = s.pathname.includes("subpage") || !!(e != null && e.parentId), d = !!(e != null && e._id), m = w2(() => {
10639
+ } = m0(n.wikiId), c = u2(), l = s.pathname.includes("subpage") || !!(e != null && e.parentId), d = !!(e != null && e._id), m = J2(() => {
10640
10640
  let D = !1;
10641
10641
  if (d)
10642
10642
  D = !(e != null && e.isVisible);
@@ -10669,7 +10669,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10669
10669
  shouldDirty: !0
10670
10670
  });
10671
10671
  }, [t]);
10672
- const b = w2(() => {
10672
+ const b = J2(() => {
10673
10673
  if (l) {
10674
10674
  const D = d ? e.parentId : n.pageId, L = B1(r, D);
10675
10675
  return !(L != null && L.isVisible);
@@ -11043,7 +11043,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11043
11043
  } = D0(), r = (await e.fetchQuery(Q.findAllFromWiki({
11044
11044
  wikiId: t.wikiId,
11045
11045
  content: !1
11046
- })) ?? []).map((C) => C.position ?? 0), c = J2(s, "title"), l = J2(s, "content"), d = J2(s, "isHidden") === "false", m = r.length > 0 ? Math.max(...r) + 1 : 1, u = await P.createPage({
11046
+ })) ?? []).map((C) => C.position ?? 0), c = I2(s, "title"), l = I2(s, "content"), d = I2(s, "isHidden") === "false", m = r.length > 0 ? Math.max(...r) + 1 : 1, u = await P.createPage({
11047
11047
  wikiId: t.wikiId,
11048
11048
  data: {
11049
11049
  title: c,
@@ -11344,7 +11344,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11344
11344
  }, 5e3);
11345
11345
  return () => clearInterval(M);
11346
11346
  }, [v, y]);
11347
- const D = w2((M) => !M.aiMetadata || M.aiMetadata && M.aiMetadata.contentGenerated, []);
11347
+ const D = J2((M) => !M.aiMetadata || M.aiMetadata && M.aiMetadata.contentGenerated, []);
11348
11348
  return /* @__PURE__ */ h(c2, { children: [
11349
11349
  f && /* @__PURE__ */ o(tr, {}),
11350
11350
  /* @__PURE__ */ h(_, { className: "flex-grow-1", children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/wiki",
3
- "version": "3.6.4",
3
+ "version": "3.6.6-develop-enabling.20260807162953",
4
4
  "description": "Wiki application",
5
5
  "license": "AGPL-3.0",
6
6
  "author": "Edifice",
@@ -17,9 +17,9 @@
17
17
  ]
18
18
  },
19
19
  "dependencies": {
20
- "@edifice.io/bootstrap": "2.6.0",
21
- "@edifice.io/client": "2.6.0",
22
- "@edifice.io/react": "2.6.0",
20
+ "@edifice.io/bootstrap": "develop-enabling",
21
+ "@edifice.io/client": "develop-enabling",
22
+ "@edifice.io/react": "develop-enabling",
23
23
  "@react-spring/web": "9.7.5",
24
24
  "@tanstack/react-query": "5.62.7",
25
25
  "@uidotdev/usehooks": "2.4.1",
@@ -27,7 +27,7 @@
27
27
  "i18next": "23.8.1",
28
28
  "i18next-http-backend": "2.4.2",
29
29
  "lottie-react": "2.4.1",
30
- "ode-explorer": "2.6.3",
30
+ "ode-explorer": "chore-ENABLING-1158-aligner-versions-socle",
31
31
  "react": "18.3.1",
32
32
  "react-dom": "18.3.1",
33
33
  "react-error-boundary": "4.0.13",