@factoringplus/pl-components-pack-v3 0.4.53 → 0.4.55-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 +293 -102
- package/dist/pl-components-pack-v3.umd.js +17 -17
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -10976,7 +10976,7 @@ const _hoisted_1$Q = ["onClick"];
|
|
|
10976
10976
|
const _hoisted_2$F = ["aria-label"];
|
|
10977
10977
|
const _hoisted_3$u = ["aria-label"];
|
|
10978
10978
|
const _hoisted_4$k = ["aria-label"];
|
|
10979
|
-
const _hoisted_5$
|
|
10979
|
+
const _hoisted_5$e = ["aria-label"];
|
|
10980
10980
|
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
10981
10981
|
__name: "panel-date-pick",
|
|
10982
10982
|
props: panelDatePickProps,
|
|
@@ -11515,7 +11515,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
11515
11515
|
]),
|
|
11516
11516
|
_: 1
|
|
11517
11517
|
})
|
|
11518
|
-
], 10, _hoisted_5$
|
|
11518
|
+
], 10, _hoisted_5$e)
|
|
11519
11519
|
], 2)
|
|
11520
11520
|
], 2), [
|
|
11521
11521
|
[vShow, currentView.value !== "time"]
|
|
@@ -11697,7 +11697,7 @@ const _hoisted_1$P = ["onClick"];
|
|
|
11697
11697
|
const _hoisted_2$E = ["disabled"];
|
|
11698
11698
|
const _hoisted_3$t = ["disabled"];
|
|
11699
11699
|
const _hoisted_4$j = ["disabled"];
|
|
11700
|
-
const _hoisted_5$
|
|
11700
|
+
const _hoisted_5$d = ["disabled"];
|
|
11701
11701
|
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
11702
11702
|
__name: "panel-date-range",
|
|
11703
11703
|
props: panelDateRangeProps,
|
|
@@ -12259,7 +12259,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
12259
12259
|
]),
|
|
12260
12260
|
_: 1
|
|
12261
12261
|
})
|
|
12262
|
-
], 10, _hoisted_5$
|
|
12262
|
+
], 10, _hoisted_5$d)) : createCommentVNode("v-if", true),
|
|
12263
12263
|
createElementVNode("button", {
|
|
12264
12264
|
type: "button",
|
|
12265
12265
|
class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
|
|
@@ -16693,8 +16693,8 @@ const _hoisted_1$F = ["onKeyup"];
|
|
|
16693
16693
|
const _hoisted_2$y = ["aria-current", "tabindex"];
|
|
16694
16694
|
const _hoisted_3$q = ["tabindex"];
|
|
16695
16695
|
const _hoisted_4$i = ["aria-current", "tabindex"];
|
|
16696
|
-
const _hoisted_5$
|
|
16697
|
-
const _hoisted_6$
|
|
16696
|
+
const _hoisted_5$c = ["tabindex"];
|
|
16697
|
+
const _hoisted_6$7 = ["aria-current", "tabindex"];
|
|
16698
16698
|
const __default__$j = {
|
|
16699
16699
|
name: "ElPaginationPager"
|
|
16700
16700
|
};
|
|
@@ -16875,7 +16875,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
16875
16875
|
onBlur: _cache[7] || (_cache[7] = ($event) => quickNextFocus.value = false)
|
|
16876
16876
|
}, [
|
|
16877
16877
|
quickNextHover.value || quickNextFocus.value ? (openBlock(), createBlock(unref(d_arrow_right_default), { key: 0 })) : (openBlock(), createBlock(unref(more_filled_default), { key: 1 }))
|
|
16878
|
-
], 42, _hoisted_5$
|
|
16878
|
+
], 42, _hoisted_5$c)) : createCommentVNode("v-if", true),
|
|
16879
16879
|
_ctx.pageCount > 1 ? (openBlock(), createElementBlock("li", {
|
|
16880
16880
|
key: 3,
|
|
16881
16881
|
class: normalizeClass([[
|
|
@@ -16884,7 +16884,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
16884
16884
|
], "number"]),
|
|
16885
16885
|
"aria-current": _ctx.currentPage === _ctx.pageCount,
|
|
16886
16886
|
tabindex: unref(tabindex)
|
|
16887
|
-
}, toDisplayString(_ctx.pageCount), 11, _hoisted_6$
|
|
16887
|
+
}, toDisplayString(_ctx.pageCount), 11, _hoisted_6$7)) : createCommentVNode("v-if", true)
|
|
16888
16888
|
], 42, _hoisted_1$F);
|
|
16889
16889
|
};
|
|
16890
16890
|
}
|
|
@@ -17195,7 +17195,7 @@ const _hoisted_1$E = ["aria-valuenow"];
|
|
|
17195
17195
|
const _hoisted_2$x = { viewBox: "0 0 100 100" };
|
|
17196
17196
|
const _hoisted_3$p = ["d", "stroke", "stroke-width"];
|
|
17197
17197
|
const _hoisted_4$h = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"];
|
|
17198
|
-
const _hoisted_5$
|
|
17198
|
+
const _hoisted_5$b = { key: 0 };
|
|
17199
17199
|
const __default__$i = {
|
|
17200
17200
|
name: "ElProgress"
|
|
17201
17201
|
};
|
|
@@ -17373,7 +17373,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
17373
17373
|
style: normalizeStyle({ fontSize: `${unref(progressTextSize)}px` })
|
|
17374
17374
|
}, [
|
|
17375
17375
|
renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [
|
|
17376
|
-
!_ctx.status ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
17376
|
+
!_ctx.status ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(unref(content)), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
|
|
17377
17377
|
default: withCtx(() => [
|
|
17378
17378
|
(openBlock(), createBlock(resolveDynamicComponent(unref(statusIcon))))
|
|
17379
17379
|
]),
|
|
@@ -22576,7 +22576,7 @@ const _hoisted_1$A = ["onKeydown"];
|
|
|
22576
22576
|
const _hoisted_2$u = ["src"];
|
|
22577
22577
|
const _hoisted_3$n = ["onClick"];
|
|
22578
22578
|
const _hoisted_4$g = ["onClick"];
|
|
22579
|
-
const _hoisted_5$
|
|
22579
|
+
const _hoisted_5$a = ["onClick"];
|
|
22580
22580
|
const __default__$f = {
|
|
22581
22581
|
name: "ElUploadList"
|
|
22582
22582
|
};
|
|
@@ -22725,7 +22725,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
22725
22725
|
]),
|
|
22726
22726
|
_: 1
|
|
22727
22727
|
}, 8, ["class"])
|
|
22728
|
-
], 10, _hoisted_5$
|
|
22728
|
+
], 10, _hoisted_5$a)) : createCommentVNode("v-if", true)
|
|
22729
22729
|
], 2)) : createCommentVNode("v-if", true)
|
|
22730
22730
|
])
|
|
22731
22731
|
], 42, _hoisted_1$A);
|
|
@@ -24501,6 +24501,10 @@ const _sfc_main$z = {
|
|
|
24501
24501
|
type: Boolean,
|
|
24502
24502
|
default: false
|
|
24503
24503
|
},
|
|
24504
|
+
datePicker: {
|
|
24505
|
+
type: Boolean,
|
|
24506
|
+
default: false
|
|
24507
|
+
},
|
|
24504
24508
|
maxLength: {
|
|
24505
24509
|
type: Number,
|
|
24506
24510
|
default: 210
|
|
@@ -24560,7 +24564,7 @@ const _sfc_main$z = {
|
|
|
24560
24564
|
default: () => ({ min: 0 })
|
|
24561
24565
|
}
|
|
24562
24566
|
},
|
|
24563
|
-
emits: ["update:modelValue", "validate"
|
|
24567
|
+
emits: ["update:modelValue", "validate"],
|
|
24564
24568
|
setup(__props, { emit: emit2 }) {
|
|
24565
24569
|
const props = __props;
|
|
24566
24570
|
const refInput = ref();
|
|
@@ -24677,6 +24681,7 @@ const _sfc_main$z = {
|
|
|
24677
24681
|
const _component_el_input = ElInput;
|
|
24678
24682
|
const _component_el_form_item = ElFormItem;
|
|
24679
24683
|
const _component_el_form = ElForm;
|
|
24684
|
+
const _directive_maska = resolveDirective("maska");
|
|
24680
24685
|
return openBlock(), createElementBlock("div", null, [
|
|
24681
24686
|
createVNode(_component_el_form, {
|
|
24682
24687
|
onValidate: validateInp,
|
|
@@ -24718,15 +24723,26 @@ const _sfc_main$z = {
|
|
|
24718
24723
|
prop: __props.prop
|
|
24719
24724
|
}, {
|
|
24720
24725
|
default: withCtx(() => [
|
|
24721
|
-
|
|
24726
|
+
__props.datePicker ? withDirectives((openBlock(), createBlock(_component_el_input, {
|
|
24722
24727
|
key: 0,
|
|
24728
|
+
disabled: props.disabled,
|
|
24729
|
+
placeholder: props.placeholder,
|
|
24730
|
+
modelValue: unref(modelValue),
|
|
24731
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
24732
|
+
type: unref(getTypeInput),
|
|
24733
|
+
resize: "none",
|
|
24734
|
+
onInput: updateValue
|
|
24735
|
+
}, null, 8, ["disabled", "placeholder", "modelValue", "type"])), [
|
|
24736
|
+
[_directive_maska, "##.##.####"]
|
|
24737
|
+
]) : !unref(currency) ? (openBlock(), createBlock(_component_el_input, mergeProps({
|
|
24738
|
+
key: 1,
|
|
24723
24739
|
class: { padding: props.prefix },
|
|
24724
24740
|
minlength: __props.minLength,
|
|
24725
24741
|
maxlength: __props.maxLength,
|
|
24726
24742
|
disabled: props.disabled,
|
|
24727
24743
|
placeholder: props.placeholder,
|
|
24728
24744
|
modelValue: unref(modelValue),
|
|
24729
|
-
"onUpdate:modelValue": _cache[
|
|
24745
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
24730
24746
|
type: unref(getTypeInput),
|
|
24731
24747
|
resize: "none"
|
|
24732
24748
|
}, _ctx.$attrs, {
|
|
@@ -24734,7 +24750,7 @@ const _sfc_main$z = {
|
|
|
24734
24750
|
clearable: props.clearable,
|
|
24735
24751
|
onInput: updateValue
|
|
24736
24752
|
}), null, 16, ["class", "minlength", "maxlength", "disabled", "placeholder", "modelValue", "type", "clearable"])) : (openBlock(), createBlock(_component_el_input, mergeProps({
|
|
24737
|
-
key:
|
|
24753
|
+
key: 2,
|
|
24738
24754
|
onKeydown: keydown,
|
|
24739
24755
|
class: { padding: props.prefix },
|
|
24740
24756
|
minlength: __props.minLength,
|
|
@@ -24746,14 +24762,14 @@ const _sfc_main$z = {
|
|
|
24746
24762
|
ref_key: "inputRef",
|
|
24747
24763
|
ref: inputRef,
|
|
24748
24764
|
modelValue: unref(formattedValue),
|
|
24749
|
-
"onUpdate:modelValue": _cache[
|
|
24765
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(formattedValue) ? formattedValue.value = $event : null)
|
|
24750
24766
|
}), createSlots({ _: 2 }, [
|
|
24751
24767
|
unref(currency) ? {
|
|
24752
24768
|
name: "append",
|
|
24753
24769
|
fn: withCtx(() => [
|
|
24754
24770
|
createElementVNode("span", {
|
|
24755
24771
|
class: "pl-currency__rub-icon",
|
|
24756
|
-
onClick: _cache[
|
|
24772
|
+
onClick: _cache[2] || (_cache[2] = ($event) => throuInput($event))
|
|
24757
24773
|
}, "\u20BD")
|
|
24758
24774
|
])
|
|
24759
24775
|
} : void 0
|
|
@@ -34469,8 +34485,8 @@ const _hoisted_4$f = {
|
|
|
34469
34485
|
key: 0,
|
|
34470
34486
|
class: "dialog-footer"
|
|
34471
34487
|
};
|
|
34472
|
-
const _hoisted_5$
|
|
34473
|
-
const _hoisted_6$
|
|
34488
|
+
const _hoisted_5$9 = /* @__PURE__ */ createTextVNode("\u0412\u044B\u0431\u0440\u0430\u0442\u044C");
|
|
34489
|
+
const _hoisted_6$6 = /* @__PURE__ */ createTextVNode("\u041E\u0442\u043C\u0435\u043D\u0430");
|
|
34474
34490
|
const _hoisted_7$4 = {
|
|
34475
34491
|
key: 1,
|
|
34476
34492
|
class: "dialog-footer"
|
|
@@ -34656,13 +34672,13 @@ const _sfc_main$s = /* @__PURE__ */ Object.assign(__default__$6, {
|
|
|
34656
34672
|
onClick: onAppendClickSingle
|
|
34657
34673
|
}, {
|
|
34658
34674
|
default: withCtx(() => [
|
|
34659
|
-
_hoisted_5$
|
|
34675
|
+
_hoisted_5$9
|
|
34660
34676
|
]),
|
|
34661
34677
|
_: 1
|
|
34662
34678
|
}, 8, ["disabled"]),
|
|
34663
34679
|
createVNode(_component_el_button, { onClick: hide }, {
|
|
34664
34680
|
default: withCtx(() => [
|
|
34665
|
-
_hoisted_6$
|
|
34681
|
+
_hoisted_6$6
|
|
34666
34682
|
]),
|
|
34667
34683
|
_: 1
|
|
34668
34684
|
})
|
|
@@ -34781,11 +34797,11 @@ const _hoisted_3$l = /* @__PURE__ */ createElementVNode("img", {
|
|
|
34781
34797
|
alt: "no data image"
|
|
34782
34798
|
}, null, -1);
|
|
34783
34799
|
const _hoisted_4$e = { class: "no-data__text" };
|
|
34784
|
-
const _hoisted_5$
|
|
34800
|
+
const _hoisted_5$8 = {
|
|
34785
34801
|
key: 0,
|
|
34786
34802
|
class: "d-flex pl-table-footer position-relative align-items-center justify-content-end"
|
|
34787
34803
|
};
|
|
34788
|
-
const _hoisted_6$
|
|
34804
|
+
const _hoisted_6$5 = {
|
|
34789
34805
|
key: 0,
|
|
34790
34806
|
class: "totals"
|
|
34791
34807
|
};
|
|
@@ -34906,7 +34922,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign(__default__$5, {
|
|
|
34906
34922
|
]),
|
|
34907
34923
|
_: 3
|
|
34908
34924
|
}, 8, ["locale"]),
|
|
34909
|
-
unref(hasPagination) ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
34925
|
+
unref(hasPagination) ? (openBlock(), createElementBlock("div", _hoisted_5$8, [
|
|
34910
34926
|
withDirectives(createElementVNode("div", { style: { "line-height": "33px" } }, toDisplayString(unref(declOfNum)(selectedRows.value.length, ["\u0412\u044B\u0431\u0440\u0430\u043D", "\u0412\u044B\u0431\u0440\u0430\u043D\u043E", "\u0412\u044B\u0431\u0440\u0430\u043D\u043E"])) + " " + toDisplayString(selectedRows.value.length) + " " + toDisplayString(unref(declOfNum)(selectedRows.value.length, [
|
|
34911
34927
|
"\u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442",
|
|
34912
34928
|
"\u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430",
|
|
@@ -34925,7 +34941,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign(__default__$5, {
|
|
|
34925
34941
|
"hide-on-single-page": true
|
|
34926
34942
|
}, {
|
|
34927
34943
|
default: withCtx(() => [
|
|
34928
|
-
__props.isTotalVisible && unref(layout).includes("slot") ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
34944
|
+
__props.isTotalVisible && unref(layout).includes("slot") ? (openBlock(), createElementBlock("span", _hoisted_6$5, toDisplayString(displayTotal()), 1)) : createCommentVNode("", true)
|
|
34929
34945
|
]),
|
|
34930
34946
|
_: 1
|
|
34931
34947
|
}, 8, ["page-size", "current-page", "page-sizes", "layout", "total"]),
|
|
@@ -36238,24 +36254,23 @@ const _sfc_main$o = /* @__PURE__ */ Object.assign(__default__$2, {
|
|
|
36238
36254
|
modelValue: { type: Array, default: () => [] },
|
|
36239
36255
|
header: { type: Boolean, default: true },
|
|
36240
36256
|
main: { type: Boolean, default: true },
|
|
36241
|
-
height: { type: String, default: "150" }
|
|
36257
|
+
height: { type: String, default: "150" },
|
|
36258
|
+
limit: { type: Number }
|
|
36242
36259
|
},
|
|
36243
36260
|
emits: [
|
|
36244
36261
|
"on-files-not-attached",
|
|
36245
36262
|
"on-file-not-accept",
|
|
36246
36263
|
"on-file-size-exceeded",
|
|
36247
36264
|
"on-file-empty",
|
|
36248
|
-
"on-
|
|
36249
|
-
"on-
|
|
36250
|
-
"input",
|
|
36251
|
-
"on-error"
|
|
36265
|
+
"on-file-not-limit",
|
|
36266
|
+
"on-change"
|
|
36252
36267
|
],
|
|
36253
36268
|
setup(__props, { emit: emit2 }) {
|
|
36254
36269
|
const props = __props;
|
|
36255
36270
|
ref(false);
|
|
36256
36271
|
const fileList = ref(props.modelValue);
|
|
36257
36272
|
const el = ref(null);
|
|
36258
|
-
const { modelValue } = toRefs(props);
|
|
36273
|
+
const { modelValue, limit } = toRefs(props);
|
|
36259
36274
|
watch(modelValue, (newValue) => {
|
|
36260
36275
|
fileList.value = newValue;
|
|
36261
36276
|
});
|
|
@@ -36264,6 +36279,11 @@ const _sfc_main$o = /* @__PURE__ */ Object.assign(__default__$2, {
|
|
|
36264
36279
|
emit2("on-files-not-attached", file, fileList2);
|
|
36265
36280
|
return;
|
|
36266
36281
|
}
|
|
36282
|
+
if (fileList2.length > limit.value) {
|
|
36283
|
+
fileList2.splice(-1);
|
|
36284
|
+
emit2("on-file-not-limit", file, fileList2);
|
|
36285
|
+
return;
|
|
36286
|
+
}
|
|
36267
36287
|
if (props.accept !== "any" || props.accept !== "\u043B\u044E\u0431\u043E\u0439") {
|
|
36268
36288
|
const fileArr = file.name.split(".");
|
|
36269
36289
|
const fileExtension = "." + fileArr[fileArr.length - 1].toLowerCase();
|
|
@@ -36427,7 +36447,7 @@ const _hoisted_1$n = { class: "suggestion" };
|
|
|
36427
36447
|
const _hoisted_2$k = { class: "d-flex flex-column" };
|
|
36428
36448
|
const _hoisted_3$i = { class: "text-truncate" };
|
|
36429
36449
|
const _hoisted_4$b = { class: "suggestion__item-info text-truncate" };
|
|
36430
|
-
const _hoisted_5$
|
|
36450
|
+
const _hoisted_5$7 = {
|
|
36431
36451
|
key: 0,
|
|
36432
36452
|
src: _imports_1$2
|
|
36433
36453
|
};
|
|
@@ -36478,7 +36498,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36478
36498
|
createElementVNode("span", _hoisted_3$i, toDisplayString(item.value), 1),
|
|
36479
36499
|
createElementVNode("span", _hoisted_4$b, toDisplayString(item.bottomText), 1)
|
|
36480
36500
|
]),
|
|
36481
|
-
item.id === $props.selectedItem.id ? (openBlock(), createElementBlock("img", _hoisted_5$
|
|
36501
|
+
item.id === $props.selectedItem.id ? (openBlock(), createElementBlock("img", _hoisted_5$7)) : createCommentVNode("", true)
|
|
36482
36502
|
]),
|
|
36483
36503
|
_: 2
|
|
36484
36504
|
}, 1032, ["onClick", "value"]);
|
|
@@ -36574,7 +36594,8 @@ const ApiJs = function(optionsRequest, isGetResourse = false, token) {
|
|
|
36574
36594
|
...options.headers
|
|
36575
36595
|
},
|
|
36576
36596
|
data: formatDateObj(options.data, true),
|
|
36577
|
-
responseType: options.responseType
|
|
36597
|
+
responseType: options.responseType,
|
|
36598
|
+
signal: options.signal
|
|
36578
36599
|
}).then((resourse) => {
|
|
36579
36600
|
if (isGetResourse)
|
|
36580
36601
|
resolve(formatDateObj(resourse));
|
|
@@ -37245,7 +37266,7 @@ const _hoisted_1$e = { class: "date-switcher__container" };
|
|
|
37245
37266
|
const _hoisted_2$d = { class: "date-switcher date-switcher__month" };
|
|
37246
37267
|
const _hoisted_3$c = { class: "date-switcher__month-name" };
|
|
37247
37268
|
const _hoisted_4$8 = { class: "date-switcher date-switcher__year" };
|
|
37248
|
-
const _hoisted_5$
|
|
37269
|
+
const _hoisted_5$6 = { class: "date-switcher__year-name" };
|
|
37249
37270
|
const _sfc_main$e = {
|
|
37250
37271
|
__name: "date-switcher",
|
|
37251
37272
|
props: {
|
|
@@ -37292,7 +37313,7 @@ const _sfc_main$e = {
|
|
|
37292
37313
|
class: "date-switcher__arrow date-switcher__arrow-left",
|
|
37293
37314
|
onClick: switchPrevYear
|
|
37294
37315
|
}),
|
|
37295
|
-
createElementVNode("span", _hoisted_5$
|
|
37316
|
+
createElementVNode("span", _hoisted_5$6, toDisplayString(capitalize2(unref(modelValue).format("YYYY"))), 1),
|
|
37296
37317
|
createElementVNode("div", {
|
|
37297
37318
|
class: "date-switcher__arrow date-switcher__arrow-right",
|
|
37298
37319
|
onClick: switchNextYear
|
|
@@ -37302,38 +37323,174 @@ const _sfc_main$e = {
|
|
|
37302
37323
|
};
|
|
37303
37324
|
}
|
|
37304
37325
|
};
|
|
37305
|
-
|
|
37306
|
-
|
|
37307
|
-
|
|
37308
|
-
|
|
37309
|
-
|
|
37310
|
-
|
|
37311
|
-
|
|
37312
|
-
|
|
37313
|
-
|
|
37314
|
-
|
|
37315
|
-
|
|
37316
|
-
|
|
37317
|
-
|
|
37318
|
-
|
|
37326
|
+
var calendar = [
|
|
37327
|
+
{
|
|
37328
|
+
year: 2022,
|
|
37329
|
+
months: [
|
|
37330
|
+
{
|
|
37331
|
+
month: 1,
|
|
37332
|
+
days: "1,2,3,4,5,6,7,8,9,15,16,22,23,29,30"
|
|
37333
|
+
},
|
|
37334
|
+
{
|
|
37335
|
+
month: 2,
|
|
37336
|
+
days: "5,6,12,13,19,20,22*,23,26,27"
|
|
37337
|
+
},
|
|
37338
|
+
{
|
|
37339
|
+
month: 3,
|
|
37340
|
+
days: "5*,6,7+,8,12,13,19,20,26,27"
|
|
37341
|
+
},
|
|
37342
|
+
{
|
|
37343
|
+
month: 4,
|
|
37344
|
+
days: "2,3,9,10,16,17,23,24,30"
|
|
37345
|
+
},
|
|
37346
|
+
{
|
|
37347
|
+
month: 5,
|
|
37348
|
+
days: "1,2+,3+,7,8,9,10+,14,15,21,22,28,29"
|
|
37349
|
+
},
|
|
37350
|
+
{
|
|
37351
|
+
month: 6,
|
|
37352
|
+
days: "4,5,11,12,13+,18,19,25,26"
|
|
37353
|
+
},
|
|
37354
|
+
{
|
|
37355
|
+
month: 7,
|
|
37356
|
+
days: "2,3,9,10,16,17,23,24,30,31"
|
|
37357
|
+
},
|
|
37358
|
+
{
|
|
37359
|
+
month: 8,
|
|
37360
|
+
days: "6,7,13,14,20,21,27,28"
|
|
37361
|
+
},
|
|
37362
|
+
{
|
|
37363
|
+
month: 9,
|
|
37364
|
+
days: "3,4,10,11,17,18,24,25"
|
|
37365
|
+
},
|
|
37366
|
+
{
|
|
37367
|
+
month: 10,
|
|
37368
|
+
days: "1,2,8,9,15,16,22,23,29,30"
|
|
37369
|
+
},
|
|
37370
|
+
{
|
|
37371
|
+
month: 11,
|
|
37372
|
+
days: "3*,4,5,6,12,13,19,20,26,27"
|
|
37373
|
+
},
|
|
37374
|
+
{
|
|
37375
|
+
month: 12,
|
|
37376
|
+
days: "3,4,10,11,17,18,24,25,31"
|
|
37377
|
+
}
|
|
37378
|
+
],
|
|
37379
|
+
transitions: [
|
|
37380
|
+
{
|
|
37381
|
+
from: "03.05",
|
|
37382
|
+
to: "03.07"
|
|
37383
|
+
},
|
|
37384
|
+
{
|
|
37385
|
+
from: "05.01",
|
|
37386
|
+
to: "05.02"
|
|
37387
|
+
},
|
|
37388
|
+
{
|
|
37389
|
+
from: "01.01",
|
|
37390
|
+
to: "05.03"
|
|
37391
|
+
},
|
|
37392
|
+
{
|
|
37393
|
+
from: "01.02",
|
|
37394
|
+
to: "05.10"
|
|
37395
|
+
},
|
|
37396
|
+
{
|
|
37397
|
+
from: "06.12",
|
|
37398
|
+
to: "06.13"
|
|
37399
|
+
}
|
|
37400
|
+
],
|
|
37401
|
+
statistic: {
|
|
37402
|
+
workdays: 247,
|
|
37403
|
+
holidays: 118,
|
|
37404
|
+
hours40: 1973,
|
|
37405
|
+
hours36: 1775.4,
|
|
37406
|
+
hours24: 1182.6
|
|
37407
|
+
}
|
|
37408
|
+
},
|
|
37409
|
+
{
|
|
37410
|
+
year: 2023,
|
|
37411
|
+
months: [
|
|
37412
|
+
{
|
|
37413
|
+
month: 1,
|
|
37414
|
+
days: "1,2,3,4,5,6,7,8,14,15,21,22,28,29"
|
|
37415
|
+
},
|
|
37416
|
+
{
|
|
37417
|
+
month: 2,
|
|
37418
|
+
days: "4,5,11,12,18,19,22*,23,24+,25,26"
|
|
37419
|
+
},
|
|
37420
|
+
{
|
|
37421
|
+
month: 3,
|
|
37422
|
+
days: "4,5,7*,8,11,12,18,19,25,26"
|
|
37423
|
+
},
|
|
37424
|
+
{
|
|
37425
|
+
month: 4,
|
|
37426
|
+
days: "1,2,8,9,15,16,22,23,29,30"
|
|
37427
|
+
},
|
|
37428
|
+
{
|
|
37429
|
+
month: 5,
|
|
37430
|
+
days: "1,6,7,8+,9,13,14,20,21,27,28"
|
|
37431
|
+
},
|
|
37432
|
+
{
|
|
37433
|
+
month: 6,
|
|
37434
|
+
days: "3,4,10,11,12,17,18,24,25"
|
|
37435
|
+
},
|
|
37436
|
+
{
|
|
37437
|
+
month: 7,
|
|
37438
|
+
days: "1,2,8,9,15,16,22,23,29,30"
|
|
37439
|
+
},
|
|
37440
|
+
{
|
|
37441
|
+
month: 8,
|
|
37442
|
+
days: "5,6,12,13,19,20,26,27"
|
|
37443
|
+
},
|
|
37444
|
+
{
|
|
37445
|
+
month: 9,
|
|
37446
|
+
days: "2,3,9,10,16,17,23,24,30"
|
|
37447
|
+
},
|
|
37448
|
+
{
|
|
37449
|
+
month: 10,
|
|
37450
|
+
days: "1,7,8,14,15,21,22,28,29"
|
|
37451
|
+
},
|
|
37452
|
+
{
|
|
37453
|
+
month: 11,
|
|
37454
|
+
days: "3*,4,5,6+,11,12,18,19,25,26"
|
|
37455
|
+
},
|
|
37456
|
+
{
|
|
37457
|
+
month: 12,
|
|
37458
|
+
days: "2,3,9,10,16,17,23,24,30,31"
|
|
37459
|
+
}
|
|
37460
|
+
],
|
|
37461
|
+
transitions: [
|
|
37462
|
+
{
|
|
37463
|
+
from: "01.01",
|
|
37464
|
+
to: "02.24"
|
|
37465
|
+
},
|
|
37466
|
+
{
|
|
37467
|
+
from: "01.08",
|
|
37468
|
+
to: "05.08"
|
|
37469
|
+
},
|
|
37470
|
+
{
|
|
37471
|
+
from: "11.04",
|
|
37472
|
+
to: "11.06"
|
|
37473
|
+
}
|
|
37474
|
+
],
|
|
37475
|
+
statistic: {
|
|
37476
|
+
workdays: 247,
|
|
37477
|
+
holidays: 118,
|
|
37478
|
+
hours40: 1973,
|
|
37479
|
+
hours36: 1775.4,
|
|
37480
|
+
hours24: 1182.6
|
|
37481
|
+
}
|
|
37482
|
+
}
|
|
37319
37483
|
];
|
|
37484
|
+
const WEEK_DAYS = ["\u041F\u043D", "\u0412\u0442", "\u0421\u0440", "\u0427\u0442", "\u041F\u0442", "\u0421\u0431", "\u0412\u0441"];
|
|
37320
37485
|
var plDatePickerPlus_vue_vue_type_style_index_0_lang = "";
|
|
37321
37486
|
const _hoisted_1$d = { class: "date-picker-plus" };
|
|
37322
|
-
const _hoisted_2$c = {
|
|
37323
|
-
key: 0,
|
|
37324
|
-
class: "date-picker-plus__title"
|
|
37325
|
-
};
|
|
37326
|
-
const _hoisted_3$b = {
|
|
37327
|
-
key: 1,
|
|
37328
|
-
class: "date-picker-plus__placeholder"
|
|
37329
|
-
};
|
|
37330
|
-
const _hoisted_4$7 = /* @__PURE__ */ createElementVNode("img", {
|
|
37487
|
+
const _hoisted_2$c = /* @__PURE__ */ createElementVNode("img", {
|
|
37331
37488
|
class: "date-picker-plus__img",
|
|
37332
37489
|
src: _imports_0$4,
|
|
37333
37490
|
alt: "date-picker icon"
|
|
37334
37491
|
}, null, -1);
|
|
37335
|
-
const
|
|
37336
|
-
const
|
|
37492
|
+
const _hoisted_3$b = { class: "date-picker-plus__days" };
|
|
37493
|
+
const _hoisted_4$7 = ["onClick"];
|
|
37337
37494
|
const _sfc_main$d = {
|
|
37338
37495
|
__name: "pl-date-picker-plus",
|
|
37339
37496
|
props: {
|
|
@@ -37344,50 +37501,65 @@ const _sfc_main$d = {
|
|
|
37344
37501
|
placeholder: {
|
|
37345
37502
|
type: String,
|
|
37346
37503
|
default: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0430\u0442\u0443"
|
|
37504
|
+
},
|
|
37505
|
+
label: {
|
|
37506
|
+
type: String,
|
|
37507
|
+
default: ""
|
|
37508
|
+
},
|
|
37509
|
+
weekendsDisabled: {
|
|
37510
|
+
type: Boolean,
|
|
37511
|
+
default: true
|
|
37347
37512
|
}
|
|
37348
37513
|
},
|
|
37349
37514
|
emits: ["update:modelValue"],
|
|
37350
37515
|
setup(__props, { emit: emit2 }) {
|
|
37516
|
+
const props = __props;
|
|
37351
37517
|
dayjs.locale("ru");
|
|
37518
|
+
const { weekendsDisabled } = toRefs(props);
|
|
37352
37519
|
const currentDate = ref(dayjs());
|
|
37353
37520
|
const selectedDate = ref(dayjs());
|
|
37354
37521
|
const confirmedDate = ref(dayjs());
|
|
37355
37522
|
const isOpen = ref(false);
|
|
37356
|
-
const
|
|
37357
|
-
|
|
37358
|
-
|
|
37359
|
-
};
|
|
37523
|
+
const datePickerRef = ref(null);
|
|
37524
|
+
const dateValue = ref(dayjs().format("DD.MM.YYYY"));
|
|
37525
|
+
const weekendsDate = calendar;
|
|
37360
37526
|
const checkCurrentMonthDays = (dayItem) => {
|
|
37361
37527
|
return selectedDate.value.date() === dayItem.day && selectedDate.value.month() === dayItem.month && selectedDate.value.year() === dayItem.year && dayItem.type === "current";
|
|
37362
37528
|
};
|
|
37363
|
-
|
|
37364
|
-
|
|
37365
|
-
selectedDate.value = confirmedDate.value;
|
|
37366
|
-
isOpen.value = false;
|
|
37367
|
-
};
|
|
37368
|
-
const toggleDatePicker = () => {
|
|
37369
|
-
currentDate.value = confirmedDate.value;
|
|
37370
|
-
selectedDate.value = confirmedDate.value;
|
|
37371
|
-
isOpen.value = !isOpen.value;
|
|
37372
|
-
};
|
|
37373
|
-
const target = ref(null);
|
|
37374
|
-
onClickOutside(target, () => {
|
|
37375
|
-
setTimeout(() => {
|
|
37376
|
-
closeDatePicker();
|
|
37377
|
-
});
|
|
37378
|
-
});
|
|
37529
|
+
ref(null);
|
|
37530
|
+
const displayData = (value) => value.format("DD.MM.YYYY");
|
|
37379
37531
|
const confirmDate = () => {
|
|
37380
37532
|
confirmedDate.value = selectedDate.value;
|
|
37381
|
-
|
|
37382
|
-
emit2("update:modelValue",
|
|
37383
|
-
isOpen.value = false;
|
|
37533
|
+
dateValue.value = displayData(selectedDate.value);
|
|
37534
|
+
emit2("update:modelValue", selectedDate.value.format("DD.MM.YYYY"));
|
|
37384
37535
|
};
|
|
37385
37536
|
const selectDate = (item) => {
|
|
37386
|
-
|
|
37387
|
-
|
|
37388
|
-
|
|
37537
|
+
selectedDate.value = dayjs().set("date", item.day).set("month", item.month).set("year", item.year);
|
|
37538
|
+
confirmDate();
|
|
37539
|
+
};
|
|
37540
|
+
const validate = (date4, format2) => {
|
|
37541
|
+
return dayjs(date4, format2).format(format2) === date4;
|
|
37542
|
+
};
|
|
37543
|
+
const savedDate = ref();
|
|
37544
|
+
const updateDate = (event) => {
|
|
37545
|
+
savedDate.value = dayjs(event.target.value.split(".").reverse().join("-"));
|
|
37546
|
+
};
|
|
37547
|
+
onClickOutside(datePickerRef, () => {
|
|
37548
|
+
if (isOpen.value) {
|
|
37549
|
+
isOpen.value = false;
|
|
37550
|
+
if (validate(dateValue.value, "DD.MM.YYYY")) {
|
|
37551
|
+
if (savedDate.value) {
|
|
37552
|
+
currentDate.value = savedDate.value;
|
|
37553
|
+
selectedDate.value = savedDate.value;
|
|
37554
|
+
emit2("update:modelValue", selectedDate.value.format("DD.MM.YYYY"));
|
|
37555
|
+
} else {
|
|
37556
|
+
savedDate.value = confirmedDate.value;
|
|
37557
|
+
}
|
|
37558
|
+
} else {
|
|
37559
|
+
dateValue.value = displayData(selectedDate.value);
|
|
37560
|
+
}
|
|
37389
37561
|
}
|
|
37390
|
-
};
|
|
37562
|
+
});
|
|
37391
37563
|
const getArrayOfDays = () => {
|
|
37392
37564
|
const prevMonthDays = [];
|
|
37393
37565
|
const currMonthDays = [];
|
|
@@ -37401,9 +37573,17 @@ const _sfc_main$d = {
|
|
|
37401
37573
|
prevMonthDays.push({ day: i2, type: "previous" });
|
|
37402
37574
|
}
|
|
37403
37575
|
}
|
|
37576
|
+
const weekendsYearArray = weekendsDate.filter((currentYear) => (currentYear == null ? void 0 : currentYear.year) === (currentDate == null ? void 0 : currentDate.value.year()))[0];
|
|
37577
|
+
const weekendsDaysArray = weekendsYearArray == null ? void 0 : weekendsYearArray.months[currentDate.value.month()].days.split(",");
|
|
37404
37578
|
const currMonthLastDayDate = currentDate.value.endOf("month").date();
|
|
37405
37579
|
for (let i2 = 1; i2 <= currMonthLastDayDate; i2++) {
|
|
37406
|
-
currMonthDays.push({
|
|
37580
|
+
currMonthDays.push({
|
|
37581
|
+
day: i2,
|
|
37582
|
+
month: currentDate.value.month(),
|
|
37583
|
+
year: currentDate.value.year(),
|
|
37584
|
+
type: "current",
|
|
37585
|
+
weekend: weekendsDisabled.value ? weekendsDaysArray == null ? void 0 : weekendsDaysArray.includes(i2.toString()) : ""
|
|
37586
|
+
});
|
|
37407
37587
|
}
|
|
37408
37588
|
if (currentDate.value.date(currentDate.value.daysInMonth()).day()) {
|
|
37409
37589
|
const nextMonthDaysAmount = 7 - currentDate.value.date(currentDate.value.daysInMonth()).day();
|
|
@@ -37421,22 +37601,33 @@ const _sfc_main$d = {
|
|
|
37421
37601
|
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
37422
37602
|
createElementVNode("div", {
|
|
37423
37603
|
class: "date-picker-plus__wrapper",
|
|
37424
|
-
|
|
37425
|
-
|
|
37426
|
-
|
|
37427
|
-
|
|
37604
|
+
ref_key: "datePickerRef",
|
|
37605
|
+
ref: datePickerRef,
|
|
37606
|
+
onClick: _cache[1] || (_cache[1] = ($event) => isOpen.value = true)
|
|
37607
|
+
}, [
|
|
37608
|
+
createVNode(_sfc_main$z, {
|
|
37609
|
+
modelValue: dateValue.value,
|
|
37610
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dateValue.value = $event),
|
|
37611
|
+
class: "date-picker-plus__input",
|
|
37612
|
+
label: __props.label,
|
|
37613
|
+
placeholder: __props.placeholder,
|
|
37614
|
+
onInput: updateDate,
|
|
37615
|
+
datePicker: ""
|
|
37616
|
+
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
37617
|
+
_hoisted_2$c
|
|
37618
|
+
], 512),
|
|
37428
37619
|
isOpen.value ? (openBlock(), createElementBlock("div", {
|
|
37429
|
-
key:
|
|
37620
|
+
key: 0,
|
|
37430
37621
|
id: "date-picker-popup",
|
|
37431
37622
|
class: "date-picker-plus__popup",
|
|
37432
|
-
ref_key: "
|
|
37433
|
-
ref:
|
|
37623
|
+
ref_key: "datePickerRef",
|
|
37624
|
+
ref: datePickerRef
|
|
37434
37625
|
}, [
|
|
37435
37626
|
createVNode(_sfc_main$e, {
|
|
37436
37627
|
modelValue: currentDate.value,
|
|
37437
|
-
"onUpdate:modelValue": _cache[
|
|
37628
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => currentDate.value = $event)
|
|
37438
37629
|
}, null, 8, ["modelValue"]),
|
|
37439
|
-
createElementVNode("div",
|
|
37630
|
+
createElementVNode("div", _hoisted_3$b, [
|
|
37440
37631
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(WEEK_DAYS), (item, index) => {
|
|
37441
37632
|
return openBlock(), createElementBlock("div", {
|
|
37442
37633
|
class: "date-picker-plus__week-day",
|
|
@@ -37449,12 +37640,12 @@ const _sfc_main$d = {
|
|
|
37449
37640
|
return openBlock(), createElementBlock("div", {
|
|
37450
37641
|
class: normalizeClass([
|
|
37451
37642
|
"date-picker-plus__day-item",
|
|
37452
|
-
{ "date-picker-plus__day-item_disabled": item.type !== "current" },
|
|
37643
|
+
{ "date-picker-plus__day-item_disabled": item.type !== "current" || item.weekend },
|
|
37453
37644
|
{ "date-picker-plus__day-item_active-item": checkCurrentMonthDays(item) }
|
|
37454
37645
|
]),
|
|
37455
37646
|
key: `dd${index}`,
|
|
37456
|
-
onClick: ($event) => selectDate(item)
|
|
37457
|
-
}, toDisplayString(item.day), 11,
|
|
37647
|
+
onClick: ($event) => (item.weekend || (item.type === "previous" || item.type === "next") ? {} : selectDate(item), isOpen.value = false)
|
|
37648
|
+
}, toDisplayString(item.type !== "previous" && item.type !== "next" ? item.day : ""), 11, _hoisted_4$7);
|
|
37458
37649
|
}), 128))
|
|
37459
37650
|
])
|
|
37460
37651
|
], 512)) : createCommentVNode("", true)
|