amelia-booking-ui 0.0.459 → 0.0.460
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.
|
@@ -62722,8 +62722,8 @@ const pOe = {
|
|
|
62722
62722
|
emits: ["rowClick", "deleteCheckedRows", "sort"],
|
|
62723
62723
|
setup(t, { expose: e, emit: n }) {
|
|
62724
62724
|
Wn((se) => ({
|
|
62725
|
-
|
|
62726
|
-
"
|
|
62725
|
+
e3bfb538: D.value,
|
|
62726
|
+
"8a017c88": L.value
|
|
62727
62727
|
}));
|
|
62728
62728
|
const l = ye("$t", (se) => se), r = t, o = q1(), a = n, s = E([]), i = E(null), c = E(null), u = E([]), h = E([]), v = E(!1), m = E(!1), w = E(/* @__PURE__ */ new Set()), y = E({}), b = E([]), $ = E(!0), M = k({
|
|
62729
62729
|
get: () => b.value.every((se) => se.rows.every((he) => he.checked)),
|
|
@@ -62743,7 +62743,7 @@ const pOe = {
|
|
|
62743
62743
|
}), x = k(() => b.value.reduce(
|
|
62744
62744
|
(se, he) => se + he.rows.filter((_e) => _e.checked).length,
|
|
62745
62745
|
0
|
|
62746
|
-
)), C = k(() => I.value.reduce((se, he) => se + (Number(he.width) || 0), 0)), S = k(() => I.value.reduce((se, he) => he.type === "selection" ? se + (r.groupBy ? 80 : 48) : he.type === "scroll" ? se + 86 : se + (Number(he.width) || 0), 0)), z = k(() => c
|
|
62746
|
+
)), C = k(() => I.value.reduce((se, he) => se + (Number(he.width) || 0), 0)), S = k(() => I.value.reduce((se, he) => he.type === "selection" ? se + (r.groupBy ? 80 : 48) : he.type === "scroll" ? se + 86 : se + (Number(he.width) || 0), 0)), z = k(() => c?.value?.getWrapRef().clientWidth || 0), T = k(() => Math.max(z.value - S.value, 0)), I = k(() => s.value.filter((se) => se.type === "selection" || se.type === "scroll" ? !0 : r.groupBy === void 0 || se.prop !== r.groupBy)), V = k(() => I.value.some((se) => se.type === "selection")), L = k(() => {
|
|
62747
62747
|
const _e = r.gapBetweenRows || 4, Ve = 24, Xe = 48, n1 = 12;
|
|
62748
62748
|
if (!r.groupBy || r.isLoading) {
|
|
62749
62749
|
const Te = r.isLoading ? 10 : b.value.reduce((m1, v1) => m1 + v1.rows.length, 0);
|
|
@@ -62799,19 +62799,19 @@ const pOe = {
|
|
|
62799
62799
|
});
|
|
62800
62800
|
});
|
|
62801
62801
|
const U = () => {
|
|
62802
|
-
const se = c.value ? c.value
|
|
62802
|
+
const se = c.value ? c.value?.getWrapRef() : null;
|
|
62803
62803
|
if (!se) return;
|
|
62804
62804
|
const { scrollLeft: he, offsetWidth: _e, scrollWidth: Ve } = se, Xe = Ve - _e - 1;
|
|
62805
62805
|
he >= Xe ? j("is-scrolling-right") : j(he === 0 ? "is-scrolling-left" : "is-scrolling-middle"), K();
|
|
62806
62806
|
}, j = (se) => {
|
|
62807
|
-
const he = c.value
|
|
62807
|
+
const he = c.value?.getWrapRef();
|
|
62808
62808
|
if (!he) return;
|
|
62809
62809
|
const _e = Array.from(he.classList).filter(
|
|
62810
62810
|
(Ve) => typeof Ve == "string" && !Ve.startsWith("is-scrolling-")
|
|
62811
62811
|
);
|
|
62812
62812
|
_e.push(se), he.className = _e.join(" ");
|
|
62813
62813
|
}, K = () => {
|
|
62814
|
-
const se = c.value ? c.value
|
|
62814
|
+
const se = c.value ? c.value?.getWrapRef() : null;
|
|
62815
62815
|
if (!se) return;
|
|
62816
62816
|
const { offsetWidth: he, scrollWidth: _e } = se;
|
|
62817
62817
|
m.value = _e > he;
|
|
@@ -62824,18 +62824,18 @@ const pOe = {
|
|
|
62824
62824
|
const he = I.value.filter((_e) => _e.fixed === "right");
|
|
62825
62825
|
return he.length > 0 && he[0] === I.value[se];
|
|
62826
62826
|
}, F = () => {
|
|
62827
|
-
const se = c.value
|
|
62827
|
+
const se = c.value?.getWrapRef(), he = [], _e = [];
|
|
62828
62828
|
let Ve = 0, Xe = 0;
|
|
62829
62829
|
I.value.forEach((n1, oe) => {
|
|
62830
62830
|
if (n1.fixed === "left" || n1.fixed === !0) {
|
|
62831
|
-
const Te = se
|
|
62831
|
+
const Te = se?.querySelectorAll(".am-table__header__cell")[oe];
|
|
62832
62832
|
Te && (he.push(Ve), Ve += Te.offsetWidth);
|
|
62833
62833
|
} else
|
|
62834
62834
|
he.push(0);
|
|
62835
62835
|
});
|
|
62836
62836
|
for (let n1 = I.value.length - 1; n1 >= 0; n1--)
|
|
62837
62837
|
if (I.value[n1].fixed === "right") {
|
|
62838
|
-
const Te = se
|
|
62838
|
+
const Te = se?.querySelectorAll(".am-table__header__cell")[n1];
|
|
62839
62839
|
Te && (_e[n1] = Xe, Xe += Te.offsetWidth);
|
|
62840
62840
|
} else
|
|
62841
62841
|
_e[n1] = 0;
|
|
@@ -62876,10 +62876,10 @@ const pOe = {
|
|
|
62876
62876
|
zIndex: 1
|
|
62877
62877
|
}), r.isWithRowBorder && _e?.color && (Xe["--row-border-color"] = _e.color), Xe;
|
|
62878
62878
|
}, J = () => {
|
|
62879
|
-
const se = c.value
|
|
62879
|
+
const se = c.value?.getWrapRef();
|
|
62880
62880
|
return I.value.reduce((he, _e, Ve) => {
|
|
62881
62881
|
if (_e.fixed === "left" || _e.fixed === !0) {
|
|
62882
|
-
const Xe = se
|
|
62882
|
+
const Xe = se?.querySelectorAll(".am-table__header__cell")[Ve];
|
|
62883
62883
|
return he + (Xe ? Xe.offsetWidth : 0);
|
|
62884
62884
|
}
|
|
62885
62885
|
return he;
|
|
@@ -62891,25 +62891,25 @@ const pOe = {
|
|
|
62891
62891
|
}
|
|
62892
62892
|
return se;
|
|
62893
62893
|
}, 0), W = () => {
|
|
62894
|
-
const se = c.value
|
|
62894
|
+
const se = c.value?.getWrapRef();
|
|
62895
62895
|
if (!se) return;
|
|
62896
62896
|
const he = B(), { scrollLeft: _e, offsetWidth: Ve } = se, Xe = I.value.findIndex((n1, oe) => {
|
|
62897
|
-
const Te = se
|
|
62897
|
+
const Te = se?.querySelectorAll(".am-table__header__cell")[oe];
|
|
62898
62898
|
return Te.offsetLeft + Te.offsetWidth > _e + Ve - he;
|
|
62899
62899
|
});
|
|
62900
62900
|
if (Xe !== -1) {
|
|
62901
|
-
const n1 = se
|
|
62901
|
+
const n1 = se?.querySelectorAll(".am-table__header__cell")[Xe], oe = J();
|
|
62902
62902
|
se.scrollTo({
|
|
62903
62903
|
left: n1.offsetLeft - oe,
|
|
62904
62904
|
behavior: "smooth"
|
|
62905
62905
|
});
|
|
62906
62906
|
}
|
|
62907
62907
|
}, te = () => {
|
|
62908
|
-
const se = c.value
|
|
62908
|
+
const se = c.value?.getWrapRef();
|
|
62909
62909
|
if (!se) return;
|
|
62910
|
-
const he = J(), { scrollLeft: _e, offsetWidth: Ve } = se, Xe = B(), n1 = [...I.value].reverse().findIndex((oe, Te) => se
|
|
62910
|
+
const he = J(), { scrollLeft: _e, offsetWidth: Ve } = se, Xe = B(), n1 = [...I.value].reverse().findIndex((oe, Te) => (se?.querySelectorAll(".am-table__header__cell")[I.value.length - 1 - Te]).offsetLeft < _e + he);
|
|
62911
62911
|
if (n1 !== -1) {
|
|
62912
|
-
const oe = se
|
|
62912
|
+
const oe = se?.querySelectorAll(".am-table__header__cell")[I.value.length - 1 - n1];
|
|
62913
62913
|
se.scrollTo({
|
|
62914
62914
|
left: oe.offsetLeft + oe.offsetWidth - Ve + Xe,
|
|
62915
62915
|
behavior: "smooth"
|