@factoringplus/pl-components-pack-v3 0.5.8 → 0.5.10-pre-1
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 +137 -115
- package/dist/pl-components-pack-v3.umd.js +25 -25
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -25896,11 +25896,12 @@ var objectSupport$1 = { exports: {} };
|
|
|
25896
25896
|
})(objectSupport$1);
|
|
25897
25897
|
var objectSupport = objectSupport$1.exports;
|
|
25898
25898
|
var plDatePickerRange_vue_vue_type_style_index_0_lang = "";
|
|
25899
|
-
const _hoisted_1$v =
|
|
25900
|
-
const _hoisted_2$r = {
|
|
25901
|
-
|
|
25902
|
-
|
|
25903
|
-
|
|
25899
|
+
const _hoisted_1$v = ["id"];
|
|
25900
|
+
const _hoisted_2$r = /* @__PURE__ */ createElementVNode("img", {
|
|
25901
|
+
class: "date-picker__img",
|
|
25902
|
+
src: _imports_0$8,
|
|
25903
|
+
alt: "date-picker icon"
|
|
25904
|
+
}, null, -1);
|
|
25904
25905
|
const _hoisted_3$n = { class: "date-switcher__container flex-column" };
|
|
25905
25906
|
const _hoisted_4$h = { class: "d-flex pb-4 justify-content-between" };
|
|
25906
25907
|
const _hoisted_5$b = { class: "date-switcher justify-content-center flex-column" };
|
|
@@ -25946,8 +25947,24 @@ const _sfc_main$w = {
|
|
|
25946
25947
|
dayjs.extend(isBetween);
|
|
25947
25948
|
dayjs.extend(objectSupport);
|
|
25948
25949
|
const { isOpen } = toRefs(props);
|
|
25950
|
+
const randId = ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c2) => (c2 ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c2 / 4).toString(16));
|
|
25951
|
+
const offsetTop = ref(0);
|
|
25952
|
+
const offsetLeft = ref(0);
|
|
25953
|
+
const calculateOffsets = () => {
|
|
25954
|
+
const currentDatePicker = document.getElementById(`date-picker-range-${randId}`);
|
|
25955
|
+
const offsets = currentDatePicker.getBoundingClientRect();
|
|
25956
|
+
offsetLeft.value = offsets.x;
|
|
25957
|
+
offsetTop.value = offsets.y + offsets.height;
|
|
25958
|
+
};
|
|
25959
|
+
onMounted(() => {
|
|
25960
|
+
calculateOffsets();
|
|
25961
|
+
});
|
|
25949
25962
|
const validateDateValueString = (dateStr) => {
|
|
25950
|
-
|
|
25963
|
+
if (dateStr.includes("-")) {
|
|
25964
|
+
return dayjs(dateStr.split("-")[0], "DD.MM.YYYY", true).isValid() && dayjs(dateStr.split("-")[1], "DD.MM.YYYY", true).isValid();
|
|
25965
|
+
} else {
|
|
25966
|
+
return dayjs(dateStr, "DD.MM.YYYY", true).isValid();
|
|
25967
|
+
}
|
|
25951
25968
|
};
|
|
25952
25969
|
const currentDate = ref(dayjs());
|
|
25953
25970
|
const startDate = ref(dayjs());
|
|
@@ -26242,8 +26259,15 @@ const _sfc_main$w = {
|
|
|
26242
26259
|
});
|
|
26243
26260
|
return (_ctx, _cache) => {
|
|
26244
26261
|
const _directive_maska = resolveDirective("maska");
|
|
26245
|
-
return openBlock(), createElementBlock("div",
|
|
26246
|
-
|
|
26262
|
+
return openBlock(), createElementBlock("div", {
|
|
26263
|
+
class: "date-picker",
|
|
26264
|
+
id: `date-picker-range-${unref(randId)}`
|
|
26265
|
+
}, [
|
|
26266
|
+
__props.showInput ? (openBlock(), createElementBlock("div", {
|
|
26267
|
+
key: 0,
|
|
26268
|
+
class: "date-picker__wrapper",
|
|
26269
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emit2("changeOpen", !unref(isOpen)))
|
|
26270
|
+
}, [
|
|
26247
26271
|
createVNode(_sfc_main$B, {
|
|
26248
26272
|
mask: "##.##.####-##.##.####",
|
|
26249
26273
|
modelValue: unref(dateValue),
|
|
@@ -26253,120 +26277,118 @@ const _sfc_main$w = {
|
|
|
26253
26277
|
onInput: updateDate,
|
|
26254
26278
|
datePicker: ""
|
|
26255
26279
|
}, null, 8, ["mask", "modelValue", "label", "placeholder"]),
|
|
26256
|
-
|
|
26257
|
-
class: "date-picker__img",
|
|
26258
|
-
src: _imports_0$8,
|
|
26259
|
-
alt: "date-picker icon",
|
|
26260
|
-
onClick: _cache[1] || (_cache[1] = ($event) => emit2("changeOpen", !unref(isOpen)))
|
|
26261
|
-
})
|
|
26280
|
+
_hoisted_2$r
|
|
26262
26281
|
])) : createCommentVNode("", true),
|
|
26263
|
-
|
|
26264
|
-
|
|
26265
|
-
|
|
26266
|
-
|
|
26267
|
-
|
|
26268
|
-
|
|
26269
|
-
|
|
26270
|
-
|
|
26271
|
-
|
|
26272
|
-
|
|
26273
|
-
|
|
26274
|
-
|
|
26275
|
-
|
|
26276
|
-
"
|
|
26277
|
-
|
|
26278
|
-
|
|
26279
|
-
|
|
26280
|
-
|
|
26281
|
-
|
|
26282
|
-
|
|
26283
|
-
|
|
26282
|
+
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
26283
|
+
!unref(isOpen) ? (openBlock(), createElementBlock("div", {
|
|
26284
|
+
key: 0,
|
|
26285
|
+
id: "date-picker-popup",
|
|
26286
|
+
class: "pl-date-picker__popup",
|
|
26287
|
+
ref_key: "datePickerRef",
|
|
26288
|
+
ref: datePickerRef,
|
|
26289
|
+
style: normalizeStyle({ top: `${offsetTop.value}px`, left: `${offsetLeft.value}px` })
|
|
26290
|
+
}, [
|
|
26291
|
+
createElementVNode("div", _hoisted_3$n, [
|
|
26292
|
+
createElementVNode("div", _hoisted_4$h, [
|
|
26293
|
+
createElementVNode("div", _hoisted_5$b, [
|
|
26294
|
+
_hoisted_6$7,
|
|
26295
|
+
withDirectives(createElementVNode("input", {
|
|
26296
|
+
id: "date-mask",
|
|
26297
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => rangeStartDateValue.value = $event),
|
|
26298
|
+
onInput: updateDate,
|
|
26299
|
+
type: "text",
|
|
26300
|
+
placeholder: "\u0414\u0414.\u041C\u041C.\u0413\u0413\u0413\u0413",
|
|
26301
|
+
class: "pl-date-picker__input"
|
|
26302
|
+
}, null, 544), [
|
|
26303
|
+
[_directive_maska, "##.##.####"],
|
|
26304
|
+
[vModelText, rangeStartDateValue.value]
|
|
26305
|
+
])
|
|
26306
|
+
]),
|
|
26307
|
+
createElementVNode("div", _hoisted_7$5, [
|
|
26308
|
+
_hoisted_8$4,
|
|
26309
|
+
withDirectives(createElementVNode("input", {
|
|
26310
|
+
id: "date-mask",
|
|
26311
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => rangeEndDateValue.value = $event),
|
|
26312
|
+
onInput: _cache[4] || (_cache[4] = ($event) => updateDate($event, true)),
|
|
26313
|
+
type: "text",
|
|
26314
|
+
placeholder: "\u0414\u0414.\u041C\u041C.\u0413\u0413\u0413\u0413",
|
|
26315
|
+
class: "pl-date-picker__input"
|
|
26316
|
+
}, null, 544), [
|
|
26317
|
+
[_directive_maska, "##.##.####"],
|
|
26318
|
+
[vModelText, rangeEndDateValue.value]
|
|
26319
|
+
])
|
|
26284
26320
|
])
|
|
26285
26321
|
]),
|
|
26286
|
-
createElementVNode("div",
|
|
26287
|
-
|
|
26288
|
-
|
|
26289
|
-
|
|
26290
|
-
|
|
26291
|
-
|
|
26292
|
-
|
|
26293
|
-
|
|
26294
|
-
|
|
26295
|
-
|
|
26296
|
-
|
|
26297
|
-
|
|
26322
|
+
createElementVNode("div", _hoisted_9$4, [
|
|
26323
|
+
createElementVNode("div", _hoisted_10$3, [
|
|
26324
|
+
createElementVNode("div", {
|
|
26325
|
+
class: "date-switcher__arrow date-switcher__arrow-left",
|
|
26326
|
+
onClick: switchPrevMonth
|
|
26327
|
+
}),
|
|
26328
|
+
createElementVNode("span", _hoisted_11$3, toDisplayString(capitalize2(currentDate.value.format("MMMM"))), 1),
|
|
26329
|
+
createElementVNode("div", {
|
|
26330
|
+
class: "date-switcher__arrow date-switcher__arrow-right",
|
|
26331
|
+
onClick: switchNextMonth
|
|
26332
|
+
})
|
|
26333
|
+
]),
|
|
26334
|
+
createElementVNode("div", _hoisted_12$3, [
|
|
26335
|
+
createElementVNode("div", {
|
|
26336
|
+
class: "date-switcher__arrow date-switcher__arrow-left",
|
|
26337
|
+
onClick: switchPrevYear
|
|
26338
|
+
}),
|
|
26339
|
+
createElementVNode("span", _hoisted_13$3, toDisplayString(capitalize2(currentDate.value.format("YYYY"))), 1),
|
|
26340
|
+
createElementVNode("div", {
|
|
26341
|
+
class: "date-switcher__arrow date-switcher__arrow-right",
|
|
26342
|
+
onClick: switchNextYear
|
|
26343
|
+
})
|
|
26298
26344
|
])
|
|
26299
26345
|
])
|
|
26300
26346
|
]),
|
|
26301
|
-
createElementVNode("div",
|
|
26302
|
-
|
|
26303
|
-
createElementVNode("div", {
|
|
26304
|
-
class: "
|
|
26305
|
-
|
|
26306
|
-
}
|
|
26307
|
-
|
|
26308
|
-
|
|
26309
|
-
|
|
26310
|
-
|
|
26311
|
-
|
|
26312
|
-
|
|
26313
|
-
|
|
26314
|
-
|
|
26315
|
-
|
|
26316
|
-
|
|
26317
|
-
|
|
26318
|
-
|
|
26319
|
-
|
|
26320
|
-
|
|
26321
|
-
|
|
26322
|
-
|
|
26323
|
-
|
|
26347
|
+
createElementVNode("div", _hoisted_14$3, [
|
|
26348
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(WEEK_DAYS2, (item, index) => {
|
|
26349
|
+
return createElementVNode("div", {
|
|
26350
|
+
class: "pl-date-picker__week-day",
|
|
26351
|
+
key: index
|
|
26352
|
+
}, [
|
|
26353
|
+
createElementVNode("span", null, toDisplayString(item), 1)
|
|
26354
|
+
]);
|
|
26355
|
+
}), 64)),
|
|
26356
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(daysData.value, (item, index) => {
|
|
26357
|
+
return openBlock(), createElementBlock("div", {
|
|
26358
|
+
class: normalizeClass([
|
|
26359
|
+
"pl-date-picker__day-item",
|
|
26360
|
+
item.type !== "previous" && item.type !== "next" ? framePosition(item) : "",
|
|
26361
|
+
{
|
|
26362
|
+
"pl-date-picker__day-item_disabled": item.type !== "current"
|
|
26363
|
+
},
|
|
26364
|
+
{
|
|
26365
|
+
"pl-date-picker__day-item_svg-circle-background": activeDay(item) && item.type === "current"
|
|
26366
|
+
},
|
|
26367
|
+
{
|
|
26368
|
+
"pl-date-picker__background-range": item.type !== "previous" && item.type !== "next" ? updateSelection(item, true) : ""
|
|
26369
|
+
}
|
|
26370
|
+
]),
|
|
26371
|
+
key: `dd${index}`,
|
|
26372
|
+
onClick: ($event) => item.type !== "previous" && item.type !== "next" ? toggleSelection(item) : "",
|
|
26373
|
+
onMousemove: ($event) => item.type !== "previous" && item.type !== "next" ? updateSelection(item, false) : ""
|
|
26374
|
+
}, [
|
|
26375
|
+
createElementVNode("div", _hoisted_16$2, toDisplayString(item.type !== "previous" && item.type !== "next" ? item.day : ""), 1)
|
|
26376
|
+
], 42, _hoisted_15$2);
|
|
26377
|
+
}), 128))
|
|
26378
|
+
]),
|
|
26379
|
+
createElementVNode("div", { class: "pl-date-picker__buttons" }, [
|
|
26380
|
+
createElementVNode("button", {
|
|
26381
|
+
class: "pl-date-picker__btn pl-date-picker__btn-cancel",
|
|
26382
|
+
onClick: cancelButton
|
|
26383
|
+
}, " \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C "),
|
|
26384
|
+
createElementVNode("button", {
|
|
26385
|
+
class: "pl-date-picker__btn pl-date-picker__btn-confirm",
|
|
26386
|
+
onClick: confirmDate
|
|
26387
|
+
}, " \u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C ")
|
|
26324
26388
|
])
|
|
26325
|
-
]),
|
|
26326
|
-
|
|
26327
|
-
|
|
26328
|
-
return createElementVNode("div", {
|
|
26329
|
-
class: "pl-date-picker__week-day",
|
|
26330
|
-
key: index
|
|
26331
|
-
}, [
|
|
26332
|
-
createElementVNode("span", null, toDisplayString(item), 1)
|
|
26333
|
-
]);
|
|
26334
|
-
}), 64)),
|
|
26335
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(daysData.value, (item, index) => {
|
|
26336
|
-
return openBlock(), createElementBlock("div", {
|
|
26337
|
-
class: normalizeClass([
|
|
26338
|
-
"pl-date-picker__day-item",
|
|
26339
|
-
item.type !== "previous" && item.type !== "next" ? framePosition(item) : "",
|
|
26340
|
-
{
|
|
26341
|
-
"pl-date-picker__day-item_disabled": item.type !== "current"
|
|
26342
|
-
},
|
|
26343
|
-
{
|
|
26344
|
-
"pl-date-picker__day-item_svg-circle-background": activeDay(item) && item.type === "current"
|
|
26345
|
-
},
|
|
26346
|
-
{
|
|
26347
|
-
"pl-date-picker__background-range": item.type !== "previous" && item.type !== "next" ? updateSelection(item, true) : ""
|
|
26348
|
-
}
|
|
26349
|
-
]),
|
|
26350
|
-
key: `dd${index}`,
|
|
26351
|
-
onClick: ($event) => item.type !== "previous" && item.type !== "next" ? toggleSelection(item) : "",
|
|
26352
|
-
onMousemove: ($event) => item.type !== "previous" && item.type !== "next" ? updateSelection(item, false) : ""
|
|
26353
|
-
}, [
|
|
26354
|
-
createElementVNode("div", _hoisted_16$2, toDisplayString(item.type !== "previous" && item.type !== "next" ? item.day : ""), 1)
|
|
26355
|
-
], 42, _hoisted_15$2);
|
|
26356
|
-
}), 128))
|
|
26357
|
-
]),
|
|
26358
|
-
createElementVNode("div", { class: "pl-date-picker__buttons" }, [
|
|
26359
|
-
createElementVNode("button", {
|
|
26360
|
-
class: "pl-date-picker__btn pl-date-picker__btn-cancel",
|
|
26361
|
-
onClick: cancelButton
|
|
26362
|
-
}, " \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C "),
|
|
26363
|
-
createElementVNode("button", {
|
|
26364
|
-
class: "pl-date-picker__btn pl-date-picker__btn-confirm",
|
|
26365
|
-
onClick: confirmDate
|
|
26366
|
-
}, " \u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C ")
|
|
26367
|
-
])
|
|
26368
|
-
], 512)) : createCommentVNode("", true)
|
|
26369
|
-
]);
|
|
26389
|
+
], 4)) : createCommentVNode("", true)
|
|
26390
|
+
]))
|
|
26391
|
+
], 8, _hoisted_1$v);
|
|
26370
26392
|
};
|
|
26371
26393
|
}
|
|
26372
26394
|
};
|