@factoringplus/pl-components-pack-v3 0.4.61 → 0.4.63
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/pl-components-pack-v3.es.js +54 -27
- package/dist/pl-components-pack-v3.umd.js +24 -24
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -25901,7 +25901,10 @@ var objectSupport$1 = { exports: {} };
|
|
|
25901
25901
|
var objectSupport = objectSupport$1.exports;
|
|
25902
25902
|
var plDatePickerRange_vue_vue_type_style_index_0_lang = "";
|
|
25903
25903
|
const _hoisted_1$u = { class: "date-picker" };
|
|
25904
|
-
const _hoisted_2$q = {
|
|
25904
|
+
const _hoisted_2$q = {
|
|
25905
|
+
key: 0,
|
|
25906
|
+
class: "date-picker__wrapper"
|
|
25907
|
+
};
|
|
25905
25908
|
const _hoisted_3$n = { class: "date-switcher__container flex-column" };
|
|
25906
25909
|
const _hoisted_4$g = { class: "d-flex pb-4 justify-content-between" };
|
|
25907
25910
|
const _hoisted_5$b = { class: "date-switcher justify-content-center flex-column" };
|
|
@@ -25930,45 +25933,46 @@ const _sfc_main$u = {
|
|
|
25930
25933
|
label: {
|
|
25931
25934
|
type: String,
|
|
25932
25935
|
default: ""
|
|
25936
|
+
},
|
|
25937
|
+
isOpen: {
|
|
25938
|
+
type: Boolean,
|
|
25939
|
+
default: false
|
|
25940
|
+
},
|
|
25941
|
+
showInput: {
|
|
25942
|
+
type: Boolean,
|
|
25943
|
+
default: true
|
|
25933
25944
|
}
|
|
25934
25945
|
},
|
|
25935
25946
|
emits: ["update:modelValue", "changeOpen"],
|
|
25936
25947
|
setup(__props, { emit: emit2 }) {
|
|
25948
|
+
const props = __props;
|
|
25937
25949
|
dayjs.locale("ru");
|
|
25938
25950
|
dayjs.extend(isBetween);
|
|
25939
25951
|
dayjs.extend(objectSupport);
|
|
25952
|
+
const { isOpen } = toRefs(props);
|
|
25940
25953
|
const regMask = /^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{4})$/g;
|
|
25941
25954
|
const dateValue = ref("");
|
|
25942
25955
|
const currentDate = ref(dayjs());
|
|
25943
25956
|
const startDate = ref(dayjs());
|
|
25944
25957
|
const endDate = ref(dayjs());
|
|
25945
25958
|
const confirmedDate = ref(dayjs());
|
|
25946
|
-
const isOpen = ref(false);
|
|
25947
25959
|
const rangeStartDateValue = ref(dayjs().format("DD.MM.YYYY"));
|
|
25948
25960
|
const rangeEndDateValue = ref(dayjs().format("DD.MM.YYYY"));
|
|
25949
25961
|
const WEEK_DAYS2 = ["\u041F\u043D", "\u0412\u0442", "\u0421\u0440", "\u0427\u0442", "\u041F\u0442", "\u0421\u0431", "\u0412\u0441"];
|
|
25950
|
-
watch(dateValue, (value) => {
|
|
25951
|
-
if (regMask.test(value.split("-")[0])) {
|
|
25952
|
-
rangeStartDateValue.value = dayjs(value.split("-")[0].split(".").reverse().join("-")).format("DD.MM.YYYY");
|
|
25953
|
-
}
|
|
25954
|
-
if (regMask.test(value.split("-")[1])) {
|
|
25955
|
-
rangeEndDateValue.value = dayjs(value.split("-")[1].split(".").reverse().join("-")).format("DD.MM.YYYY");
|
|
25956
|
-
}
|
|
25957
|
-
});
|
|
25958
25962
|
let range3 = [];
|
|
25959
25963
|
const updateDate = (event, flag) => {
|
|
25960
25964
|
if (regMask.test(event.target.value)) {
|
|
25961
25965
|
if (flag) {
|
|
25962
25966
|
if (dayjs(event.target.value.split(".").reverse().join("-")).isAfter(startDate.value)) {
|
|
25963
25967
|
endDate.value = dayjs(event.target.value.split(".").reverse().join("-"));
|
|
25964
|
-
setupUpdate();
|
|
25965
25968
|
}
|
|
25966
25969
|
} else {
|
|
25967
25970
|
if (dayjs(event.target.value.split(".").reverse().join("-")).isBefore(endDate.value)) {
|
|
25968
25971
|
startDate.value = dayjs(event.target.value.split(".").reverse().join("-"));
|
|
25969
|
-
setupUpdate();
|
|
25970
25972
|
}
|
|
25971
25973
|
}
|
|
25974
|
+
range3 = [startDate.value, endDate.value];
|
|
25975
|
+
setupUpdate();
|
|
25972
25976
|
}
|
|
25973
25977
|
};
|
|
25974
25978
|
const setupUpdate = () => {
|
|
@@ -25982,11 +25986,8 @@ const _sfc_main$u = {
|
|
|
25982
25986
|
month: endDate.value.month(),
|
|
25983
25987
|
year: endDate.value.year()
|
|
25984
25988
|
};
|
|
25985
|
-
updateSelection(
|
|
25986
|
-
|
|
25987
|
-
month: endDate.value.month(),
|
|
25988
|
-
year: endDate.value.year()
|
|
25989
|
-
});
|
|
25989
|
+
updateSelection(end);
|
|
25990
|
+
selecting = false;
|
|
25990
25991
|
};
|
|
25991
25992
|
const capitalize2 = (value) => value.charAt(0).toUpperCase() + value.slice(1);
|
|
25992
25993
|
const displayData = (value) => value.format("DD.MM.YYYY");
|
|
@@ -26006,6 +26007,9 @@ const _sfc_main$u = {
|
|
|
26006
26007
|
const day = extremeDay.date() === item.day && extremeDay.month() === item.month && extremeDay.year() === item.year;
|
|
26007
26008
|
return day;
|
|
26008
26009
|
};
|
|
26010
|
+
const activeDay = (dayItem) => {
|
|
26011
|
+
return range3.length === 2 ? checkDay(dayItem, startDate.value) || checkDay(dayItem, endDate.value) : checkDay(dayItem, startDate.value);
|
|
26012
|
+
};
|
|
26009
26013
|
const framePosition = (dayItem) => {
|
|
26010
26014
|
const isAfter2 = endDate.value.isAfter(startDate.value);
|
|
26011
26015
|
const isSame2 = endDate.value.isSame(startDate.value, "day");
|
|
@@ -26019,7 +26023,7 @@ const _sfc_main$u = {
|
|
|
26019
26023
|
} else
|
|
26020
26024
|
return;
|
|
26021
26025
|
};
|
|
26022
|
-
const
|
|
26026
|
+
const cancelButton = () => {
|
|
26023
26027
|
toggleSelection({
|
|
26024
26028
|
day: dayjs().date(),
|
|
26025
26029
|
month: dayjs().month(),
|
|
@@ -26034,8 +26038,28 @@ const _sfc_main$u = {
|
|
|
26034
26038
|
currentDate.value = startDate.value;
|
|
26035
26039
|
range3 = [];
|
|
26036
26040
|
dateValue.value = "";
|
|
26037
|
-
|
|
26041
|
+
emit2("changeOpen", true);
|
|
26038
26042
|
};
|
|
26043
|
+
const closeDatePicker = () => {
|
|
26044
|
+
if (!regMask.test(dateValue.value.split("-")[0])) {
|
|
26045
|
+
endDate.value = dayjs();
|
|
26046
|
+
startDate.value = dayjs();
|
|
26047
|
+
rangeStartDateValue.value = startDate.value.format("DD.MM.YYYY");
|
|
26048
|
+
rangeEndDateValue.value = endDate.value.format("DD.MM.YYYY");
|
|
26049
|
+
currentDate.value = startDate.value;
|
|
26050
|
+
}
|
|
26051
|
+
setupUpdate();
|
|
26052
|
+
emit2("changeOpen", true);
|
|
26053
|
+
};
|
|
26054
|
+
watch(isOpen, () => {
|
|
26055
|
+
if (regMask.test(dateValue.value.split("-")[0])) {
|
|
26056
|
+
rangeStartDateValue.value = dayjs(dateValue.value.split("-")[0].split(".").reverse().join("-")).format("DD.MM.YYYY");
|
|
26057
|
+
rangeEndDateValue.value = dayjs(dateValue.value.split("-")[1].split(".").reverse().join("-")).format("DD.MM.YYYY");
|
|
26058
|
+
endDate.value = dayjs(dayjs(dateValue.value.split("-")[1].split(".").reverse().join("-")));
|
|
26059
|
+
startDate.value = dayjs(dateValue.value.split("-")[0].split(".").reverse().join("-"));
|
|
26060
|
+
setupUpdate();
|
|
26061
|
+
}
|
|
26062
|
+
});
|
|
26039
26063
|
const datePickerRef = ref(null);
|
|
26040
26064
|
onClickOutside(datePickerRef, () => {
|
|
26041
26065
|
setTimeout(() => {
|
|
@@ -26053,7 +26077,7 @@ const _sfc_main$u = {
|
|
|
26053
26077
|
}
|
|
26054
26078
|
dateValue.value = startDate.value.format("DD.MM.YYYY") + "-" + endDate.value.format("DD.MM.YYYY");
|
|
26055
26079
|
emit2("update:modelValue", startDate.value.format("DD.MM.YYYY") + "-" + endDate.value.format("DD.MM.YYYY"));
|
|
26056
|
-
|
|
26080
|
+
emit2("changeOpen", true);
|
|
26057
26081
|
};
|
|
26058
26082
|
const getArrayOfDays = () => {
|
|
26059
26083
|
dayjs();
|
|
@@ -26183,7 +26207,7 @@ const _sfc_main$u = {
|
|
|
26183
26207
|
return (_ctx, _cache) => {
|
|
26184
26208
|
const _directive_maska = resolveDirective("maska");
|
|
26185
26209
|
return openBlock(), createElementBlock("div", _hoisted_1$u, [
|
|
26186
|
-
|
|
26210
|
+
__props.showInput ? (openBlock(), createElementBlock("div", _hoisted_2$q, [
|
|
26187
26211
|
createVNode(_sfc_main$z, {
|
|
26188
26212
|
mask: "##.##.####-##.##.####",
|
|
26189
26213
|
modelValue: dateValue.value,
|
|
@@ -26197,11 +26221,11 @@ const _sfc_main$u = {
|
|
|
26197
26221
|
class: "date-picker__img",
|
|
26198
26222
|
src: _imports_0$8,
|
|
26199
26223
|
alt: "date-picker icon",
|
|
26200
|
-
onClick: _cache[1] || (_cache[1] = ($event) =>
|
|
26224
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emit2("changeOpen", !unref(isOpen)))
|
|
26201
26225
|
})
|
|
26202
|
-
]),
|
|
26203
|
-
isOpen
|
|
26204
|
-
key:
|
|
26226
|
+
])) : createCommentVNode("", true),
|
|
26227
|
+
!unref(isOpen) ? (openBlock(), createElementBlock("div", {
|
|
26228
|
+
key: 1,
|
|
26205
26229
|
id: "date-picker-popup",
|
|
26206
26230
|
class: "pl-date-picker__popup",
|
|
26207
26231
|
ref_key: "datePickerRef",
|
|
@@ -26280,13 +26304,16 @@ const _sfc_main$u = {
|
|
|
26280
26304
|
{
|
|
26281
26305
|
"pl-date-picker__day-item_disabled": item.type !== "current"
|
|
26282
26306
|
},
|
|
26307
|
+
{
|
|
26308
|
+
"pl-date-picker__day-item_svg-circle-background": activeDay(item)
|
|
26309
|
+
},
|
|
26283
26310
|
{
|
|
26284
26311
|
"pl-date-picker__background-range": item.type !== "previous" && item.type !== "next" ? updateSelection(item, true) : ""
|
|
26285
26312
|
}
|
|
26286
26313
|
]),
|
|
26287
26314
|
key: `dd${index}`,
|
|
26288
26315
|
onClick: ($event) => item.type !== "previous" && item.type !== "next" ? toggleSelection(item) : "",
|
|
26289
|
-
onMousemove: ($event) => item.type !== "previous" && item.type !== "next" ? updateSelection(item) : ""
|
|
26316
|
+
onMousemove: ($event) => item.type !== "previous" && item.type !== "next" ? updateSelection(item, false) : ""
|
|
26290
26317
|
}, [
|
|
26291
26318
|
createElementVNode("div", _hoisted_16$2, toDisplayString(item.type !== "previous" && item.type !== "next" ? item.day : ""), 1)
|
|
26292
26319
|
], 42, _hoisted_15$2);
|
|
@@ -26295,7 +26322,7 @@ const _sfc_main$u = {
|
|
|
26295
26322
|
createElementVNode("div", { class: "pl-date-picker__buttons" }, [
|
|
26296
26323
|
createElementVNode("button", {
|
|
26297
26324
|
class: "pl-date-picker__btn pl-date-picker__btn-cancel",
|
|
26298
|
-
onClick:
|
|
26325
|
+
onClick: cancelButton
|
|
26299
26326
|
}, " \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C "),
|
|
26300
26327
|
createElementVNode("button", {
|
|
26301
26328
|
class: "pl-date-picker__btn pl-date-picker__btn-confirm",
|