@paroicms/internal-link-plugin 0.9.0 → 0.10.0

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.
@@ -240,7 +240,7 @@ function Z(t) {
240
240
  );
241
241
  }
242
242
  function bt(t, e, n) {
243
- let i = n.length, l = e.length, r = i, o = 0, s = 0, u = e[l - 1].nextSibling, $ = null;
243
+ let i = n.length, l = e.length, r = i, o = 0, s = 0, a = e[l - 1].nextSibling, $ = null;
244
244
  for (; o < l || s < r; ) {
245
245
  if (e[o] === n[s]) {
246
246
  o++, s++;
@@ -249,29 +249,29 @@ function bt(t, e, n) {
249
249
  for (; e[l - 1] === n[r - 1]; )
250
250
  l--, r--;
251
251
  if (l === o) {
252
- const a = r < i ? s ? n[s - 1].nextSibling : n[r - s] : u;
253
- for (; s < r; ) t.insertBefore(n[s++], a);
252
+ const u = r < i ? s ? n[s - 1].nextSibling : n[r - s] : a;
253
+ for (; s < r; ) t.insertBefore(n[s++], u);
254
254
  } else if (r === s)
255
255
  for (; o < l; )
256
256
  (!$ || !$.has(e[o])) && e[o].remove(), o++;
257
257
  else if (e[o] === n[r - 1] && n[s] === e[l - 1]) {
258
- const a = e[--l].nextSibling;
259
- t.insertBefore(n[s++], e[o++].nextSibling), t.insertBefore(n[--r], a), e[l] = n[r];
258
+ const u = e[--l].nextSibling;
259
+ t.insertBefore(n[s++], e[o++].nextSibling), t.insertBefore(n[--r], u), e[l] = n[r];
260
260
  } else {
261
261
  if (!$) {
262
262
  $ = /* @__PURE__ */ new Map();
263
263
  let h = s;
264
264
  for (; h < r; ) $.set(n[h], h++);
265
265
  }
266
- const a = $.get(e[o]);
267
- if (a != null)
268
- if (s < a && a < r) {
266
+ const u = $.get(e[o]);
267
+ if (u != null)
268
+ if (s < u && u < r) {
269
269
  let h = o, m = 1, c;
270
- for (; ++h < l && h < r && !((c = $.get(e[h])) == null || c !== a + m); )
270
+ for (; ++h < l && h < r && !((c = $.get(e[h])) == null || c !== u + m); )
271
271
  m++;
272
- if (m > a - s) {
272
+ if (m > u - s) {
273
273
  const f = e[o];
274
- for (; s < a; ) t.insertBefore(n[s++], f);
274
+ for (; s < u; ) t.insertBefore(n[s++], f);
275
275
  } else t.replaceChild(n[s++], e[o++]);
276
276
  } else o++;
277
277
  else e[o++].remove();
@@ -303,14 +303,14 @@ function p(t, e, n, i) {
303
303
  }
304
304
  function _t(t) {
305
305
  let e = t.target;
306
- const n = `$$${t.type}`, i = t.target, l = t.currentTarget, r = (u) => Object.defineProperty(t, "target", {
306
+ const n = `$$${t.type}`, i = t.target, l = t.currentTarget, r = (a) => Object.defineProperty(t, "target", {
307
307
  configurable: !0,
308
- value: u
308
+ value: a
309
309
  }), o = () => {
310
- const u = e[n];
311
- if (u && !e.disabled) {
310
+ const a = e[n];
311
+ if (a && !e.disabled) {
312
312
  const $ = e[`${n}Data`];
313
- if ($ !== void 0 ? u.call(e, $, t) : u.call(e, t), t.cancelBubble) return;
313
+ if ($ !== void 0 ? a.call(e, $, t) : a.call(e, t), t.cancelBubble) return;
314
314
  }
315
315
  return e.host && typeof e.host != "string" && !e.host._$host && e.contains(t.target) && r(e.host), !0;
316
316
  }, s = () => {
@@ -322,9 +322,9 @@ function _t(t) {
322
322
  return e || document;
323
323
  }
324
324
  }), t.composedPath) {
325
- const u = t.composedPath();
326
- r(u[0]);
327
- for (let $ = 0; $ < u.length - 2 && (e = u[$], !!o()); $++) {
325
+ const a = t.composedPath();
326
+ r(a[0]);
327
+ for (let $ = 0; $ < a.length - 2 && (e = a[$], !!o()); $++) {
328
328
  if (e._$host) {
329
329
  e = e._$host, s();
330
330
  break;
@@ -357,12 +357,12 @@ function j(t, e, n, i, l) {
357
357
  n = j(t, s, n, i);
358
358
  }), () => n;
359
359
  if (Array.isArray(e)) {
360
- const s = [], u = n && Array.isArray(n);
360
+ const s = [], a = n && Array.isArray(n);
361
361
  if (H(s, e, n, l))
362
362
  return P(() => n = j(t, s, n, i, !0)), () => n;
363
363
  if (s.length === 0) {
364
364
  if (n = D(t, n, i), o) return n;
365
- } else u ? n.length === 0 ? X(t, s, i) : bt(t, n, s) : (n && D(t), X(t, s));
365
+ } else a ? n.length === 0 ? X(t, s, i) : bt(t, n, s) : (n && D(t), X(t, s));
366
366
  n = s;
367
367
  } else if (e.nodeType) {
368
368
  if (Array.isArray(n)) {
@@ -377,24 +377,24 @@ function j(t, e, n, i, l) {
377
377
  function H(t, e, n, i) {
378
378
  let l = !1;
379
379
  for (let r = 0, o = e.length; r < o; r++) {
380
- let s = e[r], u = n && n[t.length], $;
380
+ let s = e[r], a = n && n[t.length], $;
381
381
  if (!(s == null || s === !0 || s === !1)) if (($ = typeof s) == "object" && s.nodeType)
382
382
  t.push(s);
383
383
  else if (Array.isArray(s))
384
- l = H(t, s, u) || l;
384
+ l = H(t, s, a) || l;
385
385
  else if ($ === "function")
386
386
  if (i) {
387
387
  for (; typeof s == "function"; ) s = s();
388
388
  l = H(
389
389
  t,
390
390
  Array.isArray(s) ? s : [s],
391
- Array.isArray(u) ? u : [u]
391
+ Array.isArray(a) ? a : [a]
392
392
  ) || l;
393
393
  } else
394
394
  t.push(s), l = !0;
395
395
  else {
396
- const a = String(s);
397
- u && u.nodeType === 3 && u.data === a ? t.push(u) : t.push(document.createTextNode(a));
396
+ const u = String(s);
397
+ a && a.nodeType === 3 && a.data === u ? t.push(a) : t.push(document.createTextNode(u));
398
398
  }
399
399
  }
400
400
  return l;
@@ -410,24 +410,24 @@ function D(t, e, n, i) {
410
410
  for (let o = e.length - 1; o >= 0; o--) {
411
411
  const s = e[o];
412
412
  if (l !== s) {
413
- const u = s.parentNode === t;
414
- !r && !o ? u ? t.replaceChild(l, s) : t.insertBefore(l, n) : u && s.remove();
413
+ const a = s.parentNode === t;
414
+ !r && !o ? a ? t.replaceChild(l, s) : t.insertBefore(l, n) : a && s.remove();
415
415
  } else r = !0;
416
416
  }
417
417
  } else t.insertBefore(l, n);
418
418
  return [l];
419
419
  }
420
- var ut = (t) => t != null && (t = Object.getPrototypeOf(t), t === Array.prototype || t === Object.prototype);
421
- function at(t, e, n) {
420
+ var at = (t) => t != null && (t = Object.getPrototypeOf(t), t === Array.prototype || t === Object.prototype);
421
+ function ut(t, e, n) {
422
422
  for (const [i, l] of Object.entries(e)) {
423
423
  const r = `${n}.${i}`;
424
- t[r] = l, ut(l) && at(t, l, r);
424
+ t[r] = l, at(l) && ut(t, l, r);
425
425
  }
426
426
  }
427
427
  function vt(t) {
428
428
  const e = { ...t };
429
429
  for (const [n, i] of Object.entries(t))
430
- ut(i) && at(e, i, n);
430
+ at(i) && ut(e, i, n);
431
431
  return e;
432
432
  }
433
433
  var Lt = (t) => t;
@@ -480,24 +480,24 @@ function ft(t) {
480
480
  setValue: n,
481
481
  service: i
482
482
  } = t, [l, r] = S(""), [o, s] = S([]), {
483
- t: u
483
+ t: a
484
484
  } = K(t.language);
485
485
  F(async () => {
486
- const a = e();
487
- if (!a) return;
488
- const h = await i.getDocument(a);
486
+ const u = e();
487
+ if (!u) return;
488
+ const h = await i.getDocument(u);
489
489
  r(h.title ?? ""), await $();
490
490
  });
491
- const $ = async (a) => {
492
- if (a?.preventDefault(), l().length < 3) return;
491
+ const $ = async (u) => {
492
+ if (u?.preventDefault(), l().length < 3) return;
493
493
  const h = await i.searchDocuments({
494
494
  searchString: l()
495
495
  });
496
496
  s(h);
497
497
  };
498
498
  return (() => {
499
- var a = At(), h = a.firstChild, m = h.firstChild;
500
- return h.addEventListener("submit", $), m.$$input = (c) => r(c.currentTarget.value), p(a, A(Z, {
499
+ var u = At(), h = u.firstChild, m = h.firstChild;
500
+ return h.addEventListener("submit", $), m.$$input = (c) => r(c.currentTarget.value), p(u, A(Z, {
501
501
  when: o,
502
502
  get children() {
503
503
  var c = Ct();
@@ -509,21 +509,21 @@ function ft(t) {
509
509
  n(f.id);
510
510
  }, p(g, () => f.title), p(L, (() => {
511
511
  var v = _(() => !!f.ready);
512
- return () => v() ? _(() => z(f.publishDate).getTime() < (/* @__PURE__ */ new Date()).getTime())() ? u("InternalLink.editor.published") : u("InternalLink.editor.sheduled") : u("InternalLink.editor.draft");
512
+ return () => v() ? _(() => z(f.publishDate).getTime() < (/* @__PURE__ */ new Date()).getTime())() ? a("InternalLink.editor.published") : a("InternalLink.editor.sheduled") : a("InternalLink.editor.draft");
513
513
  })()), P(() => kt(L, `ILResultItem-status
514
514
  ${f.ready ? z(f.publishDate).getTime() < (/* @__PURE__ */ new Date()).getTime() ? "published" : "sheduled" : "draft"}`)), d;
515
515
  })()
516
516
  ))), c;
517
517
  }
518
- }), null), p(a, A(Z, {
518
+ }), null), p(u, A(Z, {
519
519
  get when() {
520
520
  return !o() || o().length === 0;
521
521
  },
522
522
  get children() {
523
523
  var c = Tt(), f = c.firstChild;
524
- return p(f, () => u("InternalLink.editor.noResult")), c;
524
+ return p(f, () => a("InternalLink.editor.noResult")), c;
525
525
  }
526
- }), null), P(() => m.value = l()), a;
526
+ }), null), P(() => m.value = l()), u;
527
527
  })();
528
528
  }
529
529
  q(["input", "click"]);
@@ -536,7 +536,7 @@ function Ht({
536
536
  }) {
537
537
  const {
538
538
  t: l
539
- } = K(i), [r, o] = S(), [s, u] = S(!!n());
539
+ } = K(i), [r, o] = S(), [s, a] = S(!!n());
540
540
  F(async () => {
541
541
  const c = n();
542
542
  if (!c) return;
@@ -556,11 +556,11 @@ function Ht({
556
556
  return () => d() && (() => {
557
557
  var g = Bt();
558
558
  return g.$$click = () => {
559
- u(!0);
559
+ a(!0);
560
560
  }, g;
561
561
  })();
562
562
  })(), f), p(f, () => l("InternalLink.dialog.title")), c;
563
- })(), a = (() => {
563
+ })(), u = (() => {
564
564
  var c = Ot();
565
565
  return p(c, (() => {
566
566
  var f = _(() => !!(s() && n()));
@@ -575,7 +575,7 @@ function Ht({
575
575
  language: i,
576
576
  value: n,
577
577
  setValue: (d) => {
578
- e(d), u(!0), m.hide();
578
+ e(d), a(!0), m.hide();
579
579
  }
580
580
  });
581
581
  })()), c;
@@ -594,7 +594,7 @@ function Ht({
594
594
  }, p(v, () => l("InternalLink.dialog.removeLink")), v;
595
595
  })(), (() => {
596
596
  var v = et();
597
- return v.$$click = () => u(!1), p(v, () => l("InternalLink.dialog.changeLink")), v;
597
+ return v.$$click = () => a(!1), p(v, () => l("InternalLink.dialog.changeLink")), v;
598
598
  })()];
599
599
  })(), g), g.$$click = () => {
600
600
  m.hide();
@@ -607,7 +607,7 @@ function Ht({
607
607
  })();
608
608
  })()), c;
609
609
  })(), m = t.createModalDialog({
610
- content: a,
610
+ content: u,
611
611
  footer: h,
612
612
  header: $
613
613
  });
@@ -647,7 +647,7 @@ async function Yt({
647
647
  typeName: c
648
648
  });
649
649
  });
650
- const u = (() => {
650
+ const a = (() => {
651
651
  var h = Ft(), m = h.firstChild;
652
652
  return p(h, (() => {
653
653
  var c = _(() => !!(t() && !o()));
@@ -668,18 +668,18 @@ async function Yt({
668
668
  var d = _(() => !!t());
669
669
  return () => d() && [(() => {
670
670
  var g = Qt();
671
- return g.$$click = () => a.close("remove"), p(g, () => r("InternalLink.dialog.removeLink")), g;
671
+ return g.$$click = () => u.close("remove"), p(g, () => r("InternalLink.dialog.removeLink")), g;
672
672
  })(), (() => {
673
673
  var g = Zt();
674
674
  return g.$$click = () => s(!1), p(g, () => r("InternalLink.dialog.changeLink")), g;
675
675
  })()];
676
- })(), f), f.$$click = () => a.close(), p(f, () => r("InternalLink.dialog.ok")), c;
676
+ })(), f), f.$$click = () => u.close(), p(f, () => r("InternalLink.dialog.ok")), c;
677
677
  })() : (() => {
678
678
  var c = Wt();
679
- return c.$$click = () => a.close(), p(c, () => r("InternalLink.dialog.ok")), c;
679
+ return c.$$click = () => u.close(), p(c, () => r("InternalLink.dialog.ok")), c;
680
680
  })();
681
681
  })()), h;
682
- })(), a = n.createModalDialog({
682
+ })(), u = n.createModalDialog({
683
683
  content: (() => {
684
684
  var h = Xt();
685
685
  return p(h, (() => {
@@ -688,20 +688,20 @@ async function Yt({
688
688
  var c = Jt(), f = c.firstChild, d = f.nextSibling;
689
689
  return p(f, () => i()?.title), d.$$click = () => {
690
690
  const g = t(), L = i()?.typeName;
691
- !g || !L || (a.close(), n.openDocumentEdition(g, L));
691
+ !g || !L || (u.close(), n.openDocumentEdition(g, L));
692
692
  }, c;
693
693
  })() : A(ft, {
694
694
  service: n,
695
695
  language: e,
696
696
  value: t,
697
- setValue: (c) => a.close(c)
697
+ setValue: (c) => u.close(c)
698
698
  });
699
699
  })()), h;
700
700
  })(),
701
- header: u,
701
+ header: a,
702
702
  footer: $
703
703
  });
704
- return await a.open();
704
+ return await u.open();
705
705
  }
706
706
  q(["click"]);
707
707
  const ie = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/internal-link-plugin",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Internal link plugin for ParoiCMS",
5
5
  "keywords": [
6
6
  "paroicms",
@@ -30,20 +30,20 @@
30
30
  "@paroicms/public-server-lib": "0"
31
31
  },
32
32
  "devDependencies": {
33
- "@paroicms/public-anywhere-lib": "0.18.0",
34
- "@paroicms/public-bo-lib": "0.19.5",
35
- "@paroicms/public-server-lib": "0.25.0",
36
- "@paroicms/quill-editor-plugin": "^1.27.0",
33
+ "@paroicms/public-anywhere-lib": "0.19.0",
34
+ "@paroicms/public-bo-lib": "0.20.0",
35
+ "@paroicms/public-server-lib": "0.26.0",
36
+ "@paroicms/quill-editor-plugin": "^1.28.0",
37
37
  "@solid-primitives/i18n": "~2.1.1",
38
- "@types/node": "~22.10.7",
38
+ "@types/node": "~22.13.10",
39
39
  "primeicons": "^7.0.0",
40
40
  "rimraf": "~6.0.1",
41
- "sass": "~1.83.4",
41
+ "sass": "~1.84.0",
42
42
  "solid-devtools": "~0.33.0",
43
43
  "solid-js": "1.9.4",
44
44
  "sortablejs": "^1.15.2",
45
- "typescript": "~5.7.3",
46
- "vite": "~6.0.7",
45
+ "typescript": "~5.8.2",
46
+ "vite": "~6.1.0",
47
47
  "vite-plugin-solid": "~2.11.0"
48
48
  },
49
49
  "type": "module",
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "6",
2
+ "version": "7",
3
3
  "languages": ["en", "fr"],
4
4
  "fieldTypes": [
5
5
  {
6
6
  "name": "featuredDocument",
7
- "storedOn": "node",
7
+ "localized": false,
8
8
  "storedAs": "varchar",
9
9
  "dataType": "string",
10
10
  "plugin": "@paroicms/internal-link-plugin"