@factoringplus/pl-components-pack-v3 0.4.72 → 0.4.73

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.
@@ -25945,7 +25945,6 @@ const _sfc_main$u = {
25945
25945
  dayjs.extend(objectSupport);
25946
25946
  const { isOpen } = toRefs(props);
25947
25947
  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;
25948
- const dateValue = ref(props.modelValue);
25949
25948
  const currentDate = ref(dayjs());
25950
25949
  const startDate = ref(dayjs());
25951
25950
  const endDate = ref(dayjs());
@@ -25954,6 +25953,29 @@ const _sfc_main$u = {
25954
25953
  const rangeEndDateValue = ref(dayjs().format("DD.MM.YYYY"));
25955
25954
  const WEEK_DAYS2 = ["\u041F\u043D", "\u0412\u0442", "\u0421\u0440", "\u0427\u0442", "\u041F\u0442", "\u0421\u0431", "\u0412\u0441"];
25956
25955
  let range3 = [];
25956
+ const dateValue = computed$1({
25957
+ get: () => props.modelValue,
25958
+ set: (val) => {
25959
+ emit2("update:modelValue", val);
25960
+ }
25961
+ });
25962
+ watch(dateValue, (value) => {
25963
+ for (let i2 = 0; i2 < value.split("-").length; i2++) {
25964
+ if (regMask.test(value.split("-")[i2])) {
25965
+ if (i2 === 0)
25966
+ startDate.value = dayjs(value.split("-")[i2].split(".").reverse().join("-"));
25967
+ if (i2 === 1)
25968
+ endDate.value = dayjs(value.split("-")[i2].split(".").reverse().join("-"));
25969
+ }
25970
+ }
25971
+ range3 = [startDate.value, endDate.value];
25972
+ if (startDate.value.isAfter(endDate.value)) {
25973
+ endDate.value = range3[0];
25974
+ startDate.value = range3[1];
25975
+ range3 = [startDate.value, endDate.value];
25976
+ }
25977
+ setupUpdate();
25978
+ });
25957
25979
  const updateDate = (event, flag) => {
25958
25980
  if (regMask.test(event.target.value)) {
25959
25981
  if (flag) {
@@ -26072,10 +26094,10 @@ const _sfc_main$u = {
26072
26094
  }
26073
26095
  if (startDate.value.isAfter(endDate.value)) {
26074
26096
  dateValue.value = endDate.value.format("DD.MM.YYYY") + "-" + startDate.value.format("DD.MM.YYYY");
26075
- emit2("update:modelValue", endDate.value.format("DD.MM.YY") + "-" + startDate.value.format("DD.MM.YY"));
26097
+ emit2("update:modelValue", endDate.value.format("DD.MM.YYYY") + "-" + startDate.value.format("DD.MM.YYYY"));
26076
26098
  } else {
26077
26099
  dateValue.value = startDate.value.format("DD.MM.YYYY") + "-" + endDate.value.format("DD.MM.YYYY");
26078
- emit2("update:modelValue", startDate.value.format("DD.MM.YY") + "-" + endDate.value.format("DD.MM.YY"));
26100
+ emit2("update:modelValue", startDate.value.format("DD.MM.YYYY") + "-" + endDate.value.format("DD.MM.YYYY"));
26079
26101
  }
26080
26102
  emit2("changeOpen", true);
26081
26103
  };
@@ -26210,8 +26232,8 @@ const _sfc_main$u = {
26210
26232
  __props.showInput ? (openBlock(), createElementBlock("div", _hoisted_2$q, [
26211
26233
  createVNode(_sfc_main$z, {
26212
26234
  mask: "##.##.####-##.##.####",
26213
- modelValue: dateValue.value,
26214
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dateValue.value = $event),
26235
+ modelValue: unref(dateValue),
26236
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(dateValue) ? dateValue.value = $event : null),
26215
26237
  label: __props.label,
26216
26238
  placeholder: __props.placeholder,
26217
26239
  onInput: updateDate,
@@ -26305,7 +26327,7 @@ const _sfc_main$u = {
26305
26327
  "pl-date-picker__day-item_disabled": item.type !== "current"
26306
26328
  },
26307
26329
  {
26308
- "pl-date-picker__day-item_svg-circle-background": activeDay(item)
26330
+ "pl-date-picker__day-item_svg-circle-background": activeDay(item) && item.type === "current"
26309
26331
  },
26310
26332
  {
26311
26333
  "pl-date-picker__background-range": item.type !== "previous" && item.type !== "next" ? updateSelection(item, true) : ""