@paroicms/list-field-plugin 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bo-front/dist/bo-plugin.mjs +108 -118
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
const
|
|
2
|
-
equals:
|
|
1
|
+
const ie = (e, n) => e === n, oe = Symbol("solid-track"), C = {
|
|
2
|
+
equals: ie
|
|
3
3
|
};
|
|
4
|
-
let
|
|
5
|
-
const y = 1, F = 2,
|
|
4
|
+
let q = Y;
|
|
5
|
+
const y = 1, F = 2, Q = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
8
8
|
context: null,
|
|
9
9
|
owner: null
|
|
10
10
|
};
|
|
11
11
|
var h = null;
|
|
12
|
-
let j = null,
|
|
12
|
+
let j = null, re = null, a = null, d = null, g = null, O = 0;
|
|
13
13
|
function N(e, n) {
|
|
14
|
-
const t = a, s = h, l = e.length === 0, i = s, r = l ?
|
|
14
|
+
const t = a, s = h, l = e.length === 0, i = s, r = l ? Q : {
|
|
15
15
|
owned: null,
|
|
16
16
|
cleanups: null,
|
|
17
17
|
context: i ? i.context : null,
|
|
@@ -31,22 +31,22 @@ function S(e, n) {
|
|
|
31
31
|
observers: null,
|
|
32
32
|
observerSlots: null,
|
|
33
33
|
comparator: n.equals || void 0
|
|
34
|
-
}, s = (l) => (typeof l == "function" && (l = l(t.value)),
|
|
35
|
-
return [
|
|
34
|
+
}, s = (l) => (typeof l == "function" && (l = l(t.value)), J(t, l));
|
|
35
|
+
return [X.bind(t), s];
|
|
36
36
|
}
|
|
37
37
|
function $(e, n, t) {
|
|
38
38
|
const s = U(e, n, !1, y);
|
|
39
39
|
A(s);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
41
|
+
function ue(e, n, t) {
|
|
42
|
+
q = he;
|
|
43
43
|
const s = U(e, n, !1, y);
|
|
44
44
|
s.user = !0, g ? g.push(s) : A(s);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function W(e, n, t) {
|
|
47
47
|
t = t ? Object.assign({}, C, t) : C;
|
|
48
48
|
const s = U(e, n, !0, 0);
|
|
49
|
-
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, A(s),
|
|
49
|
+
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, A(s), X.bind(s);
|
|
50
50
|
}
|
|
51
51
|
function m(e) {
|
|
52
52
|
if (a === null) return e();
|
|
@@ -58,13 +58,13 @@ function m(e) {
|
|
|
58
58
|
a = n;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
|
|
61
|
+
function fe(e) {
|
|
62
|
+
ue(() => m(e));
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function ce(e) {
|
|
65
65
|
return h === null || (h.cleanups === null ? h.cleanups = [e] : h.cleanups.push(e)), e;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function X() {
|
|
68
68
|
if (this.sources && this.state)
|
|
69
69
|
if (this.state === y) A(this);
|
|
70
70
|
else {
|
|
@@ -77,12 +77,12 @@ function J() {
|
|
|
77
77
|
}
|
|
78
78
|
return this.value;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function J(e, n, t) {
|
|
81
81
|
let s = e.value;
|
|
82
82
|
return (!e.comparator || !e.comparator(s, n)) && (e.value = n, e.observers && e.observers.length && L(() => {
|
|
83
83
|
for (let l = 0; l < e.observers.length; l += 1) {
|
|
84
84
|
const i = e.observers[l], r = j && j.running;
|
|
85
|
-
r && j.disposed.has(i), (r ? !i.tState : !i.state) && (i.pure ? d.push(i) : g.push(i), i.observers &&
|
|
85
|
+
r && j.disposed.has(i), (r ? !i.tState : !i.state) && (i.pure ? d.push(i) : g.push(i), i.observers && Z(i)), r || (i.state = y);
|
|
86
86
|
}
|
|
87
87
|
if (d.length > 1e6)
|
|
88
88
|
throw d = [], new Error();
|
|
@@ -91,25 +91,21 @@ function Y(e, n, t) {
|
|
|
91
91
|
function A(e) {
|
|
92
92
|
if (!e.fn) return;
|
|
93
93
|
B(e);
|
|
94
|
-
const n =
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
n
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
function pe(e, n, t) {
|
|
94
|
+
const n = O;
|
|
95
|
+
ae(e, e.value, n);
|
|
96
|
+
}
|
|
97
|
+
function ae(e, n, t) {
|
|
102
98
|
let s;
|
|
103
99
|
const l = h, i = a;
|
|
104
100
|
a = h = e;
|
|
105
101
|
try {
|
|
106
102
|
s = e.fn(n);
|
|
107
103
|
} catch (r) {
|
|
108
|
-
return e.pure && (e.state = y, e.owned && e.owned.forEach(B), e.owned = null), e.updatedAt = t + 1,
|
|
104
|
+
return e.pure && (e.state = y, e.owned && e.owned.forEach(B), e.owned = null), e.updatedAt = t + 1, z(r);
|
|
109
105
|
} finally {
|
|
110
106
|
a = i, h = l;
|
|
111
107
|
}
|
|
112
|
-
(!e.updatedAt || e.updatedAt <= t) && (e.updatedAt != null && "observers" in e ?
|
|
108
|
+
(!e.updatedAt || e.updatedAt <= t) && (e.updatedAt != null && "observers" in e ? J(e, s) : e.value = s, e.updatedAt = t);
|
|
113
109
|
}
|
|
114
110
|
function U(e, n, t, s = y, l) {
|
|
115
111
|
const i = {
|
|
@@ -125,14 +121,14 @@ function U(e, n, t, s = y, l) {
|
|
|
125
121
|
context: h ? h.context : null,
|
|
126
122
|
pure: t
|
|
127
123
|
};
|
|
128
|
-
return h === null || h !==
|
|
124
|
+
return h === null || h !== Q && (h.owned ? h.owned.push(i) : h.owned = [i]), i;
|
|
129
125
|
}
|
|
130
126
|
function I(e) {
|
|
131
127
|
if (e.state === 0) return;
|
|
132
128
|
if (e.state === F) return T(e);
|
|
133
129
|
if (e.suspense && m(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
134
130
|
const n = [e];
|
|
135
|
-
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt <
|
|
131
|
+
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < O); )
|
|
136
132
|
e.state && n.push(e);
|
|
137
133
|
for (let t = n.length - 1; t >= 0; t--)
|
|
138
134
|
if (e = n[t], e.state === y)
|
|
@@ -145,23 +141,23 @@ function I(e) {
|
|
|
145
141
|
function L(e, n) {
|
|
146
142
|
if (d) return e();
|
|
147
143
|
let t = !1;
|
|
148
|
-
n || (d = []), g ? t = !0 : g = [],
|
|
144
|
+
n || (d = []), g ? t = !0 : g = [], O++;
|
|
149
145
|
try {
|
|
150
146
|
const s = e();
|
|
151
|
-
return
|
|
147
|
+
return pe(t), s;
|
|
152
148
|
} catch (s) {
|
|
153
|
-
t || (g = null), d = null,
|
|
149
|
+
t || (g = null), d = null, z(s);
|
|
154
150
|
}
|
|
155
151
|
}
|
|
156
|
-
function
|
|
157
|
-
if (d && (
|
|
152
|
+
function pe(e) {
|
|
153
|
+
if (d && (Y(d), d = null), e) return;
|
|
158
154
|
const n = g;
|
|
159
|
-
g = null, n.length && L(() =>
|
|
155
|
+
g = null, n.length && L(() => q(n), !1);
|
|
160
156
|
}
|
|
161
|
-
function
|
|
157
|
+
function Y(e) {
|
|
162
158
|
for (let n = 0; n < e.length; n++) I(e[n]);
|
|
163
159
|
}
|
|
164
|
-
function
|
|
160
|
+
function he(e) {
|
|
165
161
|
let n, t = 0;
|
|
166
162
|
for (n = 0; n < e.length; n++) {
|
|
167
163
|
const s = e[n];
|
|
@@ -175,14 +171,14 @@ function T(e, n) {
|
|
|
175
171
|
const s = e.sources[t];
|
|
176
172
|
if (s.sources) {
|
|
177
173
|
const l = s.state;
|
|
178
|
-
l === y ? s !== n && (!s.updatedAt || s.updatedAt <
|
|
174
|
+
l === y ? s !== n && (!s.updatedAt || s.updatedAt < O) && I(s) : l === F && T(s, n);
|
|
179
175
|
}
|
|
180
176
|
}
|
|
181
177
|
}
|
|
182
|
-
function
|
|
178
|
+
function Z(e) {
|
|
183
179
|
for (let n = 0; n < e.observers.length; n += 1) {
|
|
184
180
|
const t = e.observers[n];
|
|
185
|
-
t.state || (t.state = F, t.pure ? d.push(t) : g.push(t), t.observers &&
|
|
181
|
+
t.state || (t.state = F, t.pure ? d.push(t) : g.push(t), t.observers && Z(t));
|
|
186
182
|
}
|
|
187
183
|
}
|
|
188
184
|
function B(e) {
|
|
@@ -205,23 +201,23 @@ function B(e) {
|
|
|
205
201
|
}
|
|
206
202
|
e.state = 0;
|
|
207
203
|
}
|
|
208
|
-
function
|
|
204
|
+
function de(e) {
|
|
209
205
|
return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
|
|
210
206
|
cause: e
|
|
211
207
|
});
|
|
212
208
|
}
|
|
213
|
-
function
|
|
214
|
-
throw
|
|
209
|
+
function z(e, n = h) {
|
|
210
|
+
throw de(e);
|
|
215
211
|
}
|
|
216
212
|
const P = Symbol("fallback");
|
|
217
213
|
function R(e) {
|
|
218
214
|
for (let n = 0; n < e.length; n++) e[n]();
|
|
219
215
|
}
|
|
220
|
-
function
|
|
216
|
+
function ge(e, n, t = {}) {
|
|
221
217
|
let s = [], l = [], i = [], r = [], o = 0, u;
|
|
222
|
-
return
|
|
218
|
+
return ce(() => R(i)), () => {
|
|
223
219
|
const f = e() || [], c = f.length;
|
|
224
|
-
return f[
|
|
220
|
+
return f[oe], m(() => {
|
|
225
221
|
if (c === 0)
|
|
226
222
|
return o !== 0 && (R(i), i = [], s = [], l = [], o = 0, r = []), t.fallback && (s = [P], l[0] = N((b) => (i[0] = b, t.fallback())), o = 1), l;
|
|
227
223
|
for (s[0] === P && (i[0](), i = [], s = [], l = [], o = 0), u = 0; u < c; u++)
|
|
@@ -240,13 +236,13 @@ function ye(e, n, t = {}) {
|
|
|
240
236
|
function _(e, n) {
|
|
241
237
|
return m(() => e(n || {}));
|
|
242
238
|
}
|
|
243
|
-
function
|
|
239
|
+
function ye(e) {
|
|
244
240
|
const n = "fallback" in e && {
|
|
245
241
|
fallback: () => e.fallback
|
|
246
242
|
};
|
|
247
|
-
return
|
|
243
|
+
return W(ge(() => e.each, e.children, n || void 0));
|
|
248
244
|
}
|
|
249
|
-
function
|
|
245
|
+
function be(e, n, t) {
|
|
250
246
|
let s = t.length, l = n.length, i = s, r = 0, o = 0, u = n[l - 1].nextSibling, f = null;
|
|
251
247
|
for (; r < l || o < i; ) {
|
|
252
248
|
if (n[r] === t[o]) {
|
|
@@ -294,27 +290,27 @@ function v(e, n, t) {
|
|
|
294
290
|
}, i = () => (s || (s = l())).cloneNode(!0);
|
|
295
291
|
return i.cloneNode = i, i;
|
|
296
292
|
}
|
|
297
|
-
function
|
|
293
|
+
function ee(e, n = window.document) {
|
|
298
294
|
const t = n[M] || (n[M] = /* @__PURE__ */ new Set());
|
|
299
295
|
for (let s = 0, l = e.length; s < l; s++) {
|
|
300
296
|
const i = e[s];
|
|
301
|
-
t.has(i) || (t.add(i), n.addEventListener(i,
|
|
297
|
+
t.has(i) || (t.add(i), n.addEventListener(i, $e));
|
|
302
298
|
}
|
|
303
299
|
}
|
|
304
|
-
function
|
|
300
|
+
function we(e, n, t) {
|
|
305
301
|
t == null ? e.removeAttribute(n) : e.setAttribute(n, t);
|
|
306
302
|
}
|
|
307
|
-
function
|
|
303
|
+
function me(e, n, t, s) {
|
|
308
304
|
Array.isArray(t) ? (e[`$$${n}`] = t[0], e[`$$${n}Data`] = t[1]) : e[`$$${n}`] = t;
|
|
309
305
|
}
|
|
310
|
-
function
|
|
306
|
+
function te(e, n, t) {
|
|
311
307
|
return m(() => e(n, t));
|
|
312
308
|
}
|
|
313
309
|
function x(e, n, t, s) {
|
|
314
|
-
if (t !== void 0 && !s && (s = []), typeof n != "function") return
|
|
315
|
-
$((l) =>
|
|
310
|
+
if (t !== void 0 && !s && (s = []), typeof n != "function") return k(e, n, s, t);
|
|
311
|
+
$((l) => k(e, n(), l, t), s);
|
|
316
312
|
}
|
|
317
|
-
function
|
|
313
|
+
function $e(e) {
|
|
318
314
|
const n = `$$${e.type}`;
|
|
319
315
|
let t = e.composedPath && e.composedPath()[0] || e.target;
|
|
320
316
|
for (e.target !== t && Object.defineProperty(e, "target", {
|
|
@@ -334,7 +330,7 @@ function Ae(e) {
|
|
|
334
330
|
t = t._$host || t.parentNode || t.host;
|
|
335
331
|
}
|
|
336
332
|
}
|
|
337
|
-
function
|
|
333
|
+
function k(e, n, t, s, l) {
|
|
338
334
|
for (; typeof t == "function"; ) t = t();
|
|
339
335
|
if (n === t) return t;
|
|
340
336
|
const i = typeof n, r = s !== void 0;
|
|
@@ -353,15 +349,15 @@ function O(e, n, t, s, l) {
|
|
|
353
349
|
return $(() => {
|
|
354
350
|
let o = n();
|
|
355
351
|
for (; typeof o == "function"; ) o = o();
|
|
356
|
-
t =
|
|
352
|
+
t = k(e, o, t, s);
|
|
357
353
|
}), () => t;
|
|
358
354
|
if (Array.isArray(n)) {
|
|
359
355
|
const o = [], u = t && Array.isArray(t);
|
|
360
356
|
if (V(o, n, t, l))
|
|
361
|
-
return $(() => t =
|
|
357
|
+
return $(() => t = k(e, o, t, s, !0)), () => t;
|
|
362
358
|
if (o.length === 0) {
|
|
363
359
|
if (t = w(e, t, s), r) return t;
|
|
364
|
-
} else u ? t.length === 0 ? G(e, o, s) :
|
|
360
|
+
} else u ? t.length === 0 ? G(e, o, s) : be(e, t, o) : (t && w(e), G(e, o));
|
|
365
361
|
t = o;
|
|
366
362
|
} else if (n.nodeType) {
|
|
367
363
|
if (Array.isArray(t)) {
|
|
@@ -384,11 +380,7 @@ function V(e, n, t, s) {
|
|
|
384
380
|
else if (f === "function")
|
|
385
381
|
if (s) {
|
|
386
382
|
for (; typeof o == "function"; ) o = o();
|
|
387
|
-
l = V(
|
|
388
|
-
e,
|
|
389
|
-
Array.isArray(o) ? o : [o],
|
|
390
|
-
Array.isArray(u) ? u : [u]
|
|
391
|
-
) || l;
|
|
383
|
+
l = V(e, Array.isArray(o) ? o : [o], Array.isArray(u) ? u : [u]) || l;
|
|
392
384
|
} else
|
|
393
385
|
e.push(o), l = !0;
|
|
394
386
|
else {
|
|
@@ -416,21 +408,21 @@ function w(e, n, t, s) {
|
|
|
416
408
|
} else e.insertBefore(l, t);
|
|
417
409
|
return [l];
|
|
418
410
|
}
|
|
419
|
-
var
|
|
420
|
-
function
|
|
411
|
+
var ne = (e) => e != null && (e = Object.getPrototypeOf(e), e === Array.prototype || e === Object.prototype);
|
|
412
|
+
function se(e, n, t) {
|
|
421
413
|
for (const [s, l] of Object.entries(n)) {
|
|
422
414
|
const i = `${t}.${s}`;
|
|
423
|
-
e[i] = l,
|
|
415
|
+
e[i] = l, ne(l) && se(e, l, i);
|
|
424
416
|
}
|
|
425
417
|
}
|
|
426
|
-
function
|
|
418
|
+
function Ae(e) {
|
|
427
419
|
const n = { ...e };
|
|
428
420
|
for (const [t, s] of Object.entries(e))
|
|
429
|
-
|
|
421
|
+
ne(s) && se(n, s, t);
|
|
430
422
|
return n;
|
|
431
423
|
}
|
|
432
|
-
var
|
|
433
|
-
function
|
|
424
|
+
var Le = (e) => e;
|
|
425
|
+
function ve(e, n = Le) {
|
|
434
426
|
return (t, ...s) => {
|
|
435
427
|
t[0] === "." && (t = t.slice(1));
|
|
436
428
|
const l = e()?.[t];
|
|
@@ -444,26 +436,26 @@ function Ee(e, n = ve) {
|
|
|
444
436
|
}
|
|
445
437
|
};
|
|
446
438
|
}
|
|
447
|
-
const
|
|
439
|
+
const Ee = {
|
|
448
440
|
placeholder: "Edit...",
|
|
449
441
|
emptyList: "No items found"
|
|
442
|
+
}, Se = {
|
|
443
|
+
ListField: Ee
|
|
450
444
|
}, xe = {
|
|
451
|
-
ListField: Se
|
|
452
|
-
}, Ce = {
|
|
453
445
|
placeholder: "Éditer...",
|
|
454
446
|
emptyList: "Liste vide"
|
|
455
|
-
},
|
|
456
|
-
ListField:
|
|
457
|
-
}, H = { en:
|
|
458
|
-
function
|
|
459
|
-
const n =
|
|
447
|
+
}, Ce = {
|
|
448
|
+
ListField: xe
|
|
449
|
+
}, H = { en: Se, fr: Ce };
|
|
450
|
+
function le(e) {
|
|
451
|
+
const n = W(() => {
|
|
460
452
|
const s = e(), l = s in H ? s : "en";
|
|
461
|
-
return
|
|
453
|
+
return Ae(H[l]);
|
|
462
454
|
});
|
|
463
|
-
return { t:
|
|
455
|
+
return { t: ve(n) };
|
|
464
456
|
}
|
|
465
|
-
var
|
|
466
|
-
function
|
|
457
|
+
var Fe = /* @__PURE__ */ v('<div class=LFInputField><input class=LFInputField-input type=text><button type=button class="pi pi-trash LFInputField-delete LFIconBtn">');
|
|
458
|
+
function Ie({
|
|
467
459
|
language: e,
|
|
468
460
|
value: n,
|
|
469
461
|
handleDelete: t,
|
|
@@ -471,39 +463,39 @@ function Te({
|
|
|
471
463
|
}) {
|
|
472
464
|
const {
|
|
473
465
|
t: l
|
|
474
|
-
} =
|
|
466
|
+
} = le(e);
|
|
475
467
|
let i;
|
|
476
|
-
return
|
|
468
|
+
return fe(() => {
|
|
477
469
|
i?.focus();
|
|
478
470
|
}), (() => {
|
|
479
|
-
var r =
|
|
471
|
+
var r = Fe(), o = r.firstChild, u = o.nextSibling;
|
|
480
472
|
o.$$input = (c) => s(c.currentTarget.value);
|
|
481
473
|
var f = i;
|
|
482
|
-
return typeof f == "function" ?
|
|
474
|
+
return typeof f == "function" ? te(f, o) : i = o, me(u, "click", t), $(() => we(o, "placeholder", l("ListField.placeholder"))), $(() => o.value = n()), r;
|
|
483
475
|
})();
|
|
484
476
|
}
|
|
485
|
-
|
|
486
|
-
var
|
|
487
|
-
function
|
|
477
|
+
ee(["input", "click"]);
|
|
478
|
+
var Te = /* @__PURE__ */ v("<ul class=LFList>"), _e = /* @__PURE__ */ v("<div class=LFList-empty>"), ke = /* @__PURE__ */ v("<li class=LFListItem>");
|
|
479
|
+
function Oe(e) {
|
|
488
480
|
const {
|
|
489
481
|
t: n
|
|
490
|
-
} =
|
|
482
|
+
} = le(e.language);
|
|
491
483
|
let t;
|
|
492
484
|
return (() => {
|
|
493
|
-
var s =
|
|
494
|
-
return typeof l == "function" ?
|
|
485
|
+
var s = Te(), l = t;
|
|
486
|
+
return typeof l == "function" ? te(l, s) : t = s, x(s, _(ye, {
|
|
495
487
|
get each() {
|
|
496
488
|
return e.values();
|
|
497
489
|
},
|
|
498
490
|
get fallback() {
|
|
499
491
|
return (() => {
|
|
500
|
-
var i =
|
|
492
|
+
var i = _e();
|
|
501
493
|
return x(i, () => n("ListField.emptyList")), i;
|
|
502
494
|
})();
|
|
503
495
|
},
|
|
504
496
|
children: (i, r) => (() => {
|
|
505
497
|
var o = ke();
|
|
506
|
-
return x(o, _(
|
|
498
|
+
return x(o, _(Ie, {
|
|
507
499
|
onChange: (u) => {
|
|
508
500
|
e.updateValue(r, u);
|
|
509
501
|
},
|
|
@@ -517,8 +509,8 @@ function Be(e) {
|
|
|
517
509
|
})), s;
|
|
518
510
|
})();
|
|
519
511
|
}
|
|
520
|
-
var
|
|
521
|
-
function
|
|
512
|
+
var Be = /* @__PURE__ */ v('<div class=LFApp><button type=button class="pi pi-plus LFIconBtn LFApp-addItemBtn">');
|
|
513
|
+
function De(e) {
|
|
522
514
|
const {
|
|
523
515
|
language: n,
|
|
524
516
|
list: t,
|
|
@@ -539,8 +531,8 @@ function je(e) {
|
|
|
539
531
|
p.splice(c, 0, p.splice(f, 1)[0]), s(t(), p);
|
|
540
532
|
};
|
|
541
533
|
return (() => {
|
|
542
|
-
var f =
|
|
543
|
-
return x(f, _(
|
|
534
|
+
var f = Be(), c = f.firstChild;
|
|
535
|
+
return x(f, _(Oe, {
|
|
544
536
|
changeOrder: u,
|
|
545
537
|
updateValue: o,
|
|
546
538
|
handleDelete: r,
|
|
@@ -549,46 +541,44 @@ function je(e) {
|
|
|
549
541
|
}), c), c.$$click = i, f;
|
|
550
542
|
})();
|
|
551
543
|
}
|
|
552
|
-
|
|
553
|
-
const
|
|
554
|
-
create:
|
|
555
|
-
init:
|
|
544
|
+
ee(["click"]);
|
|
545
|
+
const Ve = {
|
|
546
|
+
create: Ne,
|
|
547
|
+
init: je
|
|
556
548
|
};
|
|
557
|
-
function
|
|
549
|
+
function je({
|
|
558
550
|
pluginBaseUrl: e
|
|
559
551
|
}) {
|
|
560
552
|
const n = `${e}/style.css`, t = document.createElement("link");
|
|
561
553
|
t.rel = "stylesheet", t.href = n, document.head.appendChild(t);
|
|
562
554
|
}
|
|
563
|
-
function
|
|
555
|
+
function Ne(e) {
|
|
564
556
|
if (e.fieldType.dataType !== "json")
|
|
565
557
|
throw new Error(`data type '${e.fieldType.dataType}' is incompatible, should be 'json'`);
|
|
566
558
|
return N((n) => {
|
|
567
|
-
const [t, s] = S(e.value ?? []), [l, i] = S(
|
|
559
|
+
const [t, s] = S(e.value ?? []), [l, i] = S(K(e.value ?? [])), [r, o] = S(e.language);
|
|
568
560
|
return {
|
|
569
|
-
element: _(
|
|
561
|
+
element: _(De, {
|
|
570
562
|
language: r,
|
|
571
563
|
list: t,
|
|
572
564
|
setList: (u, f) => {
|
|
573
|
-
s(u), i(f), e.onChange(
|
|
565
|
+
s(u), i(f), e.onChange(u);
|
|
574
566
|
},
|
|
575
567
|
itemIndexes: l
|
|
576
568
|
}),
|
|
577
569
|
setLanguage: o,
|
|
578
570
|
setValue: (u = []) => {
|
|
579
|
-
s(u), i(
|
|
571
|
+
s(u), i(K(u));
|
|
580
572
|
},
|
|
581
|
-
getValue:
|
|
573
|
+
getValue: t,
|
|
574
|
+
// () => getOrderedList(list(), itemIndexes())`
|
|
582
575
|
dispose: n
|
|
583
576
|
};
|
|
584
577
|
});
|
|
585
578
|
}
|
|
586
|
-
function K(e
|
|
587
|
-
return n.map((t) => e[t]);
|
|
588
|
-
}
|
|
589
|
-
function q(e) {
|
|
579
|
+
function K(e) {
|
|
590
580
|
return e.map((n, t) => t);
|
|
591
581
|
}
|
|
592
582
|
export {
|
|
593
|
-
|
|
583
|
+
Ve as default
|
|
594
584
|
};
|