admins-components 9.0.4 → 9.0.6

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.
Files changed (188) hide show
  1. package/dist/admins-components.js +58 -54
  2. package/dist/admins-components10.js +10 -0
  3. package/dist/admins-components100.js +23 -247
  4. package/dist/admins-components101.js +171 -26
  5. package/dist/admins-components102.js +65 -25
  6. package/dist/admins-components103.js +67 -162
  7. package/dist/admins-components104.js +27 -65
  8. package/dist/admins-components105.js +12 -63
  9. package/dist/admins-components106.js +26 -29
  10. package/dist/admins-components107.js +10 -16
  11. package/dist/admins-components108.js +3 -26
  12. package/dist/admins-components109.js +2 -8
  13. package/dist/admins-components11.js +38 -9
  14. package/dist/admins-components110.js +3 -4
  15. package/dist/admins-components111.js +21 -3
  16. package/dist/admins-components112.js +14 -3
  17. package/dist/admins-components113.js +7 -20
  18. package/dist/admins-components114.js +13 -14
  19. package/dist/admins-components115.js +34 -8
  20. package/dist/admins-components116.js +82 -12
  21. package/dist/admins-components117.js +9 -24
  22. package/dist/admins-components118.js +4 -82
  23. package/dist/admins-components119.js +8 -11
  24. package/dist/admins-components12.js +141 -37
  25. package/dist/admins-components120.js +6 -4
  26. package/dist/admins-components121.js +6 -8
  27. package/dist/admins-components122.js +14 -6
  28. package/dist/admins-components123.js +11 -4
  29. package/dist/admins-components124.js +30 -15
  30. package/dist/admins-components125.js +4 -13
  31. package/dist/admins-components126.js +29 -30
  32. package/dist/admins-components127.js +5 -4
  33. package/dist/admins-components128.js +5 -29
  34. package/dist/admins-components129.js +21 -4
  35. package/dist/admins-components13.js +5 -142
  36. package/dist/admins-components130.js +81 -4
  37. package/dist/admins-components131.js +32 -7
  38. package/dist/admins-components132.js +58 -73
  39. package/dist/admins-components133.js +24 -29
  40. package/dist/admins-components134.js +47 -56
  41. package/dist/admins-components135.js +31 -23
  42. package/dist/admins-components136.js +3 -50
  43. package/dist/admins-components137.js +184 -29
  44. package/dist/admins-components138.js +46 -3
  45. package/dist/admins-components139.js +35 -177
  46. package/dist/admins-components14.js +46 -5
  47. package/dist/admins-components140.js +41 -41
  48. package/dist/admins-components141.js +137 -32
  49. package/dist/admins-components142.js +54 -42
  50. package/dist/admins-components143.js +6 -140
  51. package/dist/admins-components144.js +5 -57
  52. package/dist/admins-components145.js +75 -6
  53. package/dist/admins-components146.js +28 -5
  54. package/dist/admins-components147.js +1929 -74
  55. package/dist/admins-components148.js +25068 -29
  56. package/dist/admins-components149.js +8 -1930
  57. package/dist/admins-components15.js +4 -46
  58. package/dist/admins-components150.js +5 -24809
  59. package/dist/admins-components151.js +141 -8
  60. package/dist/admins-components152.js +8 -141
  61. package/dist/admins-components153.js +3 -3
  62. package/dist/admins-components155.js +169 -0
  63. package/dist/admins-components156.js +44 -161
  64. package/dist/admins-components157.js +8 -50
  65. package/dist/admins-components158.js +49 -8
  66. package/dist/admins-components159.js +6 -50
  67. package/dist/admins-components16.js +94 -4
  68. package/dist/admins-components160.js +80 -6
  69. package/dist/admins-components161.js +48 -70
  70. package/dist/admins-components162.js +32 -31
  71. package/dist/admins-components163.js +8 -58
  72. package/dist/admins-components164.js +51 -8
  73. package/dist/admins-components165.js +8 -51
  74. package/dist/{admins-components168.js → admins-components167.js} +5 -5
  75. package/dist/admins-components17.js +225 -91
  76. package/dist/admins-components18.js +5 -228
  77. package/dist/admins-components19.js +181 -5
  78. package/dist/admins-components21.js +7 -0
  79. package/dist/admins-components22.js +72 -6
  80. package/dist/admins-components23.js +6 -72
  81. package/dist/admins-components24.js +58 -6
  82. package/dist/admins-components26.js +7 -0
  83. package/dist/admins-components27.js +60 -6
  84. package/dist/admins-components29.js +7 -0
  85. package/dist/admins-components30.js +36 -6
  86. package/dist/admins-components32.js +7 -0
  87. package/dist/admins-components33.js +36 -6
  88. package/dist/admins-components34.js +4 -36
  89. package/dist/admins-components35.js +32 -4
  90. package/dist/admins-components37.js +7 -0
  91. package/dist/admins-components38.js +147 -6
  92. package/dist/admins-components4.js +2 -2
  93. package/dist/admins-components40.js +7 -0
  94. package/dist/admins-components41.js +124 -6
  95. package/dist/admins-components42.js +4 -124
  96. package/dist/admins-components43.js +179 -4
  97. package/dist/admins-components44.js +4 -179
  98. package/dist/admins-components45.js +19 -4
  99. package/dist/admins-components47.js +7 -0
  100. package/dist/admins-components48.js +54 -6
  101. package/dist/admins-components49.js +93 -54
  102. package/dist/admins-components5.js +5 -0
  103. package/dist/admins-components51.js +7 -0
  104. package/dist/admins-components52.js +25 -6
  105. package/dist/admins-components53.js +9 -25
  106. package/dist/admins-components54.js +19 -9
  107. package/dist/admins-components55.js +72 -18
  108. package/dist/admins-components56.js +59 -73
  109. package/dist/admins-components57.js +4 -59
  110. package/dist/admins-components58.js +121 -0
  111. package/dist/admins-components6.js +29 -6
  112. package/dist/admins-components60.js +6 -6
  113. package/dist/admins-components61.js +126 -103
  114. package/dist/admins-components63.js +3 -3
  115. package/dist/admins-components64.js +7 -143
  116. package/dist/admins-components65.js +264 -0
  117. package/dist/admins-components67.js +6 -7
  118. package/dist/admins-components68.js +98 -250
  119. package/dist/admins-components7.js +252 -29
  120. package/dist/admins-components70.js +2 -2
  121. package/dist/admins-components71.js +54 -106
  122. package/dist/admins-components72.js +222 -0
  123. package/dist/admins-components74.js +6 -59
  124. package/dist/admins-components75.js +8 -221
  125. package/dist/admins-components76.js +47 -0
  126. package/dist/admins-components77.js +250 -6
  127. package/dist/admins-components79.js +7 -46
  128. package/dist/admins-components80.js +32 -245
  129. package/dist/admins-components82.js +2 -3
  130. package/dist/admins-components83.js +192 -31
  131. package/dist/admins-components85.js +2 -2
  132. package/dist/admins-components86.js +200 -195
  133. package/dist/admins-components88.js +3 -2
  134. package/dist/admins-components89.js +3 -203
  135. package/dist/admins-components90.js +17 -0
  136. package/dist/admins-components91.js +3 -7
  137. package/dist/admins-components92.js +52 -3
  138. package/dist/admins-components93.js +80 -50
  139. package/dist/admins-components94.js +109 -77
  140. package/dist/admins-components95.js +44 -3
  141. package/dist/admins-components96.js +101 -108
  142. package/dist/admins-components97.js +6 -23
  143. package/dist/admins-components98.js +257 -100
  144. package/dist/admins-components99.js +27 -7
  145. package/dist/base.css +1 -1
  146. package/dist/src/components/Button.vue.d.ts +1 -1
  147. package/dist/src/components/Calendar.vue.d.ts +1 -1
  148. package/dist/src/components/ConfirmModal.vue.d.ts +1 -1
  149. package/dist/src/components/DatePicker.vue.d.ts +2 -2
  150. package/dist/src/components/DateRangePicker.vue.d.ts +2 -2
  151. package/dist/src/components/DropdownMenu.vue.d.ts +2 -2
  152. package/dist/src/components/DropdownSelect.vue.d.ts +1 -1
  153. package/dist/src/components/HeaderComponent.vue.d.ts +2 -2
  154. package/dist/src/components/custom/ImagePicker.vue.d.ts +1 -1
  155. package/dist/src/components/data-table/DataCards.vue.d.ts +2 -2
  156. package/dist/src/components/data-table/DataCell.vue.d.ts +1 -1
  157. package/dist/src/components/data-table/DataFilters.vue.d.ts +4 -4
  158. package/dist/src/components/data-table/DataList.vue.d.ts +4 -4
  159. package/dist/src/components/data-table/DataListGuide.vue.d.ts +1 -1
  160. package/dist/src/components/data-table/DataListOptions.vue.d.ts +2 -2
  161. package/dist/src/components/data-table/DataPaginator.vue.d.ts +1 -1
  162. package/dist/src/components/data-table/DataTable.vue.d.ts +3 -3
  163. package/dist/src/components/data-table/FilterTags.vue.d.ts +1 -1
  164. package/dist/src/components/data-table/FiltersHistory.vue.d.ts +1 -1
  165. package/dist/src/index.d.ts +85 -80
  166. package/dist/src/styles/components/data-table/data-list.scss_vue_type_style_index_0_src_true_lang.css +1 -1
  167. package/dist/src/styles/components/data-table/filter-tags.scss_vue_type_style_index_0_src_true_lang.css +1 -1
  168. package/dist/src/styles/components/loader.scss_vue_type_style_index_0_src_true_lang.css +1 -1
  169. package/dist/src/vueformelements/config/ExternalArticleOfferElementConfig.d.ts +1 -1
  170. package/package.json +4 -5
  171. package/dist/admins-components154.js +0 -10
  172. package/dist/admins-components166.js +0 -10
  173. package/dist/admins-components20.js +0 -182
  174. package/dist/admins-components25.js +0 -59
  175. package/dist/admins-components28.js +0 -61
  176. package/dist/admins-components31.js +0 -37
  177. package/dist/admins-components36.js +0 -33
  178. package/dist/admins-components39.js +0 -148
  179. package/dist/admins-components46.js +0 -20
  180. package/dist/admins-components50.js +0 -94
  181. package/dist/admins-components59.js +0 -8
  182. package/dist/admins-components66.js +0 -8
  183. package/dist/admins-components73.js +0 -7
  184. package/dist/admins-components78.js +0 -9
  185. package/dist/admins-components8.js +0 -253
  186. package/dist/index.d.ts +0 -2
  187. package/dist/src/components/data-table/DataCell.vue_vue_type_style_index_0_scoped_d46d9895_lang.css +0 -1
  188. package/dist/src/styles/_buttons.scss_vue_type_style_index_0_src_true_lang.css +0 -1
@@ -1,95 +1,229 @@
1
- import { endOfDay as e, isSameCalendarDay as t, localToUTCString as n, startOfDay as r, startOfWeek as i } from "./admins-components3.js";
2
- //#region src/utils/predefinedDateRange.ts
3
- var a = [
4
- {
5
- key: "lastDay",
6
- label: "Tegnap"
1
+ import { earlierOf as e, endOfDay as t, formatDate as n, laterOf as r, localToUTCString as i } from "./admins-components3.js";
2
+ import a from "./admins-components5.js";
3
+ import { dateRangePickerConfigDefaults as o } from "./admins-components6.js";
4
+ import { useDropdownAnchor as ee } from "./admins-components11.js";
5
+ import s from "./admins-components13.js";
6
+ import { applyPredefinedRange as te, canStepInBounds as c, isPredefinedRangeInBounds as ne, matchPredefinedRange as re, predefinedRanges as l } from "./admins-components16.js";
7
+ import { Fragment as u, Teleport as ie, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, normalizeClass as v, normalizeStyle as ae, openBlock as y, ref as b, renderList as x, resolveDirective as S, toDisplayString as C, unref as w, watch as T, withDirectives as E, withModifiers as D } from "vue";
8
+ //#region src/components/DateRangePicker.vue?vue&type=script&setup=true&lang.ts
9
+ var oe = { class: "drp-input" }, se = { class: "c-truncate drp-input__single" }, ce = { class: "drp-input__multi" }, le = { class: "c-truncate drp-input__line" }, ue = { class: "c-truncate drp-input__line" }, de = {
10
+ key: 1,
11
+ class: "c-placeholder drp-input__placeholder"
12
+ }, fe = { class: "drp-pickers" }, pe = { class: "drp-picker-group" }, me = { class: "drp-label" }, he = { class: "drp-picker-group" }, ge = { class: "drp-label" }, _e = {
13
+ key: 0,
14
+ class: "drp-toolbar"
15
+ }, ve = { class: "flex" }, ye = { class: "predefined-ranges" }, O = ["aria-disabled", "onClick"], k = { class: "flex" }, A = {
16
+ key: 1,
17
+ class: "c-footer"
18
+ }, j = /*@__PURE__*/ _({
19
+ __name: "DateRangePicker",
20
+ props: {
21
+ modelValue: { default: null },
22
+ config: { default: () => ({ ...o }) }
7
23
  },
8
- {
9
- key: "thisDay",
10
- label: "Ma"
11
- },
12
- {
13
- key: "lastWeek",
14
- label: "Múlt hét"
15
- },
16
- {
17
- key: "thisWeek",
18
- label: "E hét"
19
- },
20
- {
21
- key: "lastMonth",
22
- label: "Múlt hónap"
23
- },
24
- {
25
- key: "thisMonth",
26
- label: "E hónap"
27
- }
28
- ];
29
- function o(t, n = /* @__PURE__ */ new Date()) {
30
- if (t === "thisDay") return {
31
- from: r(n),
32
- to: e(n)
33
- };
34
- if (t === "lastDay") {
35
- let t = new Date(n);
36
- return t.setDate(t.getDate() - 1), {
37
- from: r(t),
38
- to: e(t)
39
- };
40
- }
41
- if (t === "thisWeek") {
42
- let t = i(n);
43
- return {
44
- from: t,
45
- to: e(new Date(t.getFullYear(), t.getMonth(), t.getDate() + 6))
46
- };
47
- }
48
- if (t === "lastWeek") {
49
- let t = i(n), r = new Date(t);
50
- r.setDate(r.getDate() - 7);
51
- let a = e(new Date(t));
52
- return a.setDate(a.getDate() - 1), {
53
- from: r,
54
- to: a
55
- };
56
- }
57
- return t === "thisMonth" ? {
58
- from: r(new Date(n.getFullYear(), n.getMonth(), 1)),
59
- to: e(new Date(n.getFullYear(), n.getMonth() + 1, 0))
60
- } : {
61
- from: r(new Date(n.getFullYear(), n.getMonth() - 1, 1)),
62
- to: e(new Date(n.getFullYear(), n.getMonth(), 0))
63
- };
64
- }
65
- function s(e, t) {
66
- let { from: i, to: a } = o(e, t.now), s = t.showTime ? a : r(a);
67
- return {
68
- from: {
69
- local: i,
70
- utc: n(i, t.showTime)
71
- },
72
- to: {
73
- local: s,
74
- utc: n(s, t.showTime)
24
+ emits: ["update:modelValue"],
25
+ setup(_, { expose: j, emit: M }) {
26
+ let N = _, P = M, F = d(() => ({
27
+ ...o,
28
+ ...N.config
29
+ })), I = b(null), L = b(null), { isOpen: R, dropdownStyle: be } = ee(I, L, { isOutsideClick: (e, t, n) => {
30
+ let r = e.target;
31
+ return !(t?.contains(r) ?? !1) && !(n?.contains(r) ?? !1) && !(r instanceof Element && r.closest(".c-dropdown"));
32
+ } });
33
+ function z(e) {
34
+ return e ? {
35
+ local: new Date(e),
36
+ utc: e
37
+ } : null;
38
+ }
39
+ function B(e) {
40
+ return {
41
+ local: e,
42
+ utc: i(e, F.value.showTime)
43
+ };
44
+ }
45
+ function xe(e) {
46
+ return e.local ? B(t(e.local)) : e;
75
47
  }
76
- };
77
- }
78
- function c(e, n, r) {
79
- let i = r.now ?? /* @__PURE__ */ new Date();
80
- for (let s of a) {
81
- let { from: a, to: c } = o(s.key, i);
82
- if (r.showTime ? e.getTime() === a.getTime() && n.getTime() === c.getTime() : t(e, a) && t(n, c)) return s.key;
48
+ let Se = d(() => F.value.format ?? (F.value.showTime ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD"));
49
+ function V(e) {
50
+ return e ? n(new Date(e), Se.value) : "...";
51
+ }
52
+ let H = b(z(N.modelValue?.fromUtc ?? null)), U = b(z(N.modelValue?.toUtc ?? null)), W = b(N.modelValue?.fromUtc ?? null), G = b(N.modelValue?.toUtc ?? null), K = d(() => W.value != null || G.value != null), Ce = d(() => H.value?.local ?? null), we = d(() => U.value?.local ?? null), Te = d(() => F.value.minDate ?? null), Ee = d(() => e(F.value.maxDate ?? null, we.value ?? null)), De = d(() => r(F.value.minDate ?? null, Ce.value ?? null)), Oe = d(() => F.value.maxDate ?? null);
53
+ T(() => N.modelValue, (e) => {
54
+ let t = e?.fromUtc ?? null, n = e?.toUtc ?? null;
55
+ H.value = z(t), U.value = z(n), W.value = t, G.value = n;
56
+ }), T(R, (e) => {
57
+ e && F.value.lazy && (H.value = z(W.value), U.value = z(G.value));
58
+ });
59
+ function ke(e) {
60
+ H.value = e, e && !U.value && (U.value = F.value.showTime ? xe(e) : e), F.value.lazy || q();
61
+ }
62
+ function Ae(e) {
63
+ U.value = e, F.value.lazy || q();
64
+ }
65
+ function q() {
66
+ let e = H.value?.utc ?? null, t = U.value?.utc ?? null;
67
+ W.value = e, G.value = t, P("update:modelValue", e || t ? {
68
+ fromUtc: e,
69
+ toUtc: t
70
+ } : null);
71
+ }
72
+ function je() {
73
+ F.value.lazy && q(), R.value = !1;
74
+ }
75
+ function J() {
76
+ H.value = null, U.value = null, W.value = null, G.value = null, P("update:modelValue", null);
77
+ }
78
+ function Me() {
79
+ H.value = null, U.value = null;
80
+ }
81
+ function Ne() {
82
+ R.value = !0;
83
+ }
84
+ j({ focusAndOpen: Ne });
85
+ function Y() {
86
+ let e = H.value?.local, t = U.value?.local;
87
+ if (!e || !t) return null;
88
+ let n = 1440 * 60 * 1e3;
89
+ return F.value.showTime ? t.getTime() - e.getTime() : (Math.round((t.getTime() - e.getTime()) / n) + 1) * n;
90
+ }
91
+ let X = d(() => {
92
+ let e = H.value?.local, t = U.value?.local;
93
+ if (!e || !t) return !1;
94
+ let n = Y();
95
+ return n == null ? !1 : c(e, t, -n, {
96
+ minDate: F.value.minDate ?? null,
97
+ maxDate: F.value.maxDate ?? null,
98
+ showTime: F.value.showTime ?? !1
99
+ });
100
+ }), Z = d(() => {
101
+ let e = H.value?.local, t = U.value?.local;
102
+ if (!e || !t) return !1;
103
+ let n = Y();
104
+ return n == null ? !1 : c(e, t, n, {
105
+ minDate: F.value.minDate ?? null,
106
+ maxDate: F.value.maxDate ?? null,
107
+ showTime: F.value.showTime ?? !1
108
+ });
109
+ });
110
+ function Q(e) {
111
+ let t = H.value?.local, n = U.value?.local;
112
+ if (!t || !n) return;
113
+ let r = Y();
114
+ r != null && c(t, n, r * e, {
115
+ minDate: F.value.minDate ?? null,
116
+ maxDate: F.value.maxDate ?? null,
117
+ showTime: F.value.showTime ?? !1
118
+ }) && (H.value = B(new Date(t.getTime() + r * e)), U.value = B(new Date(n.getTime() + r * e)), F.value.lazy || q());
119
+ }
120
+ let Pe = d(() => {
121
+ let e = H.value?.local, t = U.value?.local;
122
+ return !e || !t ? null : re(e, t, { showTime: F.value.showTime ?? !1 });
123
+ }), $ = d(() => {
124
+ let e = {
125
+ minDate: F.value.minDate ?? null,
126
+ maxDate: F.value.maxDate ?? null,
127
+ showTime: F.value.showTime ?? !1
128
+ }, t = {};
129
+ for (let n of l) t[n.key] = !ne(n.key, e);
130
+ return t;
131
+ });
132
+ function Fe(e) {
133
+ let { from: t, to: n } = te(e, { showTime: F.value.showTime ?? !1 });
134
+ H.value = t, U.value = n, q(), F.value.lazy && (R.value = !1);
135
+ }
136
+ return (e, t) => {
137
+ let n = S("tooltip");
138
+ return y(), m("div", {
139
+ ref_key: "wrapperRef",
140
+ ref: I,
141
+ class: v(["drp-wrapper ac-component", { "drp-wrapper--compact": F.value.compact }])
142
+ }, [h("div", {
143
+ class: v(["c-input-row", {
144
+ "c-input-row--sm": F.value.size === "small",
145
+ "c-input-row--lg": F.value.size === "large",
146
+ "c-input-row--focus": w(R)
147
+ }]),
148
+ onClick: t[1] ||= (e) => R.value = !w(R)
149
+ }, [
150
+ h("div", oe, [K.value ? (y(), m(u, { key: 0 }, [h("span", se, C(V(W.value)) + " – " + C(V(G.value)), 1), h("span", ce, [h("span", le, C(V(W.value)), 1), h("span", ue, C(V(G.value)), 1)])], 64)) : (y(), m("span", de, C(F.value.placeholderFrom) + " – " + C(F.value.placeholderTo), 1))]),
151
+ h("button", {
152
+ type: "button",
153
+ class: v(["c-icon-btn c-icon-btn--clear", { "c-icon-btn--hidden": !K.value }]),
154
+ onClick: D(J, ["stop"]),
155
+ "aria-label": "Törlés"
156
+ }, [...t[5] ||= [h("i", { class: "fa-solid fa-fw fa-xmark" }, null, -1)]], 2),
157
+ F.value.showIcon ? (y(), m("button", {
158
+ key: 0,
159
+ type: "button",
160
+ class: "c-icon-btn c-icon-btn--calendar",
161
+ onClick: t[0] ||= D((e) => R.value = !w(R), ["stop"]),
162
+ "aria-label": "Naptár megnyitása"
163
+ }, [...t[6] ||= [h("i", { class: "fa-regular fa-fw fa-calendar" }, null, -1)]])) : p("", !0)
164
+ ], 2), (y(), f(ie, { to: "body" }, [w(R) ? (y(), m("div", {
165
+ key: 0,
166
+ ref_key: "dropdownRef",
167
+ ref: L,
168
+ class: "c-dropdown drp-dropdown ac-component",
169
+ style: ae(w(be))
170
+ }, [
171
+ h("div", fe, [h("div", pe, [h("label", me, C(F.value.placeholderFrom), 1), g(s, {
172
+ "model-value": H.value,
173
+ config: {
174
+ ...F.value,
175
+ minDate: Te.value,
176
+ maxDate: Ee.value,
177
+ placeholder: F.value.placeholderFrom
178
+ },
179
+ "onUpdate:modelValue": ke
180
+ }, null, 8, ["model-value", "config"])]), h("div", he, [h("label", ge, C(F.value.placeholderTo), 1), g(s, {
181
+ "model-value": U.value,
182
+ config: {
183
+ ...F.value,
184
+ minDate: De.value,
185
+ maxDate: Oe.value,
186
+ placeholder: F.value.placeholderTo
187
+ },
188
+ "onUpdate:modelValue": Ae
189
+ }, null, 8, ["model-value", "config"])])]),
190
+ F.value.showPresets ? (y(), m("div", _e, [
191
+ E((y(), m("span", ve, [g(a, {
192
+ icon: "fa-solid fa-chevron-left",
193
+ class: "drp-toolbar__stepper left",
194
+ disabled: !X.value,
195
+ onClick: t[2] ||= (e) => Q(-1)
196
+ }, null, 8, ["disabled"])])), [[n, X.value ? "Intervallum mozgatása visszafelé" : "Nem léphető tovább a minimum dátum miatt"]]),
197
+ h("div", ye, [(y(!0), m(u, null, x(w(l), (e) => (y(), m("a", {
198
+ key: e.key,
199
+ class: v(["predefined-range", {
200
+ "predefined-range--active": Pe.value === e.key,
201
+ "predefined-range--disabled": $.value[e.key]
202
+ }]),
203
+ "aria-disabled": $.value[e.key],
204
+ onClick: (t) => $.value[e.key] ? null : Fe(e.key)
205
+ }, C(e.label), 11, O))), 128))]),
206
+ E((y(), m("span", k, [g(a, {
207
+ icon: "fa-solid fa-chevron-right",
208
+ disabled: !Z.value,
209
+ onClick: t[3] ||= (e) => Q(1),
210
+ class: "drp-toolbar__stepper right"
211
+ }, null, 8, ["disabled"])])), [[n, Z.value ? "Intervallum mozgatása előre" : "Nem léphető tovább a maximum dátum miatt"]])
212
+ ])) : p("", !0),
213
+ F.value.showClearButton || F.value.showOkButton || F.value.lazy ? (y(), m("div", A, [F.value.showClearButton ? (y(), f(a, {
214
+ key: 0,
215
+ label: "Törlés",
216
+ outline: "",
217
+ onClick: t[4] ||= (e) => F.value.lazy ? Me() : J()
218
+ })) : p("", !0), F.value.showOkButton || F.value.lazy ? (y(), f(a, {
219
+ key: 1,
220
+ label: "OK",
221
+ type: "success",
222
+ onClick: je
223
+ })) : p("", !0)])) : p("", !0)
224
+ ], 4)) : p("", !0)]))], 2);
225
+ };
83
226
  }
84
- return null;
85
- }
86
- function l(e, t) {
87
- let { from: n, to: i } = o(e, t.now), { minDate: a, maxDate: s, showTime: c } = t, l = c ? n : r(n), u = c ? i : r(i), d = a ? c ? a : r(a) : null, f = s ? c ? s : r(s) : null;
88
- return !(d && l.getTime() < d.getTime() || f && u.getTime() > f.getTime());
89
- }
90
- function u(e, t, n, i) {
91
- let { minDate: a, maxDate: o, showTime: s } = i, c = new Date(e.getTime() + n), l = new Date(t.getTime() + n), u = s ? c : r(c), d = s ? l : r(l), f = a ? s ? a : r(a) : null, p = o ? s ? o : r(o) : null;
92
- return !(f && u.getTime() < f.getTime() || p && d.getTime() > p.getTime());
93
- }
227
+ });
94
228
  //#endregion
95
- export { s as applyPredefinedRange, u as canStepInBounds, l as isPredefinedRangeInBounds, c as matchPredefinedRange, a as predefinedRanges };
229
+ export { j as default };
@@ -1,229 +1,6 @@
1
- import { earlierOf as e, endOfDay as t, formatDate as n, laterOf as r, localToUTCString as i } from "./admins-components3.js";
2
- import a from "./admins-components6.js";
3
- import { dateRangePickerConfigDefaults as o } from "./admins-components7.js";
4
- import { useDropdownAnchor as ee } from "./admins-components12.js";
5
- import s from "./admins-components14.js";
6
- import { applyPredefinedRange as te, canStepInBounds as c, isPredefinedRangeInBounds as ne, matchPredefinedRange as re, predefinedRanges as l } from "./admins-components17.js";
7
- import { Fragment as u, Teleport as ie, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, normalizeClass as v, normalizeStyle as ae, openBlock as y, ref as b, renderList as x, resolveDirective as S, toDisplayString as C, unref as w, watch as T, withDirectives as E, withModifiers as D } from "vue";
8
- //#region src/components/DateRangePicker.vue?vue&type=script&setup=true&lang.ts
9
- var oe = { class: "drp-input" }, se = { class: "c-truncate drp-input__single" }, ce = { class: "drp-input__multi" }, le = { class: "c-truncate drp-input__line" }, ue = { class: "c-truncate drp-input__line" }, de = {
10
- key: 1,
11
- class: "c-placeholder drp-input__placeholder"
12
- }, fe = { class: "drp-pickers" }, pe = { class: "drp-picker-group" }, me = { class: "drp-label" }, he = { class: "drp-picker-group" }, ge = { class: "drp-label" }, _e = {
13
- key: 0,
14
- class: "drp-toolbar"
15
- }, ve = { class: "flex" }, ye = { class: "predefined-ranges" }, O = ["aria-disabled", "onClick"], k = { class: "flex" }, A = {
16
- key: 1,
17
- class: "c-footer"
18
- }, j = /* @__PURE__ */ _({
19
- __name: "DateRangePicker",
20
- props: {
21
- modelValue: { default: null },
22
- config: { default: () => ({ ...o }) }
23
- },
24
- emits: ["update:modelValue"],
25
- setup(_, { expose: j, emit: M }) {
26
- let N = _, P = M, F = d(() => ({
27
- ...o,
28
- ...N.config
29
- })), I = b(null), L = b(null), { isOpen: R, dropdownStyle: be } = ee(I, L, { isOutsideClick: (e, t, n) => {
30
- let r = e.target;
31
- return !(t?.contains(r) ?? !1) && !(n?.contains(r) ?? !1) && !(r instanceof Element && r.closest(".c-dropdown"));
32
- } });
33
- function z(e) {
34
- return e ? {
35
- local: new Date(e),
36
- utc: e
37
- } : null;
38
- }
39
- function B(e) {
40
- return {
41
- local: e,
42
- utc: i(e, F.value.showTime)
43
- };
44
- }
45
- function xe(e) {
46
- return e.local ? B(t(e.local)) : e;
47
- }
48
- let Se = d(() => F.value.format ?? (F.value.showTime ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD"));
49
- function V(e) {
50
- return e ? n(new Date(e), Se.value) : "...";
51
- }
52
- let H = b(z(N.modelValue?.fromUtc ?? null)), U = b(z(N.modelValue?.toUtc ?? null)), W = b(N.modelValue?.fromUtc ?? null), G = b(N.modelValue?.toUtc ?? null), K = d(() => W.value != null || G.value != null), Ce = d(() => H.value?.local ?? null), we = d(() => U.value?.local ?? null), Te = d(() => F.value.minDate ?? null), Ee = d(() => e(F.value.maxDate ?? null, we.value ?? null)), De = d(() => r(F.value.minDate ?? null, Ce.value ?? null)), Oe = d(() => F.value.maxDate ?? null);
53
- T(() => N.modelValue, (e) => {
54
- let t = e?.fromUtc ?? null, n = e?.toUtc ?? null;
55
- H.value = z(t), U.value = z(n), W.value = t, G.value = n;
56
- }), T(R, (e) => {
57
- e && F.value.lazy && (H.value = z(W.value), U.value = z(G.value));
58
- });
59
- function ke(e) {
60
- H.value = e, e && !U.value && (U.value = F.value.showTime ? xe(e) : e), F.value.lazy || q();
61
- }
62
- function Ae(e) {
63
- U.value = e, F.value.lazy || q();
64
- }
65
- function q() {
66
- let e = H.value?.utc ?? null, t = U.value?.utc ?? null;
67
- W.value = e, G.value = t, P("update:modelValue", e || t ? {
68
- fromUtc: e,
69
- toUtc: t
70
- } : null);
71
- }
72
- function je() {
73
- F.value.lazy && q(), R.value = !1;
74
- }
75
- function J() {
76
- H.value = null, U.value = null, W.value = null, G.value = null, P("update:modelValue", null);
77
- }
78
- function Me() {
79
- H.value = null, U.value = null;
80
- }
81
- function Ne() {
82
- R.value = !0;
83
- }
84
- j({ focusAndOpen: Ne });
85
- function Y() {
86
- let e = H.value?.local, t = U.value?.local;
87
- if (!e || !t) return null;
88
- let n = 1440 * 60 * 1e3;
89
- return F.value.showTime ? t.getTime() - e.getTime() : (Math.round((t.getTime() - e.getTime()) / n) + 1) * n;
90
- }
91
- let X = d(() => {
92
- let e = H.value?.local, t = U.value?.local;
93
- if (!e || !t) return !1;
94
- let n = Y();
95
- return n == null ? !1 : c(e, t, -n, {
96
- minDate: F.value.minDate ?? null,
97
- maxDate: F.value.maxDate ?? null,
98
- showTime: F.value.showTime ?? !1
99
- });
100
- }), Z = d(() => {
101
- let e = H.value?.local, t = U.value?.local;
102
- if (!e || !t) return !1;
103
- let n = Y();
104
- return n == null ? !1 : c(e, t, n, {
105
- minDate: F.value.minDate ?? null,
106
- maxDate: F.value.maxDate ?? null,
107
- showTime: F.value.showTime ?? !1
108
- });
109
- });
110
- function Q(e) {
111
- let t = H.value?.local, n = U.value?.local;
112
- if (!t || !n) return;
113
- let r = Y();
114
- r != null && c(t, n, r * e, {
115
- minDate: F.value.minDate ?? null,
116
- maxDate: F.value.maxDate ?? null,
117
- showTime: F.value.showTime ?? !1
118
- }) && (H.value = B(new Date(t.getTime() + r * e)), U.value = B(new Date(n.getTime() + r * e)), F.value.lazy || q());
119
- }
120
- let Pe = d(() => {
121
- let e = H.value?.local, t = U.value?.local;
122
- return !e || !t ? null : re(e, t, { showTime: F.value.showTime ?? !1 });
123
- }), $ = d(() => {
124
- let e = {
125
- minDate: F.value.minDate ?? null,
126
- maxDate: F.value.maxDate ?? null,
127
- showTime: F.value.showTime ?? !1
128
- }, t = {};
129
- for (let n of l) t[n.key] = !ne(n.key, e);
130
- return t;
131
- });
132
- function Fe(e) {
133
- let { from: t, to: n } = te(e, { showTime: F.value.showTime ?? !1 });
134
- H.value = t, U.value = n, q(), F.value.lazy && (R.value = !1);
135
- }
136
- return (e, t) => {
137
- let n = S("tooltip");
138
- return y(), m("div", {
139
- ref_key: "wrapperRef",
140
- ref: I,
141
- class: v(["drp-wrapper ac-component", { "drp-wrapper--compact": F.value.compact }])
142
- }, [h("div", {
143
- class: v(["c-input-row", {
144
- "c-input-row--sm": F.value.size === "small",
145
- "c-input-row--lg": F.value.size === "large",
146
- "c-input-row--focus": w(R)
147
- }]),
148
- onClick: t[1] ||= (e) => R.value = !w(R)
149
- }, [
150
- h("div", oe, [K.value ? (y(), m(u, { key: 0 }, [h("span", se, C(V(W.value)) + " – " + C(V(G.value)), 1), h("span", ce, [h("span", le, C(V(W.value)), 1), h("span", ue, C(V(G.value)), 1)])], 64)) : (y(), m("span", de, C(F.value.placeholderFrom) + " – " + C(F.value.placeholderTo), 1))]),
151
- h("button", {
152
- type: "button",
153
- class: v(["c-icon-btn c-icon-btn--clear", { "c-icon-btn--hidden": !K.value }]),
154
- onClick: D(J, ["stop"]),
155
- "aria-label": "Törlés"
156
- }, [...t[5] ||= [h("i", { class: "fa-solid fa-fw fa-xmark" }, null, -1)]], 2),
157
- F.value.showIcon ? (y(), m("button", {
158
- key: 0,
159
- type: "button",
160
- class: "c-icon-btn c-icon-btn--calendar",
161
- onClick: t[0] ||= D((e) => R.value = !w(R), ["stop"]),
162
- "aria-label": "Naptár megnyitása"
163
- }, [...t[6] ||= [h("i", { class: "fa-regular fa-fw fa-calendar" }, null, -1)]])) : p("", !0)
164
- ], 2), (y(), f(ie, { to: "body" }, [w(R) ? (y(), m("div", {
165
- key: 0,
166
- ref_key: "dropdownRef",
167
- ref: L,
168
- class: "c-dropdown drp-dropdown ac-component",
169
- style: ae(w(be))
170
- }, [
171
- h("div", fe, [h("div", pe, [h("label", me, C(F.value.placeholderFrom), 1), g(s, {
172
- "model-value": H.value,
173
- config: {
174
- ...F.value,
175
- minDate: Te.value,
176
- maxDate: Ee.value,
177
- placeholder: F.value.placeholderFrom
178
- },
179
- "onUpdate:modelValue": ke
180
- }, null, 8, ["model-value", "config"])]), h("div", he, [h("label", ge, C(F.value.placeholderTo), 1), g(s, {
181
- "model-value": U.value,
182
- config: {
183
- ...F.value,
184
- minDate: De.value,
185
- maxDate: Oe.value,
186
- placeholder: F.value.placeholderTo
187
- },
188
- "onUpdate:modelValue": Ae
189
- }, null, 8, ["model-value", "config"])])]),
190
- F.value.showPresets ? (y(), m("div", _e, [
191
- E((y(), m("span", ve, [g(a, {
192
- icon: "fa-solid fa-chevron-left",
193
- class: "drp-toolbar__stepper left",
194
- disabled: !X.value,
195
- onClick: t[2] ||= (e) => Q(-1)
196
- }, null, 8, ["disabled"])])), [[n, X.value ? "Intervallum mozgatása visszafelé" : "Nem léphető tovább a minimum dátum miatt"]]),
197
- h("div", ye, [(y(!0), m(u, null, x(w(l), (e) => (y(), m("a", {
198
- key: e.key,
199
- class: v(["predefined-range", {
200
- "predefined-range--active": Pe.value === e.key,
201
- "predefined-range--disabled": $.value[e.key]
202
- }]),
203
- "aria-disabled": $.value[e.key],
204
- onClick: (t) => $.value[e.key] ? null : Fe(e.key)
205
- }, C(e.label), 11, O))), 128))]),
206
- E((y(), m("span", k, [g(a, {
207
- icon: "fa-solid fa-chevron-right",
208
- disabled: !Z.value,
209
- onClick: t[3] ||= (e) => Q(1),
210
- class: "drp-toolbar__stepper right"
211
- }, null, 8, ["disabled"])])), [[n, Z.value ? "Intervallum mozgatása előre" : "Nem léphető tovább a maximum dátum miatt"]])
212
- ])) : p("", !0),
213
- F.value.showClearButton || F.value.showOkButton || F.value.lazy ? (y(), m("div", A, [F.value.showClearButton ? (y(), f(a, {
214
- key: 0,
215
- label: "Törlés",
216
- outline: "",
217
- onClick: t[4] ||= (e) => F.value.lazy ? Me() : J()
218
- })) : p("", !0), F.value.showOkButton || F.value.lazy ? (y(), f(a, {
219
- key: 1,
220
- label: "OK",
221
- type: "success",
222
- onClick: je
223
- })) : p("", !0)])) : p("", !0)
224
- ], 4)) : p("", !0)]))], 2);
225
- };
226
- }
227
- });
1
+ import "./admins-components6.js";
2
+ import e from "./admins-components17.js";
3
+ //#region src/components/DateRangePicker.vue
4
+ var t = e;
228
5
  //#endregion
229
- export { j as default };
6
+ export { t as default };