@dv.net/ui-kit 7.5.2 → 7.5.3

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.
@@ -1,14 +1,14 @@
1
- import { defineComponent as X, mergeModels as Z, useModel as Y, computed as k, ref as $, onMounted as x, createElementBlock as P, openBlock as p, normalizeClass as ee, createVNode as r, unref as t, withCtx as s, createElementVNode as D, createCommentVNode as z, renderSlot as N, createBlock as R, createTextVNode as C, toDisplayString as y } from "vue";
2
- import { _ as te } from "./DatePickerInputs.vue_vue_type_script_setup_true_lang.BDpkRcEN.js";
3
- import { Q as ae } from "./style.C3xG1ALc.js";
4
- import { _ as ie } from "./DatePickerPresets.vue_vue_type_script_setup_true_lang.CKckhapZ.js";
1
+ import { defineComponent as x, mergeModels as N, useModel as ee, computed as k, ref as $, onMounted as te, createElementBlock as P, openBlock as p, normalizeClass as ae, createVNode as r, unref as t, withCtx as s, createElementVNode as D, createCommentVNode as z, renderSlot as R, createBlock as U, createTextVNode as C, toDisplayString as y } from "vue";
2
+ import { _ as ie } from "./DatePickerInputs.vue_vue_type_script_setup_true_lang.BDpkRcEN.js";
3
+ import { Q as le } from "./style.C3xG1ALc.js";
4
+ import { _ as oe } from "./DatePickerPresets.vue_vue_type_script_setup_true_lang.CKckhapZ.js";
5
5
  /* empty css */
6
- import { _ as oe } from "./DatePickerSlider.vue_vue_type_script_setup_true_lang.BGkzUy3Z.js";
7
- import { _ as U } from "./UiIconButton.vue_vue_type_script_setup_true_lang.cJvSLKjQ.js";
8
- import { a as le } from "./index.Cp1LhIxy.js";
6
+ import { _ as ne } from "./DatePickerSlider.vue_vue_type_script_setup_true_lang.BGkzUy3Z.js";
7
+ import { _ as F } from "./UiIconButton.vue_vue_type_script_setup_true_lang.cJvSLKjQ.js";
8
+ import { a as re } from "./index.Cp1LhIxy.js";
9
9
  import "./vue3-lottie.es.BGWavb2-.js";
10
- import { _ as F } from "./UiButton.vue_vue_type_script_setup_true_lang.C58Ve9-q.js";
11
- import { _ as ne } from "./UiIcon.vue_vue_type_script_setup_true_lang.BjdWpbZ0.js";
10
+ import { _ as E } from "./UiButton.vue_vue_type_script_setup_true_lang.C58Ve9-q.js";
11
+ import { _ as se } from "./UiIcon.vue_vue_type_script_setup_true_lang.BjdWpbZ0.js";
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  import { config as b } from "../config/index.js";
@@ -19,10 +19,10 @@ import { config as b } from "../config/index.js";
19
19
  /* empty css */
20
20
  /* empty css */
21
21
  /* empty css */
22
- import { u as re } from "./useDatePicker.DnhbkLG1.js";
22
+ import { u as me } from "./useDatePicker.DnhbkLG1.js";
23
23
  /* empty css */
24
- import { useDatePickerPresets as se } from "../components/UiDatepicker/composables/useDatePickerPresets.js";
25
- import { useDatePickerSelected as me } from "../components/UiDatepicker/composables/useDatePickerSelected.js";
24
+ import { useDatePickerPresets as ue } from "../components/UiDatepicker/composables/useDatePickerPresets.js";
25
+ import { useDatePickerSelected as de } from "../components/UiDatepicker/composables/useDatePickerSelected.js";
26
26
  /* empty css */
27
27
  /* empty css */
28
28
  /* empty css */
@@ -39,15 +39,15 @@ import "vue-router";
39
39
  /* empty css */
40
40
  /* empty css */
41
41
  /* empty css */
42
- const ue = {
42
+ const ce = {
43
43
  key: 1,
44
44
  class: "ui-datepicker__trigger"
45
- }, de = { class: "ui-datepicker__navigate" }, ce = { class: "ui-datepicker__navigate-value" }, pe = { class: "ui-datepicker__actions" }, ve = {
45
+ }, pe = { class: "ui-datepicker__navigate" }, ve = { class: "ui-datepicker__navigate-value" }, fe = { class: "ui-datepicker__actions" }, ge = {
46
46
  key: 0,
47
47
  class: "ui-datepicker__actions-slot"
48
- }, fe = { class: "ui-datepicker__actions-btns" }, it = /* @__PURE__ */ X({
48
+ }, ke = { class: "ui-datepicker__actions-btns" }, ot = /* @__PURE__ */ x({
49
49
  __name: "UiDatepickerRange",
50
- props: /* @__PURE__ */ Z({
50
+ props: /* @__PURE__ */ N({
51
51
  disabled: { type: Boolean },
52
52
  beginDate: {},
53
53
  size: { default: "xs" },
@@ -63,26 +63,26 @@ const ue = {
63
63
  modelValue: { default: [] },
64
64
  modelModifiers: {}
65
65
  }),
66
- emits: ["update:modelValue"],
67
- setup(w) {
68
- const n = w, i = Y(w, "modelValue"), { width: E } = le(), { dayjs: m, today: Q, endDate: _, startDate: V, beginDate: j, modelValueFormat: h } = re(i), M = k(
66
+ emits: /* @__PURE__ */ N(["clear"], ["update:modelValue"]),
67
+ setup(w, { emit: Q }) {
68
+ const n = w, j = Q, i = ee(w, "modelValue"), { width: W } = re(), { dayjs: m, today: q, endDate: _, startDate: V, beginDate: G, modelValueFormat: h } = me(i), M = k(
69
69
  () => n.enableTimePicker ? `${h.value} HH:mm` : h.value
70
- ), u = $(), l = $(["", ""]), d = $(!1), W = k(
70
+ ), u = $(), o = $(["", ""]), d = $(!1), J = k(
71
71
  () => n.beginDate ? m(n.beginDate).format(h.value) : null
72
- ), v = k(() => n.maxDate ?? Q), B = k(() => n.minDate), { presets: f } = se({ beginDate: W.value ?? j.value }), { isAllTimeSelected: q, selectedDate: A, formattedSelectedDate: G, selectedRange: J } = me({
72
+ ), v = k(() => n.maxDate ?? q), B = k(() => n.minDate), { presets: f } = ue({ beginDate: J.value ?? G.value }), { isAllTimeSelected: K, selectedDate: A, formattedSelectedDate: L, selectedRange: O } = de({
73
73
  presets: f,
74
74
  startDate: V,
75
75
  endDate: _,
76
76
  minDate: B,
77
77
  maxDate: v
78
78
  });
79
- function K(e) {
79
+ function X(e) {
80
80
  H(e.date), u.value.closeMenu();
81
81
  }
82
- function L(e) {
82
+ function Z(e) {
83
83
  if (!e) return;
84
84
  const a = Array.isArray(e) ? e : [e, e];
85
- d.value = e.length < 2, a.length === 2 && (l.value = a);
85
+ d.value = e.length < 2, a.length === 2 && (o.value = a);
86
86
  }
87
87
  function T(e) {
88
88
  i.value = [m(e[0]).format(M.value), m(e[1]).format(M.value)];
@@ -90,37 +90,37 @@ const ue = {
90
90
  function H(e) {
91
91
  const a = Array.isArray(e) ? e : [e, e];
92
92
  if (V.value && _.value) {
93
- const o = n.enableTimePicker ? "minute" : "day";
94
- V.value.isSame(a[0], o) && _.value.isSame(a[1], o) || T(a);
93
+ const l = n.enableTimePicker ? "minute" : "day";
94
+ V.value.isSame(a[0], l) && _.value.isSame(a[1], l) || T(a);
95
95
  } else
96
96
  T(a);
97
97
  }
98
- function O() {
99
- const e = n.single ? m(l.value[0], b.uiDatePicker.modelValueFormat).toDate() : l.value;
98
+ function Y() {
99
+ const e = n.single ? m(o.value[0], b.uiDatePicker.modelValueFormat).toDate() : o.value;
100
100
  u.value?.updateInternalModelValue(e), u.value?.setMonthYear({
101
- month: m(l.value[0]).month(),
102
- year: m(l.value[0]).year()
101
+ month: m(o.value[0]).month(),
102
+ year: m(o.value[0]).year()
103
103
  });
104
104
  }
105
105
  const I = () => {
106
- i.value = [], l.value = ["", ""], d.value = !0, u.value?.closeMenu();
106
+ i.value = [], o.value = ["", ""], d.value = !0, u.value?.closeMenu(), j("clear");
107
107
  };
108
- return x(() => {
108
+ return te(() => {
109
109
  i.value.length || (d.value = !0);
110
110
  }), (e, a) => (p(), P("div", {
111
- class: ee(["ui-datepicker-range", [e.size, { "is-disabled": e.disabled }]])
111
+ class: ae(["ui-datepicker-range", [e.size, { "is-disabled": e.disabled }]])
112
112
  }, [
113
- r(oe, {
114
- disabled: !i.value.length || t(q),
113
+ r(ne, {
114
+ disabled: !i.value.length || t(K),
115
115
  modelValue: i.value,
116
- "onUpdate:modelValue": a[2] || (a[2] = (o) => i.value = o),
117
- "selected-range": t(J),
116
+ "onUpdate:modelValue": a[2] || (a[2] = (l) => i.value = l),
117
+ "selected-range": t(O),
118
118
  "is-show": !e.hideSliderArrows,
119
119
  "min-date": B.value,
120
120
  "max-date": v.value
121
121
  }, {
122
122
  default: s(() => [
123
- r(t(ae), {
123
+ r(t(le), {
124
124
  position: "center",
125
125
  locale: t(b).locale,
126
126
  ref_key: "pickerRef",
@@ -131,7 +131,7 @@ const ue = {
131
131
  "hours-grid-increment": 1,
132
132
  "minutes-grid-increment": 1,
133
133
  range: !e.single,
134
- "multi-calendars": !e.single && t(E) > 1e3,
134
+ "multi-calendars": !e.single && t(W) > 1e3,
135
135
  "month-name-format": "long",
136
136
  "max-date": v.value,
137
137
  "min-date": B.value,
@@ -140,49 +140,49 @@ const ue = {
140
140
  offset: 0,
141
141
  timezone: e.timezone,
142
142
  "onUpdate:modelValue": H,
143
- onInternalModelChange: L
143
+ onInternalModelChange: Z
144
144
  }, {
145
145
  "left-sidebar": s(() => [
146
- !e.single && t(f).length ? (p(), R(ie, {
146
+ !e.single && t(f).length ? (p(), U(oe, {
147
147
  key: 0,
148
148
  presets: t(f),
149
- date: l.value,
150
- onChange: K
149
+ date: o.value,
150
+ onChange: X
151
151
  }, null, 8, ["presets", "date"])) : z("", !0),
152
- r(te, {
153
- onChange: O,
154
- onSubmit: a[0] || (a[0] = (o) => u.value.selectDate()),
155
- modelValue: l.value,
156
- "onUpdate:modelValue": a[1] || (a[1] = (o) => l.value = o),
152
+ r(ie, {
153
+ onChange: Y,
154
+ onSubmit: a[0] || (a[0] = (l) => u.value.selectDate()),
155
+ modelValue: o.value,
156
+ "onUpdate:modelValue": a[1] || (a[1] = (l) => o.value = l),
157
157
  single: e.single
158
158
  }, null, 8, ["modelValue", "single"])
159
159
  ]),
160
160
  trigger: s(() => [
161
- e.$slots.trigger ? N(e.$slots, "trigger", {
161
+ e.$slots.trigger ? R(e.$slots, "trigger", {
162
162
  key: 0,
163
163
  date: i.value,
164
164
  presets: t(f),
165
165
  selectedDate: t(A),
166
- formattedSelectedDate: t(G)
167
- }) : (p(), P("button", ue, [
168
- r(t(ne), {
166
+ formattedSelectedDate: t(L)
167
+ }) : (p(), P("button", ce, [
168
+ r(t(se), {
169
169
  type: "400",
170
170
  name: "calendar-month"
171
171
  }),
172
172
  C(y(t(A)), 1)
173
173
  ]))
174
174
  ]),
175
- "month-year": s(({ month: o, months: c, handleMonthYearChange: g }) => [
176
- D("div", de, [
177
- r(U, {
175
+ "month-year": s(({ month: l, months: c, handleMonthYearChange: g }) => [
176
+ D("div", pe, [
177
+ r(F, {
178
178
  onClick: (S) => g && g(!1),
179
179
  "icon-type": "400",
180
180
  size: "lg",
181
181
  "icon-name": "chevron-left 1",
182
182
  "no-size": ""
183
183
  }, null, 8, ["onClick"]),
184
- D("span", ce, y(c?.find((S) => S.value === o)?.text), 1),
185
- r(U, {
184
+ D("span", ve, y(c?.find((S) => S.value === l)?.text), 1),
185
+ r(F, {
186
186
  onClick: (S) => g && g(!0),
187
187
  "icon-type": "400",
188
188
  size: "lg",
@@ -191,11 +191,11 @@ const ue = {
191
191
  }, null, 8, ["onClick"])
192
192
  ])
193
193
  ]),
194
- "action-row": s(({ disabled: o, selectDate: c }) => [
195
- D("div", pe, [
196
- e.$slots["action-row"] ? (p(), P("div", ve, [
197
- N(e.$slots, "action-row", {
198
- disabled: o,
194
+ "action-row": s(({ disabled: l, selectDate: c }) => [
195
+ D("div", fe, [
196
+ e.$slots["action-row"] ? (p(), P("div", ge, [
197
+ R(e.$slots, "action-row", {
198
+ disabled: l,
199
199
  selectDate: c,
200
200
  clearDate: I,
201
201
  isDisabledBtn: d.value,
@@ -203,9 +203,9 @@ const ue = {
203
203
  clearable: e.clearable
204
204
  })
205
205
  ])) : z("", !0),
206
- D("div", fe, [
207
- r(t(F), {
208
- disabled: d.value || o,
206
+ D("div", ke, [
207
+ r(t(E), {
208
+ disabled: d.value || l,
209
209
  mode: "neutral",
210
210
  onClick: c
211
211
  }, {
@@ -214,7 +214,7 @@ const ue = {
214
214
  ]),
215
215
  _: 2
216
216
  }, 1032, ["disabled", "onClick"]),
217
- i.value.length && e.clearable ? (p(), R(t(F), {
217
+ i.value.length && e.clearable ? (p(), U(t(E), {
218
218
  key: 0,
219
219
  type: "secondary",
220
220
  onClick: I
@@ -236,5 +236,5 @@ const ue = {
236
236
  }
237
237
  });
238
238
  export {
239
- it as _
239
+ ot as _
240
240
  };
@@ -1,4 +1,4 @@
1
- import { _ as m } from "../../assets/UiDatepickerRange.vue_vue_type_script_setup_true_lang.DCzJY2wh.js";
1
+ import { _ as m } from "../../assets/UiDatepickerRange.vue_vue_type_script_setup_true_lang.4d4FeAtU.js";
2
2
  import "../../assets/style.C3xG1ALc.js";
3
3
  export {
4
4
  m as default
@@ -1093,7 +1093,10 @@ declare function __VLS_template(): {
1093
1093
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
1094
1094
  declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
1095
1095
  "update:modelValue": (value: string[]) => any;
1096
+ } & {
1097
+ clear: () => any;
1096
1098
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
1099
+ onClear?: (() => any) | undefined;
1097
1100
  "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
1098
1101
  }>, {
1099
1102
  size: import('./types').DatepickerSize;
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import { _ as v } from "./assets/UiCollapseItem.vue_vue_type_script_setup_true_l
12
12
  import { _ as j } from "./assets/UiConfirm.vue_vue_type_script_setup_true_lang.C0NGQkz6.js";
13
13
  import { _ as O } from "./assets/UiCopyText.vue_vue_type_script_setup_true_lang.BW_J9zQD.js";
14
14
  /* empty css */
15
- import { _ as z } from "./assets/UiDatepickerRange.vue_vue_type_script_setup_true_lang.DCzJY2wh.js";
15
+ import { _ as z } from "./assets/UiDatepickerRange.vue_vue_type_script_setup_true_lang.4d4FeAtU.js";
16
16
  import { default as H } from "./components/UiDragAndDrop/UiDragAndDrop.js";
17
17
  import { _ as K } from "./assets/UiDrawer.vue_vue_type_script_setup_true_lang.7FvRxX0A.js";
18
18
  /* empty css */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dv.net/ui-kit",
3
3
  "private": false,
4
- "version": "7.5.2",
4
+ "version": "7.5.3",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "module": "dist/index.js",