@pksep/yui 0.1.227 → 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,49 +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
|
-
|
|
53078
|
-
|
|
53079
|
-
|
|
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);
|
|
53080
53090
|
}, a = () => {
|
|
53081
|
-
t.isOpen.
|
|
53091
|
+
t.isOpen.months = !0;
|
|
53082
53092
|
}, r = () => {
|
|
53083
|
-
t.isOpen.
|
|
53093
|
+
t.isOpen.years = !0;
|
|
53084
53094
|
}, u = () => {
|
|
53085
|
-
t.isOpen.
|
|
53095
|
+
t.isOpen.months = !1;
|
|
53086
53096
|
}, m = () => {
|
|
53087
|
-
t.
|
|
53097
|
+
t.isOpen.years = !1;
|
|
53098
|
+
}, b = () => {
|
|
53099
|
+
t.isActive = !1, u(), m();
|
|
53088
53100
|
};
|
|
53089
53101
|
Ze(() => t.startDate = e.startDate ?? null), Ze(() => t.endDate = e.endDate ?? null);
|
|
53090
|
-
const
|
|
53091
|
-
const
|
|
53102
|
+
const Z = () => {
|
|
53103
|
+
const B = t.startDate ?? /* @__PURE__ */ new Date();
|
|
53092
53104
|
if (e.startDate) {
|
|
53093
|
-
const
|
|
53094
|
-
if (
|
|
53095
|
-
return
|
|
53096
|
-
if (
|
|
53097
|
-
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;
|
|
53098
53110
|
}
|
|
53099
53111
|
return null;
|
|
53100
|
-
},
|
|
53101
|
-
const
|
|
53112
|
+
}, G = () => {
|
|
53113
|
+
const B = t.endDate ?? /* @__PURE__ */ new Date();
|
|
53102
53114
|
if (e.endDate) {
|
|
53103
|
-
const
|
|
53104
|
-
if (
|
|
53105
|
-
return
|
|
53106
|
-
if (
|
|
53107
|
-
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;
|
|
53108
53120
|
}
|
|
53109
53121
|
return null;
|
|
53110
|
-
},
|
|
53122
|
+
}, W = () => {
|
|
53111
53123
|
t.isActive = !0;
|
|
53112
53124
|
};
|
|
53113
53125
|
return eg(
|
|
@@ -53116,21 +53128,21 @@ const qUg = /* @__PURE__ */ sg({
|
|
|
53116
53128
|
A.value || (t.isNotClear = !1, A.value = null, setTimeout(() => t.isNotClear = !0, 1));
|
|
53117
53129
|
}
|
|
53118
53130
|
), g({
|
|
53119
|
-
clearChoose:
|
|
53120
|
-
}), (
|
|
53131
|
+
clearChoose: s
|
|
53132
|
+
}), (B, p) => (j(), U("div", {
|
|
53121
53133
|
class: "date-picker-yui-kit__wrapper",
|
|
53122
53134
|
"data-testid": `${e.dataTestid}-Wrapper`
|
|
53123
53135
|
}, [
|
|
53124
53136
|
dg($Ug, {
|
|
53125
53137
|
open: !e.disabled && t.isActive,
|
|
53126
|
-
onUnmountClose:
|
|
53138
|
+
onUnmountClose: b
|
|
53127
53139
|
}, {
|
|
53128
53140
|
trigger: Jg(() => [
|
|
53129
53141
|
dg(_Qg, {
|
|
53130
|
-
onClick:
|
|
53131
|
-
onClear:
|
|
53142
|
+
onClick: W,
|
|
53143
|
+
onClear: s,
|
|
53132
53144
|
modelValue: A.value,
|
|
53133
|
-
"onUpdate:modelValue":
|
|
53145
|
+
"onUpdate:modelValue": p[0] || (p[0] = (y) => A.value = y),
|
|
53134
53146
|
"is-time-select": e.isSelectTime,
|
|
53135
53147
|
"is-active": t.isActive,
|
|
53136
53148
|
"is-small": e.isSmall,
|
|
@@ -53138,37 +53150,37 @@ const qUg = /* @__PURE__ */ sg({
|
|
|
53138
53150
|
disabled: e.disabled,
|
|
53139
53151
|
"data-testid": `${e.dataTestid}-Choose`,
|
|
53140
53152
|
value: _(I7g)(A.value || null, e.locale),
|
|
53141
|
-
onChange:
|
|
53153
|
+
onChange: l
|
|
53142
53154
|
}, null, 8, ["modelValue", "is-time-select", "is-active", "is-small", "is-range", "disabled", "data-testid", "value"])
|
|
53143
53155
|
]),
|
|
53144
53156
|
default: Jg(() => [
|
|
53145
53157
|
$("col-cal", {
|
|
53146
|
-
".date":
|
|
53147
|
-
".minDate":
|
|
53148
|
-
".maxDate":
|
|
53158
|
+
".date": n.value,
|
|
53159
|
+
".minDate": Z(),
|
|
53160
|
+
".maxDate": G(),
|
|
53149
53161
|
locale: e.locale ?? "ru-RU",
|
|
53150
53162
|
"data-testid": `${e.dataTestid}-Component`,
|
|
53151
|
-
onShowMonths:
|
|
53152
|
-
onShowYears:
|
|
53153
|
-
onHideMonths:
|
|
53154
|
-
onHideYears:
|
|
53155
|
-
onChangeDate:
|
|
53163
|
+
onShowMonths: a,
|
|
53164
|
+
onShowYears: r,
|
|
53165
|
+
onHideMonths: u,
|
|
53166
|
+
onHideYears: m,
|
|
53167
|
+
onChangeDate: o,
|
|
53156
53168
|
class: "date-picker-yui-kit"
|
|
53157
53169
|
}, [
|
|
53158
|
-
(j(!0), U(WI, null, xI(Object.keys(t.isOpen), (
|
|
53159
|
-
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, {
|
|
53160
53172
|
key: 0,
|
|
53161
53173
|
name: _(yg).chevronUp,
|
|
53162
53174
|
width: 16,
|
|
53163
53175
|
height: 16,
|
|
53164
53176
|
class: "open-popup",
|
|
53165
|
-
slot: `${
|
|
53177
|
+
slot: `${y}-popup-icon`
|
|
53166
53178
|
}, null, 8, ["name", "slot"])) : (j(), Lg(xg, {
|
|
53167
53179
|
key: 1,
|
|
53168
53180
|
name: _(yg).chevronDown,
|
|
53169
53181
|
width: 16,
|
|
53170
53182
|
height: 16,
|
|
53171
|
-
slot: `${
|
|
53183
|
+
slot: `${y}-popup-icon`
|
|
53172
53184
|
}, null, 8, ["name", "slot"]))
|
|
53173
53185
|
], 64))), 128)),
|
|
53174
53186
|
dg(xg, {
|