@factoringplus/pl-components-pack-v3 0.4.53 → 0.4.55
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 +188 -10
- package/dist/pl-components-pack-v3.umd.js +19 -19
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -36238,24 +36238,23 @@ const _sfc_main$o = /* @__PURE__ */ Object.assign(__default__$2, {
|
|
|
36238
36238
|
modelValue: { type: Array, default: () => [] },
|
|
36239
36239
|
header: { type: Boolean, default: true },
|
|
36240
36240
|
main: { type: Boolean, default: true },
|
|
36241
|
-
height: { type: String, default: "150" }
|
|
36241
|
+
height: { type: String, default: "150" },
|
|
36242
|
+
limit: { type: Number }
|
|
36242
36243
|
},
|
|
36243
36244
|
emits: [
|
|
36244
36245
|
"on-files-not-attached",
|
|
36245
36246
|
"on-file-not-accept",
|
|
36246
36247
|
"on-file-size-exceeded",
|
|
36247
36248
|
"on-file-empty",
|
|
36248
|
-
"on-
|
|
36249
|
-
"on-
|
|
36250
|
-
"input",
|
|
36251
|
-
"on-error"
|
|
36249
|
+
"on-file-not-limit",
|
|
36250
|
+
"on-change"
|
|
36252
36251
|
],
|
|
36253
36252
|
setup(__props, { emit: emit2 }) {
|
|
36254
36253
|
const props = __props;
|
|
36255
36254
|
ref(false);
|
|
36256
36255
|
const fileList = ref(props.modelValue);
|
|
36257
36256
|
const el = ref(null);
|
|
36258
|
-
const { modelValue } = toRefs(props);
|
|
36257
|
+
const { modelValue, limit } = toRefs(props);
|
|
36259
36258
|
watch(modelValue, (newValue) => {
|
|
36260
36259
|
fileList.value = newValue;
|
|
36261
36260
|
});
|
|
@@ -36264,6 +36263,11 @@ const _sfc_main$o = /* @__PURE__ */ Object.assign(__default__$2, {
|
|
|
36264
36263
|
emit2("on-files-not-attached", file, fileList2);
|
|
36265
36264
|
return;
|
|
36266
36265
|
}
|
|
36266
|
+
if (fileList2.length > limit.value) {
|
|
36267
|
+
fileList2.splice(-1);
|
|
36268
|
+
emit2("on-file-not-limit", file, fileList2);
|
|
36269
|
+
return;
|
|
36270
|
+
}
|
|
36267
36271
|
if (props.accept !== "any" || props.accept !== "\u043B\u044E\u0431\u043E\u0439") {
|
|
36268
36272
|
const fileArr = file.name.split(".");
|
|
36269
36273
|
const fileExtension = "." + fileArr[fileArr.length - 1].toLowerCase();
|
|
@@ -36574,7 +36578,8 @@ const ApiJs = function(optionsRequest, isGetResourse = false, token) {
|
|
|
36574
36578
|
...options.headers
|
|
36575
36579
|
},
|
|
36576
36580
|
data: formatDateObj(options.data, true),
|
|
36577
|
-
responseType: options.responseType
|
|
36581
|
+
responseType: options.responseType,
|
|
36582
|
+
signal: options.signal
|
|
36578
36583
|
}).then((resourse) => {
|
|
36579
36584
|
if (isGetResourse)
|
|
36580
36585
|
resolve(formatDateObj(resourse));
|
|
@@ -37302,6 +37307,164 @@ const _sfc_main$e = {
|
|
|
37302
37307
|
};
|
|
37303
37308
|
}
|
|
37304
37309
|
};
|
|
37310
|
+
var calendar = [
|
|
37311
|
+
{
|
|
37312
|
+
year: 2022,
|
|
37313
|
+
months: [
|
|
37314
|
+
{
|
|
37315
|
+
month: 1,
|
|
37316
|
+
days: "1,2,3,4,5,6,7,8,9,15,16,22,23,29,30"
|
|
37317
|
+
},
|
|
37318
|
+
{
|
|
37319
|
+
month: 2,
|
|
37320
|
+
days: "5,6,12,13,19,20,22*,23,26,27"
|
|
37321
|
+
},
|
|
37322
|
+
{
|
|
37323
|
+
month: 3,
|
|
37324
|
+
days: "5*,6,7+,8,12,13,19,20,26,27"
|
|
37325
|
+
},
|
|
37326
|
+
{
|
|
37327
|
+
month: 4,
|
|
37328
|
+
days: "2,3,9,10,16,17,23,24,30"
|
|
37329
|
+
},
|
|
37330
|
+
{
|
|
37331
|
+
month: 5,
|
|
37332
|
+
days: "1,2+,3+,7,8,9,10+,14,15,21,22,28,29"
|
|
37333
|
+
},
|
|
37334
|
+
{
|
|
37335
|
+
month: 6,
|
|
37336
|
+
days: "4,5,11,12,13+,18,19,25,26"
|
|
37337
|
+
},
|
|
37338
|
+
{
|
|
37339
|
+
month: 7,
|
|
37340
|
+
days: "2,3,9,10,16,17,23,24,30,31"
|
|
37341
|
+
},
|
|
37342
|
+
{
|
|
37343
|
+
month: 8,
|
|
37344
|
+
days: "6,7,13,14,20,21,27,28"
|
|
37345
|
+
},
|
|
37346
|
+
{
|
|
37347
|
+
month: 9,
|
|
37348
|
+
days: "3,4,10,11,17,18,24,25"
|
|
37349
|
+
},
|
|
37350
|
+
{
|
|
37351
|
+
month: 10,
|
|
37352
|
+
days: "1,2,8,9,15,16,22,23,29,30"
|
|
37353
|
+
},
|
|
37354
|
+
{
|
|
37355
|
+
month: 11,
|
|
37356
|
+
days: "3*,4,5,6,12,13,19,20,26,27"
|
|
37357
|
+
},
|
|
37358
|
+
{
|
|
37359
|
+
month: 12,
|
|
37360
|
+
days: "3,4,10,11,17,18,24,25,31"
|
|
37361
|
+
}
|
|
37362
|
+
],
|
|
37363
|
+
transitions: [
|
|
37364
|
+
{
|
|
37365
|
+
from: "03.05",
|
|
37366
|
+
to: "03.07"
|
|
37367
|
+
},
|
|
37368
|
+
{
|
|
37369
|
+
from: "05.01",
|
|
37370
|
+
to: "05.02"
|
|
37371
|
+
},
|
|
37372
|
+
{
|
|
37373
|
+
from: "01.01",
|
|
37374
|
+
to: "05.03"
|
|
37375
|
+
},
|
|
37376
|
+
{
|
|
37377
|
+
from: "01.02",
|
|
37378
|
+
to: "05.10"
|
|
37379
|
+
},
|
|
37380
|
+
{
|
|
37381
|
+
from: "06.12",
|
|
37382
|
+
to: "06.13"
|
|
37383
|
+
}
|
|
37384
|
+
],
|
|
37385
|
+
statistic: {
|
|
37386
|
+
workdays: 247,
|
|
37387
|
+
holidays: 118,
|
|
37388
|
+
hours40: 1973,
|
|
37389
|
+
hours36: 1775.4,
|
|
37390
|
+
hours24: 1182.6
|
|
37391
|
+
}
|
|
37392
|
+
},
|
|
37393
|
+
{
|
|
37394
|
+
year: 2023,
|
|
37395
|
+
months: [
|
|
37396
|
+
{
|
|
37397
|
+
month: 1,
|
|
37398
|
+
days: "1,2,3,4,5,6,7,8,14,15,21,22,28,29"
|
|
37399
|
+
},
|
|
37400
|
+
{
|
|
37401
|
+
month: 2,
|
|
37402
|
+
days: "4,5,11,12,18,19,22*,23,24+,25,26"
|
|
37403
|
+
},
|
|
37404
|
+
{
|
|
37405
|
+
month: 3,
|
|
37406
|
+
days: "4,5,7*,8,11,12,18,19,25,26"
|
|
37407
|
+
},
|
|
37408
|
+
{
|
|
37409
|
+
month: 4,
|
|
37410
|
+
days: "1,2,8,9,15,16,22,23,29,30"
|
|
37411
|
+
},
|
|
37412
|
+
{
|
|
37413
|
+
month: 5,
|
|
37414
|
+
days: "1,6,7,8+,9,13,14,20,21,27,28"
|
|
37415
|
+
},
|
|
37416
|
+
{
|
|
37417
|
+
month: 6,
|
|
37418
|
+
days: "3,4,10,11,12,17,18,24,25"
|
|
37419
|
+
},
|
|
37420
|
+
{
|
|
37421
|
+
month: 7,
|
|
37422
|
+
days: "1,2,8,9,15,16,22,23,29,30"
|
|
37423
|
+
},
|
|
37424
|
+
{
|
|
37425
|
+
month: 8,
|
|
37426
|
+
days: "5,6,12,13,19,20,26,27"
|
|
37427
|
+
},
|
|
37428
|
+
{
|
|
37429
|
+
month: 9,
|
|
37430
|
+
days: "2,3,9,10,16,17,23,24,30"
|
|
37431
|
+
},
|
|
37432
|
+
{
|
|
37433
|
+
month: 10,
|
|
37434
|
+
days: "1,7,8,14,15,21,22,28,29"
|
|
37435
|
+
},
|
|
37436
|
+
{
|
|
37437
|
+
month: 11,
|
|
37438
|
+
days: "3*,4,5,6+,11,12,18,19,25,26"
|
|
37439
|
+
},
|
|
37440
|
+
{
|
|
37441
|
+
month: 12,
|
|
37442
|
+
days: "2,3,9,10,16,17,23,24,30,31"
|
|
37443
|
+
}
|
|
37444
|
+
],
|
|
37445
|
+
transitions: [
|
|
37446
|
+
{
|
|
37447
|
+
from: "01.01",
|
|
37448
|
+
to: "02.24"
|
|
37449
|
+
},
|
|
37450
|
+
{
|
|
37451
|
+
from: "01.08",
|
|
37452
|
+
to: "05.08"
|
|
37453
|
+
},
|
|
37454
|
+
{
|
|
37455
|
+
from: "11.04",
|
|
37456
|
+
to: "11.06"
|
|
37457
|
+
}
|
|
37458
|
+
],
|
|
37459
|
+
statistic: {
|
|
37460
|
+
workdays: 247,
|
|
37461
|
+
holidays: 118,
|
|
37462
|
+
hours40: 1973,
|
|
37463
|
+
hours36: 1775.4,
|
|
37464
|
+
hours24: 1182.6
|
|
37465
|
+
}
|
|
37466
|
+
}
|
|
37467
|
+
];
|
|
37305
37468
|
const WEEK_DAYS = ["\u041F\u043D", "\u0412\u0442", "\u0421\u0440", "\u0427\u0442", "\u041F\u0442", "\u0421\u0431", "\u0412\u0441"];
|
|
37306
37469
|
const DISPLAY_MONTHS = [
|
|
37307
37470
|
"\u042F\u043D\u0432\u0430\u0440\u044F",
|
|
@@ -37344,15 +37507,22 @@ const _sfc_main$d = {
|
|
|
37344
37507
|
placeholder: {
|
|
37345
37508
|
type: String,
|
|
37346
37509
|
default: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0430\u0442\u0443"
|
|
37510
|
+
},
|
|
37511
|
+
weekendsDisabled: {
|
|
37512
|
+
type: Boolean,
|
|
37513
|
+
default: true
|
|
37347
37514
|
}
|
|
37348
37515
|
},
|
|
37349
37516
|
emits: ["update:modelValue"],
|
|
37350
37517
|
setup(__props, { emit: emit2 }) {
|
|
37518
|
+
const props = __props;
|
|
37351
37519
|
dayjs.locale("ru");
|
|
37520
|
+
const { weekendsDisabled } = toRefs(props);
|
|
37352
37521
|
const currentDate = ref(dayjs());
|
|
37353
37522
|
const selectedDate = ref(dayjs());
|
|
37354
37523
|
const confirmedDate = ref(dayjs());
|
|
37355
37524
|
const isOpen = ref(false);
|
|
37525
|
+
const weekendsDate = calendar;
|
|
37356
37526
|
const displayDate = (value) => {
|
|
37357
37527
|
const dayjsDate = dayjs.isDayjs(value) ? value : dayjs(value);
|
|
37358
37528
|
return `${dayjsDate.date()} ${DISPLAY_MONTHS[dayjsDate.month()]}, ${dayjsDate.year()}`;
|
|
@@ -37401,9 +37571,17 @@ const _sfc_main$d = {
|
|
|
37401
37571
|
prevMonthDays.push({ day: i2, type: "previous" });
|
|
37402
37572
|
}
|
|
37403
37573
|
}
|
|
37574
|
+
const weekendsYearArray = weekendsDate.filter((currentYear) => (currentYear == null ? void 0 : currentYear.year) === (currentDate == null ? void 0 : currentDate.value.year()))[0];
|
|
37575
|
+
const weekendsDaysArray = weekendsYearArray == null ? void 0 : weekendsYearArray.months[currentDate.value.month()].days.split(",");
|
|
37404
37576
|
const currMonthLastDayDate = currentDate.value.endOf("month").date();
|
|
37405
37577
|
for (let i2 = 1; i2 <= currMonthLastDayDate; i2++) {
|
|
37406
|
-
currMonthDays.push({
|
|
37578
|
+
currMonthDays.push({
|
|
37579
|
+
day: i2,
|
|
37580
|
+
month: currentDate.value.month(),
|
|
37581
|
+
year: currentDate.value.year(),
|
|
37582
|
+
type: "current",
|
|
37583
|
+
weekend: weekendsDisabled.value ? weekendsDaysArray == null ? void 0 : weekendsDaysArray.includes(i2.toString()) : ""
|
|
37584
|
+
});
|
|
37407
37585
|
}
|
|
37408
37586
|
if (currentDate.value.date(currentDate.value.daysInMonth()).day()) {
|
|
37409
37587
|
const nextMonthDaysAmount = 7 - currentDate.value.date(currentDate.value.daysInMonth()).day();
|
|
@@ -37449,11 +37627,11 @@ const _sfc_main$d = {
|
|
|
37449
37627
|
return openBlock(), createElementBlock("div", {
|
|
37450
37628
|
class: normalizeClass([
|
|
37451
37629
|
"date-picker-plus__day-item",
|
|
37452
|
-
{ "date-picker-plus__day-item_disabled": item.type !== "current" },
|
|
37630
|
+
{ "date-picker-plus__day-item_disabled": item.type !== "current" || item.weekend },
|
|
37453
37631
|
{ "date-picker-plus__day-item_active-item": checkCurrentMonthDays(item) }
|
|
37454
37632
|
]),
|
|
37455
37633
|
key: `dd${index}`,
|
|
37456
|
-
onClick: ($event) => selectDate(item)
|
|
37634
|
+
onClick: ($event) => item.weekend ? {} : selectDate(item)
|
|
37457
37635
|
}, toDisplayString(item.day), 11, _hoisted_6$5);
|
|
37458
37636
|
}), 128))
|
|
37459
37637
|
])
|