@factoringplus/pl-components-pack-v3 0.4.56 → 0.4.57-pre-2

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.
@@ -17554,7 +17554,7 @@ const _hoisted_2$y = ["aria-current", "tabindex"];
17554
17554
  const _hoisted_3$q = ["tabindex"];
17555
17555
  const _hoisted_4$i = ["aria-current", "tabindex"];
17556
17556
  const _hoisted_5$d = ["tabindex"];
17557
- const _hoisted_6$8 = ["aria-current", "tabindex"];
17557
+ const _hoisted_6$7 = ["aria-current", "tabindex"];
17558
17558
  const __default__$j = defineComponent({
17559
17559
  name: "ElPaginationPager"
17560
17560
  });
@@ -17744,7 +17744,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
17744
17744
  ], "number"]),
17745
17745
  "aria-current": _ctx.currentPage === _ctx.pageCount,
17746
17746
  tabindex: unref(tabindex)
17747
- }, toDisplayString(_ctx.pageCount), 11, _hoisted_6$8)) : createCommentVNode("v-if", true)
17747
+ }, toDisplayString(_ctx.pageCount), 11, _hoisted_6$7)) : createCommentVNode("v-if", true)
17748
17748
  ], 42, _hoisted_1$F);
17749
17749
  };
17750
17750
  }
@@ -25314,6 +25314,10 @@ const _sfc_main$z = {
25314
25314
  type: Boolean,
25315
25315
  default: false
25316
25316
  },
25317
+ datePicker: {
25318
+ type: Boolean,
25319
+ default: false
25320
+ },
25317
25321
  maxLength: {
25318
25322
  type: Number,
25319
25323
  default: 210
@@ -25373,7 +25377,7 @@ const _sfc_main$z = {
25373
25377
  default: () => ({ min: 0 })
25374
25378
  }
25375
25379
  },
25376
- emits: ["update:modelValue", "validate", "isValid"],
25380
+ emits: ["update:modelValue", "validate"],
25377
25381
  setup(__props, { emit: emit2 }) {
25378
25382
  const props = __props;
25379
25383
  const refInput = ref();
@@ -25490,6 +25494,7 @@ const _sfc_main$z = {
25490
25494
  const _component_el_input = ElInput;
25491
25495
  const _component_el_form_item = ElFormItem;
25492
25496
  const _component_el_form = ElForm;
25497
+ const _directive_maska = resolveDirective("maska");
25493
25498
  return openBlock(), createElementBlock("div", null, [
25494
25499
  createVNode(_component_el_form, {
25495
25500
  onValidate: validateInp,
@@ -25531,15 +25536,26 @@ const _sfc_main$z = {
25531
25536
  prop: __props.prop
25532
25537
  }, {
25533
25538
  default: withCtx(() => [
25534
- !unref(currency) ? (openBlock(), createBlock(_component_el_input, mergeProps({
25539
+ __props.datePicker ? withDirectives((openBlock(), createBlock(_component_el_input, {
25535
25540
  key: 0,
25541
+ disabled: props.disabled,
25542
+ placeholder: props.placeholder,
25543
+ modelValue: unref(modelValue),
25544
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
25545
+ type: unref(getTypeInput),
25546
+ resize: "none",
25547
+ onInput: updateValue
25548
+ }, null, 8, ["disabled", "placeholder", "modelValue", "type"])), [
25549
+ [_directive_maska, "##.##.####"]
25550
+ ]) : !unref(currency) ? (openBlock(), createBlock(_component_el_input, mergeProps({
25551
+ key: 1,
25536
25552
  class: { padding: props.prefix },
25537
25553
  minlength: __props.minLength,
25538
25554
  maxlength: __props.maxLength,
25539
25555
  disabled: props.disabled,
25540
25556
  placeholder: props.placeholder,
25541
25557
  modelValue: unref(modelValue),
25542
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
25558
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
25543
25559
  type: unref(getTypeInput),
25544
25560
  resize: "none"
25545
25561
  }, _ctx.$attrs, {
@@ -25547,7 +25563,7 @@ const _sfc_main$z = {
25547
25563
  clearable: props.clearable,
25548
25564
  onInput: updateValue
25549
25565
  }), null, 16, ["class", "minlength", "maxlength", "disabled", "placeholder", "modelValue", "type", "clearable"])) : (openBlock(), createBlock(_component_el_input, mergeProps({
25550
- key: 1,
25566
+ key: 2,
25551
25567
  onKeydown: keydown,
25552
25568
  class: { padding: props.prefix },
25553
25569
  minlength: __props.minLength,
@@ -25559,14 +25575,14 @@ const _sfc_main$z = {
25559
25575
  ref_key: "inputRef",
25560
25576
  ref: inputRef,
25561
25577
  modelValue: unref(formattedValue),
25562
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(formattedValue) ? formattedValue.value = $event : null)
25578
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(formattedValue) ? formattedValue.value = $event : null)
25563
25579
  }), createSlots({ _: 2 }, [
25564
25580
  unref(currency) ? {
25565
25581
  name: "append",
25566
25582
  fn: withCtx(() => [
25567
25583
  createElementVNode("span", {
25568
25584
  class: "pl-currency__rub-icon",
25569
- onClick: _cache[1] || (_cache[1] = ($event) => throuInput($event))
25585
+ onClick: _cache[2] || (_cache[2] = ($event) => throuInput($event))
25570
25586
  }, "\u20BD")
25571
25587
  ])
25572
25588
  } : void 0
@@ -35283,7 +35299,7 @@ const _hoisted_4$f = {
35283
35299
  class: "dialog-footer"
35284
35300
  };
35285
35301
  const _hoisted_5$a = /* @__PURE__ */ createTextVNode("\u0412\u044B\u0431\u0440\u0430\u0442\u044C");
35286
- const _hoisted_6$7 = /* @__PURE__ */ createTextVNode("\u041E\u0442\u043C\u0435\u043D\u0430");
35302
+ const _hoisted_6$6 = /* @__PURE__ */ createTextVNode("\u041E\u0442\u043C\u0435\u043D\u0430");
35287
35303
  const _hoisted_7$4 = {
35288
35304
  key: 1,
35289
35305
  class: "dialog-footer"
@@ -35475,7 +35491,7 @@ const _sfc_main$s = /* @__PURE__ */ Object.assign(__default__$6, {
35475
35491
  }, 8, ["disabled"]),
35476
35492
  createVNode(_component_el_button, { onClick: hide }, {
35477
35493
  default: withCtx(() => [
35478
- _hoisted_6$7
35494
+ _hoisted_6$6
35479
35495
  ]),
35480
35496
  _: 1
35481
35497
  })
@@ -35598,7 +35614,7 @@ const _hoisted_5$9 = {
35598
35614
  key: 0,
35599
35615
  class: "d-flex pl-table-footer position-relative align-items-center justify-content-end"
35600
35616
  };
35601
- const _hoisted_6$6 = {
35617
+ const _hoisted_6$5 = {
35602
35618
  key: 0,
35603
35619
  class: "totals"
35604
35620
  };
@@ -35738,7 +35754,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign(__default__$5, {
35738
35754
  "hide-on-single-page": true
35739
35755
  }, {
35740
35756
  default: withCtx(() => [
35741
- __props.isTotalVisible && unref(layout).includes("slot") ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(displayTotal()), 1)) : createCommentVNode("", true)
35757
+ __props.isTotalVisible && unref(layout).includes("slot") ? (openBlock(), createElementBlock("span", _hoisted_6$5, toDisplayString(displayTotal()), 1)) : createCommentVNode("", true)
35742
35758
  ]),
35743
35759
  _: 1
35744
35760
  }, 8, ["page-size", "current-page", "page-sizes", "layout", "total"]),
@@ -37060,17 +37076,17 @@ const _sfc_main$o = /* @__PURE__ */ Object.assign(__default__$2, {
37060
37076
  "on-file-size-exceeded",
37061
37077
  "on-file-empty",
37062
37078
  "on-file-not-limit",
37063
- "on-change"
37079
+ "on-change",
37080
+ "update:modelValue"
37064
37081
  ],
37065
37082
  setup(__props, { emit: emit2 }) {
37066
37083
  const props = __props;
37067
- ref(false);
37068
- const fileList = ref(props.modelValue);
37069
- const el = ref(null);
37070
- const { modelValue, limit } = toRefs(props);
37071
- watch(modelValue, (newValue) => {
37072
- fileList.value = newValue;
37084
+ const fileList = computed$1({
37085
+ get: () => props.modelValue,
37086
+ set: (val) => emit2("update:modelValue", val)
37073
37087
  });
37088
+ const el = ref(null);
37089
+ const { limit } = toRefs(props);
37074
37090
  const upload2 = (file, fileList2) => {
37075
37091
  if (!fileList2.length) {
37076
37092
  emit2("on-files-not-attached", file, fileList2);
@@ -37103,6 +37119,7 @@ const _sfc_main$o = /* @__PURE__ */ Object.assign(__default__$2, {
37103
37119
  return;
37104
37120
  }
37105
37121
  emit2("on-change", file, fileList2);
37122
+ emit2("update:modelValue", fileList2);
37106
37123
  };
37107
37124
  return (_ctx, _cache) => {
37108
37125
  const _component_el_upload = ElUpload;
@@ -37115,7 +37132,7 @@ const _sfc_main$o = /* @__PURE__ */ Object.assign(__default__$2, {
37115
37132
  "auto-upload": false,
37116
37133
  "on-change": upload2,
37117
37134
  class: "pl-upload-plus"
37118
- }, _ctx.$attrs, { "file-list": fileList.value }), {
37135
+ }, _ctx.$attrs, { "file-list": unref(fileList) }), {
37119
37136
  file: withCtx(({ file }) => [
37120
37137
  renderSlot(_ctx.$slots, "file", { file })
37121
37138
  ]),
@@ -38119,37 +38136,12 @@ var calendar = [
38119
38136
  }
38120
38137
  ];
38121
38138
  const WEEK_DAYS = ["\u041F\u043D", "\u0412\u0442", "\u0421\u0440", "\u0427\u0442", "\u041F\u0442", "\u0421\u0431", "\u0412\u0441"];
38122
- const DISPLAY_MONTHS = [
38123
- "\u042F\u043D\u0432\u0430\u0440\u044F",
38124
- "\u0424\u0435\u0432\u0440\u0430\u043B\u044F",
38125
- "\u041C\u0430\u0440\u0442\u0430",
38126
- "\u0410\u043F\u0440\u0435\u043B\u044F",
38127
- "\u041C\u0430\u044F",
38128
- "\u0418\u044E\u043D\u044F",
38129
- "\u0418\u044E\u043B\u044F",
38130
- "\u0410\u0432\u0433\u0443\u0441\u0442\u0430",
38131
- "\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044F",
38132
- "\u041E\u043A\u0442\u044F\u0431\u0440\u044F",
38133
- "\u041D\u043E\u044F\u0431\u0440\u044F",
38134
- "\u0414\u0435\u043A\u0430\u0431\u0440\u044F"
38135
- ];
38136
38139
  var plDatePickerPlus_vue_vue_type_style_index_0_lang = "";
38137
38140
  const _hoisted_1$d = { class: "date-picker-plus" };
38138
- const _hoisted_2$c = {
38139
- key: 0,
38140
- class: "date-picker-plus__title"
38141
- };
38142
- const _hoisted_3$b = {
38143
- key: 1,
38144
- class: "date-picker-plus__placeholder"
38145
- };
38146
- const _hoisted_4$7 = /* @__PURE__ */ createElementVNode("img", {
38147
- class: "date-picker-plus__img",
38148
- src: _imports_0$4,
38149
- alt: "date-picker icon"
38150
- }, null, -1);
38151
- const _hoisted_5$6 = { class: "date-picker-plus__days" };
38152
- const _hoisted_6$5 = ["onClick"];
38141
+ const _hoisted_2$c = { class: "date-picker-plus__wrapper" };
38142
+ const _hoisted_3$b = { class: "date-picker-plus__days" };
38143
+ const _hoisted_4$7 = ["onClick"];
38144
+ const _hoisted_5$6 = { class: "field" };
38153
38145
  const _sfc_main$d = {
38154
38146
  __name: "pl-date-picker-plus",
38155
38147
  props: {
@@ -38161,6 +38153,10 @@ const _sfc_main$d = {
38161
38153
  type: String,
38162
38154
  default: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0430\u0442\u0443"
38163
38155
  },
38156
+ label: {
38157
+ type: String,
38158
+ default: ""
38159
+ },
38164
38160
  weekendsDisabled: {
38165
38161
  type: Boolean,
38166
38162
  default: true
@@ -38175,42 +38171,46 @@ const _sfc_main$d = {
38175
38171
  const selectedDate = ref(dayjs());
38176
38172
  const confirmedDate = ref(dayjs());
38177
38173
  const isOpen = ref(false);
38174
+ const datePickerRef = ref(null);
38175
+ const dateValue = ref(dayjs().format("DD.MM.YYYY"));
38178
38176
  const weekendsDate = calendar;
38179
- const displayDate = (value) => {
38180
- const dayjsDate = dayjs.isDayjs(value) ? value : dayjs(value);
38181
- return `${dayjsDate.date()} ${DISPLAY_MONTHS[dayjsDate.month()]}, ${dayjsDate.year()}`;
38182
- };
38183
38177
  const checkCurrentMonthDays = (dayItem) => {
38184
38178
  return selectedDate.value.date() === dayItem.day && selectedDate.value.month() === dayItem.month && selectedDate.value.year() === dayItem.year && dayItem.type === "current";
38185
38179
  };
38186
- const closeDatePicker = () => {
38187
- currentDate.value = confirmedDate.value;
38188
- selectedDate.value = confirmedDate.value;
38189
- isOpen.value = false;
38190
- };
38191
- const toggleDatePicker = () => {
38192
- currentDate.value = confirmedDate.value;
38193
- selectedDate.value = confirmedDate.value;
38194
- isOpen.value = !isOpen.value;
38195
- };
38196
- const target = ref(null);
38197
- onClickOutside(target, () => {
38198
- setTimeout(() => {
38199
- closeDatePicker();
38200
- });
38201
- });
38180
+ ref(null);
38181
+ const displayData = (value) => value.format("DD.MM.YYYY");
38202
38182
  const confirmDate = () => {
38203
38183
  confirmedDate.value = selectedDate.value;
38204
- currentDate.value = selectedDate.value;
38205
- emit2("update:modelValue", confirmedDate.value.toDate());
38206
- isOpen.value = false;
38184
+ dateValue.value = displayData(selectedDate.value);
38185
+ emit2("update:modelValue", selectedDate.value.format("DD.MM.YYYY"));
38207
38186
  };
38208
38187
  const selectDate = (item) => {
38209
- if (item.type === "current") {
38210
- selectedDate.value = dayjs().set("date", item.day).set("month", item.month).set("year", item.year);
38211
- confirmDate();
38188
+ selectedDate.value = dayjs().set("date", item.day).set("month", item.month).set("year", item.year);
38189
+ confirmDate();
38190
+ };
38191
+ const validate = (date4, format2) => {
38192
+ return dayjs(date4, format2).format(format2) === date4;
38193
+ };
38194
+ const savedDate = ref();
38195
+ const updateDate = (event) => {
38196
+ savedDate.value = dayjs(event.target.value.split(".").reverse().join("-"));
38197
+ if (validate(dateValue.value, "DD.MM.YYYY")) {
38198
+ if (savedDate.value) {
38199
+ currentDate.value = savedDate.value;
38200
+ selectedDate.value = savedDate.value;
38201
+ emit2("update:modelValue", selectedDate.value.format("DD.MM.YYYY"));
38202
+ } else {
38203
+ savedDate.value = confirmedDate.value;
38204
+ }
38205
+ } else {
38206
+ dateValue.value = displayData(selectedDate.value);
38212
38207
  }
38213
38208
  };
38209
+ onClickOutside(datePickerRef, () => {
38210
+ setTimeout(() => {
38211
+ isOpen.value = false;
38212
+ });
38213
+ });
38214
38214
  const getArrayOfDays = () => {
38215
38215
  const prevMonthDays = [];
38216
38216
  const currMonthDays = [];
@@ -38250,24 +38250,35 @@ const _sfc_main$d = {
38250
38250
  });
38251
38251
  return (_ctx, _cache) => {
38252
38252
  return openBlock(), createElementBlock("div", _hoisted_1$d, [
38253
- createElementVNode("div", {
38254
- class: "date-picker-plus__wrapper",
38255
- onClick: toggleDatePicker
38256
- }),
38257
- __props.modelValue ? (openBlock(), createElementBlock("span", _hoisted_2$c, toDisplayString(displayDate(__props.modelValue)), 1)) : (openBlock(), createElementBlock("span", _hoisted_3$b, toDisplayString(__props.placeholder), 1)),
38258
- _hoisted_4$7,
38253
+ createElementVNode("div", _hoisted_2$c, [
38254
+ createVNode(_sfc_main$z, {
38255
+ modelValue: dateValue.value,
38256
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dateValue.value = $event),
38257
+ class: "date-picker-plus__input",
38258
+ label: __props.label,
38259
+ placeholder: __props.placeholder,
38260
+ onInput: updateDate,
38261
+ datePicker: ""
38262
+ }, null, 8, ["modelValue", "label", "placeholder"]),
38263
+ createElementVNode("img", {
38264
+ class: "date-picker-plus__img",
38265
+ src: _imports_0$4,
38266
+ alt: "date-picker icon",
38267
+ onClick: _cache[1] || (_cache[1] = ($event) => isOpen.value = !isOpen.value)
38268
+ })
38269
+ ]),
38259
38270
  isOpen.value ? (openBlock(), createElementBlock("div", {
38260
- key: 2,
38271
+ key: 0,
38261
38272
  id: "date-picker-popup",
38262
38273
  class: "date-picker-plus__popup",
38263
- ref_key: "target",
38264
- ref: target
38274
+ ref_key: "datePickerRef",
38275
+ ref: datePickerRef
38265
38276
  }, [
38266
38277
  createVNode(_sfc_main$e, {
38267
38278
  modelValue: currentDate.value,
38268
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentDate.value = $event)
38279
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => currentDate.value = $event)
38269
38280
  }, null, 8, ["modelValue"]),
38270
- createElementVNode("div", _hoisted_5$6, [
38281
+ createElementVNode("div", _hoisted_3$b, [
38271
38282
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(WEEK_DAYS), (item, index) => {
38272
38283
  return openBlock(), createElementBlock("div", {
38273
38284
  class: "date-picker-plus__week-day",
@@ -38284,8 +38295,10 @@ const _sfc_main$d = {
38284
38295
  { "date-picker-plus__day-item_active-item": checkCurrentMonthDays(item) }
38285
38296
  ]),
38286
38297
  key: `dd${index}`,
38287
- onClick: ($event) => item.weekend ? {} : selectDate(item)
38288
- }, toDisplayString(item.day), 11, _hoisted_6$5);
38298
+ onClick: ($event) => (item.weekend || (item.type === "previous" || item.type === "next") ? {} : selectDate(item), isOpen.value = false)
38299
+ }, [
38300
+ createElementVNode("div", _hoisted_5$6, toDisplayString(item.type !== "previous" && item.type !== "next" ? item.day : ""), 1)
38301
+ ], 10, _hoisted_4$7);
38289
38302
  }), 128))
38290
38303
  ])
38291
38304
  ], 512)) : createCommentVNode("", true)