@pksep/yui 0.1.228 → 0.1.229
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
-
modelValue: import('vue').PropType<Date | null>;
|
|
3
|
+
modelValue: import('vue').PropType<Date | string | null>;
|
|
4
4
|
dataTestid: {
|
|
5
5
|
type: import('vue').PropType<string>;
|
|
6
6
|
default: string;
|
|
@@ -45,7 +45,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
45
45
|
clear: () => void;
|
|
46
46
|
change: (value: Date | null) => void;
|
|
47
47
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
48
|
-
modelValue: import('vue').PropType<Date | null>;
|
|
48
|
+
modelValue: import('vue').PropType<Date | string | null>;
|
|
49
49
|
dataTestid: {
|
|
50
50
|
type: import('vue').PropType<string>;
|
|
51
51
|
default: string;
|
package/dist/sep-yui.es.ts
CHANGED
|
@@ -51537,7 +51537,7 @@ const CoI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
|
|
|
51537
51537
|
class: "date-picker-yui-kit__header-btn__dash",
|
|
51538
51538
|
"data-testid": `${I.dataTestid}-HeaderBtnDash-Placeholder`
|
|
51539
51539
|
}, tI(e.defaultValue), 9, EQg)),
|
|
51540
|
-
e.value ? (j(), Lg(FC, {
|
|
51540
|
+
e.value && !I.isTimeSelect ? (j(), Lg(FC, {
|
|
51541
51541
|
key: 2,
|
|
51542
51542
|
size: _(Zi).small,
|
|
51543
51543
|
type: _(AC).ghost,
|
|
@@ -51567,7 +51567,7 @@ const CoI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
|
|
|
51567
51567
|
}, null, 8, ["disabled", "modelValue"])) : pg("", !0)
|
|
51568
51568
|
], 2));
|
|
51569
51569
|
}
|
|
51570
|
-
}), _Qg = /* @__PURE__ */ Tg(PQg, [["__scopeId", "data-v-
|
|
51570
|
+
}), _Qg = /* @__PURE__ */ Tg(PQg, [["__scopeId", "data-v-75b78477"]]), YF = ["top", "right", "bottom", "left"], aD = ["start", "end"], dD = /* @__PURE__ */ YF.reduce((C, g) => C.concat(g, g + "-" + aD[0], g + "-" + aD[1]), []), Vn = Math.min, Bt = Math.max, KB = Math.round, Ew = Math.floor, bs = (C) => ({
|
|
51571
51571
|
x: C,
|
|
51572
51572
|
y: C
|
|
51573
51573
|
}), qQg = {
|
|
@@ -53065,57 +53065,61 @@ const qUg = /* @__PURE__ */ sg({
|
|
|
53065
53065
|
isNotClear: !0,
|
|
53066
53066
|
startDate: null,
|
|
53067
53067
|
endDate: null
|
|
53068
|
-
}), i = I, A = Tl(C, "modelValue"), n = () => {
|
|
53069
|
-
|
|
53068
|
+
}), i = I, A = Tl(C, "modelValue"), n = x(() => {
|
|
53069
|
+
if (!A.value) return null;
|
|
53070
|
+
const B = new Date(A.value);
|
|
53071
|
+
return isNaN(B.getTime()) ? null : B;
|
|
53072
|
+
}), s = () => {
|
|
53073
|
+
t.isNotClear = !1, A.value = null, i("clear"), setTimeout(() => t.isNotClear = !0, 1), o({
|
|
53070
53074
|
detail: {
|
|
53071
53075
|
date: null
|
|
53072
53076
|
}
|
|
53073
53077
|
});
|
|
53074
|
-
},
|
|
53075
|
-
i("change",
|
|
53076
|
-
},
|
|
53077
|
-
if (!
|
|
53078
|
-
let
|
|
53079
|
-
|
|
53080
|
-
|
|
53081
|
-
|
|
53082
|
-
|
|
53083
|
-
|
|
53084
|
-
|
|
53085
|
-
)), A.value =
|
|
53086
|
-
}, o = () => {
|
|
53087
|
-
t.isOpen.months = !0;
|
|
53078
|
+
}, l = (B) => {
|
|
53079
|
+
i("change", B ? new Date(B) : null);
|
|
53080
|
+
}, o = ({ detail: B }) => {
|
|
53081
|
+
if (!B) return;
|
|
53082
|
+
let p = B.date;
|
|
53083
|
+
n.value && p && (p = new Date(
|
|
53084
|
+
p.getFullYear(),
|
|
53085
|
+
p.getMonth(),
|
|
53086
|
+
p.getDate(),
|
|
53087
|
+
n.value.getHours(),
|
|
53088
|
+
n.value.getMinutes()
|
|
53089
|
+
)), A.value = p, t.isActive = !1, i("change", p);
|
|
53088
53090
|
}, a = () => {
|
|
53089
|
-
t.isOpen.
|
|
53091
|
+
t.isOpen.months = !0;
|
|
53090
53092
|
}, r = () => {
|
|
53091
|
-
t.isOpen.
|
|
53093
|
+
t.isOpen.years = !0;
|
|
53092
53094
|
}, u = () => {
|
|
53093
|
-
t.isOpen.
|
|
53095
|
+
t.isOpen.months = !1;
|
|
53094
53096
|
}, m = () => {
|
|
53095
|
-
t.
|
|
53097
|
+
t.isOpen.years = !1;
|
|
53098
|
+
}, b = () => {
|
|
53099
|
+
t.isActive = !1, u(), m();
|
|
53096
53100
|
};
|
|
53097
53101
|
Ze(() => t.startDate = e.startDate ?? null), Ze(() => t.endDate = e.endDate ?? null);
|
|
53098
|
-
const
|
|
53099
|
-
const
|
|
53102
|
+
const Z = () => {
|
|
53103
|
+
const B = t.startDate ?? /* @__PURE__ */ new Date();
|
|
53100
53104
|
if (e.startDate) {
|
|
53101
|
-
const
|
|
53102
|
-
if (
|
|
53103
|
-
return
|
|
53104
|
-
if (
|
|
53105
|
-
return
|
|
53105
|
+
const p = n.value ?? /* @__PURE__ */ new Date();
|
|
53106
|
+
if (B.valueOf() <= p.valueOf())
|
|
53107
|
+
return B;
|
|
53108
|
+
if (B != null)
|
|
53109
|
+
return B;
|
|
53106
53110
|
}
|
|
53107
53111
|
return null;
|
|
53108
|
-
},
|
|
53109
|
-
const
|
|
53112
|
+
}, G = () => {
|
|
53113
|
+
const B = t.endDate ?? /* @__PURE__ */ new Date();
|
|
53110
53114
|
if (e.endDate) {
|
|
53111
|
-
const
|
|
53112
|
-
if (
|
|
53113
|
-
return
|
|
53114
|
-
if (
|
|
53115
|
-
return
|
|
53115
|
+
const p = n.value ?? /* @__PURE__ */ new Date();
|
|
53116
|
+
if (B.valueOf() >= p.valueOf())
|
|
53117
|
+
return B;
|
|
53118
|
+
if (B != null)
|
|
53119
|
+
return B;
|
|
53116
53120
|
}
|
|
53117
53121
|
return null;
|
|
53118
|
-
},
|
|
53122
|
+
}, W = () => {
|
|
53119
53123
|
t.isActive = !0;
|
|
53120
53124
|
};
|
|
53121
53125
|
return eg(
|
|
@@ -53124,21 +53128,21 @@ const qUg = /* @__PURE__ */ sg({
|
|
|
53124
53128
|
A.value || (t.isNotClear = !1, A.value = null, setTimeout(() => t.isNotClear = !0, 1));
|
|
53125
53129
|
}
|
|
53126
53130
|
), g({
|
|
53127
|
-
clearChoose:
|
|
53128
|
-
}), (
|
|
53131
|
+
clearChoose: s
|
|
53132
|
+
}), (B, p) => (j(), U("div", {
|
|
53129
53133
|
class: "date-picker-yui-kit__wrapper",
|
|
53130
53134
|
"data-testid": `${e.dataTestid}-Wrapper`
|
|
53131
53135
|
}, [
|
|
53132
53136
|
dg($Ug, {
|
|
53133
53137
|
open: !e.disabled && t.isActive,
|
|
53134
|
-
onUnmountClose:
|
|
53138
|
+
onUnmountClose: b
|
|
53135
53139
|
}, {
|
|
53136
53140
|
trigger: Jg(() => [
|
|
53137
53141
|
dg(_Qg, {
|
|
53138
|
-
onClick:
|
|
53139
|
-
onClear:
|
|
53142
|
+
onClick: W,
|
|
53143
|
+
onClear: s,
|
|
53140
53144
|
modelValue: A.value,
|
|
53141
|
-
"onUpdate:modelValue":
|
|
53145
|
+
"onUpdate:modelValue": p[0] || (p[0] = (y) => A.value = y),
|
|
53142
53146
|
"is-time-select": e.isSelectTime,
|
|
53143
53147
|
"is-active": t.isActive,
|
|
53144
53148
|
"is-small": e.isSmall,
|
|
@@ -53146,37 +53150,37 @@ const qUg = /* @__PURE__ */ sg({
|
|
|
53146
53150
|
disabled: e.disabled,
|
|
53147
53151
|
"data-testid": `${e.dataTestid}-Choose`,
|
|
53148
53152
|
value: _(I7g)(A.value || null, e.locale),
|
|
53149
|
-
onChange:
|
|
53153
|
+
onChange: l
|
|
53150
53154
|
}, null, 8, ["modelValue", "is-time-select", "is-active", "is-small", "is-range", "disabled", "data-testid", "value"])
|
|
53151
53155
|
]),
|
|
53152
53156
|
default: Jg(() => [
|
|
53153
53157
|
$("col-cal", {
|
|
53154
|
-
".date":
|
|
53155
|
-
".minDate":
|
|
53156
|
-
".maxDate":
|
|
53158
|
+
".date": n.value,
|
|
53159
|
+
".minDate": Z(),
|
|
53160
|
+
".maxDate": G(),
|
|
53157
53161
|
locale: e.locale ?? "ru-RU",
|
|
53158
53162
|
"data-testid": `${e.dataTestid}-Component`,
|
|
53159
|
-
onShowMonths:
|
|
53160
|
-
onShowYears:
|
|
53161
|
-
onHideMonths:
|
|
53162
|
-
onHideYears:
|
|
53163
|
-
onChangeDate:
|
|
53163
|
+
onShowMonths: a,
|
|
53164
|
+
onShowYears: r,
|
|
53165
|
+
onHideMonths: u,
|
|
53166
|
+
onHideYears: m,
|
|
53167
|
+
onChangeDate: o,
|
|
53164
53168
|
class: "date-picker-yui-kit"
|
|
53165
53169
|
}, [
|
|
53166
|
-
(j(!0), U(WI, null, xI(Object.keys(t.isOpen), (
|
|
53167
|
-
t.isOpen[
|
|
53170
|
+
(j(!0), U(WI, null, xI(Object.keys(t.isOpen), (y) => (j(), U(WI, { key: y }, [
|
|
53171
|
+
t.isOpen[y] ? (j(), Lg(xg, {
|
|
53168
53172
|
key: 0,
|
|
53169
53173
|
name: _(yg).chevronUp,
|
|
53170
53174
|
width: 16,
|
|
53171
53175
|
height: 16,
|
|
53172
53176
|
class: "open-popup",
|
|
53173
|
-
slot: `${
|
|
53177
|
+
slot: `${y}-popup-icon`
|
|
53174
53178
|
}, null, 8, ["name", "slot"])) : (j(), Lg(xg, {
|
|
53175
53179
|
key: 1,
|
|
53176
53180
|
name: _(yg).chevronDown,
|
|
53177
53181
|
width: 16,
|
|
53178
53182
|
height: 16,
|
|
53179
|
-
slot: `${
|
|
53183
|
+
slot: `${y}-popup-icon`
|
|
53180
53184
|
}, null, 8, ["name", "slot"]))
|
|
53181
53185
|
], 64))), 128)),
|
|
53182
53186
|
dg(xg, {
|