admins-components 9.0.7 → 9.0.8

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