amelia-booking-ui 0.0.459 → 0.0.461
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.
|
@@ -38499,14 +38499,15 @@ const Ol = () => {
|
|
|
38499
38499
|
infoType: { default: "default" },
|
|
38500
38500
|
infoText: {},
|
|
38501
38501
|
staticLabel: { type: Boolean, default: !1 },
|
|
38502
|
-
warning: { type: Boolean, default: !1 }
|
|
38502
|
+
warning: { type: Boolean, default: !1 },
|
|
38503
|
+
forceHasValue: { type: Boolean, default: !1 }
|
|
38503
38504
|
},
|
|
38504
38505
|
emits: ["translate"],
|
|
38505
38506
|
setup(t, { expose: e, emit: n }) {
|
|
38506
38507
|
Wn((q) => ({
|
|
38507
|
-
|
|
38508
|
+
a6a485d8: q.labelBackground
|
|
38508
38509
|
}));
|
|
38509
|
-
const l = ye("$t", (q) => q), { isMobile: r } = Ol(), o = t, a = n, s = E(null), i = E(
|
|
38510
|
+
const l = ye("$t", (q) => q), { isMobile: r } = Ol(), o = t, a = n, s = E(null), i = E(o.forceHasValue), c = E(!1), u = E(!1), h = E(!1), v = E(!1);
|
|
38510
38511
|
let m = null, w = null, y = null;
|
|
38511
38512
|
e1(async () => {
|
|
38512
38513
|
const q = s.value?.querySelector(".el-input__inner");
|
|
@@ -38528,6 +38529,8 @@ const Ol = () => {
|
|
|
38528
38529
|
});
|
|
38529
38530
|
const b = (q) => {
|
|
38530
38531
|
const J = () => {
|
|
38532
|
+
if (o.forceHasValue)
|
|
38533
|
+
return i.value = !0;
|
|
38531
38534
|
i.value = q.value !== "";
|
|
38532
38535
|
};
|
|
38533
38536
|
J(), q.addEventListener("input", J), q.addEventListener("blur", J);
|
|
@@ -38608,6 +38611,8 @@ const Ol = () => {
|
|
|
38608
38611
|
}, O = () => {
|
|
38609
38612
|
Se(() => {
|
|
38610
38613
|
const q = s.value?.querySelector(".el-input__inner"), J = s.value?.querySelector(".el-textarea__inner"), B = s.value?.querySelector(".el-select");
|
|
38614
|
+
if (o.forceHasValue)
|
|
38615
|
+
return i.value = !0;
|
|
38611
38616
|
q ? i.value = q.value !== "" : J ? i.value = J.value !== "" : B && M();
|
|
38612
38617
|
});
|
|
38613
38618
|
}, P = () => {
|
|
@@ -62722,8 +62727,8 @@ const pOe = {
|
|
|
62722
62727
|
emits: ["rowClick", "deleteCheckedRows", "sort"],
|
|
62723
62728
|
setup(t, { expose: e, emit: n }) {
|
|
62724
62729
|
Wn((se) => ({
|
|
62725
|
-
|
|
62726
|
-
"
|
|
62730
|
+
e3bfb538: D.value,
|
|
62731
|
+
"8a017c88": L.value
|
|
62727
62732
|
}));
|
|
62728
62733
|
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
62734
|
get: () => b.value.every((se) => se.rows.every((he) => he.checked)),
|
|
@@ -62743,7 +62748,7 @@ const pOe = {
|
|
|
62743
62748
|
}), x = k(() => b.value.reduce(
|
|
62744
62749
|
(se, he) => se + he.rows.filter((_e) => _e.checked).length,
|
|
62745
62750
|
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
|
|
62751
|
+
)), 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
62752
|
const _e = r.gapBetweenRows || 4, Ve = 24, Xe = 48, n1 = 12;
|
|
62748
62753
|
if (!r.groupBy || r.isLoading) {
|
|
62749
62754
|
const Te = r.isLoading ? 10 : b.value.reduce((m1, v1) => m1 + v1.rows.length, 0);
|
|
@@ -62799,19 +62804,19 @@ const pOe = {
|
|
|
62799
62804
|
});
|
|
62800
62805
|
});
|
|
62801
62806
|
const U = () => {
|
|
62802
|
-
const se = c.value ? c.value
|
|
62807
|
+
const se = c.value ? c.value?.getWrapRef() : null;
|
|
62803
62808
|
if (!se) return;
|
|
62804
62809
|
const { scrollLeft: he, offsetWidth: _e, scrollWidth: Ve } = se, Xe = Ve - _e - 1;
|
|
62805
62810
|
he >= Xe ? j("is-scrolling-right") : j(he === 0 ? "is-scrolling-left" : "is-scrolling-middle"), K();
|
|
62806
62811
|
}, j = (se) => {
|
|
62807
|
-
const he = c.value
|
|
62812
|
+
const he = c.value?.getWrapRef();
|
|
62808
62813
|
if (!he) return;
|
|
62809
62814
|
const _e = Array.from(he.classList).filter(
|
|
62810
62815
|
(Ve) => typeof Ve == "string" && !Ve.startsWith("is-scrolling-")
|
|
62811
62816
|
);
|
|
62812
62817
|
_e.push(se), he.className = _e.join(" ");
|
|
62813
62818
|
}, K = () => {
|
|
62814
|
-
const se = c.value ? c.value
|
|
62819
|
+
const se = c.value ? c.value?.getWrapRef() : null;
|
|
62815
62820
|
if (!se) return;
|
|
62816
62821
|
const { offsetWidth: he, scrollWidth: _e } = se;
|
|
62817
62822
|
m.value = _e > he;
|
|
@@ -62824,18 +62829,18 @@ const pOe = {
|
|
|
62824
62829
|
const he = I.value.filter((_e) => _e.fixed === "right");
|
|
62825
62830
|
return he.length > 0 && he[0] === I.value[se];
|
|
62826
62831
|
}, F = () => {
|
|
62827
|
-
const se = c.value
|
|
62832
|
+
const se = c.value?.getWrapRef(), he = [], _e = [];
|
|
62828
62833
|
let Ve = 0, Xe = 0;
|
|
62829
62834
|
I.value.forEach((n1, oe) => {
|
|
62830
62835
|
if (n1.fixed === "left" || n1.fixed === !0) {
|
|
62831
|
-
const Te = se
|
|
62836
|
+
const Te = se?.querySelectorAll(".am-table__header__cell")[oe];
|
|
62832
62837
|
Te && (he.push(Ve), Ve += Te.offsetWidth);
|
|
62833
62838
|
} else
|
|
62834
62839
|
he.push(0);
|
|
62835
62840
|
});
|
|
62836
62841
|
for (let n1 = I.value.length - 1; n1 >= 0; n1--)
|
|
62837
62842
|
if (I.value[n1].fixed === "right") {
|
|
62838
|
-
const Te = se
|
|
62843
|
+
const Te = se?.querySelectorAll(".am-table__header__cell")[n1];
|
|
62839
62844
|
Te && (_e[n1] = Xe, Xe += Te.offsetWidth);
|
|
62840
62845
|
} else
|
|
62841
62846
|
_e[n1] = 0;
|
|
@@ -62876,10 +62881,10 @@ const pOe = {
|
|
|
62876
62881
|
zIndex: 1
|
|
62877
62882
|
}), r.isWithRowBorder && _e?.color && (Xe["--row-border-color"] = _e.color), Xe;
|
|
62878
62883
|
}, J = () => {
|
|
62879
|
-
const se = c.value
|
|
62884
|
+
const se = c.value?.getWrapRef();
|
|
62880
62885
|
return I.value.reduce((he, _e, Ve) => {
|
|
62881
62886
|
if (_e.fixed === "left" || _e.fixed === !0) {
|
|
62882
|
-
const Xe = se
|
|
62887
|
+
const Xe = se?.querySelectorAll(".am-table__header__cell")[Ve];
|
|
62883
62888
|
return he + (Xe ? Xe.offsetWidth : 0);
|
|
62884
62889
|
}
|
|
62885
62890
|
return he;
|
|
@@ -62891,25 +62896,25 @@ const pOe = {
|
|
|
62891
62896
|
}
|
|
62892
62897
|
return se;
|
|
62893
62898
|
}, 0), W = () => {
|
|
62894
|
-
const se = c.value
|
|
62899
|
+
const se = c.value?.getWrapRef();
|
|
62895
62900
|
if (!se) return;
|
|
62896
62901
|
const he = B(), { scrollLeft: _e, offsetWidth: Ve } = se, Xe = I.value.findIndex((n1, oe) => {
|
|
62897
|
-
const Te = se
|
|
62902
|
+
const Te = se?.querySelectorAll(".am-table__header__cell")[oe];
|
|
62898
62903
|
return Te.offsetLeft + Te.offsetWidth > _e + Ve - he;
|
|
62899
62904
|
});
|
|
62900
62905
|
if (Xe !== -1) {
|
|
62901
|
-
const n1 = se
|
|
62906
|
+
const n1 = se?.querySelectorAll(".am-table__header__cell")[Xe], oe = J();
|
|
62902
62907
|
se.scrollTo({
|
|
62903
62908
|
left: n1.offsetLeft - oe,
|
|
62904
62909
|
behavior: "smooth"
|
|
62905
62910
|
});
|
|
62906
62911
|
}
|
|
62907
62912
|
}, te = () => {
|
|
62908
|
-
const se = c.value
|
|
62913
|
+
const se = c.value?.getWrapRef();
|
|
62909
62914
|
if (!se) return;
|
|
62910
|
-
const he = J(), { scrollLeft: _e, offsetWidth: Ve } = se, Xe = B(), n1 = [...I.value].reverse().findIndex((oe, Te) => se
|
|
62915
|
+
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
62916
|
if (n1 !== -1) {
|
|
62912
|
-
const oe = se
|
|
62917
|
+
const oe = se?.querySelectorAll(".am-table__header__cell")[I.value.length - 1 - n1];
|
|
62913
62918
|
se.scrollTo({
|
|
62914
62919
|
left: oe.offsetLeft + oe.offsetWidth - Ve + Xe,
|
|
62915
62920
|
behavior: "smooth"
|
|
@@ -15,6 +15,7 @@ export interface FormItemProps {
|
|
|
15
15
|
infoText?: string;
|
|
16
16
|
staticLabel?: boolean;
|
|
17
17
|
warning?: boolean;
|
|
18
|
+
forceHasValue?: boolean;
|
|
18
19
|
}
|
|
19
20
|
declare function __VLS_template(): {
|
|
20
21
|
attrs: Partial<{}>;
|
|
@@ -41,6 +42,7 @@ declare const __VLS_component: import('vue').DefineComponent<FormItemProps, {
|
|
|
41
42
|
showInfo: boolean;
|
|
42
43
|
infoType: "default" | "success" | "warning" | "info" | "error";
|
|
43
44
|
staticLabel: boolean;
|
|
45
|
+
forceHasValue: boolean;
|
|
44
46
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
45
47
|
formItem: HTMLDivElement;
|
|
46
48
|
}, HTMLDivElement>;
|