@enos5/enos-vue-default 1.7.2 → 1.7.4
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/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './styles.css';
|
|
2
|
-
import { _, a, b, c, d, e, f, g, h, i, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2 } from "./plugin-
|
|
2
|
+
import { _, a, b, c, d, e, f, g, h, i, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2 } from "./plugin-CLGa04rx.js";
|
|
3
3
|
export {
|
|
4
4
|
_ as ActionCard,
|
|
5
5
|
a as ActionMessage,
|
package/dist/index.node.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _, a, b, c, d, e, f, g, h, i, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2 } from "./plugin-
|
|
1
|
+
import { _, a, b, c, d, e, f, g, h, i, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2 } from "./plugin-CLGa04rx.js";
|
|
2
2
|
export {
|
|
3
3
|
_ as ActionCard,
|
|
4
4
|
a as ActionMessage,
|
|
@@ -1506,7 +1506,7 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1506
1506
|
const start = new Date(startDate.value);
|
|
1507
1507
|
const end = new Date(endDate.value);
|
|
1508
1508
|
const diffTime = end - start;
|
|
1509
|
-
return Math.ceil(diffTime / (1e3 * 60 * 60 * 24));
|
|
1509
|
+
return Math.ceil(diffTime / (1e3 * 60 * 60 * 24)) + 1;
|
|
1510
1510
|
});
|
|
1511
1511
|
const calendarDays = computed(() => {
|
|
1512
1512
|
const firstDay = new Date(currentYear.value, currentMonth.value, 1);
|
|
@@ -1558,17 +1558,17 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1558
1558
|
const dateStr = date.toISOString().split("T")[0];
|
|
1559
1559
|
const startStr = startDate.value;
|
|
1560
1560
|
const hoveredStr = hoveredDate.value.toISOString().split("T")[0];
|
|
1561
|
-
if (dateStr === startStr
|
|
1562
|
-
return dateStr > startStr && dateStr
|
|
1561
|
+
if (dateStr === startStr) return false;
|
|
1562
|
+
return dateStr > startStr && dateStr <= hoveredStr || dateStr < startStr && dateStr >= hoveredStr;
|
|
1563
1563
|
};
|
|
1564
1564
|
const isDateInValidRange = (date) => {
|
|
1565
1565
|
if (!startDate.value || endDate.value) return false;
|
|
1566
1566
|
const dateStr = date.toISOString().split("T")[0];
|
|
1567
1567
|
const startStr = startDate.value;
|
|
1568
|
-
if (dateStr
|
|
1568
|
+
if (dateStr < startStr) return false;
|
|
1569
1569
|
const start = new Date(startStr);
|
|
1570
1570
|
const selected = new Date(dateStr);
|
|
1571
|
-
const daysDiff = Math.ceil((selected - start) / (1e3 * 60 * 60 * 24));
|
|
1571
|
+
const daysDiff = Math.ceil((selected - start) / (1e3 * 60 * 60 * 24)) + 1;
|
|
1572
1572
|
return daysDiff >= props.minDays && (props.maxDays === null || daysDiff <= props.maxDays);
|
|
1573
1573
|
};
|
|
1574
1574
|
const inputClasses = computed(() => [
|
|
@@ -1596,6 +1596,9 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1596
1596
|
return false;
|
|
1597
1597
|
}
|
|
1598
1598
|
if (startDate.value && !endDate.value) {
|
|
1599
|
+
if (dateStr === startDate.value) {
|
|
1600
|
+
return props.minDays <= 1;
|
|
1601
|
+
}
|
|
1599
1602
|
return isDateInValidRange(date);
|
|
1600
1603
|
}
|
|
1601
1604
|
if (!startDate.value || startDate.value && endDate.value) {
|
|
@@ -1613,6 +1616,11 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1613
1616
|
};
|
|
1614
1617
|
const selectDate = (date) => {
|
|
1615
1618
|
const dateStr = date.toISOString().split("T")[0];
|
|
1619
|
+
if (startDate.value && !endDate.value && dateStr === startDate.value && props.minDays <= 1) {
|
|
1620
|
+
emit("update:modelValue", { start: startDate.value, end: dateStr });
|
|
1621
|
+
isOpen.value = false;
|
|
1622
|
+
return;
|
|
1623
|
+
}
|
|
1616
1624
|
if (!isDateAllowed(date)) {
|
|
1617
1625
|
return;
|
|
1618
1626
|
}
|
|
@@ -1622,7 +1630,7 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1622
1630
|
const start = new Date(startDate.value);
|
|
1623
1631
|
const selected = new Date(dateStr);
|
|
1624
1632
|
if (selected < start) {
|
|
1625
|
-
const daysDiff = Math.ceil((start - selected) / (1e3 * 60 * 60 * 24));
|
|
1633
|
+
const daysDiff = Math.ceil((start - selected) / (1e3 * 60 * 60 * 24)) + 1;
|
|
1626
1634
|
if (daysDiff >= props.minDays && (props.maxDays === null || daysDiff <= props.maxDays)) {
|
|
1627
1635
|
emit("update:modelValue", { start: dateStr, end: startDate.value });
|
|
1628
1636
|
isOpen.value = false;
|
|
@@ -1630,7 +1638,7 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1630
1638
|
return;
|
|
1631
1639
|
}
|
|
1632
1640
|
} else {
|
|
1633
|
-
const daysDiff = Math.ceil((selected - start) / (1e3 * 60 * 60 * 24));
|
|
1641
|
+
const daysDiff = Math.ceil((selected - start) / (1e3 * 60 * 60 * 24)) + 1;
|
|
1634
1642
|
if (daysDiff >= props.minDays && (props.maxDays === null || daysDiff <= props.maxDays)) {
|
|
1635
1643
|
emit("update:modelValue", { start: startDate.value, end: dateStr });
|
|
1636
1644
|
isOpen.value = false;
|
|
@@ -1814,7 +1822,7 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1814
1822
|
};
|
|
1815
1823
|
}
|
|
1816
1824
|
});
|
|
1817
|
-
const DateRangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-
|
|
1825
|
+
const DateRangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-60a85ab0"]]);
|
|
1818
1826
|
const _hoisted_1$p = { class: "relative" };
|
|
1819
1827
|
const _hoisted_2$g = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" };
|
|
1820
1828
|
const _hoisted_3$a = ["accept"];
|
|
@@ -2256,7 +2264,7 @@ const _sfc_main$w = {
|
|
|
2256
2264
|
const _hoisted_1$j = ["for"];
|
|
2257
2265
|
const _hoisted_2$d = {
|
|
2258
2266
|
key: 1,
|
|
2259
|
-
class: "text-xs text-gray-500 mb-1 block
|
|
2267
|
+
class: "text-xs text-gray-500 mb-1 block"
|
|
2260
2268
|
};
|
|
2261
2269
|
const _hoisted_3$9 = {
|
|
2262
2270
|
key: 17,
|
|
@@ -5324,4 +5332,4 @@ export {
|
|
|
5324
5332
|
_sfc_main$A as y,
|
|
5325
5333
|
_sfc_main$z as z
|
|
5326
5334
|
};
|
|
5327
|
-
//# sourceMappingURL=plugin-
|
|
5335
|
+
//# sourceMappingURL=plugin-CLGa04rx.js.map
|