@factoringplus/pl-components-pack-v3 0.5.10-pre-1 → 0.5.10-pre-01

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.
@@ -25896,12 +25896,11 @@ 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 = ["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);
25899
+ const _hoisted_1$v = { class: "date-picker" };
25900
+ const _hoisted_2$r = {
25901
+ key: 0,
25902
+ class: "date-picker__wrapper"
25903
+ };
25905
25904
  const _hoisted_3$n = { class: "date-switcher__container flex-column" };
25906
25905
  const _hoisted_4$h = { class: "d-flex pb-4 justify-content-between" };
25907
25906
  const _hoisted_5$b = { class: "date-switcher justify-content-center flex-column" };
@@ -25947,18 +25946,6 @@ const _sfc_main$w = {
25947
25946
  dayjs.extend(isBetween);
25948
25947
  dayjs.extend(objectSupport);
25949
25948
  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
- });
25962
25949
  const validateDateValueString = (dateStr) => {
25963
25950
  if (dateStr.includes("-")) {
25964
25951
  return dayjs(dateStr.split("-")[0], "DD.MM.YYYY", true).isValid() && dayjs(dateStr.split("-")[1], "DD.MM.YYYY", true).isValid();
@@ -26259,15 +26246,8 @@ const _sfc_main$w = {
26259
26246
  });
26260
26247
  return (_ctx, _cache) => {
26261
26248
  const _directive_maska = resolveDirective("maska");
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
- }, [
26249
+ return openBlock(), createElementBlock("div", _hoisted_1$v, [
26250
+ __props.showInput ? (openBlock(), createElementBlock("div", _hoisted_2$r, [
26271
26251
  createVNode(_sfc_main$B, {
26272
26252
  mask: "##.##.####-##.##.####",
26273
26253
  modelValue: unref(dateValue),
@@ -26277,118 +26257,120 @@ const _sfc_main$w = {
26277
26257
  onInput: updateDate,
26278
26258
  datePicker: ""
26279
26259
  }, null, 8, ["mask", "modelValue", "label", "placeholder"]),
26280
- _hoisted_2$r
26260
+ createElementVNode("img", {
26261
+ class: "date-picker__img",
26262
+ src: _imports_0$8,
26263
+ alt: "date-picker icon",
26264
+ onClick: _cache[1] || (_cache[1] = ($event) => emit2("changeOpen", !unref(isOpen)))
26265
+ })
26281
26266
  ])) : createCommentVNode("", true),
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
- ])
26267
+ !unref(isOpen) ? (openBlock(), createElementBlock("div", {
26268
+ key: 1,
26269
+ id: "date-picker-popup",
26270
+ class: "pl-date-picker__popup",
26271
+ ref_key: "datePickerRef",
26272
+ ref: datePickerRef
26273
+ }, [
26274
+ createElementVNode("div", _hoisted_3$n, [
26275
+ createElementVNode("div", _hoisted_4$h, [
26276
+ createElementVNode("div", _hoisted_5$b, [
26277
+ _hoisted_6$7,
26278
+ withDirectives(createElementVNode("input", {
26279
+ id: "date-mask",
26280
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => rangeStartDateValue.value = $event),
26281
+ onInput: updateDate,
26282
+ type: "text",
26283
+ placeholder: "\u0414\u0414.\u041C\u041C.\u0413\u0413\u0413\u0413",
26284
+ class: "pl-date-picker__input"
26285
+ }, null, 544), [
26286
+ [_directive_maska, "##.##.####"],
26287
+ [vModelText, rangeStartDateValue.value]
26320
26288
  ])
26321
26289
  ]),
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
- })
26290
+ createElementVNode("div", _hoisted_7$5, [
26291
+ _hoisted_8$4,
26292
+ withDirectives(createElementVNode("input", {
26293
+ id: "date-mask",
26294
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => rangeEndDateValue.value = $event),
26295
+ onInput: _cache[4] || (_cache[4] = ($event) => updateDate($event, true)),
26296
+ type: "text",
26297
+ placeholder: "\u0414\u0414.\u041C\u041C.\u0413\u0413\u0413\u0413",
26298
+ class: "pl-date-picker__input"
26299
+ }, null, 544), [
26300
+ [_directive_maska, "##.##.####"],
26301
+ [vModelText, rangeEndDateValue.value]
26344
26302
  ])
26345
26303
  ])
26346
26304
  ]),
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 ")
26305
+ createElementVNode("div", _hoisted_9$4, [
26306
+ createElementVNode("div", _hoisted_10$3, [
26307
+ createElementVNode("div", {
26308
+ class: "date-switcher__arrow date-switcher__arrow-left",
26309
+ onClick: switchPrevMonth
26310
+ }),
26311
+ createElementVNode("span", _hoisted_11$3, toDisplayString(capitalize2(currentDate.value.format("MMMM"))), 1),
26312
+ createElementVNode("div", {
26313
+ class: "date-switcher__arrow date-switcher__arrow-right",
26314
+ onClick: switchNextMonth
26315
+ })
26316
+ ]),
26317
+ createElementVNode("div", _hoisted_12$3, [
26318
+ createElementVNode("div", {
26319
+ class: "date-switcher__arrow date-switcher__arrow-left",
26320
+ onClick: switchPrevYear
26321
+ }),
26322
+ createElementVNode("span", _hoisted_13$3, toDisplayString(capitalize2(currentDate.value.format("YYYY"))), 1),
26323
+ createElementVNode("div", {
26324
+ class: "date-switcher__arrow date-switcher__arrow-right",
26325
+ onClick: switchNextYear
26326
+ })
26327
+ ])
26388
26328
  ])
26389
- ], 4)) : createCommentVNode("", true)
26390
- ]))
26391
- ], 8, _hoisted_1$v);
26329
+ ]),
26330
+ createElementVNode("div", _hoisted_14$3, [
26331
+ (openBlock(), createElementBlock(Fragment, null, renderList(WEEK_DAYS2, (item, index) => {
26332
+ return createElementVNode("div", {
26333
+ class: "pl-date-picker__week-day",
26334
+ key: index
26335
+ }, [
26336
+ createElementVNode("span", null, toDisplayString(item), 1)
26337
+ ]);
26338
+ }), 64)),
26339
+ (openBlock(true), createElementBlock(Fragment, null, renderList(daysData.value, (item, index) => {
26340
+ return openBlock(), createElementBlock("div", {
26341
+ class: normalizeClass([
26342
+ "pl-date-picker__day-item",
26343
+ item.type !== "previous" && item.type !== "next" ? framePosition(item) : "",
26344
+ {
26345
+ "pl-date-picker__day-item_disabled": item.type !== "current"
26346
+ },
26347
+ {
26348
+ "pl-date-picker__day-item_svg-circle-background": activeDay(item) && item.type === "current"
26349
+ },
26350
+ {
26351
+ "pl-date-picker__background-range": item.type !== "previous" && item.type !== "next" ? updateSelection(item, true) : ""
26352
+ }
26353
+ ]),
26354
+ key: `dd${index}`,
26355
+ onClick: ($event) => item.type !== "previous" && item.type !== "next" ? toggleSelection(item) : "",
26356
+ onMousemove: ($event) => item.type !== "previous" && item.type !== "next" ? updateSelection(item, false) : ""
26357
+ }, [
26358
+ createElementVNode("div", _hoisted_16$2, toDisplayString(item.type !== "previous" && item.type !== "next" ? item.day : ""), 1)
26359
+ ], 42, _hoisted_15$2);
26360
+ }), 128))
26361
+ ]),
26362
+ createElementVNode("div", { class: "pl-date-picker__buttons" }, [
26363
+ createElementVNode("button", {
26364
+ class: "pl-date-picker__btn pl-date-picker__btn-cancel",
26365
+ onClick: cancelButton
26366
+ }, " \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C "),
26367
+ createElementVNode("button", {
26368
+ class: "pl-date-picker__btn pl-date-picker__btn-confirm",
26369
+ onClick: confirmDate
26370
+ }, " \u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C ")
26371
+ ])
26372
+ ], 512)) : createCommentVNode("", true)
26373
+ ]);
26392
26374
  };
26393
26375
  }
26394
26376
  };
@@ -37555,7 +37537,7 @@ const _sfc_main$q = /* @__PURE__ */ Object.assign(__default__$2, {
37555
37537
  buttonText: { type: String, default: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B..." },
37556
37538
  accept: {
37557
37539
  type: String,
37558
- default: ".doc, .docx, .pdf, .jpeg, .jpg, .png, .xlsx, .xls, .txt"
37540
+ default: "doc, docx, .pdf, jpeg, jpg, png, xlsx, xls, txt"
37559
37541
  },
37560
37542
  fileSize: { type: Number, default: 20 },
37561
37543
  modelValue: { type: Array, default: () => [] },
@@ -37596,7 +37578,7 @@ const _sfc_main$q = /* @__PURE__ */ Object.assign(__default__$2, {
37596
37578
  }
37597
37579
  if (props.accept !== "any" || props.accept !== "\u043B\u044E\u0431\u043E\u0439") {
37598
37580
  const fileArr = file.name.split(".");
37599
- const fileExtension = "." + fileArr[fileArr.length - 1].toLowerCase();
37581
+ const fileExtension = fileArr[fileArr.length - 1].toLowerCase();
37600
37582
  const acceptedArr = props.accept.split(", ");
37601
37583
  if (acceptedArr.indexOf(fileExtension) === -1) {
37602
37584
  fileList2.splice(-1);
@@ -41738,6 +41720,10 @@ const _sfc_main$3 = {
41738
41720
  customClass: {
41739
41721
  type: String,
41740
41722
  default: ""
41723
+ },
41724
+ trigger: {
41725
+ type: String,
41726
+ default: "click"
41741
41727
  }
41742
41728
  },
41743
41729
  setup(__props) {
@@ -41749,13 +41735,13 @@ const _sfc_main$3 = {
41749
41735
  placement: __props.position,
41750
41736
  "show-arrow": false,
41751
41737
  "popper-class": ["pl-tooltip", __props.customClass],
41752
- trigger: "hover"
41738
+ trigger: __props.trigger
41753
41739
  }, {
41754
41740
  default: withCtx(() => [
41755
41741
  renderSlot(_ctx.$slots, "default")
41756
41742
  ]),
41757
41743
  _: 3
41758
- }, 8, ["content", "placement", "popper-class"]);
41744
+ }, 8, ["content", "placement", "popper-class", "trigger"]);
41759
41745
  };
41760
41746
  }
41761
41747
  };