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,53 +1,10 @@
1
- import e from "./admins-components44.js";
2
- import { defineElement as t } from "./admins-components148.js";
3
- import n from "./admins-components150.js";
4
- import { ipeConfig as r } from "./admins-components153.js";
5
- import { iaoeConfig as i } from "./admins-components163.js";
6
- import { createBlock as a, createSlots as o, createVNode as s, openBlock as c, renderList as l, renderSlot as u, resolveComponent as d, resolveDynamicComponent as f, withCtx as p } from "vue";
7
- //#region src/vueformelements/InternalArticleOfferElement.vue
8
- var m = t({
9
- name: "InternalArticleOfferElement",
10
- components: { InternalArticleOffer: e },
11
- setup(e, t) {
12
- let { value: n } = t.element;
13
- return {
14
- ipeConfig: r,
15
- iaoeConfig: i,
16
- value: n
17
- };
18
- }
19
- });
20
- function h(e, t, n, r, i, m) {
21
- let h = d("InternalArticleOffer"), g = d("ElementLayout");
22
- return c(), a(g, null, o({
23
- element: p(() => [s(h, {
24
- modelValue: e.value,
25
- "onUpdate:modelValue": t[0] ||= (t) => e.value = t,
26
- "show-ids": e.iaoeConfig.showIds,
27
- "search-article-api-url": e.iaoeConfig.searchArticleApiUrl,
28
- "search-article-widget-url": e.iaoeConfig.searchArticleWidgetUrl,
29
- "search-image-widget-url": e.ipeConfig.searchImageWidgetUrl,
30
- "image-base-url": e.ipeConfig.imageBaseUrl,
31
- environment: e.ipeConfig.environment,
32
- "image-view-id": e.ipeConfig.imageViewId,
33
- formats: e.iaoeConfig.formats
34
- }, null, 8, [
35
- "modelValue",
36
- "show-ids",
37
- "search-article-api-url",
38
- "search-article-widget-url",
39
- "search-image-widget-url",
40
- "image-base-url",
41
- "environment",
42
- "image-view-id",
43
- "formats"
44
- ])]),
45
- _: 2
46
- }, [l(e.elementSlots, (t, n) => ({
47
- name: n,
48
- fn: p(() => [u(e.$slots, n, { el$: e.el$ }, () => [(c(), a(f(t), { el$: e.el$ }, null, 8, ["el$"]))])])
49
- }))]), 1024);
1
+ //#region src/vueformelements/config/InternalArticleOfferElementConfig.ts
2
+ var e = window.config?.internalArticleOfferElement || {};
3
+ function t(t) {
4
+ return e = {
5
+ ...e,
6
+ ...t
7
+ }, e;
50
8
  }
51
- var g = /* @__PURE__ */ n(m, [["render", h]]);
52
9
  //#endregion
53
- export { g as default };
10
+ export { t as configureInternalArticleOfferElement, e as iaoeConfig };
@@ -1,10 +1,53 @@
1
- //#region src/vueformelements/config/PartnerPickerElementConfig.ts
2
- var e = window.config?.partnerPicker || {};
3
- function t(t) {
4
- return e = {
5
- ...e,
6
- ...t
7
- }, e;
1
+ import e from "./admins-components45.js";
2
+ import { defineElement as t } from "./admins-components149.js";
3
+ import n from "./admins-components151.js";
4
+ import { ipeConfig as r } from "./admins-components154.js";
5
+ import { iaoeConfig as i } from "./admins-components164.js";
6
+ import { createBlock as a, createSlots as o, createVNode as s, openBlock as c, renderList as l, renderSlot as u, resolveComponent as d, resolveDynamicComponent as f, withCtx as p } from "vue";
7
+ //#region src/vueformelements/InternalArticleOfferElement.vue
8
+ var m = t({
9
+ name: "InternalArticleOfferElement",
10
+ components: { InternalArticleOffer: e },
11
+ setup(e, t) {
12
+ let { value: n } = t.element;
13
+ return {
14
+ ipeConfig: r,
15
+ iaoeConfig: i,
16
+ value: n
17
+ };
18
+ }
19
+ });
20
+ function h(e, t, n, r, i, m) {
21
+ let h = d("InternalArticleOffer"), g = d("ElementLayout");
22
+ return c(), a(g, null, o({
23
+ element: p(() => [s(h, {
24
+ modelValue: e.value,
25
+ "onUpdate:modelValue": t[0] ||= (t) => e.value = t,
26
+ "show-ids": e.iaoeConfig.showIds,
27
+ "search-article-api-url": e.iaoeConfig.searchArticleApiUrl,
28
+ "search-article-widget-url": e.iaoeConfig.searchArticleWidgetUrl,
29
+ "search-image-widget-url": e.ipeConfig.searchImageWidgetUrl,
30
+ "image-base-url": e.ipeConfig.imageBaseUrl,
31
+ environment: e.ipeConfig.environment,
32
+ "image-view-id": e.ipeConfig.imageViewId,
33
+ formats: e.iaoeConfig.formats
34
+ }, null, 8, [
35
+ "modelValue",
36
+ "show-ids",
37
+ "search-article-api-url",
38
+ "search-article-widget-url",
39
+ "search-image-widget-url",
40
+ "image-base-url",
41
+ "environment",
42
+ "image-view-id",
43
+ "formats"
44
+ ])]),
45
+ _: 2
46
+ }, [l(e.elementSlots, (t, n) => ({
47
+ name: n,
48
+ fn: p(() => [u(e.$slots, n, { el$: e.el$ }, () => [(c(), a(f(t), { el$: e.el$ }, null, 8, ["el$"]))])])
49
+ }))]), 1024);
8
50
  }
51
+ var g = /* @__PURE__ */ n(m, [["render", h]]);
9
52
  //#endregion
10
- export { t as configurePartnerPickerElement, e as ppeconfig };
53
+ export { g as default };
@@ -0,0 +1,10 @@
1
+ //#region src/vueformelements/config/PartnerPickerElementConfig.ts
2
+ var e = window.config?.partnerPicker || {};
3
+ function t(t) {
4
+ return e = {
5
+ ...e,
6
+ ...t
7
+ }, e;
8
+ }
9
+ //#endregion
10
+ export { t as configurePartnerPickerElement, e as ppeconfig };
@@ -1,7 +1,7 @@
1
1
  import './src/vueformelements/PartnerPickerElement.vue_vue_type_style_index_0_scoped_64cb4d6e_lang.css';
2
- import { defineElement as e } from "./admins-components148.js";
3
- import t from "./admins-components150.js";
4
- import { ppeconfig as n } from "./admins-components165.js";
2
+ import { defineElement as e } from "./admins-components149.js";
3
+ import t from "./admins-components151.js";
4
+ import { ppeconfig as n } from "./admins-components166.js";
5
5
  /* empty css */
6
6
  import { createBlock as r, createElementVNode as i, createSlots as a, openBlock as o, ref as s, renderList as c, renderSlot as l, resolveComponent as u, resolveDynamicComponent as d, watch as f, withCtx as p } from "vue";
7
7
  //#region src/vueformelements/PartnerPickerElement.vue
@@ -1,229 +1,95 @@
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 }) }
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"
23
7
  },
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);
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)
225
39
  };
226
40
  }
227
- });
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)
75
+ }
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;
83
+ }
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
+ }
228
94
  //#endregion
229
- export { j as default };
95
+ export { s as applyPredefinedRange, u as canStepInBounds, l as isPredefinedRangeInBounds, c as matchPredefinedRange, a as predefinedRanges };