bitboss-ui 2.0.7 → 2.0.9
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/index.js +139 -138
- package/dist/index.js.map +1 -1
- package/dist/index10.js +7 -78
- package/dist/index10.js.map +1 -1
- package/dist/{index100.js → index101.js} +3 -3
- package/dist/{index100.js.map → index101.js.map} +1 -1
- package/dist/{index102.js → index103.js} +3 -3
- package/dist/{index102.js.map → index103.js.map} +1 -1
- package/dist/{index104.js → index105.js} +8 -8
- package/dist/{index104.js.map → index105.js.map} +1 -1
- package/dist/{index106.js → index107.js} +9 -9
- package/dist/{index106.js.map → index107.js.map} +1 -1
- package/dist/{index108.js → index109.js} +3 -3
- package/dist/{index108.js.map → index109.js.map} +1 -1
- package/dist/index11.js +74 -35
- package/dist/index11.js.map +1 -1
- package/dist/{index110.js → index111.js} +3 -3
- package/dist/{index110.js.map → index111.js.map} +1 -1
- package/dist/{index112.js → index113.js} +3 -3
- package/dist/{index112.js.map → index113.js.map} +1 -1
- package/dist/{index114.js → index115.js} +3 -3
- package/dist/{index114.js.map → index115.js.map} +1 -1
- package/dist/{index116.js → index117.js} +8 -8
- package/dist/{index116.js.map → index117.js.map} +1 -1
- package/dist/{index118.js → index119.js} +2 -2
- package/dist/{index118.js.map → index119.js.map} +1 -1
- package/dist/index12.js +36 -189
- package/dist/index12.js.map +1 -1
- package/dist/index121.js +34 -38
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +38 -38
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +39 -42
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +43 -31
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +35 -2
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +2 -21
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +21 -2
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +2 -312
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +309 -21
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +189 -78
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +24 -2
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -5
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +5 -9
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +8 -5
- 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 +85 -0
- package/dist/index14.js.map +1 -0
- 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 +1 -1
- package/dist/{index15.js → index16.js} +4 -4
- package/dist/{index15.js.map → index16.js.map} +1 -1
- package/dist/index160.js +2 -2
- package/dist/{index162.js → index161.js} +1 -1
- package/dist/index161.js.map +1 -0
- package/dist/index163.js +6 -0
- package/dist/index163.js.map +1 -0
- 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 +1 -1
- package/dist/index170.js +2 -2
- package/dist/index171.js +6 -0
- package/dist/index171.js.map +1 -0
- 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/{index17.js → index18.js} +4 -4
- package/dist/{index17.js.map → 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 +1 -1
- package/dist/index184.js +1 -1
- package/dist/{index186.js → index185.js} +1 -1
- package/dist/index185.js.map +1 -0
- package/dist/index187.js +6 -0
- package/dist/index187.js.map +1 -0
- 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 +1 -1
- package/dist/index198.js +3 -81
- package/dist/index198.js.map +1 -1
- package/dist/{index19.js → index20.js} +19 -18
- package/dist/{index19.js.map → index20.js.map} +1 -1
- package/dist/index200.js +126 -2
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +5 -4
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +123 -2
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +19 -8
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +14 -124
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +16 -5
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +2 -123
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +2 -19
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +35 -16
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +172 -14
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +6 -2
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +44 -2
- package/dist/index211.js.map +1 -1
- package/dist/index213.js +12 -173
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +5 -6
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +369 -43
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +161 -0
- package/dist/index216.js.map +1 -0
- package/dist/index217.js +84 -13
- package/dist/index217.js.map +1 -1
- package/dist/index219.js +67 -355
- package/dist/index219.js.map +1 -1
- package/dist/{index21.js → index22.js} +21 -21
- package/dist/{index21.js.map → index22.js.map} +1 -1
- package/dist/index220.js +8 -19
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +3 -27
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +2 -3
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +4 -249
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +2 -52
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +3 -44
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +7 -5
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +19 -49
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +27 -3
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +3 -3
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +249 -7
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +50 -156
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +38 -78
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +8 -0
- package/dist/index233.js.map +1 -0
- package/dist/index234.js +49 -2
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +2 -18
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +2 -106
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +21 -0
- package/dist/index237.js.map +1 -0
- package/dist/index238.js +53 -47
- package/dist/index238.js.map +1 -1
- package/dist/{index23.js → index24.js} +8 -8
- package/dist/{index23.js.map → index24.js.map} +1 -1
- package/dist/index240.js +100 -2
- package/dist/index240.js.map +1 -1
- package/dist/index242.js +9 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +2 -3
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +3 -6
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +12 -16
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +8 -8
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +9 -23
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +17 -9
- package/dist/index248.js.map +1 -1
- package/dist/index257.js +1 -1
- package/dist/index258.js +1 -1
- package/dist/{index25.js → index26.js} +6 -6
- package/dist/{index25.js.map → index26.js.map} +1 -1
- package/dist/index263.js +224 -2
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +4 -2
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +9 -2
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +5 -1
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +16 -2
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +9 -2
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +23 -28
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +199 -21
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +439 -0
- package/dist/index271.js.map +1 -0
- package/dist/index272.js +121 -218
- package/dist/index272.js.map +1 -1
- package/dist/index274.js +5 -200
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +2 -436
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +2 -127
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +2 -5
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +2 -2
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +2 -9
- package/dist/index279.js.map +1 -1
- package/dist/{index27.js → index28.js} +3 -3
- package/dist/{index27.js.map → index28.js.map} +1 -1
- package/dist/index280.js +2 -69
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +28 -3
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +22 -12
- package/dist/index282.js.map +1 -1
- package/dist/index284.js +2 -17
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +68 -2
- package/dist/index285.js.map +1 -1
- package/dist/index287.js +3 -211
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +211 -15
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +15 -4
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +11 -4
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +34 -58
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +4 -35
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +4 -7
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +57 -17
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +2 -7
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +7 -2
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +6 -10
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +17 -45
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +50 -0
- package/dist/index299.js.map +1 -0
- package/dist/{index29.js → index30.js} +3 -3
- package/dist/{index29.js.map → index30.js.map} +1 -1
- package/dist/index301.js +416 -42
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +50 -0
- package/dist/index302.js.map +1 -0
- package/dist/{index31.js → index32.js} +4 -4
- package/dist/{index31.js.map → index32.js.map} +1 -1
- package/dist/{index33.js → index34.js} +5 -5
- package/dist/{index33.js.map → index34.js.map} +1 -1
- package/dist/{index35.js → index36.js} +23 -22
- package/dist/{index35.js.map → index36.js.map} +1 -1
- package/dist/{index37.js → index38.js} +7 -7
- package/dist/{index37.js.map → index38.js.map} +1 -1
- package/dist/{index39.js → index40.js} +3 -3
- package/dist/{index39.js.map → index40.js.map} +1 -1
- package/dist/{index41.js → index42.js} +4 -4
- package/dist/{index41.js.map → index42.js.map} +1 -1
- package/dist/{index43.js → index44.js} +12 -11
- package/dist/{index43.js.map → index44.js.map} +1 -1
- package/dist/{index45.js → index46.js} +4 -4
- package/dist/{index45.js.map → index46.js.map} +1 -1
- package/dist/{index47.js → index48.js} +3 -3
- package/dist/{index47.js.map → index48.js.map} +1 -1
- package/dist/index5.js +14 -40
- package/dist/index5.js.map +1 -1
- package/dist/{index49.js → index50.js} +4 -4
- package/dist/{index49.js.map → index50.js.map} +1 -1
- package/dist/{index51.js → index52.js} +3 -3
- package/dist/{index51.js.map → index52.js.map} +1 -1
- package/dist/{index53.js → index54.js} +3 -3
- package/dist/{index53.js.map → index54.js.map} +1 -1
- package/dist/{index55.js → index56.js} +3 -3
- package/dist/{index55.js.map → index56.js.map} +1 -1
- package/dist/{index57.js → index58.js} +2 -2
- package/dist/{index57.js.map → index58.js.map} +1 -1
- package/dist/index6.js +38 -76
- package/dist/index6.js.map +1 -1
- package/dist/{index59.js → index60.js} +14 -13
- package/dist/{index59.js.map → index60.js.map} +1 -1
- package/dist/{index61.js → index62.js} +3 -3
- package/dist/{index61.js.map → index62.js.map} +1 -1
- package/dist/{index63.js → index64.js} +3 -3
- package/dist/{index63.js.map → index64.js.map} +1 -1
- package/dist/{index65.js → index66.js} +5 -5
- package/dist/{index65.js.map → index66.js.map} +1 -1
- package/dist/{index67.js → index68.js} +3 -3
- package/dist/{index67.js.map → index68.js.map} +1 -1
- package/dist/index7.js +78 -62
- package/dist/index7.js.map +1 -1
- package/dist/{index69.js → index70.js} +2 -2
- package/dist/{index69.js.map → index70.js.map} +1 -1
- package/dist/{index71.js → index72.js} +9 -9
- package/dist/{index71.js.map → index72.js.map} +1 -1
- package/dist/{index73.js → index74.js} +3 -3
- package/dist/{index73.js.map → index74.js.map} +1 -1
- package/dist/{index75.js → index76.js} +5 -5
- package/dist/{index75.js.map → index76.js.map} +1 -1
- package/dist/index78.js +37 -120
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +130 -0
- package/dist/index79.js.map +1 -0
- package/dist/index8.js +60 -18
- package/dist/index8.js.map +1 -1
- package/dist/{index80.js → index81.js} +5 -5
- package/dist/{index80.js.map → index81.js.map} +1 -1
- package/dist/{index82.js → index83.js} +25 -24
- package/dist/{index82.js.map → index83.js.map} +1 -1
- package/dist/{index84.js → index85.js} +7 -7
- package/dist/{index84.js.map → index85.js.map} +1 -1
- package/dist/{index86.js → index87.js} +2 -2
- package/dist/{index86.js.map → index87.js.map} +1 -1
- package/dist/{index88.js → index89.js} +3 -3
- package/dist/{index88.js.map → index89.js.map} +1 -1
- package/dist/index9.js +19 -7
- package/dist/index9.js.map +1 -1
- package/dist/{index90.js → index91.js} +3 -3
- package/dist/{index90.js.map → index91.js.map} +1 -1
- package/dist/{index92.js → index93.js} +3 -3
- package/dist/{index92.js.map → index93.js.map} +1 -1
- package/dist/{index94.js → index95.js} +1 -1
- package/dist/index95.js.map +1 -0
- package/dist/{index96.js → index97.js} +3 -3
- package/dist/{index96.js.map → index97.js.map} +1 -1
- package/dist/{index98.js → index99.js} +3 -3
- package/dist/{index98.js.map → index99.js.map} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index120.js +0 -43
- package/dist/index120.js.map +0 -1
- package/dist/index162.js.map +0 -1
- package/dist/index164.js +0 -6
- package/dist/index164.js.map +0 -1
- package/dist/index172.js +0 -5
- package/dist/index172.js.map +0 -1
- package/dist/index186.js.map +0 -1
- package/dist/index188.js +0 -6
- package/dist/index188.js.map +0 -1
- package/dist/index212.js +0 -38
- package/dist/index212.js.map +0 -1
- package/dist/index218.js +0 -8
- package/dist/index218.js.map +0 -1
- package/dist/index241.js +0 -13
- package/dist/index241.js.map +0 -1
- package/dist/index283.js +0 -12
- package/dist/index283.js.map +0 -1
- package/dist/index300.js +0 -424
- package/dist/index300.js.map +0 -1
- package/dist/index4.js +0 -17
- package/dist/index4.js.map +0 -1
- package/dist/index77.js +0 -47
- package/dist/index77.js.map +0 -1
- package/dist/index94.js.map +0 -1
package/dist/index232.js
CHANGED
|
@@ -1,87 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
key: 1,
|
|
7
|
-
class: "bb-cr-container__no-data-container"
|
|
8
|
-
}, _ = /* @__PURE__ */ b({
|
|
9
|
-
__name: "OptionsContainer",
|
|
1
|
+
import { defineComponent as _, computed as a, openBlock as o, createElementBlock as c, createElementVNode as p, Fragment as b, renderList as h, createBlock as k, normalizeClass as f, withCtx as y, createTextVNode as x, toDisplayString as B } from "vue";
|
|
2
|
+
import C from "./index14.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
const M = { class: "bb-base-date-picker__button-menu bb-base-date-picker__month-selector" }, v = { class: "content" }, E = /* @__PURE__ */ _({
|
|
5
|
+
__name: "BaseDatePickerMonthSelector",
|
|
10
6
|
props: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
hideLabel: { type: Boolean },
|
|
14
|
-
loadingText: {},
|
|
15
|
-
loading: { type: Boolean },
|
|
16
|
-
noDataText: {},
|
|
17
|
-
options: {}
|
|
7
|
+
cursor: {},
|
|
8
|
+
disabled: { type: Boolean }
|
|
18
9
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
(n(!0), s(c, null, m(a.options, (e, i) => (n(), s(c, {
|
|
40
|
-
key: (e == null ? void 0 : e.id) || i
|
|
41
|
-
}, [
|
|
42
|
-
t(a.$slots, "option:prepend", {
|
|
43
|
-
id: e.valueHash,
|
|
44
|
-
checked: !!e.selected,
|
|
45
|
-
disabled: !!e.disabled,
|
|
46
|
-
item: e.item,
|
|
47
|
-
text: e.text
|
|
10
|
+
emits: ["update:month"],
|
|
11
|
+
setup(l, { emit: d }) {
|
|
12
|
+
const s = l, m = d, i = a(() => s.cursor.month()), u = a(
|
|
13
|
+
() => new Array(12).fill(0).map((r, t) => {
|
|
14
|
+
const n = s.cursor.clone().startOf("year").add(t, "month");
|
|
15
|
+
return {
|
|
16
|
+
text: n.format("MMMM"),
|
|
17
|
+
key: n.unix(),
|
|
18
|
+
selected: n.month() === i.value,
|
|
19
|
+
handler: () => m("update:month", t)
|
|
20
|
+
};
|
|
21
|
+
})
|
|
22
|
+
);
|
|
23
|
+
return (r, t) => (o(), c("div", M, [
|
|
24
|
+
p("div", v, [
|
|
25
|
+
(o(!0), c(b, null, h(u.value, (e) => (o(), k(C, {
|
|
26
|
+
key: e.key,
|
|
27
|
+
class: f({
|
|
28
|
+
content__btn: !0,
|
|
29
|
+
"content__btn--selected": e.selected
|
|
48
30
|
}),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"bb-cr-container-option__text": !0,
|
|
59
|
-
"bb-cr-container-option__text--hidden": a.hideLabel
|
|
60
|
-
})
|
|
61
|
-
}, [
|
|
62
|
-
t(a.$slots, "label", {
|
|
63
|
-
checked: !!e.selected,
|
|
64
|
-
item: e.item,
|
|
65
|
-
text: e.text
|
|
66
|
-
}, () => [
|
|
67
|
-
o(d(e.text), 1)
|
|
68
|
-
])
|
|
69
|
-
], 2)
|
|
70
|
-
], 2),
|
|
71
|
-
t(a.$slots, "option:append", {
|
|
72
|
-
id: e.valueHash,
|
|
73
|
-
checked: !!e.selected,
|
|
74
|
-
disabled: !!e.disabled,
|
|
75
|
-
item: e.item,
|
|
76
|
-
text: e.text
|
|
77
|
-
})
|
|
78
|
-
], 64))), 128)),
|
|
79
|
-
t(a.$slots, "append")
|
|
31
|
+
disabled: r.disabled,
|
|
32
|
+
type: "button",
|
|
33
|
+
onClick: e.handler
|
|
34
|
+
}, {
|
|
35
|
+
default: y(() => [
|
|
36
|
+
x(B(e.text), 1)
|
|
37
|
+
]),
|
|
38
|
+
_: 2
|
|
39
|
+
}, 1032, ["class", "disabled", "onClick"]))), 128))
|
|
80
40
|
])
|
|
81
|
-
]
|
|
41
|
+
]));
|
|
82
42
|
}
|
|
83
43
|
});
|
|
84
44
|
export {
|
|
85
|
-
|
|
45
|
+
E as default
|
|
86
46
|
};
|
|
87
47
|
//# sourceMappingURL=index232.js.map
|
package/dist/index232.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index232.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index232.js","sources":["../src/components/BaseDatePicker/BaseDatePickerMonthSelector.vue"],"sourcesContent":["<template>\n\t<div\n\t\tclass=\"bb-base-date-picker__button-menu bb-base-date-picker__month-selector\"\n\t>\n\t\t<div class=\"content\">\n\t\t\t<BaseButton\n\t\t\t\tv-for=\"option in options\"\n\t\t\t\t:key=\"option.key\"\n\t\t\t\t:class=\"{\n\t\t\t\t\tcontent__btn: true,\n\t\t\t\t\t'content__btn--selected': option.selected,\n\t\t\t\t}\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\ttype=\"button\"\n\t\t\t\t@click=\"option.handler\"\n\t\t\t>\n\t\t\t\t{{ option.text }}\n\t\t\t</BaseButton>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Dayjs } from 'dayjs';\nimport { computed } from 'vue';\nimport BaseButton from '../BaseButton/BaseButton.vue';\n\ntype Props = {\n\tcursor: Dayjs;\n\tdisabled: boolean;\n};\nconst props = defineProps<Props>();\nconst emit = defineEmits<{\n\t(event: 'update:month', value: number): void;\n}>();\n\nconst month = computed(() => props.cursor.month());\n\nconst options = computed(() =>\n\tnew Array(12).fill(0).map((_: unknown, index) => {\n\t\tlet base = props.cursor.clone().startOf('year');\n\t\tconst d = base.add(index, 'month');\n\t\treturn {\n\t\t\ttext: d.format('MMMM'),\n\t\t\tkey: d.unix(),\n\t\t\tselected: d.month() === month.value,\n\t\t\thandler: () => emit('update:month', index),\n\t\t};\n\t})\n);\n</script>\n"],"names":["props","__props","emit","__emit","month","computed","options","_","index","d"],"mappings":";;;;;;;;;;;AA+BA,UAAMA,IAAQC,GACRC,IAAOC,GAIPC,IAAQC,EAAS,MAAML,EAAM,OAAO,OAAO,GAE3CM,IAAUD;AAAA,MAAS,MACxB,IAAI,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,IAAI,CAACE,GAAYC,MAAU;AAEhD,cAAMC,IADKT,EAAM,OAAO,MAAM,EAAE,QAAQ,MAAM,EAC/B,IAAIQ,GAAO,OAAO;AAC1B,eAAA;AAAA,UACN,MAAMC,EAAE,OAAO,MAAM;AAAA,UACrB,KAAKA,EAAE,KAAK;AAAA,UACZ,UAAUA,EAAE,MAAM,MAAML,EAAM;AAAA,UAC9B,SAAS,MAAMF,EAAK,gBAAgBM,CAAK;AAAA,QAAA;AAAA,MAC1C,CACA;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index233.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index233.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/index234.js
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as p, ref as _, computed as b, onMounted as f, openBlock as n, createElementBlock as o, createElementVNode as k, Fragment as y, renderList as h, unref as g, createBlock as v, normalizeClass as x, withCtx as B, createTextVNode as C, toDisplayString as E } from "vue";
|
|
2
|
+
import { range as w } from "./index296.js";
|
|
3
|
+
import D from "./index14.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
const S = { class: "content" }, c = 100, V = /* @__PURE__ */ p({
|
|
6
|
+
__name: "BaseDatePickerYearSelector",
|
|
7
|
+
props: {
|
|
8
|
+
cursor: {},
|
|
9
|
+
disabled: { type: Boolean }
|
|
10
|
+
},
|
|
11
|
+
emits: ["update:year"],
|
|
12
|
+
setup(s, { emit: l }) {
|
|
13
|
+
const i = s, d = l, r = _(), u = b(() => i.cursor.year()), a = (/* @__PURE__ */ new Date()).getFullYear() - c / 2, m = w(a, a + c).map((e) => ({
|
|
14
|
+
text: e,
|
|
15
|
+
key: e,
|
|
16
|
+
selected: e === u.value,
|
|
17
|
+
handler: () => d("update:year", e)
|
|
18
|
+
}));
|
|
19
|
+
return f(() => {
|
|
20
|
+
if (!r.value) return;
|
|
21
|
+
const e = r.value.querySelector(
|
|
22
|
+
".content__btn--selected"
|
|
23
|
+
);
|
|
24
|
+
e && (e.parentElement.scrollTop = e.offsetTop - e.parentElement.clientHeight / 2 + 16);
|
|
25
|
+
}), (e, T) => (n(), o("div", {
|
|
26
|
+
ref_key: "container",
|
|
27
|
+
ref: r,
|
|
28
|
+
class: "bb-base-date-picker__button-menu bb-base-date-picker__year-selector scrollbar-border"
|
|
29
|
+
}, [
|
|
30
|
+
k("div", S, [
|
|
31
|
+
(n(!0), o(y, null, h(g(m), (t) => (n(), v(D, {
|
|
32
|
+
key: t.key,
|
|
33
|
+
class: x({
|
|
34
|
+
content__btn: !0,
|
|
35
|
+
"content__btn--selected": t.selected
|
|
36
|
+
}),
|
|
37
|
+
disabled: e.disabled,
|
|
38
|
+
onClick: t.handler
|
|
39
|
+
}, {
|
|
40
|
+
default: B(() => [
|
|
41
|
+
C(E(t.text), 1)
|
|
42
|
+
]),
|
|
43
|
+
_: 2
|
|
44
|
+
}, 1032, ["class", "disabled", "onClick"]))), 128))
|
|
45
|
+
])
|
|
46
|
+
], 512));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
2
49
|
export {
|
|
3
|
-
|
|
50
|
+
V as default
|
|
4
51
|
};
|
|
5
52
|
//# sourceMappingURL=index234.js.map
|
package/dist/index234.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index234.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index234.js","sources":["../src/components/BaseDatePicker/BaseDatePickerYearSelector.vue"],"sourcesContent":["<template>\n\t<div\n\t\tref=\"container\"\n\t\tclass=\"bb-base-date-picker__button-menu bb-base-date-picker__year-selector scrollbar-border\"\n\t>\n\t\t<div class=\"content\">\n\t\t\t<BaseButton\n\t\t\t\tv-for=\"option in options\"\n\t\t\t\t:key=\"option.key\"\n\t\t\t\t:class=\"{\n\t\t\t\t\tcontent__btn: true,\n\t\t\t\t\t'content__btn--selected': option.selected,\n\t\t\t\t}\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t@click=\"option.handler\"\n\t\t\t>\n\t\t\t\t{{ option.text }}\n\t\t\t</BaseButton>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Dayjs } from 'dayjs';\nimport { computed, onMounted } from 'vue';\nimport { range } from '@/utilities/functions/range';\nimport { ref } from 'vue';\nimport BaseButton from '../BaseButton/BaseButton.vue';\n\ntype Props = {\n\tcursor: Dayjs;\n\tdisabled: boolean;\n};\nconst props = defineProps<Props>();\nconst emit = defineEmits<{\n\t(event: 'update:year', value: number): void;\n}>();\n\nconst container = ref<HTMLElement>();\n\nconst year = computed(() => props.cursor.year());\n\nconst howMany = 100;\nconst startingYear = new Date().getFullYear() - howMany / 2;\n\nconst options = range(startingYear, startingYear + howMany).map((y) => {\n\treturn {\n\t\ttext: y,\n\t\tkey: y,\n\t\tselected: y === year.value,\n\t\thandler: () => emit('update:year', y),\n\t};\n});\nonMounted(() => {\n\tif (!container.value) return;\n\tconst el = container.value.querySelector<HTMLElement>(\n\t\t'.content__btn--selected'\n\t);\n\tif (!el) return;\n\tel.parentElement!.scrollTop =\n\t\tel.offsetTop - el.parentElement!.clientHeight / 2 + 16;\n});\n</script>\n"],"names":["howMany","props","__props","emit","__emit","container","ref","year","computed","startingYear","options","range","y","onMounted","el"],"mappings":";;;;gCA0CMA,IAAU;;;;;;;;AAThB,UAAMC,IAAQC,GACRC,IAAOC,GAIPC,IAAYC,KAEZC,IAAOC,EAAS,MAAMP,EAAM,OAAO,MAAM,GAGzCQ,KAAmB,oBAAA,KAAA,GAAO,gBAAgBT,IAAU,GAEpDU,IAAUC,EAAMF,GAAcA,IAAeT,CAAO,EAAE,IAAI,CAACY,OACzD;AAAA,MACN,MAAMA;AAAA,MACN,KAAKA;AAAA,MACL,UAAUA,MAAML,EAAK;AAAA,MACrB,SAAS,MAAMJ,EAAK,eAAeS,CAAC;AAAA,IAAA,EAErC;AACD,WAAAC,EAAU,MAAM;AACX,UAAA,CAACR,EAAU,MAAO;AAChB,YAAAS,IAAKT,EAAU,MAAM;AAAA,QAC1B;AAAA,MAAA;AAED,MAAKS,MACLA,EAAG,cAAe,YACjBA,EAAG,YAAYA,EAAG,cAAe,eAAe,IAAI;AAAA,IAAA,CACrD;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index235.js
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const a = (t, r) => {
|
|
3
|
-
if (!Object.prototype.hasOwnProperty.call(t, r))
|
|
4
|
-
throw new Error(
|
|
5
|
-
`Object ${JSON.stringify(t, null, 2)} has no property named "${r.toString()}"`
|
|
6
|
-
);
|
|
7
|
-
}, l = (t) => typeof t == "string" ? t.toLocaleLowerCase() : JSON.stringify(t).toLowerCase(), y = (t, r, s) => {
|
|
8
|
-
const i = s.toLocaleLowerCase();
|
|
9
|
-
for (let e = 0; e < r.length; e++) {
|
|
10
|
-
const n = r[e];
|
|
11
|
-
a(t, n);
|
|
12
|
-
const o = t[n];
|
|
13
|
-
if (c(o)) continue;
|
|
14
|
-
if (l(o).includes(i)) return !0;
|
|
15
|
-
}
|
|
16
|
-
return !1;
|
|
17
|
-
};
|
|
1
|
+
const o = (e) => e[0];
|
|
18
2
|
export {
|
|
19
|
-
|
|
3
|
+
o as head
|
|
20
4
|
};
|
|
21
5
|
//# sourceMappingURL=index235.js.map
|
package/dist/index235.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index235.js","sources":["../src/utilities/functions/
|
|
1
|
+
{"version":3,"file":"index235.js","sources":["../src/utilities/functions/head.ts"],"sourcesContent":["/** Takes an array and returns the first item in it */\nexport const head = <T>(arr: T[]) => arr[0];\n"],"names":["head","arr"],"mappings":"AACO,MAAMA,IAAO,CAAIC,MAAaA,EAAI,CAAC;"}
|
package/dist/index236.js
CHANGED
|
@@ -1,109 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { hash as d } from "./index222.js";
|
|
3
|
-
import { isNil as l } from "./index125.js";
|
|
4
|
-
import E from "./index120.js";
|
|
5
|
-
/* empty css */
|
|
6
|
-
const K = /* @__PURE__ */ y({
|
|
7
|
-
__name: "ChipsBox",
|
|
8
|
-
props: {
|
|
9
|
-
options: {}
|
|
10
|
-
},
|
|
11
|
-
emits: ["option:unselected"],
|
|
12
|
-
setup(f, { expose: v, emit: h }) {
|
|
13
|
-
const t = f, u = h, n = F(null), i = H(() => t.options.some((e) => !e.disabled)), a = (e = 1) => {
|
|
14
|
-
const s = l(n.value) ? -1 : n.value;
|
|
15
|
-
let o = (s + e) % t.options.length;
|
|
16
|
-
for (; t.options[o].disabled && o !== s; )
|
|
17
|
-
o = a(e + 1);
|
|
18
|
-
return o;
|
|
19
|
-
}, x = () => {
|
|
20
|
-
if (!i.value) return;
|
|
21
|
-
const e = a();
|
|
22
|
-
n.value = e;
|
|
23
|
-
}, c = (e = 1) => {
|
|
24
|
-
const s = l(n.value) ? 0 : n.value;
|
|
25
|
-
let o = (s - e + t.options.length) % t.options.length;
|
|
26
|
-
for (; t.options[o].disabled && o !== s; )
|
|
27
|
-
o = c(e + 1);
|
|
28
|
-
return o;
|
|
29
|
-
}, m = async () => {
|
|
30
|
-
if (!i.value) return;
|
|
31
|
-
const e = c();
|
|
32
|
-
n.value = e;
|
|
33
|
-
}, w = () => {
|
|
34
|
-
if (!i.value) return;
|
|
35
|
-
let e = 0;
|
|
36
|
-
for (; t.options[e].disabled; )
|
|
37
|
-
e++;
|
|
38
|
-
n.value = e;
|
|
39
|
-
}, b = () => {
|
|
40
|
-
if (!i.value) return;
|
|
41
|
-
let e = t.options.length - 1;
|
|
42
|
-
for (; t.options[e].disabled && e !== 0; )
|
|
43
|
-
e--;
|
|
44
|
-
n.value = e;
|
|
45
|
-
}, I = () => {
|
|
46
|
-
if (!i.value) return;
|
|
47
|
-
let e = 0;
|
|
48
|
-
for (; !t.options[e].selected && t.options.length !== e; )
|
|
49
|
-
e++;
|
|
50
|
-
n.value = e;
|
|
51
|
-
}, g = () => {
|
|
52
|
-
if (!i.value) return;
|
|
53
|
-
let e = t.options.length - 1;
|
|
54
|
-
for (; t.options[e].selected && e !== 0; )
|
|
55
|
-
e--;
|
|
56
|
-
n.value = e;
|
|
57
|
-
}, _ = (e) => {
|
|
58
|
-
if (!i.value) return;
|
|
59
|
-
const s = t.options.findIndex(
|
|
60
|
-
(o) => o.valueHash === e
|
|
61
|
-
);
|
|
62
|
-
s >= 0 && (n.value = s);
|
|
63
|
-
}, r = () => {
|
|
64
|
-
n.value = null;
|
|
65
|
-
}, k = () => {
|
|
66
|
-
if (l(n.value)) return;
|
|
67
|
-
const e = t.options[n.value];
|
|
68
|
-
e.selected && u("option:unselected", e);
|
|
69
|
-
}, C = () => l(n.value) ? void 0 : t.options[n.value];
|
|
70
|
-
return N(
|
|
71
|
-
() => t.options,
|
|
72
|
-
(e, s) => {
|
|
73
|
-
d(e) !== d(s) && r();
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
flush: "post"
|
|
77
|
-
}
|
|
78
|
-
), v({
|
|
79
|
-
focusNext: x,
|
|
80
|
-
focusPrevious: m,
|
|
81
|
-
focusFirst: w,
|
|
82
|
-
focusFirstSelected: I,
|
|
83
|
-
focusLast: b,
|
|
84
|
-
focusLastSelected: g,
|
|
85
|
-
blur: r,
|
|
86
|
-
confirmOption: k,
|
|
87
|
-
focusByHash: _,
|
|
88
|
-
getHighlighted: C
|
|
89
|
-
}), (e, s) => (p(!0), L(S, null, V(e.options, (o, B) => (p(), A(E, {
|
|
90
|
-
key: o.valueHash,
|
|
91
|
-
class: O({
|
|
92
|
-
"bb-chipsbox-item": !0,
|
|
93
|
-
"bb-chipsbox-item--focused": B === n.value
|
|
94
|
-
}),
|
|
95
|
-
clearable: !0,
|
|
96
|
-
text: o.text,
|
|
97
|
-
"onClick:clear": P((M) => u("option:unselected", o), ["stop"])
|
|
98
|
-
}, {
|
|
99
|
-
default: $(() => [
|
|
100
|
-
z(D(o.text), 1)
|
|
101
|
-
]),
|
|
102
|
-
_: 2
|
|
103
|
-
}, 1032, ["class", "text", "onClick:clear"]))), 128));
|
|
104
|
-
}
|
|
105
|
-
});
|
|
1
|
+
import f from "./index288.js";
|
|
106
2
|
export {
|
|
107
|
-
|
|
3
|
+
f as default
|
|
108
4
|
};
|
|
109
5
|
//# sourceMappingURL=index236.js.map
|
package/dist/index236.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index236.js","sources":[
|
|
1
|
+
{"version":3,"file":"index236.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index237.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { isNil as c } from "./index126.js";
|
|
2
|
+
const a = (t, r) => {
|
|
3
|
+
if (!Object.prototype.hasOwnProperty.call(t, r))
|
|
4
|
+
throw new Error(
|
|
5
|
+
`Object ${JSON.stringify(t, null, 2)} has no property named "${r.toString()}"`
|
|
6
|
+
);
|
|
7
|
+
}, l = (t) => typeof t == "string" ? t.toLocaleLowerCase() : JSON.stringify(t).toLowerCase(), y = (t, r, s) => {
|
|
8
|
+
const i = s.toLocaleLowerCase();
|
|
9
|
+
for (let e = 0; e < r.length; e++) {
|
|
10
|
+
const n = r[e];
|
|
11
|
+
a(t, n);
|
|
12
|
+
const o = t[n];
|
|
13
|
+
if (c(o)) continue;
|
|
14
|
+
if (l(o).includes(i)) return !0;
|
|
15
|
+
}
|
|
16
|
+
return !1;
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
y as matchAnyKey
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index237.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index237.js","sources":["../src/utilities/functions/matchAnyKey.ts"],"sourcesContent":["import { isNil } from './isNil';\n\nconst ensureKeyExists = <T extends object>(item: T, key: keyof T) => {\n\tif (!Object.prototype.hasOwnProperty.call(item, key)) {\n\t\tthrow new Error(\n\t\t\t`Object ${JSON.stringify(item, null, 2)} has no property named \"${key.toString()}\"`\n\t\t);\n\t}\n};\nconst asString = (value: any) => {\n\tif (typeof value === 'string') return value.toLocaleLowerCase();\n\treturn JSON.stringify(value).toLowerCase();\n};\n\n/**\n * Return true or false based on whether the query is included in the passed keys\n * @param item The object to test\n * @param keys The keys to be tested as haystack\n * @param query The query to searched as needle\n * @returns boolean\n */\nexport const matchAnyKey = <T extends object>(\n\titem: T,\n\tkeys: (keyof T)[],\n\tquery: string\n) => {\n\tconst lcQuery = query.toLocaleLowerCase();\n\tfor (let index = 0; index < keys.length; index++) {\n\t\tconst key = keys[index];\n\t\tensureKeyExists(item, key);\n\t\tconst value = item[key];\n\t\tif (isNil(value)) continue;\n\t\tconst valueAsString = asString(value);\n\t\tif (valueAsString.includes(lcQuery)) return true;\n\t}\n\treturn false;\n};\n"],"names":["ensureKeyExists","item","key","asString","value","matchAnyKey","keys","query","lcQuery","index","isNil"],"mappings":";AAEA,MAAMA,IAAkB,CAAmBC,GAASC,MAAiB;AACpE,MAAI,CAAC,OAAO,UAAU,eAAe,KAAKD,GAAMC,CAAG;AAClD,UAAM,IAAI;AAAA,MACT,UAAU,KAAK,UAAUD,GAAM,MAAM,CAAC,CAAC,2BAA2BC,EAAI,SAAA,CAAU;AAAA,IAAA;AAGnF,GACMC,IAAW,CAACC,MACb,OAAOA,KAAU,WAAiBA,EAAM,kBAAkB,IACvD,KAAK,UAAUA,CAAK,EAAE,YAAY,GAU7BC,IAAc,CAC1BJ,GACAK,GACAC,MACI;AACE,QAAAC,IAAUD,EAAM;AACtB,WAASE,IAAQ,GAAGA,IAAQH,EAAK,QAAQG,KAAS;AAC3C,UAAAP,IAAMI,EAAKG,CAAK;AACtB,IAAAT,EAAgBC,GAAMC,CAAG;AACnB,UAAAE,IAAQH,EAAKC,CAAG;AAClB,QAAAQ,EAAMN,CAAK,EAAG;AAElB,QADsBD,EAASC,CAAK,EAClB,SAASI,CAAO,EAAU,QAAA;AAAA,EAC7C;AACO,SAAA;AACR;"}
|
package/dist/index238.js
CHANGED
|
@@ -1,103 +1,109 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { hash as
|
|
3
|
-
import { isNil as
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { defineComponent as y, ref as F, computed as H, watch as N, openBlock as p, createElementBlock as L, Fragment as S, renderList as V, createBlock as A, normalizeClass as O, withModifiers as P, withCtx as $, createTextVNode as z, toDisplayString as D } from "vue";
|
|
2
|
+
import { hash as d } from "./index229.js";
|
|
3
|
+
import { isNil as l } from "./index126.js";
|
|
4
|
+
import E from "./index121.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
const K = /* @__PURE__ */ y({
|
|
7
|
+
__name: "ChipsBox",
|
|
6
8
|
props: {
|
|
7
9
|
options: {}
|
|
8
10
|
},
|
|
9
11
|
emits: ["option:unselected"],
|
|
10
|
-
setup(
|
|
11
|
-
const t =
|
|
12
|
-
const s =
|
|
12
|
+
setup(f, { expose: v, emit: h }) {
|
|
13
|
+
const t = f, u = h, n = F(null), i = H(() => t.options.some((e) => !e.disabled)), a = (e = 1) => {
|
|
14
|
+
const s = l(n.value) ? -1 : n.value;
|
|
13
15
|
let o = (s + e) % t.options.length;
|
|
14
16
|
for (; t.options[o].disabled && o !== s; )
|
|
15
|
-
o =
|
|
17
|
+
o = a(e + 1);
|
|
16
18
|
return o;
|
|
17
|
-
},
|
|
18
|
-
if (!
|
|
19
|
-
const e =
|
|
19
|
+
}, x = () => {
|
|
20
|
+
if (!i.value) return;
|
|
21
|
+
const e = a();
|
|
20
22
|
n.value = e;
|
|
21
23
|
}, c = (e = 1) => {
|
|
22
|
-
const s =
|
|
24
|
+
const s = l(n.value) ? 0 : n.value;
|
|
23
25
|
let o = (s - e + t.options.length) % t.options.length;
|
|
24
26
|
for (; t.options[o].disabled && o !== s; )
|
|
25
27
|
o = c(e + 1);
|
|
26
28
|
return o;
|
|
27
|
-
},
|
|
28
|
-
if (!
|
|
29
|
+
}, m = async () => {
|
|
30
|
+
if (!i.value) return;
|
|
29
31
|
const e = c();
|
|
30
32
|
n.value = e;
|
|
31
|
-
},
|
|
32
|
-
if (!
|
|
33
|
+
}, w = () => {
|
|
34
|
+
if (!i.value) return;
|
|
33
35
|
let e = 0;
|
|
34
36
|
for (; t.options[e].disabled; )
|
|
35
37
|
e++;
|
|
36
38
|
n.value = e;
|
|
37
|
-
},
|
|
38
|
-
if (!
|
|
39
|
+
}, b = () => {
|
|
40
|
+
if (!i.value) return;
|
|
39
41
|
let e = t.options.length - 1;
|
|
40
42
|
for (; t.options[e].disabled && e !== 0; )
|
|
41
43
|
e--;
|
|
42
44
|
n.value = e;
|
|
43
|
-
},
|
|
44
|
-
if (!
|
|
45
|
+
}, I = () => {
|
|
46
|
+
if (!i.value) return;
|
|
45
47
|
let e = 0;
|
|
46
48
|
for (; !t.options[e].selected && t.options.length !== e; )
|
|
47
49
|
e++;
|
|
48
50
|
n.value = e;
|
|
49
|
-
},
|
|
50
|
-
if (!
|
|
51
|
+
}, g = () => {
|
|
52
|
+
if (!i.value) return;
|
|
51
53
|
let e = t.options.length - 1;
|
|
52
54
|
for (; t.options[e].selected && e !== 0; )
|
|
53
55
|
e--;
|
|
54
56
|
n.value = e;
|
|
55
|
-
},
|
|
56
|
-
if (!
|
|
57
|
+
}, _ = (e) => {
|
|
58
|
+
if (!i.value) return;
|
|
57
59
|
const s = t.options.findIndex(
|
|
58
60
|
(o) => o.valueHash === e
|
|
59
61
|
);
|
|
60
62
|
s >= 0 && (n.value = s);
|
|
61
63
|
}, r = () => {
|
|
62
64
|
n.value = null;
|
|
63
|
-
},
|
|
64
|
-
if (
|
|
65
|
+
}, k = () => {
|
|
66
|
+
if (l(n.value)) return;
|
|
65
67
|
const e = t.options[n.value];
|
|
66
|
-
e.selected &&
|
|
67
|
-
},
|
|
68
|
+
e.selected && u("option:unselected", e);
|
|
69
|
+
}, C = () => l(n.value) ? void 0 : t.options[n.value];
|
|
68
70
|
return N(
|
|
69
71
|
() => t.options,
|
|
70
72
|
(e, s) => {
|
|
71
|
-
|
|
73
|
+
d(e) !== d(s) && r();
|
|
72
74
|
},
|
|
73
75
|
{
|
|
74
76
|
flush: "post"
|
|
75
77
|
}
|
|
76
|
-
),
|
|
77
|
-
focusNext:
|
|
78
|
-
focusPrevious:
|
|
79
|
-
focusFirst:
|
|
80
|
-
focusFirstSelected:
|
|
81
|
-
focusLast:
|
|
82
|
-
focusLastSelected:
|
|
78
|
+
), v({
|
|
79
|
+
focusNext: x,
|
|
80
|
+
focusPrevious: m,
|
|
81
|
+
focusFirst: w,
|
|
82
|
+
focusFirstSelected: I,
|
|
83
|
+
focusLast: b,
|
|
84
|
+
focusLastSelected: g,
|
|
83
85
|
blur: r,
|
|
84
|
-
confirmOption:
|
|
85
|
-
focusByHash:
|
|
86
|
-
getHighlighted:
|
|
87
|
-
}), (e, s) => (
|
|
86
|
+
confirmOption: k,
|
|
87
|
+
focusByHash: _,
|
|
88
|
+
getHighlighted: C
|
|
89
|
+
}), (e, s) => (p(!0), L(S, null, V(e.options, (o, B) => (p(), A(E, {
|
|
88
90
|
key: o.valueHash,
|
|
89
91
|
class: O({
|
|
90
|
-
"bb-
|
|
91
|
-
"bb-
|
|
92
|
-
"bb-commabox-item--has-comma": p !== e.options.length - 1
|
|
92
|
+
"bb-chipsbox-item": !0,
|
|
93
|
+
"bb-chipsbox-item--focused": B === n.value
|
|
93
94
|
}),
|
|
94
95
|
clearable: !0,
|
|
95
96
|
text: o.text,
|
|
96
|
-
"onClick:clear": P((
|
|
97
|
-
},
|
|
97
|
+
"onClick:clear": P((M) => u("option:unselected", o), ["stop"])
|
|
98
|
+
}, {
|
|
99
|
+
default: $(() => [
|
|
100
|
+
z(D(o.text), 1)
|
|
101
|
+
]),
|
|
102
|
+
_: 2
|
|
103
|
+
}, 1032, ["class", "text", "onClick:clear"]))), 128));
|
|
98
104
|
}
|
|
99
105
|
});
|
|
100
106
|
export {
|
|
101
|
-
|
|
107
|
+
K as default
|
|
102
108
|
};
|
|
103
109
|
//# sourceMappingURL=index238.js.map
|
package/dist/index238.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index238.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index238.js","sources":["../src/components/ChipsBox.vue"],"sourcesContent":["<template>\n\t<BbChip\n\t\tv-for=\"(item, index) in options\"\n\t\t:key=\"item.valueHash\"\n\t\t:class=\"{\n\t\t\t'bb-chipsbox-item': true,\n\t\t\t'bb-chipsbox-item--focused': index === focusedIndex,\n\t\t}\"\n\t\t:clearable=\"true\"\n\t\t:text=\"item.text\"\n\t\t@click:clear.stop=\"emit('option:unselected', item)\"\n\t\t>{{ item.text }}</BbChip\n\t>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { hash } from '@/utilities/functions/hash';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { ref } from 'vue';\nimport { watch } from 'vue';\nimport BbChip from './BbChip/BbChip.vue';\nimport type { Option } from '@/types/Option';\n\ntype Props = {\n\toptions: Option[];\n};\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n\t(e: 'option:unselected', option: Option): void;\n}>();\n\n/**\n * START FOCUS HANDLING\n */\n\nconst focusedIndex = ref<null | number>(null);\n\nconst canFocus = computed(() => props.options.some((o) => !o.disabled));\n\nconst findNextAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? -1 : focusedIndex.value!;\n\tlet newIndex = (initialValue + offset) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findNextAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\n\nconst focusNext = () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findNextAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\nconst findPreviousAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? 0 : focusedIndex.value!;\n\tlet newIndex =\n\t\t(initialValue - offset + props.options.length) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findPreviousAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\nconst focusPrevious = async () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findPreviousAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusFirst = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (props.options[newIndex].disabled) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusLast = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].disabled && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusFirstSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (\n\t\t!props.options[newIndex].selected &&\n\t\tprops.options.length !== newIndex\n\t) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusLastSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].selected && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusByHash = (hash: Option['valueHash']) => {\n\tif (!canFocus.value) return;\n\tconst linkedOptionIndex = props.options.findIndex(\n\t\t(o) => o.valueHash === hash\n\t);\n\tif (linkedOptionIndex >= 0) {\n\t\tfocusedIndex.value = linkedOptionIndex;\n\t}\n};\n\nconst blur = () => {\n\tfocusedIndex.value = null;\n};\n\n/**\n * END FOCUS HANDLING\n */\n\nconst confirmOption = () => {\n\tif (isNil(focusedIndex.value)) return;\n\tconst option = props.options[focusedIndex.value!];\n\tif (option.selected) {\n\t\temit('option:unselected', option);\n\t}\n};\n\nconst getHighlighted = () => {\n\tif (isNil(focusedIndex.value)) return;\n\tconst option = props.options[focusedIndex.value!];\n\treturn option;\n};\n\nwatch(\n\t() => props.options,\n\t(value, previous) => {\n\t\tif (hash(value) !== hash(previous)) {\n\t\t\tblur();\n\t\t}\n\t},\n\t{\n\t\tflush: 'post',\n\t}\n);\n\ndefineExpose({\n\tfocusNext,\n\tfocusPrevious,\n\tfocusFirst,\n\tfocusFirstSelected,\n\tfocusLast,\n\tfocusLastSelected,\n\tblur,\n\tconfirmOption,\n\tfocusByHash,\n\tgetHighlighted,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/ChipsBox';\n</style>\n"],"names":["props","__props","emit","__emit","focusedIndex","ref","canFocus","computed","o","findNextAvailableIndex","offset","initialValue","isNil","newIndex","focusNext","findPreviousAvailableIndex","focusPrevious","focusFirst","focusLast","focusFirstSelected","focusLastSelected","focusByHash","hash","linkedOptionIndex","blur","confirmOption","option","getHighlighted","watch","value","previous","__expose"],"mappings":"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"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as ae, ref as o, getCurrentInstance as se, computed as m, nextTick as N, useAttrs as ne, onMounted as ie, onBeforeUnmount as F, watch as re, openBlock as _, createBlock as ue, Teleport as de, createElementVNode as a, mergeProps as G, createElementBlock as T, renderSlot as u, createTextVNode as ce, toDisplayString as P, createCommentVNode as z } from "vue";
|
|
2
|
-
import { throttle as ve } from "./
|
|
3
|
-
import { useFocusTrap as fe } from "./
|
|
4
|
-
import { useId as K } from "./
|
|
5
|
-
import { wait as H } from "./
|
|
6
|
-
import { waitFor as be } from "./
|
|
7
|
-
import { useModalsState as k } from "./
|
|
8
|
-
import { useLogger as pe } from "./
|
|
2
|
+
import { throttle as ve } from "./index225.js";
|
|
3
|
+
import { useFocusTrap as fe } from "./index208.js";
|
|
4
|
+
import { useId as K } from "./index9.js";
|
|
5
|
+
import { wait as H } from "./index128.js";
|
|
6
|
+
import { waitFor as be } from "./index210.js";
|
|
7
|
+
import { useModalsState as k } from "./index226.js";
|
|
8
|
+
import { useLogger as pe } from "./index220.js";
|
|
9
9
|
const me = { class: "bb-base-dialog-close" }, ge = ["aria-label"], ye = /* @__PURE__ */ a("span", { class: "bb-base-dialog-close__icon" }, [
|
|
10
10
|
/* @__PURE__ */ a("svg", {
|
|
11
11
|
"aria-hidden": "true",
|
|
@@ -259,4 +259,4 @@ const me = { class: "bb-base-dialog-close" }, ge = ["aria-label"], ye = /* @__PU
|
|
|
259
259
|
export {
|
|
260
260
|
ze as default
|
|
261
261
|
};
|
|
262
|
-
//# sourceMappingURL=
|
|
262
|
+
//# sourceMappingURL=index24.js.map
|