bitboss-ui 2.0.5 → 2.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.
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +1 -3
- package/dist/composables/useOptions.d.ts +1 -1
- package/dist/index.js +89 -87
- package/dist/index.js.map +1 -1
- package/dist/index10.js +7 -39
- package/dist/index10.js.map +1 -1
- package/dist/index101.js +60 -87
- package/dist/index101.js.map +1 -1
- package/dist/index103.js +113 -258
- package/dist/index103.js.map +1 -1
- package/dist/index105.js +254 -388
- package/dist/index105.js.map +1 -1
- package/dist/index107.js +387 -98
- package/dist/index107.js.map +1 -1
- package/dist/index109.js +52 -48
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +74 -188
- package/dist/index11.js.map +1 -1
- package/dist/index111.js +35 -34
- package/dist/index111.js.map +1 -1
- package/dist/index113.js +105 -23
- package/dist/index113.js.map +1 -1
- package/dist/index115.js +23 -156
- package/dist/index115.js.map +1 -1
- package/dist/index117.js +153 -112
- package/dist/index117.js.map +1 -1
- package/dist/index119.js +115 -39
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +38 -80
- package/dist/index12.js.map +1 -1
- package/dist/index121.js +36 -40
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +34 -37
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +30 -21
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +47 -2
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +35 -21
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +2 -2
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +21 -312
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +2 -24
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +312 -2
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +196 -0
- package/dist/index13.js.map +1 -0
- package/dist/index130.js +24 -5
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -9
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +5 -6
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +9 -3
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +6 -3
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +1 -1
- package/dist/index136.js +1 -1
- package/dist/index137.js +1 -1
- package/dist/index138.js +1 -1
- package/dist/index139.js +1 -1
- package/dist/index14.js +73 -121
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +1 -1
- package/dist/index141.js +1 -1
- package/dist/index142.js +1 -1
- package/dist/index143.js +1 -1
- package/dist/index144.js +1 -1
- package/dist/index145.js +1 -1
- package/dist/index146.js +1 -1
- package/dist/index147.js +1 -1
- package/dist/index148.js +1 -1
- package/dist/index149.js +1 -1
- package/dist/index150.js +1 -1
- package/dist/index151.js +1 -1
- package/dist/index152.js +1 -1
- package/dist/index153.js +1 -1
- package/dist/index154.js +1 -1
- package/dist/index155.js +1 -1
- package/dist/index156.js +1 -1
- package/dist/index157.js +1 -1
- package/dist/index158.js +1 -1
- package/dist/index159.js +2 -2
- package/dist/index16.js +119 -118
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +6 -0
- package/dist/index160.js.map +1 -0
- package/dist/index161.js +1 -1
- package/dist/index163.js +2 -2
- package/dist/index165.js +1 -1
- package/dist/index166.js +1 -1
- package/dist/index167.js +1 -1
- package/dist/index168.js +1 -1
- package/dist/index169.js +2 -2
- package/dist/index170.js +6 -0
- package/dist/index170.js.map +1 -0
- package/dist/index171.js +3 -2
- package/dist/index171.js.map +1 -1
- package/dist/index173.js +2 -3
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +1 -1
- package/dist/index175.js +1 -1
- package/dist/index176.js +1 -1
- package/dist/index177.js +1 -1
- package/dist/index178.js +1 -1
- package/dist/index179.js +1 -1
- package/dist/index18.js +120 -208
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +1 -1
- package/dist/index181.js +1 -1
- package/dist/index182.js +1 -1
- package/dist/index183.js +2 -2
- package/dist/index184.js +6 -0
- package/dist/index184.js.map +1 -0
- package/dist/index185.js +1 -1
- package/dist/index187.js +1 -1
- package/dist/index189.js +1 -1
- package/dist/index190.js +1 -1
- package/dist/index191.js +1 -1
- package/dist/index192.js +1 -1
- package/dist/index193.js +1 -1
- package/dist/index194.js +1 -1
- package/dist/index195.js +1 -1
- package/dist/index196.js +1 -1
- package/dist/index197.js +3 -81
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +3 -3
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +81 -5
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +193 -275
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +2 -16
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +3 -16
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +124 -17
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +5 -19
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +119 -23
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +19 -3
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +16 -2
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +16 -8
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -249
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +5 -0
- package/dist/index209.js.map +1 -0
- package/dist/index210.js +35 -52
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +173 -36
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +6 -5
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +39 -36
- package/dist/index213.js.map +1 -1
- package/dist/index215.js +13 -4
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +5 -2
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +369 -2
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +6 -40
- package/dist/index218.js.map +1 -1
- package/dist/{index214.js → index219.js} +1 -1
- package/dist/{index214.js.map → index219.js.map} +1 -1
- package/dist/index22.js +287 -247
- package/dist/index22.js.map +1 -1
- package/dist/index220.js +4 -13
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +2 -158
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +3 -84
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +10 -0
- package/dist/index223.js.map +1 -0
- package/dist/index224.js +19 -3
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +26 -34
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +3 -6
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +249 -7
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +49 -123
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +44 -123
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +5 -2
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +49 -174
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +158 -5
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +83 -368
- package/dist/index233.js.map +1 -1
- package/dist/index235.js +2 -18
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +17 -105
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +109 -0
- package/dist/index237.js.map +1 -0
- package/dist/{index238.js → index239.js} +3 -3
- package/dist/{index238.js.map → index239.js.map} +1 -1
- package/dist/index24.js +249 -120
- package/dist/index24.js.map +1 -1
- package/dist/index241.js +2 -10
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +9 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +3 -224
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +9 -281
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +23 -6
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +6 -2
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +16 -2
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +224 -2
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +281 -2
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +6 -2
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +2 -2
- package/dist/index252.js +2 -3
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +2 -2
- package/dist/index254.js +2 -2
- package/dist/index255.js +2 -2
- package/dist/index256.js +122 -24
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +429 -20
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +6 -0
- package/dist/index258.js.map +1 -0
- package/dist/index26.js +119 -142
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +6 -3
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +21 -8
- package/dist/index261.js.map +1 -1
- package/dist/index263.js +9 -3
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +439 -0
- package/dist/index264.js.map +1 -0
- package/dist/index265.js +127 -6
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +199 -15
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +4 -9
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +89 -3
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +2 -12
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +2 -9
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +2 -9
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +2 -17
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +2 -431
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +2 -89
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +28 -2
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +17 -64
- package/dist/index276.js.map +1 -1
- package/dist/index278.js +3 -200
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +12 -2
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +138 -83
- package/dist/index28.js.map +1 -1
- package/dist/index280.js +7 -124
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +7 -20
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +20 -0
- package/dist/index282.js.map +1 -0
- package/dist/index283.js +2 -436
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +68 -126
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +5 -3
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +1 -1
- package/dist/index287.js +3 -211
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +214 -0
- package/dist/index288.js.map +1 -0
- package/dist/index290.js +4 -7
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +4 -19
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +58 -6
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +35 -4
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +7 -4
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +6 -58
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +18 -34
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +2 -11
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +47 -2
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +10 -46
- package/dist/index299.js.map +1 -1
- package/dist/index30.js +85 -115
- package/dist/index30.js.map +1 -1
- package/dist/index32.js +111 -112
- package/dist/index32.js.map +1 -1
- package/dist/index34.js +114 -365
- package/dist/index34.js.map +1 -1
- package/dist/index36.js +361 -283
- package/dist/index36.js.map +1 -1
- package/dist/index38.js +288 -106
- package/dist/index38.js.map +1 -1
- package/dist/index40.js +114 -121
- package/dist/index40.js.map +1 -1
- package/dist/index42.js +113 -200
- package/dist/index42.js.map +1 -1
- package/dist/index44.js +180 -90
- package/dist/index44.js.map +1 -1
- package/dist/index46.js +110 -78
- package/dist/index46.js.map +1 -1
- package/dist/index48.js +89 -54
- package/dist/index48.js.map +1 -1
- package/dist/index5.js +14 -78
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +54 -84
- package/dist/index50.js.map +1 -1
- package/dist/index52.js +86 -60
- package/dist/index52.js.map +1 -1
- package/dist/index54.js +59 -40
- package/dist/index54.js.map +1 -1
- package/dist/index56.js +42 -55
- package/dist/index56.js.map +1 -1
- package/dist/index58.js +53 -103
- package/dist/index58.js.map +1 -1
- package/dist/index6.js +36 -58
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +103 -89
- package/dist/index60.js.map +1 -1
- package/dist/index62.js +61 -88
- package/dist/index62.js.map +1 -1
- package/dist/index64.js +119 -77
- package/dist/index64.js.map +1 -1
- package/dist/index66.js +77 -91
- package/dist/index66.js.map +1 -1
- package/dist/index68.js +88 -49
- package/dist/index68.js.map +1 -1
- package/dist/index7.js +78 -20
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +51 -304
- package/dist/index70.js.map +1 -1
- package/dist/index72.js +299 -115
- package/dist/index72.js.map +1 -1
- package/dist/index74.js +120 -214
- package/dist/index74.js.map +1 -1
- package/dist/index76.js +213 -36
- package/dist/index76.js.map +1 -1
- package/dist/index78.js +47 -0
- package/dist/index78.js.map +1 -0
- package/dist/index79.js +119 -230
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +61 -7
- package/dist/index8.js.map +1 -1
- package/dist/index81.js +227 -154
- package/dist/index81.js.map +1 -1
- package/dist/index83.js +154 -207
- package/dist/index83.js.map +1 -1
- package/dist/index85.js +215 -26
- package/dist/index85.js.map +1 -1
- package/dist/index87.js +27 -88
- package/dist/index87.js.map +1 -1
- package/dist/index89.js +53 -88
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +17 -76
- package/dist/index9.js.map +1 -1
- package/dist/index91.js +75 -44
- package/dist/index91.js.map +1 -1
- package/dist/index93.js +89 -15
- package/dist/index93.js.map +1 -1
- package/dist/index95.js +15 -166
- package/dist/index95.js.map +1 -1
- package/dist/index97.js +120 -59
- package/dist/index97.js.map +1 -1
- package/dist/index99.js +66 -52
- package/dist/index99.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/index120.js +0 -47
- package/dist/index120.js.map +0 -1
- package/dist/index164.js +0 -6
- package/dist/index164.js.map +0 -1
- package/dist/index172.js +0 -6
- package/dist/index172.js.map +0 -1
- package/dist/index188.js +0 -6
- package/dist/index188.js.map +0 -1
- package/dist/index234.js +0 -6
- package/dist/index234.js.map +0 -1
- package/dist/index240.js +0 -5
- package/dist/index240.js.map +0 -1
- package/dist/index259.js +0 -10
- package/dist/index259.js.map +0 -1
- package/dist/index262.js +0 -26
- package/dist/index262.js.map +0 -1
- package/dist/index277.js +0 -8
- package/dist/index277.js.map +0 -1
- package/dist/index3.js +0 -17
- package/dist/index3.js.map +0 -1
- package/dist/index4.js +0 -43
- package/dist/index4.js.map +0 -1
- package/dist/index77.js +0 -130
- package/dist/index77.js.map +0 -1
package/dist/index20.js
CHANGED
|
@@ -1,305 +1,223 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import ce from "./index200.js";
|
|
7
|
-
import pe from "./index201.js";
|
|
8
|
-
import { identity as me } from "./index230.js";
|
|
9
|
-
import { last as fe } from "./index206.js";
|
|
10
|
-
import { useFocusTrap as be } from "./index225.js";
|
|
11
|
-
import { useId as ve } from "./index7.js";
|
|
12
|
-
import { useIntersectionObserver as ye } from "./index127.js";
|
|
13
|
-
import { useMobile as ge } from "./index8.js";
|
|
14
|
-
import { vMaska as ke } from "./index231.js";
|
|
15
|
-
import { wait as he } from "./index126.js";
|
|
16
|
-
import { waitFor as Me } from "./index226.js";
|
|
17
|
-
import we from "./index18.js";
|
|
1
|
+
import { defineComponent as $, ref as f, watch as x, openBlock as u, createElementBlock as _, createVNode as i, createElementVNode as l, unref as m, withCtx as n, createTextVNode as N, toDisplayString as Y, createBlock as h, createCommentVNode as k } from "vue";
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
import p from "./index14.js";
|
|
18
6
|
/* empty css */
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
|
|
7
|
+
import r from "./index203.js";
|
|
8
|
+
import z from "./index206.js";
|
|
9
|
+
import U from "./index207.js";
|
|
10
|
+
import W from "./index205.js";
|
|
11
|
+
import E from "./index224.js";
|
|
12
|
+
import T from "./index225.js";
|
|
13
|
+
import { hash as g } from "./index226.js";
|
|
14
|
+
import { last as j } from "./index209.js";
|
|
15
|
+
import { useLogger as H } from "./index218.js";
|
|
16
|
+
import P from "./index227.js";
|
|
17
|
+
import Z from "./index228.js";
|
|
18
|
+
import q from "./index229.js";
|
|
19
|
+
import w from "./index230.js";
|
|
20
|
+
import F from "./index231.js";
|
|
21
|
+
const G = { class: "bb-base-date-picker" }, I = { class: "bb-base-date-picker__body" }, J = { class: "bb-base-date-picker__controls" }, K = /* @__PURE__ */ l("span", { class: "sr-only" }, "Seleziona un mese", -1), Q = /* @__PURE__ */ l("svg", {
|
|
25
22
|
fill: "none",
|
|
26
|
-
|
|
23
|
+
height: "6",
|
|
24
|
+
viewBox: "0 0 10 6",
|
|
25
|
+
width: "10",
|
|
27
26
|
xmlns: "http://www.w3.org/2000/svg"
|
|
28
27
|
}, [
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
d: "
|
|
31
|
-
|
|
32
|
-
"stroke-linecap": "round",
|
|
33
|
-
"stroke-linejoin": "round"
|
|
34
|
-
}),
|
|
35
|
-
/* @__PURE__ */ r("path", {
|
|
36
|
-
d: "M10.6667 1.33333V3.99999",
|
|
37
|
-
stroke: "currentColor",
|
|
38
|
-
"stroke-linecap": "round",
|
|
39
|
-
"stroke-linejoin": "round"
|
|
40
|
-
}),
|
|
41
|
-
/* @__PURE__ */ r("path", {
|
|
42
|
-
d: "M5.33333 1.33333V3.99999",
|
|
43
|
-
stroke: "currentColor",
|
|
44
|
-
"stroke-linecap": "round",
|
|
45
|
-
"stroke-linejoin": "round"
|
|
46
|
-
}),
|
|
47
|
-
/* @__PURE__ */ r("path", {
|
|
48
|
-
d: "M2 6.66667H14",
|
|
49
|
-
stroke: "currentColor",
|
|
50
|
-
"stroke-linecap": "round",
|
|
51
|
-
"stroke-linejoin": "round"
|
|
28
|
+
/* @__PURE__ */ l("path", {
|
|
29
|
+
d: "M5.24124 5.81871L9.52771 1.39839C9.79517 1.12257 9.63305 0.595276 9.28077 0.595276H0.707839C0.355562 0.595276 0.193433 1.12257 0.460901 1.39839L4.74736 5.81871C4.88946 5.96524 5.09914 5.96524 5.24124 5.81871Z",
|
|
30
|
+
fill: "currentColor"
|
|
52
31
|
})
|
|
53
|
-
], -1),
|
|
54
|
-
|
|
32
|
+
], -1), R = /* @__PURE__ */ l("span", { class: "sr-only" }, "Seleziona anno", -1), X = /* @__PURE__ */ l("svg", {
|
|
33
|
+
viewBox: "0 0 24 24",
|
|
34
|
+
width: "24px",
|
|
35
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
36
|
+
}, [
|
|
37
|
+
/* @__PURE__ */ l("path", {
|
|
38
|
+
d: "M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z",
|
|
39
|
+
fill: "currentColor"
|
|
40
|
+
})
|
|
41
|
+
], -1), ee = /* @__PURE__ */ l("span", { class: "sr-only" }, "Vai indietro di un mese", -1), ae = {
|
|
42
|
+
style: { transform: "rotate(180deg)" },
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
width: "24px",
|
|
45
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
46
|
+
}, te = /* @__PURE__ */ l("path", {
|
|
47
|
+
d: "M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z",
|
|
48
|
+
fill: "currentColor"
|
|
49
|
+
}, null, -1), oe = [
|
|
50
|
+
te
|
|
51
|
+
], le = /* @__PURE__ */ l("span", { class: "sr-only" }, "Vai avanti di un mese", -1), se = { class: "bb-base-date-picker__content" }, Oe = /* @__PURE__ */ $({
|
|
52
|
+
__name: "BaseDatePicker",
|
|
55
53
|
props: {
|
|
56
|
-
allowWriting: { type: [Boolean, String], default: !0 },
|
|
57
|
-
"append:icon": {},
|
|
58
|
-
autocomplete: { default: "off" },
|
|
59
|
-
autofocus: {},
|
|
60
54
|
disabled: { type: Boolean },
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
id: {},
|
|
64
|
-
loading: { type: Boolean },
|
|
55
|
+
header: { type: Boolean },
|
|
56
|
+
firstDayOfWeek: { default: 1 },
|
|
65
57
|
max: {},
|
|
66
58
|
min: {},
|
|
67
59
|
modelValue: {},
|
|
68
|
-
|
|
69
|
-
placeholder: {},
|
|
70
|
-
"prepend:icon": {},
|
|
60
|
+
multiple: { type: Boolean },
|
|
71
61
|
range: { type: Boolean },
|
|
72
62
|
readonly: { type: Boolean },
|
|
73
|
-
|
|
74
|
-
selectable: {},
|
|
75
|
-
width: { default: 290 }
|
|
63
|
+
selectable: {}
|
|
76
64
|
},
|
|
77
|
-
emits: ["
|
|
78
|
-
setup(
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
{ threshold: [0, 1] }
|
|
91
|
-
);
|
|
92
|
-
const G = v(() => ({
|
|
93
|
-
"bb-base-date-picker-input": !0,
|
|
94
|
-
"bb-base-date-picker-input--active": k.value,
|
|
95
|
-
"bb-base-date-picker-input--errors": t.hasErrors,
|
|
96
|
-
"bb-base-date-picker-input--loading": t.loading,
|
|
97
|
-
"bb-base-date-picker-input--readonly": t.readonly,
|
|
98
|
-
"bb-base-date-picker-input--disabled": t.disabled
|
|
99
|
-
})), P = {
|
|
100
|
-
onInput: (e) => {
|
|
101
|
-
if (!t.range && e.target instanceof HTMLInputElement)
|
|
102
|
-
if (y.value = e.target.value, /\d{2}\/\d{2}\/\d{4}/.test(e.target.value)) {
|
|
103
|
-
const a = n(e.target.value, "DD/MM/YYYY");
|
|
104
|
-
ee(a) ? (e.target.value = "", s("update:modelValue", null), s("error", "invalid_date_typed")) : s("update:modelValue", a.toISOString());
|
|
105
|
-
} else e.target.value === "" && s("update:modelValue", null);
|
|
106
|
-
}
|
|
107
|
-
}, k = o(!1), H = () => {
|
|
108
|
-
k.value || (s("active"), k.value = !0, document.addEventListener("focusin", h), document.addEventListener("click", h));
|
|
109
|
-
}, h = (e) => {
|
|
110
|
-
var a, l;
|
|
111
|
-
f.value || e.target instanceof HTMLElement && (a = C.value) != null && a.$el && !C.value.$el.contains(e.target) && !((l = u.value) != null && l.contains(e.target)) && (k.value = !1, s("inactive"), document.removeEventListener("focusin", h), document.removeEventListener("click", h));
|
|
112
|
-
}, S = (e) => {
|
|
65
|
+
emits: ["update:modelValue"],
|
|
66
|
+
setup(V, { expose: C, emit: B }) {
|
|
67
|
+
r.extend(T), r.extend(E), r.extend(z), r.extend(U), r.locale(W);
|
|
68
|
+
const M = B, t = V;
|
|
69
|
+
r.updateLocale("it", {
|
|
70
|
+
weekStart: t.firstDayOfWeek
|
|
71
|
+
});
|
|
72
|
+
const b = H();
|
|
73
|
+
t.multiple && t.range && b.throw("Date picker cannot be both multiple and range."), (t.multiple || t.range) && (Array.isArray(t.modelValue) || b.throw(
|
|
74
|
+
"Date picker is set to select multiple dates but modelValue is not an array."
|
|
75
|
+
));
|
|
76
|
+
const a = f(r()), v = (e) => {
|
|
113
77
|
if (e)
|
|
114
78
|
if (Array.isArray(e)) {
|
|
115
|
-
|
|
116
|
-
|
|
79
|
+
if (e.length) {
|
|
80
|
+
if (e.map((d) => r(d).valueOf()).includes(a.value.valueOf()))
|
|
81
|
+
return;
|
|
82
|
+
a.value = r(j(e)).startOf("day");
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
117
85
|
} else
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
86
|
+
a.value = r(e).startOf("day");
|
|
87
|
+
else
|
|
88
|
+
a.value = r().startOf("day");
|
|
89
|
+
};
|
|
90
|
+
v(t.modelValue);
|
|
91
|
+
const o = f("day"), y = (e) => {
|
|
92
|
+
o.value === e ? o.value = "day" : o.value = e;
|
|
93
|
+
}, O = (e) => {
|
|
94
|
+
a.value = a.value.set("month", e);
|
|
95
|
+
}, S = () => {
|
|
96
|
+
a.value = a.value.add(1, "month");
|
|
97
|
+
}, A = () => {
|
|
98
|
+
a.value = a.value.subtract(1, "month");
|
|
99
|
+
}, D = (e) => {
|
|
100
|
+
a.value = a.value.set("year", e);
|
|
101
|
+
}, c = f(t.modelValue), L = (e) => {
|
|
102
|
+
c.value = e, M("update:modelValue", e);
|
|
103
|
+
};
|
|
104
|
+
return x(
|
|
122
105
|
() => t.modelValue,
|
|
123
|
-
(
|
|
124
|
-
|
|
106
|
+
() => {
|
|
107
|
+
g(t.modelValue) !== g(c.value) && (c.value = t.modelValue, v(t.modelValue));
|
|
125
108
|
}
|
|
126
|
-
)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
whileElementsMounted: Ae,
|
|
130
|
-
middleware: [De(), Se(5), _e({ padding: 6 }), $e()]
|
|
131
|
-
}), K = v(() => {
|
|
132
|
-
const e = {
|
|
133
|
-
...N.value
|
|
134
|
-
};
|
|
135
|
-
return u.value, e;
|
|
136
|
-
}), m = o(!1), R = async () => {
|
|
137
|
-
m.value = !0;
|
|
138
|
-
}, M = async () => {
|
|
139
|
-
var e;
|
|
140
|
-
m.value = !1, (e = A.value) == null || e.resetStatus();
|
|
141
|
-
}, _ = o(!1), $ = async () => {
|
|
142
|
-
f.value || (_.value = !0, await Me(() => !!u.value), await R(), Z());
|
|
143
|
-
}, f = o(!1), { activate: Z, deactivate: O } = be(u, {
|
|
144
|
-
onActivate: () => f.value = !0,
|
|
145
|
-
// On post activation focus on current date
|
|
146
|
-
onPostActivate: () => {
|
|
147
|
-
var e;
|
|
148
|
-
(e = u.value.querySelector(
|
|
149
|
-
".bb-base-date-picker-date--current button"
|
|
150
|
-
)) == null || e.focus();
|
|
151
|
-
},
|
|
152
|
-
onPostDeactivate: async () => {
|
|
153
|
-
await he(200), f.value = !1;
|
|
154
|
-
},
|
|
155
|
-
/* On esc deactivate the trap, return focus and then close the modal */
|
|
156
|
-
escapeDeactivates: () => (b.value = !1, M(), !0),
|
|
157
|
-
clickOutsideDeactivates: () => (b.value = !1, M(), !0),
|
|
158
|
-
allowOutsideClick: !0,
|
|
159
|
-
preventScroll: !0
|
|
160
|
-
}), b = o(!t.allowWriting || t.range), J = async (e) => {
|
|
161
|
-
s("focus", e), b.value && $(), b.value = !t.allowWriting || t.allowWriting === "not-mobile" && D.value || t.range;
|
|
162
|
-
}, Q = (e) => t.range && Array.isArray(e) && e.length === 2 || !t.range && !!e, X = {
|
|
163
|
-
"onUpdate:modelValue": (e) => {
|
|
164
|
-
s("update:modelValue", e), Q(e) && (b.value = !1, O({
|
|
165
|
-
onPostDeactivate: () => {
|
|
166
|
-
f.value = !1, M();
|
|
167
|
-
}
|
|
168
|
-
}));
|
|
109
|
+
), C({
|
|
110
|
+
resetStatus: () => {
|
|
111
|
+
o.value = "day";
|
|
169
112
|
}
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
"prepend-outer": i(() => [
|
|
192
|
-
d(e.$slots, "prepend-outer")
|
|
193
|
-
]),
|
|
194
|
-
"append-outer": i(() => [
|
|
195
|
-
d(e.$slots, "append-outer")
|
|
196
|
-
]),
|
|
197
|
-
default: i(() => {
|
|
198
|
-
var l;
|
|
199
|
-
return [
|
|
200
|
-
E(Ve, {
|
|
201
|
-
ref_key: "innerContainer",
|
|
202
|
-
ref: p,
|
|
203
|
-
"append:icon": t["append:icon"],
|
|
204
|
-
"prepend:icon": t["prepend:icon"]
|
|
113
|
+
}), (e, s) => (u(), _("div", G, [
|
|
114
|
+
i(Z, {
|
|
115
|
+
cursor: a.value,
|
|
116
|
+
disabled: !!e.disabled,
|
|
117
|
+
hidden: !e.header
|
|
118
|
+
}, null, 8, ["cursor", "disabled", "hidden"]),
|
|
119
|
+
l("div", I, [
|
|
120
|
+
l("div", J, [
|
|
121
|
+
i(m(p), {
|
|
122
|
+
class: "bb-base-date-picker__control bb-base-date-picker__month-control",
|
|
123
|
+
onClick: s[0] || (s[0] = (d) => y("month"))
|
|
124
|
+
}, {
|
|
125
|
+
default: n(() => [
|
|
126
|
+
N(Y(a.value.format("MMMM YYYY")) + " ", 1),
|
|
127
|
+
K
|
|
128
|
+
]),
|
|
129
|
+
_: 1
|
|
130
|
+
}),
|
|
131
|
+
i(m(p), {
|
|
132
|
+
class: "bb-base-date-picker__control bb-base-date-picker__year-control",
|
|
133
|
+
onClick: s[1] || (s[1] = (d) => y("year"))
|
|
205
134
|
}, {
|
|
206
|
-
|
|
207
|
-
|
|
135
|
+
default: n(() => [
|
|
136
|
+
Q,
|
|
137
|
+
R
|
|
208
138
|
]),
|
|
209
|
-
|
|
210
|
-
|
|
139
|
+
_: 1
|
|
140
|
+
}),
|
|
141
|
+
i(m(p), {
|
|
142
|
+
class: "bb-base-date-picker__control",
|
|
143
|
+
disabled: e.disabled || o.value !== "day",
|
|
144
|
+
onClick: A
|
|
145
|
+
}, {
|
|
146
|
+
default: n(() => [
|
|
147
|
+
X,
|
|
148
|
+
ee
|
|
211
149
|
]),
|
|
212
|
-
|
|
213
|
-
|
|
150
|
+
_: 1
|
|
151
|
+
}, 8, ["disabled"]),
|
|
152
|
+
i(m(p), {
|
|
153
|
+
class: "bb-base-date-picker__control",
|
|
154
|
+
disabled: e.disabled || o.value !== "day",
|
|
155
|
+
onClick: S
|
|
156
|
+
}, {
|
|
157
|
+
default: n(() => [
|
|
158
|
+
(u(), _("svg", ae, oe)),
|
|
159
|
+
le
|
|
214
160
|
]),
|
|
215
|
-
|
|
216
|
-
|
|
161
|
+
_: 1
|
|
162
|
+
}, 8, ["disabled"])
|
|
163
|
+
]),
|
|
164
|
+
l("div", se, [
|
|
165
|
+
i(P, {
|
|
166
|
+
current: o.value === "day",
|
|
167
|
+
cursor: a.value,
|
|
168
|
+
disabled: !!e.disabled,
|
|
169
|
+
"first-day-of-week": e.firstDayOfWeek,
|
|
170
|
+
inert: o.value !== "day",
|
|
171
|
+
max: e.max,
|
|
172
|
+
min: e.min,
|
|
173
|
+
"model-value": e.modelValue,
|
|
174
|
+
multiple: e.multiple,
|
|
175
|
+
range: e.range,
|
|
176
|
+
readonly: e.readonly,
|
|
177
|
+
selectable: e.selectable,
|
|
178
|
+
"onUpdate:cursor": s[2] || (s[2] = (d) => a.value = d),
|
|
179
|
+
"onUpdate:modelValue": L
|
|
180
|
+
}, null, 8, ["current", "cursor", "disabled", "first-day-of-week", "inert", "max", "min", "model-value", "multiple", "range", "readonly", "selectable"]),
|
|
181
|
+
i(w, {
|
|
182
|
+
direction: "right",
|
|
183
|
+
duration: 500,
|
|
184
|
+
gap: 30
|
|
185
|
+
}, {
|
|
186
|
+
default: n(() => [
|
|
187
|
+
o.value === "month" ? (u(), h(q, {
|
|
188
|
+
key: 0,
|
|
189
|
+
cursor: a.value,
|
|
190
|
+
disabled: !!e.disabled,
|
|
191
|
+
"onUpdate:month": s[3] || (s[3] = (d) => {
|
|
192
|
+
O(d), o.value = "day";
|
|
193
|
+
})
|
|
194
|
+
}, null, 8, ["cursor", "disabled"])) : k("", !0)
|
|
217
195
|
]),
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
},
|
|
234
|
-
size: "1",
|
|
235
|
-
type: "text",
|
|
236
|
-
value: T.value,
|
|
237
|
-
onFocus: J
|
|
238
|
-
}), null, 16, Oe), [
|
|
239
|
-
[c(ke)]
|
|
240
|
-
]),
|
|
241
|
-
r("button", {
|
|
242
|
-
class: "bb-base-date-picker-input__calendar-btn",
|
|
243
|
-
disabled: e.disabled || e.readonly || !Y.value,
|
|
244
|
-
type: "button",
|
|
245
|
-
onClick: $
|
|
246
|
-
}, [
|
|
247
|
-
Ee,
|
|
248
|
-
r("span", null, F(x.value), 1)
|
|
249
|
-
], 8, Be),
|
|
250
|
-
r("span", {
|
|
251
|
-
id: `bdpi_description_${c(g)}`,
|
|
252
|
-
class: "bb-base-date-picker-input__accessible-description"
|
|
253
|
-
}, "Formato della data " + F(t.range ? "GG/MM/AAAA - GG/MM/AAAA" : "GG/MM/AAAA"), 9, Ie)
|
|
196
|
+
_: 1
|
|
197
|
+
}),
|
|
198
|
+
i(w, {
|
|
199
|
+
direction: "top",
|
|
200
|
+
duration: 500,
|
|
201
|
+
gap: 30
|
|
202
|
+
}, {
|
|
203
|
+
default: n(() => [
|
|
204
|
+
o.value === "year" ? (u(), h(F, {
|
|
205
|
+
key: 0,
|
|
206
|
+
cursor: a.value,
|
|
207
|
+
disabled: !!e.disabled,
|
|
208
|
+
"onUpdate:year": s[4] || (s[4] = (d) => {
|
|
209
|
+
D(d), o.value = "day";
|
|
210
|
+
})
|
|
211
|
+
}, null, 8, ["cursor", "disabled"])) : k("", !0)
|
|
254
212
|
]),
|
|
255
|
-
_:
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}, [
|
|
261
|
-
r("span", {
|
|
262
|
-
ref_key: "calendar",
|
|
263
|
-
ref: u,
|
|
264
|
-
class: B(["bb-base-date-picker-input__calendar", {
|
|
265
|
-
"bb-base-date-picker-input__calendar--shown": m.value
|
|
266
|
-
}]),
|
|
267
|
-
style: le(K.value)
|
|
268
|
-
}, [
|
|
269
|
-
E(Ye, {
|
|
270
|
-
direction: (l = c(U)) != null && l.includes("top") ? "bottom" : "top",
|
|
271
|
-
duration: 300
|
|
272
|
-
}, {
|
|
273
|
-
default: i(() => [
|
|
274
|
-
(w(), V(ie, null, [
|
|
275
|
-
m.value ? (w(), V(we, I({
|
|
276
|
-
key: 0,
|
|
277
|
-
id: c(g)
|
|
278
|
-
}, X, {
|
|
279
|
-
ref_key: "basedatepicker",
|
|
280
|
-
ref: A,
|
|
281
|
-
disabled: e.disabled,
|
|
282
|
-
"first-day-of-week": e.firstDayOfWeek,
|
|
283
|
-
max: e.max,
|
|
284
|
-
min: e.min,
|
|
285
|
-
"model-value": e.modelValue,
|
|
286
|
-
range: e.range,
|
|
287
|
-
readonly: e.readonly,
|
|
288
|
-
selectable: e.selectable
|
|
289
|
-
}), null, 16, ["id", "disabled", "first-day-of-week", "max", "min", "model-value", "range", "readonly", "selectable"])) : L("", !0)
|
|
290
|
-
], 1024))
|
|
291
|
-
]),
|
|
292
|
-
_: 1
|
|
293
|
-
}, 8, ["direction"])
|
|
294
|
-
], 6)
|
|
295
|
-
])) : L("", !0)
|
|
296
|
-
];
|
|
297
|
-
}),
|
|
298
|
-
_: 3
|
|
299
|
-
}, 8, ["class"]));
|
|
213
|
+
_: 1
|
|
214
|
+
})
|
|
215
|
+
])
|
|
216
|
+
])
|
|
217
|
+
]));
|
|
300
218
|
}
|
|
301
219
|
});
|
|
302
220
|
export {
|
|
303
|
-
|
|
221
|
+
Oe as default
|
|
304
222
|
};
|
|
305
223
|
//# sourceMappingURL=index20.js.map
|
package/dist/index20.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index20.js","sources":["../src/components/BaseDatePickerInput/BaseDatePickerInput.vue"],"sourcesContent":["<template>\n\t<CommonInputOuterContainer\n\t\tref=\"outerContainer\"\n\t\t:class=\"classes\"\n\t\t@focusin=\"onFocusIn\"\n\t>\n\t\t<template #prepend-outer><slot name=\"prepend-outer\"></slot></template>\n\t\t<CommonInputInnerContainer\n\t\t\tref=\"innerContainer\"\n\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t>\n\t\t\t<template #prepend><slot name=\"prepend\" /></template>\n\t\t\t<template #prefix><slot name=\"prefix\" /></template>\n\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"input\"\n\t\t\t\tv-maska\n\t\t\t\t:aria-describedby=\"`bdpi_description_${id}`\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:data-maska=\"props.range ? '##/##/#### - ##/##/####' : '##/##/####'\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:inputmode=\"inputmode\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:readonly=\"readonly || range || !allowWriting\"\n\t\t\t\t:required=\"required\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\tsize=\"1\"\n\t\t\t\t:type=\"'text'\"\n\t\t\t\t:value=\"displayValue\"\n\t\t\t\t@focus=\"onFocus\"\n\t\t\t/>\n\t\t\t<button\n\t\t\t\tclass=\"bb-base-date-picker-input__calendar-btn\"\n\t\t\t\t:disabled=\"disabled || readonly || !canOpenCalendar\"\n\t\t\t\ttype=\"button\"\n\t\t\t\t@click=\"onOpenCalendar\"\n\t\t\t>\n\t\t\t\t<svg fill=\"none\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M12.6667 2.66667H3.33333C2.59695 2.66667 2 3.26363 2 4.00001V13.3333C2 14.0697 2.59695 14.6667 3.33333 14.6667H12.6667C13.403 14.6667 14 14.0697 14 13.3333V4.00001C14 3.26363 13.403 2.66667 12.6667 2.66667Z\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10.6667 1.33333V3.99999\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M5.33333 1.33333V3.99999\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M2 6.66667H14\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\n\t\t\t\t<span>{{ accessibleButtonLabel }}</span>\n\t\t\t</button>\n\t\t\t<span\n\t\t\t\t:id=\"`bdpi_description_${id}`\"\n\t\t\t\tclass=\"bb-base-date-picker-input__accessible-description\"\n\t\t\t\t>Formato della data\n\t\t\t\t{{ props.range ? 'GG/MM/AAAA - GG/MM/AAAA' : 'GG/MM/AAAA' }}</span\n\t\t\t>\n\t\t\t<template #append><slot name=\"append\" /></template>\n\t\t\t<template #suffix><slot name=\"suffix\" /></template>\n\t\t</CommonInputInnerContainer>\n\t\t<template #append-outer><slot name=\"append-outer\"></slot></template>\n\n\t\t<teleport v-if=\"shouldRenderCalendar\" to=\"body\">\n\t\t\t<span\n\t\t\t\tref=\"calendar\"\n\t\t\t\tclass=\"bb-base-date-picker-input__calendar\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'bb-base-date-picker-input__calendar--shown': shown,\n\t\t\t\t}\"\n\t\t\t\t:style=\"calendarStyles\"\n\t\t\t>\n\t\t\t\t<SlideBack\n\t\t\t\t\t:direction=\"placement?.includes('top') ? 'bottom' : 'top'\"\n\t\t\t\t\t:duration=\"300\"\n\t\t\t\t>\n\t\t\t\t\t<KeepAlive>\n\t\t\t\t\t\t<BaseDatePicker\n\t\t\t\t\t\t\tv-if=\"shown\"\n\t\t\t\t\t\t\t:id=\"id\"\n\t\t\t\t\t\t\tv-bind=\"calendarEventListeners\"\n\t\t\t\t\t\t\tref=\"basedatepicker\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:first-day-of-week=\"firstDayOfWeek\"\n\t\t\t\t\t\t\t:max=\"max\"\n\t\t\t\t\t\t\t:min=\"min\"\n\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\t:range=\"range\"\n\t\t\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t\t\t:selectable=\"selectable\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</KeepAlive>\n\t\t\t\t</SlideBack>\n\t\t\t</span>\n\t\t</teleport>\n\t</CommonInputOuterContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n\tautoUpdate,\n\tflip,\n\thide,\n\toffset,\n\tshift,\n\tuseFloating,\n} from '@floating-ui/vue';\nimport { computed, ref, watch } from 'vue';\nimport { Dayjs, default as dayjs } from 'dayjs';\nimport { default as customParseFormat } from 'dayjs/plugin/customParseFormat';\nimport { default as it } from 'dayjs/locale/it';\nimport { default as isSameOrAfter } from 'dayjs/plugin/isSameOrAfter';\nimport { default as isSameOrBefore } from 'dayjs/plugin/isSameOrBefore';\nimport { identity } from '@/utilities/functions/identity';\nimport { last } from '@/utilities/functions/last';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { useIntersectionObserver } from '@vueuse/core';\nimport { useMobile } from '@/composables/useMobile';\nimport { vMaska } from 'maska';\nimport { wait } from '@/utilities/functions/wait';\nimport { waitFor } from '@/utilities/functions/waitFor';\nimport BaseDatePicker from '../BaseDatePicker/BaseDatePicker.vue';\nimport CommonInputInnerContainer from '../CommonInputInnerContainer.vue';\nimport CommonInputOuterContainer from '../CommonInputOuterContainer.vue';\nimport SlideBack from '../Transitions/SlideBack.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\ndayjs.extend(customParseFormat);\ndayjs.extend(isSameOrAfter);\ndayjs.extend(isSameOrBefore);\ndayjs.locale(it);\n\nexport type BaseDatePickerInputProps = {\n\t/**\n\t * Allows typing into the input.\n\t */\n\tallowWriting?: boolean | 'not-mobile';\n\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n\t */\n\tfirstDayOfWeek?: (typeof it)['weekStart'];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Maximum selectable date\n\t */\n\tmax?: Date | string | number;\n\n\t/**\n\t * Minimum selectable date\n\t */\n\tmin?: Date | string | number;\n\n\t/**\n\t * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n\t */\n\tmodelValue: string | string[] | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Selects a range of dates between two dates. It selects all of the days between start and end\n\t */\n\trange?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: boolean;\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n\t * @param date\n\t */\n\tselectable?: (date: Date) => boolean;\n\n\t/**\n\t * Width of the calendar\n\t */\n\twidth?: number | string;\n};\n\nconst props = withDefaults(defineProps<BaseDatePickerInputProps>(), {\n\tallowWriting: true,\n\tautocomplete: 'off',\n\twidth: 290,\n});\n\nexport type BaseDatePickerInputEvents = {\n\t(e: 'active'): void;\n\t(e: 'error', message: string): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'inactive'): void;\n\t(e: 'update:modelValue', value: BaseDatePickerInputProps['modelValue']): void;\n};\n\nconst emit = defineEmits<BaseDatePickerInputEvents>();\n\ndefineSlots<{\n\t'prepend-outer'?: (props: object) => any;\n\tprepend?: (props: object) => any;\n\tprefix?: (props: object) => any;\n\tappend?: (props: object) => any;\n\t'append-outer'?: (props: object) => any;\n\tsuffix?: (props: object) => any;\n}>();\n\nconst calendar = ref<HTMLElement | null>(null);\nconst outerContainer = ref<InstanceType<\n\ttypeof CommonInputOuterContainer\n> | null>(null);\nconst innerContainer = ref<InstanceType<\n\ttypeof CommonInputInnerContainer\n> | null>(null);\nconst input = ref<HTMLElement | null>(null);\nconst inputValue = ref<string | null>(null);\nconst basedatepicker = ref();\nconst id = props.id || `bdpi_${useId().id.value}`;\n\nconst { isMobile } = useMobile();\nconst inputmode = computed(() =>\n\tprops.allowWriting === 'not-mobile' && isMobile.value ? 'none' : 'numeric'\n);\n\nconst canOpenCalendar = ref(true);\nuseIntersectionObserver(\n\tinnerContainer,\n\t([{ intersectionRatio }]) => {\n\t\tif (intersectionRatio === 1) canOpenCalendar.value = true;\n\t\telse {\n\t\t\tcanOpenCalendar.value = false;\n\t\t\tif (shown.value) {\n\t\t\t\tdeactivate();\n\t\t\t\tif (innerContainer.value) {\n\t\t\t\t\tconst ic = innerContainer.value.$el;\n\t\t\t\t\tconst button: HTMLElement = ic.querySelector(\n\t\t\t\t\t\t'.bb-base-date-picker-input__calendar-btn'\n\t\t\t\t\t);\n\t\t\t\t\tbutton.focus();\n\t\t\t\t}\n\t\t\t\tclose();\n\t\t\t}\n\t\t}\n\t},\n\t{ threshold: [0, 1] }\n);\n\nconst classes = computed(() => ({\n\t'bb-base-date-picker-input': true,\n\t'bb-base-date-picker-input--active': active.value,\n\t'bb-base-date-picker-input--errors': props.hasErrors,\n\t'bb-base-date-picker-input--loading': props.loading,\n\t'bb-base-date-picker-input--readonly': props.readonly,\n\t'bb-base-date-picker-input--disabled': props.disabled,\n}));\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonInput: (event: Event) => {\n\t\tif (props.range) return;\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tinputValue.value = event.target.value;\n\t\t\tif (/\\d{2}\\/\\d{2}\\/\\d{4}/.test(event.target.value)) {\n\t\t\t\tconst date = dayjs(event.target.value, 'DD/MM/YYYY');\n\t\t\t\tif (!isDateDisabled(date)) {\n\t\t\t\t\temit('update:modelValue', date.toISOString());\n\t\t\t\t} else {\n\t\t\t\t\tevent.target.value = '';\n\t\t\t\t\temit('update:modelValue', null);\n\t\t\t\t\temit('error', 'invalid_date_typed');\n\t\t\t\t}\n\t\t\t} else if (event.target.value === '') {\n\t\t\t\temit('update:modelValue', null);\n\t\t\t}\n\t\t}\n\t},\n};\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we physically move focus to the calendar so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst onFocusIn = () => {\n\tif (active.value) return;\n\temit('active');\n\tactive.value = true;\n\tdocument.addEventListener('focusin', onDocumentInteraction);\n\tdocument.addEventListener('click', onDocumentInteraction);\n};\n\nconst onDocumentInteraction = (event: FocusEvent) => {\n\tif (trapIsActive.value) return;\n\tif (event.target instanceof HTMLElement) {\n\t\tif (\n\t\t\touterContainer.value?.$el &&\n\t\t\t!outerContainer.value.$el.contains(event.target) &&\n\t\t\t!calendar.value?.contains(event.target)\n\t\t) {\n\t\t\tactive.value = false;\n\t\t\temit('inactive');\n\t\t\tdocument.removeEventListener('focusin', onDocumentInteraction);\n\t\t\tdocument.removeEventListener('click', onDocumentInteraction);\n\t\t}\n\t}\n};\n\nconst getStringFromModelValue = (value: typeof props.modelValue) => {\n\tif (value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tlet head;\n\t\t\tlet tail;\n\t\t\tif (value.length) head = value[0];\n\t\t\tif (value.length > 1) tail = last(value);\n\t\t\treturn [head, tail]\n\t\t\t\t.filter(identity)\n\t\t\t\t.map((el) => dayjs(el).format('DD/MM/YYYY'))\n\t\t\t\t.join(' - ');\n\t\t} else {\n\t\t\treturn dayjs(value).format('DD/MM/YYYY');\n\t\t}\n\t}\n\treturn null;\n};\n\nconst displayValue = computed(() => {\n\tif (inputValue.value) return inputValue.value;\n\treturn getStringFromModelValue(props.modelValue);\n});\n\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tinputValue.value = getStringFromModelValue(value);\n\t}\n);\n\nconst { floatingStyles, placement } = useFloating(innerContainer, calendar, {\n\tplacement: 'bottom',\n\twhileElementsMounted: autoUpdate,\n\tmiddleware: [flip(), offset(5), shift({ padding: 6 }), hide()],\n});\n\nconst calendarStyles = computed(() => {\n\tconst base: Record<string, any> = {\n\t\t...floatingStyles.value,\n\t};\n\tif (!calendar.value) return base;\n\n\treturn base;\n});\n\n/**\n * We need the transitions because elements must be hidden and shown\n * to accessibility tools when they are fully closed or fully open,\n * while still being animated for sighted users.\n */\n\n// Option panel is open\nconst shown = ref(false);\n\nconst open = async () => {\n\tshown.value = true;\n};\n\nconst close = async () => {\n\tshown.value = false;\n\tbasedatepicker.value?.resetStatus();\n};\n\nconst shouldRenderCalendar = ref(false);\nconst onOpenCalendar = async () => {\n\tif (trapIsActive.value) return;\n\tshouldRenderCalendar.value = true;\n\tawait waitFor(() => !!calendar.value);\n\tawait open();\n\tactivate();\n};\n\nconst trapIsActive = ref(false);\nconst { activate, deactivate } = useFocusTrap(calendar, {\n\tonActivate: () => (trapIsActive.value = true),\n\t// On post activation focus on current date\n\tonPostActivate: () => {\n\t\tcalendar\n\t\t\t.value!.querySelector<HTMLButtonElement>(\n\t\t\t\t'.bb-base-date-picker-date--current button'\n\t\t\t)\n\t\t\t?.focus();\n\t},\n\tonPostDeactivate: async () => {\n\t\t// Wait for transition to end and for focus to return before\n\t\tawait wait(200);\n\t\ttrapIsActive.value = false;\n\t},\n\t/* On esc deactivate the trap, return focus and then close the modal */\n\tescapeDeactivates: () => {\n\t\tshouldOpen.value = false;\n\t\tclose();\n\t\treturn true;\n\t},\n\tclickOutsideDeactivates: () => {\n\t\tshouldOpen.value = false;\n\t\tclose();\n\t\treturn true;\n\t},\n\tallowOutsideClick: true,\n\tpreventScroll: true,\n});\n\nconst shouldOpen = ref(!props.allowWriting || props.range);\nconst onFocus = async (event: FocusEvent) => {\n\temit('focus', event);\n\tif (shouldOpen.value) onOpenCalendar();\n\tshouldOpen.value =\n\t\t!props.allowWriting ||\n\t\t(props.allowWriting === 'not-mobile' && isMobile.value) ||\n\t\tprops.range;\n};\n\nconst satisfiesSelection = (value: typeof props.modelValue) => {\n\treturn (\n\t\t(props.range && Array.isArray(value) && value.length === 2) ||\n\t\t(!props.range && !!value)\n\t);\n};\n\n/**\n * These events are just propagated\n */\nconst calendarEventListeners = {\n\t'onUpdate:modelValue': (value: string | string[] | null) => {\n\t\temit('update:modelValue', value);\n\t\tif (satisfiesSelection(value)) {\n\t\t\tshouldOpen.value = false;\n\t\t\tdeactivate({\n\t\t\t\tonPostDeactivate: () => {\n\t\t\t\t\ttrapIsActive.value = false;\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t},\n};\n\nconst accessibleButtonLabel = computed(() => {\n\tif (props.range) {\n\t\tif (!props.modelValue || props.modelValue.length < 2)\n\t\t\treturn `Seleziona un range`;\n\t\tconst start = dayjs(props.modelValue[0]).format('D MMMM YYYY');\n\t\tconst end = dayjs(props.modelValue[1]).format('D MMMM YYYY');\n\t\tif (props.range && props.modelValue.length === 2)\n\t\t\treturn `Cambia selezione, da ${start} a ${end}`;\n\t} else if (typeof props.modelValue === 'string') {\n\t\tconst selected = dayjs(props.modelValue).format('D MMMM YYYY');\n\t\treturn `Cambia selezione, ${selected}`;\n\t}\n\treturn 'Seleziona una data';\n});\n\nconst isDateDisabled = (date: Dayjs) => {\n\tconsole.log(date);\n\tlet passing = true;\n\tif (props.min) {\n\t\tpassing &&= date.isSameOrAfter(dayjs(props.min).startOf('day'));\n\t}\n\tif (props.max) {\n\t\tpassing &&= date.isSameOrBefore(dayjs(props.max).startOf('day'));\n\t}\n\tif (typeof props.selectable === 'function') {\n\t\tpassing &&= props.selectable(date.toDate());\n\t}\n\treturn !passing;\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseDatePickerInput';\n</style>\n"],"names":["dayjs","customParseFormat","isSameOrAfter","isSameOrBefore","it","props","__props","emit","__emit","calendar","ref","outerContainer","innerContainer","input","inputValue","basedatepicker","id","useId","isMobile","useMobile","inputmode","computed","canOpenCalendar","useIntersectionObserver","intersectionRatio","shown","deactivate","close","classes","active","eventListeners","event","date","isDateDisabled","onFocusIn","onDocumentInteraction","trapIsActive","_a","_b","getStringFromModelValue","value","head","tail","last","identity","el","displayValue","watch","floatingStyles","placement","useFloating","autoUpdate","flip","offset","shift","hide","calendarStyles","base","open","shouldRenderCalendar","onOpenCalendar","waitFor","activate","useFocusTrap","wait","shouldOpen","onFocus","satisfiesSelection","calendarEventListeners","accessibleButtonLabel","start","end","passing"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkJA,IAAAA,EAAM,OAAOC,EAAiB,GAC9BD,EAAM,OAAOE,EAAa,GAC1BF,EAAM,OAAOG,EAAc,GAC3BH,EAAM,OAAOI,EAAE;AA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Q,IAAIA,CAAI;AAChB,UAAIwC,IAAU;AACd,aAAInE,EAAM,OACGmE,UAAAxC,EAAK,cAAchC,EAAMK,EAAM,GAAG,EAAE,QAAQ,KAAK,CAAC,IAE3DA,EAAM,OACGmE,UAAAxC,EAAK,eAAehC,EAAMK,EAAM,GAAG,EAAE,QAAQ,KAAK,CAAC,IAE5D,OAAOA,EAAM,cAAe,cAC/BmE,UAAYnE,EAAM,WAAW2B,EAAK,OAAQ,CAAA,IAEpC,CAACwC;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index20.js","sources":["../src/components/BaseDatePicker/BaseDatePicker.vue"],"sourcesContent":["<template>\n\t<div class=\"bb-base-date-picker\">\n\t\t<Header :cursor=\"cursor\" :disabled=\"!!disabled\" :hidden=\"!header\" />\n\t\t<div class=\"bb-base-date-picker__body\">\n\t\t\t<div class=\"bb-base-date-picker__controls\">\n\t\t\t\t<BaseButton\n\t\t\t\t\tclass=\"bb-base-date-picker__control bb-base-date-picker__month-control\"\n\t\t\t\t\t@click=\"toggleMode('month')\"\n\t\t\t\t>\n\t\t\t\t\t{{ cursor.format('MMMM YYYY') }}\n\t\t\t\t\t<span class=\"sr-only\">Seleziona un mese</span>\n\t\t\t\t</BaseButton>\n\t\t\t\t<BaseButton\n\t\t\t\t\tclass=\"bb-base-date-picker__control bb-base-date-picker__year-control\"\n\t\t\t\t\t@click=\"toggleMode('year')\"\n\t\t\t\t>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\theight=\"6\"\n\t\t\t\t\t\tviewBox=\"0 0 10 6\"\n\t\t\t\t\t\twidth=\"10\"\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M5.24124 5.81871L9.52771 1.39839C9.79517 1.12257 9.63305 0.595276 9.28077 0.595276H0.707839C0.355562 0.595276 0.193433 1.12257 0.460901 1.39839L4.74736 5.81871C4.88946 5.96524 5.09914 5.96524 5.24124 5.81871Z\"\n\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</svg>\n\t\t\t\t\t<span class=\"sr-only\">Seleziona anno</span>\n\t\t\t\t</BaseButton>\n\t\t\t\t<BaseButton\n\t\t\t\t\tclass=\"bb-base-date-picker__control\"\n\t\t\t\t\t:disabled=\"disabled || mode !== 'day'\"\n\t\t\t\t\t@click=\"decreaseMonth\"\n\t\t\t\t>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\twidth=\"24px\"\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z\"\n\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</svg>\n\t\t\t\t\t<span class=\"sr-only\">Vai indietro di un mese</span>\n\t\t\t\t</BaseButton>\n\t\t\t\t<BaseButton\n\t\t\t\t\tclass=\"bb-base-date-picker__control\"\n\t\t\t\t\t:disabled=\"disabled || mode !== 'day'\"\n\t\t\t\t\t@click=\"increaseMonth\"\n\t\t\t\t>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tstyle=\"transform: rotate(180deg)\"\n\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\twidth=\"24px\"\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z\"\n\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</svg>\n\t\t\t\t\t<span class=\"sr-only\">Vai avanti di un mese</span>\n\t\t\t\t</BaseButton>\n\t\t\t</div>\n\t\t\t<div class=\"bb-base-date-picker__content\">\n\t\t\t\t<DaySelector\n\t\t\t\t\t:current=\"mode === 'day'\"\n\t\t\t\t\t:cursor=\"cursor\"\n\t\t\t\t\t:disabled=\"!!disabled\"\n\t\t\t\t\t:first-day-of-week=\"firstDayOfWeek!\"\n\t\t\t\t\t:inert=\"mode !== 'day'\"\n\t\t\t\t\t:max=\"max\"\n\t\t\t\t\t:min=\"min\"\n\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t:multiple=\"multiple\"\n\t\t\t\t\t:range=\"range\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t:selectable=\"selectable\"\n\t\t\t\t\t@update:cursor=\"(value) => (cursor = value)\"\n\t\t\t\t\t@update:model-value=\"updateModelValue\"\n\t\t\t\t/>\n\t\t\t\t<SlideTransition direction=\"right\" :duration=\"500\" :gap=\"30\">\n\t\t\t\t\t<MonthSelector\n\t\t\t\t\t\tv-if=\"mode === 'month'\"\n\t\t\t\t\t\t:cursor=\"cursor\"\n\t\t\t\t\t\t:disabled=\"!!disabled\"\n\t\t\t\t\t\t@update:month=\"\n\t\t\t\t\t\t\t(month) => {\n\t\t\t\t\t\t\t\tupdateMonth(month);\n\t\t\t\t\t\t\t\tmode = 'day';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\"\n\t\t\t\t\t/>\n\t\t\t\t</SlideTransition>\n\t\t\t\t<SlideTransition direction=\"top\" :duration=\"500\" :gap=\"30\">\n\t\t\t\t\t<YearSelector\n\t\t\t\t\t\tv-if=\"mode === 'year'\"\n\t\t\t\t\t\t:cursor=\"cursor\"\n\t\t\t\t\t\t:disabled=\"!!disabled\"\n\t\t\t\t\t\t@update:year=\"\n\t\t\t\t\t\t\t(year) => {\n\t\t\t\t\t\t\t\tupdateYear(year);\n\t\t\t\t\t\t\t\tmode = 'day';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\"\n\t\t\t\t\t/>\n\t\t\t\t</SlideTransition>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { BaseButton } from '@/index';\nimport { Dayjs, default as dayjs } from 'dayjs';\nimport { default as isSameOrAfter } from 'dayjs/plugin/isSameOrAfter';\nimport { default as isSameOrBefore } from 'dayjs/plugin/isSameOrBefore';\nimport { default as it } from 'dayjs/locale/it';\nimport { default as updateLocale } from 'dayjs/plugin/updateLocale';\nimport { default as weekOfYear } from 'dayjs/plugin/weekOfYear';\nimport { hash } from '@/utilities/functions/hash';\nimport { last } from '@/utilities/functions/last';\nimport { ref } from 'vue';\nimport { useLogger } from '@/composables/useLogger';\nimport { watch } from 'vue';\nimport DaySelector from './BaseDatePickerInputDaySelector.vue';\nimport Header from './BaseDatePickerHeader.vue';\nimport MonthSelector from './BaseDatePickerMonthSelector.vue';\nimport SlideTransition from '@/components/Transitions/Slide.vue';\nimport YearSelector from './BaseDatePickerYearSelector.vue';\n\ndayjs.extend(weekOfYear);\ndayjs.extend(updateLocale);\ndayjs.extend(isSameOrAfter);\ndayjs.extend(isSameOrBefore);\ndayjs.locale(it);\n\nexport type BaseDatePickerProps = {\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Shows or hides the header of the component\n\t */\n\theader?: boolean;\n\n\t/**\n\t * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n\t */\n\tfirstDayOfWeek?: (typeof it)['weekStart'];\n\n\t/**\n\t * Maximum selectable date\n\t */\n\tmax?: Date | string | number;\n\n\t/**\n\t * Minimum selectable date\n\t */\n\tmin?: Date | string | number;\n\n\t/**\n\t * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n\t */\n\tmodelValue: string | string[] | null;\n\n\t/**\n\t * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Selects a range of dates between two dates. It selects all of the days between start and end\n\t */\n\trange?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: boolean;\n\n\t/**\n\t * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n\t * @param date\n\t */\n\tselectable?: (date: Date) => boolean;\n};\n\nconst emit = defineEmits<{\n\t(event: 'update:modelValue', value: any): void;\n}>();\n\nconst props = withDefaults(defineProps<BaseDatePickerProps>(), {\n\tfirstDayOfWeek: 1,\n});\n\ndayjs.updateLocale('it', {\n\tweekStart: props.firstDayOfWeek,\n});\n\nconst logger = useLogger();\nif (props.multiple && props.range) {\n\tlogger.throw('Date picker cannot be both multiple and range.');\n}\nif (props.multiple || props.range) {\n\tif (!Array.isArray(props.modelValue)) {\n\t\tlogger.throw(\n\t\t\t'Date picker is set to select multiple dates but modelValue is not an array.'\n\t\t);\n\t}\n}\n\nconst cursor = ref<Dayjs>(dayjs());\nconst setCursor = (value: typeof props.modelValue) => {\n\tif (value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length) {\n\t\t\t\tconst datesAsNumber = value.map((el) => dayjs(el).valueOf());\n\t\t\t\tif (datesAsNumber.includes(cursor.value.valueOf())) {\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tcursor.value = dayjs(last(value)).startOf('day');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tcursor.value = dayjs(value).startOf('day');\n\t\t}\n\t} else {\n\t\tcursor.value = dayjs().startOf('day');\n\t}\n};\nsetCursor(props.modelValue);\ntype Mode = 'day' | 'month' | 'year';\nconst mode = ref<Mode>('day');\nconst toggleMode = (target: Mode) => {\n\tif (mode.value === target) mode.value = 'day';\n\telse mode.value = target;\n};\n\nconst updateMonth = (monthNumber: number) => {\n\tcursor.value = cursor.value.set('month', monthNumber);\n};\n\nconst increaseMonth = () => {\n\tcursor.value = cursor.value.add(1, 'month');\n};\nconst decreaseMonth = () => {\n\tcursor.value = cursor.value.subtract(1, 'month');\n};\n\nconst updateYear = (yearNumber: number) => {\n\tcursor.value = cursor.value.set('year', yearNumber);\n};\n\nconst lastValue = ref(props.modelValue);\nconst updateModelValue = (value: any) => {\n\tlastValue.value = value;\n\temit('update:modelValue', value);\n};\n\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\tif (hash(props.modelValue) !== hash(lastValue.value)) {\n\t\t\tlastValue.value = props.modelValue;\n\t\t\tsetCursor(props.modelValue);\n\t\t}\n\t}\n);\n\nconst resetStatus = () => {\n\tmode.value = 'day';\n};\n\ndefineExpose({\n\tresetStatus,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseDatePicker';\n</style>\n"],"names":["dayjs","weekOfYear","updateLocale","isSameOrAfter","isSameOrBefore","it","emit","__emit","props","__props","logger","useLogger","cursor","ref","setCursor","value","el","last","mode","toggleMode","target","updateMonth","monthNumber","increaseMonth","decreaseMonth","updateYear","yearNumber","lastValue","updateModelValue","watch","hash","__expose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqIA,IAAAA,EAAM,OAAOC,CAAU,GACvBD,EAAM,OAAOE,CAAY,GACzBF,EAAM,OAAOG,CAAa,GAC1BH,EAAM,OAAOI,CAAc,GAC3BJ,EAAM,OAAOK,CAAE;AAuDf,UAAMC,IAAOC,GAIPC,IAAQC;AAId,IAAAT,EAAM,aAAa,MAAM;AAAA,MACxB,WAAWQ,EAAM;AAAA,IAAA,CACjB;AAED,UAAME,IAASC;AACX,IAAAH,EAAM,YAAYA,EAAM,SAC3BE,EAAO,MAAM,gDAAgD,IAE1DF,EAAM,YAAYA,EAAM,WACtB,MAAM,QAAQA,EAAM,UAAU,KAC3BE,EAAA;AAAA,MACN;AAAA,IAAA;AAKG,UAAA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EAAM,UAAU,MAAMsB,EAAKH,EAAU,KAAK,MAClDA,EAAU,QAAQnB,EAAM,YACxBM,EAAUN,EAAM,UAAU;AAAA,MAE5B;AAAA,IAAA,GAOYuB,EAAA;AAAA,MACZ,aALmB,MAAM;AACzB,QAAAb,EAAK,QAAQ;AAAA,MAAA;AAAA,IAIb,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index200.js
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { __module as e } from "./index247.js";
|
|
3
|
-
(function(s, a) {
|
|
4
|
-
(function(i, t) {
|
|
5
|
-
s.exports = t();
|
|
6
|
-
})(n, function() {
|
|
7
|
-
return function(i, t) {
|
|
8
|
-
t.prototype.isSameOrAfter = function(r, o) {
|
|
9
|
-
return this.isSame(r, o) || this.isAfter(r, o);
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
});
|
|
13
|
-
})(e);
|
|
14
|
-
var m = e.exports;
|
|
15
|
-
const c = /* @__PURE__ */ f(m);
|
|
1
|
+
const n = (t, a, m) => Math.min(Math.max(t, a), m);
|
|
16
2
|
export {
|
|
17
|
-
|
|
3
|
+
n as clamp
|
|
18
4
|
};
|
|
19
5
|
//# sourceMappingURL=index200.js.map
|
package/dist/index200.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index200.js","sources":["../
|
|
1
|
+
{"version":3,"file":"index200.js","sources":["../src/utilities/functions/clamp.ts"],"sourcesContent":["/**\n * Returns value ensuring it doesn't go below min and exceed max.\n * EXAMPLE: clamp(5, 7, 20) === 7\n * @param value The value to clamp\n * @param min Minimum bound\n * @param max Maximum bound\n * @returns\n */\n\nexport const clamp = (value: number, min: number, max: number) => {\n\treturn Math.min(Math.max(value, min), max);\n};\n"],"names":["clamp","value","min","max"],"mappings":"AASO,MAAMA,IAAQ,CAACC,GAAeC,GAAaC,MAC1C,KAAK,IAAI,KAAK,IAAIF,GAAOC,CAAG,GAAGC,CAAG;"}
|