redmine-ui-kit 1.0.5 → 1.0.6
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/dist/redmine-ui-kit.js +42 -42
- package/dist/redmine-ui-kit.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/redmine-ui-kit.js
CHANGED
|
@@ -324,41 +324,7 @@ const ku = "data:image/svg+xml;base64,PHN2ZwogICAgd2lkdGg9IjIyIgogICAgaGVpZ2h0PS
|
|
|
324
324
|
beforeUnmount() {
|
|
325
325
|
document.body.style.overflow = "visible", document.documentElement.style.overflow = "visible";
|
|
326
326
|
}
|
|
327
|
-
},
|
|
328
|
-
if (typeof e != "function")
|
|
329
|
-
throw new Error("[v-click-outside]: Binding value must be a function");
|
|
330
|
-
return {
|
|
331
|
-
handler: e,
|
|
332
|
-
events: xu
|
|
333
|
-
};
|
|
334
|
-
}, Ru = ({ el: e, event: t, handler: n }) => {
|
|
335
|
-
const r = t.path || t.composedPath && t.composedPath();
|
|
336
|
-
(r ? r.indexOf(e) < 0 : !e.contains(t.target)) && n(t);
|
|
337
|
-
}, pl = (e, { value: t }) => {
|
|
338
|
-
const {
|
|
339
|
-
events: n,
|
|
340
|
-
handler: r
|
|
341
|
-
} = Su(t);
|
|
342
|
-
e[zt] = n.map((a) => ({
|
|
343
|
-
event: a,
|
|
344
|
-
srcTarget: document.documentElement,
|
|
345
|
-
handler: (o) => Ru({ el: e, event: o, handler: r })
|
|
346
|
-
})), e[zt].forEach(
|
|
347
|
-
({ event: a, srcTarget: o, handler: i }) => setTimeout(() => {
|
|
348
|
-
e[zt] && o.addEventListener(a, i);
|
|
349
|
-
}, 0)
|
|
350
|
-
);
|
|
351
|
-
}, yl = (e) => {
|
|
352
|
-
(e[zt] || []).forEach(
|
|
353
|
-
({ event: n, srcTarget: r, handler: a }) => r.removeEventListener(n, a)
|
|
354
|
-
), delete e[zt];
|
|
355
|
-
}, Mu = (e, { value: t, oldValue: n }) => {
|
|
356
|
-
JSON.stringify(t) !== JSON.stringify(n) && (yl(e), pl(e, { value: t }));
|
|
357
|
-
}, Cu = {
|
|
358
|
-
beforeMount: pl,
|
|
359
|
-
updated: Mu,
|
|
360
|
-
unmounted: yl
|
|
361
|
-
}, Jt = dl ? Cu : {}, Nu = ["onClick"], Au = { class: "rm-modal-wrapper" }, Iu = ["src"], Eu = { class: "rm-modal__content" }, v0 = /* @__PURE__ */ Se({
|
|
327
|
+
}, Tu = ["onClick"], Du = { class: "rm-modal-wrapper" }, xu = ["src"], Su = { class: "rm-modal__content" }, v0 = /* @__PURE__ */ Se({
|
|
362
328
|
__name: "RMModal",
|
|
363
329
|
props: {
|
|
364
330
|
isActive: { type: Boolean, default: !1 },
|
|
@@ -375,7 +341,7 @@ const ku = "data:image/svg+xml;base64,PHN2ZwogICAgd2lkdGg9IjIyIgogICAgaGVpZ2h0PS
|
|
|
375
341
|
class: "rm-modal",
|
|
376
342
|
onClick: Fe(r, ["self"])
|
|
377
343
|
}, [
|
|
378
|
-
Y("div",
|
|
344
|
+
Y("div", Du, [
|
|
379
345
|
e.persistent ? D("", !0) : (m(), pe(mt, {
|
|
380
346
|
key: 0,
|
|
381
347
|
class: "rm-modal__close",
|
|
@@ -385,20 +351,20 @@ const ku = "data:image/svg+xml;base64,PHN2ZwogICAgd2lkdGg9IjIyIgogICAgaGVpZ2h0PS
|
|
|
385
351
|
Y("img", {
|
|
386
352
|
src: c(ku),
|
|
387
353
|
alt: "close"
|
|
388
|
-
}, null, 8,
|
|
354
|
+
}, null, 8, xu)
|
|
389
355
|
]),
|
|
390
356
|
_: 1
|
|
391
357
|
})),
|
|
392
|
-
Y("div",
|
|
358
|
+
Y("div", Su, [
|
|
393
359
|
z(a.$slots, "default")
|
|
394
360
|
])
|
|
395
361
|
])
|
|
396
|
-
], 8,
|
|
362
|
+
], 8, Tu)), [
|
|
397
363
|
[c(Pu), e.isActive]
|
|
398
364
|
]) : D("", !0);
|
|
399
365
|
}
|
|
400
366
|
});
|
|
401
|
-
const
|
|
367
|
+
const Ru = (e, t = 150) => {
|
|
402
368
|
let n;
|
|
403
369
|
return (...r) => {
|
|
404
370
|
clearTimeout(n);
|
|
@@ -407,7 +373,41 @@ const Bu = (e, t = 150) => {
|
|
|
407
373
|
e.apply(a, r);
|
|
408
374
|
}, t);
|
|
409
375
|
};
|
|
410
|
-
},
|
|
376
|
+
}, zt = "__v-click-outside", dl = typeof window < "u", Mu = typeof navigator < "u", Cu = dl && ("ontouchstart" in window || Mu && navigator.maxTouchPoints > 0), Nu = Cu ? ["touchstart"] : ["click"], Au = (e) => {
|
|
377
|
+
if (typeof e != "function")
|
|
378
|
+
throw new Error("[v-click-outside]: Binding value must be a function");
|
|
379
|
+
return {
|
|
380
|
+
handler: e,
|
|
381
|
+
events: Nu
|
|
382
|
+
};
|
|
383
|
+
}, Iu = ({ el: e, event: t, handler: n }) => {
|
|
384
|
+
const r = t.path || t.composedPath && t.composedPath();
|
|
385
|
+
(r ? r.indexOf(e) < 0 : !e.contains(t.target)) && n(t);
|
|
386
|
+
}, pl = (e, { value: t }) => {
|
|
387
|
+
const {
|
|
388
|
+
events: n,
|
|
389
|
+
handler: r
|
|
390
|
+
} = Au(t);
|
|
391
|
+
e[zt] = n.map((a) => ({
|
|
392
|
+
event: a,
|
|
393
|
+
srcTarget: document.documentElement,
|
|
394
|
+
handler: (o) => Iu({ el: e, event: o, handler: r })
|
|
395
|
+
})), e[zt].forEach(
|
|
396
|
+
({ event: a, srcTarget: o, handler: i }) => setTimeout(() => {
|
|
397
|
+
e[zt] && o.addEventListener(a, i);
|
|
398
|
+
}, 0)
|
|
399
|
+
);
|
|
400
|
+
}, yl = (e) => {
|
|
401
|
+
(e[zt] || []).forEach(
|
|
402
|
+
({ event: n, srcTarget: r, handler: a }) => r.removeEventListener(n, a)
|
|
403
|
+
), delete e[zt];
|
|
404
|
+
}, Eu = (e, { value: t, oldValue: n }) => {
|
|
405
|
+
JSON.stringify(t) !== JSON.stringify(n) && (yl(e), pl(e, { value: t }));
|
|
406
|
+
}, Bu = {
|
|
407
|
+
beforeMount: pl,
|
|
408
|
+
updated: Eu,
|
|
409
|
+
unmounted: yl
|
|
410
|
+
}, Jt = dl ? Bu : {}, Yu = ["for"], Uu = { class: "rm-select-input" }, Lu = {
|
|
411
411
|
key: 0,
|
|
412
412
|
class: "rm-select-chips"
|
|
413
413
|
}, Vu = { class: "rm-select-chip__label" }, Hu = ["onClick"], Fu = /* @__PURE__ */ Y("svg", {
|
|
@@ -496,7 +496,7 @@ const Bu = (e, t = 150) => {
|
|
|
496
496
|
function A(O) {
|
|
497
497
|
return n.useChips && !!o.value.find((B) => B.name === O.name);
|
|
498
498
|
}
|
|
499
|
-
const F =
|
|
499
|
+
const F = Ru(function({ target: O }) {
|
|
500
500
|
if (n.searchable) {
|
|
501
501
|
w.value = O.value;
|
|
502
502
|
return;
|