@paroicms/internal-link-plugin 0.23.9 → 0.23.10
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 +1 @@
|
|
|
1
|
-
.InternalLinkDialog-content{min-height:200px}.InternalLinkDialog-linkPreview{align-items:center
|
|
1
|
+
.InternalLinkDialog-content{min-height:200px}.InternalLinkDialog-linkPreview{display:flex;align-items:center}.InternalLinkDialog-linkPreview>div:nth-child(1){margin-right:10px}.InternalLinkDialog-header{display:flex;align-items:center;justify-content:center}.InternalLinkDialog-title{width:100%;text-align:center}.ILPreview{display:flex;align-items:center;justify-content:space-between}.ILPreview-title{font-weight:700}.InternalLinkEditor{height:100%}.InternalLinkEditor-input{width:100%;padding:10px;font-size:1rem;color:#4b5563;background:#fff;border:1px solid #d1d5db;border-radius:6px;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s}.ILResult{margin-top:15px}.ILResultItem{display:flex;align-items:center;justify-content:space-between;width:100%;padding:15px 5px;margin-bottom:7px;cursor:pointer;border:1px dashed #475569;border-radius:2px}.ILResultItem-title{font-weight:700}.ILResultItem-status{padding:.25rem .4rem;font-size:.75rem;font-weight:700;color:#fff;border-radius:6px}.ILResultItem-status.draft{background-color:#2e2e2e}.ILResultItem-status.published{background-color:#22c55e}.ILResultItem-status.sheduled{background-color:#f1c40f}.ILNoResult{display:flex;flex-direction:column;align-items:center}.ILNoResult-message{margin-bottom:10px}.ILNoResult.pi-exclamation-circle{font-size:30px}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
const
|
|
2
|
-
equals:
|
|
1
|
+
const ge = (e, t) => e === t, R = {
|
|
2
|
+
equals: ge
|
|
3
3
|
};
|
|
4
|
-
let
|
|
5
|
-
const S = 1,
|
|
4
|
+
let ie = oe;
|
|
5
|
+
const S = 1, M = 2, le = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
8
8
|
context: null,
|
|
9
9
|
owner: null
|
|
10
10
|
};
|
|
11
|
-
var
|
|
12
|
-
let
|
|
13
|
-
function
|
|
14
|
-
const n =
|
|
11
|
+
var y = null;
|
|
12
|
+
let K = null, pe = null, w = null, v = null, _ = null, U = 0;
|
|
13
|
+
function $e(e, t) {
|
|
14
|
+
const n = w, i = y, l = e.length === 0, r = i, o = l ? le : {
|
|
15
15
|
owned: null,
|
|
16
16
|
cleanups: null,
|
|
17
17
|
context: r ? r.context : null,
|
|
18
18
|
owner: r
|
|
19
|
-
}, s = l ? e : () => e(() =>
|
|
20
|
-
|
|
19
|
+
}, s = l ? e : () => e(() => C(() => A(o)));
|
|
20
|
+
y = o, w = null;
|
|
21
21
|
try {
|
|
22
|
-
return
|
|
22
|
+
return B(s, !0);
|
|
23
23
|
} finally {
|
|
24
|
-
|
|
24
|
+
w = n, y = i;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
function E(e, t) {
|
|
@@ -31,77 +31,77 @@ function E(e, t) {
|
|
|
31
31
|
observers: null,
|
|
32
32
|
observerSlots: null,
|
|
33
33
|
comparator: t.equals || void 0
|
|
34
|
-
}, i = (l) => (typeof l == "function" && (l = l(n.value)),
|
|
35
|
-
return [
|
|
34
|
+
}, i = (l) => (typeof l == "function" && (l = l(n.value)), se(n, l));
|
|
35
|
+
return [re.bind(n), i];
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const i =
|
|
39
|
-
|
|
37
|
+
function P(e, t, n) {
|
|
38
|
+
const i = W(e, t, !1, S);
|
|
39
|
+
N(i);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
const i =
|
|
44
|
-
i.user = !0,
|
|
41
|
+
function Q(e, t, n) {
|
|
42
|
+
ie = we;
|
|
43
|
+
const i = W(e, t, !1, S);
|
|
44
|
+
i.user = !0, _ ? _.push(i) : N(i);
|
|
45
45
|
}
|
|
46
46
|
function D(e, t, n) {
|
|
47
47
|
n = n ? Object.assign({}, R, n) : R;
|
|
48
|
-
const i =
|
|
49
|
-
return i.observers = null, i.observerSlots = null, i.comparator = n.equals || void 0,
|
|
48
|
+
const i = W(e, t, !0, 0);
|
|
49
|
+
return i.observers = null, i.observerSlots = null, i.comparator = n.equals || void 0, N(i), re.bind(i);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
if (
|
|
53
|
-
const t =
|
|
54
|
-
|
|
51
|
+
function C(e) {
|
|
52
|
+
if (w === null) return e();
|
|
53
|
+
const t = w;
|
|
54
|
+
w = null;
|
|
55
55
|
try {
|
|
56
56
|
return e();
|
|
57
57
|
} finally {
|
|
58
|
-
|
|
58
|
+
w = t;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function re() {
|
|
62
62
|
if (this.sources && this.state)
|
|
63
|
-
if (this.state === S)
|
|
63
|
+
if (this.state === S) N(this);
|
|
64
64
|
else {
|
|
65
|
-
const e =
|
|
66
|
-
|
|
65
|
+
const e = v;
|
|
66
|
+
v = null, B(() => H(this), !1), v = e;
|
|
67
67
|
}
|
|
68
|
-
if (
|
|
68
|
+
if (w) {
|
|
69
69
|
const e = this.observers ? this.observers.length : 0;
|
|
70
|
-
|
|
70
|
+
w.sources ? (w.sources.push(this), w.sourceSlots.push(e)) : (w.sources = [this], w.sourceSlots = [e]), this.observers ? (this.observers.push(w), this.observerSlots.push(w.sources.length - 1)) : (this.observers = [w], this.observerSlots = [w.sources.length - 1]);
|
|
71
71
|
}
|
|
72
72
|
return this.value;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function se(e, t, n) {
|
|
75
75
|
let i = e.value;
|
|
76
|
-
return (!e.comparator || !e.comparator(i, t)) && (e.value = t, e.observers && e.observers.length &&
|
|
76
|
+
return (!e.comparator || !e.comparator(i, t)) && (e.value = t, e.observers && e.observers.length && B(() => {
|
|
77
77
|
for (let l = 0; l < e.observers.length; l += 1) {
|
|
78
|
-
const r = e.observers[l], o =
|
|
79
|
-
o &&
|
|
78
|
+
const r = e.observers[l], o = K && K.running;
|
|
79
|
+
o && K.disposed.has(r), (o ? !r.tState : !r.state) && (r.pure ? v.push(r) : _.push(r), r.observers && ae(r)), o || (r.state = S);
|
|
80
80
|
}
|
|
81
|
-
if (
|
|
82
|
-
throw
|
|
81
|
+
if (v.length > 1e6)
|
|
82
|
+
throw v = [], new Error();
|
|
83
83
|
}, !1)), t;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function N(e) {
|
|
86
86
|
if (!e.fn) return;
|
|
87
|
-
|
|
88
|
-
const t =
|
|
89
|
-
|
|
87
|
+
A(e);
|
|
88
|
+
const t = U;
|
|
89
|
+
ke(e, e.value, t);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function ke(e, t, n) {
|
|
92
92
|
let i;
|
|
93
|
-
const l =
|
|
94
|
-
|
|
93
|
+
const l = y, r = w;
|
|
94
|
+
w = y = e;
|
|
95
95
|
try {
|
|
96
96
|
i = e.fn(t);
|
|
97
97
|
} catch (o) {
|
|
98
|
-
return e.pure && (e.state = S, e.owned && e.owned.forEach(
|
|
98
|
+
return e.pure && (e.state = S, e.owned && e.owned.forEach(A), e.owned = null), e.updatedAt = n + 1, ce(o);
|
|
99
99
|
} finally {
|
|
100
|
-
|
|
100
|
+
w = r, y = l;
|
|
101
101
|
}
|
|
102
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
102
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? se(e, i) : e.value = i, e.updatedAt = n);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function W(e, t, n, i = S, l) {
|
|
105
105
|
const r = {
|
|
106
106
|
fn: e,
|
|
107
107
|
state: i,
|
|
@@ -111,71 +111,71 @@ function q(e, t, n, i = S, l) {
|
|
|
111
111
|
sourceSlots: null,
|
|
112
112
|
cleanups: null,
|
|
113
113
|
value: t,
|
|
114
|
-
owner:
|
|
115
|
-
context:
|
|
114
|
+
owner: y,
|
|
115
|
+
context: y ? y.context : null,
|
|
116
116
|
pure: n
|
|
117
117
|
};
|
|
118
|
-
return
|
|
118
|
+
return y === null || y !== le && (y.owned ? y.owned.push(r) : y.owned = [r]), r;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function V(e) {
|
|
121
121
|
if (e.state === 0) return;
|
|
122
|
-
if (e.state ===
|
|
123
|
-
if (e.suspense &&
|
|
122
|
+
if (e.state === M) return H(e);
|
|
123
|
+
if (e.suspense && C(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
124
124
|
const t = [e];
|
|
125
|
-
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt <
|
|
125
|
+
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < U); )
|
|
126
126
|
e.state && t.push(e);
|
|
127
127
|
for (let n = t.length - 1; n >= 0; n--)
|
|
128
128
|
if (e = t[n], e.state === S)
|
|
129
|
-
|
|
130
|
-
else if (e.state ===
|
|
131
|
-
const i =
|
|
132
|
-
|
|
129
|
+
N(e);
|
|
130
|
+
else if (e.state === M) {
|
|
131
|
+
const i = v;
|
|
132
|
+
v = null, B(() => H(e, t[0]), !1), v = i;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
if (
|
|
135
|
+
function B(e, t) {
|
|
136
|
+
if (v) return e();
|
|
137
137
|
let n = !1;
|
|
138
|
-
t || (
|
|
138
|
+
t || (v = []), _ ? n = !0 : _ = [], U++;
|
|
139
139
|
try {
|
|
140
140
|
const i = e();
|
|
141
|
-
return
|
|
141
|
+
return me(n), i;
|
|
142
142
|
} catch (i) {
|
|
143
|
-
n || (
|
|
143
|
+
n || (_ = null), v = null, ce(i);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
if (
|
|
148
|
-
const t =
|
|
149
|
-
|
|
146
|
+
function me(e) {
|
|
147
|
+
if (v && (oe(v), v = null), e) return;
|
|
148
|
+
const t = _;
|
|
149
|
+
_ = null, t.length && B(() => ie(t), !1);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
for (let t = 0; t < e.length; t++)
|
|
151
|
+
function oe(e) {
|
|
152
|
+
for (let t = 0; t < e.length; t++) V(e[t]);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function we(e) {
|
|
155
155
|
let t, n = 0;
|
|
156
156
|
for (t = 0; t < e.length; t++) {
|
|
157
157
|
const i = e[t];
|
|
158
|
-
i.user ? e[n++] = i :
|
|
158
|
+
i.user ? e[n++] = i : V(i);
|
|
159
159
|
}
|
|
160
|
-
for (t = 0; t < n; t++)
|
|
160
|
+
for (t = 0; t < n; t++) V(e[t]);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function H(e, t) {
|
|
163
163
|
e.state = 0;
|
|
164
164
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
165
165
|
const i = e.sources[n];
|
|
166
166
|
if (i.sources) {
|
|
167
167
|
const l = i.state;
|
|
168
|
-
l === S ? i !== t && (!i.updatedAt || i.updatedAt <
|
|
168
|
+
l === S ? i !== t && (!i.updatedAt || i.updatedAt < U) && V(i) : l === M && H(i, t);
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function ae(e) {
|
|
173
173
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
174
174
|
const n = e.observers[t];
|
|
175
|
-
n.state || (n.state =
|
|
175
|
+
n.state || (n.state = M, n.pure ? v.push(n) : _.push(n), n.observers && ae(n));
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function A(e) {
|
|
179
179
|
let t;
|
|
180
180
|
if (e.sources)
|
|
181
181
|
for (; e.sources.length; ) {
|
|
@@ -186,11 +186,11 @@ function N(e) {
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
if (e.tOwned) {
|
|
189
|
-
for (t = e.tOwned.length - 1; t >= 0; t--)
|
|
189
|
+
for (t = e.tOwned.length - 1; t >= 0; t--) A(e.tOwned[t]);
|
|
190
190
|
delete e.tOwned;
|
|
191
191
|
}
|
|
192
192
|
if (e.owned) {
|
|
193
|
-
for (t = e.owned.length - 1; t >= 0; t--)
|
|
193
|
+
for (t = e.owned.length - 1; t >= 0; t--) A(e.owned[t]);
|
|
194
194
|
e.owned = null;
|
|
195
195
|
}
|
|
196
196
|
if (e.cleanups) {
|
|
@@ -199,19 +199,19 @@ function N(e) {
|
|
|
199
199
|
}
|
|
200
200
|
e.state = 0;
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function ve(e) {
|
|
203
203
|
return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
|
|
204
204
|
cause: e
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
throw
|
|
207
|
+
function ce(e, t = y) {
|
|
208
|
+
throw ve(e);
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
return
|
|
210
|
+
function T(e, t) {
|
|
211
|
+
return C(() => e(t || {}));
|
|
212
212
|
}
|
|
213
|
-
const
|
|
214
|
-
function
|
|
213
|
+
const ye = (e) => `Stale read from <${e}>.`;
|
|
214
|
+
function Y(e) {
|
|
215
215
|
const t = e.keyed, n = D(() => e.when, void 0, void 0), i = t ? n : D(n, void 0, {
|
|
216
216
|
equals: (l, r) => !l == !r
|
|
217
217
|
});
|
|
@@ -219,16 +219,16 @@ function X(e) {
|
|
|
219
219
|
const l = i();
|
|
220
220
|
if (l) {
|
|
221
221
|
const r = e.children;
|
|
222
|
-
return typeof r == "function" && r.length > 0 ?
|
|
223
|
-
if (!
|
|
222
|
+
return typeof r == "function" && r.length > 0 ? C(() => r(t ? l : () => {
|
|
223
|
+
if (!C(i)) throw ye("Show");
|
|
224
224
|
return n();
|
|
225
225
|
})) : r;
|
|
226
226
|
}
|
|
227
227
|
return e.fallback;
|
|
228
228
|
}, void 0, void 0);
|
|
229
229
|
}
|
|
230
|
-
const
|
|
231
|
-
function
|
|
230
|
+
const I = (e) => D(() => e());
|
|
231
|
+
function Le(e, t, n) {
|
|
232
232
|
let i = n.length, l = t.length, r = i, o = 0, s = 0, a = t[l - 1].nextSibling, k = null;
|
|
233
233
|
for (; o < l || s < r; ) {
|
|
234
234
|
if (t[o] === n[s]) {
|
|
@@ -255,10 +255,10 @@ function be(e, t, n) {
|
|
|
255
255
|
const $ = k.get(t[o]);
|
|
256
256
|
if ($ != null)
|
|
257
257
|
if (s < $ && $ < r) {
|
|
258
|
-
let f = o,
|
|
259
|
-
for (; ++f < l && f < r && !((c = k.get(t[f])) == null || c !== $ +
|
|
260
|
-
|
|
261
|
-
if (
|
|
258
|
+
let f = o, p = 1, c;
|
|
259
|
+
for (; ++f < l && f < r && !((c = k.get(t[f])) == null || c !== $ + p); )
|
|
260
|
+
p++;
|
|
261
|
+
if (p > $ - s) {
|
|
262
262
|
const d = t[o];
|
|
263
263
|
for (; s < $; ) e.insertBefore(n[s++], d);
|
|
264
264
|
} else e.replaceChild(n[s++], t[o++]);
|
|
@@ -267,7 +267,7 @@ function be(e, t, n) {
|
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
const
|
|
270
|
+
const Z = "_$DX_DELEGATE";
|
|
271
271
|
function m(e, t, n, i) {
|
|
272
272
|
let l;
|
|
273
273
|
const r = () => {
|
|
@@ -276,21 +276,21 @@ function m(e, t, n, i) {
|
|
|
276
276
|
}, o = () => (l || (l = r())).cloneNode(!0);
|
|
277
277
|
return o.cloneNode = o, o;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
280
|
-
const n = t[
|
|
279
|
+
function X(e, t = window.document) {
|
|
280
|
+
const n = t[Z] || (t[Z] = /* @__PURE__ */ new Set());
|
|
281
281
|
for (let i = 0, l = e.length; i < l; i++) {
|
|
282
282
|
const r = e[i];
|
|
283
|
-
n.has(r) || (n.add(r), t.addEventListener(r,
|
|
283
|
+
n.has(r) || (n.add(r), t.addEventListener(r, Ie));
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function be(e, t) {
|
|
287
287
|
t == null ? e.removeAttribute("class") : e.className = t;
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
if (n !== void 0 && !i && (i = []), typeof t != "function") return
|
|
291
|
-
|
|
289
|
+
function g(e, t, n, i) {
|
|
290
|
+
if (n !== void 0 && !i && (i = []), typeof t != "function") return j(e, t, i, n);
|
|
291
|
+
P((l) => j(e, t(), l, n), i);
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Ie(e) {
|
|
294
294
|
let t = e.target;
|
|
295
295
|
const n = `$$${e.type}`, i = e.target, l = e.currentTarget, r = (a) => Object.defineProperty(e, "target", {
|
|
296
296
|
configurable: !0,
|
|
@@ -324,7 +324,7 @@ function ve(e) {
|
|
|
324
324
|
} else s();
|
|
325
325
|
r(i);
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function j(e, t, n, i, l) {
|
|
328
328
|
for (; typeof n == "function"; ) n = n();
|
|
329
329
|
if (t === n) return n;
|
|
330
330
|
const r = typeof t, o = i !== void 0;
|
|
@@ -333,48 +333,48 @@ function U(e, t, n, i, l) {
|
|
|
333
333
|
return n;
|
|
334
334
|
if (o) {
|
|
335
335
|
let s = n[0];
|
|
336
|
-
s && s.nodeType === 3 ? s.data !== t && (s.data = t) : s = document.createTextNode(t), n =
|
|
336
|
+
s && s.nodeType === 3 ? s.data !== t && (s.data = t) : s = document.createTextNode(t), n = x(e, n, i, s);
|
|
337
337
|
} else
|
|
338
338
|
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
339
339
|
} else if (t == null || r === "boolean")
|
|
340
|
-
n =
|
|
340
|
+
n = x(e, n, i);
|
|
341
341
|
else {
|
|
342
342
|
if (r === "function")
|
|
343
|
-
return
|
|
343
|
+
return P(() => {
|
|
344
344
|
let s = t();
|
|
345
345
|
for (; typeof s == "function"; ) s = s();
|
|
346
|
-
n =
|
|
346
|
+
n = j(e, s, n, i);
|
|
347
347
|
}), () => n;
|
|
348
348
|
if (Array.isArray(t)) {
|
|
349
349
|
const s = [], a = n && Array.isArray(n);
|
|
350
|
-
if (
|
|
351
|
-
return
|
|
350
|
+
if (G(s, t, n, l))
|
|
351
|
+
return P(() => n = j(e, s, n, i, !0)), () => n;
|
|
352
352
|
if (s.length === 0) {
|
|
353
|
-
if (n =
|
|
354
|
-
} else a ? n.length === 0 ?
|
|
353
|
+
if (n = x(e, n, i), o) return n;
|
|
354
|
+
} else a ? n.length === 0 ? z(e, s, i) : Le(e, n, s) : (n && x(e), z(e, s));
|
|
355
355
|
n = s;
|
|
356
356
|
} else if (t.nodeType) {
|
|
357
357
|
if (Array.isArray(n)) {
|
|
358
|
-
if (o) return n =
|
|
359
|
-
|
|
358
|
+
if (o) return n = x(e, n, i, t);
|
|
359
|
+
x(e, n, null, t);
|
|
360
360
|
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
361
361
|
n = t;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
return n;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function G(e, t, n, i) {
|
|
367
367
|
let l = !1;
|
|
368
368
|
for (let r = 0, o = t.length; r < o; r++) {
|
|
369
369
|
let s = t[r], a = n && n[e.length], k;
|
|
370
370
|
if (!(s == null || s === !0 || s === !1)) if ((k = typeof s) == "object" && s.nodeType)
|
|
371
371
|
e.push(s);
|
|
372
372
|
else if (Array.isArray(s))
|
|
373
|
-
l =
|
|
373
|
+
l = G(e, s, a) || l;
|
|
374
374
|
else if (k === "function")
|
|
375
375
|
if (i) {
|
|
376
376
|
for (; typeof s == "function"; ) s = s();
|
|
377
|
-
l =
|
|
377
|
+
l = G(e, Array.isArray(s) ? s : [s], Array.isArray(a) ? a : [a]) || l;
|
|
378
378
|
} else
|
|
379
379
|
e.push(s), l = !0;
|
|
380
380
|
else {
|
|
@@ -384,10 +384,10 @@ function F(e, t, n, i) {
|
|
|
384
384
|
}
|
|
385
385
|
return l;
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function z(e, t, n = null) {
|
|
388
388
|
for (let i = 0, l = t.length; i < l; i++) e.insertBefore(t[i], n);
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function x(e, t, n, i) {
|
|
391
391
|
if (n === void 0) return e.textContent = "";
|
|
392
392
|
const l = i || document.createTextNode("");
|
|
393
393
|
if (t.length) {
|
|
@@ -402,21 +402,23 @@ function P(e, t, n, i) {
|
|
|
402
402
|
} else e.insertBefore(l, n);
|
|
403
403
|
return [l];
|
|
404
404
|
}
|
|
405
|
-
const
|
|
406
|
-
|
|
405
|
+
const ue = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m12 19-7-7 7-7"/><path d="M19 12H5"/></svg>
|
|
406
|
+
`, q = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/></svg>
|
|
407
|
+
`, fe = (e) => e != null && (e = Object.getPrototypeOf(e), e === Array.prototype || e === Object.prototype);
|
|
408
|
+
function de(e, t, n) {
|
|
407
409
|
for (const [i, l] of Object.entries(t)) {
|
|
408
410
|
const r = `${n}.${i}`;
|
|
409
|
-
e[r] = l,
|
|
411
|
+
e[r] = l, fe(l) && de(e, l, r);
|
|
410
412
|
}
|
|
411
413
|
}
|
|
412
|
-
function
|
|
414
|
+
function _e(e) {
|
|
413
415
|
const t = { ...e };
|
|
414
416
|
for (const [n, i] of Object.entries(e))
|
|
415
|
-
|
|
417
|
+
fe(i) && de(t, i, n);
|
|
416
418
|
return t;
|
|
417
419
|
}
|
|
418
|
-
const
|
|
419
|
-
function
|
|
420
|
+
const Ee = ((e) => e);
|
|
421
|
+
function Se(e, t = Ee) {
|
|
420
422
|
return (n, ...i) => {
|
|
421
423
|
n[0] === "." && (n = n.slice(1));
|
|
422
424
|
const l = e()?.[n];
|
|
@@ -430,79 +432,81 @@ function _e(e, t = we) {
|
|
|
430
432
|
}
|
|
431
433
|
};
|
|
432
434
|
}
|
|
433
|
-
const
|
|
434
|
-
InternalLink: Ie
|
|
435
|
-
}, Se = { insertLink: "Insert link", change: "Change", editor: { noResult: "No results found", draft: "Draft", published: "Published", sheduled: "Sheduled" }, dialog: { title: "Insert an internal link", removeLink: "Remove link", changeLink: "Find another link", ok: "OK" } }, Pe = {
|
|
436
|
-
InternalLink: Se
|
|
437
|
-
}, De = { insertLink: "Insertar enlace", change: "Cambiar", editor: { noResult: "No se encontraron resultados", draft: "Borrador", published: "Publicado", sheduled: "Programado" }, dialog: { title: "Insertar un enlace interno", removeLink: "Eliminar enlace", changeLink: "Encontrar otro enlace", ok: "OK" } }, Ce = {
|
|
438
|
-
InternalLink: De
|
|
439
|
-
}, Ae = { 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" } }, Ne = {
|
|
440
|
-
InternalLink: Ae
|
|
441
|
-
}, xe = { insertLink: "Inserisci link", change: "Cambia", editor: { noResult: "Nessun risultato trovato", draft: "Bozza", published: "Pubblicato", sheduled: "Programmato" }, dialog: { title: "Inserisci un link interno", removeLink: "Rimuovi link", changeLink: "Trova un altro link", ok: "OK" } }, Be = {
|
|
435
|
+
const xe = { insertLink: "Link einfügen", change: "Ändern", editor: { noResult: "Keine Ergebnisse gefunden", draft: "Entwurf", published: "Veröffentlicht", sheduled: "Geplant" }, dialog: { title: "Einen internen Link einfügen", removeLink: "Link entfernen", changeLink: "Einen anderen Link finden", ok: "OK" } }, De = {
|
|
442
436
|
InternalLink: xe
|
|
443
|
-
},
|
|
444
|
-
InternalLink:
|
|
445
|
-
},
|
|
446
|
-
|
|
437
|
+
}, Pe = { insertLink: "Insert link", change: "Change", editor: { noResult: "No results found", draft: "Draft", published: "Published", sheduled: "Sheduled" }, dialog: { title: "Insert an internal link", removeLink: "Remove link", changeLink: "Find another link", ok: "OK" } }, Ce = {
|
|
438
|
+
InternalLink: Pe
|
|
439
|
+
}, Ae = { insertLink: "Insertar enlace", change: "Cambiar", editor: { noResult: "No se encontraron resultados", draft: "Borrador", published: "Publicado", sheduled: "Programado" }, dialog: { title: "Insertar un enlace interno", removeLink: "Eliminar enlace", changeLink: "Encontrar otro enlace", ok: "OK" } }, Te = {
|
|
440
|
+
InternalLink: Ae
|
|
441
|
+
}, Ne = { 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" } }, Be = {
|
|
442
|
+
InternalLink: Ne
|
|
443
|
+
}, Oe = { insertLink: "Inserisci link", change: "Cambia", editor: { noResult: "Nessun risultato trovato", draft: "Bozza", published: "Pubblicato", sheduled: "Programmato" }, dialog: { title: "Inserisci un link interno", removeLink: "Rimuovi link", changeLink: "Trova un altro link", ok: "OK" } }, Re = {
|
|
444
|
+
InternalLink: Oe
|
|
445
|
+
}, Me = { insertLink: "Inserir link", change: "Alterar", editor: { noResult: "Nenhum resultado encontrado", draft: "Rascunho", published: "Publicado", sheduled: "Agendado" }, dialog: { title: "Inserir um link interno", removeLink: "Remover link", changeLink: "Encontrar outro link", ok: "OK" } }, Ve = {
|
|
446
|
+
InternalLink: Me
|
|
447
|
+
}, ee = { en: Ce, fr: Be, es: Te, de: De, it: Re, pt: Ve };
|
|
448
|
+
function J(e) {
|
|
447
449
|
const t = D(() => {
|
|
448
|
-
const i = e(), l = i in
|
|
449
|
-
return
|
|
450
|
+
const i = e(), l = i in ee ? i : "en";
|
|
451
|
+
return _e(ee[l]);
|
|
450
452
|
});
|
|
451
|
-
return { t:
|
|
453
|
+
return { t: Se(t) };
|
|
452
454
|
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
+
const He = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/></svg>
|
|
456
|
+
`;
|
|
457
|
+
var je = /* @__PURE__ */ m("<div class=ILResult>"), Ue = /* @__PURE__ */ m("<div class=ILNoResult><span class=ILNoResult-message></span><span>"), Ke = /* @__PURE__ */ m("<div class=InternalLinkEditor><form class=ILForm><input class=InternalLinkEditor-input type=text placeholder=Search>"), Fe = /* @__PURE__ */ m("<div class=ILResultItem><div class=ILResultItem-title></div><span>");
|
|
458
|
+
function he(e) {
|
|
455
459
|
const {
|
|
456
460
|
value: t,
|
|
457
461
|
setValue: n,
|
|
458
462
|
service: i
|
|
459
463
|
} = e, [l, r] = E(""), [o, s] = E([]), {
|
|
460
464
|
t: a
|
|
461
|
-
} =
|
|
462
|
-
|
|
465
|
+
} = J(e.language);
|
|
466
|
+
Q(async () => {
|
|
463
467
|
const f = t();
|
|
464
468
|
if (!f) return;
|
|
465
|
-
const
|
|
466
|
-
r(
|
|
469
|
+
const p = await i.getDocument(f);
|
|
470
|
+
r(p?.title ?? ""), await k();
|
|
467
471
|
});
|
|
468
472
|
const k = async (f) => {
|
|
469
473
|
if (f?.preventDefault(), l().length < 2) return;
|
|
470
|
-
const
|
|
474
|
+
const p = await i.searchDocuments({
|
|
471
475
|
searchString: l()
|
|
472
476
|
});
|
|
473
|
-
s(
|
|
477
|
+
s(p);
|
|
474
478
|
}, $ = (f) => f && new Date(f).getTime() < Date.now();
|
|
475
479
|
return (() => {
|
|
476
|
-
var f =
|
|
477
|
-
return
|
|
480
|
+
var f = Ke(), p = f.firstChild, c = p.firstChild;
|
|
481
|
+
return p.addEventListener("submit", k), c.$$input = (d) => r(d.currentTarget.value), g(f, T(Y, {
|
|
478
482
|
when: o,
|
|
479
483
|
get children() {
|
|
480
|
-
var d =
|
|
481
|
-
return
|
|
482
|
-
var h =
|
|
484
|
+
var d = je();
|
|
485
|
+
return g(d, () => o().map((u) => (() => {
|
|
486
|
+
var h = Fe(), L = h.firstChild, b = L.nextSibling;
|
|
483
487
|
return h.$$click = () => {
|
|
484
488
|
n(u.id);
|
|
485
|
-
},
|
|
486
|
-
var O =
|
|
487
|
-
return () => O() ?
|
|
488
|
-
})()),
|
|
489
|
+
}, g(L, () => u.title), g(b, (() => {
|
|
490
|
+
var O = I(() => !!u.ready);
|
|
491
|
+
return () => O() ? I(() => !!$(u.publishDate))() ? a("InternalLink.editor.published") : a("InternalLink.editor.sheduled") : a("InternalLink.editor.draft");
|
|
492
|
+
})()), P(() => be(b, `ILResultItem-status
|
|
489
493
|
${u.ready ? $(u.publishDate) ? "published" : "sheduled" : "draft"}`)), h;
|
|
490
494
|
})())), d;
|
|
491
495
|
}
|
|
492
|
-
}), null),
|
|
496
|
+
}), null), g(f, T(Y, {
|
|
493
497
|
get when() {
|
|
494
498
|
return !o() || o().length === 0;
|
|
495
499
|
},
|
|
496
500
|
get children() {
|
|
497
|
-
var d =
|
|
498
|
-
return
|
|
501
|
+
var d = Ue(), u = d.firstChild, h = u.nextSibling;
|
|
502
|
+
return g(u, () => a("InternalLink.editor.noResult")), h.innerHTML = He, d;
|
|
499
503
|
}
|
|
500
|
-
}), null),
|
|
504
|
+
}), null), P(() => c.value = l()), f;
|
|
501
505
|
})();
|
|
502
506
|
}
|
|
503
|
-
|
|
504
|
-
var
|
|
505
|
-
function
|
|
507
|
+
X(["input", "click"]);
|
|
508
|
+
var Ge = /* @__PURE__ */ m("<div class=InternalLinkDialog-header><span class=InternalLinkDialog-title>"), F = /* @__PURE__ */ m("<button class=PlgBtn type=button>"), qe = /* @__PURE__ */ m("<div class=InternalLinkDialog-content>"), Qe = /* @__PURE__ */ m('<div class=ILPreview><div class=ILPreview-title></div><button class="PlgBtn outlined iconBtn"type=button>'), te = /* @__PURE__ */ m("<div>"), We = /* @__PURE__ */ m('<div><button class="PlgBtn primary"type=button>'), Xe = /* @__PURE__ */ m('<button type=button class="PlgBtn danger outlined">'), Je = /* @__PURE__ */ m('<button class="PlgBtn primary"type=button>'), Ye = /* @__PURE__ */ m('<div class=InternalLinkDialog-linkPreview><div></div><button class="PlgBtn iconBtn"type=button>');
|
|
509
|
+
function Ze({
|
|
506
510
|
service: e,
|
|
507
511
|
setValue: t,
|
|
508
512
|
value: n,
|
|
@@ -510,8 +514,8 @@ function Xe({
|
|
|
510
514
|
}) {
|
|
511
515
|
const {
|
|
512
516
|
t: l
|
|
513
|
-
} =
|
|
514
|
-
|
|
517
|
+
} = J(i), [r, o] = E(), [s, a] = E(!!n());
|
|
518
|
+
Q(async () => {
|
|
515
519
|
const c = n();
|
|
516
520
|
if (!c) return;
|
|
517
521
|
const d = await e.getDocument(c);
|
|
@@ -526,149 +530,149 @@ function Xe({
|
|
|
526
530
|
});
|
|
527
531
|
});
|
|
528
532
|
const k = (() => {
|
|
529
|
-
var c =
|
|
530
|
-
return
|
|
531
|
-
var u =
|
|
533
|
+
var c = Ge(), d = c.firstChild;
|
|
534
|
+
return g(c, (() => {
|
|
535
|
+
var u = I(() => !!(n() && !s()));
|
|
532
536
|
return () => u() && (() => {
|
|
533
|
-
var h =
|
|
537
|
+
var h = F();
|
|
534
538
|
return h.$$click = () => {
|
|
535
539
|
a(!0);
|
|
536
|
-
}, h;
|
|
540
|
+
}, h.innerHTML = ue, h;
|
|
537
541
|
})();
|
|
538
|
-
})(), d),
|
|
542
|
+
})(), d), g(d, () => l("InternalLink.dialog.title")), c;
|
|
539
543
|
})(), $ = (() => {
|
|
540
|
-
var c =
|
|
541
|
-
return
|
|
542
|
-
var d =
|
|
544
|
+
var c = qe();
|
|
545
|
+
return g(c, (() => {
|
|
546
|
+
var d = I(() => !!(s() && n()));
|
|
543
547
|
return () => d() ? (() => {
|
|
544
|
-
var u =
|
|
545
|
-
return
|
|
546
|
-
const
|
|
547
|
-
!
|
|
548
|
-
}, u;
|
|
549
|
-
})() :
|
|
548
|
+
var u = Qe(), h = u.firstChild, L = h.nextSibling;
|
|
549
|
+
return g(h, () => r()?.title), L.$$click = () => {
|
|
550
|
+
const b = n(), O = r()?.typeName;
|
|
551
|
+
!b || !O || (p.close(), e.openDocumentEdition(b, O));
|
|
552
|
+
}, L.innerHTML = q, u;
|
|
553
|
+
})() : T(he, {
|
|
550
554
|
service: e,
|
|
551
555
|
language: i,
|
|
552
556
|
value: n,
|
|
553
557
|
setValue: (u) => {
|
|
554
|
-
t(u), a(!0),
|
|
558
|
+
t(u), a(!0), p.hide();
|
|
555
559
|
}
|
|
556
560
|
});
|
|
557
561
|
})()), c;
|
|
558
562
|
})(), f = (() => {
|
|
559
|
-
var c =
|
|
560
|
-
return
|
|
561
|
-
var d =
|
|
563
|
+
var c = te();
|
|
564
|
+
return g(c, (() => {
|
|
565
|
+
var d = I(() => !!s());
|
|
562
566
|
return () => d() ? (() => {
|
|
563
|
-
var u =
|
|
564
|
-
return
|
|
565
|
-
var
|
|
566
|
-
return () =>
|
|
567
|
-
var
|
|
568
|
-
return
|
|
569
|
-
t(void 0),
|
|
570
|
-
},
|
|
567
|
+
var u = We(), h = u.firstChild;
|
|
568
|
+
return g(u, (() => {
|
|
569
|
+
var L = I(() => !!n());
|
|
570
|
+
return () => L() && [(() => {
|
|
571
|
+
var b = Xe();
|
|
572
|
+
return b.$$click = () => {
|
|
573
|
+
t(void 0), p.hide();
|
|
574
|
+
}, g(b, () => l("InternalLink.dialog.removeLink")), b;
|
|
571
575
|
})(), (() => {
|
|
572
|
-
var
|
|
573
|
-
return
|
|
576
|
+
var b = F();
|
|
577
|
+
return b.$$click = () => a(!1), g(b, () => l("InternalLink.dialog.changeLink")), b;
|
|
574
578
|
})()];
|
|
575
579
|
})(), h), h.$$click = () => {
|
|
576
|
-
|
|
577
|
-
},
|
|
580
|
+
p.hide();
|
|
581
|
+
}, g(h, () => l("InternalLink.dialog.ok")), u;
|
|
578
582
|
})() : (() => {
|
|
579
|
-
var u =
|
|
583
|
+
var u = Je();
|
|
580
584
|
return u.$$click = () => {
|
|
581
|
-
|
|
582
|
-
},
|
|
585
|
+
p.hide();
|
|
586
|
+
}, g(u, () => l("InternalLink.dialog.ok")), u;
|
|
583
587
|
})();
|
|
584
588
|
})()), c;
|
|
585
|
-
})(),
|
|
589
|
+
})(), p = e.createModalDialog({
|
|
586
590
|
content: $,
|
|
587
591
|
footer: f,
|
|
588
592
|
header: k
|
|
589
593
|
});
|
|
590
594
|
return (() => {
|
|
591
|
-
var c =
|
|
592
|
-
return
|
|
593
|
-
var d =
|
|
595
|
+
var c = te();
|
|
596
|
+
return g(c, (() => {
|
|
597
|
+
var d = I(() => !!n());
|
|
594
598
|
return () => d() ? (() => {
|
|
595
|
-
var u =
|
|
596
|
-
return
|
|
599
|
+
var u = Ye(), h = u.firstChild, L = h.nextSibling;
|
|
600
|
+
return g(h, () => r()?.title), L.$$click = () => p.show(), L.innerHTML = q, u;
|
|
597
601
|
})() : (() => {
|
|
598
|
-
var u =
|
|
599
|
-
return u.$$click = () =>
|
|
602
|
+
var u = F();
|
|
603
|
+
return u.$$click = () => p.show(), g(u, () => l("InternalLink.insertLink")), u;
|
|
600
604
|
})();
|
|
601
605
|
})()), c;
|
|
602
606
|
})();
|
|
603
607
|
}
|
|
604
|
-
|
|
605
|
-
var
|
|
606
|
-
async function
|
|
608
|
+
X(["click"]);
|
|
609
|
+
var ze = /* @__PURE__ */ m("<div class=InternalLinkDialog-header><span class=InternalLinkDialog-title>"), ne = /* @__PURE__ */ m("<button class=PlgBtn type=button>"), et = /* @__PURE__ */ m("<div>"), tt = /* @__PURE__ */ m('<div><button class="PlgBtn primary"type=button>'), nt = /* @__PURE__ */ m('<button type=button class="PlgBtn danger outlined">'), it = /* @__PURE__ */ m('<button class="PlgBtn primary"type=button>'), lt = /* @__PURE__ */ m("<div class=InternalLinkDialog-content>"), rt = /* @__PURE__ */ m('<div class=ILPreview><div class=ILPreview-title></div><button class="PlgBtn outlined iconBtn"type=button>');
|
|
610
|
+
async function st({
|
|
607
611
|
value: e,
|
|
608
612
|
getLanguage: t,
|
|
609
613
|
service: n
|
|
610
614
|
}) {
|
|
611
615
|
const [i, l] = E(), {
|
|
612
616
|
t: r
|
|
613
|
-
} =
|
|
614
|
-
|
|
617
|
+
} = J(t), [o, s] = E(!!e());
|
|
618
|
+
Q(async () => {
|
|
615
619
|
const f = e();
|
|
616
620
|
if (!f) return;
|
|
617
|
-
const
|
|
618
|
-
if (!
|
|
621
|
+
const p = await n.getDocument(f);
|
|
622
|
+
if (!p) return;
|
|
619
623
|
const {
|
|
620
624
|
title: c,
|
|
621
625
|
typeName: d
|
|
622
|
-
} =
|
|
626
|
+
} = p;
|
|
623
627
|
l({
|
|
624
628
|
title: c,
|
|
625
629
|
typeName: d
|
|
626
630
|
});
|
|
627
631
|
});
|
|
628
632
|
const a = (() => {
|
|
629
|
-
var f =
|
|
630
|
-
return
|
|
631
|
-
var c =
|
|
633
|
+
var f = ze(), p = f.firstChild;
|
|
634
|
+
return g(f, (() => {
|
|
635
|
+
var c = I(() => !!(e() && !o()));
|
|
632
636
|
return () => c() && (() => {
|
|
633
|
-
var d =
|
|
637
|
+
var d = ne();
|
|
634
638
|
return d.$$click = () => {
|
|
635
639
|
s(!0);
|
|
636
|
-
}, d;
|
|
640
|
+
}, d.innerHTML = ue, d;
|
|
637
641
|
})();
|
|
638
|
-
})(),
|
|
642
|
+
})(), p), g(p, () => r("InternalLink.dialog.title")), f;
|
|
639
643
|
})(), k = (() => {
|
|
640
|
-
var f =
|
|
641
|
-
return
|
|
642
|
-
var
|
|
643
|
-
return () =>
|
|
644
|
-
var c =
|
|
645
|
-
return
|
|
646
|
-
var u =
|
|
644
|
+
var f = et();
|
|
645
|
+
return g(f, (() => {
|
|
646
|
+
var p = I(() => !!o());
|
|
647
|
+
return () => p() ? (() => {
|
|
648
|
+
var c = tt(), d = c.firstChild;
|
|
649
|
+
return g(c, (() => {
|
|
650
|
+
var u = I(() => !!e());
|
|
647
651
|
return () => u() && [(() => {
|
|
648
|
-
var h =
|
|
649
|
-
return h.$$click = () => $.close("remove"),
|
|
652
|
+
var h = nt();
|
|
653
|
+
return h.$$click = () => $.close("remove"), g(h, () => r("InternalLink.dialog.removeLink")), h;
|
|
650
654
|
})(), (() => {
|
|
651
|
-
var h =
|
|
652
|
-
return h.$$click = () => s(!1),
|
|
655
|
+
var h = ne();
|
|
656
|
+
return h.$$click = () => s(!1), g(h, () => r("InternalLink.dialog.changeLink")), h;
|
|
653
657
|
})()];
|
|
654
|
-
})(), d), d.$$click = () => $.close(),
|
|
658
|
+
})(), d), d.$$click = () => $.close(), g(d, () => r("InternalLink.dialog.ok")), c;
|
|
655
659
|
})() : (() => {
|
|
656
|
-
var c =
|
|
657
|
-
return c.$$click = () => $.close(),
|
|
660
|
+
var c = it();
|
|
661
|
+
return c.$$click = () => $.close(), g(c, () => r("InternalLink.dialog.ok")), c;
|
|
658
662
|
})();
|
|
659
663
|
})()), f;
|
|
660
664
|
})(), $ = n.createModalDialog({
|
|
661
665
|
content: (() => {
|
|
662
|
-
var f =
|
|
663
|
-
return
|
|
664
|
-
var
|
|
665
|
-
return () =>
|
|
666
|
-
var c =
|
|
667
|
-
return
|
|
668
|
-
const h = e(),
|
|
669
|
-
!h || !
|
|
670
|
-
}, c;
|
|
671
|
-
})() :
|
|
666
|
+
var f = lt();
|
|
667
|
+
return g(f, (() => {
|
|
668
|
+
var p = I(() => !!(o() && e()));
|
|
669
|
+
return () => p() ? (() => {
|
|
670
|
+
var c = rt(), d = c.firstChild, u = d.nextSibling;
|
|
671
|
+
return g(d, () => i()?.title), u.$$click = () => {
|
|
672
|
+
const h = e(), L = i()?.typeName;
|
|
673
|
+
!h || !L || ($.close(), n.openDocumentEdition(h, L));
|
|
674
|
+
}, u.innerHTML = q, c;
|
|
675
|
+
})() : T(he, {
|
|
672
676
|
service: n,
|
|
673
677
|
language: t,
|
|
674
678
|
value: e,
|
|
@@ -681,23 +685,23 @@ async function rt({
|
|
|
681
685
|
});
|
|
682
686
|
return await $.open();
|
|
683
687
|
}
|
|
684
|
-
|
|
685
|
-
const
|
|
686
|
-
create:
|
|
687
|
-
init:
|
|
688
|
+
X(["click"]);
|
|
689
|
+
const ft = {
|
|
690
|
+
create: ut,
|
|
691
|
+
init: ct
|
|
688
692
|
};
|
|
689
|
-
function
|
|
693
|
+
function ot(e) {
|
|
690
694
|
e.executeHook("htmlEditorServiceProvider").forEach((n) => {
|
|
691
|
-
n.registerInternalLinkPlugin(
|
|
695
|
+
n.registerInternalLinkPlugin(at(e));
|
|
692
696
|
});
|
|
693
697
|
}
|
|
694
|
-
function
|
|
698
|
+
function at(e) {
|
|
695
699
|
return {
|
|
696
700
|
async getDocumentTitle(t) {
|
|
697
701
|
return (await e.getDocument(t))?.title;
|
|
698
702
|
},
|
|
699
703
|
async openDialog(t, n) {
|
|
700
|
-
const i = await
|
|
704
|
+
const i = await st({
|
|
701
705
|
value: () => t,
|
|
702
706
|
getLanguage: n.getLanguage,
|
|
703
707
|
service: e
|
|
@@ -711,14 +715,14 @@ function ot(e) {
|
|
|
711
715
|
}
|
|
712
716
|
};
|
|
713
717
|
}
|
|
714
|
-
function
|
|
718
|
+
function ct({
|
|
715
719
|
pluginBaseUrl: e,
|
|
716
720
|
addAfterInitListener: t
|
|
717
721
|
}) {
|
|
718
722
|
const n = `${e}/admin-ui-plugin.css`, i = document.createElement("link");
|
|
719
|
-
i.rel = "stylesheet", i.href = n, document.head.appendChild(i), t(
|
|
723
|
+
i.rel = "stylesheet", i.href = n, document.head.appendChild(i), t(ot);
|
|
720
724
|
}
|
|
721
|
-
function
|
|
725
|
+
function ut(e) {
|
|
722
726
|
const {
|
|
723
727
|
fieldType: t,
|
|
724
728
|
initialValue: n
|
|
@@ -727,10 +731,10 @@ function ct(e) {
|
|
|
727
731
|
throw new Error(`field type '${t.name}' is incompatible with internal-link plugin, needs data type 'string'`);
|
|
728
732
|
if (n !== void 0 && typeof n != "string")
|
|
729
733
|
throw new Error(`field type '${t.name}' is incompatible, should be a string, got '${typeof n}'`);
|
|
730
|
-
return
|
|
734
|
+
return $e((i) => {
|
|
731
735
|
const [l, r] = E(n ?? ""), [o, s] = E(e.language);
|
|
732
736
|
return {
|
|
733
|
-
element:
|
|
737
|
+
element: T(Ze, {
|
|
734
738
|
language: o,
|
|
735
739
|
value: l,
|
|
736
740
|
setValue: (a) => {
|
|
@@ -748,5 +752,5 @@ function ct(e) {
|
|
|
748
752
|
});
|
|
749
753
|
}
|
|
750
754
|
export {
|
|
751
|
-
|
|
755
|
+
ft as default
|
|
752
756
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paroicms/internal-link-plugin",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.10",
|
|
4
4
|
"description": "Internal link plugin for ParoiCMS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"paroicms",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"build:admin-ui:watch": "(cd admin-ui-plugin && npm run build:watch)"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@paroicms/script-lib": "0.3.
|
|
27
|
+
"@paroicms/script-lib": "0.3.12",
|
|
28
28
|
"arktype": "~2.1.27"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@paroicms/public-anywhere-lib": "0.41.0",
|
|
36
|
-
"@paroicms/public-server-lib": "0.
|
|
36
|
+
"@paroicms/public-server-lib": "0.50.0",
|
|
37
37
|
"@types/node": "~24.10.1",
|
|
38
38
|
"rimraf": "~6.1.2",
|
|
39
39
|
"typescript": "~5.9.3"
|