@paroicms/internal-link-plugin 0.8.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.
@@ -1,15 +1,15 @@
1
- const dt = (t, e) => t === e, O = {
1
+ const dt = (t, e) => t === e, B = {
2
2
  equals: dt
3
3
  };
4
4
  let nt = st;
5
- const E = 1, R = 2, it = {
5
+ const E = 1, O = 2, it = {
6
6
  owned: null,
7
7
  cleanups: null,
8
8
  context: null,
9
9
  owner: null
10
10
  };
11
11
  var k = null;
12
- let H = null, ht = null, w = null, b = null, I = null, U = 0;
12
+ let U = null, ht = null, w = null, b = null, I = null, M = 0;
13
13
  function pt(t, e) {
14
14
  const n = w, i = k, l = t.length === 0, r = i, o = l ? it : {
15
15
  owned: null,
@@ -25,7 +25,7 @@ function pt(t, e) {
25
25
  }
26
26
  }
27
27
  function S(t, e) {
28
- e = e ? Object.assign({}, O, e) : O;
28
+ e = e ? Object.assign({}, B, e) : B;
29
29
  const n = {
30
30
  value: t,
31
31
  observers: null,
@@ -35,17 +35,17 @@ function S(t, e) {
35
35
  return [lt.bind(n), i];
36
36
  }
37
37
  function P(t, e, n) {
38
- const i = q(t, e, !1, E);
38
+ const i = G(t, e, !1, E);
39
39
  x(i);
40
40
  }
41
- function G(t, e, n) {
41
+ function F(t, e, n) {
42
42
  nt = mt;
43
- const i = q(t, e, !1, E);
43
+ const i = G(t, e, !1, E);
44
44
  i.user = !0, I ? I.push(i) : x(i);
45
45
  }
46
46
  function _(t, e, n) {
47
- n = n ? Object.assign({}, O, n) : O;
48
- const i = q(t, e, !0, 0);
47
+ n = n ? Object.assign({}, B, n) : B;
48
+ const i = G(t, e, !0, 0);
49
49
  return i.observers = null, i.observerSlots = null, i.comparator = n.equals || void 0, x(i), lt.bind(i);
50
50
  }
51
51
  function C(t) {
@@ -63,7 +63,7 @@ function lt() {
63
63
  if (this.state === E) x(this);
64
64
  else {
65
65
  const t = b;
66
- b = null, N(() => j(this), !1), b = t;
66
+ b = null, N(() => V(this), !1), b = t;
67
67
  }
68
68
  if (w) {
69
69
  const t = this.observers ? this.observers.length : 0;
@@ -75,8 +75,8 @@ function rt(t, e, n) {
75
75
  let i = t.value;
76
76
  return (!t.comparator || !t.comparator(i, e)) && (t.value = e, t.observers && t.observers.length && N(() => {
77
77
  for (let l = 0; l < t.observers.length; l += 1) {
78
- const r = t.observers[l], o = H && H.running;
79
- o && H.disposed.has(r), (o ? !r.tState : !r.state) && (r.pure ? b.push(r) : I.push(r), r.observers && ot(r)), o || (r.state = E);
78
+ const r = t.observers[l], o = U && U.running;
79
+ o && U.disposed.has(r), (o ? !r.tState : !r.state) && (r.pure ? b.push(r) : I.push(r), r.observers && ot(r)), o || (r.state = E);
80
80
  }
81
81
  if (b.length > 1e6)
82
82
  throw b = [], new Error();
@@ -85,7 +85,7 @@ function rt(t, e, n) {
85
85
  function x(t) {
86
86
  if (!t.fn) return;
87
87
  T(t);
88
- const e = U;
88
+ const e = M;
89
89
  gt(
90
90
  t,
91
91
  t.value,
@@ -105,7 +105,7 @@ function gt(t, e, n) {
105
105
  }
106
106
  (!t.updatedAt || t.updatedAt <= n) && (t.updatedAt != null && "observers" in t ? rt(t, i) : t.value = i, t.updatedAt = n);
107
107
  }
108
- function q(t, e, n, i = E, l) {
108
+ function G(t, e, n, i = E, l) {
109
109
  const r = {
110
110
  fn: t,
111
111
  state: i,
@@ -121,25 +121,25 @@ function q(t, e, n, i = E, l) {
121
121
  };
122
122
  return k === null || k !== it && (k.owned ? k.owned.push(r) : k.owned = [r]), r;
123
123
  }
124
- function V(t) {
124
+ function R(t) {
125
125
  if (t.state === 0) return;
126
- if (t.state === R) return j(t);
126
+ if (t.state === O) return V(t);
127
127
  if (t.suspense && C(t.suspense.inFallback)) return t.suspense.effects.push(t);
128
128
  const e = [t];
129
- for (; (t = t.owner) && (!t.updatedAt || t.updatedAt < U); )
129
+ for (; (t = t.owner) && (!t.updatedAt || t.updatedAt < M); )
130
130
  t.state && e.push(t);
131
131
  for (let n = e.length - 1; n >= 0; n--)
132
132
  if (t = e[n], t.state === E)
133
133
  x(t);
134
- else if (t.state === R) {
134
+ else if (t.state === O) {
135
135
  const i = b;
136
- b = null, N(() => j(t, e[0]), !1), b = i;
136
+ b = null, N(() => V(t, e[0]), !1), b = i;
137
137
  }
138
138
  }
139
139
  function N(t, e) {
140
140
  if (b) return t();
141
141
  let n = !1;
142
- e || (b = []), I ? n = !0 : I = [], U++;
142
+ e || (b = []), I ? n = !0 : I = [], M++;
143
143
  try {
144
144
  const i = t();
145
145
  return $t(n), i;
@@ -153,30 +153,30 @@ function $t(t) {
153
153
  I = null, e.length && N(() => nt(e), !1);
154
154
  }
155
155
  function st(t) {
156
- for (let e = 0; e < t.length; e++) V(t[e]);
156
+ for (let e = 0; e < t.length; e++) R(t[e]);
157
157
  }
158
158
  function mt(t) {
159
159
  let e, n = 0;
160
160
  for (e = 0; e < t.length; e++) {
161
161
  const i = t[e];
162
- i.user ? t[n++] = i : V(i);
162
+ i.user ? t[n++] = i : R(i);
163
163
  }
164
- for (e = 0; e < n; e++) V(t[e]);
164
+ for (e = 0; e < n; e++) R(t[e]);
165
165
  }
166
- function j(t, e) {
166
+ function V(t, e) {
167
167
  t.state = 0;
168
168
  for (let n = 0; n < t.sources.length; n += 1) {
169
169
  const i = t.sources[n];
170
170
  if (i.sources) {
171
171
  const l = i.state;
172
- l === E ? i !== e && (!i.updatedAt || i.updatedAt < U) && V(i) : l === R && j(i, e);
172
+ l === E ? i !== e && (!i.updatedAt || i.updatedAt < M) && R(i) : l === O && V(i, e);
173
173
  }
174
174
  }
175
175
  }
176
176
  function ot(t) {
177
177
  for (let e = 0; e < t.observers.length; e += 1) {
178
178
  const n = t.observers[e];
179
- n.state || (n.state = R, n.pure ? b.push(n) : I.push(n), n.observers && ot(n));
179
+ n.state || (n.state = O, n.pure ? b.push(n) : I.push(n), n.observers && ot(n));
180
180
  }
181
181
  }
182
182
  function T(t) {
@@ -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();
@@ -287,7 +287,7 @@ function y(t, e, n) {
287
287
  }, r = () => (i || (i = l())).cloneNode(!0);
288
288
  return r.cloneNode = r, r;
289
289
  }
290
- function K(t, e = window.document) {
290
+ function q(t, e = window.document) {
291
291
  const n = e[W] || (e[W] = /* @__PURE__ */ new Set());
292
292
  for (let i = 0, l = t.length; i < l; i++) {
293
293
  const r = t[i];
@@ -298,19 +298,19 @@ function kt(t, e) {
298
298
  e == null ? t.removeAttribute("class") : t.className = e;
299
299
  }
300
300
  function p(t, e, n, i) {
301
- if (n !== void 0 && !i && (i = []), typeof e != "function") return M(t, e, i, n);
302
- P((l) => M(t, e(), l, n), i);
301
+ if (n !== void 0 && !i && (i = []), typeof e != "function") return j(t, e, i, n);
302
+ P((l) => j(t, e(), l, 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;
@@ -335,7 +335,7 @@ function _t(t) {
335
335
  } else s();
336
336
  r(i);
337
337
  }
338
- function M(t, e, n, i, l) {
338
+ function j(t, e, n, i, l) {
339
339
  for (; typeof n == "function"; ) n = n();
340
340
  if (e === n) return n;
341
341
  const r = typeof e, o = i !== void 0;
@@ -354,15 +354,15 @@ function M(t, e, n, i, l) {
354
354
  return P(() => {
355
355
  let s = e();
356
356
  for (; typeof s == "function"; ) s = s();
357
- n = M(t, s, n, i);
357
+ n = j(t, s, n, i);
358
358
  }), () => n;
359
359
  if (Array.isArray(e)) {
360
- const s = [], u = n && Array.isArray(n);
361
- if (F(s, e, n, l))
362
- return P(() => n = M(t, s, n, i, !0)), () => n;
360
+ const s = [], a = n && Array.isArray(n);
361
+ if (H(s, e, n, l))
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)) {
@@ -374,27 +374,27 @@ function M(t, e, n, i, l) {
374
374
  }
375
375
  return n;
376
376
  }
377
- function F(t, e, n, i) {
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 = F(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
- l = F(
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;
@@ -450,7 +450,7 @@ const St = { insertLink: "Insert link", change: "Change", editor: { noResult: "N
450
450
  }, Dt = { insertLink: "Insérer un lien", change: "Modifier", editor: { noResult: "Aucun résultat trouvé", draft: "Brouillon", published: "Publié", sheduled: "Programmé" }, dialog: { title: "Insérer un lien interne", removeLink: "Supprimer le lien", changeLink: "Trouver un autre lien", ok: "OK" } }, Pt = {
451
451
  InternalLink: Dt
452
452
  }, J = { en: Et, fr: Pt };
453
- function Q(t) {
453
+ function K(t) {
454
454
  const e = _(() => {
455
455
  const i = t(), l = i in J ? i : "en";
456
456
  return vt(J[l]);
@@ -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
484
- } = Q(t.language);
485
- G(async () => {
486
- const a = e();
487
- if (!a) return;
488
- const h = await i.getDocument(a);
483
+ t: a
484
+ } = K(t.language);
485
+ F(async () => {
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,27 +509,24 @@ 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() ? (() => {
513
- var B = _(() => z(f.publishDate).getTime() < (/* @__PURE__ */ new Date()).getTime());
514
- return () => B() ? u("InternalLink.editor.published") : u("InternalLink.editor.sheduled");
515
- })() : 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");
516
513
  })()), P(() => kt(L, `ILResultItem-status
517
514
  ${f.ready ? z(f.publishDate).getTime() < (/* @__PURE__ */ new Date()).getTime() ? "published" : "sheduled" : "draft"}`)), d;
518
515
  })()
519
516
  ))), c;
520
517
  }
521
- }), null), p(a, A(Z, {
518
+ }), null), p(u, A(Z, {
522
519
  get when() {
523
520
  return !o() || o().length === 0;
524
521
  },
525
522
  get children() {
526
523
  var c = Tt(), f = c.firstChild;
527
- return p(f, () => u("InternalLink.editor.noResult")), c;
524
+ return p(f, () => a("InternalLink.editor.noResult")), c;
528
525
  }
529
- }), null), P(() => m.value = l()), a;
526
+ }), null), P(() => m.value = l()), u;
530
527
  })();
531
528
  }
532
- K(["input", "click"]);
529
+ q(["input", "click"]);
533
530
  var Nt = /* @__PURE__ */ y("<div class=InternalLinkDialog-header><span class=InternalLinkDialog-title>"), Bt = /* @__PURE__ */ y('<button class="PlgBtn pi pi-arrow-left"type=button>'), Ot = /* @__PURE__ */ y("<div class=InternalLinkDialog-content>"), Rt = /* @__PURE__ */ y('<div class=ILPreview><div class=ILPreview-title></div><button class="PlgBtn outlined iconBtn pi pi-pencil"type=button>'), tt = /* @__PURE__ */ y("<div>"), Vt = /* @__PURE__ */ y('<div><button class="PlgBtn primary"type=button>'), jt = /* @__PURE__ */ y('<button type=button class="PlgBtn danger outlined">'), et = /* @__PURE__ */ y("<button class=PlgBtn type=button>"), Mt = /* @__PURE__ */ y('<button class="PlgBtn primary"type=button>'), Ut = /* @__PURE__ */ y('<div class=InternalLinkDialog-linkPreview><div></div><button class="PlgBtn iconBtn pi pi-pencil"type=button>');
534
531
  function Ht({
535
532
  service: t,
@@ -539,8 +536,8 @@ function Ht({
539
536
  }) {
540
537
  const {
541
538
  t: l
542
- } = Q(i), [r, o] = S(), [s, u] = S(!!n());
543
- G(async () => {
539
+ } = K(i), [r, o] = S(), [s, a] = S(!!n());
540
+ F(async () => {
544
541
  const c = n();
545
542
  if (!c) return;
546
543
  const {
@@ -559,26 +556,26 @@ function Ht({
559
556
  return () => d() && (() => {
560
557
  var g = Bt();
561
558
  return g.$$click = () => {
562
- u(!0);
559
+ a(!0);
563
560
  }, g;
564
561
  })();
565
562
  })(), f), p(f, () => l("InternalLink.dialog.title")), c;
566
- })(), a = (() => {
563
+ })(), u = (() => {
567
564
  var c = Ot();
568
565
  return p(c, (() => {
569
566
  var f = _(() => !!(s() && n()));
570
567
  return () => f() ? (() => {
571
568
  var d = Rt(), g = d.firstChild, L = g.nextSibling;
572
569
  return p(g, () => r()?.title), L.$$click = () => {
573
- const v = n(), B = r()?.typeName;
574
- !v || !B || (m.close(), t.openDocumentEdition(v, B));
570
+ const v = n(), Q = r()?.typeName;
571
+ !v || !Q || (m.close(), t.openDocumentEdition(v, Q));
575
572
  }, d;
576
573
  })() : A(ft, {
577
574
  service: t,
578
575
  language: i,
579
576
  value: n,
580
577
  setValue: (d) => {
581
- e(d), u(!0), m.hide();
578
+ e(d), a(!0), m.hide();
582
579
  }
583
580
  });
584
581
  })()), c;
@@ -597,7 +594,7 @@ function Ht({
597
594
  }, p(v, () => l("InternalLink.dialog.removeLink")), v;
598
595
  })(), (() => {
599
596
  var v = et();
600
- 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;
601
598
  })()];
602
599
  })(), g), g.$$click = () => {
603
600
  m.hide();
@@ -610,7 +607,7 @@ function Ht({
610
607
  })();
611
608
  })()), c;
612
609
  })(), m = t.createModalDialog({
613
- content: a,
610
+ content: u,
614
611
  footer: h,
615
612
  header: $
616
613
  });
@@ -628,7 +625,7 @@ function Ht({
628
625
  })()), c;
629
626
  })();
630
627
  }
631
- K(["click"]);
628
+ q(["click"]);
632
629
  var Ft = /* @__PURE__ */ y("<div class=InternalLinkDialog-header><span class=InternalLinkDialog-title>"), Gt = /* @__PURE__ */ y('<button class="PlgBtn pi pi-arrow-left"type=button>'), qt = /* @__PURE__ */ y("<div>"), Kt = /* @__PURE__ */ y('<div><button class="PlgBtn primary"type=button>'), Qt = /* @__PURE__ */ y('<button type=button class="PlgBtn danger outlined">'), Zt = /* @__PURE__ */ y("<button class=PlgBtn type=button>"), Wt = /* @__PURE__ */ y('<button class="PlgBtn primary"type=button>'), Xt = /* @__PURE__ */ y("<div class=InternalLinkDialog-content>"), Jt = /* @__PURE__ */ y('<div class=ILPreview><div class=ILPreview-title></div><button class="PlgBtn outlined iconBtn pi pi-pencil"type=button>');
633
630
  async function Yt({
634
631
  value: t,
@@ -637,8 +634,8 @@ async function Yt({
637
634
  }) {
638
635
  const [i, l] = S(), {
639
636
  t: r
640
- } = Q(e), [o, s] = S(!!t());
641
- G(async () => {
637
+ } = K(e), [o, s] = S(!!t());
638
+ F(async () => {
642
639
  const h = t();
643
640
  if (!h) return;
644
641
  const {
@@ -650,7 +647,7 @@ async function Yt({
650
647
  typeName: c
651
648
  });
652
649
  });
653
- const u = (() => {
650
+ const a = (() => {
654
651
  var h = Ft(), m = h.firstChild;
655
652
  return p(h, (() => {
656
653
  var c = _(() => !!(t() && !o()));
@@ -671,18 +668,18 @@ async function Yt({
671
668
  var d = _(() => !!t());
672
669
  return () => d() && [(() => {
673
670
  var g = Qt();
674
- 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;
675
672
  })(), (() => {
676
673
  var g = Zt();
677
674
  return g.$$click = () => s(!1), p(g, () => r("InternalLink.dialog.changeLink")), g;
678
675
  })()];
679
- })(), 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;
680
677
  })() : (() => {
681
678
  var c = Wt();
682
- 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;
683
680
  })();
684
681
  })()), h;
685
- })(), a = n.createModalDialog({
682
+ })(), u = n.createModalDialog({
686
683
  content: (() => {
687
684
  var h = Xt();
688
685
  return p(h, (() => {
@@ -691,22 +688,22 @@ async function Yt({
691
688
  var c = Jt(), f = c.firstChild, d = f.nextSibling;
692
689
  return p(f, () => i()?.title), d.$$click = () => {
693
690
  const g = t(), L = i()?.typeName;
694
- !g || !L || (a.close(), n.openDocumentEdition(g, L));
691
+ !g || !L || (u.close(), n.openDocumentEdition(g, L));
695
692
  }, c;
696
693
  })() : A(ft, {
697
694
  service: n,
698
695
  language: e,
699
696
  value: t,
700
- setValue: (c) => a.close(c)
697
+ setValue: (c) => u.close(c)
701
698
  });
702
699
  })()), h;
703
700
  })(),
704
- header: u,
701
+ header: a,
705
702
  footer: $
706
703
  });
707
- return await a.open();
704
+ return await u.open();
708
705
  }
709
- K(["click"]);
706
+ q(["click"]);
710
707
  const ie = {
711
708
  create: ne,
712
709
  init: ee
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/internal-link-plugin",
3
- "version": "0.8.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.17.0",
34
- "@paroicms/public-bo-lib": "0.19.3",
35
- "@paroicms/public-server-lib": "0.24.0",
36
- "@paroicms/quill-editor-plugin": "^1.26.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": "5",
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"